陈少旭 před 9 měsíci
rodič
revize
09610a049b

src/xt_pages/Dialysisanalysis/otherIndicators/otheralone.vue → src/xt_pages/Dialysisanalysis/otherIndicators/otherIndicatorsone.vue Zobrazit soubor

@@ -83,9 +83,9 @@
83 83
           <div style="padding-left:10px;flex:1;width:0;">
84 84
             <div class="tableTitle">指标趋势<span style="font-weight:normal">&nbsp;&nbsp;(当前患者: {{patient_name}})</span></div>
85 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 90
             </div>
91 91
             <div class="tableTitle">统计表</div>
@@ -93,32 +93,25 @@
93 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 94
                 <el-table-column label="姓名" align="center">
95 95
                   <template slot-scope="scope">
96
+                    {{scope.row.name}}
96 97
                   </template>
97 98
                 </el-table-column>
98 99
 
99 100
                 <el-table-column width="100" label="检查日期" align="center">
100 101
                   <template slot-scope="scope">
102
+                    {{getTime(scope.row.inspect_date)}}
103
+
101 104
                   </template>
102 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 108
                   <template slot-scope="scope">
109
+                    {{scope.row.value}}
106 110
                   </template>
107 111
                 </el-table-column>
108 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 115
             </div>
123 116
           </div>
124 117
         </el-container>
@@ -130,7 +123,6 @@
130 123
 
131 124
 <script>
132 125
 import echarts from 'echarts'
133
-// import LineChart from '../../qcd/components/LineChart'
134 126
 import {  uParseTime } from '@/utils/tools'
135 127
 import { getCurrentOrgPatients } from '@/api/common/common'
136 128
 import {
@@ -139,9 +131,11 @@ import {
139 131
 import { PostSearch } from '@/api/patient'
140 132
 import { getDataConfig } from '@/utils/data'
141 133
 import { GetPersonQCStatistisData } from '../../../api/qcd'
134
+import LineChart from '../../qcd/components/LineChart.vue'
142 135
 
143 136
 export default {
144 137
   components: {
138
+    LineChart
145 139
   },
146 140
   data() {
147 141
     return {
@@ -365,25 +359,19 @@ export default {
365 359
       for (let i = 0; i < this.tableData.length; i++) {
366 360
         let order = this.tableData[i]
367 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 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 370
         list.push(obj)
383 371
       }
384 372
       import('@/vendor/Export2Excel').then(excel => {
385
-        const tHeader = ['患者姓名', '项目名称', '数量', '单价', '费用', '费用总额']
386
-        const filterVal = ['患者姓名', '项目名称', '数量', '单价', '费用', '费用总额']
373
+        const tHeader = ['姓名', '数值', '日期']
374
+        const filterVal = ['姓名', '数值', '日期']
387 375
         const data = this.formatJson(filterVal, list)
388 376
         excel.export_json_to_excel1({
389 377
           header: tHeader,
@@ -480,7 +468,7 @@ export default {
480 468
       if(val == "" || val == undefined){
481 469
         return ""
482 470
       }else {
483
-        return uParseTime(val, '{y}-{m}-{d} {h}:{i}')
471
+        return uParseTime(val, '{y}-{m}-{d}')
484 472
       }
485 473
     },
486 474
     GetInspectionCheckIndexTableData(params) {
@@ -493,7 +481,12 @@ export default {
493 481
             this.loading = false
494 482
             this.tableData = []
495 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 491
             this.total = resp.data.total
499 492
 
@@ -515,10 +508,14 @@ export default {
515 508
         .then(rs => {
516 509
           var resp = rs.data
517 510
           if (resp.state == 1) {
511
+            console.log(resp.data.inspections)
518 512
             for (let i = 0; i < resp.data.inspections.length; i++) {
519 513
               this.chart.xAxis.data.push(this.getTime(resp.data.inspections[i].inspect_date))
520 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 519
             this.getArrLength(this.chart.xAxis.data,1)
523 520
           } else {
524 521
 
@@ -610,8 +607,8 @@ export default {
610 607
     this.query.patient_id = 0
611 608
     this.query.end_time = year + '-' + month + '-' + day
612 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 612
     this.getCurrentOrgPatients()
616 613
 
617 614
     // this.GetPersonQCStatistisData()