Просмотр исходного кода

新增检测及时数据统计,减少描述文字

cyy 2 лет назад
Родитель
Сommit
1ddb6bc4ae

+ 5 - 5
src/views/statistics/index.vue

@@ -163,15 +163,15 @@
         <div class="congxiebox7" v-if="pageOT">
         <div class="congxiebox7" v-if="pageOT">
           <div class="ttitle" style="text-align: center;">质量目标统计</div>
           <div class="ttitle" style="text-align: center;">质量目标统计</div>
           <div class="componentsData" v-if="relOf">
           <div class="componentsData" v-if="relOf">
-              <s1zhiLiangMuBiao :height="'290%'" :width="static=='row' ? '20%': '100%'" :colorw = "colorw" :mubiao = "quality[0].val"
+              <s1zhiLiangMuBiao :height="'290%'" :width="static=='row' ? '22%': '100%'" :colorw = "colorw" :mubiao = "quality[0].val"
               v-if="showAll || showComponents[1]" :data = "getS1renwu()"/>
               v-if="showAll || showComponents[1]" :data = "getS1renwu()"/>
-              <s1jianCe :height="'290%'" :width="static=='row' ? '20%': '100%'" :colorw = "colorw" :mubiao = "quality[1].val"
+              <s1jianCe :height="'290%'" :width="static=='row' ? '19.5%': '100%'" :colorw = "colorw" :mubiao = "quality[1].val"
               v-if="showAll || showComponents[5]" :data = "getS2jianCe()" />
               v-if="showAll || showComponents[5]" :data = "getS2jianCe()" />
-              <s2manYiDu :height="'290%'" :width="static=='row' ? '20%': '100%'" :colorw = "colorw" :mubiao = "quality[2].val"
+              <s2manYiDu :height="'290%'" :width="static=='row' ? '19.5%': '100%'" :colorw = "colorw" :mubiao = "quality[2].val"
               v-if="showAll || showComponents[7]"  :data = "getS2manYiDu()"/>
               v-if="showAll || showComponents[7]"  :data = "getS2manYiDu()"/>
-              <s3tousu :height="'290%'" :width="static=='row' ? '20%': '100%'" :colorw = "colorw" :mubiao = "quality[3].val"
+              <s3tousu :height="'290%'" :width="static=='row' ? '19.5%': '100%'" :colorw = "colorw" :mubiao = "quality[3].val"
               v-if="showAll || showComponents[6]" :data = "getS3tousu()"/>
               v-if="showAll || showComponents[6]" :data = "getS3tousu()"/>
-              <s13shengWu :height="'290%'" :width="static=='row' ? '20%': '100%'" :colorw = "colorw" :mubiao = "quality[4].val"
+              <s13shengWu :height="'290%'" :width="static=='row' ? '19.5%': '100%'" :colorw = "colorw" :mubiao = "quality[4].val"
               v-if="showAll || showComponents[17]" :data = "getS3tousu()"/>
               v-if="showAll || showComponents[17]" :data = "getS3tousu()"/>
               <div class="clear"></div>
               <div class="clear"></div>
           </div>
           </div>

+ 2 - 2
src/views/statistics/item/s10waiBuNengLi.vue

