Browse Source

[Feat 0000] 更改首页表格的默认填充字段

houzekong 5 months ago
parent
commit
a5d0deb671

+ 3 - 3
src/views/vent/home/configurable/components/detail/CustomTable.vue

@@ -31,7 +31,7 @@
       type: 'B',
       columns: () => [],
       data: () => [],
-      defaultValue: '/',
+      defaultValue: '-',
     }
   );
 
@@ -40,8 +40,8 @@
   });
 
   function get(o, p) {
-    const d = _.get(o, p, props.defaultValue);
-    return d === null ? props.defaultValue : d;
+    const d = _.get(o, p);
+    return _.isNil(d) ? props.defaultValue : d === '' ? props.defaultValue : d;
   }
 </script>
 <style lang="less" scoped>

+ 25 - 45
src/views/vent/home/configurable/configurable.data.ts

@@ -1424,60 +1424,40 @@ const BDdustMock = {
     atomOpenNum: '1', //喷雾设备开启数
   },
   dustRelArray: [
-    //粉尘关联指标
     {
-      strinstallpos: '81202工作面', //安装位置
-      temp: '23.3', //温度
-      windSpeed: '10.5', //风速
-      atomState: '打开', //喷雾状态
+      temp: '15.80',
+      atomState: '',
+      strinstallpos: '81205胶运掘进面粉尘',
+      id: 1834606303323583700,
+      windSpeed: '0.09',
     },
     {
-      strinstallpos: '81202工作面', //安装位置
-      temp: '23.3', //温度
-      windSpeed: '10.5', //风速
-      atomState: '打开', //喷雾状态
+      temp: '18.60',
+      atomState: '',
+      strinstallpos: '81203采面粉尘',
+      id: 1834606303324389400,
+      windSpeed: '2.13',
     },
     {
-      strinstallpos: '81202工作面', //安装位置
-      temp: '23.3', //温度
-      windSpeed: '10.5', //风速
-      atomState: '打开', //喷雾状态
+      temp: '15.20',
+      atomState: '',
+      strinstallpos: '81206胶运掘进面粉尘',
+      id: 1834606303328583700,
+      windSpeed: '',
     },
     {
-      strinstallpos: '81202工作面', //安装位置
-      temp: '23.3', //温度
-      windSpeed: '10.5', //风速
-      atomState: '打开', //喷雾状态
+      temp: '19.60',
+      atomState: '',
+      strinstallpos: '81207辅运掘进面粉尘',
+      id: 1834606303328583700,
+      windSpeed: '',
     },
     {
-      strinstallpos: '81202工作面', //安装位置
-      temp: '23.3', //温度
-      windSpeed: '10.5', //风速
-      atomState: '打开', //喷雾状态
-    },
-    {
-      strinstallpos: '81202工作面', //安装位置
-      temp: '23.3', //温度
-      windSpeed: '10.5', //风速
-      atomState: '打开', //喷雾状态
-    },
-    {
-      strinstallpos: '81202工作面', //安装位置
-      temp: '23.3', //温度
-      windSpeed: '10.5', //风速
-      atomState: '打开', //喷雾状态
-    },
-    {
-      strinstallpos: '81202工作面', //安装位置
-      temp: '23.3', //温度
-      windSpeed: '10.5', //风速
-      atomState: '打开', //喷雾状态
-    },
-    {
-      strinstallpos: '81202工作面', //安装位置
-      temp: '23.3', //温度
-      windSpeed: '10.5', //风速
-      atomState: '打开', //喷雾状态
+      temp: '13.90',
+      atomState: '',
+      strinstallpos: '81206辅运掘进面粉尘',
+      id: 1834606303328583700,
+      windSpeed: '3.53',
     },
   ],
 };