| | |
| | | }) |
| | | request.post("/loadGlass/up-patten-usage/setUpPattenRequest", { |
| | | state: null, |
| | | stationCell: 6 |
| | | stationCell: 5 |
| | | }).then((response) => { |
| | | if (response.code == 200) { |
| | | } else { |
| | |
| | | // const handlesure = async () => { |
| | | // try { |
| | | // const response = await request.post('/loadGlass/up-patten-usage/selectUpPattenUsage', { |
| | | // stationCell: 6, |
| | | // stationCell: 5, |
| | | // engineerId: selectedProjectNo.value, |
| | | // filmRemove: parseInt(filmRemove.value, 10), |
| | | // }) |
| | |
| | | let engineeringId = window.localStorage.getItem('engineeringIda') |
| | | if (engineeringId !== '') { |
| | | const response = await request.post('/loadGlass/engineering/engineering/pause', { |
| | | stationCell: 6, |
| | | stationCell: 5, |
| | | filmRemove: filmRemove, |
| | | engineerId: engineeringId, |
| | | state: 0, |
| | |
| | | } |
| | | const response = await request.post("/loadGlass/up-patten-usage/setUpPattenRequest", { |
| | | state: selectValuesa[0], |
| | | stationCell: 6 |
| | | stationCell: 5 |
| | | }) |
| | | if (response.code === 200) { |
| | | tableData.value = response.data; |
| | |
| | | } |
| | | }; |
| | | |
| | | // 架子数据对比 |
| | | |
| | | // 架子数据对比 (每一行都进行比对,不同都显示红色) |
| | | // const tableRowClassName = ({ |
| | | // row, |
| | | // rowIndex: number |
| | | // }) => { |
| | | // // 获取第一条数据 |
| | | // const firstData = tableData.value[0]; |
| | | |
| | | // // 如果第一条数据存在且状态不是100 |
| | | // if (firstData && firstData.state !== 100) { |
| | | // // 获取当前行与第一条数据 |
| | | // const previousRow = tableDataa.value.slice(0, rowIndex).reverse().find(item => |
| | | // item && item.patternWidth && item.patternHeight && item.patternThickness && item.filmsId |
| | | // ); |
| | | |
| | | // // 如果当前行有数据,进行比对 |
| | | // if (row && row.patternWidth) { |
| | | // const isMatch = |
| | | // row.patternWidth === firstData.width && |
| | | // row.patternHeight === firstData.height && |
| | | // row.patternThickness === firstData.thickness && |
| | | // row.filmsId === firstData.filmsId; |
| | | |
| | | // return !isMatch ? 'danger-row' : ''; |
| | | // } |
| | | // } |
| | | |
| | | // return ''; |
| | | // } |
| | | |
| | | |
| | | // 架子数据对比 (料架1第一行有数据,进行比对,料架2第一行没有数据,进行比对) |
| | | const tableRowClassName = ({ |
| | | row, |
| | | rowIndex |
| | | }: { |
| | | row: any; |
| | | rowIndex: number |
| | | rowIndex: number; |
| | | }) => { |
| | | // 直接获取第一条数据,然后判断状态 |
| | | // 获取第一条数据 |
| | | const firstData = tableData.value[0]; |
| | | |
| | | // 如果第一条数据存在且状态不是100,进行比对 |
| | | if (firstData && firstData.state !== 100 && row && row.patternWidth) { |
| | | // 如果第一条数据存在且状态不是100 |
| | | if (firstData && firstData.state !== 100) { |
| | | // 料架1 |
| | | if (rowIndex === 0) { |
| | | // 料架1第一行有数据,进行比对 |
| | | if (row && row.patternWidth) { |
| | | const isMatch = |
| | | row.patternWidth === firstData.width && |
| | | row.patternHeight === firstData.height && |
| | |
| | | |
| | | return !isMatch ? 'danger-row' : ''; |
| | | } |
| | | } |
| | | // 料架2 |
| | | else if (rowIndex === 1) { |
| | | const firstRow = tableDataa.value[0]; |
| | | if (!firstRow || !firstRow.patternWidth) { |
| | | if (row && row.patternWidth) { |
| | | const isMatch = |
| | | row.patternWidth === firstData.width && |
| | | row.patternHeight === firstData.height && |
| | | row.patternThickness === firstData.thickness && |
| | | row.filmsId === firstData.filmsId; |
| | | |
| | | return !isMatch ? 'danger-row' : ''; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | return ''; |
| | | } |