Parcourir la source

数据汇总:优化

洪海涛 il y a 4 ans
Parent
commit
0ef2ab5b19

+ 13 - 8
src/views/monthlyReport/childrenPage/editReport/components/OverallOverviewOfTheClient/onlineQuestion.vue

@@ -14,7 +14,7 @@
           />
         </div>
         <div v-if="tabData" class="detail-wrapper">
-          <div class="fontWeight" style="margin-bottom: 10px">{{ tabData.title }}</div>
+          <div class="fontWeight" style="margin-bottom: 10px;">{{ tabData.title }}</div>
           <div
             v-for="item in tabData.onlineProblemCopywriters.filter((elm) =>
               reportBizName ? elm.reportBizName === reportBizName : true
@@ -23,9 +23,9 @@
           >
             <div>{{ item.reportBizName }}:{{ item.priorityStr }}</div>
             <div v-for="(pitem, pIndex) in item.problemDetails" :key="pIndex">
-              <div class="fontWeight">{{ pitem.subClientType }}</div>
+              <div class="fontWeight" style="color: #ED8F41;margin-top: 10px;">{{ pitem.subClientType }}</div>
               <div v-for="(dItem, dIndex) in pitem.details" :key="dIndex">
-                <div>
+                <div style="margin-top: 5px;">
                   <span class="fontWeight">{{ dIndex + 1 }}、</span
                   ><span class="fontWeight">{{ dItem.priority }}问题:</span
                   >{{ dItem.problem }}
@@ -55,6 +55,7 @@ export default {
       pageData: null,
       tabData: null,
       reportBizName: null,
+      option: null,
       pieData: []
     }
   },
