From e7efeab938b7ef57dc3c6f8186d12bc685502e85 Mon Sep 17 00:00:00 2001 From: qq787203167 <787203167@qq.com> Date: Thu, 16 Jun 2022 22:07:59 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E7=A6=85=E9=81=93=E5=B7=B2?= =?UTF-8?q?=E7=9F=A5bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/listOfRegulations.vue | 34 +++++++++++++------ 1 file changed, 24 insertions(+), 10 deletions(-) diff --git a/jero-web/src/views/projectManagement/components/listOfRegulations.vue b/jero-web/src/views/projectManagement/components/listOfRegulations.vue index d79fa6829..96406028c 100644 --- a/jero-web/src/views/projectManagement/components/listOfRegulations.vue +++ b/jero-web/src/views/projectManagement/components/listOfRegulations.vue @@ -840,14 +840,16 @@ }, mounted() { - if (this.$route.query.studioEngineer == this.userInfo().id) { - this.JLoading = true + // if (this.$route.query.studioEngineer == this.userInfo().id) { + this.JLoading = true + // this.getAndUserId() + this.getRoleByUserId(() => { this.getAndUserId() - this.getRoleByUserId() - } else { - this.isDisplay = false - } - this.getList() + }) + // } else { + // this.isDisplay = false + // } + }, computed: { columnsFile() { @@ -890,13 +892,14 @@ disabledDate(current) { return current && current < moment().subtract(1, 'day') }, - getRoleByUserId() { + getRoleByUserId(callback) { getAction('/project/projectLawsInventoryEO/getRoleByUserId', { projectLibraryId: this.$route.query.id }).then((res) => { if (res.success) { this.roleSwitchingList = res.result || [] } else { this.roleSwitchingList = [] } + callback && callback() }) }, getAndUserId() { @@ -909,16 +912,25 @@ this.isDisplay = true this.formInlineRoleSwitching.roleSwitchingCode = res.result.roleCode this.AndUserId = res.result.id + if (this.formInlineRoleSwitching.roleSwitchingCode) { + if (!(this.roleSwitchingList.some(val => val.roleCode == this.formInlineRoleSwitching.roleSwitchingCode))) { + this.formInlineRoleSwitching.roleSwitchingCode = this.roleSwitchingList[0] ? this.roleSwitchingList[0].roleCode : '' + } + } else { + this.formInlineRoleSwitching.roleSwitchingCode = this.roleSwitchingList[0] ? this.roleSwitchingList[0].roleCode : '' + } this.isRoleSwitching = true if (this.formInlineRoleSwitching.roleSwitchingCode == '0') { this.isDisplay = true } else { this.isDisplay = false - if (this.formInlineRoleSwitching.roleSwitchingCode == '11' || this.formInlineRoleSwitching.roleSwitchingCode == '12') { + if (this.formInlineRoleSwitching.roleSwitchingCode == '11' || this.formInlineRoleSwitching.roleSwitchingCode == '12' || + this.formInlineRoleSwitching.roleSwitchingCode == '') { this.isRoleSwitching = false } } - this.JLoading = false + this.getList() + // this.JLoading = false } else { this.JLoading = false } @@ -1246,7 +1258,9 @@ if (res.success) { this.dataSource = res.result this.loading = false + this.JLoading = false } else { + this.JLoading = false this.loading = false } })