cxs 2 giorni fa
parent
commit
d657d6a4d0

+ 7 - 7
src/views/alarm/allData/index.vue

@@ -475,10 +475,10 @@ const changeRemove= ()=>{
   //删除数据
   if (copiedCustomizeColumns.value.length > 0) {
     const custom=  copiedCustomizeColumns.value[selectedItemIndex.value];
-    const se_type = custom.se_type
-    for (let i = 0; i < sensorList.value.length; i++) {
-      if (sensorList.value[i].se_type === se_type) {
-        sensorList.value[i].isSelected = false;
+    const data_id = custom.data_id
+    for (let i = 0; i < elementList.value.length; i++) {
+      if (elementList.value[i].data_id === data_id) {
+        elementList.value[i].isSelected = false;
       }
     }
     copiedCustomizeColumns.value.splice(selectedItemIndex.value, 1)
@@ -493,8 +493,8 @@ const changeCleared=()=>{
   //清空所有数据
   selectedItemIndex.value = 0
   copiedCustomizeColumns.value = []
-  for (let i = 0; i < sensorList.value.length; i++) {
-    sensorList.value[i].isSelected = false;
+  for (let i = 0; i < elementList.value.length; i++) {
+    elementList.value[i].isSelected = false;
   }
 }
 
@@ -595,7 +595,7 @@ const submitForm = () => {
 
 // 大概计算字符串长度
 function calculateTextLengthInPixels(text) {
-  return (text.length * 14)+100;
+  return (text.length * 12)+100;
 }
 
 //时间戳转换为指定格式的日期字符串

+ 221 - 1
src/views/alarm/singleDevice/index.vue

@@ -153,6 +153,11 @@
                 </el-table-column>
                 <template v-for="item in columns" :key="item">
                   <el-table-column v-bind="item" :align="item.align ?? 'left'" :reserve-selection="item.type == 'selection'" :show-overflow-tooltip="true">
+                    <template #default="scope">
+                      <template v-if="item.prop === 'sta_value'">
+                        {{scope.row.sta_value}} {{scope.row.sta_unit}}
+                      </template>
+                    </template>
                   </el-table-column>
                 </template>
                 <!-- 无数据 -->
@@ -343,7 +348,221 @@ const getProcessValue=(param)=>{
 const sensorList =ref<any>([])
 // 被选中当条数据下标
 const selectedItemIndex = ref(0)
-let customizeColumns= ref<any>([])
+let customizeColumns= ref<any>([
+
+    {
+      "data_value": "",
+      "data_item": "",
+      "se_state": 0,
+      "data_h_table": "",
+      "data_r_table": "",
+      "se_name": "预处理器",
+      "se_type": 0,
+      "isSelected": true
+    },
+    {
+      "se_type": 1,
+      "se_name": "通信模块",
+      "data_r_table": "",
+      "data_h_table": "",
+      "se_state": 0,
+      "data_item": "",
+      "data_value": "",
+      "isSelected": true
+    },
+    {
+      "data_value": "",
+      "data_item": "",
+      "se_state": 1,
+      "data_h_table": "",
+      "data_r_table": "",
+      "se_name": "超声风传感器",
+      "se_type": 100,
+      "isSelected": true
+    },
+    {
+      "data_value": "",
+      "data_item": "",
+      "se_state": 1,
+      "data_h_table": "",
+      "data_r_table": "",
+      "se_name": "旋转式风向传感器",
+      "se_type": 200,
+      "isSelected": true
+    },
+    {
+      "se_type": 300,
+      "se_name": "旋转式风速传感器",
+      "data_r_table": "",
+      "data_h_table": "",
+      "se_state": 1,
+      "data_item": "",
+      "data_value": "",
+      "isSelected": true
+    },
+    {
+      "data_value": "",
+      "data_item": "",
+      "se_state": 1,
+      "data_h_table": "",
+      "data_r_table": "",
+      "se_name": "气温传感器",
+      "se_type": 400,
+      "isSelected": true
+    },
+    {
+      "data_value": "",
+      "data_item": "",
+      "se_state": 1,
+      "data_h_table": "",
+      "data_r_table": "",
+      "se_name": "湿度传感器",
+      "se_type": 500,
+      "isSelected": true
+    },
+    {
+      "data_value": "",
+      "data_item": "",
+      "se_state": 1,
+      "data_h_table": "",
+      "data_r_table": "",
+      "se_name": "气压传感器",
+      "se_type": 600,
+      "isSelected": true
+    },
+    {
+      "se_type": 700,
+      "se_name": "称重式降水传感器",
+      "data_r_table": "",
+      "data_h_table": "",
+      "se_state": 1,
+      "data_item": "",
+      "data_value": "",
+      "isSelected": true
+    },
+    {
+      "se_type": 800,
+      "se_name": "翻斗雨量传感器",
+      "data_r_table": "",
+      "data_h_table": "",
+      "se_state": 1,
+      "data_item": "",
+      "data_value": "",
+      "isSelected": true
+    },
+    {
+      "se_type": 900,
+      "se_name": "云高仪",
+      "data_r_table": "",
+      "data_h_table": "",
+      "se_state": 1,
+      "data_item": "",
+      "data_value": "",
+      "isSelected": true
+    },
+    {
+      "se_type": 1000,
+      "se_name": "能见度/天气现象传感器",
+      "data_r_table": "",
+      "data_h_table": "",
+      "se_state": 1,
+      "data_item": "",
+      "data_value": "",
+      "isSelected": true
+    },
+    {
+      "se_type": 1100,
+      "se_name": "DSS1型雪深观测仪",
+      "data_r_table": "",
+      "data_h_table": "",
+      "se_state": 1,
+      "data_item": "",
+      "data_value": "",
+      "isSelected": true
+    },
+    {
+      "se_type": 1200,
+      "se_name": "地面温度传感器",
+      "data_r_table": "",
+      "data_h_table": "",
+      "se_state": 1,
+      "data_item": "",
+      "data_value": "",
+      "isSelected": true
+    },
+    {
+      "se_type": 1300,
+      "se_name": "大气电场传感器",
+      "data_r_table": "",
+      "data_h_table": "",
+      "se_state": 1,
+      "data_item": "",
+      "data_value": "",
+      "isSelected": true
+    },
+    {
+      "se_type": 1400,
+      "se_name": "雷电预警仪",
+      "data_r_table": "",
+      "data_h_table": "",
+      "se_state": 1,
+      "data_item": "",
+      "data_value": "",
+      "isSelected": true
+    },
+    {
+      "se_type": 1500,
+      "se_name": "日照传感器",
+      "data_r_table": "",
+      "data_h_table": "",
+      "se_state": 1,
+      "data_item": "",
+      "data_value": "",
+      "isSelected": true
+    },
+    {
+      "se_type": 1600,
+      "se_name": "总辐射传感器",
+      "data_r_table": "",
+      "data_h_table": "",
+      "se_state": 1,
+      "data_item": "",
+      "data_value": "",
+      "isSelected": true
+    },
+    {
+      "se_type": 1700,
+      "se_name": "光照度传感器",
+      "data_r_table": "",
+      "data_h_table": "",
+      "se_state": 1,
+      "data_item": "",
+      "data_value": "",
+      "isSelected": true
+    },
+    {
+      "se_type": 1800,
+      "se_name": "压力式水位传感器",
+      "data_r_table": "",
+      "data_h_table": "",
+      "se_state": 1,
+      "data_item": "",
+      "data_value": "",
+      "isSelected": true
+    },
+    {
+      "se_type": 1900,
+      "se_name": "流向流速传感器",
+      "data_r_table": "",
+      "data_h_table": "",
+      "se_state": 1,
+      "data_item": "",
+      "data_value": "",
+      "isSelected": true
+    }
+
+
+])
 
 const changeMoveUp = () =>{
 //上移
@@ -497,6 +716,7 @@ const deviceType= [
 const submitForm = () => {
   dialog.visible = false;
   customizeColumns.value = [...copiedCustomizeColumns.value]
+  console.log(customizeColumns.value)
   updateColumns()
   saveCustomizeColumns()
 }

+ 215 - 1
src/views/query/deviceHealth/index.vue

@@ -223,6 +223,7 @@ const pageable = ref<any>({
   data_type: false,
   time_order: 0,
   as_code_list:[],
+  data_items:[],
   state_list: [
     "STATE_PART",
     "STATE_SENSOR",
@@ -353,7 +354,220 @@ const processTableData = ref([]);
 const sensorList =ref<any>([])
 // 被选中当条数据下标
 const selectedItemIndex = ref(0)
-let customizeColumns= ref<any>([])
+let customizeColumns= ref<any>([
+
+    {
+      "se_type": 0,
+      "se_name": "预处理器",
+      "data_item": "",
+      "se_state": 0,
+      "data_r_table": "",
+      "data_h_table": "",
+      "data_value": "",
+      "isSelected": true
+    },
+    {
+      "se_type": 1,
+      "data_item": "",
+      "se_name": "通信模块",
+      "data_r_table": "",
+      "se_state": 0,
+      "data_h_table": "",
+      "data_value": "",
+      "isSelected": true
+    },
+    {
+      "se_type": 100,
+      "se_name": "超声风传感器",
+      "data_item": "",
+      "se_state": 1,
+      "data_r_table": "",
+      "data_h_table": "",
+      "data_value": "",
+      "isSelected": true
+    },
+    {
+      "se_type": 200,
+      "data_item": "",
+      "se_name": "旋转式风向传感器",
+      "data_r_table": "",
+      "se_state": 1,
+      "data_h_table": "",
+      "data_value": "",
+      "isSelected": true
+    },
+    {
+      "se_type": 300,
+      "se_name": "旋转式风速传感器",
+      "data_item": "",
+      "se_state": 1,
+      "data_r_table": "",
+      "data_h_table": "",
+      "data_value": "",
+      "isSelected": true
+    },
+    {
+      "se_type": 400,
+      "data_item": "",
+      "se_name": "气温传感器",
+      "data_r_table": "",
+      "se_state": 1,
+      "data_h_table": "",
+      "data_value": "",
+      "isSelected": true
+    },
+    {
+      "se_type": 500,
+      "se_name": "湿度传感器",
+      "data_item": "",
+      "se_state": 1,
+      "data_r_table": "",
+      "data_h_table": "",
+      "data_value": "",
+      "isSelected": true
+    },
+    {
+      "se_type": 600,
+      "data_item": "",
+      "se_name": "气压传感器",
+      "data_r_table": "",
+      "se_state": 1,
+      "data_h_table": "",
+      "data_value": "",
+      "isSelected": true
+    },
+    {
+      "se_type": 700,
+      "data_item": "",
+      "se_name": "称重式降水传感器",
+      "data_r_table": "",
+      "se_state": 1,
+      "data_h_table": "",
+      "data_value": "",
+      "isSelected": true
+    },
+    {
+      "se_type": 800,
+      "data_item": "",
+      "se_name": "翻斗雨量传感器",
+      "data_r_table": "",
+      "se_state": 1,
+      "data_h_table": "",
+      "data_value": "",
+      "isSelected": true
+    },
+    {
+      "se_type": 1200,
+      "se_name": "地面温度传感器",
+      "data_item": "",
+      "se_state": 1,
+      "data_r_table": "",
+      "data_h_table": "",
+      "data_value": "",
+      "isSelected": true
+    },
+    {
+      "se_type": 1100,
+      "se_name": "DSS1型雪深观测仪",
+      "data_item": "",
+      "se_state": 1,
+      "data_r_table": "",
+      "data_h_table": "",
+      "data_value": "",
+      "isSelected": true
+    },
+    {
+      "se_type": 1000,
+      "se_name": "能见度/天气现象传感器",
+      "data_item": "",
+      "se_state": 1,
+      "data_r_table": "",
+      "data_h_table": "",
+      "data_value": "",
+      "isSelected": true
+    },
+    {
+      "se_type": 900,
+      "data_item": "",
+      "se_name": "云高仪",
+      "data_r_table": "",
+      "se_state": 1,
+      "data_h_table": "",
+      "data_value": "",
+      "isSelected": true
+    },
+    {
+      "se_type": 1300,
+      "se_name": "大气电场传感器",
+      "data_item": "",
+      "se_state": 1,
+      "data_r_table": "",
+      "data_h_table": "",
+      "data_value": "",
+      "isSelected": true
+    },
+    {
+      "se_type": 1400,
+      "se_name": "雷电预警仪",
+      "data_item": "",
+      "se_state": 1,
+      "data_r_table": "",
+      "data_h_table": "",
+      "data_value": "",
+      "isSelected": true
+    },
+    {
+      "se_type": 1500,
+      "se_name": "日照传感器",
+      "data_item": "",
+      "se_state": 1,
+      "data_r_table": "",
+      "data_h_table": "",
+      "data_value": "",
+      "isSelected": true
+    },
+    {
+      "se_type": 1600,
+      "se_name": "总辐射传感器",
+      "data_item": "",
+      "se_state": 1,
+      "data_r_table": "",
+      "data_h_table": "",
+      "data_value": "",
+      "isSelected": true
+    },
+    {
+      "se_type": 1700,
+      "se_name": "光照度传感器",
+      "data_item": "",
+      "se_state": 1,
+      "data_r_table": "",
+      "data_h_table": "",
+      "data_value": "",
+      "isSelected": true
+    },
+    {
+      "se_type": 1800,
+      "se_name": "压力式水位传感器",
+      "data_item": "",
+      "se_state": 1,
+      "data_r_table": "",
+      "data_h_table": "",
+      "data_value": "",
+      "isSelected": true
+    },
+    {
+      "se_type": 1900,
+      "data_item": "",
+      "se_name": "流向流速传感器",
+      "data_r_table": "",
+      "se_state": 1,
+      "data_h_table": "",
+      "data_value": "",
+      "isSelected": true
+    }
+
+])
 
 const changeMoveUp = () =>{
 //上移

+ 7 - 7
src/views/query/queryObservationData/index.vue

@@ -391,10 +391,10 @@ const changeRemove= ()=>{
   //删除数据
   if (copiedCustomizeColumns.value.length > 0) {
     const custom=  copiedCustomizeColumns.value[selectedItemIndex.value];
-    const se_type = custom.se_type
-    for (let i = 0; i < sensorList.value.length; i++) {
-      if (sensorList.value[i].se_type === se_type) {
-        sensorList.value[i].isSelected = false;
+    const data_id = custom.data_id
+    for (let i = 0; i < elementList.value.length; i++) {
+      if (elementList.value[i].data_id === data_id) {
+        elementList.value[i].isSelected = false;
       }
     }
     copiedCustomizeColumns.value.splice(selectedItemIndex.value, 1)
@@ -409,8 +409,8 @@ const changeCleared=()=>{
   //清空所有数据
   selectedItemIndex.value = 0
   copiedCustomizeColumns.value = []
-  for (let i = 0; i < sensorList.value.length; i++) {
-    sensorList.value[i].isSelected = false;
+  for (let i = 0; i < elementList.value.length; i++) {
+    elementList.value[i].isSelected = false;
   }
 }
 
@@ -828,7 +828,7 @@ const submitForm = () => {
 
 // 大概计算字符串长度
 function calculateTextLengthInPixels(text) {
-  return (text.length * 14)+100;
+  return (text.length * 12)+100;
 }
 
 //时间戳转换为指定格式的日期字符串

+ 11 - 2
src/views/system/stations/components/parametersBasic.vue

@@ -366,6 +366,11 @@
                 <template v-for="item in columns" :key="item">
                   <el-table-column v-bind="item" :align="item.align ?? 'left'" :reserve-selection="item.type == 'selection'"
                                    :show-overflow-tooltip="true">
+                    <template #default="scope">
+                      <template v-if="item.prop === 'commandInterval'">
+                        {{scope.row.commandInterval}} 分钟
+                      </template>
+                    </template>
                   </el-table-column>
                 </template>
 
@@ -513,8 +518,12 @@
             <div class="table-box" style="width:920px;">
               <el-table stripe ref="tableRef" :border="true" :data="primaryTableData2" size="small" height="140">
                 <template v-for="item in columns" :key="item">
-                  <el-table-column v-bind="item" :align="item.align ?? 'left'" :reserve-selection="item.type == 'selection'"
-                                   :show-overflow-tooltip="true">
+                  <el-table-column v-bind="item" :align="item.align ?? 'left'" :reserve-selection="item.type == 'selection'" :show-overflow-tooltip="true">
+                    <template #default="scope">
+                      <template v-if="item.prop === 'commandInterval'">
+                        {{scope.row.commandInterval}} 分钟
+                      </template>
+                    </template>
                   </el-table-column>
                 </template>