疫情
This commit is contained in:
@@ -5,31 +5,31 @@
|
|||||||
<div class="content-info">
|
<div class="content-info">
|
||||||
<div class="title">
|
<div class="title">
|
||||||
<h2>实时数据统计</h2>
|
<h2>实时数据统计</h2>
|
||||||
<div>截止2021-01-19</div>
|
<div>截止{{toadyText}}</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="tab-content">
|
<div class="tab-content">
|
||||||
<div class="tab-item">
|
<div class="tab-item">
|
||||||
<h2 class="color-5AAD6A">30446</h2>
|
<h2 class="color-5AAD6A">{{totalInfo.back1}}</h2>
|
||||||
<p>返乡人数</p>
|
<p>返乡人数</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="tab-item">
|
<div class="tab-item">
|
||||||
<h2 class="color-4185F5">304</h2>
|
<h2 class="color-4185F5">{{totalInfo.back2}}</h2>
|
||||||
<p>今日新增返乡</p>
|
<p>今日新增返乡</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="tab-item">
|
<div class="tab-item">
|
||||||
<h2 class="color-CD413A">3</h2>
|
<h2 class="color-CD413A">{{totalInfo.back3}}</h2>
|
||||||
<p>今日返乡异常</p>
|
<p>今日返乡异常</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="tab-item">
|
<div class="tab-item">
|
||||||
<h2 class="color-5AAD6A">30446</h2>
|
<h2 class="color-5AAD6A">{{totalInfo.report1}}</h2>
|
||||||
<p>健康上报人数</p>
|
<p>健康上报人数</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="tab-item">
|
<div class="tab-item">
|
||||||
<h2 class="color-4185F5">46</h2>
|
<h2 class="color-4185F5">{{totalInfo.report2}}</h2>
|
||||||
<p>今日上报人数</p>
|
<p>今日上报人数</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="tab-item">
|
<div class="tab-item">
|
||||||
<h2 class="color-CD413A">0</h2>
|
<h2 class="color-CD413A">{{totalInfo.report3}}</h2>
|
||||||
<p>今日上报异常</p>
|
<p>今日上报异常</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -41,7 +41,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="echart-content">
|
<div class="echart-content">
|
||||||
<div class="title">返乡数据统计</div>
|
<div class="title">返乡数据统计</div>
|
||||||
<div class="echart"></div>
|
<div class="echart" id="statistic"></div>
|
||||||
<div class="type-text"><span class="tips bg-32C5FF"></span>新增返乡人数 <span class="tips bg-FFAA44"></span>新增异常人数</div>
|
<div class="type-text"><span class="tips bg-32C5FF"></span>新增返乡人数 <span class="tips bg-FFAA44"></span>新增异常人数</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -49,18 +49,95 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { mapState } from 'vuex'
|
import { mapState } from 'vuex'
|
||||||
|
import echarts from 'echarts'
|
||||||
export default {
|
export default {
|
||||||
name: 'AppEpidemicSituation',
|
name: 'AppEpidemicSituation',
|
||||||
appName: '疫情防控',
|
appName: '疫情防控',
|
||||||
data() {
|
data() {
|
||||||
return {}
|
return {
|
||||||
|
toadyText: '',
|
||||||
|
totalInfo: {},
|
||||||
|
echartData: null
|
||||||
|
}
|
||||||
},
|
},
|
||||||
computed: { ...mapState(['user']) },
|
computed: { ...mapState(['user']) },
|
||||||
onShow() {
|
onShow() {
|
||||||
document.title = '疫情防控'
|
document.title = '疫情防控'
|
||||||
},
|
},
|
||||||
|
onLoad() {
|
||||||
|
|
||||||
|
var date = new Date();
|
||||||
|
this.toadyText = date.getFullYear() + '-' + date.getMonth()+1 + '-' + date.getDate()
|
||||||
|
this.getTotal()
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
getTotal() {
|
||||||
|
this.$http.post(`/app/appepidemicbackhomerecord/statisticForQW`).then((res) => {
|
||||||
|
if (res.code == 0) {
|
||||||
|
this.totalInfo = res.data.map
|
||||||
|
var xData = [], yDataBack = [], yDataError = []
|
||||||
|
for(let key in res.data.fiveTotal){
|
||||||
|
xData.push(key)
|
||||||
|
yDataBack.push(res.data.fiveTotal[key])
|
||||||
|
}
|
||||||
|
for(let key in res.data.fiveUnusual){
|
||||||
|
yDataError.push(res.data.fiveUnusual[key])
|
||||||
|
}
|
||||||
|
this.chartInit(xData, yDataBack, yDataError)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
chartInit(xData, yDataBack, yDataError) {
|
||||||
|
console.log(xData)
|
||||||
|
this.echartData = echarts.init(document.getElementById('statistic'))
|
||||||
|
var option = {
|
||||||
|
grid: {
|
||||||
|
left: '6%',
|
||||||
|
right: '8%',
|
||||||
|
bottom: '3%',
|
||||||
|
containLabel: true
|
||||||
|
},
|
||||||
|
xAxis: {
|
||||||
|
type: 'category',
|
||||||
|
boundaryGap: false,
|
||||||
|
data: xData
|
||||||
|
},
|
||||||
|
yAxis: {
|
||||||
|
type: 'value'
|
||||||
|
},
|
||||||
|
series: [
|
||||||
|
{
|
||||||
|
type: 'line',
|
||||||
|
data: yDataBack,
|
||||||
|
lineStyle: {
|
||||||
|
normal: {
|
||||||
|
color: '#32c5ff'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
itemStyle : {
|
||||||
|
normal : {
|
||||||
|
color:'#32c5ff',
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
type: 'line',
|
||||||
|
data: yDataError,
|
||||||
|
lineStyle: {
|
||||||
|
normal: {
|
||||||
|
color: '#ffaa44'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
itemStyle : {
|
||||||
|
normal : {
|
||||||
|
color:'#ffaa44',
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
]
|
||||||
|
};
|
||||||
|
this.echartData.setOption(option)
|
||||||
|
},
|
||||||
toHealth(){
|
toHealth(){
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url:`./Health`
|
url:`./Health`
|
||||||
|
|||||||
@@ -102,8 +102,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="line-bg" style="padding-bottom: 56px;"></div>
|
<div class="line-bg" style="padding-bottom: 56px;"></div>
|
||||||
<div class="footer" @click="toError">异常情况处理</div>
|
<div class="footer" @click="toError" v-if="info.status != 1">异常情况处理</div>
|
||||||
<!-- v-if="info.status != 1" -->
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user