From 91ec6a7d078a052ef192e95d073ae2520e7d93ae Mon Sep 17 00:00:00 2001 From: fengchenchen Date: Sun, 28 Jan 2024 19:16:57 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90update=E3=80=91-=E9=87=8D=E6=B1=BD?= =?UTF-8?q?=E6=B5=B7=E5=A4=96=20=E7=82=B9=E5=87=BB=E6=A0=87=E5=87=86?= =?UTF-8?q?=E5=90=8D=E7=A7=B0=E4=BF=AE=E6=94=B9=E6=88=90=E9=A2=84=E8=A7=88?= =?UTF-8?q?=E6=96=87=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../overseasStandard/OverseasStandardList.vue | 45 +++++++++++++++++++ 1 file changed, 45 insertions(+) diff --git a/src/views/standardRegulationLibrary/overseasStandard/OverseasStandardList.vue b/src/views/standardRegulationLibrary/overseasStandard/OverseasStandardList.vue index 7fa50dec..0dee84e7 100644 --- a/src/views/standardRegulationLibrary/overseasStandard/OverseasStandardList.vue +++ b/src/views/standardRegulationLibrary/overseasStandard/OverseasStandardList.vue @@ -168,6 +168,8 @@
+ + @@ -184,6 +186,8 @@
+ + @@ -341,8 +345,15 @@ export default { } }, computed: { + ...mapGetters(['userInfo']), importExcelUrl () { return `${window._CONFIG.domianURL}/${this.url.importExcelUrl}` + }, + // 当前用户是否管理员 + isAdmin () { + const adminRoleList = window._CONFIG.adminRoleCode.split(',') + const userRoleList = this.userInfo.roleCode.split(',') + return userRoleList.some(tt => adminRoleList.includes(tt)) } }, created () { @@ -796,6 +807,40 @@ export default { // 销毁这个提示 modalLoading.destroy() }) + }, + /** + * 新增-非管理员用户跳转流程发起页面,不能修改操作类型 + */ + handleAdd () { + if (!this.isAdmin) { + this.$router.push({ + path: '/workCenter/StandardEntryOrChangeProcess', + query: { + source: StandardSource.OVERSEAS.value, // 海外标准 + operateType: OperationType.ENTRY.value // 入库 + } + }) + return + } + this.$refs.modalForm.add() + this.$refs.modalForm.title = this.$t('newlyAdded') + this.$refs.modalForm.disableSubmit = false + }, + handleEdit (record) { + if (!this.isAdmin) { + this.$router.push({ + path: '/workCenter/StandardEntryOrChangeProcess', + query: { + source: StandardSource.OVERSEAS.value, // 海外标准 + operateType: OperationType.CHANGE.value, // 变更 + standardId: record.id // 标准id + } + }) + return + } + this.$refs.modalForm.edit(record) + this.$refs.modalForm.title = this.$t('edit') + this.$refs.modalForm.disableSubmit = false } } }