cyy 3 лет назад
Родитель
Сommit
c6559b222f

+ 10 - 1
src/views/statistics/index.vue

@@ -106,6 +106,10 @@
             v-if="showAll || showComponents[13]" :data = "getS9neiBuZhiLiang()"/>
             <s10waiBuNengLi :width="static=='row' ? '25%': '100%'"
             v-if="showAll || showComponents[14]" :data = "getnengtliObjNum()"/>
+            <s14bufuhexiang :width="static=='row' ? '25%': '100%'"
+            v-if="showAll || showComponents[18]" :data = "getS14bufuhexiang()"/>
+            <s15tousu :width="static=='row' ? '25%': '100%'"
+            v-if="showAll || showComponents[19]" :data = "getS3tousu()"/>
             <div class="clear"></div>
 
         </div>
@@ -149,6 +153,9 @@
   import s11biaoZhunWu from './item/s11biaoZhunWu.vue'
   import s12fengXian from './item/s12fengXian.vue'
   import s13shengWu from './item/s13shengWu.vue'
+  import s14bufuhexiang from './item/s14bufuhexiang.vue'
+  import s15tousu from './item/s15tousu.vue'
+
 
   import none from './item/none.vue'
 
@@ -175,7 +182,9 @@
       s10waiBuNengLi,
       s11biaoZhunWu,
       s12fengXian,
