Browse Source

更新权限选择

lex-xin 3 years ago
parent
commit
fafbe40ec7

+ 1 - 1
src/components/serviceRemind/index.vue

@@ -83,7 +83,7 @@ export default {
       this.__init()
     },
     tenantInfo() {
-      console.log('showInfo ing', this.tenantInfo)
+      // console.log('showInfo ing', this.tenantInfo)
       this.__init()
     }
   },

+ 4 - 4
src/views/businessManager/shopManager/shopList.vue

@@ -12,7 +12,7 @@
         style="margin-bottom: 20px"
         >添加</el-button
       >
-      <el-upload
+      <!-- <el-upload
         v-permission="'import/goods'"
         style="display: inline-block; margin: 0 10px"
         action="/api-web/import/goods"
@@ -24,7 +24,7 @@
         :on-success="handleSuccess"
       >
         <el-button type="primary" style="margin-bottom: 20px">商品导入</el-button>
-      </el-upload>
+      </el-upload> -->
       <!-- <el-upload v-permission="'export/goods'"
                  style="display: inline-block; margin: 0 10px;"
                  action="/api-web/export/goods"
@@ -43,13 +43,13 @@
         @click="exportShopList"
         >商品导出</el-button
       >
-      <el-button
+      <!-- <el-button
         type="primary"
         style="margin-bottom: 20px"
         @click="onDownload"
         v-permission="'import/downloadTemplate'"
         >下载模板</el-button
-      >
+      > -->
       <el-button
         type="primary"
         style="margin-bottom: 20px"

+ 29 - 18
src/views/categroyManager/insideSetting/adminOperation.vue

