Browse Source

fix: 不间断喷涂

master
guoapeng 3 weeks ago
parent
commit
ffc6ee786d
  1. 6
      src/views/main/index.vue
  2. 24
      src/views/spray/index.vue

6
src/views/main/index.vue

@ -224,6 +224,10 @@ const nozzleSwitch = async () => {
FtMessage.warning('喷头加热已经关闭')
}
}
const backHandle = () => {
router.back()
}
</script>
<template>
@ -245,7 +249,7 @@ const nozzleSwitch = async () => {
<ft-button v-if="systemStore.isDebug" @click="router.push('/debug')">
调试
</ft-button>
<ft-button v-if="route.path !== '/'" @click="router.push('/')">
<ft-button v-if="route.path !== '/'" @click="backHandle">
返回
</ft-button>
</div>

24
src/views/spray/index.vue

@ -41,24 +41,22 @@ const getMatrixList = async () => {
const getSpraying = async () => {
const res: any = await getSprayStatus()
const sprayTaskSprayedList = res.sprayTaskSprayedList
cmdId = res.cmdId
// form.value = {
// ...res.sprayParams,
// position: [{ select: false }, { select: false }, { select: false }, { select: false }],
// }
res.sprayTaskParams.forEach((item: any) => {
sprayStore.updateSprayForm(item, item.index)
})
// res.sprayParams.position.forEach((p: any) => {
// form.value.position[p.index] = p
// nextTick(() => {
// sprayRefs.value[p.index].updateSelection(p.x1 * 5, p.y1 * 5, (p.x2 - p.x1) * 5, (p.y2 - p.y1) * 5)
// })
// })
sprayTaskSprayedList.forEach((task: any) => {
nextTick(() => {
drawLine(task.index, { x: task.sprayedPoints.x * 5, y: task.sprayedPoints.y * 5 }, task.number)
res.sprayTaskSprayedList
.forEach((task: any) => {
nextTick(() => {
drawLine(task.index, { x: task.sprayedPoints.x * 5, y: task.sprayedPoints.y * 5 }, task.number)
})
})
})
}
const sprayRefs = ref<any>([])
@ -209,6 +207,10 @@ const ok = async (data: any) => {
sprayStore.updateSprayForm(data, selectIndex.value)
}
const sprayParamsCancelHandle = () => {
selectCraftVisible.value = false
}
const selectIndex = ref(0)
const currentFormData = ref()
const openSetting = (index: number) => {
@ -278,7 +280,7 @@ const viewParams = (index: number) => {
:disabled="sprayParamsDisabled"
:form-data="currentFormData"
@ok="ok"
@cancel="selectCraftVisible = false"
@cancel="sprayParamsCancelHandle"
/>
</div>
</template>

Loading…
Cancel
Save