Browse Source

编码员质控-医师排名

yuwandanmian 1 year ago
parent
commit
af37cf7d0d
2 changed files with 350 additions and 37 deletions
  1. 108 0
      src/views/encoder/components/index/DoctorRank.vue
  2. 242 37
      src/views/encoder/index.vue

+ 108 - 0
src/views/encoder/components/index/DoctorRank.vue

@@ -0,0 +1,108 @@
+<template>
+  <div style="padding-top: 20px;">
+    <div id="rank_chart" style="width: 100%; height: 520px;"></div>
+  </div>
+</template>
+
+<script>
+  export default {
+    props: {
+      data: {
+        type: Array,
+        default() {
+          return []
+        }
+      }
+    },
+    computed: {
+      yNames() {
+        const arr = []
+        this.data.map(item => {
+          arr.push(item.docker_name)
+        })
+        return arr
+      },
+      qxCounts() {
+        const arr = []
+        this.data.map(item => {
+          arr.push(item.qx_sum)
+        })
+        return arr
+      },
+      blCounts() {
+        const arr = []
+        this.data.map(item => {
+          arr.push(item.bl_sum)
+        })
+        return arr
+      }
+    },
+    mounted() {
+      this.renderChart()
+    },
+    methods: {
+      renderChart() {
+        var myChart = this.$echarts.init(document.getElementById('rank_chart'))
+        var option = {
+          tooltip: {
+            trigger: 'axis',
+            axisPointer: {
+              type: 'shadow'
+            }
+          },
+          color: ['#54C5A0', '#5B8EC3'],
+          legend: {},
+          grid: {
+            left: '3%',
+            right: '4%',
+            bottom: '3%',
+            containLabel: true
+          },
+          xAxis: {
+            type: 'value'
+          },
+          yAxis: {
+            type: 'category',
+            data: this.yNames,
+            axisLine: {
+              lineStyle: {
+                color: '#CFCFCF'
+              }
+            },
+            axisTick: {
+              show: false
+            },
+            axisLabel: {
+              color: '#333333'
+            }
+          },
+          series: [
+            {
+              name: '缺陷病历',
+              type: 'bar',
+              stack: 'total',
+              barWidth: '20',
+              data: this.qxCounts
+            },
+            {
+              name: '病历总数',
+              type: 'bar',
+              stack: 'total',
+              barWidth: '20',
+              data: this.blCounts
+            }
+          ]
+        };
+        myChart.setOption(option)
+        // 窗口大小改变 重新渲染
+        window.addEventListener('resize', () => {
+          myChart.resize()
+        })
+      }
+    }
+  }
+</script>
+
+<style lang="scss" scoped>
+
+</style>

+ 242 - 37
src/views/encoder/index.vue

@@ -220,11 +220,80 @@
         </div>
         </div>
       </el-collapse-transition>
       </el-collapse-transition>
     </div>
     </div>
+    <!-- 医师排名 -->
+    <div class="bg-card" style="margin-bottom: 24px; padding">
+      <CardTitle title="医师排名">
+        <el-image
+          class="title_arrow"
+          :class="{'arrow_top': !doctor_show}"
+          :src="require('../../assets/images/arrow-down.png')"
+          fit="contain"
+          @click="onToggleDoctorShow">
+        </el-image>
+      </CardTitle>
+      <el-collapse-transition>
+        <div v-show="doctor_show">
+          <el-row :gutter="20">
+            <el-col :span="12">
+              <el-table
+                :data="doctor_tableData"
+                class="mb20"
+                style="width: 100%">
+                <el-table-column
+                  type="index"
+                  label="序号"
+                  width="80"
+                  align="center">
+                </el-table-column>
+                <el-table-column
+                  prop="docker_name"
+                  label="医师姓名"
+                  align="center"
+                  show-overflow-tooltip>
+                </el-table-column>
+                <el-table-column
+                  prop="bl_sum"
+                  label="病历总数"
+                  align="center">
+                  <template slot-scope="scope">
+                    <span class="link" @click="toPageDoctor(scope.row)" style="color: #004983;">{{ scope.row.bl_sum }}</span>
+                  </template>
+                </el-table-column>
+                <el-table-column
+                  prop="kf_score"
+                  label="总扣分"
+                  align="center">
+                  <template slot-scope="scope">
+                    <span class="link" @click="toPageDoctor(scope.row)" style="color: #004983;">{{ scope.row.kf_score }}</span>
+                  </template>
+                </el-table-column>
+              </el-table>
+              <el-pagination
+                background
+                @size-change="handleDoctorSizeChange"
+                @current-change="handleDoctorCurrentChange"
+                :current-page="paginationDataDoctor.page"
+                :page-size="paginationDataDoctor.size"
+                layout="total, sizes, prev, pager, next, jumper"
+                :total="paginationDataDoctor.total">
+              </el-pagination>
+            </el-col>
+            <el-col :span="12">
+              <DoctorRankVue v-if="doctor_rank.length" :data="doctor_rank" />
+            </el-col>
+          </el-row>
+        </div>
+      </el-collapse-transition>
+    </div>
   </div>
   </div>
 </template>
 </template>
 
 
 <script>
 <script>
