diff --git a/src/views/components/DepartmentList.vue b/src/views/components/DepartmentList.vue index e9e8e04..7e42755 100644 --- a/src/views/components/DepartmentList.vue +++ b/src/views/components/DepartmentList.vue @@ -62,6 +62,8 @@ import { } from "@/api/manage/template"; import { listScriptNum } from "@/api/manage/script"; import { listMessageNum } from "@/api/manage/message"; +import { selectNumByDept } from "@/api/manage/propaganda"; +import { listServicePackageNum } from "@/api/manage/servicepackage"; export default { props: ['methods'], name: "DepartmentList", @@ -97,11 +99,6 @@ export default { created() { this.querydepartmen.hospitalAgencyId = JSON.parse(localStorage.getItem('user')).hospitalAgencyId this.Departmentlist(); - this.$emit("clickdepartment", { - itemid: '', - itemName: '', - hospitalAgencyId: JSON.parse(localStorage.getItem('user')).hospitalAgencyId - }); }, methods: { opentrue() { @@ -120,22 +117,20 @@ export default { this.querydepartmen.hospitalAgencyId = item.id this.Departmentlist(); this.open = false - this.$emit("clickdepartment", { - hospitalAgencyId: this.querydepartmen.hospitalAgencyId, - itemid: '', - itemName: '' - }); }, changeswitch(e) { let hospitalAgencyId = '' + let hospitalAgencyName = '' if (e) { hospitalAgencyId = this.querydepartmen.hospitalAgencyId + hospitalAgencyName = this.hospitalAgencyName } this.itemid = '' this.$emit("clickdepartment", { hospitalAgencyId: hospitalAgencyId, itemid: '', - itemName: '' + itemName: '', + hospitalAgencyName: hospitalAgencyName }); }, resetQuery() { @@ -143,11 +138,6 @@ export default { this.switchvalue = true this.querydepartmen.departmentName = '' this.querydepartmen.hospitalAgencyId = JSON.parse(localStorage.getItem('user')).hospitalAgencyId - this.$emit("clickdepartment", { - hospitalAgencyId: this.querydepartmen.hospitalAgencyId, - itemid: '', - itemName: '' - }); this.Departmentlist(); }, // 左侧科室 @@ -159,14 +149,16 @@ export default { obj = { itemid: this.itemid, itemName: item.departmentName, - hospitalAgencyId: this.querydepartmen.hospitalAgencyId + hospitalAgencyId: this.querydepartmen.hospitalAgencyId, + hospitalAgencyName: this.hospitalAgencyName } } else { this.itemid = null obj = { itemid: '', itemName: '', - hospitalAgencyId: this.querydepartmen.hospitalAgencyId + hospitalAgencyId: this.querydepartmen.hospitalAgencyId, + hospitalAgencyName: this.hospitalAgencyName } } this.$emit("clickdepartment", obj); @@ -182,6 +174,10 @@ export default { method = listWechatTemplateNum(this.querydepartmen) } else if (this.methods == 'listMessageNum') { method = listMessageNum(this.querydepartmen) + } else if (this.methods == 'selectNumByDept') { + method = selectNumByDept(this.querydepartmen) + } else if (this.methods == 'listServicePackageNum') { + method = listServicePackageNum(this.querydepartmen) } method.then(response => { this.DepartmentoList = response.data.deptNumList; @@ -192,6 +188,12 @@ export default { this.count += item.countNum; } }); + this.$emit("clickdepartment", { + hospitalAgencyId: this.querydepartmen.hospitalAgencyId, + itemid: '', + itemName: '', + hospitalAgencyName: this.hospitalAgencyName + }); }); }, } diff --git a/src/views/manage/message/index.vue b/src/views/manage/message/index.vue index 937726a..c11c82e 100644 --- a/src/views/manage/message/index.vue +++ b/src/views/manage/message/index.vue @@ -33,6 +33,7 @@ 新增短信模版 @@ -335,12 +336,14 @@ export default { //接收科室列表传值 clickdepartment(item) { this.queryParams.hospitalAgencyId = item.hospitalAgencyId + this.queryParams.hospitalAgencyName = item.hospitalAgencyName this.queryParams.departmentId = item.itemid this.departmentName = item.itemName this.informationqueryParams.hospitalAgencyId = item.hospitalAgencyId if (item.hospitalAgencyId) { this.getList(); } + this.$forceUpdate() }, /** 查询微信模板信息列表 */ getList() { @@ -406,7 +409,7 @@ export default { }, // 点击病种 clickdisease() { - if (this.departmentName == '请选择科室') { + if (this.form.departmentName == '请选择科室') { this.$modal.msgError("请先选择科室"); } else { this.diseaseshowst = true; @@ -483,6 +486,12 @@ export default { handleAdd() { this.reset(); this.form.diseaseTypeName = "请选择病种" + if (this.queryParams.departmentId) { + this.form.departmentName = this.departmentName + this.form.departmentId = this.queryParams.departmentId + } else { + this.form.departmentName = '请选择科室' + } this.title = "新增短信模版"; this.open = true; }, @@ -493,6 +502,7 @@ export default { // this.getDisease(); getMessage(id).then(response => { this.form = response.data; + this.departmentName = response.data.departmentName if (!this.form.textMessageSort) { this.form.textMessageSort = undefined } @@ -503,6 +513,7 @@ export default { /** 提交按钮 */ submitForm() { this.form.hospitalAgencyId = this.queryParams.hospitalAgencyId + this.form.hospitalAgencyName = this.queryParams.hospitalAgencyName this.$refs["form"].validate(valid => { if (valid) { if (this.obj.length > 10) { diff --git a/src/views/manage/propaganda/index.vue b/src/views/manage/propaganda/index.vue index 735d137..71d592a 100644 --- a/src/views/manage/propaganda/index.vue +++ b/src/views/manage/propaganda/index.vue @@ -2,24 +2,8 @@
-
-
科室名称
-
- -
-
-
- 全部 -
- {{ count }} -
-
-
- {{ item.departmentName }} -
- {{ item.countNum }} -
-
+ +
@@ -40,19 +24,13 @@ - + - + --> @@ -65,7 +43,6 @@ @keyup.enter.native="handleQuery" /> --> - 搜索 重置 @@ -76,6 +53,7 @@ 新增 @@ -90,47 +68,21 @@ @@ -141,7 +93,6 @@