Jelajahi Sumber

Merge branch 'master' of http://62.234.61.92:3000/wjm/mec-cloud_IntelligentManufacturing_CLIENT

lph 1 tahun lalu
induk
melakukan
b5f66aa062

+ 5 - 1
zkqy-admin/src/main/java/com/zkqy/web/controller/projcetzip/ExportController.java

@@ -8,6 +8,7 @@ import com.zkqy.web.controller.tool.TestController;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Value;
 import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor;
 import org.springframework.web.bind.annotation.PostMapping;
 import org.springframework.web.bind.annotation.RequestBody;
@@ -40,7 +41,8 @@ public class ExportController {
     private DownloadController downloadController;
 
     // 执行当前环境下的mysql
-    private static final String MYSQLDUMP_PATH = "/usr/local/mysql/bin/mysqldump";
+    @Value("${projectDownloadZip.mysql}")
+    private String MYSQLDUMP_PATH;
 
     // sql 生成路径
     private static final String SQL_OUTPUT_PATH = "sql";
@@ -115,6 +117,8 @@ public class ExportController {
 
     private List<String> buildMysqldumpCommand(String databaseName, DataSource dataSource) {
         // 使用 Arrays.asList 创建不可变 List
+        //  windwos: mysqldump --column-statistics=0
+        // Linux: 需要指明mysql脚本地址-》/usr/local/mysql/bin/mysqldump
         return new ArrayList<>(Arrays.asList(
                 MYSQLDUMP_PATH,
                 "-h", dataSource.getDatabaseIp(),

TEMPAT SAMPAH
zkqy-admin/src/main/resources/lib/DmJdbcDriver18.jar


+ 11 - 125
zkqy-process-execution/src/main/java/com/zkqy/execution/produce/dispersed/runbpm/PreExecutionToolClass.java

@@ -84,9 +84,9 @@ public class PreExecutionToolClass<R> {
         /**
          * 根据流程key校验当前流程数据的完整性,是否可以运行
          */
-//        if (!iVerifyExecutionProcess.VerifyProcessData(intoProduction.getTaskProcessKey())) {
-//            return AjaxResult.error(HttpStatus.EXECUTEPROCESS, "流程数据验证失败!");
-//        }
+        // if (!iVerifyExecutionProcess.VerifyProcessData(intoProduction.getTaskProcessKey())) {
+        //            return AjaxResult.error(HttpStatus.EXECUTEPROCESS, "流程数据验证失败!");
+        // }
         /**1️⃣1️⃣1️⃣ 得到当前投产需要执行的流程详细信息*/
         //--得到当前流程的详细信息
         BpmProcess bpmProcess = bpmProcessMapper.selectBpmProcessByProcessKey(
@@ -196,8 +196,6 @@ public class PreExecutionToolClass<R> {
                     }
                 }
             });
-            System.err.println("🚀🚀🚀🚀🚀🚀🚀🚀🚀🚀🚀🚀🚀🚀🚀🚀🚀🚀🚀🚀🚀🚀🚀🚀🚀🚀");
-            System.err.println(script0.toString().toString());
             // 手动异常触发脚本
             bpmExecuteNodeMiddle.setTaskArtificialScriptKey(script0.toString().replaceAll("\\[", "").replaceAll("\\]", ""));
             // 正常节点自动触发脚本
@@ -217,7 +215,6 @@ public class PreExecutionToolClass<R> {
             item.setTaskArtificialScriptKey(taskArtificialScriptKey.substring(0, taskArtificialScriptKey.lastIndexOf(",")));
             endrunBpmExecuteNodeMiddleList.add(item);
         });
-
         runBpmExecuteNodeMiddleMapper.insertBpmExecuteNodeMiddleList(endrunBpmExecuteNodeMiddleList);
         //**3️⃣⚡️5️⃣ 流程任务当中的所有节点关联的表单信息 得到当前流程的所有节点以及当前节点脚本绑定的异常脚本-》处理当前节点脚本、异常脚本绑定的表单到中间表信息 */
         List<BpmExecuteNodeForm> bpmExecuteNodeFormList = new ArrayList<>();
@@ -314,12 +311,9 @@ public class PreExecutionToolClass<R> {
         String taskNodeKey = bpmRunNodeVo.getTaskNodeKey(); // 任务节点编码
         // 得到当前节点的所有信息-》用于执行节点前后绑定的自动运行的脚本
         BpmExecuteNode currentBpmExecuteNode = runBpmExecuteNodeMapper.queryBpmExecuteNodeBytaskNodeKey(taskProcessKey, taskNodeKey);
-
-
         // ⚠️⚠️⚠️ 新增节点执行记录
         BpmExecuteNodeLog bpmExecuteNodeLog = new BpmExecuteNodeLog(currentBpmExecuteNode);
         iBpmExecuteNodeLogService.insertBpmExecuteNodeLog(bpmExecuteNodeLog);
-
         // 在执行节时得到除当前节点绑定的正常脚本外,有可能会绑定自动执行的脚本(这些自动执行的脚本参数不能确定,无法传递)
         BpmExecuteNodeMiddle bpmExecuteNodeMiddle = runBpmExecuteNodeMiddleMapper.queryBpmExecuteNodeMiddleByTaskNodeKey(taskProcessKey, taskNodeKey);
         String script[] = bpmExecuteNodeMiddle.getTaskNodeAroundScriptKey().split(",");  // 得到当前节点需要自动执行的脚本
@@ -385,8 +379,8 @@ public class PreExecutionToolClass<R> {
         //---3️⃣⚡️5️⃣ 添加节点执行记录  -》当前执行的节点详细信息
         // ⚠️⚠️⚠️ 当前节点执行完成新增日志数据,
         // 理论讲当前节点一旦点击运行操作就要新增日志,最后修改日志的状态
-//        BpmExecuteNodeLog bpmExecuteNodeLog1 = new BpmExecuteNodeLog(currentBpmExecuteNode);
-//        iBpmExecuteNodeLogService.insertBpmExecuteNodeLog(bpmExecuteNodeLog1);
+        // BpmExecuteNodeLog bpmExecuteNodeLog1 = new BpmExecuteNodeLog(currentBpmExecuteNode);
+        // iBpmExecuteNodeLogService.insertBpmExecuteNodeLog(bpmExecuteNodeLog1);
         // 4️⃣4️⃣4️⃣ 校验当前节点是否为结束节点
         System.err.println("--- 4️⃣4️⃣4️⃣ 校验当前节点是否为结束节点");
         if (bpmExecuteNode.getTaskNodeType().equals("endEvent")) {
@@ -425,12 +419,16 @@ public class PreExecutionToolClass<R> {
             BpmRunNodeVo bpmRunNodeVo1 = new BpmRunNodeVo();
             bpmRunNodeVo1.setTaskNodeKey(bpmExecuteNode.getTaskNodeKey());
             bpmRunNodeVo1.setTaskProcessKey(bpmExecuteNode.getTaskProcessKey());
+            bpmRunNodeVo1.setTaskProcessXmlContent(bpmRunNodeVo.getTaskProcessXmlContent());
             // 当前节点的下一个节点的编码
             bpmRunNodeVo1.setNextNodeKey(XmlDataParserUtils.getNextNodeKey(bpmRunNodeVo.getTaskProcessXmlContent(), bpmRunNodeVo.getNextNodeKey()));
             // 当前节点执行的脚本
             BpmExecuteNodeMiddle nextBpmExecuteNodeMiddle = runBpmExecuteNodeMiddleMapper.queryBpmExecuteNodeMiddleByTaskNodeKey(bpmRunNodeVo.getTaskProcessKey(), bpmRunNodeVo.getNextNodeKey());
-            bpmRunNodeVo1.setImplementationName(nextBpmExecuteNodeMiddle.getTaskArtificialScriptKey());
+            // 节点如果是自动的执行方式,那么节点类型一定是正常的(或者单独的节点类型等)
+            bpmRunNodeVo1.setTaskNodeType("userTask");
+            bpmRunNodeVo1.setImplementationName(nextBpmExecuteNodeMiddle.getTaskAutomaticScriptTriggerType());
             BpmExecuteProcess bpmExecuteProcess = new BpmExecuteProcess();
+            // bug位置,流程节点执行key
             bpmExecuteProcess.setTaskKey(bpmRunNodeVo.getTaskProcessKey());
             bpmExecuteProcess.setTaskNodeKey(bpmRunNodeVo.getTaskNodeKey());
             bpmExecuteProcess.setTaskNodeNextKey(bpmRunNodeVo.getNextNodeKey());
@@ -513,32 +511,12 @@ public class PreExecutionToolClass<R> {
      * @return
      */
     public AjaxResult backProcessNode(BpmBackNodeVo bpmBackNodeVo) {
-        /**
-         *当前流程的任务编码
-         * 发起操作的节点编码
-         * 需要回退到的节点编码
-         *
-         *
-         * 发起的操作节点的表单还是操作的当前节点的表单
-         * 也就是说相当于把当前节点执行后在更改当前任务流程的执行节点
-         *
-         * 被回退的节点
-         */
         BpmExecuteProcess bpmExecuteProcess = runBpmExecuteProcessMapper.selectBpmExecuteProcessByTaskKey(bpmBackNodeVo.getTaskProcessKey());
         bpmExecuteProcess.getTaskProcessXmlContent(); // 当前流程xml内容
         Map<String, Object> bpmInfoOrder = XmlDataParserUtils.getAllNodeKey(bpmExecuteProcess.getTaskProcessXmlContent());
         // 修改流程-> 流程执行的xml文件
         bpmExecuteProcess.setTaskProcessXmlContent(XmlDataParserUtils.clearExceptionTask(bpmExecuteProcess.getTaskProcessXmlContent(), bpmBackNodeVo.getTaskBackNodeKey()));
-
-
         // 如果触发回退操作的节点是一个异常节点(需要更改当前流程绑定的执行节点)
-//        if (bpmBackNodeVo.getTaskNodeType().equals("exceptionTask")) {
-//
-//
-//            bpmExecuteProcess.setTaskNodeNextKey(bpmBackNodeVo.getTaskBackNodeKey());
-//        } else if ((bpmBackNodeVo.getTaskNodeType().equals("userTask"))) {
-//            bpmExecuteProcess.setTaskNodeNextKey(bpmBackNodeVo.getTaskBackNodeKey());
-//        }
         bpmExecuteProcess.setTaskNodeNextKey(bpmBackNodeVo.getTaskBackNodeKey());
         runBpmExecuteProcessMapper.updateBpmExecuteProcess(bpmExecuteProcess);
         // 得到当前流程的详细信息
@@ -574,96 +552,4 @@ public class PreExecutionToolClass<R> {
         return commonEntity;
     }
 
-
-//    /**
-//     * 共通执行节点表单模版接口
-//     */
-//    public List<Map> getProcessNodeFormTemplate(BpmRunNodePlusVo bpmRunNodeV) {
-//        //任务流程key
-//        String taskProcessKey = bpmRunNodeV.getTaskProcessKey();
-//        //任务节点key
-//        String taskNodeKey = bpmRunNodeV.getTaskNodeKey();
-//        //脚本名称
-//        String taskScriptKey = bpmRunNodeV.getTaskScriptKey();
-//        //根据流程key和节点key查询节点表单关系表【bpm_execute_node_form】
-//        BpmExecuteNodeForm bpmExecuteNodeForm = iBpmExecuteNodeFormService.getBpmExecuteNodeForm(taskProcessKey, taskNodeKey, taskScriptKey);
-//        //存放返回结果
-//        List<Map> mapList = new ArrayList<>();
-//        //节点对应的表单信息不能为空
-//        if (bpmExecuteNodeForm != null) {
-//            String taskNodeFormContent = bpmExecuteNodeForm.getTaskNodeFromContent();
-//            //拿到当前节点对应的表单类型
-//            String taskNodeFormType = bpmExecuteNodeForm.getTaskNodeFromType();
-//            if (taskNodeFormType.equals("dragForm")) {
-//                HashMap hashMap = new HashMap();
-//                //解析存进去的表单信息【task_node_from_content】
-//                JSONObject taskNodeFromContentJson = JSONObject.parseObject(taskNodeFormContent);
-//                //得到sqlKey
-//                String sqlKey = taskNodeFromContentJson.get("sqlKey").toString();
-//                //根据sqlKey查询表单数据
-//                if (!sqlKey.isEmpty()) {
-//                    Map<String, String> tableSqlBySqlKey = executeNodeFormMapper.getTableSqlBySqlKey(sqlKey);
-//                    hashMap.put("resultMap", tableSqlBySqlKey);
-//                }
-//                //得到【df_form_sql】
-//                String dfFormSql = taskNodeFromContentJson.get("dfFormSql").toString();
-//                ObjectMapper objectMapper = new ObjectMapper();
-//                Map<String, Object> sqlMap = null;
-//                try {
-//                    sqlMap = objectMapper.readValue(dfFormSql, Map.class);
-//                    //循环得到每一个sql语句返回结果
-//                    for (Map.Entry<String, Object> entry : sqlMap.entrySet()) {
-//                        List<Map<String, Object>> resultMap = executeNodeFormMapper.executeSql(entry.getValue().toString());
-//                        sqlMap.put(entry.getKey(), resultMap);
-//                    }
-//                    //把原来的sql语句替换成下拉框数据
-//                    taskNodeFromContentJson.put("dfFormSql", JSONObject.toJSONString(sqlMap));
-//                } catch (JsonProcessingException e) {
-//                    e.printStackTrace();
-//                }
-//                //表单结构信息
-//                hashMap.put("template", taskNodeFromContentJson);
-//                //添加到返回集合中
-//                mapList.add(hashMap);
-//            } else if (taskNodeFormType.equals("composeForm")) {
-//                //参数为一个数组
-//                JSONArray objects = JSON.parseArray(taskNodeFormContent);
-//
-//                //循环数组元素
-//                objects.forEach(item -> {
-//                    String s = item.toString();
-//                    JSONObject jsonObject = JSONObject.parseObject(s);
-//                    String tableSql = jsonObject.get("tableSql").toString();
-//                    String conditionArrayJson = jsonObject.get("condition").toString();
-//                    JSONArray jsonArray = JSON.parseArray(conditionArrayJson);
-//
-//                    jsonArray.forEach(conditionItem -> {
-//                        //处理下这个条件 去掉 #{ 去掉.
-//                        String conditionString = conditionItem.toString().replace("#{", "").replace(".", "_");
-//                        //转驼峰
-//                        String CamelConditionString = CamelCaseConverterUtil.toCamelCase(conditionString);
-//                        //
-//                    });
-//
-//                    Map<String, String> stringHashMap = executeNodeFormMapper.tableSql(tableSql);
-//                    jsonObject.put("tableList", stringHashMap);
-//                    mapList.add(jsonObject);
-//                });
-//            } else if (taskNodeFormContent.equals("designForm")) {
-//                HashMap hashMap = new HashMap();
-//                hashMap.put("resultMap", "");
-//                hashMap.put("template", "");
-//                mapList.add(hashMap);
-//            }
-//        }
-//        return mapList;
-//    }
-}
-/*
-
-
-
-
-
-
- */
+}

+ 29 - 26
zkqy-process-execution/src/main/java/com/zkqy/execution/produce/dispersed/service/impl/CommonServiceImpl.java

@@ -56,7 +56,10 @@ public class CommonServiceImpl implements ICommonService {
             item.put("create_time", DateUtils.getTime());
             item.put("create_by", SecurityUtils.getUsername());
             item.put("create_by_id", SecurityUtils.getUserId().toString());
-            item.put("del_flag", "0");
+            if (item.get("delFlag") == null && item.get("del_flag") == null) {
+                item.put("del_flag", "0");
+            }
+//            list.stream().filter(del -> del.get("del_flag") != null && del.get("del_flag").equals("0")).findFirst().get().remove("del_flag");
         });
         List<Map<String, Object>> mapList = new ArrayList<>();
         for (Object obj : list) {
@@ -133,7 +136,7 @@ public class CommonServiceImpl implements ICommonService {
             } catch (JsonProcessingException e) {
                 throw new RuntimeException(e);
             }
-        //mapList = commonEntity.getExeclMap();
+            //mapList = commonEntity.getExeclMap();
         } else {
             List<Map<String, Object>> maps = new ArrayList<>();
             List<CommonEntity> commonEntities = queryTableList(commonEntity, tableSql);
@@ -233,7 +236,7 @@ public class CommonServiceImpl implements ICommonService {
         Map<String, Object> conditions = JSONObject.parseObject(JSON.toJSONString(commonEntity.getConditionMap()));
         CommonEntity common = new CommonEntity();
         CommonEntity commonEntity1 = commonMapper.getInfoById(tableName, conditions);
-        if(commonEntity1 == null){
+        if (commonEntity1 == null) {
             return common;
         }
         Map<String, Object> retMap = commonEntity1.getResultMap();
@@ -246,31 +249,31 @@ public class CommonServiceImpl implements ICommonService {
     }
 
     @Override
-    public List<CommonEntity> queryGroupTableList(CommonEntity commonEntity, TableSql tableSql,String tableFormat) {
+    public List<CommonEntity> queryGroupTableList(CommonEntity commonEntity, TableSql tableSql, String tableFormat) {
         //前端传递过来的参数
         Map<String, Object> queryMap = commonEntity.getQueryMap();
         //是否存在
-        AtomicReference<Boolean> isExist= new AtomicReference<>(true);
+        AtomicReference<Boolean> isExist = new AtomicReference<>(true);
         //循环前端传过来的参数 跳过 sqlkey
-        AtomicReference<String> replaceSql= new AtomicReference<>(tableSql.getTableCondition());
-        queryMap.forEach((k,v)->{
-            if(!k.equals("sqlkey")&&!k.equals("queryCriteriaValue")){ //查询第一个表的数据是不会进行任何替换的
+        AtomicReference<String> replaceSql = new AtomicReference<>(tableSql.getTableCondition());
+        queryMap.forEach((k, v) -> {
+            if (!k.equals("sqlkey") && !k.equals("queryCriteriaValue")) { //查询第一个表的数据是不会进行任何替换的
                 int isExistIndex = tableSql.getTableCondition().indexOf(k);
                 replaceSql.set(tableSql.getTableCondition().replace(k, v.toString()));
-                if(isExistIndex<0){
+                if (isExistIndex < 0) {
                     isExist.set(false);
                 }
             }
         });
         //证明条件不对应不能让他进行查询
-        if(!isExist.get()){
+        if (!isExist.get()) {
             List<CommonEntity> commonEntityList = new ArrayList<>();
             CommonEntity common = new CommonEntity();
-            HashMap<String, Object> hashMap=new HashMap();
-            hashMap.put("err","查询条件不匹配查询失败");
+            HashMap<String, Object> hashMap = new HashMap();
+            hashMap.put("err", "查询条件不匹配查询失败");
             common.setResultMap(hashMap);
             commonEntityList.add(common);
-            return  commonEntityList;
+            return commonEntityList;
         }
         Map<String, Object> conditions = JSONObject.parseObject(JSON.toJSONString(commonEntity.getQueryMap()));
         //正常的查询
@@ -281,24 +284,24 @@ public class CommonServiceImpl implements ICommonService {
         String sqlString = tableSql.getTableSql() + " where " + endSQL;
         List<CommonEntity> commonEntities = commonMapper.queryTableList(sqlString);
         //根据sqlKey查询表格数据
-        commonEntities.forEach(item->{
+        commonEntities.forEach(item -> {
             Map<String, Object> resultMap = item.getResultMap();
-            resultMap.forEach((k,v) -> {
-                if(StringUtils.isNotNull(v)&&!v.toString().isEmpty()){
+            resultMap.forEach((k, v) -> {
+                if (StringUtils.isNotNull(v) && !v.toString().isEmpty()) {
                     //正则匹配成功
                     boolean validDateTimeFormat = isValidDateTimeFormat(v.toString());
-                    if(validDateTimeFormat){
-                        if(v.toString().indexOf("T")>0){
+                    if (validDateTimeFormat) {
+                        if (v.toString().indexOf("T") > 0) {
                             DateTimeFormatter formatter = DateTimeFormatter.ISO_LOCAL_DATE_TIME; // 默认支持这种格式
                             LocalDateTime dateTime = LocalDateTime.parse(v.toString(), formatter);
                             DateTimeFormatter fmt = DateTimeFormatter.ofPattern(tableFormat);
                             String dateStr = dateTime.format(fmt);
-                            resultMap.put(k,dateStr);
-                        }else {
+                            resultMap.put(k, dateStr);
+                        } else {
                             LocalDateTime localDateTime = DateUtils.toLocalDateTime(v.toString(), "yyyy-MM-dd HH:mm:ss");
                             DateTimeFormatter fmt = DateTimeFormatter.ofPattern(tableFormat);
                             String dateStr = localDateTime.format(fmt);
-                            resultMap.put(k,dateStr);
+                            resultMap.put(k, dateStr);
                         }
                     }
                 }
@@ -309,15 +312,15 @@ public class CommonServiceImpl implements ICommonService {
 
     @Override
     public CommonEntity queryDropDownBoxData(List<CommonEntity> commonEntityList) {
-        Map<String,Object> retMap = new HashMap<>();
-        for (CommonEntity commonEntity : commonEntityList){
+        Map<String, Object> retMap = new HashMap<>();
+        for (CommonEntity commonEntity : commonEntityList) {
             String tableName = (String) commonEntity.getBasicMap().get("tableName");
             Map<String, Object> conditions = JSONObject.parseObject(JSON.toJSONString(commonEntity.getConditionMap()));
             List<Long> list = new ArrayList<>();
             list.add(0L);
-            conditions.put("del_flag",list);
-            List<Map<String,Object>> mapList = commonMapper.queryDropDownBoxData(tableName,conditions);
-            retMap.put(tableName,mapList);
+            conditions.put("del_flag", list);
+            List<Map<String, Object>> mapList = commonMapper.queryDropDownBoxData(tableName, conditions);
+            retMap.put(tableName, mapList);
         }
         CommonEntity commonEntity = new CommonEntity();
         commonEntity.setResultMap(retMap);

+ 75 - 34
zkqy-ui/src/views/bussiness/dialogCompments/Mec/ProductionProcesses.vue

@@ -2,22 +2,27 @@
   <div class="app-container">
     <div class="leftMessage">
       <div class="list" v-for="(item, index) in baseMessage" :key="index">
+
+        <div v-if="form.recordQualityControlCard[item.prop]!=undefined">
         <span class="title">
           {{ item.title }}
         </span>
-        <template v-if="item.prop == 'qualityControlCard'">
+          <template v-if="item.prop == 'qualityControlCard'">
           <span
             class="content"
             style="background: rgb(235, 237, 242); color: rgb(232, 83, 152)"
           >
             {{ form.recordQualityControlCard[item.prop] }}
           </span>
-        </template>
-        <template v-else>
+          </template>
+          <template v-else>
           <span class="content">
             {{ form.masterTask[item.prop] }}
           </span>
-        </template>
+          </template>
+        </div>
+
+
       </div>
     </div>
     <div class="rightMessage">
@@ -56,21 +61,24 @@
             plain
             round
             @click="updateHandler('1', checked)"
-            >开始</el-button
+          >开始
+          </el-button
           >
           <el-button
             type="danger"
             icon="el-icon-video-pause"
             plain
             @click="updateHandler('2', checked)"
-            >暂停</el-button
+          >暂停
+          </el-button
           >
           <el-button
             type="success"
             icon="el-icon-circle-check"
             plain
             @click="updateHandler('3', checked)"
-            >完成</el-button
+          >完成
+          </el-button
           >
           <el-button
             type="info"
@@ -78,7 +86,8 @@
             plain
             round
             @click="updateHandler('0', checked)"
-            >重置</el-button
+          >重置
+          </el-button
           >
         </el-button-group>
       </div>
@@ -115,22 +124,27 @@
                 </el-button>
                 <el-dropdown-menu slot="dropdown">
                   <el-dropdown-item
-                    ><el-button
+                  >
+                    <el-button
                       size="mini"
                       type="text"
                       icon="el-icon-edit"
                       @click="changeHandler(scope.row)"
-                      >修改</el-button
-                    ></el-dropdown-item
+                    >修改
+                    </el-button
+                    >
+                  </el-dropdown-item
                   >
                   <el-dropdown-item
-                    ><el-button
+                  >
+                    <el-button
                       size="mini"
                       type="text"
                       icon="el-icon-delete"
                       @click="deleteOne(scope.row)"
                       v-hasPermi="['system:dict:remove']"
-                      >删除</el-button
+                    >删除
+                    </el-button
                     >
                   </el-dropdown-item>
                 </el-dropdown-menu>
@@ -141,22 +155,27 @@
                 </el-button>
                 <el-dropdown-menu slot="dropdown">
                   <el-dropdown-item
-                    ><el-button
+                  >
+                    <el-button
                       size="mini"
                       type="text"
                       icon="el-icon-edit"
                       @click="saveOne"
-                      >保存</el-button
-                    ></el-dropdown-item
+                    >保存
+                    </el-button
+                    >
+                  </el-dropdown-item
                   >
                   <el-dropdown-item
-                    ><el-button
+                  >
+                    <el-button
                       size="mini"
                       type="text"
                       icon="el-icon-delete"
                       @click="cancelHandler(scope.row)"
                       v-hasPermi="['system:dict:remove']"
-                      >取消</el-button
+                    >取消
+                    </el-button
                     >
                   </el-dropdown-item>
                 </el-dropdown-menu>
@@ -195,7 +214,8 @@
                 icon="el-icon-delete"
                 size="mini"
                 @click="deleteTableRow(scope.$index)"
-                >删除</el-button
+              >删除
+              </el-button
               >
             </template>
           </el-table-column>
@@ -209,14 +229,16 @@
           icon="el-icon-plus"
           type="primary"
           @click="addTableRow"
-          >新 增</el-button
+        >新 增
+        </el-button
         >
         <el-button
           size="mini"
           icon="el-icon-check"
           type="success"
           @click="saveTableRow"
-          >保 存</el-button
+        >保 存
+        </el-button
         >
         <div class="total">
           <span>当前工序总工时: 10</span>
@@ -232,7 +254,8 @@ import {
   submitNodeForm,
   changeNodeState,
 } from "@/api/bpmprocess/runDialogApi/index";
-import { getProcessNodeFormInfoData } from "@/api/bpmprocess/run/executeProcess";
+import {getProcessNodeFormInfoData} from "@/api/bpmprocess/run/executeProcess";
+
 export default {
   name: "ProductionProcesses",
   props: ["formData", "row"],
@@ -257,12 +280,12 @@ export default {
       newRow: {},
 
       baseMessage: [
-        { title: "任务", prop: "taskNo" },
-        { title: "图号", prop: "mapNumber" },
-        { title: "名称", prop: "mapName" },
-        { title: "数量", prop: "modelNumber" },
-        { title: "工艺", prop: "craftRoute" },
-        { title: "质控", prop: "qualityControlCard" },
+        {title: "任务", prop: "taskNo"},
+        {title: "图号", prop: "mapNumber"},
+        {title: "名称", prop: "mapName"},
+        {title: "数量", prop: "modelNumber"},
+        {title: "工艺", prop: "craftRoute"},
+        {title: "质控", prop: "qualityControlCard"},
       ],
       stateObj: {
         0: "初始",
@@ -315,10 +338,10 @@ export default {
       let res = await this.$refs.form?.validate();
       if (res) {
         let payLoad = {};
-        let { state } = this.form;
+        let {state} = this.form;
         console.log(this.form);
         if (this.isEdit) {
-          let { taskKey, taskNodeKey } = this.myFormData.resultMap;
+          let {taskKey, taskNodeKey} = this.myFormData.resultMap;
           payLoad.updateCommonEntityList = [
             {
               basicMap: {
@@ -416,7 +439,7 @@ export default {
       ];
       payLoad.insertCommonEntityList[0].addListMap = this.tableData.map(
         (item) => {
-          let { personnelName, allottedTime } = item;
+          let {personnelName, allottedTime} = item;
           return {
             personnelName,
             allottedTime,
@@ -464,8 +487,8 @@ export default {
     async saveOne() {
       console.log(this.editingRow);
       let payLoad = {};
-      let { taskKey, taskNodeKey } = this.myFormData.resultMap;
-      let { id, personnelName, allottedTime } = this.editingRow;
+      let {taskKey, taskNodeKey} = this.myFormData.resultMap;
+      let {id, personnelName, allottedTime} = this.editingRow;
       payLoad.updateCommonEntityList = [
         {
           basicMap: {
@@ -493,7 +516,7 @@ export default {
     // 删除一条数据
     async deleteOne(row) {
       let payLoad = {};
-      let { id } = row;
+      let {id} = row;
       payLoad.deleteCommonEntityList = [
         {
           basicMap: {
@@ -557,62 +580,77 @@ export default {
     /* font-size: 8px; */
     color: white;
   }
+
   display: flex;
   flex-direction: row;
   justify-content: space-between;
+
   .leftMessage {
     display: flex;
     flex-direction: column;
     width: 145px;
+
     .list {
       padding: 10px 0px;
+
       span {
         border-radius: 10px;
         padding: 5px;
         margin-right: 10px;
       }
+
       .title {
         background-color: rgb(52, 191, 163);
         color: white;
       }
+
       .content {
         background: rgb(235, 237, 242);
         color: rgb(232, 83, 152);
       }
     }
   }
+
   .rightMessage {
     display: flex;
     width: 500px;
     flex-direction: column;
+
     .top {
       background: #53b0f8;
       color: white;
       height: 60px;
+
       .state {
         display: flex;
         flex-direction: row;
         padding: 10px 20px;
+
         .list:first-child {
           padding-right: 180px;
         }
+
         /* p {
           padding-top: 5px;
           font-size: 10px;
         } */
       }
     }
+
     .button {
       width: 100%;
       padding: 20px 0px;
+
       .el-button {
         width: 140px;
         /* background: none; */
       }
+
       .el-button--info {
         width: 80px;
       }
     }
+
     .middle {
       .name {
         color: black;
@@ -620,13 +658,16 @@ export default {
         text-align: center;
         padding: 10px 0px;
       }
+
       .block {
         text-align: center;
       }
+
       .total {
         display: inline-block;
         flex-direction: row;
         margin-top: 10px;
+
         span {
           font-weight: bold;
           color: black;

+ 3 - 0
zkqy-ui/src/views/relateTable/components/RelateTableCard.vue

@@ -418,9 +418,12 @@ export default {
           } else {
             // data;
             let defaultData = this.getDefaultData();
+
             data.addListMap.forEach((item) => {
               Object.assign(item, defaultData);
             });
+
+
             let res = await addTableData(data);
             if (res.code == 200) {
               this.$modal.msgSuccess("添加成功");