Bladeren bron

样式优化

洪海涛 4 jaren geleden
bovenliggende
commit
1bd31d7cec

+ 3 - 4
src/store/modules/monthlyReport/edit/index.js

@@ -722,11 +722,10 @@ export default {
       }
     },
     // 获取部门数据
-    async setSelectEnum({ commit }, reportId) {
+    async setSelectEnum({ commit }, key) {
       const depth = JSON.parse(window.localStorage.getItem('depth'))
-      console.log(depth)
-      if (!depth) {
-        const res = await getDeptArch({ reportId })
+      if (!depth || key === 'init') {
+        const res = await getDeptArch()
         if (res.code === 200) {
           window.localStorage.setItem('depth', JSON.stringify(res.data.children))
           commit('SET_SELECT_ENUM', res.data.children)

+ 5 - 4
src/views/monthlyReport/childrenPage/editReport/components/OverallOverviewOfTheClient/onlineQuestion.vue

@@ -14,7 +14,7 @@
           />
 
         </div>
-<div class="detail-wrapper">
+        <div class="detail-wrapper">
           <div v-if="tabData && pieData.length">
           <div class="fontWeight" style="margin-bottom: 10px;">{{ tabData.title }}</div>
           <div
@@ -23,7 +23,7 @@
             )"
             :key="item.reportBizName"
           >
-            <div>{{ item.reportBizName }}:{{ item.priorityStr }}</div>
+            <div class="fontWeight" style="margin-top: 5px">{{ item.reportBizName }}:{{ item.priorityStr }}</div>
             <div v-for="(pitem, pIndex) in item.problemDetails" :key="pIndex">
               <div class="fontWeight" style="color: #ED8F41;margin-top: 10px;">{{ pitem.subClientType }}</div>
               <div v-for="(dItem, dIndex) in pitem.details" :key="dIndex" style="padding-left: 10px">
@@ -175,9 +175,10 @@ export default {
   }
   .detail-wrapper {
     width: 50%;
-    padding: 10px;
+    padding: 0px 10px 10px;
     height: 235px;
-    margin-bottom: 10px;
+    margin-top: 20px;
+    // margin-bottom: 10px;
     overflow-y: scroll;
   }
   .fontWeight {

+ 50 - 37
src/views/monthlyReport/childrenPage/editReport/components/OverallOverviewOfTheClient/qualityProcess.vue

@@ -1,7 +1,7 @@
 <template>
   <div>
     <boxCom title="质量流程&研发效率" :page-data="pageData" @change="tabChange">
-      <!-- <div>质量流程&研发效率:{{ active }}</div> -->
+      <!-- <div>质量流程&研发效率:{{ active }}{{this.pieData.filter(elm => elm.total).length}}</div> -->
       <div v-if="tabData" class="echarts-wrapper">
         <div class="pie-wrapper">
           <div class="total-wrapper">
@@ -10,11 +10,12 @@
             }}</span> -->
           </div>
           <div
+          v-if="this.pieData.filter(elm => elm.total).length"
             id="a_oiew_mkds_ppmn_aygs"
             class="pir"
             style="width: 100%; height: 170px"
           />
-          <div v-if="tabData" style="width: 205px;color: #333">
+          <div v-if="tabData && this.pieData.filter(elm => elm.total).length" style="width: 205px;color: #333">
             本月{{ active }}类:
             <span v-for="(item, itemIndex ) in tabData.qualityProcessAndRdEfficiencyCopywriters" :key="itemIndex">
               <span>{{ item.type }}</span>
@@ -23,45 +24,48 @@
             </span>
           </div>
         </div>
-        <div class="detail-wrapper">
-          <div
-            v-for="(
-              item, itemIndex
-            ) in tabData.qualityProcessAndRdEfficiencyCopywriters.filter(
-              (elm) => (reportBizName ? elm.name === reportBizName : true)
-            )"
-            :key="itemIndex"
-            style="margin-bottom: 10px"
-          >
-            <div class="fontWeight" style="margin-bottom: 0px">
-              {{ item.type }}数据
-            </div>
-            <div style="margin-top: 5px;color: #333;padding-left: 10px">本月{{ item.type }}<span style="font-weight: 500">{{ item.total }}</span>次</div>
+        <div class="detail-wrapper" :style="{marginTop: this.pieData.filter(elm => elm.total).length ? '0' : '10px'}">
+          <div  v-if="this.pieData.filter(elm => elm.total).length">
             <div
-              v-for="(elm, elmIndex) in item.subClientDetails"
-              :key="elmIndex"
-              style="margin-bottom: 10px;padding-left: 10px"
+              v-for="(
+                item, itemIndex
+              ) in tabData.qualityProcessAndRdEfficiencyCopywriters.filter(
+                (elm) => (reportBizName ? elm.name === reportBizName : true)
+              )"
+              :key="itemIndex"
+              style="margin-bottom: 10px"
             >
-              <div class="fontWeight" style="margin-top: 10px">
-                {{ elm.subClientType }}{{ item.type }}{{ elm.total }}次
+              <div class="fontWeight" style="margin-bottom: 0px">
+                {{ item.type }}数据
               </div>
+              <div style="margin-top: 5px;color: #333;padding-left: 10px">本月{{ item.type }}<span style="font-weight: 500">{{ item.total }}</span>次</div>
               <div
-                v-for="(subItem, subindex) in elm.details"
-                :key="'sub_' + subindex"
-                style="margin-bottom: 5px"
+                v-for="(elm, elmIndex) in item.subClientDetails"
+                :key="elmIndex"
+                style="margin-bottom: 10px;padding-left: 10px"
               >
-                <div v-if="subItem.name" style="margin-top: 5px">
-                  <span class="fontWeight">{{ subindex + 1 }}、</span
-                  >{{ subItem.name
-                  }}<span
-v-if="subItem.description"
-                    >({{ subItem.description }})</span
-                  >
+                <div style="margin-top: 10px;color: #333;">
+                  <span style="color: #ED8F41;">{{ elm.subClientType }}</span>{{ item.type }}<span class="fontWeight">{{ elm.total }}</span>次
+                </div>
+                <div
+                  v-for="(subItem, subindex) in elm.details"
+                  :key="'sub_' + subindex"
+                  style="margin-bottom: 5px"
+                >
+                  <div v-if="subItem.name" style="margin-top: 5px">
+                    <span class="fontWeight">{{ subindex + 1 }}、</span
+                    >{{ subItem.name
+                    }}<span
+  v-if="subItem.description"
+                      >({{ subItem.description }})</span
+                    >
+                  </div>
                 </div>
               </div>
             </div>
           </div>
         </div>
+        <div v-if="!this.pieData.filter(elm => elm.total).length" class="no-data">各业务线{{ active }}类质量流程&研发效率问题为 <span style="font-size: 16px">0</span>!</div>
       </div>
     </boxCom>
   </div>
@@ -126,6 +130,7 @@ export default {
       })
     },
     echartsInit() {
+      this.pieData = this.tabData.qualityProcessAndRdEfficiencyCopywriters
       this.option = {
         color: [
           '#5470c6',
@@ -155,7 +160,7 @@ export default {
             // name: '访问来源',
             type: 'pie',
             radius: [0, '60%'],
-            data: this.tabData.qualityProcessAndRdEfficiencyCopywriters,
+            data: this.pieData,
             labelLine: {
               show: false
             },
@@ -177,7 +182,7 @@ export default {
             type: 'pie',
             radius: ['61%', '75%'],
             // data: this.subIndex > -1 && this.tabData.qualityProcessAndRdEfficiencyCopywriters[this.subIndex].subReportDetails,
-            data: this.tabData.qualityProcessAndRdEfficiencyCopywriters.map(elm => {
+            data: this.pieData.map(elm => {
               return elm.subReportDetails
             }).reduce((a, b) => a.concat(b)).filter(elm => elm.total),
             emphasis: {
@@ -224,8 +229,9 @@ export default {
       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 => {
+      this.pieData = this.tabData.qualityProcessAndRdEfficiencyCopywriters
+      this.option.series[0].data = this.pieData
+      this.option.series[1].data = this.pieData.map(elm => {
         return elm.subReportDetails
       }).reduce((a, b) => a.concat(b)).filter(elm => elm.total)
       this.myChart.setOption(this.option)
@@ -237,9 +243,9 @@ export default {
 <style scoped lang="less">
 .echarts-wrapper {
   margin-top: 0px;
-
+  position: relative;
   display: flex;
-  color: #666;
+  // color: #666;
   font-size: 12px;
   .pie-wrapper {
     width: 50%;
@@ -271,5 +277,12 @@ export default {
     display: inline-block;
     padding-left: 10px;
   }
+    .no-data {
+      top: 50%;
+  left: 0;
+  right: 0;
+  text-align: center;
+    position:absolute;
+  }
 }
 </style>

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

@@ -100,7 +100,7 @@ export default {
   }
 }
 .fontWeight {
-  color: #333;
+  // color: #333;
   font-weight: 500;
 }
 </style>

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

@@ -245,7 +245,7 @@ export default {
             test2++
           }
         })
-      if (newTitle.search(/提测打回|发版撤回|延期/g) > -1) {
+      if (newTitle.search(/提测打回|发版撤回|延期|增发/g) > -1) {
         newTitle = newTitle.replace(
           '{param}',
           `<hhtem class='${test1 > 0 ? 'red' : ''}'>${test1}</hhtem>`

+ 1 - 1
src/views/monthlyReport/index.vue

@@ -127,7 +127,7 @@ export default {
   },
   created() {
     // 获取部门数据
-    this.$store.dispatch('monthlyReportEdit/setSelectEnum')
+    this.$store.dispatch('monthlyReportEdit/setSelectEnum', 'init')
     this.getAvaliableInfo()
   },
   methods: {