@@ -109,8 +109,8 @@
                 formatter: '{b}: {d}%'
                 formatter: '{b}: {d}%'
               },
               },
               data: [
               data: [
-                { value: this.data.Num.valna, name: '能力验证完成率' },
-                { value: e, name: '能力验证未完成率' }
+                { value: this.data.Num.valna, name: '完成率' },
+                { value: e, name: '未完成率' }
               ],
               ],
               emphasis: {
               emphasis: {
                 itemStyle: {
                 itemStyle: {

+ 2 - 2
src/views/statistics/item/s11biaoZhunWu.vue

@@ -107,8 +107,8 @@
                 formatter: '{b}: {d}%'
                 formatter: '{b}: {d}%'
               },
               },
               data: [
               data: [
-                { value: this.data.Num.valna, name: '标准物质期间核查完成率' },
-                { value: e, name: '标准物质期间核查未完成率' }
+                { value: this.data.Num.valna, name: '完成率' },
+                { value: e, name: '未完成率' }
               ],
               ],
               emphasis: {
               emphasis: {
                 itemStyle: {
                 itemStyle: {

+ 2 - 2
src/views/statistics/item/s12fengXian.vue

@@ -99,8 +99,8 @@
                 formatter: '{b}: {d}%'
                 formatter: '{b}: {d}%'
               },
               },
               data: [
               data: [
-                { value: this.data.t_mjsyshdfxsbykzjhxbNum.res[0], name: '风险控制已完成率' },
-                { value: e, name: '风险控制未完成率' }
+                { value: this.data.t_mjsyshdfxsbykzjhxbNum.res[0], name: '完成率' },
+                { value: e, name: '未完成率' }
               ],
               ],
               emphasis: {
               emphasis: {
                 itemStyle: {
                 itemStyle: {

+ 2 - 2
src/views/statistics/item/s13shengWu.vue

@@ -104,8 +104,8 @@
                 formatter: '{b}: {d}%'
                 formatter: '{b}: {d}%'
               },
               },
               data: [
               data: [
-                { value: this.data.t_complaintNum.res1[0], name: '投诉回复及时率' },
-                { value: e, name: '投诉回复不及时率' }
+                { value: this.data.t_complaintNum.res1[0], name: '及时率' },
+                { value: e, name: '不及时率' }
               ],
               ],
               emphasis: {
               emphasis: {
                 itemStyle: {
                 itemStyle: {

+ 2 - 2
src/views/statistics/item/s14bufuhexiang.vue

@@ -99,8 +99,8 @@
                 formatter: '{b}: {d}%'
                 formatter: '{b}: {d}%'
               },
               },
               data: [
               data: [
-                { value: this.data.t_bfhxbgyjzcsjlbxNum.res[0], name: '不符合项完成率' },
-                { value: e, name: '不符合项未完成率' }
+                { value: this.data.t_bfhxbgyjzcsjlbxNum.res[0], name: '完成率' },
+                { value: e, name: '未完成率' }
               ],
               ],
               emphasis: {
               emphasis: {
                 itemStyle: {
                 itemStyle: {

+ 2 - 2
src/views/statistics/item/s15tousu.vue

@@ -108,8 +108,8 @@
                 formatter: '{b}: {d}%'
                 formatter: '{b}: {d}%'
               },
               },
               data: [
               data: [
-                { value: this.data.t_complaintNum.res2[0], name: '投诉已完成率' },
-                { value: e, name: '投诉未完成率' }
+                { value: this.data.t_complaintNum.res2[0], name: '完成率' },
+                { value: e, name: '未完成率' }
               ],
               ],
               emphasis: {
               emphasis: {
                 itemStyle: {
                 itemStyle: {

+ 2 - 2
src/views/statistics/item/s16bzJunZhu.vue

@@ -107,8 +107,8 @@
                 formatter: '{b}: {d}%'
                 formatter: '{b}: {d}%'
               },
               },
               data: [
               data: [
-                { value: this.data.Num.valna, name: '标准菌株期间核查完成率' },
-                { value: e, name: '标准菌株期间核查未完成率' }
+                { value: this.data.Num.valna, name: '完成率' },
+                { value: e, name: '未完成率' }
               ],
               ],
               emphasis: {
               emphasis: {
                 itemStyle: {
                 itemStyle: {

+ 2 - 2
src/views/statistics/item/s17bzXiBao.vue

@@ -107,8 +107,8 @@
                 formatter: '{b}: {d}%'
                 formatter: '{b}: {d}%'
               },
               },
               data: [
               data: [
-                { value: this.data.Num.valna, name: '标准细胞期间核查完成率' },
-                { value: e, name: '标准细胞质期间核查未完成率' }
+                { value: this.data.Num.valna, name: '完成率' },
+                { value: e, name: '未完成率' }
               ],
               ],
               emphasis: {
               emphasis: {
                 itemStyle: {
                 itemStyle: {

+ 2 - 2
src/views/statistics/item/s1jianCe.vue

@@ -112,8 +112,8 @@
                 formatter: '{b}: {d}%'
                 formatter: '{b}: {d}%'
               },
               },
               data: [
               data: [
-                { value: this.data.t_mjjcbgNum.res[0], name: '检测报告差错率' },
-                { value: e, name: '检测报告正确率' }
+                { value: this.data.t_mjjcbgNum.res[0], name: '差错率' },
+                { value: e, name: '正确率' }
               ],
               ],
               emphasis: {
               emphasis: {
                 itemStyle: {
                 itemStyle: {

+ 7 - 3
src/views/statistics/item/s1zhiLiangMuBiao.vue

@@ -87,6 +87,8 @@
           // barData.push(e)
           // barData.push(e)
         // }
         // }
         let e = 100 -this.data.t_jchzbNum.res[0]
         let e = 100 -this.data.t_jchzbNum.res[0]
+        let n = 100 -this.data.t_jchzbNum.res[1]
+        let d = 100 -this.data.t_jchzbNum.res[2]
         let option = {
         let option = {
           title: {
           title: {
             text: this.title,
             text: this.title,
@@ -97,7 +99,7 @@
           tooltip: {
           tooltip: {
             trigger: 'item'
             trigger: 'item'
           },
           },
-          color:['#ffcc00','#66cc66'],
+          color:['#ffcc00','#66cc66','#999999'],
           series: [
           series: [
             {
             {
               type: 'pie',
               type: 'pie',
@@ -106,8 +108,10 @@
                 formatter: '{b}: {d}%'
                 formatter: '{b}: {d}%'
               },
               },
               data: [
               data: [
-                { value: this.data.t_jchzbNum.res[0], name: '检测任完成率' },
-                { value: e, name: '检测任务未完成率' }
+                { value: this.data.t_jchzbNum.res[0], name: '及时完成率' },
+                { value: this.data.t_jchzbNum.res[1], name: '未及时完成率' },
+                { value: this.data.t_jchzbNum.res[2], name: '未完成率' },
+                // { value: e, name: '未完成率' }
               ],
               ],
               emphasis: {
               emphasis: {
                 itemStyle: {
                 itemStyle: {

+ 29 - 268
src/views/statistics/item/s1zhiLiangMuBiaoCol.vue

@@ -69,131 +69,9 @@
       },
       },
       drawLine(){
       drawLine(){
         let s5zhiLiangMuBiao = echarts.init(document.getElementById(this.id))
         let s5zhiLiangMuBiao = echarts.init(document.getElementById(this.id))
-
-        // let data1 = [];
-        // data1.push(0);
-        // data1.push(0);
-        // let data2 = [];
-        // data2.push(83);
-        // data2.push(90);
-        // let data3 = [];
-        // data3.push(70);
-        // data3.push(60);
-        // let data4 = [];
-        // data4.push(2021);
-        // data4.push(2022);
-        // const posList = [
-        //   'left',
-        //   'right',
-        //   'top',
-        //   'bottom',
-        //   'inside',
-        //   'insideTop',
-        //   'insideLeft',
-        //   'insideRight',
-        //   'insideBottom',
-        //   'insideTopLeft',
-        //   'insideTopRight',
-        //   'insideBottomLeft',
-        //   'insideBottomRight'
-        // ];
-        // app.configParameters = {
-        //   rotate: {
-        //     min: -90,
-        //     max: 90
-        //   },
-        //   align: {
-        //     options: {
-        //       left: 'left',
-        //       center: 'center',
-        //       right: 'right'
-        //     }
-        //   },
-        //   verticalAlign: {
-        //     options: {
-        //       top: 'top',
-        //       middle: 'middle',
-        //       bottom: 'bottom'
-        //     }
-        //   },
-        //   position: {
-        //     options: posList.reduce(function (map, pos) {
-        //       map[pos] = pos;
-        //       return map;
-        //     }, {})
-        //   },
-        //   distance: {
-        //     min: 0,
-        //     max: 100
-        //   }
-        // };
-        // app.config = {
-        //   rotate: 90,
-        //   align: 'left',
-        //   verticalAlign: 'center',
-        //   position: 'bottom',
-        //   distance: 0,
-        //   onChange: function () {
-        //     const labelOption = {
-        //       rotate: app.config.rotate,
-        //       align: app.config.align,
-        //       verticalAlign: app.config.verticalAlign,
-        //       position: app.config.position,
-        //       distance: app.config.distance,
-        //       color:'#FE8463'
-        //     };
-        //     myChart.setOption({
-        //       series: [
-        //         {
-        //           label: labelOption
-        //         },
-        //         {
-        //           label: labelOption
-        //         },
-        //         {
-        //           label: labelOption
-        //         },
-        //         {
-        //           label: labelOption
-        //         }
-        //       ]
-        //     });
-        //   }
-        // };
-        // const labelOption = {
-        //   show: true,
-        //   position: app.config.position,
-        //   distance: app.config.distance,
-        //   align: app.config.align,
-        //   verticalAlign: app.config.verticalAlign,
-        //   rotate: app.config.rotate,
-        //   formatter: '{c}  {name|{a}}',
-        //   fontSize: 14,
-        //   rich: {
-        //       name: {
-        //           textBorderColor: '#fff'
-        //       }
-        //   },
-        //   color:'#FE8463'
-        // };
-        // let barData = []
-        // for (let i = 0; i < this.data.t_jchzbNum.date.length; i++) {
-        //   let e=[this.data.t_jchzbNum.date[i],this.data.t_jchzbNum.number[i],this.data.t_jchzbNum.numberAll[i]]
-        //   barData.push(e)
-        // }
-        // }
-
-        // let barData = []
-        // for (let i = 0; i < this.data.t_jchzbNum.date.length; i++) {
-          let e=[]
-          e=[this.data.t_jchzbNum.numberAll[0],this.data.t_jchzbNum.number[0]]
-          // if (this.data.t_jchzbNum.numberAll[i]===0) {
-          //   e =[this.data.t_jchzbNum.date[i], 0]
-          // } else {
-          //   e =[this.data.t_jchzbNum.date[i], Math.floor(this.data.t_jchzbNum.number[i]/this.data.t_jchzbNum.numberAll[i] * 10000) / 100]
-          // }
-          // barData.push(e)
-        // }
+        let e=[]
+        e=[this.data.t_jchzbNum.numberAll[0],this.data.t_jchzbNum.number[0],this.data.t_jchzbNum.number1[0],this.data.t_jchzbNum.number2[0]]
+      
         let option = {
         let option = {
           //v3
           //v3
           legend: {},
           legend: {},
@@ -202,17 +80,35 @@
               axisPointer: {
               axisPointer: {
                 type: 'shadow'
                 type: 'shadow'
               },
               },
-              // formatter: function (params) {
-              //   return params[0].data[0] + '<br/>满意份数:' + params[0].data[1] + '<br/>调查总份数: ' + params[0].data[2];
-              // }
             },
             },
-            // dataset: {
-            //   source: barData
-            // },
             xAxis: { 
             xAxis: { 
               type: 'category',
               type: 'category',
               // data:['按时完成数', '有效任务数', '及时完成率']
               // data:['按时完成数', '有效任务数', '及时完成率']
-              data:['有效检测任务总数', '按时完成的检测项目数量数量']
+              data:['有效检测任务总数', '及时完成的检测项目数量','未及时完成的检测项目数量','未完成的检测项目数量'],
+              axisLabel: {  
+                interval: 0,  
+                formatter:function(value){  
+                    var ret = "";//拼接加\n返回的类目项  
+                    var maxLength = 5;//每项显示文字个数  
+                    var valLength = value.length;//X轴类目项的文字个数  
+                    var rowN = Math.ceil(valLength / maxLength); //类目项需要换行的行数  
+                    if (rowN > 1)//如果类目项的文字大于5,  
+                    {  
+                        for (var i = 0; i < rowN; i++) {  
+                            var temp = "";//每次截取的字符串  
+                            var start = i * maxLength;//开始截取的位置  
+                            var end = start + maxLength;//结束截取的位置  
+                      //这里也可以加一个是否是最后一行的判断,但是不加也没有影响,那就不加吧  
+                            temp = value.substring(start, end) + "\n";  
+                            ret += temp; //凭借最终的字符串  
+                        }  
+                        return ret;  
+                    }  
+                    else {  
+                        return value;  
+                    }  
+                }  
+            } 
 
 
             },
             },
             yAxis: [
             yAxis: [
@@ -220,24 +116,9 @@
                 type: 'value',
                 type: 'value',
                 scale: true,
                 scale: true,
                 name: '数量',
                 name: '数量',
-                max: this.data.t_jchzbNum.number[0]>this.data.t_jchzbNum.numberAll[0]?this.data.t_jchzbNum.number[0]+1:this.data.t_jchzbNum.numberAll[0]+1,
                 min: 0,
                 min: 0,
-                // boundaryGap: [0.2, 0.2]
               },
               },
-              // {
-              //   type: 'value',
-              //   scale: true,
-              //   name: '任务及时完成率',
-              //   max: this.data.t_jchzbNum.res[0],
-              //   min: 0,
-              //   axisLabel: {
-              //     formatter: '{value} %'
-              //   }
-              // }
             ],
             ],
-            // Declare several bar series, each will be mapped
-            // to a column of dataset.source by default.
-            // series: [{ type: 'bar' }],
             series: [
             series: [
               {
               {
                 data: e,
                 data: e,
@@ -262,128 +143,8 @@
             title: {
             title: {
               text: this.title,
               text: this.title,
               textStyle:{ fontSize:14,color: this.colorw }
               textStyle:{ fontSize:14,color: this.colorw }
-
-              // subtext: "        "+beingDate+"-"+endDate
             },
             },
-          //v2
-          //  legend: {},
-          //   tooltip: {
-          //     trigger: 'axis',
-          //     axisPointer: {
-          //       type: 'shadow'
-          //     },
-          //     formatter: function (params) {
-          //       return params[0].data[0] + '<br/>任务完成率:' + params[0].data[1];
-          //     }
-          //   },
-          //   dataset: {
-          //     source: barData
-          //   },
-          //   xAxis: { type: 'category' },
-          //   yAxis: {
-          //     type: 'value',
-          //     axisLabel: {
-          //       show: true,
-          //       textStyle:{color:'#000'},
-          //       interval: 'auto',
-          //       formatter: '{value} %'
-          //     },
-            
-          //   },
-          //   // Declare several bar series, each will be mapped
-          //   // to a column of dataset.source by default.
-          //   series: [{ type: 'bar',barWidth:50}],
-          //   grid: {
-          //     top: '20%',
-          //     left: '3%',
-          //     right: '4%',
-          //     bottom: '10%',
-          //     containLabel: true
-          //   },
-          //   title: {
-          //     text: this.title,
-          //     subtext: "        "+this.data.t_jchzbNum.date[0]+"-"+this.data.t_jchzbNum.date[this.data.t_jchzbNum.date.length-1]
-          //   },
-
-          //v1
-          // grid: {
-          //   top: '20%',
-          //   left: '3%',
-          //   right: '4%',
-          //   bottom: '10%',
-          //   containLabel: true
-          // },
-          // title: {
-          //   text: this.title,
-          //   subtext: "2021-2022年质量检测目标"
-          // },
-          // color : [
-          //   '#FE8463','#9BCA63','#FCCE10','#E87C25','#27727B',
-          //   '#FE8463','#9BCA63','#FAD860','#F3A43B','#60C0DD',
-          //   '#D7504B','#C6E579','#F4E001','#F0805A','#26C0C0'
-          // ],
-          // tooltip: {
-          //   trigger: 'axis',
-          //   axisPointer: {
-          //     type: 'shadow'
-          //   },
-          //   formatter: function (datas) {
-          //     var res='投诉处理率:'+datas[0].value+"%<BR>"
-          //     res+='满意度:'+datas[1].value+"%<BR>"
-          //     res+='培训完成率:'+datas[2].value+"%"
-          //     return res
-          //   }
-          // },
-          // legend: {show:false},
-          // xAxis: [
-          //   {
-          //     type: 'category',
-          //     axisTick: { show: false },
-          //     data: data4,
-          //     textStyle:{color:'#FE8463'},
-          //   }
-          // ],
-          // yAxis: [
-          //   {
-          //     type: 'value',
-          //     axisLabel: {
-          //       show: true,
-          //       textStyle:{color:'#000'},
-          //       interval: 'auto',
-          //       formatter: '{value} %'
-          //     },
-          //   }
-          // ],
-          // series: [
-          //   {
-          //     name: '投诉处理率',
-          //     type: 'bar',
-          //     barGap: 0,
-          //     label: labelOption,
-          //     emphasis: {
-          //       focus: 'series'
-          //     },
-          //     data: data1
-          //   },
-          //   {
-          //     name: '满意度',
-          //     type: 'bar',
-          //     label: labelOption,
-          //     emphasis: {
-          //       focus: 'series'
-          //     },
-          //     data:data2
-          //   },
-          //   {
-          //     name: '培训完成率',
-          //     type: 'bar',
-          //     label: labelOption,
-          //     emphasis: {
-          //       focus: 'series'
-          //     },
-          //     data:data3
-          //   }
-          // ]
+          
         };
         };
         option && s5zhiLiangMuBiao.setOption(option);
         option && s5zhiLiangMuBiao.setOption(option);
       }
       }

+ 2 - 2
src/views/statistics/item/s2manYiDu.vue

@@ -120,8 +120,8 @@
                 formatter: '{b}: {d}%'
                 formatter: '{b}: {d}%'
               },
               },
               data: [
               data: [
-                { value: this.data.t_khmydtjbNum.res[0], name: '客户满意率' },
-                { value: e, name: '客户不满意率' }
+                { value: this.data.t_khmydtjbNum.res[0], name: '满意率' },
+                { value: e, name: '不满意率' }
               ],
               ],
               emphasis: {
               emphasis: {
                 itemStyle: {
                 itemStyle: {

+ 2 - 2
src/views/statistics/item/s3tousu.vue

@@ -113,8 +113,8 @@
                 formatter: '{b}: {d}%'
                 formatter: '{b}: {d}%'
               },
               },
               data: [
               data: [
-                { value: this.data.t_complaintNum.res[0], name: '客户投诉率' },
-                { value: e, name: '客户未投诉率' }
+                { value: this.data.t_complaintNum.res[0], name: '投诉率' },
+                { value: e, name: '未投诉率' }
               ],
               ],
               emphasis: {
               emphasis: {
                 itemStyle: {
                 itemStyle: {

+ 2 - 2
src/views/statistics/item/s4renYuanPeiXun.vue

@@ -93,8 +93,8 @@
                 formatter: '{b}: {d}%'
                 formatter: '{b}: {d}%'
               },
               },
               data: [
               data: [
-                { value: this.data.t_ryywpxjlNum.res[0], name: '培训完成率' },
-                { value: e, name: '培训未完成率' }
+                { value: this.data.t_ryywpxjlNum.res[0], name: '完成率' },
+                { value: e, name: '未完成率' }
               ],
               ],
               emphasis: {
               emphasis: {
                 itemStyle: {
                 itemStyle: {

+ 2 - 2
src/views/statistics/item/s5renYuanJianDu.vue

@@ -92,8 +92,8 @@
                 formatter: '{b}: {d}%'
                 formatter: '{b}: {d}%'
               },
               },
               data: [
               data: [
-                { value: this.data.t_zljdNum.res[0], name: '监督完成率' },
-                { value: e, name: '监督未完成率' }
+                { value: this.data.t_zljdNum.res[0], name: '完成率' },
+                { value: e, name: '未完成率' }
               ],
               ],
               emphasis: {
               emphasis: {
                 itemStyle: {
                 itemStyle: {

+ 2 - 2
src/views/statistics/item/s7sheBeiJiaoZhun.vue

@@ -114,8 +114,8 @@
                 formatter: '{b}: {d}%'
                 formatter: '{b}: {d}%'
               },
               },
               data: [
               data: [
-                { value: this.data.t_mjsbjdxzjhzbNum.valna, name: '检定完成率' },
-                { value: e, name: '检定未完成率' }
+                { value: this.data.t_mjsbjdxzjhzbNum.valna, name: '完成率' },
+                { value: e, name: '未完成率' }
               ],
               ],
               emphasis: {
               emphasis: {
                 itemStyle: {
                 itemStyle: {

+ 2 - 2
src/views/statistics/item/s8sheBeiHeCha.vue

@@ -107,8 +107,8 @@
                 formatter: '{b}: {d}%'
                 formatter: '{b}: {d}%'
               },
               },
               data: [
               data: [
-                { value: this.data.t_sbhcjlbNum.valna, name: '设备期间核查完成率' },
-                { value: e, name: '设备期间核查未完成率' }
+                { value: this.data.t_sbhcjlbNum.valna, name: '完成率' },
+                { value: e, name: '未完成率' }
               ],
               ],
               emphasis: {
               emphasis: {
                 itemStyle: {
                 itemStyle: {

+ 2 - 2
src/views/statistics/item/s9neiBuZhiLiang.vue

@@ -98,8 +98,8 @@
                 formatter: '{b}: {d}%'
                 formatter: '{b}: {d}%'
               },
               },
               data: [
               data: [
-                { value: this.data.t_mjzlkzxbNum.valna, name: '质量控制计划完成率' },
-                { value: e, name: '质量控制计划未完成率' }
+                { value: this.data.t_mjzlkzxbNum.valna, name: '完成率' },
+                { value: e, name: '未完成率' }
               ],
               ],
               emphasis: {
               emphasis: {
                 itemStyle: {
                 itemStyle: {

+ 4 - 2
src/views/statistics/js/selectDB.js

@@ -31,7 +31,7 @@ export const getbiaozhunTObj = (end)=>{
 }
 }
 export const getbzJunZhuObj = (end)=>{
 export const getbzJunZhuObj = (end)=>{
   // return "select a.t_mjsbjdxzjhzbName,a.t_mjsbjdxzjhzb,b.t_mjsbjdxzjhzbS FROM (select she_bei_ming_chen as t_mjsbjdxzjhzbName, COUNT(she_bei_ming_chen) as t_mjsbjdxzjhzb from t_mjsbjdxzjhzb where YEAR(create_time_)='2022' GROUP BY she_bei_ming_chen HAVING COUNT(she_bei_ming_chen)>=1) as a left join  (select she_bei_ming_chen, COUNT(she_bei_ming_chen) as t_mjsbjdxzjhzbS from t_mjsbjdxzjhzb where YEAR(create_time_)= '2022' AND DATE(yi_jian_xiao_ri_q) >= DATE(ji_hua_ri_qi_) GROUP BY she_bei_ming_chen HAVING COUNT(she_bei_ming_chen)>=1 )as b on a.t_mjsbjdxzjhzbName=b.she_bei_ming_chen"
   // return "select a.t_mjsbjdxzjhzbName,a.t_mjsbjdxzjhzb,b.t_mjsbjdxzjhzbS FROM (select she_bei_ming_chen as t_mjsbjdxzjhzbName, COUNT(she_bei_ming_chen) as t_mjsbjdxzjhzb from t_mjsbjdxzjhzb where YEAR(create_time_)='2022' GROUP BY she_bei_ming_chen HAVING COUNT(she_bei_ming_chen)>=1) as a left join  (select she_bei_ming_chen, COUNT(she_bei_ming_chen) as t_mjsbjdxzjhzbS from t_mjsbjdxzjhzb where YEAR(create_time_)= '2022' AND DATE(yi_jian_xiao_ri_q) >= DATE(ji_hua_ri_qi_) GROUP BY she_bei_ming_chen HAVING COUNT(she_bei_ming_chen)>=1 )as b on a.t_mjsbjdxzjhzbName=b.she_bei_ming_chen"
-  return "select a.name as name, a.num ,IFNULL(b.numS,0) as numS from(select zhuan_huan_ as name, COUNT(zhuan_huan_) as num from t_bzjzhcjhzb where YEAR(create_time_)="+end+" GROUP BY zhuan_huan_ HAVING COUNT(zhuan_huan_)>=1) as a LEFT JOIN (select zhuan_huan_ as name, COUNT(zhuan_huan_) as numS from t_bzjzhcjhzb as c LEFT JOIN t_bzjzhcjhb as d on c.parent_id_ = d.id_ where YEAR(c.create_time_)="+end+" and d.shi_fou_guo_shen_='1' GROUP BY zhuan_huan_ HAVING COUNT(zhuan_huan_)>=1) as b on a.name = b.name"
+  return "select a.name as name, a.num ,IFNULL(b.numS,0) as numS from(select wu_liao_bian_ma_, zhuan_huan_ as name, COUNT(wu_liao_bian_ma_) as num from t_bzjzhcjhzb where YEAR(create_time_)="+end+" GROUP BY wu_liao_bian_ma_ HAVING COUNT(wu_liao_bian_ma_)>=1) as a LEFT JOIN (select wu_liao_bian_ma_, zhuan_huan_ as name, COUNT(wu_liao_bian_ma_) as numS from t_bzjzqjhcjl as d where YEAR(create_time_)="+end+" and d.shi_fou_guo_shen_='1' GROUP BY wu_liao_bian_ma_ HAVING COUNT(wu_liao_bian_ma_)>=1) as b on a.wu_liao_bian_ma_ = b.wu_liao_bian_ma_"
 }
 }
 export const getbzJunZhuTObj = (end)=>{
 export const getbzJunZhuTObj = (end)=>{
   // return "select a.t_mjsbjdxzjhzbName,a.t_mjsbjdxzjhzb,b.t_mjsbjdxzjhzbS FROM (select she_bei_ming_chen as t_mjsbjdxzjhzbName, COUNT(she_bei_ming_chen) as t_mjsbjdxzjhzb from t_mjsbjdxzjhzb where YEAR(create_time_)='2022' GROUP BY she_bei_ming_chen HAVING COUNT(she_bei_ming_chen)>=1) as a left join  (select she_bei_ming_chen, COUNT(she_bei_ming_chen) as t_mjsbjdxzjhzbS from t_mjsbjdxzjhzb where YEAR(create_time_)= '2022' AND DATE(yi_jian_xiao_ri_q) >= DATE(ji_hua_ri_qi_) GROUP BY she_bei_ming_chen HAVING COUNT(she_bei_ming_chen)>=1 )as b on a.t_mjsbjdxzjhzbName=b.she_bei_ming_chen"
   // return "select a.t_mjsbjdxzjhzbName,a.t_mjsbjdxzjhzb,b.t_mjsbjdxzjhzbS FROM (select she_bei_ming_chen as t_mjsbjdxzjhzbName, COUNT(she_bei_ming_chen) as t_mjsbjdxzjhzb from t_mjsbjdxzjhzb where YEAR(create_time_)='2022' GROUP BY she_bei_ming_chen HAVING COUNT(she_bei_ming_chen)>=1) as a left join  (select she_bei_ming_chen, COUNT(she_bei_ming_chen) as t_mjsbjdxzjhzbS from t_mjsbjdxzjhzb where YEAR(create_time_)= '2022' AND DATE(yi_jian_xiao_ri_q) >= DATE(ji_hua_ri_qi_) GROUP BY she_bei_ming_chen HAVING COUNT(she_bei_ming_chen)>=1 )as b on a.t_mjsbjdxzjhzbName=b.she_bei_ming_chen"
@@ -146,7 +146,9 @@ function toolSame(val,tableName,where,join){
 /* 任务完成 */
 /* 任务完成 */
 function s1renwu(begin,end,scope){
 function s1renwu(begin,end,scope){
   return "( SELECT COUNT( id_ ) AS t_lhjczb"+end+" FROM t_lhjczb "+ "WHERE zhuang_tai_ = '已完成' and shi_fou_ji_shi_ = '是' AND YEAR( create_time_ ) = "+end+") s1renwu1  JOIN"+
   return "( SELECT COUNT( id_ ) AS t_lhjczb"+end+" FROM t_lhjczb "+ "WHERE zhuang_tai_ = '已完成' and shi_fou_ji_shi_ = '是' AND YEAR( create_time_ ) = "+end+") s1renwu1  JOIN"+
-  "( SELECT COUNT( id_ ) AS t_lhjczbS"+end+" FROM t_lhjczb WHERE YEAR ( create_time_ ) = "+end+" ) s1renwu2  "
+  "( SELECT COUNT( id_ ) AS t_lhjcz"+end+" FROM t_lhjczb "+ "WHERE zhuang_tai_ = '已完成' and shi_fou_ji_shi_ = '否' AND YEAR( create_time_ ) = "+end+") s1renwu2  JOIN"+
+  "( SELECT COUNT( id_ ) AS t_lhjc"+end+" FROM t_lhjczb "+ "WHERE (zhuang_tai_ != '已完成' or shi_fou_ji_shi_ ='' or shi_fou_ji_shi_ is null)  AND YEAR( create_time_ ) = "+end+") s1renwu3  JOIN"+
+  "( SELECT COUNT( id_ ) AS t_lhjczbS"+end+" FROM t_lhjczb WHERE YEAR ( create_time_ ) = "+end+" ) s1renwu4  "
  
  
   }
   }
 /* 检测 */
 /* 检测 */

+ 10 - 2
src/views/statistics/properties/s1zhiLiangMuBiaoPro.vue

@@ -36,11 +36,19 @@
             <el-aside style="border:0px;width: 30%;">
             <el-aside style="border:0px;width: 30%;">
               <div class="dataCont" style="font-size: 14px;">
               <div class="dataCont" style="font-size: 14px;">
                 <el-divider content-position="left">{{data.t_jchzbNum.date}} 年度</el-divider>
                 <el-divider content-position="left">{{data.t_jchzbNum.date}} 年度</el-divider>
-                按时完成的检测项目数量 :<el-tag>{{data.t_jchzbNum.number[0]}} 次</el-tag>
+                及时完成的检测项目数量 :<el-tag>{{data.t_jchzbNum.number[0]}} 次</el-tag>
+                <br>
+                未及时完成的检测项目数量 :<el-tag>{{data.t_jchzbNum.number1[0]}} 次</el-tag>
+                <br>
+                未完成的检测项目数量 :<el-tag>{{data.t_jchzbNum.number2[0]}} 次</el-tag>
                 <br>
                 <br>
                 有效检测任务总数 :<el-tag>{{data.t_jchzbNum.numberAll[0]}} 次</el-tag>
                 有效检测任务总数 :<el-tag>{{data.t_jchzbNum.numberAll[0]}} 次</el-tag>
                 <br>
                 <br>
-                任务完成率 :<el-tag>{{data.t_jchzbNum.res[0]}} %</el-tag>
+                任务未及时完成率 :<el-tag>{{data.t_jchzbNum.res[1]}} %</el-tag>
+                <br>
+                任务未完成率 :<el-tag>{{data.t_jchzbNum.res[2]}} %</el-tag>
+                <br>
+                任务及时完成率 :<el-tag>{{data.t_jchzbNum.res[0]}} %</el-tag>
                 <br>
                 <br>
                 当前目标值 :<el-tag>{{mubiao}}</el-tag>
                 当前目标值 :<el-tag>{{mubiao}}</el-tag>
                 <br>
                 <br>

+ 24 - 11
src/views/statistics/sendDatas.js

@@ -382,20 +382,33 @@ export default {
                 },
                 },
                 getS1renwu(){
                 getS1renwu(){
                         let jchzbNum = this.getMatchingData('t_lhjczb')
                         let jchzbNum = this.getMatchingData('t_lhjczb')
+                        let jchzbNum1 = this.getMatchingData('t_lhjcz')
+                        let jchzbNum2 = this.getMatchingData('t_lhjc')
                         let jchzbSNum = this.getMatchingDataSame('t_lhjczb')
                         let jchzbSNum = this.getMatchingDataSame('t_lhjczb')
                         let barData = []
                         let barData = []
-                        // for (let i = 0; i < this.dataScope.length; i++) {
-                                let e=0
-                                if (jchzbSNum[0]===0) {
-                                        e =0
-                                } else {
-                                        e =Math.floor(jchzbNum[0]/jchzbSNum[0] * 10000) / 100
-                                }
-                                barData.push(e)
-                        // }
-                        // console.log(jchzbNum,jchzbSNum,'hsuihsahiu')
+                        let e=0
+                        let n=0
+                        let d=0
+                        if (jchzbSNum[0]===0) {
+                                e =0
+                        } else {
+                                e =Math.floor(jchzbNum[0]/jchzbSNum[0] * 10000) / 100
+                        }
+                        if (jchzbSNum[0]===0) {
+                                n =0
+                        } else {
+                                n =Math.floor(jchzbNum1[0]/jchzbSNum[0] * 10000) / 100
+                        }
+                        if (jchzbSNum[0]===0) {
+                                d =0
+                        } else {
+                                d =Math.floor(jchzbNum2[0]/jchzbSNum[0] * 10000) / 100
+                        }
+                        barData.push(e)
+                        barData.push(n)
+                        barData.push(d)
                         return {
                         return {
-                                "t_jchzbNum" :{"date": this.endDate,"number": jchzbNum, "numberAll": jchzbSNum, "res": barData},
+                                "t_jchzbNum" :{"date": this.endDate,"number": jchzbNum, "number1": jchzbNum1, "number2": jchzbNum2, "numberAll": jchzbSNum, "res": barData},
                                 "config":this.getMyConfig("检测") //返回需要的对应参数
                                 "config":this.getMyConfig("检测") //返回需要的对应参数
                         }
                         }
                 },
                 },