Browse Source

fix: 工艺修改

master
guoapeng 2 months ago
parent
commit
3ddd62c4c3
  1. 4
      src/app.vue
  2. 8
      src/components/home/Tube/index.vue
  3. 8
      src/stores/systemStore.ts
  4. 4
      src/types/craft.d.ts
  5. 16
      src/types/system.d.ts

4
src/app.vue

@ -9,13 +9,13 @@ onMounted(async () => {
const res = await getStatus() const res = await getStatus()
console.log(res) console.log(res)
console.log(systemStore.systemStatus) console.log(systemStore.systemStatus)
systemStore.updateSystemStatus(res)
// systemStore.updateSystemStatus(res)
startProgress() startProgress()
}) })
socket.init((data: System.SystemStatus) => { socket.init((data: System.SystemStatus) => {
console.log(data) console.log(data)
systemStore.updateSystemStatus(data)
// systemStore.updateSystemStatus(data)
}, 'status') }, 'status')
const progress = ref(0) const progress = ref(0)

8
src/components/home/Tube/index.vue

@ -166,10 +166,10 @@ defineExpose({
<span>{{ data.temperature || '--' }}</span> <span>{{ data.temperature || '--' }}</span>
<span></span> <span></span>
</span> </span>
<span v-show="data.heatingType === 'warm_up'" style="color: #FF4500 ">预热中</span>
<span v-show="data.heatingType === 'thermostatic'" style="color: #FF4500 ">加热中</span>
<span v-show="data.heatingType === 'constant'" style="color: #F0E5DE ">恒温中</span>
<span v-show="data.fanOpen" style="color: #6CD3FF ">降温中</span>
<span v-show="data.heatingType === 'warm_up'" style="color: #FF4500;font-weight: bold ">预热中</span>
<span v-show="data.heatingType === 'thermostatic'" style="color: #FF4500;;font-weight: bold ">加热中</span>
<span v-show="data.heatingType === 'constant'" style="color: #eccbb6;font-weight: bold ">恒温中</span>
<span v-show="data.fanOpen" style="color: #6CD3FF;font-weight: bold ">降温中</span>
</div> </div>
<div v-if="numList.find(item => item.heatModuleCode === data.moduleCode)?.countdownStr" style="text-align: center;font-size: 12px;color:#FE0A0A "> <div v-if="numList.find(item => item.heatModuleCode === data.moduleCode)?.countdownStr" style="text-align: center;font-size: 12px;color:#FE0A0A ">
{{ numList.find(item => item.heatModuleCode === data.moduleCode)?.countdownStr }} {{ numList.find(item => item.heatModuleCode === data.moduleCode)?.countdownStr }}

8
src/stores/systemStore.ts

@ -146,7 +146,7 @@ export const useSystemStore = defineStore('system', {
{ {
uuid: '111', uuid: '111',
heatModuleId: 'heat_module_01', heatModuleId: 'heat_module_01',
inSolutionArea: false,
inSolutionModule: false,
inHeatModule: true, inHeatModule: true,
tubes: [ tubes: [
{ {
@ -167,7 +167,7 @@ export const useSystemStore = defineStore('system', {
{ {
uuid: '', uuid: '',
heatModuleId: 'heat_module_03', heatModuleId: 'heat_module_03',
inSolutionArea: false,
inSolutionModule: false,
inHeatModule: true, inHeatModule: true,
tubes: [ tubes: [
{ {
@ -180,7 +180,7 @@ export const useSystemStore = defineStore('system', {
{ {
uuid: '', uuid: '',
heatModuleId: 'heat_module_04', heatModuleId: 'heat_module_04',
inSolutionArea: false,
inSolutionModule: false,
inHeatModule: true, inHeatModule: true,
tubes: [ tubes: [
{ {
@ -201,7 +201,7 @@ export const useSystemStore = defineStore('system', {
{ {
uuid: '', uuid: '',
heatModuleId: 'heat_module_05', heatModuleId: 'heat_module_05',
inSolutionArea: false,
inSolutionModule: false,
inHeatModule: true, inHeatModule: true,
tubes: [ tubes: [
{ {

4
src/types/craft.d.ts

@ -79,8 +79,8 @@ declare namespace CraftTypes {
name?: string name?: string
steps?: string steps?: string
oresId?: number oresId?: number
createTime?: string
updatetime?: string
createTime?: string | number
updateTime?: string | number
} }
interface craftStatus { interface craftStatus {
showDialog: () => void showDialog: () => void

16
src/types/system.d.ts

@ -20,8 +20,8 @@ declare namespace System {
initComplete: boolean initComplete: boolean
selfTest: boolean selfTest: boolean
emergencyStop: boolean emergencyStop: boolean
currentUser: User.User | null
currentTasks: Task.Task[] | null
currentUser?: User.User | null
currentTasks?: Task.Task[] | null
door: { door: {
open: boolean open: boolean
} }
@ -40,13 +40,14 @@ declare namespace System {
} }
interface Tray { interface Tray {
uuid: string uuid: string
heatModuleId: 'heat_module_01' | 'heat_module_02' | 'heat_module_03' | 'heat_module_04' | 'heat_module_05' | 'heat_module_06'
inSolutionArea: boolean
heatModuleId?: 'heat_module_01' | 'heat_module_02' | 'heat_module_03' | 'heat_module_04' | 'heat_module_05' | 'heat_module_06'
inSolutionModule: boolean
inHeatModule: boolean inHeatModule: boolean
tubes: Tubes[] tubes: Tubes[]
crafts?: { crafts?: {
state: 'READY' | 'RUNNING' | 'PAUSED' | 'STOPPED' | 'ERROR' | 'FINISHED' state: 'READY' | 'RUNNING' | 'PAUSED' | 'STOPPED' | 'ERROR' | 'FINISHED'
craft?: CraftTypes.Craft craft?: CraftTypes.Craft
ores?: any
currentIndex?: number currentIndex?: number
} }
} }
@ -61,13 +62,18 @@ declare namespace System {
trayStatus: 0 | 1 trayStatus: 0 | 1
heatingType: 'stop' | 'warm_up' | 'thermostatic' | 'constant' heatingType: 'stop' | 'warm_up' | 'thermostatic' | 'constant'
fanOpen: boolean fanOpen: boolean
heating?: boolean
capExist: boolean capExist: boolean
temperature: number temperature: number
targetTemperature: number
heatTemperature?: number
startHeatTime?: number
targetTemperature?: number
targetTime?: number targetTime?: number
} }
interface SolutionContainer { interface SolutionContainer {
id: number id: number
containerCode?: string
filledSolution?: boolean
type: 'solution' | 'neutralization' type: 'solution' | 'neutralization'
empty: boolean empty: boolean
full: boolean full: boolean

Loading…
Cancel
Save