修改UAT提出的优化点

This commit is contained in:
范强强
2023-07-14 13:44:54 +08:00
parent 2ffccb46f7
commit e4211fca55
5 changed files with 624 additions and 353 deletions
@@ -254,22 +254,26 @@
<a-col :span="12"> <a-col :span="12">
<div class="box-title-text"> <div class="box-title-text">
<div class="title-text"> <div class="title-text">
<span class="Required" v-if="!disabled">*</span>
<span class="title-text-text" <span class="title-text-text"
:title="$t('technicalField')">{{$t('technicalField')}}</span> :title="$t('statisticalNodes')">{{$t('statisticalNodes')}}</span>
</div> </div>
<a-form-model-item class="itemModel" prop="technologyTerritory"> <a-form-model-item class="itemModel-multi" prop="firstLevelDutyTerritory">
<a-tree-select <a-select :placeholder="$t('PleaseSelect')+$t('statisticalNodes')"
tree-node-filter-prop="title"
v-model="formInline.technologyTerritory"
:maxTagCount="1"
:getPopupContainer="triggerNode=> triggerNode.parentNode"
class="box-input" class="box-input"
style="width: 100%" optionFilterProp="label"
:disabled="disabled" mode="multiple"
:tree-data="CategoryTreeList" :getPopupContainer="triggerNode=> triggerNode.parentNode"
tree-checkable v-model="formInline.firstLevelDutyTerritory">
:placeholder="$t('PleaseSelect')+$t('technicalField')" <a-select-option v-for="(item, key) in firstLevelDutyTerritoryList"
/> :key="key"
:label="item.key"
:value="item.key">
<span style="display: inline-block;width: 100%" :title=" item.key ">
{{ item.key }}
</span>
</a-select-option>
</a-select>
</a-form-model-item> </a-form-model-item>
</div> </div>
</a-col> </a-col>
@@ -290,6 +294,31 @@
</div> </div>
</a-col> </a-col>
</a-row> </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('technicalField')">{{$t('technicalField')}}</span>
</div>
<a-form-model-item class="itemModel" prop="technologyTerritory">
<a-tree-select
tree-node-filter-prop="title"
v-model="formInline.technologyTerritory"
:maxTagCount="1"
:getPopupContainer="triggerNode=> triggerNode.parentNode"
class="box-input"
style="width: 100%"
:disabled="disabled"
:tree-data="CategoryTreeList"
tree-checkable
:placeholder="$t('PleaseSelect')+$t('technicalField')"
/>
</a-form-model-item>
</div>
</a-col>
</a-row>
<a-row :gutter="24"> <a-row :gutter="24">
<a-col :span="24"> <a-col :span="24">
<div class="box-title-text"> <div class="box-title-text">
@@ -697,14 +726,25 @@
disabled: false, disabled: false,
title: '', title: '',
CategoryTreeList: [], CategoryTreeList: [],
DeliverableTreeList: [] DeliverableTreeList: [],
firstLevelDutyTerritoryList:[],
} }
}, },
mounted() { mounted() {
this.getSysCategoryTree() this.getSysCategoryTree()
this.getDeliverableTree() this.getDeliverableTree()
this.getFirstLevelDutyTerritory()
}, },
methods: { methods: {
getFirstLevelDutyTerritory() {
getAction('/sys/dictItem/getFirstLevelDutyTerritory', {}).then((res) => {
if (res.success) {
this.firstLevelDutyTerritoryList = res.result
} else {
this.firstLevelDutyTerritoryList = []
}
})
},
getSysCategoryTree() { getSysCategoryTree() {
getAction(this.url.getSysCategoryTree, {}).then((res) => { getAction(this.url.getSysCategoryTree, {}).then((res) => {
if (res.success) { if (res.success) {
@@ -733,6 +773,7 @@
this.formInline.designDeliverableType = this.formInline.designDeliverableType ? this.formInline.designDeliverableType.split(',') : [] this.formInline.designDeliverableType = this.formInline.designDeliverableType ? this.formInline.designDeliverableType.split(',') : []
this.formInline.prehomoDeliverableType = this.formInline.prehomoDeliverableType ? this.formInline.prehomoDeliverableType.split(',') : [] this.formInline.prehomoDeliverableType = this.formInline.prehomoDeliverableType ? this.formInline.prehomoDeliverableType.split(',') : []
this.formInline.verifyDeliverableType = this.formInline.verifyDeliverableType ? this.formInline.verifyDeliverableType.split(',') : [] this.formInline.verifyDeliverableType = this.formInline.verifyDeliverableType ? this.formInline.verifyDeliverableType.split(',') : []
this.formInline.firstLevelDutyTerritory = this.formInline.firstLevelDutyTerritory ? this.formInline.firstLevelDutyTerritory.split(',') : []
this.$refs.ruleForm.clearValidate() this.$refs.ruleForm.clearValidate()
}) })
}, },
@@ -746,6 +787,7 @@
this.formInline.designDeliverableType = this.formInline.designDeliverableType ? this.formInline.designDeliverableType.split(',') : [] this.formInline.designDeliverableType = this.formInline.designDeliverableType ? this.formInline.designDeliverableType.split(',') : []
this.formInline.prehomoDeliverableType = this.formInline.prehomoDeliverableType ? this.formInline.prehomoDeliverableType.split(',') : [] this.formInline.prehomoDeliverableType = this.formInline.prehomoDeliverableType ? this.formInline.prehomoDeliverableType.split(',') : []
this.formInline.verifyDeliverableType = this.formInline.verifyDeliverableType ? this.formInline.verifyDeliverableType.split(',') : [] this.formInline.verifyDeliverableType = this.formInline.verifyDeliverableType ? this.formInline.verifyDeliverableType.split(',') : []
this.formInline.firstLevelDutyTerritory = this.formInline.firstLevelDutyTerritory ? this.formInline.firstLevelDutyTerritory.split(',') : []
this.$refs.ruleForm.clearValidate() this.$refs.ruleForm.clearValidate()
}) })
}, },
@@ -134,6 +134,56 @@
</a-form-model-item> </a-form-model-item>
</div> </div>
</a-col> </a-col>
<a-col :span="12">
<div class="box-title-text">
<div class="title-text">
<span class="Required">*</span>
<span class="title-text-text"
:title="$t('certificationType')">{{$t('certificationType')}}</span>
</div>
<a-form-model-item class="itemModel-multi"
:prop="'dataList.'+index+'.attestationType'"
:rules="[{ required: true, message: $t('certificationType') + $t('cannotEmpty'), trigger: 'change'},]"
>
<j-multi-select-tag class="box-input" v-model="item.attestationType"
:placeholder="$t('PleaseSelect')+$t('certificationType')"
:type="'select'"
:triggerChange="false"
:dictCode="'ren4_zheng4_qing1_dan1_-_ren4_zheng4_lei4_xing2'"/>
</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="Required">*</span>
<span class="title-text-text"
:title="$t('statisticalNodes')">{{$t('statisticalNodes')}}</span>
</div>
<a-form-model-item class="itemModel-multi"
:prop="'dataList.'+index+'.firstLevelDutyTerritory'"
:rules="[{ required: true, message: $t('statisticalNodes') + $t('cannotEmpty'), trigger: 'change'},]"
>
<a-select :placeholder="$t('PleaseSelect')+$t('statisticalNodes')"
class="box-input"
optionFilterProp="label"
mode="multiple"
:getPopupContainer="triggerNode=> triggerNode.parentNode"
v-model="item.firstLevelDutyTerritory">
<a-select-option v-for="(val, key) in firstLevelDutyTerritoryList"
:key="key"
:label="val.key"
:value="val.key">
<span style="display: inline-block;width: 100%" :title=" val.key ">
{{ val.key }}
</span>
</a-select-option>
</a-select>
</a-form-model-item>
</div>
</a-col>
<a-col :span="12"> <a-col :span="12">
<div class="box-title-text"> <div class="box-title-text">
<div class="title-text"> <div class="title-text">
@@ -155,26 +205,8 @@
</div> </div>
</a-col> </a-col>
</a-row> </a-row>
<a-row :gutter="24"> <a-row :gutter="24">
<a-col :span="12">
<div class="box-title-text">
<div class="title-text">
<span class="Required">*</span>
<span class="title-text-text"
:title="$t('certificationType')">{{$t('certificationType')}}</span>
</div>
<a-form-model-item class="itemModel-multi"
:prop="'dataList.'+index+'.attestationType'"
:rules="[{ required: true, message: $t('certificationType') + $t('cannotEmpty'), trigger: 'change'},]"
>
<j-multi-select-tag class="box-input" v-model="item.attestationType"
:placeholder="$t('PleaseSelect')+$t('certificationType')"
:type="'select'"
:triggerChange="false"
:dictCode="'ren4_zheng4_qing1_dan1_-_ren4_zheng4_lei4_xing2'"/>
</a-form-model-item>
</div>
</a-col>
<a-col :span="12"> <a-col :span="12">
<div class="box-title-text"> <div class="box-title-text">
<div class="title-text"> <div class="title-text">
@@ -203,9 +235,6 @@
</a-form-model-item> </a-form-model-item>
</div> </div>
</a-col> </a-col>
</a-row>
<a-row :gutter="24">
<a-col :span="12"> <a-col :span="12">
<div class="box-title-text"> <div class="box-title-text">
<div class="title-text"> <div class="title-text">
@@ -233,6 +262,8 @@
</a-form-model-item> </a-form-model-item>
</div> </div>
</a-col> </a-col>
</a-row>
<a-row :gutter="24">
<a-col :span="12"> <a-col :span="12">
<div class="box-title-text"> <div class="box-title-text">
<div class="title-text"> <div class="title-text">
@@ -250,8 +281,6 @@
</a-form-model-item> </a-form-model-item>
</div> </div>
</a-col> </a-col>
</a-row>
<a-row :gutter="24">
<a-col :span="12"> <a-col :span="12">
<div class="box-title-text"> <div class="box-title-text">
<div class="title-text"> <div class="title-text">
@@ -355,28 +384,6 @@
</a-form-model-item> </a-form-model-item>
</div> </div>
</a-col> </a-col>
<a-col :span="12">
<div class="box-title-text">
<div class="title-text">
<span class="Required">*</span>
<span class="title-text-text"
:title="$t('areaOfResponsibility')">{{$t('areaOfResponsibility')}}</span>
</div>
<a-form-model-item class="itemModel"
:prop="'dutyTerritory'"
>
<j-dict-select-tag class="box-input" v-model="formInline.dutyTerritory"
@input="handleInput('dutyTerritory')"
@changeQuery="handleChange"
: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="12"> <a-col :span="12">
<div class="box-title-text"> <div class="box-title-text">
<div class="title-text"> <div class="title-text">
@@ -396,6 +403,58 @@
</a-form-model-item> </a-form-model-item>
</div> </div>
</a-col> </a-col>
</a-row>
<a-row :gutter="24">
<a-col :span="12">
<div class="box-title-text">
<div class="title-text">
<span class="Required">*</span>
<span class="title-text-text"
:title="$t('statisticalNodes')">{{$t('statisticalNodes')}}</span>
</div>
<a-form-model-item class="itemModel-multi" prop="firstLevelDutyTerritory">
<a-select :placeholder="$t('PleaseSelect')+$t('statisticalNodes')"
class="box-input"
optionFilterProp="label"
mode="multiple"
:getPopupContainer="triggerNode=> triggerNode.parentNode"
v-model="formInline.firstLevelDutyTerritory">
<a-select-option v-for="(item, key) in firstLevelDutyTerritoryList"
:key="key"
:label="item.key"
:value="item.key">
<span style="display: inline-block;width: 100%" :title=" item.key ">
{{ item.key }}
</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="Required">*</span>
<span class="title-text-text"
:title="$t('areaOfResponsibility')">{{$t('areaOfResponsibility')}}</span>
</div>
<a-form-model-item class="itemModel"
:prop="'dutyTerritory'"
>
<j-dict-select-tag class="box-input" v-model="formInline.dutyTerritory"
@input="handleInput('dutyTerritory')"
@changeQuery="handleChange"
: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="12"> <a-col :span="12">
<div class="box-title-text"> <div class="box-title-text">
<div class="title-text"> <div class="title-text">
@@ -425,9 +484,6 @@
</a-form-model-item> </a-form-model-item>
</div> </div>
</a-col> </a-col>
</a-row>
<a-row :gutter="24">
<a-col :span="12"> <a-col :span="12">
<div class="box-title-text"> <div class="box-title-text">
<div class="title-text"> <div class="title-text">
@@ -451,6 +507,10 @@
</a-form-model-item> </a-form-model-item>
</div> </div>
</a-col> </a-col>
</a-row>
<a-row :gutter="24">
<a-col :span="12"> <a-col :span="12">
<div class="box-title-text"> <div class="box-title-text">
<div class="title-text"> <div class="title-text">
@@ -468,9 +528,6 @@
</a-form-model-item> </a-form-model-item>
</div> </div>
</a-col> </a-col>
</a-row>
<a-row :gutter="24">
<a-col :span="12"> <a-col :span="12">
<div class="box-title-text"> <div class="box-title-text">
<div class="title-text"> <div class="title-text">
@@ -493,6 +550,8 @@
</a-form-model-item> </a-form-model-item>
</div> </div>
</a-col> </a-col>
</a-row>
<a-row :gutter="24">
<a-col :span="12"> <a-col :span="12">
<div class="box-title-text"> <div class="box-title-text">
<div class="title-text"> <div class="title-text">
@@ -515,8 +574,6 @@
</a-form-model-item> </a-form-model-item>
</div> </div>
</a-col> </a-col>
</a-row>
<a-row :gutter="24">
<a-col :span="12" v-if="formInline.inventoryVerifyEndTime"> <a-col :span="12" v-if="formInline.inventoryVerifyEndTime">
<div class="box-title-text"> <div class="box-title-text">
<div class="title-text"> <div class="title-text">
@@ -535,6 +592,8 @@
</a-form-model-item> </a-form-model-item>
</div> </div>
</a-col> </a-col>
</a-row>
<a-row :gutter="24">
<a-col :span="12" v-if="formInline.taskConfirmEndTime"> <a-col :span="12" v-if="formInline.taskConfirmEndTime">
<div class="box-title-text"> <div class="box-title-text">
<div class="title-text"> <div class="title-text">
@@ -602,6 +661,7 @@
visible: false, visible: false,
personnelVisible: false, personnelVisible: false,
yearNameDataList: [], yearNameDataList: [],
firstLevelDutyTerritoryList: [],
rules: { rules: {
serialNumber: [ serialNumber: [
{ {
@@ -649,6 +709,13 @@
trigger: 'change' trigger: 'change'
} }
], ],
firstLevelDutyTerritory: [
{
required: true,
message: this.$t('statisticalNodes') + this.$t('cannotEmpty'),
trigger: 'change'
}
],
configItem: [ configItem: [
{ required: true, message: this.$t('configurationItem') + this.$t('cannotEmpty'), trigger: 'blur' }, { required: true, message: this.$t('configurationItem') + this.$t('cannotEmpty'), trigger: 'blur' },
{ {
@@ -675,9 +742,19 @@
mounted() { mounted() {
this.getDeliverableTree() this.getDeliverableTree()
this.getRegulationNo() this.getRegulationNo()
this.getFirstLevelDutyTerritory()
}, },
methods: { methods: {
...mapGetters(['userInfo']), ...mapGetters(['userInfo']),
getFirstLevelDutyTerritory() {
getAction('/sys/dictItem/getFirstLevelDutyTerritory', {}).then((res) => {
if (res.success) {
this.firstLevelDutyTerritoryList = res.result
} else {
this.firstLevelDutyTerritoryList = []
}
})
},
serialNumberClick() { serialNumberClick() {
this.$refs.addCodeNumber.add() this.$refs.addCodeNumber.add()
}, },
@@ -727,10 +804,12 @@
this.formInline = {} this.formInline = {}
this.visible = true this.visible = true
this.personnelVisible = true this.personnelVisible = true
value.firstLevelDutyTerritory = value.firstLevelDutyTerritory ? value.firstLevelDutyTerritory.split(',') : []
this.formInline = JSON.parse(JSON.stringify(value)) this.formInline = JSON.parse(JSON.stringify(value))
// if (this.formInline.deliverableType) { // if (this.formInline.deliverableType) {
// this.formInline.deliverableType = this.formInline.deliverableType.split(',') // this.formInline.deliverableType = this.formInline.deliverableType.split(',')
// } // }
if (value.dutyTerritory) { if (value.dutyTerritory) {
this.queryPersonByProject(value.dutyTerritory) this.queryPersonByProject(value.dutyTerritory)
} }
@@ -96,6 +96,32 @@
</a-col> </a-col>
</a-row> </a-row>
<a-row :gutter="24"> <a-row :gutter="24">
<a-col :span="12">
<div class="box-title-text">
<div class="title-text">
<span class="Required" v-if="formInline.roleCodeIndex == 0">*</span>
<span class="title-text-text"
:title="$t('statisticalNodes')">{{$t('statisticalNodes')}}</span>
</div>
<a-form-model-item class="itemModel-multi" prop="firstLevelDutyTerritory">
<a-select :placeholder="$t('PleaseSelect')+$t('statisticalNodes')"
class="box-input"
optionFilterProp="label"
mode="multiple"
:getPopupContainer="triggerNode=> triggerNode.parentNode"
v-model="formInline.firstLevelDutyTerritory">
<a-select-option v-for="(item, key) in firstLevelDutyTerritoryList"
:key="key"
:label="item.key"
:value="item.key">
<span style="display: inline-block;width: 100%" :title=" item.key ">
{{ item.key }}
</span>
</a-select-option>
</a-select>
</a-form-model-item>
</div>
</a-col>
<a-col :span="12"> <a-col :span="12">
<div class="box-title-text"> <div class="box-title-text">
<div class="title-text"> <div class="title-text">
@@ -113,6 +139,8 @@
</a-form-model-item> </a-form-model-item>
</div> </div>
</a-col> </a-col>
</a-row>
<a-row :gutter="24">
<a-col :span="12"> <a-col :span="12">
<div class="box-title-text"> <div class="box-title-text">
<div class="title-text"> <div class="title-text">
@@ -137,8 +165,6 @@
</a-form-model-item> </a-form-model-item>
</div> </div>
</a-col> </a-col>
</a-row>
<a-row :gutter="24">
<a-col :span="12"> <a-col :span="12">
<div class="box-title-text"> <div class="box-title-text">
<div class="title-text"> <div class="title-text">
@@ -564,6 +590,7 @@
visible: false, visible: false,
confirmLoading: false, confirmLoading: false,
rejectCauseListOne: [], rejectCauseListOne: [],
firstLevelDutyTerritoryList: [],
rules: { rules: {
attestationRank: [ attestationRank: [
{ {
@@ -579,6 +606,13 @@
trigger: 'change' trigger: 'change'
} }
], ],
firstLevelDutyTerritory:[
{
required: true,
message: this.$t('statisticalNodes') + this.$t('cannotEmpty'),
trigger: 'change'
}
],
homologationEngineerId: [ homologationEngineerId: [
{ {
required: true, required: true,
@@ -689,9 +723,19 @@
}, },
mounted() { mounted() {
this.getDeliverableTree() this.getDeliverableTree()
this.getFirstLevelDutyTerritory()
this.userInfoQuery = this.userInfo() this.userInfoQuery = this.userInfo()
}, },
methods: { methods: {
getFirstLevelDutyTerritory() {
getAction('/sys/dictItem/getFirstLevelDutyTerritory', {}).then((res) => {
if (res.success) {
this.firstLevelDutyTerritoryList = res.result
} else {
this.firstLevelDutyTerritoryList = []
}
})
},
isEdit(val) { isEdit(val) {
if (val.designFlowStatus == 'Task to be confirmed' || val.designFlowStatus == 'Results to be submitted' || if (val.designFlowStatus == 'Task to be confirmed' || val.designFlowStatus == 'Results to be submitted' ||
val.designFlowStatus == 'Results to be reviewed') { val.designFlowStatus == 'Results to be reviewed') {
@@ -821,6 +865,7 @@
item.designDeliverableType = item.designDeliverableType ? item.designDeliverableType.split(',') : [] item.designDeliverableType = item.designDeliverableType ? item.designDeliverableType.split(',') : []
item.prehomoDeliverableType = item.prehomoDeliverableType ? item.prehomoDeliverableType.split(',') : [] item.prehomoDeliverableType = item.prehomoDeliverableType ? item.prehomoDeliverableType.split(',') : []
item.verifyDeliverableType = item.verifyDeliverableType ? item.verifyDeliverableType.split(',') : [] item.verifyDeliverableType = item.verifyDeliverableType ? item.verifyDeliverableType.split(',') : []
item.firstLevelDutyTerritory = item.firstLevelDutyTerritory ? item.firstLevelDutyTerritory.split(',') : []
this.getRejectCause(item.id) this.getRejectCause(item.id)
if (item.dutyTerritory) { if (item.dutyTerritory) {
this.queryPersonByProject(item) this.queryPersonByProject(item)
@@ -30,16 +30,13 @@
<div class="box-title-text"> <div class="box-title-text">
<div class="title-text"> <div class="title-text">
<span class="Required">*</span> <span class="Required">*</span>
<span class="title-text-text" :title="$t('areaOfResponsibility')">{{$t('areaOfResponsibility')}}</span> <span class="title-text-text" :title="'WVTA ID'">WVTA ID</span>
</div> </div>
<a-form-model-item class="itemModel" prop="dutyTerritory"> <a-form-model-item class="itemModel" prop="wvtaId">
<j-dict-select-tag class="box-input" <a-input class="box-input"
v-model='formInline.wvtaId'
:disabled="disabled" :disabled="disabled"
@input="handleInput('dutyTerritory')" :placeholder="$t('PleaseEnter')+'WVTA ID'"/>
v-model="formInline.dutyTerritory"
:placeholder="$t('PleaseSelect')+$t('areaOfResponsibility')"
:type="'select'"
:triggerChange="false" :dictCode="'duty_territory'"/>
</a-form-model-item> </a-form-model-item>
</div> </div>
</a-col> </a-col>
@@ -49,13 +46,43 @@
<div class="box-title-text"> <div class="box-title-text">
<div class="title-text"> <div class="title-text">
<span class="Required">*</span> <span class="Required">*</span>
<span class="title-text-text" :title="'WVTA ID'">WVTA ID</span> <span class="title-text-text"
:title="$t('statisticalNodes')">{{$t('statisticalNodes')}}</span>
</div> </div>
<a-form-model-item class="itemModel" prop="wvtaId"> <a-form-model-item class="itemModel-multi" prop="firstLevelDutyTerritory">
<a-input class="box-input" <a-select :placeholder="$t('PleaseSelect')+$t('statisticalNodes')"
v-model='formInline.wvtaId' class="box-input"
optionFilterProp="label"
mode="multiple"
:getPopupContainer="triggerNode=> triggerNode.parentNode"
v-model="formInline.firstLevelDutyTerritory">
<a-select-option v-for="(item, key) in firstLevelDutyTerritoryList"
:key="key"
:label="item.key"
:value="item.key">
<span style="display: inline-block;width: 100%" :title=" item.key ">
{{ item.key }}
</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="Required">*</span>
<span class="title-text-text"
:title="$t('areaOfResponsibility')">{{$t('areaOfResponsibility')}}</span>
</div>
<a-form-model-item class="itemModel" prop="dutyTerritory">
<j-dict-select-tag class="box-input"
:disabled="disabled" :disabled="disabled"
:placeholder="$t('PleaseEnter')+'WVTA ID'"/> @input="handleInput('dutyTerritory')"
v-model="formInline.dutyTerritory"
:placeholder="$t('PleaseSelect')+$t('areaOfResponsibility')"
:type="'select'"
:triggerChange="false" :dictCode="'duty_territory'"/>
</a-form-model-item> </a-form-model-item>
</div> </div>
</a-col> </a-col>
@@ -159,7 +186,8 @@
<j-multi-select-tag class="box-input" v-model="item.attestationType" <j-multi-select-tag class="box-input" v-model="item.attestationType"
:placeholder="$t('PleaseSelect')+$t('certificationType')" :placeholder="$t('PleaseSelect')+$t('certificationType')"
:type="'select'" :type="'select'"
:triggerChange="false" :dictCode="'ren4_zheng4_qing1_dan1_-_ren4_zheng4_lei4_xing2'"/> :triggerChange="false"
:dictCode="'ren4_zheng4_qing1_dan1_-_ren4_zheng4_lei4_xing2'"/>
</a-form-model-item> </a-form-model-item>
</div> </div>
</a-col> </a-col>
@@ -202,7 +230,7 @@ import { getAction, postAction } from '@/api/manage'
import { mapGetters } from 'vuex' import { mapGetters } from 'vuex'
export default { export default {
name:"addModel", name: 'addModel',
props: ['url'], props: ['url'],
components: { components: {
codeNumber, codeNumber,
@@ -216,6 +244,7 @@ export default {
confirmLoading: false, confirmLoading: false,
projectNameList: [], projectNameList: [],
DeliverableTreeList: [], DeliverableTreeList: [],
firstLevelDutyTerritoryList: [],
rules: { rules: {
serialNumber: [ serialNumber: [
{ {
@@ -231,6 +260,13 @@ export default {
trigger: 'change' trigger: 'change'
} }
], ],
firstLevelDutyTerritory: [
{
required: true,
message: this.$t('statisticalNodes') + this.$t('areaOfResponsibility'),
trigger: 'change'
}
],
wvtaId: [ wvtaId: [
{ {
required: true, required: true,
@@ -242,16 +278,26 @@ export default {
message: 'WVTA ID' + this.$t('cannotExceed') + 300 + this.$t('Characters'), message: 'WVTA ID' + this.$t('cannotExceed') + 300 + this.$t('Characters'),
trigger: 'blur' trigger: 'blur'
} }
], ]
}, }
} }
}, },
mounted() { mounted() {
this.getDeliverableTree() this.getDeliverableTree()
this.getRegulationNo() this.getRegulationNo()
this.getFirstLevelDutyTerritory()
}, },
methods: { methods: {
...mapGetters(['userInfo']), ...mapGetters(['userInfo']),
getFirstLevelDutyTerritory() {
getAction('/sys/dictItem/getFirstLevelDutyTerritory', {}).then((res) => {
if (res.success) {
this.firstLevelDutyTerritoryList = res.result
} else {
this.firstLevelDutyTerritoryList = []
}
})
},
addModel() { addModel() {
this.visible = true this.visible = true
this.formInline = {} this.formInline = {}
@@ -276,6 +322,13 @@ export default {
if (valid) { if (valid) {
this.formInline.authDummyInventoryBaseId = this.$route.query.id this.formInline.authDummyInventoryBaseId = this.$route.query.id
let query = JSON.parse(JSON.stringify(this.formInline)) let query = JSON.parse(JSON.stringify(this.formInline))
query.dataList.forEach(val => {
Object.keys(val).forEach(res => {
if (val[res] && val[res] instanceof Array) {
val[res] = val[res].join(',')
}
})
})
this.confirmLoading = true this.confirmLoading = true
postAction(this.url.addModel, query).then((res) => { postAction(this.url.addModel, query).then((res) => {
if (res.success) { if (res.success) {
@@ -376,7 +429,7 @@ export default {
this.formInline.dataList[this.numIndex][this.uploadName] = attIdList.join(',') this.formInline.dataList[this.numIndex][this.uploadName] = attIdList.join(',')
} }
this.formInline = { ...this.formInline } this.formInline = { ...this.formInline }
}, }
} }
} }
</script> </script>
@@ -452,6 +505,7 @@ export default {
border: 1px #00B3BE solid; border: 1px #00B3BE solid;
color: #00B3BE; color: #00B3BE;
} }
::v-deep .attestationType .ant-form-explain { ::v-deep .attestationType .ant-form-explain {
margin-top: -16px; margin-top: -16px;
} }
@@ -28,6 +28,50 @@
</a-form-model-item> </a-form-model-item>
</div> </div>
</a-col> </a-col>
<a-col :span="12">
<div class="box-title-text">
<div class="title-text">
<span class="Required" v-if="!disabled">*</span>
<span class="title-text-text" :title="'WVTA ID'">WVTA ID</span>
</div>
<a-form-model-item class="itemModel" prop="wvtaId">
<a-input class="box-input"
:disabled="disabled"
:title="formInline.wvtaId"
v-model="formInline.wvtaId"
:placeholder="$t('PleaseEnter')+'WVTA ID'"/>
</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="Required">*</span>
<span class="title-text-text"
:title="$t('statisticalNodes')">{{$t('statisticalNodes')}}</span>
</div>
<a-form-model-item class="itemModel-multi" prop="firstLevelDutyTerritory">
<a-select :placeholder="$t('PleaseSelect')+$t('statisticalNodes')"
class="box-input"
optionFilterProp="label"
mode="multiple"
:getPopupContainer="triggerNode=> triggerNode.parentNode"
v-model="formInline.firstLevelDutyTerritory">
<a-select-option v-for="(item, key) in firstLevelDutyTerritoryList"
:key="key"
:label="item.key"
:value="item.key">
<span style="display: inline-block;width: 100%" :title=" item.key ">
{{ item.key }}
</span>
</a-select-option>
</a-select>
</a-form-model-item>
</div>
</a-col>
<a-col :span="12"> <a-col :span="12">
<div class="box-title-text"> <div class="box-title-text">
<div class="title-text"> <div class="title-text">
@@ -44,23 +88,9 @@
</a-form-model-item> </a-form-model-item>
</div> </div>
</a-col> </a-col>
</a-row> </a-row>
<a-row :gutter="24"> <a-row :gutter="24">
<a-col :span="12">
<div class="box-title-text">
<div class="title-text">
<span class="Required" v-if="!disabled">*</span>
<span class="title-text-text" :title="'WVTA ID'">WVTA ID</span>
</div>
<a-form-model-item class="itemModel" prop="wvtaId">
<a-input class="box-input"
:disabled="disabled"
:title="formInline.wvtaId"
v-model="formInline.wvtaId"
:placeholder="$t('PleaseEnter')+'WVTA ID'"/>
</a-form-model-item>
</div>
</a-col>
<a-col :span="12"> <a-col :span="12">
<div class="box-title-text"> <div class="box-title-text">
<div class="title-text"> <div class="title-text">
@@ -77,8 +107,6 @@
</a-form-model-item> </a-form-model-item>
</div> </div>
</a-col> </a-col>
</a-row>
<a-row :gutter="24">
<a-col :span="12"> <a-col :span="12">
<div class="box-title-text"> <div class="box-title-text">
<div class="title-text"> <div class="title-text">
@@ -94,6 +122,9 @@
</a-form-model-item> </a-form-model-item>
</div> </div>
</a-col> </a-col>
</a-row>
<a-row :gutter="24">
<a-col :span="12"> <a-col :span="12">
<div class="box-title-text"> <div class="box-title-text">
<div class="title-text"> <div class="title-text">
@@ -109,8 +140,6 @@
</a-form-model-item> </a-form-model-item>
</div> </div>
</a-col> </a-col>
</a-row>
<a-row :gutter="24">
<a-col :span="12"> <a-col :span="12">
<div class="box-title-text"> <div class="box-title-text">
<div class="title-text"> <div class="title-text">
@@ -127,6 +156,9 @@
</a-form-model-item> </a-form-model-item>
</div> </div>
</a-col> </a-col>
</a-row>
<a-row :gutter="24">
<a-col :span="12"> <a-col :span="12">
<div class="box-title-text"> <div class="box-title-text">
<div class="title-text"> <div class="title-text">
@@ -151,8 +183,6 @@
</a-form-model-item> </a-form-model-item>
</div> </div>
</a-col> </a-col>
</a-row>
<a-row :gutter="24">
<a-col :span="12"> <a-col :span="12">
<div class="box-title-text"> <div class="box-title-text">
<div class="title-text"> <div class="title-text">
@@ -205,6 +235,7 @@ export default {
formInline: {}, formInline: {},
disabled: false, disabled: false,
DeliverableTreeList: [], DeliverableTreeList: [],
firstLevelDutyTerritoryList:[],
rules: { rules: {
serialNumber: [ serialNumber: [
{ {
@@ -213,6 +244,13 @@ export default {
trigger: 'change' trigger: 'change'
} }
], ],
firstLevelDutyTerritory: [
{
required: true,
message: this.$t('statisticalNodes') + this.$t('areaOfResponsibility'),
trigger: 'change'
}
],
dutyTerritory: [ dutyTerritory: [
{ {
required: true, required: true,
@@ -272,8 +310,18 @@ export default {
}, },
mounted() { mounted() {
this.getDeliverableTree() this.getDeliverableTree()
this.getFirstLevelDutyTerritory()
}, },
methods: { methods: {
getFirstLevelDutyTerritory() {
getAction('/sys/dictItem/getFirstLevelDutyTerritory', {}).then((res) => {
if (res.success) {
this.firstLevelDutyTerritoryList = res.result
} else {
this.firstLevelDutyTerritoryList = []
}
})
},
handleCancel() { handleCancel() {
this.visible = false this.visible = false
}, },
@@ -288,6 +336,9 @@ export default {
if (this.formInline.deliverableType) { if (this.formInline.deliverableType) {
this.formInline.deliverableType = this.formInline.deliverableType.split(',') this.formInline.deliverableType = this.formInline.deliverableType.split(',')
} }
if (this.formInline.firstLevelDutyTerritory) {
this.formInline.firstLevelDutyTerritory = this.formInline.firstLevelDutyTerritory.split(',')
}
this.$refs.ruleForm.clearValidate() this.$refs.ruleForm.clearValidate()
}) })
if(data == 1) { if(data == 1) {