From 65e54ee2b52fa97920917b6c740cd7327d2953d6 Mon Sep 17 00:00:00 2001 From: caozehui <2427765068@qq.com> Date: Mon, 30 Dec 2024 20:55:11 +0800 Subject: [PATCH 1/4] =?UTF-8?q?=E6=AD=A3=E5=BC=8F=E6=A3=80=E6=B5=8B-?= =?UTF-8?q?=E5=B7=A6=E4=BE=A7=E6=A3=80=E6=B5=8B=E5=A4=A7=E9=A1=B9=E5=8A=A8?= =?UTF-8?q?=E6=80=81=E8=8E=B7=E5=8F=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/api/check/test/index.ts | 25 +- .../dataCheckSingleChannelSingleTestPopup.vue | 5 +- frontend/src/views/home/components/test.vue | 230 ++++++++---------- 3 files changed, 126 insertions(+), 134 deletions(-) diff --git a/frontend/src/api/check/test/index.ts b/frontend/src/api/check/test/index.ts index c8b4c9f..6b32443 100644 --- a/frontend/src/api/check/test/index.ts +++ b/frontend/src/api/check/test/index.ts @@ -1,13 +1,30 @@ import http from "@/api"; +import {CheckData} from "@/api/check/interface"; -export const getFormData = (params: { deviceId: string, chnNum: number}) => { - return http.post("/check/detail/", params, {loading: false}); +export const getBigTestItem = (planId: string) => { + return http.get(`/adPlan/getBigTestItem?planId=${planId}`, {loading: false}); } +/** + * 获取弹出框表单数据 + * @param params 当为scriptType为null时,表示查询所有脚本类型,否则只查询指定脚本类型。当为chnNum为-1时,表示查询所有通道,否则只查询指定通道。 + */ +export const getFormData = (params: { planId: string, deviceId: string, chnNum: number, scriptType?: string }) => { + return http.post("/result/formContent/", params, {loading: false}); +} + +/** + * 获取树形结构数据 + * @param params + */ export const getTreeData = (params: { deviceId: string, chnNum: number, checkItemId: string }) => { - return http.post("/check/treeData/", params, {loading: false}); + return http.post("/result/treeData/", params, {loading: false}); } +/** + * 获取检查数据 + * @param params + */ export const getCheckData = (params: { deviceId: string, chnNum: number, checkItemId: string }) => { - return http.post("/check/data/", params, {loading: false}); + return http.post("/result/data/", params, {loading: false}); } \ No newline at end of file diff --git a/frontend/src/views/home/components/dataCheckSingleChannelSingleTestPopup.vue b/frontend/src/views/home/components/dataCheckSingleChannelSingleTestPopup.vue index c683141..0015291 100644 --- a/frontend/src/views/home/components/dataCheckSingleChannelSingleTestPopup.vue +++ b/frontend/src/views/home/components/dataCheckSingleChannelSingleTestPopup.vue @@ -70,6 +70,7 @@ import DataCheckRawDataTable from './dataCheckRawDataTable.vue' import {CheckData} from "@/api/check/interface"; import {getFormData, getTreeData, getCheckData} from "@/api/check/test"; import {useDictStore} from "@/stores/modules/dict"; +import {useCheckStore} from "@/stores/modules/check"; const {appendToBody} = withDefaults(defineProps<{ appendToBody: boolean @@ -81,6 +82,7 @@ const defaultProps = { }; const dictStore = useDictStore() +const checkStore = useCheckStore() const visible = ref(false) @@ -314,10 +316,9 @@ watch(switchItem, (newVal, oldVal) => { const open = async (_deviceId: string, chnNum: number, _scriptType?: string) => { console.log(_deviceId, chnNum, _scriptType); deviceId = _deviceId - scriptType = _scriptType ?? '' switchItem.value = 0 // 发起后端请求,查询详细信息 当chnNum为-1时,查询所有通道号 - //const result1 = await getFormData({deviceId, chnNum}) + //const resFormContent = await getFormData({checkStore.planId,deviceId, chnNum.toString(),scriptType}) // 数据处理 let resFormContent = { diff --git a/frontend/src/views/home/components/test.vue b/frontend/src/views/home/components/test.vue index 1fa518d..6ee392b 100644 --- a/frontend/src/views/home/components/test.vue +++ b/frontend/src/views/home/components/test.vue @@ -41,7 +41,7 @@ - +