diff --git a/frontend/src/api/device/device/index.ts b/frontend/src/api/device/device/index.ts index b8c1fc9..a261fbf 100644 --- a/frontend/src/api/device/device/index.ts +++ b/frontend/src/api/device/device/index.ts @@ -1,6 +1,10 @@ import type {Device} from '@/api/device/interface/device' import http from '@/api' +export const getPqDevListAll = () => { + return http.get(`/pqDev/listAll`) +} + /** * @name 被检设备管理模块 */ diff --git a/frontend/src/api/device/freqConverter/index.ts b/frontend/src/api/device/freqConverter/index.ts index 17e879e..0af68cb 100644 --- a/frontend/src/api/device/freqConverter/index.ts +++ b/frontend/src/api/device/freqConverter/index.ts @@ -25,5 +25,28 @@ export const deleteFreqConverter = (params: string[]) => { return http.post(`/freqConverter/delete`, params) } +export const getFreqConverterResult = (params: { converterId?: string }) => { + return http.get(`/freqConverter/result?converterId=${params.converterId || ''}`) +} + +export const startFreqConverterDetect = (params: { + converterId?: string; + monitorId?: string; + userId?: string | null; + reset?: boolean; +}) => { + return http.get(`/prepare/startFreqConverter`, params, {loading: false}) +} + +export const stopFreqConverterDetect = (params: { + userId?: string | null; +}) => { + return http.get(`/prepare/stopFreqConverter`, params, {loading: false}) +} + +export const getFreqConverterSCurve = (params: FreqConverter.ReqFreqConverterSCurveParams) => { + return http.get(`/freqConverter/scurve?converterId=${params.converterId || ''}`) +} + diff --git a/frontend/src/api/device/interface/freqConverter.ts b/frontend/src/api/device/interface/freqConverter.ts index 7bc7207..984f620 100644 --- a/frontend/src/api/device/interface/freqConverter.ts +++ b/frontend/src/api/device/interface/freqConverter.ts @@ -25,6 +25,7 @@ export namespace FreqConverter { timeoutMs: number; //超时时间(毫秒) suffix?: number; //数据表后缀 state?: number; + testStatus?: number; //测试状态 0:未测试 1:测试完成 createBy?: string | null; //创建用户 createTime?: string | null; //创建时间 updateBy?: string | null; //更新用户 @@ -37,4 +38,14 @@ export namespace FreqConverter { export interface ResFreqConverterPage extends ResPage { } -} \ No newline at end of file + + export interface ReqFreqConverterSCurveParams { + converterId?: string; + } + + export interface ResTolerantPoint { + durationMs?: number | null; + residualVoltage?: number | null; + tolerant?: number | null; + } +} diff --git a/frontend/src/views/machine/freqConverter/components/freqConverterDetectChannelPairing.vue b/frontend/src/views/machine/freqConverter/components/freqConverterDetectChannelPairing.vue new file mode 100644 index 0000000..e3301ed --- /dev/null +++ b/frontend/src/views/machine/freqConverter/components/freqConverterDetectChannelPairing.vue @@ -0,0 +1,530 @@ + + + + + diff --git a/frontend/src/views/machine/freqConverter/components/freqConverterDetectEdge.vue b/frontend/src/views/machine/freqConverter/components/freqConverterDetectEdge.vue new file mode 100644 index 0000000..e81055f --- /dev/null +++ b/frontend/src/views/machine/freqConverter/components/freqConverterDetectEdge.vue @@ -0,0 +1,100 @@ + + + + + + + diff --git a/frontend/src/views/machine/freqConverter/components/freqConverterDipChart.vue b/frontend/src/views/machine/freqConverter/components/freqConverterDipChart.vue new file mode 100644 index 0000000..39e2b9c --- /dev/null +++ b/frontend/src/views/machine/freqConverter/components/freqConverterDipChart.vue @@ -0,0 +1,601 @@ + + + + + diff --git a/frontend/src/views/machine/freqConverter/components/freqConverterPopup.vue b/frontend/src/views/machine/freqConverter/components/freqConverterPopup.vue index 0c768d9..1abe9a4 100644 --- a/frontend/src/views/machine/freqConverter/components/freqConverterPopup.vue +++ b/frontend/src/views/machine/freqConverter/components/freqConverterPopup.vue @@ -67,7 +67,7 @@ import {ElMessage, type FormItemRule} from 'element-plus' import {computed, ref} from 'vue' import {type FreqConverter} from '@/api/device/interface/freqConverter' import {dialogMiddle} from '@/utils/elementBind' -import {addFreqConverter, updateFreqConverter} from '@/api/device/freqConverter/index.ts' +import {addFreqConverter, updateFreqConverter} from '@/api/device/freqConverter' // 定义弹出组件元信息 const dialogFormRef = ref() @@ -108,6 +108,18 @@ const resetFormContent = () => { } } +const getDefaultFormContent = (): FreqConverter.ResFreqConverter => ({ + id: '', + name: '', + portName: '', + slaveAddress: 1, + baudRate: 9600, + parity: 'None', + dataBits: 8, + stopBits: 1, + timeoutMs: 500, +}) + let dialogTitle = computed(() => { return titleType.value === 'add' ? '新增变频器' : '编辑变频器' }) @@ -171,14 +183,14 @@ const save = () => { } // 打开弹窗,可能是新增,也可能是编辑 -const open = async (sign: string, data: FreqConverter.ResFreqConverter) => { +const open = async (sign: string, data: Partial = {}) => { // 重置表单 dialogFormRef.value?.resetFields() titleType.value = sign dialogVisible.value = true if (data.id) { - formContent.value = {...data} + formContent.value = {...getDefaultFormContent(), ...data} } else { resetFormContent() } @@ -190,4 +202,4 @@ const props = defineProps<{ refreshTable: (() => Promise) | undefined; }>() - \ No newline at end of file + diff --git a/frontend/src/views/machine/freqConverter/components/freqConverterResultPopup.vue b/frontend/src/views/machine/freqConverter/components/freqConverterResultPopup.vue new file mode 100644 index 0000000..143fa26 --- /dev/null +++ b/frontend/src/views/machine/freqConverter/components/freqConverterResultPopup.vue @@ -0,0 +1,121 @@ + + + + + diff --git a/frontend/src/views/machine/freqConverter/components/freqConverterTestPopup.vue b/frontend/src/views/machine/freqConverter/components/freqConverterTestPopup.vue new file mode 100644 index 0000000..acfa5e2 --- /dev/null +++ b/frontend/src/views/machine/freqConverter/components/freqConverterTestPopup.vue @@ -0,0 +1,375 @@ + + + + + diff --git a/frontend/src/views/machine/freqConverter/index.vue b/frontend/src/views/machine/freqConverter/index.vue index 4b7b13d..8b99a58 100644 --- a/frontend/src/views/machine/freqConverter/index.vue +++ b/frontend/src/views/machine/freqConverter/index.vue @@ -1,56 +1,96 @@ -