| | |
| | | } |
| | | }; |
| | | |
| | | console.log(receivedData) |
| | | |
| | | const handleFetchData = async (projectNumber) => { |
| | | try { |
| | | const res = await request.post(`/glassOptimize/selectProjectCompute/${projectNumber}`); |
| | |
| | | if (storedData) {
|
| | | try {
|
| | | inventoryData.value = JSON.parse(storedData);
|
| | | console.log('从 localStorage 读取到库存数据:', inventoryData.value);
|
| | | console.log('取玻璃厚度',inventoryData.value[0].thickness);
|
| | | } catch (e) {
|
| | | console.error('解析库存数据失败:', e);
|
| | | }
|
| | |
| | | .then((res) => {
|
| | | if ((res.code === 200 || res.code === '200') && res.data && res.data.data && res.data.data.length > 0) {
|
| | | try {
|
| | | console.log("原始数据:", res.data.data[0]); // 调试信息
|
| | |
|
| | | // 解析保存的布局数据
|
| | | const parsedData = JSON.parse(res.data.data[0].Layouts);
|
| | | console.log("解析后的数据:", parsedData); // 调试信息
|
| | |
| | | {field: 'thickness', width: 50, title: '厚度',}, |
| | | {field: 'type', width: 50, title: '类型',}, |
| | | {field: 'state', width: 50, title: '状态',}, |
| | | {field: 'temperingState', width: 50, title: '钢化状态',filters: [{data: ''}], slots: {filter: 'num1_filter'},filterMethod:filterChanged}, |
| | | {field: 'optimizeState', width: 50, title: '优化状态',filters: [{data: ''}], slots: {filter: 'num1_filter'},filterMethod:filterChanged}, |
| | | {field: 'temperingState', width: 50, title: '钢化模拟',filters: [{data: ''}], slots: {filter: 'num1_filter'}, |
| | | filterMethod:filterChanged, formatter: ({ cellValue }) => cellValue === 1 ? '是' : (cellValue === 0 ? '否' : cellValue)}, |
| | | {field: 'optimizeState', width: 50, title: '优化计算',filters: [{data: ''}], slots: {filter: 'num1_filter'}, |
| | | filterMethod:filterChanged,formatter: ({ cellValue }) => cellValue === 1 ? '是' : (cellValue === 0 ? '否' : cellValue)}, |
| | | {field: 'quantity', width: 50, title: '数量',}, |
| | | {field: 'area', width: 50, title: '面积',}, |
| | | {field: 'processCardQuantity', width: 100, title: '流程卡数量',}, |