浏览代码

no message

linwenxin 1 年之前
父节点
当前提交
f29ebcecde
共有 3 个文件被更改,包括 26 次插入12 次删除
  1. 7 7
      package-lock.json
  2. 1 1
      package.json
  3. 18 4
      src/views/setting/role/index.vue

+ 7 - 7
package-lock.json

@@ -4425,9 +4425,9 @@
           "integrity": "sha512-Z2uID7YJ7oNvAI20O9X0bblw7Qqs8Q2hFy0R9tAfnfLkp5MW0UH9eUvnDSnFwKZ0AvgS1ucqR4KzvVHgnke1VQ=="
         },
         "postcss": {
-          "version": "8.4.32",
-          "resolved": "http://121.41.110.30:4873/postcss/-/postcss-8.4.32.tgz",
-          "integrity": "sha512-D/kj5JNu6oo2EIy+XL/26JEDTlIbB8hw85G8StOE6L74RQAVVP5rej6wxCNqyMbR4RkPfqvezVbPw81Ngd6Kcw==",
+          "version": "8.4.33",
+          "resolved": "http://121.41.110.30:4873/postcss/-/postcss-8.4.33.tgz",
+          "integrity": "sha512-Kkpbhhdjw2qQs2O2DGX+8m5OVqEcbB9HRBvuYM9pgrjEFUg30A9LmXNlTAUj4S9kgtGyrMbTzVjH7E+s5Re2yg==",
           "requires": {
             "nanoid": "^3.3.7",
             "picocolors": "^1.0.0",
@@ -4716,9 +4716,9 @@
       "integrity": "sha512-NuHqBY1PB/D8xU6s/thBgOAiAP7HOYDQ32+BFZILJ8ivkUkAHQnWfn6WhL79Owj1qmUnoN/YPhktdIoucipkAQ=="
     },
     "@zjlib/element-plugins": {
-      "version": "2.13.8",
-      "resolved": "http://121.41.110.30:4873/@zjlib%2felement-plugins/-/element-plugins-2.13.8.tgz",
-      "integrity": "sha512-I9/yswo9fRxe9NoCB9tl6NmcaLEJUGsc+MPemUlph3wj8WbTYplGvRuQlY/9ZaVjPWbLjbUyqusf//dE/tIp2g==",
+      "version": "2.13.9",
+      "resolved": "http://121.41.110.30:4873/@zjlib%2felement-plugins/-/element-plugins-2.13.9.tgz",
+      "integrity": "sha512-3OBzQqTFIaV2AYu0KHMWgdSz04bOQSO3UHMJBCx08wXjcBezzrXoODQLdfWBYQDNhE+hpZo3mfxTLcOwbANrzw==",
       "requires": {
         "@turf/turf": "^6.5.0",
         "@vuemap/vue-amap": "^0.1.12",
@@ -4763,7 +4763,7 @@
       "dependencies": {
         "vue-plugin-hiprint": {
           "version": "0.0.17",
-          "resolved": "https://registry.npmmirror.com/vue-plugin-hiprint/-/vue-plugin-hiprint-0.0.17.tgz",
+          "resolved": "http://121.41.110.30:4873/vue-plugin-hiprint/-/vue-plugin-hiprint-0.0.17.tgz",
           "integrity": "sha512-pV7aemrQXJfpcxLUFlV5qSbJffWjyU982ByyahV0Ietr0i8N/rhmtCJ6vCp0Eptip9Oy4yQl6tWkFuAVE6uH3g=="
         }
       }

+ 1 - 1
package.json

@@ -18,7 +18,7 @@
     "@turf/turf": "^6.5.0",
     "@vue-office/excel": "^1.3.0",
     "@vue/composition-api": "^1.7.1",
-    "@zjlib/element-plugins": "^2.13.8",
+    "@zjlib/element-plugins": "^2.13.9",
     "@zjlib/element-ui2": "^1.0.3",
     "axios": "0.18.1",
     "chatgpt": "^4.1.2",

+ 18 - 4
src/views/setting/role/index.vue

@@ -56,12 +56,12 @@
     </el-dialog>
 
     <!-- 设置权限 -->
-    <el-dialog title="设置权限" :visible.sync="roleFormVisible" :show-close="false" width="40%" :close-on-click-modal="false"
+    <el-dialog title="设置权限" :visible.sync="roleFormVisible" :show-close="false" width="1000" :close-on-click-modal="false"
       custom-class="tree-dialog" top="50px">
       <!-- :check-strictly="true" -->
-      <el-tree :data="menuRoleList" show-checkbox :default-expand-all="true" node-key="moduleId" ref="tree"
+      <zj-tree :data="menuRoleList" show-checkbox :default-expand-all="true" node-key="moduleId" ref="tree"
         highlight-current :props="defaultProps">
-      </el-tree>
+      </zj-tree>
       <div slot="footer" class="dialog-footer">
         <el-button @click="roleFormVisible = false">{{ editId != 1 ? '取 消' : '关 闭' }}</el-button>
         <el-button type="primary" @click="submitRoleForm" v-if="editId != 1">确 定</el-button>
@@ -201,8 +201,22 @@ export default {
     setMenuRole(id) {
       this.roleFormVisible = true;
       this.editId = id;
+
+      function aaa(list){
+        for(var item of list){
+          if(item.type==3){
+            item.tiling = true
+            item.labelWidthNum = 115
+          }
+          if(item.children && item.children.length){
+            aaa(item.children)
+          }
+        }
+      }
+
       getMenuList({ adminUserId: this.userid }).then(res => {
-        this.menuRoleList = res.data;
+        aaa(res.data);
+        this.menuRoleList = res.data
       })
       getMenuRoleIds({ adminRoleId: id }).then(res => {
         this.$refs.tree.setCheckedKeys(res.data);