From 38f7113cdcb33133047e21e15e6bfdbbe9d50e06 Mon Sep 17 00:00:00 2001 From: fengchenchen Date: Fri, 12 Jul 2024 17:00:28 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90update=E3=80=91-=E7=A7=91=E5=AE=A4?= =?UTF-8?q?=E6=80=BB=E4=BD=93=E7=BB=9F=E8=AE=A1-=E5=A2=9E=E5=8A=A0?= =?UTF-8?q?=E4=B8=8D=E5=90=8C=E6=89=93=E5=8C=85=E7=BB=B4=E5=BA=A6=E7=9A=84?= =?UTF-8?q?=E7=AD=9B=E9=80=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dashboard/DepartmentTotalEcharts.vue | 58 ++++++++++++++++++- 1 file changed, 57 insertions(+), 1 deletion(-) diff --git a/src/views/dashboard/DepartmentTotalEcharts.vue b/src/views/dashboard/DepartmentTotalEcharts.vue index 9f96a51..b463bc1 100644 --- a/src/views/dashboard/DepartmentTotalEcharts.vue +++ b/src/views/dashboard/DepartmentTotalEcharts.vue @@ -5,6 +5,13 @@ 科室总体统计 +
+ 打包项目 + 子项目 +
+
@@ -88,6 +95,7 @@ export default { mixins: [JeroListMixin], data() { return { + activeIndex: 'packProject', disableMixinCreated: true, url: { list: '/index/overallDepartmentStatistics', @@ -104,6 +112,15 @@ export default { this.loadData(1) }, methods: { + toggleEcharts(key) { + if (key === this.activeIndex) { + return + } else { + this.activeIndex = key + this.loadData() + this.$forceUpdate() + } + }, formatMoney, loadData(arg) { if (!this.url.list) { @@ -114,8 +131,12 @@ export default { if (arg === 1) { this.ipagination.current = 1 } + let typeEnum = { + packProject: 1, + childProject: 2 + } let params = this.getQueryParams()//查询条件 - params = Object.assign({}, params, {year: this.queryParam.year}) + params = Object.assign({}, params, {type: typeEnum[this.activeIndex], year: this.queryParam.year}) this.loading = true getAction(this.url.list, params).then((res) => { if (res.success) { @@ -334,6 +355,7 @@ export default { padding: 20px; box-sizing: border-box; width: 100%; + position: relative; //height: auto; } @@ -368,4 +390,38 @@ export default { background: rgb(245, 245, 246); } + +.operator { + color: #069F99; + position: absolute; + user-select: none; + display: flex; + font-size: 12px; + justify-content: space-around; + align-items: center; + right: 20px; + top: 10px; + width: 180px; + height: 32px; + line-height: 32px; + border: 1px solid #069F99; + border-radius: 4px; + cursor: pointer; + + &-left { + width: 50%; + text-align: center; + border-right: 1px solid #069F99; + } + + &-right { + width: 50%; + text-align: center; + } +} + +.active { + background: #069F99; + color: #fff; +} \ No newline at end of file