2 Komitmen c975f67c49 ... 28fb09b2d5

Pembuat SHA1 Pesan Tanggal
  lmc 28fb09b2d5 Merge branch 'master' of http://git.ringzle.com:3000/lmc/witcarbon-app 1 tahun lalu
  lmc 709fa9275e 报错问题 1 tahun lalu
2 mengubah file dengan 20 tambahan dan 12 penghapusan
  1. 2 2
      src/utils/request.js
  2. 18 10
      src/views/home.vue

+ 2 - 2
src/utils/request.js

@@ -9,8 +9,8 @@ export const getBaseURI = () => {
 
   //    开发环境
   if (env === "dev" || env == "development") {
-    return 'http://192.168.1.51:9013/witcarbon-app';
-    // return "http://gpu.ringzle.com:8082/witcarbon-app";
+    // return 'http://192.168.1.51:9013/witcarbon-app';
+    return "http://gpu.ringzle.com:8082/witcarbon-app";
   }
 
   // 集成测试环境

+ 18 - 10
src/views/home.vue

@@ -61,7 +61,12 @@
           v-for="(item, index) in functionList"
           :key="index"
           :style="{ display: !item.role.includes(role) ? 'none' : '' }"
-          @click="toPath(item.path, item.activeTab)"
+          @click="
+            toPath(
+              role == 'Tenant' ? item.path : '/bill/detail',
+              item.activeTab
+            )
+          "
         >
           <template v-if="item.role.includes(role)">
             <van-image :src="item.src" width="36" height="36" fit="contain" />
@@ -100,7 +105,7 @@
             v-for="(item, index) in reviewList"
             :key="item + '_' + index"
           >
-            <van-col>{{ item.label }}</van-col>
+            <van-col>{{ item.dictLabel }}</van-col>
             <v-count-up
               :end-val="Number(item['count'])"
               class="count_up"
@@ -377,16 +382,15 @@ export default {
           activeTab: "record",
         },
       ],
-      reviewList: [],
       workList: [
         {
           label: "待指派",
-          count: 3,
+          count: 0,
           role: ["admin"],
         },
         {
           label: "待维修",
-          count: 2,
+          count: 0,
           role: ["admin", "Maintenance", "Tenant"],
         },
         {
@@ -395,17 +399,19 @@ export default {
           role: ["admin", "Maintenance", "Tenant"],
         },
       ],
+      reviewList: [],
       deviceAlarmList: [],
       payTypeList: [],
       billPaymentList: [],
       loading: true,
     };
   },
-  created() {
+  async mounted() {
     this.role = localStorage.getItem("role");
+    await this.getPayTypeList();
+    await this.getDeviceAlarmList();
+    await this.getReviewList();
     this.getHomeData();
-    this.getPayTypeList();
-    this.getDeviceAlarmList();
     if (this.role == "Tenant") {
       this.tenantInfo = JSON.parse(localStorage.getItem("tenantInfo"));
     } else {
@@ -419,6 +425,9 @@ export default {
     getDeviceAlarmList() {
       this.deviceAlarmList = getDictDataList("DeviceAlarm");
     },
+    getReviewList() {
+      this.reviewList = getDictDataList("Review");
+    },
     dict_filter(val, list) {
       if (isEmpty(val)) {
         return {};
@@ -475,13 +484,12 @@ export default {
     },
     toPath(path, val) {
       let params = {};
-      if (this.role != "admin" && val) {
+      if (this.role == "Tenant") {
         params = {
           tenantId: this.tenantInfo.tenantId,
           tenantName: this.tenantInfo.tenantName,
           activeTab: val,
         };
-        path = "/bill/detail";
       }
       this.$router.push({
         path: path,