Commit 7167482c authored by 姬鋆屾's avatar 姬鋆屾

提交

parent da40979b
...@@ -350,7 +350,7 @@ ...@@ -350,7 +350,7 @@
</div> </div>
</div> </div>
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
<el-button @click="dialog = false"> </el-button> <el-button @click="handleCancel"> </el-button>
<el-button type="primary" @click="dialog = false"> </el-button> <el-button type="primary" @click="dialog = false"> </el-button>
</span> </span>
</el-dialog> </el-dialog>
...@@ -436,6 +436,34 @@ export default { ...@@ -436,6 +436,34 @@ export default {
}, },
methods: { methods: {
handleCancel() {
if (this.title == "修改人员自动考核信息") {
this.selectArr = [];
let arr = [];
this.form.staffNames && this.form.staffNames != ""
? (arr = this.form.staffNames.split(","))
: "";
arr &&
arr.forEach((v) => {
this.treeData.forEach((val) => {
if (v == val.name) {
this.selectArr.push(val);
}
});
});
this.selectArr && this.selectArr.length > 0
? this.$refs.tree.setCheckedNodes(this.selectArr)
: "";
this.selectArr && this.selectArr.length > 0
? (this.form.staffIds = this.selectArr.map((v) => v.id).join(","))
: "";
} else {
this.selectArr = [];
}
this.dialog = false;
return;
},
handleSearch() { handleSearch() {
this.getKaoQin(this.type); this.getKaoQin(this.type);
}, },
...@@ -538,7 +566,6 @@ export default { ...@@ -538,7 +566,6 @@ export default {
this.$get("/perform/staff/conf/info", { id: row.id }).then((res) => { this.$get("/perform/staff/conf/info", { id: row.id }).then((res) => {
if (res.code == 1) { if (res.code == 1) {
this.form = res.data; this.form = res.data;
console.log(this.treeData);
let arr = res.data.staffIds.split(","); let arr = res.data.staffIds.split(",");
this.selectArr = []; this.selectArr = [];
arr.forEach((v) => { arr.forEach((v) => {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment