From 6d47ca665fcd229ef59e89320bf0f25ab56d4dc3 Mon Sep 17 00:00:00 2001 From: qq787203167 <787203167@qq.com> Date: Mon, 6 Jun 2022 15:38:39 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E8=A7=92=E8=89=B2=E5=88=87?= =?UTF-8?q?=E6=8D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/listOfRegulations.vue | 58 ++++++++++++++++--- 1 file changed, 49 insertions(+), 9 deletions(-) diff --git a/jero-web/src/views/projectManagement/components/listOfRegulations.vue b/jero-web/src/views/projectManagement/components/listOfRegulations.vue index 960aafa5a..b5fba6f4b 100644 --- a/jero-web/src/views/projectManagement/components/listOfRegulations.vue +++ b/jero-web/src/views/projectManagement/components/listOfRegulations.vue @@ -353,6 +353,7 @@ + {{$t('dataLoading')}} @@ -681,6 +682,7 @@ } ], visibleFile: false, + JLoading:false, formInlineComment: {}, rulesComment: { commentContent: [ @@ -736,7 +738,9 @@ setBatch: '/project/projectLawsInventoryEO/setBatch',//批量设置 copyUrl: '/project/projectLawsInventoryEO/copyInfoByIds',//复制 transferUrl: '/project/projectLawsInventoryEO/getPageInfoDummy',//调取 - ExportReportUrl: '/project/projectLawsInventoryEO/downloadDocxReport' + ExportReportUrl: '/project/projectLawsInventoryEO/downloadDocxReport', + AndUserId: '/project/projectLibraryRoleRelEO/queryByProjectLibraryIdAndUserId', + AndUserIdEdit: '/project/projectLibraryRoleRelEO/edit' }, downLoadFileUrl: window._CONFIG['domianPreviewURL'] + '/sys/common/download', loading: false, @@ -798,6 +802,7 @@ visibleRoleSwitching: false, confirmLoadingRoleSwitching: false, formInlineRoleSwitching: {}, + AndUserId: '', rulesRoleSwitching: { roleSwitchingCode: [ { @@ -812,8 +817,8 @@ mounted() { if (this.$route.query.studioEngineer == this.userInfo().id) { - this.isDisplay = true - this.formInlineRoleSwitching.roleSwitchingCode = '0' + this.JLoading = true + this.getAndUserId() } else { this.isDisplay = false } @@ -845,6 +850,27 @@ handleModule() { downloadFile(this.url.exportTemplate, this.$t('listOfRegulations') + this.$t('importTemplate') + '.xls', {}) }, + getAndUserId() { + let query = { + projectLibraryId: this.$route.query.id, + userId: this.userInfo().id + } + getAction(this.url.AndUserId, query).then((res) => { + if (res.success) { + this.isDisplay = true + this.formInlineRoleSwitching.roleSwitchingCode = res.result.roleCode + this.AndUserId = res.result.id + if (this.formInlineRoleSwitching.roleSwitchingCode == '0') { + this.isDisplay = true + } else { + this.isDisplay = false + } + this.JLoading = false + }else{ + this.JLoading = false + } + }) + }, ExportReportClick() { let selectedRowKeys = JSON.parse(JSON.stringify(this.selectedRowKeys)) if (selectedRowKeys && selectedRowKeys.length == 0) { @@ -969,13 +995,27 @@ handleOkRoleSwitching() { this.$refs.ruleFormRoleSwitching.validate(valid => { if (valid) { - if (this.formInlineRoleSwitching.roleSwitchingCode == '0') { - this.isDisplay = true - } else { - this.isDisplay = false + let query = { + roleCode: this.formInlineRoleSwitching.roleSwitchingCode, + id: this.AndUserId } - this.visibleRoleSwitching = false - this.getList() + this.confirmLoadingRoleSwitching = true + postAction(this.url.AndUserIdEdit, query).then((res) => { + if (res.success) { + if (this.formInlineRoleSwitching.roleSwitchingCode == '0') { + this.isDisplay = true + } else { + this.isDisplay = false + } + this.$message.success(this.$t('OperationSuccessful')) + this.visibleRoleSwitching = false + this.confirmLoadingRoleSwitching = false + this.getList() + } else { + this.confirmLoadingRoleSwitching = false + this.$message.warning(this.$t('operationFailed')) + } + }) } }) },