修复bug
This commit is contained in:
@@ -93,22 +93,23 @@
|
||||
<el-table-column
|
||||
prop="distributePerson"
|
||||
label="分发责任人">
|
||||
<!-- <template slot-scope="scope">-->
|
||||
<!-- <el-input-->
|
||||
<!-- v-model="scope.row.distributePerson"-->
|
||||
<!-- placeholder="请选择分发负责人"-->
|
||||
<!-- readonly-->
|
||||
<!-- @click.native="choiceZRR(scope,'distributePerson', '选择分发责任人', roleForm.distributePerson)"-->
|
||||
<!-- v-if="!scope.row.distributePerson"></el-input>-->
|
||||
<!-- </template>-->
|
||||
<template slot-scope="scope,text" v-if="showColumn">
|
||||
<div>
|
||||
<div @click="choiceZRR(scope,'distributePerson', '选择分发责任人', roleForm.distributePerson)">
|
||||
{{ listForm.dataList[scope.$index].distributePerson == null ? "请选择分发负责人" : listForm.dataList[scope.$index].distributePerson
|
||||
}}
|
||||
</div>
|
||||
</div>
|
||||
<template slot-scope="scope">
|
||||
<el-input
|
||||
v-model="scope.row.distributePerson"
|
||||
placeholder="请选择分发负责人"
|
||||
readonly
|
||||
@click.native="choiceZRR(scope,'distributePerson', '选择分发责任人', roleForm.distributePerson)"
|
||||
v-if="!scope.row.distributePerson"></el-input>
|
||||
<span v-else>{{ scope.row.distributePerson }}</span>
|
||||
</template>
|
||||
<!-- <template slot-scope="scope,text" v-if="showColumn">-->
|
||||
<!-- <div>-->
|
||||
<!-- <div @click="choiceZRR(scope,'distributePerson', '选择分发责任人', roleForm.distributePerson)">-->
|
||||
<!-- {{ listForm.dataList[scope.$index].distributePerson == null ? "请选择分发负责人" : listForm.dataList[scope.$index].distributePerson-->
|
||||
<!-- }}-->
|
||||
<!-- </div>-->
|
||||
<!-- </div>-->
|
||||
<!-- </template>-->
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
@@ -445,6 +446,7 @@ export default {
|
||||
ListModel: false, //选择拆分标准抽屉状态
|
||||
treeData: [], // 人员数据
|
||||
selectList: [], //选择标准的选择框
|
||||
currentIndex: -1, // 当前操作行索引
|
||||
isSubmit: false,
|
||||
saveLoading: false,
|
||||
selectedList: [], //拆分标准的选择框
|
||||
@@ -520,19 +522,29 @@ export default {
|
||||
this.listForm.certifiedEngineer = data[0].id;
|
||||
this.listForm.certifiedEngineerName = data[0].name;
|
||||
} else if (this.type === "distributePerson") {
|
||||
this.dataList.distributePersonId = data[0].id;
|
||||
this.dataList.distributePerson = data[0].name;
|
||||
this.listForm.dataList[this.dsadadadsada].distributePersonId = data[0].id;
|
||||
this.listForm.dataList[this.dsadadadsada].distributePerson = data[0].name;
|
||||
console.log(this.dataList)
|
||||
this.showColumn = false;
|
||||
this.$nextTick(() => {
|
||||
this.showColumn = true;
|
||||
});
|
||||
// 如果有勾选,则视为批量选择责任人
|
||||
if (this.selectList.length) {
|
||||
this.dataList.forEach((item, index) => {
|
||||
if (this.selectList.includes(item.productLine)) {
|
||||
const newItem = JSON.parse(JSON.stringify(item))
|
||||
newItem.distributePersonId = data[0].id
|
||||
newItem.distributePerson = data[0].name
|
||||
this.$set(this.dataList, index, newItem)
|
||||
}
|
||||
})
|
||||
} else {
|
||||
const newItem = JSON.parse(JSON.stringify(this.dataList[this.currentIndex]))
|
||||
newItem.distributePersonId = data[0].id
|
||||
newItem.distributePerson = data[0].name
|
||||
this.$set(this.dataList, this.currentIndex, newItem)
|
||||
this.listForm.dataList[this.currentIndex].distributePersonId = data[0].id;
|
||||
this.listForm.dataList[this.currentIndex].distributePerson = data[0].name;
|
||||
this.currentIndex = -1
|
||||
}
|
||||
}
|
||||
this.modalshowflag = false;
|
||||
},
|
||||
cancleUserInfo() {
|
||||
cancelUserInfo() {
|
||||
this.modalshowflag = false;
|
||||
},
|
||||
//tab发生变化
|
||||
@@ -561,7 +573,9 @@ export default {
|
||||
//点击添加事件
|
||||
addList() {
|
||||
this.standModel = true;
|
||||
this.$refs.projectTable.clearSelection();
|
||||
this.$nextTick(() => {
|
||||
this.$refs.projectTable.clearSelection();
|
||||
})
|
||||
},
|
||||
// 点击批量删除事件
|
||||
deleteList() {
|
||||
@@ -743,7 +757,7 @@ export default {
|
||||
},
|
||||
choiceZRR(scope, type, title, id) {
|
||||
if (scope != null) {
|
||||
this.dsadadadsada = scope.$index;
|
||||
this.currentIndex = scope.$index;
|
||||
}
|
||||
this.nodeList = [];
|
||||
this.nodeList.push(id);
|
||||
@@ -810,6 +824,14 @@ export default {
|
||||
}
|
||||
},
|
||||
computed: {},
|
||||
watch: {
|
||||
dataList: {
|
||||
deep: true,
|
||||
handler (val) {
|
||||
console.log('dataList update', val)
|
||||
}
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.getTree();
|
||||
this.getProductData();
|
||||
|
||||
@@ -324,8 +324,6 @@ export default {
|
||||
this.listForm.breakdownList = item.breakdownList
|
||||
})
|
||||
},
|
||||
|
||||
|
||||
//驳回事件
|
||||
beforeBack () {
|
||||
if(this.commentText === null || this.commentText === undefined || this.commentText === ''){
|
||||
|
||||
Reference in New Issue
Block a user