Przeglądaj źródła

feat: 新增 记录修改功能权限要开放给部分岗位

johnsen 4 miesięcy temu
rodzic
commit
e81f8108ef
1 zmienionych plików z 33 dodań i 20 usunięć
  1. 33 20
      src/views/platform/bpmn/bpmInstHis/list.vue

+ 33 - 20
src/views/platform/bpmn/bpmInstHis/list.vue

@@ -451,27 +451,40 @@ export default {
     })
 
     const { role = [] } = this.$store.getters.userInfo || {}
-    const roleList = ['xtgljs', 'xxglxzfzr', 'wjglzzc', 'syszr']
-    // 系统管理角色、信息管理负责人、检验科主任添加删除按钮
-    const hasRole = role.some((item) => roleList.includes(item.alias))
-    this.listConfig.toolbars.push({
-      key: 'detail',
-      label: '详情',
-      type: 'info'
-    })
-    if (hasRole) {
-      // 系统管理角色不做分类过滤
-      // this.hasPermission = false
-      const btn = [
-        {
-          key: 'remove',
-          label: '删除',
-          type: 'danger'
+    this.$common
+      .request('query', {
+        key: 'getModifyRole',
+        params: [null]
+      })
+      .then((res) => {
+        const configList = res.variables.data
+        if (configList) {
+          const roleList =
+            configList.length > 0
+              ? configList[0].kai_fang_gang_wei.split(',')
+              : ['xtgljs', 'xxglxzfzr', 'wjglzzc', 'syszr']
+          // 系统管理角色、信息管理负责人、检验科主任添加删除按钮
+          const hasRole = role.some((item) => roleList.includes(item.alias))
+          this.listConfig.toolbars.push({
+            key: 'detail',
+            label: '详情',
+            type: 'info'
+          })
+          if (hasRole) {
+            // 系统管理角色不做分类过滤
+            // this.hasPermission = false
+            const btn = [
+              {
+                key: 'remove',
+                label: '删除',
+                type: 'danger'
+              }
+            ]
+            this.listConfig.toolbars.push(...btn)
+            this.selection = true
+          }
         }
-      ]
-      this.listConfig.toolbars.push(...btn)
-      this.selection = true
-    }
+      })
   },
   methods: {
     replaceFormName(row, column, cellValue, index) {