From 43b104233495e98a70dee5e5ceedcfe577a8bd74 Mon Sep 17 00:00:00 2001 From: shidongli Date: Wed, 6 Mar 2024 09:55:36 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=A3=E6=95=99=E5=BA=93=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/manage/propaganda/index.vue | 35 +++++++++------------------ 1 file changed, 11 insertions(+), 24 deletions(-) diff --git a/src/views/manage/propaganda/index.vue b/src/views/manage/propaganda/index.vue index 3b52b35..e5e49b2 100644 --- a/src/views/manage/propaganda/index.vue +++ b/src/views/manage/propaganda/index.vue @@ -752,7 +752,6 @@ export default { created() { this.Departmentlist(); this.getList(); - this.getlistcount(); }, watch: { name(val) { @@ -787,7 +786,7 @@ export default { message: "复制成功" }); this.getList() - this.getlistcount() + this.Departmentlist() }); }).catch(() => { @@ -867,6 +866,14 @@ export default { this.loading = true; selectNumByDept(this.querydepartmen).then(response => { this.DepartmentoList = response.data; + let sum = 0; + this.DepartmentoList.forEach((item) => { + if (item.countNum != null) { + console.log(item.countNum) + sum += item.countNum; + } + this.count = sum; + }); this.loading = false; }); }, @@ -885,17 +892,6 @@ export default { } }, - // 获取总数 - getlistcount() { - var qure={ - pageNum: 1, - pageSize: 10, - - } - listPropaganda(qure).then(response => { - this.count = response.total; - }); - }, /** 查询患者宣教信息列表 */ @@ -1093,7 +1089,6 @@ export default { this.$modal.msgSuccess("修改成功"); this.open = false; this.getList(); - this.getlistcount() }); } else { if (this.diseaseTypeName == "请选择病种") { @@ -1114,7 +1109,7 @@ export default { this.$modal.msgSuccess("新增成功"); this.open = false; this.getList(); - this.getlistcount() + this.Departmentlist() }); } @@ -1128,15 +1123,7 @@ export default { return delPropaganda(ids); }).then(() => { this.getList(); - this.getlistcount() - // var quer = { - // pageNum: 1, - // pageSize: 10, - - // } - // listPropaganda(quer).then(response => { - // this.count = response.total; - // }); + this.Departmentlist() this.$modal.msgSuccess("删除成功"); }).catch(() => { }); },