Browse Source

fix: 急停恢复后自检;参数调整校验

master
guoapeng 4 months ago
parent
commit
2d8452ac4f
  1. 4
      src/views/main/index.vue
  2. 30
      src/views/spray/index.vue

4
src/views/main/index.vue

@ -48,6 +48,10 @@ const ok = () => {
const statusMessage = (data: any) => {
// systemStore systemStatus
console.log(data)
const stopPressed = systemStore.systemStatus.stopPressed
if (stopPressed !== data.stopPressed && data.stopPressed === false) {
getStatus()
}
systemStore.updateSystemStatus(data)
}

30
src/views/spray/index.vue

@ -99,18 +99,24 @@ const updateParam = () => {
infoVisible.value = true
}
const updateFormRef = ref()
const submitParam = async () => {
const params = {
cmdCode: 'matrix_spray_change_param',
cmdId: '',
params: updateForm.value,
}
form.value = {
...form.value,
...updateForm.value,
}
await sendControl(params)
infoVisible.value = false
updateFormRef.value.validate(async (valid: boolean) => {
if (!valid) {
return
}
const params = {
cmdCode: 'matrix_spray_change_param',
cmdId: '',
params: updateForm.value,
}
form.value = {
...form.value,
...updateForm.value,
}
await sendControl(params)
infoVisible.value = false
})
}
const form = ref<SprayForm>({
@ -533,7 +539,7 @@ const addCraft = () => {
</div>
</el-form>
<el-drawer v-model="infoVisible" title="调整参数" direction="rtl" :close-on-click-modal="false">
<el-form :model="updateForm" label-width="auto" style="display: flex; flex-direction: column; justify-content: center" :rules="updateFormRules">
<el-form ref="updateFormRef" :model="updateForm" label-width="auto" style="display: flex; flex-direction: column; justify-content: center" :rules="updateFormRules">
<div>
<el-form-item label="Z轴高度" prop="motorZHeight">
<el-input v-model="updateForm.motorZHeight" type="number" />

Loading…
Cancel
Save