健康上报
This commit is contained in:
		@@ -1,28 +1,27 @@
 | 
			
		||||
<template>
 | 
			
		||||
  <div class="HealthDetail">
 | 
			
		||||
    <div class="top" @click="toUserDetail">
 | 
			
		||||
    <div class="top">
 | 
			
		||||
      <div class="templates">
 | 
			
		||||
        <!-- <img :src="" alt=""  v-if='item.avatar'/> -->
 | 
			
		||||
        <img :src="userList.avatar" alt="" v-if="userList.avatar" />
 | 
			
		||||
        <img src="./components/img/user-img.png" alt="" />
 | 
			
		||||
 | 
			
		||||
        <div class="rightCont">
 | 
			
		||||
          <div class="rightContLeft">
 | 
			
		||||
            <div class="nameLeft">
 | 
			
		||||
              <div class="nameTop">
 | 
			
		||||
                <div class="names">李轶</div>
 | 
			
		||||
                <div class="types">异常</div>
 | 
			
		||||
                <div class="nucleate">核酸到期</div>
 | 
			
		||||
                <div class="names">{{ userList.name }}</div>
 | 
			
		||||
                <div class="types" v-if="userList.status == '0'">异常</div>
 | 
			
		||||
              </div>
 | 
			
		||||
 | 
			
		||||
              <div class="nameBottom">
 | 
			
		||||
                <span>上报第</span>
 | 
			
		||||
                <span class="num">3</span>
 | 
			
		||||
                <span class="num">{{ userList.diffNum }}</span>
 | 
			
		||||
                <span>天</span>
 | 
			
		||||
              </div>
 | 
			
		||||
            </div>
 | 
			
		||||
          </div>
 | 
			
		||||
 | 
			
		||||
          <div class="rightContRight">
 | 
			
		||||
          <div class="rightContRight" @click.stop="callPhone(userList.phone)">
 | 
			
		||||
            <img src="./components/img/phone2@.png" alt="" />
 | 
			
		||||
            <span class="call">拨打电话</span>
 | 
			
		||||
          </div>
 | 
			
		||||
@@ -33,25 +32,24 @@
 | 
			
		||||
    <div class="middle">
 | 
			
		||||
      <div class="record">异常情况记录</div>
 | 
			
		||||
 | 
			
		||||
      <template>
 | 
			
		||||
        <!-- v-if="data.length" -->
 | 
			
		||||
        <div class="templatess" v-for="(item, i) in 12" :key="i">
 | 
			
		||||
      <template v-if="data.length">
 | 
			
		||||
        <div class="templatess" v-for="(item, i) in data" :key="i" @click="toUserDetail(item)">
 | 
			
		||||
          <div class="left">
 | 
			
		||||
            <div class="recordType recordType1">正常</div>
 | 
			
		||||
            <!-- <div class="recordType recordType2">异常</div> -->
 | 
			
		||||
            <div class="tag">核酸到期</div>
 | 
			
		||||
            <div class="recordType recordType1" v-if="item.status == 1">正常</div>
 | 
			
		||||
            <div class="recordType recordType2" v-if="item.status == 0">异常</div>
 | 
			
		||||
          </div>
 | 
			
		||||
 | 
			
		||||
          <div class="right">
 | 
			
		||||
            <div class="times">2022-01-10</div>
 | 
			
		||||
            <div class="times">{{ item.checkTime }}</div>
 | 
			
		||||
            <u-icon name="arrow-right" color="#CCCCCC"></u-icon>
 | 
			
		||||
          </div>
 | 
			
		||||
        </div>
 | 
			
		||||
      </template>
 | 
			
		||||
 | 
			
		||||
      <!-- <AiEmpty description="暂无数据" class="emptyWrap" v-else></AiEmpty> -->
 | 
			
		||||
      <AiEmpty description="暂无数据" class="emptyWrap" v-else></AiEmpty>
 | 
			
		||||
    </div>
 | 
			
		||||
 | 
			
		||||
    <!-- v-if="userList.status == '0'" -->
 | 
			
		||||
    <div class="fixedBtn" @click="toErr">异常情况处理</div>
 | 
			
		||||
  </div>
 | 
			
		||||
</template>
 | 
			
		||||
