lxh преди 2 месеца
родител
ревизия
5effa8eb1c

+ 1 - 1
src/views/vent/monitorManager/deviceMonitor/components/device/index.vue

@@ -19,7 +19,7 @@
      <div v-if="deviceType.startsWith('gasDayReport') && activeKey == '1'" class="inspect-info-xj">
       <div class="info-xj-title">
         <span>当前巡检进度</span>
-        <span>{{inspectJd}}</span>
+        <span style="margin-left:10px">{{inspectJd || ''}}</span>
       </div>
       <div class="info-xj-content">
         <div class="xj-content-item" v-for="(item,index) in inspectList" :key="index">

+ 41 - 15
src/views/vent/safetyList/common/detail.vue

@@ -48,6 +48,10 @@
                   <a-input v-model:value="stationName" size="small" placeholder="请输入" @blur="changeName" />
                   <div class="modal-lj">连接状态:</div>
                   <a-radio-group v-model:value="stationStatus" size="small" :options="ljList" @change="changeStatus" />
+                  <a-popconfirm title="删除内容无法恢复,是否删除" ok-text="确定" cancel-text="取消" @confirm="handleDelStation"
+                @cancel="handleCancelDelStation">
+                <a-button type="primary" preIcon="ant-design:delete-outlined" size="mini">删除</a-button>
+            </a-popconfirm>
                 </div>
               </div>
             </div>
@@ -179,6 +183,10 @@
                   <a-input v-model:value="stationName" size="small" placeholder="请输入" @blur="changeName" />
                   <div class="modal-lj">连接状态:</div>
                   <a-radio-group v-model:value="stationStatus" size="small" :options="ljList" @change="changeStatus" />
+                  <a-popconfirm title="删除内容无法恢复,是否删除" ok-text="确定" cancel-text="取消" @confirm="handleDelStation"
+                @cancel="handleCancelDelStation">
+                <a-button type="primary" preIcon="ant-design:delete-outlined" size="mini">删除</a-button>
+            </a-popconfirm>
                 </div>
               </div>
             </div>
@@ -356,6 +364,7 @@ import {
   set158StationData,
   get158StationDevices,
   set158StationRead,
+  remove158Substation
 } from '../safetyList.api';
 import { historyColumns } from '../historyLsit.data';
 import { columnsDetail, columns } from '../safetyList.data';
