Browse Source

流程开始结束节点设置去掉多余配置项/节点触发方式初始化/删除按钮类型修改

lph 1 year ago
parent
commit
8e088b7469

+ 1 - 1
ruoyi-ui/src/views/system/bpmnPro/components/Panel/components/ElementExcuteType.vue

@@ -63,7 +63,7 @@ export default {
   methods: {
     async initFormData() {
       if (!getNodeExecuteType(getActive())) {
-        this.updateNodeExcuteType("true");
+        this.updateNodeExcuteType("false");
       }
       this.nodeExecuteType = getNodeExecuteType(getActive());
     },

+ 12 - 2
ruoyi-ui/src/views/system/bpmnPro/components/Panel/index.vue

@@ -30,6 +30,8 @@ import {
   isTaskOrUserTask,
   isUserTask,
   isProcess,
+  isStart,
+  isEnd,
 } from "@packages/bo-utils/myFieldUtil";
 import ElementGenerations from "@packages/Panel/components/ElementGenerations";
 import ElementDocumentations from "@packages/Panel/components/ElementDocumentations";
@@ -157,6 +159,8 @@ export default {
       //   this.renderComponents.push(ElementExecutionListeners);
       // isAsynchronous(element) &&
       !isProcess(element) &&
+        !isStart(element) &&
+        !isEnd(element) &&
         this.renderComponents.push(ElementAsyncContinuations); //节点前后执行的数据
       // isStartInitializable(element) &&
       //   this.renderComponents.push(ElementStartInitiator);
@@ -165,9 +169,15 @@ export default {
       isTaskOrUserTask(element) &&
         this.renderComponents.push(ElementExecuteForm);
       !isProcess(element) && this.renderComponents.push(ElementNormalTask); //正常节点
-      !isProcess(element) && this.renderComponents.push(ElementUnusualTasks); //可处理异常
+      !isProcess(element) &&
+        !isStart(element) &&
+        !isEnd(element) &&
+        this.renderComponents.push(ElementUnusualTasks); //可处理异常
       isUserTask(element) && this.renderComponents.push(ElementExecuteUser);
-      !isProcess(element) && this.renderComponents.push(ElementExcuteType);
+      !isProcess(element) &&
+        !isStart(element) &&
+        !isEnd(element) &&
+        this.renderComponents.push(ElementExcuteType);
 
       // !isProcess(element) && this.renderComponents.push(ElementBeforeNode);
       // !isProcess(element) && this.renderComponents.push(ElementAfterNode);

+ 1 - 1
ruoyi-ui/src/views/system/bpmnPro/components/bo-utils/getNodeMsg.js

@@ -68,7 +68,7 @@ export function getNodeMsg(xmlObj) {
     bpmNodeHandleUserList = [...bpmNodeHandleUserList, ...bpmNodeHandleUser]
     attributeArray.forEach(attr => {
       let tempAttr = prefix + ':' + attr
-      nodeObj[attr] = node.attributes[tempAttr]?.nodeValue || ''
+      nodeObj[attr] = node.attributes[tempAttr]?.nodeValue || 'true'
     });
     nodeObj.nodeKey = node.id;
     nodeObj.nodeName = node.getAttribute('name');

+ 8 - 0
ruoyi-ui/src/views/system/bpmnPro/components/bo-utils/myFieldUtil.js

@@ -112,6 +112,14 @@ export function getNodeFormType(element) {
 export function isUserTask(element) {
   return is(element, 'bpmn:UserTask');
 }
+// 开始节点
+export function isStart(element) {
+  return is(element, 'bpmn:StartEvent')
+}
+// 结束节点
+export function isEnd(element) {
+  return is(element, 'bpmn:EndEvent')
+}
 
 export function setExecuteUser(element, value, isUpdate) {
   const prefix = getProcessEngine();

+ 2 - 31
ruoyi-ui/src/views/tablelist/commonTable/listInfo.vue

@@ -437,18 +437,9 @@ export default {
     // 得到当前展示的table的唯一标识
     this.tableKey = this.$route.query.tableKey;
   },
-  watch: {
-    tableList: {
-      handler(val) {
-        // console.log(JSON.parse(JSON.stringify(val)), "tableListChange");
-      },
-      deep: true,
-    },
-  },
+  watch: {},
   computed: {
     isShowExcuteCol() {
-      // console.log(!this.excuteBtnArr?.every((arr) => arr.children.length == 0));
-      // return true;
       return !this.excuteBtnArr?.every((arr) => arr.children.length == 0);
     },
   },
@@ -471,7 +462,6 @@ export default {
           });
           // 获取操作列的按钮数据
           this.excuteBtnArr = res.data.resultMap.button;
-          // console.log('res', this.templateInfo)
           this.queryParams.orderByColumn =
             res.data.resultMap.querySql.orderByColumn;
           this.sortOrder = JSON.parse(res.data.resultMap.querySql.sortOrder);
@@ -494,7 +484,6 @@ export default {
           );
           // 根据sql语句查询当前表数据
           unionListTableData(this.queryParams).then(async (res) => {
-            // console.log('unionListTableData');
             this.tableList = [];
             res.rows.forEach((item) => {
               this.tableList.push(item.resultMap);
@@ -526,7 +515,6 @@ export default {
               queryCriteriaValue: this.queryParams.queryMap.queryCriteriaValue,
             },
           }).then((res) => {
-            // console.log('getStatisticList', res);
             this.statisticList = res.data;
           });
         });
@@ -685,11 +673,7 @@ export default {
     },
     /** 修改按钮操作 */
     async handleUpdate(row, btnData) {
-      // console.log(this.currentBtnData);
-
       let nameTable = this.templateInfo.template.dtTableName;
-      // console.log(nameTable);
-      // console.log('row', row);
       this.rowobj = {};
       let obj = {};
       for (let key in row) {
@@ -702,7 +686,6 @@ export default {
         let str = modifiedTable.substring(nameTable.length + 1);
         obj[str] = row[key];
       }
-      // console.log("row", row);
       // getInfoBySqlKey(this.templateInfo.template.sqlKey).then(({ data }) => {
       //   if (!data || !data.dfVueTemplate) {
       //     this.$message.error("当前表格未绑定表单!");
@@ -753,8 +736,6 @@ export default {
           this.groupKey = this.currentBtnData.btnTableFormGroupKey;
           this.$nextTick(() => {
             let refChild = this.$refs.dialogRef;
-
-            // console.log(this.$refs.dialogRef);
             refChild.getLists(this.groupKey);
           });
 
@@ -766,7 +747,6 @@ export default {
               tableKey: tablesubKey,
             },
           }).then((res) => {
-            // console.log('统计', res);
             this.subCount = res.data;
           });
 
@@ -791,7 +771,6 @@ export default {
             "'" + obj[this.templateInfo.template.primaryKey] + "'";
 
           getStatisticList(data).then((res) => {
-            // console.log('统计', res);
             this.tableCount = res.data;
           });
         }
@@ -846,11 +825,9 @@ export default {
     },
     // 添加真正的字段名
     addRealFieldName(row) {
-      console.log(row);
       let fieldList = Object.keys(row);
       // let tableName = this.longestCommonSubstring(fieldList);
       let tableName = camelCase(this.tableName);
-      console.log(this.tableName);
       fieldList.forEach((field) => {
         let realField = field.replace(tableName, "");
         realField = realField[0].toLocaleLowerCase() + realField.substring(1);
@@ -887,13 +864,12 @@ export default {
       let primary = camelCase(this.templateInfo.template?.primaryKey);
       this.addRealFieldName(row);
       if (row[primary] != undefined && row[primary] != null) {
-        console.log(row[primary]);
         delIds = [];
         delIds.push(row[primary]);
       }
       let data = {
         basicMap: {
-          btnType: 9,
+          btnType: btnData.btnType,
           btnKey: btnData.btnKey,
           tableName: this.tableName,
         },
@@ -929,7 +905,6 @@ export default {
     // 批量删除接口
     handleBatchDelete() {
       let delIds = this.ids;
-      console.log(this.ids);
       let primary = camelCase(this.templateInfo.template?.primaryKey);
       // if (row && row[primary] != undefined && row[primary] != null) {
       //   delIds = [];
@@ -1042,7 +1017,6 @@ export default {
     // 弹窗新增的数
     addListHandler(val) {
       this.addLists.push(...val);
-      // console.log(this.addLists);
     },
     // 绑定弹窗Dialog确定按钮
     btnComfirm() {
@@ -1063,7 +1037,6 @@ export default {
     },
     // 去掉表名 开头字母小写
     formatField(field = "", tableName) {
-      // console.log(field, tableName);
       let temp = field.replace(tableName, "");
       return toUnderline(temp[0].toLowerCase() + temp.slice(1));
     },
@@ -1224,9 +1197,7 @@ export default {
       );
       if (!fieldConditionList.length) return tableList;
       let res = await this.setDictStyleData();
-      // console.log(res);
       this.dictStyleObj = res;
-      // console.log(JSON.parse(JSON.stringify(this.dictStyleObj)));
       tableList.forEach((row) => {
         // if (!row.styleFieldObj) row.styleFieldObj = {};
         for (let i = 0; i < fieldConditionList.length; i++) {