浏览代码

[Feat 0000] 可配置首页5.0版添加跳转至详情按钮

houzekong 1 月之前
父节点
当前提交
9e005d5e02
共有 2 个文件被更改,包括 41 次插入14 次删除
  1. 6 6
      src/views/vent/home/configurable/configurable.data.ts
  2. 35 8
      src/views/vent/home/configurable/vent_v5.vue

+ 6 - 6
src/views/vent/home/configurable/configurable.data.ts

@@ -117,7 +117,7 @@ export const testConfigVent: Config[] = [
       list: [],
       chart: [
         {
-          type: 'bar_cylinder',
+          type: 'bar_cylinder_wide',
           readFrom: '',
           legend: { show: false },
           xAxis: [{ show: true }],
@@ -1541,7 +1541,7 @@ export const testConfigVentRealtime: Config[] = [
       list: [],
       chart: [
         {
-          type: 'bar_cylinder',
+          type: 'bar_cylinder_wide',
           readFrom: '',
           legend: { show: false },
           xAxis: [{ show: true }],
@@ -1825,10 +1825,10 @@ export const testConfigVentRealtime: Config[] = [
               label: '回风',
               value: '${hui}',
             },
-            {
-              label: '需风量',
-              value: '${xufengliang}',
-            },
+            // {
+            //   label: '需风量',
+            //   value: '${xufengliang}',
+            // },
           ],
         },
       ],

+ 35 - 8
src/views/vent/home/configurable/vent_v5.vue

@@ -61,12 +61,11 @@
     </template>
     <div style="width: 1000px; height: 570px; position: absolute; left: calc(50% - 500px); top: 60px">
       <VentModal />
-      <img
-        :src="isDataRealTime ? '/@/assets/images/company/monitor-realtime.png' : '/@/assets/images/company/monitor-doc.png'"
-        alt="切换数据模式"
-        class="w-34px h-34px pos-absolute right-5px bottom-5px z-5"
-        @click="switchDataMode"
-      />
+      <div :class="{ 'realtime-mode': isDataRealTime }" alt="切换数据模式" class="switch-button report-mode right-50px" @click="switchDataMode"></div>
+      <div
+        class="switch-button icon-goto right-5px"
+        @click="redirectTo('/micro-vent-3dModal/dashboard/analysis?type=model3D&deviceType=model3D')"
+      ></div>
     </div>
   </div>
 </template>
@@ -101,6 +100,10 @@
     });
   }
 
+  function redirectTo(url) {
+    window.open(url);
+  }
+
   onMounted(() => {
     fetchConfigs(isDataRealTime.value ? 'vent_realtime' : 'vent').then(() => {
       // configs.value = isDataRealTime.value ? testConfigVentRealtime : testConfigVent;
@@ -127,12 +130,16 @@
 
   @{theme-deepblue} {
     .company-home {
-      --image-modal-top: url('@/assets/images/themify/deepblue/vent/home/modal-top.png');
+      --image-modal-top: url('/@/assets/images/themify/deepblue/vent/home/modal-top.png');
     }
   }
 
   .company-home {
-    --image-modal-top: url('@/assets/images/vent/home/modal-top.png');
+    --image-modal-top: url('/@/assets/images/vent/home/modal-top.png');
+    --image-monitor-realtime: url('/@/assets/images/company/monitor-realtime.png');
+    --image-monitor-doc: url('/@/assets/images/company/monitor-doc.png');
+    --image-monitor-goto: url('/@/assets/images/company/monitor-goto.png');
+
     width: 100%;
     height: 100%;
     color: @white;
@@ -197,6 +204,26 @@
       border: none;
       border-bottom: 2px solid @vent-configurable-home-light-border;
     }
+
+    .switch-button {
+      width: 34px;
+      height: 34px;
+      position: absolute;
+      // right: 5px;
+      bottom: 5px;
+      z-index: 5;
+      background-repeat: no-repeat;
+      background-size: 100% 100%;
+    }
+    .report-mode {
+      background-image: var(--image-monitor-doc);
+    }
+    .realtime-mode {
+      background-image: var(--image-monitor-realtime);
+    }
+    .icon-goto {
+      background-image: var(--image-monitor-goto);
+    }
   }
   :deep(.loading-box) {
     position: unset;