项目评估流程2 批量分发责任人step5
This commit is contained in:
@@ -42,16 +42,18 @@
|
||||
<process-title>
|
||||
<template slot="title">填写信息</template>
|
||||
</process-title>
|
||||
<div class="tableTitle">
|
||||
<div class="tableButton">
|
||||
<el-button plain class="common-button-primary" size="mini" @click="choiceZRRS('', 2, '')">批量分发责任人
|
||||
</el-button>
|
||||
</div>
|
||||
</div>
|
||||
<!-- <div class="tableTitle">-->
|
||||
<!-- <div class="tableButton">-->
|
||||
<!-- <el-button plain class="common-button-primary" size="mini" @click="choiceZRRS('', 2, '')">批量分发责任人-->
|
||||
<!-- </el-button>-->
|
||||
<!-- </div>-->
|
||||
<!-- </div>-->
|
||||
<el-table
|
||||
:data="dataList"
|
||||
style="width: 100%"
|
||||
row-key="standId"
|
||||
|
||||
v-if="refreshTable"
|
||||
height="70%"
|
||||
border
|
||||
ref="myTable"
|
||||
@@ -95,10 +97,20 @@
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column label="责任人" prop="workPeople" align="center">
|
||||
<template slot-scope="scope" v-if="scope.row.workPeople">
|
||||
<el-input v-model="scope.row.workPeopleId" style="display: none;" />
|
||||
<el-input v-model="scope.row.workPeople" placeholder="请选择分发责任人"
|
||||
@click.native="choiceZRRS(scope.row, 1, scope.$index)" />
|
||||
<template slot-scope="scope" >
|
||||
<div v-if="selectList.length<=1">
|
||||
<el-input v-if="scope.row.workPeople" v-model="scope.row.workPeopleId" style="display: none;" readonly/>
|
||||
<el-input v-if="scope.row.workPeople" v-model="scope.row.workPeople" placeholder="请选择分发责任人"
|
||||
@click.native="choiceZRRS(scope.row, 1, scope.$index)" readonly/>
|
||||
</div>
|
||||
|
||||
<div v-else>
|
||||
<el-input v-if="scope.row.workPeople" v-model="scope.row.workPeopleId" style="display: none;" readonly/>
|
||||
<el-input v-if="scope.row.workPeople" v-model="scope.row.workPeople" placeholder="请选择分发责任人"
|
||||
@click.native="choiceZRRS('', 2, '')" readonly/>
|
||||
</div>
|
||||
|
||||
<el-button style="width: 98%" :loading="buttonLoading" v-if="!scope.row.workPeople" size="small" type="primary" @click="choiceZRRS(scope.row, 3, '')">{{ "批量分发该标准下的责任人" }}</el-button>
|
||||
</template>
|
||||
<!-- <template slot-scope="scope">-->
|
||||
<!-- <div :class="{'fileClass': !scope.row.workPeople}">-->
|
||||
@@ -226,6 +238,13 @@ export default {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
workPeopleList:[],
|
||||
//防止按钮点击过快的按钮loading
|
||||
buttonLoading: false,
|
||||
//刷新表格
|
||||
refreshTable: true,
|
||||
//展开表格
|
||||
// tableExpand: false,
|
||||
hasChildren: true,
|
||||
active: "1",
|
||||
loading: false,
|
||||
@@ -323,7 +342,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);
|
||||
@@ -357,7 +375,6 @@ export default {
|
||||
workPeople: "请选择责任人"
|
||||
};
|
||||
children.push(aa);
|
||||
console.log(children);
|
||||
}
|
||||
);
|
||||
this.dataList.forEach(key => {
|
||||
@@ -402,7 +419,6 @@ export default {
|
||||
this.isSubmit = 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,
|
||||
@@ -440,6 +456,24 @@ export default {
|
||||
this.$message.warning("请选择要分发的数据");
|
||||
}
|
||||
}
|
||||
//批量分发某标准下的责任人
|
||||
else if (type === 3){
|
||||
|
||||
//弹出选人框
|
||||
// if (this.tableExpand === false){
|
||||
this.modalshowflag = true;
|
||||
this.drawerTitle = "批量选择责任人";
|
||||
// }
|
||||
//展开表格
|
||||
this.workPeopleList = row
|
||||
// console.log('279',row.children)
|
||||
this.refreshTable = false
|
||||
// this.tableExpand = !this.tableExpand
|
||||
this.$nextTick(() => {
|
||||
this.refreshTable = true
|
||||
});
|
||||
|
||||
}
|
||||
},
|
||||
//标准表格选择框改变
|
||||
selectStandChange(data) {
|
||||
@@ -494,6 +528,22 @@ export default {
|
||||
});
|
||||
});
|
||||
this.dataList = JSON.parse(JSON.stringify(this.dataList));
|
||||
}else if (this.type === 3){
|
||||
// console.log("529",this.workPeopleList)
|
||||
for (let i=0;i<this.workPeopleList.children.length;i++){
|
||||
|
||||
this.workPeopleList.children[i].workPeople = data[0].name
|
||||
this.workPeopleList.children[i].workPeopleId = data[0].id
|
||||
// console.log(row.children[i].id)
|
||||
// console.log(row.children[i].workPeople)
|
||||
}
|
||||
|
||||
// items.children.map(childrenItem => {
|
||||
//
|
||||
// childrenItem.workPeople = data[0].name;
|
||||
// childrenItem.workPeopleId = data[0].id;
|
||||
// })
|
||||
|
||||
}
|
||||
this.modalshowflag = false;
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user