소스 검색

集团首页项目修改

fujunwen 4 년 전
부모
커밋
c1100b7665
1개의 변경된 파일19개의 추가작업 그리고 9개의 파일을 삭제
  1. 19 9
      src/views/statistics/index.vue

+ 19 - 9
src/views/statistics/index.vue

@@ -93,7 +93,7 @@
                         <div class='img'>
                             <img src='../../assets/images/icons/ratio.png' />
                         </div>
-                        <p>上线管理说明书数量</p>
+                        <p>上线管理说明书广场数量</p>
                         <strong>{{plazaInfoCount.upwcCount}}</strong>
                     </div>
                     <div class='card' @click='navToIntroduceUpdate'>
@@ -134,7 +134,7 @@
                                     <span>{{option.cname}}</span>
                                     <span v-if='item.title === "专维"'>
                                         <span>{{option.rptGlsmsStatistics.unfinished}} /</span>
-                                        <span>{{option.rptGlsmsStatistics.due_num}} /</span>
+                                        <span>{{option.rptGlsmsStatistics.overdue_unfinished || 0}} /</span>
                                         <span>{{option.rptGlsmsStatistics.total}}</span>
                                     </span>
                                     <span v-else>
@@ -533,17 +533,22 @@ export default {
         */
         barStyle(item, title) {
             let bg = ''
-            let type = this.selectColorByNum(item.due_num, item.total)
+            // let type = this.selectColorByNum(item.due_num, item.total)
             let ratio = 0
             if (title === '专维') {
-                if (item.overdue_unfinished >0) {
+                item.overdue_unfinished = item.overdue_unfinished || 0
+                if (item.overdue_unfinished >0 || item.unfinished > 0) {
                     bg = 'linear-gradient(to right, #F54E45 , #F54E45)'  
-                } else {
-                    bg = this.barColors[type]
                 }
-                ratio = ((item.overdue_unfinished  + item.due_num) / item.total) * 100
+                // else {
+                //     bg = this.barColors[type]
+                // }
+                ratio = ((item.overdue_unfinished  + item.unfinished) / item.total) * 100
             } else {
-                bg = this.barColors[type]
+                if (item.due_num > 0) {
+                    bg = 'linear-gradient(to right, #F54E45 , #F54E45)'  
+                }
+                // bg = this.barColors[type]
                 ratio = (item.due_num / item.total) * 100
             }
             return {
@@ -669,6 +674,11 @@ export default {
             queryEventStatus(params).then(res => {
                 if (res.result === 'success') {
                     let data = res.data
+                    data[0].forEach(item => {
+                        if (typeof item.rptGlsmsStatistics.overdue_unfinished  === 'undefined') {
+                            item.rptGlsmsStatistics.overdue_unfinished = 0
+                        }
+                    })
                     let orginalObj = { 
                         1:{title:'维保',data:[], expand: 0, showToolTip:false},
                         2:{title:'第三方检测',data:[], expand: 0, showToolTip:false},
@@ -683,7 +693,7 @@ export default {
                             // due_num 即将逾期    unfinished 逾期未完成
                             if (key == '0') {
                                 sortData.forEach(item => {
-                                    item.sort = item.rptGlsmsStatistics.due_num + item.rptGlsmsStatistics.unfinished
+                                    item.sort = item.rptGlsmsStatistics.overdue_unfinished + item.rptGlsmsStatistics.unfinished
                                 })
                             } else {
                                 sortData.forEach(item => {