See999 4 years ago
parent
commit
b7a5f6c14a

+ 32 - 1
src/xt_pages/qcd/treatmentControlAnalysis/components/CheckPersonal.vue View File

@@ -110,7 +110,18 @@ export default {
110 110
               normal: {
111 111
                 show: true,
112 112
                 position: "top",
113
-                formatter: "{c}次"
113
+                formatter: (params) => {
114
+                  if(this.obj.length > 0){
115
+                      let str = ''
116
+                      str = params.data +'次' + '\n(参考值'+ this.obj[params.dataIndex] +'次)'
117
+                      console.log(str)
118
+                    return str
119
+                  }else{
120
+                    let str = ''
121
+                    str = params.data+'次'
122
+                    return str
123
+                  }
124
+                }
114 125
               }
115 126
             },
116 127
             //配置样式
@@ -168,6 +179,7 @@ export default {
168 179
         xAxis: [],
169 180
         series: []
170 181
       },
182
+      obj:[]
171 183
     };
172 184
   },
173 185
   methods: {
@@ -230,6 +242,7 @@ export default {
230 242
                 this.modesData.series.push(0);
231 243
               }
232 244
             }
245
+            
233 246
             this.chart.series[0].data = this.modesData.series
234 247
             this.chart.xAxis.data = this.modesData.xAxis
235 248
             console.log(2222,this.modesData)
@@ -239,6 +252,8 @@ export default {
239 252
 
240 253
     //获取单个病人数据
241 254
     handleChange(val){
255
+      this.modesData.series = []
256
+      this.modesData.xAxis = []
242 257
        getInspectionDetailById(val.id,this.listQuery.start_time,this.listQuery.end_time).then(response=>{
243 258
           if(response.data.state === 1){
244 259
             var patientdetail = response.data.data.patientdetail
@@ -252,6 +267,22 @@ export default {
252 267
               }
253 268
             }
254 269
             console.log("arr",arr)
270
+           let time = new Date(this.listQuery.end_time) - new Date(this.listQuery.start_time)
271
+           let day = parseInt(time / (1000 * 60 * 60 * 24))
272
+           console.log("time",parseInt(time / (1000 * 60 * 60 * 24)))
273
+            for (const key in this.tableData) {
274
+              this.modesData.xAxis.push(this.tableData[key].project_name);
275
+              if (key in arr) {
276
+                this.modesData.series.push(parseInt(arr[key].Count));
277
+                this.obj.push(Math.round(day / arr[key].InspectionFrequency))
278
+                // batotal += parseInt(res[key].Count);
279
+              } else {
280
+                this.modesData.series.push(0);
281
+                this.obj.push(0)
282
+              }
283
+            }
284
+            this.chart.series[0].data = this.modesData.series
285
+            this.chart.xAxis.data = this.modesData.xAxis
255 286
           }
256 287
        })
257 288
     },

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

@@ -254,6 +254,8 @@ export default {
254 254
      this.geStatistics()
255 255
    },
256 256
     geStatistics(){
257
+      this.modesData.series = []
258
+      this.modesData.xAxis = []
257 259
       geStatistics(this.listQuery).then(response=>{
258 260
         if(response.data.state === 1){
259 261
           var dtd =  response.data.data.statistics