|
@@ -14,7 +14,7 @@
|
|
|
<p v-text="person_popedom?(person_popedom.job?person_popedom.job:person_popedom.personRoleName):''"></p>
|
|
|
</div>
|
|
|
</div>
|
|
|
- <a class="signOut" @click="loginOut">
|
|
|
+ <a class="signOut" @click="doLoginOut">
|
|
|
退出
|
|
|
<i class="iconfont icon-tuichu"></i>
|
|
|
</a>
|
|
@@ -22,30 +22,30 @@
|
|
|
<div class="mui-card icon_number">
|
|
|
<div class="mui-card-header">
|
|
|
开发区健康统计
|
|
|
- <a class="mui-navigate-right iconfont icon-riqi" @click="selectDate" v-text="listForm.queryDate"></a>
|
|
|
+ <a class="mui-navigate-right iconfont icon-riqi" @click="selectDate" v-text="listForm.date"></a>
|
|
|
</div>
|
|
|
<div class="mui-card-content">
|
|
|
<div class="mui-col-xs-6">
|
|
|
- <a href="#">
|
|
|
- <span class="icon_number_green">209809</span>
|
|
|
+ <a>
|
|
|
+ <span class="icon_number_green" v-text="detail.totalNum"></span>
|
|
|
<div class="mui-media-body mui-ellipsis">应测人数</div>
|
|
|
</a>
|
|
|
</div>
|
|
|
<div class="mui-col-xs-6">
|
|
|
- <a href="#">
|
|
|
- <span class="icon_number_blue">3268</span>
|
|
|
+ <a>
|
|
|
+ <span class="icon_number_blue" v-text="detail.totalCheckNum"></span>
|
|
|
<div class="mui-media-body mui-ellipsis">已测人数</div>
|
|
|
</a>
|
|
|
</div>
|
|
|
<div class="mui-col-xs-6">
|
|
|
- <a href="#">
|
|
|
- <span class="icon_number_red">3268</span>
|
|
|
+ <a>
|
|
|
+ <span class="icon_number_red" v-text="detail.totalAbnormalNum"></span>
|
|
|
<div class="mui-media-body mui-ellipsis">异常人数</div>
|
|
|
</a>
|
|
|
</div>
|
|
|
<div class="mui-col-xs-6">
|
|
|
- <a href="#">
|
|
|
- <span class="icon_number_yellow">3268</span>
|
|
|
+ <a>
|
|
|
+ <span class="icon_number_yellow" v-text="detail.leaveNum"></span>
|
|
|
<div class="mui-media-body mui-ellipsis">离荆人数</div>
|
|
|
</a>
|
|
|
</div>
|
|
@@ -74,18 +74,11 @@
|
|
|
<div class="mui-card">
|
|
|
<div class="mui-card-content index-floor-2">
|
|
|
<ul class="mui-table-view">
|
|
|
- <li class="mui-table-view-cell flew-sp">
|
|
|
- <div class="mui-ellipsis mui-col-xs-6">开发区实验中学开发区实验中学开发区实验中学</div>
|
|
|
+ <li v-for="(item,index) in recordList" class="mui-table-view-cell flew-sp">
|
|
|
+ <div class="mui-ellipsis mui-col-xs-6" v-text="item.companyName"></div>
|
|
|
<div class="mui-media-body mui-col-xs-6 mui-text-right">
|
|
|
- <span class="green">已测51</span> /
|
|
|
- <span class="blue">应测5219</span>
|
|
|
- </div>
|
|
|
- </li>
|
|
|
- <li class="mui-table-view-cell flew-sp">
|
|
|
- <div class="mui-ellipsis mui-col-xs-6">开发区实验中学开发区实验中学开发区实验中学</div>
|
|
|
- <div class="mui-media-body mui-col-xs-6 mui-text-right">
|
|
|
- <span class="green">已测5</span> /
|
|
|
- <span class="blue">应测19</span>
|
|
|
+ <span class="green">已测{{item.totalCheckNum}}</span> /
|
|
|
+ <span class="blue">应测{{item.totalNum}}</span>
|
|
|
</div>
|
|
|
</li>
|
|
|
</ul>
|
|
@@ -99,10 +92,11 @@
|
|
|
|
|
|
<script>
|
|
|
require('$project/assets/js/mui.picker.min.js');
|
|
|
- import * as API_User from '$project/apis/user'
|
|
|
+ import * as API_statistic from '@/apis/Control/statistic'
|
|
|
import Common from '$project/components/Common.vue'
|
|
|
import Loading from '$project/components/Loading.vue'
|
|
|
import TopHeader from '$project/components/TopHeader.vue'
|
|
|
+ import isReachBottom from '$project/utils/isReachBottom'
|
|
|
import {
|
|
|
mapGetters,
|
|
|
mapMutations
|
|
@@ -126,12 +120,18 @@
|
|
|
pageTitle: '开发区监管端',
|
|
|
|
|
|
listForm: {
|
|
|
- queryDate: '',
|
|
|
- }
|
|
|
+ date: '',
|
|
|
+ pageIndex: '',
|
|
|
+ pageSize: 20,
|
|
|
+ totalPage: 1,
|
|
|
+ },
|
|
|
+ recordList: [],
|
|
|
+
|
|
|
+ detail: {}
|
|
|
}
|
|
|
},
|
|
|
created() {
|
|
|
- this.listForm.queryDate = parseUnixTime(currentTimeStamp(), '{y}-{m}-{d}');
|
|
|
+ this.listForm.date = parseUnixTime(currentTimeStamp(), '{y}-{m}-{d}');
|
|
|
},
|
|
|
methods: {
|
|
|
//选择时间
|
|
@@ -142,17 +142,65 @@
|
|
|
"beginYear": 2020,
|
|
|
"endYear": 2040,
|
|
|
"endDate": new Date(),
|
|
|
- "value": _this.listForm.queryDate
|
|
|
+ "value": _this.listForm.date
|
|
|
});
|
|
|
picker.show(function(rs) {
|
|
|
- _this.listForm.queryDate = rs.text;
|
|
|
+ _this.listForm.date = rs.text;
|
|
|
+ _this.listForm.pageIndex = 1;
|
|
|
_this.getList();
|
|
|
picker.dispose();
|
|
|
});
|
|
|
},
|
|
|
- //获取列表数据
|
|
|
- getList() {
|
|
|
+ //获取统计详情
|
|
|
+ getInfo() {
|
|
|
+ this.isLoading = true;
|
|
|
+ API_statistic.companySuperviseAllData({
|
|
|
+ date: this.listForm.date
|
|
|
+ }).then(response => {
|
|
|
|
|
|
+ this.detail = response;
|
|
|
+
|
|
|
+ this.isLoading = false;
|
|
|
+ }).catch(error => {
|
|
|
+ this.isLoading = false;
|
|
|
+ mui.toast(error);
|
|
|
+ })
|
|
|
+ },
|
|
|
+ //获取列表
|
|
|
+ getList() {
|
|
|
+ this.isLoading = true;
|
|
|
+ API_statistic.companySuperviseListData(this.listForm).then(response => {
|
|
|
+ this.isLoading = false;
|
|
|
+
|
|
|
+ if (response) {
|
|
|
+ if (this.listForm.pageIndex == 1) {
|
|
|
+ this.recordList = response.data;
|
|
|
+ this.listForm.pageIndex = response.pageNumber;
|
|
|
+ this.listForm.totalPage = response.totalPage;
|
|
|
+ } else {
|
|
|
+ this.recordList = [
|
|
|
+ ...this.recordList,
|
|
|
+ ...response.data
|
|
|
+ ];
|
|
|
+ }
|
|
|
+ }
|
|
|
+ this.listForm.pageIndex++;
|
|
|
+
|
|
|
+ }).catch(error => {
|
|
|
+ this.isLoading = false;
|
|
|
+ mui.toast(error);
|
|
|
+ })
|
|
|
+ },
|
|
|
+ //下拉事件
|
|
|
+ handleScrool() {
|
|
|
+ if (isReachBottom()) {
|
|
|
+ console.log('到达底部')
|
|
|
+ if (this.listForm.pageIndex <= this.listForm.totalPage && this.isLoading == false) {
|
|
|
+ this.getList();
|
|
|
+ } else {
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ }
|
|
|
},
|
|
|
//退出登录
|
|
|
loginOut() {
|
|
@@ -167,11 +215,28 @@
|
|
|
mui.toast(error);
|
|
|
})
|
|
|
},
|
|
|
+ doLoginOut() {
|
|
|
+ var btnArray = ['否', '是'];
|
|
|
+ mui.confirm('是否确认退出登录', '提示', btnArray, function(e) {
|
|
|
+ if (e.index == 1) {
|
|
|
+ _this.loginOut();
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
asynCallBack() {},
|
|
|
},
|
|
|
- mounted() {},
|
|
|
+ mounted() {
|
|
|
+ //获取统计详情
|
|
|
+ this.getInfo();
|
|
|
+ this.getList();
|
|
|
+ //监控下拉加载事件
|
|
|
+ var _this = this;
|
|
|
+ window.addEventListener('scroll', _this.handleScrool);
|
|
|
+ },
|
|
|
destroyed() {
|
|
|
-
|
|
|
+ //销毁监听事件
|
|
|
+ var _this = this;
|
|
|
+ window.removeEventListener('scroll', _this.handleScrool);
|
|
|
},
|
|
|
computed: {
|
|
|
...mapGetters({
|