-      s13shengWu
+      s13shengWu,
+      s14bufuhexiang,
+      s15tousu
     },
     props:{
     shows:{ //传入的内容显示序号

+ 6 - 1
src/views/statistics/indexold.vue

@@ -106,6 +106,8 @@
             v-if="showAll || showComponents[13]" :data = "getS9neiBuZhiLiang()"/>
             <s10waiBuNengLi :width="static=='row' ? '25%': '100%'"
             v-if="showAll || showComponents[14]" :data = "getnengtliObjNum()"/>
+            <s14bufuhexiang :width="static=='row' ? '25%': '100%'"
+            v-if="showAll || showComponents[18]" :data = "getS14bufuhexiang()"/>
             <!-- <div class="clear"></div>
 
         </div>
@@ -149,6 +151,8 @@
   import s11biaoZhunWu from './item/s11biaoZhunWu.vue'
   import s12fengXian from './item/s12fengXian.vue'
   import s13shengWu from './item/s13shengWu.vue'
+  import s14bufuhexiang from './item/s14bufuhexiang.vue'
+
 
   import none from './item/none.vue'
 
@@ -175,7 +179,8 @@
       s10waiBuNengLi,
       s11biaoZhunWu,
       s12fengXian,
-      s13shengWu
+      s13shengWu,
+      s14bufuhexiang
     },
     props:{
     shows:{ //传入的内容显示序号

+ 126 - 0
src/views/statistics/item/s14bufuhexiang.vue

@@ -0,0 +1,126 @@
+<template>
+  <div @click="toDetailed()" class="statisticsPage" :style="{width:width}">
+    <div :id="id" :style="{height:height}"/>
+    <!-- 打开详情弹窗-->
+    <div v-if="dialogOff">
+      <dialogView
+        :dialogOff = "dialogOff"
+        @close = "close"
+        :title="title"
+        :data="data"
+      />
+    </div>
+  </div>
+</template>
+
+<script>
+  import echarts from 'echarts'
+  import dialogView from '../properties/s14bufehexiangPro.vue'
+  import {GetPercent,GetMax} from  '../js/config.js'
+  export default {
+    components:{
+      dialogView
+    },
+    props: {
+      data: {
+        type: Object,
+      },
+      width:{
+        type:String,
+        default:"20%"
+      },
+      height:{
+        type:String,
+        default: window.screen.height/5+"px"
+      },
+      id:{
+        type:String,
+        default:"s14bufuhexiang"
+      },
+      click:{
+        type:String,
+        default:'true'
+      },
+    },
+    data () {
+      return {
+        title:'不符合项统计',
+        dialogOff:false,
+        measured:[]
+      }
+    },
+    mounted(){
+      this.drawLine();
+    },
+    methods: {
+      close(){
+        this.dialogOff = false
+      },
+      /* 跳转统计页面*/
+      toDetailed(){
+        if(this.click == "true"){
+        this.dialogOff = true
+       }
+      },
+      drawLine(){
+
+        // let beginInof = Number(this.data.t_complaintBegin.number)
+        // let endInof = Number(this.data.t_complaintEnd.number)
+        let s14bufuhexiang = echarts.init(document.getElementById(this.id))
+        // let beingDate=this.data.t_complaintBegin.date
+        // let endDate=this.data.t_complaintEnd.date
+        var option;
+
+        //v3
+        // let e=[this.data.t_mjsyshdfxsbykzjhxbNum.number[0],this.data.t_mjsyshdfxsbykzjhxbNum.numberAll[0],this.data.t_mjsyshdfxsbykzjhxbNum.res[0]]
+        let e = 100 -this.data.t_bfhxbgyjzcsjlbxNum.res[0]
+
+
+        option = {
+          title: {
+            text: this.title,
+            // subtext: 'Fake Data',
+            left: 'left',
+            textStyle:{ fontSize:14 }
+          },
+          tooltip: {
+            trigger: 'item'
+          },
+          color:['#660043','#cf5435'],
+          series: [
+            {
+              type: 'pie',
+              radius: '50%',
+              label: {
+                formatter: '{b}: {d}%'
+              },
+              data: [
+                { value: this.data.t_bfhxbgyjzcsjlbxNum.res[0], name: '不符合项完成率' },
+                { value: e, name: '不符合项未完成率' }
+              ],
+              emphasis: {
+                itemStyle: {
+                  shadowBlur: 10,
+                  shadowOffsetX: 0,
+                  shadowColor: 'rgba(0, 0, 0, 0.5)'
+                }
+              }
+            }
+          ]
+        };
+
+        option && s14bufuhexiang.setOption(option);
+      }
+    }
+  }
+</script>
+<style scoped>
+  #s14bufuhexiang:hover{
+    transition: all 0.5s;
+    transform:scale(1.03);
+  }
+  .statisticsPage{
+     box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
+     float: left;
+  }
+</style>

+ 161 - 0
src/views/statistics/item/s14bufuhexiangCol.vue

@@ -0,0 +1,161 @@
+<template>
+  <div @click="toDetailed()" class="statisticsPage" :style="{width:width}">
+    <div :id="id" :style="{height:height}"/>
+    <!-- 打开详情弹窗-->
+    <div v-if="dialogOff">
+      <dialogView
+        :dialogOff = "dialogOff"
+        @close = "close"
+        :title="title"
+        :data="data"
+      />
+    </div>
+  </div>
+</template>
+
+<script>
+  import echarts from 'echarts'
+  import dialogView from '../properties/s14bufehexiangPro.vue'
+  import {GetPercent,GetMax} from  '../js/config.js'
+  export default {
+    components:{
+      dialogView
+    },
+    props: {
+      data: {
+        type: Object,
+      },
+      width:{
+        type:String,
+        default:"20%"
+      },
+      height:{
+        type:String,
+        default: window.screen.height/4+"px"
+      },
+      id:{
+        type:String,
+        default:"s14bufuhexiang"
+      },
+      click:{
+        type:String,
+        default:'true'
+      },
+    },
+    data () {
+      return {
+        title:'不符合项数量',
+        dialogOff:false,
+        measured:[]
+      }
+    },
+    mounted(){
+      this.drawLine();
+    },
+    methods: {
+      close(){
+        this.dialogOff = false
+      },
+      /* 跳转统计页面*/
+      toDetailed(){
+        if(this.click == "true"){
+        this.dialogOff = true
+       }
+      },
+      drawLine(){
+
+        // let beginInof = Number(this.data.t_complaintBegin.number)
+        // let endInof = Number(this.data.t_complaintEnd.number)
+        let s14bufuhexiang = echarts.init(document.getElementById(this.id))
+        // let beingDate=this.data.t_complaintBegin.date
+        // let endDate=this.data.t_complaintEnd.date
+        var option;
+
+        //v3
+        let e=[this.data.t_bfhxbgyjzcsjlbxNum.numberAll[0],this.data.t_bfhxbgyjzcsjlbxNum.number[0]]
+        // let e=[this.data.t_mjsyshdfxsbykzjhxbNum.number[0],this.data.t_mjsyshdfxsbykzjhxbNum.numberAll[0],this.data.t_mjsyshdfxsbykzjhxbNum.res[0]]
+
+        option = {
+            legend: {},
+            tooltip: {
+              trigger: 'axis',
+              axisPointer: {
+                type: 'shadow'
+              },
+              // formatter: function (params) {
+              //   return params[0].data[0] + '<br/>满意份数:' + params[0].data[1] + '<br/>调查总份数: ' + params[0].data[2];
+              // }
+            },
+            // dataset: {
+            //   source: barData
+            // },
+            xAxis: { 
+              type: 'category',
+              data:[ '不符合项总数','不符合项已完成数量']
+              // data:['已完成', '总数量', '完成率']
+            },
+            yAxis: [
+              {
+                type: 'value',
+                scale: true,
+                name: '数量',
+                max: this.data.t_bfhxbgyjzcsjlbxNum.number[0]>this.data.t_bfhxbgyjzcsjlbxNum.numberAll[0]?this.data.t_bfhxbgyjzcsjlbxNum.number[0]+1:this.data.t_bfhxbgyjzcsjlbxNum.numberAll[0]+1,
+                min: 0,
+                // boundaryGap: [0.2, 0.2]
+              },
+              // {
+              //   type: 'value',
+              //   scale: true,
+              //   name: '完成率',
+              //   max: this.data.t_mjsyshdfxsbykzjhxbNum.res[0],
+              //   min: 0,
+              //   axisLabel: {
+              //     formatter: '{value} %'
+              //   }
+              // }
+            ],
+            series: [
+              {
+                data: e,
+                type: 'bar',
+                barWidth: '20%',
+
+                itemStyle: {
+                  color: '#c35566'
+                },
+                label: {
+                show: true,
+                position: 'top'
+              },
+              }
+            ],
+            grid: {
+              top: '20%',
+              left: '3%',
+              right: '4%',
+              bottom: '10%',
+              containLabel: true
+            },
+            title: {
+              text: this.title,
+              textStyle:{ fontSize:14 }
+
+              // subtext: "        "+beingDate+"-"+endDate
+            }
+        };
+
+        option && s14bufuhexiang.setOption(option);
+      }
+    }
+  }
+</script>
+<style scoped>
+  #s14bufuhexiang:hover{
+    transition: all 0.5s;
+    transform:scale(1.03);
+  }
+  .statisticsPage{
+     box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
+     float: left;
+  }
+</style>

+ 135 - 0
src/views/statistics/item/s15tousu.vue

@@ -0,0 +1,135 @@
+<template>
+  <div @click="toDetailed()" class="statisticsPage" :style="{width:width}">
+    <div :id="id" :style="{height:height}"/>
+    <!-- 打开详情弹窗-->
+    <div v-if="dialogOff">
+      <dialogView
+        :dialogOff = "dialogOff"
+        @close = "close"
+        :title="title"
+        :data="data"
+      />
+    </div>
+  </div>
+</template>
+
+<script>
+  import echarts from 'echarts'
+  import dialogView from '../properties/s15tousuPro.vue'
+  import {GetPercent,GetMax} from  '../js/config.js'
+  export default {
+    components:{
+      dialogView
+    },
+    props: {
+      data: {
+        type: Object,
+      },
+      width:{
+        type:String,
+        default:"20%"
+      },
+      height:{
+        type:String,
+        default: window.screen.height/5+"px"
+      },
+      id:{
+        type:String,
+        default:"s15tousu"
+      },
+      click:{
+        type:String,
+        default:'true'
+      },
+    },
+    data () {
+      return {
+        title:'客户投诉已通知率',
+        dialogOff:false,
+        measured:[]
+      }
+    },
+    mounted(){
+      this.drawLine();
+    },
+    methods: {
+      close(){
+        this.dialogOff = false
+      },
+      /* 跳转统计页面*/
+      toDetailed(){
+        if(this.click == "true"){
+        this.dialogOff = true
+       }
+      },
+      drawLine(){
+
+        // let beginInof = Number(this.data.t_complaintBegin.number)
+        // let endInof = Number(this.data.t_complaintEnd.number)
+        let s15tousu = echarts.init(document.getElementById(this.id))
+        // let beingDate=this.data.t_complaintBegin.date
+        // let endDate=this.data.t_complaintEnd.date
+        let option;
+        //v2
+        // let that = this
+        // for (let i = 0; i < that.data.t_complaintNum.date.length; i++) {
+        //   let result = 0
+        //   if(that.data.t_mjwtsqbNum.number[i] === 0){
+        //     result = Math.floor(that.data.t_complaintNum.number[i]/1 * 10000) / 100
+        //   }else{
+        //     result = Math.floor(that.data.t_complaintNum.number[i]/that.data.t_mjwtsqbNum.number[i] * 10000) / 100
+        //   }
+        //   that.measured.push(result)
+        //   // console.log(that.data.t_complaintNum.number[i], that.data.t_mjwtsqbNum.number[i], result, 'res')
+        // }
+        //v3
+        //  let e=[this.data.t_complaintNum.number[0],this.data.t_complaintNum.numberAll[0],this.data.t_complaintNum.res[0]]
+        let e = 100-this.data.t_complaintNum.res2[0]
+        option = {
+          title: {
+            text: this.title,
+            // subtext: 'Fake Data',
+            left: 'left',
+            textStyle:{ fontSize:14 }
+          },
+          tooltip: {
+            trigger: 'item'
+          },
+          color:['#00ccff','#cc3333'],
+          series: [
+            {
+              type: 'pie',
+              radius: '50%',
+              label: {
+                formatter: '{b}: {d}%'
+              },
+              data: [
+                { value: this.data.t_complaintNum.res2[0], name: '客户投诉已通知率' },
+                { value: e, name: '客户投诉未通知率' }
+              ],
+              emphasis: {
+                itemStyle: {
+                  shadowBlur: 10,
+                  shadowOffsetX: 0,
+                  shadowColor: 'rgba(0, 0, 0, 0.5)'
+                }
+              }
+            }
+          ]
+       };
+
+       option && s15tousu.setOption(option);
+      }
+    }
+  }
+</script>
+<style scoped>
+  #s15tousu:hover{
+    transition: all 0.5s;
+    transform:scale(1.03);
+  }
+  .statisticsPage{
+     box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
+     float: left;
+  }
+</style>

