12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033 |
- <template>
- <div class="patient-container">
- <patient-sidebar :id="patient_id" defaultActive="1-9"></patient-sidebar>
- <div v-loading="loading">
- <div class="patient-app-container advice-container app-container">
-
- <div>
- <span style="margin-left: 10px;float:right;">
- <el-button type="primary" icon="el-icon-circle-plus-outline" size="small"
- @click="show_dialog = true">新增</el-button>
-
- <el-button type="primary" icon="el-icon-edit-outline" size="small"
- @click="showEdit">修改</el-button>
- <el-button type="primary" icon="el-icon-printer" size="small"
- @click="print">打印</el-button>
- <el-button size="small" type="danger" @click="deleteAction">删除</el-button>
- </span>
- </div>
- <!--<div></div>-->
- <div class="cell clearfix">
- <label class="title"><span class="name">日期查询</span> : </label>
- <el-date-picker v-model="start_time" prefix-icon="el-icon-date" :editable="false" style="width: 196px;"
- type="date" placeholder="选择日期时间" align="right" format="yyyy-MM-dd"
- value-format="yyyy-MM-dd" @change="startTimeChange"></el-date-picker>
- <span class="">-</span>
- <el-date-picker v-model="end_time" prefix-icon="el-icon-date" :editable="false" style="width: 196px;"
- type="date" placeholder="选择日期时间" align="right" format="yyyy-MM-dd"
- value-format="yyyy-MM-dd" @change="endTimeChange"></el-date-picker>
- </div>
- <div class="record">
- <el-row :gutter="15">
- <el-col :span="10">
- <el-table :header-cell-style="{
- backgroundColor: 'rgb(245, 247, 250)',
- color: '#606266'
- }"
- :row-style="{ color: '#303133' }" ref="inspection_table" :data="inspectionList"
- border highlight-current-row @current-change="changeCurrentRecordTwo"
- @selection-change="selectSummary"
- :row-class-name="tableRow"
- >
- <el-table-column type="selection" width="60" align="center"></el-table-column>
- <el-table-column label="阶段小结名称" align="center">
- <template slot-scope="scope">
- {{scope.row.title}}
- </template>
- </el-table-column>
- <el-table-column label="记录时间" align="center">
- <template slot-scope="scope">
- {{getTime(scope.row.record_time)}}
- </template>
- </el-table-column>
- <el-table-column label="记录医生" align="center">
- <template slot-scope="scope">
- {{getDoctor(scope.row.admin_user_id)}}
- </template>
- </el-table-column>
- </el-table>
- </el-col>
- <el-col :span="14">
- <div class="record_content_panel">
- <div style="background-color:rgb(245, 247, 250)" class="title">阶段小结内容</div>
- <div style="padding:10px;border-bottom:1px solid #DCDFE6;">阶段小结时间:<span v-if="editObj.record_time!=''">{{getTime(editObj.record_time)}}</span></div>
- <!-- <div style="padding: 10px 10px 0;">阶段小结概要:</div>
- <div style="padding:10px;border-bottom:1px solid #DCDFE6;">
- <span style="margin-right:10px;line-height:30px;">干体重(kg):{{editObj.dry_weight}}</span>
- <span style="margin-right:10px;line-height:30px;">共透析:{{editObj.dialysis_count}}次</span>
- <span style="margin-right:10px;line-height:30px;">HD:{{editObj.hd_count}}次</span>
- <br>
- <span style="margin-right:10px;line-height:30px;">HDF:{{editObj.hdf_count}}次</span>
- <span style="margin-right:10px;line-height:30px;">HP:{{editObj.hp_count}}次</span>
- <span style="margin-right:10px;line-height:30px;">其他:{{editObj.other_count}}次</span>
- <br>
- <span style="margin-right:10px;line-height:30px;">透析器:{{editObj.dialzer_apparatus}}</span>
- <span style="margin-right:10px;line-height:30px;">灌流器:{{editObj.perfusion_apparatus}}</span>
- <span style="margin-right:10px;line-height:30px;">抗凝剂:
- <span> {{getAnticoagulant(editObj.anticoagulant)}}</span>
- </span>
- <span style="margin-right:10px;line-height:30px;">透析液:(钾:{{editObj.kalium}} 钙:{{editObj.autunite}} Na:{{editObj.natrium}})</span>
- <br>
- <span style="margin-right:10px;line-height:30px;">每次透析:<span v-if="editObj.hour!=''"> {{editObj.hour}}小时</span>
- <span v-if="editObj.minute!=0">{{editObj.minute}}分</span></span>
- <span style="margin-right:10px;line-height:30px;">透前体重(kg):{{editObj.befor_weight}}</span>
- <span style="margin-right:10px;line-height:30px;">透后体重(kg):{{editObj.after_weight}}</span>
- <br>
- <span style="margin-right:10px;line-height:30px;">透前血压(mmHg):{{editObj.befor_pressure}}</span>
- <span style="margin-right:10px;line-height:30px;">透后血压(mmHg):{{editObj.after_pressure}}</span>
- </div> -->
- <div style="padding:10px;border-bottom:1px solid #DCDFE6;line-height:20px;
- word-break: break-all;word-wrap: break-word">
- 阶段小结总结:
- <span v-html="editObj.template_summary_content"></span>
- </div>
- <div style="padding:10px;border-bottom:1px solid #DCDFE6;line-height:20px;
- word-break: break-all;word-wrap: break-word">阶段小结化验结果:
- <div>
- <div v-for="item in editObj.template_inspection_content">
- <p style="font-weight: bold;margin: 10px 0;">{{ item.project_name }} 检查日期:{{getTime(item.arr[0].inspect_date)}}</p>
- <div style="display:flex;flex-wrap: wrap;">
- <div v-for="it in item.arr" style="width:33%;margin-bottom:5px;">
- {{ it.item_name }} <span v-if="it.unit!=''">[{{it.unit}}]</span>:
- {{it.inspect_value}}
- <span v-if="parseInt(it.inspect_value) < parseInt(it.range_min)">
- ↓
- </span>
- <span v-if="parseInt(it.inspect_value) > parseInt(it.range_max)">
- ↑
- </span>
- </div>
- </div>
- </div>
- </div>
- </div>
-
- <!-- <div style="padding:10px;line-height:20px;">阶段小结个体化透析方案:
- <span v-html="editObj.template_plan_content"></span>
- </div> -->
- </div>
- </el-col>
- </el-row>
- </div>
- </div>
-
- <el-dialog title="新增阶段小结" width="83%" top="5vh" :visible.sync="show_dialog">
- <div>
- <div class="new_record_form">
- <div class="cell clearfix">
- <el-form :model="form" ref="form">
- <el-row :gutter="24">
- <el-col :span="20">
- <el-form-item label="阶段小结名称:">
- <el-input v-model="form.title" style="width:200px"></el-input>
- </el-form-item>
- </el-col>
- </el-row>
- <!-- <el-row :gutter="24">
- <el-col :span="8">
- <el-form-item label="阶段小结时间:">
- <el-date-picker
- @change="changeStartYear"
- v-model="form.start_year"
- type="year"
- value-format="yyyy"
- placeholder="选择年">
- </el-date-picker>
- </el-form-item>
- </el-col>
- <el-col :span="8">
- <el-form-item>
- <el-radio-group v-model="form.radio">
- <el-radio :label="1" >月份</el-radio>
- <el-radio :label="2" >季度</el-radio>
- </el-radio-group>
- </el-form-item>
- </el-col>
-
- <el-col :span="8" v-if="form.radio == 1">
- <el-form-item>
- <el-date-picker
- @change="changeStartMonth"
- value-format="MM"
- v-model="form.start_month"
- type="month"
- placeholder="选择月">
- </el-date-picker>
- </el-form-item>
- </el-col>
- <el-col :span="8" v-if="form.radio == 2">
- <el-form-item>
- <el-select v-model="form.quarter" placeholder="请选择" @change="changeQuarter">
- <el-option
- v-for="item in timeType"
- :key="item.id"
- :label="item.name"
- :value="item.id">
- </el-option>
- </el-select>
- </el-form-item>
- </el-col>
- </el-row> -->
-
- </el-form>
- </div>
-
- <div class="cell clearfix" style="margin-top: 10px">
- <!-- <label class="title"><span class="name">阶段小结摘要</span> : </label> -->
- <el-form>
- <!-- <el-row :gutter="24">
- <el-col :span="8">
- <el-form-item label="干体重">
- <el-input v-model="form.dry_weight"></el-input>
- </el-form-item>
- </el-col>
- <el-col :span="8">
- <el-form-item label="共透析(次)">
- <el-input v-model="form.dialysis_count"></el-input>
- </el-form-item>
- </el-col>
- <el-col :span="8">
- <el-form-item label="HD(次)">
- <el-input v-model="form.hd_count"></el-input>
- </el-form-item>
- </el-col>
- </el-row>
- <el-row :gutter="24">
- <el-col :span="8">
- <el-form-item label="HDF(次)">
- <el-input v-model="form.hdf_count"></el-input>
- </el-form-item>
- </el-col>
- <el-col :span="8">
- <el-form-item label="HP(次)">
- <el-input v-model="form.hp_count"></el-input>
- </el-form-item>
- </el-col>
- <el-col :span="8">
- <el-form-item label="其他(次)">
- <el-input v-model="form.other_count"></el-input>
- </el-form-item>
- </el-col>
- </el-row>
- <el-row :gutter="24">
- <el-col :span="8">
- <el-form-item label="透析器">
- <el-input v-model="form.dialzer_apparatus" @focus="showInnerDialog('7')"></el-input>
- </el-form-item>
- </el-col>
- <el-col :span="8">
- <el-form-item label="灌流器">
- <el-input v-model="form.perfusion_apparatus" @focus="showInnerDialog('8')"></el-input>
- </el-form-item>
- </el-col>
-
- <el-col :span="8">
- <el-form-item label="抗凝剂">
-
- <el-select v-model="form.anticoagulant" placeholder="请选择" style="width:100%;">
- <el-option :key="0" label="请选择" :value="0"></el-option>
- <el-option v-for="(item, index) in anticoagulantList" :label="item.name" :key="index + 'e'"
- :value="item.id"></el-option>
- </el-select>
- </el-form-item>
- </el-col>
- </el-row>
- <div>透析液</div>
- <el-row :gutter="24">
- <el-col :span="8">
- <el-form-item label="钾">
- <el-input v-model="form.kalium"></el-input>
- </el-form-item>
- </el-col>
- <el-col :span="8">
- <el-form-item label="钙">
- <el-input v-model="form.autunite"></el-input>
- </el-form-item>
- </el-col>
- <el-col :span="8">
- <el-form-item label="钠">
- <el-input v-model="form.natrium"></el-input>
- </el-form-item>
- </el-col>
- </el-row>
- <div>透析时长</div>
- <el-row :gutter="24">
- <el-col :span="8">
- <el-form-item label="时">
- <el-input v-model="form.hour"></el-input>
- </el-form-item>
- </el-col>
- <el-col :span="8">
- <el-form-item label="分">
- <el-input v-model="form.minute"></el-input>
- </el-form-item>
- </el-col>
- </el-row>
- <el-row :gutter="24">
- <el-col :span="8">
- <el-form-item label="透前体重(kg)">
- <el-input v-model="form.befor_weight"></el-input>
- </el-form-item>
- </el-col>
- <el-col :span="8">
- <el-form-item label="透后体重(kg)">
- <el-input v-model="form.after_weight"></el-input>
- </el-form-item>
- </el-col>
- </el-row>
- <el-row :gutter="24">
- <el-col :span="8">
- <el-form-item label="透前血压(mmHg)">
- <el-input v-model="form.befor_pressure"></el-input>
- </el-form-item>
- </el-col>
- <el-col :span="8">
- <el-form-item label="透后血压(mmHg)">
- <el-input v-model="form.after_pressure"></el-input>
- </el-form-item>
- </el-col>
- </el-row> -->
-
- <el-row>
- <label class="title"><span class="name">阶段小结总结</span> : </label>
- <el-select v-model="form.template_summary_id" placeholder="请选择" @change="changeSummary">
- <el-option
- v-for="item in summaryList"
- :key="item.value"
- :label="item.content"
- :value="item.value">
- </el-option>
- </el-select>
- <keep-alive>
- <editor ref="edit_neditor"
- id="edit_editor1"
- style="width: 1200px"
- v-bind:r_content="form.template_summary_content">
- </editor>
- </keep-alive>
- <!-- <el-input style="margin:10px 0;" type="textarea" autosize v-model="form.template_summary_content"></el-input> -->
- </el-row>
- <!-- <el-row>
- <label class="title"><span class="name">阶段小结个体化透析方案</span> : </label>
- <el-select v-model="form.template_plan_id" placeholder="请选择" @change="changeTempalte">
- <el-option
- v-for="item in planList"
- :key="item.value"
- :label="item.content"
- :value="item.value">
- </el-option>
- </el-select>
- <keep-alive>
- <editor ref="edit_neditorOne"
- id="edit_editor"
- style="width: 800px"
- v-bind:r_content="form.template_plan_content">
- </editor>
- </keep-alive>
-
- </el-row> -->
- <el-row>
- <label class="title"><span class="name">阶段小结化验结果</span> : </label>
- <el-button type="primary" @click="toInspection">选择检验检查</el-button>
-
- <div class="borderBox">
- <div v-for="item in form.template_inspection_content">
- <p>{{ item.project_name }}</p>
- <div style="display:flex;flex-wrap: wrap;">
- <div v-for="it in item.arr" style="width:33%;">
- {{ it.item_name }} <span v-if="it.unit!=''"> [{{it.unit}}] </span>:
- {{it.inspect_value}}
- <span v-if="parseInt(it.inspect_value) < parseInt(it.range_min)">
- ↓
- </span>
- <span v-if="parseInt(it.inspect_value) > parseInt(it.range_max)">
- ↑
- </span>
- </div>
- </div>
- </div>
- </div>
- </el-row>
- <el-row style="margin:10px 0 0;">
- <el-col :span="8">
- <el-form-item label="记录医生">
- <el-select v-model="form.admin_user_id" placeholder="请选择">
- <el-option
- v-for="item in docList"
- :key="item.admin_user_id"
- :label="item.user_name"
- :value="item.admin_user_id">
- </el-option>
- </el-select>
- </el-form-item>
- </el-col>
- <el-col :span="8">
- <el-form-item label="记录时间">
- <el-date-picker
- v-model="form.record_time"
- type="datetime"
- value-format="yyyy-MM-dd HH:mm:ss"
- placeholder="选择日期时间">
- </el-date-picker>
- </el-form-item>
- </el-col>
- </el-row>
- </el-form>
- </div>
- <div style="text-align: right; padding-right: 0px; padding-top: 10px; padding-bottom: 10px;">
- <el-button @click="show_dialog = false">取消</el-button>
- <el-button type="primary" @click="saveCreation()">保存
- </el-button>
- </div>
- </div>
- </div>
- </el-dialog>
-
-
- <!-- 编辑阶段小结 -->
- <el-dialog title="编辑阶段小结" width="80%" top="5vh" :visible.sync="edit_show_dialog">
- <div>
- <div class="new_record_form">
- <div class="cell clearfix">
- <el-form :model="form" ref="form">
- <el-row :gutter="24">
- <el-col :span="20">
- <el-form-item label="阶段小结名称:">
- <el-input v-model="form.title" style="width:200px"></el-input>
- </el-form-item>
- </el-col>
- </el-row>
- <!-- <el-row :gutter="24">
- <el-col :span="8">
- <el-form-item label="阶段小结时间:">
- <el-date-picker
- v-model="form.start_year"
- type="year"
- value-format="yyyy-MM-dd"
- placeholder="选择年">
- </el-date-picker>
- </el-form-item>
- </el-col>
- <el-col :span="8">
- <el-form-item>
- <el-radio-group v-model="form.radio">
- <el-radio :label="1" >月份</el-radio>
- <el-radio :label="2" >季度</el-radio>
- </el-radio-group>
- </el-form-item>
- </el-col>
-
- <el-col :span="8" v-if="form.radio == 1">
- <el-form-item>
- <el-date-picker
- @change="changeStartMonth"
- value-format="MM"
- v-model="form.start_month"
- type="month"
- placeholder="选择月">
- </el-date-picker>
- </el-form-item>
- </el-col>
- <el-col :span="8" v-if="form.radio == 2">
- <el-form-item>
- <el-select v-model="form.quarter" placeholder="请选择" @change="changeQuarter">
- <el-option
- v-for="item in timeType"
- :key="item.id"
- :label="item.name"
- :value="item.id">
- </el-option>
- </el-select>
- </el-form-item>
- </el-col>
- </el-row> -->
-
- </el-form>
- </div>
-
- <div class="cell clearfix" style="margin-top: 10px">
- <!-- <label class="title"><span class="name">阶段小结摘要</span> : </label> -->
- <el-form>
- <!-- <el-row :gutter="24">
- <el-col :span="8">
- <el-form-item label="干体重">
- <el-input v-model="form.dry_weight"></el-input>
- </el-form-item>
- </el-col>
- <el-col :span="8">
- <el-form-item label="共透析(次)">
- <el-input v-model="form.dialysis_count"></el-input>
- </el-form-item>
- </el-col>
- <el-col :span="8">
- <el-form-item label="HD(次)">
- <el-input v-model="form.hd_count"></el-input>
- </el-form-item>
- </el-col>
- </el-row> -->
- <!-- <el-row :gutter="24">
- <el-col :span="8">
- <el-form-item label="HDF(次)">
- <el-input v-model="form.hdf_count"></el-input>
- </el-form-item>
- </el-col>
- <el-col :span="8">
- <el-form-item label="HP(次)">
- <el-input v-model="form.hp_count"></el-input>
- </el-form-item>
- </el-col>
- <el-col :span="8">
- <el-form-item label="其他(次)">
- <el-input v-model="form.other_count"></el-input>
- </el-form-item>
- </el-col>
- </el-row> -->
- <!-- <el-row :gutter="24">
- <el-col :span="8">
- <el-form-item label="透析器">
- <el-input v-model="form.dialzer_apparatus" @focus="showInnerDialog('7')"></el-input>
- </el-form-item>
- </el-col>
- <el-col :span="8">
- <el-form-item label="灌流器">
- <el-input v-model="form.perfusion_apparatus" @focus="showInnerDialog('8')"></el-input>
- </el-form-item>
- </el-col>
-
- <el-col :span="8">
- <el-form-item label="抗凝剂">
- <el-select v-model="form.anticoagulant" placeholder="请选择" style="width:100%;">
- <el-option :key="0" label="请选择" :value="0"></el-option>
- <el-option v-for="(item, index) in anticoagulantList" :label="item.name" :key="index + 'e'"
- :value="item.id"></el-option>
- </el-select>
- </el-form-item>
- </el-col>
- </el-row> -->
- <!-- <div>透析液</div>
- <el-row :gutter="24">
- <el-col :span="8">
- <el-form-item label="钾">
- <el-input v-model="form.kalium"></el-input>
- </el-form-item>
- </el-col>
- <el-col :span="8">
- <el-form-item label="钙">
- <el-input v-model="form.autunite"></el-input>
- </el-form-item>
- </el-col>
- <el-col :span="8">
- <el-form-item label="钠">
- <el-input v-model="form.natrium"></el-input>
- </el-form-item>
- </el-col>
- </el-row> -->
- <!-- <div>透析时长</div>
- <el-row :gutter="24">
- <el-col :span="8">
- <el-form-item label="时">
- <el-input v-model="form.hour"></el-input>
- </el-form-item>
- </el-col>
- <el-col :span="8">
- <el-form-item label="分">
- <el-input v-model="form.minute"></el-input>
- </el-form-item>
- </el-col>
- </el-row> -->
- <!-- <el-row :gutter="24">
- <el-col :span="8">
- <el-form-item label="透前体重(kg)">
- <el-input v-model="form.befor_weight"></el-input>
- </el-form-item>
- </el-col>
- <el-col :span="8">
- <el-form-item label="透后体重(kg)">
- <el-input v-model="form.after_weight"></el-input>
- </el-form-item>
- </el-col>
- </el-row> -->
- <!-- <el-row :gutter="24">
- <el-col :span="8">
- <el-form-item label="透前血压(mmHg)">
- <el-input v-model="form.befor_pressure"></el-input>
- </el-form-item>
- </el-col>
- <el-col :span="8">
- <el-form-item label="透后血压(mmHg)">
- <el-input v-model="form.after_pressure"></el-input>
- </el-form-item>
- </el-col>
- </el-row> -->
-
- <el-row>
- <label class="title"><span class="name">阶段小结总结</span> : </label>
- <el-select v-model="form.template_summary_id" placeholder="请选择" @change="changeSummaryOne">
- <el-option
- v-for="item in summaryList"
- :key="item.value"
- :label="item.content"
- :value="item.value">
- </el-option>
- </el-select>
- <keep-alive>
- <editor ref="edit_neditor"
- id="edit_editor2"
- style="width: 1200px"
- v-bind:r_content="form.template_summary_content">
- </editor>
- </keep-alive>
- <!-- <el-input style="margin:10px 0;" type="textarea" autosize v-model="form.template_summary_content"></el-input> -->
- </el-row>
- <!-- <el-row>
- <label class="title"><span class="name">阶段小结个体化透析方案</span> : </label>
- <el-select v-model="form.template_plan_id" placeholder="请选择" @change="changeTempalte">
- <el-option
- v-for="item in planList"
- :key="item.value"
- :label="item.content"
- :value="item.value">
- </el-option>
- </el-select>
- <keep-alive>
- <editor ref="editorOne"
- id="edit_editor"
- style="width: 800px"
- v-bind:r_content="form.template_plan_content">
- </editor>
- </keep-alive>
- </el-row> -->
- <el-row>
- <label class="title"><span class="name">阶段小结化验结果</span> : </label>
- <el-button type="primary" @click="toInspection">选择检验检查</el-button>
-
- <div class="borderBox">
- <div v-for="item in form.template_inspection_content">
- <p>{{ item.project_name }}</p>
- <div style="display:flex;flex-wrap: wrap;">
- <div v-for="it in item.arr" style="width:33%;">
- {{ it.item_name }} <span v-if="it.unit!=''"> [{{it.unit}}] </span>:
- {{it.inspect_value}}
- <span v-if="parseInt(it.inspect_value) < parseInt(it.range_min)">
- ↓
- </span>
- <span v-if="parseInt(it.inspect_value) > parseInt(it.range_max)">
- ↑
- </span>
- </div>
- </div>
- </div>
- </div>
- </el-row>
- <el-row style="margin-top:10px;">
- <el-col :span="8">
- <el-form-item label="记录医生">
- <el-select v-model="form.admin_user_id" placeholder="请选择">
- <el-option
- v-for="item in docList"
- :key="item.admin_user_id"
- :label="item.user_name"
- :value="item.admin_user_id">
- </el-option>
- </el-select>
- </el-form-item>
- </el-col>
- <el-col :span="8">
- <el-form-item label="记录时间">
- <el-date-picker
- v-model="form.record_time"
- type="datetime"
- value-format="yyyy-MM-dd HH:mm:ss"
- placeholder="选择日期时间">
- </el-date-picker>
- </el-form-item>
- </el-col>
- </el-row>
- </el-form>
- </div>
- <div style="text-align: right; padding-right: 0px; padding-top: 10px; padding-bottom: 10px;">
- <el-button @click="edit_show_dialog = false">取消</el-button>
- <el-button type="primary" @click="editCreation()">保存
- </el-button>
- </div>
- </div>
- </div>
- </el-dialog>
-
- <el-dialog
- title="提示"
- :visible.sync="dialogVisibleInspection"
- width="80%"
- >
- <span>
- <el-form>
- <el-row>
- <el-form-item>
- <span>选择检验检查时间:</span>
- <div>
-
- <el-form-item label="时间:">
- <el-radio-group style="padding: 10px;" v-model="radio" @change="changeRadio">
- <el-radio :label="1">月份</el-radio>
- <el-radio :label="2">季度</el-radio>
- <el-radio :label="3">自定义时间</el-radio>
- </el-radio-group>
- </el-form-item>
- <el-form-item v-show="showquarty">
- <el-select v-model="quartype" placeholder="请选择" @change="changetype">
- <el-option
- v-for="item in quarterType"
- :key="item.id"
- :label="item.name"
- :value="item.id">
- </el-option>
- </el-select>
- </el-form-item>
- <el-form-item v-show="showtime">
- <el-date-picker
- @change="changeYear"
- v-model="startYear"
- class="timePicker"
- type="month"
- placeholder=""
- format="yyyy-MM"
- value-format="yyyy-MM">
- </el-date-picker>
- </el-form-item>
- </div>
- </el-form-item>
- </el-row>
- <el-row>
- <div v-show="showStarttime">
-
- <el-form-item >
- <el-date-picker
- @change="changFirstYear"
- style="width: 200px;"
- v-model="fisrt_time"
- class="timePicker"
- type="month"
- placeholder="开始时间"
- format="yyyy-MM-dd"
- value-format="yyyy-MM-dd">
- </el-date-picker>
- -
- <el-date-picker
- @change="changLastYear"
- style="width: 200px;"
- v-model="last_time"
- class="timePicker"
- type="month"
- placeholder="结束时间"
- format="yyyy-MM-dd"
- value-format="yyyy-MM-dd">
- </el-date-picker>
- </el-form-item>
-
- </div>
-
- </el-row>
- <el-row>
- <span>选择检验检查项目:</span>
- <div class="record">
- <el-row :gutter="15">
- <el-col :span="10">
- <el-table :header-cell-style="{
- backgroundColor: 'rgb(245, 247, 250)',
- color: '#606266'
- }"
- :row-style="{ color: '#303133' }"
- ref="single_table"
- :data="tableList"
- border highlight-current-row
- @current-change="changeCurrentRecord"
- @selection-change="selectionChangeOne"
- :row-class-name="tableRow"
- @row-click="onRowClick"
-
- >
- <el-table-column type="selection" width="60" align="center"></el-table-column>
- <el-table-column label="检验项目" align="center">
- <template slot-scope="scope">
- {{scope.row.project_name}}
- </template>
- </el-table-column>
- </el-table>
- </el-col>
- <el-col :span="14">
- <div class="record_content_panel">
- <el-table :header-cell-style="{
- backgroundColor: 'rgb(245, 247, 250)',
- color: '#606266'
- }"
- :row-style="{ color: '#303133' }" :data="tableData"
- border highlight-current-row @current-change="didChangeCurrentRecord"
- @selection-change="selectionChange"
- :row-class-name="tableRow"
-
- >
- <el-table-column label="检验项目" align="center">
- <template slot-scope="scope">
- {{scope.row.item_name}}
- </template>
- </el-table-column>
- <el-table-column label="结果" align="center">
- <template slot-scope="scope">
- {{scope.row.inspect_value}}
- <span v-if="parseInt(scope.row.inspect_value) < parseInt(scope.row.range_min)">
- ↓
- </span>
- <span v-if="parseInt(scope.row.inspect_value) > parseInt(scope.row.range_max)">
- ↑
- </span>
- </template>
- </el-table-column>
- <el-table-column label="参考值" align="center">
- <template slot-scope="scope">
- {{scope.row.range_min}} ~ {{scope.row.range_max}}
- </template>
- </el-table-column>
- <el-table-column label="单位" align="center">
- <template slot-scope="scope">
- {{scope.row.unit}}
- </template>
- </el-table-column>
- </el-table>
- </div>
- </el-col>
- </el-row>
- </div>
- </el-row>
- </el-form>
-
- </span>
- <span slot="footer" class="dialog-footer">
- <el-button @click="dialogVisibleInspection = false">取 消</el-button>
- <el-button type="primary" @click="toContent">确 定</el-button>
- </span>
- </el-dialog>
-
- <multi-select-box
- :propsForm="InnerDialogProps"
- v-on:dialog-comfirm="innerDialogComfirm"
- v-on:dialog-cancle="innerDialogCancle"
- ></multi-select-box>
-
- </div>
- </div>
-
- <!-- </div> -->
- </template>
-
- <script>
- import PatientSidebar from './components/PatientSidebar'
- import Editor from '@/components/Editor'
-
- import { getInitDataList,getInspectionMajorItem,getInspectionDetail,getInspectionItemList,saveCreation,getTemplateSummaryList,getTemplateSummaryDetail,UpdateTemplateSummary,deleteSummary } from '@/api/patient'
- import { parseTime } from '@/utils'
- import BreadCrumb from '@/xt_pages/components/bread-crumb'
- import { uParseTime } from '@/utils/tools'
- import { getDataConfig } from '@/utils/data'
- import multiSelectBox from '../dialysis/details/dialog/MultiSelectBox'
- import MsgTip from '../dialysis/details/dialog/MsgTip'
-
- const moment = require('moment')
- export default {
- name: 'templateSummary',
- components: {
- PatientSidebar,
- BreadCrumb,
- Editor,
- MsgTip,
- multiSelectBox,
- },
- data() {
- return {
- InnerDialogProps: {
- values: [],
- visibility: false,
- isShowTextArea: true,
- customContent: '',
- titles: '',
- type: '' // 不同弹框类型,用来匹配数据
- },
- loading: false,
- title: '',
- patient_id: 0,
- date: [],
- start_time: '',
- end_time: '',
- course_of_disease_time: '',
- records: [],
- doctors: [],
- current_select_record: null,
- show_dialog: false,
- show_edit_dialog: false,
- uploading_new_record: false,
- templates: this.$store.getters.configlist.course_disease,
- select_template: '',
- new_content: '',
- edit_new_content: '',
- edit_course_of_disease_time: '',
- selectingRows: [],
- table_current_index: -1,
- edit_current_id: 0,
- edit_title: '',
- value:'',
- form:{
- id:0,
- title:"",
- start_year:new Date(),
- start_month:new Date(),
- radio:1,
- quarter:1,
- dry_weight:"",
- dialysis_count:"",
- hd_count:"",
- hdf_count:"",
- hp_count:"",
- other_count:"",
- dialzer_apparatus:"",
- perfusion_apparatus:"",
- anticoagulant:0,
- kalium:"",
- autunite:"",
- natrium:"",
- hour:"",
- minute:"",
- befor_weight:"",
- after_weight:"",
- befor_pressure:"",
- after_pressure:"",
- template_summary_id:"",
- template_summary_content:"",
- template_plan_id:"",
- template_inspection_id:0,
- template_inspection_content:"",
- admin_user_id:this.$store.getters.xt_user.user.id,
- record_time: moment().locale('zh-cn').format('YYYY-MM-DD HH:mm:ss'),
- patient_id:"",
- start_time:"",
- end_time:"",
- template_plan_content:"",
- inspect_date:"",
- },
- timeType:[
- {id:1,name:"第一季度"},
- {id:2,name:"第二季度"},
- {id:3,name:"第三季度"},
- {id:4,name:"第四季度"},
- ],
- monthType:[
- {id:1,name:"一月"},
- {id:2,name:"二月"},
- {id:3,name:"三月"},
- {id:4,name:"四月"},
- {id:5,name:"五月"},
- {id:6,name:"六月"},
- {id:7,name:"七月"},
- {id:8,name:"八月"},
- {id:9,name:"九月"},
- {id:10,name:"十月"},
- {id:11,name:"十一月"},
- {id:12,name:"十二月"},
- ],
- options:[],
- dialogVisibleInspection:false,
- editDialogVisible:false,
- edit_show_dialog:false,
- InspectionMajor:[],
- other_start_time:"",
- startYear:moment(new Date()).endOf('month').subtract('month', +1).endOf('month').format("YYYY-MM-DD") ,
- // startMonth:(new Date().getMonth - 1).toString(),
- tableList:[],
- tableData:[],
- inspectDataList:[],
- projectList:[],
- docList:[],
- inspectionList:[],
- editObj:{},
- anticoagulantList:[],
- dialyzerPerfusionApparatus:[],
- irrigations:[],
- dialyzerList:[],
- irrigationList:[],
- stockType:[],
- summaryList:[],
- planList:[],
- projectStr:"",
- projectIndate:"",
- start_year:"2021",
- start_month:"",
- start_date: moment(new Date()).startOf("month").format("YYYY-MM-DD"),
- end_date: moment(new Date()).endOf('month').format("YYYY-MM-DD"),
- ids:"",
- lastYear:new moment().subtract(1,'months').date(1).format("YYYY-MM-DD"),
- quarterType: [
- { id: 1, name: "第一季度"},
- { id: 2, name: "第二季度"},
- { id: 3, name: "第三季度"},
- { id: 4, name: "第四季度"}
- ],
- quartype:1,
- radio:1,
- showtime:true,
- showquarty:false,
- fisrt_time:"",
- last_time:"",
- showStarttime:false,
- }
- },
- created() {
-
- // console.log("this.$store.getters.xt_user.user.id",this.$store.getters.xt_user.user.id)
- this.patient_id = this.$route.params && this.$route.params.id
- var now = new Date()
- this.date = [now.getTime() - (7 * 24 * 60 * 60 * 1000), now.getTime()]
-
- var nowDate = new Date()
- var nowYear = nowDate.getFullYear()
- var nowMonth = nowDate.getMonth() + 1
-
- var nowDay = nowDate.getDate()
- this.end_time =
- nowYear +
- '-' +
- (nowMonth < 10 ? '0' + nowMonth : nowMonth) +
- '-' +
- (nowDay < 10 ? '0' + nowDay : nowDay)
- nowDate.setMonth(nowDate.getMonth() - 1)
- nowYear = nowDate.getFullYear()-1
- nowMonth = nowDate.getMonth() + 1
- nowDay = nowDate.getDate()
- this.start_time =
- nowYear +
- '-' +
- (nowMonth < 10 ? '0' + nowMonth : nowMonth) +
- '-' +
- (nowDay < 10 ? '0' + nowDay : nowDay)
- this.other_start_time = nowYear +'-' +(nowMonth < 10 ? '0' + nowMonth : nowMonth) +'-' + (nowDay < 10 ? '0' + nowDay : nowDay)
- var anticoagulantsConfitOne = this.$store.getters.anticoagulants_confit
- const arrFour = []
- Object.keys(anticoagulantsConfitOne).map((item, index) => {
- if (index != 2) {
- arrFour.push(anticoagulantsConfitOne[item])
- }
- })
-
- this.anticoagulantList = arrFour
- // console.log("抗凝剂量",this.anticoagulantList)
- var endtime= moment(new Date()).endOf('month').subtract('month', +1).endOf('month').format("YYYY-MM-DD")
- console.log("endtime",endtime)
- this.getlist()
- this.getInspectionMajor()
- this.getTemplateSummaryList()
-
- },
- methods: {
- getTime(val) {
- //console.log("val2322332322323223",val)
- if(val == "" || val == undefined){
- return ""
- }else {
- return uParseTime(val, '{y}-{m}-{d}')
- }
- },
- getTimeTwo(val) {
- if(val == ""){
- return ""
- }else {
- return uParseTime(val, '{y}-{m}-{d} {h}:{i}:{s}')
- }
- },
- getTimeOne(val) {
- if(val < 0){
- return ""
- }
- if(val == ""){
- return ""
- }else {
- return uParseTime(val, '{m}')
- }
- },
- showEdit(){
-
- this.getCurrentRecordDetailOne()
- },
- onRowClick(){
-
- },
- didChangeCurrentRecord(){
-
- },
- changeCurrentRecord(val){
- this.tableData = []
- this.getInspectionDetai(val)
- },
- selectionChangeOne(val){
- // console.log("hhhhhhhhh",val)
- this.getInspectionItemList(val)
- },
- startTimeChange(val){
- console.log("val",val)
- this.start_time = val
- this.getTemplateSummaryList()
- },
- endTimeChange(val){
- this.end_time = val
- this.getTemplateSummaryList()
- },
- print(){
- this.$router.push({path:"/patient/patient/templateSummary/print?id="+this.form.id})
- },
- tableRow(){
-
- },
- getQuarter(year,quarter){
- var start_time = ""
- if(quarter == 1){
-
- }
- },
- didSelectionChange(){
-
- },
- changeCurrentRecordTwo(val){
- console.log("val232232",val.id)
- this.form.id = val.id
- this.getCurrentRecordDetail(val.id)
- },
- changeCurrentRecordOne(){
-
- },
- getlist(){
- var params={
- start_year:this.getTime(this.form.start_year),
- start_month:this.getTime(this.form.start_month),
- quarter:this.form.quarter,
- patient_id:this.patient_id,
- start_time:this.start_date,
- end_time:this.end_date,
- }
- // console.log("世纪时间",params)
- console.log(moment(moment(2020 + '-01-01').toDate()).quarter(2).format("YYYY-MM-DD"))
- getInitDataList(params).then(response=>{
- if(response.data.state == 1){
- var prescription_list = response.data.data.prescription_list
- this.form.dialzer_apparatus = prescription_list.dialysis_dialyszers
- this.form.perfusion_apparatus = prescription_list.dialysis_irrigation
- this.form.anticoagulant = prescription_list.anticoagulant
- this.form.hour = prescription_list.dialysis_duration_hour
- this.form.minute = prescription_list.dialysis_duration_minute
- this.form.kalium = prescription_list.kalium
- this.form.natrium = prescription_list.sodium
- this.form.autunite = prescription_list.calcium
- var beforlist = response.data.data.beforlist
- // console.log("透前数据565665565656",beforlist)
- this.form.befor_weight = beforlist.weight_before
- this.form.dry_weight = beforlist.dry_weight
- var afterlist = response.data.data.after_list
- // console.log("透后数据232332323232",afterlist)
- this.form.after_weight = afterlist.weight_after
- this.form.after_pressure = afterlist.systolic_blood_pressure + "/"+afterlist.diastolic_blood_pressure
- this.form.befor_pressure = beforlist.systolic_blood_pressure +"/"+beforlist.diastolic_blood_pressure
- var modelist = response.data.data.modelist
- console.log("modelist",modelist)
- var docList = response.data.data.docList
- // console.log("doctlist",docList)
- this.docList = docList
- var stockType = response.data.data.stockType
- var arr = []
- var arrTwo = []
- for(let i=0;i<stockType.length;i++){
- if(stockType[i].stock_attribute == 2){
- arr.push(stockType[i])
- }
- if(stockType[i].stock_attribute == 3){
- arrTwo.push(stockType[i])
- }
- }
- var dialyzator = []
- var irrigation = []
- for(let i=0;i<arr.length;i++){
- for(let j=0;j<arr[i].GoodInfo.length;j++){
- dialyzator.push(arr[i].GoodInfo[j])
- }
- }
- this.dialyzerList = dialyzator
- // console.log("arrtt2323232332232323",arrTwo)
- for(let i=0;i<arrTwo.length;i++){
- for(let j=0;j<arrTwo[i].GoodInfo.length;j++){
- irrigation.push(arrTwo[i].GoodInfo[j])
- }
- }
- this.irrigationList = irrigation
- // console.log("透析器233223",this.dialyzerList)
- // console.log("灌流器323323223",this.irrigationList)
- var count = ""
- var total_count = 0
- for(let i=0;i<modelist.length;i++){
- total_count += modelist[i].count
- if(modelist[i].mode_id == 1){
- this.form.hd_count = modelist[i].count
- }
- if(modelist[i].mode_id == 2){
- this.form.hdf_count = modelist[i].count
- }
- if(modelist[i].mode_id == 4){
- this.form.hp_count = modelist[i].count
- }
-
- if(modelist[i].mode_id!=1&&modelist[i].mode_id!=2 && modelist[i].mode_id!=4){
- count += modelist[i].count
- }
-
- }
- this.form.other_count = count
-
- this.form.dialysis_count = total_count
- // console.log("modelist",modelist)
- var summaryList = response.data.data.summaryList
- // console.log("summaryList",summaryList)
- this.summaryList = summaryList
- var planList = response.data.data.planList
- // console.log("planlist",planList)
- this.planList = planList
- }
- })
- },
- toInspection(){
-
- this.dialogVisibleInspection = true
- },
- changetype(){
- this.getInspectionMajor()
- },
- //获取大项数据来源
- getInspectionMajor(){
- var start_time = ""
- var end_time = ""
- console.log("radio2332322332",this.radio)
- if(this.radio == 1){
- console.log("start_year",this.startYear)
- console.log("endyaer",this.lastYear)
- end_time = this.startYear
- start_time = this.lastYear
- }
- if(this.radio == 2){
- if(this.quartype == 1){
- start_time = moment().startOf('year').format('YYYY-MM-DD')
- end_time = moment().month(2).endOf('month').format("YYYY-MM-DD")
- }
- if(this.quartype == 2){
- start_time = moment().month(3).startOf('month').format("YYYY-MM-DD")
- end_time = moment().month(5).endOf('month').format("YYYY-MM-DD")
- }
- if(this.quartype == 3){
- start_time = moment().month(6).startOf('month').format("YYYY-MM-DD")
- end_time = moment().month(8).endOf('month').format("YYYY-MM-DD")
- }
- if(this.quartype == 4){
- start_time = moment().month(9).startOf('month').format("YYYY-MM-DD")
- end_time = moment().month(11).endOf('month').format("YYYY-MM-DD")
- }
- }
-
- if(this.radio == 3){
- start_time = this.fisrt_time
- end_time = this.last_time
- }
-
-
- console.log("start_time",start_time)
- console.log("end_time",end_time)
- var params = {
- other_start_time:end_time,
- patient_id:this.patient_id,
- last_time:start_time,
- }
- console.log("开始数据",params)
- getInspectionMajorItem(params).then(response=>{
- if(response.data.state == 1){
- var list = response.data.data.list
- console.log("列表23232232323",list)
- // this.$refs.single_table.setCurrentRow(list[0])
- this.tableList = list
-
- }
- })
- },
- //获取小项的值
- getInspectionDetai(val){
- console.log("val2332232",val)
- var params = {
- project_id:val.project_id,
- patient_id:val.patient_id,
- inspect_date:val.inspect_date,
- }
- // console.log("param2233233223",params)
- getInspectionDetail(params).then(response=>{
- if(response.data.state ==1){
- var list = response.data.data.list
- // console.log("详情222",list)
-
- this.tableData = list
- }
- })
- },
- selectionChange(val){
- // console.log("val233223",val)
- selectionChange().then(response=>{
-
- })
- },
- getInspectionItemList(val){
- this.projectList = []
- this.inspectDataList = []
- for(let i=0;i<val.length;i++){
- this.projectList.push(val[i].project_id)
- this.inspectDataList.push(val[i].inspect_date)
- }
-
- },
- toContent(){
-
- var str = this.projectList.join(",")
- this.projectStr = str
- var inspe_date = this.inspectDataList.join(",")
- this.projectIndate = inspe_date
- var params = {
- ids:str,
- inspect_date:inspe_date,
- patient_id:this.patient_id,
- }
- // console.log("params",params)
- getInspectionItemList(params).then(response=>{
- if(response.data.state == 1){
- var list = response.data.data.list
- let arr = this.unique(list,'project_name')
- // console.log("选择检验检查",arr)
-
- this.form.template_inspection_content = arr
- this.dialogVisibleInspection = false
-
- }
- })
- },
- saveCreation(){
-
- if (this.form.dry_weight == ""){
- this.form.dry_weight = 0
- }
- if (this.form.dialysis_count == ""){
- this.form.dialysis_count = 0
- }
- if (this.form.hd_count == ""){
- this.form.hd_count = 0
- }
- if (this.form.hdf_count == ""){
- this.form.hdf_count = 0
- }
- if (this.form.hp_count == ""){
- this.form.hp_count = 0
- }
- if (this.form.other_count == ""){
- this.form.other_count = 0
- }
- if (this.form.kalium == ""){
- this.form.kalium = 0
- }
- if (this.form.autunite == ""){
- this.form.autunite = 0
- }
- if (this.form.natrium == ""){
- this.form.natrium = 0
- }
- if (this.form.hour == ""){
- this.form.hour = 0
- }
- if (this.form.minute == ""){
- this.form.minute = 0
- }
- if(this.form.befor_weight == ""){
- this.form.befor_weight = 0
- }
- if(this.form.after_weight == ""){
- this.form.after_weight = 0
- }
- if(this.form.befor_pressure == ""){
- this.form.befor_pressure = 0
- }
- if(this.form.template_plan_id == ""){
- this.form.template_plan_id = 0
- }
- if(this.form.template_summary_id == ""){
- this.form.template_summary_id = 0
- }
- var year = this.form.start_year+"-"+"01"+"-"+"01"
- console.log("年",year)
- var month = this.form.start_year+"-"+this.form.start_month+"-"+"01"
- console.log("月",this.$refs)
-
-
- var params = {
- title:this.form.title,
- dry_weight:this.form.dry_weight.toString(),
- dialysis_count:parseInt(this.form.dialysis_count),
- hd_count:parseInt(this.form.hd_count),
- hdf_count:parseInt(this.form.hdf_count),
- hp_count:parseInt(this.form.hp_count),
- other_count:parseInt(this.form.other_count),
- dialzer_apparatus:this.form.dialzer_apparatus,
- perfusion_apparatus:this.form.perfusion_apparatus,
- anticoagulant:this.form.anticoagulant,
- kalium:this.form.kalium.toString(),
- autunite:this.form.autunite.toString(),
- natrium:this.form.natrium.toString(),
- hour:parseInt(this.form.hour),
- minute:parseInt(this.form.minute),
- befor_weight:this.form.befor_weight.toString(),
- after_weight:this.form.after_weight.toString(),
- befor_pressure:this.form.befor_pressure,
- template_plan_content:"",
- admin_user_id:this.form.admin_user_id,
- record_time:this.form.record_time,
- after_pressure:this.form.after_pressure,
- template_summary_id:this.form.template_summary_id,
- template_summary_content:this.$refs.edit_neditor.content,
- template_plan_id:this.form.template_plan_id,
- template_inspection_id:this.form.template_inspection_id,
- patient_id:parseInt(this.patient_id),
- project_id:this.projectStr,
- inspect_date:this.projectIndate,
- start_year:year,
- start_month:month,
- radio:this.form.radio,
-
- }
- console.log("parawm232323223",params)
-
- saveCreation(params).then(response=>{
- if(response.data.state ==1){
- var summary = response.data.data.summary
- // console.log("summary",summary)
- this.getTemplateSummaryList()
- this.$message.success("保存成功!");
- this.show_dialog = false
- this.form.title = ""
- // this.form.dry_weight = ""
- // this.form.dialysis_count =""
- // this.form.hd_count= ""
- // this.form.hdf_count = ""
- // this.form.hp_count = ""
- // this.form.other_count =""
- // this.form.dialzer_apparatus = ""
- // this.form.perfusion_apparatus = ""
- // this.form.anticoagulant = 0
- // this.form.kalium = ""
- // this.form.autunite = ""
- // this.form.natrium = ""
- // this.form.hour =""
- // this.form.minute = ""
- // this.form.befor_weight = ""
- // this.form.after_weight = ""
- // this.form.befor_pressure = ""
- // this.form.template_summary_content = ""
- // this.form.template_plan_content = ""
- // this.form.template_inspection_content = ""
- // this.from.after_pressure = ""
- // this.form.template_summary_id = ""
- // this.form.template_plan_id = ""
- // this.form.template_inspection_id = ""
- }
- })
- },
- getTemplateSummaryList(){
-
- var params = {
- patient_id:this.patient_id,
- start_time:this.start_time,
- end_time:this.end_time,
- }
- console.log("param2222",params)
- getTemplateSummaryList(params).then(response=>{
- if(response.data.state ==1){
- var list = response.data.data.list
- this.inspectionList = list
- this.$refs.inspection_table.setCurrentRow(this.inspectionList[0])
- if (list.length > 0) {
- this.getCurrentRecordDetail(this.inspectionList[0].id)
- }
-
- }
- })
- },
- getCurrentRecordDetail(id){
- var params = {
- id:id
- }
- getTemplateSummaryDetail(params).then(response=>{
- if(response.data.state == 1){
- var list = response.data.data.list
- var inspectlist = response.data.data.inspectlist
-
- console.log("列表数据",list)
- let arr = this.unique(inspectlist,'project_name')
- console.log("内容233323232323223",arr)
- list.template_inspection_content = arr
- this.editObj = list
-
- }
- })
- },
- getTime(val) {
- if(val < 0){
- return ""
- }
- if(val == ""){
- return ""
- }else {
- return uParseTime(val, '{y}-{m}-{d}')
- }
- },
- showInnerDialog: function(val) {
- this.InnerDialogProps.visibility = true
- switch (val) {
- case '7': // 透析器
-
- for(let i=0;i<this.dialyzerList.length;i++){
- this.dialyzerList[i].name = this.dialyzerList[i].specification_name
- }
- this.InnerDialogProps.values = this.dialyzerList
- this.InnerDialogProps.titles = '透析器'
- this.InnerDialogProps.type = 'dialyzers'
- this.InnerDialogProps.selected = this.form.dialzer_apparatus
- this.InnerDialogProps.isShowTextArea = false
- break
- case '8':
- for(let i=0;i<this.irrigationList.length;i++){
- this.irrigationList[i].name = this.irrigationList[i].specification_name
- }
- this.InnerDialogProps.values = this.irrigationList
- this.InnerDialogProps.titles = '灌流器'
- this.InnerDialogProps.type = 'irrigations'
- this.InnerDialogProps.selected = this.form.perfusion_apparatus
- this.InnerDialogProps.isShowTextArea = false
- break
- }
- },
- innerDialogComfirm: function(val) {
- this.InnerDialogProps.visibility = false
- switch (val.type) {
- case 'dialyzers':
- this.form.dialzer_apparatus = val.value.join(',')
- break
- case 'irrigations':
- this.form.perfusion_apparatus = val.value.join(',')
- break
- }
- },
- innerDialogCancle: function() {
- this.InnerDialogProps.visibility = false
- },
- getCurrentRecordDetailOne(){
- var params = {
- id:this.form.id
- }
- getTemplateSummaryDetail(params).then(response=>{
- if(response.data.state == 1){
- var list = response.data.data.list
- var inspectlist = response.data.data.inspectlist
- console.log("详情232332233223232323",list)
- let arr = this.unique(inspectlist,'project_name')
- this.form.template_inspection_content = arr
- this.edit_show_dialog = true
- this.form.title = list.title
- this.form.id = list.id
- this.form.admin_user_id = list.admin_user_id
- this.form.after_pressure = list.after_pressure
- this.form.after_weight = list.after_weight
- this.form.anticoagulant = list.anticoagulant
- this.form.autunite = list.autunite
- this.form.befor_pressure = list.befor_pressure
- this.projectIndate = list.inspect_date
- if( list.befor_weight == 0){
- this.form.befor_weight = ""
- }else{
- this.form.befor_weight = list.befor_weight
- }
- if(list.dialysis_count == 0){
- this.form.dialysis_count = ""
- }else{
- this.form.dialysis_count = list.dialysis_count
- }
-
- this.form.dialzer_apparatus = list.dialzer_apparatus
- this.form.dry_weight = list.dry_weight
- this.form.hd_count= list.hd_count
- this.form.hdf_count= list.hdf_count
- this.form.hour = list.hour
- this.form.hp_count = list.hp_count
- this.form.kalium= list.kalium
- this.form.minute = list.minute
- this.form.natrium =list.natrium
- this.form.perfusion_apparatus= list.perfusion_apparatus
- this.form.other_count = list.other_count
- console.log("时间232233232",list.record_time)
- if(list.template_inspection_id == 0){
- list.template_inspection_id = ""
- }else{
- this.form.template_inspection_id = list.template_inspection_id
- }
-
- this.form.template_plan_content = list.template_plan_content
- if(list.template_plan_id == 0){
- this.form.template_plan_id = ""
- }else{
- this.form.template_plan_id = list.template_plan_id
- }
-
- this.form.template_summary_content =list.template_summary_content
- if(list.template_summary_id == 0){
- this.form.template_summary_id = ""
- }else{
- this.form.template_summary_id = list.template_summary_id
- }
- this.projectStr = list.project_id
- }
- })
- },
- changeSummary(){
- for(let i=0;i<this.summaryList.length;i++){
- if(this.form.template_summary_id == this.summaryList[i].value){
- this.form.template_summary_content = this.summaryList[i].content
- }
- }
- },
- changeSummaryOne(){
- for(let i=0;i<this.summaryList.length;i++){
- if(this.form.template_summary_id == this.summaryList[i].value){
- this.form.template_summary_content = this.summaryList[i].content
- }
- }
- },
- changeTempalte(){
- for(let i=0;i<this.planList.length;i++){
- if(this.form.template_plan_id == this.planList[i].value){
- this.form.template_plan_content = this.planList[i].content
- }
- }
- },
- editCreation(){
- if(this.form.template_summary_id == ""){
- this.form.template_summary_id = 0
- }
- if(this.form.template_inspection_id == ""){
- this.form.template_inspection_id = 0
- }
- if(this.form.template_plan_id == ""){
- this.form.template_plan_id = 0
- }
- if(this.form.dialysis_count == ""){
- this.form.dialysis_count = 0
- }
- var params = {
- id:this.form.id,
- title:this.form.title,
- dry_weight:this.form.dry_weight.toString(),
- dialysis_count:parseInt(this.form.dialysis_count),
- hd_count:parseInt(this.form.hd_count),
- hdf_count:parseInt(this.form.hdf_count),
- hp_count:parseInt(this.form.hp_count),
- other_count:parseInt(this.form.other_count),
- dialzer_apparatus:this.form.dialzer_apparatus,
- perfusion_apparatus:this.form.perfusion_apparatus,
- anticoagulant:this.form.anticoagulant,
- kalium:this.form.kalium.toString(),
- autunite:this.form.autunite.toString(),
- natrium:this.form.natrium.toString(),
- hour:parseInt(this.form.hour),
- minute:parseInt(this.form.minute),
- befor_weight:this.form.befor_weight.toString(),
- after_weight:this.form.after_weight.toString(),
- befor_pressure:this.form.befor_pressure,
- template_plan_content:"",
- template_summary_content:this.$refs.edit_neditor.content,
- admin_user_id:this.form.admin_user_id,
- record_time:this.form.record_time,
- after_pressure:this.form.after_pressure,
- template_summary_id:this.form.template_summary_id,
- template_plan_id:this.form.template_plan_id,
- template_inspection_id:this.form.template_inspection_id,
- patient_id:parseInt(this.patient_id),
- project_id:this.projectStr,
- inspect_date:this.projectIndate,
- }
- console.log("parawm232323223",params)
-
-
- UpdateTemplateSummary(params).then(response=>{
- if(response.data.state == 1){
- var list = response.data.data.list
- this.$message.success("保存成功")
- this.edit_show_dialog = false
- this.getTemplateSummaryList()
- }
- })
- },
- unique(data, key) {
- let lastData = [];
- data.forEach(item => {
- let status = lastData.some(project_name => project_name[key] == item[key]);
- if (!status) {
- let obj = {
- project_name:'',
- arr:[]
- }
- obj.project_name = item.project_name
- obj.arr.push(item);
- lastData.push(obj);
- } else {
- lastData.forEach((project_name, index) => {
- if (project_name[key] === item[key]) {
- project_name.arr.push(item);
- }
- });
- }
- });
- return lastData;
- },
- getDoctor(id){
- var user_name = ""
- for(let i=0;i<this.docList.length;i++){
- if(id == this.docList[i].admin_user_id){
- user_name = this.docList[i].user_name
- }
- }
- return user_name
- },
- changeStartYear(){
- this.form.title = ""
- this.form.dry_weight = ""
- this.form.dialysis_count =""
- this.form.hd_count= ""
- this.form.hdf_count = ""
- this.form.hp_count = ""
- this.form.other_count =""
- this.form.dialzer_apparatus = ""
- this.form.perfusion_apparatus = ""
- this.form.anticoagulant = ""
- this.form.kalium = ""
- this.form.autunite = ""
- this.form.natrium = ""
- this.form.hour =""
- this.form.minute = ""
- this.form.befor_weight = ""
- this.form.after_weight = ""
- this.form.befor_pressure = ""
- this.form.template_summary_content = ""
- this.form.template_plan_content = ""
- this.form.template_inspection_content = ""
- this.from.after_pressure = ""
- this.form.template_summary_id = ""
- this.form.template_plan_id = ""
- this.form.template_inspection_id = ""
- this.start_year = this.form.start_year
- console.log("年份",this.form.start_year)
- console.log("月份",this.getTimeOne(this.form.start_month))
- var start = this.form.start_year + "-" + this.getTimeOne(this.form.start_month) + "-"+"01"
- var end = this.form.start_year + "-" + this.getTimeOne(this.form.start_month) + "-"+"30"
- this.start_date = start
- this.end_date = end
- this.getlist()
- },
- changeStartMonth(){
- this.form.title = ""
- this.form.dry_weight = ""
- this.form.dialysis_count =""
- this.form.hd_count= ""
- this.form.hdf_count = ""
- this.form.hp_count = ""
- this.form.other_count =""
- this.form.dialzer_apparatus = ""
- this.form.perfusion_apparatus = ""
- this.form.anticoagulant = ""
- this.form.kalium = ""
- this.form.autunite = ""
- this.form.natrium = ""
- this.form.hour =""
- this.form.minute = ""
- this.form.befor_weight = ""
- this.form.after_weight = ""
- this.form.befor_pressure = ""
- this.form.template_summary_content = ""
- this.form.template_plan_content = ""
- this.form.template_inspection_content = ""
- this.form.after_pressure = ""
- this.form.template_summary_id = ""
- this.form.template_plan_id = ""
- this.form.template_inspection_id = ""
- console.log("sart",this.form.start_month)
- var end = ""
- if(this.form.start_month == "02"){
- end = this.start_year +"-"+ this.form.start_month + "-"+"28"
- }else{
- end = this.start_year +"-"+ this.form.start_month + "-"+"30"
- }
- var start = this.start_year +"-"+ this.form.start_month+"-"+"01"
-
- this.start_date = start
- this.end_date = end
- console.log("开始时间",this.start_date)
- console.log("结束时间",this.end_date)
- this.getlist()
-
- },
- changeQuarter(val){
- this.form.title = ""
- this.form.dry_weight = ""
- this.form.dialysis_count =""
- this.form.hd_count= ""
- this.form.hdf_count = ""
- this.form.hp_count = ""
- this.form.other_count =""
- this.form.dialzer_apparatus = ""
- this.form.perfusion_apparatus = ""
- this.form.anticoagulant = ""
- this.form.kalium = ""
- this.form.autunite = ""
- this.form.natrium = ""
- this.form.hour =""
- this.form.minute = ""
- this.form.befor_weight = ""
- this.form.after_weight = ""
- this.form.befor_pressure = ""
- this.form.template_summary_content = ""
- this.form.template_plan_content = ""
- this.form.template_inspection_content = ""
-
- this.form.after_pressure = ""
- this.form.template_summary_id = ""
- this.form.template_plan_id = ""
- this.form.template_inspection_id = ""
- if(val == 1){
- this.start_date = this.start_year+"-"+"01"+"-"+"01"
- this.end_date = this.start_year +"-"+"03"+"-"+"31"
- }
- if(val == 2){
- this.start_date = this.start_year +"-"+ "04"+"-"+"01"
- this.end_date = this.start_year +"-"+ "06"+"-"+"30"
- }
- if(val == 3){
- this.start_date = this.start_year +"-"+ "07"+"-"+"01"
- this.end_date = this.start_year +"-"+ "09"+"-"+"30"
- }
- if(val == 4){
- this.start_date = this.start_year +"-"+ "09"+"-"+"01"
- this.end_date = this.start_year +"-"+ "12"+"-"+"31"
- }
- this.getlist()
- },
- getAnticoagulant(id){
-
- var name = ""
- for(let i=0;i<this.anticoagulantList.length;i++){
- if(id == this.anticoagulantList[i].id){
- name = this.anticoagulantList[i].name
- }
- }
- return name
- },
- changeYear(val){
- console.log("val2323323223",val)
- if(val == "2021-02"){
- this.startYear = val+"-" + "28"
- }else if(val == "2021-08"){
- this.startYear = val+"-" + "31"
- }else if(val == "2021-10"){
- this.startYear = val+"-" + "31"
- }else if(val == "2021-12"){
- this.startYear = val+"-" + "31"
- }else if(val == "2024-02"){
- this.startYear = val+"-" + "29"
- }else{
- this.startYear = val+"-" + "30"
- }
-
- if(val == "2024-02"){
- this.lastYear = val+"-"+"01"
- }else{
- this.lastYear = val+"-"+"01"
- }
-
-
- this.getInspectionMajor()
- },
- changFirstYear(){
- console.log("hahhahahh")
- this.getInspectionMajor()
- },
- changLastYear(){
- this.getInspectionMajor()
- },
- selectSummary(val){
- console.log("val23232",val)
- var arr = []
- for( let i=0;i<val.length;i++){
- arr.push(val[i].id)
- }
-
- var str = arr.join(",")
- console.log("str",str)
- this.ids = str
- },
- deleteAction(){
- if(this.ids == ""){
- this.$message.error("请勾选需要删除的数据")
- return
- }
- this.$confirm('确认删除这条记录?', '删除记录', {
- confirmButtonText: '确定',
- cancelButtonText: '取消',
- type: 'warning'
- }).then(() => {
- let params = {
- ids: this.ids,
- }
- console.log("params2323",params)
-
- deleteSummary(params).then(response => {
- if (response.data.state == 0) {
- this.$message.error(response.data.msg)
- return false
- } else {
- var msg =response.data.data.msg
- this.getTemplateSummaryList()
-
- }
- })
- })
- .catch(() => {
- })
- },
- changeRadio(val){
- if(val == 1){
- this.showtime = true
- this.showquarty = false
- this.showStarttime = false
- this.getInspectionMajor()
- }
- if(val == 2){
- this.showquarty = true
- this.showtime = false
- this.showStarttime = false
- this.getInspectionMajor()
- }
- if(val == 3){
- this.showStarttime = true
- this.showtime =false
- this.showquarty = false
- this.getInspectionMajor()
- }
- }
-
- },
- // watch: {
- // inspectionList: function() {
- // this.$nextTick(function() {
- // this.$refs.inspection_table.setCurrentRow(this.inspectionList[0])
- // })
- // },
-
- // },
- }
- </script>
-
- <style rel="stylesheet/css" lang="scss" scoped>
- .borderBox{
- border: 1px solid #DCDFE6;
- padding: 10px;
- margin-top: 10px;
- border-radius: 4px;
- p{
- font-weight: bold;
- font-size: 20px;
- margin: 10px 0;
- }
- }
- .container {
- margin-left: 180px;
- padding: 20px;
- background: #fff;
- min-height: calc(100vh - 173px);
- margin-bottom: 15px;
-
- .record {
- padding-top: 20px;
- }
-
- }
- .record_content_panel {
- border-width: 1px;
- border-style: solid;
- border-color: #ebeef5;
- min-height: 200px;
-
- .title {
- font-size: 14px;
- font-weight: 500;
- color: #909399;
- line-height: 44px;
- height: 44px;
- text-align: center;
- border-bottom-width: 1px;
- border-bottom-style: solid;
- border-bottom-color: #ebeef5;
- }
-
- .content {
- padding: 12px 15px;
- font-size: 15px;
- color: gray;
- line-height: 22px;
- }
-
- }
-
- .new_record_form {
-
- /*/ / padding: 10 px, 25 px;*/
-
- .textarea_panel {
- margin-top: 10px;
- }
-
- }
- </style>
- <style>
- .el-table td,
- .el-table th.is-leaf,
- .el-table--border,
- .el-table--group {
- border-color: #d0d3da;
- }
- .el-table--border::after,
- .el-table--group::after,
- .el-table::before {
- background-color: #d0d3da;
- }
- .el-select-dropdown {
- max-width: 1000px !important;
- }
- </style>
|