Browse Source

bug修改

XMLWAN 4 years ago
parent
commit
3c6c7d03ba

+ 1 - 1
src/api/common/common.js View File

448
 }
448
 }
449
 
449
 
450
 export function GetQualityControl(params) {
450
 export function GetQualityControl(params) {
451
-  console.log('params', params)
451
+  console.log('params', params)
452
   return request({
452
   return request({
453
     url: '/com/api/getqualitycontrol',
453
     url: '/com/api/getqualitycontrol',
454
     method: 'Get',
454
     method: 'Get',

+ 2 - 2
src/xt_pages/qcd/officesControlAnalysis/project.vue View File

9
         <el-tab-pane label="按项目分组" name="second"></el-tab-pane>
9
         <el-tab-pane label="按项目分组" name="second"></el-tab-pane>
10
       </el-tabs>
10
       </el-tabs>
11
       <div class="cell clearfix">
11
       <div class="cell clearfix">
12
-        <el-select v-model="lapseto" placeholder="请选择" style="width:120px;margin-right:10px" @change="changeOptions">
12
+        <!-- <el-select v-model="lapseto" placeholder="请选择" style="width:120px;margin-right:10px" @change="changeOptions">
13
           <el-option
13
           <el-option
14
             v-for="item in options"
14
             v-for="item in options"
15
             :key="item.value"
15
             :key="item.value"
16
             :label="item.label"
16
             :label="item.label"
17
             :value="item.value"
17
             :value="item.value"
18
           ></el-option>
18
           ></el-option>
19
-        </el-select>
19
+        </el-select> -->
20
         <el-select v-model="type" placeholder="请选择" @change="chooseType" style="margin-right:10px">
20
         <el-select v-model="type" placeholder="请选择" @change="chooseType" style="margin-right:10px">
21
           <el-option
21
           <el-option
22
             v-for="item in options1"
22
             v-for="item in options1"

+ 2 - 2
src/xt_pages/qcd/officesControlAnalysis/time.vue View File

9
         <el-tab-pane label="按项目分组" name="second"></el-tab-pane>
9
         <el-tab-pane label="按项目分组" name="second"></el-tab-pane>
10
       </el-tabs>
10
       </el-tabs>
11
       <div class="cell clearfix">
11
       <div class="cell clearfix">
12
-        <el-select v-model="lapseto" placeholder="请选择" style="width:120px;margin-right:10px" @change="changeLapseto">
12
+        <!-- <el-select v-model="lapseto" placeholder="请选择" style="width:120px;margin-right:10px" @change="changeLapseto">
13
           <el-option
13
           <el-option
14
             v-for="item in options"
14
             v-for="item in options"
15
             :key="item.value"
15
             :key="item.value"
16
             :label="item.label"
16
             :label="item.label"
17
             :value="item.value"
17
             :value="item.value"
18
           ></el-option>
18
           ></el-option>
19
-        </el-select>
19
+        </el-select> -->
20
         <el-select v-model="type" placeholder="请选择" @change="chooseType" style="margin-right:10px">
20
         <el-select v-model="type" placeholder="请选择" @change="chooseType" style="margin-right:10px">
21
           <el-option
21
           <el-option
22
             v-for="item in options1"
22
             v-for="item in options1"

+ 172 - 9
src/xt_pages/qcd/patientComplianceDetails.vue View File

107
                 </div>
107
                 </div>
108
               </div>
108
               </div>
109
             </div>
109
             </div>
110
-            <div class="tableTitle">指标趋势</div>
110
+            <div class="tableTitle">指标趋势
111
+              <span style="font-weight:normal">&nbsp;&nbsp;(当前患者: {{patient_name}})</span>
112
+            </div>
111
             <div class="cell clearfix">
113
             <div class="cell clearfix">
112
               <p class="point"></p>
114
               <p class="point"></p>
113
               <p class="pointTitle">{{itemName}}</p>
115
               <p class="pointTitle">{{itemName}}</p>
114
             </div>
116
             </div>
115
             <div>
117
             <div>
116
-              <line-chart :options="chart"></line-chart>
118
+              <line-chart :options="chart" v-if="rangetype == 1"></line-chart>
119
+               <line-chart1 :options="char2" v-if="rangetype == 2"></line-chart1>
117
             </div>
120
             </div>
118
           </div>
121
           </div>
119
         </el-container>
122
         </el-container>
127
 import echarts from "echarts";
130
 import echarts from "echarts";
128
 import BreadCrumb from "@/xt_pages/components/bread-crumb";
131
 import BreadCrumb from "@/xt_pages/components/bread-crumb";
129
 import LineChart from "../qcd/components/LineChart";
132
 import LineChart from "../qcd/components/LineChart";
133
+import LineChart1 from '../qcd/components/LineChart1'
130
 import { uParseTime } from "@/utils/tools";
134
 import { uParseTime } from "@/utils/tools";
131
  import { PostSearch} from '@/api/patient'
135
  import { PostSearch} from '@/api/patient'
132
 import { getCurrentOrgPatients,GetQualityControl,getNormData,getPatientComplianceDetail } from "@/api/common/common"
136
 import { getCurrentOrgPatients,GetQualityControl,getNormData,getPatientComplianceDetail } from "@/api/common/common"
133
 export default {
137
 export default {
134
   components: {
138
   components: {
135
     LineChart,
139
     LineChart,
136
-    BreadCrumb
140
+    BreadCrumb,
141
+    LineChart1
137
   },
142
   },
138
   data() {
143
   data() {
139
     return {
144
     return {
145
+     patient_name:"",
146
+     rangetype:1,
140
      itemName:"",
147
      itemName:"",
141
      isTrue:0,
148
      isTrue:0,
142
       crumbs: [
149
       crumbs: [
174
       monthType: 0,
181
       monthType: 0,
175
       arr: [],
182
       arr: [],
176
       quality: 0,
183
       quality: 0,
184
+      char2: {
185
+          title: {
186
+            text: 'ECharts 入门示例'
187
+          },
188
+          tooltip: {},
189
+          legend: {
190
+            data: ['次数'],
191
+            left: 0
192
+          },
193
+          xAxis: {
194
+            data: [],
195
+            axisLine: {
196
+              lineStyle: {
197
+                color: '#FF0000',
198
+                width: 8 //这里是为了突出显示加上的
199
+              }
200
+            },
201
+            axisLabel: {
202
+              interval: 0,
203
+              formatter: function(value) {
204
+                var ret = '' //拼接加\n返回的类目项
205
+                var maxLength = 8 //每项显示文字个数
206
+                var valLength = value.length //X轴类目项的文字个数
207
+                var rowN = Math.ceil(valLength / maxLength) //类目项需要换行的行数
208
+                if (rowN > 1) {
209
+                  //如果类目项的文字大于3,
210
+                  for (var i = 0; i < rowN; i++) {
211
+                    var temp = '' //每次截取的字符串
212
+                    var start = i * maxLength //开始截取的位置
213
+                    var end = start + maxLength //结束截取的位置
214
+                    //这里也可以加一个是否是最后一行的判断,但是不加也没有影响,那就不加吧
215
+                    temp = value.substring(start, end) + '\n'
216
+                    ret += temp //凭借最终的字符串
217
+                  }
218
+                  return ret
219
+                } else {
220
+                  return value
221
+                }
222
+              }
223
+            }
224
+          },
225
+          yAxis: {
226
+            axisLabel: {
227
+              formatter: '{value} %'
228
+            },
229
+            show: false,
230
+            axisLine: {
231
+              lineStyle: {
232
+                color: '#00FF00',
233
+                width: 8 //这里是为了突出显示加上的
234
+              }
235
+            }
236
+          },
237
+          series: [
238
+            {
239
+              name: '',
240
+              type: 'line',
241
+              data: [],
242
+              symbol: 'circle',//折线点设置为实心点
243
+              symbolSize: 15,   //折线点的大小
244
+              barWidth: 30,
245
+              label: {
246
+                normal: {
247
+                  show: true,
248
+                  position: "top",
249
+                  formatter: (params) => {
250
+                      let str = ''
251
+                      str = this.otherData[params.dataIndex]
252
+                      return str
253
+
254
+                  }
255
+                }
256
+              },
257
+              //配置样式
258
+              itemStyle: {
259
+                //通常情况下:
260
+
261
+                //每个柱子的颜色即为colorList数组里的每一项,如果柱子数目多于colorList的长度,则柱子颜色循环使用该数组
262
+                normal: {
263
+                  color: (params) => {
264
+                    //我这边就两个柱子,大体就两个柱子颜色渐变,所以数组只有两个值,多个颜色就多个值
265
+                    var colorList = [
266
+                      ['#409EFF','#409EFF'],
267
+                      ['#f56c6c','#f56c6c']
268
+                      ];
269
+                    if(params.seriesName == this.otherData[params.dataIndex]){
270
+                      var index = 0 
271
+                    }else {
272
+                      var index = 1
273
+                    }
274
+                   
275
+
276
+                    // var index = params.dataIndex;
277
+                    // if (params.dataIndex >= colorList.length) {
278
+                    //   index = params.dataIndex % colorList.length;
279
+                    // }
280
+
281
+                    return new echarts.graphic.LinearGradient(0, 0, 0, 1, [
282
+                      {offset: 0, color: colorList[index][0]},
283
+                      // { offset: 0.5, color: colorList[index][1] },
284
+                      {offset: 1, color: colorList[index][1]}
285
+                    ]);
286
+                  },
287
+                  lineStyle: {
288
+                    width:2,
289
+                    color: "#cccccc"//折线的颜色
290
+                  },
291
+                  barBorderRadius: [5, 5, 0, 0] //柱状角成椭圆形
292
+                },
293
+
294
+                //鼠标悬停时:
295
+                emphasis: {
296
+                  shadowBlur: 10,
297
+                  shadowOffsetX: 0,
298
+                  shadowColor: 'rgba(0, 0, 0, 0.2)'
299
+                }
300
+              }
301
+            }
302
+          ]
303
+        },
177
       chart: {
304
       chart: {
178
         title: {
305
         title: {
179
           text: "ECharts 入门示例"
306
           text: "ECharts 入门示例"
255
       },
382
       },
256
       inspect_date:0,
383
       inspect_date:0,
257
       monthActive:0,
384
       monthActive:0,
385
+      otherData:[]
258
     };
386
     };
259
   },
387
   },
260
   methods: {
388
   methods: {
383
     },
511
     },
384
     handleChange(val){
512
     handleChange(val){
385
      this.patientid = val.id
513
      this.patientid = val.id
514
+     this.patient_name = val.name
386
       this.getlistDetail()
515
       this.getlistDetail()
387
     },
516
     },
388
    getCurrentOrgPatients(){
517
    getCurrentOrgPatients(){
392
             for(let i=0;i<patients.length;i++){
521
             for(let i=0;i<patients.length;i++){
393
                if(this.patientid == patients[i].id){
522
                if(this.patientid == patients[i].id){
394
                   this.$refs.singleTable.setCurrentRow(patients[i])
523
                   this.$refs.singleTable.setCurrentRow(patients[i])
524
+                  this.patient_name = patients[i].name
395
                }
525
                }
396
             }
526
             }
397
             this.patientsData = patients
527
             this.patientsData = patients
413
     getlist(){
543
     getlist(){
414
         this.modesData.series = []
544
         this.modesData.series = []
415
         this.modesData.xAxis = []
545
         this.modesData.xAxis = []
546
+        this.char2.xAxis.data = []
547
+        this.char2.series[0].data = []
416
         const startDate = moment().subtract('month', 0).format('YYYY-MM') + '-01'
548
         const startDate = moment().subtract('month', 0).format('YYYY-MM') + '-01'
417
         const endDate = moment(new Date()).format('YYYY-MM-DD')
549
         const endDate = moment(new Date()).format('YYYY-MM-DD')
418
         var now = new Date()
550
         var now = new Date()
435
        GetQualityControl(params).then(response=>{
567
        GetQualityControl(params).then(response=>{
436
           if(response.data.state == 1){
568
           if(response.data.state == 1){
437
             var list = response.data.data.list
569
             var list = response.data.data.list
438
-            console.log("list",list)
570
+            console.log("list是什么",list)
439
             for(let i=0;i<list.length;i++){
571
             for(let i=0;i<list.length;i++){
440
               if(parseInt(list[i].inspect_value)>= parseInt(list[i].range_min) && parseInt(list[i].inspect_value)<= parseInt(list[i].range_max)){
572
               if(parseInt(list[i].inspect_value)>= parseInt(list[i].range_min) && parseInt(list[i].inspect_value)<= parseInt(list[i].range_max)){
441
                     this.isTrue = 1  
573
                     this.isTrue = 1  
443
                if(parseInt(list[i].inspect_value)< parseInt(list[i].range_min) || parseInt(list[i].inspect_value) > parseInt(list[i].range_max)){
575
                if(parseInt(list[i].inspect_value)< parseInt(list[i].range_min) || parseInt(list[i].inspect_value) > parseInt(list[i].range_max)){
444
                     this.isTrue =0
576
                     this.isTrue =0
445
                }
577
                }
446
-              this.modesData.xAxis.push(this.getTime(list[i].inspect_date));
447
-               this.modesData.series.push(list[i].inspect_value)
448
-            
578
+               
579
+              if(list[i].range_type == 1){
580
+                    this.rangetype = 1
581
+                    this.modesData.xAxis.push(this.getTime(list[i].inspect_date));
582
+                    this.modesData.series.push(list[i].inspect_value)
583
+                }
584
+
585
+                if(list[i].range_type == 2){
586
+                   this.rangetype = 2
587
+                   this.otherData.push(list[i].inspect_value)
588
+                   this.char2.series[0].data.push("1")
589
+                  this.char2.xAxis.data.push(this.getTime(list[i].inspect_date))
590
+                  this.char2.series[0].name = list[i].range_value
591
+                }
449
             }
592
             }
450
             this.chart.series[0].data = this.modesData.series
593
             this.chart.series[0].data = this.modesData.series
451
             this.chart.xAxis.data = this.modesData.xAxis
594
             this.chart.xAxis.data = this.modesData.xAxis
458
     getlistDetail(){
601
     getlistDetail(){
459
        this.modesData.series = []
602
        this.modesData.series = []
460
         this.modesData.xAxis = []
603
         this.modesData.xAxis = []
604
+        this.char2.xAxis.data = []
605
+        this.char2.series[0].data = []
461
         const startDate = moment().subtract('month', 0).format('YYYY-MM') + '-01'
606
         const startDate = moment().subtract('month', 0).format('YYYY-MM') + '-01'
462
         const endDate = moment(new Date()).format('YYYY-MM-DD')
607
         const endDate = moment(new Date()).format('YYYY-MM-DD')
463
 
608
 
490
                 if(parseInt(list[i].inspect_value)< parseInt(list[i].range_min) || parseInt(list[i].inspect_value) > parseInt(list[i].range_max)){
635
                 if(parseInt(list[i].inspect_value)< parseInt(list[i].range_min) || parseInt(list[i].inspect_value) > parseInt(list[i].range_max)){
491
                       this.isTrue =0
636
                       this.isTrue =0
492
                 }
637
                 }
493
-                this.modesData.xAxis.push(this.getTime(list[i].inspect_date));
494
-                this.modesData.series.push(list[i].inspect_value)
638
+
639
+                if(list[i].range_type == 1){
640
+                    this.rangetype = 1
641
+                    this.modesData.xAxis.push(this.getTime(list[i].inspect_date));
642
+                    this.modesData.series.push(list[i].inspect_value)
643
+                }
644
+
645
+                if(list[i].range_type == 2){
646
+                   this.rangetype = 2
647
+                   this.otherData.push(list[i].inspect_value)
648
+                   this.char2.series[0].data.push("1")
649
+                  this.char2.xAxis.data.push(this.getTime(list[i].inspect_date))
650
+                  this.char2.series[0].name = list[i].range_value
651
+                }
652
+              
495
             
653
             
496
             }
654
             }
497
               this.chart.series[0].data = this.modesData.series
655
               this.chart.series[0].data = this.modesData.series
519
         console.log("val",val)
677
         console.log("val",val)
520
         this.listQuery.search = val.name
678
         this.listQuery.search = val.name
521
         this.patientid = val.id
679
         this.patientid = val.id
680
+        for(let i=0;i<this.patientsData.length;i++){
681
+          if(val.id == this.patientsData[i].id){
682
+            this.$refs.singleTable.setCurrentRow(this.patientsData[i])
683
+          }
684
+         }
522
         this.getlistDetail()
685
         this.getlistDetail()
523
       },
686
       },
524
   },
687
   },

+ 8 - 16
src/xt_pages/qcd/patientControlAnalysis.vue View File

25
 
25
 
26
             </el-form-item>
26
             </el-form-item>
27
           </el-form>
27
           </el-form>
28
-          <el-select v-model="lapstor" placeholder="请选择" style="margin-right:20px;width:100px">
28
+          <!-- <el-select v-model="lapstor" placeholder="请选择" style="margin-right:20px;width:100px">
29
             <el-option
29
             <el-option
30
               v-for="item in options"
30
               v-for="item in options"
31
               :key="item.value"
31
               :key="item.value"
32
               :label="item.label"
32
               :label="item.label"
33
               :value="item.value"
33
               :value="item.value"
34
             ></el-option>
34
             ></el-option>
35
-          </el-select>
35
+          </el-select> -->
36
           <label class="title">
36
           <label class="title">
37
             <span class="name">日期查询</span> :
37
             <span class="name">日期查询</span> :
38
           </label>
38
           </label>
257
               },
257
               },
258
 
258
 
259
               //鼠标悬停时:
259
               //鼠标悬停时:
260
-              emphasis: {
261
-                shadowBlur: 10,
262
-                shadowOffsetX: 0,
263
-                shadowColor: "rgba(0, 0, 0, 0.2)"
264
-              }
260
+              // emphasis: {
261
+              //   shadowBlur: 10,
262
+              //   shadowOffsetX: 0,
263
+              //   shadowColor: "rgba(0, 0, 0, 0.2)"
264
+              // }
265
             }
265
             }
266
           }
266
           }
267
         ]
267
         ]
649
        getCartogramlist(this.lapstor,this.listQuery.start_time,this.listQuery.end_time,this.limit,this.page).then(response=>{
649
        getCartogramlist(this.lapstor,this.listQuery.start_time,this.listQuery.end_time,this.limit,this.page).then(response=>{
650
            if(response.data.state == 1){
650
            if(response.data.state == 1){
651
               var cartogramlist =  response.data.data.cartogramlist
651
               var cartogramlist =  response.data.data.cartogramlist
652
-              // console.log("cartogramlist",cartogramlist)
652
+               console.log("cartogramlist",cartogramlist)
653
               var totaltwo =  response.data.data.total
653
               var totaltwo =  response.data.data.total
654
               // console.log("totaltwo",totaltwo)
654
               // console.log("totaltwo",totaltwo)
655
               var infectiouscontrol =  response.data.data.infectiouscontrol
655
               var infectiouscontrol =  response.data.data.infectiouscontrol
667
                    }
667
                    }
668
                 }
668
                 }
669
               }
669
               }
670
-            //  console.log("cart",cart)
671
-
672
-              //  for(let i=0;i<cartogramlist.length;i++){
673
-              //     if(cartogramlist[i].inspect_value != ''){
674
-              //       cart.push(cartogramlist[i])
675
-              //     }
676
-              //  }
677
-              // console.log("cart",cart)
678
                let dataInfo = {}
670
                let dataInfo = {}
679
                 cart.forEach((item, index) => {
671
                 cart.forEach((item, index) => {
680
                   let { patient_id } = item
672
                   let { patient_id } = item

+ 2 - 2
src/xt_pages/qcd/treatmentControlAnalysis/components/TimeAll.vue View File

1
 <template>
1
 <template>
2
   <div class="page_timeAll">
2
   <div class="page_timeAll">
3
     <div class="cell clearfix">
3
     <div class="cell clearfix">
4
-      <el-select
4
+      <!-- <el-select
5
         v-model="listQuery.value"
5
         v-model="listQuery.value"
6
         placeholder="请选择"
6
         placeholder="请选择"
7
         style="width:120px;margin-right:20px"
7
         style="width:120px;margin-right:20px"
13
           :label="item.label"
13
           :label="item.label"
14
           :value="item.value"
14
           :value="item.value"
15
         ></el-option>
15
         ></el-option>
16
-      </el-select>
16
+      </el-select> -->
17
       <label class="title">
17
       <label class="title">
18
         <span class="name">日期查询</span> :
18
         <span class="name">日期查询</span> :
19
       </label>
19
       </label>