From 6abac988c70e7e3fd7ea35efb88d5760029dc2b5 Mon Sep 17 00:00:00 2001 From: sjl <1716605279@qq.com> Date: Wed, 6 Nov 2024 20:31:07 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A2=AB=E6=A3=80=E8=AE=BE=E5=A4=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/api/device/device.ts | 38 +- frontend/src/api/device/interface/index.ts | 97 ++--- .../src/api/system/dictionary/dictPq/index.ts | 3 +- frontend/src/components/IpAddress/index.vue | 360 ++++++++++++++++++ .../machine/device/components/devicePopup.vue | 294 ++++++++++++++ frontend/src/views/machine/device/index.vue | 135 ++++--- .../dictionary/dictPq/components/pqPopup.vue | 4 +- .../views/system/dictionary/dictPq/index.vue | 2 +- 8 files changed, 812 insertions(+), 121 deletions(-) create mode 100644 frontend/src/components/IpAddress/index.vue create mode 100644 frontend/src/views/machine/device/components/devicePopup.vue diff --git a/frontend/src/api/device/device.ts b/frontend/src/api/device/device.ts index 4342109..c129d7d 100644 --- a/frontend/src/api/device/device.ts +++ b/frontend/src/api/device/device.ts @@ -1,18 +1,38 @@ -import { ResPage } from '@/api/interface' -import { Device } from './interface' +import type { Device } from './interface' import { ADMIN as rePrefix } from '@/api/config/serviceName' import http from '@/api' /** * @name 被检设备管理模块 */ -// 获取检测脚本列表 -export const getDeviceList = (params: Device.ReqDeviceParams) => { - return http.post>(`/RoleList_Post`, params) - // return http.post>(`${rePrefix}/device/list`, params) + +//获取被检设备 +export const getPqDevList = (params: Device.ReqPqDevParams) => { + return http.post(`/pqDev/list`, params) } -export const getPlan_DeviceList = (params: Device.DeviceList) => { - //return http.post>(`/RoleList_Post`, params) - // return http.post>(`${rePrefix}/device/list`, params) +//添加被检设备 +export const addPqDev = (params: Device.ResPqDev) => { + return http.post(`/pqDev/add`, params) } + +//编辑被检设备 +export const updatePqDev = (params: Device.ResPqDev) => { + return http.post(`/pqDev/update`, params) +} + +//删除被检设备 +export const deletePqDev = (params: string[]) => { + return http.post(`/pqDev/delete`, params) +} + +//导出被检设备 +export const exportPqDev=(params: Device.ReqPqDevParams)=>{ + return http.download(`/pqDev/export`, params) +} + +//导入被检设备 +export const importPqDev=(params: Device.ReqPqDevParams)=>{ + return http.post(`/pqDev/import`, params) +} + diff --git a/frontend/src/api/device/interface/index.ts b/frontend/src/api/device/interface/index.ts index cba0c56..1b969e7 100644 --- a/frontend/src/api/device/interface/index.ts +++ b/frontend/src/api/device/interface/index.ts @@ -1,55 +1,62 @@ -import type { ReqPage } from '@/api/interface' +import type { ReqPage,ResPage } from '@/api/interface' // 被检设备模块 export namespace Device { - // 被检设备参数 - export interface ReqDeviceParams extends ReqPage { - id: string; //被检设备ID - deviceName: string; //检测设备名称 - deviceType: string; //检测设备类型 - deviceChannels: string;//设备通道数 - PlanName: string; //所属计划名称 - deviceUn: string; //设备额定电压 - deviceIn: string; //设备额定电流 - deviceCompany: string;//设备厂家 - deviceModel: string; //设备模式 模拟 数字 比对 - } + /** + * 电能质量指标字典数据表格分页查询参数 + */ + export interface ReqPqDevParams extends ReqPage{ + id: string; // 装置序号id 必填 + devType?: string; // 设备名称 + createTime?:string; //创建时间 + } - // 被检设备列表 - export interface ResDeviceList { + /** + * 被检设备新增、修改、根据id查询返回的对象 + */ + export interface ResPqDev { id: string; //装置序号ID name: string; //设备名称 - pattern?: string; //设备模式 模拟 数字 比对 - dev_Type: string;//设备类型 - dev_Chns: number; //设备通道数 - dev_Volt?: number; //额定电压(V) - dev_Curr?: number; //额定电流(A) - manufacturer?: string;//生产厂家 - createDate?: string; //生产日期 - createId?: string; //出厂编号 - hardware_Version?: string; //固件版本 - software_Version?: string; //软件版本 - iP?: string; //IP地址 - port?: number; //端口号 - isEncryption?: string; //装置是否为加密版本 - series?: string; //装置识别码(3ds加密) - dev_Key?: string; //装置秘钥(3ds加密) - sampleID?: string; //样品编号 - arrived_Date?: string; //送样日期 - city_Name?: string; //所属地市名称 - gD_Name?: string; //所属供电公司名称 - sub_Name?: string; //所属电站名称 - check_State: string; //检测状态 - check_Result: string; //检测结果 - report_State: string; //报告状态 - document_State: string; //归档状态 - reCheck_Num: number; //复检次数 - state?: number; //状态 - create_By?: string; //创建用户 - create_Time?: string; //创建时间 - update_By?: string; //更新用户 - update_Time?: string; //更新时间 + pattern: string; //设备模式 模拟 数字 比对 + devType: string;//设备类型 + devChns: number; //设备通道数 + devVolt: number; //额定电压(V) + devCurr: number; //额定电流(A) + manufacturer: string;//生产厂家 + createDate: string; //生产日期 + createId: string; //出厂编号 + hardwareVersion: string; //固件版本 + softwareVersion: string; //软件版本 + ip: string; //IP地址 + port: number; //端口号 + encryption: string; //装置是否为加密版本 + series?: string| null; //装置识别码(3ds加密) + devKey?: string| null; //装置秘钥(3ds加密) + sampleID?: string| null; //样品编号 + arrivedDate?: string| null; //送样日期 + cityName?: string| null; //所属地市名称 + gDName?: string| null; //所属供电公司名称 + subName?: string| null; //所属电站名称 + checkState?: number| null; //检测状态 + checkResult?: number| null; //检测结果 + reportState?: number| null; //报告状态 + documentState?: number| null; //归档状态 + reportPath?: string| null; //报告路径 + qRCode?: string| null; //设备关键信息二维码 + reCheckNum: number; //复检次数 + state: number; //状态 + createBy?: string| null; //创建用户 + createTime?: string| null; //创建时间 + updateBy?: string| null; //更新用户 + updateTime?: string| null; //更新时间 } + + /** + * 被检设备表格查询分页返回的对象; + */ + export interface ResPqDevPage extends ResPage { + + } } \ No newline at end of file diff --git a/frontend/src/api/system/dictionary/dictPq/index.ts b/frontend/src/api/system/dictionary/dictPq/index.ts index c57e6db..dd7cc55 100644 --- a/frontend/src/api/system/dictionary/dictPq/index.ts +++ b/frontend/src/api/system/dictionary/dictPq/index.ts @@ -19,4 +19,5 @@ export const updateDictPq = (params: Dict.ResDictPq) => { //删除字典类型 export const deleteDictPq = (params: string[]) => { return http.post(`/dictPq/delete`, params) -} \ No newline at end of file +} + diff --git a/frontend/src/components/IpAddress/index.vue b/frontend/src/components/IpAddress/index.vue new file mode 100644 index 0000000..44d13bd --- /dev/null +++ b/frontend/src/components/IpAddress/index.vue @@ -0,0 +1,360 @@ + + + + + + \ No newline at end of file diff --git a/frontend/src/views/machine/device/components/devicePopup.vue b/frontend/src/views/machine/device/components/devicePopup.vue new file mode 100644 index 0000000..04cba2c --- /dev/null +++ b/frontend/src/views/machine/device/components/devicePopup.vue @@ -0,0 +1,294 @@ + + \ No newline at end of file diff --git a/frontend/src/views/machine/device/index.vue b/frontend/src/views/machine/device/index.vue index 2658f73..b76fa0a 100644 --- a/frontend/src/views/machine/device/index.vue +++ b/frontend/src/views/machine/device/index.vue @@ -1,123 +1,132 @@ \ No newline at end of file diff --git a/frontend/src/views/system/dictionary/dictPq/components/pqPopup.vue b/frontend/src/views/system/dictionary/dictPq/components/pqPopup.vue index 438ddd0..a06b78c 100644 --- a/frontend/src/views/system/dictionary/dictPq/components/pqPopup.vue +++ b/frontend/src/views/system/dictionary/dictPq/components/pqPopup.vue @@ -4,7 +4,7 @@ 基础数据 - + { titleType.value = sign dialogVisible.value = true - console.log(dictStore) + //console.log(dictStore) selectedStatMethods.value = data.statMethod ? data.statMethod.split(',') : [] if (data.id) { formContent.value = { ...data } diff --git a/frontend/src/views/system/dictionary/dictPq/index.vue b/frontend/src/views/system/dictionary/dictPq/index.vue index 980b0e5..6a2fa98 100644 --- a/frontend/src/views/system/dictionary/dictPq/index.vue +++ b/frontend/src/views/system/dictionary/dictPq/index.vue @@ -19,7 +19,7 @@ - +