yangbifan пре 2 година
родитељ
комит
03141f0943

+ 2 - 2
config/dev.env.js

@@ -6,9 +6,9 @@ module.exports = merge(prodEnv, {
   NODE_ENV: '"development"',
   NODE_ENV: '"development"',
   ENV_CONFIG: '"dev"',
   ENV_CONFIG: '"dev"',
   ctx:'"http://127.0.0.1:8080"',
   ctx:'"http://127.0.0.1:8080"',
-  // ctxForm: '"http://10.149.85.91:8880"',//dev
+  ctxForm: '"http://10.149.85.91:8880"',//dev
   // ctxForm: '"http://43.138.50.94:8880"',//test
   // ctxForm: '"http://43.138.50.94:8880"',//test
-  ctxForm: '"http://192.168.2.124:8880"',//test
+  // ctxForm: '"http://192.168.2.124:8880"',//test
   // ctxForm: '"http://10.230.15.228:8880"',//生产
   // ctxForm: '"http://10.230.15.228:8880"',//生产
   excludeMeWhenSelectNextHandler:false,
   excludeMeWhenSelectNextHandler:false,
   excludeFormerHanlder:false,
   excludeFormerHanlder:false,

+ 3 - 3
public/index.html

@@ -27,10 +27,10 @@
   <div id="app"></div>
   <div id="app"></div>
   <!-- built files will be auto injected -->
   <!-- built files will be auto injected -->
   <script type="text/javascript">
   <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://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.0.103:9600/';
-    // window.staticHost = 'http://192.168.2.142:9600/';
+    // window.staticHost = 'http://43.138.50.94:9600/';
 
 
     // document.title = "hello";
     // document.title = "hello";
   </script>
   </script>

+ 34 - 27
src/components/workflow.vue

@@ -219,10 +219,9 @@ export default {
           id: _this.list.id,
           id: _this.list.id,
           resourceId: _this.nodes.currentShape[0].resourceId,
           resourceId: _this.nodes.currentShape[0].resourceId,
         };
         };
-         list.taskid = data.taskid
+        list.taskid = data.taskid;
         _this.setUpdate(updateList);
         _this.setUpdate(updateList);
         _this.getLastManList(list);
         _this.getLastManList(list);
-        
       }
       }
     },
     },
     submitWork() {
     submitWork() {
@@ -244,7 +243,12 @@ export default {
           content: this.textarea, //意见内容
           content: this.textarea, //意见内容
         };
         };
         if (this.manyPeopleStatus == true) {
         if (this.manyPeopleStatus == true) {
-          list.lastmanList = this.nextDealManList;
+          if (this.backThree.length <= 1) {
+            this.$message.error("请选择多人");
+            return;
+          } else {
+            list.lastmanList = this.nextDealManList;
+          }
         }
         }
         if (this.nodes.currentShape) {
         if (this.nodes.currentShape) {
           lists.resolution = this.nodes.currentShape[0].condition.resolution;
           lists.resolution = this.nodes.currentShape[0].condition.resolution;
@@ -284,6 +288,9 @@ export default {
             //抄送
             //抄送
             list.copyman = this.treeCopyList[0].loginNoStrCopy;
             list.copyman = this.treeCopyList[0].loginNoStrCopy;
           }
           }
+          if (this.isLastManStatus == true) {
+            list.lastman = "yes";
+          }
           if (this.nodes.currentShape) {
           if (this.nodes.currentShape) {
             list.resolution = this.nodes.currentShape[0].condition.resolution;
             list.resolution = this.nodes.currentShape[0].condition.resolution;
             list.approve = this.nodes.currentShape[0].condition.approve;
             list.approve = this.nodes.currentShape[0].condition.approve;
@@ -388,28 +395,28 @@ export default {
         // }
         // }
       });
       });
     },
     },
