| | |
| | | const saveScheduling = async () => { |
| | | try { |
| | | let type = 1; |
| | | // 1. 动态确定 type 和接口路径(根据 activeTab 切换) |
| | | const apiPath = activeTab.value === 'tempered' |
| | | ? 'updateEngineerScheduling' |
| | | : 'updateCuttingLayout'; |
| | | |
| | | if (activeTab.value === 'cutting2') type = 2; |
| | | else if (activeTab.value === 'tempered') type = 3; |
| | | |
| | |
| | | })) |
| | | |
| | | const response = await request.post( |
| | | `/loadGlass/optimizeProject/updateEngineerScheduling?type=${type}`, |
| | | engineerList |
| | | `/loadGlass/optimizeProject/${apiPath}?type=${type}`, engineerList |
| | | ) |
| | | |
| | | if (response.code === 200) { |
| | |
| | | |
| | | // 查找所有非进行中任务的位置 |
| | | const nonProgressIndices = newList |
| | | .map((item, i) => ({ item, index: i })) |
| | | .map((item, i) => ({item, index: i})) |
| | | .filter(item => item.item.state !== 1) |
| | | .map(item => item.index); |
| | | |
| | |
| | | width="90" |
| | | :formatter="stateFormatter" |
| | | /> |
| | | <el-table-column :label="t('scheduling.operate')" :width="activeTab === 'tempered' ? 200 : 300" :align="center"> |
| | | <el-table-column :label="t('scheduling.operate')" :width="activeTab === 'tempered' ? 200 : 300" |
| | | :align="center"> |
| | | <template #default="{ row }"> |
| | | <div style="display: flex; gap: 5px; align-items: center;"> |
| | | <el-button |
| | |
| | | > |
| | | {{ t('scheduling.remove') }} |
| | | </el-button> |
| | | <!-- 向上按钮 --> |
| | | <el-button |
| | | type="default" |
| | | size="small" |
| | |
| | | > |
| | | ↑ |
| | | </el-button> |
| | | <!-- 向下按钮 --> |
| | | <el-button |
| | | type="default" |
| | | size="small" |
| | |
| | | > |
| | | ↓ |
| | | </el-button> |
| | | |
| | | <!-- 置顶按钮 --> |
| | | <el-button |
| | | size="small" |
| | | @click="moveToTop(row)" |
| | |
| | | align-items: center; |
| | | gap: 20px; |
| | | margin-bottom: 20px; |
| | | overflow: auto; |
| | | } |
| | | |
| | | /* 详情表格样式 */ |