| | |
| | | <el-row :gutter="20"> |
| | | <el-col :span="8"> |
| | | <!-- 就诊统计盒子 --> |
| | | <div class="grid-content bg-purple headerBox bgc1"> |
| | | <div |
| | | class="grid-content bg-purple headerBox bgc1" |
| | | v-loading="headerLoading" |
| | | element-loading-text="加载中..." |
| | | element-loading-background="rgba(255, 255, 255, 0.55)" |
| | | > |
| | | <div class="title"> |
| | | 门诊服务<span |
| | | style=" |
| | |
| | | </div> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <div class="grid-content bg-purple headerBox bgc2"> |
| | | <div |
| | | class="grid-content bg-purple headerBox bgc2" |
| | | v-loading="headerLoading" |
| | | element-loading-text="加载中..." |
| | | element-loading-background="rgba(255, 255, 255, 0.55)" |
| | | > |
| | | <div class="title"> |
| | | 出院服务 |
| | | <span |
| | |
| | | <el-row :gutter="20"> |
| | | <el-col :span="20"> |
| | | <!-- echars数据可视化 --> |
| | | <div class="grid-content bg-purple" style="min-height: 365px"> |
| | | <div |
| | | class="grid-content bg-purple" |
| | | style="min-height: 365px" |
| | | v-loading="chartLoading" |
| | | element-loading-text="图表数据加载中..." |
| | | element-loading-background="rgba(255, 255, 255, 0.55)" |
| | | > |
| | | <div class="title"> |
| | | 服务统计 |
| | | <span>{{ endatd }} ~ {{ statd }}</span> |
| | |
| | | </el-col> |
| | | <!-- 右边列表 --> |
| | | <el-col :span="4" class="aside"> |
| | | <div class="grid-contentsa bg-purple" style="margin-top: -180px"> |
| | | <div |
| | | class="grid-contentsa bg-purple" |
| | | style="margin-top: -180px" |
| | | v-loading="deptLoading" |
| | | element-loading-text="加载中..." |
| | | element-loading-background="rgba(255, 255, 255, 0.55)" |
| | | > |
| | | <div class="title"> |
| | | 科室服务量 |
| | | <span>{{ endatd }} ~ {{ statd }}</span> |
| | |
| | | name: "home", |
| | | data() { |
| | | return { |
| | | headerLoading: false, // 顶部统计卡加载中 |
| | | chartLoading: false, // 服务统计趋势图加载中 |
| | | deptLoading: false, // 科室服务量加载中 |
| | | NodeCount: "", |
| | | PrtnerCount: "", |
| | | NodeCount: "", |
| | |
| | | }, |
| | | }, |
| | | created() { |
| | | // 各区块独立加载,loading 由各自方法内部管理 |
| | | this.getTopdata(); |
| | | this.getgraphdata(); |
| | | // this.getranking(); |
| | | this.$nextTick(function () { |
| | | this.$nextTick(() => { |
| | | this.myEcharts2(); |
| | | this.getnodeCollect(); |
| | | this.getSkuTop(); |
| | |
| | | }, |
| | | // top排行 |
| | | async getSkuTop() { |
| | | this.deptLoading = true; |
| | | let Rankingdata = { |
| | | startDate: this.endatd, |
| | | endDate: this.statd, |
| | | cy: 1, |
| | | }; |
| | | await getDeptRanking(Rankingdata).then((res) => { |
| | | if (res.code == 200) { |
| | | this.SkuTop = res.rows.sort((a, b) => b.rc - a.rc); |
| | | console.log(this.SkuTop, "this.SkuTop"); |
| | | } |
| | | }); |
| | | try { |
| | | await getDeptRanking(Rankingdata).then((res) => { |
| | | if (res.code == 200) { |
| | | this.SkuTop = res.rows.sort((a, b) => b.rc - a.rc); |
| | | console.log(this.SkuTop, "this.SkuTop"); |
| | | } |
| | | }); |
| | | } catch (e) { |
| | | console.error("获取科室排行失败:", e); |
| | | } finally { |
| | | this.deptLoading = false; |
| | | } |
| | | |
| | | // this.SkuTop = [ |
| | | // { amount: 0, count: 123, skuId: "0", skuName: "心肺科" }, |
| | |
| | | }, |
| | | // 获取头部数据 |
| | | getTopdata() { |
| | | this.headerLoading = true; |
| | | let hospCountdata = { |
| | | startDate: this.endatd, |
| | | endDate: this.statd, |
| | |
| | | endDate: this.statd, |
| | | cy: 1, |
| | | }; |
| | | // 查询门诊看病人次和人数 |
| | | getEChartsPatMedOuthospCount(hospCountdata).then((res) => { |
| | | if (res.code == 200) { |
| | | this.OutpatientData = res.data; |
| | | } |
| | | }); |
| | | // 查询出、入院看病人次和人数 |
| | | getechartsListCountdata(Countdata).then((res) => { |
| | | if (res.code == 200) { |
| | | this.DischargeData = res.data; |
| | | } |
| | | // 查询门诊看病人次和人数 / 查询出、入院看病人次和人数 |
| | | return Promise.all([ |
| | | getEChartsPatMedOuthospCount(hospCountdata).then((res) => { |
| | | if (res.code == 200) { |
| | | this.OutpatientData = res.data; |
| | | } |
| | | }), |
| | | getechartsListCountdata(Countdata).then((res) => { |
| | | if (res.code == 200) { |
| | | this.DischargeData = res.data; |
| | | } |
| | | }), |
| | | ]).finally(() => { |
| | | this.headerLoading = false; |
| | | }); |
| | | }, |
| | | // 获取中部线柱图数据 |
| | | getranking() {}, |
| | | |
| | | async getgraphdata() { |
| | | this.chartLoading = true; |
| | | let params = { |
| | | startDate: this.endatd, |
| | | endDate: this.statd, |
| | |
| | | const res = await getServiceStatistics(params); |
| | | if (res.code === 200) { |
| | | this.processChartData(res.data); |
| | | } else { |
| | | this.chartLoading = false; |
| | | } |
| | | } catch (error) { |
| | | console.error("获取图表数据失败:", error); |
| | | this.chartLoading = false; |
| | | } |
| | | }, |
| | | |
| | |
| | | }; |
| | | |
| | | this.myChart2.setOption(option); |
| | | this.chartLoading = false; |
| | | }, |
| | | |
| | | // 计算最优的interval值 |
| | |
| | | background-color: #f9fafc; |
| | | } |
| | | </style> |
| | | |
| | | <style> |
| | | /* 首页分块加载动画:更轻量、更清爽的 loading */ |
| | | .home .el-loading-mask { |
| | | background-color: rgba(255, 255, 255, 0.55); |
| | | } |
| | | .home .el-loading-spinner { |
| | | top: 50%; |
| | | margin-top: -25px; |
| | | width: 100%; |
| | | text-align: center; |
| | | } |
| | | .home .el-loading-spinner .el-icon-loading { |
| | | font-size: 30px; |
| | | color: #409eff; |
| | | } |
| | | .home .el-loading-spinner .el-loading-text { |
| | | margin-top: 8px; |
| | | color: #606266; |
| | | font-size: 13px; |
| | | } |
| | | </style> |