瀏覽代碼

风门故障诊断分析

lxh 3 月之前
父節點
當前提交
446aa36485

+ 2 - 2
src/views/vent/deviceManager/comment/faultConfigTable/faultConfig.api.ts

@@ -21,13 +21,13 @@ export const list = (params) => defHttp.get({ headers: { 'Content-Type': 'applic
  */
 export const saveOrUpdate = (params, isUpdate) => {
   const url = isUpdate ? Api.update : Api.insert;
-  return defHttp.post({ url: url, params });
+  return defHttp.post({ url: url, params },);
 };
 /**
  * 删除用户
  */
 export const deleteById = (params) => {
-  return defHttp.delete({ url: Api.delete, params })
+  return defHttp.delete({ url: Api.delete, params },{ joinParamsToUrl: true })
 };
 
 /**

+ 16 - 8
src/views/vent/deviceManager/comment/faultConfigTable/faultConfig.data.ts

@@ -6,6 +6,13 @@ export const columns: BasicColumn[] = [
     align: 'center',
     customRender: ({ index }: { index: number }) => `${index + 1}`
   },
+  {
+    title: '面积百分比阈值(%)',
+    dataIndex: 'areaPercentThreshold',
+    key: 'areaPercentThreshold',
+    align: 'center',
+    ellipsis: true,
+  },
   {
     title: '门板最大基准面积(cm²)',
     dataIndex: 'maxAreaBase',
@@ -20,13 +27,7 @@ export const columns: BasicColumn[] = [
     align: 'center',
     ellipsis: true,
   },
-  {
-    title: '面积百分比阈值(%)',
-    dataIndex: 'areaPercentThreshold',
-    key: 'areaPercentThreshold',
-    align: 'center',
-    ellipsis: true,
-  },
+  
   {
     title: '检测间隔(秒)',
     dataIndex: 'detectInterval',
@@ -40,6 +41,13 @@ export const columns: BasicColumn[] = [
     key: 'durationThreshold',
     align: 'center',
     ellipsis: true,
+  },
+   {
+    title: '模型路径',
+    dataIndex: 'segModelPath',
+    key: 'segModelPath',
+    align: 'center',
+    ellipsis: true,
   },
   {
     title: '任务状态',
@@ -51,7 +59,7 @@ export const columns: BasicColumn[] = [
   {
     title: '操作',
     dataIndex: 'actionSp',
-    width: 200,
+    width: 150,
     align: 'center',
     slots: { customRender: 'action' },
   },

+ 12 - 5
src/views/vent/deviceManager/comment/faultConfigTable/index.vue

@@ -11,7 +11,8 @@
     <!-- 新增、编辑弹窗 -->
     <a-modal v-model:visible="visibleModal" width="650px" :title="titleModal" :footer="null" centered destroyOnClose
       @cancel="handleCancel">
-      <OperationTable ref="operationModal" :gateId="deviceId" :recordData="recordData" :cameraData="cameraData" @handleClose="handleClose">
+      <OperationTable ref="operationModal" :gateId="deviceId" :recordData="recordData" :cameraData="cameraData"
+        @handleClose="handleClose">
       </OperationTable>
     </a-modal>
 
@@ -23,6 +24,7 @@ import { reactive, ref, onMounted } from 'vue'
 import { columns } from './faultConfig.data'
 import { list, deleteById, cameraList } from './faultConfig.api'
 import OperationTable from './components/operationTable.vue'
+import { useMessage } from '/@/hooks/web/useMessage';
 
 let props = defineProps({
   deviceId: {
@@ -31,6 +33,7 @@ let props = defineProps({
   }
 })
 
+const { createMessage } = useMessage();
 let operationModal = ref()
 let dataSource = ref<any[]>([]);
 //分页参数配置
@@ -51,8 +54,8 @@ let cameraData = ref<any[]>([])
 async function getList() {
   let res = await list({ pageNo: pagination.current, pageSize: pagination.pageSize, gateId: props.deviceId })
   console.log(res, '风门故障配置列表---')
-  dataSource.value=res.records || []
-  pagination.total=res.total
+  dataSource.value = res.records || []
+  pagination.total = res.total
 }
 //分页切换
 function pageChange(val) {
@@ -67,6 +70,7 @@ function handleAdd() {
 }
 function handleCancel() {
   operationModal.value.resetFields()
+  recordData = {}
   visibleModal.value = false
 }
 //编辑
@@ -78,8 +82,11 @@ function handleEdit(record) {
 //删除
 async function handleDelete(record) {
   let res = await deleteById({ id: record.id })
-  console.log(res, '删除')
-  getList()
+  if (res.code == 200) {
+    createMessage.success('删除成功!')
+    pagination.current = 1
+    getList()
+  }
 }
 function handleClose() {
   visibleModal.value = false