|
@@ -1,67 +1,192 @@
|
|
|
<template>
|
|
|
<div>
|
|
|
- <header class="mui-bar mui-bar-nav">
|
|
|
- <h1 class="mui-title">健康档案</h1>
|
|
|
- <a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left"></a>
|
|
|
- </header>
|
|
|
+ <common @asynCallBack="asynCallBack"></common>
|
|
|
+ <top-header :pageTitle="pageTitle"></top-header>
|
|
|
+
|
|
|
<div class="mui-content vongi-archives">
|
|
|
<div class="vongi-clasadmin">
|
|
|
- <h4>班级健康码统计</h4>
|
|
|
+ <h4>健康码统计</h4>
|
|
|
<div class="vongi-clasadmin-list">
|
|
|
- <div class="vongi-clasadmin-ma mui-col-xs-3">
|
|
|
- <span class="color55f868">2953</span>
|
|
|
- <div class="mui-media-body">绿码</div>
|
|
|
- </div>
|
|
|
- <div class="vongi-clasadmin-ma mui-col-xs-3">
|
|
|
- <span class="colorf8b155">12</span>
|
|
|
- <div class="mui-media-body">黄码</div>
|
|
|
- </div>
|
|
|
- <div class="vongi-clasadmin-ma mui-col-xs-3">
|
|
|
- <span class="colorfe616c">0</span>
|
|
|
- <div class="mui-media-body">红码</div>
|
|
|
- </div>
|
|
|
- <div class="vongi-clasadmin-ma mui-col-xs-3">
|
|
|
- <span class="color999">23</span>
|
|
|
- <div class="mui-media-body">灰码</div>
|
|
|
+ <div v-for="(item,index) in statList" class="vongi-clasadmin-ma mui-col-xs-3">
|
|
|
+ <span class="color55f868" :style="'color:'+getGreenCodeColor(item.healthyCode)" v-text="item.total"> </span>
|
|
|
+ <div class="mui-media-body" v-text="getCodeStatusName(item.healthyCode)"></div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
<ul class="mui-table-view">
|
|
|
- <li class="mui-table-view-cell">
|
|
|
- <a class="mui-navigate-right" href="#">
|
|
|
+ <li v-for="(item,index) in recordList" class="mui-table-view-cell">
|
|
|
+ <router-link :to="{name: 'CommonHealthCert',query: {personId: item.id}}" class="mui-navigate-right">
|
|
|
<div class="mui-pull-left flew-items">
|
|
|
- <div class="mui-media-object flew"><img src="~$project/assets/img/03.jpg" width="50" /></div>
|
|
|
- <h4>郭麒麟</h4>
|
|
|
- <span class="mui-icon iconfont icon-erweima1 color55f868"></span>
|
|
|
+ <div class="mui-media-object flew"><img :src="item.faceImageUrl+'?x-oss-process=image/resize,h_100'" width="50" /></div>
|
|
|
+ <h4 v-text="item.name"></h4>
|
|
|
+ <span class="mui-icon iconfont icon-erweima1 color55f868" :style="'color: '+getGreenCodeColor(item['healthyCode'])+';line-height: 27px'"></span>
|
|
|
</div>
|
|
|
- <div class="mui-pull-right color55f868">正常 36.5</div>
|
|
|
- </a>
|
|
|
- </li>
|
|
|
- <li class="mui-table-view-cell">
|
|
|
- <a class="mui-navigate-right" href="#">
|
|
|
- <div class="mui-pull-left flew-items">
|
|
|
- <div class="mui-media-object flew"><img src="~$project/assets/img/03.jpg" width="50" /></div>
|
|
|
- <h4>郭麒麟</h4>
|
|
|
- <span class="mui-icon iconfont icon-erweima1 colorfe616c"></span>
|
|
|
- </div>
|
|
|
- <div class="mui-pull-right colorfe616c">异常 37.8</div>
|
|
|
- </a>
|
|
|
+ <div class="mui-pull-right color55f868">{{item.lastTemperatureLog==null?'未测温':''}} {{item.lastTemperatureLog}}</div>
|
|
|
+ </router-link>
|
|
|
</li>
|
|
|
</ul>
|
|
|
</div>
|
|
|
<div class="vongi-archives-search mui-btn flew">
|
|
|
- <a class="mui-active">按学号排序</a>
|
|
|
- <a class="">按拼音排序</a>
|
|
|
+ <a :class="listForm.sortType=='1'?'mui-active':''" @click="reSort('1')">按学号排序</a>
|
|
|
+ <a :class="listForm.sortType=='2'?'mui-active':''" @click="reSort('2')">按拼音排序</a>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
+ import * as API_Admin from '@/apis/HouseKeeper/admin'
|
|
|
+ import Common from '$project/components/Common.vue'
|
|
|
+ import Loading from '$project/components/Loading.vue'
|
|
|
+ import isReachBottom from '$project/utils/isReachBottom'
|
|
|
+ import TopHeader from '$project/components/TopHeader.vue'
|
|
|
+ import {
|
|
|
+ mapGetters,
|
|
|
+ mapMutations
|
|
|
+ } from 'vuex'
|
|
|
+ export default {
|
|
|
+ name: 'HouseKeeperAdminlHealthArchives',
|
|
|
+ components: {
|
|
|
+ Common,
|
|
|
+ Loading,
|
|
|
+ TopHeader
|
|
|
+ },
|
|
|
+ data() {
|
|
|
+ return {
|
|
|
+ pageTitle: '健康档案',
|
|
|
+
|
|
|
+ isLoading: false,
|
|
|
+
|
|
|
+ listForm: {
|
|
|
+ pageIndex: 1,
|
|
|
+ pageSize: 20,
|
|
|
+ totalPage: 1,
|
|
|
+ sortType: '1'
|
|
|
+ },
|
|
|
+ recordList: [],
|
|
|
+
|
|
|
+ loadAll: false,
|
|
|
+
|
|
|
+ statList: [],
|
|
|
+ }
|
|
|
+ },
|
|
|
+ created() {},
|
|
|
+ methods: {
|
|
|
+ //重置排序
|
|
|
+ reSort(type) {
|
|
|
+ this.listForm.sortType = type;
|
|
|
+ this.listForm.pageIndex = 1;
|
|
|
+ this.getList();
|
|
|
+ },
|
|
|
+
|
|
|
+ //获取健康码颜色值
|
|
|
+ getGreenCodeColor(healthyCode) {
|
|
|
+ var healthyCode = healthyCode || '11';
|
|
|
+ var color = {
|
|
|
+ "00": '#09ae47',
|
|
|
+ "01": '#e5aa37',
|
|
|
+ "10": '#fe616c',
|
|
|
+ "11": '#C0C0C0'
|
|
|
+ }
|
|
|
+ return color[healthyCode];
|
|
|
+ },
|
|
|
+
|
|
|
+ //判断状态
|
|
|
+ getCodeStatusName(code) {
|
|
|
+ if (code == '00') {
|
|
|
+ return '绿码';
|
|
|
+ } else if (code == '01') {
|
|
|
+ return '黄码';
|
|
|
+ } else if (code == '10') {
|
|
|
+ return '红码';
|
|
|
+ } else if (code == '11') {
|
|
|
+ return '灰码';
|
|
|
+ } else {
|
|
|
+ return '无码';
|
|
|
+ }
|
|
|
+ },
|
|
|
+ //获取绿码统计数据
|
|
|
+ getHealthyCodeStat() {
|
|
|
+ this.isLoading = true;
|
|
|
+ API_Admin.getHealthyCodeStat(this.person_data.companyId).then(response => {
|
|
|
+ this.isLoading = false;
|
|
|
+ this.statList = response;
|
|
|
+ }).catch(error => {
|
|
|
+ this.isLoading = false;
|
|
|
+ this.mui.toast(error);
|
|
|
+ })
|
|
|
+ },
|
|
|
+ //获取列表
|
|
|
+ getList() {
|
|
|
+ this.isLoading = true;
|
|
|
+ API_Admin.getHealthyPersonList(this.listForm).then(response => {
|
|
|
+ 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++;
|
|
|
+ this.isLoading = false;
|
|
|
+ }).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;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
+ asynCallBack() {
|
|
|
+
|
|
|
+ },
|
|
|
+ },
|
|
|
+ mounted() {
|
|
|
+ //获取数量统计
|
|
|
+ this.getHealthyCodeStat();
|
|
|
+ this.getList();
|
|
|
+ //监控下拉加载事件
|
|
|
+ var _this = this;
|
|
|
+ window.addEventListener('scroll', _this.handleScrool);
|
|
|
+ },
|
|
|
+ destroyed() {
|
|
|
+ //销毁监听事件
|
|
|
+ var _this = this;
|
|
|
+ window.removeEventListener('scroll', _this.handleScrool);
|
|
|
+ },
|
|
|
+ computed: {
|
|
|
+ ...mapGetters({
|
|
|
+ openId: 'wx_openid',
|
|
|
+ token: 'token',
|
|
|
+ person_data: 'person_data',
|
|
|
+ company_data: 'company_data',
|
|
|
+ })
|
|
|
+ }
|
|
|
+ }
|
|
|
</script>
|
|
|
|
|
|
<style scoped src="$project/assets/css/sczpfyy.css"></style>
|
|
|
<style scoped src="$project/assets/css/xpwyfyy.css"></style>
|
|
|
<style src="$project/assets/css/iconfont.css"></style>
|
|
|
-<style>
|
|
|
+<style scoped>
|
|
|
+ .vongi-archives-search {
|
|
|
+ position: fixed;
|
|
|
+ }
|
|
|
+
|
|
|
+ .vongi-archives {
|
|
|
+ margin-bottom: 60px;
|
|
|
+ }
|
|
|
</style>
|