Ver código fonte

代码同步

lph 1 ano atrás
pai
commit
84b9ddc370
24 arquivos alterados com 2192 adições e 309 exclusões
  1. 9 12
      zkqy-ui/src/api/bpmprocess/process.js
  2. 19 0
      zkqy-ui/src/api/bpmprocess/run/executeProcess.js
  3. 13 0
      zkqy-ui/src/api/bpmprocess/runDialogApi/index.js
  4. 0 0
      zkqy-ui/src/api/bpmprocess/runDialogApi/testApi.js
  5. 26 0
      zkqy-ui/src/api/bpmprocess/script.js
  6. 1 1
      zkqy-ui/src/main.js
  7. 16 11
      zkqy-ui/src/utils/bpmn/getNodeSequence.js
  8. 2 2
      zkqy-ui/src/views/bussiness/components/TaskItem.vue
  9. 3 85
      zkqy-ui/src/views/bussiness/components/taskList.vue
  10. 0 74
      zkqy-ui/src/views/bussiness/dialogCompments/GY1.vue
  11. 95 0
      zkqy-ui/src/views/bussiness/dialogCompments/GY2.vue
  12. 156 0
      zkqy-ui/src/views/bussiness/dialogCompments/GongYi/GY01.vue
  13. 203 0
      zkqy-ui/src/views/bussiness/dialogCompments/GongYi/GY02.vue
  14. 214 0
      zkqy-ui/src/views/bussiness/dialogCompments/GongYi/GY03.vue
  15. 275 0
      zkqy-ui/src/views/bussiness/dialogCompments/GongYi/GY06.vue
  16. 151 0
      zkqy-ui/src/views/bussiness/dialogCompments/ZhiLiang/ZL1.vue
  17. 144 0
      zkqy-ui/src/views/bussiness/dialogCompments/test-component/CaiGou/CG02.vue
  18. 168 0
      zkqy-ui/src/views/bussiness/dialogCompments/test-component/CaiGou/CG1.vue
  19. 192 0
      zkqy-ui/src/views/bussiness/dialogCompments/test-component/KuCun/KC02.vue
  20. 86 0
      zkqy-ui/src/views/bussiness/dialogCompments/test-component/KuCun/KC1.vue
  21. 302 59
      zkqy-ui/src/views/bussiness/processMange.vue
  22. 3 2
      zkqy-ui/src/views/bussiness/progressShow.vue
  23. 100 60
      zkqy-ui/src/views/tableMange/index.vue
  24. 14 3
      zkqy-ui/src/views/tablelist/commonTable/listInfo.vue

+ 9 - 12
zkqy-ui/src/api/bpmprocess/process.js

@@ -101,6 +101,7 @@ export function updateConfiguration(data) {
     baseURL: process.env.VUE_APP_BASE_API4,
   })
 }
+
 // 查询流程节点详情
 export function getNodeData(processKey) {
   return request({
@@ -137,19 +138,15 @@ export function addScript(data) {
   })
 }
 
-// 修改流程节点脚本
-export function updateScript(data) {
+//触发异常节点 
+export function triggerExceptionNode(data) {
   return request({
-    url: '/system/script',
-    method: 'put',
-    data: data
+    // url: '/system/execute/node/triggerExceptionNode',
+    url: '/system/runbpm/process/triggerExceptionNode',//触发异常节点  1214版
+    method: 'post',
+    data: data,
+    baseURL: process.env.VUE_APP_BASE_API4,
   })
 }
 
-// 删除流程节点脚本
-export function delScript(id) {
-  return request({
-    url: '/system/script/' + id,
-    method: 'delete'
-  })
-}
+

+ 19 - 0
zkqy-ui/src/api/bpmprocess/run/executeProcess.js

@@ -62,3 +62,22 @@ export function runProcessNodeExecution(data) {
     baseURL: process.env.VUE_APP_BASE_API4
   })
 }
+
+// 运行节点 请求节点的表单数据
+export function getProcessNodeFormTemplate(query) {
+  return request({
+    url: '/system/runbpm/process/ProcessNodeFormTemplate',
+    method: 'get',
+    params: query,
+    baseURL: process.env.VUE_APP_BASE_API4,
+  })
+}
+// 运行节点   新 请求节点的表单数据
+export function getProcessNodeFormInfoData(query) {
+  return request({
+    url: '/system/runbpm/process/processNodeFormInfoData',
+    method: 'get',
+    params: query,
+    baseURL: process.env.VUE_APP_BASE_API4,
+  })
+}

+ 13 - 0
zkqy-ui/src/api/bpmprocess/runDialogApi/index.js

@@ -0,0 +1,13 @@
+import request from '@/utils/request'
+
+
+
+// 运行弹窗提交表单公共接口
+export function submitNodeForm(data) {
+  return request({
+    url: '/system/runbpm/process/submitNodeForm',
+    method: 'post',
+    data: data,
+    baseURL: process.env.VUE_APP_BASE_API4
+  })
+}

+ 0 - 0
zkqy-ui/src/api/bpmprocess/runDialogApi/testApi.js


+ 26 - 0
zkqy-ui/src/api/bpmprocess/script.js

@@ -0,0 +1,26 @@
+import request from '@/utils/request'
+
+// 修改流程节点脚本
+export function updateScript(data) {
+    return request({
+      url: '/system/script',
+      method: 'put',
+      data: data
+    })
+  }
+  
+  // 删除流程节点脚本
+  export function delScript(id) {
+    return request({
+      url: '/system/script/' + id,
+      method: 'delete'
+    })
+  }
+
+  //查询模板库数据表
+  export function queryTemplateBaseTable() {
+    return request({
+      url: '/system/templateBase/queryTemplateBaseTable',
+      method: 'get'
+    })
+  }

+ 1 - 1
zkqy-ui/src/main.js

@@ -71,7 +71,7 @@ import JsonExcel from 'vue-json-excel'
 
 // 自定义指令
 import Directives from '@/utils/directives'
-import './mock.js'
+// import './mock.js'
 
 // 全局方法挂载
 Vue.prototype.getDicts = getDicts

+ 16 - 11
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) {
@@ -9,12 +10,15 @@ export default function getNodeSequence(xmlObj) {
     return;
   }
   let nextNodeId = getNodeId(startNode, true, nodeList);
+  let index = 1;
   res.push({
     nodeId: startNode.id,
     preNodeId: null,
     nextNodeId: nextNodeId,
-    nodeInfo: getNodeInfo(startNode.id, nodeList)
+    nodeInfo: getNodeInfo(startNode.id, nodeList),
+    num: index,
   })
+  index++;
   while (nextNodeId) {
     if (!nextNodeId) break
     let currentId = nextNodeId;
@@ -26,19 +30,20 @@ export default function getNodeSequence(xmlObj) {
         nodeId: currentId,
         preNodeId,
         nextNodeId,
-        nodeInfo: getNodeInfo(currentId, nodeList)
+        nodeInfo: getNodeInfo(currentId, nodeList),
+        num: index,
       }
     )
+    index++;
   }