-    async getqueryMultiTaskId() {
-      let list = {
-        procinstid: this.list.processId,
-        userId: JSON.parse(window.sessionStorage.userInfo).loginNo,
-        // procinstid:this.fromList.processId
+    // 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;
-      }
-    },
+    //     // 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;
+    //   }
+    // },
     //查询路径接口
     //查询路径接口
     getNextPath(e, status) {
     getNextPath(e, status) {
       let list = {
       let list = {
@@ -437,10 +444,10 @@ export default {
           this.initialList = res.data.body;
           this.initialList = res.data.body;
           if (res.data.body.nextShapes[0].multi !== null) {
           if (res.data.body.nextShapes[0].multi !== null) {
             if (res.data.body.nextShapes[0].multi.multi === "true") {
             if (res.data.body.nextShapes[0].multi.multi === "true") {
-              this.getqueryMultiTaskId();
-              // this.isLastManStatus = true;
+              // this.getqueryMultiTaskId();
+              this.isLastManStatus = true;
             } else {
             } else {
-              // this.isLastManStatus = false;
+              this.isLastManStatus = false;
             }
             }
           }
           }
           if (res.data.body.nextShapes[0].loop !== null) {
           if (res.data.body.nextShapes[0].loop !== null) {

+ 19 - 15
src/components/workflowEntrance.vue

@@ -212,32 +212,36 @@ export default {
         // taskName: this.clicknextName, //流程节点
         // taskName: this.clicknextName, //流程节点
         userCode: JSON.parse(window.sessionStorage.userInfo).loginNo, //人员code
         userCode: JSON.parse(window.sessionStorage.userInfo).loginNo, //人员code
         content: this.textarea, //意见内容
         content: this.textarea, //意见内容
-      }; 
+      };
       let obj = {};
       let obj = {};
       if (this.close == "1") {
       if (this.close == "1") {
-        console.log(JSON.parse(window.sessionStorage.userInfo).loginNo);
         (list.userId = JSON.parse(window.sessionStorage.userInfo).loginNo),
         (list.userId = JSON.parse(window.sessionStorage.userInfo).loginNo),
           (obj.url = _this.$url.formList.getComplateLastMan), //下一步工作流接口
           (obj.url = _this.$url.formList.getComplateLastMan), //下一步工作流接口
-          (obj.data = list)
-
+          (obj.data = list);
       } else {
       } else {
-        (list.userId = _this.backThree[0].loginNoStr(
+        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.url = _this.$url.formList.getNewTransferTask + _this.list.taskId)
-        )), //下一步工作流接口
+        , //下一步工作流接口
           (obj.status = "form"),
           (obj.status = "form"),
-          (obj.data = list);
+          (obj.data = listss);
       }
       }
 
 
       await _this.common.httpPost(obj, success);
       await _this.common.httpPost(obj, success);
       function success(data) {
       function success(data) {
-        console.log("[ data ] >", data);
-        let list = {
-          taskId: data.taskid,
-          id: _this.list.id,
-          // resourceId: _this.nodes.currentShape[0].resourceId,
-          // taskName: _this.nodes.nextShapes[0].properties.name,
-        };
-        _this.setUpdate(list);
+        // 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);
       }
       }
     },
     },
     //生成需求决策编号接口
     //生成需求决策编号接口

+ 66 - 5
src/pages/main/leader/components/form.vue

@@ -1,6 +1,30 @@
 <template>
 <template>
   <div>
   <div>
     <slot :name="list.name"></slot>
     <slot :name="list.name"></slot>
+    <!-- <el-table
+    :data="list.data"
+    style="width: 100%;margin-bottom: 20px;"
+    row-key="id"
+    border
+    default-expand-all
+    :tree-props="{children: 'children'}">
+    <el-table-column
+      prop="date"
+      label="日期"
+      sortable
+      width="180">
+    </el-table-column>
+    <el-table-column
+      prop="name"
+      label="姓名"
+      sortable
+      width="180">
+    </el-table-column>
+    <el-table-column
+      prop="address"
+      label="地址">
+    </el-table-column>
+  </el-table> -->
     <el-table
     <el-table
       ref="table"
       ref="table"
       style="width: 100%"
       style="width: 100%"
@@ -12,6 +36,8 @@
       :cell-style="columnbackgroundStyle"
       :cell-style="columnbackgroundStyle"
       empty-text="暂无数据"
       empty-text="暂无数据"
       @cell-click="getRowList"
       @cell-click="getRowList"
+      row-key="id"
+     :tree-props="{children: 'children',hasChildren:'hasChildren'}"
     >
     >
       <!-- 是否多选 -->
       <!-- 是否多选 -->
       <el-table-column
       <el-table-column
@@ -101,6 +127,43 @@
 export default {
 export default {
   data() {
   data() {
     return {
     return {
+      lists: [
+        {
+          taskDefinitionKey: "sid-09F872E1-C03F-47C3-BF4A-D391F497E73B",
+          taskName: "起草",
+          startTime: "2022-12-01 09:37:08",
+          endTime: "2022-12-01 09:37:22",
+          assignee: "fanyan",
+          taskId: "ab130f2f-7118-11ed-910f-062df75a3193",
+          content: " 同意 ",
+          id: 1,
+        },
+
+        {
+          taskDefinitionKey: "sid-BBF96B67-E5C1-40ED-AC33-7FD17941D769",
+          taskName: "部门领导审核123",
+          startTime: "2022-12-01 09:37:22",
+          endTime: "2022-12-01 09:52:04",
+          assignee: "qiuyu",
+          taskId: "b380a6ff-7118-11ed-910f-062df75a3193",
+          content: " 同意 ",
+          id: 2,
+          children: [
+            {
+              dealtime: null,
+              procinstid: "aaff8710-7118-11ed-910f-062df75a3193",
+              createtime: "2022-12-01 01:37:25",
+              preman: "qiuyu",
+              sts: "0",
+              taskName: "起草",
+              id:23,
+              dealman: "qiuyu",
+              content: null,
+              taskid: "b380a6ff-7118-11ed-910f-062df75a3193",
+            },
+          ],
+        },
+      ],
       page: 1,
       page: 1,
     };
     };
   },
   },
@@ -112,16 +175,14 @@ export default {
     },
     },
   },
   },
   created() {
   created() {
-
+    console.log(this.list);
     // this.columnbackgroundStyle()
     // this.columnbackgroundStyle()
   },
   },
-  mounted() {
-
-  },
+  mounted() {},
   methods: {
   methods: {
     columnbackgroundStyle({ row, column, rowIndex, columnIndex }) {
     columnbackgroundStyle({ row, column, rowIndex, columnIndex }) {
       // console.log(row);
       // console.log(row);
-      console.log(column);
+      // console.log(column);
       // console.log(rowIndex);
       // console.log(rowIndex);
       // console.log(columnIndex);
       // console.log(columnIndex);
       if (column.type == "default") {
       if (column.type == "default") {

+ 61 - 61
src/pages/main/leader/components/formTable.vue

@@ -463,9 +463,9 @@ export default {
         needName: [
         needName: [
           { required: true, message: "请输入需求名称", trigger: "blur" },
           { required: true, message: "请输入需求名称", trigger: "blur" },
         ],
         ],
-        // mkFileShareAttachList: [
-        //   { required: true, validator: this.validateFiles },
-        // ],
+        mkFileShareAttachList: [
+          { required: true, validator: this.validateFiles },
+        ],
         applyDept: [
         applyDept: [
           { required: true, message: "请输入申请部门", trigger: "blur" },
           { required: true, message: "请输入申请部门", trigger: "blur" },
         ],
         ],
@@ -799,66 +799,66 @@ export default {
     },
     },
   },
   },
   methods: {
   methods: {
-    // validateFiles(rule, value, callback) {
-    //   let num = 3;
+    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) {
     clickLLength(e) {
       if (e !== 0) {
       if (e !== 0) {
         this.Length = true;
         this.Length = true;

+ 50 - 11
src/pages/main/leader/demand/demandHomes.vue

@@ -76,7 +76,9 @@
       />
       />
       <div>
       <div>
         <div class="table-title">流程追踪</div>
         <div class="table-title">流程追踪</div>
-        <Table :list="lables"></Table>
+        <div v-if="abc == true">
+          <Table :list="lables"></Table>
+        </div>
       </div>
       </div>
     </el-dialog>
     </el-dialog>
     <div v-if="destroy">
     <div v-if="destroy">
@@ -98,7 +100,7 @@
         <WorkflowEntrance
         <WorkflowEntrance
           :list="fromList"
           :list="fromList"
           v-else
           v-else
-          :lastManList='lastManList'
+          :lastManList="lastManList"
           @beforeClose="beforeClose"
           @beforeClose="beforeClose"
           :requestForm="requestForm"
           :requestForm="requestForm"
         />
         />
@@ -159,7 +161,7 @@ export default {
       buttonStatus: true,
       buttonStatus: true,
       copyStatus: false,
       copyStatus: false,
       dialogTitle: "",
       dialogTitle: "",
-      disabled: false,
+      disabled: true,
       destroy: false,
       destroy: false,
       //分页数据
       //分页数据
       totalPage: "1", //默认第一页
       totalPage: "1", //默认第一页
@@ -189,8 +191,8 @@ export default {
         processDefinitionKey: "request_form_process",
         processDefinitionKey: "request_form_process",
       },
       },
       requestForm: {
       requestForm: {
-       fresourceId: "0d94de8a-0281-11ed-a302-4ae7da54db39", // 本地环境
-        // fresourceId: "bf79721c-33f3-11ed-ba0b-00505687dcd3", //测试环境
+        // fresourceId: "0d94de8a-0281-11ed-a302-4ae7da54db39", // 本地环境
+        fresourceId: "bf79721c-33f3-11ed-ba0b-00505687dcd3", //测试环境
         processDefinitionKey: "request_form_process",
         processDefinitionKey: "request_form_process",
       },
       },
       treeList: [], //候选人列表
       treeList: [], //候选人列表
@@ -657,6 +659,7 @@ export default {
           ],
           ],
         },
         },
       },
       },
+      abc: false,
       lable: {},
       lable: {},
       copyUser: "", //抄送人
       copyUser: "", //抄送人
       backThree: [],
       backThree: [],
@@ -665,26 +668,31 @@ export default {
         height: "400",
         height: "400",
         titledata: [
         titledata: [
           {
           {
+            id: 1,
             label: "环节名称",
             label: "环节名称",
             prop: "taskName",
             prop: "taskName",
             width: 300,
             width: 300,
           },
           },
           {
           {
+            id: 2,
             label: "处理人",
             label: "处理人",
             prop: "assignee",
             prop: "assignee",
             width: 300,
             width: 300,
           },
           },
           {
           {
+            id: 3,
             label: "到达时间",
             label: "到达时间",
             prop: "startTime",
             prop: "startTime",
             width: 300,
             width: 300,
           },
           },
           {
           {
+            id: 4,
             label: "处理时间",
             label: "处理时间",
             prop: "endTime",
             prop: "endTime",
             width: 300,
             width: 300,
           },
           },
           {
           {
+            id: 5,
             label: "回复意见",
             label: "回复意见",
             prop: "content",
             prop: "content",
             width: 300,
             width: 300,
@@ -745,7 +753,7 @@ export default {
       clickTaskName: "",
       clickTaskName: "",
       seachLists: {},
       seachLists: {},
       timeList: {},
       timeList: {},
-      lastManList:[]
+      lastManList: [],
     };
     };
   },
   },
   created() {
   created() {
@@ -787,10 +795,10 @@ export default {
   methods: {
   methods: {
     //是否最后一个人
     //是否最后一个人
     async getLastName() {
     async getLastName() {
-      console.log( this.fromList);
+      console.log(this.fromList);
       let list = {
       let list = {
         procinstid: this.fromList.processId,
         procinstid: this.fromList.processId,
-        taskid:this.fromList.taskId
+        taskid: this.fromList.taskId,
 
 
         // taskId:e.taskId
         // taskId:e.taskId
       };
       };
@@ -807,7 +815,7 @@ export default {
       let res = await this.common.httpPost(obj, success);
       let res = await this.common.httpPost(obj, success);
       function success(data) {
       function success(data) {
         _this.isWorkflowStatus = data.lastMan == false ? false : true;
         _this.isWorkflowStatus = data.lastMan == false ? false : true;
-        _this.lastManList = data
+        _this.lastManList = data;
         // console.log(_this.isWorkflowStatus);
         // console.log(_this.isWorkflowStatus);
       }
       }
     },
     },
@@ -1323,11 +1331,41 @@ export default {
 
 
       let res = await this.common.httpPost(obj, success);
       let res = await this.common.httpPost(obj, success);
       function success(data) {
       function success(data) {
-        data.data.map((item) => {
+        console.log(data);
+        let list = [];
+        list = data.data.data;
+        data.data.lastmandata.map((item, index) => {
+          item.id = index + 22;
+        });
+        list.map((item, index) => {
           item.startTime = _this.$util.datetimeFormat(item.startTime);
           item.startTime = _this.$util.datetimeFormat(item.startTime);
           item.endTime = _this.$util.datetimeFormat(item.endTime);
           item.endTime = _this.$util.datetimeFormat(item.endTime);
+          item.id = index + 1;
+          // data.data.lastmandata.map((items, index) => {
+          //   if (item.taskId === items.taskId) {
+          //      newList.push(items)
+          //      item.children = newList
+          //   }
+          // });
+          if (item.taskId == data.data.lastmandata[0].taskId) {
+            item.children = data.data.lastmandata;
+          }
         });
         });
-        _this.lables.data = data.data;
+        console.log(list);
+        // list.map((item, index) => {
+        //   data.data.lastmandata.map((items, index) =>{
+        //     if(item.taskId === items.taskId){
+        //        newList.push(o)
+        //        item.children = newList
+        //     }
+        //   })
+        // })
+        // console.log(list);
+        // console.log(newList);
+
+        // list[1].children = data.data.lastmandata;
+        _this.lables.data = list;
+        _this.abc = true;
       }
       }
     },
     },
     async clickHandle(e) {
     async clickHandle(e) {
@@ -1577,6 +1615,7 @@ export default {
       this.saveStatus = false;
       this.saveStatus = false;
       this.startStatus = true;
       this.startStatus = true;
       this.closeStatus = true;
       this.closeStatus = true;
+      this.abc = false;
       // this.fromList = {};
       // this.fromList = {};
     },
     },
     handleCloses() {
     handleCloses() {

+ 2 - 2
vue.config.js

@@ -134,9 +134,9 @@ module.exports = {
                 // target: 'http://127.0.0.1:9600/',
                 // target: 'http://127.0.0.1:9600/',
                 // target: 'http://192.168.0.156:9600/',
                 // target: 'http://192.168.0.156:9600/',
                 // target: 'http://192.168.2.170:9600/',
                 // target: 'http://192.168.2.170:9600/',
-                // target: 'http://192.168.2.169:9600/',
+                target: 'http://192.168.2.124:9600/',
                 // target: "http://124.223.66.248:9600",
                 // target: "http://124.223.66.248:9600",
-                target: "http://43.138.50.94:9600",
+                // target: "http://43.138.50.94:9600",
                 changeOrigin: true,
                 changeOrigin: true,
             },
             },
         },
         },