<!-- <template>
  <div class="page_allDryWeight">
    <van-sticky>
      <div class="allDryWeightTitle">
        <i class="iconfont icon-zuojiantou jiantou" @click="toReturn"></i>
        <span class="titleName">通路详情</span>
      </div>
    </van-sticky>
    <div class="dryWeightBox">
      <div class="dryWeightOne"  v-for="(item,index) in tableList" :key="index">
        <div class="weightContent">
          <ul>
            <li><p>启用日期：{{getTime(item.start_time,"{y}-{m}-{d}")}}</p></li>
           
            <li><p>项目：{{item.blood_project}}</p></li>
            <li><p>结果：{{item.blood_result}}</p></li>
            <li><p>处理：{{item.blood_dealwith}}</p></li>
             <li><p>评估人： {{getDoctor(item.creator)}}</p></li>
          </ul>
         
        </div>
       
      </div>
    </div>
  </div>
</template>

<script>
import '../../../styles/resetStyle.scss'
import { getVascularlAccessDetail } from '@/api/patient/patient'
import { uParseTime } from '@/utils/tools'
import { Dialog } from 'vant'
const moment = require('moment')
import { setRem, setHeight } from '@/libs/functionRem'
export default {
  props: {
    active: Number,
    dryId: String
  },
  data () {
    return {
      newShow: false,
      startShow: false,
      endShow: false,
      page: 1,
      limit: 100,
      patient_id: '',
      total: 0,
      list: [],
      loading: false,
      finished: false,
      patient_name: '',
      tableList:[],
      doctorList:[],
      date:""
    }
  },
  methods: {
    onLoad () {
      setTimeout(() => {
        this.page++
        if (this.page <= Math.ceil(this.total / 10)) {
          this.getDryWeight(
            this.patient_id,
            this.startTime,
            this.endTimes,
            this.limit,
            this.page
          )
        } else {
          this.loading = false
          this.finished = true
        }
      }, 1000)
    },
    getTime (time) {
     
      return uParseTime(time, '{y}-{m}-{d}')
    },
  
    getVascularlAccessDetail(id,patientid){
    
      const params = {
          parent_id:id,
          patient_id:patientid,
          limit:this.limit,
          page:this.page,
      }

     getVascularlAccessDetail(params).then(response=>{
        if(response.data.state == 1){
           var list = response.data.data.list
           console.log("list22222222",list)
           this.tableList = list
           var total =  response.data.data.total
           this.total = total
           var doctor = response.data.data.allDoctor
           this.doctorList = doctor
        }
     })
    },

     getDoctor(id){
       var name = ""
       for(let i=0;i<this.doctorList.length;i++){
          if(id == this.doctorList[i].admin_user_id){
             name = this.doctorList[i].user_name
          }
       }
       return name
     },

     toReturn () {
      var patientid = this.$route.query.patient_id
      this.$router.push(
        '/details?patient_id=' + patientid + '&date=' + this.date + '&patient_name=' + this.patient_name + '&active1=' + 0 + '&active2=' + 3
      )
    }
   
   
  },
  created () {
    setRem()
    setHeight()
    var id =  this.$route.query.id
    console.log("id2222",id)
    var patientid = this.$route.query.patient_id
    console.log("patientid",patientid)
    var date =  this.$route.query.date
    this.date = date
    this.getVascularlAccessDetail(id,patientid)
   
  }
}
</script>

<style lang="scss" scoped>
.page_allDryWeight {
  height: 100%;
  overflow-y: auto;
  .allDryWeightTitle {
    background: #fff;
    padding: 0 1.125rem;
    height: 3.125rem;
    display: flex;
    align-items: center;
  }
  .jiantou {
    font-size: 1.5rem;
    font-weight: 600;
    margin-right: 6rem;
  }
  .titleName {
    font-size: 1.125rem;
    font-weight: 600;
  }
  .dryWeightBox {
    padding: 0 1.125rem;
    margin-bottom: 3.125rem;
  }
  .dryWeightOne {
    box-shadow: 0px 1px 0px 0px rgba(0, 0, 0, 0.1);
    padding-bottom: 1.25rem;
    .time {
      font-size: 1.125rem;
      margin-top: 0.625rem;
      font-weight: bold;
    }
  }
  .weightContent {
    font-size: 0.875rem;
    color: rgba(49, 50, 52, 1);
    display: flex;
    p {
      line-height: 1.125rem;
      margin-right: 0.625rem;
      margin-top: 0.375rem;
    }
  }
  .doctorBox {
    font-size: 0.75rem;
    color: rgba(152, 152, 152, 1);
    line-height: 1.125rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 0.625rem;
  }
}
::-webkit-scrollbar {
  width: 0;
}
</style> -->