diff --git a/frontend/package.json b/frontend/package.json index ce0669c..ccad702 100644 --- a/frontend/package.json +++ b/frontend/package.json @@ -14,6 +14,7 @@ }, "dependencies": { "@element-plus/icons-vue": "^2.3.1", + "@vue-flow/core": "^1.45.0", "@vueuse/core": "^10.4.1", "axios": "^1.7.3", "crypto-js": "^4.2.0", @@ -72,7 +73,7 @@ "unplugin-auto-import": "^0.18.3", "unplugin-vue-components": "^0.27.4", "unplugin-vue-setup-extend-plus": "^1.0.0", - "vite": "^5.3.1", + "vite": "^5.4.19", "vite-plugin-compression": "^0.5.1", "vite-plugin-eslint": "^1.8.1", "vite-plugin-html": "^3.2.0", diff --git a/frontend/src/api/device/device/index.ts b/frontend/src/api/device/device/index.ts index f41766b..6a60b52 100644 --- a/frontend/src/api/device/device/index.ts +++ b/frontend/src/api/device/device/index.ts @@ -1,3 +1,4 @@ +import { pa } from 'element-plus/es/locale/index.mjs'; import type {Device} from '@/api/device/interface/device' import http from '@/api' @@ -30,8 +31,8 @@ export const exportPqDev = (params: Device.ReqPqDevParams) => { return http.download(`/pqDev/export`, params) } // 下载导入文件模板 -export const downloadTemplate = () => { - return http.download(`/pqDev/downloadTemplate`) +export const downloadTemplate = (params: { pattern: string }) => { + return http.download(`/pqDev/downloadTemplate`,params) } //导入被检设备 @@ -59,6 +60,9 @@ export const importContrastPqDev = (params: Device.ReqPqDevParams) => { // return http.uploadExcel(`/pqDev/importCNDev`, params) // } +export const getPqDevById = (params: Device.ReqPqDevParams) => { + return http.get(`/pqDev/getById?id=${params.id}`) +} //根据设备类型决定(电源、icd、模板、通道数、额定电压、额定电流); export const getPqDev = () => { diff --git a/frontend/src/api/device/interface/device.ts b/frontend/src/api/device/interface/device.ts index b29f855..99ce2fa 100644 --- a/frontend/src/api/device/interface/device.ts +++ b/frontend/src/api/device/interface/device.ts @@ -1,4 +1,6 @@ +import { getPqDevById } from './../device/index'; import type {ReqPage, ResPage} from '@/api/interface' +import type { Monitor } from './monitor'; // 被检设备模块 export namespace Device { @@ -33,9 +35,6 @@ export namespace Device { name: string; //设备名称 pattern: string; //设备模式 模拟 数字 比对 devType: string;//设备类型 - devChns: number; //设备通道数 - devVolt: number; //额定电压(V) - devCurr: number; //额定电流(A) manufacturer?: string | null;//生产厂家 createDate: string; //生产日期 createId: string; //出厂编号 @@ -50,27 +49,46 @@ export namespace Device { sampleId?: string | null; //样品编号 arrivedDate?: string; //送样日期 cityName?: string | null; //所属地市名称 - gDName?: string | null; //所属供电公司名称 + gdName?: string | null; //所属供电公司名称 subName?: string | null; //所属电站名称 - checkState?: number | null; //检测状态 - checkResult?: number | null; //检测结果 - reportState?: number | null; //报告状态 reportPath?: string | null; //报告路径 - qRCode?: string | null; //设备关键信息二维码 - reCheckNum: number; //复检次数 planId?: string;//检测计划Id - timeCheckResult?: number;//守时检测结果(0:不符合1:符合) factorFlag?: number;//是否支持系数校准(0:不支持,1:支持) - factorCheckResult?: number;//系数校准结果(0:不合格,1:合格,2:/表示没有做系数校准) + preinvestmentPlan: string | null;//预投计划 + delegate: string | null; //委托方 + inspectChannel?: string[] | string;//被检通道 + inspectDate?: string | null;//定检日期 + harmSysId?: string | null;//谐波系统设备id + importFlag?: number;//是否为导入设备 0否 1是 state: number; //状态 createBy?: string | null; //创建用户 createTime?: string | null; //创建时间 updateBy?: string | null; //更新用户 updateTime?: string | null; //更新时间 + + devChns: number; //设备通道数 + devVolt: number; //额定电压(V) + devCurr: number; //额定电流(A) icdId: string | null; power: string | null;//工作电源 - preinvestmentPlan: string | null; - delegate: string | null; //委托方 + + devId?: number; + checkState?: number | null; //检测状态(0:未检,1:检测中,2:检测完成 3:归档) + checkResult?: number | null; //检测结果(0:不符合,1:符合,2:未检) + reportState?: number | null; //报告状态(0:未生成,1:已生成,2:未检) + recheckNum: number; //复检次数 + timeCheckResult?: number;//守时检测结果(0:不符合1:符合) + factorCheckResult?: number;//系数校准结果(0:不合格,1:合格,2:未检) + realtimeResult?: number;//实时数据结论(0:不符合,1:符合,2:未检) + statisticsResult?: number;//统计数据结论(0:不符合,1:符合,2:未检) + recordedResult?: number;//录波数据结论(0:不符合,1:符合,2:未检) + checkBy?: string | null;//检测人 + checkTime?: string | null;//检测时间 + preDetectTime?: number;//预检测耗时 + coefficientTime?: number;//系数校准耗时 + formalCheckTime?: number;//正式检测耗时 + + monitorList: Monitor.ResPqMon[] ; } diff --git a/frontend/src/api/device/interface/monitor.ts b/frontend/src/api/device/interface/monitor.ts index a4b02d6..525240a 100644 --- a/frontend/src/api/device/interface/monitor.ts +++ b/frontend/src/api/device/interface/monitor.ts @@ -1,33 +1,35 @@ import type { ReqPage, ResPage } from '@/api/interface' -// 被检设备模块 +// 监测点模块 export namespace Monitor { /** - * 电能质量指标字典数据表格分页查询参数 + * 监测点表格分页查询参数 */ export interface ReqPqMonParams extends ReqPage { id: string; // 装置序号id 必填 - devType?: string; // 设备名称 - createTime?: string; //创建时间 + name?: string; // 设备名称 + } /** - * 被检设备新增、修改、根据id查询返回的对象 + * 监测点新增、修改、根据id查询返回的对象 */ export interface ResPqMon { id: string; //监测点ID - code: string; //默认与谐波系统监测点ID相同 devId: string; //所属设备ID - name: string; //所属母线 - num: number; //监测点序号 - pt: number; //PT变比 - ct: number; //CT变比 - ptType: string; //接线方式,字典表 + busbar: string;//所属母线 + name: string; //监测点名称 + num: number; //线路号,监测点序号 + pt: string; //PT变比 + ct: string; //CT变比 + connection: string; //接线方式,字典表 + statInterval: number; //统计间隔 + harmSysId: string; //默认与谐波系统监测点ID相同 } /** - * 被检设备表格查询分页返回的对象; + * 监测点表格查询分页返回的对象; */ export interface ResPqMonPage extends ResPage { diff --git a/frontend/src/api/device/interface/standardDevice.ts b/frontend/src/api/device/interface/standardDevice.ts new file mode 100644 index 0000000..4a345d9 --- /dev/null +++ b/frontend/src/api/device/interface/standardDevice.ts @@ -0,0 +1,46 @@ +import type {ReqPage, ResPage} from '@/api/interface' + +// 标准设备模块 +export namespace StandardDevice { + + /** + * 标准设备表格分页查询参数 + */ + export interface ReqPqStandardDeviceParams extends ReqPage { + id: string; // 装置序号id 必填 + name: string; //设备名称 + devType?: string; // 设备名称 + createTime?: string; //创建时间 + } + + + /** + * 标准设备新增、修改、根据id查询返回的对象 + */ + export interface ResPqStandardDevice { + id: string; //装置序号ID + name: string; //设备名称 + devType: string;//设备类型 + manufacturer?: string | null;//生产厂家 + protocol: string;//通讯协议 + ip: string; //IP地址 + port: number; //端口号 + inspectChannel:string[] |string;//可检通道数 + encryptionFlag: number; //装置是否为加密版本 + series?: string | null; //装置识别码(3ds加密) + devKey?: string | null; //装置秘钥(3ds加密) + state: number; //状态 + createBy?: string | null; //创建用户 + createTime?: string | null; //创建时间 + updateBy?: string | null; //更新用户 + updateTime?: string | null; //更新时间 + } + + + /** + * 标准设备表格查询分页返回的对象; + */ + export interface ResPqStandardDevicePage extends ResPage { + + } +} \ No newline at end of file diff --git a/frontend/src/api/device/standardDevice/index.ts b/frontend/src/api/device/standardDevice/index.ts new file mode 100644 index 0000000..230705a --- /dev/null +++ b/frontend/src/api/device/standardDevice/index.ts @@ -0,0 +1,46 @@ +import type {StandardDevice} from '@/api/device/interface/standardDevice' +import http from '@/api' + +/** + * @name 标准设备管理模块 + */ + +//获取标准设备 +export const getPqStandardDevList = (params: StandardDevice.ReqPqStandardDeviceParams) => { + return http.post(`/pqStandardDev/list`, params) +} + +//根据id查询标准设备 +export const getPqStandardDevById = (params: StandardDevice.ReqPqStandardDeviceParams) => { + return http.get(`/pqStandardDev/getById?id=${params.id}`) +} + +//添加标准设备 +export const addPqStandardDev = (params: StandardDevice.ResPqStandardDevice) => { + return http.post(`/pqStandardDev/add`, params) +} + +//编辑标准设备 +export const updatePqStandardDev = (params: StandardDevice.ResPqStandardDevice) => { + return http.post(`/pqStandardDev/update`, params) +} + +//删除标准设备 +export const deletePqStandardDev = (params: string[]) => { + return http.post(`/pqStandardDev/delete`, params) +} + + +//导出标准设备 +export const exportPqStandardDev = (params: StandardDevice.ReqPqStandardDeviceParams) => { + return http.download(`/pqStandardDev/export`, params) +} +// 下载导入文件模板 +export const downloadTemplate = () => { + return http.download(`/pqStandardDev/downloadTemplate`) +} + +//导入标准设备 +export const importPqStandardDev = (params: StandardDevice.ReqPqStandardDeviceParams) => { + return http.uploadExcel(`/pqStandardDev/import`, params) +} diff --git a/frontend/src/api/plan/interface/index.ts b/frontend/src/api/plan/interface/index.ts index a5b5f9d..d03c4ef 100644 --- a/frontend/src/api/plan/interface/index.ts +++ b/frontend/src/api/plan/interface/index.ts @@ -26,7 +26,10 @@ export namespace Plan { associateReport:number;//是否关联报告模板 0否 1是 reportTemplateName:string; reportTemplateVersion:string; - dataRule:string //数据处理原则 + dataRule:string;//数据处理原则 + + progress?: number; // 进度百分比,例如 75 + children?: ResPlan[]; } // 检测计划 + 分页 diff --git a/frontend/src/components/ImportExcel/index.vue b/frontend/src/components/ImportExcel/index.vue index fe01d5f..e987133 100644 --- a/frontend/src/components/ImportExcel/index.vue +++ b/frontend/src/components/ImportExcel/index.vue @@ -77,7 +77,7 @@ const acceptParams = (params: ExcelParameterProps) => { // Excel 导入模板下载 const downloadTemp = () => { if (!parameter.value.tempApi) return - useDownload(parameter.value.tempApi, `${parameter.value.title}模板`, {'patternId':parameter.value.patternId}, false) + useDownload(parameter.value.tempApi, `${parameter.value.title}模板`, {'pattern':parameter.value.patternId}, false) } // 文件上传 diff --git a/frontend/src/layouts/components/Header/components/Avatar.vue b/frontend/src/layouts/components/Header/components/Avatar.vue index 8799d0c..11440f6 100644 --- a/frontend/src/layouts/components/Header/components/Avatar.vue +++ b/frontend/src/layouts/components/Header/components/Avatar.vue @@ -48,6 +48,7 @@ active: item.value === appSceneStore.currentScene }" @click="changeScene(item.value?? '')" + :disabled = "item.value === appSceneStore.currentScene" > {{ item.name }} diff --git a/frontend/src/styles/reset.scss b/frontend/src/styles/reset.scss index 3d09b81..9bcb073 100644 --- a/frontend/src/styles/reset.scss +++ b/frontend/src/styles/reset.scss @@ -140,3 +140,9 @@ body, :-webkit-any(article, aside, nav, section) h1 { font-size: 2em; } + +@import 'https://cdn.jsdelivr.net/npm/@vue-flow/core@1.45.0/dist/style.css'; +@import 'https://cdn.jsdelivr.net/npm/@vue-flow/core@1.45.0/dist/theme-default.css'; +@import 'https://cdn.jsdelivr.net/npm/@vue-flow/controls@latest/dist/style.css'; +@import 'https://cdn.jsdelivr.net/npm/@vue-flow/minimap@latest/dist/style.css'; +@import 'https://cdn.jsdelivr.net/npm/@vue-flow/node-resizer@latest/dist/style.css'; diff --git a/frontend/src/views/authority/resource/components/resourcePopup.vue b/frontend/src/views/authority/resource/components/resourcePopup.vue index e1f1e89..98e9d95 100644 --- a/frontend/src/views/authority/resource/components/resourcePopup.vue +++ b/frontend/src/views/authority/resource/components/resourcePopup.vue @@ -1,5 +1,5 @@ + + + + \ No newline at end of file diff --git a/frontend/src/views/home/components/table.vue b/frontend/src/views/home/components/table.vue index f10d76e..db920c6 100644 --- a/frontend/src/views/home/components/table.vue +++ b/frontend/src/views/home/components/table.vue @@ -64,6 +64,10 @@ >重置 + 通道配对 + + + @@ -272,7 +278,6 @@ import {onBeforeMount, onMounted, reactive, ref, watch} from 'vue' import {useDictStore} from '@/stores/modules/dict' import ChannelsTest from './channelsTest.vue' import {useModeStore,useAppSceneStore} from '@/stores/modules/mode' // 引入模式 store - import {useCheckStore} from '@/stores/modules/check' import {CheckData} from '@/api/check/interface' import socketClient from '@/utils/webSocketClient' @@ -285,7 +290,7 @@ import {getPqDev} from '@/api/device/device/index.ts' import {ResultEnum} from '@/enums/httpEnum' import SelectTestItemPopup from "@/views/home/components/selectTestItemPopup.vue"; import WriteTHPopup from "@/views/home/components/writeTHPopup.vue"; -import { fa } from 'element-plus/es/locale' +import DeviceConnectionPopup from '@/views/home/components/deviceConnectionPopup.vue' const dictStore = useDictStore() const checkStore = useCheckStore() @@ -303,7 +308,7 @@ const reportDialogVisible = ref(false) const dataCheckPopupRef = ref>() const selectTestItemPopupRef = ref>() const writeTHPopupRef = ref>() - +const deviceConnectionPopupRef = ref>() const matchDialogVisible = ref(false) const dialogTitle = ref('手动检测') const checkStateTable = ref([0, 1, 2]) @@ -531,7 +536,7 @@ const columns = reactive[]>([ sortable: true, }, { - prop: 'reCheckNum', + prop: 'recheckNum', label: '检测次数', minWidth: 100, sortable: true, @@ -597,10 +602,10 @@ const columns = reactive[]>([ return '不合格' } else if (scope.row.factorCheckResult === 1) { return '合格' - } else if (scope.row.factorCheckResult === 2) { - return '/' + } else { + return '未检' } - return '' + }, }, {prop: 'operation', label: '操作', fixed: 'right', minWidth: 200, isShow: operationShow}, @@ -845,6 +850,11 @@ const addDevice = (val: string) => { }) } + +const handleTest2 = () => { + deviceConnectionPopupRef.value?.open() +} + const handleTest = async (val: string) => { if (devNum == 0) { diff --git a/frontend/src/views/home/components/tree.vue b/frontend/src/views/home/components/tree.vue index 8a5b684..964fb35 100644 --- a/frontend/src/views/home/components/tree.vue +++ b/frontend/src/views/home/components/tree.vue @@ -28,10 +28,22 @@ > diff --git a/frontend/src/views/home/tabs/model.vue b/frontend/src/views/home/tabs/model.vue index c85d334..213528f 100644 --- a/frontend/src/views/home/tabs/model.vue +++ b/frontend/src/views/home/tabs/model.vue @@ -78,7 +78,7 @@ const modeList = [ code: "比对式", subName: "启用比对式检测计划", img: new URL('/src/assets/images/dashboard/3.svg', import.meta.url).href, - isActive: false, + isActive: true, }, ]; const handelOpen = async (item: any) => { diff --git a/frontend/src/views/machine/devType/components/devTypePopup.vue b/frontend/src/views/machine/devType/components/devTypePopup.vue index 3ee892f..b324bc8 100644 --- a/frontend/src/views/machine/devType/components/devTypePopup.vue +++ b/frontend/src/views/machine/devType/components/devTypePopup.vue @@ -1,6 +1,6 @@