+ 244 - 0
src/views/statistics/item/s15tousuCol.vue

@@ -0,0 +1,244 @@
+<template>
+  <div @click="toDetailed()" class="statisticsPage" :style="{width:width}">
+    <div :id="id" :style="{height:height}"/>
+    <!-- 打开详情弹窗-->
+    <div v-if="dialogOff">
+      <dialogView
+        :dialogOff = "dialogOff"
+        @close = "close"
+        :title="title"
+        :data="data"
+      />
+    </div>
+  </div>
+</template>
+
+<script>
+  import echarts from 'echarts'
+  import dialogView from '../properties/s15tousuPro.vue'
+  import {GetPercent,GetMax} from  '../js/config.js'
+  export default {
+    components:{
+      dialogView
+    },
+    props: {
+      data: {
+        type: Object,
+      },
+      width:{
+        type:String,
+        default:"20%"
+      },
+      height:{
+        type:String,
+        default: window.screen.height/4+"px"
+      },
+      id:{
+        type:String,
+        default:"s15tousu"
+      },
+      click:{
+        type:String,
+        default:'true'
+      },
+    },
+    data () {
+      return {
+        title:'客户投诉已通知数量',
+        dialogOff:false,
+        measured:[]
+      }
+    },
+    mounted(){
+      this.drawLine();
+    },
+    methods: {
+      close(){
+        this.dialogOff = false
+      },
+      /* 跳转统计页面*/
+      toDetailed(){
+        if(this.click == "true"){
+        this.dialogOff = true
+       }
+      },
+      drawLine(){
+
+        // let beginInof = Number(this.data.t_complaintBegin.number)
+        // let endInof = Number(this.data.t_complaintEnd.number)
+        let s15tousu = echarts.init(document.getElementById(this.id))
+        // let beingDate=this.data.t_complaintBegin.date
+        // let endDate=this.data.t_complaintEnd.date
+        var option;
+        //v2
+        // let that = this
+        // for (let i = 0; i < that.data.t_complaintNum.date.length; i++) {
+        //   let result = 0
+        //   if(that.data.t_mjwtsqbNum.number[i] === 0){
+        //     result = Math.floor(that.data.t_complaintNum.number[i]/1 * 10000) / 100
+        //   }else{
+        //     result = Math.floor(that.data.t_complaintNum.number[i]/that.data.t_mjwtsqbNum.number[i] * 10000) / 100
+        //   }
+        //   that.measured.push(result)
+        //   // console.log(that.data.t_complaintNum.number[i], that.data.t_mjwtsqbNum.number[i], result, 'res')
+        // }
+        //v3
+        //  let e=[this.data.t_complaintNum.number[0],this.data.t_complaintNum.numberAll[0],this.data.t_complaintNum.res[0]]
+         let e=[this.data.t_complaintNum.number[0],this.data.t_complaintNum.numtong[0]]
+        
+
+        option = {
+          //v3
+              legend: {},
+            tooltip: {
+              trigger: 'axis',
+              axisPointer: {
+                type: 'shadow'
+              },
+              // formatter: function (params) {
+              //   return params[0].data[0] + '<br/>满意份数:' + params[0].data[1] + '<br/>调查总份数: ' + params[0].data[2];
+              // }
+            },
+            // dataset: {
+            //   source: barData
+            // },
+            xAxis: { 
+              type: 'category',
+              // data:['投诉总数', '委托总数', '客户投诉率']
+              data:['有效投诉总数','已通知总数']
+            },
+            yAxis: [
+              {
+                type: 'value',
+                scale: true,
+                name: '次数',
+                max: this.data.t_complaintNum.number[0]>this.data.t_complaintNum.numtong[0]?this.data.t_complaintNum.number[0]+1:this.data.t_complaintNum.numtong[0]+1,
+                min: 0,
+                // boundaryGap: [0.2, 0.2]
+              },
+              // {
+              //   type: 'value',
+              //   scale: true,
+              //   name: '客户投诉率',
+              //   max: this.data.t_complaintNum.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: [
+              {
+                data: e,
+                type: 'bar',
+                barWidth: '20%',
+                itemStyle: {
+                  color: '#cccc33'
+                },
+                label: {
+                  show: true,
+                  position: 'top'
+                },
+              }
+            ],
+            grid: {
+              top: '20%',
+              left: '3%',
+              right: '4%',
+              bottom: '10%',
+              containLabel: true
+            },
+            title: {
+              text: this.title,
+              textStyle:{ fontSize:14 }
+
+              // subtext: "        "+beingDate+"-"+endDate
+            },
+          //v2
+        //   rotate: {
+        //     min: -90,
+        //     max: 90
+        //   },
+        //   grid: {
+        //         top: '20%',
+        //         left: '3%',
+        //         right: '4%',
+        //         bottom: '10%',
+        //         containLabel: true
+        //     },
+        //   title: {
+        //      text: this.title,
+        //      subtext: '    '+this.data.t_complaintNum.date[0]+'-'+this.data.t_complaintNum.date[this.data.t_complaintNum.date.length-1],
+        //    },
+        //  xAxis: {
+        //    type: 'category',
+        //    data: this.data.t_complaintNum.date
+        //  },
+        //  yAxis: {
+        //   //  max:this.data.t_complaintBegin.number>this.data.t_complaintEnd.number?this.data.t_complaintBegin.number+1:this.data.t_complaintEnd.number+1,
+        //   // max: Math.max(...this.measured),
+        //   // min:0,
+        //   type: 'value',
+        //   axisLabel: {
+        //     show: true,
+        //     textStyle:{color:'#000'},
+        //     interval: 'auto',
+        //     formatter: '{value} %'
+        //   },
+        //  },
+        //  tooltip: {
+        //         trigger: 'axis',
+        //         axisPointer: {
+        //           type: 'shadow'
+        //         },
+        //         formatter: function (params) {
+        //           // console.log(params,'tousu ')
+        //           return params[0].axisValue + '<br/>客户投诉率:' + params[0].data;
+        //         }
+        //         // formatter: 
+        //         // function (datas) {
+        //         //     let year1 = datas[0].dataIndex==0||datas[0].dataIndex==2;
+        //         //     var res=(year1?beingDate+':':endDate+':')+datas[0].name+':'+datas[0].value
+        //         //     return res
+        //         // }
+        //  },
+        //  series: [
+        //    {
+        //      itemStyle: {
+        //             normal: {
+        //                 color: function(params) {
+        //                     var colorList = [
+        //                       '#F0805A','#B5C334','#FCCE10','#E87C25','#27727B',
+        //                        '#FE8463','#9BCA63','#FAD860','#F3A43B','#60C0DD',
+        //                        '#D7504B','#C6E579','#F4E001','#F0805A','#26C0C0'
+        //                     ];
+        //                     return colorList[params.dataIndex]
+        //                 },
+        //             }
+        //         },
+
+        //      data: this.measured,
+        //      type: 'bar',
+        //      barWidth:50
+        //    }
+        //  ]
+       };
+
+       option && s15tousu.setOption(option);
+      }
+    }
+  }
+</script>
+<style scoped>
+  #s15tousu:hover{
+    transition: all 0.5s;
+    transform:scale(1.03);
+  }
+  .statisticsPage{
+     box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
+     float: left;
+  }
+</style>

