Browse Source

Merge branch 'vue_statistics_branch' of http://git.shengws.com/csx/Vue_New into vue_statistics_branch

XMLWAN 4 years ago
parent
commit
92addd22f9

+ 33 - 1
src/xt_pages/qcd/treatmentControlAnalysis/components/CheckAll.vue View File

133
                  }
133
                  }
134
               }
134
               }
135
             }
135
             }
136
+            // let projectArr = []
137
+            // this.newArr.map(item => {
138
+            //   projectArr.push(item.project_name)
139
+            // })
140
+            // console.log("projectArr",projectArr)
141
+            // projectArr.forEach((item,index) => {
142
+            //   if(!(arr[index] && item == arr[index].ProjectName)){
143
+            //     arr.splice(index,0,{Count:0, ProjectName: item,name: val.name})
144
+            //   }
145
+            // })
146
+            // this.tableData = []
147
+            // let obj = {}
148
+            // obj.name = val.name
149
+            // obj.data = arr
150
+            // this.tableData.push(obj)
136
             console.log("arr",arr)
151
             console.log("arr",arr)
137
           }
152
           }
138
       })
153
       })
291
       })
306
       })
292
     },
307
     },
293
     handleChange(val){
308
     handleChange(val){
309
+      console.log(1111111111,val)
294
       getPatientDetailCheck(val.id,this.listQuery.start_time,this.listQuery.end_time).then(response=>{
310
       getPatientDetailCheck(val.id,this.listQuery.start_time,this.listQuery.end_time).then(response=>{
295
           if(response.data.state === 1){
311
           if(response.data.state === 1){
296
             var checkDetail =  response.data.data.checkDetail
312
             var checkDetail =  response.data.data.checkDetail
303
                  }
319
                  }
304
               }
320
               }
305
             }
321
             }
306
-            console.log("arr",arr)
322
+            let projectArr = []
323
+            this.newArr.map(item => {
324
+              projectArr.push(item.project_name)
325
+            })
326
+            console.log("projectArr",projectArr)
327
+            projectArr.forEach((item,index) => {
328
+              if(!(arr[index] && item == arr[index].ProjectName)){
329
+                arr.splice(index,0,{Count:0, ProjectName: item,name: val.name})
330
+              }
331
+            })
332
+            this.tableData = []
333
+            let obj = {}
334
+            obj.name = val.name
335
+            obj.data = arr
336
+            this.tableData.push(obj)
337
+            this.total = 1
338
+            console.log("arr",this.tableData)
307
           }
339
           }
308
       })
340
       })
309
     },
341
     },

+ 21 - 7
src/xt_pages/qcd/treatmentControlAnalysis/components/CheckPersonal.vue View File

237
              item.Count = eval(item.Count.join('+'))
237
              item.Count = eval(item.Count.join('+'))
238
             })
238
             })
239
             console.log(11111,res)
239
             console.log(11111,res)
240
+            let arr1 = []
241
+            this.tableData.map(it => {
242
+              arr1.push(it.project_name)
243
+            })
240
 
244
 
241
-          
245
+            arr1.forEach((item,index)=>{
246
+              if(!(res[index] && item ==res[index].ProjectName)){
247
+                res.splice(index,0,{Count:0, ProjectName: item, Sort: index+1})
248
+              }
249
+            })
250
+            res.map(item => {
251
+              this.modesData.series.push(parseInt(item.Count));
252
+            })
242
 
253
 
243
 
254
 
244
             for (const key in this.tableData) {
255
             for (const key in this.tableData) {
245
               this.modesData.xAxis.push(this.tableData[key].project_name);
256
               this.modesData.xAxis.push(this.tableData[key].project_name);
246
-              if (key in res) {
247
-                this.modesData.series.push(parseInt(res[key].Count));
248
-                // batotal += parseInt(res[key].Count);
249
-              } else {
250
-                this.modesData.series.push(0);
251
-              }
257
+              // if (key in res) {
258
+                
259
+              //   this.modesData.series.push(parseInt(res[key].Count));
260
+              //   // batotal += parseInt(res[key].Count);
261
+              // } else {
262
+              //   this.modesData.series.push(0);
263
+              // }
252
             }
264
             }
265
+
266
+
253
             
267
             
254
             this.chart.series[0].data = this.modesData.series
268
             this.chart.series[0].data = this.modesData.series
255
             this.chart.xAxis.data = this.modesData.xAxis
269
             this.chart.xAxis.data = this.modesData.xAxis