1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375 |
- <template>
- <view class="mb-5">
- <view class="m-3" v-if="propData.patient">
- <view class="centerY mt-3">
- <view class="bule_line"></view>
- <text class="font-bold text-dark ml-2 fs-16 line-height1">基本信息</text>
- </view>
- <!-- 基本信息 -->
- <view class="card mb-2 fs-14 mt-3 p-3" style="color: #818181;">
- <view class="w-50 mb-2 d-inline-block">
- 姓名:<span class="font-bold text-dark fs-14">{{propData.patient.username||''}}</span>
- </view>
- <view class="w-50 mb-2 d-inline-block">
- 性别:{{propData.patient.sex==1?'男':'女'||''}}
- </view>
- <view class="w-50 mb-2 d-inline-block">
- 年龄:{{$mf.getIDCardInfo(propData.patient.idCard).age||''}}
- </view>
- <view class="w-50 mb-2 d-inline-block">
- 慢病类型:<span
- class="font-bold text-dark fs-14">{{CHRONIC_DISEASE_TYPE[propData.patient.chronicDiseaseType-1].label}}</span>
- </view>
- <view class="w-50 mb-2 d-inline-block" v-if="1">
- 糖尿病病龄:<span class="font-bold text-dark fs-14">{{propData.patient.tnbIllTime
- ? (
- (new Date().getTime() - new Date(propData.patient.tnbIllTime).getTime()) /
- 31536000000
- ).toFixed(0)
- : ''}}年</span>
- </view>
- <view class="w-50 mb-2 d-inline-block" v-if="1">
- 高血压病龄:<span class="font-bold text-dark fs-14">{{propData.patient.gxyIllTime
- ? (
- (new Date().getTime() - new Date(propData.patient.gxyIllTime).getTime()) /
- 31536000000
- ).toFixed(0)
- : ''}}年</span>
- </view>
- <view class="position-absolute d-flex position-relative"
- style="right: 20%;top:0 ;transform: rotate(31deg);z-index:1">
- <view v-show="propData.patient.healthIndex!==0" class="centerd position-absolute " :style="{width: '150rpx',height: '150rpx',borderRadius: '50%',opacity:1,
- ...selectColor(propData.patient.healthIndex)}">
- <view class="text-center">
- <view class="fs-12">健康指数</view>
- <view class="font-bold fs-20 ">
- {{propData.patient.healthIndex?1000-propData.patient.healthIndex||0:"未计算"}}
- </view>
- </view>
- </view>
- </view>
- </view>
- <view class="">
- <view class="centerY mt-3 mb-2" v-if="propData.gljb.gxyVisit&&propData.gljb.gxyVisit.id">
- <view class="bule_line"></view>
- <text class="font-bold text-dark ml-2 fs-16 line-height1">高血压管理等级</text>
- </view>
- <view class="centerY" v-if="propData.gljb.gxyVisit&&propData.gljb.gxyVisit.id">
- <view class="fs-12 w-75 mr-2"
- style="line-height:1.5;border: 1px solid #1890ff;border-radius:4px;background:#fff;">
- <view class="text-center fs-12 font-bold "
- style="padding:16rpx 0;background-color:#1890ff;color:#fff">
- {{propData.gljb.gxyVisit.gljb}}
- </view>
- <view class="fs-12" style="padding:8px;">
- <view v-if="propData.gljb.gxyVisit.gljb=='一级管理'" style="text-indent: 20px;">
- 没有其他危险因素的患者,至少三个月随访一次,检测病情控制情况以健康教育和非药物干预为主。
- </view>
- <view v-if="propData.gljb.gxyVisit.gljb=='二级管理'" style="text-indent: 20px;">
- 一级高血压伴有一到两个危险因素和二级高血压伴有两个一级,两个以下危险因素患者至少两个月随访一次,监测病情控制情况以健康教育和用药指导为重点,有针对性地指导和规范用药。
- </view>
- <view v-if="propData.gljb.gxyVisit.gljb=='三级管理'" style="text-indent: 20px;">
- 患者至少一个月随访一次,病情,控制情况,重点就是要加强规律治疗,注意药物疗效以及副作用,提出把器官损害预警以及评价,有针对性地健康教育和行为干预,让患者地血压降到目标水平,一般情况下要严格地控制危险因素,而且要明确高血压患者有哪些危险因素。
- </view>
- </view>
- </view>
- <view class="w-25 ml-2 bg-white overflow" style="border-radius: 6rpx;">
- <view class="text-center fs-12 font-bold "
- style="padding:10rpx 0;background-color:#1890ff;color:#fff">
- 预约信息
- </view>
- <view class="mt-2 px-2" style="color: #909399;">
- 下次预约
- </view>
- <view class="mt-1 px-2">
- {{propData.gljb.gxyVisit.xcyy}}
- </view>
- <view class="mt-2 px-2" style="color: #909399;">
- 随访医生
- </view>
- <view class="mt-1 mb-2 px-2">
- {{propData.gljb.gxyVisit.sfys}}
- </view>
- </view>
- </view>
- <view class="centerY mt-3 mb-2" v-if="propData.gljb.tnbVisit&&propData.gljb.tnbVisit.id">
- <view class="bule_line"></view>
- <text class="font-bold text-dark ml-2 fs-16 line-height1">血糖管理等级</text>
- </view>
- <view class="centerY" v-if="propData.gljb.tnbVisit&&propData.gljb.tnbVisit.id">
- <view class="fs-12 w-75 mr-2"
- style="line-height:1.5;border: 1px solid #1890ff;border-radius:4px;background:#fff;">
- <view class="fs-12" style="line-height:1.5">
- <view class="text-center fs-12 font-bold mb-1 "
- style="padding:16rpx 0;background-color:#1890ff;color:#fff">
- {{propData.gljb.tnbVisit.gljb}}
- </view>
- <view class="" style="padding:8px;">
- <view v-if="propData.gljb.tnbVisit.gljb!=='常规管理'" style="text-indent: 20px;">
- 3个月随访一次,监测血糖控制情况,空腹血糖2周进行一次就检测,合理用药,强化非药物治疗,提高患者自我管理和自我检测水平。
- <span v-if="0>=5">眼底、糖足、肾病并发症筛查每年至少一次。</span>
- </view>
- <view v-if="propData.gljb.tnbVisit.gljb=='强化管理'" style="text-indent: 20px;">
- 每月随访一次,在常规管理基础上强化规范用药和并发症检查,突出空腹和餐后血糖监测,每周至少一次。眼底、糖足、肾病等并发症检查每年至少2次,加强健康教育和生活指导。
- </view>
- </view>
- </view>
- </view>
- <view class="w-25 ml-2 bg-white overflow" style="border-radius: 6rpx;">
- <view class="text-center fs-12 font-bold "
- style="padding:10rpx 0;background-color:#1890ff;color:#fff">
- 预约信息
- </view>
- <view class="mt-2 px-2" style="color: #909399;">
- 下次预约
- </view>
- <view class="mt-1 px-2">
- {{propData.gljb.tnbVisit.xcyy}}
- </view>
- <view class="mt-2 px-2" style="color: #909399;">
- 随访医生
- </view>
- <view class="mt-1 mb-2 px-2">
- {{propData.gljb.tnbVisit.sfys}}
- </view>
- </view>
- </view>
- </view>
- <!-- 身体特征 -->
- <view class="centerY mt-3">
- <view class="bule_line"></view>
- <text class="font-bold text-dark ml-2 fs-16 line-height1">体征</text>
- </view>
- <view class="card mb-2 fs-14 mt-3 p-3" style="color: #818181;">
- <view class=" p-3" style="background-color: #F5F9FF;border-radius: 16rpx;">
- <view id="echarts1" class="echarts"></view>
- <view id="echarts2" class="echarts"></view>
- </view>
- <view class="fs-10 d-flex mt-2" style="color: #909092;">
- <view class="space-nowrap">
- 提示:
- </view>
- <view class="">
- <view class="">
- 1、身体体质指数范围 偏瘦<= 18.4,正常 18.5 ~ 23.9,过重 24.0 ~ 27.9,肥胖>= 28.0
- </view>
- <view class="mt-1">
- 2、血压心率 收缩压成人 65岁以上 90~149(mmHg)65岁以下 90~139(mmHg),舒张压 60~90(mmHg)
- </view>
- </view>
- </view>
- </view>
- <view class="centerY mt-3" v-if="propData.check">
- <view class="bule_line"></view>
- <text class="font-bold text-dark ml-2 fs-16 line-height1">实验检查</text>
- </view>
- <view class="card mb-2 fs-14 mt-3 p-3" style="color: #818181;"
- v-if="propData.check&&propData.check.length>0">
- <view class="mb-2">
- <span class="fs-14 font-bold text-dark mb-2">综合数据</span>
- <span class="text-gry fs-12">({{propData.check[propData.check.length-1].createTime}})</span>
- </view>
- <view class=" p-3" style="background-color: #F5F9FF;border-radius: 16rpx;">
- <view class="centerY">
- <view class="card-boxshow centerY px-2 py-1 w-50 fs-12"
- v-if="propData.check[propData.check.length-1].bloodGlucose">
- <image class="w-25" src="@/static/img/other/xuet.png" mode="widthFix"></image>
- <view class="ml-2">
- <view class="text-dark">
- 空腹血糖
- </view>
- <view class="text-dark">
- {{propData.check[propData.check.length-1].bloodGlucose||'未测量'}} <span
- v-if="propData.check[propData.check.length-1].bloodGlucose"
- style="color:#A7A7A7 "> mmol/L</span>
- </view>
- </view>
- </view>
- <view class="card-boxshow centerY px-2 py-1 w-50 ml-3 fs-12"
- v-if="propData.check[propData.check.length-1].chol">
- <image class="w-25" src="@/static/img/other/xy.png" mode="widthFix"></image>
- <view class="ml-2">
- <view class="text-dark">
- 总胆固醇
- </view>
- <view class="text-dark">
- {{propData.check[propData.check.length-1].chol||'未测量'}} <span
- v-if="propData.check[propData.check.length-1].chol" style="color:#A7A7A7 ">
- mmol/L</span>
- </view>
- </view>
- </view>
- </view>
- <view class="mt-2 centerY">
- <view class="card-boxshow centerY px-2 py-1 w-50 fs-12"
- v-if="propData.check[propData.check.length-1].ua">
- <image class="w-25" src="@/static/img/other/xtfw.png" mode="widthFix"></image>
- <view class="ml-2">
- <view class="text-dark">
- 尿酸
- </view>
- <view class="text-dark">
- {{propData.check[0].ua||'未测量'}} <span v-if="propData.check[0].ua"
- style="color:#A7A7A7 "> μmol/L</span>
- </view>
- </view>
- </view>
- <view class="card-boxshow centerY px-2 py-1 ml-3 w-50 fs-12" v-if="propData.check[0].spo2">
- <image class="w-25" src="@/static/img/other/xlfw.png" mode="widthFix"></image>
- <view class="ml-2">
- <view class="text-dark">
- 血氧
- </view>
- <view class="text-dark">
- {{propData.check[0].spo2||'未测量'}} <span v-if="propData.check[0].spo2"
- style="color:#A7A7A7 "> mmHg</span>
- </view>
- </view>
- </view>
- </view>
- </view>
- <view class="fs-14 font-bold text-dark mb-2">
- 血/尿检查
- </view>
- <view class=" p-3" style="background-color: #F5F9FF;border-radius: 16rpx;">
- <view class="fs-14 font-bold text-dark mb-2"
- v-if="echarts3data.data1.length||echarts3data.data2.length||echarts3data.data3.length">
- 尿液ACR分析
- </view>
- <view class=""
- v-if="echarts3data.data1.length||echarts3data.data2.length||echarts3data.data3.length">
- <view id="echarts3" class="echarts"></view>
- </view>
- <view class="fs-14 font-bold text-dark my-2"
- v-if="echarts3data.data4.length||echarts3data.data5.length||echarts3data.data6.length">
- 肾功能检测
- </view>
- <view class="mt-2 "
- v-if="echarts3data.data4.length||echarts3data.data5.length||echarts3data.data6.length">
- <view id="echarts4" class="echarts"></view>
- </view>
- <!-- <view class="mt-2 centerY">
- <view class="card-boxshow centerY px-2 py-1 w-50 fs-12">
- <image class="w-25" src="@/static/other/xy.png" mode="widthFix"></image>
- <view class="ml-2">
- <view class="text-dark">
- 尿素氮
- </view>
- <view class="text-dark">
- 200.2 <span style="color:#A7A7A7 "> mmol/L</span>
- </view>
- </view>
- </view>
- <view class=" px-2 py-1 ml-3 w-50 fs-12">
- </view>
- </view>
- -->
- <view class="fs-14 font-bold text-dark my-2"
- v-if="echarts3data.data7.length||echarts3data.data8.length||echarts3data.data9.length">
- 血脂检测
- </view>
- <view class="mt-2 centerY"
- v-if="echarts3data.data7.length||echarts3data.data8.length||echarts3data.data9.length">
- <view id="echarts5" class="echarts"></view>
- </view>
- <view class="text-center mt-3 fs-10">
- </view>
- </view>
- </view>
- <!-- 眼底 -->
- <view class="centerY mt-3" v-if="propData.eye&&propData.eye.id">
- <view class="bule_line"></view>
- <text class="font-bold text-dark ml-2 fs-16 line-height1">眼底检查</text>
- </view>
- <view class="card mb-2 fs-14 mt-3 p-3" style="color: #818181;" v-if="propData.eye&&propData.eye.id">
- <view class="bg-white" style="border-radius: 16rpx;">
- <view class="centerY mb-2 text-gry">
- <text class="iconfont Clock fs-20"></text>
- <view class="">
- {{propData.eye.createTime}}
- </view>
- <view class="">
- <span :class="{'text-green':propData.eye.isRead==1}">
- ({{propData.eye.isRead==0?'未阅片':'已阅片'}})
- </span>
- </view>
- </view>
- <view class="">
- <view class="centerY">
- <view class="w-50 mx-1">
- <view class="centerY">
- <image class="w-15" src="@/static/img/other/zuo.png" mode="widthFix"></image>
- <view class="d-inline-block ml-1 fs-14 text-dark">
- 左眼
- </view>
- </view>
- <view class="border mt-2"
- style="background: #F6F9FE;border-radius: 16rpx;padding: 14rpx;box-sizing: border-box;">
- <view class="picbox1"
- style="border: 1px dotted #E3E3E3;border-radius: 16rpx;box-sizing: border-box;">
- <view style="background: #F6F9FE;" class="picimg1">
- <image @click="pic( propData.eye.leftImg || propData.eye.localLeftImg
- ? img_host +
- (accessType == 1
- ? propData.eye.leftImg
- : propData.eye.localLeftImg)
- : '@/static/img/other/you.png')" class="w-100" style="height: 100%;" :src="
- propData.eye.leftImg || propData.eye.localLeftImg
- ? img_host +
- (accessType == 1
- ? propData.eye.leftImg
- : propData.eye.localLeftImg)
- : '@/static/img/other/you.png'
- " mode="scaleToFill"></image>
- </view>
- </view>
- </view>
- </view>
- <view class="w-50 mx-2">
- <view class="centerY">
- <image class="w-15" src="@/static/img/other/you.png" mode="widthFix"></image>
- <view class="d-inline-block ml-1 fs-14 text-dark">
- 右眼
- </view>
- </view>
- <view class="border mt-2"
- style="background: #F6F9FE;border-radius: 16rpx;padding: 14rpx;box-sizing: border-box;">
- <view class="picbox1"
- style="border: 1px dotted #E3E3E3;border-radius: 16rpx;box-sizing: border-box;">
- <view style="background: #F6F9FE;" class="picimg1">
- <image @click="pic( propData.eye.rightImg || propData.eye.localRightImg
- ? img_host +
- (accessType == 1
- ? propData.eye.ightImg
- : propData.eye.localRightImg)
- : '@/static/img/other/you.png')" class="w-100" style="height: 100%;" :src="
- propData.eye.rightImg || propData.eye.localRightImg
- ? img_host +
- (accessType == 1
- ? propData.eye.ightImg
- : propData.eye.localRightImg)
- : '@/static/img/other/you.png'" mode="scaleToFill"></image>
- </view>
- </view>
- </view>
- </view>
- </view>
- <view class="mt-3 p-2"
- style="box-shadow: 0px 2px 13px 2px rgba(211,212,214,0.45);border-radius: 8px;">
- <view class="centerY">
- <image class="w-15" src="@/static/img/other/zjjy.png" mode="widthFix"></image>
- <view class="fs-14 font-bold ml-2 space-nowrap">
- 检测医院
- </view>
- <view class=" ml-2 fs-12" style="color: #868687;">
- {{hospital.hospitalName||'暂无医院信息'}}
- </view>
- </view>
- <view class="centerY mt-2">
- <image class="w-15" src="@/static/img/other/jcyy.png" mode="widthFix"></image>
- <view class="fs-14 font-bold ml-2 space-nowrap">
- 专家建议
- </view>
- <view v-if="propData.eye.isRead==1" class="ml-2 fs-12" style="color: #868687;">
- <span>左眼:{{propData.eye.leftNote||'无'}};</span>
- <span>右眼:{{propData.eye.rightNote||'无'}}</span>
- </view>
- <view v-if="propData.eye.isRead==0" class="ml-2 fs-12" style="color: #868687;">
- 暂未阅片
- </view>
- </view>
- </view>
- </view>
- <view class="text-center text-gry2 fs-10 mt-2">
- 注:本报告内容只针对眼底照片可见范围
- </view>
- </view>
- </view>
- <!-- 用药 -->
- <view class="centerY mt-3" v-if="propData.medicinal&&propData.medicinal.length>0">
- <view class="bule_line"></view>
- <text class="font-bold text-dark ml-2 fs-16 line-height1">用药情况</text> <span
- class="text-gry">(最近随访用药)</span>
- </view>
- <view class="card mb-2 fs-14 mt-3 p-3" style="color: #818181;">
- <view class="">
- <view class="mtable-title centerY bg-primary text-white fs-12">
- <view class="text-left" style="width: 23%;">
- 药名
- </view>
- <view class=" text-center" style="width: 15%;">
- 剂量
- </view>
- <view class="w-10 text-center">
- 用法
- </view>
- <view class="text-center" style="width: 17%;">
- 用药频次
- </view>
- <view class="text-center" style="width: 17%;">
- 不良反应
- </view>
- <view class=" text-center" style="width: 17%;">
- 用药类型
- </view>
- </view>
- <view v-if="propData.medicinal&&propData.medicinal.length==0">
- <Empty title="此次随访没有用药" />
- </view>
- <view v-if="propData.medicinal&&propData.medicinal.length>0" class="mtable-body-item centerY fs-12"
- v-for="(item2,index2) in propData.medicinal" style="color: #868687;">
- <uni-tooltip :content="item2.name" style="color: #818181;width: 23%;">
- <view class="text-left text-view2">
- {{item2.name }}
- </view>
- </uni-tooltip>
- <view class=" text-center" style="width: 15%;">
- {{item2.unit + item2.medicinalUnit}}
- </view>
- <view class="w-10 text-center">
- {{item2.medicinalUse||'未知'}}
- </view>
- <view class="text-center" style="width: 17%;">
- {{item2.medicinalInterval||'未知'}}
- </view>
- <view class="text-center" style="width: 17%;">
- {{item2.untowardReaction||'无'}}
- </view>
- <view class="text-center" style="width: 17%;">
- {{item2.type=="Tnb"?'糖尿病':item2.type=="Gxy"?'高血压':'未知类型'}}
- </view>
- </view>
- </view>
- </view>
- </view>
- </view>
- </template>
- <script>
- import Empty from '@/component/empty/empty.vue'
- import {
- config
- } from '@/static/js/defult_value.js'
- const healthIndex = {
- error: 600,
- warning: 750,
- success: 1000,
- }
- import {
- CHRONIC_DISEASE_TYPE,
- } from '@/static/js/defult_value.js'
- export default {
- components: {
- Empty
- },
- name: 'Report',
- props: {
- propData: {
- type: Object,
- default () {
- return {
- patient: {},
- check: {},
- checkResult: {},
- eye: {},
- medicinal: [],
- physical: {},
- yearCheck: []
- }
- },
- },
- },
- data() {
- return {
- CHRONIC_DISEASE_TYPE,
- config,
- echarts1data: {},
- echarts3data: {},
- accessType: 1,
- img_host: '',
- hospital: {}
- };
- },
- watch: {
- propData: {
- handler(val) {
- this.settingData()
- this.getifoss();
- },
- },
- },
- created() {
- this.find_hospital()
- },
- methods: {
- async find_hospital() {
- let idCard = uni.getStorageSync('idCard')
- let {
- data,
- code
- } = await this.$api.find_hospital({
- idCard
- })
- if (code == 0) {
- this.hospital = data
- uni.stopPullDownRefresh()
- } else {
- uni.hideLoading();
- uni.stopPullDownRefresh()
- }
- },
- async pic(url) {
- uni.previewImage({
- urls: [url],
- longPressActions: {
- itemList: ['发送给朋友', '保存图片', '收藏'],
- success: function(data) {
- console.log('选中了第' + (data.tapIndex + 1) + '个按钮,第' + (data.index + 1) + '张图片');
- },
- fail: function(err) {
- console.log(err.errMsg);
- }
- }
- });
- },
- async getifoss() {
- let idCard = uni.getStorageSync('idCard')
- let {
- data,
- code,
- count
- } = await this.$api.ifoss({
- idCard
- })
- if (code == 0) {
- this.accessType = data
- let configData = getApp().globalData.configData
- data == 1 ?
- this.img_host = configData.img_prod_host :
- this.img_host = configData.img_local_host
- uni.hideLoading();
- uni.stopPullDownRefresh()
- } else {
- this.status = 'more';
- uni.hideLoading();
- uni.stopPullDownRefresh()
- }
- },
- settingData() {
- let check = this.propData.check;
- let physical = this.propData.physical;
- this.echarts1data = {
- time: [],
- data1: [],
- data2: [],
- data3: [],
- data4: [],
- data5: [],
- data6: [],
- data7: [],
- data8: [],
- data9: []
- }
- this.echarts3data = {
- time: [],
- data1: [],
- data2: [],
- data3: [],
- data4: [],
- data5: [],
- data6: [],
- data7: [],
- data8: [],
- data9: []
- }
- if (check && check.length) {
- check.reverse().map((item, index) => {
- this.echarts3data.time.push(item.createTime)
- this.echarts3data['data1'].push(item.urine1)
- this.echarts3data['data2'].push(item.urine2)
- this.echarts3data['data3'].push(item.urine3)
- this.echarts3data['data4'].push(item.kidney1)
- this.echarts3data['data5'].push(item.kidney2)
- this.echarts3data['data6'].push(item.kidney3)
- this.echarts3data['data7'].push(item.bloodFat1)
- this.echarts3data['data8'].push(item.bloodFat3)
- this.echarts3data['data9'].push(item.bloodFat4)
- })
- if (this.echarts3data.data1.length || this.echarts3data.data2.length || this.echarts3data.data3
- .length) {
- this.getdom('echarts3', () => {
- this.chartOption3(this.echarts3data, 'echarts3');
- })
- }
- if (this.echarts3data.data4.length || this.echarts3data.data5.length || this.echarts3data.data6
- .length) {
- this.getdom('echarts4', () => {
- this.chartOption4(this.echarts3data, 'echarts4');
- })
- }
- if (this.echarts3data.data7.length || this.echarts3data.data8.length || this.echarts3data.data9
- .length) {
- this.getdom('echarts5', () => {
- this.chartOption5(this.echarts3data, 'echarts5');
- })
- }
- }
- if (physical && physical.length) {
- physical.reverse().map((item) => {
- this.echarts1data['data1'].push(item.height)
- this.echarts1data['data2'].push(item.weight)
- this.echarts1data['data3'].push(item.bmi)
- this.echarts1data['data4'].push(item.shrink)
- this.echarts1data['data5'].push(item.diastole)
- this.echarts1data['data6'].push(item.pulse)
- this.echarts1data['time'].push(item.createTime)
- })
- if (this.echarts1data.data1.length || this.echarts1data.data2.length || this.echarts1data.data3
- .length) {
- this.getdom('echarts1', () => {
- this.chartOption1(this.echarts1data, 'echarts1');
- })
- if (this.echarts1data.data4.length || this.echarts1data.data5.length || this.echarts1data.data6
- .length) {
- this.getdom('echarts2', () => {
- this.chartOption2(this.echarts1data, 'echarts2');
- })
- }
- }
- }
- },
- getdom(dom, cb) {
- let timer = setInterval(() => {
- if (document.getElementById(dom)) {
- clearInterval(timer)
- cb && cb()
- }
- }, 300)
- },
- selectColor(val) {
- // console.log(this.information.info)
- val = healthIndex.success - val
- return {
- color: val > healthIndex.warning && val <= healthIndex.success ?
- '#13ce66' : val > healthIndex.error && val < healthIndex.warning ?
- '#ffba00' : val <= healthIndex.error ?
- '#ff4d4f' : '',
- border: val > healthIndex.warning && val <= healthIndex.success ?
- '4rpx solid #13ce66' : val > healthIndex.error && val < healthIndex.warning ?
- '4rpx solid #ffba00' : val <= healthIndex.error ?
- '4rpx solid #ff4d4f' : '',
- backgroundColor: val > healthIndex.warning && val <= healthIndex.success ?
- 'rgba(19, 206, 102, .1)' : val > healthIndex.error && val < healthIndex.warning ?
- 'rgba(255, 186,0, .1)' : val <= healthIndex.error ?
- 'rgba(255, 77, 79, .1)' : '',
- }
- },
- }
- }
- </script>
- <script module="echarts" lang="renderjs">
- import * as echarts from 'echarts';
- export default {
- mounted() {
- console.log(echarts)
- // this.initChart('echarts1', this.option)
- // this.initChart('echarts2', this.option2)
- },
- methods: {
- initChart(dom, option) {
- let chart = echarts.init(document.getElementById(dom))
- chart.setOption(option)
- },
- // updateEcharts(newValue, oldValue, ownerInstance, instance) {
- // // 监听 service 层数据变更
- // myChart.setOption(newValue)
- // },
- onClick(event, ownerInstance) {
- // 调用 service 层的方法
- },
- check({
- type,
- value,
- age,
- sex
- }) {
- let msg = this.propData.patient
- let arr = this.config
- if (type == 'shrink' && age) {
- if (msg.age > 65) {
- if (value > arr['shrinktop'][1]) {
- return true
- }
- if (value < arr['shrinktop'][0]) {
- return true
- }
- } else {
- if (value > arr['shrinklow'][1]) {
- return true
- }
- if (value < arr['shrinklow'][0]) {
- return true
- }
- }
- }
- if (sex) {
- if (msg.sex == 1) {
- if (value > arr[type][0][1]) {
- return true
- }
- if (value < arr[type][0][0]) {
- return true
- }
- } else {
- if (value > arr[type][1][1]) {
- return true
- }
- if (value < arr[type][1][0]) {
- return true
- }
- }
- }
- if (value > arr[type][1]) {
- return true
- }
- if (value < arr[type][0]) {
- return true
- }
- return false
- },
- chartOption4({
- time,
- data4,
- data5,
- data6
- }) {
- let arr = []
- time = time.map((res) => this.$mf.timeTrans({
- time: res,
- format: 'M.D'
- }))
- time.map((item, index) => {
- if (this.check({
- type: 'kidney1',
- value: data4[index],
- sex: true
- })) {
- arr.push({
- value: [item, data4[index]],
- symbolSize: 10
- })
- }
- if (this.check({
- type: 'kidney2',
- value: data5[index],
- sex: true
- })) {
- arr.push({
- value: [item, data5[index]],
- symbolSize: 10
- })
- }
- if (this.check({
- type: 'kidney3',
- value: data6[index],
- sex: true
- })) {
- arr.push({
- value: [item, data6[index]],
- symbolSize: 10
- })
- }
- })
- var option = (option = {
- legend: {
- data: ['血尿酸(mol/L)', '血肌酐(mol/L)', '尿素氮(mmol/L)'],
- },
- // tooltip: {
- // trigger: 'axis',
- // axisPointer: {
- // type: 'cross',
- // label: {
- // backgroundColor: '#6a7985',
- // },
- // },
- // },
- grid: {
- top: '30%',
- left: '3%',
- right: '5%',
- bottom: '3%',
- containLabel: true,
- },
- xAxis: [{
- type: 'category',
- axisPointer: {
- type: 'shadow',
- },
- data: time,
- }, ],
- yAxis: [{
- type: 'value',
- }, ],
- series: [{
- name: '血尿酸(mol/L)',
- label: {
- show: true,
- formatter: '{@score}',
- position: 'top'
- },
- smooth: true,
- type: 'line',
- data: data4,
- },
- {
- name: '血肌酐(mol/L)',
- label: {
- show: true,
- formatter: '{@score}',
- position: 'top'
- },
- smooth: true,
- type: 'line',
- data: data5,
- },
- {
- name: '尿素氮(mmol/L)',
- label: {
- show: true,
- formatter: '{@score}',
- position: 'top'
- },
- smooth: true,
- type: 'line',
- data: data6,
- },
- {
- type: 'effectScatter',
- coordinateSystem: 'cartesian2d',
- data: arr,
- showEffectOn: 'render',
- // zlevel:1,
- rippleEffect: {
- // 波纹的绘制方式,可选'stroke'和'fill'
- brushType: 'fill',
- },
- hoverAnimation: false,
- },
- ],
- })
- this.initChart('echarts4', option)
- },
- chartOption5({
- time,
- data7,
- data8,
- data9
- }) {
- let arr = []
- time = time.map((res) => this.$mf.timeTrans({
- time: res,
- format: 'M.D'
- }))
- time.map((item, index) => {
- if (this.check({
- type: 'bloodFat1',
- value: data7[index]
- })) {
- arr.push({
- value: [item, data7[index]],
- symbolSize: 10
- })
- }
- if (this.check({
- type: 'bloodFat3',
- value: data8[index]
- })) {
- arr.push({
- value: [item, data8[index]],
- symbolSize: 10
- })
- }
- if (this.check({
- type: 'bloodFat4',
- value: data9[index]
- })) {
- arr.push({
- value: [item, data9[index]],
- symbolSize: 10
- })
- }
- })
- var option = (option = {
- legend: {
- data: ['甘油三酯(mmol/L)', '低密度脂蛋白(mmol/L)', '高密度脂蛋白(mmol/L)'],
- },
- // tooltip: {
- // trigger: 'axis',
- // axisPointer: {
- // type: 'cross',
- // label: {
- // backgroundColor: '#6a7985',
- // },
- // },
- // },
- grid: {
- top: '30%',
- left: '3%',
- right: '5%',
- bottom: '3%',
- containLabel: true,
- },
- xAxis: [{
- type: 'category',
- axisPointer: {
- type: 'shadow',
- },
- data: time,
- }, ],
- yAxis: [{
- type: 'value',
- }, ],
- series: [{
- name: '甘油三酯(mmol/L)',
- label: {
- show: true,
- formatter: '{@score}',
- position: 'top'
- },
- smooth: true,
- type: 'line',
- data: data7,
- },
- {
- name: '低密度脂蛋白(mmol/L)',
- label: {
- show: true,
- formatter: '{@score}',
- position: 'top'
- },
- smooth: true,
- type: 'line',
- data: data8,
- },
- {
- name: '高密度脂蛋白(mmol/L)',
- label: {
- show: true,
- formatter: '{@score}',
- position: 'top'
- },
- smooth: true,
- type: 'line',
- data: data9,
- },
- {
- type: 'effectScatter',
- coordinateSystem: 'cartesian2d',
- data: arr,
- showEffectOn: 'render',
- // zlevel:1,
- rippleEffect: {
- // 波纹的绘制方式,可选'stroke'和'fill'
- brushType: 'fill',
- },
- hoverAnimation: false,
- },
- ],
- })
- this.initChart('echarts5', option)
- },
- chartOption3({
- time,
- data1,
- data2,
- data3
- }) {
- // console.log({ time, data1, data2, data3 })
- time = time.map((res) => this.$mf.timeTrans({
- time: res,
- format: 'M.D'
- }))
- var option = (option = {
- legend: {
- data: ['肌酐(mg/dL)', '微量白蛋白(mg/L)', '尿微/肌酐(mg/g)'],
- },
- tooltip: {
- trigger: 'axis',
- axisPointer: {
- type: 'cross',
- label: {
- backgroundColor: '#6a7985',
- },
- },
- },
- grid: {
- top: '30%',
- left: '3%',
- right: '5%',
- bottom: '3%',
- containLabel: true,
- },
- xAxis: [{
- type: 'category',
- axisPointer: {
- type: 'shadow',
- },
- data: time,
- }, ],
- yAxis: [{
- type: 'value',
- }, ],
- series: [{
- name: '肌酐(mg/dL)',
- label: {
- show: true,
- formatter: '{@score}',
- position: 'top'
- },
- smooth: true,
- type: 'bar',
- data: data1,
- },
- {
- name: '微量白蛋白(mg/L)',
- label: {
- show: true,
- formatter: '{@score}',
- position: 'top'
- },
- smooth: true,
- type: 'bar',
- data: data2,
- },
- {
- name: '尿微/肌酐(mg/g)',
- label: {
- show: true,
- formatter: '{@score}',
- position: 'top'
- },
- smooth: true,
- type: 'bar',
- data: data3,
- },
- ],
- })
- this.initChart('echarts3', option)
- },
- chartOption1({
- time,
- data1,
- data2,
- data3
- }) {
- let arr = []
- time = time.map((res) => this.$mf.timeTrans({
- time: res,
- format: 'M.D'
- }))
- time.map((item, index) => {
- if (this.check({
- type: 'bmi',
- value: data3[index]
- })) {
- arr.push({
- value: [item, data3[index]],
- symbolSize: 10
- })
- }
- })
- var option = (option = {
- legend: {
- data: ['身高', '体重', 'BMI'],
- },
- // tooltip: {
- // trigger: 'axis',
- // axisPointer: {
- // type: 'cross',
- // label: {
- // backgroundColor: '#6a7985',
- // },
- // },
- // },
- grid: {
- top: '20%',
- left: '3%',
- right: '5%',
- bottom: '3%',
- containLabel: true,
- },
- xAxis: [{
- type: 'category',
- data: time,
- axisPointer: {
- type: 'shadow',
- },
- }, ],
- yAxis: [{
- type: 'value',
- }, ],
- series: [{
- name: 'BMI',
- label: {
- show: true,
- formatter: '{@score}',
- position: 'top',
- },
- smooth: true,
- type: 'line',
- data: data3,
- itemStyle: {
- color: '#9c5045'
- },
- },
- {
- name: '体重',
- label: {
- show: true,
- formatter: '{@score}',
- position: 'top',
- },
- smooth: true,
- type: 'line',
- barWidth: '60%',
- data: data2,
- itemStyle: {
- color: '#e74a2d'
- },
- },
- {
- name: '身高',
- label: {
- show: true,
- formatter: '{@score}',
- position: 'top'
- },
- type: 'line',
- data: data1,
- smooth: true,
- barWidth: '60%',
- itemStyle: {
- color: '#89b87b'
- },
- },
- {
- type: 'effectScatter',
- coordinateSystem: 'cartesian2d',
- data: arr,
- showEffectOn: 'render',
- // zlevel:1,
- rippleEffect: {
- // 波纹的绘制方式,可选'stroke'和'fill'
- brushType: 'fill',
- },
- hoverAnimation: false,
- },
- ],
- })
- this.initChart('echarts1', option)
- },
- chartOption2({
- time,
- data4,
- data5,
- data6
- }) {
- // console.log(time, data4, data5, data6)
- let arr = []
- time = time.map((res) => this.$mf.timeTrans({
- time: res,
- format: 'M.D'
- }))
- time.map((item, index) => {
- if (this.check({
- type: 'shrink',
- value: data4[index],
- age: true
- })) {
- arr.push({
- value: [item, data4[index]],
- symbolSize: 10
- })
- }
- if (this.check({
- type: 'diastole',
- value: data5[index]
- })) {
- arr.push({
- value: [item, data5[index]],
- symbolSize: 10
- })
- }
- if (this.check({
- type: 'pulse',
- value: data6[index]
- })) {
- arr.push({
- value: [item, data6[index]],
- symbolSize: 10
- })
- }
- })
- var option = (option = {
- legend: {
- data: ['收缩压', '舒张压', '心率'],
- },
- // tooltip: {
- // trigger: 'axis',
- // axisPointer: {
- // type: 'cross',
- // label: {
- // backgroundColor: '#6a7985',
- // },
- // },
- // },
- grid: {
- top: '20%',
- left: '3%',
- right: '5%',
- bottom: '3%',
- containLabel: true,
- },
- xAxis: [{
- type: 'category',
- axisPointer: {
- type: 'shadow',
- },
- data: time,
- }, ],
- yAxis: [{
- type: 'value',
- }, ],
- series: [{
- name: '收缩压',
- label: {
- show: true,
- formatter: '{@score}',
- position: 'top'
- },
- smooth: true,
- type: 'line',
- data: data4,
- itemStyle: {
- color: '#8e3e1f'
- },
- },
- {
- name: '舒张压',
- label: {
- show: true,
- formatter: '{@score}',
- position: 'top',
- },
- smooth: true,
- type: 'line',
- data: data5,
- itemStyle: {
- color: '#3c3645'
- },
- },
- {
- name: '心率',
- label: {
- show: true,
- formatter: '{@score}',
- position: 'bottom',
- },
- smooth: true,
- type: 'line',
- data: data6,
- itemStyle: {
- color: '#33a3dc'
- },
- },
- {
- type: 'effectScatter',
- coordinateSystem: 'cartesian2d',
- data: arr,
- showEffectOn: 'render',
- // zlevel:1,
- rippleEffect: {
- // 波纹的绘制方式,可选'stroke'和'fill'
- brushType: 'fill',
- },
- hoverAnimation: false,
- },
- ],
- })
- this.initChart('echarts2', option)
- },
- }
- }
- </script>
- <style lang="scss">
- .card {
- background: #FFFFFF;
- border-radius: 16rpx
- }
- .card-boxshow {
- box-shadow: 0px 2px 5px 1px rgba(215, 232, 255, 0.5);
- border-radius: 16rpx;
- background: #FFFFFF;
- }
- .mtable {
- &-title {
- border-radius: 50rpx;
- padding: 20rpx 0 20rpx 20rpx;
- box-shadow: 0px 2px 7px 1px rgba(45, 142, 255, 0.5);
- }
- &-body {
- &-item {
- margin-top: 20rpx;
- border-radius: 50rpx;
- padding: 14rpx 0 14rpx 20rpx;
- background-color: #F6F9FE;
- color: #868687;
- }
- }
- }
- .picbox1 {
- width: 100% !important;
- height: 0;
- padding-bottom: 70%;
- margin: 0;
- position: relative;
- overflow: hidden;
- }
- .picbox1 .picimg1 {
- width: 100%;
- height: 100%;
- position: absolute;
- }
- .echarts {
- width: 100%;
- height: 400rpx;
- }
- </style>
|