Explorar o código

场景记录对接

yukai hai 1 ano
pai
achega
5a4354236c
Modificáronse 2 ficheiros con 8 adicións e 2 borrados
  1. 6 0
      src/api/scene/index.ts
  2. 2 2
      src/views/iot/scene/list/index.vue

+ 6 - 0
src/api/scene/index.ts

@@ -15,5 +15,11 @@ export default {
     editDetail: (data: any) => put('/scene/detail/edit', data),
     delDetail: (ids: number) => del('/scene/detail/delete', { ids }),
     getOneDetail: (data: any) => get('/scene/detail/list', data),
+  },
+  log:{
+    getList: (data: any) => get('/scene/scene_log/list', data),
+    getDetail: (data: any) => get('/scene/scene_log/get', data),
+    del: (ids: number) => del('/scene/scene_log/delete', { ids }),
+
   }
 }

+ 2 - 2
src/views/iot/scene/list/index.vue

@@ -60,7 +60,7 @@ import { useSearch } from '/@/hooks/useCommon';
 import { ElMessageBox, ElMessage, FormInstance } from 'element-plus';
 import { ref } from 'vue';
 const queryRef = ref();
-const { params, tableData, getList, loading } = useSearch<any[]>(api.manage.getList, 'data', { keyWord: '' });
+const { params, tableData, getList, loading } = useSearch<any[]>(api.log.getList, 'data', { keyWord: '' });
 getList();
 
 
@@ -74,7 +74,7 @@ const del = (row: any) => {
 		cancelButtonText: '取消',
 		type: 'warning',
 	}).then(async () => {
-		await api.manage.del(row.id);
+		await api.log.del(row.id);
 		ElMessage.success('删除成功');
 		getList(1);
 	});