@@ -84,7 +85,7 @@ export default {
       })
     },
     echartsInit() {
-      const option = {
+      this.option = {
         color: [
           '#5470c6',
           '#91cc75',
@@ -121,7 +122,7 @@ export default {
         document.getElementById('a_tylo_oo_2ppmn_ayghs')
       )
       // 绘制图表
-      this.myChart.setOption(option)
+      this.myChart.setOption(this.option)
       this.myChart.on('click', (params) => {
         this.reportBizName = params.data.name
       })
@@ -132,7 +133,9 @@ export default {
       this.tabData = this.pageData.filter(
         (elm) => elm.clientType === this.active
       )[0]
-      this.option.series[0].data = this.tabDataonlineProblemCopywriters.filter(elm => elm.total)
+      console.log(this.tabData);
+      console.log(this.tabData.onlineProblemCopywriters);
+      this.option.series[0].data = this.tabData.onlineProblemCopywriters.filter(elm => elm.total)
       this.myChart.setOption(this.option)
     }
   }
@@ -161,10 +164,12 @@ export default {
   .detail-wrapper {
     width: 50%;
     padding: 10px;
-    height: 260px;
+    height: 270px;
+    margin-bottom: 10px;
     overflow-y: scroll;
   }
-    .fontWeight {
+  .fontWeight {
+    color: #333;
     font-weight: 500;
   }
 }

+ 16 - 17
src/views/monthlyReport/childrenPage/editReport/components/OverallOverviewOfTheClient/qualityProcess.vue

@@ -5,14 +5,14 @@
       <div v-if="tabData" class="echarts-wrapper">
         <div class="pie-wrapper">
           <div class="total-wrapper">
-            总数:<span class="total" @click.stop="reportBizName = ''">{{
+<!--             总数:<span class="total" @click.stop="reportBizName = ''">{{
               tabData.total
-            }}</span>
+            }}</span> -->
           </div>
           <div
             id="a_oiew_mkds_ppmn_aygs"
             class="pir"
-            style="width: 100%; height: 130px"
+            style="width: 100%; height: 170px"
           />
           <div v-if="tabData" style="width: 205px">
             本月{{ active }}类:
@@ -36,13 +36,13 @@
             <div class="fontWeight" style="margin-bottom: 0px">
               {{ item.type }}数据
             </div>
-            <div>本月{{ item.type }}{{ item.total }}次</div>
+            <div style="margin-top: 5px;">本月{{ item.type }}{{ item.total }}次</div>
             <div
               v-for="(elm, elmIndex) in item.subClientDetails"
               :key="elmIndex"
               style="margin-bottom: 10px"
             >
-              <div class="fontWeight">
+              <div class="fontWeight" style="margin-top: 10px">
                 {{ elm.subClientType }}{{ item.type }}{{ elm.total }}次
               </div>
               <div
@@ -50,7 +50,7 @@
                 :key="'sub_' + subindex"
                 style="margin-bottom: 5px"
               >
-                <div v-if="subItem.name">
+                <div v-if="subItem.name" style="margin-top: 5px">
                   <span class="fontWeight">{{ subindex + 1 }}、</span
                   >{{ subItem.name
                   }}<span
@@ -120,7 +120,6 @@ export default {
       })
       this.active = this.pageData[0].clientType
       this.tabData = this.pageData[0]
-      console.log(this.tabData)
       // this.subIndex = 0
       this.$nextTick(() => {
         this.echartsInit()
@@ -176,11 +175,11 @@ export default {
           {
             // name: '访问来源',
             type: 'pie',
-            radius: ['61%', '80%'],
+            radius: ['61%', '75%'],
             // data: this.subIndex > -1 && this.tabData.qualityProcessAndRdEfficiencyCopywriters[this.subIndex].subReportDetails,
             data: this.tabData.qualityProcessAndRdEfficiencyCopywriters.map(elm => {
               return elm.subReportDetails
-            }).reduce((a, b) => a.concat(b)),
+            }).reduce((a, b) => a.concat(b)).filter(elm=>elm.total),
             emphasis: {
               itemStyle: {
                 shadowBlur: 0,
@@ -200,10 +199,8 @@ export default {
       // 绘制图表
       this.myChart.setOption(this.option)
       this.myChart.on('click', (params) => {
-        // console.log(params.data);
-        // console.log();
         const list = this.tabData.qualityProcessAndRdEfficiencyCopywriters
-        console.log(list)
+        // console.log(list)
         for (var i = list.length - 1; i >= 0; i--) {
           if (list[i].name === params.data.name) {
             // this.reportBizName = params.data.name
@@ -224,15 +221,13 @@ export default {
     tabChange(value) {
       this.active = value
       this.reportBizName = ''
-      console.log(this.myChart)
-
       this.tabData = this.pageData.filter(
         (elm) => elm.clientType === this.active
       )[0]
       this.option.series[0].data = this.tabData.qualityProcessAndRdEfficiencyCopywriters
       this.option.series[1].data = this.tabData.qualityProcessAndRdEfficiencyCopywriters.map(elm => {
         return elm.subReportDetails
-      }).reduce((a, b) => a.concat(b))
+      }).reduce((a, b) => a.concat(b)).filter(elm=>elm.total)
       this.myChart.setOption(this.option)
     }
   }
@@ -241,7 +236,7 @@ export default {
 
 <style scoped lang="less">
 .echarts-wrapper {
-  margin-top: -10px;
+  margin-top: 0px;
 
   display: flex;
   color: #666;
@@ -262,7 +257,7 @@ export default {
   .detail-wrapper {
     width: 50%;
     padding: 10px;
-    height: 260px;
+    height: 270px;
     overflow-y: scroll;
   }
     .fontWeight {
@@ -272,5 +267,9 @@ export default {
   .red {
     color: red;
   }
+  .p10{
+    display: inline-block;
+    padding-left: 10px;
+  }
 }
 </style>

+ 1 - 1
src/views/monthlyReport/childrenPage/editReport/components/content.vue

@@ -24,7 +24,7 @@
       <div v-else-if="item.type === 'overallOverviewo'">
          <OverallOverviewOfTheServer v-if="pageType.search(/readAll/) > -1 && tabsActive.search(/服务端/) > -1" />
         <OverallOverviewOfTheClient v-if="pageType.search(/readAll/) > -1 && tabsActive.search(/客户端/) > -1" />
-    <markingIssues ref="markingIssues" />
+    <!-- <markingIssues ref="markingIssues" /> -->
       </div>
       <!--   表格和富文本:TableAndRichText   -->
       <div v-else-if="item.type === 'TableAndRichText'">