zhoushihao
2025-03-10 976cee4892eec261f6c2927e788e476e5cc5028e
UI-Project/src/views/PurchaseReturn/purchaseStorage.vue
@@ -62,7 +62,7 @@
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;  
@@ -74,9 +74,9 @@
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 =>  
@@ -97,6 +97,8 @@
      line: 4001,
      state: 8,
      workingProcedure: '钢化',
      temperingLayoutId: currentPage.value,
      engineerId: engineerId.value,
    })
    if (response.code == 200) {
      ElMessage.success(response.message);
@@ -119,6 +121,8 @@
      line: 4001,
      state: 9,
      workingProcedure: '钢化',
      temperingLayoutId: currentPage.value,
      engineerId: engineerId.value,
    })
    if (response.code == 200) {
      ElMessage.success(response.message);
@@ -238,22 +242,24 @@
};
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';
  }
}
// 更新矩形状态