gaohaiyong 1 год назад
Родитель
Сommit
e5141dfe2f
3 измененных файлов с 291 добавлено и 3 удалено
  1. 10 0
      src/api/excel.js
  2. 76 0
      src/views/allcase/components/MedicalRecordTableBox.vue
  3. 205 3
      src/views/allcase/index.vue

+ 10 - 0
src/api/excel.js

@@ -156,4 +156,14 @@ export function encoderErrorExport(data) {
     responseType: 'blob',
     responseType: 'blob',
     data
     data
   })
   })
+}
+
+// 医师排名导出
+export function medicalRecordDoctorExport(data) {
+  return request_blob({
+    url: `/bazb/case-quality/medical_record_doctor`,
+    method: 'post',
+    responseType: 'blob',
+    data
+  })
 }
 }

+ 76 - 0
src/views/allcase/components/MedicalRecordTableBox.vue

@@ -0,0 +1,76 @@
+<template>
+  <el-table
+    :data="data"
+    max-height="530"
+    style="width: 100%;">
+    <el-table-column
+      prop=""
+      label="序号"
+      width="80">
+      <template slot-scope="scope">
+        <span>{{ scope.$index + 1}}</span>
+      </template>
+    </el-table-column>
+    <el-table-column
+      prop=""
+      label="医师姓名">
+      <template slot-scope="scope">
+        <span class="link">{{ scope.row.key }}</span>
+      </template>
+    </el-table-column>
+    <el-table-column
+      prop="doc_count"
+      label="总病例数">
+    </el-table-column>
+    <el-table-column
+      prop="defect_doc_count"
+      label="缺陷病例数">
+    </el-table-column>
+    <el-table-column
+      prop="score"
+      label="缺陷病案分数">
+    </el-table-column>
+  </el-table>
+</template>
+
+<script>
+export default {
+  props: {
+    data: {
+      type: Array,
+      default() {
+        return []
+      }
+    }
+  },
+  methods: {
+    toPage(row) {
+      this.$router.push({ path: '/defectNumber', query: { rule_id: row.key }})
+    }
+  }
+}
+</script>
+
+<style lang="scss" scoped>
+::v-deep.el-table .el-table__row td {
+  color: #7e8bab;
+  border-bottom: 1px solid #f4f4f4;
+}
+::v-deep.el-table .el-table__header tr th:first-child {
+  border-radius: 10px 0px 0px 10px;
+}
+::v-deep.el-table .el-table__header tr th:last-child {
+  border-radius: 0px 10px 10px 0px;
+}
+::v-deep.el-table .el-table__header tr th {
+  background: #f1f6ff;
+  color: #13171e;
+  border-bottom: 0px;
+}
+.link{
+  font-weight: 600;
+  color: #409eff;
+  text-decoration:underline;
+  cursor: pointer;
+}
+</style>

+ 205 - 3
src/views/allcase/index.vue

@@ -39,7 +39,7 @@
       </div>
       </div>
     </div>
     </div>
     <div class="cardBox">
     <div class="cardBox">
-      <Title :title="'质量分析'" />
+      <Title :title="'运行病历数量'" />
       <div class="contentBox">
       <div class="contentBox">
         <div class="left">
         <div class="left">
           <div class="l">
           <div class="l">
@@ -53,6 +53,7 @@
             </div>
             </div>
           </div>
           </div>
         </div>
         </div>
+
       </div>
       </div>
     </div>
     </div>
     <!-- 科室排名 -->
     <!-- 科室排名 -->
@@ -76,6 +77,22 @@
       </el-form>
       </el-form>
       <ProblemTableBoxVue :data="caseList" />
       <ProblemTableBoxVue :data="caseList" />
     </div>
     </div>
+    <!-- 医师排名 -->
+    <div class="chart">
+      <div class="title-box">
+        <Title :title="'医师排名'" />
+        <div class="xz-btn" @click="handleExport">下载</div>
+      </div>
+      <div class="medicalRecord-box">
+        <div class="medicalRecord-list-box">
+          <MedicalRecordTableBoxVue :data="medicalRecordList" />
+          <!-- 分页控制 -->
+          <mPagination v-if="medicalRecordList && medicalRecordList.length !== 0" :data="paginationData" @pageChangeEvent="pageHasChanged"></mPagination>
+        </div>
+        <div id="myChart2" style="width: 100%; height: 400px"></div>
+      </div>
+    </div>
+
   </div>
   </div>
 </template>
 </template>
   
   
