bug
This commit is contained in:
		| @@ -139,7 +139,7 @@ | |||||||
|         <div class="item-wrapper"> |         <div class="item-wrapper"> | ||||||
|           <div class="item-top__item"> |           <div class="item-top__item"> | ||||||
|             <h2>{{ girdInfo['村民警员'] || 0 }}</h2> |             <h2>{{ girdInfo['村民警员'] || 0 }}</h2> | ||||||
|             <p>村民警员</p> |             <p>村区民警</p> | ||||||
|           </div> |           </div> | ||||||
|           <div class="item-top__item"> |           <div class="item-top__item"> | ||||||
|             <h2>{{ girdInfo['居民群'] || 0 }}</h2> |             <h2>{{ girdInfo['居民群'] || 0 }}</h2> | ||||||
| @@ -344,7 +344,7 @@ | |||||||
|             this.initLineChart('.chart2', { |             this.initLineChart('.chart2', { | ||||||
|               x: res.data['群成员数'].map(v => v.month), |               x: res.data['群成员数'].map(v => v.month), | ||||||
|               value: res.data['群成员数'].map(v => v.totalNumber), |               value: res.data['群成员数'].map(v => v.totalNumber), | ||||||
|               name: '居民群' |               name: '群成员' | ||||||
|             }) |             }) | ||||||
|           } |           } | ||||||
|         }) |         }) | ||||||
| @@ -427,10 +427,12 @@ | |||||||
|                 this.list = list.map(v => { |                 this.list = list.map(v => { | ||||||
|                   return { |                   return { | ||||||
|                     ...v, |                     ...v, | ||||||
|                     rate1: (v['居民群'] / v1 * 100).toFixed(0) + '%', |                     rate1: v1 === 0 ? '0%' : (v['居民群'] / v1 * 100).toFixed(0) + '%', | ||||||
|                     rate2: (v['群成员'] / v2 * 100).toFixed(0) + '%' |                     rate2: v2 === 0 ? '0%' : (v['群成员'] / v2 * 100).toFixed(0) + '%' | ||||||
|                   } |                   } | ||||||
|                 }) |                 }) | ||||||
|  |               } else { | ||||||
|  |                 this.list = [] | ||||||
|               } |               } | ||||||
|             } |             } | ||||||
|           }) |           }) | ||||||
| @@ -440,7 +442,7 @@ | |||||||
|           if (res.code === 0) { |           if (res.code === 0) { | ||||||
|             this.girdInfo = res.data.countInfo |             this.girdInfo = res.data.countInfo | ||||||
|             this.gridList = res.data.groupList |             this.gridList = res.data.groupList | ||||||
|             if (res.data.typeInfo) { |             if (res.data.typeInfo.length) { | ||||||
|               this.total = res.data.typeInfo.map(v => v.c).reduce((x, y) => x + y) |               this.total = res.data.typeInfo.map(v => v.c).reduce((x, y) => x + y) | ||||||
|               this.typeList = res.data.typeInfo.map(v => { |               this.typeList = res.data.typeInfo.map(v => { | ||||||
|                 return { |                 return { | ||||||
| @@ -449,6 +451,9 @@ | |||||||
|                 } |                 } | ||||||
|               }) |               }) | ||||||
|               this.initChart5('.chart10', this.typeList) |               this.initChart5('.chart10', this.typeList) | ||||||
|  |             } else { | ||||||
|  |               this.total = 0 | ||||||
|  |               this.typeList = [] | ||||||
|             } |             } | ||||||
|           } |           } | ||||||
|         }) |         }) | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user