This commit is contained in:
2024-07-12 14:57:56 +08:00
parent 1b0611f0d4
commit a83a03a5b5
2 changed files with 25 additions and 21 deletions

View File

@ -111,6 +111,11 @@ export default {
created() { created() {
this.querydepartmen.hospitalAgencyId = JSON.parse(localStorage.getItem('user')).hospitalAgencyId this.querydepartmen.hospitalAgencyId = JSON.parse(localStorage.getItem('user')).hospitalAgencyId
this.vmodal = this.modal this.vmodal = this.modal
if (this.methods == 'getDepartmentList' && localStorage.getItem('questionquery')) {
this.querydepartmen.hospitalAgencyId = JSON.parse(localStorage.getItem('questionquery')).hospitalAgencyId
this.itemid = JSON.parse(localStorage.getItem('questionquery')).itemid
this.departmentName = JSON.parse(localStorage.getItem('questionquery')).itemName
}
this.Departmentlist(); this.Departmentlist();
}, },
methods: { methods: {
@ -128,13 +133,19 @@ export default {
this.opentablequery.hospitalAgencyName = '' this.opentablequery.hospitalAgencyName = ''
this.HOSPITALlist = JSON.parse(localStorage.getItem('HOSPITALlist')) this.HOSPITALlist = JSON.parse(localStorage.getItem('HOSPITALlist'))
}, },
nurseclick(item) { async nurseclick(item) {
if (this.querydepartmen.hospitalAgencyId != item.id) { if (this.querydepartmen.hospitalAgencyId != item.id) {
this.querydepartmen.departmentName = '' this.querydepartmen.departmentName = ''
this.itemid = null this.itemid = null
this.departmentName = null this.departmentName = null
this.querydepartmen.hospitalAgencyId = item.id this.querydepartmen.hospitalAgencyId = item.id
this.Departmentlist(); let query = {
hospitalAgencyId: item.id
}
if (this.methods == 'getDepartmentList') {
localStorage.setItem('questionquery', JSON.stringify(query))
}
await this.Departmentlist();
} }
this.open = false this.open = false
}, },
@ -175,6 +186,9 @@ export default {
hospitalAgencyId: this.querydepartmen.hospitalAgencyId, hospitalAgencyId: this.querydepartmen.hospitalAgencyId,
hospitalAgencyName: this.hospitalAgencyName hospitalAgencyName: this.hospitalAgencyName
} }
if (this.methods == 'getDepartmentList') {
localStorage.setItem('questionquery', JSON.stringify(obj))
}
} else { } else {
this.itemid = null this.itemid = null
this.departmentName = null this.departmentName = null
@ -184,6 +198,9 @@ export default {
hospitalAgencyId: this.querydepartmen.hospitalAgencyId, hospitalAgencyId: this.querydepartmen.hospitalAgencyId,
hospitalAgencyName: this.hospitalAgencyName hospitalAgencyName: this.hospitalAgencyName
} }
if (this.methods == 'getDepartmentList') {
localStorage.setItem('questionquery', JSON.stringify(obj))
}
} }
this.$emit("clickdepartment", obj); this.$emit("clickdepartment", obj);
}, },
@ -242,11 +259,6 @@ export default {
this.count += item.countNum; this.count += item.countNum;
} }
}); });
if (localStorage.getItem('questionquery')) {
this.itemid = JSON.parse(localStorage.getItem('questionquery')).departmentId
this.departmentName = JSON.parse(localStorage.getItem('questionquery')).departmentName
}
if (this.methods != 'getDepartmentList') {
this.$emit("clickdepartment", { this.$emit("clickdepartment", {
hospitalAgencyId: this.querydepartmen.hospitalAgencyId, hospitalAgencyId: this.querydepartmen.hospitalAgencyId,
itemid: this.itemid, itemid: this.itemid,
@ -254,7 +266,6 @@ export default {
hospitalAgencyName: this.hospitalAgencyName hospitalAgencyName: this.hospitalAgencyName
}); });
} }
}
}); });
}, },
} }

View File

@ -166,11 +166,6 @@ export default {
}; };
}, },
created() { created() {
if (localStorage.getItem('questionquery')) {
this.queryParams = JSON.parse(localStorage.getItem('questionquery'))
} else {
this.queryParams.hospitalAgencyId = JSON.parse(localStorage.getItem('user')).hospitalAgencyId
}
this.getList(); this.getList();
}, },
mounted() { mounted() {
@ -323,8 +318,6 @@ export default {
/** 查询问卷基本信息列表 */ /** 查询问卷基本信息列表 */
getList() { getList() {
this.loading = true; this.loading = true;
console.log(this.queryParams)
localStorage.setItem('questionquery', JSON.stringify(this.queryParams))
listQuestion(this.queryParams).then(response => { listQuestion(this.queryParams).then(response => {
this.questionList = response.rows; this.questionList = response.rows;
this.total = response.total; this.total = response.total;