| | |
| | | |
| | | <div class="info-item-two"> |
| | | <div style="color: #4efefa; font-size: 18px; margin-bottom: 10px; margin-top: 20px">工艺参数</div> |
| | | <!-- 未获取到工艺参数, 且当前设备允许在没有工艺参数的情况下生产, 则提示--> |
| | | <div v-if="!craftParams?.length && currentDeviceAllowNoParams" class="info-item info-item-two"> |
| | | 未获取到工艺参数, 请手动设置或在云端工艺模型中上传 |
| | | </div> |
| | | <div v-for="(item, index) in craftParams" :key="index" class="info-item info-item-two"> |
| | | {{ item.Key }}:{{ item.Value || '' }} |
| | | </div> |
| | |
| | | </template> |
| | | |
| | | <!-- 只有获取到工艺参数才可以进行操作--> |
| | | <template v-if="getCraftParamsTip"> |
| | | <template v-if="getCraftParamsTip && !currentDeviceAllowNoParams"> |
| | | <div class="content-tips"> |
| | | <div class="craft-params-error"> |
| | | <div class="error-icon"> |
| | |
| | | </template> |
| | | </div> |
| | | <template #footer> |
| | | <template v-if="getCraftParamsTip"> |
| | | <template v-if="getCraftParamsTip && !currentDeviceAllowNoParams"> |
| | | <div class="btn"> |
| | | <BigButton bg-color="#4765c0" @click="closeModal"> 关闭 </BigButton> |
| | | </div> |
| | |
| | | import { createMachine } from 'xstate' |
| | | import { useMachine } from '@xstate/vue' |
| | | import { CircleCloseFilled, Loading, SuccessFilled } from '@element-plus/icons-vue' |
| | | import { useDevicesStore } from '@/stores/devices' |
| | | |
| | | export interface TaskControlModalProps { |
| | | task?: Task |
| | |
| | | const craftParams = ref<CraftParam[]>() |
| | | // 获取工艺参数结果信息 |
| | | const getCraftParamsTip = ref('') |
| | | |
| | | // 当前设备若没有工艺参数是否允许下发 |
| | | const { currentDeviceAllowNoParams } = storeToRefs(useDevicesStore()) |
| | | /** |
| | | * 获取当前展示的任务的工艺参数 |
| | | */ |
| | |
| | | if (taskId) { |
| | | craftParams.value = [] |
| | | getCraftParamsTip.value = '' |
| | | |
| | | getCraftParams({ id: taskId }).then( |
| | | (res) => { |
| | | craftParams.value = res.data.Params ?? [] |
| | |
| | | const safeProduce = ref('') |
| | | watch(modelData, () => { |
| | | if (modelData.value) { |
| | | safeProduce.value = channels?.value?.[task.value.Channel]?.Prompt?.safeProduce ?? '' |
| | | safeProduce.value = channels?.value?.[task?.value?.Channel ?? 0]?.Prompt?.safeProduce ?? '' |
| | | } |
| | | }) |
| | | |
| | |
| | | send('开始生产') |
| | | |
| | | sendProcessParams({ |
| | | procedureId: task.value.Procedure.ID |
| | | procedureId: task!.value!.Procedure.ID |
| | | }) |
| | | .then( |
| | | (res) => { |
| | |
| | | .btn { |
| | | display: flex; |
| | | align-items: center; |
| | | justify-content: space-around; |
| | | justify-content: center; |
| | | & > button { |
| | | margin-right: 20px; |
| | | &:last-child { |
| | | margin-right: 0; |
| | | } |
| | | } |
| | | } |
| | | .content-title { |
| | | display: flex; |