Bläddra i källkod

Merge branch 'master' of http://101.36.160.140:21044/csc/csc-szls-vue

linyanfei 3 år sedan
förälder
incheckning
cbf5070be8

+ 29 - 10
shanXiPlatform/src/layout/components/RightSettings/index.vue

@@ -43,21 +43,40 @@ export default {
43 43
     listenDepotId() {
44 44
       return this.$store.state.depotId
45 45
     },
46
+    listenRelation() {
47
+      return this.$store.state.relation
48
+    },
46 49
   },
47 50
   watch: {
48 51
     listenHouseId: function (val) {
49
-      if(this.$store.state.relation && this.$store.state.relation == 'house'){
50
-        this.$refs.userManageTree.setCurrentKey(this.$store.state.houseId)
51
-      }else if(this.$store.state.relation && this.$store.state.relation == 'library'){
52
-        this.$refs.userManageTree.setCurrentKey(this.$store.state.depotId)
53
-      }
52
+      let that = this
53
+      setTimeout(function () {
54
+          if(that.$store.state.relation && that.$store.state.relation == 'house'){
55
+            that.$refs.userManageTree.setCurrentKey(that.$store.state.houseId)
56
+          }else if(that.$store.state.relation && that.$store.state.relation == 'library'){
57
+            that.$refs.userManageTree.setCurrentKey(that.$store.state.depotId)
58
+          }
59
+      }, 1000);
54 60
     },
55 61
     listenDepotId: function (val) {
56
-      if(this.$store.state.relation && this.$store.state.relation == 'house'){
57
-        this.$refs.userManageTree.setCurrentKey(this.$store.state.houseId)
58
-      }else if(this.$store.state.relation && this.$store.state.relation == 'library'){
59
-        this.$refs.userManageTree.setCurrentKey(this.$store.state.depotId)
60
-      }
62
+      let that = this
63
+      setTimeout(function () {
64
+          if(that.$store.state.relation && that.$store.state.relation == 'house'){
65
+            that.$refs.userManageTree.setCurrentKey(that.$store.state.houseId)
66
+          }else if(that.$store.state.relation && that.$store.state.relation == 'library'){
67
+            that.$refs.userManageTree.setCurrentKey(that.$store.state.depotId)
68
+          }
69
+      }, 1000);
70
+    },
71
+    listenRelation: function (val) {
72
+      let that = this
73
+      setTimeout(function () {
74
+          if(that.$store.state.relation && that.$store.state.relation == 'house'){
75
+            that.$refs.userManageTree.setCurrentKey(that.$store.state.houseId)
76
+          }else if(that.$store.state.relation && that.$store.state.relation == 'library'){
77
+            that.$refs.userManageTree.setCurrentKey(that.$store.state.depotId)
78
+          }
79
+      }, 1000);
61 80
     },
62 81
   },
63 82
   created() {},

+ 4 - 4
shanXiPlatform/src/router/index.js

@@ -834,7 +834,7 @@ export const constantRoutes = [
834 834
       component: Layout,
835 835
       // redirect: '/guide/index',
836 836
       name: 'FacilitiesEquipment',
837
-      meta: { title: '设施设备', icon: 'sheshi',noCache: true, affix: false, relation: 'house', istable: true},
837
+      meta: { title: '设施设备', icon: 'sheshi',noCache: true, affix: false,  istable: true},
838 838
       resourceCode: 242,
839 839
       //  设施设备/设施管理
840 840
       children: [
@@ -843,7 +843,7 @@ export const constantRoutes = [
843 843
           redirect: 'facilitiesManagement/newFacilities',
844 844
           component: facilitiesTabs,
845 845
           name: 'FacilitiesManagemen',
846
-          meta: { title: '设施管理', icon: 'dashboard', affix: false,istable: true},
846
+          meta: { title: '设施管理', icon: 'dashboard', affix: false,istable: true ,relation: 'library'},
847 847
           resourceCode: 243,
848 848
 
849 849
 
@@ -855,7 +855,7 @@ export const constantRoutes = [
855 855
               name: 'NewFacilities',
856 856
 
857 857
               hidden: true,
858
-              meta: { title: '最新设施检查记录', icon: 'dashboard', affix: false,relation: 'house', istable: true}
858
+              meta: { title: '最新设施检查记录', icon: 'dashboard', affix: false,relation: 'library', istable: true}
859 859
             },
860 860
 
861 861
 
@@ -866,7 +866,7 @@ export const constantRoutes = [
866 866
               name: 'AllFacilities',
867 867
 
868 868
               hidden: true,
869
-              meta: { title: '全部设施检查记录', icon: 'dashboard', affix: false ,relation: 'house', istable: true}
869
+              meta: { title: '全部设施检查记录', icon: 'dashboard', affix: false ,relation: 'library', istable: true}
870 870
             },
871 871
 
872 872
 

+ 12 - 7
shanXiPlatform/src/views/facilitiesEquipment/facilitiesManagement/newFacilities/index.vue

@@ -88,13 +88,6 @@
88 88
             @click="moreRecords(4, scope.$index, scope.row)"
89 89
             >更多记录
90 90
           </el-button>
91
-          <!-- <el-button
92
-                size="mini"
93
-                type="danger"
94
-                plain
95
-                @click="handleDelete(scope.$index, scope.row)"
96
-                >删除</el-button
97
-              > -->
98 91
         </template>
99 92
       </el-table-column>
100 93
     </el-table>
@@ -146,6 +139,18 @@ export default {
146 139
     // 获取最新设施检查记录
147 140
     this.getNewFacilitycheck()
148 141
   },
142
+/* computed: {
143
+    depotIdVal() {
144
+      return this.$store.state.depotId
145
+    }
146
+  },
147
+  watch: {
148
+    depotIdVal: function(val) {
149
+      this.depotId = val
150
+      console.log(val,'val')
151
+      this.getNewList()
152
+    }
153
+  }, */
149 154
   methods: {
150 155
     //设施种类
151 156
     getFacilityList() {