| | |
| | | successMsg: '模拟计算已启动!', |
| | | checkMessage: '当前工程状态不符合模拟计算条件,请确认工程状态后再操作!', |
| | | requiresRow: true, |
| | | actionFunction: () => { |
| | | actionFunction: async ({row}) => { |
| | | console.log('获取的行数据', row); |
| | | try { |
| | | // 使用浏览器原生Clipboard API复制工程号 |
| | | await navigator.clipboard.writeText(row.projectNumber); |
| | | console.log('工程号已复制到剪贴板'); |
| | | ElMessage.success('工程号已成功复制'); |
| | | } catch (error) { |
| | | console.error('复制工程号时出错:', error); |
| | | ElMessage.error('复制工程号失败,请稍后重试'); |
| | | } |
| | | optimizeCompute.value = true; |
| | | Mange.value = false; |
| | | } |
| | |
| | | return; |
| | | } else { |
| | | if (config.code === 'compute') { |
| | | config.actionFunction(); |
| | | config.actionFunction({ row }); |
| | | } else { |
| | | row.state = config.targetState; |
| | | const index = produceList.value.findIndex(item => item === row); |