guoyuji
2024-12-03 68d7be0814e89ef811c2e7c435dff7af64ea60c1
north-glass-erp/northglass-erp/src/views/pp/glassOptimize/ProjectMange.vue
@@ -111,7 +111,17 @@
    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;
    }
@@ -257,7 +267,7 @@
          return;
        } else {
          if (config.code === 'compute') {
            config.actionFunction();
            config.actionFunction({ row });
          } else {
            row.state = config.targetState;
            const index = produceList.value.findIndex(item => item === row);