|
@@ -8,7 +8,12 @@
|
|
|
选择路径
|
|
|
|
|
|
<div class="flex-path-list">
|
|
|
- <div v-if="transferStatus" @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" :key="index" :class="seleIndex == index ? 'active' : ''"
|
|
|
@click="clickGetTree(item, index)">
|
|
@@ -62,7 +67,9 @@
|
|
|
</div>
|
|
|
<div class="flex-header-text-tree">
|
|
|
已选人员
|
|
|
- <div class="">{{ copyUser }}</div>
|
|
|
+ <div class="" v-for="(item, index) in copyUser" :key="index">
|
|
|
+ {{ item.loginNameStr }}
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -78,7 +85,7 @@
|
|
|
<div style="overflow-y: scroll; overflow-x: hidden; height: 240px">
|
|
|
<div v-for="(item, index) in commonlyList" :key="index" ref="common" class="flex-common">
|
|
|
{{ item.dataName
|
|
|
-}}<i class="el-icon-circle-close" @click="deleStatus(item)"></i>
|
|
|
+ }}<i class="el-icon-circle-close" @click="deleStatus(item)"></i>
|
|
|
</div>
|
|
|
<div class="flex-common">
|
|
|
<i class="el-icon-circle-plus-outline" @click="addStatus()"></i>
|
|
@@ -97,6 +104,7 @@ export default {
|
|
|
name: "workflow",
|
|
|
data() {
|
|
|
return {
|
|
|
+ active: "",
|
|
|
manyPeopleStatus: false, //多人处理下发任务
|
|
|
editStatus: false, //常用意见控制
|
|
|
transferStatus: false, //转派按钮控制
|
|
@@ -104,7 +112,7 @@ export default {
|
|
|
copyStatus: false, //抄送按钮控制
|
|
|
CopyStatus: false, //是否点击抄送状态
|
|
|
node: [], //路径列表
|
|
|
- seleIndex: "", //点击路径下标
|
|
|
+ seleIndex: "1099", //点击路径下标
|
|
|
commonlyList: [], //常用意见数组
|
|
|
textarea: "未填写意见", //意见内容字段
|
|
|
copyUser: "", //抄送人员列表
|
|
@@ -119,6 +127,8 @@ export default {
|
|
|
demand: "",
|
|
|
nextDealManList: "",
|
|
|
isLastManStatus: false,
|
|
|
+ manyReassignment: false,
|
|
|
+ actives: "",
|
|
|
};
|
|
|
},
|
|
|
props: {
|
|
@@ -130,30 +140,75 @@ export default {
|
|
|
requestForm: {
|
|
|
type: Object,
|
|
|
},
|
|
|
+ adminResourceId: {
|
|
|
+ type: String,
|
|
|
+ },
|
|
|
},
|
|
|
created() {
|
|
|
+ console.log(this.list);
|
|
|
this.getNextPath(this.list.resourceId, 1);
|
|
|
this.getMetirialType();
|
|
|
},
|
|
|
methods: {
|
|
|
- async nextWorks(lists, list) {
|
|
|
+ //多人转派
|
|
|
+ clickManyTransfer() {
|
|
|
+ (this.actives = this.actives != "" ? "" : "active"),
|
|
|
+ (this.seleIndex = "1099");
|
|
|
+ this.getNextPath(this.adminResourceId, 3);
|
|
|
+ },
|
|
|
+ async getLastManList(e) {
|
|
|
let _this = this;
|
|
|
let obj = {
|
|
|
- url: _this.$url.formList.nextWork, //下一步工作流接口
|
|
|
- data: lists,
|
|
|
- status: "form",
|
|
|
+ url: _this.$url.formList.getComplateLastMan, //开始工作流接口
|
|
|
+ data: e,
|
|
|
+ // status: "form",
|
|
|
+ headers: {
|
|
|
+ "Content-Type": "application/json",
|
|
|
+ },
|
|
|
};
|
|
|
- await this.common.httpPost(obj, success);
|
|
|
- function success(data) {
|
|
|
- let updateList = {
|
|
|
- taskId: data.taskid,
|
|
|
- id: _this.list.id,
|
|
|
- resourceId: _this.nodes.currentShape[0].resourceId,
|
|
|
- tableName: _this.requestForm.processDefinitionKey,
|
|
|
+
|
|
|
+ let res = await this.common.httpPost(obj, success);
|
|
|
+ function success(data) { }
|
|
|
+ },
|
|
|
+ async nextWorks(lists, list) {
|
|
|
+ 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",
|
|
|
};
|
|
|
- list.taskId = data.taskid;
|
|
|
- _this.setUpdate(updateList);
|
|
|
- _this.getLastManList(list);
|
|
|
+ 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",
|
|
|
+ };
|
|
|
+ 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,
|
|
|
+ tableName: _this.requestForm.processDefinitionKey,
|
|
|
+ };
|
|
|
+ list.taskId = data.taskid;
|
|
|
+ _this.setUpdate(updateList);
|
|
|
+ _this.getLastManList(list);
|
|
|
+ }
|
|
|
}
|
|
|
},
|
|
|
submitWork() {
|
|
@@ -208,9 +263,14 @@ export default {
|
|
|
return false;
|
|
|
}
|
|
|
} else {
|
|
|
- if (this.treeCopyList.length) {
|
|
|
+ if (this.copyUser.length) {
|
|
|
//抄送
|
|
|
- list.copyman = this.treeCopyList[0].loginNoStrCopy;
|
|
|
+ // list.copyman = this.treeCopyList[0].loginNoStrCopy;
|
|
|
+ // list.copyman = this.copyUser;
|
|
|
+ list.copyman = ''
|
|
|
+ this.copyUser.map((item) => {
|
|
|
+ list.copyman += item.loginNoStr + ','
|
|
|
+ })
|
|
|
}
|
|
|
if (this.isLastManStatus == true) {
|
|
|
list.lastman = "yes";
|
|
@@ -230,7 +290,7 @@ export default {
|
|
|
list.nextDealMan = this.backThree[0].loginNoStr;
|
|
|
}
|
|
|
} else {
|
|
|
- if (this.clicknextName === "流程结束") {
|
|
|
+ if (this.clicknextName === "流程结束" || this.clicknextName === "提交至任务发起人") {
|
|
|
} else {
|
|
|
this.$message.error("请选择候选人");
|
|
|
return false;
|
|
@@ -253,23 +313,10 @@ export default {
|
|
|
this.demand = res.data;
|
|
|
});
|
|
|
},
|
|
|
- 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 nextWork(list) {
|
|
|
//e:yes||no,list:传入数组,title:结束标签,res:驳回标签,id:工单更新id
|
|
|
let _this = this;
|
|
|
+ let copylist=list
|
|
|
let obj = {
|
|
|
url: _this.$url.formList.nextWork, //下一步工作流接口
|
|
|
data: list,
|
|
@@ -305,7 +352,8 @@ export default {
|
|
|
};
|
|
|
if (data.copytaskid) {
|
|
|
list.copytaskid = data.copytaskid;
|
|
|
- list.copyman = _this.treeCopyList[0].loginNoStrCopy;
|
|
|
+ // list.copyman = _this.treeCopyList[0].loginNoStrCopy;
|
|
|
+ list.copyman = copylist.copyman;
|
|
|
}
|
|
|
if (_this.demand) {
|
|
|
list.needNo = _this.demand;
|
|
@@ -372,7 +420,7 @@ export default {
|
|
|
}
|
|
|
if (res.data.body.nextShapes[0].copy !== null) {
|
|
|
if (res.data.body.nextShapes[0].copy.copy === "true") {
|
|
|
- // this.copyStatus = true; //抄送按钮生效
|
|
|
+ this.copyStatus = true; //抄送按钮生效
|
|
|
this.CopyStatus = true;
|
|
|
} else {
|
|
|
this.copyStatus = false;
|
|
@@ -409,7 +457,7 @@ export default {
|
|
|
},
|
|
|
//查询候选人接口
|
|
|
getTreeLists(e, status) {
|
|
|
- let createdId = "createld";
|
|
|
+ let createdId = "createId";
|
|
|
let id =
|
|
|
e.nextShapes[0].properties.documentation === createdId
|
|
|
? this.list.createId
|
|
@@ -425,7 +473,7 @@ export default {
|
|
|
}).then((res) => {
|
|
|
console.log(status);
|
|
|
if (status === 2) {
|
|
|
- this.treeCopyList = res.data; //抄送
|
|
|
+ // this.treeCopyList = res.data; //抄送
|
|
|
// this.$refs.defTrees.treeList = res.data;
|
|
|
} else {
|
|
|
this.treeList = res.data; //抄送
|
|
@@ -433,6 +481,22 @@ export default {
|
|
|
console.log(this.treeList);
|
|
|
}
|
|
|
});
|
|
|
+ if (this.copyStatus == true) {
|
|
|
+ this.$http({
|
|
|
+ url: "/market/api/user/info/queryNodePers?params=" + e.nextShapes[0].properties.formkeydefinition,
|
|
|
+ method: "post",
|
|
|
+ headers: {
|
|
|
+ "Content-Type": "application/json",
|
|
|
+ },
|
|
|
+ data: "",
|
|
|
+ }).then((res) => {
|
|
|
+ console.log(status);
|
|
|
+ this.treeCopyList = res.data; //抄送
|
|
|
+
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+
|
|
|
+ }
|
|
|
},
|
|
|
//转派按钮方法
|
|
|
clickTransfer(e) {
|
|
@@ -447,6 +511,9 @@ export default {
|
|
|
clickGetTree(e, index) {
|
|
|
this.$refs.defTree.userList = [];
|
|
|
this.backThree = [];
|
|
|
+ this.$refs.defTree.userList = [];
|
|
|
+ this.backThree = [];
|
|
|
+ this.copyUser = [];
|
|
|
this.CopyStatus = false;
|
|
|
this.TransferStatus = false;
|
|
|
// this.clickTaskName = e.properties.name;
|
|
@@ -473,23 +540,41 @@ export default {
|
|
|
});
|
|
|
this.nextDealManList = arr.toString();
|
|
|
} else {
|
|
|
- if (e.length > 1) {
|
|
|
- this.$message.error("只能选择一个人");
|
|
|
- return;
|
|
|
- } else {
|
|
|
+ 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 (this.CopyStatus === true) {
|
|
|
+ this.getTreeLists(e[0].loginNoStr, 2);
|
|
|
+ }
|
|
|
+
|
|
|
+ if (e[0]) {
|
|
|
+ this.selectUser = e[0].loginNameStr;
|
|
|
+ } else {
|
|
|
+ this.selectUser = "暂无选择";
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
+ changeTreeCopy(e) {
|
|
|
+ console.log(e);
|
|
|
+ this.copyUser = e
|
|
|
+ },
|
|
|
//获取字典表常用意见
|
|
|
getMetirialType(e) {
|
|
|
this.$http({
|
|
@@ -598,17 +683,20 @@ export default {
|
|
|
text-align: center;
|
|
|
}
|
|
|
|
|
|
+
|
|
|
.flex-icon {
|
|
|
float: right;
|
|
|
margin-right: 20px;
|
|
|
color: #4277a1;
|
|
|
}
|
|
|
|
|
|
+
|
|
|
.flex-handle {
|
|
|
width: 100%;
|
|
|
padding: 30px;
|
|
|
display: flex;
|
|
|
|
|
|
+
|
|
|
.flex-right {
|
|
|
width: 50%;
|
|
|
border: 1px solid #e1e1e1;
|
|
@@ -616,15 +704,18 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+
|
|
|
.flex-left {
|
|
|
width: 50%;
|
|
|
display: flex;
|
|
|
flex-direction: column;
|
|
|
|
|
|
+
|
|
|
.flex-left-header {
|
|
|
display: flex;
|
|
|
justify-content: space-around;
|
|
|
|
|
|
+
|
|
|
.flex-path {
|
|
|
height: 280px;
|
|
|
border: 1px solid #e1e1e1;
|
|
@@ -633,11 +724,13 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+
|
|
|
.flex-common {
|
|
|
padding: 10px 5%;
|
|
|
font-size: 18px;
|
|
|
}
|
|
|
|
|
|
+
|
|
|
.flex-left-header-text {
|
|
|
height: 40px;
|
|
|
line-height: 40px;
|
|
@@ -648,21 +741,25 @@ export default {
|
|
|
font-weight: bold;
|
|
|
}
|
|
|
|
|
|
+
|
|
|
.flex-path-list {
|
|
|
overflow-y: scroll;
|
|
|
overflow-x: hidden;
|
|
|
height: 14rem;
|
|
|
}
|
|
|
|
|
|
+
|
|
|
.flex-slide {
|
|
|
overflow-y: scroll;
|
|
|
overflow-x: hidden;
|
|
|
}
|
|
|
|
|
|
+
|
|
|
.active {
|
|
|
background-color: #f3faff;
|
|
|
}
|
|
|
|
|
|
+
|
|
|
.flex-opinion {
|
|
|
height: 280px;
|
|
|
border: 1px solid #e1e1e1;
|
|
@@ -670,28 +767,37 @@ export default {
|
|
|
margin-top: 20px;
|
|
|
}
|
|
|
|
|
|
+
|
|
|
.flex-right-text {
|
|
|
margin-right: 20px;
|
|
|
width: 50%;
|
|
|
}
|
|
|
|
|
|
+
|
|
|
.flex-commons {
|
|
|
height: 280px;
|
|
|
border: 1px solid #e1e1e1;
|
|
|
width: 30%;
|
|
|
}
|
|
|
|
|
|
+
|
|
|
.flex-footer-botton {
|
|
|
display: flex;
|
|
|
justify-content: space-evenly;
|
|
|
}
|
|
|
|
|
|
+
|
|
|
.flex-button {
|
|
|
margin-top: 10px;
|
|
|
margin-bottom: 10px;
|
|
|
|
|
|
+
|
|
|
::v-deep .el-button--primary {
|
|
|
width: 222px;
|
|
|
}
|
|
|
}
|
|
|
-</style>
|
|
|
+
|
|
|
+.copyClass {
|
|
|
+ display: flex;
|
|
|
+}
|
|
|
+</style>
|