| | |
| | | selectedProjectNo.value = '' |
| | | markingMachineStatus.value = '#911005'; |
| | | cuttingMachineStatus.value = '#911005'; |
| | | const uniqueWidths = new Set(response.data.map(item => item.width)); |
| | | const uniqueHeights = new Set(response.data.map(item => item.height)); |
| | | const uniqueFilmsIds = new Set(response.data.map(item => item.filmsId)); |
| | | const uniqueThicknesses = new Set(response.data.map(item => item.thickness)); |
| | | |
| | | selectOptions.value = Array.from(uniqueWidths).map(width => ({ |
| | | value: width, // 假设这是你想要作为value的属性 |
| | | label: width, // 假设这是你想要显示的label |
| | | })); |
| | | selectOptionsa.value = Array.from(uniqueHeights).map(height => ({ |
| | | value: height, |
| | | label: height, |
| | | })); |
| | | selectOptionsb.value = Array.from(uniqueFilmsIds).map(filmsId => ({ |
| | | value: filmsId, |
| | | label: filmsId, |
| | | })); |
| | | selectOptionsc.value = Array.from(uniqueThicknesses).map(thickness => ({ |
| | | value: thickness, |
| | | label: thickness, |
| | | })); |
| | | } else { |
| | | // 请求失败,显示错误消息 |
| | | ElMessage.error(response.msg); |
| | |
| | | ); |
| | | if (response.code == 200) { |
| | | const status = response.data.status; |
| | | upstatus.value = status === '1' ? '上片机联机状态' : '上片机手动状态'; |
| | | upstatus.value = status === '1' ? '上片机联机状态:' : '上片机手动状态:'; |
| | | cuttingMachineStatusColor.value = status === '1' ? '#911005' : 'green'; |
| | | // 显示成功消息 |
| | | ElMessage.success(response.message); |