From 6c6d2fe56659d108c1043d27c20d22bdd09862ea Mon Sep 17 00:00:00 2001 From: GYYM <704080176@qq.com> Date: Thu, 31 Oct 2024 08:51:30 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=8E=E5=90=8E=E7=AB=AF=E6=8E=A5=E5=8F=A3?= =?UTF-8?q?=E8=BF=9B=E8=A1=8C=E9=A6=96=E6=AC=A1=E8=81=94=E8=B0=83?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/api/system/dictData.ts | 83 +++++++++++++++++++ .../src/api/testScript/interface/index.ts | 29 +++---- frontend/src/api/testScript/testScript.ts | 2 +- .../src/api/testSource/interface/index.ts | 23 +++-- frontend/src/api/testSource/testSource.ts | 2 +- .../authority/role/components/rolePopup.vue | 14 ++-- frontend/src/views/authority/role/index.vue | 26 +++--- .../src/views/machine/testScript/index.vue | 34 ++++++-- .../src/views/machine/testSource/index.vue | 28 ++++--- 9 files changed, 170 insertions(+), 71 deletions(-) diff --git a/frontend/src/api/system/dictData.ts b/frontend/src/api/system/dictData.ts index e43d1ce..eff11f1 100644 --- a/frontend/src/api/system/dictData.ts +++ b/frontend/src/api/system/dictData.ts @@ -87,6 +87,89 @@ const dictData: Dict[] = [ }, ], }, + { + id: "5", + code: 'testScriptValueType', + label: '检测脚本值类型', + children: [ + { + id: "0", + label: '相对值', + code: 0, + }, + { + id: "1", + label: '绝对值', + code: 1, + }, + ], + }, + { + id: "6", + code: 'testScriptType', + label: '检测脚本模板类型', + children: [ + { + id: "0", + label: '脚本', + code: 0, + }, + { + id: "1", + label: '模板', + code: 1, + }, + ], + }, + { + id: "7", + code: 'testSourceDevType', + label: '检测源设备类型', + children: [ + { + id: "0", + label: 'FLUKE6100A电能功率标准源', + code: 0, + }, + { + id: "1", + label: 'ANGLI-FP2高性能数字信号源', + code: 1, + }, + { + id: "2", + label: 'DKLN-1电能质量测试分析仪智能检定装置', + code: 2, + }, + { + id: "3", + label: 'PQC600A高精度电能功率标准源', + code: 3, + }, + { + id: "4", + label: 'PQV-520电能质量检测装置', + code: 4, + }, + ], + }, + { + id: "8", + code: 'testSourceType', + label: '检测源类型', + children: [ + { + id: "0", + label: '标准源', + code: 0, + }, + { + id: "1", + label: '高精度设备', + code: 1, + }, + ], + }, ] export default dictData \ No newline at end of file diff --git a/frontend/src/api/testScript/interface/index.ts b/frontend/src/api/testScript/interface/index.ts index 4bf95d6..e7920f6 100644 --- a/frontend/src/api/testScript/interface/index.ts +++ b/frontend/src/api/testScript/interface/index.ts @@ -3,22 +3,19 @@ import type { ReqPage } from '@/api/interface' // 检测脚本模块 export namespace TestScript { - // 检测脚本列表 - export interface ResTestScriptList { - id: string; //检测脚本ID - testScriptModel: string; //检测脚本模式 模拟 数字 比对 - testScriptType: string; //检测脚本类型 脚本 模板 - testScriptValueType: string;//检测脚本值类型名称 相对值 绝对值 - testScriptName: string; //检测脚本名称 + // 检测脚本接口 + export interface TestScriptBO { + id?: string; //检测脚本ID + name: string; //检测脚本名称 + type: string; //检测脚本类型(字典表Code字段,脚本还是模板) + pattern: string;//检测脚本模式(字典表Code字段,数字、模拟、比对) + valueType: string;//脚本值类型(字典表Code字段,相对值脚本、绝对值脚本、无) + standardName: string;//参照标准名称 + standardTime: string;//标准推行时间 } - - // 检测脚本参数 - // 检测脚本参数 - export interface ReqTestScriptParams extends ReqPage { - id: string; //检测脚本ID - testScriptModel: string; //检测脚本模式 模拟 数字 比对 - testScriptType: string; //检测脚本类型 脚本 模板 - testScriptValueType: string;//检测脚本值类型名称 相对值 绝对值 - testScriptName: string; //检测脚本名称 + + // 检测脚本+分页 + export interface ReqTestScriptParams extends ReqPage,TestScriptBO { + } } \ No newline at end of file diff --git a/frontend/src/api/testScript/testScript.ts b/frontend/src/api/testScript/testScript.ts index cc559ed..94df7a6 100644 --- a/frontend/src/api/testScript/testScript.ts +++ b/frontend/src/api/testScript/testScript.ts @@ -8,6 +8,6 @@ import http from '@/api' */ // 获取检测脚本列表 export const getTestScriptList = (params: TestScript.ReqTestScriptParams) => { - return http.post>(`/RoleList_Post`, params) + return http.post>(`/testScript/list`, params) // return http.post>(`${rePrefix}/testScript/list`, params) } diff --git a/frontend/src/api/testSource/interface/index.ts b/frontend/src/api/testSource/interface/index.ts index e18bdaf..61ca413 100644 --- a/frontend/src/api/testSource/interface/index.ts +++ b/frontend/src/api/testSource/interface/index.ts @@ -3,19 +3,18 @@ import type { ReqPage } from '@/api/interface' // 检测源模块 export namespace TestSource { - // 检测源列表 - export interface ResTestSourceList { - id: string; //检测源ID - testSourceName: string; //检测源名称 - testSourceType: string; //检测源类型 - testSourceModel: string; //检测源模式 标准源 高精度源 + // 检测源接口 + export interface TestSourceBO { + id?: string; //检测源ID + name: string; //检测源名称 + pattern: string;//检测源模式(字典表Code字段,数字、模拟、比对) + type: string; //检测源类型(字典表Code字段,标准源、高精度设备) + devType: string;//检测源设备类型(字典表Code字段) + parameters: string;//源参数(JSON字符串) } - // 检测源参数 - export interface ReqTestSourceParams extends ReqPage { - id: string; //检测源ID - testSourceName: string; //检测源名称 - testSourceType: string; //检测源类型 - testSourceModel: string; //检测源模式 标准源 高精度源 + // 检测源+分页 + export interface ReqTestSourceParams extends ReqPage,TestSourceBO { + } } \ No newline at end of file diff --git a/frontend/src/api/testSource/testSource.ts b/frontend/src/api/testSource/testSource.ts index 2175e27..23506db 100644 --- a/frontend/src/api/testSource/testSource.ts +++ b/frontend/src/api/testSource/testSource.ts @@ -8,6 +8,6 @@ import http from '@/api' */ // 获取检测脚本列表 export const getTestSourceList = (params: TestSource.ReqTestSourceParams) => { - return http.post>(`/RoleList_Post`, params) + return http.post>(`/testSource/list`, params) // return http.post>(`${rePrefix}/testSource/list`, params) } diff --git a/frontend/src/views/authority/role/components/rolePopup.vue b/frontend/src/views/authority/role/components/rolePopup.vue index a998c40..f1221e8 100644 --- a/frontend/src/views/authority/role/components/rolePopup.vue +++ b/frontend/src/views/authority/role/components/rolePopup.vue @@ -41,6 +41,7 @@