Merge remote-tracking branch 'origin/master'
This commit is contained in:
@@ -705,6 +705,12 @@ module.exports = {
|
|||||||
uploadTime: 'Upload time',
|
uploadTime: 'Upload time',
|
||||||
enclosure: 'enclosure',
|
enclosure: 'enclosure',
|
||||||
// 认证
|
// 认证
|
||||||
|
deleteConfiguration: 'delete Configuration',
|
||||||
|
addConfiguration: 'add Configuration',
|
||||||
|
electricMachinery: 'electricMachinery',
|
||||||
|
Battery: 'Battery',
|
||||||
|
Model: 'Model',
|
||||||
|
configurationName: 'configuration Name',
|
||||||
historicalVersion: 'historical Version',
|
historicalVersion: 'historical Version',
|
||||||
configure: 'configure',
|
configure: 'configure',
|
||||||
parameter: 'parameter',
|
parameter: 'parameter',
|
||||||
|
|||||||
@@ -712,6 +712,12 @@ module.exports = {
|
|||||||
uploadTime:'上传时间',
|
uploadTime:'上传时间',
|
||||||
enclosure:'附件',
|
enclosure:'附件',
|
||||||
// 认证
|
// 认证
|
||||||
|
deleteConfiguration: '删除配置',
|
||||||
|
addConfiguration: '添加配置',
|
||||||
|
electricMachinery: '电机',
|
||||||
|
Battery: '电池',
|
||||||
|
Model: '车型',
|
||||||
|
configurationName: '配置名称',
|
||||||
historicalVersion: '历史版本',
|
historicalVersion: '历史版本',
|
||||||
configure: '配置',
|
configure: '配置',
|
||||||
parameter: '参数',
|
parameter: '参数',
|
||||||
|
|||||||
@@ -73,7 +73,7 @@
|
|||||||
<parameter-template v-if='areaVisible' @areaVisible='handleCancel' :templateTitle='templatetitle'
|
<parameter-template v-if='areaVisible' @areaVisible='handleCancel' :templateTitle='templatetitle'
|
||||||
:selectedRowKeyS='selectedRowKeys' :rowId='rowId' :version='version'></parameter-template>
|
:selectedRowKeyS='selectedRowKeys' :rowId='rowId' :version='version'></parameter-template>
|
||||||
</a-modal>
|
</a-modal>
|
||||||
<configure ref="configureRef"/>
|
<configure ref="configureRef" :url='url' :itemId='itemId'/>
|
||||||
</a-card>
|
</a-card>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -146,6 +146,8 @@
|
|||||||
queryById: 'params/manifest/queryById',
|
queryById: 'params/manifest/queryById',
|
||||||
deleteBatch: 'params/manifest/delete',
|
deleteBatch: 'params/manifest/delete',
|
||||||
deleteAll: 'params/manifest/deleteBatch',
|
deleteAll: 'params/manifest/deleteBatch',
|
||||||
|
conAdd: 'params/config/addBatch',
|
||||||
|
conList: 'params/config/list',
|
||||||
},
|
},
|
||||||
loading: false,
|
loading: false,
|
||||||
dataSource: [],
|
dataSource: [],
|
||||||
@@ -158,7 +160,8 @@
|
|||||||
templatetitle: '',
|
templatetitle: '',
|
||||||
templatetitleId: '',
|
templatetitleId: '',
|
||||||
rowId: '',
|
rowId: '',
|
||||||
version: 0
|
version: 0,
|
||||||
|
itemId: ''
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
@@ -189,8 +192,9 @@
|
|||||||
|
|
||||||
},
|
},
|
||||||
// 配置
|
// 配置
|
||||||
configure() {
|
configure(item) {
|
||||||
this.$refs.configureRef.addModel()
|
this.itemId = item.id
|
||||||
|
this.$refs.configureRef.addModel(item.id)
|
||||||
},
|
},
|
||||||
handleCancel(val) {
|
handleCancel(val) {
|
||||||
this.areaVisible = val
|
this.areaVisible = val
|
||||||
@@ -227,9 +231,6 @@
|
|||||||
} else {
|
} else {
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
|
||||||
handleExport(){
|
|
||||||
|
|
||||||
},
|
},
|
||||||
handleAdd(){
|
handleAdd(){
|
||||||
this.areaVisible = true
|
this.areaVisible = true
|
||||||
|
|||||||
@@ -1078,7 +1078,7 @@
|
|||||||
let num = 2
|
let num = 2
|
||||||
// for (let i = 0; i < 3; i++) {
|
// for (let i = 0; i < 3; i++) {
|
||||||
// setTimeout(() => {
|
// setTimeout(() => {
|
||||||
this.startProcessDesign(val, num)
|
this.startProcessDesign(val)
|
||||||
// }, 500)
|
// }, 500)
|
||||||
// }
|
// }
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -11,172 +11,91 @@
|
|||||||
style="height: 100%;overflow: auto;padding-bottom: 53px;">
|
style="height: 100%;overflow: auto;padding-bottom: 53px;">
|
||||||
<a-spin :spinning="confirmLoading">
|
<a-spin :spinning="confirmLoading">
|
||||||
<a-form-model :model="formInline" class="formAdd" :rules="rules" ref="ruleForm">
|
<a-form-model :model="formInline" class="formAdd" :rules="rules" ref="ruleForm">
|
||||||
<a-row :gutter="24">
|
<div v-for='(item, index) in paramsConfigEOList'>
|
||||||
<a-col :span="12">
|
<a-row :gutter="24">
|
||||||
<div class="box-title-text">
|
<a-col :span="12">
|
||||||
<div class="title-text">
|
<div class="box-title-text">
|
||||||
|
<div class="title-text">
|
||||||
<span class="title-text-text"
|
<span class="title-text-text"
|
||||||
:title="$t('NiONumber')">{{$t('NiONumber')}}</span>
|
:title="$t('configurationName')">{{$t('configurationName')}}</span>
|
||||||
|
</div>
|
||||||
|
<a-form-model-item class="itemModel" prop="nioNumber">
|
||||||
|
<a-input class="box-input"
|
||||||
|
:disabled="disabled"
|
||||||
|
v-model="item.configName"
|
||||||
|
:placeholder="$t('PleaseEnter')+$t('configurationName')"/>
|
||||||
|
</a-form-model-item>
|
||||||
</div>
|
</div>
|
||||||
<!-- <a-form-model-item class="itemModel" prop="nioNumber">-->
|
</a-col>
|
||||||
<!-- <a-input class="box-input"-->
|
<a-col :span="12">
|
||||||
<!-- :disabled="disabled"-->
|
<div class="box-title-text">
|
||||||
<!-- v-model="formInline.nioNumber"-->
|
<div class="title-text">
|
||||||
<!-- :placeholder="$t('PleaseEnter')+$t('NiONumber')"/>-->
|
<span class="title-text-text" :title="$t('Version')">{{$t('Version')}}</span>
|
||||||
<!-- </a-form-model-item>-->
|
</div>
|
||||||
</div>
|
<a-form-model-item class="itemModel" prop="nioNumber">
|
||||||
</a-col>
|
<a-input class="box-input"
|
||||||
<a-col :span="12">
|
:disabled="disabled"
|
||||||
<div class="box-title-text">
|
v-model="item.version"
|
||||||
<div class="title-text">
|
:placeholder="$t('PleaseEnter')+$t('Version')"/>
|
||||||
<span class="title-text-text" :title="$t('Required')">{{$t('Required')}}</span>
|
</a-form-model-item>
|
||||||
</div>
|
</div>
|
||||||
<!-- <a-form-model-item class="itemModel" prop="isMust">-->
|
</a-col>
|
||||||
<!-- <a-select :placeholder="$t('PleaseSelect')+$t('Required')" v-model='formInline.isMust'>-->
|
</a-row>
|
||||||
<!-- <a-select-option :key="'1'" :value="'1'">{{$t('yes')}}-->
|
<a-row :gutter="24">
|
||||||
<!-- </a-select-option>-->
|
<a-col :span="12">
|
||||||
<!-- <a-select-option :key="'0'" :value="'0'">{{$t('not')}}-->
|
<div class="box-title-text">
|
||||||
<!-- </a-select-option>-->
|
<div class="title-text">
|
||||||
<!-- </a-select>-->
|
|
||||||
<!-- </a-form-model-item>-->
|
|
||||||
</div>
|
|
||||||
</a-col>
|
|
||||||
</a-row>
|
|
||||||
<a-row :gutter="24">
|
|
||||||
<a-col :span="12">
|
|
||||||
<div class="box-title-text">
|
|
||||||
<div class="title-text">
|
|
||||||
<span class="title-text-text"
|
<span class="title-text-text"
|
||||||
:title="$t('ParameterName')">{{$t('ParameterName')}}</span>
|
:title="$t('Model')">{{$t('Model')}}</span>
|
||||||
|
</div>
|
||||||
|
<a-form-model-item class="itemModel" prop="nioNumber">
|
||||||
|
<a-input class="box-input"
|
||||||
|
:disabled="disabled"
|
||||||
|
v-model="item.carType"
|
||||||
|
:placeholder="$t('PleaseEnter')+$t('Model')"/>
|
||||||
|
</a-form-model-item>
|
||||||
</div>
|
</div>
|
||||||
<!-- <a-form-model-item class="itemModel" prop="paramsName">-->
|
</a-col>
|
||||||
<!-- <a-input class="box-input"-->
|
<a-col :span="12">
|
||||||
<!-- :disabled="disabled"-->
|
<div class="box-title-text">
|
||||||
<!-- v-model="formInline.paramsName"-->
|
<div class="title-text">
|
||||||
<!-- :placeholder="$t('PleaseEnter')+$t('ParameterName')"/>-->
|
<span class="title-text-text" :title="$t('Battery')">{{$t('Battery')}}</span>
|
||||||
<!-- </a-form-model-item>-->
|
</div>
|
||||||
</div>
|
<a-form-model-item class="itemModel" prop="nioNumber">
|
||||||
</a-col>
|
<a-input class="box-input"
|
||||||
<a-col :span="12">
|
:disabled="disabled"
|
||||||
<div class="box-title-text">
|
v-model="item.battery"
|
||||||
<div class="title-text">
|
:placeholder="$t('PleaseEnter')+$t('Battery')"/>
|
||||||
<span class="title-text-text" :title="$t('technicalField')">{{$t('technicalField')}}</span>
|
</a-form-model-item>
|
||||||
</div>
|
</div>
|
||||||
<!-- <a-form-model-item class="itemModel" prop="technologyTerritory">-->
|
</a-col>
|
||||||
<!-- <a-tree-select-->
|
</a-row>
|
||||||
<!-- v-model="formInline.technologyTerritory"-->
|
<a-row :gutter="24">
|
||||||
<!-- :maxTagCount="1"-->
|
<a-col :span="12">
|
||||||
<!-- class="box-input"-->
|
<div class="box-title-text">
|
||||||
<!-- style="width: 100%"-->
|
<div class="title-text">
|
||||||
<!-- :tree-data="CategoryTreeList"-->
|
|
||||||
<!-- tree-checkable-->
|
|
||||||
<!-- :placeholder="$t('PleaseSelect')+$t('technicalField')"-->
|
|
||||||
<!-- />-->
|
|
||||||
<!-- </a-form-model-item>-->
|
|
||||||
</div>
|
|
||||||
</a-col>
|
|
||||||
</a-row>
|
|
||||||
<a-row :gutter="24">
|
|
||||||
<a-col :span="12">
|
|
||||||
<div class="box-title-text">
|
|
||||||
<div class="title-text">
|
|
||||||
<span class="title-text-text"
|
<span class="title-text-text"
|
||||||
:title="$t('parameterBatch')">{{$t('parameterBatch')}}</span>
|
:title="$t('electricMachinery')">{{$t('electricMachinery')}}</span>
|
||||||
|
</div>
|
||||||
|
<a-form-model-item class="itemModel" prop="nioNumber">
|
||||||
|
<a-input class="box-input"
|
||||||
|
:disabled="disabled"
|
||||||
|
v-model="item.motor"
|
||||||
|
:placeholder="$t('PleaseEnter')+$t('electricMachinery')"/>
|
||||||
|
</a-form-model-item>
|
||||||
</div>
|
</div>
|
||||||
<!-- <a-form-model-item class="itemModel" prop="paramsBatch">-->
|
</a-col>
|
||||||
<!-- <j-dict-select-tag class="box-input" v-model="formInline.paramsBatch"-->
|
<a-col :span="12">
|
||||||
<!-- :disabled="disabled"-->
|
<div class="box-title-text">
|
||||||
<!-- :placeholder="$t('PleaseSelect')+$t('parameterBatch')"-->
|
<div class="title-text">
|
||||||
<!-- :type="'select'"-->
|
<!-- <span class="title-text-text" :title="$t('Required')">{{$t('Required')}}</span>-->
|
||||||
<!-- :triggerChange="false" :dictCode="'params_batch'"/>-->
|
</div>
|
||||||
<!-- </a-form-model-item>-->
|
<a-button style="margin-right: .8rem" @click="addConfiguration(index)">{{$t('addConfiguration')}}</a-button>
|
||||||
</div>
|
<a-button @click="deleteConfiguration(item.id,index)" type="primary" :loading="confirmLoading">{{$t('deleteConfiguration')}}</a-button>
|
||||||
</a-col>
|
|
||||||
<a-col :span="12">
|
|
||||||
<div class="box-title-text">
|
|
||||||
<div class="title-text">
|
|
||||||
<span class="title-text-text" :title="$t('areaOfResponsibility')">{{$t('areaOfResponsibility')}}</span>
|
|
||||||
</div>
|
</div>
|
||||||
<!-- <a-form-model-item class="itemModel" prop="dutyTerritory">-->
|
</a-col>
|
||||||
<!-- <j-dict-select-tag class="box-input" v-model="formInline.dutyTerritory"-->
|
</a-row>
|
||||||
<!-- :disabled="disabled"-->
|
</div>
|
||||||
<!-- :placeholder="$t('PleaseSelect')+$t('areaOfResponsibility')"-->
|
|
||||||
<!-- :type="'select'"-->
|
|
||||||
<!-- :triggerChange="false" :dictCode="'duty_territory'"/>-->
|
|
||||||
<!-- </a-form-model-item>-->
|
|
||||||
</div>
|
|
||||||
</a-col>
|
|
||||||
</a-row>
|
|
||||||
<a-row :gutter="24">
|
|
||||||
<a-col :span="24">
|
|
||||||
<div class="box-title-text">
|
|
||||||
<div class="title-text">
|
|
||||||
<span class="title-text-text"
|
|
||||||
:title="$t('ParameterDescription')">{{$t('ParameterDescription')}}</span>
|
|
||||||
</div>
|
|
||||||
<!-- <a-form-model-item class="itemModel" prop="description">-->
|
|
||||||
<!-- <a-input class="box-input"-->
|
|
||||||
<!-- :disabled="disabled"-->
|
|
||||||
<!-- v-model="formInline.description"-->
|
|
||||||
<!-- :placeholder="$t('PleaseEnter')+$t('ParameterDescription')"/>-->
|
|
||||||
<!-- </a-form-model-item>-->
|
|
||||||
</div>
|
|
||||||
</a-col>
|
|
||||||
</a-row>
|
|
||||||
<a-row :gutter="24">
|
|
||||||
<a-col :span="24">
|
|
||||||
<div class="box-title-text">
|
|
||||||
<div class="title-text">
|
|
||||||
<span class="title-text-text"
|
|
||||||
:title="$t('ParameterName')">{{$t('certificationCategory')}}</span>
|
|
||||||
</div>
|
|
||||||
<!-- <a-form-model-item class="itemModel" prop="certCategory">-->
|
|
||||||
<!-- <j-multi-select-tag class="box-input" v-model="formInline.certCategory"-->
|
|
||||||
<!-- @change='Onchange'-->
|
|
||||||
<!-- v-on:changelabel='Onchangelabel'-->
|
|
||||||
<!-- :disabled="disabled"-->
|
|
||||||
<!-- :placeholder="$t('PleaseSelect')+$t('certificationCategory')"-->
|
|
||||||
<!-- :type="'checkbox'"-->
|
|
||||||
<!-- :triggerChange="false" :dictCode="'cert_category'"/>-->
|
|
||||||
<!-- </a-form-model-item>-->
|
|
||||||
</div>
|
|
||||||
</a-col>
|
|
||||||
</a-row>
|
|
||||||
<a-row :gutter="24">
|
|
||||||
<a-col :span="12">
|
|
||||||
<div class="box-title-text">
|
|
||||||
<div class="title-text">
|
|
||||||
<span class="title-text-text"
|
|
||||||
:title="$t('controlType')">{{$t('controlType')}}</span>
|
|
||||||
</div>
|
|
||||||
<!-- <a-form-model-item class="itemModel" prop="controlType">-->
|
|
||||||
<!-- <a-select :placeholder="$t('PleaseSelect')+$t('controlType')" v-model="formInline.controlType">-->
|
|
||||||
<!-- <a-select-option v-for="(item, key) in controlType" :key="key" :value="item.value">-->
|
|
||||||
<!-- <span style="display: inline-block;width: 100%" :title=" item.label ">-->
|
|
||||||
<!-- {{ item.label }}-->
|
|
||||||
<!-- </span>-->
|
|
||||||
<!-- </a-select-option>-->
|
|
||||||
<!-- </a-select>-->
|
|
||||||
<!-- </a-form-model-item>-->
|
|
||||||
</div>
|
|
||||||
</a-col>
|
|
||||||
<a-col :span="12">
|
|
||||||
<div class="box-title-text">
|
|
||||||
<div class="title-text">
|
|
||||||
<span class="title-text-text" :title="$t('controlVerification')">{{$t('controlVerification')}}</span>
|
|
||||||
</div>
|
|
||||||
<!-- <a-form-model-item class="itemModel" prop="technologyTerritory">-->
|
|
||||||
<!-- <a-select :placeholder="$t('PleaseSelect')+$t('controlVerification')" v-model="formInline.controlVerify">-->
|
|
||||||
<!-- <a-select-option v-for="(item, key) in controlVerification" :key="key" :value="item.value">-->
|
|
||||||
<!-- <span style="display: inline-block;width: 100%" :title=" item.label ">-->
|
|
||||||
<!-- {{ item.label }}-->
|
|
||||||
<!-- </span>-->
|
|
||||||
<!-- </a-select-option>-->
|
|
||||||
<!-- </a-select>-->
|
|
||||||
<!-- </a-form-model-item>-->
|
|
||||||
</div>
|
|
||||||
</a-col>
|
|
||||||
</a-row>
|
|
||||||
</a-form-model>
|
</a-form-model>
|
||||||
</a-spin>
|
</a-spin>
|
||||||
<div class="drawer-bootom-button">
|
<div class="drawer-bootom-button">
|
||||||
@@ -184,151 +103,64 @@
|
|||||||
<a-button @click="handleSubmit" type="primary" :loading="confirmLoading">{{$t('submit')}}</a-button>
|
<a-button @click="handleSubmit" type="primary" :loading="confirmLoading">{{$t('submit')}}</a-button>
|
||||||
</div>
|
</div>
|
||||||
</a-drawer>
|
</a-drawer>
|
||||||
<uploadFile ref="uploadFile" @uploadSuccess="uploadSuccess"></uploadFile>
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import PersonnelSelection from '@/components/PersonnelSelection/index'
|
|
||||||
import { getAction, postAction, downloadFile, putAction } from '@/api/manage'
|
import { getAction, postAction, downloadFile, putAction } from '@/api/manage'
|
||||||
import uploadFile from '@/components/uploadFile/file'
|
import uploadFile from '@/components/uploadFile/file'
|
||||||
export default {
|
export default {
|
||||||
name: 'addModel',
|
name: 'addModel',
|
||||||
components: {
|
components: {
|
||||||
uploadFile,
|
uploadFile
|
||||||
PersonnelSelection
|
},
|
||||||
|
props: {
|
||||||
|
itemId: {
|
||||||
|
type: String,
|
||||||
|
default: '',
|
||||||
|
require: true
|
||||||
|
},
|
||||||
|
url: {
|
||||||
|
type: Object,
|
||||||
|
default: '',
|
||||||
|
require: true
|
||||||
|
}
|
||||||
},
|
},
|
||||||
props: ['url'],
|
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
controlType: [ // 控件类型
|
|
||||||
{value:'1', label: '文本' },
|
|
||||||
{value:'2', label: '下拉单选' },
|
|
||||||
{value:'3', label: '下拉多选' },
|
|
||||||
{value:'4', label: '附件' },
|
|
||||||
{value:'5', label: '文本+下拉单选' },
|
|
||||||
{value:'6', label: '文本+下拉多选' },
|
|
||||||
{value:'7', label: '文本+附件' },
|
|
||||||
{value:'8', label: '下拉单选+附件' },
|
|
||||||
{value:'9', label: '下拉多选+附件' },
|
|
||||||
{value:'10', label: '文本+下拉单选+附件' },
|
|
||||||
],
|
|
||||||
controlVerification: [ // 控件校验
|
|
||||||
{value:'1', label: '无' },
|
|
||||||
{value:'2', label: '中文' },
|
|
||||||
{value:'3', label: '正整数' },
|
|
||||||
{value:'4', label: '正浮点数' },
|
|
||||||
{value:'5', label: '整数或小数' },
|
|
||||||
{value:'6', label: '一位小数' },
|
|
||||||
{value:'7', label: '两位小数' },
|
|
||||||
{value:'8', label: '三位小数' },
|
|
||||||
{value:'9', label: '四位小数' },
|
|
||||||
],
|
|
||||||
CategoryTreeList: [], // 技术领域
|
|
||||||
certCategoryParamsInfoEOList: [], // 认证类别得tab栏
|
|
||||||
formInline: {},
|
formInline: {},
|
||||||
confirmLoading: false,
|
confirmLoading: false,
|
||||||
visible: false,
|
visible: false,
|
||||||
rules: {
|
rules: {
|
||||||
nioNumber:[
|
// nioNumber:[
|
||||||
{ required: true, message: this.$t('PleaseEnter')+this.$t('NiONumber'), trigger: 'change' },
|
// { required: true, message: this.$t('PleaseEnter')+this.$t('NiONumber'), trigger: 'change' },
|
||||||
// {
|
// ]
|
||||||
// pattern: /(?!^\d+$)(?!^[a-zA-Z]+$)[0-9a-zA-Z]{1,15}/,
|
|
||||||
// message: this.$t('onlyThree'),
|
|
||||||
// trigger: 'change'
|
|
||||||
// }
|
|
||||||
],
|
|
||||||
isMust: [
|
|
||||||
{ required: true, message: this.$t('pleaseSelect')+this.$t('Required'), trigger: 'change' },
|
|
||||||
],
|
|
||||||
paramsName: [
|
|
||||||
{ required: true, message: this.$t('pleaseSelect')+this.$t('Required'), trigger: 'change' },
|
|
||||||
{ min:1, max: 30, message: this.$t('cantExeed')+'30'+this.$t('characters'), trigger: 'blur' },
|
|
||||||
],
|
|
||||||
technologyTerritory: [
|
|
||||||
{ required: true, message: this.$t('pleaseSelect')+this.$t('technicalField'), trigger: 'change' },
|
|
||||||
],
|
|
||||||
paramsBatch: [
|
|
||||||
{ required: true, message: this.$t('PleaseSelect')+this.$t('parameterBatch'), trigger: 'change' },
|
|
||||||
],
|
|
||||||
dutyTerritory: [
|
|
||||||
{ required: true, message: this.$t('PleaseSelect')+this.$t('areaOfResponsibility'), trigger: 'change' },
|
|
||||||
],
|
|
||||||
description: [
|
|
||||||
{ min:1, max: 200, message: this.$t('cantExeed')+'200'+this.$t('characters'), trigger: 'blur' },
|
|
||||||
],
|
|
||||||
controlType: [
|
|
||||||
{ required: true, message: this.$t('pleaseSelect')+this.$t('controlType'), trigger: 'change' },
|
|
||||||
],
|
|
||||||
controlValues: [
|
|
||||||
{ required: true, message: this.$t('PleaseEnter')+this.$t('controlAlternatives'), trigger: 'change' },
|
|
||||||
{ min:1, max: 500, message: this.$t('cantExeed')+'500'+this.$t('characters'), trigger: 'blur' },
|
|
||||||
],
|
|
||||||
},
|
},
|
||||||
disabled: false,
|
disabled: false,
|
||||||
projectNameList: [],
|
projectNameList: [],
|
||||||
title: '',
|
title: '',
|
||||||
stateOne: '',
|
stateOne: '',
|
||||||
contentList : []
|
contentList : [],
|
||||||
|
paramsConfigEOList: [
|
||||||
|
{
|
||||||
|
id: '',
|
||||||
|
// displaySeq: 0,
|
||||||
|
configName: '', // 配置名称
|
||||||
|
version: '', // 版本
|
||||||
|
carType: '', // 车型
|
||||||
|
battery: '', // 电池
|
||||||
|
motor: '', // 电机
|
||||||
|
}
|
||||||
|
],
|
||||||
|
conIndex: 0,
|
||||||
|
deleteConfigIds: '',
|
||||||
|
deleteConfigIdsArray: []
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.getNameList()
|
|
||||||
this.getSysCategoryTree()
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
uploadSuccess(data) {
|
|
||||||
let attIdList = []
|
|
||||||
if (data && data.length > 0) {
|
|
||||||
data.map(item => {
|
|
||||||
attIdList.push(item.id || data.name)
|
|
||||||
})
|
|
||||||
}
|
|
||||||
this.$refs.uploadFile.visible = false
|
|
||||||
/** 赋值给当前对应的表单文件 */
|
|
||||||
this.formInline.fileTemplateConnectId = attIdList.join(',')
|
|
||||||
this.formInline = { ...this.formInline }
|
|
||||||
},
|
|
||||||
clickButtonToUpload(item) {
|
|
||||||
this.$refs.uploadFile.visible = true
|
|
||||||
getAction('sys/common/getFileInfos', { id: this.formInline[item] }).then((res) => {
|
|
||||||
if (res.success) {
|
|
||||||
this.$refs.uploadFile.perentHandleFunc(res.result)
|
|
||||||
} else {
|
|
||||||
this.$refs.uploadFile.perentHandleFunc()
|
|
||||||
}
|
|
||||||
})
|
|
||||||
},
|
|
||||||
// Onchangelabel(val) {
|
|
||||||
// let _tt = []
|
|
||||||
// console.log(val,'val,,,,')
|
|
||||||
// // this.formInline.certCategoryParamsInfoEOList = []
|
|
||||||
// val.forEach((item) => {
|
|
||||||
// _tt.push({
|
|
||||||
// textVal: item.text, // tab
|
|
||||||
// certCategory: '', // 所属认证类别
|
|
||||||
// paramsNumber: '', // 编号
|
|
||||||
// paramsName: '', // 参数名称
|
|
||||||
// description: ''// 参数说明
|
|
||||||
// })
|
|
||||||
// })
|
|
||||||
// this.contentList = _tt
|
|
||||||
// },
|
|
||||||
Onchange() {
|
|
||||||
|
|
||||||
},
|
|
||||||
callback() {
|
|
||||||
|
|
||||||
},
|
|
||||||
getSysCategoryTree() {
|
|
||||||
getAction('/sys/category/getSysCategoryTree', {}).then((res) => {
|
|
||||||
if (res.success) {
|
|
||||||
this.CategoryTreeList = res.result
|
|
||||||
} else {
|
|
||||||
this.CategoryTreeList = []
|
|
||||||
}
|
|
||||||
})
|
|
||||||
},
|
|
||||||
getNameList() {
|
getNameList() {
|
||||||
getAction('project/projectNameInfoEO/list', {}).then((res) => {
|
getAction('project/projectNameInfoEO/list', {}).then((res) => {
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
@@ -338,57 +170,64 @@ export default {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
addModel() {
|
addModel(id) {
|
||||||
this.visible = true
|
this.visible = true
|
||||||
this.title = '新增'
|
this.title = '维护配置信息'
|
||||||
this.formInline = {}
|
this.formInline = {}
|
||||||
|
this.getconList(id)
|
||||||
},
|
},
|
||||||
editModel(value) {
|
editModel(value) {
|
||||||
this.visible = true
|
this.visible = true
|
||||||
this.title = '编辑'
|
this.title = '编辑配置信息'
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.formInline = value
|
this.formInline = value
|
||||||
})
|
})
|
||||||
// if(value.certCategoryParamsInfoEOList.length > 0 ) {
|
},
|
||||||
// this.contentList = value.certCategoryParamsInfoEOList
|
getconList(id) {
|
||||||
// }
|
getAction(`${this.url.conList}?paramsManifestId=${id}`, {}).then((res) => {
|
||||||
console.log(this.contentList,'this.contentList')
|
if (res.success) {
|
||||||
console.log(value.certCategoryParamsInfoEOList,'lllll')
|
this.paramsConfigEOList = res.result.length === 0 ? this.paramsConfigEOList : res.result
|
||||||
|
this.visible = true
|
||||||
|
} else {
|
||||||
|
this.$message.warning(res.message)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
addConfiguration(item) {
|
||||||
|
this.paramsConfigEOList.splice(item.displaySeq + 1,0,{
|
||||||
|
id: '',
|
||||||
|
configName: '', // 配置名称
|
||||||
|
version: '', // 版本
|
||||||
|
carType: '', // 车型
|
||||||
|
battery: '', // 电池
|
||||||
|
motor: '', // 电机
|
||||||
|
})
|
||||||
|
},
|
||||||
|
deleteConfiguration(displaySeq,index) {
|
||||||
|
this.deleteConfigIdsArray.push(displaySeq)
|
||||||
|
this.deleteConfigIds = this.deleteConfigIdsArray.join(',')
|
||||||
|
let _tt = this.paramsConfigEOList.splice(index,1)
|
||||||
},
|
},
|
||||||
handleCancel() {
|
handleCancel() {
|
||||||
this.visible = false
|
this.visible = false
|
||||||
},
|
},
|
||||||
handleSubmit() {
|
handleSubmit() {
|
||||||
// 校验nio编号
|
|
||||||
getAction(this.url.checkNIOnumber + `?nioNumber=${this.formInline.nioNumber}`, {} ).then((res) => {
|
|
||||||
if (res) {
|
|
||||||
this.$refs.ruleForm.validate(valid => {
|
this.$refs.ruleForm.validate(valid => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
let url = ''
|
let querycontentList = {}
|
||||||
let Action
|
let paramsManifestId = { paramsManifestId : this.itemId }
|
||||||
this.formInline.paramsTemplateId = this.$route.query.id
|
querycontentList = {
|
||||||
if (this.formInline.id) {
|
paramsConfigEOList: this.paramsConfigEOList,
|
||||||
url = this.url.edit
|
deleteConfigIds: this.deleteConfigIds
|
||||||
Action = postAction
|
|
||||||
} else {
|
|
||||||
url = this.url.add
|
|
||||||
Action = postAction
|
|
||||||
}
|
}
|
||||||
let query = JSON.parse(JSON.stringify(this.formInline))
|
let querycontentListItem = { ...querycontentList, ...paramsManifestId }
|
||||||
Object.keys(query).forEach(res => {
|
postAction(this.url.conAdd, querycontentListItem).then((res) => {
|
||||||
if (query[res] && query[res] instanceof Array) {
|
|
||||||
query[res] = query[res].join(',')
|
|
||||||
}
|
|
||||||
})
|
|
||||||
let querycontentList = JSON.parse(JSON.stringify(this.contentList))
|
|
||||||
query.certCategoryParamsInfoEOList = querycontentList
|
|
||||||
this.confirmLoading = true
|
|
||||||
Action(url, query).then((res) => {
|
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
this.confirmLoading = false
|
this.confirmLoading = false
|
||||||
this.$message.success(this.$t('OperationSuccessful'))
|
this.$message.success(this.$t('OperationSuccessful'))
|
||||||
this.visible = false
|
this.visible = false
|
||||||
this.$emit('addModelList')
|
this.deleteConfigIds = ''
|
||||||
|
this.deleteConfigIdsArray = []
|
||||||
} else {
|
} else {
|
||||||
this.$message.warning(res.message)
|
this.$message.warning(res.message)
|
||||||
this.confirmLoading = false
|
this.confirmLoading = false
|
||||||
@@ -396,23 +235,6 @@ export default {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
} else {
|
|
||||||
this.$message.warning(this.$t('NiOnumberalreadyexists'))
|
|
||||||
}
|
|
||||||
})
|
|
||||||
},
|
|
||||||
handleInput(value) {
|
|
||||||
this.$nextTick(() => {
|
|
||||||
this.formInline = { ...this.formInline }
|
|
||||||
this.$refs.ruleForm.validateField([value])
|
|
||||||
})
|
|
||||||
},
|
|
||||||
PersonnelSelectionChange(value, id) {
|
|
||||||
this.formInline[value] = id
|
|
||||||
this.formInline = { ...this.formInline }
|
|
||||||
},
|
|
||||||
projectNameChange(value){
|
|
||||||
console.log(value)
|
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user