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