Browse Source

修改项目首页

fujunwen 4 years ago
parent
commit
ccc9611c20
2 changed files with 11 additions and 9 deletions
  1. BIN
      src/assets/images/icons/warning.png
  2. 11 9
      src/views/homepage/index.vue

BIN
src/assets/images/icons/warning.png


+ 11 - 9
src/views/homepage/index.vue

@@ -62,7 +62,7 @@
                                         </div>
                                         </div>
                                         <p class="line">
                                         <p class="line">
                                             <span>
                                             <span>
-                                                <em :style="{color:item.level == 1? '#646C73':'#C13830'}">{{option.due_num}}</em>/<em>{{option.unfinished}}</em>/<em >{{option.total}}</em>
+                                                <em :style="dueNumStyle(option)">{{option.due_num}}</em>/<em>{{option.unfinished}}</em>/<em >{{option.total}}</em>
                                             </span>
                                             </span>
                                         </p>
                                         </p>
                                     </div>
                                     </div>
@@ -151,6 +151,15 @@ export default {
     },
     },
 
 
     methods: {
     methods: {
+        dueNumStyle (option) {
+            console.log(option)
+            let bool = option.due_num === 0
+            return {
+                color:bool ? '646C73': '#C13830',
+                fontWeight: bool ? 'normal' :'bold',
+                fontSize: bool ? '12px' : '18px'
+            }
+        },
         imgSrc(code) {
         imgSrc(code) {
             return require('../../assets/images/icons/' + code + '.png')
             return require('../../assets/images/icons/' + code + '.png')
         },
         },
@@ -245,14 +254,10 @@ export default {
                                 this.cardsList[1].push(item)
                                 this.cardsList[1].push(item)
                             }
                             }
                         })
                         })
-                        this.cardsList.forEach(item=>{
+                        this.cardsList.forEach(item=>{   
                             item.forEach(eq=>{
                             item.forEach(eq=>{
                                 if (eq.rptGlsmsStatisticsList) {
                                 if (eq.rptGlsmsStatisticsList) {
-                                    eq.assetTypeList.forEach(item => {
-                                        item.is_exception_num = 10
-                                    })   
                                     eq.rptGlsmsStatisticsList.forEach(each => {
                                     eq.rptGlsmsStatisticsList.forEach(each => {
-                                        
                                         if (each.type === 1) {
                                         if (each.type === 1) {
                                             each.sort = 0
                                             each.sort = 0
                                         } else if (each.type === 2) {
                                         } else if (each.type === 2) {
@@ -261,7 +266,6 @@ export default {
                                             each.sort = 2
                                             each.sort = 2
                                         }
                                         }
                                     })
                                     })
-                                  
                                     eq.rptGlsmsStatisticsList = sortBy(eq.rptGlsmsStatisticsList, (item) => {return item.sort})
                                     eq.rptGlsmsStatisticsList = sortBy(eq.rptGlsmsStatisticsList, (item) => {return item.sort})
                                 }
                                 }
                             })
                             })
@@ -526,9 +530,7 @@ export default {
                                             font-weight: normal;
                                             font-weight: normal;
                                         }
                                         }
                                         em:first-child {
                                         em:first-child {
-                                            font-size: 20px;
                                             font-family: 'persagy';
                                             font-family: 'persagy';
-                                            font-weight: bold;
                                         }
                                         }
                                     }
                                     }
                                 }
                                 }