@@ -85,7 +85,8 @@ export default {
       silderList: [],
       allChildIds: [], // 所有子编号
       slideCount: 0,
-      seachRoleValue: '' //权限搜索字段
+      seachRoleValue: '', //权限搜索字段
+      filterIds: [4794, 4743, 3266, 3268, 3306, 3307, 3309, 3784, 4627]
     }
   },
   mounted () {
@@ -101,8 +102,8 @@ export default {
       this.pageType = this.$route.query.type
       this.id = this.$route.query.id
       this.page = this.$route.query.page
-      if (this.pageType == 'create') {
-
+      if(this.pageType == 'create') {
+        this.$refs.tree.setCheckedKeys([4229]);
       }
       this.lookSilder()
     },
@@ -209,24 +210,33 @@ export default {
     setTableData (result) {
       let list = []
       list = result.map(res => {
-        let tempList = {}
-        tempList = {
-          id: res.id,
-          name: res.name,
-          label: res.name,
-          type: res.type,
-          path: res.path,
-          permission: res.permission,
-          icon: res.icon,
-          parentId: res.parentId
+        if(!this.filterIds.includes(res.id)) {
+          let tempList = {}
+          tempList = {
+            id: res.id,
+            name: res.name,
+            label: res.name,
+            type: res.type,
+            path: res.path,
+            permission: res.permission,
+            icon: res.icon,
+            parentId: res.parentId
+          }
+          this.slideCount++
+          if (res.sysMenus && res.sysMenus.length > 0) {
+            tempList.children = this.setTableData(res.sysMenus)
+          }
+          return tempList
         }
-        this.slideCount++
-        if (res.sysMenus && res.sysMenus.length > 0) {
-          tempList.children = this.setTableData(res.sysMenus)
+        return null
+      })
+      let tempList = []
+      list.forEach(item => {
+        if(item) {
+          tempList.push(item)
         }
-        return tempList
       })
-      return list
+      return tempList
     },
     onReSet () {
       this.$refs.tree.setCheckedNodes([])
@@ -234,6 +244,7 @@ export default {
         roleName: null,
         roleDesc: null,
       }
+      this.isIndeterminate = false
       this.checkAll = false
     },
     onCancel () {

+ 2 - 2
src/views/organManager/components/memberSetting.vue

@@ -160,8 +160,8 @@ export default {
   methods: {
     async __init() {
       try {
-        // 如果有机构编号则传,没有则传平台编号
-        const tenantId = this.$route.query.id || -1
+        // 不管是添加、查看、修改都传-1
+        const tenantId = -1
         const res = await queryTree({ enable: 1, tenantId })
         const rows = res.data || []
         rows.forEach(item => {

+ 1 - 1
src/views/organManager/components/roomRules.vue

@@ -35,7 +35,7 @@
               <el-input
                 :disabled="isDisabled"
                 placeholder="请输入合同价"
-                style="width: 180px !important;"
+                style="width: 220px !important;"
                 @keyup.native='keyupEvent($event)'
                 v-model="scope.row.price"
                 type="number"

+ 0 - 4
src/views/platformManager/productManger/index.vue

@@ -10,7 +10,6 @@
       ref="searchForm"
       @submit="search"
       @reset="reset"
-      
       :saveKey="'platformProductManager'"
       :model.sync="searchForm"
     >
@@ -27,7 +26,6 @@
     <div class="tableWrap">
       <el-table
         :data="tableList"
-        
         :header-cell-style="{ background: '#EDEEF0', color: '#444' }"
       >
         <el-table-column align="center" label="产品编号" prop="id">
@@ -48,14 +46,12 @@
               @click="resetProduct(scope.row)"
               v-permission="'platformProduct/update'"
               type="text"
-              
               >修改</el-button
             >
             <el-button
               @click="delProduct(scope.row)"
               v-permission="'platformProduct/delete'"
               type="text"
-              
               >删除</el-button
             >
           </template>

+ 37 - 19
src/views/platformManager/productManger/operationModel.vue

@@ -92,7 +92,9 @@ export default {
       silderList: [],
       allChildIds: [], // 所有子编号
       slideCount: 0,
-      seachRoleValue: '' //权限搜索字段
+      seachRoleValue: '', //权限搜索字段
+      filterIds: [4794, 4743, 3266, 3268, 3306, 3307, 3309, 3784, 4627]
+      // 4229 公用权限
     };
   },
   mounted() {
@@ -105,6 +107,11 @@ export default {
       }
       this.menuId = activeRow.menuId ? activeRow.menuId.split(',').map(res => Number(res)) : []
     }
+
+    if(this.pageType == 'create') {
+      this.$refs.tree.setCheckedKeys([4229]);
+    }
+
     this.lookSilder()
   },
   methods: {
@@ -155,6 +162,7 @@ export default {
         this.silderList = silderItem
 
         tempData = this.setTableData(silderItem)
+        console.log(tempData)
         this.data = tempData
       }
       if (this.pageType == 'update') {
@@ -213,24 +221,33 @@ export default {
     setTableData (result) {
       let list = []
       list = result.map(res => {
-        let tempList = {}
-        tempList = {
-          id: res.id,
-          name: res.name,
-          label: res.name,
-          type: res.type,
-          path: res.path,
-          permission: res.permission,
-          icon: res.icon,
-          parentId: res.parentId
+        if(!this.filterIds.includes(res.id)) {
+          let tempList = {}
+          tempList = {
+            id: res.id,
+            name: res.name,
+            label: res.name,
+            type: res.type,
+            path: res.path,
+            permission: res.permission,
+            icon: res.icon,
+            parentId: res.parentId
+          }
+          this.slideCount++
+          if (res.sysMenus && res.sysMenus.length > 0) {
+            tempList.children = this.setTableData(res.sysMenus)
+          }
+          return tempList
         }
-        this.slideCount++
-        if (res.sysMenus && res.sysMenus.length > 0) {
-          tempList.children = this.setTableData(res.sysMenus)
+        return null
+      })
+      let tempList = []
+      list.forEach(item => {
+        if(item) {
+          tempList.push(item)
         }
-        return tempList
       })
-      return list
+      return tempList
     },
     onReSet () {
       this.$refs.tree.setCheckedNodes([])
@@ -238,6 +255,7 @@ export default {
         roleName: null,
         roleDesc: null,
       }
+      this.isIndeterminate = false
       this.checkAll = false
     },
     onCancel () {
@@ -253,9 +271,9 @@ export default {
        this.$refs.tree.filter(this.seachRoleValue);
     },
     filterNode(value, data) {
-        if (!value) return true;
-        return data.label.indexOf(value) !== -1;
-      },
+      if (!value) return true;
+      return data.label.indexOf(value) !== -1;
+    },
     onReSetRole () {
       this.seachRoleValue = ''
       this.data = this.setTableData(this.silderList)