yangfeng
2023-12-12 1519870c0e18171ced014a840e86a459dc6b00f1
src/stores/devices.ts
@@ -7,10 +7,15 @@
export const useDevicesStore = defineStore('device', () => {
  const deviceInfo = computed(() => {
    if (deviceInfo?.value) {
      deviceRes.value.data.currentDeviceID = 'wwwwwwww222222'
    }
    return deviceRes?.value?.data as Devices
  })
  // 当前设备在缺少工艺参数的时候是否允许下发生产
  const currentDeviceAllowNoParams = computed(() => {
    const currentDeviceInfo = deviceInfo.value.deviceList?.find((ele) => {
      return ele.deviceID === deviceInfo.value.currentDeviceID
    })
    return !currentDeviceInfo?.needSetProcessParams
  })
  /**
@@ -31,5 +36,5 @@
    startDevicePolling()
  }
  return { deviceInfo, startPollingDevice }
  return { deviceInfo, startPollingDevice, currentDeviceAllowNoParams }
})