@@ -67,6 +65,8 @@ export default {
 | 
			
		||||
    return {
 | 
			
		||||
      data: [],
 | 
			
		||||
      id: '',
 | 
			
		||||
      name: '',
 | 
			
		||||
      userList: [],
 | 
			
		||||
    }
 | 
			
		||||
  },
 | 
			
		||||
  computed: {
 | 
			
		||||
@@ -74,24 +74,30 @@ export default {
 | 
			
		||||
  },
 | 
			
		||||
  watch: {},
 | 
			
		||||
  onLoad(o) {
 | 
			
		||||
    console.log(o)
 | 
			
		||||
    if (o.id) {
 | 
			
		||||
      this.name = o.name
 | 
			
		||||
      this.id = o.id
 | 
			
		||||
      this.getDetail()
 | 
			
		||||
      this.phone = o.phone
 | 
			
		||||
      this.getUser()
 | 
			
		||||
    }
 | 
			
		||||
    this.getRecord()
 | 
			
		||||
 | 
			
		||||
    uni.$on('updateDetail', () => {
 | 
			
		||||
      this.getRecord()
 | 
			
		||||
    })
 | 
			
		||||
  },
 | 
			
		||||
  onShow() {
 | 
			
		||||
    document.title = '健康监测'
 | 
			
		||||
  },
 | 
			
		||||
  methods: {
 | 
			
		||||
    getDetail() {
 | 
			
		||||
    getUser() {
 | 
			
		||||
      this.$loading()
 | 
			
		||||
      this.$http
 | 
			
		||||
        .post(`/app/appepidemichealthreport/list`)
 | 
			
		||||
        .post(`/app/appepidemicreportmember/queryDetailById?id=${this.id}`)
 | 
			
		||||
        .then((res) => {
 | 
			
		||||
          if (res?.code == 0) {
 | 
			
		||||
            console.log(res.data)
 | 
			
		||||
            this.data = this.current > 1 ? [...this.data, ...res.data.records] : res.data.records
 | 
			
		||||
            this.userList = res.data
 | 
			
		||||
            this.$hideLoading()
 | 
			
		||||
          } else {
 | 
			
		||||
            this.$hideLoading()
 | 
			
		||||
@@ -105,10 +111,10 @@ export default {
 | 
			
		||||
    getRecord() {
 | 
			
		||||
      this.$loading()
 | 
			
		||||
      this.$http
 | 
			
		||||
        .post(`/app/appepidemicunusuallog/list`)
 | 
			
		||||
        .post(`/app/appepidemichealthreport/list?memberId=${this.id}`)
 | 
			
		||||
        .then((res) => {
 | 
			
		||||
          if (res?.code == 0) {
 | 
			
		||||
            console.log(res.data)
 | 
			
		||||
            this.data = this.current > 1 ? [...this.data, ...res.data.records] : res.data.records
 | 
			
		||||
            this.$hideLoading()
 | 
			
		||||
          } else {
 | 
			
		||||
            this.$hideLoading()
 | 
			
		||||
@@ -119,15 +125,19 @@ export default {
 | 
			
		||||
        })
 | 
			
		||||
    },
 | 
			
		||||
 | 
			
		||||
    toUserDetail() {
 | 
			
		||||
    callPhone(phone) {
 | 
			
		||||
      uni.makePhoneCall({ phoneNumber: phone })
 | 
			
		||||
    },
 | 
			
		||||
 | 
			
		||||
    toUserDetail(item) {
 | 
			
		||||
      uni.navigateTo({
 | 
			
		||||
        url: `./UserDetail`,
 | 
			
		||||
        url: `./UserDetail?id=${item.id}&temperature=${item.temperature}&touchInFourteen=${item.touchInFourteen}&health=${item.health}&checkTime=${item.checkTime}&checkResult=${item.checkResult}&checkPhoto=${item.checkPhoto}&status=${item.status}&memberId=${this.id}`,
 | 
			
		||||
      })
 | 
			
		||||
    },
 | 
			
		||||
 | 
			
		||||
    toErr() {
 | 
			
		||||
      uni.navigateTo({
 | 
			
		||||
        url: `./ErrorDetail`,
 | 
			
		||||
        url: `./ErrorDetail?id=${this.id}`,
 | 
			
		||||
      })
 | 
			
		||||
    },
 | 
			
		||||
  },
 | 
			
		||||
@@ -136,6 +146,7 @@ export default {
 | 
			
		||||
 | 
			
		||||
<style scoped lang="scss">
 | 
			
		||||
.HealthDetail {
 | 
			
		||||
  height: 100%;
 | 
			
		||||
  padding-bottom: 120px;
 | 
			
		||||
  background: #f3f6f9;
 | 
			
		||||
  .top {
 | 
			
		||||
@@ -177,14 +188,6 @@ export default {
 | 
			
		||||
                font-size: 24px;
 | 
			
		||||
                color: #cd413a;
 | 
			
		||||
              }
 | 
			
		||||
              .nucleate {
 | 
			
		||||
                margin-left: 8px;
 | 
			
		||||
                padding: 4px 16px 8px 16px;
 | 
			
		||||
                background: #fef5e8;
 | 
			
		||||
                border-radius: 20px;
 | 
			
		||||
                font-size: 24px;
 | 
			
		||||
                color: #f5a319;
 | 
			
		||||
              }
 | 
			
		||||
            }
 | 
			
		||||
            .nameBottom {
 | 
			
		||||
              margin-top: 12px;
 | 
			
		||||
@@ -240,15 +243,6 @@ export default {
 | 
			
		||||
        .recordType2 {
 | 
			
		||||
          color: #cd413a;
 | 
			
		||||
        }
 | 
			
		||||
        .tag {
 | 
			
		||||
          margin-left: 16px;
 | 
			
		||||
          background: #fef5e8;
 | 
			
		||||
          border-radius: 20px;
 | 
			
		||||
 | 
			
		||||
          font-size: 24px;
 | 
			
		||||
          color: #f5a319;
 | 
			
		||||
          padding: 4px 16px 2px 16px;
 | 
			
		||||
        }
 | 
			
		||||
      }
 | 
			
		||||
    }
 | 
			
		||||
    .emptyWrap {
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user