Browse Source

158分站删除传感器接口对接

lxh 4 weeks ago
parent
commit
9b8ef6e87c

+ 4 - 4
.env.development

@@ -6,8 +6,8 @@ VITE_PUBLIC_PATH = /
 
 # 跨域代理,您可以配置多个 ,请注意,没有换行符
 #VITE_PROXY = [["/jeecgboot","http://localhost:8080/jeecg-boot"],["/upload","http://localhost:3300/upload"]]
-VITE_PROXY = [["/jeecgsystem","http://182.92.126.35:9999"],["/upload","http://182.92.126.35:9999/upload"],["/documents", "http://182.92.126.35:9050"],["/modelreq", "http://182.92.126.35:9999"],["/webRtc", "http://182.92.126.35:8051"]]
-# VITE_PROXY = [["/jeecgsystem","http://192.168.183.88:9999"],["/upload","http://192.168.183.88:9999/upload"],["/documents", "http://192.168.183.88:9050"],["/modelreq", "http://192.168.183.88:9999"],["/webRtc", "http://192.168.183.88:8051"]]
+# VITE_PROXY = [["/jeecgsystem","http://182.92.126.35:9999"],["/upload","http://182.92.126.35:9999/upload"],["/documents", "http://182.92.126.35:9050"],["/modelreq", "http://182.92.126.35:9999"],["/webRtc", "http://182.92.126.35:8051"]]
+VITE_PROXY = [["/jeecgsystem","http://192.168.183.88:9999"],["/upload","http://192.168.183.88:9999/upload"],["/documents", "http://192.168.183.88:9050"],["/modelreq", "http://192.168.183.88:9999"],["/webRtc", "http://192.168.183.88:8051"]]
 # VITE_PROXY = [["/jeecgsystem","http://10.10.150.72:9999"],["/upload","http://localhost:3300/upload"],["/documents", "http://10.10.150.72:9050"],["/modelreq", "http://10.10.150.72:9999"],["/webRtc", "http://192.168.183.216:8051"]]
 #VITE_PROXY = [["/jeecgsystem","http://192.168.1.8:9999"],["/upload","http://localhost:3300/upload"]]
 
@@ -29,7 +29,7 @@ VITE_GLOB_API_URL_PREFIX=
 
 #微前端qiankun应用,命名必须以VITE_APP_SUB_开头,jeecg-app-1为子应用的项目名称,也是子应用的路由父路径
 #VITE_APP_SUB_APP = [["micro-need-air", "//10.10.150.72:8099/"], ["micro-vent-3dModal", "//localhost:8091/"], ["micro-fire-front", "//localhost:8090/"]]
-# VITE_APP_SUB_APP = [["micro-vent-3dModal", "//192.168.183.88:8091/", "micro-vent-3dModal"], ["micro-need-air", "//192.168.183.88:8093/", "micro-need-air"], ["micro-fire-front", "//localhost:8097/", "fire-Micro"]]
+VITE_APP_SUB_APP = [["micro-vent-3dModal", "//192.168.183.88:8091/", "micro-vent-3dModal"], ["micro-need-air", "//192.168.183.88:8093/", "micro-need-air"], ["micro-fire-front", "//localhost:8097/", "fire-Micro"]]
 # VITE_APP_SUB_APP = [["micro-vent-3dModal", "//192.168.183.154:8091/", "micro-vent-3dModal"], ["micro-need-air", "//192.168.183.88:8093/", "micro-need-air"], ["micro-fire-front", "//localhost:8097/", "fire-Micro"]]
-VITE_APP_SUB_APP = [["micro-vent-3dModal", "//182.92.126.35:8091/", "micro-vent-3dModal"], ["micro-need-air", "//182.92.126.35:8099/", "micro-need-air"], ["micro-fire-front", "//182.92.126.35:8097/", "fire-Micro"]]
+# VITE_APP_SUB_APP = [["micro-vent-3dModal", "//182.92.126.35:8091/", "micro-vent-3dModal"], ["micro-need-air", "//182.92.126.35:8099/", "micro-need-air"], ["micro-fire-front", "//182.92.126.35:8097/", "fire-Micro"]]
 # VITE_APP_SUB_APP = [["micro-vent-3dModal", "//localhost:8091/"], ["micro-need-air", "//localhost:8099/"], ["micro-fire-front", "//localhost:8090/"]]

+ 35 - 17
src/views/vent/safetyList/common/detail.vue

@@ -48,7 +48,8 @@
                   <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-button type="primary" preIcon="ant-design:delete-outlined" size="mini"
+                      class="down-btn">删除</a-button>
                   </a-popconfirm>
                 </div>
               </div>
