yangbifan vor 2 Jahren
Ursprung
Commit
b30ec9d3bb

+ 2 - 2
config/dev.env.js

@@ -8,8 +8,8 @@ module.exports = merge(prodEnv, {
   ctx:'"http://127.0.0.1:8080"',
   // ctxForm: '"http://10.149.85.91:8880"',//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://192.168.2.124:8880"',//test
+  // ctxForm: '"http://10.230.15.228:8880"',//生产
   excludeMeWhenSelectNextHandler:false,
   excludeFormerHanlder:false,
   envTitle:'"本地开发环境"'

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

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

+ 48 - 17
src/components/workflow.vue

@@ -135,6 +135,7 @@ export default {
   data() {
     return {
       transferStatus: false, //转派按钮控制
+      manyPeopleStatus: false, //多人处理下发任务
       TransferStatus: false, //是否点击转派状态
       copyStatus: false, //抄送按钮控制
       CopyStatus: false, //是否点击抄送状态
@@ -153,6 +154,7 @@ export default {
       editStatus: false, //修改控制显示字段
       treeCopyList: [],
       demand: "",
+      nextDealManList: "",
     };
   },
   props: {
@@ -179,7 +181,7 @@ export default {
         headers: {
           "Content-Type": "application/json",
         },
-        data:{}
+        data: {},
       }).then((res) => {
         console.log(res);
         this.demand = res.data;
@@ -188,7 +190,7 @@ export default {
     submitWork() {
       //生成需求决策编号
       if (this.clicknextName === "起草人发送") {
-        this.getDemand()
+        this.getDemand();
       }
       if (!this.list.taskId) {
         this.$message.error("请先保存表单后处理");
@@ -224,7 +226,11 @@ export default {
           return false;
         }
         if (this.backThree.length > 0) {
-          list.nextDealMan = this.backThree[0].loginNoStr;
+          if (this.manyPeopleStatus == true) {
+            list.nextDealManList = this.nextDealManList;
+          } else {
+            list.nextDealMan = this.backThree[0].loginNoStr;
+          }
         } else {
           if (this.clicknextName === "流程结束") {
           } else {
@@ -273,8 +279,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);
           }
@@ -338,6 +344,13 @@ 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.manyPeopleStatus = true; //转派按钮生效
+          //   } else {
+          //     this.manyPeopleStatus = false;
+          //   }
+          // }
           if (res.data.body.nextShapes[0].loop !== null) {
             if (res.data.body.nextShapes[0].loop.loop === "true") {
               this.transferStatus = true; //转派按钮生效
@@ -371,6 +384,14 @@ 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;
+            }
+          }
+          console.log(res.data.body);
         }
       });
     },
@@ -436,20 +457,30 @@ export default {
     },
     //选择树的回调
     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();
+        console.log(arr.toString());
+      } else {
+        if (e.length > 1) {
+          this.$message.error("只能选择一个人");
+          return;
         } else {
-          this.selectUser = "暂无选择";
+          console.log(e);
+          this.backThree = e;
+          if (this.CopyStatus === true) {
+            this.getTreeLists(e[0].loginNoStr, 2);
+          }
+
+          if (e[0]) {
+            this.selectUser = e[0].loginNameStr;
+          } else {
+            this.selectUser = "暂无选择";
+          }
         }
       }
     },

+ 74 - 54
src/components/workflowEntrance.vue

@@ -9,7 +9,7 @@
               选择路径
 
               <div class="flex-path-list">
-                <div @click="clickTransfer(1)">转派</div>
+                <div @click="getTreeLists()">转派</div>
                 <div @click="clickTransfer(2)">结束</div>
                 <!-- <div
                   v-for="(item, index) in node.nextShapes"
@@ -96,7 +96,7 @@
     </div>
     <div class="flex-footer-botton">
       <div class="flex-button">
-        <el-button type="primary" @click="submitWork()">提交</el-button>
+        <el-button type="primary" @click="getnewtransfertask()">提交</el-button>
       </div>
     </div>
     <el-dialog
@@ -170,6 +170,25 @@ export default {
     this.getMetirialType();
   },
   methods: {
+
+    //新转派接口
+    async getnewtransfertask() {
+      let _this = this;
+      let list = {
+        userId: JSON.parse(window.sessionStorage.userInfo).loginNo,
+        taskId: _this.list.taskId,
+        content: _this.textarea,
+      };
+      let obj = {
+        url: _this.$url.formList.getNewTransferTask + _this.list.taskId, //下一步工作流接口
+        status: "form",
+        data: list,
+      };
+      await _this.common.httpPost(obj, success);
+      function success(data) {
+        console.log("[ data ] >", data);
+      }
+    },
     //生成需求决策编号接口
     getDemand() {
       this.$http({
@@ -352,48 +371,49 @@ 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;
+          // this.getTreeLists(this.initialList)
+          // 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 === 2) {
           if (res.data.body.nextShapes[0].condition !== null) {
             this.node = res.data.body;
@@ -409,16 +429,16 @@ export default {
     },
     //查询候选人接口
     getTreeLists(e, status) {
-      let id = "";
-      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;
-      }
+      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,

+ 71 - 23
src/pages/main/leader/components/form.vue

@@ -1,22 +1,55 @@
 <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
+      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" />
+      <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" />
+      <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" />
+        <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">
+      <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">
           <!-- 三个一排的情况,去掉隐藏的按钮后的长度 -->
@@ -24,15 +57,23 @@
             <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)
-                  ">
+                  <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)" />
+                  <i
+                    :class="[icon, item.icon]"
+                    v-bind="item"
+                    @click="item.handleRow(scope.$index, scope.row, item.label)"
+                  />
                 </template>
               </div>
             </div>
@@ -41,10 +82,17 @@
       </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-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"
+      />
     </div>
   </div>
 </template>
@@ -76,9 +124,9 @@ export default {
       // 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} 条`);

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

@@ -331,7 +331,7 @@
 </template>
 
 <script>
-import myUpload from "../../../../components/upload";
+import myUpload from "../../../../components/workflowUpload";
 
 export default {
   components: {

+ 1 - 1
src/pages/main/leader/demand/demandHomes.vue

@@ -96,7 +96,7 @@
           :requestForm="requestForm"
         />
         <WorkflowEntrance
-          :list="fromList"
+          :list="fromList"          
           v-else
           @beforeClose="beforeClose"
           :requestForm="requestForm"