zhangxc 5 năm trước cách đây
mục cha
commit
9b36019fe8

+ 2 - 0
src/api/config.js

@@ -245,6 +245,8 @@ export default {
      'diagBaseUpdateNeo': '/api/knowledgeman/diagnose/updateNeo', //诊断依据--更新图谱
      'diagBaseVerifyAllData': '/api/knowledgeman/diagnose/verifyAllData', //诊断依据--校验所有数据
      'diagBaseVerifyData': '/api/knowledgeman/diagnose/verifyData', //诊断依据--校验数据
+      /*********数据统计  *********/
+      'statisticsCount': '/api/bi/statistics/count', //诊断依据--校验数据
 
   },
 	menuIconList: { //菜单对应图标

+ 9 - 0
src/api/medicalStatistics.js

@@ -0,0 +1,9 @@
+import axios from 'axios';
+import config from './config.js';
+const urls = config.urls;
+
+export default {
+    statisticsCount() {
+        return axios.post(urls.statisticsCount)
+    }
+}

+ 148 - 0
src/components/medicalStatistics/MedicalStatistics.vue

@@ -0,0 +1,148 @@
+<template>
+    <div>
+        <crumbs title="数据统计" style="min-width: 980px">
+        </crumbs>
+        <div class="contents">
+            <div class="contentBox">
+                <div class="headerBox">
+                    <span>当前数据更新时间:{{updateTime}}</span>
+                    <el-button
+                        class="btn"
+                        size="mini"
+                        type="warning"
+                        @click="updateData">
+                        更新数据
+                    </el-button>
+                </div>
+                
+                <el-table
+                :data="list"
+                :span-method="objectSpanMethod"
+                border
+                style="width: 100%">
+              
+                   
+                    <el-table-column
+                        :resizable = "false"
+                        prop="moduleName"
+                        width="180">
+                        
+                    </el-table-column>
+                    <el-table-column
+                        :resizable = "false"
+                        label="朗通医疗医学数据"
+                        prop="itemName"
+                        >
+                    </el-table-column>
+                
+                    <el-table-column
+                        :resizable = "false"
+                        prop="count"
+                        label="数量">
+                    </el-table-column>
+                </el-table>
+
+            </div>
+            
+        </div>
+    </div>
+</template>
+<script>
+import api from '@api/medicalStatistics.js';
+export default {
+    name: 'MedicalStatistics',
+    data() {
+        return {
+           list: [],
+           updateTime: new Date()
+        }
+    },
+    created() {
+        this.getStatisticsCount()
+    },
+    methods: {
+        objectSpanMethod({ row, column, rowIndex, columnIndex }) {
+            if (columnIndex === 0) {
+                if (row.flag) {
+                    return {
+                    rowspan: row.rowspan,
+                    colspan: 1
+                    };
+                } else {
+                    return {
+                    rowspan: 0,
+                    colspan: 0
+                    };
+                }
+            }
+            
+        },
+        updateData() {
+            this.getStatisticsCount()
+        },
+        getStatisticsCount(){
+           
+            return api.statisticsCount().then((res)=>{
+                
+                if(+res.data.code === 0) {
+                    const data = res.data.data
+                    console.log('res', data)
+                     this.list = []
+                    for(let dataItem in data) {
+                        if(data[dataItem].items) {
+                            data[dataItem].items[0].flag = true
+                            data[dataItem].items[0].rowspan =   data[dataItem].items.length
+                            this.list = [...this.list, ...data[dataItem].items]
+                        }
+                        
+                    }
+                    // console.log('data', data)
+                    this.updateTime = data.gmtOperate
+                } else {
+                    this.warning(res.data.msg)
+                }
+                })
+        },
+        warning(msg,type){
+            this.$message({
+                showClose: true,
+                message:msg,
+                type:type||'warning'
+            })
+        }
+    }
+}
+</script>
+<style scoped lang="less">
+/deep/.el-table_1_column_1_column_2.is-leaf{
+    display: none;
+}
+/deep/.el-table_1_column_1_column_3.is-leaf{
+    display: none;
+}
+/deep/.el-table {
+    min-width: 500px;
+}
+/deep/.el-table th {
+    background: rgba(239,243,249,1);
+}
+.contentBox {
+    background: #fff;
+    padding: 80px 70px 30px;
+    position: relative;
+}
+.headerBox {
+    position: absolute;
+    text-align: right;
+    height: 50px;
+    line-height: 50px;
+    top: 0;
+    right: 0;
+    width: 100%;
+}
+.btn {
+    margin: 0 50px;
+    height: 40px;
+}
+
+</style>

+ 4 - 0
src/routes.js

@@ -98,6 +98,9 @@ import AddDiagBase from '@components/diagBase/AddDiagBase.vue';  //诊断依据-
 
 import QuestionWords from '@components/diagBase/QuestionWords.vue';
 
+//医学数据统计
+import MedicalStatistics from '@components/medicalStatistics/MedicalStatistics.vue';
+
 export default [
   {
     path: '/',
@@ -262,6 +265,7 @@ export default [
       {path:'LT-ZDYJWH-ZDYJSJWH',component:DiagBase,name:'DiagBase'},  //诊断依据-诊断依据维护
       {path:'LT-ZDYJWH-TJZDYJSJ',component:AddDiagBase,name:'AddDiagBase'},  //诊断依据-添加诊断依据
       {path:'LT-ZDYJWH-WTCSJWH',component:QuestionWords,name:'QuestionWords'},  //问题列表
+      {path:'LT-SJTJ-YXSJTJ',component:MedicalStatistics,name:'MedicalStatistics'},  //问题列表
 
     ]
   }