12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352 |
- <template>
- <div class="mys" style="" v-if="i">
- <div class="mx-1 mb-5 position-relative" v-if="propData.patient">
- <div class="centerY">
- <div class="bule_line"></div>
- <span class="font-bold text-dark ml-2 fs-14 py-2">基本信息</span>
- </div>
- <!-- 基本信息 -->
- <div class="card fs-12 p-3" style="color: #818181;position: relative;">
- <div class="w-50 mb-1 d-inline-block">
- 姓名:
- <span class="font-bold text-dark fs-14">{{ propData.patient.username || '' }}</span>
- </div>
- <div class="w-50 mb-1 d-inline-block">性别:
- <span class="font-bold text-dark fs-14">{{ propData.patient.sex == 1 ? '男' : '女' || '' }}</span>
- </div>
- <div class="w-50 mb-1 d-inline-block">年龄:
- <span class="font-bold text-dark fs-14">{{ getAge(propData.patient.birthday) || '0' }}岁</span>
- </div>
- <div class="w-50 mb-1 d-inline-block">
- 慢病类型:
- <span class="font-bold text-dark fs-14">{{ CHRONIC_DISEASE_TYPE[propData.patient.chronicDiseaseType - 1].label
- }}</span>
- </div>
- <div class="w-50 mb-1 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>
- </div>
- <div class="w-50 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>
- </div>
- <div class="position-absolute d-flex " style="right: 15%;top:-30%;transform: rotate(31deg);z-index:1">
- <div v-show="propData.patient.healthIndex !== 0" class="centerd position-absolute "
- :style="{ width: '70px', height: '70px', borderRadius: '50%', opacity: 1, ...selectColor(propData.patient.healthIndex) }">
- <div class="text-center">
- <div class="fs-12">健康指数</div>
- <div class="font-bold fs-16">{{ propData.patient.healthIndex ? 1000 - propData.patient.healthIndex || 0 :
- '1000' }}</div>
- </div>
- </div>
- </div>
- </div>
- <!-- 管理等级 -->
- <div class="centerY mt-2">
- <div class="w-50 pr-2" v-if="propData.gljb.gxyVisit && propData.gljb.gxyVisit.id">
- <div class="centerY py-2" >
- <div class="bule_line"></div>
- <span class="font-bold text-dark ml-2 fs-14 line-height1">高血压管理等级</span>
- </div>
- <div class="">
- <div class="fs-12 w-100 mr-2 border-box overflow"
- style="line-height:1.5;border: 1px solid #1890ff;border-radius:4px;background:#fff;">
- <div class="text-center fs-12 font-bold "
- style="line-height:1;padding:8px 0;background-color:#1890ff;color:#fff">{{
- propData.gljb.gxyVisit.gljb }}</div>
- <div class="bg-white overflow fs-12 p-2 border-box " style="border-top: 1px solid #1890ff;">
- <div class="w-100 centerY">
- <div class="pr-1">下次预约</div>
- <div class=" text-dark">{{ propData.gljb.gxyVisit.xcyy }}</div>
- </div>
- <div class="w-100 centerY">
- <div class="pr-1">随访医生</div>
- <div class=" text-dark">{{ propData.gljb.gxyVisit.sfys }}</div>
- </div>
- </div>
- </div>
- </div>
- </div>
- <div class="w-50" v-if="propData.gljb.tnbVisit && propData.gljb.tnbVisit.id">
- <div class="centerY py-2" >
- <div class="bule_line"></div>
- <span class="font-bold text-dark ml-2 fs-14 line-height1">糖尿病管理等级</span>
- </div>
- <div class="">
- <div class="fs-12 w-100 border-box overflow"
- style="line-height:1.5;border: 1px solid #1890ff;border-radius:4px;background:#fff;">
- <div class="fs-12" style="line-height:1">
- <div class="text-center fs-12 font-bolds" style="padding:8px 0;background-color:#1890ff;color:#fff">{{
- propData.gljb.tnbVisit.gljb }}</div>
- </div>
- <div class="bg-white overflow p-2 border-box " style="border-top: 1px solid #1890ff;">
- <div class="w-100 centerY">
- <div class="pr-1">下次预约</div>
- <div class="text-dark">{{ propData.gljb.tnbVisit.xcyy }}</div>
- </div>
- <div class="w-100 centerY">
- <div class="pr-1">随访医生</div>
- <div class="text-dark">{{ propData.gljb.tnbVisit.sfys }}</div>
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- <el-collapse class="mt-3" @change="collapsechange">
- <!-- 体征 -->
- <el-collapse-item title="" name="1" v-if="propData.physical && propData.physical.length > 0">
- <template #title>
- <div class="centerY px-2 w-100">
- <div class="bule_line"></div>
- <span class="font-bold text-dark ml-2 fs-14 line-height1">体征</span>
- <span class="text-gry fs-12">(最近七次)</span>
- </div>
- </template>
- <div class="card fs-14 mt-n2 p-2" style="color: #818181;">
- <div class="" style="background-color: #F5F9FF;border-radius: 8px;">
- <div id="echarts1" class="echarts"></div>
- <div id="echarts2" class="echarts"></div>
- </div>
- <div class="fs-10 d-flex mt-2" style="color: #909092;">
- <div class="space-nowrap w-25">提示:</div>
- <div class="">
- <div class="">1、身体体质指数范围 偏瘦 < = 18.4,正常 18.5 ~ 23.9,过重 24.0 ~ 27.9,肥胖>= 28.0</div>
- <div class="mt-1">2、血压心率 收缩压成人 65岁以上 90~149(mmHg)65岁以下 90~139(mmHg),舒张压 60~90(mmHg)</div>
- </div>
- </div>
- <div class="p-2 mt-2" style="background-color: #F5F9FF;border-radius: 8px;">
- <span class="text-gry fs-12 centerY"><span class="iconfont Clock"></span>{{
- propData.physical[propData.physical.length - 1].createTime }}</span>
- <div class="centerY mt-1">
- <div class="card-boxshow px-2 py-1 mr-2 w-40 fs-10"
- v-if="propData.physical[propData.physical.length - 1].bloodGlucose">
- <div class="text-dark">血糖</div>
- <div class="text-dark">
- {{ propData.physical[propData.physical.length - 1].bloodGlucose || '未测量' }}
- <span v-if="propData.physical[propData.physical.length - 1].bloodGlucose"
- style="color:#A7A7A7 ">mmol/L</span>
- </div>
- </div>
- <div class="card-boxshow px-2 py-1 mr-2 w-30 fs-10"
- v-if="propData.physical[propData.physical.length - 1].spo2">
- <div class="text-dark">血氧</div>
- <div class="text-dark">
- {{ propData.physical[propData.physical.length - 1].spo2 || '未测量' }}
- <span v-if="propData.physical[propData.physical.length - 1].spo2" style="color:#A7A7A7 ">%</span>
- </div>
- </div>
- <div class="card-boxshow px-2 py-1 w-30 fs-10"
- v-if="propData.physical[propData.physical.length - 1].waist">
- <div class="text-dark">腰围</div>
- <div class="text-dark">
- {{ propData.physical[propData.physical.length - 1].waist || '未测量' }}
- <span v-if="propData.physical[propData.physical.length - 1].waist" style="color:#A7A7A7 ">cm</span>
- </div>
- </div>
- <!-- <div class="card-boxshow centerY px-2 py-1 w-33 fs-12"
- v-if="propData.check[propData.check.length - 1].bloodGlucose">
- <div class="">
- <div class="text-dark">空腹血糖</div>
- <div 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>
- </div>
- </div>
- </div> -->
- </div>
- </div>
- </div>
- </el-collapse-item>
- <!-- 随访 -->
- <el-collapse-item title="" name="2" v-if="propData.gljb?.gxyVisit?.id || propData.gljb?.tnbVisit?.id">
- <template #title>
- <div class="centerY px-2">
- <div class="bule_line"></div>
- <span class="font-bold ml-2 fs-14 line-height1">随访</span>
- <span class="text-gry fs-12">(最近一次)</span>
- </div>
- </template>
- <div class="card fs-12 p-2 mt-n2" style="color: #818181;">
- <div>
- <div class="centerY">
- <div class="w-45">日吸烟量:
- <span class="text-dark">{{ propData.gljb.tnbVisit?.rxyl || propData.gljb.gxyVisit?.rxyl || '0' }}
- (支)</span>
- </div>
- <div class="w-55">日饮酒量:
- <span class="text-dark">{{ propData.gljb.tnbVisit?.ryjl || propData.gljb.gxyVisit?.ryjl || '0' }} (两)
- </span>
- </div>
- </div>
- <div class="centerY">
- <div class="w-45">运动次数:
- <span class="text-dark">{{ propData.gljb.tnbVisit?.ydcs || propData.gljb.gxyVisit?.ydcs || '0' }}
- /周</span>
- </div>
- <div class="w-55">运动时间:
- <span class="text-dark">{{ propData.gljb.tnbVisit?.ydsj || propData.gljb.gxyVisit?.ydsj || '0' }}
- 分/次</span>
- </div>
- </div>
- <div class="centerY">
- <div class="w-45">腰围指导:
- <span class="text-dark">{{ propData.gljb.tnbVisit?.ywzd || propData.gljb.gxyVisit?.ywzd || '暂无' }}
- (CM)</span>
- </div>
- <div class="w-55">体重指导:
- <span class="text-dark">{{ propData.gljb.tnbVisit?.tzzd || propData.gljb.gxyVisit?.tzzd || '暂无' }}
- (KG)</span>
- </div>
- </div>
- <div class="centerY">
- <div class="w-55">体质指数指导:
- <span class="text-dark">{{ propData.gljb.tnbVisit?.bmizd || propData.gljb.gxyVisit?.bmizd || '暂无'
- }}</span>
- </div>
- </div>
- </div>
- <div v-if="propData.gljb?.gxyVisit?.id">
- <div class="centerY text-dark"><span class="iconfont gonggaotongzhi mr-1"></span>高血压随访</div>
- <div class="centerY">
- <div class="w-50">摄盐程度:
- <span class="text-dark">{{ propData.gljb.gxyVisit.sycd || '暂无' }}</span>
- </div>
- <div class="w-50">随访分类:
- <span class="text-dark">{{ propData.gljb.gxyVisit.sffl || '暂无' }}</span>
- </div>
- </div>
- <div class="centerY">
- <div class="w-100">下次预约:
- <span class="text-dark">{{ propData.gljb.gxyVisit.xcyy || '暂无' }}</span>
- </div>
- </div>
- <div class="d-flex" v-if="propData.gljb.gxyVisit.mqzz">
- <div class="w-100">目前症状:
- <span class="text-dark">{{ JSON.parse(propData.gljb.gxyVisit.mqzz).join('、') || '暂无' }}</span>
- </div>
- </div>
- <div class="d-flex" v-if="propData.gljb.gxyVisit.qttz1">
- <div class="w-100">其他体征:
- <span class="text-dark">{{ propData.gljb.gxyVisit.qttz1 || '暂无' }}</span>
- </div>
- </div>
- </div>
- <div v-if="propData.gljb?.tnbVisit?.id">
- <div class="centerY text-dark"><span class="iconfont gonggaotongzhi mr-1"></span>糖尿病随访</div>
- <div class="centerY">
- <div class="w-45">主食:
- <span class="text-dark">{{ propData.gljb.tnbVisit.zs || '暂无' }}(克/天)</span>
- </div>
- <div class="w-55">体质指数指导:
- <span class="text-dark">{{ propData.gljb.tnbVisit.bmizd || '暂无' }}</span>
- </div>
- </div>
- <div class="centerY">
- <div class="w-45">腰围指导:
- <span class="text-dark">{{ propData.gljb.tnbVisit.ywzd || '暂无' }}(CM)</span>
- </div>
- <div class="w-55">体重指导:
- <span class="text-dark">{{ propData.gljb.tnbVisit.tzzd || '暂无' }}(KG) </span>
- </div>
- </div>
- <div class="centerY">
- <div class="w-100">血糖类型:
- <span class="text-dark">{{ propData.gljb.tnbVisit.xtlx || '暂无' }}</span>
- <span class="text-dark">{{ propData.gljb.tnbVisit.tzzd || '暂无' }} </span>
- </div>
- </div>
- <div class="centerY">
- <div class="w-45">随访分类:
- <span class="text-dark">{{ propData.gljb.tnbVisit.sffl || '暂无' }}</span>
- </div>
- <div class="w-55">下次预约:
- <span class="text-dark">{{ propData.gljb.tnbVisit.xcyy || '暂无' }}</span>
- </div>
- </div>
- <div class="d-flex" v-if="propData.gljb.tnbVisit.mqzz">
- <div class="w-100">目前症状:
- <span class="text-dark">{{ JSON.parse(propData.gljb.tnbVisit.mqzz).join('、') || '暂无' }}</span>
- </div>
- </div>
- <div class="d-flex">
- <div class="w-100">足背动脉搏动:
- <span class="text-dark">{{ propData.gljb.tnbVisit.zdmbd || '暂无' }}</span>
- </div>
- </div>
- <div class="d-flex" v-if="propData.gljb.tnbVisit.qttz1">
- <div class="w-100">其他体征:
- <span class="text-dark">{{ propData.gljb.tnbVisit.qttz1 || '暂无' }}</span>
- </div>
- </div>
- </div>
- </div>
- </el-collapse-item>
- <!-- 监测指标 -->
- <el-collapse-item title="" name="6">
- <template #title>
- <div class="centerY px-2 fs-14">
- <div class="bule_line"></div>
- <div>
- <span class="font-bold text-dark ml-2 fs-14 line-height1">监测指标</span>
- <span class="ml-1 text-gry fs-12"> (<span
- class="iconfont CheckMark fs-10 font-blod text-white bg-green"
- style="height: 14px;width: 14px;text-align: center; border-radius: 50%;">
- </span>已检查 /
- <span
- class="iconfont CheckMark fs-10 font-blod text-white bg-gry"
- style="height: 14px;width: 14px;text-align: center; border-radius: 50%;">
- </span>
- 未检查)</span>
- </div>
- </div>
- </template>
- <div class="p-2 fs-14 mt-n2" style="color: #818181;">
- <CheckModel :pdata="propData" :alldata="propData" />
- </div>
- </el-collapse-item>
- <!-- 眼底 -->
- <el-collapse-item title="" v-if="propData.eye.eyeData && propData.eye.eyeData.id" name="3">
- <template #title>
- <div class="centerY px-2 fs-14">
- <div class="bule_line"></div>
- <span class="font-bold text-dark ml-2 fs-14 line-height1">眼底检查</span>
- <div class="centerY text-gry fs-12 ml-2">
- <span class="iconfont Clock"></span>
- <div>{{ propData.eye.eyeData.createTime }}</div>
- <div>
- <span :class="{ 'text-green': propData.eye.eyeData.isRead == 1 }">({{ propData.eye.eyeData.isRead == 0 ?
- '未阅片' : '已阅片' }})</span>
- </div>
- </div>
- </div>
- </template>
- <div class="p-2 fs-14 mt-n2" style="color: #818181;">
- <div class="mt-1 p-2" style="box-shadow: 0px 2px 13px 2px rgba(211,212,214,0.45);border-radius: 8px;">
- <div class="centerY">
- <div class="fs-12 font-bold space-nowrap w-20">检测医院</div>
- <div class="fs-12 text-dark w-80 pl-1">{{ hospitalinfo.hospitalName || '暂无医院信息' }}</div>
- </div>
- <div class="d-flex mt-2">
- <div class="fs-12 font-bold space-nowrap w-20">眼底筛查</div>
- <div class="fs-12 text-dark w-80 pl-1">
- <div>
- (左眼) <span v-if="propData.eye.eyeData.leftMaculaLutea">{{ propData.eye.eyeData.leftMaculaLutea
- }}、</span> <span v-if="propData.eye.eyeData.leftPathology">{{
- JSON.parse(propData.eye.eyeData.leftPathology).join('、') }};</span>
- <span v-if="propData.eye.eyeData.isRead == 0">
- 未阅片
- </span>
- </div>
- <div>
- (右眼) <span v-if="propData.eye.eyeData.rightMaculaLutea">{{ propData.eye.eyeData.rightMaculaLutea
- }}、</span>
- <span v-if="propData.eye.eyeData.rightPathology">{{
- JSON.parse(propData.eye.eyeData.rightPathology).join('、') }};</span>
- <span v-if="propData.eye.eyeData.isRead == 0">
- 未阅片
- </span>
- </div>
- </div>
- </div>
- <div class="d-flex mt-2">
- <div class="fs-12 font-bold space-nowrap w-20">专家建议</div>
- <div v-if="propData.eye.eyeData.isRead == 1" class="fs-12 text-dark w-80 pl-1">
- <div>
- (左眼) {{ propData.eye.eyeData.leftNote || (propData.eye.aiEyeData && propData.eye.aiEyeData.leftNote)
- || '无' }};</div>
- <div>
- (右眼) {{ propData.eye.eyeData.rightNote || (propData.eye.aiEyeData &&
- propData.eye.aiEyeData.rightNote) || '无' }};
- </div>
- </div>
- <div v-if="propData.eye.eyeData.isRead == 0" class="fs-12 text-dark w-80 pl-1">暂未阅片</div>
- </div>
- </div>
- <div class="text-gry2 fs-10 mt-2">注:本报告内容只针对眼底照片可见范围</div>
- </div>
- </el-collapse-item>
- <!-- 用药 -->
- <el-collapse-item title="" v-if="propData.medicinal && propData.medicinal.length > 0" name="4">
- <template #title>
- <div class="centerY px-2">
- <div class="bule_line"></div>
- <span class="font-bold text-dark ml-2 fs-14 line-height1">用药情况</span>
- <span class="text-gry fs-12">(最近随访用药)</span>
- </div>
- </template>
- <div class="card fs-12 p-2 mt-n2" style="color: #818181;">
- <div class="">
- <div class="mtable-title centerY bg-primary text-white fs-10">
- <div class="text-left" style="width: 23%;">药名</div>
- <div class=" text-center" style="width: 15%;">剂量</div>
- <div class="w-10 text-center">用法</div>
- <div class="text-center" style="width: 17%;">用药频次</div>
- <div class="text-center" style="width: 17%;">不良反应</div>
- <div class=" text-center" style="width: 17%;">用药类型</div>
- </div>
- <div v-if="propData.medicinal && propData.medicinal.length == 0">
- <el-empty description="此次随访没有用药"></el-empty>
- </div>
- <div v-if="propData.medicinal && propData.medicinal.length > 0" class="mtable-body-item centerY fs-10"
- v-for="(item2, index2) in propData.medicinal" style="color: #868687;">
- <!-- <uni-tooltip :content="item2.name" style="color: #818181;width: 23%;"> -->
- <div class="text-left text-div2" style="color: #818181;width: 23%;">{{ item2.name }}</div>
- <!-- </uni-tooltip> -->
- <div class=" text-center" style="width: 15%;">{{ item2.unit + item2.medicinalUnit }}</div>
- <div class="w-10 text-center">{{ item2.medicinalUse || '未知' }}</div>
- <div class="text-center" style="width: 17%;">{{ item2.medicinalInterval || '未知' }}</div>
- <div class="text-center" style="width: 17%;">{{ item2.untowardReaction || '无' }}</div>
- <div class="text-center" style="width: 17%;">{{ item2.type == 'Tnb' ? '糖尿病' : item2.type == 'Gxy' ? '高血压'
- :
- '未知类型' }}</div>
- </div>
- </div>
- </div>
- </el-collapse-item>
- <!-- 居家检测 -->
- <el-collapse-item title=""
- v-if="homedata.gxyList && homedata.gxyList.length > 0 || homedata.tnbList && homedata.tnbList.length > 0"
- name="5">
- <template #title>
- <div class="centerY px-2">
- <div class="bule_line"></div>
- <span class="font-bold text-dark ml-2 fs-14 line-height1">居家检测</span>
- <span class="text-gry fs-12">(最近七次)</span>
- </div>
- </template>
- <div class="card fs-12 p-2 mt-n2" style="color: #818181;">
- <div>
- <div id="echarts3" class="echarts"></div>
- <div id="echarts4" class="echarts"></div>
- <div id="echarts5" class="echarts"></div>
- </div>
- </div>
- </el-collapse-item>
- </el-collapse>
- <div class="centerY fs-12 mt-2">
- <div class="ml-auto text-primary cursor-pointer" v-if="wwwurl"
- @click="open(wwwurl + '/index?idCard=' + propData.patient.idCard)">
- 去网页版查看患者更多信息 >
- </div>
- </div>
- </div>
- </div>
- </template>
- <script>
- import conf from '@/config/index'
- import { getAge, timeTrans } from '@/utils/common'
- import * as echarts from 'echarts';
- const { keyValue, healthIndex, CHRONIC_DISEASE_TYPE } = conf;
- import { ipcRenderer } from "electron";
- import CheckModel from './check.vue'
- export default {
- name: 'modelview',
- components: { CheckModel },
- props: {
- propData: {
- type: Object,
- default() {
- return {
- patient: {},
- check: {},
- checkResult: {},
- eye: { eyeData: {} },
- medicinal: [],
- physical: {},
- yearCheck: [],
- echarts1data: {}
- };
- }
- },
- hospitalinfo: {
- type: Object,
- default() {
- return {
- };
- }
- },
- homedata: {
- type: Object,
- default() {
- return {};
- }
- },
- },
- data() {
- return {
- getAge,
- CHRONIC_DISEASE_TYPE,
- keyValue,
- echarts1data: {},
- accessType: 1,
- img_host: '',
- i: 0,
- wwwurl: ''
- };
- },
- watch: {
- propData: {
- handler(val) {
- this.wwwurl = localStorage.getItem('locationpath') ? JSON.parse(localStorage.getItem('locationpath')).webURL : ''
- // console.log(val)
- this.i = 0;
- this.i = 1;
- this.settingData()
- }
- }
- },
- mounted() {
- },
- beforeDestroy() {
- },
- methods: {
- open(link) {
- ipcRenderer.send('openUrl', link)
- },
- collapsechange(val) {
- val.map((item) => {
- if (item == 1) {
- if (this.propData.physical && this.propData.physical.length) {
- this.chartOption1(this.echarts1data, 'echarts1');
- this.chartOption2(this.echarts1data, 'echarts2');
- }
- } else if (item == 5) {
- if (this.homedata.gxyList && this.homedata.gxyList.length) {
- this.chartOption3(this.homedata.gxyList, 'echarts3')
- this.chartOption4(this.homedata.gxyList, 'echarts4')
- }
- if (this.homedata.tnbList && this.homedata.tnbList.length) {
- this.chartOption5(this.homedata.tnbList, 'echarts5')
- }
- }
- })
- },
- settingData() {
- let physical = this.propData.physical;
- this.echarts1data = {
- time: [],
- data1: [],
- data2: [],
- data3: [],
- data4: [],
- data5: [],
- data6: [],
- data7: [],
- data8: [],
- data9: []
- };
- if (physical && physical.length) {
- physical.reverse().map((item, index) => {
- if (index > 6) {
- return false
- }
- 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);
- });
- }
- },
- initChart(dom, option) {
- this.$nextTick(() => {
- let chart = echarts.init(document.getElementById(dom))
- chart.setOption(option)
- chart.resize()
- })
- },
- 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
- ? '2px solid #13ce66'
- : val > healthIndex.error && val < healthIndex.warning
- ? '2px solid #ffba00'
- : val <= healthIndex.error
- ? '2px 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)'
- : ''
- };
- },
- // updateEcharts(newValue, oldValue, ownerInstance, instance) {
- // // 监听 service 层数据变更
- // myChart.setOption(newValue)
- // },
- check({ type, value, age, sex }) {
- let msg = this.propData.patient
- let arr = this.keyValue
- 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
- },
- chartOption1({ time, data1, data2, data3 }, dom) {
- let arr = []
- time = time.map((res) => 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: 8
- })
- }
- })
- var option = (option = {
- legend: {
- data: ['身高', '体重', 'BMI'],
- textStyle: {
- fontSize: 10
- },
- lineStyle: {
- width: 1
- },
- itemHeight: 8,
- itemStyle: {
- borderWidth: 0
- }
- },
- tooltip: {
- trigger: 'axis',
- axisPointer: {
- type: 'cross',
- label: {
- backgroundColor: '#6a7985',
- },
- },
- },
- grid: {
- top: '25%',
- 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: 'bottom',
- },
- smooth: true,
- type: 'line',
- data: data3,
- itemStyle: {
- // fontSize:'10px',
- 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,
- itemStyle: {
- color: 'red'
- }
- },
- ],
- })
- this.$nextTick(() => {
- if (document.getElementById(dom)) {
- console.log(1)
- this.initChart(dom, option)
- }
- })
- },
- chartOption2({ time, data4, data5, data6 }, dom) {
- // console.log(time, data4, data5, data6)
- let arr = []
- time = time.map((res) => 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: 8
- })
- }
- if (this.check({
- type: 'diastole',
- value: data5[index]
- })) {
- arr.push({
- value: [item, data5[index]],
- symbolSize: 8
- })
- }
- if (this.check({
- type: 'pulse',
- value: data6[index]
- })) {
- arr.push({
- value: [item, data6[index]],
- symbolSize: 8
- })
- }
- })
- var option = (option = {
- legend: {
- data: ['收缩压', '舒张压', '心率'],
- textStyle: {
- fontSize: 10
- },
- lineStyle: {
- width: 1
- },
- itemHeight: 8,
- itemStyle: {
- borderWidth: 0
- }
- },
- tooltip: {
- trigger: 'axis',
- axisPointer: {
- type: 'cross',
- label: {
- backgroundColor: '#6a7985',
- },
- },
- },
- grid: {
- top: '25%',
- left: '3%',
- right: '5%',
- bottom: '3%',
- containLabel: true,
- },
- xAxis: [{
- type: 'category',
- axisPointer: {
- type: 'shadow',
- },
- textStyle: {
- fontSize: 8
- },
- data: time,
- },],
- yAxis: [{
- type: 'value',
- },],
- series: [{
- smooth: true,
- name: '收缩压',
- label: {
- show: true,
- formatter: '{@score}',
- position: 'top'
- },
- smooth: true,
- type: 'line',
- data: data4,
- itemStyle: {
- color: '#8e3e1f'
- },
- },
- {
- smooth: true,
- name: '舒张压',
- label: {
- show: true,
- formatter: '{@score}',
- position: 'top',
- },
- smooth: true,
- type: 'line',
- data: data5,
- itemStyle: {
- color: '#3c3645',
- fontSize: 8
- },
- textStyle: {
- color: '#3c3645',
- fontSize: 8
- },
- },
- {
- name: '心率',
- label: {
- show: true,
- formatter: '{@score}',
- },
- smooth: true,
- type: "bar",
- data: data6,
- itemStyle: {
- color: '#33a3dc',
- fontSize: 8
- },
- },
- {
- type: 'effectScatter',
- coordinateSystem: 'cartesian2d',
- data: arr,
- showEffectOn: 'render',
- // zlevel:1,
- rippleEffect: {
- // 波纹的绘制方式,可选'stroke'和'fill'
- brushType: 'fill',
- },
- hoverAnimation: false,
- itemStyle: {
- color: 'red'
- }
- },
- ],
- })
- this.$nextTick(() => {
- if (document.getElementById(dom)) {
- this.initChart(dom, option)
- }
- })
- },
- chartOption3(data, dom) {
- // console.log(data)
- let data1 = [],
- data2 = [],
- data3 = [],
- time = []
- data.map((item) => {
- time.push(timeTrans({
- time: item.uploadTime,
- format: 'M/D'
- }))
- data1.push(item.sbp)
- data2.push(item.rbp)
- data3.push(item.pulse)
- })
- let arr = []
- data.map((item, index) => {
- if (this.check({
- type: 'shrink',
- value: data1[index],
- age: true
- })) {
- arr.push({
- name: '收缩压',
- value: [item.uploadTime, data1[index]],
- symbolSize: 8,
- })
- }
- if (this.check({
- type: 'diastole',
- value: data2[index]
- })) {
- arr.push({
- name: '舒张压',
- value: [item.uploadTime, data2[index]],
- symbolSize: 8,
- })
- }
- })
- // console.log(arr)
- var option = (option = {
- legend: {
- data: ['收缩压', '舒张压', '心率'],
- },
- tooltip: {
- formatter: function (params) {
- console.log(params)
- let str = ''
- if (params.length > 0) {
- str =
- '<view style="padding:0px;width:140px"><view>' +
- params[0].name +
- '</view><view class="centerY" style="margin-top:6px"><view style="background:#5470c6;width:10px;height:10px;border-radius: 50%;" ></view><view class="" style="margin-left:4px">' +
- params[0].seriesName +
- '</view> <view class="ml-auto font-bold">' +
- params[0].value +
- '</view></view> <view class="centerY" style="margin-top:6px"><view style="background:#91cc75;width:10px;height:10px;border-radius: 50%;" ></view><view class="" style="margin-left:4px">' +
- params[1].seriesName +
- '</view><view class="ml-auto font-bold">' +
- params[1].value +
- '</view></view><view class="centerY" style="margin-top:6px"><view style="background:#fac858;width:10px;height:10px;border-radius: 50%;" ></view><view class="" style="margin-left:4px">' +
- params[2].seriesName +
- '</view><view class="ml-auto font-bold">' +
- params[2].value +
- '</view></view></view>'
- }
- return str
- },
- 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.reverse(),
- },],
- yAxis: [{
- type: 'value',
- },],
- series: [{
- name: '收缩压',
- label: {
- show: true,
- formatter: '{@score}',
- position: 'top'
- },
- smooth: true,
- type: 'line',
- data: data1.reverse(),
- },
- {
- name: '舒张压',
- label: {
- show: true,
- formatter: '{@score}',
- position: 'bottom',
- },
- smooth: true,
- type: 'line',
- data: data2.reverse(),
- },
- {
- type: 'effectScatter',
- coordinateSystem: 'cartesian2d',
- data: arr,
- showEffectOn: 'render',
- // zlevel:1,
- rippleEffect: {
- // 波纹的绘制方式,可选'stroke'和'fill'
- brushType: 'fill',
- },
- itemStyle: {
- color: '#F2597F'
- },
- hoverAnimation: false,
- },
- ],
- })
- this.$nextTick(() => {
- if (document.getElementById(dom)) {
- this.initChart(dom, option)
- }
- })
- },
- chartOption4(data, dom) {
- // console.log(data)
- let data1 = [],
- time = []
- data.map((item) => {
- time.push(timeTrans({
- time: item.uploadTime,
- format: 'M/D'
- }))
- data1.push(item.glu)
- })
- let arr = []
- data.map((item, index) => {
- if (this.check({
- type: 'bloodGlucose',
- value: data1[index],
- age: true
- })) {
- arr.push({
- name: '血糖',
- value: [item.uploadTime, data1[index]],
- symbolSize: 8,
- })
- }
- })
- 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.reverse(),
- },],
- yAxis: [{
- type: 'value',
- },],
- series: [{
- name: '血糖',
- label: {
- show: true,
- formatter: '{@score}',
- position: 'top'
- },
- smooth: true,
- type: 'line',
- data: data1.reverse(),
- itemStyle: {
- color: '#369FE5'
- },
- },
- {
- type: 'effectScatter',
- coordinateSystem: 'cartesian2d',
- data: arr,
- showEffectOn: 'render',
- // zlevel:1,
- rippleEffect: {
- // 波纹的绘制方式,可选'stroke'和'fill'
- brushType: 'fill',
- },
- itemStyle: {
- color: '#F2597F'
- },
- hoverAnimation: false,
- },
- ],
- })
- this.$nextTick(() => {
- if (document.getElementById(dom)) {
- this.initChart(dom, option)
- }
- })
- },
- chartOption5(data, dom) {
- // console.log(data)
- let data1 = [],
- data2 = [],
- data3 = [],
- time = []
- data.map((item) => {
- time.push(timeTrans({
- time: item.uploadTime,
- format: 'M/D'
- }))
- data3.push(item.pulse)
- })
- let arr = []
- data.map((item, index) => {
- if (this.check({
- type: 'pulse',
- value: data3[index]
- })) {
- arr.push({
- name: '心率',
- value: [item.uploadTime, data3[index]],
- symbolSize: 10,
- })
- }
- })
- // console.log(arr)
- 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.reverse(),
- },],
- yAxis: [{
- type: 'value',
- },],
- series: [{
- name: '心率',
- label: {
- show: true,
- formatter: '{@score}',
- position: 'top',
- },
- itemStyle: {
- color: '#35B79C'
- },
- smooth: true,
- type: 'line',
- data: data3.reverse(),
- areaStyle: {
- color: {
- type: 'linear',
- x: 0,
- y: 0,
- x2: 0,
- y2: 1,
- global: false,
- colorStops: [{
- offset: 0,
- color: 'rgba(53,183,156,.7)'
- },
- {
- offset: 0.5,
- color: 'rgba(53,183,156,0.3)'
- },
- {
- offset: 1,
- color: 'rgba(53,183,156,0)'
- }
- ]
- }
- },
- },
- {
- type: 'effectScatter',
- coordinateSystem: 'cartesian2d',
- data: arr,
- showEffectOn: 'render',
- // zlevel:1,
- rippleEffect: {
- // 波纹的绘制方式,可选'stroke'和'fill'
- brushType: 'fill',
- },
- itemStyle: {
- color: '#F2597F'
- },
- hoverAnimation: false,
- },
- ],
- })
- if (document.getElementById(dom)) {
- this.initChart(dom, option)
- }
- },
- }
- };
- </script>
- <style lang="less" >
- .bule_line {
- width: 5px;
- height: 15px;
- background-color: #1e8ff9;
- border-radius: 3px;
- box-shadow: 0px 2px 4px 0px rgba(121, 190, 254, 0.59);
- }
- .card {
- background: #ffffff;
- border-radius: 8px;
- }
- .card-boxshow {
- box-shadow: 0px 2px 5px 1px rgba(215, 232, 255, 0.5);
- border-radius: 8px;
- background: #ffffff;
- }
- .mtable {
- &-title {
- border-radius: 25px;
- padding: 10px 0 10px 10px;
- box-shadow: 0px 1px 3px 1px rgba(45, 142, 255, 0.5);
- }
- &-body {
- &-item {
- margin-top: 10px;
- border-radius: 25px;
- padding: 7px 0 7px 10px;
- 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: 180px;
- }
- .el-collapse-item__content {
- padding-bottom: 0 !important;
- }
- </style>
|