@@ -63,6 +64,11 @@
                   @click="handlerunDeviceMonitor(record, '启动')">启动</a-button>
                 <a-button type="success" size="small" style="margin: 0px 10px"
                   @click="handlerunDeviceMonitor(record, '编辑')">编辑</a-button>
+                <a-popconfirm title="删除内容无法恢复,是否删除" ok-text="确定" cancel-text="取消"
+                  @confirm="handlerunDeviceMonitor(record, '删除')" @cancel="handleCancelDelStation">
+                  <a-button v-if="!record.devInfoList" type="success" size="small"
+                    style="margin-right:10px">删除</a-button>
+                </a-popconfirm>
                 <a-button type="primary" v-if="!record.devInfoList" size="small" @click="debugClick(record)">{{
                   record.debugTitle }}</a-button>
               </template>
@@ -158,7 +164,8 @@
                   <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-button type="primary" preIcon="ant-design:delete-outlined" size="mini"
+                      class="down-btn">删除</a-button>
                   </a-popconfirm>
                 </div>
               </div>
@@ -360,7 +367,8 @@ import {
   get158StationDevices,
   set158StationRead,
   remove158Substation,
-  get158SetLog
+  get158SetLog,
+  remove158Device
 } from '../safetyList.api';
 import { historyColumns } from '../historyLsit.data';
 import { columnsDetail, columns } from '../safetyList.data';
@@ -728,7 +736,7 @@ async function getSubStationList() {
 //分站站点选项点击
 function cardClick(item, index) {
   selectedIndex.value = index; // 更新选中索引
-  activeIndex.value = item.isNewAccess ? index : null;
+  activeIndex.value = item.isNewAccess || !item.linkstatus ? index : null;
   stationName.value = item.strname;
   stationStatus.value = item.linkstatus;
   stationId.value = item.id;
@@ -807,7 +815,7 @@ function getAllShow() {
   getStationListAll();
 }
 //启动新设备
-function handlerunDeviceMonitor(record, val) {
+async function handlerunDeviceMonitor(record, val) {
   devId.value = record.id;
   switch (val) {
     case '编辑':
@@ -819,6 +827,10 @@ function handlerunDeviceMonitor(record, val) {
       visibleModal.value = true;
       startupData.address = record.strinstallpos;
       break;
+    case '删除':
+      await remove158Device({devId: devId.value})
+      getStationList1()
+      break;
   }
 }
 //分站,设备调试
@@ -1417,6 +1429,11 @@ onUnmounted(() => {
   color: #fff !important;
 }
 
+.card-item.selected {
+  border: 2px solid #3ad8ff77;
+  /* 选中时的边框颜色 */
+}
+
 ::v-deep(.zxm-radio-wrapper) {
   font-size: 12px;
 }
@@ -1442,16 +1459,17 @@ div[aria-hidden='true'] {
 }
 </style>
 //
+//
 <style lang="less" scoped>
-// .search-area {
-//   width: 100%;
-//   padding: 5px;
-//   margin: 10px;
-//   box-sizing: border-box;
-// }
-
-// .card-item.selected {
-//   border: 2px solid #3ad8ff77;
-//   /* 选中时的边框颜色 */
-// }
-// </style>
+// // .search-area {
+// //   width: 100%;
+// //   padding: 5px;
+// //   margin: 10px;
+// //   box-sizing: border-box;
+// // }
+
+// // .card-item.selected {
+// //   border: 2px solid #3ad8ff77;
+// //   /* 选中时的边框颜色 */
+// // }
+// // </style>

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

@@ -13,6 +13,7 @@ enum Api {
   set158StationRead = '/safety/ventanalyDeviceInfo/set158StationRead',
   remove158Substation='/safety/ventanalyDeviceInfo/remove158Substation',//删除158分站及其关联传感器
   get158SetLog='/safety/ventanalySubStation/get158SetLog',//操作记录
+  remove158Device='/safety/ventanalyDeviceInfo/remove158Device'//删除158分站传感器
 }
 
 // 分站查询接口
@@ -41,3 +42,5 @@ export const set158StationRead = (params) => defHttp.post({ url: Api.set158Stati
 export const remove158Substation = (params) => defHttp.post({ url: Api.remove158Substation, params }, { joinParamsToUrl: true });
 //158分站操作记录
 export const get158SetLog = (params) => defHttp.post({ url: Api.get158SetLog,params });
+//删除158分站传感器
+export const remove158Device = (params) => defHttp.post({ url: Api.remove158Device, params });

+ 1 - 1
src/views/vent/safetyList/safetyList.data.ts

@@ -65,7 +65,7 @@ export const columns: BasicColumn[] = [
   {
     title: '操作',
     dataIndex: 'action',
-    width: 250,
+    width: 280,
     align: 'center',
     slots: { customRender: 'action' },
   },