| | |
| | | const spacingLong = ref('') // 长轴间隔 |
| | | const spacingWidth = ref('') // 宽轴间隔 |
| | | |
| | | const fetchSettings = async (username) => { |
| | | try { |
| | | const response = await request.post(`/glassOptimize/selectOptimizeParms/${username}`); |
| | | if (response.code == 200) { |
| | | if (!response.data) { |
| | | console.error('响应数据为空'); |
| | | return; |
| | | } |
| | | const parsedData = JSON.parse(response.data); |
| | | if (parsedData.tempering) { |
| | | furnaceLength.value = parsedData.tempering.furnaceLength; |
| | | furnaceWidth.value = parsedData.tempering.furnaceWidth; |
| | | spacingWidth.value=parsedData.tempering.xAxisInterval; |
| | | spacingLong.value=parsedData.tempering.yAxisInterval; |
| | | heatingTime.value=parsedData.tempering.temperingTime; |
| | | } |
| | | |
| | | |
| | | } else { |
| | | console.error('请求失败,状态码:', response.code); |
| | | } |
| | | } catch (error) { |
| | | console.error('请求发生错误:', error); |
| | | } |
| | | }; |
| | | |
| | | fetchSettings(username); |
| | | |
| | | const gridOptions = reactive({ |
| | | height: '100%', |