Browse Source

提交代码

陈少旭 10 months ago
parent
commit
09610a049b
1 changed files with 31 additions and 34 deletions
  1. 31 34
      src/xt_pages/Dialysisanalysis/otherIndicators/otherIndicatorsone.vue

src/xt_pages/Dialysisanalysis/otherIndicators/otheralone.vue → src/xt_pages/Dialysisanalysis/otherIndicators/otherIndicatorsone.vue View File

83
           <div style="padding-left:10px;flex:1;width:0;">
83
           <div style="padding-left:10px;flex:1;width:0;">
84
             <div class="tableTitle">指标趋势<span style="font-weight:normal">&nbsp;&nbsp;(当前患者: {{patient_name}})</span></div>
84
             <div class="tableTitle">指标趋势<span style="font-weight:normal">&nbsp;&nbsp;(当前患者: {{patient_name}})</span></div>
85
             <div>
85
             <div>
86
-              <line-chart :options="chart"
87
-                          v-if="query.statistics_type != 9 && query.statistics_type != 10"></line-chart>
88
-              <line-chart :options="bar" v-if="query.statistics_type == 9 || query.statistics_type == 10"></line-chart>
86
+              <line-chart :options="chart"></line-chart>
87
+              <!--              <line-chart :options="bar" v-if="query.statistics_type == 9 || query.statistics_type == 10"></line-chart>-->
88
+              <!--              <line-chart></line-chart>-->
89
 
89
 
90
             </div>
90
             </div>
91
             <div class="tableTitle">统计表</div>
91
             <div class="tableTitle">统计表</div>
93
               <el-table ref="table" :data="tableData" v-loading="loading" border :row-style="{ color: '#303133' }" :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}">
93
               <el-table ref="table" :data="tableData" v-loading="loading" border :row-style="{ color: '#303133' }" :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}">
94
                 <el-table-column label="姓名" align="center">
94
                 <el-table-column label="姓名" align="center">
95
                   <template slot-scope="scope">
95
                   <template slot-scope="scope">
96
+                    {{scope.row.name}}
96
                   </template>
97
                   </template>
97
                 </el-table-column>
98
                 </el-table-column>
98
 
99
 
99
                 <el-table-column width="100" label="检查日期" align="center">
100
                 <el-table-column width="100" label="检查日期" align="center">
100
                   <template slot-scope="scope">
101
                   <template slot-scope="scope">
102
+                    {{getTime(scope.row.inspect_date)}}
103
+
101
                   </template>
104
                   </template>
102
                 </el-table-column>
105
                 </el-table-column>
103
 
106
 
104
-                <el-table-column width="100" label="甲状旁腺激素分析" align="center">
107
+                <el-table-column width="100" label="血红蛋白" align="center">
105
                   <template slot-scope="scope">
108
                   <template slot-scope="scope">
109
+                    {{scope.row.value}}
106
                   </template>
110
                   </template>
107
                 </el-table-column>
111
                 </el-table-column>
108
               </el-table>
112
               </el-table>
109
 
113
 
110
-              <el-pagination
111
-                align="right"
112
-                @size-change="handleSizeChange"
113
-                @current-change="handleCurrentChange"
114
-                :current-page="query.page"
115
-                :page-sizes="[10, 20, 50, 100]"
116
-                :page-size="10"
117
-                background
118
-                style="margin-top:20px;"
119
-                layout="total, sizes, prev, pager, next, jumper"
120
-                :total="total"
121
-              ></el-pagination>
114
+
122
             </div>
115
             </div>
123
           </div>
116
           </div>
124
         </el-container>
117
         </el-container>
130
 
123
 
131
 <script>
124
 <script>
132
 import echarts from 'echarts'
125
 import echarts from 'echarts'
133
-// import LineChart from '../../qcd/components/LineChart'
134
 import {  uParseTime } from '@/utils/tools'
126
 import {  uParseTime } from '@/utils/tools'
135
 import { getCurrentOrgPatients } from '@/api/common/common'
127
 import { getCurrentOrgPatients } from '@/api/common/common'
