Hwt 3 éve
szülő
commit
f54aab50ed

+ 9 - 8
operationSupport/src/components/common/Home.vue

@@ -98,13 +98,14 @@ export default {
       sessionStorage.setItem('tabs', JSON.stringify(taglist));
     },
     // 获取用户权限
-    getElement () {
-      this.$http.post('/czc-user-center/menu/selectAuthCode').then((res) => {
-        let data = res.data || [];
-        this.$store.commit('setPermissionList', new Set(data));
-        console.log('获取到的权限标识为', data);
-      });
-    },
+    // getElement () {
+    //   this.$http.post('/czc-user-center/menu/selectAuthCode').then((res) => {
+    //     let data = res.data || [];
+    //     debugger
+    //     this.$store.commit('setPermissionList', new Set(data));
+    //     console.log('获取到的权限标识为', data);
+    //   });
+    // },
     beforeunload () {
       window.addEventListener('beforeunload', this.beforeunloadHandler, false);
     }
@@ -116,7 +117,7 @@ export default {
   },
   created () {
     this.$store.dispatch('SET_MENU_LIST');
-    this.getElement();
+    // this.getElement();
     this.$store.dispatch('tags', JSON.parse(sessionStorage.getItem('tabs')) || []);
   },
   mounted () {

+ 73 - 49
operationSupport/src/components/common/MenuTree.vue

@@ -1,63 +1,87 @@
 <template>
-    <div>
-        <template v-for="item in menuList">
-            <el-submenu v-if="!!item.children" :index="'/' + item.linkPath" :key="item.id">
-                <template slot="title">
-                    <img
-                        :src="`${envConfig.baseImgApi}${
+  <div>
+    <template v-for="item in menuList">
+      <el-submenu
+        v-if="!!item.children"
+        :index="'/' + item.linkPath"
+        :key="item.id"
+      >
+        <template slot="title">
+          <img
+            :src="`${envConfig.baseImgApi}${
                             openArray.includes(item.linkPath) ? item.menuDynamicImage || item.menuImage : item.menuImage
                         }`"
-                        style="width: 14px; height: 14px; margin-right: 10px"
-                    />
-                    <span v-if="!collapse" slot="title">{{ item.name }}</span>
-                </template>
-                <menu-tree :menuList="item.children" :openArray="openArray" />
-            </el-submenu>
-            <el-menu-item v-else :index="'/' + item.linkPath" :key="item.id">
-                <img
-                    :src="`${envConfig.baseImgApi}${
+            style="width: 14px; height: 14px; margin-right: 10px"
+          />
+          <span
+            v-if="!collapse"
+            slot="title"
+          >{{ item.name }}</span>
+        </template>
+        <menu-tree
+          :menuList="item.children"
+          :openArray="openArray"
+        />
+      </el-submenu>
+      <el-menu-item
+        v-else
+        :index="'/' + item.linkPath"
+        :key="item.id"
+      >
+        <img
+          :src="`${envConfig.baseImgApi}${
                         openArray.includes(item.linkPath) ? item.menuDynamicImage || item.menuImage : item.menuImage
                     }`"
-                    style="width: 14px; height: 14px; margin-right: 10px"
-                />
-                <span slot="title">{{ item.name }}</span>
-            </el-menu-item>
-        </template>
-    </div>
+          style="width: 14px; height: 14px; margin-right: 10px"
+        />
+        <span slot="title">{{ item.name }}</span>
+      </el-menu-item>
+    </template>
+  </div>
 </template>
 <script>
 import MenuTree from './MenuTree.vue';
 import envConfig from '@/config';
 export default {
-    name: 'MenuTree',
-    data() {
-        return {
-            envConfig: envConfig
-        };
-    },
-    components: {
-        MenuTree
-    },
-    computed: {
-        onRoutes() {
-            return this.$route.path;
-        }
+  name: 'MenuTree',
+  data () {
+    return {
+      envConfig: envConfig
+    };
+  },
+  components: {
+    MenuTree
+  },
+  computed: {
+    onRoutes () {
+      return this.$route.path;
+    }
+  },
+  methods: {
+    // verificationMethod (item) {
+    //   for (let i = 0; i < item.length; i++) {
+    //     if (item[i].linkPath.indexOf(':') != -1) {
+    //       return false
+    //     } else {
+    //       return true
+    //     }
+    //   }
+    // }
+  },
+  props: {
+    menuList: {
+      type: Array,
+      default: () => []
     },
-    methods: {},
-    props: {
-        menuList: {
-            type: Array,
-            default: () => []
-        },
-        collapse: {
-            type: Boolean,
-            default: false
-        },
-        openArray: {
-            type: Array,
-            default: () => []
-        }
+    collapse: {
+      type: Boolean,
+      default: false
     },
-    created() {}
+    openArray: {
+      type: Array,
+      default: () => []
+    }
+  },
+  created () { }
 };
 </script>

+ 28 - 0
operationSupport/src/main.js

@@ -95,9 +95,36 @@ router.beforeEach((to, from, next) => {
     if (localStorage.getItem('CZC_token')) {
         let menuList = window.sessionStorage.getItem('SC_listMuen');
         let newAr = [];
+
+        if (!!window.sessionStorage.getItem('czc_per')) {
+            store.commit('setPermissionList', JSON.parse(window.sessionStorage.getItem('czc_per')));
+        }
+
         if (menuList == null || menuList == undefined) {
             http.get('/czc-user-center/user/findUserMenu', { appId: '1002' }).then(({ status, data, msg }) => {
                 if (0 == status) {
+                    let newArs = []; //权限数组
+                    let newData = []; //菜单树
+                    for (let i = 0; i < data[0].children.length; i++) {
+                        if (data[0].children[i].children != null) {
+                            for (let k = 0; k < data[0].children[i].children.length; k++) {
+                                if (
+                                    data[0].children[i].children[k].children != null &&
+                                    data[0].children[i].children[k].name != '统计报表'
+                                ) {
+                                    for (let j = 0; j < data[0].children[i].children[k].children.length; j++) {
+                                        if (data[0].children[i].children[k].children[j].linkPath.indexOf(':') != -1) {
+                                            newArs.push(data[0].children[i].children[k].children[j]);
+                                            // data[0].children[i].children[k].children = null;
+                                        }
+                                    }
+                                    data[0].children[i].children[k].children = null;
+                                }
+                            }
+                        }
+                    }
+                    store.commit('setPermissionList', newArs);
+                    window.sessionStorage.setItem('czc_per', JSON.stringify(newArs));
                     let datas = data[0].children;
                     window.sessionStorage.setItem('SC_listMuen', JSON.stringify(datas));
                     window.sessionStorage.setItem('setThisDetai', JSON.stringify(data[0]));
@@ -105,6 +132,7 @@ router.beforeEach((to, from, next) => {
                     funcRouter(newAr, datas, router);
                     next({ ...to, replace: true });
                 } else {
+                    data;
                     this.$message.error(msg);
                 }
             });

+ 28 - 5
operationSupport/src/store/store.js

@@ -80,11 +80,15 @@ const store = new Vuex.Store({
         },
         // 判断按钮是否有权限
         hasPermission: (state) => (role) => {
-            if (state.permissionList.size) {
-                return state.permissionList.has(role);
-            } else {
-                return false;
+            if (state.permissionList) {
+                for (let i = 0; i < state.permissionList.length; i++) {
+                    if (state.permissionList[i].linkPath.indexOf(':') != -1) {
+                        return true;
+                    }
+                }
             }
+
+            return false;
         },
         //获取菜单列表
         getMenuList(state) {
@@ -277,8 +281,27 @@ const store = new Vuex.Store({
         SET_MENU_LIST(ctx) {
             let value = ctx.getters['getMenuList'] || [];
             if (!value.length) {
-                http.get('/czc-user-center/user/findUserMenu', { appId: '1002' }).then(({ status, data, msg }) => {
+                http.get('/czc-user-center/user/', { appId: '1002' }).then(({ status, data, msg }) => {
                     if (0 === status) {
+                        debugger;
+                        let newArs = []; //权限数组
+                        let newData = []; //菜单树
+                        for (let i = 0; i < data[0].children.length; i++) {
+                            if (data[0].children[i].children != null) {
+                                for (let k = 0; k < data[0].children[i].children.length; k++) {
+                                    if (data[0].children[i].children[k].children != null) {
+                                        for (let j = 0; j < data[0].children[i].children[k].children.length; j++) {
+                                            if (data[0].children[i].children[k].children[j].linkPath.indexOf(':') != -1) {
+                                                newArs.push(data[0].children[i].children[k].children[j]);
+                                            }
+                                        }
+                                        data[0].children[i].children[k].children = null;
+                                    }
+                                }
+                            }
+                        }
+
+                        store.commit('setPermissionList', newArs);
                         ctx.commit('setMenuList', data[0].children);
                         ctx.commit('setThisDetai', data[0]);
                         window.localStorage.setItem('SC_listMuen', JSON.stringify(data[0].children));

+ 12 - 0
operationSupport/src/utils/utils.js

@@ -25,6 +25,18 @@ Vue.mixin({
         },
         $query() {
             return this.$store.getters['hasPermission'](this.mix_path + ':query');
+        },
+        // 账单
+        $collection() {
+            return this.$store.getters['hasPermission'](this.mix_path + ':collection');
+        },
+        //账单金额
+        $billAmount() {
+            return this.$store.getters['hasPermission'](this.mix_path + ':billAmount');
+        },
+        //修改应收金额
+        $receivableAmount() {
+            return this.$store.getters['hasPermission'](this.mix_path + ':receivableAmount');
         }
     }
 });

+ 9 - 6
operationSupport/src/views/payService/landlordBill/index.vue

@@ -116,8 +116,6 @@
           icon="el-icon-search"
         >搜索</el-button>
         <div class="search-icon">
-
-          <!-- v-show="chargeStatus == 1 && chiData.type === 'room'" -->
           <el-tooltip
             class="item"
             effect="light"
@@ -208,6 +206,7 @@
               content="收款"
             >
               <i
+                v-if="$collection"
                 class="zoniot_font zoniot-icon-shoukuan"
                 @click="collections('single', scope.row)"
                 style="margin-right: 20px;"
@@ -225,6 +224,7 @@
                 @click="editAmount(scope.row)"
               ></i> -->
               <img
+                v-if="$billAmount"
                 src="../../../assets/img/icon_xiugaizhangdanjine.png"
                 alt=""
                 @click="editAmount(scope.row)"
@@ -243,6 +243,7 @@
                 @click="receivableAmount(scope.row)"
               ></i> -->
               <img
+                v-if="$receivableAmount"
                 src="../../../assets/img/icon_xiugaiyingshoujine.png"
                 alt=""
                 @click="receivableAmount(scope.row)"
@@ -258,6 +259,7 @@
               content="删除"
             >
               <i
+                v-if="$del"
                 class="zoniot_font zoniot-icon-shanchu redText"
                 @click="deluserbyidFn(scope.row.id)"
               ></i>
@@ -289,6 +291,7 @@ export default {
   name: 'propertyFee',
   data () {
     return {
+      mix_path: 'payService/landlordBill/index',
       mixins_querys: {
         chargeType: '',
         communityId: ''
@@ -453,10 +456,10 @@ export default {
           hideStar = false;
           height = '300px';
           width = '550px';
-          if (this.mixins_query.communityId == undefined) {
-            this.$message.error('请先选择社区');
-            return
-          }
+          // if (this.mixins_query.communityId == undefined) {
+          //   this.$message.error('请先选择社区');
+          //   return
+          // }
         } else if (todo == 'bulk') {
           if (!this.selectRow.length) {
             this.$message.error('您尚未选择要收款项,请选择后再操作批量');

+ 1 - 1
operationSupport/src/views/payService/landlordBill/stePage/temporary.vue

@@ -168,7 +168,7 @@ export default {
       });
     },
     landlord () {
-      this.$http.get('/czc-community/landlord/list', { communityId: this.params.communityId }).then(({ data, status, msg }) => {
+      this.$http.get('/czc-community/landlord/list').then(({ data, status, msg }) => {
         if (status == 0) {
           this.dateLandlady = [];
           for (let i = 0; i < data.length; i++) {

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

@@ -233,7 +233,7 @@ export default {
           width: '100'
         },
         {
-          label: '房屋',
+          label: '地址',
           prop: 'assets'
         },
 

+ 12 - 0
operationSupport/src/views/payService/propertyFee/index.vue

@@ -107,6 +107,7 @@
           @click="mixins_search()"
           icon="el-icon-search"
         >搜索</el-button>
+
         <div class="search-icon">
 
           <!-- v-show="chargeStatus == 1 && chiData.type === 'room'" -->
@@ -117,6 +118,7 @@
             content="临时收款"
           >
             <i
+              v-show="temporaryCollection == '1' ? true : false"
               class="zoniot_font zoniot-icon-linshishoukuan"
               @click="collections('temporary')"
             ></i>
@@ -200,6 +202,7 @@
               content="收款"
             >
               <i
+                v-if="$collection"
                 class="zoniot_font zoniot-icon-shoukuan"
                 @click="collections('single', scope.row)"
                 style="margin: 0"
@@ -213,6 +216,7 @@
               content="修改账单金额"
             >
               <img
+                v-if="$billAmount"
                 src="../../../assets/img/icon_xiugaizhangdanjine.png"
                 alt=""
                 @click="editAmount(scope.row)"
@@ -228,6 +232,7 @@
               content="修改应收金额"
             >
               <img
+                v-if="$receivableAmount"
                 src="../../../assets/img/icon_xiugaiyingshoujine.png"
                 alt=""
                 @click="receivableAmount(scope.row)"
@@ -243,6 +248,7 @@
               content="删除"
             >
               <i
+                v-if="$del"
                 class="zoniot_font zoniot-icon-shanchu redText"
                 @click="deluserbyidFn(scope.row.id)"
                 style="margin: 0"
@@ -275,6 +281,7 @@ export default {
   name: 'propertyFee',
   data () {
     return {
+      temporaryCollection: '2',
       mixins_querys: {
         chargeType: ''
       },
@@ -531,6 +538,11 @@ export default {
     },
     currentOrganId (data) {
       this.currentId = data || '';
+      if (data.type == "room") {
+        this.temporaryCollection = '1'
+      } else {
+        this.temporaryCollection = '2'
+      }
     },
     changeRadio () {
       this.statusTable = false;

+ 1 - 1
operationSupport/src/views/payService/propertyFee/stepPage/single.vue

@@ -64,7 +64,7 @@
             ></el-option>
           </el-select>
         </el-form-item>
-        <el-form-item label="应收金额(元)">
+        <el-form-item label="账单金额(元)">
           <div style="white-space: nowrap">{{ thisItem.receivableAmount }}</div>
         </el-form-item>
         <el-form-item

+ 1 - 1
operationSupport/src/views/payService/statisticalReport/paymentDetails.vue

@@ -32,7 +32,7 @@ export default {
           prop: 'billNumber'
         },
         {
-          label: '房间',
+          label: '地址',
           prop: 'assets'
         },
         {