| | |
| | | const blind = ref(false) |
| | | const engineerId = ref(); |
| | | const currentGlassId = ref(null); |
| | | const currentstate = ref(null); |
| | | const temperingLayoutId = ref(null); |
| | | const adjustedRects = ref([]); |
| | | const raw = ref([]); |
| | | let webSocket: WebSocket | null = null; |
| | |
| | | const rawData = ref([]); |
| | | // 显示对话框并设置当前 glassId |
| | | const currentGlassRect = computed(() => { |
| | | return adjustedRects.value.find(rect => rect.glassId === currentGlassId.value); |
| | | return adjustedRects.value.find(rect => rect.glassId === currentGlassId.value); |
| | | }); |
| | | function showDialog(glassId: number) { |
| | | function showDialog(glassId: number) { |
| | | currentGlassId.value = glassId; |
| | | blind.value = true; |
| | | adjustedRects.value = adjustedRects.value.map(rect => |
| | |
| | | line: 4001, |
| | | state: 8, |
| | | workingProcedure: '钢化', |
| | | temperingLayoutId: currentPage.value, |
| | | engineerId: engineerId.value, |
| | | }) |
| | | if (response.code == 200) { |
| | | ElMessage.success(response.message); |
| | |
| | | line: 4001, |
| | | state: 9, |
| | | workingProcedure: '钢化', |
| | | temperingLayoutId: currentPage.value, |
| | | engineerId: engineerId.value, |
| | | }) |
| | | if (response.code == 200) { |
| | | ElMessage.success(response.message); |
| | |
| | | }; |
| | | function getRectColor(state: number): string { |
| | | switch (state) { |
| | | case -1: |
| | | return '#CDAF95'; |
| | | case 0: |
| | | return '#7AC5CD'; |
| | | case 1: |
| | | return '#95d475'; |
| | | case 2: |
| | | return 'lightblue'; |
| | | case 3: |
| | | return '#eebe77'; |
| | | // case -1: |
| | | // return '#CDAF95'; |
| | | // case 0: |
| | | // return '#7AC5CD'; |
| | | // case 1: |
| | | // return '#95d475'; |
| | | // case 2: |
| | | // return 'lightblue'; |
| | | // case 3: |
| | | // return '#eebe77'; |
| | | case 4: |
| | | return '#CD6090'; |
| | | case 8: |
| | | return '#911005'; |
| | | case 9: |
| | | return '#4682B4'; |
| | | default: |
| | | return '#CDAF95'; |
| | | } |
| | | } |
| | | // 更新矩形状态 |