浏览代码

22-12 需求申请单

yangbifan 2 年之前
父节点
当前提交
819f9c4aab

+ 2 - 2
config/dev.env.js

@@ -6,10 +6,10 @@ module.exports = merge(prodEnv, {
   NODE_ENV: '"development"',
   ENV_CONFIG: '"dev"',
   ctx:'"http://127.0.0.1:8080"',
-  // ctxForm: '"http://10.149.85.91:8880"',//dev
+  // ctxForm: '"http://10.149.85.91:8000"',//dev
   // ctxForm: '"http://43.138.50.94:8880"',//test
   // ctxForm: '"http://192.168.2.124:8880"',//test
-  ctxForm: '"http://10.230.15.228:8880"',//生产
+  ctxForm: '"http://10.230.15.228:8000"',//生产
   excludeMeWhenSelectNextHandler:false,
   excludeFormerHanlder:false,
   envTitle:'"本地开发环境"'

+ 0 - 39
public/index.html

@@ -1,39 +0,0 @@
-<!DOCTYPE html>
-<html lang="en">
-
-<head>
-  <meta charset="utf-8">
-  <meta http-equiv="X-UA-Compatible" content="IE=edge">
-  <meta name="viewport" content="width=device-width,initial-scale=1.0">
-  <link rel="icon" href="<%= BASE_URL %>favicon.ico">
-  <title>市场经营管理平台</title>
-  <script src="static/js/crypoto-js.js"></script>
-
-  <script src="/static/js/luckysheet/plugins/js/plugin.js"></script>
-  <script src="/static/js/luckysheet/luckysheet.umd.js"></script>
-  <link rel='stylesheet' href='/static/js/luckysheet/plugins/css/pluginsCss.css' />
-  <link rel='stylesheet' href='/static/js/luckysheet/plugins/plugins.css' />
-  <link rel='stylesheet' href='/static/js/luckysheet/css/luckysheet.css' />
-  <link rel='stylesheet' href='/static/js/luckysheet/assets/iconfont/iconfont.css' />
-
-  <script src="/static/js/ace.js"></script>
-</head>
-
-<body>
-  <noscript>
-    <strong>We're sorry but admin doesn't work properly without JavaScript enabled. Please enable it to
-      continue.</strong>
-  </noscript>
-  <div id="app"></div>
-  <!-- built files will be auto injected -->
-  <script type="text/javascript">
-    window.staticHost = 'http://10.230.26.15:8000/mkt'; // 正式
-    // window.staticHost = 'http://10.149.85.91:8000/spfm'; // 测试
-    // window.staticHost = 'http://192.168.0.103:9600/';
-    // window.staticHost = 'http://192.168.2.142:9600/';
-
-    // document.title = "hello";
-  </script>
-</body>
-
-</html>

二进制
public/static/a.xlsx


二进制
public/static/b.xlsx


二进制
public/static/c.xlsx


二进制
public/static/d.pptx


二进制
public/static/file/a.xlsx


二进制
public/static/file/b.xlsx


二进制
public/static/file/c.xlsx


二进制
public/static/file/d.pptx


二进制
src/assets/a.xlsx


二进制
src/assets/b.xlsx


二进制
src/assets/c.xlsx


二进制
src/assets/d.pptx


+ 8 - 3
src/assets/js/common.js

@@ -263,11 +263,16 @@ let common = {
                     if (!obj.disableLoading) {
                         loading.close()
                     }
-                    if (response.code === 1 ||response.code == '1') {
-                       bus.$message.success(response.message)
+                    if (response.data.code === 1 ||response.data.code == '1') {
+                       bus.$message.success(response.data.message)
                         loading.close()
-                        success(response.data)
+                        success(response.data.data)
                         return response
+                        // if (response.data === 1 ||response.data == '1') {
+                        //     bus.$message.success(response.message)
+                        //      loading.close()
+                        //      success(response.data)
+                        //      return response
                     } else {
                         if (obj.printMsg) {
                             if (response.message) {

+ 3 - 0
src/assets/js/url.js

@@ -21,6 +21,9 @@ const urls = {
         getCommentsByProcessIds:ctxForm + '/getCommentsByProcessId/',
         getReadList:ctxForm+'/complateReadTask',
         getLastName:ctxForm+'/lastMan',
+        getNewTransferTask:ctxForm+"/process/transferTaskMuti/",
+        getQueryMultiTaskId:ctxForm + "/queryMultiTaskId",
+        getComplateLastMan:ctxForm + "/complateLastMan"
     },
     distribute: {
         sendMsg: ctx + '/api/distribute/create', //创建分发

+ 160 - 78
src/components/workflow.vue

@@ -70,7 +70,9 @@
             </div>
             <div class="flex-header-text-tree">
               已选人员
-              <div class="">{{ selectUser }}</div>
+              <div class="" v-for="(item, index) in backThree" :key="index">
+                {{ item.loginNameStr }}
+              </div>
             </div>
           </div>
         </div>
@@ -135,6 +137,7 @@ export default {
   data() {
     return {
       transferStatus: false, //转派按钮控制
+      manyPeopleStatus: false, //多人处理下发任务
       TransferStatus: false, //是否点击转派状态
       copyStatus: false, //抄送按钮控制
       CopyStatus: false, //是否点击抄送状态
@@ -153,6 +156,8 @@ export default {
       editStatus: false, //修改控制显示字段
       treeCopyList: [],
       demand: "",
+      nextDealManList: "",
+      isLastManStatus: false,
     };
   },
   props: {
@@ -166,7 +171,6 @@ export default {
     },
   },
   created() {
-    console.log(this.list);
     this.getNextPath(this.list.resourceId, 1);
     this.getMetirialType();
   },
@@ -179,60 +183,126 @@ export default {
         headers: {
           "Content-Type": "application/json",
         },
-        data:{}
+        data: {},
       }).then((res) => {
-        console.log(res);
         this.demand = res.data;
       });
     },
-    submitWork() {
-      //生成需求决策编号
-      if (this.clicknextName === "起草人发送") {
-        this.getDemand()
-      }
-      if (!this.list.taskId) {
-        this.$message.error("请先保存表单后处理");
-        return false;
+    async getLastManList(e) {
+      let _this = this;
+      let obj = {
+        url: _this.$url.formList.getComplateLastMan, //开始工作流接口
+        data: e,
+        // status: "form",
+        headers: {
+          "Content-Type": "application/json",
+        },
+      };
+
+      let res = await this.common.httpPost(obj, success);
+      function success(data) {}
+    },
+    async nextWorks(lists, list) {
+      let _this = this;
+      let obj = {
+        url: _this.$url.formList.nextWork, //下一步工作流接口
+        data: lists,
+        status: "form",
+      };
+      await this.common.httpPost(obj, success);
+      function success(data) {
+        let updateList = {
+          taskId: data.taskid,
+          id: _this.list.id,
+          resourceId: _this.nodes.currentShape[0].resourceId,
+        };
+        list.taskId = data.taskid;
+        _this.setUpdate(updateList);
+        _this.getLastManList(list);
       }
-      if (this.TransferStatus === true) {
-        if (this.backThree.length > 0) {
-          this.nextWork();
+    },
+    submitWork() {
+      //多人会签处理环节
+      let list = {
+        userId: JSON.parse(window.sessionStorage.userInfo).loginNo, //人员id
+        taskId: this.list.taskId, //表单标识
+        // procinstid: this.list.processId,
+        taskName: this.clicknextName, //流程节点
+        userCode: JSON.parse(window.sessionStorage.userInfo).loginNo, //人员code
+        content: this.textarea, //意见内容
+      };
+      let newlist = {
+        userId: JSON.parse(window.sessionStorage.userInfo).loginNo, //人员id
+        taskId: this.list.taskId, //表单标识
+        // procinstid: this.list.processId,
+        taskName: this.clicknextName, //流程节点
+        userCode: JSON.parse(window.sessionStorage.userInfo).loginNo, //人员code
+        content: this.textarea, //意见内容
+      };
+      if (this.manyPeopleStatus == true) {
+        list.procinstid = this.list.processId;
+        if (this.backThree.length <= 1) {
+          this.$message.error("请选择多人");
+          return;
         } else {
-          this.$message.error("请选择候选人");
-          return false;
-        }
-      } else {
-        let list = {
-          userId: JSON.parse(window.sessionStorage.userInfo).loginNo, //人员id
-          taskId: this.list.taskId, //表单标识
-          taskName: this.clicknextName, //流程节点
-          userCode: JSON.parse(window.sessionStorage.userInfo).loginNo, //人员code
-          content: this.textarea, //意见内容
-          // resolution: this.nodes.currentShape[0].condition.resolution, //流程图线节点
-          // nextDealMan: this.backThree[0].loginNoStr || '', //下一步处理人
-        };
-        if (this.treeCopyList.length) {
-          //抄送
-          list.copyman = this.treeCopyList[0].loginNoStrCopy;
+          list.lastmanList = this.nextDealManList;
         }
         if (this.nodes.currentShape) {
-          list.resolution = this.nodes.currentShape[0].condition.resolution;
-          list.approve = this.nodes.currentShape[0].condition.approve;
+          newlist.resolution = this.nodes.currentShape[0].condition.resolution;
+          newlist.approve = this.nodes.currentShape[0].condition.approve;
+        }
+        if (this.backThree.length > 0) {
+          newlist.nextDealMan = "admin";
         }
-        if (this.clicknextName === "") {
-          this.$message.error("请选择流程节点");
+        this.nextWorks(newlist, list);
+      } else {
+        console.log(456);
+        //生成需求决策编号
+        if (this.clicknextName === "起草人发送") {
+          this.getDemand();
+        }
+        if (!this.list.taskId) {
+          this.$message.error("请先保存表单后处理");
           return false;
         }
-        if (this.backThree.length > 0) {
-          list.nextDealMan = this.backThree[0].loginNoStr;
-        } else {
-          if (this.clicknextName === "流程结束") {
+        if (this.TransferStatus === true) {
+          if (this.backThree.length > 0) {
+            this.nextWork();
           } else {
             this.$message.error("请选择候选人");
             return false;
           }
+        } else {
+          if (this.treeCopyList.length) {
+            //抄送
+            list.copyman = this.treeCopyList[0].loginNoStrCopy;
+          }
+          if (this.isLastManStatus == true) {
+            list.lastman = "yes";
+          }
+          if (this.nodes.currentShape) {
+            list.resolution = this.nodes.currentShape[0].condition.resolution;
+            list.approve = this.nodes.currentShape[0].condition.approve;
+          }
+          if (this.clicknextName === "") {
+            this.$message.error("请选择流程节点");
+            return false;
+          }
+          if (this.backThree.length > 0) {
+            if (this.manyPeopleStatus == true) {
+              list.nextDealManList = this.nextDealManList;
+            } else {
+              list.nextDealMan = this.backThree[0].loginNoStr;
+            }
+          } else {
+            if (this.clicknextName === "流程结束") {
+            } else {
+              this.$message.error("请选择候选人");
+              return false;
+            }
+          }
+          this.nextWork(list);
         }
-        this.nextWork(list);
       }
     },
     async nextWork(list) {
@@ -273,8 +343,8 @@ export default {
               list.copytaskid = data.copytaskid;
               list.copyman = _this.treeCopyList[0].loginNoStrCopy;
             }
-            if(_this.demand){
-              list.needNo = _this.demand
+            if (_this.demand) {
+              list.needNo = _this.demand;
             }
             _this.setUpdate(list);
           }
@@ -301,32 +371,16 @@ export default {
         data: e,
       }).then((res) => {
         this.$emit("beforeClose", true);
-        // this.fromList.taskId = res.data.body.taskId;
-        // this.fromList.taskName = res.data.body.taskName;
-        // if (res.data.body.taskName === "起草") {
-        //   this.isSync = res.data.body.isSync;
-        // } else {
-        //   this.isSync = "1";
-        // }
-        // if (res.data.result === 0) {
-        //   this.$message.success("工作流更新成功");
-        // }
       });
     },
     //查询路径接口
     getNextPath(e, status) {
+      let { fresourceId, processDefinitionKey } = this.requestForm;
       let list = {
-        // fresourceId: "bf79721c-33f3-11ed-ba0b-00505687dcd3", //测试环境
-        fresourceId: this.requestForm.fresourceId, // 本地环境
-        processId: this.requestForm.processDefinitionKey,
-        // fresourceId: "0d94de8a-0281-11ed-a302-4ae7da54db39", // 本地环境
-        // processId: "request_form_process",
-        // resourceId: e,
+        fresourceId: fresourceId,
+        processId: processDefinitionKey,
       };
-      if (e) {
-        // this.propsList = [];
-        list.resourceId = e;
-      }
+      e ? (list.resourceId = e) : list;
       this.$http({
         url: "/market/waf/queryPath",
         method: "post",
@@ -338,6 +392,14 @@ export default {
         if (status === 1) {
           //第一次进入取路径
           this.initialList = res.data.body;
+          if (res.data.body.nextShapes[0].multi !== null) {
+            if (res.data.body.nextShapes[0].multi.multi === "true") {
+              // this.getqueryMultiTaskId();
+              this.isLastManStatus = true;
+            } else {
+              this.isLastManStatus = false;
+            }
+          }
           if (res.data.body.nextShapes[0].loop !== null) {
             if (res.data.body.nextShapes[0].loop.loop === "true") {
               this.transferStatus = true; //转派按钮生效
@@ -371,6 +433,16 @@ export default {
         if (status === 3) {
           this.nodes = res.data.body;
           this.getTreeLists(res.data.body, 1);
+
+          if (res.data.body.nextShapes[0].multi !== null) {
+            if (res.data.body.nextShapes[0].multi.multi === "true") {
+              this.manyPeopleStatus = true; //转派按钮生效
+            } else {
+              this.manyPeopleStatus = false;
+            }
+          } else {
+            this.manyPeopleStatus = false;
+          }
         }
       });
     },
@@ -395,21 +467,22 @@ export default {
         },
         data: "",
       }).then((res) => {
-        console.log(status);
         if (status === 2) {
           this.treeCopyList = res.data; //抄送
-          console.log(this.treeCopyList);
           //  this.$refs.defTrees.treeList = res.data;
         } else {
           this.treeList = res.data; //抄送
           // this.$refs.defTree.treeList = res.data;
-          console.log(this.treeList);
         }
       });
     },
     //转派按钮方法
     clickTransfer(e) {
+      this.$refs.defTree.userList = [];
+      this.backThree = [];
+      this.treeList = [];
       if (e == 1) {
+        this.manyPeopleStatus = false;
         this.TransferStatus = true;
       } else if (e == 2) {
         this.CopyStatus = true;
@@ -418,6 +491,8 @@ export default {
     },
     //点击节点获取下一步的处理人字段
     clickGetTree(e, index) {
+      this.$refs.defTree.userList = [];
+      this.backThree = [];
       // this.CopyStatus = false;
       this.TransferStatus = false;
       //   this.clickTaskName = e.properties.name;
@@ -431,25 +506,33 @@ export default {
     },
     //点击修改
     clickEdit() {
-      console.log(123);
       this.editStatus = true;
     },
     //选择树的回调
     changeTree(e) {
-      if (e.length > 1) {
-        this.$message.error("只能选择一个人");
-        return;
-      } else {
-        console.log(e);
+      if (this.manyPeopleStatus == true) {
         this.backThree = e;
-        if (this.CopyStatus === true) {
-          this.getTreeLists(e[0].loginNoStr, 2);
-        }
 
-        if (e[0]) {
-          this.selectUser = e[0].loginNameStr;
+        let arr = [];
+        this.backThree.map((item) => {
+          arr.push(item.loginNoStr);
+        });
+        this.nextDealManList = arr.toString();
+      } else {
+        if (e.length > 1) {
+          this.$message.error("只能选择一个人");
+          return;
         } else {
-          this.selectUser = "暂无选择";
+          this.backThree = e;
+          if (this.CopyStatus === true) {
+            this.getTreeLists(e[0].loginNoStr, 2);
+          }
+
+          if (e[0]) {
+            this.selectUser = e[0].loginNameStr;
+          } else {
+            this.selectUser = "暂无选择";
+          }
         }
       }
     },
@@ -465,7 +548,6 @@ export default {
           dictCodePks: "approval",
         },
       }).then((res) => {
-        console.log(res);
         this.commonlyList = res.data;
       });
     },

+ 117 - 56
src/components/workflowEntrance.vue

@@ -9,8 +9,8 @@
               选择路径
 
               <div class="flex-path-list">
-                <div @click="clickTransfer(1)">转派</div>
-                <div @click="clickTransfer(2)">结束</div>
+                <div @click="getTreeLists(9)">转派</div>
+                <div @click="getclose()">结束</div>
                 <!-- <div
                   v-for="(item, index) in node.nextShapes"
                   :key="index"
@@ -70,7 +70,9 @@
             </div>
             <div class="flex-header-text-tree">
               已选人员
-              <div class="">{{ selectUser }}</div>
+              <div class="" v-for="(item, index) in backThree" :key="index">
+                {{ item.loginNameStr }}
+              </div>
             </div>
           </div>
         </div>
@@ -96,7 +98,9 @@
     </div>
     <div class="flex-footer-botton">
       <div class="flex-button">
-        <el-button type="primary" @click="submitWork()">提交</el-button>
+        <el-button type="primary" @click="getnewtransfertask(1)"
+          >提交</el-button
+        >
       </div>
     </div>
     <el-dialog
@@ -134,6 +138,7 @@ export default {
   name: "workflow",
   data() {
     return {
+      MultipersonTransfer: false,
       transferStatus: false, //转派按钮控制
       TransferStatus: false, //是否点击转派状态
       copyStatus: false, //抄送按钮控制
@@ -153,6 +158,7 @@ export default {
       editStatus: false, //修改控制显示字段
       treeCopyList: [],
       demand: "",
+      close: "",
     };
   },
   props: {
@@ -164,12 +170,84 @@ export default {
     requestForm: {
       type: Object,
     },
+    lastManList: {
+      type: Object,
+    },
   },
   created() {
     this.getNextPath(this.list.resourceId, 1);
     this.getMetirialType();
   },
   methods: {
+    getclose() {
+      this.backThree = [];
+      this.treeList = [];
+      this.close = "1";
+    },
+    // async getqueryMultiTaskId() {
+    //   let list = {
+    //     procinstid: this.list.processId,
+    //     userId: JSON.parse(window.sessionStorage.userInfo).loginNo,
+    //     // procinstid:this.fromList.processId
+
+    //     // taskId:e.taskId
+    //   };
+    //   let _this = this;
+    //   let obj = {
+    //     url: this.$url.formList.getQueryMultiTaskId, //流程追踪接口
+    //     data: list,
+    //     headers: {
+    //       "Content-Type": "application/json",
+    //     },
+    //   };
+    //   let res = await this.common.httpPost(obj, success);
+    //   function success(data) {
+    //     console.log(data);
+    //     _this.list.taskId = data.taskid;
+    //   }
+    // },
+    //新转派接口
+    async getnewtransfertask() {
+      let _this = this;
+      let list = {
+        userId: "",
+        userId: JSON.parse(window.sessionStorage.userInfo).loginNo, //人员id
+        taskId: this.list.taskId, //表单标识
+        procinstid: this.list.processId,
+        // taskName: this.clicknextName, //流程节点
+        userCode: JSON.parse(window.sessionStorage.userInfo).loginNo, //人员code
+        content: this.textarea, //意见内容
+      };
+      let obj = {};
+      if (this.close == "1") {
+        (list.userId = JSON.parse(window.sessionStorage.userInfo).loginNo),
+          (obj.url = _this.$url.formList.getComplateLastMan), //下一步工作流接口
+          (obj.data = list);
+      } else {
+        let listss = {
+          userId: _this.backThree[0].loginNoStr, //人员id
+          taskId: this.list.taskId, //表单标识
+          loginstr: JSON.parse(window.sessionStorage.userInfo).loginNoStr,
+          // taskName: this.clicknextName, //流程节点
+          content: this.textarea, //意见内容
+        };
+
+        (obj.url = _this.$url.formList.getNewTransferTask + _this.list.taskId), //下一步工作流接口
+          (obj.status = "form"),
+          (obj.data = listss);
+      }
+
+      await _this.common.httpPost(obj, success);
+      function success(data) {
+        // let list = {
+        //   taskId: data.taskid,
+        //   id: _this.list.id,
+        //   // resourceId: _this.nodes.currentShape[0].resourceId,
+        //   // taskName: _this.nodes.nextShapes[0].properties.name,
+        // };
+        _this.$emit("beforeClose", true);
+      }
+    },
     //生成需求决策编号接口
     getDemand() {
       this.$http({
@@ -352,48 +430,17 @@ export default {
         },
         data: list,
       }).then((res) => {
-        // if (status === 1) {
-        //   //第一次进入取路径
-        //   this.initialList = res.data.body;
-        //   if (
-        //     this.initialList.nextShapes[0].multi?.multi &&
-        //     res.data.body.nextShapes[0].multi.multi === "true"
-        //   ) {
-        //     this.transferStatus = true;
-        //   } else {
-        //     this.transferStatus = false;
-        //   }
-        //   if (
-        //     res.data.body.nextShapes[0].copy?.copy &&
-        //     res.data.body.nextShapes[0].copy.copy === "true"
-        //   ) {
-        //     this.CopyStatus = true;
-        //   } else {
-        //     this.CopyStatus = false;
-        //   }
-        //   // if (res.data.body.nextShapes[0].loop !== null) {
-        //   //   if (res.data.body.nextShapes[0].loop.loop === "true") {
-        //   //     this.transferStatus = true; //转派按钮生效
-        //   //   } else {
-        //   //     this.transferStatus = false;
-        //   //   }
-        //   // } else {
-        //   //   this.transferStatus = false;
-        //   // }
-        //   // if (res.data.body.nextShapes[0].copy !== null) {
-        //   //   if (res.data.body.nextShapes[0].copy.copy === "true") {
-        //   //     // this.copyStatus = true; //抄送按钮生效
-        //   //     this.CopyStatus = true;
-        //   //   } else {
-        //   //     this.copyStatus = false;
-        //   //   }
-        //   // } else {
-        //   //   this.copyStatus = false;
-        //   // }
-        //   res.data.body.currentShape.map((item, index) => {
-        //     this.getNextPath(item.resourceId, 2);
-        //   });
-        // }
+        if (status === 1) {
+          //第一次进入取路径
+          this.initialList = res.data.body;
+          // console.log(this.initialList);
+          // if (
+          //   this.initialList.nextShapes[0].multi?.multi &&
+          //   res.data.body.nextShapes[0].multi.multi === "true"
+          // ) {
+           
+          // }
+        }
         if (status === 2) {
           if (res.data.body.nextShapes[0].condition !== null) {
             this.node = res.data.body;
@@ -409,16 +456,21 @@ export default {
     },
     //查询候选人接口
     getTreeLists(e, status) {
-      let id = "";
-      if (status === 2) {
-        id = "copy." + e;
+      if (e === 9) {
+        this.MultipersonTransfer = true;
       } else {
-        id =
-          e.nextShapes[0].properties.documentation == "createId" ||
-          e.nextShapes[0].properties.documentation == "createId-copy"
-            ? this.list.createId
-            : e.nextShapes[0].properties.documentation;
+        this.MultipersonTransfer = false;
       }
+      let id = this.initialList.nextShapes[0].properties.documentation;
+      // if (status === 2) {
+      //   id = "copy." + e;
+      // } else {
+      //   id =
+      //     e.nextShapes[0].properties.documentation == "createId" ||
+      //     e.nextShapes[0].properties.documentation == "createId-copy"
+      //       ? this.list.createId
+      //       : e.nextShapes[0].properties.documentation;
+      // }
 
       this.$http({
         url: "/market/api/user/info/queryNodePers?params=" + id,
@@ -441,6 +493,9 @@ export default {
       });
     },
     //转派按钮方法
+    a() {
+      this.clickGetTree([], "");
+    },
     clickTransfer(e) {
       if (e == 1) {
         // this.TransferStatus = true;
@@ -469,8 +524,14 @@ export default {
     },
     //选择树的回调
     changeTree(e) {
-      console.log(e);
-      this.backThree = e;
+      if (this.MultipersonTransfer) {
+        if (e.length > 1) {
+          this.$message.error("只能选择一个人");
+          return;
+        } else {
+          this.backThree = e;
+        }
+      }
     },
     //获取字典表常用意见
     getMetirialType(e) {

+ 21 - 29
src/pages/main/leader/components/export.vue

@@ -2,21 +2,18 @@
   <div class="flex-count">
     <div class="flex-num">
       <div class="time-title">已选({{ num }})项</div>
-      <div v-if="!approvalStatus" class="flex-time">
+      <div v-if="exportStatusList" class="flex-time">
         <div class="time-title">时间:</div>
- <el-date-picker
-      v-model="seachList"
-      type="daterange"
-      start-placeholder="开始日期"
-      end-placeholder="结束日期"
-      value-format="yyyy-MM-dd"
-      :default-time="['00:00:00', '23:59:59']">
-      size="small"
-    </el-date-picker>
-        <el-button
-          type="primary"
-          @click="clickSeach"
-          plain
+        <el-date-picker
+          v-model="seachList"
+          type="daterange"
+          start-placeholder="开始日期"
+          end-placeholder="结束日期"
+          value-format="yyyy-MM-dd"
+          :default-time="['00:00:00', '23:59:59']"
+        >
+        </el-date-picker>
+        <el-button type="primary" size="small" @click="clickSeach" plain
           >搜索</el-button
         >
       </div>
@@ -43,14 +40,14 @@ export default {
       type: Number,
       default: () => [],
     },
-      exportStatusList: {
-          type:Boolean,
-          default: () => [],
-      },
+    exportStatusList: {
+      type: Boolean,
+      default: () => [],
+    },
   },
   data() {
     return {
-      seachList:'',
+      seachList: "",
       approvalStatus: true,
       exportStatus: true,
     };
@@ -65,18 +62,13 @@ export default {
       }
     },
     clickApproval() {
-        this.$emit('clickApproval',true)
-
+      this.$emit("clickApproval", true);
+    },
+    clickSeach() {
+      this.$emit("seachExportList", this.seachList);
     },
-    clickSeach(){
-
-
-        this.$emit('seachExportList',this.seachList)
-    }
-  },
-  created() {
-
   },
+  created() {},
 };
 </script>
 

+ 120 - 56
src/pages/main/leader/components/form.vue

@@ -1,50 +1,105 @@
 <template>
-  <div>
-    <slot :name="list.name"></slot>
-    <el-table ref="table" style="width: 100%" :data="list.data" :height="list.height + 'px'"
-      :max-height="list.height + 'px'" @row-click="getRowData" @selection-change="selectionChange"
-      :cell-style="columnbackgroundStyle" empty-text="暂无数据" @cell-click="getRowList">
-      <!-- 是否多选 -->
-      <el-table-column v-if="list.isSelection" :selecttable="list" type="selection" :width="100" align="center" />
+  <div class="container">
+    <div class="table">
+      <slot :name="list.name"></slot>
+      <el-table
+        ref="table"
+        style="width: 100%"
+        :data="list.data"
+        @row-click="getRowData"
+        @selection-change="selectionChange"
+        :cell-style="columnbackgroundStyle"
+        empty-text="暂无数据"
+        @cell-click="getRowList"
+        :tree-props="{ children: 'children', hasChildren: 'hasChildren' }"
+      >
+        <!-- 是否多选 -->
+        <el-table-column
+          v-if="list.isSelection"
+          :selecttable="list"
+          type="selection"
+          :width="100"
+          align="center"
+        />
 
-      <!-- 是否需要序号 -->
-      <el-table-column v-if="list.isIndex" type="index" label="序号" width="55" align="center" />
-      <template v-for="item in list.titledata">
-        <el-table-column :key="item.prop" :prop="item.prop" :label="item.label" align="center" show-overflow-tooltip
-          :width="item.width || 100" />
-      </template>
-      <!-- 操作列 -->
-      <el-table-column v-if="list.isOperation" v-bind="list.data && list.data.length ? { fixed: 'right' } : null"
-        style="margin-right: 20px" class-name="handle-td" label-class-name="tc" :label="list.operation.label"
-        align="center">
-        <!-- UI统一一排放3个,4个以上出现更多 -->
-        <template slot-scope="scope">
-          <!-- 三个一排的情况,去掉隐藏的按钮后的长度 -->
-          <template v-if="list.operation.data.length > 0">
-            <div class="btn">
-              <div v-for="item in list.operation.data" :key="item.label">
-                <template v-if="item.type !== 'icon'">
-                  <el-button v-bind="item" :type="item.type ? item.type : ''" size="mini" @click.native.prevent="
-                    item.handleRow(scope.$index, scope.row, item.label)
-                  ">
-                    {{ item.label }}
-                  </el-button>
-                </template>
-                <template v-else>
-                  <i :class="[icon, item.icon]" v-bind="item"
-                    @click="item.handleRow(scope.$index, scope.row, item.label)" />
-                </template>
+        <!-- 是否需要序号 -->
+        <el-table-column
+          v-if="list.isIndex"
+          type="index"
+          label="序号"
+          width="55"
+          align="center"
+        />
+        <template v-for="item in list.titledata">
+          <el-table-column
+            :key="item.prop"
+            :prop="item.prop"
+            :label="item.label"
+            align="center"
+            show-overflow-tooltip
+            :width="item.width || 100"
+          />
+        </template>
+        <!-- 操作列 -->
+        <el-table-column
+          v-if="list.isOperation"
+          v-bind="list.data && list.data.length ? { fixed: 'right' } : null"
+          style="margin-right: 20px"
+          class-name="handle-td"
+          label-class-name="tc"
+          :label="list.operation.label"
+          align="center"
+        >
+          <!-- UI统一一排放3个,4个以上出现更多 -->
+          <template slot-scope="scope">
+            <!-- 三个一排的情况,去掉隐藏的按钮后的长度 -->
+            <template v-if="list.operation.data.length > 0">
+              <div class="btn">
+                <div v-for="item in list.operation.data" :key="item.label">
+                  <template v-if="item.type !== 'icon'">
+                    <el-button
+                      v-bind="item"
+                      :type="item.type ? item.type : ''"
+                      size="mini"
+                      @click.native.prevent="
+                        item.handleRow(scope.$index, scope.row, item.label)
+                      "
+                    >
+                      {{ item.label }}
+                    </el-button>
+                  </template>
+                  <template v-else>
+                    <i
+                      :class="[icon, item.icon]"
+                      v-bind="item"
+                      @click="
+                        item.handleRow(scope.$index, scope.row, item.label)
+                      "
+                    />
+                  </template>
+                </div>
               </div>
-            </div>
+            </template>
           </template>
-        </template>
-      </el-table-column>
-    </el-table>
-    <div class="page">
-      <el-pagination style="display: flex; flex-direction: row-reverse" v-if="list.pageData.total > 0"
-        :current-page.sync="page" :page-sizes="list.pageData.pageSizes ? list.pageData.pageSizes : [10]"
-        :page-size="list.pageData.pageSize" layout="total, sizes, prev, pager, next, jumper"
-        :total="list.pageData.total" @size-change="handleSizeChange" @current-change="handleCurrentChange" />
+        </el-table-column>
+      </el-table>
+      <div class="page">
+        <el-pagination
+          style="
+            display: flex;
+            flex-direction: row-reverse;
+            background-color: #fff;
+          "
+          v-if="list.pageData.total > 0"
+          :current-page.sync="page"
+          :page-sizes="list.pageData.pageSizes ? list.pageData.pageSizes : [10]"
+          :page-size="list.pageData.pageSize"
+          layout="total, sizes, prev, pager, next, jumper"
+          :total="list.pageData.total"
+          @size-change="handleSizeChange"
+          @current-change="handleCurrentChange"
+        />
+      </div>
     </div>
   </div>
 </template>
@@ -65,20 +120,13 @@ export default {
   },
   created() {
     console.log(this.list);
-    // this.columnbackgroundStyle()
-  },
-  mounted() {
-    console.log(this.list);
   },
+  mounted() {},
   methods: {
     columnbackgroundStyle({ row, column, rowIndex, columnIndex }) {
-      // console.log(row);
-      // console.log(column);
-      // console.log(rowIndex);
-      // console.log(columnIndex);
-      if (column.type == 'default') {
-        if (column.label === '需求名称') {
-          return 'color:#0682CD;'
+      if (column.type == "default") {
+        if (column.label === "需求名称") {
+          return "color:#0682CD;";
         }
       }
       //   if (columnIndex == 1) {
@@ -93,7 +141,7 @@ export default {
     handleAdd(name) {
       this.$emit("toolMsg", name);
     },
-    handleRow(index, row, lable) { },
+    handleRow(index, row, lable) {},
     handleSizeChange(val) {
       this.$emit("changeSize", val);
       console.log(`每页 ${val} 条`);
@@ -113,9 +161,25 @@ export default {
 };
 </script>
 
-<style>
+<style lang="scss" scoped>
 .btn {
   display: flex;
   justify-content: center;
 }
+.container {
+  display: flex;
+  flex-direction: column;
+  justify-content: space-between;
+  height: 100%;
+  overflow: hidden;
+  margin-bottom: 4%;
+  .table {
+    flex: 1;
+    position: relative;
+    ::v-deep.el-table {
+      position: absolute;
+      overflow-y: auto;
+    }
+  }
+}
 </style>

+ 168 - 123
src/pages/main/leader/components/formTable.vue

@@ -6,15 +6,15 @@
         ref="form"
         :model="form"
         :rules="rule"
-        label-width="130px"
-        style="margin-top: 30px"
         :disabled="disabled"
+        label-width="200px"
       >
         <div class="flex-header">
           <el-form-item
-            style="width: 40%; margin-right: 10%"
+            style="width: 44%"
             label="需求名称:"
             prop="needName"
+            label-width="140px"
           >
             <el-input v-model="form.needName"></el-input>
           </el-form-item>
@@ -47,11 +47,7 @@
           </el-form-item>
         </div>
         <div class="flex-input-tare flex-header">
-          <el-form-item
-            label="需求背景及目的"
-            label-width="120px"
-            prop="needBackdrop"
-          >
+          <el-form-item label="需求背景及目的" prop="needBackdrop">
             <el-input
               type="textarea"
               maxlength="300"
@@ -61,7 +57,7 @@
           </el-form-item>
         </div>
         <div class="flex-input-tare flex-header">
-          <el-form-item label="需求内容" label-width="120px" prop="needContent">
+          <el-form-item label="需求内容" prop="needContent">
             <el-input
               type="textarea"
               maxlength="300"
@@ -79,8 +75,8 @@
           </el-form-item>
           <el-form-item
             label="是否数智化需求:"
-            label-width="130px"
             prop="isDigitization"
+            label-width="200px"
           >
             <el-select v-model="form.isDigitization" placeholder="请选择">
               <el-option label="是" value="是"></el-option>
@@ -89,15 +85,15 @@
           </el-form-item>
           <el-form-item
             label="是否七大工程需求:"
-            label-width="140px"
             prop="isSevenProject"
+            label-width="220px"
           >
             <el-select v-model="form.isSevenProject" placeholder="请选择">
               <el-option label="是" value="是"></el-option>
               <el-option label="否" value="否"></el-option>
             </el-select>
           </el-form-item>
-          <el-form-item label="是否需求目录框架需求:" label-width="160px">
+          <el-form-item label="是否需求目录框架需求:" label-width="280px">
             <el-select v-model="form.isMarketMeeting" placeholder="请选择">
               <el-option label="是" value="是"></el-option>
               <el-option label="否" value="否"></el-option>
@@ -183,15 +179,15 @@
           </el-form-item>
         </div>
         <div class="flex-header">
-          <el-form-item label="功能开发承载平台:" label-width="130px">
+          <el-form-item label="功能开发承载平台:" label-width="200px">
             <el-input v-model="form.functionBearPlatform"></el-input>
           </el-form-item>
-          <el-form-item label="功能展示应用平台:" label-width="130px">
+          <el-form-item label="功能展示应用平台:" label-width="200px">
             <el-input v-model="form.functionShowPlatform"></el-input>
           </el-form-item>
         </div>
         <div class="flex-header">
-          <el-form-item label="需求类型:">
+          <el-form-item label="需求类型:" prop="needType">
             <el-select
               v-model="form.needType"
               placeholder="请选择"
@@ -218,6 +214,7 @@
               :disabled="timeStatus"
               placeholder="选择日期"
               v-model="form.dueTime"
+              :picker-options="pickerOptions"
               value-format="yyyy-MM-dd"
               style="width: 100%"
             ></el-date-picker>
@@ -228,7 +225,7 @@
             功能开发类,数智类填写
           </div>
           <div class="flex-header">
-            <el-form-item label="是否涉及敏感信息:" label-width="130px">
+            <el-form-item label="是否涉及敏感信息:" label-width="200px">
               <el-select v-model="form.isSensitiveData" placeholder="请选择">
                 <el-option label="是" value="是"></el-option>
                 <el-option label="否" value="否"></el-option>
@@ -242,27 +239,28 @@
             </el-form-item>
           </div>
           <div class="flex-header">
-            <el-form-item label="上线配合测试地市:" label-width="130px">
+            <el-form-item label="上线配合测试地市:" label-width="200px">
               <el-input v-model="form.onlineTestCity"></el-input>
             </el-form-item>
           </div>
           <div class="flex-header">
-            <el-form-item label="功能完成时间:" label-width="130px">
+            <el-form-item label="功能完成时间:" label-width="200px">
               <el-date-picker
                 type="date"
                 placeholder="选择日期"
                 v-model="form.doneTime"
+                :picker-options="pickerOptions"
                 value-format="yyyy-MM-dd"
                 style="width: 100%"
               ></el-date-picker>
             </el-form-item>
-            <el-form-item label="是否需要模糊化:" label-width="120px">
+            <el-form-item label="是否需要模糊化:" label-width="200px">
               <el-select v-model="form.isVaguev" placeholder="请选择">
                 <el-option label="是" value="是"></el-option>
                 <el-option label="否" value="否"></el-option>
               </el-select>
             </el-form-item>
-            <el-form-item label="是否需要纳入金库模式:" label-width="160px">
+            <el-form-item label="是否需要纳入金库模式:" label-width="280px">
               <el-select v-model="form.isVaultMode" placeholder="请选择">
                 <el-option label="是" value="是"></el-option>
                 <el-option label="否" value="否"></el-option>
@@ -303,8 +301,15 @@
             </el-form-item>
           </div>
         </div>
-        <div class="flex-header" style="display: flex; flex-direction: column">
-          <el-form-item label="附件:" prop="mkFileShareAttachList">
+        <div
+          class="flex-header flex-upload"
+          style="display: flex; flex-direction: column"
+        >
+          <el-form-item
+            label="附件:"
+            prop="mkFileShareAttachList"
+            label-width="120px"
+          >
             <my-upload
               ref="upload"
               @uploadBack="uploadBack"
@@ -312,12 +317,36 @@
               @clickDownload="download"
               :fileInfo="fileInfo"
               :fileList="list.mkFileShareAttachList"
-              style="width: 30% !important"
             ></my-upload>
           </el-form-item>
-          <div @click="downExcel" class="el-upload__tip" slot="tip">
-            备注内容:PPT(非市场部需求以及市场部非框架内需求需要通过市场决策会决议,请上传ppt)、《业务需求模板.xlsx》《后评估模板.xlsx》
-            《敏感信息范围说明.xlsx》填写并上传。
+          <div class="el-upload__tip" slot="tip">
+            备注内容:PPT(非市场部需求以及市场部非框架内需求需要通过市场决策会决议,请上传ppt。
+          </div>
+          <div class="el-upload__tip" slot="tip">
+            <a
+              href="./static/file/a.xlsx"
+              target="_blank"
+              download="后评估模板.xlsx"
+              >《后评估模板.xlsx》、</a
+            >
+            <a
+              target="_blank"
+              href="./static/file/b.xlsx"
+              download="业务需求模板.xlsx"
+              >《业务需求模板.xlsx》、</a
+            >
+            <a
+              target="_blank"
+              href="./static/file/c.xlsx"
+              download="敏感信息范围说明.xlsx"
+              >《敏感信息范围说明.xlsx》、</a
+            >
+            <a
+              target="_blank"
+              href="./static/file/d.pptx"
+              download="关于系统开发需求的汇报(第十期).pptx"
+              >《关于系统开发需求的汇报(第十期).pptx》</a
+            >
           </div>
         </div>
         <!-- 处理人意见模块 -->
@@ -331,7 +360,7 @@
 </template>
 
 <script>
-import myUpload from "../../../../components/upload";
+import myUpload from "../../../../components/workflowUpload";
 
 export default {
   components: {
@@ -346,6 +375,11 @@ export default {
         url: "/market/waf/upload",
         fileList: [],
       },
+      pickerOptions: {
+        disabledDate(time) {
+          return time.getTime() < Date.now() - 8.64e7;
+        },
+      },
       oneList: [],
       childrenList: [],
       twoList: [],
@@ -478,6 +512,7 @@ export default {
         needSource: [
           { required: true, message: "请输入需求来源", trigger: "change" },
         ],
+
         needBackdrop: [
           { required: true, message: "请输入需求背景", trigger: "blur" },
           {
@@ -502,41 +537,14 @@ export default {
         isDigitization: [
           { required: true, message: "请选择", trigger: "change" },
         ],
+        needType: [
+          { required: true, message: "请选择需求类型", trigger: "change" },
+        ],
         isSevenProject: [
           { required: true, message: "请选择七大工程需求", trigger: "change" },
         ],
-        needName: [
-          { required: true, message: "请输入需求名称", trigger: "blur" },
-        ],
-        needName: [
-          { required: true, message: "请输入需求名称", trigger: "blur" },
-        ],
-        needName: [
-          { required: true, message: "请输入需求名称", trigger: "blur" },
-        ],
-        needName: [
-          { required: true, message: "请输入需求名称", trigger: "blur" },
-        ],
-        needName: [
-          { required: true, message: "请输入需求名称", trigger: "blur" },
-        ],
-        needName: [
-          { required: true, message: "请输入需求名称", trigger: "blur" },
-        ],
-        needName: [
-          { required: true, message: "请输入需求名称", trigger: "blur" },
-        ],
-        needName: [
-          { required: true, message: "请输入需求名称", trigger: "blur" },
-        ],
-        needName: [
-          { required: true, message: "请输入需求名称", trigger: "blur" },
-        ],
-        needName: [
-          { required: true, message: "请输入需求名称", trigger: "blur" },
-        ],
       },
-      copyRule:{},
+      copyRule: {},
       isList: [],
     };
   },
@@ -616,7 +624,7 @@ export default {
       handler(newVal, oldVal) {
         if (newVal === "是") {
           this.rule = { ...this.rule, ...this.rules };
-        }else{
+        } else {
           this.rule = this.copyRule;
         }
         console.log(this.rule);
@@ -799,66 +807,69 @@ export default {
     },
   },
   methods: {
-    // validateFiles(rule, value, callback) {
-    //   let num = 3;
+    disableDate(time) {
+      return time.getTime() < Date.now() - 8.64e7;
+    },
+    validateFiles(rule, value, callback) {
+      let num = 3;
 
-    //   let nameList = [
-    //     "业务需求模板.xlsx",
-    //     "后评估模板.xlsx",
-    //     "敏感信息范围说明.xlsx",
-    //   ];
-    //   let files = this.$refs.upload.attList;
-    //   if (
-    //     (this.form.isMarketMeeting !== "是" &&
-    //       this.form.applyDept === "市场经营部") ||
-    //     (this.form.applyDept !== "信息技术中心" &&
-    //       this.form.applyDept !== "市场经营部")
-    //   ) {
-    //     num++;
-    //   }
-    //   if (!files.length || files.length < num) {
-    //     callback(new Error("请上传正确的模板数量!"));
-    //   } else {
-    //     let arrList = [];
-    //     for (let task of nameList) {
-    //       let newList = files.find((item) => {
-    //         return item.name === task;
-    //         // }
-    //       });
-    //       arrList.push(newList);
-    //     }
-    //     files.map((item) => {
-    //       let fileIndex = item.name.lastIndexOf(".");
-    //       let substrName = item.name.substr(fileIndex);
-    //       if (substrName == ".pptx") {
-    //         arrList.push(item);
-    //       }
-    //     });
-    //     if (
-    //       (this.form.isMarketMeeting !== "是" &&
-    //         this.form.applyDept === "市场经营部") ||
-    //       (this.form.applyDept !== "信息技术中心" &&
-    //         this.form.applyDept !== "市场经营部")
-    //     ) {
-    //       let pptList = arrList.filter((item) => {
-    //         let fileIndex = item.name.lastIndexOf(".");
-    //         let substrName = item.name.substr(fileIndex);
-    //         return substrName == ".pptx";
-    //       });
-    //       if (!pptList.length) {
-    //         callback(new Error("请上传ppt!"));
-    //       }
-    //     }
-    //     arrList.map((item) => {
-    //       //excel命名错误
-    //       if (item === undefined) {
-    //         callback(new Error("请按备注中模板名称命名!"));
-    //       }
-    //     });
-    //   }
+      let nameList = [
+        "业务需求模板.xlsx",
+        "后评估模板.xlsx",
+        "敏感信息范围说明.xlsx",
+      ];
+      let files = this.$refs.upload.attList;
+      // if (
+      //   (this.form.isMarketMeeting !== "是" &&
+      //     this.form.applyDept === "市场经营部") ||
+      //   (this.form.applyDept !== "信息技术中心" &&
+      //     this.form.applyDept !== "市场经营部")
+      // ) {
+      //   num++;
+      // }
+      if (!files.length || files.length < num) {
+        callback(new Error("请上传正确的模板数量!"));
+      } else {
+        let arrList = [];
+        for (let task of nameList) {
+          let newList = files.find((item) => {
+            return item.name === task;
+            // }
+          });
+          arrList.push(newList);
+        }
+        // files.map((item) => {
+        //   let fileIndex = item.name.lastIndexOf(".");
+        //   let substrName = item.name.substr(fileIndex);
+        //   if (substrName == ".pptx") {
+        //     arrList.push(item);
+        //   }
+        // });
+        // if (
+        //   (this.form.isMarketMeeting !== "是" &&
+        //     this.form.applyDept === "市场经营部") ||
+        //   (this.form.applyDept !== "信息技术中心" &&
+        //     this.form.applyDept !== "市场经营部")
+        // ) {
+        //   let pptList = arrList.filter((item) => {
+        //     let fileIndex = item.name.lastIndexOf(".");
+        //     let substrName = item.name.substr(fileIndex);
+        //     return substrName == ".pptx";
+        //   });
+        //   if (!pptList.length) {
+        //     callback(new Error("请上传ppt!"));
+        //   }
+        // }
+        arrList.map((item) => {
+          //excel命名错误
+          if (item === undefined) {
+            callback(new Error("请按备注中模板名称命名!"));
+          }
+        });
+      }
 
-    //   callback();
-    // },
+      callback();
+    },
     clickLLength(e) {
       if (e !== 0) {
         this.Length = true;
@@ -1032,6 +1043,9 @@ export default {
 </script>
 
 <style lang="scss" scoped>
+a {
+  text-decoration: none;
+}
 ::v-deep .el-upload-list {
   width: 23rem;
 }
@@ -1039,17 +1053,22 @@ export default {
   text-align: center;
   font-size: 24px;
   line-height: 60px;
-  border-bottom: 1px solid #e1e1e1;
+
   font-weight: bold;
 }
 .flex-header {
   margin-top: 20px;
   display: flex;
   //   justify-content: space-between;
-  border-bottom: 1px solid #e1e1e1;
+
   ::v-deep .el-form-item {
     width: 20%;
-    margin-right: 5%;
+    margin-right: 60px;
+  }
+}
+.flex-upload {
+  ::v-deep .el-form-item {
+    width: 100%;
   }
 }
 .flex-input-tare {
@@ -1057,17 +1076,43 @@ export default {
     width: 100%;
     margin-right: 5%;
   }
+  ::v-deep .el-form-item__label {
+    width: 9rem !important;
+  }
 }
 .el-upload__tip {
   color: red;
 }
-::v-deep .el-input--suffix .el-input__inner {
-  width: 119% !important;
-}
+// ::v-deep .el-input--suffix .el-input__inner {
+//   width: 119% !important;
+// }
 ::v-deep .el-input__inner {
   color: black !important;
 }
 ::v-deep .el-textarea.is-disabled .el-textarea__inner {
   color: black !important;
 }
+::v-deep .el-form-item {
+  display: flex;
+}
+::v-deep .el-form-item__label {
+  // width:100%;
+  height: 50px;
+  line-height: 40px !important;
+  width: 130px;
+  font-size: 0.5rem;
+}
+::v-deep .el-form-item__content {
+  width: 100%;
+  margin-left: 0% !important;
+}
+.el-select,
+::v-deep.el-input_inner {
+  width: 100%;
+}
+::v-deep.el-form-item.foldLabel .el-form-item__label {
+  white-space: pre-line; /*换行显示*/
+  height: 10px; /*设置lable高度,input高度一样*/
+  line-height: 30px !important;
+}
 </style>

+ 186 - 0
src/pages/main/leader/components/formTrace.vue

@@ -0,0 +1,186 @@
+<template>
+  <div class="container">
+    <div class="table">
+      <slot :name="list.name"></slot>
+      <el-table
+        ref="table"
+        style="width: 100%"
+        :data="list.data"
+        row-key="id"
+        @row-click="getRowData"
+        @selection-change="selectionChange"
+        :cell-style="columnbackgroundStyle"
+        empty-text="暂无数据"
+        @cell-click="getRowList"
+        :tree-props="{ children: 'children', hasChildren: 'hasChildren' }"
+      >
+        <!-- 是否多选 -->
+        <el-table-column
+          v-if="list.isSelection"
+          :selecttable="list"
+          type="selection"
+          :width="100"
+          align="center"
+        />
+
+        <!-- 是否需要序号 -->
+        <el-table-column
+          v-if="list.isIndex"
+          type="index"
+          label="序号"
+          width="55"
+          align="center"
+        />
+        <template v-for="item in list.titledata">
+          <el-table-column
+            :key="item.prop"
+            :prop="item.prop"
+            :label="item.label"
+            align="center"
+            show-overflow-tooltip
+            :width="item.width || 100"
+          />
+        </template>
+        <!-- 操作列 -->
+        <el-table-column
+          v-if="list.isOperation"
+          v-bind="list.data && list.data.length ? { fixed: 'right' } : null"
+          style="margin-right: 20px"
+          class-name="handle-td"
+          label-class-name="tc"
+          :label="list.operation.label"
+          align="center"
+        >
+          <!-- UI统一一排放3个,4个以上出现更多 -->
+          <template slot-scope="scope">
+            <!-- 三个一排的情况,去掉隐藏的按钮后的长度 -->
+            <template v-if="list.operation.data.length > 0">
+              <div class="btn">
+                <div v-for="item in list.operation.data" :key="item.label">
+                  <template v-if="item.type !== 'icon'">
+                    <el-button
+                      v-bind="item"
+                      :type="item.type ? item.type : ''"
+                      size="mini"
+                      @click.native.prevent="
+                        item.handleRow(scope.$index, scope.row, item.label)
+                      "
+                    >
+                      {{ item.label }}
+                    </el-button>
+                  </template>
+                  <template v-else>
+                    <i
+                      :class="[icon, item.icon]"
+                      v-bind="item"
+                      @click="
+                        item.handleRow(scope.$index, scope.row, item.label)
+                      "
+                    />
+                  </template>
+                </div>
+              </div>
+            </template>
+          </template>
+        </el-table-column>
+      </el-table>
+      <div class="page">
+        <el-pagination
+          style="
+            display: flex;
+            flex-direction: row-reverse;
+            background-color: #fff;
+          "
+          v-if="list.pageData.total > 0"
+          :current-page.sync="page"
+          :page-sizes="list.pageData.pageSizes ? list.pageData.pageSizes : [10]"
+          :page-size="list.pageData.pageSize"
+          layout="total, sizes, prev, pager, next, jumper"
+          :total="list.pageData.total"
+          @size-change="handleSizeChange"
+          @current-change="handleCurrentChange"
+        />
+      </div>
+    </div>
+  </div>
+</template>
+
+<script>
+export default {
+  data() {
+    return {
+      page: 1,
+    };
+  },
+  props: {
+    //  表格数据和表格部分属性的对象
+    // eslint-disable-next-line vue/require-default-prop
+    list: {
+      type: Object,
+    },
+  },
+  created() {
+    console.log(this.list);
+  },
+  mounted() {},
+  methods: {
+    columnbackgroundStyle({ row, column, rowIndex, columnIndex }) {
+      if (column.type == "default") {
+        if (column.label === "需求名称") {
+          return "color:#0682CD;";
+        }
+      }
+      //   if (columnIndex == 1) {
+      // 	//让下标为1的列数背景颜色显示为红色(颜色自定义根据大家需求来)
+      //     return 'color:#0682CD;'
+      // }
+    },
+    selectionChange(val) {
+      //多选数字回调
+      this.$emit("num", val);
+    },
+    handleAdd(name) {
+      this.$emit("toolMsg", name);
+    },
+    handleRow(index, row, lable) {},
+    handleSizeChange(val) {
+      this.$emit("changeSize", val);
+      console.log(`每页 ${val} 条`);
+    },
+    handleCurrentChange(val) {
+      this.$emit("changeNum", val);
+      console.log(`当前页: ${val}`);
+    },
+    // 点击行即可选中
+    getRowData(row) {
+      this.$refs.table.toggleRowSelection(row);
+    },
+    getRowList(row, column, event, cell) {
+      this.$emit("clickDemand", column.label, row);
+    },
+  },
+};
+</script>
+
+<style lang="scss" scoped>
+.btn {
+  display: flex;
+  justify-content: center;
+}
+.container {
+  display: flex;
+  flex-direction: column;
+  justify-content: space-between;
+  height: 100%;
+  overflow: hidden;
+  margin-bottom: 4%;
+  .table {
+    flex: 1;
+    position: relative;
+    ::v-deep.el-table {
+      position: absolute;
+      overflow-y: auto;
+    }
+  }
+}
+</style>

+ 2 - 3
src/pages/main/leader/components/tabs.vue

@@ -1,5 +1,5 @@
 <template>
-  <el-tabs v-model="activeName" @tab-click="handleClick">
+  <el-tabs v-model="activeName" @tab-click="handleClick" style="width:80%" >
     <!-- <el-tab-pane
     class="flex-tabs"
       v-for="item in tabList"
@@ -37,8 +37,7 @@ export default {
       activeName: "first",
     };
   },
-  created() {
-  },
+  created() {},
   methods: {
     handleClick(tab, event) {
       this.$emit("status", tab._props.name);

+ 305 - 51
src/pages/main/leader/demand/demandHome.vue

@@ -44,6 +44,7 @@
       :before-close="handleClose"
       :modal="false"
       v-if="dialogStatus"
+      style="display: flex; flex-direction: column"
       :destroy-on-close="true"
     >
       <!-- 后期维护 -->
@@ -76,7 +77,9 @@
       />
       <div>
         <div class="table-title">流程追踪</div>
-        <Table :list="lables"></Table>
+        <div v-if="abc == true">
+          <Tables :list="lables"></Tables>
+        </div>
       </div>
     </el-dialog>
     <div v-if="destroy">
@@ -91,9 +94,18 @@
       >
         <Workflow
           :list="fromList"
+          v-if="isWorkflowStatus == true"
           @beforeClose="beforeClose"
           :requestForm="requestForm"
         />
+        <WorkflowEntrance
+          :list="fromList"
+          v-else
+          :lastManList="lastManList"
+          @beforeClose="beforeClose"
+          :requestForm="requestForm"
+        />
+
         <!-- 后期维护 -->
       </el-dialog>
     </div>
@@ -123,14 +135,15 @@
     </el-dialog> -->
   </div>
 </template>
-
 <script>
 import Workflow from "../../../../components/workflow";
+import WorkflowEntrance from "../../../../components/workflowEntrance";
 import FormTable from "../components/formTable.vue";
 import Seach from "../components/search.vue";
 import Export from "../components/export.vue";
 import Tabs from "../components/tabs.vue";
 import Table from "../components/form.vue";
+import Tables from "../components/formTrace.vue";
 import deptTree from "../components/deptThree.vue";
 import Qs from "qs";
 export default {
@@ -142,13 +155,17 @@ export default {
     FormTable,
     deptTree,
     Workflow,
+    WorkflowEntrance,
+    Tables
   },
   data() {
     return {
+      UserPermissionsList: [],
+      isWorkflowStatus: true, //默认展示模式组件,为true时展示多人处理组件
       buttonStatus: true,
       copyStatus: false,
       dialogTitle: "",
-      disabled: false,
+      disabled: true,
       destroy: false,
       //分页数据
       totalPage: "1", //默认第一页
@@ -179,8 +196,7 @@ export default {
       },
       requestForm: {
         // fresourceId: "0d94de8a-0281-11ed-a302-4ae7da54db39", // 本地环境
-        fresourceId: "canvas", // 生产环境
-        // fresourceId: "bf79721c-33f3-11ed-ba0b-00505687dcd3", //测试环境
+        fresourceId: "bf79721c-33f3-11ed-ba0b-00505687dcd3", //测试环境
         processDefinitionKey: "request_form_process",
       },
       treeList: [], //候选人列表
@@ -277,7 +293,6 @@ export default {
       },
       firstTable: {
         name: "first",
-        height: "650",
         titledata: [
           {
             label: "需求名称",
@@ -568,6 +583,7 @@ export default {
                 this.disabled = true;
                 this.buttonStatus = false;
                 this.getReadList(r.copytaskid);
+                this.clickForm(r)
               }, // 自定义事件
             },
           ],
@@ -647,6 +663,7 @@ export default {
           ],
         },
       },
+      abc: false,
       lable: {},
       copyUser: "", //抄送人
       backThree: [],
@@ -655,26 +672,31 @@ export default {
         height: "400",
         titledata: [
           {
+            id: 1,
             label: "环节名称",
             prop: "taskName",
             width: 300,
           },
           {
+            id: 2,
             label: "处理人",
             prop: "assignee",
             width: 300,
           },
           {
+            id: 3,
             label: "到达时间",
             prop: "startTime",
             width: 300,
           },
           {
+            id: 4,
             label: "处理时间",
             prop: "endTime",
             width: 300,
           },
           {
+            id: 5,
             label: "回复意见",
             prop: "content",
             width: 300,
@@ -683,7 +705,7 @@ export default {
         data: [], //内容数据
         loading: true,
         pageData: {
-          total: 10, // 总条数
+          total: 0, // 总条数
           pageSize: 10, // 每页数量
           pageNum: 1, // 页码
         },
@@ -735,9 +757,76 @@ export default {
       clickTaskName: "",
       seachLists: {},
       timeList: {},
+      lastManList: [],
     };
   },
   created() {
+    this.getUserIndex();
+    // let A = [
+    //   {
+    //     id: 1,
+    //     b: "456",
+    //   },
+    //   {
+    //     id: 2,
+    //     b: "456",
+    //   },
+    // ];
+    // let B = [
+    //   {
+    //     a: 1,
+    //     b: "4567",
+    //   },
+    //   {
+    //     a: 1,
+    //     b: "4568",
+    //   },
+    //   {
+    //     a: 2,
+    //     b: "4567",
+    //   },
+    // ];
+    // A.map((item) => {
+    //   item.c = [];
+    //   let index = B.findIndex((items) => {
+    //     if (items.a == item.id) {
+    //       item.c.push(items);
+    //     }
+    //   });
+    //   console.log(index);
+    //  B.map((items,index) =>{
+    //   if(item.id == items.a){
+    //     item.c.push(items)
+    //   }
+
+    //  })
+    // });
+    // console.log(A);
+    // function getUserDescribe(name) {
+    //   const describeForNameMap = [
+    //     [
+    //       (name) => name.length > 3, // 判断条件
+    //       () => console.log("名字太长"), // 执行函数
+    //     ],
+    //     [(name) => name.length < 2, () => console.log("名字太短")],
+    //     [(name) => name[0] === "陈", () => console.log("小陈")],
+    //     [(name) => name === "大鹏", () => console.log("管理员")],
+    //     [
+    //       (name) => name[0] === "李" && name !== "李鹏",
+    //       () => console.log("小李"),
+    //     ],
+    //   ];
+    //   // 获取符合条件的子数组
+    //   const getDescribe = describeForNameMap.find((item) => item[0](name));
+    //   // 子数组存在则运行子数组中的第二个元素(执行函数)
+    //   getDescribe ? getDescribe[1]() : console.log("此人比较神秘!");
+    // }
+    // getUserDescribe('张元芳微软')
+    // const func = (name, age = "fatfish") => {
+    //   console.log(name);
+    // };
+    // func("123123123");
+
     //oa跳转回来显示
     let status = JSON.stringify(this.$route.query) == "{}";
     if (status) {
@@ -757,7 +846,7 @@ export default {
       }
       //待阅
       if (copy == 1) {
-        this.clickTagName = "four"
+        this.clickTagName = "four";
         this.getToBeRead(list, 1);
       }
     }
@@ -765,6 +854,32 @@ export default {
     this.lable = this.firstTable;
   },
   methods: {
+    //是否最后一个人
+    async getLastName() {
+      console.log(this.fromList);
+      let list = {
+        procinstid: this.fromList.processId,
+        taskid: this.fromList.taskId,
+
+        // taskId:e.taskId
+      };
+      let _this = this;
+      let obj = {
+        url: this.$url.formList.getLastName, //流程追踪接口
+        data: list,
+        // status: "form",
+        headers: {
+          "Content-Type": "application/json",
+        },
+      };
+
+      let res = await this.common.httpPost(obj, success);
+      function success(data) {
+        _this.isWorkflowStatus = data.lastMan == false ? false : true;
+        _this.lastManList = data;
+        // console.log(_this.isWorkflowStatus);
+      }
+    },
     //添加面包屑
     setabList(n, p) {
       let params = {
@@ -862,11 +977,7 @@ export default {
         },
         data: this.$refs.formTable.form,
       }).then((res) => {
-        if (res.code === 0) {
-          this.$message.success("转需求管理平台成功!");
-        } else {
-          this.$message.error("转需求管理平台错误!");
-        }
+        this.$message.success("转需求管理平台成功!");
       });
     },
     //批量导出搜索
@@ -900,10 +1011,11 @@ export default {
           this.disabled = true;
           this.startStatus = false;
           this.saveStatus = false;
+          this.forwardStatus = false;
+          this.exportBtnStatus = false;
         }
         if (this.clickTagName === "three") {
           if (res.taskName === "起草") {
-            console.log(res);
             this.startStatus = true;
             this.disabled = false;
             this.saveStatus = true;
@@ -1047,30 +1159,32 @@ export default {
     },
     //选择树的回调
     changeTree(e) {
-      if (e.length > 1) {
-        this.$message.error("只能选择一个人");
-        return;
-      } else {
-        this.backThree = e;
-        if (e[0]) {
-          this.selectUser = e[0].loginNameStr;
-        } else {
-          this.selectUser = "暂无选择";
-        }
-      }
+      console.log(e);
+      // if (e.length > 1) {
+      //   this.$message.error("只能选择一个人");
+      //   return;
+      // } else {
+      //   this.backThree = e;
+      //   if (e[0]) {
+      //     this.selectUser = e[0].loginNameStr;
+      //   } else {
+      //     this.selectUser = "暂无选择";
+      //   }
+      // }
     },
     changeTreeCopy(e) {
-      if (e.length > 1) {
-        this.$message.error("只能选择一个人");
-        return;
-      } else {
-        this.backCopyThree = e;
-        if (e[0]) {
-          this.copyUser = e[0].loginNameStr;
-        } else {
-          this.copyUser = "暂无选择";
-        }
-      }
+      console.log(e);
+      // if (e.length > 1) {
+      //   this.$message.error("只能选择一个人");
+      //   return;
+      // } else {
+      //   this.backCopyThree = e;
+      //   if (e[0]) {
+      //     this.copyUser = e[0].loginNameStr;
+      //   } else {
+      //     this.copyUser = "暂无选择";
+      //   }
+      // }
     },
     //查询form表单数据
     getFromQuery(e) {
@@ -1084,6 +1198,7 @@ export default {
       }).then((res) => {
         // this.fromList = res.data;
         this.dialogStatus = true;
+        // this.fromList = e;
         // console.log(this.$refs.formTable);
         // this.$refs.formTable.fileInfo.fileList = res.data.mkFileShareAttachList;
         this.fromList.mkFileShareAttachList = res.data.mkFileShareAttachList;
@@ -1136,6 +1251,22 @@ export default {
         this.request_form.userId = res.data.data.rows[0].userCode;
       });
     },
+    getUserIndex() {
+      this.$http({
+        url: "/market/waf/queryRole",
+        method: "post",
+        headers: {
+          "Content-Type": "application/json",
+        },
+        data: {
+          userCode: JSON.parse(window.sessionStorage.userInfo).loginNo,
+        },
+      }).then((res) => {
+        console.log(res.data.data);
+        let list = res.data.data.split(",");
+        this.UserPermissionsList = list;
+      });
+    },
     async clickSave() {
       this.$refs.formTable.$refs.form.validate((valid) => {
         if (valid) {
@@ -1200,15 +1331,45 @@ export default {
         this.clickHandle(res.data.body);
       });
     },
+    getNextPath(e) {
+      let list = {
+        // fresourceId: "bf79721c-33f3-11ed-ba0b-00505687dcd3", //测试环境
+        fresourceId: this.requestForm.fresourceId, // 本地环境
+        processId: this.requestForm.processDefinitionKey,
+        // fresourceId: "0d94de8a-0281-11ed-a302-4ae7da54db39", // 本地环境
+        // processId: "request_form_process",
+        // resourceId: e,
+      };
+      if (e) {
+        // this.propsList = [];
+        list.resourceId = e;
+      }
+      this.$http({
+        url: "/market/waf/queryPath",
+        method: "post",
+        headers: {
+          "Content-Type": "application/json",
+        },
+        data: list,
+      }).then((res) => {
+        if (res.data.body.nextShapes[0].multi) {
+          if (res.data.body.nextShapes[0].multi.multi === "true") {
+            this.getLastName();
+          }
+        }
+        if (this.fromList.taskId) {
+          this.destroy = true;
+          this.handleStatus = true;
+          this.getMetirialType();
+        } else {
+          this.$message.error("请先点击保存按钮");
+        }
+      });
+    },
     //处理按钮,开始工作流接口
     clickHandles() {
-      if (this.fromList.taskId) {
-        this.destroy = true;
-        this.handleStatus = true;
-      } else {
-        this.$message.error("请先点击保存按钮");
-      }
-      this.getMetirialType();
+      console.log(this.fromList);
+      this.getNextPath(this.fromList.resourceId || "");
     },
 
     //批量审批
@@ -1244,11 +1405,43 @@ export default {
 
       let res = await this.common.httpPost(obj, success);
       function success(data) {
-        data.data.map((item) => {
+        console.log('[ 接口返回值第一曾 ] >', data)
+        let list = [];
+        list = data.data.data;
+        // list.map((item,index) => {
+        //     item.startTime = _this.$util.datetimeFormat(item.startTime);
+        //     item.endTime = _this.$util.datetimeFormat(item.endTime);
+        //     item.id = index + 1;
+        //   if (item.traceList) {
+        //     if (item.traceList.length > 0) {
+        //       item.children = item.traceList;
+        //     }
+        //   }
+        // });
+        // console.log(list);
+        if (data.data.lastmandata.length != 0) {
+          data.data.lastmandata.map((item, index) => {
+            item.id = index + 22;
+          });
+        }
+        list.map((item, index) => {
           item.startTime = _this.$util.datetimeFormat(item.startTime);
           item.endTime = _this.$util.datetimeFormat(item.endTime);
+          item.id = index + 1;
+          item.children = [];
+          if (data.data.lastmandata.length != 0) {
+            let indexs = data.data.lastmandata.findIndex((items) => {
+              if (items.taskId == item.taskId) {
+                item.children.push(items);
+              }
+            });
+          }
         });
-        _this.lables.data = data.data;
+        console.log(list);
+
+        _this.lables.data = list;
+        console.log("[ _this.lables.data ] >", _this.lables.data);
+        _this.abc = true;
       }
     },
     async clickHandle(e) {
@@ -1264,12 +1457,12 @@ export default {
 
       let res = await this.common.httpPost(obj, success);
       function success(data) {
-        _this.fromList.taskId = data.data;
+        _this.fromList.processId = data.data;
         _this.taskId = data.data;
         let list = {
           id: e,
           // taskId:_this.formId,
-          processId: _this.fromList.taskId,
+          processId: _this.fromList.processId,
           // resourceId: _this.nextPath.currentShape[0].resourceId,
         };
         _this.setUpdate(list);
@@ -1286,8 +1479,10 @@ export default {
         },
         data: e,
       }).then((res) => {
+        this.$message.success("工单更新成功");
         this.fromList.taskId = res.data.body.taskId;
         this.fromList.taskName = res.data.body.taskName;
+        this.fromList.processId = res.data.body.processId;
         if (res.data.body.taskName === "起草") {
           this.isSync = res.data.body.isSync;
         } else {
@@ -1298,6 +1493,47 @@ export default {
         // }
       });
     },
+    //添加字典表常用意见
+    geaddctType(e) {
+      this.$http({
+        url: "/market/cfgDataDict/add",
+        method: "post",
+        headers: {
+          "Content-Type": "application/json",
+        },
+        data: e,
+      }).then((res) => {
+        this.getMetirialType();
+      });
+    },
+    //删除字典表常用意见
+    geDelectType(e) {
+      this.$http({
+        url: "/market/cfgDataDicts/del",
+        method: "post",
+        headers: {
+          "Content-Type": "application/json",
+        },
+        data: e,
+      }).then((res) => {
+        this.getMetirialType();
+      });
+    },
+    //获取字典表常用意见
+    getMetirialType(e) {
+      this.$http({
+        url: "/market/cfgDataDict/queryList",
+        method: "post",
+        headers: {
+          "Content-Type": "application/json",
+        },
+        data: {
+          dictCodePks: "approval",
+        },
+      }).then((res) => {
+        this.commonlyList = res.data;
+      });
+    },
     //获取待阅接口
     getToBeRead(e, status) {
       this.$http({
@@ -1390,8 +1626,15 @@ export default {
     getNum(e) {
       //多选数组
       this.batchList = e;
+      console.log(e);
       if (e.length > 0) {
-        this.exportStatus = true;
+        let user = this.UserPermissionsList.findIndex(
+          (item) => item === "市场需求管理员"
+        );
+        console.log(user);
+        if (user != -1) {
+          this.exportStatus = true;
+        }
       } else {
         this.exportStatus = false;
       }
@@ -1456,6 +1699,7 @@ export default {
       this.saveStatus = false;
       this.startStatus = true;
       this.closeStatus = true;
+      this.abc = false;
       // this.fromList = {};
     },
     handleCloses() {
@@ -1474,6 +1718,12 @@ export default {
 .copyClass {
   display: flex;
 }
+.flex-count {
+  // overflow-y: auto;
+  //     overflow-x: initial;
+
+  // height: au;
+}
 .flex-header-text-tree {
   width: 50%;
   text-align: center;
@@ -1539,11 +1789,14 @@ export default {
 ::v-deep .el-dialog {
   margin-top: 0 !important;
 }
-::v-deep .el-table__fixed-body-wrapper {
-  top: 50px !important;
-}
+// ::v-deep .el-table__fixed-body-wrapper {
+//   top: 50px !important;
+// }
 .flex-box {
   display: flex;
+  // overflow: auto;
+  overflow-y: auto;
+  overflow-x: hidden;
   width: calc(100% - 40px);
   border-radius: 20px;
   background-color: #fff;
@@ -1551,6 +1804,7 @@ export default {
   margin-top: 20px;
   position: relative;
   flex-direction: column;
+  // height: 100%;
   .flex-header {
     display: flex;
     width: 100%;

+ 209 - 40
src/pages/main/leader/demand/demandHomes.vue

@@ -44,6 +44,7 @@
       :before-close="handleClose"
       :modal="false"
       v-if="dialogStatus"
+      style="display: flex; flex-direction: column"
       :destroy-on-close="true"
     >
       <!-- 后期维护 -->
@@ -76,7 +77,9 @@
       />
       <div>
         <div class="table-title">流程追踪</div>
-        <Table :list="lables"></Table>
+        <div v-if="abc == true">
+          <Tables :list="lables"></Tables>
+        </div>
       </div>
     </el-dialog>
     <div v-if="destroy">
@@ -91,13 +94,14 @@
       >
         <Workflow
           :list="fromList"
-          v-if="isWorkflowStatus"
+          v-if="isWorkflowStatus == true"
           @beforeClose="beforeClose"
           :requestForm="requestForm"
         />
         <WorkflowEntrance
           :list="fromList"
           v-else
+          :lastManList="lastManList"
           @beforeClose="beforeClose"
           :requestForm="requestForm"
         />
@@ -139,6 +143,7 @@ import Seach from "../components/search.vue";
 import Export from "../components/export.vue";
 import Tabs from "../components/tabs.vue";
 import Table from "../components/form.vue";
+import Tables from "../components/formTrace.vue";
 import deptTree from "../components/deptThree.vue";
 import Qs from "qs";
 export default {
@@ -151,14 +156,16 @@ export default {
     deptTree,
     Workflow,
     WorkflowEntrance,
+    Tables
   },
   data() {
     return {
-      isWorkflowStatus: false, //默认展示模式组件,为true时展示多人处理组件
+      UserPermissionsList: [],
+      isWorkflowStatus: true, //默认展示模式组件,为true时展示多人处理组件
       buttonStatus: true,
       copyStatus: false,
       dialogTitle: "",
-      disabled: false,
+      disabled: true,
       destroy: false,
       //分页数据
       totalPage: "1", //默认第一页
@@ -185,12 +192,12 @@ export default {
         // nextDealMan:'',
         title: "title",
         businessKey: "288",
-        processDefinitionKey: "scsjdc_pro_process",
+        processDefinitionKey: "request_form_process",
       },
       requestForm: {
-        fresourceId: "d3f1793f-2f20-11ed-a6ed-02427ba2d388", // 本地环境
-        // fresourceId: "bf79721c-33f3-11ed-ba0b-00505687dcd3", //测试环境
-        processDefinitionKey: "scsjdc_pro_process",
+        // fresourceId: "0d94de8a-0281-11ed-a302-4ae7da54db39", // 本地环境
+        fresourceId: "bf79721c-33f3-11ed-ba0b-00505687dcd3", //测试环境
+        processDefinitionKey: "request_form_process",
       },
       treeList: [], //候选人列表
       treeCopyList: [], //抄送人列表
@@ -286,7 +293,6 @@ export default {
       },
       firstTable: {
         name: "first",
-        height: "650",
         titledata: [
           {
             label: "需求名称",
@@ -577,6 +583,7 @@ export default {
                 this.disabled = true;
                 this.buttonStatus = false;
                 this.getReadList(r.copytaskid);
+                this.clickForm(r)
               }, // 自定义事件
             },
           ],
@@ -656,6 +663,7 @@ export default {
           ],
         },
       },
+      abc: false,
       lable: {},
       copyUser: "", //抄送人
       backThree: [],
@@ -664,26 +672,31 @@ export default {
         height: "400",
         titledata: [
           {
+            id: 1,
             label: "环节名称",
             prop: "taskName",
             width: 300,
           },
           {
+            id: 2,
             label: "处理人",
             prop: "assignee",
             width: 300,
           },
           {
+            id: 3,
             label: "到达时间",
             prop: "startTime",
             width: 300,
           },
           {
+            id: 4,
             label: "处理时间",
             prop: "endTime",
             width: 300,
           },
           {
+            id: 5,
             label: "回复意见",
             prop: "content",
             width: 300,
@@ -692,7 +705,7 @@ export default {
         data: [], //内容数据
         loading: true,
         pageData: {
-          total: 10, // 总条数
+          total: 0, // 总条数
           pageSize: 10, // 每页数量
           pageNum: 1, // 页码
         },
@@ -744,17 +757,75 @@ export default {
       clickTaskName: "",
       seachLists: {},
       timeList: {},
+      lastManList: [],
     };
   },
   created() {
-    // const func = (name) => {
-    //   name = name || "fatfish";
+    this.getUserIndex();
+    // let A = [
+    //   {
+    //     id: 1,
+    //     b: "456",
+    //   },
+    //   {
+    //     id: 2,
+    //     b: "456",
+    //   },
+    // ];
+    // let B = [
+    //   {
+    //     a: 1,
+    //     b: "4567",
+    //   },
+    //   {
+    //     a: 1,
+    //     b: "4568",
+    //   },
+    //   {
+    //     a: 2,
+    //     b: "4567",
+    //   },
+    // ];
+    // A.map((item) => {
+    //   item.c = [];
+    //   let index = B.findIndex((items) => {
+    //     if (items.a == item.id) {
+    //       item.c.push(items);
+    //     }
+    //   });
+    //   console.log(index);
+    //  B.map((items,index) =>{
+    //   if(item.id == items.a){
+    //     item.c.push(items)
+    //   }
+
+    //  })
+    // });
+    // console.log(A);
+    // function getUserDescribe(name) {
+    //   const describeForNameMap = [
+    //     [
+    //       (name) => name.length > 3, // 判断条件
+    //       () => console.log("名字太长"), // 执行函数
+    //     ],
+    //     [(name) => name.length < 2, () => console.log("名字太短")],
+    //     [(name) => name[0] === "陈", () => console.log("小陈")],
+    //     [(name) => name === "大鹏", () => console.log("管理员")],
+    //     [
+    //       (name) => name[0] === "李" && name !== "李鹏",
+    //       () => console.log("小李"),
+    //     ],
+    //   ];
+    //   // 获取符合条件的子数组
+    //   const getDescribe = describeForNameMap.find((item) => item[0](name));
+    //   // 子数组存在则运行子数组中的第二个元素(执行函数)
+    //   getDescribe ? getDescribe[1]() : console.log("此人比较神秘!");
+    // }
+    // getUserDescribe('张元芳微软')
+    // const func = (name, age = "fatfish") => {
     //   console.log(name);
     // };
-    const func = (name, age = "fatfish") => {
-      console.log(name);
-    };
-    func("123123123");
+    // func("123123123");
 
     //oa跳转回来显示
     let status = JSON.stringify(this.$route.query) == "{}";
@@ -785,8 +856,11 @@ export default {
   methods: {
     //是否最后一个人
     async getLastName() {
+      console.log(this.fromList);
       let list = {
+        procinstid: this.fromList.processId,
         taskid: this.fromList.taskId,
+
         // taskId:e.taskId
       };
       let _this = this;
@@ -801,8 +875,9 @@ export default {
 
       let res = await this.common.httpPost(obj, success);
       function success(data) {
-        _this.isWorkflowStatus = data.lastMan == true ? true : false;
-        console.log(_this.isWorkflowStatus);
+        _this.isWorkflowStatus = data.lastMan == false ? false : true;
+        _this.lastManList = data;
+        // console.log(_this.isWorkflowStatus);
       }
     },
     //添加面包屑
@@ -902,11 +977,7 @@ export default {
         },
         data: this.$refs.formTable.form,
       }).then((res) => {
-        if (res.code === 0) {
-          this.$message.success("转需求管理平台成功!");
-        } else {
-          this.$message.error("转需求管理平台错误!");
-        }
+        this.$message.success("转需求管理平台成功!");
       });
     },
     //批量导出搜索
@@ -940,10 +1011,11 @@ export default {
           this.disabled = true;
           this.startStatus = false;
           this.saveStatus = false;
+          this.forwardStatus = false;
+          this.exportBtnStatus = false;
         }
         if (this.clickTagName === "three") {
           if (res.taskName === "起草") {
-            console.log(res);
             this.startStatus = true;
             this.disabled = false;
             this.saveStatus = true;
@@ -1179,6 +1251,22 @@ export default {
         this.request_form.userId = res.data.data.rows[0].userCode;
       });
     },
+    getUserIndex() {
+      this.$http({
+        url: "/market/waf/queryRole",
+        method: "post",
+        headers: {
+          "Content-Type": "application/json",
+        },
+        data: {
+          userCode: JSON.parse(window.sessionStorage.userInfo).loginNo,
+        },
+      }).then((res) => {
+        console.log(res.data.data);
+        let list = res.data.data.split(",");
+        this.UserPermissionsList = list;
+      });
+    },
     async clickSave() {
       this.$refs.formTable.$refs.form.validate((valid) => {
         if (valid) {
@@ -1243,16 +1331,45 @@ export default {
         this.clickHandle(res.data.body);
       });
     },
+    getNextPath(e) {
+      let list = {
+        // fresourceId: "bf79721c-33f3-11ed-ba0b-00505687dcd3", //测试环境
+        fresourceId: this.requestForm.fresourceId, // 本地环境
+        processId: this.requestForm.processDefinitionKey,
+        // fresourceId: "0d94de8a-0281-11ed-a302-4ae7da54db39", // 本地环境
+        // processId: "request_form_process",
+        // resourceId: e,
+      };
+      if (e) {
+        // this.propsList = [];
+        list.resourceId = e;
+      }
+      this.$http({
+        url: "/market/waf/queryPath",
+        method: "post",
+        headers: {
+          "Content-Type": "application/json",
+        },
+        data: list,
+      }).then((res) => {
+        if (res.data.body.nextShapes[0].multi) {
+          if (res.data.body.nextShapes[0].multi.multi === "true") {
+            this.getLastName();
+          }
+        }
+        if (this.fromList.taskId) {
+          this.destroy = true;
+          this.handleStatus = true;
+          this.getMetirialType();
+        } else {
+          this.$message.error("请先点击保存按钮");
+        }
+      });
+    },
     //处理按钮,开始工作流接口
     clickHandles() {
-      this.getLastName();
-      if (this.fromList.taskId) {
-        this.destroy = true;
-        this.handleStatus = true;
-      } else {
-        this.$message.error("请先点击保存按钮");
-      }
-      this.getMetirialType();
+      console.log(this.fromList);
+      this.getNextPath(this.fromList.resourceId || "");
     },
 
     //批量审批
@@ -1288,11 +1405,43 @@ export default {
 
       let res = await this.common.httpPost(obj, success);
       function success(data) {
-        data.data.map((item) => {
+        console.log('[ 接口返回值第一曾 ] >', data)
+        let list = [];
+        list = data.data.data;
+        // list.map((item,index) => {
+        //     item.startTime = _this.$util.datetimeFormat(item.startTime);
+        //     item.endTime = _this.$util.datetimeFormat(item.endTime);
+        //     item.id = index + 1;
+        //   if (item.traceList) {
+        //     if (item.traceList.length > 0) {
+        //       item.children = item.traceList;
+        //     }
+        //   }
+        // });
+        // console.log(list);
+        if (data.data.lastmandata.length != 0) {
+          data.data.lastmandata.map((item, index) => {
+            item.id = index + 22;
+          });
+        }
+        list.map((item, index) => {
           item.startTime = _this.$util.datetimeFormat(item.startTime);
           item.endTime = _this.$util.datetimeFormat(item.endTime);
+          item.id = index + 1;
+          item.children = [];
+          if (data.data.lastmandata.length != 0) {
+            let indexs = data.data.lastmandata.findIndex((items) => {
+              if (items.taskId == item.taskId) {
+                item.children.push(items);
+              }
+            });
+          }
         });
-        _this.lables.data = data.data;
+        console.log(list);
+
+        _this.lables.data = list;
+        console.log("[ _this.lables.data ] >", _this.lables.data);
+        _this.abc = true;
       }
     },
     async clickHandle(e) {
@@ -1308,12 +1457,12 @@ export default {
 
       let res = await this.common.httpPost(obj, success);
       function success(data) {
-        _this.fromList.taskId = data.data;
+        _this.fromList.processId = data.data;
         _this.taskId = data.data;
         let list = {
           id: e,
           // taskId:_this.formId,
-          processId: _this.fromList.taskId,
+          processId: _this.fromList.processId,
           // resourceId: _this.nextPath.currentShape[0].resourceId,
         };
         _this.setUpdate(list);
@@ -1330,8 +1479,10 @@ export default {
         },
         data: e,
       }).then((res) => {
+        this.$message.success("工单更新成功");
         this.fromList.taskId = res.data.body.taskId;
         this.fromList.taskName = res.data.body.taskName;
+        this.fromList.processId = res.data.body.processId;
         if (res.data.body.taskName === "起草") {
           this.isSync = res.data.body.isSync;
         } else {
@@ -1475,8 +1626,15 @@ export default {
     getNum(e) {
       //多选数组
       this.batchList = e;
+      console.log(e);
       if (e.length > 0) {
-        this.exportStatus = true;
+        let user = this.UserPermissionsList.findIndex(
+          (item) => item === "市场需求管理员"
+        );
+        console.log(user);
+        if (user != -1) {
+          this.exportStatus = true;
+        }
       } else {
         this.exportStatus = false;
       }
@@ -1541,6 +1699,7 @@ export default {
       this.saveStatus = false;
       this.startStatus = true;
       this.closeStatus = true;
+      this.abc = false;
       // this.fromList = {};
     },
     handleCloses() {
@@ -1559,6 +1718,12 @@ export default {
 .copyClass {
   display: flex;
 }
+.flex-count {
+  // overflow-y: auto;
+  //     overflow-x: initial;
+
+  // height: au;
+}
 .flex-header-text-tree {
   width: 50%;
   text-align: center;
@@ -1624,11 +1789,14 @@ export default {
 ::v-deep .el-dialog {
   margin-top: 0 !important;
 }
-::v-deep .el-table__fixed-body-wrapper {
-  top: 50px !important;
-}
+// ::v-deep .el-table__fixed-body-wrapper {
+//   top: 50px !important;
+// }
 .flex-box {
   display: flex;
+  // overflow: auto;
+  overflow-y: auto;
+  overflow-x: hidden;
   width: calc(100% - 40px);
   border-radius: 20px;
   background-color: #fff;
@@ -1636,6 +1804,7 @@ export default {
   margin-top: 20px;
   position: relative;
   flex-direction: column;
+  // height: 100%;
   .flex-header {
     display: flex;
     width: 100%;

+ 4 - 1
src/pages/main/leader/demand/supportState.vue

@@ -190,13 +190,15 @@ export default {
         headers: {
           "Content-Type": "application/json",
         },
+        // 20221214001
         data: {
-          needNo: this.needNo,
+          needNo:this.needNo,
         },
       }).then((res) => {
         this.firstTable.data.push(res.data);
         this.listTable = res.data.cwfInfo;
         this.listTable.map((item) => {
+          console.log(item);
           item.state.map((items, index) => {
             if (items.status === false) {
               items.imgUrl = require("../../../../assets/b_img" +
@@ -260,6 +262,7 @@ export default {
           .flex-time {
             margin-top: 5px;
             margin-bottom: 10%;
+            height: 16px;
           }
         }
       }