Hwt 2 anni fa
parent
commit
03fbc5176d

+ 87 - 1
operationSupport/src/store/store.js

@@ -87,8 +87,94 @@ const store = new Vuex.Store({
                     }
                 }
             }
+        },
 
-            return false;
+        hasPermission1: (state) => (role) => {
+            if (state.permissionList) {
+                for (let i = 0; i < state.permissionList.length; i++) {
+                    if (state.permissionList[i].linkPath == role) {
+                        return true;
+                    }
+                }
+                return false;
+            }
+        },
+        hasPermission2: (state) => (role) => {
+            if (state.permissionList) {
+                for (let i = 0; i < state.permissionList.length; i++) {
+                    if (state.permissionList[i].linkPath == role) {
+                        return true;
+                    } else {
+                        return false;
+                    }
+                }
+            }
+        },
+        hasPermission3: (state) => (role) => {
+            if (state.permissionList) {
+                for (let i = 0; i < state.permissionList.length; i++) {
+                    if (state.permissionList[i].linkPath == role) {
+                        return true;
+                    } else {
+                        return false;
+                    }
+                }
+            }
+        },
+        hasPermission4: (state) => (role) => {
+            if (state.permissionList) {
+                for (let i = 0; i < state.permissionList.length; i++) {
+                    if (state.permissionList[i].linkPath == role) {
+                        return true;
+                    } else {
+                        return false;
+                    }
+                }
+            }
+        },
+        hasPermission5: (state) => (role) => {
+            debugger;
+            if (state.permissionList) {
+                for (let i = 0; i < state.permissionList.length; i++) {
+                    if (state.permissionList[i].linkPath == role) {
+                        return true;
+                    }
+                }
+                return false;
+            }
+        },
+        hasPermission6: (state) => (role) => {
+            debugger;
+            if (state.permissionList) {
+                for (let i = 0; i < state.permissionList.length; i++) {
+                    if (state.permissionList[i].linkPath == role) {
+                        return true;
+                    }
+                }
+                return false;
+            }
+        },
+        hasPermission7: (state) => (role) => {
+            debugger;
+            if (state.permissionList) {
+                for (let i = 0; i < state.permissionList.length; i++) {
+                    if (state.permissionList[i].linkPath == role) {
+                        return true;
+                    }
+                }
+                return false;
+            }
+        },
+        hasPermission8: (state) => (role) => {
+            debugger;
+            if (state.permissionList) {
+                for (let i = 0; i < state.permissionList.length; i++) {
+                    if (state.permissionList[i].linkPath == role) {
+                        return true;
+                    }
+                }
+                return false;
+            }
         },
         //获取菜单列表
         getMenuList(state) {

+ 24 - 3
operationSupport/src/utils/utils.js

@@ -24,19 +24,40 @@ Vue.mixin({
             return this.$store.getters['hasPermission'](this.mix_path + ':edit');
         },
         $query() {
+            debugger;
             return this.$store.getters['hasPermission'](this.mix_path + ':query');
         },
+        // 房东
         // 账单
         $collection() {
-            return this.$store.getters['hasPermission'](this.mix_path + ':collection');
+            return this.$store.getters['hasPermission1'](this.mix_path + ':collection');
         },
         //账单金额
         $billAmount() {
-            return this.$store.getters['hasPermission'](this.mix_path + ':billAmount');
+            return this.$store.getters['hasPermission2'](this.mix_path + ':billAmount');
         },
         //修改应收金额
         $receivableAmount() {
-            return this.$store.getters['hasPermission'](this.mix_path + ':receivableAmount');
+            return this.$store.getters['hasPermission3'](this.mix_path + ':receivableAmount');
+        },
+        $editAmount() {
+            return this.$store.getters['hasPermission4'](this.mix_path + ':editAmount');
+        },
+        // 租户  tenant
+        $collectiontenant() {
+            return this.$store.getters['hasPermission5'](this.mix_path + ':collectiontenant');
+        },
+        //账单金额
+        $billAmounttenant() {
+            return this.$store.getters['hasPermission6'](this.mix_path + ':billAmounttenant');
+        },
+        //修改应收金额
+        $receivableAmounttenant() {
+            return this.$store.getters['hasPermission7'](this.mix_path + ':receivableAmounttenant');
+        },
+        $editAmounttenant() {
+            debugger;
+            return this.$store.getters['hasPermission8'](this.mix_path + ':editAmounttenant');
         }
     }
 });

+ 1 - 1
operationSupport/src/views/payService/landlordBill/index.vue

@@ -259,7 +259,7 @@
               content="删除"
             >
               <i
-                v-if="$del"
+                v-if="$editAmount"
                 class="zoniot_font zoniot-icon-shanchu redText"
                 @click="deluserbyidFn(scope.row.id)"
               ></i>

+ 10 - 4
operationSupport/src/views/payService/propertyFee/index.vue

@@ -108,6 +108,11 @@
           icon="el-icon-search"
         >搜索</el-button>
 
+        {{this.$collectiontenant}}
+        {{this.$billAmounttenant}}
+        {{this.$receivableAmounttenant}}
+        {{this.$editAmounttenant}}
+
         <div class="search-icon">
 
           <!-- v-show="chargeStatus == 1 && chiData.type === 'room'" -->
@@ -202,7 +207,7 @@
               content="收款"
             >
               <i
-                v-if="$collection"
+                v-if="$collectiontenant"
                 class="zoniot_font zoniot-icon-shoukuan"
                 @click="collections('single', scope.row)"
                 style="margin: 0"
@@ -216,7 +221,7 @@
               content="修改账单金额"
             >
               <img
-                v-if="$billAmount"
+                v-if="$billAmounttenant"
                 src="../../../assets/img/icon_xiugaizhangdanjine.png"
                 alt=""
                 @click="editAmount(scope.row)"
@@ -232,7 +237,7 @@
               content="修改应收金额"
             >
               <img
-                v-if="$receivableAmount"
+                v-if="$receivableAmounttenant"
                 src="../../../assets/img/icon_xiugaiyingshoujine.png"
                 alt=""
                 @click="receivableAmount(scope.row)"
@@ -248,7 +253,7 @@
               content="删除"
             >
               <i
-                v-if="$del"
+                v-if="$editAmounttenant"
                 class="zoniot_font zoniot-icon-shanchu redText"
                 @click="deluserbyidFn(scope.row.id)"
                 style="margin: 0"
@@ -281,6 +286,7 @@ export default {
   name: 'propertyFee',
   data () {
     return {
+      mix_path: 'payService/propertyFee/index',
       temporaryCollection: '2',
       mixins_querys: {
         chargeType: ''