|
@@ -9,7 +9,20 @@
|
|
|
选择路径
|
|
|
|
|
|
<div class="flex-path-list">
|
|
|
- <div v-if="transferStatus" :class="active" @click="clickTransfer(1)">转派</div>
|
|
|
+ <div
|
|
|
+ v-if="manyReassignment"
|
|
|
+ :class="actives"
|
|
|
+ @click="clickManyTransfer(1)"
|
|
|
+ >
|
|
|
+ 转派
|
|
|
+ </div>
|
|
|
+ <div
|
|
|
+ v-if="transferStatus"
|
|
|
+ :class="active"
|
|
|
+ @click="clickTransfer(1)"
|
|
|
+ >
|
|
|
+ 转派
|
|
|
+ </div>
|
|
|
<div v-if="copyStatus" @click="clickTransfer(2)">抄送</div>
|
|
|
<div
|
|
|
v-for="(item, index) in node.nextShapes"
|
|
@@ -136,14 +149,14 @@ export default {
|
|
|
name: "workflow",
|
|
|
data() {
|
|
|
return {
|
|
|
- active:'',
|
|
|
+ active: "",
|
|
|
transferStatus: false, //转派按钮控制
|
|
|
manyPeopleStatus: false, //多人处理下发任务
|
|
|
TransferStatus: false, //是否点击转派状态
|
|
|
copyStatus: false, //抄送按钮控制
|
|
|
CopyStatus: false, //是否点击抄送状态
|
|
|
node: [], //路径列表
|
|
|
- seleIndex: "", //点击路径下标
|
|
|
+ seleIndex: "1099", //点击路径下标
|
|
|
commonlyList: [], //常用意见数组
|
|
|
textarea: "未填写意见", //意见内容字段
|
|
|
copyUser: "", //抄送人员列表
|
|
@@ -159,6 +172,8 @@ export default {
|
|
|
demand: "",
|
|
|
nextDealManList: "",
|
|
|
isLastManStatus: false,
|
|
|
+ manyReassignment: false,
|
|
|
+ actives: "",
|
|
|
};
|
|
|
},
|
|
|
props: {
|
|
@@ -170,12 +185,24 @@ export default {
|
|
|
requestForm: {
|
|
|
type: Object,
|
|
|
},
|
|
|
+ adminResourceId: {
|
|
|
+ type: String,
|
|
|
+ },
|
|
|
},
|
|
|
created() {
|
|
|
+ if (this.adminResourceId) {
|
|
|
+ this.manyReassignment = true;
|
|
|
+ }
|
|
|
this.getNextPath(this.list.resourceId, 1);
|
|
|
this.getMetirialType();
|
|
|
},
|
|
|
methods: {
|
|
|
+ //多人转派
|
|
|
+ clickManyTransfer() {
|
|
|
+ (this.actives = this.actives != "" ? "" : "active"),
|
|
|
+ (this.seleIndex = "1099");
|
|
|
+ this.getNextPath(this.adminResourceId, 3);
|
|
|
+ },
|
|
|
//生成需求决策编号接口
|
|
|
getDemand() {
|
|
|
this.$http({
|
|
@@ -204,26 +231,49 @@ export default {
|
|
|
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) {
|
|
|
- console.log(data);
|
|
|
- let updateList = {
|
|
|
- taskId: data.taskid,
|
|
|
- id: _this.list.id,
|
|
|
- resourceId: _this.nodes.currentShape[0].resourceId,
|
|
|
+ let listss = {
|
|
|
+ userId:this.nextDealManList , //人员id
|
|
|
+ taskId: this.list.taskId, //表单标识
|
|
|
+ loginstr: JSON.parse(window.sessionStorage.userInfo).loginNoStr,
|
|
|
+ // taskName: this.clicknextName, //流程节点
|
|
|
+ content: this.textarea, //意见内容
|
|
|
+ };
|
|
|
+ if (this.manyReassignment == true) {
|
|
|
+ let _this = this;
|
|
|
+ let obj = {
|
|
|
+ url: _this.$url.formList.getNewTransferTask + _this.list.taskId, //下一步工作流接口
|
|
|
+ data: listss,
|
|
|
+ status: "form",
|
|
|
+ };
|
|
|
+ await this.common.httpPost(obj, success);
|
|
|
+ function success(data) {
|
|
|
+ _this.$emit("beforeClose", true);
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ let _this = this;
|
|
|
+ let obj = {
|
|
|
+ url: _this.$url.formList.nextWork, //下一步工作流接口
|
|
|
+ data: lists,
|
|
|
+ status: "form",
|
|
|
};
|
|
|
- list.taskId = data.taskid;
|
|
|
- _this.setUpdate(updateList);
|
|
|
- _this.getLastManList(list);
|
|
|
+ await this.common.httpPost(obj, success);
|
|
|
+ function success(data) {
|
|
|
+ console.log(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);
|
|
|
+ }
|
|
|
}
|
|
|
},
|
|
|
submitWork() {
|
|
|
+ console.log(this.nodes);
|
|
|
+ //多人转派环节
|
|
|
+
|
|
|
//多人会签处理环节
|
|
|
let list = {
|
|
|
userId: JSON.parse(window.sessionStorage.userInfo).loginNo, //人员id
|
|
@@ -232,6 +282,7 @@ export default {
|
|
|
taskName: this.clicknextName, //流程节点
|
|
|
userCode: JSON.parse(window.sessionStorage.userInfo).loginNo, //人员code
|
|
|
content: this.textarea, //意见内容
|
|
|
+ resourceId: this.nodes.currentShape[0].resourceId,
|
|
|
};
|
|
|
let newlist = {
|
|
|
userId: JSON.parse(window.sessionStorage.userInfo).loginNo, //人员id
|
|
@@ -241,13 +292,14 @@ export default {
|
|
|
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 {
|
|
|
- list.lastmanList = this.nextDealManList;
|
|
|
+ list.lastmanList = this.nextDealManList;
|
|
|
// }
|
|
|
if (this.nodes.currentShape) {
|
|
|
newlist.resolution = this.nodes.currentShape[0].condition.resolution;
|
|
@@ -462,7 +514,7 @@ export default {
|
|
|
}
|
|
|
|
|
|
this.$http({
|
|
|
- url: "/market/api/user/info/queryNodePers?params=" + id,
|
|
|
+ url: "/market/api/user/info/queryNodePers?params=" + id,
|
|
|
method: "post",
|
|
|
headers: {
|
|
|
"Content-Type": "application/json",
|
|
@@ -478,20 +530,20 @@ export default {
|
|
|
// let list = []
|
|
|
// list.push(res.data)
|
|
|
// this.treeList = list; //抄送
|
|
|
- this.treeList = res.data
|
|
|
+ this.treeList = res.data;
|
|
|
// this.$refs.defTree.treeList = res.data;
|
|
|
}
|
|
|
});
|
|
|
},
|
|
|
|
|
|
-
|
|
|
//转派按钮方法
|
|
|
clickTransfer(e) {
|
|
|
this.$refs.defTree.userList = [];
|
|
|
this.backThree = [];
|
|
|
this.treeList = [];
|
|
|
if (e == 1) {
|
|
|
- this.active = this.active!=""?'':'active'
|
|
|
+ this.seleIndex = "";
|
|
|
+ this.active = this.active != "" ? "" : "active";
|
|
|
this.manyPeopleStatus = false;
|
|
|
this.TransferStatus = true;
|
|
|
} else if (e == 2) {
|
|
@@ -501,13 +553,15 @@ export default {
|
|
|
},
|
|
|
//点击节点获取下一步的处理人字段
|
|
|
clickGetTree(e, index) {
|
|
|
- this.active = ''
|
|
|
+ this.active = "";
|
|
|
+ this.actives = "";
|
|
|
this.$refs.defTree.userList = [];
|
|
|
this.backThree = [];
|
|
|
// this.CopyStatus = false;
|
|
|
this.TransferStatus = false;
|
|
|
// this.clickTaskName = e.properties.name;
|
|
|
this.clicknextName = e.properties.name;
|
|
|
+ console.log(index);
|
|
|
this.seleIndex = index;
|
|
|
this.getNextPath(e.resourceId, 3); //1 为点击后获取线
|
|
|
},
|
|
@@ -521,7 +575,6 @@ export default {
|
|
|
},
|
|
|
//选择树的回调
|
|
|
changeTree(e) {
|
|
|
-
|
|
|
if (this.manyPeopleStatus == true) {
|
|
|
this.backThree = e;
|
|
|
|