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" >