From c82044af688c4fa3f04a48250ef3153eb62e74e2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8C=83=E5=BC=BA=E5=BC=BA?= <787203167> Date: Fri, 14 Jul 2023 17:08:54 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B3=95=E8=A7=84=E6=B8=85=E5=8D=95=E3=80=81?= =?UTF-8?q?=E8=AE=A4=E8=AF=81=E6=B8=85=E5=8D=95=E3=80=81=E5=B8=82=E5=9C=BA?= =?UTF-8?q?=E6=B3=95=E8=A7=84=E6=B8=85=E5=8D=95=E3=80=81=E5=B8=82=E5=9C=BA?= =?UTF-8?q?=E8=AE=A4=E8=AF=81=E6=B8=85=E5=8D=95=E5=A2=9E=E5=8A=A0=E8=B4=A3?= =?UTF-8?q?=E4=BB=BB=E9=83=A8=E9=97=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../virtualList/components/editModel.vue | 68 +- .../certificationList/components/addModel.vue | 123 +++- .../components/listEditModel.vue | 82 ++- .../components/addModel.vue | 69 +- .../components/editModel.vue | 607 ++++++++++-------- 5 files changed, 609 insertions(+), 340 deletions(-) diff --git a/jero-web/src/views/documentTools/virtualList/components/editModel.vue b/jero-web/src/views/documentTools/virtualList/components/editModel.vue index e939d9cf8..e66a93320 100644 --- a/jero-web/src/views/documentTools/virtualList/components/editModel.vue +++ b/jero-web/src/views/documentTools/virtualList/components/editModel.vue @@ -258,13 +258,15 @@ {{$t('statisticalNodes')}} - + + v-model="formInline.dutyDepart"> {{$t('areaOfResponsibility')}} - + + + + {{ item.itemText }} + + + + + + + + @@ -720,7 +738,14 @@ message: this.$t('areaOfResponsibility') + this.$t('cannotEmpty'), trigger: 'change' } - ] + ], + dutyDepart:[ + { + required: true, + message: this.$t('statisticalNodes') + this.$t('cannotEmpty'), + trigger: 'change' + } + ], }, formInline: {}, disabled: false, @@ -728,6 +753,7 @@ CategoryTreeList: [], DeliverableTreeList: [], firstLevelDutyTerritoryList:[], + dutyTerritoryList:[], } }, mounted() { @@ -736,6 +762,23 @@ this.getFirstLevelDutyTerritory() }, methods: { + DutyDepartChange(event) { + this.formInline.dutyTerritory = [] + this.formInline = {...this.formInline} + this.getDutyTerritory(event.join(',')) + }, + getDutyTerritory(row) { + let query = { + dutyDepart: row + } + getAction('/sys/dict/getDutyTeryByDD', query).then((res) => { + if (res.success) { + this.dutyTerritoryList = res.result || [] + } else { + this.dutyTerritoryList = [] + } + }) + }, getFirstLevelDutyTerritory() { getAction('/sys/dictItem/getFirstLevelDutyTerritory', {}).then((res) => { if (res.success) { @@ -773,7 +816,8 @@ this.formInline.designDeliverableType = this.formInline.designDeliverableType ? this.formInline.designDeliverableType.split(',') : [] this.formInline.prehomoDeliverableType = this.formInline.prehomoDeliverableType ? this.formInline.prehomoDeliverableType.split(',') : [] this.formInline.verifyDeliverableType = this.formInline.verifyDeliverableType ? this.formInline.verifyDeliverableType.split(',') : [] - this.formInline.firstLevelDutyTerritory = this.formInline.firstLevelDutyTerritory ? this.formInline.firstLevelDutyTerritory.split(',') : [] + this.formInline.dutyDepart = this.formInline.dutyDepart ? this.formInline.dutyDepart.split(',') : [] + this.formInline.dutyTerritory = this.formInline.dutyTerritory ? this.formInline.dutyTerritory.split(',') : [] this.$refs.ruleForm.clearValidate() }) }, @@ -787,7 +831,8 @@ this.formInline.designDeliverableType = this.formInline.designDeliverableType ? this.formInline.designDeliverableType.split(',') : [] this.formInline.prehomoDeliverableType = this.formInline.prehomoDeliverableType ? this.formInline.prehomoDeliverableType.split(',') : [] this.formInline.verifyDeliverableType = this.formInline.verifyDeliverableType ? this.formInline.verifyDeliverableType.split(',') : [] - this.formInline.firstLevelDutyTerritory = this.formInline.firstLevelDutyTerritory ? this.formInline.firstLevelDutyTerritory.split(',') : [] + this.formInline.dutyDepart = this.formInline.dutyDepart ? this.formInline.dutyDepart.split(',') : [] + this.formInline.dutyTerritory = this.formInline.dutyTerritory ? this.formInline.dutyTerritory.split(',') : [] this.$refs.ruleForm.clearValidate() }) }, @@ -1039,4 +1084,7 @@ background: #fff; border-radius: 0 0 2px 2px; } + ::v-deep .ant-form-item-with-help { + margin-bottom: 25px; + } \ No newline at end of file diff --git a/jero-web/src/views/projectManagement/components/certificationList/components/addModel.vue b/jero-web/src/views/projectManagement/components/certificationList/components/addModel.vue index 1e9c7ae83..8ea23ad84 100644 --- a/jero-web/src/views/projectManagement/components/certificationList/components/addModel.vue +++ b/jero-web/src/views/projectManagement/components/certificationList/components/addModel.vue @@ -163,15 +163,16 @@ :title="$t('statisticalNodes')">{{$t('statisticalNodes')}} + v-model="item.dutyDepart"> - + + + + {{ val.itemText }} + + + + + + + + + @@ -413,13 +430,14 @@ {{$t('statisticalNodes')}} - + + v-model="formInline.dutyDepart"> {{$t('areaOfResponsibility')}} - - + + + + {{ item.itemText }} + + + + + + + + + @@ -662,6 +696,7 @@ personnelVisible: false, yearNameDataList: [], firstLevelDutyTerritoryList: [], + dutyTerritoryList: [], rules: { serialNumber: [ { @@ -709,7 +744,7 @@ trigger: 'change' } ], - firstLevelDutyTerritory: [ + dutyDepart: [ { required: true, message: this.$t('statisticalNodes') + this.$t('cannotEmpty'), @@ -787,7 +822,23 @@ } }) }, - + DutyDepartChangeOne(event) { + this.formInline.dutyTerritory = [] + this.formInline = {...this.formInline} + this.getDutyTerritoryOne(event.join(',')) + }, + getDutyTerritoryOne(row) { + let query = { + dutyDepart: row + } + getAction('/sys/dict/getDutyTeryByDD', query).then((res) => { + if (res.success) { + this.dutyTerritoryList = res.result || [] + } else { + this.dutyTerritoryList = [] + } + }) + }, addModel() { this.visible = true this.personnelVisible = true @@ -804,14 +855,18 @@ this.formInline = {} this.visible = true this.personnelVisible = true - value.firstLevelDutyTerritory = value.firstLevelDutyTerritory ? value.firstLevelDutyTerritory.split(',') : [] + value.dutyDepart = value.dutyDepart ? value.dutyDepart.split(',') : [] + value.dutyTerritory = value.dutyTerritory ? value.dutyTerritory.split(',') : [] this.formInline = JSON.parse(JSON.stringify(value)) // if (this.formInline.deliverableType) { // this.formInline.deliverableType = this.formInline.deliverableType.split(',') // } - if (value.dutyTerritory) { - this.queryPersonByProject(value.dutyTerritory) + if (value.dutyDepart && value.dutyDepart.length > 0) { + this.getDutyTerritoryOne(value.dutyDepart.join(',')) + } + if (value.dutyTerritory && value.dutyTerritory.length > 0) { + this.queryPersonByProject(value.dutyTerritory.join(',')) } this.getRegulationNo() this.title = this.$t('edit') @@ -844,6 +899,7 @@ Action = postAction query.dataList.forEach(val => { delete val.engineeringInterfacePersonList + delete val.dutyTerritoryList Object.keys(val).forEach(res => { if (val[res] && val[res] instanceof Array) { val[res] = val[res].join(',') @@ -883,6 +939,24 @@ } }) }, + DutyDepartChange(index) { + this.formInline.dataList[index].dutyTerritory = [] + this.formInline = { ...this.formInline } + this.getDutyTerritory(this.formInline.dataList[index].dutyDepart.join(','),index) + }, + getDutyTerritory(row,index) { + let query = { + dutyDepart: row + } + getAction('/sys/dict/getDutyTeryByDD', query).then((res) => { + if (res.success) { + this.formInline.dataList[index].dutyTerritoryList = res.result || [] + } else { + this.formInline.dataList[index].dutyTerritoryList = [] + } + this.formInline = {...this.formInline} + }) + }, handleInput(value, id, index, array) { if (array) { let content = array.filter(res => { @@ -974,12 +1048,13 @@ }, handleChange(value) { this.formInline.sdt = undefined - this.queryPersonByProject(this.formInline.dutyTerritory) + this.queryPersonByProject(this.formInline.dutyTerritory.join(',')) }, dutyHandleChange(index) { this.formInline.dataList[index].sdt = undefined this.formInline = { ...this.formInline } - this.queryPersonByProject(this.formInline.dataList[index].dutyTerritory, index) + this.handleInput('dataList.' + index + '.dutyTerritory') + this.queryPersonByProject(this.formInline.dataList[index].dutyTerritory.join(','), index) }, queryPersonByProject(row, index) { let query = { diff --git a/jero-web/src/views/projectManagement/components/listEditModel.vue b/jero-web/src/views/projectManagement/components/listEditModel.vue index e89383015..c8faf16b8 100644 --- a/jero-web/src/views/projectManagement/components/listEditModel.vue +++ b/jero-web/src/views/projectManagement/components/listEditModel.vue @@ -103,13 +103,15 @@ {{$t('statisticalNodes')}} - + + v-model="formInline.dutyDepart"> {{$t('areaOfResponsibility')}} - + + + + {{ item.itemText }} + + + + + + + + + @@ -606,7 +625,7 @@ trigger: 'change' } ], - firstLevelDutyTerritory:[ + dutyDepart: [ { required: true, message: this.$t('statisticalNodes') + this.$t('cannotEmpty'), @@ -696,7 +715,7 @@ message: this.$t('typeOfDeliverables') + this.$t('cannotEmpty'), trigger: 'change' } - ], + ] }, formInline: { verifyDeliverableType: [], @@ -719,6 +738,7 @@ DeliverableTreeList: [], userInfoQuery: {}, rejectCauseList: [], + dutyTerritoryList: [] } }, mounted() { @@ -785,6 +805,23 @@ } }) }, + DutyDepartChange(event) { + this.formInline.dutyTerritory = [] + this.formInline = { ...this.formInline } + this.getDutyTerritory(event.join(',')) + }, + getDutyTerritory(row) { + let query = { + dutyDepart: row + } + getAction('/sys/dict/getDutyTeryByDD', query).then((res) => { + if (res.success) { + this.dutyTerritoryList = res.result || [] + } else { + this.dutyTerritoryList = [] + } + }) + }, dutyTerritoryChange(event) { this.formInline.regulationOwnerId = undefined this.formInline.engineeringInterfacePerson = undefined @@ -792,20 +829,26 @@ this.formInline.designInitiatorId = undefined this.formInline.prehomoInitiatorId = undefined this.formInline.verifyInitiatorId = undefined - this.queryPersonByProject(event) + this.queryPersonByProject(event.join(',')) }, queryPersonByProject(row) { + let dutyTerritory = '' + if (row.dutyTerritory) { + dutyTerritory = row.dutyTerritory.join(',') + } else { + dutyTerritory = row + } let query = { projectId: this.$route.query.id, - dutyTerritory: row.dutyTerritory || row + dutyTerritory: dutyTerritory } getAction(this.url.queryPersonByProject, query).then((res) => { if (res.success) { this.regulatoryEngineerList = res.result.lawEngineerList //法规工程师 this.engineeringInterfacePersonList = res.result.engineeringInterfacePersonList //工程接口人 this.certificationEngineerList = res.result.certificationEngineerList //认证工程师 - if (row.dutyTerritory) { + if (row.dutyTerritory && row.dutyTerritory.length > 0) { let _this = this this.getProject(row, res, function() { _this.getData(row, res) @@ -865,9 +908,14 @@ item.designDeliverableType = item.designDeliverableType ? item.designDeliverableType.split(',') : [] item.prehomoDeliverableType = item.prehomoDeliverableType ? item.prehomoDeliverableType.split(',') : [] item.verifyDeliverableType = item.verifyDeliverableType ? item.verifyDeliverableType.split(',') : [] - item.firstLevelDutyTerritory = item.firstLevelDutyTerritory ? item.firstLevelDutyTerritory.split(',') : [] + item.dutyDepart = item.dutyDepart ? item.dutyDepart.split(',') : [] + item.dutyTerritory = item.dutyTerritory ? item.dutyTerritory.split(',') : [] this.getRejectCause(item.id) - if (item.dutyTerritory) { + if (item.dutyDepart && item.dutyDepart.length > 0) { + this.getDutyTerritory(item.dutyDepart.join(',')) + } + console.log(item.dutyTerritory) + if (item.dutyTerritory && item.dutyTerritory.length > 0) { this.queryPersonByProject(item) } else { this.formInline = item @@ -1145,4 +1193,8 @@ background: #fff; border-radius: 0 0 2px 2px; } + + ::v-deep .ant-form-item-with-help { + margin-bottom: 25px; + } \ No newline at end of file diff --git a/jero-web/src/views/virtualAuthenticationList/components/addModel.vue b/jero-web/src/views/virtualAuthenticationList/components/addModel.vue index f53d0b938..afafd88e3 100644 --- a/jero-web/src/views/virtualAuthenticationList/components/addModel.vue +++ b/jero-web/src/views/virtualAuthenticationList/components/addModel.vue @@ -49,13 +49,15 @@ {{$t('statisticalNodes')}} - + + v-model="formInline.dutyDepart"> {{$t('areaOfResponsibility')}} - + + + + {{ item.itemText }} + + + + + + + + + + @@ -242,6 +259,7 @@ disabled: false, formInline: {}, confirmLoading: false, + dutyTerritoryList: [], projectNameList: [], DeliverableTreeList: [], firstLevelDutyTerritoryList: [], @@ -260,7 +278,7 @@ trigger: 'change' } ], - firstLevelDutyTerritory: [ + dutyDepart: [ { required: true, message: this.$t('statisticalNodes') + this.$t('areaOfResponsibility'), @@ -289,6 +307,23 @@ }, methods: { ...mapGetters(['userInfo']), + DutyDepartChange(event) { + this.formInline.dutyTerritory = [] + this.formInline = { ...this.formInline } + this.getDutyTerritory(event.join(',')) + }, + getDutyTerritory(row) { + let query = { + dutyDepart: row + } + getAction('/sys/dict/getDutyTeryByDD', query).then((res) => { + if (res.success) { + this.dutyTerritoryList = res.result || [] + } else { + this.dutyTerritoryList = [] + } + }) + }, getFirstLevelDutyTerritory() { getAction('/sys/dictItem/getFirstLevelDutyTerritory', {}).then((res) => { if (res.success) { @@ -322,12 +357,13 @@ if (valid) { this.formInline.authDummyInventoryBaseId = this.$route.query.id 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(',') + Object.keys(query).forEach(res => { + if (query[res] && query[res] instanceof Array) { + if (res == 'dataList') { + } else { + query[res] = query[res].join(',') } - }) + } }) this.confirmLoading = true postAction(this.url.addModel, query).then((res) => { @@ -509,4 +545,7 @@ ::v-deep .attestationType .ant-form-explain { margin-top: -16px; } + ::v-deep .ant-form-item-with-help { + margin-bottom: 25px; + } \ No newline at end of file diff --git a/jero-web/src/views/virtualAuthenticationList/components/editModel.vue b/jero-web/src/views/virtualAuthenticationList/components/editModel.vue index 3f1bd5a95..7e55582a8 100644 --- a/jero-web/src/views/virtualAuthenticationList/components/editModel.vue +++ b/jero-web/src/views/virtualAuthenticationList/components/editModel.vue @@ -49,17 +49,19 @@ - * + * {{$t('statisticalNodes')}} - + + v-model="formInline.dutyDepart"> * - {{$t('areaOfResponsibility')}} + {{$t('areaOfResponsibility')}} - + + + + {{ item.itemText }} + + + + + + + + + @@ -103,7 +122,8 @@ :disabled="disabled" :placeholder="$t('PleaseSelect')+$t('certificationType')" :type="'select'" - :triggerChange="false" :dictCode="'ren4_zheng4_qing1_dan1_-_ren4_zheng4_lei4_xing2'"/> + :triggerChange="false" + :dictCode="'ren4_zheng4_qing1_dan1_-_ren4_zheng4_lei4_xing2'"/> @@ -118,7 +138,7 @@ v-model="formInline.category" :disabled="disabled" :title="formInline.category" - :placeholder="$t('PleaseEnter')+$t('category')" /> + :placeholder="$t('PleaseEnter')+$t('category')"/> @@ -209,297 +229,332 @@ {{$t('submit')}} - + \ No newline at end of file