@@ -84,10 +101,16 @@ import * as echarts from 'echarts';
 import { mapGetters } from 'vuex';
 import { mapGetters } from 'vuex';
 import Title from '@/components/Title';
 import Title from '@/components/Title';
 import ProblemTableBoxVue from './components/ProblemTableBox.vue';
 import ProblemTableBoxVue from './components/ProblemTableBox.vue';
+import MedicalRecordTableBoxVue from './components/MedicalRecordTableBox.vue';
+import mPagination from '@/components/m-pagination';
+import { medicalRecordDoctorExport } from '@/api/excel'
+
 export default {
 export default {
   components: {
   components: {
     Title,
     Title,
     ProblemTableBoxVue,
     ProblemTableBoxVue,
+    MedicalRecordTableBoxVue,
+    mPagination
   },
   },
   name: 'Dashboard',
   name: 'Dashboard',
   computed: {
   computed: {
@@ -125,7 +148,15 @@ export default {
         department: ''
         department: ''
       },
       },
       caseList: [],
       caseList: [],
-      departmentList: []
+      departmentList: [],
+      doctorList:[], // 医生列表
+      medicalRecordList: [], // 医师排名
+      // 分页数据
+      paginationData: {
+        total: 10,
+        currentPage: 1,
+        pageSize: 10,
+      },
     };
     };
   },
   },
   mounted() {
   mounted() {
@@ -156,6 +187,25 @@ export default {
     next()
     next()
   },
   },
   methods: {
   methods: {
+    // 获取医生列表
+    getDoctorList(){
+      this.$axios2.post('/case-quality/doctor_list').then(res => {
+        this.doctorList = res.data;
+      });
+    },
+    // 缺陷病例统计
+    getAnalysis(){
+      this.$axios2.post('/case-quality/analysis').then(res => {
+
+      });
+    },
+    
+    // 甲乙病级病例
+    getMedicalRecordLevel(){
+      this.$axios2.post('/case-quality/medical_record_level').then(res => {
+
+      });
+    },
     // 获取部门集合
     // 获取部门集合
     getDepartmentList() {
     getDepartmentList() {
       this.$axios.post('/get_omr_department_list').then(res => {
       this.$axios.post('/get_omr_department_list').then(res => {
@@ -173,6 +223,95 @@ export default {
         this.caseList = res.data.list
         this.caseList = res.data.list
       });
       });
     },
     },
+    // 获取医师排名
+    getMedicalRecordList() {
+      let pramse = {
+        start_time: this.formData.startTime,
+        end_time: this.formData.endTime,
+        page_size: this.paginationData.pageSize,
+        page: this.paginationData.currentPage,
+      };
+      this.$axios2.post('/case-quality/medical_record_doctor', pramse).then(res => {
+        let medicalRecordList = res.data.list;
+        this.medicalRecordList = medicalRecordList;
+         // 销毁上一次实例
+         echarts.init(document.getElementById('myChart2')).dispose();
+        // 构建新实例
+        let myChart = echarts.init(document.getElementById('myChart2'));
+        window.addEventListener('resize', function () {
+          myChart.resize();
+        });
+
+        let data1 = [];
+        let data2 = [];
+        let data3 = [];
+        medicalRecordList.forEach(ele => {
+          data1.push(ele.key);
+          data2.push(ele.defect_doc_count);
+          data3.push(ele.doc_count);
+        });
+        myChart.setOption({
+          // toolbox: {
+          //   feature: {
+          //     saveAsImage: {
+          //       name: '医师排名',
+          //     },
+          //   },
+          // },
+          tooltip: {
+            trigger: 'axis',
+            axisPointer: {
+              // Use axis to trigger tooltip
+              type: 'shadow' // 'shadow' as default; can also be 'line' or 'shadow'
+            }
+          },
+          legend: {},
+          grid: {
+            left: '3%',
+            right: '4%',
+            bottom: '3%',
+            containLabel: true
+          },
+          color:['#54C5A0FF','#5B8EC3FF'],
+          xAxis: {
+            type: 'value'
+          },
+          yAxis: {
+            type: 'category',
+            data: data1
+          },
+          series: [
+            {
+              name: '缺陷病例数',
+              type: 'bar',
+              stack: 'total',
+              label: {
+                show: true,
+              },
+              emphasis: {
+                focus: 'series'
+              },
+              data: data2
+            },
+            {
+              name: '总病例数',
+              type: 'bar',
+              stack: 'total',
+              label: {
+                show: true
+              },
+              emphasis: {
+                focus: 'series'
+              },
+              data: data3
+            }
+          ]
+        });
+      });
+    },
+    pageHasChanged() {
+      this.getMedicalRecordList();
+    },
     getCounts() {
     getCounts() {
       let pramse = {
       let pramse = {
         start_time: this.formData.startTime,
         start_time: this.formData.startTime,
@@ -225,6 +364,35 @@ export default {
     chooseTime(time) {
     chooseTime(time) {
       this.formData.rangeDate = this.timesCalculation(time).slice(0, 2);
       this.formData.rangeDate = this.timesCalculation(time).slice(0, 2);
     },
     },
+
+    // 医师排名导出
+    handleExport() {
+      const params = {
+        start_time: this.formData.startTime,
+        end_time: this.formData.endTime,
+        page_size: this.paginationData.pageSize,
+        page: this.paginationData.currentPage,
+        is_export: 1
+      }
+     
+      medicalRecordDoctorExport(params).then(res => {
+        const content = res.data // 后台返回二进制数据
+        const blob = new Blob([content])
+        const fileName = `医师排名.csv`
+        if ('download' in document.createElement('a')) { // 非IE下载
+          const elink = document.createElement('a')
+          elink.download = fileName
+          elink.style.display = 'none'
+          elink.href = URL.createObjectURL(blob)
+          document.body.appendChild(elink)
+          elink.click()
+          URL.revokeObjectURL(elink.href) // 释放URL 对象
+          document.body.removeChild(elink)
+        } else { // IE10+下载
+          navigator.msSaveBlob(blob, fileName)
+        }
+      })
+    },
     funQuery() {
     funQuery() {
       //查询
       //查询
       let type_id = '';
       let type_id = '';
@@ -244,7 +412,13 @@ export default {
       this.storageSet('homeFrom', this.formData);
       this.storageSet('homeFrom', this.formData);
       this.initCharts1(pramse);
       this.initCharts1(pramse);
       this.getCounts();
       this.getCounts();
-      this.getCaseList()
+      this.getCaseList();
+      // 获取医师排名
+      this.getMedicalRecordList();
+      // 缺陷病例统计
+      this.getAnalysis();
+      // 甲乙病级病例
+      this.getMedicalRecordLevel();
     },
     },
     initCharts1(pramse) {
     initCharts1(pramse) {
       this.$axios.post('/case-quality/ranking_department', pramse).then(res => {
       this.$axios.post('/case-quality/ranking_department', pramse).then(res => {
@@ -516,5 +690,33 @@ export default {
   border-color: #c6e2ff;
   border-color: #c6e2ff;
   background-color: #ecf5ff;
   background-color: #ecf5ff;
 }
 }
+.title-box{
+  width: 100%;
+  display: flex;
+  align-items: center;
+  justify-content: space-between;
+  .xz-btn{
+    width: 84px;
+    height: 32px;
+    text-align: center;
+    line-height: 32px;
+    background: #185DA6;
+    border-radius: 6px;
+    color: #fff;
+    font-size: 14px;
+    cursor: pointer;
+  }
+}
+.medicalRecord-box{
+  width: 100%;
+  display: flex;
+  margin-top: 16px;
+  &>div{
+    flex: 1;
+  }
+  .medicalRecord-list-box{
+    flex: 1;
+  }
+}
 </style>
 </style>