-  console.log(res);
   return res
 
 }
 /**
- *
- * @param {节点} node
- * @param {true:下一个节点的id;false:上一个节点的id} flag
- * @returns
+ * 
+ * @param {节点} node 
+ * @param {true:下一个节点的id;false:上一个节点的id} flag 
+ * @returns 
  */
 const getNodeId = (node, flag, nodeList) => {
   let theTagName = flag ? 'bpmn:outgoing' : 'bpmn:incoming';
@@ -51,9 +56,9 @@ const getNodeId = (node, flag, nodeList) => {
 }
 
 /**
- *
- * @param {节点Id} nodeId
- * @param {节点列表} nodeList
+ * 
+ * @param {节点Id} nodeId 
+ * @param {节点列表} nodeList 
  */
 function getNodeInfo(nodeId, nodeList) {
   let targetNode = nodeList.find(item => item.id == nodeId)

+ 2 - 2
zkqy-ui/src/views/bussiness/components/TaskItem.vue

@@ -7,7 +7,7 @@
     }"
   >
     <div class="task-title">
-      <span class="mr5">{{ number }}.</span>
+      <span class="mr5">{{ cardData.num }}.</span>
       <span>{{ cardData.nodeInfo.name }}</span>
     </div>
     <div class="msg-list">
@@ -75,7 +75,7 @@ export default {
   flex: 1;
   box-sizing: border-box;
   background-color: #ebe6e6;
-  // margin-right: 15px;
+  /* // margin-right: 15px; */
   .task-title {
     font-size: 14px;
     font-weight: 600;

+ 3 - 85
zkqy-ui/src/views/bussiness/components/taskList.vue

@@ -48,7 +48,6 @@
 <script>
 import uuid from "@/utils/bpmn/uuid";
 import TaskItem from "./TaskItem.vue";
-import { start } from "nprogress";
 export default {
   name: "TaskList",
   props: ["cardData"],
@@ -58,88 +57,7 @@ export default {
       baseInfo: {},
       start: 0,
       end: 5,
-      taskItemList: [
-        {
-          index: 1,
-          title: "工艺校验",
-          taskKey: uuid(),
-          excuteUser: "admin",
-          taskType: "工艺类",
-          taskstatus: true,
-        },
-        {
-          index: 2,
-          title: "工艺校验",
-          taskKey: uuid(),
-          excuteUser: "admin",
-          taskType: "工艺类",
-          taskstatus: true,
-        },
-        {
-          index: 3,
-          title: "工艺校验",
-          taskKey: uuid(),
-          excuteUser: "admin",
-          taskType: "工艺类",
-          taskstatus: true,
-        },
-        {
-          index: 4,
-          title: "工艺校验",
-          taskKey: uuid(),
-          excuteUser: "admin",
-          taskType: "工艺类",
-          taskstatus: true,
-        },
-        {
-          index: 5,
-          title: "工艺校验",
-          taskKey: uuid(),
-          excuteUser: "admin",
-          taskType: "工艺类",
-          taskstatus: true,
-        },
-        {
-          index: 6,
-          title: "工艺校验",
-          taskKey: uuid(),
-          excuteUser: "admin",
-          taskType: "工艺类",
-          taskstatus: true,
-        },
-        {
-          index: 7,
-          title: "工艺校验",
-          taskKey: uuid(),
-          excuteUser: "admin",
-          taskType: "工艺类",
-          taskstatus: true,
-        },
-        {
-          index: 8,
-          title: "工艺校验",
-          taskKey: uuid(),
-          excuteUser: "admin",
-          taskType: "工艺类",
-          taskstatus: true,
-        },
-        {
-          index: 9,
-          title: "工艺校验",
-          taskKey: uuid(),
-          excuteUser: "admin",
-          taskType: "工艺类",
-          taskstatus: true,
-        },
-        {
-          index: 10,
-          title: "工艺校验",
-          taskKey: uuid(),
-          excuteUser: "admin",
-          taskType: "工艺类",
-          taskstatus: true,
-        },
-      ],
+      taskItemList: [],
     };
   },
   computed: {
@@ -200,7 +118,7 @@ export default {
   }
   .card-list-wrap {
     margin: 5px 0 30px;
-    // height: 120px;
+    /* // height: 120px; */
     background: #fefefe;
     padding: 8px 5px;
     border-radius: 4px;
@@ -233,7 +151,7 @@ export default {
       height: 100%;
       overflow: hidden;
       display: flex;
-      // justify-content: space-around;\
+      /* // justify-content: space-around;\ */
       .card-item {
         margin-right: 15px;
         &:last-child {

+ 0 - 74
zkqy-ui/src/views/bussiness/dialogCompments/GY1.vue

@@ -1,74 +0,0 @@
-<template>
-  <div class="form-wrap">
-    <el-form
-      :model="form"
-      ref="form"
-      :rules="rules"
-      label-width="100px"
-      :inline="false"
-      size="normal"
-    >
-      <el-form-item prop="name" label="姓名:">
-        <el-input v-model="form.name"></el-input>
-      </el-form-item>
-      <el-form-item prop="number" label="运行数量:">
-        <el-input v-model="form.number"></el-input>
-      </el-form-item>
-      <el-form-item prop="remark" label="备注信息:">
-        <el-input v-model="form.remark"></el-input>
-      </el-form-item>
-    </el-form>
-  </div>
-</template>
-
-<script>
-export default {
-  name: "GY1",
-  props: [],
-  components: {},
-  data() {
-    return {
-      form: {
-        name: "",
-        number: "",
-        remark: "",
-      },
-      rules: {
-        name: [{ required: true, message: "请输入姓名", trigger: "blur" }],
-        number: [
-          { required: true, message: "请输入运行数量", trigger: "blur" },
-        ],
-        remark: [
-          { required: true, message: "请输入备注信息", trigger: "blur" },
-        ],
-      },
-    };
-  },
-  computed: {},
-  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;
-      }
-    },
-  },
-};
-</script>
-
-<style scoped></style>

+ 95 - 0
zkqy-ui/src/views/bussiness/dialogCompments/GY2.vue

@@ -0,0 +1,95 @@
+<template>
+    <div class="app-container">
+        <el-form :model="form" :rules="rules" ref="form" label-width="100px" class="demo-form">
+            <el-form-item label="产品重量" prop="zl">
+              <el-input v-model.number="form.zl" @input="handleInput"></el-input>
+            </el-form-item>
+            <el-form-item label="选择产品" prop="cp">
+              <el-select v-model="form.cp" placeholder="请选择产品">
+                <el-option label="产品1" value="chanpin1"></el-option>
+                <el-option label="产品2" value="chanpin2"></el-option>
+                <el-option label="产品3" value="chanpin3"></el-option>
+              </el-select>
+            </el-form-item>
+            <el-form-item>
+                <el-button type="primary" @click="submitForm('form')">提交</el-button>
+                <el-button @click="resetForm('form')">重置</el-button>
+              </el-form-item>
+        </el-form>
+
+    </div>
+</template>
+<script>
+export default {
+  name: "GY1",
+  props: [],
+  components: {},
+  data() {
+    return {
+        form: {
+            zl: '',
+            cp:''
+        },
+        rules: {
+            zl: [
+                { required: true, message: '请输入产品重量', trigger: 'blur' },
+                { type: 'number', message: '重量必须为数字值',trigger: 'blur' }
+            ],
+            cp: [
+                { required: true, message: '请选择产品', trigger: 'change' },
+            ]
+        }
+    }
+  },
+  methods:{
+    submitForm(formName) {
+        this.$refs[formName].validate((valid) => {
+          if (valid) {
+            alert('submit!');
+          } else {
+            console.log('error submit!!');
+            return false;
+          }
+        });
+      },
+      resetForm(formName) {
+        this.$refs[formName].resetFields();
+      },
+      handleInput() {
+        if (!/^[1-9]\d*$/.test(this.form.zl)) {
+            this.$message.error('请输入正整数!');
+        }
+      },
+      async getFormData() {
+        let formData = {
+          flag: false,
+          msg: "",
+        };
+        try {
+          let valid = await this.$refs.reluForm.validate();
+          if (valid) {
+            formData.flag = true;
+            formData.data = this.reluForm;
+            formData.msg = "表单校验成功";
+            return formData;
+          } else {
+            formData.msg = "表单校验异常,请规范填写表单数据";
+            return formData;
+          }
+        } catch (error) {
+          // console.log(error);
+          formData.msg = "表单校验异常,请规范填写表单数据";
+          return formData;
+        }
+      },
+  },
+}
+</script>
+<style lang="scss" scoped>
+.app-container {
+  margin-top: 20px;
+  .el-input__inner {
+    width: 20px;
+  }
+}
+</style>

+ 156 - 0
zkqy-ui/src/views/bussiness/dialogCompments/GongYi/GY01.vue

@@ -0,0 +1,156 @@
+<template>
+  <div class="form-wrap">
+    <el-form
+      :model="form"
+      ref="form"
+      :rules="rules"
+      label-width="100px"
+      :inline="false"
+      size="normal"
+    >
+      <el-form-item prop="name" label="选择货品:">
+        <el-select
+          v-model="form.goodsID"
+          placeholder="请选择货品"
+          clearable
+          filterable
+        >
+          <el-option
+            v-for="item in []"
+            :key="item.value"
+            :label="item.label"
+            :value="item.value"
+          >
+          </el-option>
+        </el-select>
+      </el-form-item>
+      <el-form-item prop="yield" label="生产重量:">
+        <!-- <el-input v-model="form.yield" type="number"></el-input> -->
+        <el-input-number
+          v-model="form.yield"
+          :min="0"
+          label="请输入生产重量"
+        ></el-input-number>
+      </el-form-item>
+      <!-- <el-form-item prop="remark" label="备注信息:">
+        <el-input v-model="form.remark"></el-input>
+      </el-form-item> -->
+    </el-form>
+  </div>
+</template>
+
+<script>
+export default {
+  name: "GY01",
+  props: ["formData", "row"],
+  components: {},
+  data() {
+    return {
+      form: {
+        name: "",
+        number: "",
+        remark: "",
+        yield: "",
+      },
+      isEdite: false,
+      rules: {
+        name: [{ required: true, message: "请输入姓名", trigger: "blur" }],
+        number: [
+          { required: true, message: "请输入运行数量", trigger: "blur" },
+        ],
+        remark: [
+          { required: true, message: "请输入备注信息", trigger: "blur" },
+        ],
+      },
+    };
+  },
+  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,
+        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;
+      }
+    },
+  },
+};
+</script>
+
+<style scoped></style>

+ 203 - 0
zkqy-ui/src/views/bussiness/dialogCompments/GongYi/GY02.vue

@@ -0,0 +1,203 @@
+<template>
+  <div class="app-container">
+    <div class="leftMessage">
+      <div class="list" v-for="(item, index) in baseMessage" :key="index">
+        <span class="titile" style="background:rgb(52,191,163); color:white;"> {{ item.title}} </span>
+        <span class="content" style="background:rgb(235,237,242); color:rgb(232,83,152);"> {{ item.content}} </span>
+      </div>
+      <div class="content"></div>
+    </div>
+    <div class="rightMessage">
+      <div class="top">       
+        <div class="state">
+          <div class="list">
+            <span>工序状态:</span>
+            <p>初始</p>
+          </div>
+          <div class="list">
+            <span>是否外协:</span>
+            <p>初始</p>
+          </div>
+        </div>    
+      </div>
+      <div class="button">
+        <el-button-group>
+          <el-button type="primary" icon="el-icon-video-play" plain round>开始</el-button>
+          <el-button type="danger" icon="el-icon-video-pause" plain>暂停</el-button> 
+          <el-button type="success" icon="el-icon-circle-check" plain>完成</el-button> 
+          <el-button type="info" icon="el-icon-refresh" plain round>重置</el-button>       
+ 
+        </el-button-group>
+
+      </div>
+      <div class="middle">
+        <el-table :data="tableData2" border >
+          <el-table-column>
+            
+          </el-table-column>
+        </el-table>
+        <div class="name">人员及工时分配</div>       
+        <el-table :data="tableData1" border ref="addTableRowRef">
+          <el-table-column label="人员姓名">
+            <template slot-scope="scope">
+              <el-input v-model="scope.row.name"></el-input>
+            </template>
+          </el-table-column>
+          <el-table-column label="分配工时">
+            <template slot-scope="scope">
+              <el-input-number v-model="scope.row.time" controls-position="right" @change="handleChange" :min="0.25" :max="8" :step="0.25"></el-input-number>
+            </template>
+          </el-table-column>
+          <el-table-column label="操作" width="120" align="center">
+            <template slot-scope="scope">
+              <el-button
+              icon="el-icon-delete"
+              size="mini"
+              @click="deleteTableRow(scope.row)"
+              >删除</el-button>
+            </template>
+          </el-table-column>
+        </el-table>
+        <div class="block">
+          <el-pagination
+            layout="prev, pager, next"
+            :total="50">
+          </el-pagination>
+        </div>
+        <el-button size="mini" icon="el-icon-plus" type="primary" @click="addTableRow">新 增</el-button>
+        <el-button size="mini" icon="el-icon-check" type="success" @click="saveTableRow(newRow)">保 存</el-button>
+      </div>
+      <div class="footer">
+       <div class="total">
+        <span>当前工序总工时: 10</span>
+        <span>当前已分配工时: 10</span>
+        <span>当前剩余工时: 10</span>
+       </div>
+      </div>
+    </div>
+    
+  </div>
+</template>
+<script>
+export default {
+  name: 'GY02',
+  data() {
+    return {
+      tableData1: [],
+      tableData2: [],
+      newRow: {},
+      baseMessage: [
+        { title:'任务', content:'47as04-51-1238'},
+        { title:'图号', content:'1CG12-38'},
+        { title:'名称', content:'支架'},
+        { title:'数量', content:'1'},
+        { title:'工艺', content:'1'},
+        { title:'质控', content:'1'},
+      ]
+    }
+  },
+  methods: {
+    addTableRow() {
+      const newRow = {
+          name: '',
+          time: 0.25,
+      };  
+      this.tableData1.push(newRow);       
+    },
+    deleteTableRow(row) {
+      const index = this.tableData1.indexOf(row);
+      if (index !== -1) {
+        this.tableData1.splice(index, 1);
+      }
+    },
+    saveTableRow(tableData1) {
+      let item = '';
+      for(let i = 0; i < this.tableData1.length; i++) {
+        item += tableData1[i]
+      }
+      this.tableData2 = this.item;
+      this.tableData1 = [];
+    },
+    handleChange(value) {
+      console.log(value);
+    }
+
+  },
+}
+</script>
+
+<style lang="scss" scoped>
+.app-container {
+  display: flex;
+  flex-direction: row;
+  justify-content: space-between;
+  .leftMessage {
+    display: flex;
+    flex-direction: column;
+    width: 180px;
+    .list {
+      padding: 10px 0px ;
+      span {  
+        border-radius: 10px;
+        padding: 5px;
+        margin-right: 10px;
+      }
+    }
+    
+  }
+  .rightMessage {
+    display: flex;
+    width: 500px;
+    flex-direction: column;
+    .top {
+      background: #53B0F8;
+      color: white;
+      height: 60px;
+      .state {
+        display: flex;
+        flex-direction: row;
+        padding: 10px 20px;
+        span {
+          padding-right: 150px;
+        }
+        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;
+        font-weight: bold;
+        text-align: center;
+        padding: 10px 0px;
+      }
+      .block {
+        text-align: center;
+      }
+    }
+    .footer {
+      display: inline-block;
+      flex-direction: row;
+      margin-top: 10px;
+      span {
+        font-weight: bold;
+        color: black;
+      }
+    }
+  }
+}
+</style>

+ 214 - 0
zkqy-ui/src/views/bussiness/dialogCompments/GongYi/GY03.vue

@@ -0,0 +1,214 @@
+<template>
+  <div class="form-wrap">
+    <el-form
+      :model="form"
+      ref="form"
+      :rules="rules"
+      label-width="100px"
+      :inline="true"
+      size="normal"
+      class="form-body-wrap"
+    >
+      <el-form-item prop="material" label="材料:">
+        <el-select
+          v-model="form.material"
+          placeholder="请选择材料"
+          clearable
+          filterable
+        >
+          <el-option
+            v-for="item in myFormData.resultMap.caiLiao"
+            :key="item.materialId"
+            :label="item.materialName"
+            :value="item.materialId"
+          >
+          </el-option>
+        </el-select>
+      </el-form-item>
+      <el-form-item prop="technology" label="工艺:">
+        <!-- <el-input v-model="form.yield" type="number"></el-input> -->
+        <el-select
+          v-model="form.technology"
+          placeholder="请选择工艺"
+          clearable
+          filterable
+        >
+          <el-option
+            v-for="item in myFormData.resultMap.gongyi"
+            :key="item.id"
+            :label="item.stepName"
+            :value="item.id"
+          >
+          </el-option>
+        </el-select>
+      </el-form-item>
+      <el-form-item label="生产数量" prop="productionQuantity">
+        <el-col :span="10">
+          <!-- <el-input
+            onkeypress="return( /[\d]/.test(String.fromCharCode(event.keyCode)))"
+            v-model="form.productionQuantity"
+            placeholder="请输入生产数量"
+            size="normal"
+            clearable
+          ></el-input> -->
+          <el-input-number
+            v-model="form.productionQuantity"
+            controls-position="right"
+            :min="0"
+          />
+        </el-col>
+      </el-form-item>
+      <el-form-item>
+        <el-button type="primary" size="default" @click="submitHanfler"
+          >确认提交</el-button
+        >
+      </el-form-item>
+
+      <!-- <el-form-item prop="remark" label="备注信息:">
+        <el-input v-model="form.remark"></el-input>
+      </el-form-item> -->
+    </el-form>
+  </div>
+</template>
+
+<script>
+import { submitNodeForm } from "@/api/bpmprocess/runDialogApi/index";
+export default {
+  name: "GY03",
+  props: ["formData", "row"],
+  components: {},
+  data() {
+    return {
+      realFormData: {},
+      form: {
+        material: "",
+        technology: "",
+        productionQuantity: 0,
+      },
+      rules: {
+        material: [
+          { required: true, message: "请选择材料", trigger: "change" },
+        ],
+        technology: [
+          { required: true, message: "请选择工艺", trigger: "change" },
+        ],
+        productionQuantity: [
+          { required: true, message: "请输入生产数量", trigger: "change" },
+        ],
+      },
+    };
+  },
+  watch: {
+    myFormData: {
+      handler(nval) {
+        this.realFormData = nval;
+      },
+      deep: true,
+      immediate: true,
+    },
+  },
+  computed: {
+    myFormData() {
+      return this.formData;
+    },
+    isEdit() {
+      return this.formData.resultMap?.id ? true : false;
+    },
+  },
+  methods: {
+    async getFormData() {
+      let res = {
+        flag: false,
+        msg: "",
+      };
+      try {
+        let valid = await this.$refs.form.validate();
+        if (valid) {
+          res.flag = true;
+          res.data = this.form;
+          return res;
+        } else {
+          res.msg = "表单校验异常,请规范填写表单数据";
+          return res;
+        }
+      } catch (error) {
+        // console.log(error);
+        res.msg = "表单校验异常,请规范填写表单数据";
+        return res;
+      }
+    },
+    resetForm() {
+      this.$refs.form.resetFields();
+    },
+    async submitHanfler() {
+      let res = await this.$refs.form?.validate();
+      if (res) {
+        let payLoad = {};
+        let { material, technology, productionQuantity } = this.form;
+        if (this.isEdit) {
+          payLoad.updateCommonEntityList = [
+            {
+              basicMap: {
+                tableName: "productionrecords",
+              },
+              /* addListMap: [
+                {
+                  material_information: material,
+                  process_information: technology,
+                  actual_quantity: productionQuantity,
+                  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 {
+          payLoad.insertCommonEntityList = [
+            {
+              basicMap: {
+                tableName: "productionrecords",
+              },
+              addListMap: [
+                {
+                  material_information: material,
+                  process_information: technology,
+                  actual_quantity: productionQuantity,
+                  taskKey: this.row.benTaskProcessKey,
+                  taskNodeKey: this.row.benTaskNodeKey,
+                },
+              ],
+            },
+          ];
+        }
+        submitNodeForm(payLoad).then((response) => {
+          if (response.code == 200) {
+            this.$modal.msgSuccess("保存成功");
+          } else {
+            this.$modal.msgSuccess("保存失败,请稍后再试");
+          }
+        });
+      }
+    },
+  },
+  mounted() {
+    this.resetForm();
+  },
+};
+</script>
+
+<style scoped lang="scss">
+.form-body-wrap {
+  display: flex;
+  flex-direction: column;
+  align-items: center;
+}
+</style>

+ 275 - 0
zkqy-ui/src/views/bussiness/dialogCompments/GongYi/GY06.vue

@@ -0,0 +1,275 @@
+<template>
+  <div class="form-wrap">
+    <div class="cardwrap">
+      <div class="title-area">
+        <span><i class="el-icon-s-order mr5"></i>请选择工艺文件</span>
+        <div class="search ml10">
+          <el-input
+            v-model="search"
+            placeholder="请输入内容"
+            suffix-icon="el-icon-search"
+          ></el-input>
+        </div>
+      </div>
+      <div class="table-area">
+        <el-table :data="[]" border stripe>
+          <el-table-column type="index" width="50" />
+          <el-table-column
+            v-for="col in columns"
+            :prop="col.prop"
+            :key="col.prop"
+            :label="col.label"
+          >
+          </el-table-column>
+        </el-table>
+      </div>
+    </div>
+    <div class="cardwrap">
+      <div class="title-area">
+        <span><i class="el-icon-document mr5"></i>材料信息</span>
+      </div>
+      <div class="table-area">
+        <el-table :data="[]" border stripe>
+          <el-table-column type="index" width="50" />
+          <el-table-column
+            v-for="col in material"
+            :prop="col.prop"
+            :key="col.prop"
+            :label="col.label"
+          >
+          </el-table-column>
+        </el-table>
+      </div>
+    </div>
+    <div class="cardwrap">
+      <div class="title-area">
+        <span><i class="el-icon-help mr5"></i>工序</span>
+      </div>
+      <div class="node-list">
+        <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>
+    </div>
+  </div>
+</template>
+
+<script>
+import getNodeSequence from "@/utils/bpmn/getNodeSequence";
+import { xmlStr2XmlObj } from "@/utils/bpmn/xml";
+export default {
+  name: "GY01",
+  props: ["formData", "row"],
+  components: {},
+  data() {
+    return {
+      search: "",
+      nodeList: [],
+      currentNodeKey: "",
+      resFormData: {},
+      columns: [
+        {
+          label: "编号",
+          prop: "id",
+        },
+        {
+          label: "编者",
+          prop: "editor",
+        },
+        {
+          label: "时间",
+          prop: "time",
+        },
+      ],
+      material: [
+        {
+          label: "名称",
+          prop: "name",
+        },
+        {
+          label: "尺寸",
+          prop: "size",
+        },
+        {
+          label: "规格",
+          prop: "model",
+        },
+        {
+          label: "数量",
+          prop: "num",
+        },
+        {
+          label: "备注",
+          prop: "note",
+        },
+      ],
+    };
+  },
+  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: "",
+      };
+
+      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);
+    },
+  },
+};
+</script>
+
+<style scoped lang="scss">
+.form-wrap {
+  display: flex;
+  flex-direction: column;
+  width: 100%;
+
+  .cardwrap {
+    display: flex;
+    flex-direction: column;
+    width: 100%;
+    padding-bottom: 20px;
+    .title-area {
+      display: flex;
+      align-items: center;
+      padding-bottom: 5px;
+      font-size: 16px;
+      border-bottom: 2px solid rgba(0, 0, 0, 0.404);
+      box-sizing: border-box;
+    }
+    .table-area {
+      padding-top: 10px;
+    }
+    .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;
+          margin-right: 5px;
+        }
+        .title {
+          /* // color: #ececee34; */
+          font-size: 14px;
+          flex: 1;
+          /* // ma */
+        }
+        .time {
+          font-size: 12px;
+          color: rgba(48, 44, 44, 0.247);
+          margin-right: 10px;
+        }
+      }
+      .currentNode {
+        background-color: #7dec8f !important;
+      }
+    }
+  }
+}
+</style>

+ 151 - 0
zkqy-ui/src/views/bussiness/dialogCompments/ZhiLiang/ZL1.vue

@@ -0,0 +1,151 @@
+<template>
+    <div class="app-container">
+        <div class="fixture">
+            <div class="title">
+                <i class="el-icon-c-scale-to-original"></i>
+                <span>工装信息</span>
+            </div>
+            <div class="message">
+                <div class="list" v-for="(item,index ) in message" :key="index">
+                   <div class="list-card">
+                    <p> {{ item.title }}</p>
+                    <p class="content"> {{ item.content }} </p>
+                   </div>
+                </div>
+            </div>
+        </div>
+        <div class="material">
+            <div class="title">
+                <i class="el-icon-c-scale-to-original"></i>
+                <span>物料需求信息</span>
+            </div>
+            <div class="message">
+                <div class="list" v-for="(item,index ) in message" :key="index">
+                   <div class="list-card">
+                    <p> {{ item.title }}</p>
+                    <p class="content"> {{ item.content }} </p>
+                   </div>
+                </div>
+            </div>
+        </div>
+        <div class="card">
+            <div class="title"><span>质控卡号</span></div>
+            <el-input v-model="input" placeholder="请输入内容"></el-input>
+        </div>
+        <div class="submit">
+            <el-button type="success" icon="el-icon-success">记录质控卡</el-button>
+        </div>
+    </div>
+</template>
+
+<script>
+export default {
+    name: 'ZL1',
+
+    data() {
+        return {
+            message: [
+                {title: '任务编号', content: 'task_50'},
+                {title: '图号', content: 'drawinng_50'},
+                {title: '投产数量', content: '1'},
+                {title: '牌号', content: '1'},
+                {title: '状态', content: '1'},
+                {title: '标准', content: '1'},
+                {title: '物资名称', content: '1'},
+                {title: '材料/产品', content: '1'},
+                {title: '规格', content: '1'},
+                {title: '尺寸', content: '1'},
+                {title: '备注', content: '1'},
+            ],
+            input: '',
+        };
+    },
+
+    mounted() {
+        
+    },
+
+    methods: {
+        recordValue() {
+            this.$emit('ZL1', this.message[0].content);
+        }
+    },
+};
+</script>
+
+<style lang="scss" scoped>
+.fixture {
+    border-top: #e2e1e1 solid 1px;
+    .title {
+        display: flex;
+        flex-direction: row;
+        padding: 10px 0px; 
+    }
+    .message {
+        display: flex;
+        /* height: 120px; */
+        width: 700px;
+        border: #f1f1f1 solid 3px;
+        padding-bottom: 5px;
+        flex-wrap: wrap;
+        .list {
+            height: 70px;
+            width: 110px;
+            padding: 10px;
+            display: flex;
+            flex-direction: row;
+            /* justify-content: center; */
+            flex-wrap: wrap;
+            p {
+                text-align: center;
+            }
+            .content {
+                font-weight: bold;
+            }
+        }
+    }
+}
+.material {
+    padding-top: 2px;
+    .title {
+        display: flex;
+        flex-direction: row;
+        padding: 10px 0px;
+    }
+    .message {
+        display: flex;
+        /* height: 120px; */
+        width: 700px;
+        border: #f1f1f1 solid 3px;
+        padding-bottom: 5px;
+        flex-wrap: wrap;
+        .list {
+            height: 70px;
+            width: 110px;
+            padding: 10px;
+            display: flex;
+            flex-direction: row;
+            /* justify-content: center; */
+            flex-wrap: wrap;
+            p {
+                text-align: center;
+            }
+            .content {
+                font-weight: bold;
+            }
+        }
+    }
+}
+.card {
+    .title {
+        padding: 10px 0px;
+    }
+}
+.submit {
+    display: flex;
+    flex-direction: row-reverse;
+    padding: 10px 0px;
+    border-bottom: #e2e1e1 solid 1px;
+
+}
+</style>

+ 144 - 0
zkqy-ui/src/views/bussiness/dialogCompments/test-component/CaiGou/CG02.vue

@@ -0,0 +1,144 @@
+<template>
+  <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";
+export default {
+    name: 'CG02',
+    props: ["formData", "row"],
+    data() {
+        return {
+            // 表单参数
+            form: {
+                zl:'',
+                ycl: '',
+            },
+            // 表单校验
+            rules: {
+                ycl: [{ required: true, message: "请选择原材料", trigger: "change" }],
+                zl:{ required: true, message: "请输入重量", trigger: "blur" },
+            },
+        };
+    },
+    watch: {
+        myFormData: {
+            handler(nval) {
+                this.realFormData = nval;
+            },
+            deep: true,
+            immediate: true,
+        },
+    },
+
+  mounted() {},
+
+    methods: {
+        async submitHanfler() {
+        let res = await this.$refs.form?.validate();
+        if (res) {
+            let payLoad = {};
+            let { ycl, zl } = this.form;
+            if (this.isEdit) {
+            payLoad.updateCommonEntityList = [
+                {
+                    basicMap: {
+                        tableName: "kucun",
+                    },
+                    addListMap: [
+                        {
+                        ycl,
+                        zl,
+                        taskKey: this.row.benTaskProcessKey,
+                        taskNodeKey: this.row.benTaskNodeKey,
+                        },
+                    ],
+                },
+            ];
+            } 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,
+        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>

+ 168 - 0
zkqy-ui/src/views/bussiness/dialogCompments/test-component/CaiGou/CG1.vue

@@ -0,0 +1,168 @@
+<template>
+  <!-- 采购表单 -->
+  <div class="app-container">
+    <!-- 添加或修改采购单对话框 -->
+    <el-form ref="form" :model="form" :rules="rules" label-width="80px">
+      <el-form-item label="原材料" prop="ycl">
+        <!-- <el-input v-model="form.ycl" placeholder="请输入原材料" /> -->
+        <el-select
+          v-model="form.ycl"
+          placeholder="请选择原材料"
+          clearable
+          filterable
+        >
+          <el-option
+            v-for="item in goodsList"
+            :key="item.goodsno"
+            :label="item.goodsname"
+            :value="item.goodsno"
+          >
+          </el-option>
+        </el-select>
+      </el-form-item>
+      <el-form-item label="供应商" prop="gys">
+        <el-input v-model="form.gys" placeholder="请输入供应商" />
+      </el-form-item>
+      <el-form-item label="重量" prop="zl">
+        <el-input v-model="form.zl" placeholder="请输入重量" />
+      </el-form-item>
+      <el-form-item label="单价" prop="dj">
+        <el-input v-model="form.dj" placeholder="请输入单价" />
+      </el-form-item>
+      <el-form-item label="备注" prop="remark">
+        <el-input v-model="form.remark" placeholder="请输入备注" />
+      </el-form-item>
+    </el-form>
+    <div slot="footer" class="dialog-footer">
+      <el-button type="primary" @click="submitForm">确 定</el-button>
+    </div>
+  </div>
+</template>
+
+<script>
+import { submitNodeForm } from "@/api/bpmprocess/runDialogApi/index";
+export default {
+  name: "CG1",
+  props: ["row", "formData"],
+  data() {
+    return {
+      // 表单参数
+      form: {},
+      // 表单校验
+      rules: {},
+      isEdit: false, //是否是编辑状态
+    };
+  },
+  created() {},
+  mounted() {
+    this.reset();
+  },
+  watch: {
+    formData: {
+      handler(nval) {
+        if (nval.id) this.isEdit = true;
+        this.form = nval.resultMap;
+      },
+    },
+  },
+  computed: {
+    goodsList() {
+      return this.formData.resultMap?.goodsList || [];
+    },
+  },
+  methods: {
+    // 表单重置
+    reset() {
+      this.form = {
+        ycl: null,
+        gys: null,
+        zl: null,
+        dj: null,
+      };
+      // this.resetForm("form");
+    },
+    /** 提交按钮 */
+    submitForm() {
+      console.log(this.row);
+      this.$refs["form"].validate((valid) => {
+        let { ycl, gys, zl, dj } = this.form;
+
+        let payLoad = {};
+        if (this.isEdit) {
+          payLoad.updateCommonEntityList = [
+            {
+              basicMap: {
+                tableName: "caigou",
+              },
+              // 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 {
+          payLoad.insertCommonEntityList = [
+            {
+              basicMap: {
+                tableName: "caigou",
+              },
+              addListMap: [
+                {
+                  ycl,
+                  gys,
+                  zl,
+                  dj,
+                  taskKey: this.row.benTaskProcessKey,
+                  taskNodeKey: this.row.benTaskNodeKey,
+                },
+              ],
+            },
+          ];
+        }
+        submitNodeForm(payLoad).then((response) => {
+          this.$modal.msgSuccess("新增成功");
+          this.open = 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;
+      }
+    },
+  },
+};
+</script>

+ 192 - 0
zkqy-ui/src/views/bussiness/dialogCompments/test-component/KuCun/KC02.vue

@@ -0,0 +1,192 @@
+<template>
+  <div class="form-wrap">
+    <el-form
+      :model="form"
+      ref="form"
+      :rules="rules"
+      label-width="100px"
+      :inline="true"
+      size="normal"
+      class="form-body-wrap"
+    >
+      <el-form-item prop="goodsno" label="商品:">
+        <el-select
+          v-model="form.goodsno"
+          placeholder="请选择商品"
+          clearable
+          filterable
+          :disabled="disable"
+        >
+          <el-option
+            v-for="item in myFormData.resultMap.goods"
+            :key="item.id"
+            :label="item.productname"
+            :value="item.id"
+          >
+          </el-option>
+        </el-select>
+      </el-form-item>
+      <el-form-item prop="quantitystock" label="入库数量:">
+        <el-input-number
+          v-model="form.quantitystock"
+          controls-position="right"
+          :min="0"
+        />
+      </el-form-item>
+      <el-form-item>
+        <el-button type="primary" size="default" @click="submitHanfler"
+          >确认提交</el-button
+        >
+      </el-form-item>
+
+      <!-- <el-form-item prop="remark" label="备注信息:">
+        <el-input v-model="form.remark"></el-input>
+      </el-form-item> -->
+    </el-form>
+  </div>
+</template>
+
+<script>
+import { submitNodeForm } from "@/api/bpmprocess/runDialogApi/index";
+export default {
+  name: "KC02",
+  props: ["formData", "row"],
+  components: {},
+  data() {
+    return {
+      realFormData: {},
+      disable: false,
+      form: {
+        goodsno: "",
+        quantitystock: 0,
+      },
+      rules: {
+        // goodsno: [{ required: true, message: "请选择材料", trigger: "change" }],
+        quantitystock: [
+          { required: true, message: "请输入生产数量", trigger: "change" },
+        ],
+      },
+    };
+  },
+  watch: {
+    myFormData: {
+      handler(nval) {
+        this.realFormData = nval;
+        // if (nval?.resultMap.id) {
+        this.form = nval?.resultMap;
+        // }
+      },
+      deep: true,
+      immediate: true,
+    },
+  },
+  computed: {
+    myFormData() {
+      return this.formData;
+    },
+    isEdit() {
+      return this.formData.resultMap?.id ? true : false;
+    },
+  },
+  methods: {
+    async getFormData() {
+      let res = {
+        flag: false,
+        msg: "",
+      };
+      try {
+        let valid = await this.$refs.form.validate();
+        if (valid) {
+          res.flag = true;
+          res.data = this.form;
+          return res;
+        } else {
+          res.msg = "表单校验异常,请规范填写表单数据";
+          return res;
+        }
+      } catch (error) {
+        // console.log(error);
+        res.msg = "表单校验异常,请规范填写表单数据";
+        return res;
+      }
+    },
+    resetForm() {
+      this.$refs.form.resetFields();
+      this.$nextTick(this.setDefaultGoods);
+    },
+    setDefaultGoods() {
+      if (this.myFormData.resultMap.goods.length == 1) {
+        this.form.goodsno = this.myFormData.resultMap.goods[0].id;
+        this.disable = true;
+      }
+    },
+    async submitHanfler() {
+      let res = await this.$refs.form?.validate();
+      if (res) {
+        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,
+              //   },
+              // ],
+              conditionMap: {
+                task_key: taskKey,
+                task_node_key: taskNodeKey,
+              },
+              commMap: {
+                goodsno,
+                quantitystock,
+              },
+            },
+          ];
+        } else {
+          payLoad.insertCommonEntityList = [
+            {
+              basicMap: {
+                tableName: "warehouse",
+              },
+              addListMap: [
+                {
+                  goodsno,
+                  quantitystock,
+                  taskKey: this.row.benTaskProcessKey,
+                  taskNodeKey: this.row.benTaskNodeKey,
+                },
+              ],
+            },
+          ];
+        }
+        submitNodeForm(payLoad).then((response) => {
+          if (response.code == 200) {
+            this.$modal.msgSuccess("保存成功");
+          } else {
+            this.$modal.error("保存失败,请稍后再试");
+          }
+        });
+      }
+    },
+  },
+  mounted() {
+    this.resetForm();
+  },
+};
+</script>
+
+<style scoped lang="scss">
+.form-body-wrap {
+  display: flex;
+  flex-direction: column;
+  align-items: center;
+}
+</style>

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

@@ -0,0 +1,86 @@
+<template>
+  <!-- 采购表单 -->
+  <div class="app-container">
+    <!-- 添加或修改采购单对话框 -->
+    <el-form ref="form" :model="form" :rules="rules" label-width="80px">
+      <el-form-item label="原材料" prop="ycl">
+        <el-input v-model="form.ycl" placeholder="请输入原材料" />
+      </el-form-item>
+      <el-form-item label="重量" prop="zl">
+        <el-input v-model="form.zl" placeholder="请输入重量" />
+      </el-form-item>
+      <el-form-item label="备注" prop="remark">
+        <el-input v-model="form.remark" placeholder="请输入备注" />
+      </el-form-item>
+    </el-form>
+    <!-- <div slot="footer" class="dialog-footer">
+      <el-button type="primary" @click="submitForm">确 定</el-button>
+      <el-button @click="cancel">取 消</el-button>
+    </div> -->
+  </div>
+</template>
+
+<script>
+export default {
+  name: "CG1",
+  data() {
+    return {
+      // 表单参数
+      form: {},
+      // 表单校验
+      rules: {},
+    };
+  },
+  created() {},
+  methods: {
+    // 表单重置
+    reset() {
+      this.form = {
+        id: null,
+        ycl: null,
+        zl: null,
+        remark: null,
+        createById: null,
+        createBy: null,
+        createTime: null,
+        updateById: null,
+        updateBy: null,
+        updateTime: null,
+        delFlag: null,
+      };
+    },
+    /** 提交按钮 */
+    submitForm() {
+      this.$refs["form"].validate((valid) => {
+        // addCaigou(this.form).then((response) => {
+        //   this.$modal.msgSuccess("新增成功");
+        //   this.open = false;
+        //   this.getList();
+        // });
+      });
+    },
+    // 获取表单数据
+    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;
+      }
+    },
+  },
+};
+</script>

+ 302 - 59
zkqy-ui/src/views/bussiness/processMange.vue

@@ -8,7 +8,7 @@
             <span class="title">我的处理</span>
             <span class="sub-title">需要我处理的管道</span>
           </div>
-          <span class="data">{{tableData.length||0}}</span>
+          <span class="data">{{ tableData.length }}</span>
         </div>
       </el-col>
       <el-col :xs="24" :md="8" :xl="8" class="col">
@@ -40,9 +40,14 @@
               <el-radio-button :label="1">我的处理</el-radio-button>
               <el-radio-button :label="2">其他处理</el-radio-button>
             </el-radio-group>
-            <el-radio-group class="btn-list-two" v-model="taskStatus">
-              <el-radio-button :label="3">已完成</el-radio-button>
-              <el-radio-button :label="4">进行中</el-radio-button>
+            <el-radio-group
+              class="btn-list-two"
+              v-model="queryParams.taskProcessState"
+              @change="getList"
+            >
+              <el-radio-button label="3">已完成</el-radio-button>
+              <el-radio-button label="0">进行中</el-radio-button>
+              <el-radio-button label="">所有</el-radio-button>
             </el-radio-group>
           </div>
           <div class="search-input">
@@ -76,7 +81,13 @@
                 getDictLabel(scope.row.bepTaskProcessType, dict.type.bpm_type)
               }}</span>
               <span v-else-if="col.prop == 'benTaskNodeState'">{{
-                scope.row.benTaskNodeState == "0" ? "已执行" : "未执行"
+                scope.row.benTaskNodeState == "0" ? "未执行" : "已执行"
+              }}</span>
+              <span v-else-if="col.prop == 'bepTaskProcessState'">{{
+                getDictLabel(
+                  scope.row.bepTaskProcessState,
+                  dict.type.task_process_state
+                )
               }}</span>
               <span v-else>{{ scope.row[col.prop] }}</span>
             </template>
@@ -89,6 +100,7 @@
                   plain
                   size="small"
                   class="mr10 mb5"
+                  v-show="scope.row.bepTaskProcessState == '0'"
                   @click="opneExecuteNode(scope.row)"
                 >
                   运行
@@ -109,19 +121,26 @@
                       </el-button>
                     </el-dropdown-item> -->
                     <el-dropdown-item>
-                      <el-dropdown
-                        size="mini"
-                        @command="
-                          (command) => handleCommand(command, scope.row)
-                        "
-                      >
+                      <el-dropdown size="mini">
                         <el-button
                           size="mini"
                           type="text"
                           icon="el-icon-d-arrow-right"
                           >触发异常
                         </el-button>
-                        <el-dropdown-menu slot="dropdown"> </el-dropdown-menu>
+                        <el-dropdown-menu slot="dropdown">
+                          <el-dropdown-item
+                            v-for="item in scope.row.exceptionScriptList"
+                            :key="item.id"
+                          >
+                            <el-button
+                              @click="exceptionTrigger(scope.row, item)"
+                              size="mini"
+                              type="text"
+                              >{{ item.scriptName }}
+                            </el-button>
+                          </el-dropdown-item>
+                        </el-dropdown-menu>
                       </el-dropdown>
                     </el-dropdown-item>
                   </el-dropdown-menu>
@@ -130,6 +149,7 @@
             </template>
           </el-table-column>
         </el-table>
+
         <!--    分页    -->
         <pagination
           v-show="total > 0"
@@ -139,13 +159,42 @@
           @pagination="getList"
         />
       </div>
+
       <div class="show-window">
         <!-- 运行节点弹窗 -->
-        <el-dialog :title="nodeTitle" :visible.sync="open" width="50%">
-          <!-- <el-form label-width="100px" :model="commonData">
+
+        <el-dialog :title="nodeTitle" :visible.sync="open">
+          <!--  <el-form label-width="100px" :model="commonData">
             <h1>这里会引入当前节点需要处理的表单</h1>
           </el-form> -->
-          <component v-if="myForm" :is="myForm" ref="myFormRef"></component>
+          <!-- <k-form-build
+            v-if="formType == 'dragForm'"
+            class="formBuild"
+            ref="addFromRef"
+            :dynamicData="dynamicData"
+            :defaultValue="defaultValue"
+            :value="jsonData"
+          /> -->
+          <!-- <DialogTemplate
+            v-else-if="formType == 'composeForm'"
+            ref="dialogRef"
+            :groupKey="groupKey"
+            :rowobj="row"
+            :subCount="subCount"
+            :tableCount="tableCount"
+            :subTableName="subTableName"
+            @addList="() => {}"
+          ></DialogTemplate> -->
+          <!-- ></DialogTemplate> -->
+          <component
+            :is="myForm"
+            :formData="formData"
+            :row="row"
+            ref="myFormRef"
+          ></component>
+          <!-- <CG1 ref="myFormRef"></CG1>
+          <KC1 ref="myFormRef"></KC1> -->
+          <!-- <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>
@@ -160,15 +209,31 @@
 import {
   processList,
   runProcessNodeExecution,
+  getProcessNodeFormTemplate,
+  getProcessNodeFormInfoData,
 } from "@/api/bpmprocess/run/executeProcess";
+import { triggerExceptionNode } from "@/api/bpmprocess/process";
+
 import getNodeSequence from "@/utils/bpmn/getNodeSequence";
-import GY1 from "./dialogCompments/GY1.vue";
+import GY02 from "./dialogCompments/GongYi/GY02.vue";
+import ZL1 from "./dialogCompments/ZhiLiang/ZL1.vue";
+import { getForm } from "@/api/dragform/form";
+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 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";
 
 export default {
   name: "processMange",
   props: [],
-  components: { GY1 },
-  dicts: ["bpm_type"],
+  components: { GY01, DialogTemplate, CG1, CG2, KC1, GY06, GY03, KC02, GY02 },
+  dicts: ["bpm_type", "task_process_state"],
   data() {
     return {
       row: {}, //当前操作行数据
@@ -180,12 +245,13 @@ export default {
       commonData: {},
       taskType: 1,
       queryString: "",
-      taskStatus: 3,
+      taskStatus: "",
       tableData: [], //表格数据
       // 查询参数
       queryParams: {
         pageNum: 1,
         pageSize: 10,
+        taskProcessState: "0",
       },
       total: 0,
       columns: [
@@ -193,10 +259,10 @@ export default {
           prop: "bepTaskKey",
           label: "任务编号",
         },
-        //{
-        //  prop: "bepTaskName",
-        //  label: "任务名称",
-        //},
+        {
+          prop: "bepTaskName",
+          label: "任务名称",
+        },
         {
           prop: "bepTaskProcessType",
           label: "任务流程类型",
@@ -226,6 +292,22 @@ export default {
           label: "创建时间",
         },
       ],
+      formType: "", //表单类型 dragForm:拖拽表单 composeForm:工艺组合表单   designForm:定制表单
+      // k-form-build 数据
+      dynamicData: {},
+      tableName: "",
+      defaultValue: {},
+      jsonData: {},
+      // 拖拽数据
+      taskInfo: {},
+      groupKey: "",
+      subCount: {},
+      tableCount: {},
+      subTableName: "",
+
+      // 弹窗表单渲染数据
+      formData: {},
+      backExceptionTaskList: ["GY06"], //特殊回退表单组件列表
     };
   },
   computed: {},
@@ -236,7 +318,6 @@ export default {
     // 获取列表数据
     getList() {
       processList(this.queryParams).then((res) => {
-        console.log(res);
         if (res.code == 200) {
           this.tableData = res.rows.map((item) => item.resultMap);
           this.total = res.total;
@@ -246,61 +327,198 @@ 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;
+      // }
+      let temp = await this.$refs.myFormRef?.getFormData();
+      if (!temp?.flag) {
+        this.$message.error(temp.msg);
+        return false;
+      } else {
+        formData = temp.data;
+      }
+      return formData;
+    },
+    // 重置弹窗数据
+    resetDialogForm() {
+      this.formType = ""; //表单类型 dragForm:拖拽表单 composeForm:工艺组合表单   designForm:定制表单
+      // k-form-build 数据
+      this.dynamicData = {};
+      this.defaultValue = {};
+      this.jsonData = {};
+    },
     // 打开运行节点弹窗
-    opneExecuteNode(row) {
+    async opneExecuteNode(row) {
+      this.resetDialogForm();
       console.log(row);
-      this.myForm = row.benTaskNodeName.split("-")[0];
+      this.nodeTitle = row.benTaskNodeName;
+      // let preFix = row.benTaskNodeName.split("-")[0];
+      let preFix = row.benTaskNodeFormKey;
+      let {
+        benTaskNodeFormKey,
+        benTaskNodeFormType,
+        bepTaskPlanKey,
+        bepTaskKey,
+        bepTaskNodeKey,
+        benTaskProcessKey,
+        benmTaskAutomaticScriptTriggerType,
+        bepTaskNodeNextKey,
+      } = row;
+      // 新的运行逻辑
+      let payLoad = {
+        taskNodeKey: bepTaskNodeNextKey,
+        taskProcessKey: benTaskProcessKey,
+        taskAutomaticScriptTriggerType: benmTaskAutomaticScriptTriggerType,
+        taskPlanKey: bepTaskPlanKey,
+      };
+
+      // let formData = await getProcessNodeFormTemplate(payLoad);
+      // console.log(formData);
+      // if (benTaskNodeFormKey) {
+      //   if (benTaskNodeFormType == "dragForm") {
+      //     let templateInfo = formData.data[0]?.template;
+      //     //拖拽表单
+      //     this.formType = "dragForm";
+      //     this.jsonData = JSON.parse(templateInfo.dfVueTemplate);
+      //     this.tableName = templateInfo.dfTableName;
+      //     if (Object.keys(JSON.parse(templateInfo.dfFormSql)).length) {
+      //       this.dynamicData = JSON.parse(templateInfo.dfFormSql);
+      //     }
+      //     // await this.getDragFormInfo(benTaskNodeFormKey);
+      //   } else if (benTaskNodeFormType == "composeForm") {
+      //     //工艺组合表单
+      //     this.formType = "composeForm";
+      //     this.groupKey = benTaskNodeFormKey;
+      //     let queryPayload = {
+      //       row,
+      //       groupKey: benTaskNodeFormKey,
+      //     };
+      //     this.$nextTick(() => {
+      //       this.$refs.dialogRef.getLists(queryPayload);
+      //     });
+      //   }
+      // } else if (preFix) {
+      //   //定制表单
+      //   this.formType = "designForm";
+      //   this.myForm = preFix;
+      // }
+      //定制表单
+      this.formType = "designForm";
+      this.myForm = preFix;
+      let res = await getProcessNodeFormInfoData(payLoad);
+      if (res.code == 200) {
+        this.formData = res.data;
+      } else {
+        this.$message.error("网络异常,请稍后再试");
+      }
+
       this.row = row; //记录当前行数据
+      // if (!this.formType) return; //没有表单,直接掉运行逻辑
       this.open = true; // 打开弹窗
+      this.$nextTick(() => {
+        this.$refs.myFormRef?.resetForm();
+      });
       // 根据当前节点绑定的表单信息查询对应的表单进行展示
     },
-    // 运行节点按钮
+    // 运行节点按钮 确认运行回调
     async executeNode() {
-      console.log(this.row);
       let { benTaskNodeKey, bepTaskProcessXmlContent, implementationName } =
         this.row;
       let { nodeId, nextNodeId } = this.getNextNodeKey(
         benTaskNodeKey,
         bepTaskProcessXmlContent
       );
-      let formData = {};
-      if (this.$refs.myFormRef) {
-        //获取自定义表单组件内容
-        formData = await this.$refs.myFormRef.getFormData();
-        if (!formData.flag) {
-          this.$message.error(formData.msg);
+      // 只有完成状态的可以运行
+      if (this.formType == "composeForm") {
+        let res = this.$refs.dialogRef.getComposeFormData();
+        if (!res.isSuccess) {
+          this.$message.warning("非完成状态节点不能运行!");
           return;
         }
       }
-      // let payLoad = {
-      //   basicMap: {
-      //     taskNodeKey: nodeId,
-      //     nextNodeKey: nextNodeId,
-      //     // tableName: "",
-      //     implementationName: this.row.benmTaskAutomaticScriptTriggerType,
-      //     taskProcessKey: this.row.bepTaskKey,
-      //   },
-      //   commMap: {
-      //     //formData
-      //   },
-      // };
-
+      // return;
+      let formData = await this.getFormData();
+      if (!formData) return;
+      formData.taskPlanKey = this.row.bepTaskPlanKey;
       let payLoad = {
         taskProcessKey: this.row.bepTaskKey, //当前任务流程编码
         taskNodeKey: nodeId, //当前执行节点唯一编码
         nextNodeKey: nextNodeId, //下一节点编码
         implementationName: this.row.benmTaskAutomaticScriptTriggerType, //当前节点绑定的脚本名
-        taskProcessXmlContent: this.row.bepTaskProcessXmlContent, //当前流程xml
-        formDataMap: formData.data, //自定义表单组件收集的表单数据
+        // taskProcessXmlContent: this.row.bepTaskProcessXmlContent, //当前流程xml
+        tableName: this.tableName,
+        formDataMap: JSON.stringify(formData), //自定义表单组件收集的表单数据
+        taskNodeType: this.backExceptionTaskList.includes(
+          this.row.benTaskNodeFormKey
+        )
+          ? "backExceptionTask"
+          : this.row.benTaskNodeType,
       };
-      runProcessNodeExecution(payLoad).then((res) => {
-        console.log(res);
+      let fileXML = new File(
+        [this.row.bepTaskProcessXmlContent],
+        this.row.bepTaskKey + ".bpmn",
+        {
+          type: "text/bpmn",
+        }
+      );
+      const subformData = new FormData();
+      subformData.append("fileXML", fileXML);
+      for (let key in payLoad) {
+        subformData.append(key, payLoad[key] == null ? "" : payLoad[key]);
+      }
+      runProcessNodeExecution(subformData).then((res) => {
+        if (res.code == 200) {
+          this.$message.success("运行成功!");
+          this.getList();
+          this.open = false;
+        }
       });
-      console.log(payLoad);
+    },
+    // 获取拖拽表单数据
+    async getDragFormInfo(fid) {
+      try {
+        let res = await getForm(fid);
+        console.log(res);
+        if (res.code == 200) {
+          this.jsonData = JSON.parse(res.data.dfVueTemplate);
+          this.tableName = res.data.dfTableName;
+          if (res.data.dfFormSql) {
+            this.dynamicData = JSON.parse(res.data.dfFormSql);
+            console.log(this.dynamicData);
+          }
+        } else {
+          console.log(res);
+          throw new Error(res);
+        }
+      } catch (error) {
+        console.log(error);
+        this.$message.error("网络异常,请稍后再试");
+      }
     },
     // 关闭运行节点弹窗
     closeExecuteNode(row) {
-      console.log(row);
       this.open = false;
     },
     // 获取下一个节点的nodekey
@@ -322,8 +540,33 @@ export default {
       return xmlObj;
     },
     // 触发异常回调
-    handleCommand(command, row) {
-      console.log("触发异常");
+    exceptionTrigger(row, scriptData) {
+      let _this = this;
+      this.$modal
+        .confirm("是否确认触发<" + scriptData.scriptName + ">异常?")
+        .then(function (val) {
+          console.log(val);
+          // 发送触发异常节点的请求
+          let payLoad = {
+            taskProcessKey: row.bepTaskKey,
+            taskNodeKey: row.benTaskNodeKey,
+            sysBpmNodeScriptVO: scriptData,
+          };
+          triggerExceptionNode(payLoad).then((res) => {
+            console.log(res);
+            if (res.code == 200) {
+              _this.$message.success("触发成功");
+              _this.open = false;
+              _this.getList();
+            } else {
+              _this.$message.error("触发失败请稍后再试");
+            }
+          });
+        })
+        .catch(() => {
+          _this.open = false;
+          _this.$message.info("取消成功");
+        });
     },
     // 获取字典对应label
     getDictLabel(value, dictLsit = []) {
@@ -343,9 +586,9 @@ export default {
   .col {
     background-color: #fff;
     border-right: 1px solid #ebedf2;
-    // margin-right: 3px;
+    /* margin-right: 3px; */
     .statistic-wrap {
-      // height: 70px;
+      /* // height: 70px; */
       box-sizing: border-box;
       display: flex;
       align-items: center;
@@ -388,8 +631,8 @@ export default {
       padding: 0px 20px 0px 20px;
       height: 70px;
 
-      .header {
-      }
+      /* .header {
+      } */
 
       .search-list {
         display: flex;

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

@@ -83,7 +83,6 @@ export default {
             res.rows.map((item) => item.resultMap)
           );
           this.total = res.total;
-          console.log(this.tableData);
         } else {
           this.$message.error("网络异常,请稍后再试");
         }
@@ -101,7 +100,6 @@ export default {
           cardList: [],
         };
         let xmlObj = xmlStr2XmlObj(item.bepTaskProcessXmlContent);
-        console.dir(xmlObj);
         baseObj.cardList = getNodeSequence(xmlObj);
         return baseObj;
       });
@@ -130,6 +128,9 @@ export default {
   mounted() {
     this.getList();
   },
+  activated() {
+    this.getList();
+  },
 };
 </script>
 

+ 100 - 60
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>
@@ -362,27 +387,7 @@
               <!-- <el-table-column prop="type" label="类型" width="50"> -->
               <el-table-column prop="statisticType" label="统计类型" width="50">
               </el-table-column>
-              <el-table-column prop="statuscode" label="状态码" width="70">
-              </el-table-column>
-              <!-- <el-table-column prop="title" label="标题" width="83"> -->
-              <!-- <el-table-column
-                prop="statuscode"
-                label="状态码"
-                width="70">
-              </el-table-column> -->
-              <el-table-column
-                prop="statisticDescription"
-                label="统计描述"
-                width="150"
-              >
-              </el-table-column>
-              <!-- <el-table-column prop="description" label="描述" width="150"> -->
-              <el-table-column
-                prop="statisticObject"
-                label="统计对象"
-                width="150"
-              >
-              </el-table-column>
+
               <el-table-column
                 label="操作"
                 align="center"
@@ -425,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>
@@ -641,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">{{
@@ -668,13 +685,6 @@
             <!-- <el-option label="状态" value="status"></el-option> -->
           </el-select>
         </el-form-item>
-
-        <el-form-item label="统计描述" prop="statisticDescription">
-          <el-input v-model="dataCountFormData.statisticDescription"></el-input>
-        </el-form-item>
-        <el-form-item label="统计对象" prop="statisticObject">
-          <el-input v-model="dataCountFormData.statisticObject"></el-input>
-        </el-form-item>
       </el-form>
       <span slot="footer" class="dialog-footer">
         <el-button @click="closeAddDialog">取 消</el-button>
@@ -720,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
@@ -889,12 +901,12 @@ export default {
     // 数据统计字段表名中文
     isShowTableName() {
       let tableComment;
-      this.tableList.forEach(item => {
-        if(item.tableName === this.tableName){
-          tableComment = item.tableComment
+      this.tableList.forEach((item) => {
+        if (item.tableName === this.tableName) {
+          tableComment = item.tableComment;
         }
-      })
-      return tableComment
+      });
+      return tableComment;
     },
     ...mapState({
       databaseName: (state) => state.user.dataSource.databaseName,
@@ -999,7 +1011,7 @@ export default {
             disableRelaType: false,
             isShow: true,
             isSearch: false,
-            isExport: true,
+            isExport: false,
             relationTableList: this.relationTableList,
             tableName: this.tableName,
             tableComment,
@@ -1060,7 +1072,7 @@ export default {
           disableRelaType: false,
           isShow: true,
           isSearch: false,
-          isExport: true,
+          isExport: false,
           relationTableList,
           tableName: row.relationTable,
           tableComment,
@@ -1333,10 +1345,11 @@ export default {
       if (relaTypeArr.length) {
         sql += " " + relaTypeArr.join(" ");
       }
+
       return sql;
     },
     getStaticSQL(key) {
-      // let prefix = "{DBNAME}.";
+      let prefix = "{DBNAME}.";
       let sqlType = this.databaseType; //数据库类型
       // let sqlType = "oracle";
       let sql = "";
@@ -1357,7 +1370,7 @@ export default {
         key +
         " FROM " +
         isNeedUsername +
-        // prefix +
+        prefix +
         this.tableName +
         asOrSpace +
         this.tableName;
@@ -1406,7 +1419,7 @@ export default {
         } else {
           // tempFieldName = temp.fieldName;
           tempFieldName = temp.tableName + "_" + temp.fieldName;
-          exportFieldName = temp.fieldName;
+          exportFieldName = temp.tableName + "_" + temp.fieldName;
         }
         if (temp.isShow) {
           let tempObj = {};
@@ -1546,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("请至少选择一个包含查询字段");
@@ -1570,7 +1586,8 @@ export default {
           this.tableKey = uuidv4();
           // 表单
           let result;
-          if (this.tId) {
+          // if (this.tId && this.menuId) {
+          if (this.menuId) {
             let payLoad = {
               menuId: this.menuId,
               menuName: this.formData.menuName,
@@ -1590,7 +1607,6 @@ export default {
             let tableKeyObj = {
               tableKey: this.uuid,
             };
-            // console.log(this.formData)
             let payLoad = {
               component: "tablelist/commonTable/listInfo",
               icon: "",
@@ -1613,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,
@@ -1626,7 +1651,6 @@ export default {
               sortOrder: this.formData.isAsc,
               sqlKey: this.tableKey,
               dtColumnName: columns, //列字段标题名称(存储显示字段信息
-              // dtColumnName: JSON.stringify(columns).replace(/"/g, "'"), //列字段标题名称(存储显示字段信息
               timeFormat: this.formData.timeFormate,
               searchFieldList: searchFieldList, //搜索字段数组
               tableSql: this.getSQLStr(), //  暂定
@@ -1663,10 +1687,12 @@ export default {
               });
               this.searchFieldList = searchFieldList;
             });
+
             let res;
             let res1;
+            // if (this.tId && this.menuId) {
             if (this.tId) {
-              data.menuId = this.menuId;
+              data.menuId = this.menuId || result.data;
               data.sqlKey = this.editData.sqlKey;
               data.tableKey = this.editData.tableKey;
               data.dragTableBtnRelevanceList = this.getBtnMapList(
@@ -1676,6 +1702,7 @@ export default {
               this.dragTableStatisticList.forEach((item) => {
                 item.tableKey = this.editData.tableKey;
               });
+              // console.log(res);
               res1 = await updateStatistic({
                 tableKey: this.editData.tableKey,
                 dragTableStatisticList: this.dragTableStatisticList,
@@ -1689,7 +1716,7 @@ export default {
                 data.tableKey
               );
               res = await addDragTable(data);
-
+              // console.log('123456789', res)
               this.dragTableStatisticList.forEach((item) => {
                 item.tableKey = this.uuid;
               });
@@ -1709,16 +1736,20 @@ export default {
             if (this.tId) {
               if (res.code == 200) {
                 this.$message.success("修改成功");
+                this.$tab.closePage();
+                this.$router.push({
+                  path: "/system/fromModel/index/tablelist",
+                });
               } else {
                 this.$message.warning("修改失败");
               }
-              this.$tab.closePage();
-              this.$router.push({
-                path: "/system/fromModel/index/tablelist",
-              });
             } else {
               if (res.code == 200) {
                 this.$message.success("创建成功");
+                this.$tab.closePage();
+                this.$router.push({
+                  path: "/system/fromModel/index/tablelist",
+                });
               } else {
                 this.$message.warning("创建失败");
               }
@@ -1749,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,
@@ -1892,15 +1924,16 @@ export default {
 
     // 获取按钮组数据
     async getBtnList() {
+      console.log("aaaaaaa");
       let res = await listBtn({ isEnablePaging: false, btnParentId: 0 });
-      this.btnGroupOptions = res.rows;
+      this.btnGroupOptions = res.rows.filter((item) => !item.whetherBind);
     },
   },
   created() {},
   async mounted() {
     this.getAllTable();
     this.initDragTable();
-    this.getBtnList();
+    await this.getBtnList();
     await this.getMenuList();
     if (this.$route.query.tId) {
       this.tId = this.$route.query.tId;
@@ -1911,6 +1944,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;

+ 14 - 3
zkqy-ui/src/views/tablelist/commonTable/listInfo.vue

@@ -120,9 +120,10 @@
       v-loading="loading"
       :data="tableList"
       @selection-change="handleSelectionChange"
-      row-key="id"
       ref="tableRef"
       :cell-style="cellStyle"
+      :reserve-selection="true"
+      :row-key="getRowKey"
     >
       <el-table-column
         type="selection"
@@ -445,6 +446,12 @@ export default {
     },
   },
   methods: {
+    // 获取row-key
+    getRowKey(row) {
+      return camelCase(
+        this.tableName + "_" + this.templateInfo.template?.primaryKey
+      );
+    },
     /** 查询列表 */
     getList(queryParams) {
       this.loading = true;
@@ -866,6 +873,7 @@ export default {
     handleDelete(row, btnData) {
       let delIds = this.ids;
       let primary = camelCase(this.templateInfo.template?.primaryKey);
+      // let realyKey=
       this.addRealFieldName(row);
       if (row[primary] != undefined && row[primary] != null) {
         delIds = [];
@@ -949,15 +957,19 @@ export default {
     /** 导出按钮操作 */
     handleExport() {
       let primary = camelCase(this.templateInfo.template?.primaryKey);
+      let realyKey = camelCase(this.tableName + "_" + primary);
       if (this.ids.length > 0) {
         this.queryParams["execlMap"] = [];
         this.ids.forEach((item) => {
           this.queryParams.execlMap.push(
             this.tableList.find((ttem) => {
-              return ttem[primary] === item;
+              return ttem[realyKey] === item;
             })
           );
         });
+      } else {
+        this.$message.warning("请至少勾选一条导出数据");
+        return;
       }
       this.queryParams.execlMap = JSON.stringify(this.queryParams.execlMap);
       this.download(
@@ -1297,7 +1309,6 @@ export default {
 
     // 操作列回调
     excuteHandler(btnData, row) {
-      console.log(btnData, row);
       let { btnType, btnParams } = btnData;
       this.currentBtnData = btnData;
       this.currentRow = JSON.parse(JSON.stringify(row));