From f68da773ab04dd635de3715c09e33f097ca49a86 Mon Sep 17 00:00:00 2001 From: sjl <1716605279@qq.com> Date: Fri, 7 Mar 2025 13:17:11 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BE=AE=E8=B0=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/api/device/controlSource/index.ts | 24 +++++++++++ .../src/api/device/interface/controlSource.ts | 15 +++++++ .../machine/controlSource/components/tree.vue | 16 +++++++- .../src/views/machine/controlSource/index.vue | 40 ++++++++++++++----- .../components/testScriptDetail.vue | 4 +- 5 files changed, 86 insertions(+), 13 deletions(-) create mode 100644 frontend/src/api/device/controlSource/index.ts create mode 100644 frontend/src/api/device/interface/controlSource.ts diff --git a/frontend/src/api/device/controlSource/index.ts b/frontend/src/api/device/controlSource/index.ts new file mode 100644 index 0000000..6dd154c --- /dev/null +++ b/frontend/src/api/device/controlSource/index.ts @@ -0,0 +1,24 @@ + +import type { controlSource } from '@/api/device/interface/controlSource' +import http from '@/api' + +/** + * @name 程控源管理模块 + */ + +//通讯校验 +export const checkSimulate = (params: controlSource.ResControl) => { + return http.post(`/prepare/ytxCheckSimulate`,params) +} + +//启动 +export const startSimulateTest = (params: controlSource.ResControl) => { + return http.post(`prepare/startSimulateTest`,params) +} + +//停止 +export const closeSimulateTest = (params: controlSource.ResControl) => { + return http.post(`/prepare/closeSimulateTest`,params) +} + + diff --git a/frontend/src/api/device/interface/controlSource.ts b/frontend/src/api/device/interface/controlSource.ts new file mode 100644 index 0000000..91cb255 --- /dev/null +++ b/frontend/src/api/device/interface/controlSource.ts @@ -0,0 +1,15 @@ +import type { ReqPage,ResPage } from '@/api/interface' + +// 被检设备模块 +export namespace controlSource { + + /** + * 被检设备新增、修改、根据id查询返回的对象 + */ + export interface ResControl { + userPageId: string; + scriptId: string; + scriptIndex: string; + sourceId: string; + } + } \ No newline at end of file diff --git a/frontend/src/views/machine/controlSource/components/tree.vue b/frontend/src/views/machine/controlSource/components/tree.vue index cf1662e..add0298 100644 --- a/frontend/src/views/machine/controlSource/components/tree.vue +++ b/frontend/src/views/machine/controlSource/components/tree.vue @@ -6,8 +6,10 @@ :props="defaultProps" style="width: 100%" :expand-on-click-node="false" + :highlight-current="true" @node-click="handleNodeClick" - show-checkbox + show-checkbox + @check-change="handleCheckChange" >