Browse Source

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

ZYZ 1 năm trước cách đây
mục cha
commit
70f7d6d221

+ 25 - 0
zkqy-system/src/main/resources/sql/initialize_sys_tenant_menu.json

@@ -1099,6 +1099,31 @@
         "tenantName": null,
         "tenantId": null
     },
+    {
+        "createBy": null,
+        "createTime": "2023-10-11 09:28:10",
+        "updateBy": null,
+        "updateTime": null,
+        "remark": null,
+        "menuId": 4219,
+        "menuName": "管道展示",
+        "parentName": null,
+        "parentId": 4216,
+        "orderNum": 2,
+        "path": "progressShow",
+        "component": "bussiness/progressShow",
+        "query": null,
+        "isFrame": "1",
+        "isCache": "0",
+        "menuType": "C",
+        "visible": "0",
+        "status": "0",
+        "perms": "",
+        "icon": "bpmn-icon-end-event-signal",
+        "children": [],
+        "tenantName": null,
+        "tenantId": null
+    },
     {
         "createBy": null,
         "createTime": "2023-10-11 09:28:10",

+ 2 - 1
zkqy-ui/src/utils/bpmn/getNodeSequence.js

@@ -1,7 +1,8 @@
 import { getProcessEngine } from "@packages/bpmn-utils/BpmnDesignerUtils";
 export default function getNodeSequence(xmlObj) {
   if (!xmlObj.childNodes[0].childNodes[0]) return [];
-  let nodeList = Array.from(xmlObj.childNodes[0].childNodes[0].childNodes)
+  let temp = Array.from(xmlObj.childNodes[0].childNodes)
+  let nodeList = Array.from(temp.find(item => item.localName == 'process')?.childNodes)
   let res = [];
   let startNode = nodeList.find((item) => item.tagName == 'bpmn:startEvent');
   if (!startNode) {

+ 2 - 1
zkqy-ui/src/utils/bpmn/xml.js

@@ -43,4 +43,5 @@ export function xmlStr2XmlObj(xmlStr) {
     xmlObj = new DOMParser().parseFromString(xmlStr, "text/xml");
   }
   return xmlObj;
-}
+}
+

+ 65 - 2
zkqy-ui/src/views/bussiness/dialogCompments/GongYi/GY01.vue

@@ -42,7 +42,7 @@
 <script>
 export default {
   name: "GY01",
-  props: [],
+  props: ["formData", "row"],
   components: {},
   data() {
     return {
@@ -52,6 +52,7 @@ export default {
         remark: "",
         yield: "",
       },
+      isEdite: false,
       rules: {
         name: [{ required: true, message: "请输入姓名", trigger: "blur" }],
         number: [
@@ -63,8 +64,70 @@ export default {
       },
     };
   },
-  computed: {},
+  computed: {
+    myFormData() {
+      return this.formData;
+    },
+  },
+  watch: {
+    myFormData: {
+      handler(nval) {
+        this.form = nval.resultMap;
+        this.isEdite = this.form.id ? true : false;
+      },
+      deep: true,
+      immediate: true,
+    },
+  },
   methods: {
+    async submitHandler() {
+      let res = await this.$refs.form?.validate();
+      if (res) {
+        let payLoad = {};
+        let { ycl, zl } = this.form;
+        if (this.isEdit) {
+          let { taskKey, taskNodeKey } = this.myFormData.resultMap;
+          payLoad.updateCommonEntityList = [
+            {
+              basicMap: {
+                tableName: "kucun",
+              },
+              conditionMap: {
+                task_key: taskKey,
+                task_node_key: taskNodeKey,
+              },
+              commMap: {
+                ycl,
+                zl,
+              },
+            },
+          ];
+        } else {
+          payLoad.insertCommonEntityList = [
+            {
+              basicMap: {
+                tableName: "kucun",
+              },
+              addListMap: [
+                {
+                  ycl,
+                  zl,
+                  taskKey: this.row.benTaskProcessKey,
+                  taskNodeKey: this.row.benTaskNodeKey,
+                },
+              ],
+            },
+          ];
+        }
+        submitNodeForm(payLoad).then((response) => {
+          if (response.code == 200) {
+            this.$modal.msgSuccess("保存成功");
+          } else {
+            this.$modal.error("保存失败,请稍后再试");
+          }
+        });
+      }
+    },
     async getFormData() {
       let formData = {
         flag: false,

+ 11 - 2
zkqy-ui/src/views/bussiness/dialogCompments/GongYi/GY03.vue

@@ -151,7 +151,7 @@ export default {
               basicMap: {
                 tableName: "productionrecords",
               },
-              addListMap: [
+              /* addListMap: [
                 {
                   material_information: material,
                   process_information: technology,
@@ -159,7 +159,16 @@ export default {
                   taskKey: this.row.benTaskProcessKey,
                   taskNodeKey: this.row.benTaskNodeKey,
                 },
-              ],
+              ], */
+              conditionMap: {
+                taskKey: this.row.benTaskProcessKey,
+                taskNodeKey: this.row.benTaskNodeKey,
+              },
+              commMap: {
+                material_information: material,
+                process_information: technology,
+                actual_quantity: productionQuantity,
+              },
             },
           ];
         } else {

+ 112 - 20
zkqy-ui/src/views/bussiness/dialogCompments/GongYi/GY06.vue

@@ -46,9 +46,17 @@
         <span><i class="el-icon-help mr5"></i>工序</span>
       </div>
       <div class="node-list">
-        <div class="node" v-for="i of 13" :key="i">
-          <span class="num">>{{ i }}</span>
-          <span class="title">领料</span>
+        <div
+          :class="{
+            node: true,
+            currentNode: item.nodeId == currentNodeKey,
+          }"
+          v-for="(item, index) of nodeList"
+          :key="item.num"
+          @click="shiftNode(item)"
+        >
+          <span class="num">>{{ index + 1 }}</span>
+          <span class="title">{{ item.nodeInfo.name }}</span>
           <span class="time">1分钟</span>
         </div>
       </div>
@@ -57,13 +65,18 @@
 </template>
 
 <script>
+import getNodeSequence from "@/utils/bpmn/getNodeSequence";
+import { xmlStr2XmlObj } from "@/utils/bpmn/xml";
 export default {
   name: "GY01",
-  props: [],
+  props: ["formData", "row"],
   components: {},
   data() {
     return {
       search: "",
+      nodeList: [],
+      currentNodeKey: "",
+      resFormData: {},
       columns: [
         {
           label: "编号",
@@ -102,28 +115,98 @@ export default {
       ],
     };
   },
-  computed: {},
+  watch: {
+    myFormData: {
+      handler(val) {},
+      deep: true,
+      immediate: true,
+    },
+    myRow: {
+      handler(val) {
+        this.currentNodeKey = val.benTaskNodeKey;
+        if (val?.bepTaskProcessXmlContent) {
+          let nodeSequence = getNodeSequence(
+            xmlStr2XmlObj(val.bepTaskProcessXmlContent)
+          );
+          this.nodeList = nodeSequence
+            .slice(0, this.getIndexByNodeId(nodeSequence, this.currentNodeKey))
+            ?.filter((item) => item.nodeInfo.localName != "exceptionTask");
+          // this.nodeList = getNodeSequence(
+          //   xmlStr2XmlObj(val.bepTaskProcessXmlContent)
+          // )?.filter((item) => item.nodeInfo.localName != "exceptionTask");
+
+          //去掉开始和结束节点
+          this.nodeList.shift();
+          this.nodeList[this.nodeList.length - 1]?.nodeInfo.localName ==
+            "endEvent" && this.nodeList.pop();
+          console.log(this.nodeList);
+        }
+      },
+      deep: true,
+      immediate: true,
+    },
+  },
+  computed: {
+    myFormData() {
+      return this.formData;
+    },
+    myRow() {
+      return this.row;
+    },
+  },
   methods: {
     async getFormData() {
       let formData = {
         flag: false,
         msg: "",
       };
-      try {
-        let valid = await this.$refs.form.validate();
-        if (valid) {
-          formData.flag = true;
-          formData.data = this.form;
-          return formData;
-        } else {
-          formData.msg = "表单校验异常,请规范填写表单数据";
-          return formData;
-        }
-      } catch (error) {
-        // console.log(error);
-        formData.msg = "表单校验异常,请规范填写表单数据";
-        return formData;
-      }
+
+      return {
+        flag: true,
+        data: this.resFormData,
+      };
+      // if(){}
+      // try {
+      //   let valid = await this.$refs.form.validate();
+      //   if (valid) {
+      //     formData.flag = true;
+      //     formData.data = this.form;
+      //     return formData;
+      //   } else {
+      //     formData.msg = "表单校验异常,请规范填写表单数据";
+      //     return formData;
+      //   }
+      // } catch (error) {
+      //   // console.log(error);
+      //   formData.msg = "表单校验异常,请规范填写表单数据";
+      //   return formData;
+      // }
+    },
+    async shiftNode(item) {
+      if (item.nodeId == this.currentNodeKey) return;
+      this.resFormData = {
+        taskProcessKey: this.row.bepTaskKey,
+        taskNodeKey: this.currentNodeKey,
+        taskBackNodeKey: item.nodeId,
+      };
+      this.currentNodeKey = item.nodeId;
+      // try {
+      //   let res = await this.$modal.confirm(
+      //     "是否确认切换流程至<" + item.nodeInfo.name + ">异常?"
+      //   );
+      //   console.log(res, item, this.row);
+      //   let payLoad = {
+      //     taskProcessKey: this.row.bepTaskKey,
+      //     taskNodeKey: this.currentNodeKey,
+      //     taskBackNodeKey: item.nodeId,
+      //   };
+      // } catch (error) {
+      //   this.$message.info("取消成功");
+      // }
+    },
+
+    getIndexByNodeId(nodeSequence, nodeId) {
+      return nodeSequence.findIndex((item) => item.nodeId == nodeId);
     },
   },
 };
@@ -154,12 +237,18 @@ export default {
     .node-list {
       display: flex;
       flex-wrap: wrap;
+      padding-top: 10px;
       .node {
         width: 33.3333%;
         height: 50px;
         display: flex;
         align-items: center;
         border-bottom: 1px dotted gray;
+        padding: 0 5px;
+        &:hover {
+          border: 1px dotted rgb(0, 195, 255);
+          background-color: rgba(70, 194, 231, 0.63);
+        }
         .num {
           color: #40c3a8;
           font-size: 16px;
@@ -177,6 +266,9 @@ export default {
           margin-right: 10px;
         }
       }
+      .currentNode {
+        background-color: #7dec8f !important;
+      }
     }
   }
 }

+ 62 - 44
zkqy-ui/src/views/bussiness/dialogCompments/test-component/CaiGou/CG02.vue

@@ -1,34 +1,34 @@
 <template>
-    <div class="app-container">
-        <el-form ref="form" :model="form" :rules="rules" label-width="80px">
-            <el-form-item label="原材料" prop="ycl">
-              <el-select
-                v-model="form.ycl"
-                placeholder="请选择原材料"
-                clearable
-                filterable
-                >
-                <el-option
-                  v-for="item in formData.resultMap.goodsList"
-                  :key="item.goodsno"
-                  :label="item.goodsname"
-                  :value="item.goodsno"
-                >
-                </el-option>
-              </el-select>
-            </el-form-item>
-            <el-form-item label="重量" prop="zl">
-                <el-input v-model="form.zl" placeholder="请输入重量" />
-            </el-form-item>
-        </el-form>
-        <div slot="footer" class="dialog-footer">
-            <el-button type="primary" @click="submitForm">确 定</el-button>
-        </div>
+  <div>
+    <el-form ref="form" :model="form" :rules="rules" label-width="80px">
+      <el-form-item label="原材料" prop="ycl">
+        <el-select
+          v-model="form.ycl"
+          placeholder="请选择原材料"
+          clearable
+          filterable
+        >
+          <el-option
+            v-for="item in form.goodsList"
+            :key="item.goodsno"
+            :label="item.goodsname"
+            :value="item.goodsno"
+          >
+          </el-option>
+        </el-select>
+      </el-form-item>
+      <el-form-item label="重量" prop="zl">
+        <el-input v-model="form.zl" placeholder="请输入重量" />
+      </el-form-item>
+    </el-form>
+    <div slot="footer" class="dialog-footer">
+      <el-button type="primary" @click="submitHandler">确 定</el-button>
     </div>
+  </div>
 </template>
 
 <script>
-import { submitNodeForm } from "@/api/bpmprocess/runDialogApi/index"
+import { submitNodeForm } from "@/api/bpmprocess/runDialogApi/index";
 export default {
     name: 'CG02',
     props: ["formData", "row"],
@@ -47,7 +47,7 @@ export default {
         };
     },
     watch: {
-        formData: {
+        myFormData: {
             handler(nval) {
                 this.realFormData = nval;
             },
@@ -56,12 +56,10 @@ export default {
         },
     },
 
-    mounted() {
-        
-    },
+  mounted() {},
 
     methods: {
-        async submitForm() {
+        async submitHanfler() {
         let res = await this.$refs.form?.validate();
         if (res) {
             let payLoad = {};
@@ -108,19 +106,39 @@ export default {
             });
         }
     },
-},
-    
-    computed: {
-        myFormData() {
-            return this.formData;
-            },
-            isEdit() {
-            return this.formData.resultMap?.id ? true : false;
-            }, 
-    }
+    // 获取表单数据
+    async getFormData() {
+      let formData = {
+        flag: false,
+        msg: "",
+      };
+      try {
+        let valid = await this.$refs.form.validate();
+        if (valid) {
+          formData.flag = true;
+          formData.data = this.form;
+          return formData;
+        } else {
+          formData.msg = "表单校验异常,请规范填写表单数据";
+          return formData;
+        }
+      } catch (error) {
+        // console.log(error);
+        formData.msg = "表单校验异常,请规范填写表单数据";
+        return formData;
+      }
+    },
+  },
+
+  computed: {
+    myFormData() {
+      return this.formData;
+    },
+    isEdit() {
+      return this.formData.resultMap?.id ? true : false;
+    },
+  },
 };
 </script>
 
-<style lang="scss" scoped>
-
-</style>
+<style lang="scss" scoped></style>

+ 20 - 17
zkqy-ui/src/views/bussiness/dialogCompments/test-component/CaiGou/CG1.vue

@@ -40,13 +40,6 @@
 </template>
 
 <script>
-// import {
-//   listCaigou,
-//   getCaigou,
-//   delCaigou,
-//   addCaigou,
-//   updateCaigou,
-// } from "@/api/system/caigou";
 import { submitNodeForm } from "@/api/bpmprocess/runDialogApi/index";
 export default {
   name: "CG1",
@@ -101,16 +94,26 @@ export default {
               basicMap: {
                 tableName: "caigou",
               },
-              addListMap: [
-                {
-                  ycl,
-                  gys,
-                  zl,
-                  dj,
-                  taskKey: this.row.benTaskProcessKey,
-                  taskNodeKey: this.row.benTaskNodeKey,
-                },
-              ],
+              // addListMap: [
+              //   {
+              //     ycl,
+              //     gys,
+              //     zl,
+              //     dj,
+              //     taskKey: this.row.benTaskProcessKey,
+              //     taskNodeKey: this.row.benTaskNodeKey,
+              //   },
+              // ],
+              conditionMap: {
+                taskKey: this.row.benTaskProcessKey,
+                taskNodeKey: this.row.benTaskNodeKey,
+              },
+              commMap: {
+                ycl,
+                gys,
+                zl,
+                dj,
+              },
             },
           ];
         } else {

+ 21 - 19
zkqy-ui/src/views/bussiness/dialogCompments/test-component/KuCun/KC02.vue

@@ -61,7 +61,7 @@ export default {
         quantitystock: 0,
       },
       rules: {
-        goodsno: [{ required: true, message: "请选择材料", trigger: "change" }],
+        // goodsno: [{ required: true, message: "请选择材料", trigger: "change" }],
         quantitystock: [
           { required: true, message: "请输入生产数量", trigger: "change" },
         ],
@@ -72,20 +72,13 @@ export default {
     myFormData: {
       handler(nval) {
         this.realFormData = nval;
+        // if (nval?.resultMap.id) {
+        this.form = nval?.resultMap;
+        // }
       },
       deep: true,
       immediate: true,
     },
-    // "myFormData.resultMap.goods": {
-    //   handler(nval) {
-    //     console.log("object", nval);
-    //     if (nval.length == 1) {
-    //       this.form.goodsno = nval[0].id + "";
-    //       console.log(this.form.goodsno);
-    //       this.disable = true;
-    //     }
-    //   },
-    // },
   },
   computed: {
     myFormData() {
@@ -133,19 +126,28 @@ export default {
         let payLoad = {};
         let { goodsno, quantitystock } = this.form;
         if (this.isEdit) {
+          let { taskKey, taskNodeKey } = this.myFormData.resultMap;
           payLoad.updateCommonEntityList = [
             {
               basicMap: {
                 tableName: "warehouse",
               },
-              addListMap: [
-                {
-                  goodsno,
-                  quantitystock,
-                  taskKey: this.row.benTaskProcessKey,
-                  taskNodeKey: this.row.benTaskNodeKey,
-                },
-              ],
+              // addListMap: [
+              //   {
+              //     goodsno,
+              //     quantitystock,
+              //     taskKey: this.row.benTaskProcessKey,
+              //     taskNodeKey: this.row.benTaskNodeKey,
+              //   },
+              // ],
+              conditionMap: {
+                task_key: taskKey,
+                task_node_key: taskNodeKey,
+              },
+              commMap: {
+                goodsno,
+                quantitystock,
+              },
             },
           ];
         } else {

+ 0 - 8
zkqy-ui/src/views/bussiness/dialogCompments/test-component/KuCun/KC1.vue

@@ -21,14 +21,6 @@
 </template>
 
 <script>
-// import {
-//   listCaigou,
-//   getCaigou,
-//   delCaigou,
-//   addCaigou,
-//   updateCaigou,
-// } from "@/api/system/caigou";
-
 export default {
   name: "CG1",
   data() {

+ 44 - 29
zkqy-ui/src/views/bussiness/processMange.vue

@@ -100,6 +100,7 @@
                   plain
                   size="small"
                   class="mr10 mb5"
+                  v-show="scope.row.bepTaskProcessState == '0'"
                   @click="opneExecuteNode(scope.row)"
                 >
                   运行
@@ -184,7 +185,7 @@
             :subTableName="subTableName"
             @addList="() => {}"
           ></DialogTemplate> -->
-          ></DialogTemplate> -->
+          <!-- ></DialogTemplate> -->
           <component
             :is="myForm"
             :formData="formData"
@@ -193,7 +194,7 @@
           ></component>
           <!-- <CG1 ref="myFormRef"></CG1>
           <KC1 ref="myFormRef"></KC1> -->
-          <!-- <GY06 ref="myFormRef"></GY06> -->
+          <!-- <GY06 ref="myFormRef" :formData="formData" :row="row"></GY06> -->
           <span slot="footer" class="dialog-footer">
             <el-button @click="closeExecuteNode">取消</el-button>
             <el-button type="primary" @click="executeNode">运行</el-button>
@@ -223,7 +224,7 @@ import DialogTemplate from "@/views/dialogTemplate/components/index.vue";
 import GY01 from "./dialogCompments/GongYi/GY01.vue";
 import GY03 from "./dialogCompments/GongYi/GY03.vue";
 import CG1 from "./dialogCompments/test-component/CaiGou/CG1.vue";
-import CG02 from "./dialogCompments/test-component/CaiGou/CG02.vue";
+import CG2 from "./dialogCompments/test-component/CaiGou/CG02.vue";
 import KC1 from "./dialogCompments/test-component/KuCun/KC1.vue";
 import KC02 from "./dialogCompments/test-component/KuCun/KC02.vue";
 import GY06 from "./dialogCompments/GongYi/GY06.vue";
@@ -231,7 +232,7 @@ import GY06 from "./dialogCompments/GongYi/GY06.vue";
 export default {
   name: "processMange",
   props: [],
-  components: { GY01, DialogTemplate, CG1,CG02, KC1, GY06, GY03, KC02, GY02 },
+  components: { GY01, DialogTemplate, CG1, CG2, KC1, GY06, GY03, KC02, GY02 },
   dicts: ["bpm_type", "task_process_state"],
   data() {
     return {
@@ -250,7 +251,7 @@ export default {
       queryParams: {
         pageNum: 1,
         pageSize: 10,
-        taskProcessState: "",
+        taskProcessState: "0",
       },
       total: 0,
       columns: [
@@ -306,6 +307,7 @@ export default {
 
       // 弹窗表单渲染数据
       formData: {},
+      backExceptionTaskList: ["GY06"], //特殊回退表单组件列表
     };
   },
   computed: {},
@@ -328,27 +330,34 @@ export default {
     // 获取表单数据
     async getFormData() {
       let formData = {};
-      switch (this.formType) {
-        case "dragForm":
-          try {
-            formData = await this.$refs.addFromRef.getData();
-          } catch (error) {
-            console.log(error);
-            this.$message.error("表单校验异常,请稍后重试");
-            return {};
-          }
-          break;
-        case "designForm":
-          let temp = await this.$refs.myFormRef.getFormData();
-          if (!temp.flag) {
-            this.$message.error(temp.msg);
-            return {};
-          } else {
-            formData = temp.data;
-          }
-          break;
-        default:
-          break;
+      // switch (this.formType) {
+      //   case "dragForm":
+      //     try {
+      //       formData = await this.$refs.addFromRef.getData();
+      //     } catch (error) {
+      //       console.log(error);
+      //       this.$message.error("表单校验异常,请稍后重试");
+      //       return {};
+      //     }
+      //     break;
+      //   case "designForm":
+      //     let temp = await this.$refs.myFormRef.getFormData();
+      //     if (!temp.flag) {
+      //       this.$message.error(temp.msg);
+      //       return {};
+      //     } else {
+      //       formData = temp.data;
+      //     }
+      //     break;
+      //   default:
+      //     break;
+      // }
+      let temp = await this.$refs.myFormRef?.getFormData();
+      if (!temp?.flag) {
+        this.$message.error(temp.msg);
+        return false;
+      } else {
+        formData = temp.data;
       }
       return formData;
     },
@@ -365,7 +374,8 @@ export default {
       this.resetDialogForm();
       console.log(row);
       this.nodeTitle = row.benTaskNodeName;
-      let preFix = row.benTaskNodeName.split("-")[0];
+      // let preFix = row.benTaskNodeName.split("-")[0];
+      let preFix = row.benTaskNodeFormKey;
       let {
         benTaskNodeFormKey,
         benTaskNodeFormType,
@@ -450,6 +460,7 @@ export default {
       }
       // return;
       let formData = await this.getFormData();
+      if (!formData) return;
       formData.taskPlanKey = this.row.bepTaskPlanKey;
       let payLoad = {
         taskProcessKey: this.row.bepTaskKey, //当前任务流程编码
@@ -458,7 +469,12 @@ export default {
         implementationName: this.row.benmTaskAutomaticScriptTriggerType, //当前节点绑定的脚本名
         // taskProcessXmlContent: this.row.bepTaskProcessXmlContent, //当前流程xml
         tableName: this.tableName,
-        // formDataMap: JSON.stringify(formData), //自定义表单组件收集的表单数据
+        formDataMap: JSON.stringify(formData), //自定义表单组件收集的表单数据
+        taskNodeType: this.backExceptionTaskList.includes(
+          this.row.benTaskNodeFormKey
+        )
+          ? "backExceptionTask"
+          : this.row.benTaskNodeType,
       };
       let fileXML = new File(
         [this.row.bepTaskProcessXmlContent],
@@ -479,7 +495,6 @@ export default {
           this.open = false;
         }
       });
-      console.log(payLoad);
     },
     // 获取拖拽表单数据
     async getDragFormInfo(fid) {

+ 3 - 0
zkqy-ui/src/views/bussiness/progressShow.vue

@@ -128,6 +128,9 @@ export default {
   mounted() {
     this.getList();
   },
+  activated() {
+    this.getList();
+  },
 };
 </script>
 

+ 9 - 4
zkqy-ui/src/views/relateTable/index.vue

@@ -1058,6 +1058,7 @@ export default {
               tableName: this.tableItemForm.tableName,
               tableFieldData: this.tableFieldList,
             };
+            console.log(echoData);
             let tableKey = uuidv4();
             let sqlKey = uuidv4();
 
@@ -1119,12 +1120,12 @@ export default {
               tableName: this.tableItemForm.tableName,
               tableFieldData: this.tableFieldList,
             };
-            // console.log('123456', echoData);
+            console.log("123456", echoData);
             this.tableDataList.forEach((item, index) => {
               if (item.tId == this.tableItemForm.tId) {
                 item.conditionDefaultValueMap = this.conditionDefault;
-                (item.echoData = JSON.stringify(echoData)),
-                  (item.sortOrder = this.tableItemForm.isAsc);
+                item.echoData = JSON.stringify(echoData);
+                item.sortOrder = this.tableItemForm.isAsc;
                 item.orderByColumn = this.tableItemForm.orderByColumn;
                 item.primaryKey = this.tableItemForm.selectFields;
                 item.dtTableName = this.tableItemForm.tableName;
@@ -1150,12 +1151,13 @@ export default {
     },
     // 修改一个表格数据
     relateOne(row) {
-      // console.log(row)
+      console.log(row);
       // console.log(this.orderByFieldList)
       if (row.tableKey) {
         this.menuId = row.menuId;
         this.conditionDefault = row.conditionDefaultValueMap;
         let echoData = JSON.parse(row.echoData);
+        console.log(this.tableDataList);
         this.tableDataList.forEach((item, index) => {
           if (item.tableKey == row.tableKey) {
             if (index == 0) {
@@ -1338,10 +1340,13 @@ export default {
                 groupTableInfo: [],
                 dragTables: [],
               };
+              console.log(this.addDragData);
+              // return;
               this.addDragData.forEach((item, index) => {
                 item.menuId = result.data;
                 // item.sqlKey = tableKeyObj.tableKey
                 let echo = JSON.parse(item.echoData);
+                console.log(echo);
                 echo.formData = this.groupForm;
                 // item.echoData = JSON.stringify(echo)
                 data.groupTableInfo.push({

+ 26 - 7
zkqy-ui/src/views/system/bpmnPro/components/bo-utils/getNodeMsg.js

@@ -1,5 +1,4 @@
-import { getProcessEngine } from "@packages/bpmn-utils/BpmnDesignerUtils";
-import { getModeler } from "@packages/bpmn-utils/BpmnDesignerUtils";
+import { getProcessEngine, getModeler } from "@packages/bpmn-utils/BpmnDesignerUtils";
 import { v4 as uuidv4 } from "uuid";
 
 function getSecondStr(str) {
@@ -38,7 +37,7 @@ export function getNodeMsg(xmlObj) {
   let prefix = getProcessEngine();
   let { attributes, childNodes } = xmlObj
     .getElementsByTagName("bpmn:process")[0];
-  let bpmProcessConfigurationList = [], bpmNodeHandleUserList = [], bpmNodeScriptRelevanceList = [], bpmTableNameList = [], attributeArray = ['nodeKey', 'nodeFormKey', 'nodeFormType', 'nodeProcessKey', 'nodeRolePremission', 'spare1', 'spare2', 'spare3', 'createBy', 'updateBy', 'remark', 'nodeExecuteType'];
+  let bpmProcessConfigurationList = [], bpmNodeHandleUserList = [], bpmNodeScriptRelevanceList = [], bpmTableNameList = [], attributeArray = ['nodeKey', 'nodeFormKey', 'nodeProcessKey', 'nodeRolePremission', 'spare1', 'spare2', 'spare3', 'createBy', 'updateBy', 'remark', 'nodeExecuteType'];
   childNodes.forEach((node) => {
     // let uuid = uuidv4();
 
@@ -74,6 +73,10 @@ export function getNodeMsg(xmlObj) {
     });
     nodeObj.nodeKey = node.id;
     nodeObj.nodeName = node.getAttribute('name');
+    if (nodeObj.nodeName.includes('-')) {
+      nodeObj.nodeFormType = 'designForm';
+      nodeObj.nodeFormKey = nodeObj.nodeName.split('-')[0]
+    }
     bpmNodeHandleUser.length && (nodeObj.nodeRolePermission = node.getAttribute(`${prefix}:virtuallyRole`));
     let asyncBefore = node.getAttribute(`${prefix}:asyncBefore`)
     if (asyncBefore == 'true') {
@@ -98,16 +101,30 @@ function getNodeException(node, nodeObj) {
   let prefix = getProcessEngine();
   let res = []
   let { children } = node;
+  let nodeName = node.getAttribute('name'), nodeFormType = '', formKey = '';
+
+  if (nodeName.includes('-')) {
+    nodeFormType = 'designForm';
+    formKey = nodeName.split('-')[0]
+  }
   if (node.getAttribute(`${prefix}:NormalScriptKey`)) {
+
     res.push({
       scriptKey: node.getAttribute(`${prefix}:NormalScriptKey`),
-      scriptTriggerType: node.getAttribute(`${prefix}:NormalScriptTriggerType`)
+      scriptTriggerType: node.getAttribute(`${prefix}:NormalScriptTriggerType`),
+      // 统一格式修改
+      scriptNodeName: nodeName,
+      scriptNodeFormType: nodeFormType,
+      formKey: formKey,
     })
   }
   if (node.getAttribute(`${prefix}:asyncScriptKey`)) {
     res.push({
       scriptKey: node.getAttribute(`${prefix}:asyncScriptKey`),
-      scriptTriggerType: '2'
+      scriptTriggerType: '2',
+      scriptNodeName: nodeName,
+      scriptNodeFormType: nodeFormType,
+      formKey: formKey,
     })
   }
   if (children.length) {
@@ -128,9 +145,11 @@ function getNodeException(node, nodeObj) {
             scriptKey: item.attributes.scriptKey?.nodeValue,
             // scriptTriggerType: item.attributes?.scriptTriggerType?.nodeValue || 0,
             scriptTriggerType: 0,
-            scriptNodeFormType: item.getAttribute('formType'),
+            // scriptNodeFormType: item.getAttribute('formType'),
+            scriptNodeFormType: 'designForm',
             scriptNodeName: formName,
-            formKey: item.getAttribute('formId')
+            // formKey: item.getAttribute('formId')
+            formKey: item.getAttribute('compName')
           })
         }
       })

+ 194 - 0
zkqy-ui/src/views/tableMange/components/DataFilterPanel.vue

@@ -0,0 +1,194 @@
+<template>
+  <div class="data-filter-wrap">
+    <el-button
+      type="primary"
+      class="inline-large-button mb10"
+      icon="el-icon-plus"
+      size="mini"
+      @click="addCondition"
+    >
+      添加条件
+    </el-button>
+    <el-table :data="tableData" style="width: 100%">
+      <el-table-column align="center" label="序号" type="index" width="50">
+      </el-table-column>
+      <el-table-column
+        align="center"
+        prop="fieldName"
+        label="条件字段"
+        width="100"
+      >
+        <template slot-scope="scope">
+          <el-select
+            v-model="scope.row.fieldName"
+            placeholder="请选择条件字段"
+            clearable
+            filterable
+          >
+            <el-option
+              v-for="item in fieldList"
+              :key="item.fieldName"
+              :label="item.fieldDescription"
+              :value="item.tableName + '.' + item.fieldName"
+            >
+              <span class="discribe" style="float: left">{{
+                item.fieldDescription
+              }}</span>
+              <span style="float: right; color: #8492a6; font-size: 13px">{{
+                item.fieldName
+              }}</span>
+            </el-option>
+          </el-select>
+        </template>
+      </el-table-column>
+      <el-table-column align="center" prop="condition" label="条件">
+        <template slot-scope="scope">
+          <el-select v-model="scope.row.condition" placeholder="请选择">
+            <el-option
+              v-for="item in conditionList"
+              :key="item.label"
+              :label="item.label"
+              :value="item.label"
+            >
+            </el-option>
+          </el-select>
+        </template>
+      </el-table-column>
+      <el-table-column align="center" prop="refValue" label="参照值">
+        <template slot-scope="scope">
+          <el-input v-model="scope.row.refValue"></el-input>
+        </template>
+      </el-table-column>
+      <el-table-column label="操作">
+        <template slot-scope="scope">
+          <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-delete"
+            @click="delHandler(scope.$index)"
+            >删除
+          </el-button>
+        </template>
+      </el-table-column>
+    </el-table>
+  </div>
+</template>
+
+<script>
+export default {
+  name: "DataFilter",
+  props: ["tableFieldList", "filterDataEcho"],
+  components: {},
+  data() {
+    return {
+      tableData: [],
+      fieldList: [],
+      conditionList: [
+        {
+          value: 1,
+          label: ">",
+        },
+        {
+          value: 2,
+          label: "<",
+        },
+        {
+          value: 3,
+          label: "=",
+        },
+        {
+          value: 4,
+          label: ">=",
+        },
+        {
+          value: 5,
+          label: "<=",
+        },
+      ],
+    };
+  },
+  watch: {
+    myTableFieldList: {
+      handler(nval) {
+        this.fieldList = nval;
+
+        console.log(this.fieldList);
+        // 初始化删除逻辑条件
+        let is_has_del_flag = nval.find((item) => {
+          return item.fieldName == "del_flag";
+        });
+        console.log(is_has_del_flag);
+        if (!this.tableData.length && is_has_del_flag) {
+          let { fieldName, tableName } = is_has_del_flag;
+          this.tableData.push({
+            fieldName: tableName + "." + fieldName,
+            condition: "=",
+            refValue: 0,
+          });
+        }
+      },
+      deep: true,
+      immediate: true,
+    },
+    myFilterDataEcho: {
+      handler(val) {
+        if (val) {
+          this.tableData = JSON.parse(decodeURIComponent(this.filterDataEcho));
+        }
+      },
+      deep: true,
+      immediate: true,
+    },
+  },
+  computed: {
+    myTableFieldList() {
+      return this.tableFieldList;
+    },
+    myFilterDataEcho() {
+      return this.filterDataEcho;
+    },
+  },
+  methods: {
+    // 新增条件回调
+    addCondition() {
+      this.tableData.push({
+        fieldName: "",
+        condition: "",
+        refValue: "",
+      });
+    },
+    // 编辑条件回调
+    editHandler() {},
+    // 删除条件回调
+    delHandler() {
+      this.tableData.splice(index, 1);
+    },
+    // 获取数据筛选条件
+    getConditions() {
+      let res = this.tableData.filter((item) => {
+        return (
+          item.fieldName &&
+          item.condition &&
+          (item.refValue == 0 || item.refValue)
+        );
+      });
+      return res;
+    },
+    // 获取回显数据
+    getEchoData() {
+      return JSON.stringify(this.tableData);
+    },
+  },
+  mounted() {},
+};
+</script>
+
+<style scoped lang="scss">
+.discribe {
+  display: block;
+  max-width: 200px;
+  white-space: nowrap;
+  overflow: hidden;
+  text-overflow: ellipsis;
+}
+</style>

+ 20 - 4
zkqy-ui/src/views/tableMange/components/StyleFormPanel.vue

@@ -187,7 +187,9 @@
                   :label="item.tableComment"
                   :value="item.tableName"
                 >
-                  <span style="float: left">{{ item.tableComment }}</span>
+                  <span class="discribe" style="float: left">{{
+                    item.tableComment
+                  }}</span>
                   <span style="float: right; color: #8492a6; font-size: 13px">{{
                     item.tableName
                   }}</span>
@@ -208,7 +210,9 @@
                   :label="item.fieldDescription"
                   :value="item.fieldName"
                 >
-                  <span style="float: left">{{ item.fieldDescription }}</span>
+                  <span class="discribe" style="float: left">{{
+                    item.fieldDescription
+                  }}</span>
                   <span style="float: right; color: #8492a6; font-size: 13px">{{
                     item.fieldName
                   }}</span>
@@ -250,7 +254,9 @@
                     :label="item.tableComment"
                     :value="item.tableName"
                   >
-                    <span style="float: left">{{ item.tableComment }}</span>
+                    <span class="discribe" style="float: left">{{
+                      item.tableComment
+                    }}</span>
                     <span
                       style="float: right; color: #8492a6; font-size: 13px"
                       >{{ item.tableName }}</span
@@ -268,7 +274,9 @@
                     :label="item.fieldDescription"
                     :value="item.fieldName"
                   >
-                    <span style="float: left">{{ item.fieldDescription }}</span>
+                    <span class="discribe" style="float: left">{{
+                      item.fieldDescription
+                    }}</span>
                     <span
                       style="float: right; color: #8492a6; font-size: 13px"
                       >{{ item.fieldName }}</span
@@ -704,4 +712,12 @@ export default {
     }
   }
 }
+
+.discribe {
+  display: block;
+  max-width: 200px;
+  white-space: nowrap;
+  overflow: hidden;
+  text-overflow: ellipsis;
+}
 </style>

+ 76 - 14
zkqy-ui/src/views/tableMange/index.vue

@@ -26,7 +26,9 @@
               :label="item.tableComment"
               :value="item.tableName"
             >
-              <span style="float: left">{{ item.tableComment }}</span>
+              <span class="discribe" style="float: left">{{
+                item.tableComment
+              }}</span>
               <span style="float: right; color: #8492a6; font-size: 13px">{{
                 item.tableName
               }}</span>
@@ -58,9 +60,13 @@
               class-name="allowDrag"
             >
             </el-table-column>
-            <el-table-column prop="fieldName" label="数据字段">
+            <el-table-column align="center" prop="fieldName" label="数据字段">
             </el-table-column>
-            <el-table-column prop="fieldDescription" label="字段描述">
+            <el-table-column
+              align="center"
+              prop="fieldDescription"
+              label="字段描述"
+            >
               <template slot-scope="scope">
                 <!-- <el-form-item size="normal" prop="fieldDescription"> -->
                 <input
@@ -79,7 +85,7 @@
                 <!-- </el-form-item> -->
               </template>
             </el-table-column>
-            <el-table-column prop="relationTable" label="关联表">
+            <el-table-column align="center" prop="relationTable" label="关联表">
               <template slot-scope="scope">
                 <el-select
                   v-model="scope.row.relationTable"
@@ -107,7 +113,11 @@
                 </el-select>
               </template>
             </el-table-column>
-            <el-table-column prop="relationFieldName" label="关联条件字段">
+            <el-table-column
+              align="center"
+              prop="relationFieldName"
+              label="关联条件字段"
+            >
               <template slot-scope="scope">
                 <el-select
                   v-model="scope.row.relationFieldName"
@@ -126,7 +136,11 @@
                 </el-select>
               </template>
             </el-table-column>
-            <el-table-column prop="relationType" label="关联方式">
+            <el-table-column
+              align="center"
+              prop="relationType"
+              label="关联方式"
+            >
               <template slot-scope="scope">
                 <el-select
                   v-model="scope.row.relationType"
@@ -165,21 +179,32 @@
                 </el-select>
               </template>
             </el-table-column> -->
-            <el-table-column prop="isShow" label="是否显示">
+            <el-table-column align="center" prop="isShow" label="是否显示">
               <template slot-scope="scope">
                 <el-switch v-model="scope.row.isShow"> </el-switch>
               </template>
             </el-table-column>
-            <el-table-column prop="isSearch" label="是否包含查询">
+            <el-table-column
+              align="center"
+              prop="isSearch"
+              label="是否包含查询"
+            >
               <template slot-scope="scope">
                 <el-switch v-model="scope.row.isSearch"> </el-switch>
               </template>
             </el-table-column>
-            <el-table-column prop="isExport" label="是否导出">
+            <el-table-column align="center" prop="isExport" label="是否导出">
               <template slot-scope="scope">
                 <el-switch v-model="scope.row.isExport"> </el-switch>
               </template>
             </el-table-column>
+            <!-- <el-table-column
+              prop="defaultValue"
+              label="筛选条件"
+              align="center"
+            >
+            </el-table-column> -->
+
             <!-- <el-table-column prop="isCount" label="是否统计">
               <template slot-scope="scope">
                 <el-switch v-model="scope.row.isCount"> </el-switch>
@@ -405,6 +430,18 @@
               :dragTableStyleList="dragTableStyleList"
             />
           </el-tab-pane>
+          <el-tab-pane label="数据筛选" name="dataFilter">
+            <!-- <StyleFormPanel
+              ref="styleTableRef"
+              :tableFieldList="tableFieldList"
+              :dragTableStyleList="dragTableStyleList"
+            /> -->
+            <DataFilterPanel
+              ref="dataFilterRef"
+              :tableFieldList="tableFieldList"
+              :filterDataEcho="filterDataEcho"
+            ></DataFilterPanel>
+          </el-tab-pane>
         </el-tabs>
       </el-col>
     </el-row>
@@ -621,7 +658,7 @@
               :label="item.fieldName"
               :value="item.tableName + '.' + item.fieldName"
             >
-              <span style="float: left; margin-right: 5px"
+              <span class="discribe" style="float: left; margin-right: 5px"
                 >{{ isShowTableName }}
               </span>
               <span style="float: right; color: #8492a6; font-size: 13px">{{
@@ -693,13 +730,15 @@ import "@riophae/vue-treeselect/dist/vue-treeselect.css";
 import { v4 as uuidv4 } from "uuid";
 import { listBtn } from "@/api/system/btn";
 import StyleFormPanel from "./components/StyleFormPanel.vue";
+import DataFilterPanel from "./components/DataFilterPanel.vue";
 export default {
   name: "tableMange",
   dicts: ["sys_time_format", "table_statistic_type"],
   props: [],
-  components: { Queryfrom, Treeselect, StyleFormPanel },
+  components: { Queryfrom, Treeselect, StyleFormPanel, DataFilterPanel },
   data() {
     return {
+      filterDataEcho: "", //数据过滤回显数据
       staictitle: "添加统计数据字段",
       isInputInvalid: false,
       // 修改表格时的menuId
@@ -1306,6 +1345,7 @@ export default {
       if (relaTypeArr.length) {
         sql += " " + relaTypeArr.join(" ");
       }
+
       return sql;
     },
     getStaticSQL(key) {
@@ -1519,6 +1559,9 @@ export default {
             tableName: this.tableName,
             tableFieldData: this.tableFieldList,
             formData: this.formData,
+            filterData: encodeURIComponent(
+              this.$refs.dataFilterRef?.getEchoData()
+            ),
           };
           if (!searchFieldList.length) {
             this.$message.warning("请至少选择一个包含查询字段");
@@ -1543,7 +1586,8 @@ export default {
           this.tableKey = uuidv4();
           // 表单
           let result;
-          if (this.tId && this.menuId) {
+          // if (this.tId && this.menuId) {
+          if (this.menuId) {
             let payLoad = {
               menuId: this.menuId,
               menuName: this.formData.menuName,
@@ -1585,9 +1629,18 @@ export default {
           if (result.code == 200) {
             // 更新路由
             this.reloadRouter();
+            let conditions = this.$refs.dataFilterRef?.getConditions();
+            console.log(conditions);
+            let conditionDefaultValueMap = {};
+            conditions.map((item) => {
+              conditionDefaultValueMap[item.fieldName] = encodeURIComponent(
+                " " + item.condition + " " + item.refValue
+              );
+            });
 
             // let isAsc = this.formData.isAsc == "ASC" ? 0 : 1;
             let data = {
+              conditionDefaultValueMap, //数据筛选条件
               tId: this.tId,
               dtName: this.formData.menuName,
               menuId: this.formData.routePath,
@@ -1637,8 +1690,9 @@ export default {
 
             let res;
             let res1;
-            if (this.tId && this.menuId) {
-              data.menuId = this.menuId;
+            // if (this.tId && this.menuId) {
+            if (this.tId) {
+              data.menuId = this.menuId || result.data;
               data.sqlKey = this.editData.sqlKey;
               data.tableKey = this.editData.tableKey;
               data.dragTableBtnRelevanceList = this.getBtnMapList(
@@ -1726,6 +1780,7 @@ export default {
         let echoData = JSON.parse(res.data.echoData);
         this.tableName = echoData.tableName;
         this.tableFieldList = echoData.tableFieldData;
+        this.filterDataEcho = echoData.filterData;
         let {
           isShowList,
           timeFormate,
@@ -1888,6 +1943,13 @@ export default {
 </script>
 
 <style scoped lang="scss">
+.discribe {
+  display: block;
+  max-width: 200px;
+  white-space: nowrap;
+  overflow: hidden;
+  text-overflow: ellipsis;
+}
 .ipt {
   height: 36px;
   line-height: 36px;