136
 import {
128
 import {
139
 import { PostSearch } from '@/api/patient'
131
 import { PostSearch } from '@/api/patient'
140
 import { getDataConfig } from '@/utils/data'
132
 import { getDataConfig } from '@/utils/data'
141
 import { GetPersonQCStatistisData } from '../../../api/qcd'
133
 import { GetPersonQCStatistisData } from '../../../api/qcd'
134
+import LineChart from '../../qcd/components/LineChart.vue'
142
 
135
 
143
 export default {
136
 export default {
144
   components: {
137
   components: {
138
+    LineChart
145
   },
139
   },
146
   data() {
140
   data() {
147
     return {
141
     return {
365
       for (let i = 0; i < this.tableData.length; i++) {
359
       for (let i = 0; i < this.tableData.length; i++) {
366
         let order = this.tableData[i]
360
         let order = this.tableData[i]
367
         let name = order.name
361
         let name = order.name
368
-        let item_name = order.item_name
369
-        let count = order.count
370
-        let price = order.price.toFixed(2)
371
-        let pay_sumamt = (order.price.toFixed(2) * order.count).toFixed(2)
372
-        let total = order.total.toFixed(2)
362
+        let value = order.value
363
+        let inspect_date = order.inspect_date
373
 
364
 
374
         let obj = {
365
         let obj = {
375
-          '患者姓名': name,
376
-          '项目名称': item_name,
377
-          '数量': count,
378
-          '单价': price,
379
-          '费用': pay_sumamt,
380
-          '费用总额': total
366
+          '姓名': name,
367
+          '数值': value,
368
+          '日期': inspect_date,
381
         }
369
         }
382
         list.push(obj)
370
         list.push(obj)
383
       }
371
       }
384
       import('@/vendor/Export2Excel').then(excel => {
372
       import('@/vendor/Export2Excel').then(excel => {
385
-        const tHeader = ['患者姓名', '项目名称', '数量', '单价', '费用', '费用总额']
386
-        const filterVal = ['患者姓名', '项目名称', '数量', '单价', '费用', '费用总额']
373
+        const tHeader = ['姓名', '数值', '日期']
374
+        const filterVal = ['姓名', '数值', '日期']
387
         const data = this.formatJson(filterVal, list)
375
         const data = this.formatJson(filterVal, list)
388
         excel.export_json_to_excel1({
376
         excel.export_json_to_excel1({
389
           header: tHeader,
377
           header: tHeader,
480
       if(val == "" || val == undefined){
468
       if(val == "" || val == undefined){
481
         return ""
469
         return ""
482
       }else {
470
       }else {
483
-        return uParseTime(val, '{y}-{m}-{d} {h}:{i}')
471
+        return uParseTime(val, '{y}-{m}-{d}')
484
       }
472
       }
485
     },
473
     },
486
     GetInspectionCheckIndexTableData(params) {
474
     GetInspectionCheckIndexTableData(params) {
493
             this.loading = false
481
             this.loading = false
494
             this.tableData = []
482
             this.tableData = []
495
             for (let i = 0; i < resp.data.inspections.length; i++) {
483
             for (let i = 0; i < resp.data.inspections.length; i++) {
496
-              this.tableData.push(resp.data.inspections[i])
484
+              let obj = {
485
+                name:resp.data.patient.name,
486
+                value:resp.data.inspections[i].inspect_value,
487
+                inspect_date:resp.data.inspections[i].inspect_date
488
+              }
489
+              this.tableData.push(obj)
497
             }
490
             }
498
             this.total = resp.data.total
491
             this.total = resp.data.total
499
 
492
 
515
         .then(rs => {
508
         .then(rs => {
516
           var resp = rs.data
509
           var resp = rs.data
517
           if (resp.state == 1) {
510
           if (resp.state == 1) {
511
+            console.log(resp.data.inspections)
518
             for (let i = 0; i < resp.data.inspections.length; i++) {
512
             for (let i = 0; i < resp.data.inspections.length; i++) {
519
               this.chart.xAxis.data.push(this.getTime(resp.data.inspections[i].inspect_date))
513
               this.chart.xAxis.data.push(this.getTime(resp.data.inspections[i].inspect_date))
520
               this.chart.series[0].data.push(resp.data.inspections[i].inspect_value)
514
               this.chart.series[0].data.push(resp.data.inspections[i].inspect_value)
521
             }
515
             }
516
+            console.log(this.chart.xAxis.data)
517
+            console.log( this.chart.series[0].data)
518
+
522
             this.getArrLength(this.chart.xAxis.data,1)
519
             this.getArrLength(this.chart.xAxis.data,1)
523
           } else {
520
           } else {
524
 
521
 
610
     this.query.patient_id = 0
607
     this.query.patient_id = 0
611
     this.query.end_time = year + '-' + month + '-' + day
608
     this.query.end_time = year + '-' + month + '-' + day
612
     this.query.start_time = year + '-' + last_month + '-' + day
609
     this.query.start_time = year + '-' + last_month + '-' + day
613
-    this.query.project_id = 20
614
-    this.query.item_id = 171
610
+    this.query.project_id = 1
611
+    this.query.item_id = 17
615
     this.getCurrentOrgPatients()
612
     this.getCurrentOrgPatients()
616
 
613
 
617
     // this.GetPersonQCStatistisData()
614
     // this.GetPersonQCStatistisData()