diff --git a/frontend/src/api/device/testScript/index.ts b/frontend/src/api/device/testScript/index.ts index 33efa13..b8dc03d 100644 --- a/frontend/src/api/device/testScript/index.ts +++ b/frontend/src/api/device/testScript/index.ts @@ -26,3 +26,7 @@ export const updatePqScript = (params: TestScript.ResTestScript) => { export const deletePqScript = (params: string[]) => { return http.post(`/pqScript/delete`, params) } +//添加检测脚本 +export const addScriptDtls = (params: any) => { + return http.post(`/pqScript/addScriptDtls`, params) +} diff --git a/frontend/src/assets/images/transient.png b/frontend/src/assets/images/transient.png new file mode 100644 index 0000000..202fbac Binary files /dev/null and b/frontend/src/assets/images/transient.png differ diff --git a/frontend/src/views/machine/testScript/components/communication.vue b/frontend/src/views/machine/testScript/components/communication.vue index fbab8f3..81cee24 100644 --- a/frontend/src/views/machine/testScript/components/communication.vue +++ b/frontend/src/views/machine/testScript/components/communication.vue @@ -58,7 +58,14 @@ const props = defineProps({ }) const tableData = ref([]) onMounted(async () => { - let data = await getDictTreeByCode({ code: 'Script_Error' }) + let data = await getDictTreeByCode({ + name: '', + id: '', + pid: '', + pids: '', + code: 'Script_Error', + sort: 0 + }) data.data[0].children.forEach((item: any, i: number) => { tableData.value.push({ diff --git a/frontend/src/views/machine/testScript/components/scriptForm.ts b/frontend/src/views/machine/testScript/components/scriptForm.ts new file mode 100644 index 0000000..d88a80e --- /dev/null +++ b/frontend/src/views/machine/testScript/components/scriptForm.ts @@ -0,0 +1,196 @@ +let scriptForm = { + value: '', + label: '', + subType: '', //tabcode + fFreq: 50.01, //频率 + channelList: [ + { + channelFlag: false, //通道使能 + harmFlag: false, //谐波使能 + inHarmFlag: false, //间谐波使能 + flickerFlag: false, //闪变使能 + dipFlag: false, //暂态使能 + fAmp: 0, //幅值 + fPhase: 0, //相角 + harmList: [ + // { + // harm: 2, //谐波次数 + // fAmp: 0, //谐波含有率 + // fPhase: 0 // 谐波相角 + // }, + ], //谐波 + inHarmList: [ + { + inharm: 0, //间谐波次数 + fAmp: 0, //间谐波含有率 + fPhase: 0 // 间谐波相角 + } + ], //间谐波 + flickerData: { + fChagValue: 0, //电压变动幅度 + fChagFre: 0, //波动频度 + waveFluType: 0, //波动类型 + waveType: 0, //波类型 + fDutyCycle: 0 //占空比 + }, //闪变 + dipData: { + fTransValue: 0, // 暂态幅值 + fRetainTime: 0 // 暂态持续时间 + } //暂态 + }, + { + channelFlag: false, //通道使能 + harmFlag: false, //谐波使能 + inHarmFlag: false, //间谐波使能 + flickerFlag: false, //闪变使能 + dipFlag: false, //暂态使能 + fAmp: 0, //幅值 + fPhase: 0, //相角 + harmList: [], //谐波 + inHarmList: [ + { + inharm: 1, //间谐波次数 + fAmp: 0, //间谐波含有率 + fPhase: 0 // 间谐波相角 + } + ], //间谐波 + flickerData: { + fChagValue: 0, //电压变动幅度 + fChagFre: 0, //波动频度 + waveFluType: 0, //波动类型 + waveType: 0, //波类型 + fDutyCycle: 0 //占空比 + }, //闪变 + dipData: { + fTransValue: 0, // 暂态幅值 + fRetainTime: 0 // 暂态持续时间 + } //暂态 + }, + { + channelFlag: false, //通道使能 + harmFlag: false, //谐波使能 + inHarmFlag: false, //间谐波使能 + flickerFlag: false, //闪变使能 + dipFlag: false, //暂态使能 + fAmp: 0, //幅值 + fPhase: 0, //相角 + harmList: [], //谐波 + inHarmList: [ + { + inharm: 1, //间谐波次数 + fAmp: 0, //间谐波含有率 + fPhase: 0 // 间谐波相角 + } + ], //间谐波 + flickerData: { + fChagValue: 0, //电压变动幅度 + fChagFre: 0, //波动频度 + waveFluType: 0, //波动类型 + waveType: 0, //波类型 + fDutyCycle: 0 //占空比 + }, //闪变 + dipData: { + fTransValue: 0, // 暂态幅值 + fRetainTime: 0 // 暂态持续时间 + } //暂态 + }, + { + channelFlag: false, //通道使能 + harmFlag: false, //谐波使能 + inHarmFlag: false, //间谐波使能 + flickerFlag: false, //闪变使能 + dipFlag: false, //暂态使能 + fAmp: 0, //幅值 + fPhase: 0, //相角 + harmList: [], //谐波 + inHarmList: [ + { + inharm: 1, //间谐波次数 + fAmp: 0, //间谐波含有率 + fPhase: 0 // 间谐波相角 + } + ], //间谐波 + flickerData: { + fChagValue: 0, //电压变动幅度 + fChagFre: 0, //波动频度 + waveFluType: 0, //波动类型 + waveType: 0, //波类型 + fDutyCycle: 0 //占空比 + }, //闪变 + dipData: { + fTransValue: 0, // 暂态幅值 + fRetainTime: 0 // 暂态持续时间 + } //暂态 + }, + { + channelFlag: false, //通道使能 + harmFlag: false, //谐波使能 + inHarmFlag: false, //间谐波使能 + flickerFlag: false, //闪变使能 + dipFlag: false, //暂态使能 + fAmp: 0, //幅值 + fPhase: 0, //相角 + harmList: [], //谐波 + inHarmList: [ + { + inharm: 1, //间谐波次数 + fAmp: 0, //间谐波含有率 + fPhase: 0 // 间谐波相角 + } + ], //间谐波 + flickerData: { + fChagValue: 0, //电压变动幅度 + fChagFre: 0, //波动频度 + waveFluType: 0, //波动类型 + waveType: 0, //波类型 + fDutyCycle: 0 //占空比 + }, //闪变 + dipData: { + fTransValue: 0, // 暂态幅值 + fRetainTime: 0 // 暂态持续时间 + } //暂态 + }, + { + channelFlag: false, //通道使能 + harmFlag: false, //谐波使能 + inHarmFlag: false, //间谐波使能 + flickerFlag: false, //闪变使能 + dipFlag: false, //暂态使能 + fAmp: 0, //幅值 + fPhase: 0, //相角 + harmList: [], //谐波 + inHarmList: [ + { + inharm: 1, //间谐波次数 + fAmp: 0, //间谐波含有率 + fPhase: 0 // 间谐波相角 + } + ], //间谐波 + flickerData: { + fChagValue: 0, //电压变动幅度 + fChagFre: 0, //波动频度 + waveFluType: 0, //波动类型 + waveType: 0, //波类型 + fDutyCycle: 0 //占空比 + }, //闪变 + dipData: { + fTransValue: 0, // 暂态幅值 + fRetainTime: 0 // 暂态持续时间 + } //暂态 + } + ] +} +// 追加谐波 +function getScriptForm() { + for (let i = 2; i < 51; i++) { + scriptForm.channelList.forEach(item => { + item.harmList.push({ + harm: i, //谐波次数 + fAmp: 0, //谐波含有率 + fPhase: 0 // 谐波相角 + }) + }) + } +} +getScriptForm() +export default scriptForm diff --git a/frontend/src/views/machine/testScript/components/testProjectPopup.vue b/frontend/src/views/machine/testScript/components/testProjectPopup.vue index cde578b..9439561 100644 --- a/frontend/src/views/machine/testScript/components/testProjectPopup.vue +++ b/frontend/src/views/machine/testScript/components/testProjectPopup.vue @@ -5,12 +5,12 @@
- + @@ -37,23 +37,45 @@ - - \ No newline at end of file + diff --git a/frontend/src/views/machine/testScript/components/testScriptFlickerTab.vue b/frontend/src/views/machine/testScript/components/testScriptFlickerTab.vue index c6db01a..6b9b07a 100644 --- a/frontend/src/views/machine/testScript/components/testScriptFlickerTab.vue +++ b/frontend/src/views/machine/testScript/components/testScriptFlickerTab.vue @@ -1,82 +1,103 @@ \ No newline at end of file + diff --git a/frontend/src/views/machine/testScript/components/testScriptHarmTab.vue b/frontend/src/views/machine/testScript/components/testScriptHarmTab.vue index 1a52abe..0a6279f 100644 --- a/frontend/src/views/machine/testScript/components/testScriptHarmTab.vue +++ b/frontend/src/views/machine/testScript/components/testScriptHarmTab.vue @@ -7,17 +7,17 @@ -