健康上报
This commit is contained in:
		@@ -186,10 +186,6 @@ export default {
 | 
			
		||||
    ...mapState(['user'])
 | 
			
		||||
  },
 | 
			
		||||
 | 
			
		||||
  // onShow() {
 | 
			
		||||
    // this.$dict.load(['epidemicTouchInFourteen','EP_healthType','EP_nucleicAcidResult','EP_jkmType','epidemicVaccineTime']).then(()=> {})
 | 
			
		||||
  // },
 | 
			
		||||
 | 
			
		||||
  onLoad(query) {
 | 
			
		||||
    this.$dict.load(['epidemicTouchInFourteen','EP_healthType','EP_nucleicAcidResult','EP_jkmType','EP_vaccinationCount']).then(()=> {
 | 
			
		||||
      this.form.reportUserId = query.id
 | 
			
		||||
@@ -247,9 +243,8 @@ export default {
 | 
			
		||||
      this.$loading()
 | 
			
		||||
      this.$instance.post(`/app/appepidemicpreventionhealthreportinfo/addReportInfo`, {
 | 
			
		||||
        ...this.form,
 | 
			
		||||
        // openid: this.user.openid,
 | 
			
		||||
        jkmUrl: this.form.jkmUrlArr.toString(),
 | 
			
		||||
        nucleicAcidUrl: this.form.nucleicAcidUrlArr.toString(),
 | 
			
		||||
        jkmUrl: this.form.jkmUrlArr[0].url,
 | 
			
		||||
        nucleicAcidUrl: this.form.nucleicAcidUrlArr[0].url,
 | 
			
		||||
        nucleicAcidDate: this.form.nucleicAcidDate + ' 00:00:00'
 | 
			
		||||
      }).then(res => {
 | 
			
		||||
        if (res.code == 0) {
 | 
			
		||||
 
 | 
			
		||||
@@ -138,9 +138,8 @@ export default {
 | 
			
		||||
          this.$toast('提交成功')
 | 
			
		||||
          uni.$emit('update')
 | 
			
		||||
          setTimeout(() => {
 | 
			
		||||
            // ?id=${res.data.id}
 | 
			
		||||
            uni.redirectTo({
 | 
			
		||||
              url: `./Result`
 | 
			
		||||
              url: `./Result?id=${res.data.id}&name=${res.data.name}&idNumber=${res.data.idNumber}`
 | 
			
		||||
            })
 | 
			
		||||
          }, 400)
 | 
			
		||||
        }
 | 
			
		||||
 
 | 
			
		||||
@@ -13,14 +13,14 @@
 | 
			
		||||
        <div class="item-top">
 | 
			
		||||
          <div class="item-top__left">
 | 
			
		||||
            <h2>{{ item.name }}</h2>
 | 
			
		||||
            <p @click.stop="$linkTo('./UserInfo?id=' + item.id)" hover-class="text-hover">查看个人信息></p>
 | 
			
		||||
            <!-- <p @click.stop="$linkTo('./UserInfo?id=' + item.id)" hover-class="text-hover">查看个人信息></p> -->
 | 
			
		||||
          </div>
 | 
			
		||||
          <span v-if="item.status === '0'">健康数据异常</span>
 | 
			
		||||
          <span v-if="item.status === '1'">健康数据异常</span>
 | 
			
		||||
        </div>
 | 
			
		||||
        <div class="item-bottom">
 | 
			
		||||
          <div class="item-bottom__left">
 | 
			
		||||
            <span>健康上报第</span>
 | 
			
		||||
            <i>{{ item.searchCount || 0 }}</i>
 | 
			
		||||
            <i>{{ item.reportCount || 0 }}</i>
 | 
			
		||||
            <span>天</span>
 | 
			
		||||
          </div>
 | 
			
		||||
          <div class="item-bottom__right" hover-class="text-hover" v-if="!item.todayReport"
 | 
			
		||||
 
 | 
			
		||||
@@ -15,7 +15,7 @@
 | 
			
		||||
          <label>14天内是否接触新冠确诊或疑似患者</label>
 | 
			
		||||
        </div>
 | 
			
		||||
        <div class="right">
 | 
			
		||||
          <span :style="{color: info.touchInFourteen === '0' ? '#42D784' : '#FF4466'}">{{ $dict.getLabel('epidemicTouchInFourteen', info.touchInFourteen) }}</span>
 | 
			
		||||
          <span :style="{color: info.contactPatients === '0' ? '#42D784' : '#FF4466'}">{{ $dict.getLabel('epidemicTouchInFourteen', info.contactPatients) }}</span>
 | 
			
		||||
        </div>
 | 
			
		||||
      </div>
 | 
			
		||||
      <div class="detail-info__item">
 | 
			
		||||
@@ -23,7 +23,7 @@
 | 
			
		||||
          <label>当前健康状况</label>
 | 
			
		||||
        </div>
 | 
			
		||||
        <div class="right">
 | 
			
		||||
          <span :style="{color: !info.isHealth ? '#42D784' : '#FF4466'}">{{ info.healthName }}</span>
 | 
			
		||||
          <span :style="{color: info.health == 0 ? '#42D784' : '#FF4466'}">{{ $dict.getLabel('EP_healthType', info.health) }}</span>
 | 
			
		||||
        </div>
 | 
			
		||||
      </div>
 | 
			
		||||
    </div>
 | 
			
		||||
@@ -34,7 +34,7 @@
 | 
			
		||||
          <label>核酸检测日期</label>
 | 
			
		||||
        </div>
 | 
			
		||||
        <div class="right">
 | 
			
		||||
          <span>{{ info.checkTime.split(' ')[0] }}</span>
 | 
			
		||||
          <span>{{ info.nucleicAcidDate && info.nucleicAcidDate.substr(0, info.nucleicAcidDate.length - 8 ) }}</span>
 | 
			
		||||
        </div>
 | 
			
		||||
      </div>
 | 
			
		||||
      <div class="detail-info__item">
 | 
			
		||||
@@ -42,7 +42,7 @@
 | 
			
		||||
          <label>核酸检测结果</label>
 | 
			
		||||
        </div>
 | 
			
		||||
        <div class="right">
 | 
			
		||||
          <span :style="{color: info.checkResult === '0' ? '#42D784' : '#FF4466'}">{{ $dict.getLabel('epidemicRecentTestResult', info.checkResult) }}</span>
 | 
			
		||||
          <span :style="{color: info.nucleicAcidResult === '0' ? '#42D784' : '#FF4466'}">{{ $dict.getLabel('EP_nucleicAcidResult', info.nucleicAcidResult) }}</span>
 | 
			
		||||
        </div>
 | 
			
		||||
      </div>
 | 
			
		||||
      <div class="detail-info__item">
 | 
			
		||||
@@ -50,7 +50,7 @@
 | 
			
		||||
          <label>健康码状态</label>
 | 
			
		||||
        </div>
 | 
			
		||||
        <div class="right">
 | 
			
		||||
          <span :style="{color: info.healthCode === '0' || info.healthCode === '1' ? '#42D784' : '#FF4466'}">{{ $dict.getLabel('epidemicHealthCode', info.healthCode) }}</span>
 | 
			
		||||
          <span :style="{color: info.jkmType == 0 || info.jkmType == 1? '#42D784' : '#FF4466'}">{{ $dict.getLabel('EP_jkmType', info.jkmType) }}</span>
 | 
			
		||||
        </div>
 | 
			
		||||
      </div>
 | 
			
		||||
      <div class="detail-info__item">
 | 
			
		||||
@@ -58,15 +58,23 @@
 | 
			
		||||
          <label>已接种疫苗次数</label>
 | 
			
		||||
        </div>
 | 
			
		||||
        <div class="right">
 | 
			
		||||
          <span>{{ $dict.getLabel('epidemicVaccineTime', info.vaccine) }}</span>
 | 
			
		||||
          <span>{{ $dict.getLabel('EP_vaccinationCount', info.vaccinationCount) }}</span>
 | 
			
		||||
        </div>
 | 
			
		||||
      </div>
 | 
			
		||||
      <div class="detail-info__item detail-info__item--img">
 | 
			
		||||
      <div class="detail-info__item detail-info__item--img" v-if="info.jkmUrl">
 | 
			
		||||
        <div class="left">
 | 
			
		||||
          <label>本人健康码截图</label>
 | 
			
		||||
        </div>
 | 
			
		||||
        <div class="right">
 | 
			
		||||
          <image :src="item.url" @click="preview(item.url)" v-for="(item, index) in info.checkPhoto" :key="index" />
 | 
			
		||||
          <img :src="info.jkmUrl" @click="preview(info.jkmUrl)" />
 | 
			
		||||
        </div>
 | 
			
		||||
      </div>
 | 
			
		||||
      <div class="detail-info__item detail-info__item--img" v-if="info.nucleicAcidUrl">
 | 
			
		||||
        <div class="left">
 | 
			
		||||
          <label>本人核酸检测结果截图</label>
 | 
			
		||||
        </div>
 | 
			
		||||
        <div class="right">
 | 
			
		||||
          <img :src="info.nucleicAcidUrl" @click="preview(info.nucleicAcidUrl)" />
 | 
			
		||||
        </div>
 | 
			
		||||
      </div>
 | 
			
		||||
    </div>
 | 
			
		||||
@@ -79,13 +87,15 @@
 | 
			
		||||
    data () {
 | 
			
		||||
      return {
 | 
			
		||||
        info: {},
 | 
			
		||||
        pageShow: false
 | 
			
		||||
        pageShow: false,
 | 
			
		||||
        jkmUrlArr: [],
 | 
			
		||||
        nucleicAcidUrlArr: [],
 | 
			
		||||
      }
 | 
			
		||||
    },
 | 
			
		||||
 | 
			
		||||
    onLoad (query) {
 | 
			
		||||
      this.$loading()
 | 
			
		||||
      this.$dict.load(['epidemicTouchInFourteen', 'epidemicRecentHealth', 'epidemicRecentTestResult', 'epidemicHealthCode', 'epidemicVaccineTime']).then(() => {
 | 
			
		||||
      this.$dict.load(['epidemicTouchInFourteen', 'EP_healthType', 'EP_nucleicAcidResult', 'EP_jkmType', 'EP_vaccinationCount']).then(() => {
 | 
			
		||||
        this.getInfo(query.id)
 | 
			
		||||
      })
 | 
			
		||||
    },
 | 
			
		||||
@@ -93,32 +103,22 @@
 | 
			
		||||
    methods: {
 | 
			
		||||
      preview (url) {
 | 
			
		||||
        uni.previewImage({
 | 
			
		||||
          urls: this.info.checkPhoto.map(v => v.url),
 | 
			
		||||
          urls: [url],
 | 
			
		||||
          current: url
 | 
			
		||||
        })
 | 
			
		||||
      },
 | 
			
		||||
 | 
			
		||||
      getInfo (id) {
 | 
			
		||||
        this.$instance.post(`/app/appepidemichealthreport/queryDetailById?id=${id}`).then(res => {
 | 
			
		||||
        this.$instance.post(`/app/appepidemicpreventionhealthreportinfo/queryDetailById?id=${id}`).then(res => {
 | 
			
		||||
          if (res.code === 0) {
 | 
			
		||||
            this.info = res.data
 | 
			
		||||
            this.info.checkPhoto = JSON.parse(res.data.checkPhoto)
 | 
			
		||||
            let healthName = ''
 | 
			
		||||
            this.info.isHealth = false
 | 
			
		||||
            res.data.health.split(',').forEach(v => {
 | 
			
		||||
              if (v > 0) {
 | 
			
		||||
                this.info.isHealth = true
 | 
			
		||||
              }
 | 
			
		||||
              healthName = healthName + this.$dict.getLabel('epidemicRecentHealth', v)
 | 
			
		||||
            })
 | 
			
		||||
            this.info.healthName = healthName
 | 
			
		||||
 | 
			
		||||
            this.$nextTick(() => {
 | 
			
		||||
              this.pageShow = true
 | 
			
		||||
            })
 | 
			
		||||
            this.jkmUrlArr.push({url: res.data.jkmUrl})
 | 
			
		||||
            this.nucleicAcidUrlArr = [res.data.nucleicAcidUrl]
 | 
			
		||||
            this.pageShow = true
 | 
			
		||||
            this.$hideLoading()
 | 
			
		||||
          } else {
 | 
			
		||||
            this.$loading()
 | 
			
		||||
          }
 | 
			
		||||
 | 
			
		||||
          this.$hideLoading()
 | 
			
		||||
        })
 | 
			
		||||
      },
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -4,7 +4,7 @@
 | 
			
		||||
         hover-class="bg-hover">
 | 
			
		||||
      <div class="left">{{ item.createTime.split(' ')[0] }}的健康上报</div>
 | 
			
		||||
      <div class="right">
 | 
			
		||||
        <i v-if="item.status === '0'">健康数据异常</i>
 | 
			
		||||
        <i v-if="item.status == 1">健康数据异常</i>
 | 
			
		||||
        <u-icon name="arrow-right" color="#ddd"/>
 | 
			
		||||
      </div>
 | 
			
		||||
    </div>
 | 
			
		||||
@@ -33,29 +33,18 @@ export default {
 | 
			
		||||
  methods: {
 | 
			
		||||
    getList(query) {
 | 
			
		||||
      if (this.isMore) return
 | 
			
		||||
 | 
			
		||||
      this.$instance.post(`/app/appepidemichealthreport/list?memberId=${query.id}`, null, {
 | 
			
		||||
      this.$instance.post(`/app/appepidemicpreventionhealthreportinfo/list?reportUserId=${query.id}`, null, {
 | 
			
		||||
        params: {
 | 
			
		||||
          current: this.current,
 | 
			
		||||
          size: 15
 | 
			
		||||
          size: 10
 | 
			
		||||
        }
 | 
			
		||||
      }).then(res => {
 | 
			
		||||
        if (res.code == 0) {
 | 
			
		||||
          this.total = res.data.total
 | 
			
		||||
          if (this.current > 1) {
 | 
			
		||||
            this.list = [...this.list, ...res.data.records]
 | 
			
		||||
          } else {
 | 
			
		||||
            this.list = res.data.records
 | 
			
		||||
          }
 | 
			
		||||
          this.list = this.current == 1? res.data.records:[...this.list, ...res.data.records]
 | 
			
		||||
          uni.hideLoading()
 | 
			
		||||
          this.pageShow = true
 | 
			
		||||
          if (res.data.records.length < 15) {
 | 
			
		||||
            this.isMore = true
 | 
			
		||||
 | 
			
		||||
            return false
 | 
			
		||||
          }
 | 
			
		||||
 | 
			
		||||
          this.current = this.current + 1
 | 
			
		||||
          this.isMore = true
 | 
			
		||||
        } else {
 | 
			
		||||
          uni.hideLoading()
 | 
			
		||||
        }
 | 
			
		||||
@@ -66,6 +55,7 @@ export default {
 | 
			
		||||
  },
 | 
			
		||||
 | 
			
		||||
  onReachBottom() {
 | 
			
		||||
    this.current ++
 | 
			
		||||
    this.getList()
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -11,12 +11,16 @@
 | 
			
		||||
  export default {
 | 
			
		||||
    data () {
 | 
			
		||||
      return {
 | 
			
		||||
        id: ''
 | 
			
		||||
        id: '',
 | 
			
		||||
        name: '',
 | 
			
		||||
        idNumber: '',
 | 
			
		||||
      }
 | 
			
		||||
    },
 | 
			
		||||
 | 
			
		||||
    onLoad (query) {
 | 
			
		||||
      this.id = query.id
 | 
			
		||||
      this.name = query.name
 | 
			
		||||
      this.idNumber = query.idNumber
 | 
			
		||||
    },
 | 
			
		||||
 | 
			
		||||
    methods: {
 | 
			
		||||
@@ -28,7 +32,7 @@
 | 
			
		||||
 | 
			
		||||
      toReport () {
 | 
			
		||||
        uni.redirectTo({
 | 
			
		||||
          url: `./AddReport?id=${this.id}`
 | 
			
		||||
          url: `./AddReport?id=${this.id}&name=${this.name}&idNumber=${this.idNumber}`
 | 
			
		||||
        })
 | 
			
		||||
      }
 | 
			
		||||
    }
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user