This commit is contained in:
宋伟佳
2021-07-24 17:10:31 +08:00
parent 0cfa716731
commit c383f117ae
9 changed files with 52 additions and 131 deletions
@@ -104,7 +104,6 @@
</el-table-column>
<el-table-column
prop="code"
fixed="left"
width="180px"
align="center"
label="标准号">
@@ -596,7 +595,6 @@
</el-table-column>
<el-table-column
prop="code"
fixed="left"
align="center"
label="标准号">
<template slot-scope="scope">
@@ -1264,10 +1262,9 @@ export default {
{ id: bringData[0].id, page: this.page, Size:this.pageSize}, {
_this: this
}, res => {
console.log(res.data);
// if (res.data == null) {
// res.data = [];
// }
if (res.data == null) {
res.data = [];
}
this.dataList = res.data;
this.listForm.dataList = res.data;
let formId = [];
@@ -56,6 +56,9 @@
<template slot="title">填写信息</template>
</process-title>
<div class="tableTitle">
<div class="tableButton">
<el-button plain class="common-button-primary" size="mini" @click="batchOperation">批量分发落实人</el-button>
</div>
</div>
<el-table
ref="multipleTable"
@@ -113,50 +116,25 @@
<span>{{ scope.row.zCCSSRQ ? $moment(scope.row.zCCSSRQ).format("YYYY-MM-DD") : "" }}</span>
</template>
</el-table-column>
<el-table-column
fixed="right"
prop="implementer"
align="center"
label="落实人">
<template slot-scope="scope,text" v-if="showColumn">
<div>
<div @click="choiceZRRS(scope)">
{{ listForm.breakdownList[scope.$index].implementer == null ? "请选择落实人" : listForm.breakdownList[scope.$index].implementer
}}
</div>
<el-table-column label="落实人" prop="implementer" align="center">
<template slot-scope="scope">
<div v-if="scope.row.implementer == undefined">
{{ "请选择落实人" }}
</div>
<div v-else class="fileClass">
{{ scope.row.implementer || "-" }}
</div>
</template>
</el-table-column>
</el-table>
<el-drawer
title="选择责任部门对接人"
:visible.sync="modalshowflag2"
:wrapperClosable="false"
size="800px">
<el-tree
v-if="modalshowflag2"
style="height: 100%; overflow: auto;"
node-key="id"
class="filter-tree"
:data="treeData"
:props="defaultProps"
:default-checked-keys="nodeList"
highlight-current
check-strictly
default-expand-all
:expand-on-click-node="false"
show-checkbox
ref="tree2">
</el-tree>
<div id="roleFormButton2" class="demo-drawer-footer">
<el-button class="common-button-primary" size="mini" icon="el-icon-check" type="primary"
@click="saveUserInfo2">确定
</el-button>
<el-button class="common-button-default" size="mini" icon="el-icon-close" @click="cancleUserInfo2">取消
</el-button>
</div>
</el-drawer>
<!-- 选择责任人-->
<Role-tree
check-box
:is-title="drawerTitle"
:is-visible.sync="modalshowflag"
@checkedRole="checkedRole"
:nodeList="nodeList"
></Role-tree>
</div>
</div>
@@ -417,69 +395,37 @@ export default {
}
}
},
// saveUserInfo() {
// if (this.type === "implementer") {
// // 如果有勾选的项
// if (this.selectList.length) {
// this.listForm.breakdownList.forEach((item, index) => {
// if (this.selectList.includes(item.itemId)) {
// this.listForm.breakdownList[index].implementerId = this.roleRow.id;
// this.listForm.breakdownList[index].implementer = this.roleRow.name;
// }
// });
// } else {
// this.listForm.breakdownList[this.dsadadadsada].implementerId = this.roleRow.id;
// this.listForm.breakdownList[this.dsadadadsada].implementer = this.roleRow.name;
// }
// this.listForm.implementer = this.roleRow.name;
// this.showColumn = false;
// this.$nextTick(() => {
// this.showColumn = true;
// });
// }
// this.modalshowflag = false;
// },
saveUserInfo2 () {
var idList = "";
var nameList = "";
this.$refs.tree2.getCheckedNodes().concat(this.$refs.tree2.getHalfCheckedNodes()).forEach(item => {
if (nameList.length > 0) {
nameList += ",";
idList += ",";
}
idList += item.id;
nameList += item.name;
});
// 如果有勾选的项
if (this.selectList.length) {
this.listForm.breakdownList.forEach((item, index) => {
console.log(item.itemId);
console.log(index);
if (this.selectList.includes(item.itemId)) {
this.listForm.breakdownList[index].implementerId = idList;
this.listForm.breakdownList[index].implementer = nameList;
}
});
} else {
this.listForm.breakdownList[this.dsadadadsada].implementerId = idList;
this.listForm.breakdownList[this.dsadadadsada].implementer = nameList;
}
this.listForm.implementer = nameList;
this.showColumn = false;
this.$nextTick(() => {
this.showColumn = true;
});
this.modalshowflag2 = false;
//不要删除 By 宋伟佳
console.log(this.$refs.multipleTable.clearSelection())
this.$nextTick(() => {
for(var i=0;i<this.$refs.multipleTable.length;i++){
this.$refs.multipleTable[i].clearSelection();
}
})
//批量操作按钮
batchOperation(id) {
if (this.selectList.length === 0) {
this.$message.warning("请至少选择一条数据进行批量分发");
} else {
this.nodeList = [];
this.nodeList.push(id);
this.modalshowflag = true;
}
},
cancleUserInfo2() {
this.modalshowflag2 = false;
checkedRole(data) {
// 选取负责人时的操作
let mis = [];
let miss = [];
this.selectList.forEach(item => {
item.implementer = data[0].name;
item.implementerId = data[0].id;
mis.push(item.projectNumber);
miss.push(item.itemNum)
});
this.listForm.breakdownList.forEach(item => {
if (!mis.includes(item.projectNumber) && !miss.includes(item.itemsNum)) {
this.selectList.push(item);
}
});
this.listForm.breakdownList = this.selectList;
this.$refs.selection.clearSelection();
this.modalshowflag = false;
},
cancleUserInfo() {
this.modalshowflag = false;
},
choiceZRRS(scope) {
if (scope != null) this.dsadadadsada = scope.$index;
@@ -544,7 +490,7 @@ export default {
},
//标准表格选择框改变
selectStandChange(data) {
this.selectList = data.map(item => item.itemId);
this.selectList = data
},
selectThree() {
@@ -244,13 +244,6 @@
</el-table-column>
</el-table-column>
</el-table-column>
<el-table-column
fixed="right"
align="center"
width="150"
prop="implementer"
label="落实人">
</el-table-column>
</el-table>
</div>
<div>
@@ -500,7 +493,6 @@ export default {
this.listForm.signFlag = "";
this.listForm.dataList = this.dataList;
const json = JSON.stringify(this.listForm);
console.log(json);
this.$http.post("lawss/activiti/completeTask", {
taskIds: this.taskIds,
userId: this.userId,
@@ -543,7 +535,6 @@ export default {
mounted() {
this.processTable();
this.getData();
// console.log(this.$store.getters.getHandleInfo);
}
};
</script>
@@ -419,7 +419,6 @@ export default {
taskIds: this.taskIds,
pId: this.pId
}).then(res => {
console.log(res.mesg);
if (res) {
const processForm = JSON.parse(res.mesg)
this.getFormFieldList(processForm)
@@ -289,7 +289,6 @@ export default {
taskIds: this.taskIds,
pId: this.pId
}).then(res => {
console.log(res.mesg);
if (res) {
const processForm = JSON.parse(res.mesg);
this.getFormFieldList(processForm);
@@ -335,7 +334,6 @@ export default {
this.listForm.BZFlag = "1";
this.listForm.commentText = this.commentText;
const json = JSON.stringify(this.listForm);
console.log(json);
this.$http.post("lawss/activiti/completeTask", {
taskIds: this.taskIds,
userId: this.userId,
@@ -261,7 +261,6 @@ export default {
taskIds: this.taskIds,
pId: this.pId
}).then(res => {
console.log(res.mesg);
if (res) {
const processForm = JSON.parse(res.mesg);
this.getFormFieldList(processForm);
@@ -294,7 +293,6 @@ export default {
} else {
this.listForm.commentText = this.commentText;
const json = JSON.stringify(this.listForm);
console.log(json);
this.$http.post("lawss/activiti/completeTask", {
taskIds: this.taskIds,
userId: this.userId,
@@ -267,7 +267,6 @@ export default {
taskIds: this.taskIds,
pId: this.pId
}).then(res => {
console.log(res.mesg);
if (res) {
const processForm = JSON.parse(res.mesg);
this.getFormFieldList(processForm);
@@ -295,7 +294,6 @@ export default {
},
//提交事件
handleSubmit() {
this.listForm.dataList.forEach(item => {
if(item.liablePeople !== undefined){
this.peopleFlag = true
@@ -306,7 +304,6 @@ export default {
if(this.peopleFlag === true){
this.listForm.commentText = this.commentText;
const json = JSON.stringify(this.listForm);
console.log(json);
this.$http.post("lawss/activiti/completeTask", {
taskIds: this.taskIds,
userId: this.userId,
@@ -256,7 +256,6 @@ export default {
taskIds: this.taskIds,
pId: this.pId
}).then(res => {
console.log(res.mesg);
if (res) {
const processForm = JSON.parse(res.mesg);
this.getFormFieldList(processForm);
@@ -299,7 +298,6 @@ export default {
delete key["children"];
}
});
console.log(this.dataList);
this.listForm.children = children;
});
},
@@ -313,7 +311,6 @@ export default {
if (item.workPeople !== undefined) {
this.listForm.commentText = this.commentText;
const json = JSON.stringify(this.listForm);
console.log(json);
this.$http.post("lawss/activiti/completeTask", {
taskIds: this.taskIds,
userId: this.userId,
@@ -395,7 +395,6 @@ export default {
taskIds: this.taskIds,
pId: this.pId
}).then(res => {
console.log(res.mesg);
if (res) {
const processForm = JSON.parse(res.mesg);
this.getFormFieldList(processForm);
@@ -451,7 +450,6 @@ export default {
if (item.workPeople !== undefined) {
this.listForm.commentText = this.commentText;
const json = JSON.stringify(this.listForm);
console.log(json);
this.$http.post("lawss/activiti/completeTask", {
taskIds: this.taskIds,
userId: this.userId,