浏览代码

OA流程记录页面布局/流程异常脚本绑定表单选项优化

lph 1 年之前
父节点
当前提交
48e05f193c

+ 109 - 0
zkqy-ui/src/views/bussiness/detail/RecordList.vue

@@ -0,0 +1,109 @@
+<template>
+  <div class="list-wrap">
+    <el-timeline>
+      <el-timeline-item
+        v-for="(item, index) in recordList"
+        :key="index"
+        :icon="setIcon(item.finishTime)"
+        :color="setColor(item.finishTime)"
+      >
+        <p style="font-weight: 700">{{ item.taskName }}</p>
+        <el-card :body-style="{ padding: '10px' }">
+          <el-descriptions class="margin-top" :column="1" size="small" border>
+            <el-descriptions-item
+              v-if="item.assigneeName"
+              label-class-name="my-label"
+            >
+              <template slot="label"
+                ><i class="el-icon-user mr5"></i>办理人</template
+              >
+              {{ item.assigneeName }}
+              <el-tag type="info" size="mini">{{ item.deptName }}</el-tag>
+            </el-descriptions-item>
+            <el-descriptions-item
+              v-if="item.candidate"
+              label-class-name="my-label"
+            >
+              <template slot="label"
+                ><i class="el-icon-user mr5"></i>候选办理</template
+              >
+              {{ item.candidate }}
+            </el-descriptions-item>
+            <el-descriptions-item label-class-name="my-label">
+              <template slot="label"
+                ><i class="el-icon-date mr5"></i>接收时间</template
+              >
+              {{ item.createTime }}
+            </el-descriptions-item>
+            <el-descriptions-item
+              v-if="item.finishTime"
+              label-class-name="my-label"
+            >
+              <template slot="label"
+                ><i class="el-icon-date mr5"></i>处理时间</template
+              >
+              {{ item.finishTime }}
+            </el-descriptions-item>
+            <el-descriptions-item
+              v-if="item.duration"
+              label-class-name="my-label"
+            >
+              <template slot="label"
+                ><i class="el-icon-time mr5"></i>耗时</template
+              >
+              {{ item.duration }}
+            </el-descriptions-item>
+            <el-descriptions-item
+              v-if="item.comment"
+              label-class-name="my-label"
+            >
+              <template slot="label"
+                ><i class="el-icon-tickets mr5"></i>处理意见</template
+              >
+              {{ item.comment.comment }}
+            </el-descriptions-item>
+          </el-descriptions>
+        </el-card>
+      </el-timeline-item>
+    </el-timeline>
+  </div>
+</template>
+<script>
+import recordListData from "./recordListData.js";
+export default {
+  name: "RecordList",
+  props: [],
+  components: {},
+  data() {
+    return {};
+  },
+  computed: {
+    recordList() {
+      return recordListData;
+    },
+  },
+  methods: {
+    setIcon(val) {
+      if (val) {
+        return "el-icon-check";
+      } else {
+        return "el-icon-time";
+      }
+    },
+    setColor(val) {
+      if (val) {
+        return "#2bc418";
+      } else {
+        return "#b3bdbb";
+      }
+    },
+  },
+};
+</script>
+
+<style scoped lang="scss">
+.my-label {
+  background: #e1f3d8;
+}
+</style>
+./recordListData.js

+ 15 - 8
zkqy-ui/src/views/bussiness/detail/index.vue

@@ -2,12 +2,12 @@
   <div class="app-container">
     <el-card class="box-card">
       <div slot="header" class="clearfix">
-        <span class="el-icon-document">已发任务</span>
+        <span class="el-icon-document">任务详情</span>
         <el-button
           style="float: right"
           size="mini"
           type="danger"
-          @click="() => {}"
+          @click="goBack"
           >关闭</el-button
         >
       </div>
@@ -24,11 +24,13 @@
             </div>
           </el-col>
         </el-tab-pane>
