diff --git a/jero-web/src/views/projectManagement/components/associatedplatthree.vue b/jero-web/src/views/projectManagement/components/associatedplatthree.vue index 36eb3a79a..00e41c0f6 100644 --- a/jero-web/src/views/projectManagement/components/associatedplatthree.vue +++ b/jero-web/src/views/projectManagement/components/associatedplatthree.vue @@ -9,30 +9,17 @@ :visible="visible" style="height: 100%;overflow: auto;padding-bottom: 53px;">
-
{{'GB 111'}}{{$t('associatedItem')}}
+
{{item.title}}{{$t('associatedItem')}}
- - - - - - - - - - - - -
@@ -57,6 +44,8 @@ queryParam: {}, confirmLoading: false, selectedRowKeys: [], + selectQuery:{}, + selectedRow: [], columns: [ { title: this.$t('entryName'), @@ -81,7 +70,7 @@ }, { title: this.$t('NareaOfResponsibility'), - dataIndex: 'dutyTerritory', + dataIndex: 'dutyTerritory_dictText', align: 'left', ellipsis: true, width: 140 @@ -102,57 +91,57 @@ }, { title: this.$t('verify') + '-' + this.$t('typeOfDeliverables'), - dataIndex: 'deliverableTypeName', + dataIndex: 'verifyDeliverableTypeName', align: 'left', ellipsis: true, width: 130 }, ], data: [ - { - id:'1', - list:[ - { - createBy: "linda.zhao", - createByCn: null, - createTime: "2023-04-17 19:10:14", - cut: null, - id: "1647920396307046401", - name: "EU/UK Regulation List V23.04", - orderBy: null, - orderByField: null, - readFlag: null, - state: "1", - state_dictText: "已发布", - sysOrgCode: "SUPERVISORY_ORGANIZATION-3-522", - updateBy: "admin", - updateTime: "2023-05-10 15:24:33", - upgradeExplanation: "asd", - } - ] - }, - { - id:'1', - list:[ - { - createBy: "linda.zhao", - createByCn: null, - createTime: "2023-04-17 19:10:14", - cut: null, - id: "1647920396307046401", - name: "EU/UK Regulation List V23.04", - orderBy: null, - orderByField: null, - readFlag: null, - state: "1", - state_dictText: "已发布", - sysOrgCode: "SUPERVISORY_ORGANIZATION-3-522", - updateBy: "admin", - updateTime: "2023-05-10 15:24:33", - upgradeExplanation: "asd", - } - ] - }, + // { + // id:'1', + // list:[ + // { + // createBy: "linda.zhao", + // createByCn: null, + // createTime: "2023-04-17 19:10:14", + // cut: null, + // id: "1647920396307046401", + // name: "EU/UK Regulation List V23.04", + // orderBy: null, + // orderByField: null, + // readFlag: null, + // state: "1", + // state_dictText: "已发布", + // sysOrgCode: "SUPERVISORY_ORGANIZATION-3-522", + // updateBy: "admin", + // updateTime: "2023-05-10 15:24:33", + // upgradeExplanation: "asd", + // } + // ] + // }, + // { + // id:'1', + // list:[ + // { + // createBy: "linda.zhao", + // createByCn: null, + // createTime: "2023-04-17 19:10:14", + // cut: null, + // id: "1647920396307046401", + // name: "EU/UK Regulation List V23.04", + // orderBy: null, + // orderByField: null, + // readFlag: null, + // state: "1", + // state_dictText: "已发布", + // sysOrgCode: "SUPERVISORY_ORGANIZATION-3-522", + // updateBy: "admin", + // updateTime: "2023-05-10 15:24:33", + // upgradeExplanation: "asd", + // } + // ] + // }, ], content: [], loading: false, @@ -173,7 +162,7 @@ this.type = type this.ids = ids this.queryParam = {} - this.selectedRowKeys = [] + this.selectQuery = {} this.replacePage() }, searchQuery() { @@ -185,15 +174,6 @@ this.queryParam = {} this.replacePage() }, - onChange(page, pageSize) { - this.pageNo = page - this.replacePage() - }, - SizeChange(page, pageSize) { - this.pageNo = 1 - this.pageSize = pageSize - this.replacePage() - }, replacePage() { let query = { ids: this.ids, @@ -203,57 +183,69 @@ this.loading = true postAction('project/projectLibraryBase/listPlatform', query).then((res) => { if (res.success) { - this.dataList = res.result.records || [] - this.selectedRowKeys = this.dataList.map(item => item.id) - this.total = res.result.total + this.data = res.result || [] + this.data.forEach((item,index) => { + let name = 'selectedRowKeys'+index + this.selectQuery[name] = item.result.map(val => val.id) + // for(var i in item.result.map(val => val.id)){ + // this.selectedRowKeys.push(item.result.map(val => val.id)[i]) + // } + // this.selectedRow.push(item.result) + }) + console.log(this.selectQuery) + // console.log(this.selectedRow) this.loading = false - this.visible = true + if(this.data.length >= 1){ + this.visible = true + } } else { this.loading = false } }) }, - onSelectChange(value) { - this.selectedRowKeys = value - // if (this.selectedRowKeys.length > 1) { - // this.selectedRowKeys.shift() - // } + onChange(value,data,ind) { + this.selectQuery['selectedRowKeys'+ind] = value + this.data = [...this.data] }, handleCancel() { this.visible = false }, handleSubmit(flag) { - console.log(this.selectedRowKeys) - return - if (this.selectedRowKeys && this.selectedRowKeys.length > 0) { + if (this.selectQuery) { this.confirmLoading = true - let selectedRowKeys = JSON.parse(JSON.stringify(this.selectedRowKeys)) - this.confirmLoading = false - this.$emit('associatedplatthreeForm',selectedRowKeys.join(',')) - this.selectedRowKeys = [] - // postAction(this.url.addModel, { - // dummyInventoryBaseId: selectedRowKeys.join(','), - // projectLibraryId: this.$route.query.id, - // flag: flag - // }).then((res) => { - // if (res.success) { - // this.confirmLoading = false - // this.$message.success(this.$t('OperationSuccessful')) - // this.visible = false - // this.selectedRowKeys = [] - // this.$emit('transferListForm') - // } else { - // if (res.message == '该虚拟清单的维护清单中没有数据,是否需要添加') { - // this.confirmLoading = false - // this.getAdd() - // return - // } - // this.$message.warning(this.$t('operationFailed')) - // this.confirmLoading = false - // } - // }) + let array = Object.values(this.selectQuery) + let arr = [] + this.data.forEach((val,index) => { + array.forEach((item,index1) => { + if(index == index1){ + arr.push({ + lawsInventoryId:val.lawsInventoryId, + platformLawsInventoryIds:item.join(',') + }) + } + }) + }) + arr = arr + console.log(arr) + let query = { + list : JSON.parse(JSON.stringify(arr)) + } + console.log(query) + postAction('project/lawsInventoryPlatformEO/addBatch', query).then((res) => { + if (res.success) { + this.confirmLoading = false + this.$message.success(this.$t('OperationSuccessful')) + this.visible = false + this.selectQuery = {} + this.$emit('associatedplatthreeForm') + } else { + this.$message.warning(this.$t('operationFailed')) + this.confirmLoading = false + } + }) } else { - this.$message.warning(this.$t('selectLeastOne')) + // this.$message.warning(this.$t('selectLeastOne')) + this.visible = false } }, getAdd() { diff --git a/jero-web/src/views/projectManagement/components/certificationList/index.vue b/jero-web/src/views/projectManagement/components/certificationList/index.vue index 265550aef..acd258b30 100644 --- a/jero-web/src/views/projectManagement/components/certificationList/index.vue +++ b/jero-web/src/views/projectManagement/components/certificationList/index.vue @@ -1297,18 +1297,18 @@ } }else{ flag = '2' - this.$refs.associatedplatRef.transferModel(flag,type,this.selectedRowKeys.join(',')) + this.$message.warning(this.$t('selectLeastOne')) } }, associatedplatForm(id,flag,type,ids){ - if(flag == '1'){ - this.$refs.associatedplatthreeRef.transferModel(id,type,ids) - }else{ - this.$refs.associatedplattwoRef.transferModel(id,type,ids) - } + // if(flag == '1'){ + // this.$refs.associatedplatthreeRef.transferModel(id,type,ids) + // }else{ + // this.$refs.associatedplattwoRef.transferModel(id,type,ids) + // } }, associatedplattwoForm(id,type,ids){ - this.$refs.associatedplatthreeRef.transferModel(id,type,ids) + // this.$refs.associatedplatthreeRef.transferModel(id,type,ids) }, associatedplatthreeForm(id){ console.log(id) diff --git a/jero-web/src/views/projectManagement/components/listOfRegulations.vue b/jero-web/src/views/projectManagement/components/listOfRegulations.vue index cf628f497..9b804c8d6 100644 --- a/jero-web/src/views/projectManagement/components/listOfRegulations.vue +++ b/jero-web/src/views/projectManagement/components/listOfRegulations.vue @@ -1982,7 +1982,7 @@ this.$refs.associatedplatthreeRef.transferModel(id,type,ids) }, associatedplatthreeForm(id){ - console.log(id) + this.getList() }, //批量设置 batSettingClick() {