提交代码

dev_caq
姜玉琦 2025-06-21 16:01:53 +08:00
parent b7c6c7d705
commit 1ee06ad14e
1 changed files with 28 additions and 18 deletions

View File

@ -266,7 +266,6 @@ export default {
let _dept = { id: res.rows[0].deptId, text: res.rows[0].deptName }; let _dept = { id: res.rows[0].deptId, text: res.rows[0].deptName };
this.$root.dept = _dept; this.$root.dept = _dept;
let _project = { id: res.rows[0].id, text: res.rows[0].projectName }; let _project = { id: res.rows[0].id, text: res.rows[0].projectName };
this.$root.project = _project;
this.$root.hasInitHeader = true; this.$root.hasInitHeader = true;
this.$root._prjIds = res.rows[0].id; this.$root._prjIds = res.rows[0].id;
let _projects = []; let _projects = [];
@ -546,24 +545,35 @@ export default {
cb(); cb();
} }
}, },
setScreenLiSel2(item, init) { setScreenLiSel2(proItem, init) {
if (item) { if(proItem && proItem.id){
this.showSel2 = false; this.$root.projects.forEach(item => {
if (!init || !this.dept2) { if (item.id == proItem.id) {
localStorage.setItem("data2", JSON.stringify(item)) this.$root.project = item;
this.localStorage2 = JSON.parse(localStorage.getItem("data2")) localStorage.setItem("data2", JSON.stringify(proItem));
//this.$emit('itemdata', item); this.localStorage2 = proItem;
this.dept2 = item.text; this.dept2 = proItem.text;
this.$bus.$emit("projectChange",proItem);
} }
this.$root.project = this.localStorage2; });
}
// if (item) {
// this.showSel2 = false;
// if (!init || !this.dept2) {
// localStorage.setItem("data2", JSON.stringify(item))
// this.localStorage2 = JSON.parse(localStorage.getItem("data2"))
// //this.$emit('itemdata', item);
// //this.dept2 = item.text;
// }
// this.$root.project = this.localStorage2;
// //this.$bus.$emit("projectChange", this.localStorage2);
// } else {
// localStorage.removeItem("data2");
// this.localStorage2 = {};
// this.showSel2 = false;
// this.dept2 = '';
// }
//this.$bus.$emit("projectChange",this.localStorage2); //this.$bus.$emit("projectChange",this.localStorage2);
} else {
localStorage.removeItem("data2");
this.localStorage2 = {};
this.showSel2 = false;
this.dept2 = '';
}
this.$bus.$emit("projectChange",this.localStorage2);
}, },
// //