-        <!--流程流转记录-->
-        <!-- <el-tab-pane label="流转记录" name="2">
-          <el-col :span="16" :offset="4"> </el-col>
-        </el-tab-pane> -->
-        <!--流程图-->
+        <!-- 流程流转记录-->
+        <el-tab-pane label="流转记录" name="2">
+          <el-col :span="16" :offset="4">
+            <RecordList></RecordList>
+          </el-col>
+        </el-tab-pane>
+        <!--流程图 -->
         <el-tab-pane label="流程图" name="3">
           <FlowChart ref="flowChartRef" :flowData="flowData"></FlowChart>
         </el-tab-pane>
@@ -40,13 +42,14 @@
 <script>
 import FormList from "./formList.vue";
 import FlowChart from "@/views/bussiness/detail/FlowChart";
+import RecordList from "@/views/bussiness/detail/RecordList";
 
 // 模拟表单列表数据
 import formList from "./formList.js";
 import flowData from "./flowData.js";
 export default {
   name: "Record",
-  components: { FormList, FlowChart },
+  components: { FormList, FlowChart, RecordList },
   props: {},
   data() {
     return {
@@ -62,6 +65,10 @@ export default {
         });
       }
     },
+    goBack() {
+      this.$tab.closePage();
+      this.$router.go(-1);
+    },
   },
   computed: {
     flowData() {

+ 20 - 0
zkqy-ui/src/views/bussiness/detail/recordListData.js

@@ -0,0 +1,20 @@
+const recordList = [
+  {
+    "taskId": "78059",
+    "taskName": "请假申请",
+    "assigneeId": 2,
+    "deptName": "测试部门",
+    "startDeptName": null,
+    "assigneeName": "王五001",
+    "procDefVersion": 0,
+    "duration": "33秒",
+    "comment": {
+      "type": "1",
+      "comment": "123123"
+    },
+    "createTime": "2024-01-10 10:31:21",
+    "finishTime": "2024-01-10 10:31:55"
+  }
+]
+
+export default recordList

+ 42 - 39
zkqy-ui/src/views/system/bpmnPro/components/Panel/components/ElementGenerations.vue

@@ -143,50 +143,50 @@ import {
 import EventEmitter from "@utils/EventEmitter";
 import { getActive } from "@packages/bpmn-utils/BpmnDesignerUtils";
 import { getFormKey, setFormKey } from "../../bo-utils/myFieldUtil";
-
+import { formList } from "@/views/system/bpmnPro/data/index";
 export default {
   name: "ElementGenerations",
   dicts: ["bpm_type", "bpm_start_event_type"],
   data() {
     return {
-      formList: [
-        {
-          formKey: "AssignEmployees",
-          formName: "分配班组",
-        },
-        {
-          formKey: "NodeShow",
-          formName: "节点展示",
-        },
-        {
-          formKey: "Notes",
-          formName: "物料备注",
-        },
-        {
-          formKey: "ProductionProcesses",
-          formName: "工序:领料",
-        },
-        {
-          formKey: "PersonalDistribution",
-          formName: "工序:检验",
-        },
-        {
-          formKey: "RecordQuality",
-          formName: "记录质控卡",
-        },
-        {
-          formKey: "GY06",
-          formName: "节点回退",
-        },
-        {
-          formKey: "Print",
-          formName: "打印交接单",
-        },
-        {
-          formKey: "KB01",
-          formName: "不需表单",
-        },
-      ],
+      // formList: [
+      //   {
+      //     formKey: "AssignEmployees",
+      //     formName: "分配班组",
+      //   },
+      //   {
+      //     formKey: "NodeShow",
+      //     formName: "节点展示",
+      //   },
+      //   {
+      //     formKey: "Notes",
+      //     formName: "物料备注",
+      //   },
+      //   {
+      //     formKey: "ProductionProcesses",
+      //     formName: "工序:领料",
+      //   },
+      //   {
+      //     formKey: "PersonalDistribution",
+      //     formName: "工序:检验",
+      //   },
+      //   {
+      //     formKey: "RecordQuality",
+      //     formName: "记录质控卡",
+      //   },
+      //   {
+      //     formKey: "GY06",
+      //     formName: "节点回退",
+      //   },
+      //   {
+      //     formKey: "Print",
+      //     formName: "打印交接单",
+      //   },
+      //   {
+      //     formKey: "KB01",
+      //     formName: "不需表单",
+      //   },
+      // ],
       elFormData: {
         elementId: "",
         elementName: "",
@@ -228,6 +228,9 @@ export default {
       // }
       return res;
     },
+    formList() {
+      return formList;
+    },
   },
 
   mounted() {

+ 21 - 2
zkqy-ui/src/views/system/bpmnPro/components/Panel/components/ElementUnusualTasks.vue

@@ -123,12 +123,27 @@
         </el-form-item>
         <el-form-item label="表单:" size="normal" prop="composeName">
           <el-col :span="8">
-            <el-input
+            <!-- <el-input
               v-model="newUnusualTask.compName"
               placeholder="组件名"
               size="normal"
               clearable
-            ></el-input>
+            ></el-input> -->
+            <el-select v-model="newUnusualTask.compName">
+              <el-option
+                v-for="item in myDesignFormList"
+                :key="item.formKey"
+                :label="item.formName"
+                :value="item.formKey"
+              >
+                <span class="discribe" style="float: left">{{
+                  item.formName
+                }}</span>
+                <span style="float: right; color: #8492a6; font-size: 13px">{{
+                  item.formKey
+                }}</span>
+              </el-option>
+            </el-select>
           </el-col>
           <el-col class="line" :span="2">---</el-col>
           <el-col :span="8">
@@ -226,6 +241,7 @@ import { listScript } from "@/api/bpmprocess/process";
 import { listForm } from "@/api/dragform/form";
 import { listGroup } from "@/api/relateTable/index.js";
 import { filterUtil } from "@packages/bo-utils/filterUtil.js";
+import { formList } from "@/views/system/bpmnPro/data/index";
 export default {
   name: "ElementUnusualTasks",
   dicts: ["script_trigger_type", "bpm_script_type", "industry_type"],
@@ -306,6 +322,9 @@ export default {
           this.newUnusualTask.scriptKey == item.value
       );
     },
+    myDesignFormList() {
+      return formList;
+    },
   },
   methods: {
     // 自定义表单规则

+ 38 - 0
zkqy-ui/src/views/system/bpmnPro/data/index.js

@@ -0,0 +1,38 @@
+export const formList = [
+  {
+    formKey: "AssignEmployees",
+    formName: "分配班组",
+  },
+  {
+    formKey: "NodeShow",
+    formName: "节点展示",
+  },
+  {
+    formKey: "Notes",
+    formName: "物料备注",
+  },
+  {
+    formKey: "ProductionProcesses",
+    formName: "工序:领料",
+  },
+  {
+    formKey: "PersonalDistribution",
+    formName: "工序:检验",
+  },
+  {
+    formKey: "RecordQuality",
+    formName: "记录质控卡",
+  },
+  {
+    formKey: "GY06",
+    formName: "节点回退",
+  },
+  {
+    formKey: "Print",
+    formName: "打印交接单",
+  },
+  {
+    formKey: "KB01",
+    formName: "不需表单",
+  },
+]

+ 2 - 1
zkqy-ui/src/views/system/excuteBtnMange/index.vue

@@ -886,6 +886,7 @@ export default {
           };
 
           let _this = this;
+          console.log(response.rows);
           let res = response.rows.filter((node) => _this.getAllMenuList(node));
           btnTemp.children.push(...res);
           this.menuOptions.push(btnTemp);
@@ -897,7 +898,7 @@ export default {
       // 如果当前节点的btnType等于6,则保留该节点,否则删除该节点
       if (node.btnType == "DIRECTORY") {
         if (Array.isArray(node.children) && node.children.length != 0) {
-          // 递归遍历子节点,并删除所有btnType不等于6的子节点
+          // 递归遍历子节点,并删除所有btnType不等于DIRECTORY的子节点
           let _this = this;
           node.children = node.children.filter((child) =>
             _this.getAllMenuList(child)