@@ -705,7 +714,7 @@ async function handleClick(data) {
 //获取分站实时监测信息
 async function getSubStationList() {
   let res = await subStationList({ strtype: 'modbus' });
-  if (res.length != 0) {
+  if (res.length == 0) {
     cardList.value = res;
     openNum.value = cardList.value?.filter((v) => v.linkstatus == 1)['length'];
     clsoeNum.value = cardList.value?.filter((v) => v.linkstatus == 0)['length'];
@@ -970,6 +979,17 @@ function pageChange(val) {
   getStationList1();
 }
 
+//删除左侧分站
+async function handleDelStation(){
+  let res=await remove158Substation({stationId:stationId.value})
+  console.log(res,'删除左侧分站')
+  if(res){
+    getSubStationList();
+    getStationList1();
+  }
+}
+//取消删除左侧分站
+function handleCancelDelStation(){}
 onMounted(() => {
   getSubStationList();
   getStationList1();
@@ -1096,7 +1116,7 @@ onUnmounted(() => {
               position: relative;
               // width: 242px;
               width: 182px;
-              height: 110px;
+              height: 120px;
               margin-bottom: 15px;
               display: flex;
               justify-content: center;
@@ -1104,7 +1124,7 @@ onUnmounted(() => {
               .card-itemN {
                 position: relative;
                 width: 85px;
-                height: 110px;
+                height: 120px;
                 background: url('/@/assets/images/zd-2.png') no-repeat center;
                 background-size: 100% 100%;
                 cursor: pointer;
@@ -1122,7 +1142,7 @@ onUnmounted(() => {
               .card-itemL {
                 position: relative;
                 width: 85px;
-                height: 110px;
+                height: 120px;
                 background: url('/@/assets/images/zd-3.png') no-repeat center;
                 background-size: 100% 100%;
                 cursor: pointer;
@@ -1140,7 +1160,7 @@ onUnmounted(() => {
               .card-itemD {
                 position: relative;
                 width: 85px;
-                height: 110px;
+                height: 120px;
                 background: url('/@/assets/images/zd-1.png') no-repeat center;
                 background-size: 100% 100%;
                 cursor: pointer;
@@ -1256,7 +1276,7 @@ onUnmounted(() => {
               position: relative;
               // width: 242px;
               width: 182px;
-              height: 110px;
+              height: 120px;
               margin-bottom: 15px;
               display: flex;
               justify-content: center;
@@ -1264,7 +1284,7 @@ onUnmounted(() => {
               .card-itemN {
                 position: relative;
                 width: 85px;
-                height: 110px;
+                height: 120px;
                 background: url('/@/assets/images/zd-2.png') no-repeat center;
                 background-size: 100% 100%;
                 cursor: pointer;
@@ -1282,7 +1302,7 @@ onUnmounted(() => {
               .card-itemL {
                 position: relative;
                 width: 85px;
-                height: 110px;
+                height: 120px;
                 background: url('/@/assets/images/zd-3.png') no-repeat center;
                 background-size: 100% 100%;
                 cursor: pointer;
@@ -1300,7 +1320,7 @@ onUnmounted(() => {
               .card-itemD {
                 position: relative;
                 width: 85px;
-                height: 110px;
+                height: 120px;
                 background: url('/@/assets/images/zd-1.png') no-repeat center;
                 background-size: 100% 100%;
                 cursor: pointer;
@@ -1368,7 +1388,12 @@ onUnmounted(() => {
   padding-top: 20px !important;
   box-sizing: border-box;
 }
-
+.zxm-picker,
+.zxm-input {
+  border: 1px solid #3ad8ff77 !important;
+  background-color: #ffffff !important;
+  color: #fff !important;
+}
 ::v-deep(.zxm-radio-wrapper) {
   font-size: 12px;
 }
@@ -1387,11 +1412,12 @@ onUnmounted(() => {
 ::v-deep(.zxm-form-item-label > label) {
   color: #fff !important;
 }
-.zxm-picker,
-.zxm-input {
-  border: 1px solid #3ad8ff77 !important;
-  background-color: #ffffff !important;
-  color: #fff !important;
+
+::v-deep .zxm-btn{
+line-height:15px;
+height:20px;
+padding:0px 17px;
+font-size:12px;
 }
 </style>
 <style>

+ 3 - 0
src/views/vent/safetyList/safetyList.api.ts

@@ -11,6 +11,7 @@ enum Api {
   set158StationData = '/safety/ventanalyDeviceInfo/set158StationData',
   get158StationDevices = '/safety/ventanalyDeviceInfo/get158StationDevices',
   set158StationRead = '/safety/ventanalyDeviceInfo/set158StationRead',
+  remove158Substation='/safety/ventanalyDeviceInfo/remove158Substation'//删除158分站及其关联传感器
 }
 
 // 分站查询接口
@@ -35,3 +36,5 @@ export const set158StationData = (params) => defHttp.post({ url: Api.set158Stati
 export const get158StationDevices = (params) => defHttp.post({ url: Api.get158StationDevices, params }, { joinParamsToUrl: true });
 //读取分站设备数据
 export const set158StationRead = (params) => defHttp.post({ url: Api.set158StationRead, params }, { joinParamsToUrl: true });
+//删除158分站及其关联传感器
+export const remove158Substation = (params) => defHttp.post({ url: Api.remove158Substation, params }, { joinParamsToUrl: true });