yuwandanmian 1 gadu atpakaļ
vecāks
revīzija
de4bbd6085
1 mainītis faili ar 85 papildinājumiem un 9 dzēšanām
  1. 85 9
      src/views/encoder/index.vue

+ 85 - 9
src/views/encoder/index.vue

@@ -11,7 +11,7 @@
           <el-date-picker v-model="formInline.end_time" type="date" placeholder="出院结束日期" value-format="yyyyMMdd" />
         </el-form-item>
         <el-form-item style="margin-bottom: 0">
-          <el-button type="primary" class="bg185DA6" @click="getTongjiData">查询</el-button>
+          <el-button type="primary" class="bg185DA6" @click="onGobalSearch">查询</el-button>
         </el-form-item>
       </el-form>
     </div>
@@ -270,14 +270,21 @@
         departments: []
       }
     },
-    mounted() {
+    async mounted() {
       this.getDepartmentData()
-      this.getTongjiData()
+      await this.getTongjiData()
       this.tongjiPie()
       this.qxxqPie()
       this.getQuexianData()
     },
     methods: {
+      // 全局筛选
+      async onGobalSearch() {
+        await this.getTongjiData()
+        this.tongjiPieUpdate()
+        this.qxxqPieUpdate()
+        this.getQuexianData()
+      },
       // 获取缺陷数据
       getQuexianData() {
         const { dep_id, level } = this.qxxqData
@@ -291,6 +298,7 @@
         }
         this.$axios_new.post('/api/bmy/qualityData', params).then(res => {
           this.tableData = res.data.data
+          this.paginationData.total = res.data.count
         })
       },
       // 获取部门集合
@@ -300,8 +308,8 @@
         });
       },
       // 获取统计信息
-      getTongjiData() {
-        this.$axios_new.post('/api/bmy/qualityStatistics', this.formInline).then(res => {
+      async getTongjiData() {
+        await this.$axios_new.post('/api/bmy/qualityStatistics', this.formInline).then(res => {
           this.tongjiData = res.data
         })
       },
@@ -352,6 +360,39 @@
           this.tongjiDom.resize()
         })
       },
+      tongjiPieUpdate() {
+        const option = {
+          tooltip: {
+            trigger: 'item'
+          },
+          legend: {
+            top: '5%',
+            left: 'right',
+            orient: 'vertical',
+            align: 'left'
+          },
+          color: ['#5087EC', '#FF786F'],
+          series: [
+            {
+              type: 'pie',
+              radius: ['60%', '80%'],
+              avoidLabelOverlap: false,
+              label: {
+                show: true,
+                formatter: '{b}: {c}'
+              },
+              labelLine: {
+                show: true
+              },
+              data: [
+                { value: this.tongjiData.blSum, name: '首页总病例' },
+                { value: this.tongjiData.qxSum, name: '缺陷总例数' },
+              ]
+            }
+          ]
+        }
+        this.tongjiDom.setOption(option)
+      },
       // 缺陷环图
       qxxqPie() {
         this.tongjiDom = this.$echarts.init(
@@ -381,10 +422,10 @@
                 show: true
               },
               data: [
-                { value: this.tongjiData.jbxx, name: '患者基本信息' },
-                { value: this.tongjiData.zlxx, name: '诊疗信息' },
-                { value: this.tongjiData.fyxx, name: '费用信息' },
-                { value: this.tongjiData.qtxx, name: '其他信息' }
+                { value: this.tongjiData.jbxx || 0, name: '患者基本信息' },
+                { value: this.tongjiData.zlxx || 0, name: '诊疗信息' },
+                { value: this.tongjiData.fyxx || 0, name: '费用信息' },
+                { value: this.tongjiData.qtxx || 0, name: '其他信息' }
               ]
             }
           ]
@@ -395,6 +436,41 @@
           this.tongjiDom.resize()
         })
       },
+      qxxqPieUpdate() {
+        const option = {
+          tooltip: {
+            trigger: 'item'
+          },
+          legend: {
+            top: '10%',
+            left: 'center',
+            align: 'left'
+          },
+          color: ['#FF8279', '#FF9F98', '#FFBEB9', '#FFD9D6'],
+          series: [
+            {
+              type: 'pie',
+              top: '20%',
+              radius: ['55%', '70%'],
+              avoidLabelOverlap: false,
+              label: {
+                show: true,
+                formatter: '{b}: {c}'
+              },
+              labelLine: {
+                show: true
+              },
+              data: [
+                { value: this.tongjiData.jbxx || 0, name: '患者基本信息' },
+                { value: this.tongjiData.zlxx || 0, name: '诊疗信息' },
+                { value: this.tongjiData.fyxx || 0, name: '费用信息' },
+                { value: this.tongjiData.qtxx || 0, name: '其他信息' }
+              ]
+            }
+          ]
+        }
+        this.tongjiDom.setOption(option)
+      },
       // 分页
       handleSizeChange(val) {
         this.paginationData.page = 1