This commit is contained in:
2024-07-09 15:33:18 +08:00
parent e539997c6f
commit 974b26d381
5 changed files with 13 additions and 12 deletions

View File

@ -26,7 +26,7 @@
</div> </div>
<span class="count">{{ item.countNum }}</span> <span class="count">{{ item.countNum }}</span>
</div> </div>
<el-dialog title="切换医院" :visible.sync="open" width="50%"> <el-dialog title="切换医院" :visible.sync="open" width="50%" @close="openfalse">
<div class="opentable"> <div class="opentable">
<el-form :model="opentablequery" label-width="80px" :inline="true"> <el-form :model="opentablequery" label-width="80px" :inline="true">
<el-form-item label="科室名称" prop="hospitalAgencyName" label-width="120"> <el-form-item label="科室名称" prop="hospitalAgencyName" label-width="120">
@ -105,6 +105,9 @@ export default {
this.Departmentlist(); this.Departmentlist();
}, },
methods: { methods: {
openfalse() {
this.open = false
},
opentrue() { opentrue() {
if (this.roleKey != 'admin') return if (this.roleKey != 'admin') return
this.open = true this.open = true
@ -118,6 +121,7 @@ export default {
}, },
nurseclick(item) { nurseclick(item) {
this.itemid = null this.itemid = null
this.departmentName = null
this.querydepartmen.hospitalAgencyId = item.id this.querydepartmen.hospitalAgencyId = item.id
this.Departmentlist(); this.Departmentlist();
this.open = false this.open = false
@ -130,6 +134,7 @@ export default {
hospitalAgencyName = this.hospitalAgencyName hospitalAgencyName = this.hospitalAgencyName
} }
this.itemid = '' this.itemid = ''
this.departmentName = ''
this.$emit("clickdepartment", { this.$emit("clickdepartment", {
hospitalAgencyId: hospitalAgencyId, hospitalAgencyId: hospitalAgencyId,
itemid: '', itemid: '',
@ -139,6 +144,7 @@ export default {
}, },
resetQuery() { resetQuery() {
this.itemid = null this.itemid = null
this.departmentName = null
this.switchvalue = true this.switchvalue = true
this.querydepartmen.departmentName = '' this.querydepartmen.departmentName = ''
this.querydepartmen.hospitalAgencyId = JSON.parse(localStorage.getItem('user')).hospitalAgencyId this.querydepartmen.hospitalAgencyId = JSON.parse(localStorage.getItem('user')).hospitalAgencyId
@ -150,14 +156,16 @@ export default {
let obj let obj
if (item) { if (item) {
this.itemid = item.id this.itemid = item.id
this.departmentName = item.departmentName
obj = { obj = {
itemid: this.itemid, itemid: this.itemid,
itemName: item.departmentName, itemName: this.departmentName,
hospitalAgencyId: this.querydepartmen.hospitalAgencyId, hospitalAgencyId: this.querydepartmen.hospitalAgencyId,
hospitalAgencyName: this.hospitalAgencyName hospitalAgencyName: this.hospitalAgencyName
} }
} else { } else {
this.itemid = null this.itemid = null
this.departmentName = null
obj = { obj = {
itemid: '', itemid: '',
itemName: '', itemName: '',
@ -187,6 +195,7 @@ export default {
} else if (this.methods == 'selectDiseaseCount') { } else if (this.methods == 'selectDiseaseCount') {
method = selectDiseaseCount(this.querydepartmen) method = selectDiseaseCount(this.querydepartmen)
} }
this.DepartmentoList = []
method.then(response => { method.then(response => {
this.DepartmentoList = response.data.deptNumList; this.DepartmentoList = response.data.deptNumList;
this.hospitalAgencyName = response.data.hospitalAgencyName this.hospitalAgencyName = response.data.hospitalAgencyName
@ -198,8 +207,8 @@ export default {
}); });
this.$emit("clickdepartment", { this.$emit("clickdepartment", {
hospitalAgencyId: this.querydepartmen.hospitalAgencyId, hospitalAgencyId: this.querydepartmen.hospitalAgencyId,
itemid: '', itemid: this.itemid,
itemName: '', itemName: this.departmentName,
hospitalAgencyName: this.hospitalAgencyName hospitalAgencyName: this.hospitalAgencyName
}); });
}); });

View File

@ -270,7 +270,6 @@ export default {
watch: { watch: {
name(val) { name(val) {
this.querydepartmen.departmentName = val; this.querydepartmen.departmentName = val;
this.Departmentlist();
}, },
templateId(newValue, oldValue) { templateId(newValue, oldValue) {
this.handleselectId = newValue; this.handleselectId = newValue;
@ -285,7 +284,6 @@ export default {
}, },
created() { created() {
this.getList(); this.getList();
this.Departmentlist();
}, },
methods: { methods: {
nohandleselect() { nohandleselect() {

View File

@ -262,7 +262,6 @@ export default {
watch: { watch: {
name(val) { name(val) {
this.querydepartmen.departmentName = val; this.querydepartmen.departmentName = val;
this.Departmentlist();
}, },
templateId(newValue, oldValue) { templateId(newValue, oldValue) {
this.handleselectId = newValue; this.handleselectId = newValue;
@ -277,7 +276,6 @@ export default {
}, },
created() { created() {
this.getList(); this.getList();
this.Departmentlist();
}, },
methods: { methods: {
classificationOpenfalse() { classificationOpenfalse() {

View File

@ -354,13 +354,11 @@ export default {
}, },
}, },
created() { created() {
this.Departmentlist();
this.getList(); this.getList();
}, },
watch: { watch: {
name(val) { name(val) {
this.querydepartmen.departmentName = val; this.querydepartmen.departmentName = val;
this.Departmentlist();
}, },
templateId(newValue, oldValue) { templateId(newValue, oldValue) {
// console.log(newValue,'222222222222222222') // console.log(newValue,'222222222222222222')

View File

@ -289,7 +289,6 @@ export default {
}, },
created() { created() {
this.getList(); this.getList();
this.Departmentlist();
}, },
mounted() { mounted() {
this.handleselectId = this.templateId; this.handleselectId = this.templateId;
@ -298,7 +297,6 @@ export default {
watch: { watch: {
name(val) { name(val) {
this.querydepartmen.departmentName = val; this.querydepartmen.departmentName = val;
this.Departmentlist();
}, },
templateName(newValue, oldValue) { templateName(newValue, oldValue) {
this.handleselectName = newValue; this.handleselectName = newValue;