+import DoctorRankVue from './components/index/DoctorRank.vue'
   export default {
   export default {
+    components: {
+      DoctorRankVue
+    },
     data() {
     data() {
       return {
       return {
         levelText: '优:≥97分;</br>' + '良:90~96分且不出现A类错误;</br>' + '中:75~89分且不出现A类错误;</br>' + '差:<75分。',
         levelText: '优:≥97分;</br>' + '良:90~96分且不出现A类错误;</br>' + '中:75~89分且不出现A类错误;</br>' + '差:<75分。',
@@ -261,27 +330,118 @@
           dep_id: '',
           dep_id: '',
           level: ''
           level: ''
         },
         },
-        tableData: [
-          {
-            "error_rule": 1359,
-            "count": 2,
-            "eror_zb": "14.29",
-            "category": "A类",
-            "down": 0,
-            "desc": "出院病房 不能为空",
-            "level": "强制",
-            "type": "患者基本信息"
-          }
-        ],
+        tableData: [],
         paginationData: {
         paginationData: {
           page: 1,
           page: 1,
           size: 10,
           size: 10,
-          total: 100
+          total: 0
         },
         },
-        departments: []
+        departmentList: [],
+        // 医师排名
+        doctor_show: true,
+        paginationDataDoctor: {
+          page: 1,
+          size: 10,
+          total: 0
+        },
+        doctor_tableData: [],
+        // doctor_tableData: [
+        //   {
+        //     "docker_name": "杜晓峰",
+        //     "bl_sum": 28,
+        //     "qx_sum": 22,
+        //     "sum_score": 2800,
+        //     "df_score": 2158,
+        //     "kf_score": 642,
+        //     "proportion": "77.07"
+        //   },
+        //   {
+        //     "docker_name": "杜晓峰",
+        //     "bl_sum": 28,
+        //     "qx_sum": 22,
+        //     "sum_score": 2800,
+        //     "df_score": 2158,
+        //     "kf_score": 642,
+        //     "proportion": "77.07"
+        //   },
+        //   {
+        //     "docker_name": "杜晓峰",
+        //     "bl_sum": 28,
+        //     "qx_sum": 22,
+        //     "sum_score": 2800,
+        //     "df_score": 2158,
+        //     "kf_score": 642,
+        //     "proportion": "77.07"
+        //   },
+        //   {
+        //     "docker_name": "杜晓峰",
+        //     "bl_sum": 28,
+        //     "qx_sum": 22,
+        //     "sum_score": 2800,
+        //     "df_score": 2158,
+        //     "kf_score": 642,
+        //     "proportion": "77.07"
+        //   },
+        //   {
+        //     "docker_name": "杜晓峰",
+        //     "bl_sum": 28,
+        //     "qx_sum": 22,
+        //     "sum_score": 2800,
+        //     "df_score": 2158,
+        //     "kf_score": 642,
+        //     "proportion": "77.07"
+        //   },
+        //   {
+        //     "docker_name": "杜晓峰",
+        //     "bl_sum": 28,
+        //     "qx_sum": 22,
+        //     "sum_score": 2800,
+        //     "df_score": 2158,
+        //     "kf_score": 642,
+        //     "proportion": "77.07"
+        //   },
+        //   {
+        //     "docker_name": "杜晓峰",
+        //     "bl_sum": 28,
+        //     "qx_sum": 22,
+        //     "sum_score": 2800,
+        //     "df_score": 2158,
+        //     "kf_score": 642,
+        //     "proportion": "77.07"
+        //   },
+        //   {
+        //     "docker_name": "杜晓峰",
+        //     "bl_sum": 28,
+        //     "qx_sum": 22,
+        //     "sum_score": 2800,
+        //     "df_score": 2158,
+        //     "kf_score": 642,
+        //     "proportion": "77.07"
+        //   },
+        //   {
+        //     "docker_name": "杜晓峰",
+        //     "bl_sum": 28,
+        //     "qx_sum": 22,
+        //     "sum_score": 2800,
+        //     "df_score": 2158,
+        //     "kf_score": 642,
+        //     "proportion": "77.07"
+        //   },
+        //   {
+        //     "docker_name": "杜晓峰",
+        //     "bl_sum": 28,
+        //     "qx_sum": 22,
+        //     "sum_score": 2800,
+        //     "df_score": 2158,
+        //     "kf_score": 642,
+        //     "proportion": "77.07"
+        //   }
+        // ],
+        doctor_rank: []
       }
       }
     },
     },
     async mounted() {
     async mounted() {
+      this.doctor_rank = JSON.parse(JSON.stringify(this.doctor_tableData)).slice(0, 10)
       const year = new Date().getFullYear()
       const year = new Date().getFullYear()
       const month = new Date().getMonth() + 1 > 10 ? `0${new Date().getMonth() + 1}` : new Date().getMonth() + 1
       const month = new Date().getMonth() + 1 > 10 ? `0${new Date().getMonth() + 1}` : new Date().getMonth() + 1
       const day = new Date().getDay() < 10 ? `0${new Date().getDay()}` : new Date().getDay()
       const day = new Date().getDay() < 10 ? `0${new Date().getDay()}` : new Date().getDay()
@@ -292,6 +452,7 @@
       this.tongjiPie()
       this.tongjiPie()
       this.qxxqPie()
       this.qxxqPie()
       this.getQuexianData()
       this.getQuexianData()
+      this.getDoctorRank()
     },
     },
     methods: {
     methods: {
       // 缺陷详情列表
       // 缺陷详情列表
@@ -305,6 +466,7 @@
         this.tongjiPieUpdate()
         this.tongjiPieUpdate()
         this.qxxqPieUpdate()
         this.qxxqPieUpdate()
         this.getQuexianData()
         this.getQuexianData()
+        this.getDoctorRank()
       },
       },
       // 获取缺陷数据
       // 获取缺陷数据
       getQuexianData() {
       getQuexianData() {
@@ -346,28 +508,28 @@
       },
       },
       // 获取统计信息
       // 获取统计信息
       async getTongjiData() {
       async getTongjiData() {
-        await this.$axios_new.post('/api/bmy/qualityStatistics', this.formInline).then(res => {
-          this.tongjiData = res.data
-        })
-        // this.tongjiData = {
-        //   "blSum": 1,
-        //   "dayAvg": 1,
-        //   "qxSum": 1,
-        //   "averageError": "100.00",
-        //   "averageScore": "99.00",
-        //   "minScore": 99,
-        //   "you_sum": 1,
-        //   "liang_sum": 0,
-        //   "zhong_sum": 0,
-        //   "cha_sum": 0,
-        //   "you_ratio": "100.00",
-        //   "liang_ratio": "0.00",
-        //   "zhong_ratio": "0.00",
-        //   "cha_ratio": "0.00",
-        //   "jbxx": 7,
-        //   "zlxx": 1,
-        //   "fyxx": 0
-        // }
+        // await this.$axios_new.post('/api/bmy/qualityStatistics', this.formInline).then(res => {
+        //   this.tongjiData = res.data
+        // })
+        this.tongjiData = {
+          "blSum": 1,
+          "dayAvg": 1,
+          "qxSum": 1,
+          "averageError": "100.00",
+          "averageScore": "99.00",
+          "minScore": 99,
+          "you_sum": 1,
+          "liang_sum": 0,
+          "zhong_sum": 0,
+          "cha_sum": 0,
+          "you_ratio": "100.00",
+          "liang_ratio": "0.00",
+          "zhong_ratio": "0.00",
+          "cha_ratio": "0.00",
+          "jbxx": 7,
+          "zlxx": 1,
+          "fyxx": 0
+        }
       },
       },
       onToggleTongjiShow() {
       onToggleTongjiShow() {
         this.tongji_show = !this.tongji_show
         this.tongji_show = !this.tongji_show
@@ -567,7 +729,50 @@
       onQuexianSearch() {
       onQuexianSearch() {
         this.paginationData.page = 1
         this.paginationData.page = 1
         this.getQuexianData()
         this.getQuexianData()
-      }
+      },
+      // 医师排名
+      onToggleDoctorShow() {
+        this.doctor_show = !this.doctor_show
+      },
+      // 分页
+      handleDoctorSizeChange(val) {
+        this.paginationData.page = 1
+        this.paginationData.size = val
+        this.getDoctorRank()
+      },
+      handleDoctorCurrentChange(val) {
+        this.paginationData.page = val
+        this.getDoctorRank()
+      },
+      
+      getDoctorRank() {
+        const { page, size } = this.paginationDataDoctor
+        const params = {
+          page,
+          page_size: size,
+          ...this.formInline,
+          is_export: 0
+        }
+        this.$axios_new.post('/api/bmy/doctorRanking', params).then(res => {
+          const { count } = res.data
+          if (count < 10) {
+            for(let i=0; i<10 - count-1; i++) {
+              res.data.list.push({
+                "docker_name": "",
+                "bl_sum": '',
+                "qx_sum": '',
+                "sum_score": '',
+                "df_score": '',
+                "kf_score": '',
+                "proportion": ""
+              })
+            }
+          }
+          this.doctor_tableData = res.data.list
+          this.paginationDataDoctor.total = res.data.count
+          this.doctor_rank = JSON.parse(JSON.stringify(res.data.list)).slice(0, 10)
+        })
+      },
     }
     }
   }
   }
 </script>
 </script>