+ 8 - 1
src/views/statistics/js/selectDB.js

@@ -11,7 +11,7 @@ export const getJiaoYanObj = (end)=>{
 }
 export const gethechaObj = (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_sbhcjlbZhname,a.t_sbhcjlbName,a.t_sbhcjlb,ifnull(b.t_sbhcjlbS,0) as t_sbhcjlbS FROM (select t_sbdj.she_bei_ming_cheng_ as t_sbhcjlbZhname, t_yqsbhcjh.shi_bie_hao_ as t_sbhcjlbName, COUNT(t_yqsbhcjh.shi_bie_hao_) as t_sbhcjlb from t_yqsbhcjh LEFT JOIN t_sbdj on t_yqsbhcjh.shi_bie_hao_=t_sbdj.she_bei_shi_bie_h where YEAR(t_yqsbhcjh.he_cha_pin_lv_)="+end+" GROUP BY t_yqsbhcjh.shi_bie_hao_ HAVING COUNT(t_yqsbhcjh.shi_bie_hao_)>=1) as a left join  (select shi_bie_hao_, COUNT(shi_bie_hao_) as t_sbhcjlbS from t_sbhcjlb where YEAR(he_cha_ri_qi_)= "+end+"  GROUP BY shi_bie_hao_ HAVING COUNT(shi_bie_hao_)>=1 )as b on a.t_sbhcjlbName=b.shi_bie_hao_  union select t_sbdj.she_bei_ming_cheng_ as t_sbhcjlbZhname, t_sbhcjlb.shi_bie_hao_ as t_sbhcjlbName, IF(t_sbhcjlb.id_, 0, 1) as t_sbhcjlb,IF(YEAR(t_sbhcjlb.he_cha_ri_qi_)=YEAR(t_sbhcjlb.xia_ci_he_cha_ri_), COUNT(t_sbhcjlb.shi_bie_hao_)+1, COUNT(t_sbhcjlb.shi_bie_hao_)) as t_sbhcjlbS from t_sbhcjlb LEFT JOIN t_sbdj on t_sbhcjlb.shi_bie_hao_=t_sbdj.she_bei_shi_bie_h where YEAR(t_sbhcjlb.he_cha_ri_qi_)= "+end+"  GROUP BY t_sbhcjlb.shi_bie_hao_ HAVING COUNT(t_sbhcjlb.shi_bie_hao_)>=1"
+  return "select	a.t_sbhcjlbZhname,	a.t_sbhcjlbName,	a.t_sbhcjlb,	ifnull( b.t_sbhcjlbS, 0 ) AS t_sbhcjlbS FROM	(	SELECT	t_sbdj.she_bei_ming_cheng_ AS t_sbhcjlbZhname,	t_sbdj.she_bei_shi_bie_h AS t_sbhcjlbName,	COUNT( t_yqsbhcjh.yi_qi_she_bei_min ) AS t_sbhcjlb 	FROM	t_yqsbhcjh	LEFT JOIN t_sbdj ON t_yqsbhcjh.yi_qi_she_bei_min = t_sbdj.id_ 	WHERE	YEAR ( t_yqsbhcjh.he_cha_pin_lv_ )= "+end+"	GROUP BY	t_yqsbhcjh.yi_qi_she_bei_min 	HAVING	COUNT( t_yqsbhcjh.yi_qi_she_bei_min )>= 1 	) AS a	LEFT JOIN ( SELECT shi_bie_hao_, COUNT( shi_bie_hao_ ) AS t_sbhcjlbS FROM t_sbhcjlb WHERE YEAR ( he_cha_ri_qi_ )= "+end+" GROUP BY shi_bie_hao_ HAVING COUNT( shi_bie_hao_ )>= 1 ) AS b ON a.t_sbhcjlbName = b.shi_bie_hao_ UNION SELECT	t_sbdj.she_bei_ming_cheng_ AS t_sbhcjlbZhname,	t_sbhcjlb.shi_bie_hao_ AS t_sbhcjlbName,IF	( t_sbhcjlb.id_, 0, 1 ) AS t_sbhcjlb,IF	(	YEAR ( t_sbhcjlb.he_cha_ri_qi_ )= YEAR ( t_sbhcjlb.xia_ci_he_cha_ri_ ),	COUNT( t_sbhcjlb.shi_bie_hao_ )+ 1,	COUNT( t_sbhcjlb.shi_bie_hao_ )) AS t_sbhcjlbS FROM	t_sbhcjlb	LEFT JOIN t_sbdj ON t_sbhcjlb.shi_bie_hao_ = t_sbdj.she_bei_shi_bie_h WHERE	YEAR ( t_sbhcjlb.he_cha_ri_qi_ )= "+end+" GROUP BY	t_sbhcjlb.shi_bie_hao_ HAVING	COUNT( t_sbhcjlb.shi_bie_hao_ )>=1"
 }
 export const getnengliObj = (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"
@@ -51,6 +51,7 @@ export const DBData = (begin,end,scope)=>{
   " join "+s5renYuanJianDu(begin,end,scope)+
   " join "+s9neiBu(begin,end,scope)+
   " join "+s12fengXian(begin,end,scope)+
+  " join "+s14bufuhexiang(begin,end,scope)+
   // " join "+s6sheBeiWeiHu(begin,end)+
   " join "+s7sheBeiJiaoZhun(begin,end)+
   // " join "+s8sheBeiHeCha(begin,end)+
@@ -222,6 +223,7 @@ function s2jianCe(begin,end){
 function s3tousu(begin,end,scope){
   return "( SELECT COUNT( id_ ) AS t_complaint"+end+" FROM t_complaint WHERE you_wu_you_xiao_ = '有效投诉' and YEAR ( create_time_ ) = "+end+" ) s3tousu1  JOIN "+
   "( SELECT COUNT( id_ ) AS t_complaintS"+end+" FROM t_complaint WHERE you_wu_you_xiao_ = '有效投诉' and chu_li_shi_jian_='<48h' and shi_fou_tong_yi_='同意' and YEAR ( create_time_ ) = "+end+" ) s3tousu2  JOIN "+
+  "( SELECT COUNT( id_ ) AS t_complainS"+end+" FROM t_complaint WHERE you_wu_you_xiao_ = '有效投诉' and chu_li_jie_guo_sh='已通知' and YEAR ( create_time_ ) = "+end+" ) s3tousu3  JOIN "+
   "( SELECT COUNT( id_ ) AS t_mjwtsqb"+end+" FROM t_lhjczb WHERE  YEAR ( create_time_ ) = "+end+" ) s3weituo1"
   // let sql = "( SELECT COUNT( id_ ) AS t_complaint"+begin+" FROM t_complaint WHERE YEAR ( create_time_ ) = "+begin+" ) s3tousu1  JOIN "
   // for (let i = 1; i < scope.length; i++) {
@@ -351,4 +353,9 @@ function s9neiBu(begin,end,scope){
   "(select COUNT(t_mjsyshdfxsbykzjhxb.id_) as t_mjsyshdfxsbykzjhxbS"+end+" from t_mjsyshdfxsbykzjhxb INNER JOIN t_mjsyshdfxsbykzjhb on t_mjsyshdfxsbykzjhxb.parent_id_ = t_mjsyshdfxsbykzjhb.id_  where YEAR(t_mjsyshdfxsbykzjhxb.shi_shi_ri_qi_)="+end+" and t_mjsyshdfxsbykzjhb.shi_fou_guo_shen_ = '1') s12fengxian2 "
 
  }
+ function s14bufuhexiang(begin,end,scope){
+  return "(select COUNT(t_bfhxbgyjzcsjlbx.id_) as t_bfhxbgyjzcsjlbx"+end+" from t_bfhxbgyjzcsjlbx where YEAR(t_bfhxbgyjzcsjlbx.create_time_)="+end+") s14bufuhexiang1  JOIN " +
+  "(select COUNT(t_bfhxbgyjzcsjlbx.id_) as t_bfhxbgyjzcsjlbxS"+end+" from t_bfhxbgyjzcsjlbx where t_bfhxbgyjzcsjlbx.zhuang_tai_ = '已完成' and YEAR(t_bfhxbgyjzcsjlbx.create_time_)="+end+") s14buhexiang2 "
+
+ }
 

+ 130 - 0
src/views/statistics/properties/s14bufehexiangPro.vue

@@ -0,0 +1,130 @@
+<template>
+    <el-dialog
+      :visible.sync="visible"
+      ref="dialog"
+      :title="title+'详情'"
+      width="100%"
+      lock-scroll
+      append-to-body
+      fullscreen
+      close-on-press-escape
+      destroy-on-close
+      v-if="visible"
+      @close="handleClose">
+
+      <div>
+
+    <el-container>
+      <!-- <el-aside style="border:0px;width: 13%;"></el-aside> -->
+      <!-- 放统计内容-->
+      <el-aside style="border:0px;width: 70%;margin-top:2%;">
+          <s14bufuhexiangItem
+            :data="data"
+            width="50%"
+            :height="height"
+            id="s14bufuhexiangPro"
+            click="false"
+          />
+          <s14bufuhexiangCItem
+            :data="data"
+            width="50%"
+            :height="height"
+            id="s14bufuhexiangCPro"
+            click="false"
+          />
+      </el-aside>
+        <!-- 参数页面列 -->
+        <el-aside style="border:0px;width: 30%;">
+          <el-divider content-position="left">{{data.t_bfhxbgyjzcsjlbxNum.date}} 年度</el-divider>
+            不符合项已完成数量 :<el-tag>{{data.t_bfhxbgyjzcsjlbxNum.number[0]}} 次</el-tag>
+            <br>
+            不符合项总数 :<el-tag>{{data.t_bfhxbgyjzcsjlbxNum.numberAll[0]}} 次</el-tag>
+            <br>
+            不符合项完成率 :<el-tag>{{data.t_bfhxbgyjzcsjlbxNum.res[0]}} %</el-tag>
+            <br>
+          <!-- <div v-for="(item,i) in data.t_zljdNum.date" :key="i">
+            <el-divider content-position="left">{{data.t_zljdNum.date[i]}} 年度</el-divider>
+            已完成监督数量 :<el-tag>{{data.t_zljdNum.number[i]}} 次</el-tag>
+            <br>
+            所有监督数量 :<el-tag>{{data.t_zljdNum.numberAll[i]}} 次</el-tag>
+            <br>
+            监督完成率 :<el-tag>{{data.t_zljdNum.res[i]}} %</el-tag>
+            <br>
+          </div> -->
+           <!-- <div class="dataCont" style="font-size: 14px;">
+          <el-divider content-position="left">{{data.t_zljdBegin.date}} 年度</el-divider>
+            人员监督计划次数 :<el-tag>{{data.t_zljdBegin.number}} 次</el-tag>
+            <br>
+             <el-divider content-position="left">{{data.t_zljdssBegin.date}} 年度</el-divider>
+            人员监督完成次数 :<el-tag>{{data.t_zljdssBegin.number}} 次</el-tag>
+            <br>
+            <el-divider content-position="left">{{data.t_zljdEnd.date}} 年度</el-divider>
+            人员监督计划次数 :<el-tag type="danger">{{data.t_zljdEnd.number}} 次</el-tag>
+          <el-divider content-position="left">{{data.t_zljdssEnd.date}} 年度</el-divider>
+            人员监督完成次数 :<el-tag type="danger">{{data.t_zljdssEnd.number}} 次</el-tag>
+           </div> -->
+
+        </el-aside>
+
+      </el-container>
+
+
+      </div>
+    </el-dialog>
+</template>
+
+<script>
+  export default {
+    props:{
+        dialogOff:{ //当前表单示例
+            type: Boolean,
+            default:false,
+          },
+        title:{ type:String},
+        data:{
+          type:Object
+        },
+        height:{
+          type:String,
+          default:window.screen.height * 0.5 +'px'
+        }
+      },
+      beforeCreate: function () {
+          // 官方文档给出的是require
+           this.$options.components.s14bufuhexiangItem = () => import('../item/s14bufuhexiang.vue')
+           this.$options.components.s14bufuhexiangCItem = () => import('../item/s14bufuhexiangCol.vue')
+          },
+
+    watch:{
+     dialogOff: {
+       handler: function(val, oldVal) {
+        this.visible = JSON.parse(JSON.stringify(val));
+        this.itemShow = true
+        },
+        immediate: true
+      }
+    },
+    data() {
+      return {
+        visible:false,
+        itemShow:false,
+
+      }
+    },
+    methods:{
+       // 关闭窗口
+      handleClose(){
+       this.$emit('close', false)
+      }
+    }
+  }
+</script>
+
+<style scoped>
+  .dataCont{
+    border:0px;
+    box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
+    height: calc(100vh * 0.85);
+    padding:20px;
+  }
+</style>

+ 119 - 0
src/views/statistics/properties/s15tousuPro.vue

@@ -0,0 +1,119 @@
+<template>
+    <el-dialog
+      :visible.sync="visible"
+      ref="dialog"
+      :title="title+'详情'"
+      width="100%"
+      lock-scroll
+      append-to-body
+      fullscreen
+      close-on-press-escape
+      destroy-on-close
+      v-if="visible"
+      @close="handleClose">
+
+      <div>
+
+    <el-container>
+      <!-- <el-aside style="border:0px;width: 13%;"></el-aside> -->
+      <!-- 放统计内容-->
+      <el-aside style="border:0px;width: 70%;margin-top: 2%;">
+          <s15tousuItem
+            :data="data"
+            width="50%"
+            :height="height"
+            id="s15tousuPro"
+            click="false"
+          />
+          <s15tousuCItem
+            :data="data"
+            width="50%"
+            :height="height"
+            id="s15tousuCPro"
+            click="false"
+          />
+      </el-aside>
+        <!-- 参数页面列 -->
+        <el-aside style="border:0px;width: 30%;">
+           <div class="dataCont" style="font-size: 14px;">
+            <el-divider content-position="left">{{data.t_complaintNum.date}} 年度</el-divider>
+              投诉总数次数 :<el-tag>{{data.t_complaintNum.number[0]}} 次</el-tag>
+              <br>
+              投诉已通知次数 :<el-tag>{{data.t_complaintNum.numtong[0]}} 次</el-tag>
+              <br>
+              客户投诉已通知率 :<el-tag>{{data.t_complaintNum.res2[0]}} %</el-tag>
+            <br>
+              <!-- <div v-for="(item,i) in data.t_complaintNum.number" :key="i">
+                  <el-divider content-position="left">{{data.t_complaintNum.date[i]}} 年度</el-divider>
+                  投诉总数次数 :<el-tag>{{data.t_complaintNum.number[i]}} 次</el-tag>
+                  <br>
+                  委托总数次数 :<el-tag>{{data.t_mjwtsqbNum.number[i]}} 次</el-tag>
+                  <br>
+              </div> -->
+
+           </div>
+
+        </el-aside>
+
+      </el-container>
+
+
+      </div>
+    </el-dialog>
+</template>
+
+<script>
+  export default {
+    props:{
+        dialogOff:{ //当前表单示例
+            type: Boolean,
+            default:false,
+          },
+        title:{ type:String},
+        data:{
+          type:Object
+        },
+        height:{
+          type:String,
+          default:window.screen.height * 0.5 +'px'
+        }
+      },
+      beforeCreate: function () {
+          // 官方文档给出的是require
+           this.$options.components.s15tousuItem = () => import('../item/s15tousu.vue')
+           this.$options.components.s15tousuCItem = () => import('../item/s15tousuCol.vue')
+          },
+
+    watch:{
+     dialogOff: {
+       handler: function(val, oldVal) {
+        this.visible = JSON.parse(JSON.stringify(val));
+        this.itemShow = true
+        },
+        immediate: true
+      }
+    },
+    data() {
+      return {
+        visible:false,
+        itemShow:false,
+
+      }
+    },
+    methods:{
+       // 关闭窗口
+      handleClose(){
+       this.$emit('close', false)
+      }
+    }
+  }
+</script>
+
+<style scoped>
+  .dataCont{
+    border:0px;
+    box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
+    height: calc(100vh * 0.85);
+    padding:20px;
+  }
+</style>

+ 35 - 1
src/views/statistics/sendDatas.js

@@ -350,12 +350,15 @@ export default {
                 },
                 getS3tousu(){
                         let complaintNum = this.getMatchingData('t_complaint')
+                        let complainNum = this.getMatchingDataSame('t_complain')
                         let complaintNumS = this.getMatchingDataSame('t_complaint')
                         let mjwtsqbNum = this.getMatchingData('t_mjwtsqb')
                         let e=0
                         let barData =[]
                         let e1=0
                         let barData1 =[]
+                        let e2=0
+                        let barData2 =[]
                         if (mjwtsqbNum[0]===0) {
                                 e =0
                         } else {
@@ -366,11 +369,17 @@ export default {
                         } else {
                                 e1 =Math.floor(complaintNumS[0]/complaintNum[0] * 10000) / 100
                         }
+                        if (complaintNum[0]===0) {
+                                e2 =0
+                        } else {
+                                e2 =Math.floor(complainNum[0]/complaintNum[0] * 10000) / 100
+                        }
                         barData.push(e)
                         barData1.push(e1)
+                        barData2.push(e2)
                         
                         return {
-                                "t_complaintNum" :{"date": this.endDate,"number": complaintNum,"numberAll":mjwtsqbNum,"res":barData,"num48":complaintNumS,"res1":barData1},
+                                "t_complaintNum" :{"date": this.endDate,"number": complaintNum,"numberAll":mjwtsqbNum,"res":barData,"num48":complaintNumS,"res1":barData1,"numtong":complainNum,"res2":barData2},
                                 "t_mjwtsqbNum" :{"date": this.dataScope,"number": mjwtsqbNum},
                                 "config":this.getMyConfig("客户投诉率") //返回需要的对应参数
                         }
@@ -529,5 +538,30 @@ export default {
                                 "config":this.getMyConfig("内部质量") //返回需要的对应参数
                         }
                 },
+                getS14bufuhexiang(){
+                        //年度总
+                        let bfhxbgyjzcsjlbxNum = this.getMatchingData('t_bfhxbgyjzcsjlbx')
+                        //年度条件
+                        let bfhxbgyjzcsjlbxSNum = this.getMatchingDataSame('t_bfhxbgyjzcsjlbx')
+
+                        let numData = []
+                        let numAData = []
+                        let barData = []
+                        // for (let i = 0; i < this.dataScope.length; i++) {
+                        let e=0
+                        if (bfhxbgyjzcsjlbxNum[0]===0) {
+                                e =0
+                        } else {
+                                e =Math.floor(bfhxbgyjzcsjlbxSNum[0]/bfhxbgyjzcsjlbxNum[0] * 10000) / 100
+                        }
+                        numData.push(bfhxbgyjzcsjlbxSNum[0])
+                        numData.push(bfhxbgyjzcsjlbxNum[0])
+                        barData.push(e)
+                        // }
+                        return {
+                                "t_bfhxbgyjzcsjlbxNum" :{"date": this.endDate,"number": bfhxbgyjzcsjlbxSNum, "numberAll":bfhxbgyjzcsjlbxNum, "res":barData},
+                                "config":this.getMyConfig("内部质量") //返回需要的对应参数
+                        }
+                },
         }
 }