12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185 |
- <template>
- <div class="main-contain">
- <div class="position">
- <bread-crumb :crumbs="crumbs"></bread-crumb>
- <div>
- <el-button
- size="small"
- icon="el-icon-printer"
- :disabled="selecting_schs.length == 0"
- @click="signPrintAction"
- type="primary"
- style="margin-right:10"
- >标签打印
- </el-button>
- <el-button
- size="small"
- icon="el-icon-printer"
- :disabled="selecting_schs.length == 0"
- @click="batchPrintAction"
- type="primary"
- >医嘱打印
- </el-button>
- </div>
- </div>
- <div class="app-container">
- <div class="filter-container">
- <div style="display: flex;">
- <div style="flex: 1;">
- <el-autocomplete
- class="checkSearch"
- popper-class="my-autocomplete"
- v-model.trim="listQuery.keyword"
- :fetch-suggestions="querySearchAsync"
- :trigger-on-focus="false"
- placeholder="患者姓名"
- @select="handleSelect"
- >
- <i class="el-icon-search el-input__icon" slot="suffix"></i>
- <template slot-scope="{ item }">
- <div class="name">{{ item.name }}</div>
- </template>
- </el-autocomplete>
- <el-button type="primary" @click="toSeach">搜索</el-button>
-
- <el-input style="width:200px" placeholder="请输入药品名称" v-model="keyword"></el-input>
- <el-button type="primary" @click="toSeachOne">搜索</el-button>
- </div>
- <div style="flex: 1;text-align: right;">
- <el-button type="primary" size="small" @click="toStatic" v-if="org_id!=9671 && org_id!=10340">药品统计</el-button>
-
- <el-button type="primary" size="small" @click="toStaticOne" v-if="org_id == 9671 || org_id==10340">药品统计</el-button>
- <el-button type="primary" size="small" @click="toStaticThree">药品月统计</el-button>
-
- <el-button type="primary" size="small" @click="toStaticTwo">耗材统计</el-button>
-
- <el-button type="primary" size="small" @click="toStaticFour">耗材月统计</el-button>
- </div>
- </div>
-
- </div>
- <!-- <div class="filter-container">
- <el-input style="width:200px" placeholder="请输入药品名称" v-model="keyword"></el-input>
- <el-button type="primary" @click="toSeachOne">搜索</el-button>
- </div> -->
- <div class="cell clearfix">
- <label class="title">
- <span class="name">日期查询:</span>
- </label>
- <el-date-picker
- v-model="time"
- prefix-icon="el-icon-date"
- @change="changeTime"
- :editable="false"
- style="width: 180px;margin-right: 10px;"
- type="date"
- placeholder="选择日期时间"
- align="right"
- format="yyyy-MM-dd"
- value-format="timestamp"
- ></el-date-picker>
-
- <label class="title">
- <span class="name">排序:</span>
- </label>
- <el-select v-model="sort" placeholder="请选择" @change="selectSortType">
- <el-option
- v-for="item in options"
- :key="item.name"
- :label="item.name"
- :value="item.id"
- >
- </el-option>
- </el-select>
- </div>
-
- <!-- <div class="cell clearfix">
- <label class="title">
- <span class="name">排序:</span>
- </label>
- <el-select v-model="sort" placeholder="请选择" @change="selectSortType">
- <el-option
- v-for="item in options"
- :key="item.name"
- :label="item.name"
- :value="item.id"
- >
- </el-option>
- </el-select>
- </div> -->
-
-
- <div class="cell clearfix">
- <label class="title"> <span class="name">排班班次</span> : </label>
- <div class="time">
- <ul class>
- <li
- :class="item.value == schedulType ? 'active' : ''"
- @click="selectSchedulType(item.value)"
- v-for="item in schedulArr"
- :key="item.value"
- >
- {{ item.label }}
- </li>
- </ul>
- </div>
- </div>
- <div class="cell clearfix">
- <label class="title"><span class="name">收费状态</span> : </label>
- <div class="time">
- <ul class>
- <li
- :class="item.id == costType ? 'active' : ''"
- @click="selectCostType(item.id)"
- v-for="item in costArr"
- :key="item.id"
- >
- {{ item.name }}
- </li>
- </ul>
- </div>
- </div>
-
- <div class="cell clearfix">
- <label class="title"><span class="name">分区</span> : </label>
- <div class="time">
- <ul class>
- <li
- :class="item.id == partitionType ? 'active' : ''"
- @click="selectPartitionType(item.id)"
- v-for="item in partitionArr"
- :key="item.id"
- >
- {{ item.name }}
- </li>
- </ul>
- </div>
- </div>
-
- <div class="cell clearfix">
- <label class="title"> <span class="name">给药途径</span> : </label>
- <div class="time">
- <ul class>
- <li
- :class="item.id == delivery_way ? 'active' : ''"
- @click="selectDeliveryWay(item.id)"
- v-for="item in deliveryWay"
- :key="item.id"
- >
- {{ item.name }}
- </li>
- </ul>
- </div>
- </div>
-
- <div class="cell clearfix">
- <label class="title"> <span class="name">执行频率 : </span></label>
- <div class="time">
- <ul class>
- <li
- :class="item.id == execution_frequency ? 'active' : ''"
- @click="selectFrequencyWay(item.id)"
- v-for="item in excutList"
- :key="item.id"
- >
- {{ item.name }}
- </li>
- </ul>
- </div>
- </div>
-
- <div class="cell clearfix">
- <label class="title"> <span class="name">执行状态</span> : </label>
- <div class="time">
- <ul class>
- <li
- :class="item.id == excution_way ? 'active' : ''"
- @click="selectExcutionWay(item.id)"
- v-for="item in executionList"
- :key="item.id"
- >
- {{ item.name }}
- </li>
- </ul>
- </div>
- </div>
- <!-- <div style="margin-top: 10px;margin-left:600px;margin-bottom:10px">
- <el-button type="primary" size="small" @click="toExcution">执行医嘱</el-button>
- <el-button type="primary" size="small" @click="toCheck">医嘱核对</el-button>
- <el-button type="primary" size="small" @click="toSettle">收费</el-button>
- </div> -->
-
- <!-- <div style="margin-top: 10px;margin-bottom:10px">
- <el-button type="primary" size="small" @click="toStatic" v-if="org_id!=9671 && org_id!=10340">药品统计</el-button>
-
- <el-button type="primary" size="small" @click="toStaticOne" v-if="org_id == 9671 || org_id==10340">药品统计</el-button>
-
-
- <el-button type="primary" size="small" @click="toStaticThree">药品月统计</el-button>
-
- <el-button type="primary" size="small" @click="toStaticTwo">耗材统计</el-button>
-
- <el-button type="primary" size="small" @click="toStaticFour">耗材月统计</el-button>
-
-
- </div> -->
-
-
- <el-table :data="scheduleMap" border :row-style="{ color: '#303133' }" :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}"
- @selection-change="handleSelectionChange"
- :span-method="objectSpanMethod"
- :cell-class-name="adviceNameShow"
- :modal-append-to-body="false"
- highlight-current-row
- @current-change="handleCurrentChangeList"
- v-show="show"
- @row-click="handleRowClick">
- <el-table-column type="selection" width="55" align="center"></el-table-column>
- <el-table-column prop="date" label="姓名" align="center" min-width="26px">
- <template slot-scope="scope">
- <span>{{ scope.row.name }}</span>
- <br>
- ({{ scope.row.parent_id == 0 ? scope.row.dialysis_no : ""}})
- <br>
- <span v-if="scope.row.mode_id == 1">(HD)</span>
- <span v-if="scope.row.mode_id == 2">(HDF)</span>
- <span v-if="scope.row.mode_id == 3">(HD+HP)</span>
- <span v-if="scope.row.mode_id == 4">(HP)</span>
- <span v-if="scope.row.mode_id == 5">(HF)</span>
- <span v-if="scope.row.mode_id == 6">(SCUF)</span>
- <span v-if="scope.row.mode_id == 7">(IUF)</span>
- <span v-if="scope.row.mode_id == 8">(HFHD)</span>
- <span v-if="scope.row.mode_id == 9">(HFHD+HP)</span>
- <span v-if="scope.row.mode_id == 10">(PHF)</span>
- <span v-if="scope.row.mode_id == 11">(HFR)</span>
- <span v-if="scope.row.mode_id == 12">(HDF+HP)</span>
- <span v-if="scope.row.mode_id == 13">(CRRT)</span>
- <span v-if="scope.row.mode_id == 14">(腹水回输)</span>
- <span v-if="scope.row.mode_id == 24">I-HDF</span>
- </br>
-
- <span v-if="scope.row.anticoagulant == 1" style="color:red">无肝素</span>
- </template>
- </el-table-column>
- <el-table-column label="分区床位" width="100">
- <template slot-scope="scope" >
- {{scope.row.zone_name}}/{{scope.row.number}}
- </template>
- </el-table-column>
- <el-table-column prop="date" label="透析器" align="center" min-width="26px">
- <template slot-scope="scope">
- <span>{{ scope.row.dialyzer_perfusion_apparatus }}</span>
- <span v-if="scope.row.dialysis_dialyszers!=''">{{scope.row.dialysis_dialyszers}}</span>
- <span v-if="scope.row.dialysis_irrigation!=''">{{scope.row.dialysis_irrigation}}</span>
- </template>
- </el-table-column>
-
- <el-table-column prop="start_time" label="开始时间" align="center" min-width="35px">
- <template slot-scope="scope">
- <span>
- {{scope.row.start_time | parseTime('{m}-{d} {h}:{i}')}}
- </span>
- </template>
- </el-table-column>
- <el-table-column prop="advice_name" min-width="50px" label="医嘱内容" align="center">
- <template slot-scope="scope">
- <el-dropdown trigger="click" v-if="scope.row.parent_id == 0">
- <span class="el-dropdown-link" v-if="scope.row.parent_id == 0">
- {{ getAdviceContent(scope.row, 1)}}
- </span>
- </el-dropdown>
-
- <el-dropdown trigger="click" v-if="scope.row.parent_id > 0">
- <span class="el-dropdown-link">
-  {{ getAdviceContent(scope.row, 2)}}
- </span>
- </el-dropdown>
- </template>
- </el-table-column>
- <el-table-column prop="start_time" min-width="30px" label="执行时间" align="center" sortable>
- <template slot-scope="scope">
- <span v-if="scope.row.execution_time != 0">
- {{scope.row.execution_time | parseTime('{m}-{d} {h}:{i}')}}
- </span>
- <span v-else></span>
- </template>
- </el-table-column>
- <el-table-column prop="execution_staff" align="center" min-width="30px" label="执行护士">
- <template slot-scope="scope">
- <span v-if="scope.row.parent_id == 0">
- {{getXuserName(scope.row.execution_staff)}}
- </span>
- <span v-else>{{getXuserName(scope.row.execution_staff)}}</span>
- </template>
- </el-table-column>
- <el-table-column prop="checker" align="center" min-width="30px" label="校对护士">
- <template slot-scope="scope">
- <span v-if="scope.row.parent_id == 0">
- {{getXuserName(scope.row.checker)}}
- </span>
- <span v-else>{{getXuserName(scope.row.checker)}}</span>
- </template>
- </el-table-column>
- <el-table-column prop="check_time" align="center" label="校对时间" min-width="30px" sortable>
- <template slot-scope="scope">
- <span v-if="scope.row.check_time != 0 && org_id!=10460">
- {{scope.row.check_time | parseTime('{m}-{d} {h}:{i}')}}
- </span>
- <span v-else>
-
- </span>
-
- </template>
- </el-table-column>
- <el-table-column prop="date" label="开嘱医生" align="center" min-width="26px">
- <template slot-scope="scope">
- <span>{{ getXuserName(scope.row.advice_doctor) }}</span>
- </template>
- </el-table-column>
- <el-table-column prop="created_time" align="center" min-width="30px" label="校对时间" sortable>
- <template slot-scope="scope">
- <span v-if="scope.row.created_time != 0 && org_id!=10460">
- {{scope.row.created_time | parseTime('{m}-{d} {h}:{i}')}}
- </span>
- <span v-else></span>
- </template>
- </el-table-column>
- <el-table-column prop="created_time" align="center" min-width="30px" label="收费状态" sortable>
- <template slot-scope="scope">
- <span v-if="scope.row.is_settle == 1">
- 已收费
- </span>
- <span v-if="scope.row.is_settle == 2 || scope.row.is_settle == 0">
- 未收费
- </span>
- <span v-else></span>
- </template>
- </el-table-column>
- </el-table>
-
-
- <el-table :data="scheduleMap" border :row-style="{ color: '#303133' }" :header-cell-style="{backgroundColor: 'rgb(245, 247, 250)',color: '#606266'}"
- @selection-change="handleSelectionChangeOne"
- @current-change="handleCurrentChangeList"
- :span-method="objectSpanMethod"
- :cell-class-name="adviceNameShow"
- highlight-current-row
- :modal-append-to-body="false"
- v-show="showOne">
- <el-table-column type="selection" width="50" align="center"></el-table-column>
- <el-table-column prop="date" label="姓名" align="center" min-width="26px">
- <template slot-scope="scope">
- <span>{{ scope.row.name }}</span>
- <br>
- ({{ scope.row.parent_id == 0 ? scope.row.dialysis_no : ""}})
- <br>
- <span v-if="scope.row.mode_id == 1">(HD)</span>
- <span v-if="scope.row.mode_id == 2">(HDF)</span>
- <span v-if="scope.row.mode_id == 3">(HD+HP)</span>
- <span v-if="scope.row.mode_id == 4">(HP)</span>
- <span v-if="scope.row.mode_id == 5">(HF)</span>
- <span v-if="scope.row.mode_id == 6">(SCUF)</span>
- <span v-if="scope.row.mode_id == 7">(IUF)</span>
- <span v-if="scope.row.mode_id == 8">(HFHD)</span>
- <span v-if="scope.row.mode_id == 9">(HFHD+HP)</span>
- <span v-if="scope.row.mode_id == 10">(PHF)</span>
- <span v-if="scope.row.mode_id == 11">(HFR)</span>
- <span v-if="scope.row.mode_id == 12">(HDF+HP)</span>
- <span v-if="scope.row.mode_id == 13">(CRRT)</span>
- <span v-if="scope.row.mode_id == 14">(腹水回输)</span>
- <span v-if="scope.row.mode_id == 24">I-HDF</span>
- </template>
- </el-table-column>
- <el-table-column prop="date" label="透析器" align="center" min-width="26px">
- <template slot-scope="scope">
- <span>
- {{ scope.row.dialyzer_perfusion_apparatus }}
- <span v-if="scope.row.dialysis_dialyszers!=''">{{scope.row.dialysis_dialyszers}}</span>
- <span v-if="scope.row.dialysis_irrigation!=''">{{scope.row.dialysis_irrigation}}</span>
- </span>
- </template>
- </el-table-column>
- <el-table-column prop="start_time" label="开始时间" align="center" min-width="35px">
- <template slot-scope="scope">
- <span>
- {{scope.row.start_time | parseTime('{m}-{d} {h}:{i}')}}
- </span>
- </template>
- </el-table-column>
- <el-table-column prop="advice_name" min-width="50px" label="医嘱内容" align="center">
- <template slot-scope="scope">
- <el-dropdown trigger="click" v-if="scope.row.parent_id == 0">
- <span class="el-dropdown-link" v-if="scope.row.parent_id == 0">
- {{ getAdviceContent(scope.row, 1)}}
- </span>
- </el-dropdown>
-
- <el-dropdown trigger="click" v-if="scope.row.parent_id > 0">
- <span class="el-dropdown-link">
-  {{ getAdviceContent(scope.row, 2)}}
- </span>
- </el-dropdown>
- </template>
- </el-table-column>
- <el-table-column prop="start_time" align="center" min-width="30px" label="执行时间" sortable>
- <template slot-scope="scope">
- <span v-if="scope.row.execution_time != 0">
- {{scope.row.start_time | parseTime('{m}-{d} {h}:{i}')}}
- </span>
- <span v-else></span>
- </template>
- </el-table-column>
- <el-table-column prop="execution_staff" align="center" min-width="30px" label="执行护士">
- <template slot-scope="scope">
- <span v-if="scope.row.parent_id == 0">
- {{getXuserName(scope.row.execution_staff)}}
- </span>
- <span v-else></span>
- </template>
- </el-table-column>
- <el-table-column prop="checker" align="center" min-width="30px" label="校对护士">
- <template slot-scope="scope">
- <span v-if="scope.row.parent_id == 0">
- {{getXuserName(scope.row.checker)}}
- </span>
- <span v-else></span>
- </template>
- </el-table-column>
- <el-table-column prop="check_time" align="center" min-width="30px" label="校对时间" sortable>
- <template slot-scope="scope">
- <span v-if="scope.row.check_time != 0">
- {{scope.row.check_time | parseTime('{m}-{d} {h}:{i}')}}
- </span>
- <span v-else></span>
- </template>
- </el-table-column>
- <el-table-column prop="date" label="开嘱医生" align="center" min-width="26px">
- <template slot-scope="scope">
- <span>{{ getXuserName(scope.row.advice_doctor) }}</span>
- </template>
- </el-table-column>
- <el-table-column prop="created_time" align="center" min-width="30px" label="校对时间" sortable>
- <template slot-scope="scope">
- <span v-if="scope.row.created_time != 0">
- {{scope.row.created_time | parseTime('{m}-{d} {h}:{i}')}}
- </span>
- <span v-else></span>
- </template>
- </el-table-column>
-
- <el-table-column prop="created_time" align="center" min-width="30px" label="收费状态" sortable>
- <template slot-scope="scope">
- <span v-if="scope.row.is_settle == 1">
- 已收费
- </span>
- <span v-if="scope.row.is_settle == 2 || scope.row.is_settle == 0">
- 未收费
- </span>
- <span v-else></span>
- </template>
- </el-table-column>
- </el-table>
-
- <el-dialog
- title="选择执行时间"
- :visible.sync="execTimeDialogVisible"
- width="400px"
- :modal-append-to-body="false"
- >
- <el-date-picker
- v-model="execTime"
- format="yyyy-MM-dd HH:mm:00"
- value-format="yyyy-MM-dd HH:mm:00"
- type="datetime"
- placeholder="选择执行时间"
- style="width:100%"
- ></el-date-picker>
- <span slot="footer" class="dialog-footer">
- <el-button @click="execTimeDialogVisible = false">取 消</el-button>
- <el-button type="primary" @click="excutionDoctorAdvice" :loading="exceLoading">保 存</el-button>
- </span>
- </el-dialog>
-
-
- <el-dialog
- title="选择执行时间"
- :visible.sync="execTimeDialogVisibleOne"
- width="400px"
- :modal-append-to-body="false"
- >
- <el-date-picker
- v-model="execTime"
- format="yyyy-MM-dd HH:mm:00"
- value-format="yyyy-MM-dd HH:mm:00"
- type="datetime"
- placeholder="选择执行时间"
- style="width:100%"
- ></el-date-picker>
- <span slot="footer" class="dialog-footer">
- <el-button @click="execTimeDialogVisibleOne = false">取 消</el-button>
- <el-button type="primary" @click="excutionDoctorAdviceOne" :loading="exceLoading">保 存</el-button>
- </span>
- </el-dialog>
-
-
- <el-dialog
- title="药品统计表"
- :visible.sync="startdialogVisible"
- width="60%">
- <span>
- <div class="cell clearfix" style="margin-bottom:10px">
- <label class="title"> <span class="name">排班班次</span> : </label>
- <el-select v-model="schedule_type" placeholder="请选择" @change="changeScheduleType" >
- <el-option
- v-for="item in schedulArr"
- :key="item.value"
- :label="item.label"
- :value="item.value">
- </el-option>
- </el-select>
- <label class="title"> <span class="name">病区选择</span> : </label>
- <el-select v-model="partion_type" placeholder="请选择" @change="changePartionType" multiple >
- <el-option
- v-for="item in partitionArr"
- :key="item.id"
- :label="item.name"
- :value="item.id">
- </el-option>
- </el-select>
- <el-button size="small" icon="el-icon-printer" @click="toPrintOne" type="primary">打印</el-button>
- <el-button size="small" @click="toExportListOne" type="primary">导出</el-button>
- </div>
-
- <el-table
- :data="tableList"
- border
- :row-style="{ color: '#303133' }"
- :header-cell-style="{
- backgroundColor: 'rgb(245, 247, 250)',
- color: '#606266'
- }"
- >
- <el-table-column align="center" label="序号">
- <template slot-scope="scope">
- {{scope.$index+1}}
- </template>
- </el-table-column>
- <el-table-column align="center" label="药品名称">
- <template slot-scope="scope">
- {{scope.row.advice_name}}
- </template>
- </el-table-column>
- <el-table-column align="center" label="规格">
- <template slot-scope="scope">
- {{scope.row.specification_name}}
- </template>
- </el-table-column>
-
- <el-table-column align="center" label="数量">
- <template slot-scope="scope">
- <span v-if="config.is_open!=1">{{getCount(scope.row.child)}}</span>
- <span v-if="config.is_open ==1">{{getHisCount(scope.row.child,scope.row.max_unit,scope.row.min_unit,scope.row.min_number)}}</span>
- </template>
- </el-table-column>
-
- <el-table-column align="center" label="厂家">
- <template slot-scope="scope">
- {{scope.row.manufacturer_name}}
- </template>
- </el-table-column>
-
-
- </el-table>
- </span>
- <span slot="footer" class="dialog-footer">
- <el-button @click="startdialogVisible = false">取 消</el-button>
- <el-button type="primary" @click="startdialogVisible = false">确 定</el-button>
- </span>
- </el-dialog>
-
-
- <!-- 长沙南雅 -->
- <el-dialog
- title="药品统计表"
- :visible.sync="startdialogVisibleOne"
- width="70%">
- <span>
- <div class="cell clearfix" style="margin-bottom:10px">
- <label class="title"> <span class="name">排班班次</span> : </label>
- <el-select v-model="schedule_type" placeholder="请选择" @change="changeScheduleTypeOne" >
- <el-option
- v-for="item in schedulArr"
- :key="item.value"
- :label="item.label"
- :value="item.value">
- </el-option>
- </el-select>
- <label class="title"> <span class="name">病区选择</span> : </label>
- <el-select v-model="partion_type" placeholder="请选择" @change="changePartionTypeOne" multiple>
- <el-option
- v-for="item in partitionArr"
- :key="item.id"
- :label="item.name"
- :value="item.id">
- </el-option>
- </el-select>
- <el-button size="small" icon="el-icon-printer" @click="toPrintTwo" type="primary">打印</el-button>
- <!-- <el-button size="small" @click="toExportListOne" type="primary">导出</el-button> -->
-
- <!-- <el-button @click="toJiao()">脚本</el-button> -->
- </div>
-
- <el-table
- :data="tableDataList"
-
- border
- :row-style="{ color: '#303133' }"
- :header-cell-style="{
- backgroundColor: 'rgb(245, 247, 250)',
- color: '#606266'
- }"
- >
- <el-table-column
- align="center"
- prop="name"
- label="序号"
- width="100"
- >
- <template slot-scope="scope" >
- <span v-if="scope.row.is_total == 1">{{scope.$index+1}}</span>
- <span v-if="scope.row.is_total == 0">总计</span>
- </template>
-
- </el-table-column>
- <el-table-column
- align="center"
- prop="name"
- label="区域"
- width="100"
- >
- <template slot-scope="scope" >
- <span v-if="scope.row.is_total ==1">
- <!-- {{getZoneName(scope.row.child)}} -->
- {{scope.row.zone_name }}
- </span>
- </template>
-
- </el-table-column>
- <!-- <el-table-column
- align="center"
- prop="name"
- label="责护"
- width="100"
- >
- <template slot-scope="scope">
- <span v-if="scope.row.is_total ==1">
- {{getAdminUserName(scope.row.execution_staff)}}
- </span>
- </template>
-
- </el-table-column> -->
-
- <el-table-column
- align="center"
- prop="name"
- label="透析模式"
- width="150"
- >
- <template slot-scope="scope">
- <span v-if="scope.row.is_total == 1">
- {{getModeId(scope.row.child)}}
- </span>
- </template>
-
- </el-table-column>
-
- <el-table-column
- align="center"
- prop="name"
- v-for="(item,index) in tabHead"
- :key="index"
- :label="item.advice_name"
- >
- <template slot-scope="scope">
- <span v-if="scope.row.is_total ==1">
- <span v-if="scope.row.child[index]!=null">{{getDrugCount(scope.row.child,item.advice_name)}}</span>
- <span v-if="item&&item.advice_name == '肝素钠注射剂'">
- {{getDrugAdviceCount(item.advice_name,scope.row.zone_name)}}
- </span>
- <span v-if="scope.row.child[index]==null && getDrugCount(scope.row.child,item.advice_name)>0">
- {{getDrugCount(scope.row.child,item.advice_name)}}
- <span v-if="item&&item.advice_name == '肝素钠注射剂'">
- {{getDrugAdviceCount(item.advice_name,scope.row.zone_name)}}
- </span>
- </span>
- </span>
- <span v-if="scope.row.is_total == 0">
- {{getAllSumCount(item.advice_name)}}
- </span>
- </template>
-
- </el-table-column>
-
-
-
- </el-table>
- </span>
- <span slot="footer" class="dialog-footer">
- <el-button @click="startdialogVisibleOne = false">取 消</el-button>
- <el-button type="primary" @click="startdialogVisibleOne = false">确 定</el-button>
- </span>
- </el-dialog>
-
-
- <el-dialog
- title="耗材统计表"
- :visible.sync="startdialogVisibleTwo"
- width="60%">
- <span>
- <div class="cell clearfix" style="margin-bottom:10px">
- <label class="title"> <span class="name">排班班次</span> : </label>
- <el-select v-model="schedule_type" placeholder="请选择" @change="changeScheduleTypeTwo" >
- <el-option
- v-for="item in schedulArr"
- :key="item.value"
- :label="item.label"
- :value="item.value">
- </el-option>
- </el-select>
- <label class="title"> <span class="name">病区选择</span> : </label>
- <el-select v-model="partion_type" placeholder="请选择" @change="changePartionTypeTwo" multiple >
- <el-option
- v-for="item in partitionArr"
- :key="item.id"
- :label="item.name"
- :value="item.id">
- </el-option>
- </el-select>
- <el-button size="small" icon="el-icon-printer" @click="toPrintThree" type="primary">打印</el-button>
- <el-button size="small" @click="toExportListTwo" type="primary">导出</el-button>
- </div>
-
- <el-table
- :data="tableProjectList"
- border
- :row-style="{ color: '#303133' }"
- :header-cell-style="{
- backgroundColor: 'rgb(245, 247, 250)',
- color: '#606266'
- }"
- >
- <el-table-column align="center" label="序号">
- <template slot-scope="scope">
- {{scope.$index+1}}
- </template>
- </el-table-column>
- <el-table-column align="center" label="耗材名称">
- <template slot-scope="scope">
- {{scope.row.good_name}}
- </template>
- </el-table-column>
- <el-table-column align="center" label="规格">
- <template slot-scope="scope">
- {{scope.row.specification_name}}
- </template>
- </el-table-column>
-
- <el-table-column align="center" label="数量">
- <template slot-scope="scope">
- {{scope.row.count}}
- </template>
- </el-table-column>
-
-
-
- </el-table>
- </span>
- <span slot="footer" class="dialog-footer">
- <el-button @click="startdialogVisibleTwo = false">取 消</el-button>
- <el-button type="primary" @click="startdialogVisibleTwo = false">确 定</el-button>
- </span>
- </el-dialog>
-
- <el-dialog
- title="药品月统计表"
- :visible.sync="startMothdialogVisible"
- width="60%">
- <span>
- <div class="cell clearfix" style="margin-bottom:10px">
- <label class="title"> <span class="name">日期查询</span> : </label>
- 开始:
- <el-date-picker
- v-model="start_time"
- prefix-icon="el-icon-date"
- :editable="false"
- style="width: 250px;"
- type="date"
- placeholder="选择日期时间"
- align="right"
- format="yyyy-MM-dd"
- value-format="yyyy-MM-dd"
-
- ></el-date-picker>
- 结束:
- <el-date-picker
- v-model="end_time"
- prefix-icon="el-icon-date"
- :editable="false"
- style="width: 250px;"
- type="date"
- placeholder="选择日期时间"
- align="right"
- format="yyyy-MM-dd"
- value-format="yyyy-MM-dd"
-
- ></el-date-picker>
- <el-button size="small" @click="getAllQuery" type="primary">查询</el-button>
- <el-button size="small" icon="el-icon-printer" @click="toPrintTen" type="primary">打印</el-button>
- <el-button size="small" @click="toExportListThree" type="primary">导出</el-button>
- </div>
-
- <el-table
- :data="tableMonthList"
- border
- :row-style="{ color: '#303133' }"
- :header-cell-style="{
- backgroundColor: 'rgb(245, 247, 250)',
- color: '#606266'
- }"
- >
- <el-table-column align="center" label="序号">
- <template slot-scope="scope">
- {{scope.$index+1}}
- </template>
- </el-table-column>
- <el-table-column align="center" label="药品名称">
- <template slot-scope="scope">
- {{scope.row.advice_name}}
- </template>
- </el-table-column>
- <el-table-column align="center" label="规格">
- <template slot-scope="scope">
- {{scope.row.specification_name}}
- </template>
- </el-table-column>
-
- <el-table-column align="center" label="数量">
- <template slot-scope="scope">
- <span v-if="config.is_open!=1">{{getCount(scope.row.child)}}</span>
- <span v-if="config.is_open ==1">{{getHisCount(scope.row.child,scope.row.max_unit,scope.row.min_unit,scope.row.min_number)}}</span>
- </template>
- </el-table-column>
-
- <el-table-column align="center" label="厂家">
- <template slot-scope="scope">
- {{scope.row.manufacturer_name}}
- </template>
- </el-table-column>
-
-
- </el-table>
- </span>
- <span slot="footer" class="dialog-footer">
- <el-button @click="startMothdialogVisible = false">取 消</el-button>
- <el-button type="primary" @click="startMothdialogVisible = false">确 定</el-button>
- </span>
- </el-dialog>
-
-
- <el-dialog
- title="耗材统计表"
- :visible.sync="startMonthdialogVisible"
- width="60%">
- <span>
- <div class="cell clearfix" style="margin-bottom:10px">
- <label class="title"> <span class="name">日期查询</span> : </label>
- 开始:
- <el-date-picker
- v-model="start_time"
- prefix-icon="el-icon-date"
- :editable="false"
- style="width: 250px;"
- type="date"
- placeholder="选择日期时间"
- align="right"
- format="yyyy-MM-dd"
- value-format="yyyy-MM-dd"
-
- ></el-date-picker>
- 结束:
- <el-date-picker
- v-model="end_time"
- prefix-icon="el-icon-date"
- :editable="false"
- style="width: 250px;"
- type="date"
- placeholder="选择日期时间"
- align="right"
- format="yyyy-MM-dd"
- value-format="yyyy-MM-dd"
-
- ></el-date-picker>
- <el-button size="small" @click="getGoodAllQuery" type="primary">查询</el-button>
- <el-button size="small" icon="el-icon-printer" @click="toExportListFour" type="primary">打印</el-button>
- <el-button size="small" @click="toExportListFour" type="primary">导出</el-button>
- </div>
- <el-table
- :data="tableProjectList"
- border
- :row-style="{ color: '#303133' }"
- :header-cell-style="{
- backgroundColor: 'rgb(245, 247, 250)',
- color: '#606266'
- }"
- >
- <el-table-column align="center" label="序号">
- <template slot-scope="scope">
- {{scope.$index+1}}
- </template>
- </el-table-column>
- <el-table-column align="center" label="耗材名称">
- <template slot-scope="scope">
- {{scope.row.good_name}}
- </template>
- </el-table-column>
- <el-table-column align="center" label="规格">
- <template slot-scope="scope">
- {{scope.row.specification_name}}
- </template>
- </el-table-column>
-
- <el-table-column align="center" label="数量">
- <template slot-scope="scope">
- {{scope.row.count}}
- </template>
- </el-table-column>
-
-
-
- </el-table>
- </span>
- <span slot="footer" class="dialog-footer">
- <el-button @click="startMonthdialogVisible = false">取 消</el-button>
- <el-button type="primary" @click="startMonthdialogVisible = false">确 定</el-button>
- </span>
- </el-dialog>
-
- </div>
-
-
- </div>
- </template>
-
- <script>
- const moment = require('moment')
- import { getSchedualPatient, GetAllZone,getDialysisAdviceToday,getDialysisProject } from "@/api/dialysis";
- import { parseTime } from "@/utils";
- import { uParseTime } from '@/utils/tools'
- import BreadCrumb from "@/xt_pages/components/bread-crumb";
- import { getPrintTemplate } from "@/api/data";
- import { getNewSchedualDoctors,excutionDoctorAdvice,checkNewDoctorAdvice,settleNewDoctorAdvice,excutionDoctorAdviceById,GetMobileScheduleList,getDoctorAdviceMonthList,getHisPrescrptionProjectMonthList } from '@/api/advice'
- import { PostSearch } from '@/api/patient'
- export default {
- name: "Patient",
- data() {
- return {
- crumbs: [
- { path: false, name: "透析管理" },
- { path: false, name: "透析监测" }
- ],
- loading: false,
- time: "",
-
- search_mode: 1, // 搜索模式 1.日期搜索 2.病人搜索
- patient_search_keyword: "",
-
- SchedualPatientsTableData: [],
- active: true,
- schedulType: 0,
- schedulArr: [
- { value: 0, label: "全部" },
- { value: 1, label: "上午" },
- { value: 2, label: "下午" },
- { value: 3, label: "晚上" }
- ],
- template_id: 0,
-
- partitionType: 0,
- costType:0,
- total: 0,
- listQuery: {
- page: 1,
- limit: 10,
- schedul_type: 0,
- partition_type: 0,
- schedul_time: "",
- keywords: "",
- },
- selecting_schs: [],
- partitionArr: [],
-
- scheduleMap:[],
- show:true,
- showOne:false,
- deliveryWay:[],
- executionList:[
- {id:0,name:"全部"},
- {id:1,name:"已执行"},
- {id:2,name:"未执行"},
- ],
- delivery_way:0,
- patient_id:0,
- org_id:0,
- excution_way:0,
- options:[
- {id:0,name:"请选择"},
- {id:1,name:"按床位排序"},
- {id:2,name:"按签到时间排序"},
- ],
- costArr:[
- {id:0,name:"全部"},
- {id:1,name:"已收费"},
- {id:2,name:"未收费"}
- ],
- sort:0,
- config:{},
- execTime: '',
- execTimeDialogVisible:false,
- exceLoading:false,
- is_sort:0,
- hoverOrderArr:[],
- is_status:0,
- execTimeDialogVisibleOne:false,
- current_row:{},
- tableList:[],
- startdialogVisible:false,
- startdialogVisibleOne:false,
- startdialogVisibleTwo:false,
- startMonthdialogVisible:false,
- schedule_type:0,
- partion_type:0,
- druglist:[],
- config:{},
- tabHead:[],
- tableDataList:[],
- adminUserList:[],
- doctorMap:[],
- excutList:[],
- execution_frequency:"",
- zoneIdList:[],
- partion_str:"",
- keyword:"",
- tableProjectList:[],
- manufacturerList:[],
- start_time: moment().startOf('month').format('YYYY-MM-DD'),
- end_time: moment().endOf('month').format('YYYY-MM-DD'),
- startMothdialogVisible:false,
- adviceMonthList:[],
- hisAdviceMonthList:[],
- tableMonthList:[]
- };
- },
- created() {
- var date = new Date();
- this.time = date;
- var year = date.getFullYear();
- var month = date.getMonth() + 1;
- var day = date.getDate();
- if (month < 10) {
- month = "0" + month;
- }
- if (day < 10) {
- day = "0" + day;
- }
- var nowDate = year + "-" + month + "-" + day;
- var date = new Date(nowDate + " 00:00:00");
- this.listQuery.schedul_time = date.getTime();
- this.getAllZone();
- this.getTemplateInfo();
- this.requestSchedualDoctors(this.time)
- this.org_id = this.$store.getters.xt_user.template_info.org_id;
- },
- methods: {
- getTemplateInfo() {
- getPrintTemplate().then(response => {
- if (response.data.state == 0) {
- this.$message.error(response.data.msg);
- return false;
- } else {
- var template = response.data.data.template;
- this.template_id = template.template_id;
- }
- });
- },
- clickCurrent(val) {
- //console.log(val);
- this.$router.push({
- path: "/dialysis/details",
- query: { patient_id: val.patient_id, date: val.sch_time_int,mode_id:val.mode_id }
- });
- },
-
- selectSchedulType(scheduleType) {
-
- this.schedulType = scheduleType;
- this.listQuery.schedul_type = scheduleType;
- this.requestSchedualDoctors(this.time);
- },
- selectPartitionType(partitionType) {
- this.partitionType = partitionType;
- this.listQuery.partition_type = partitionType;
- this.requestSchedualDoctors(this.time);
- },
- selectCostType(costType){
- this.costType = costType
- this.requestSchedualDoctors(this.time);
- },
-
- selectDeliveryWay(val){
- this.delivery_way = val
- this.requestSchedualDoctors(this.time)
- },
- selectFrequencyWay(val){
- this.execution_frequency = val
- this.requestSchedualDoctors(this.time)
- },
-
- selectExcutionWay(val){
- this.excution_way = val
- this.requestSchedualDoctors(this.time)
- },
-
-
- changeTime() {
- this.listQuery.schedul_time = this.time;
- this.requestSchedualDoctors(this.time)
- },
- getAllZone: function() {
- GetAllZone().then(response => {
- if (response.data.state == 0) {
- this.$message.error(response.data.msg);
- return false;
- } else {
- this.partitionArr = response.data.data.zone;
- for(let i=0;i<this.partitionArr.length;i++){
- this.zoneIdList.push(this.partitionArr[i].id)
- }
-
- // this.partitionArr.unshift({ id: 0, name: "全部" });
- var dics = response.data.data.dics
- var obj = {id:0,name:"全部"}
- this.deliveryWay.push(obj)
- this.deliveryWay.push(...dics)
- var objOne = {id:0,name:"全部"}
- this.excutList.push(objOne)
- var efs = response.data.data.efs
- this.excutList.push(...efs)
- console.log("执行瓶绿",this.excutList)
- }
- });
- },
- requestSchedualDoctors (time) {
-
- var name = ""
- for(let i=0;i<this.deliveryWay.length;i++){
- if(this.delivery_way == this.deliveryWay[i].id){
- name = this.deliveryWay[i].name
- }
- }
- if(name == '全部'){
- name = ""
- }
-
- var nameOne = ""
- for(let i=0;i<this.excutList.length;i++){
- if(this.execution_frequency == this.excutList[i].id){
- nameOne = this.excutList[i].name
- }
- }
-
- if(nameOne == '全部'){
- nameOne = ""
- }
-
- let newTime = moment(time).format('YYYY-MM-DD')
-
- var schedule_type = this.listQuery.schedul_type
- var partition_type = this.listQuery.partition_type
-
- getNewSchedualDoctors({date: newTime,patient_type: 0,advice_type: 2,delivery_way:name,schedule_type:schedule_type,partition_type:partition_type,patient_id:this.patient_id,excution_way:this.excution_way,cost_type:this.costType,execution_frequency:nameOne,keyword:this.keyword}).then(rs => {
- var resp = rs.data
- if (resp.state == 1) {
- this.admin_users = resp.data.adminUser
-
-
- var config = resp.data.config
- this.config = config
- let project_config = resp.data.project_config
-
- if(project_config.is_open == 1){
- this.project = resp.data.project
- console.log("wode 2o2o3o3o23o32o32o23o32o32o", this.project)
-
- let projectArr = []
- if(this.org_id!= 10318 && this.org_id!=10265){
- this.project.map(item => {
- resp.data.hisAdvices.map(it => {
- if(item.patient_id == it.patient_id){
- projectArr.push(item)
- }
- })
- })
- console.log("projectArr2332323232323232",projectArr)
- resp.data.hisAdvices.map((item,index) => {
- if(projectArr[index].project && projectArr[index].project.length > 0){
- projectArr[index].project.map(it => {
-
- let obj = {
- advice_doctor: it.doctor,
- start_time:it.start_time,
- advice_name:it.team_id > 0 && it.is_check_team == 1 ? it.team.project_team : it.type == 2 ? it.project.project_name+' '+it.count + it.project.unit : it.good_info.good_name +' '+it.count+ it.good_info.packing_unit,
- execution_time:it.execution_time,
- execution_state:it.execution_state,
- execution_staff:it.execution_staff,
- check_time:it.check_time,
- check_state:it.check_state,
- checker:it.checker,
- created_time:it.ctime,
- delivery_way:'',
- execution_frequency:'',
- remark:'',
- id:it.id,
- patient_id:it.patient_id,
- parent_id:0,
- groupno:0,
- sort:item.device_number.sort,
- assess_time:item.dialysisassesmentbefor&&item.dialysisassesmentbefor?item.dialysisassesmentbefor.created_time:"3753619200"
- }
- item.doctor_advice.push(obj)
- })
- }
- })
- console.log("中国人民名份反反复复方法 ",resp.data.hisAdvices)
- }
- }
-
-
-
-
- if(config.is_open == 0 || config.is_open == 2){
- var schedules = resp.data.scheduals
-
-
-
- var newList = []
- if(this.is_sort == 0){
- newList = schedules
- }
-
- if(this.is_sort == 0 || this.is_sort == 1){
- schedules.map(item => {
- item.is_sort = item.device_number.sort
- item.assess_time = item.dialysisassesmentbefor&&item.dialysisassesmentbefor?item.dialysisassesmentbefor.created_time:"3753619200"
- })
-
- newList = schedules.sort(this.compare('is_sort'))
-
-
-
- }
- if(this.is_sort == 2){
- schedules.map(item => {
- item.is_sort = item.device_number.sort
- item.assess_time = item.dialysisassesmentbefor?item.dialysisassesmentbefor.created_time:"3753619200"
- })
- newList = schedules.sort(this.compare('assess_time'))
- }
-
- this.show = true
- this.showOne = false
- let arr = []
- let newArr = []
- let newSchedules = []
-
- newList.map(item => {
- item.doctor_advice.map(it =>{
- it.name = item.patient.name
- if(item.prescription != null){
- it.dialyzer_perfusion_apparatus = item.prescription.dialyzer_perfusion_apparatus
- it.dialysis_dialyszers = item.prescription.dialysis_dialyszers
- it.dialysis_irrigation = item.prescription.dialysis_irrigation
- it.anticoagulant = item.prescription.anticoagulant
- }
- it.schedule_type = item.schedule_type
- it.zoneId = item.device_number.zone.id
- it.dialysis_no = item.patient.dialysis_no
- it.mode_id = item.mode_id
- it.number = item.device_number.number
- it.zone_name = item.device_number.zone.name
- it.sort = item.device_number.sort,
- arr.push(it)
- })
- item.is_sort = item.device_number.sort
- item.assess_time = item.dialysisassesmentbefor?item.dialysisassesmentbefor.created_time:"3753619200"
- })
-
- console.log("schedules9999999998888888888",schedules)
-
-
-
-
- if(this.schedulType == 0){
- newSchedules = arr
- }else{
- arr.map(item => {
- if (item.schedule_type == this.schedulType) {
- newSchedules.push(item)
- }
- })
- }
-
-
- if(this.partitionType == 0){
- this.scheduleMap = newSchedules
- }else {
- let a = []
- arr.map(item => {
- if(this.partitionType == item.zoneId){
- a.push(item)
- }
- })
- this.scheduleMap = a
- }
-
- this.scheduleMap.map(ele => {
- let firstIndex = this.scheduleMap.findIndex(item => {
- return item.patient_id === ele.patient_id // 当category相同的时候,返回第一个相同的Index 赋值给 firstIndex
- })
- if (this.scheduleMap.findIndex(item => { return item.patient_id === firstIndex}) === -1) {
- newArr.push({
- length: this.scheduleMap.filter(item => {
- return item.patient_id === ele.patient_id //利用数组的filter方法,过滤出相同category的数组的长度。数组长度-即为跨多少行
- }).length,
- firstIndex: firstIndex // firstIndex 返回的是第一个catergory就满足的第一个Index,即为rowIndex开始于第几行。
- })
- }
- })
- this.indexInfoList = newArr
- console.log("this.scheduleMap", this.scheduleMap)
-
-
- }
-
- if(config.is_open == 1){
- this.show = false
- this.showOne = true
- var schedules = resp.data.hisAdvices
-
- let arr = []
- let newArr = []
- let newSchedules = []
- var newList = []
- if(this.is_sort == 0){
- newList = schedules
- }
- if(this.is_sort == 1){
- schedules.map(item => {
- item.is_sort = item.device_number.sort
- item.assess_time = item.dialysisassesmentbefor&&item.dialysisassesmentbefor?item.dialysisassesmentbefor.created_time:"3753619200"
- })
-
- newList = schedules.sort(this.compare('is_sort'))
-
-
-
- }
- if(this.is_sort == 2){
- schedules.map(item => {
- item.is_sort = item.device_number.sort
- item.assess_time = item.dialysisassesmentbefor&&item.dialysisassesmentbefor?item.dialysisassesmentbefor.created_time:"3753619200"
- })
- newList = schedules.sort(this.compare('assess_time'))
- }
- newList.map(item => {
- item.doctor_advice.map(it =>{
- it.name = item.patient.name
- if(item.prescription != null){
- it.dialyzer_perfusion_apparatus = item.prescription.dialyzer_perfusion_apparatus
- it.dialysis_dialyszers = item.prescription.dialysis_dialyszers
- it.dialysis_irrigation = item.prescription.dialysis_irrigation
- it.anticoagulant = item.prescription.anticoagulant
- }
- it.schedule_type = item.schedule_type
- it.zoneId = item.device_number.zone.id
- it.dialysis_no = item.patient.dialysis_no
- it.mode_id = item.mode_id
- it.number = item.device_number.number
- it.zone_name = item.device_number.zone.name
- it.sort = item.device_number.sort,
- arr.push(it)
- })
- item.is_sort = item.device_number.sort
-
- item.assess_time = item.dialysisassesmentbefor&&item.dialysisassesmentbefor?item.dialysisassesmentbefor.created_time:"3753619200"
- })
- if(this.schedulType == 0){
- newSchedules = arr
- }else{
- arr.map(item => {
- if (item.schedule_type == this.schedulType) {
- newSchedules.push(item)
- }
- })
- }
-
-
- if(this.partitionType == 0){
- this.scheduleMap = newSchedules
- }else {
- let a = []
- arr.map(item => {
- if(this.partitionType == item.zoneId){
- a.push(item)
- }
- })
- this.scheduleMap = a
- }
-
- this.scheduleMap.map(ele => {
- let firstIndex = this.scheduleMap.findIndex(item => {
- return item.patient_id === ele.patient_id // 当category相同的时候,返回第一个相同的Index 赋值给 firstIndex
- })
- if (this.scheduleMap.findIndex(item => { return item.patient_id === firstIndex}) === -1) {
- newArr.push({
- length: this.scheduleMap.filter(item => {
- return item.patient_id === ele.patient_id //利用数组的filter方法,过滤出相同category的数组的长度。数组长度-即为跨多少行
- }).length,
- firstIndex: firstIndex // firstIndex 返回的是第一个catergory就满足的第一个Index,即为rowIndex开始于第几行。
- })
- }
- })
- this.indexInfoList = newArr
- }
- }
-
- })
-
- },
- compare:function (k) {
- return function (a, b) {
- var M = a[k];
- var N = b[k];
- return M - N; // 从低向高排
- // return N - M; // 从高向低排
- }
- },
- getValue: function(val) {
- if (val != undefined) {
- return val.value;
- } else {
- return "";
- }
- },
-
- handleCurrentChange(val) {
- this.listQuery.page = val;
- this.getSchedualPatientList();
- },
- changeSearchMode: function() {
- if (this.search_mode == 1) {
- this.search_mode = 2;
- } else {
- this.search_mode = 1;
- }
- },
- searchPatientAction: function() {
- this.listQuery.keywords = this.patient_search_keyword;
- console.log(this.patient_search_keyword);
- if (this.patient_search_keyword.length == 0) {
- return;
- }
- this.getSchedualPatientList();
- },
- handleSizeChange(val) {
- this.listQuery.limit = val;
- this.getSchedualPatientList();
- },
- batchPrintAction: function() {
- if (this.selecting_schs.length === 0) {
- this.$message.error("请至少选择一条需要打印的内容");
- return false;
- }
- // 模板ID为6
- var sch_ids = [];
-
- for (let index = 0; index < this.selecting_schs.length; index++) {
- sch_ids.push(this.selecting_schs[index].patient_id);
- }
-
- this.$store.dispatch("SetAdviceIDs", sch_ids);
- var name = ""
- for(let i=0;i<this.deliveryWay.length;i++){
- if(this.delivery_way == this.deliveryWay[i].id){
- name = this.deliveryWay[i].name
- }
- }
- if(name == '全部'){
- name = ""
- }
-
- if(this.org_id == 9671 || this.org_id == 10340 || this.org_id == 0){
- this.$router.push({ path: "/dialysis/doctorAdvicePrint/one",query:{time: new Date(this.time).getTime(),delivery_way:name,excution_way:this.excution_way} });
- }
-
- if(this.org_id != 9671 && this.org_id != 10340 && this.org_id!=0){
- this.$router.push({ path: "/dialysis/doctorAdvicePrint",query:{time: new Date(this.time).getTime(),delivery_way:name,excution_way:this.excution_way} });
- }
-
-
-
-
- },
- signPrintAction:function(){
- if (this.selecting_schs.length === 0) {
- this.$message.error("请至少选择一条需要打印的内容");
- return false;
- }
- // 模板ID为6
- var sch_ids = [];
-
- for (let index = 0; index < this.selecting_schs.length; index++) {
- sch_ids.push(this.selecting_schs[index].patient_id);
- }
-
- this.$store.dispatch("SetAdviceIDs", sch_ids);
- var name = ""
- for(let i=0;i<this.deliveryWay.length;i++){
- if(this.delivery_way == this.deliveryWay[i].id){
- name = this.deliveryWay[i].name
- }
- }
- if(name == '全部'){
- name = ""
- }
- var nameOne = ""
- for(let i=0;i<this.excutList.length;i++){
- if(this.execution_frequency == this.excutList[i].id){
- nameOne = this.excutList[i].name
- }
- }
-
- if(nameOne == '全部'){
- nameOne = ""
- }
- this.$router.push({ path: "/dialysis/signPrint",query:{time: new Date(this.time).getTime(),delivery_way:name,execution_frequency:nameOne,patient_id:this.patient_id,keyword:this.keyword,excution_way:this.excution_way} });
-
- },
- batchPrintActionOne: function() {
- if (this.selecting_schs.length === 0) {
- this.$message.error("请至少选择一条需要打印的内容");
- return false;
- }
- var sch_ids = [];
- for (let index = 0; index < this.selecting_schs.length; index++) {
- sch_ids.push(this.selecting_schs[index].sch_id);
- }
- this.$store.dispatch("SetBatchPrintDialysisRecordIDs", sch_ids);
- if (this.template_id == 2 || this.template_id == 0) {
- this.$router.push({ path: "/dialysis/print/batch/otherone" });
- } else if (this.template_id == 1) {
- this.$router.push({ path: "/dialysis/print/batch" });
- } else if (this.template_id == 5) {
- this.$router.push({ path: "/dialysis/print/batch/fiveone" });
- } else if (this.template_id == 22) {
- this.$router.push({ path: "/dialysis/print/batch/twentyTwo_one" });
- }
- },
- batchPrintActionTwo: function() {
- if (this.selecting_schs.length === 0) {
- this.$message.error("请至少选择一条需要打印的内容");
- return false;
- }
- var sch_ids = [];
- for (let index = 0; index < this.selecting_schs.length; index++) {
- sch_ids.push(this.selecting_schs[index].sch_id);
- }
- this.$store.dispatch("SetBatchPrintDialysisRecordIDs", sch_ids);
- if (this.template_id == 2 || this.template_id == 0) {
- this.$router.push({ path: "/dialysis/print/batch/othertwo" });
- } else if (this.template_id == 1) {
- this.$router.push({ path: "/dialysis/print/batch" });
- } else if (this.template_id == 5) {
- this.$router.push({ path: "/dialysis/print/batch/fivetwo" });
- } else if (this.template_id == 22) {
- this.$router.push({ path: "/dialysis/print/batch/twentyTwo_two" });
- }
- },
- compare (property) {
- return function (a, b) {
- var value1 = a[property]
- var value2 = b[property]
- return value1 - value2
- }
- },
- // tableRowClassName({ row, rowIndex }) {
- // if (row.stop_state == 1 || row.execution_state == 1) {
- // return 'stoped-row';
- // }
- // return 'success-rows'
- // row.index = rowIndex
- // const arr = this.hoverOrderArr
- // for (let i = 0; i < arr.length; i++) {
- // if (rowIndex == arr[i]) {
- // return 'success-row'
- // }
- // }
- // },
- objectSpanMethod({ row, column, rowIndex, columnIndex }) {
- if (columnIndex === 0) {
- let index = this.indexInfoList.findIndex(item => { //遍历数组
- return item.firstIndex === rowIndex
- })
- if (index > -1) {
- return {
- rowspan: this.indexInfoList[index].length,
- colspan: 1
- }
- } else {
- return {
- rowspan: 0,
- colspan: 0
- }
- }
- }
-
- if (columnIndex === 1) {
- let index = this.indexInfoList.findIndex(item => { //遍历数组
- return item.firstIndex === rowIndex
- })
- if (index > -1) {
- return {
- rowspan: this.indexInfoList[index].length,
- colspan: 1
- }
- } else {
- return {
- rowspan: 0,
- colspan: 0
- }
- }
- }
- if (columnIndex === 2) {
- let index = this.indexInfoList.findIndex(item => { //遍历数组
- return item.firstIndex === rowIndex
- })
- if (index > -1) {
- return {
- rowspan: this.indexInfoList[index].length,
- colspan: 1
- }
- } else {
- return {
- rowspan: 0,
- colspan: 0
- }
- }
- }
- },
- adviceNameShow({ row, column, rowIndex, columnIndex }) {
- if (columnIndex == 2) {
- return 'dialysisadvicenamedisplay'
- } else {
- return ''
- }
- },
- getXuserName(id) {
- if (id <= 0) {
- return ''
- }
- var name = ''
- if (
- this.admin_users == null ||
- typeof this.admin_users.length === 'undefined'
- ) {
- return name
- }
- var leng = this.admin_users.length
- if (leng == 0) {
- return name
- }
- for (let index = 0; index < leng; index++) {
- if (this.admin_users[index].id == id) {
- name = this.admin_users[index].name
- break
- }
- }
- return name
- },
- getAdviceContent(row, isChild) {
- console.log("rwoo22222222222222333",row)
- let tempSingleDoseDesc = ''
- let tempDrugSpecDesc = ''
- let tempPrescribingNumberDesc = ''
-
- if (row.prescribing_number) {
- tempPrescribingNumberDesc = row.prescribing_number + '' + row.prescribing_number_unit
-
- }
-
- if (row.single_dose) {
- if (this.template_id != 6) {
- tempSingleDoseDesc =' 单次用量 ' + ' ' + row.single_dose + '' + row.single_dose_unit
-
- } else {
- tempSingleDoseDesc = row.single_dose + row.single_dose_unit
-
- }
- }
-
- if (row.advice_desc) {
- tempDrugSpecDesc = '(' + row.advice_desc + row.drug_spec_unit + ')'
-
-
- }
-
- if (isChild == 1) {
- // 不是子药
- // console.log(tempDrugSpecDesc)
- // console.log(tempPrescribingNumberDesc)
- // console.log(tempSingleDoseDesc)
- // console.log(11,row.delivery_way)
- // console.log(22,row.execution_frequency)
-
- return (row.advice_name + tempDrugSpecDesc + ' ' + tempPrescribingNumberDesc + tempSingleDoseDesc +' ' + row.delivery_way +' ' +row.execution_frequency)
- } else {
- // 是子药
- return (row.advice_name +tempDrugSpecDesc +' ' + tempPrescribingNumberDesc + tempSingleDoseDesc)
-
- }
- },
- handleSelectionChange(val){
-
- this.selecting_schs = val;
- this.is_status = 1
- },
- handleSelectionChangeOne(val){
- this.selecting_schs = val;
- this.is_status = 1
- console.log("val32323323223",val)
- },
-
- querySearchAsync(keyword, cb) {
- let key = '';
- if (keyword != undefined) {
- key = keyword
- }
- let searchArray = []
- PostSearch(key).then(response => {
- if (response.data.state == 1) {
- searchArray = response.data.data.patient
- console.log('searcharrya', searchArray)
- cb(searchArray)
- }
- })
- return searchArray
- },
- handleSelect(val) {
-
- this.patient_id = val.id
- this.listQuery.keyword = val.name
- this.requestSchedualDoctors(this.time)
- },
- toSeach(){
- this.patient_id = 0
- this.requestSchedualDoctors(this.time)
- },
- toSeachOne(){
- this.requestSchedualDoctors(this.time)
- },
- toExcution(){
-
- if(this.selecting_schs.length ==0){
- this.$message.error("请勾选需要执行的医嘱")
- return false
- }
- console.log("hhhahhhahhh",this.is_status)
- if(this.is_status == 1){
- this.execTimeDialogVisible = true
- }
- if(this.is_status == 2){
- this.execTimeDialogVisibleOne = true
- }
- },
-
- excutionDoctorAdvice(){
-
- if (this.execTime.length == 0) {
- this.$message.error('请选择执行时间!')
- return false
- }
- var execTime = Math.round(new Date(this.execTime).getTime() / 1000)
- var ids=[]
- if(this.selecting_schs!=null && this.selecting_schs.length >0){
- for(let i=0;i<this.selecting_schs.length;i++){
- ids.push(this.selecting_schs[i].patient_id)
- }
- }
- var str = ids.join(",")
-
- var params = {
- str:str,
- advice_date: moment(this.time).format('YYYY-MM-DD'),
- is_open:this.config.is_open,
- exec_time:execTime
- }
- console.log("params232322323wo",params)
- this.exceLoading = true
-
- excutionDoctorAdvice(params).then(response=>{
- if(response.data.state == 1){
- if(response.data.data.msg == 2){
- var drug_name = response.data.data.drug.drug_name
- var dose = response.data.data.drug.dose
- var dose_unit = response.data.data.drug.dose_unit
- var min_number = response.data.data.drug.min_number
- var max_unit = response.data.data.drug.max_unit
- var min_unit = response.data.data.drug.min_unit
- var str = drug_name + " "+dose+dose_unit +"*"+min_number +max_unit +"/"+min_unit
- this.$message.error(str +"库存不足,执行失败!")
- this.exceLoading = false
- this.execTimeDialogVisible = false
- this.requestSchedualDoctors(this.time)
- }
- if(response.data.data.msg == 3){
- this.$message.error("执行人和核对人不能是同一个人,执行失败!")
- }
-
- }
- })
- },
- toCheck(){
-
- if(this.selecting_schs.length ==0){
- this.$message.error("请勾选需要执行的医嘱")
- return false
- }
-
-
- var ids=[]
- if(this.selecting_schs!=null && this.selecting_schs.length >0){
- for(let i=0;i<this.selecting_schs.length;i++){
- ids.push(this.selecting_schs[i].patient_id)
- }
- }
- var str = ids.join(",")
- var params = {
- str:str,
- advice_date: moment(this.time).format('YYYY-MM-DD'),
- is_open:this.config.is_open,
- }
- checkNewDoctorAdvice(params).then(response=>{
- if(response.data.state == 1){
- if(response.data.data.msg == 2){
- var advice = response.data.data.advice
- this.$message.error(advice.advice_name +"执行人和核对人不能是同一个人,核对失败!")
- this.requestSchedualDoctors(this.time)
- }else{
- this.$message.success("核对成功!")
- this.requestSchedualDoctors(this.time)
- }
-
- }
- })
- },
- toSettle(){
- if(this.selecting_schs.length ==0){
- this.$message.error("请勾选需要执行的医嘱")
- return false
- }
- var ids=[]
- if(this.selecting_schs!=null && this.selecting_schs.length >0){
- for(let i=0;i<this.selecting_schs.length;i++){
- ids.push(this.selecting_schs[i].patient_id)
- }
- }
- var str = ids.join(",")
- var params = {
- str:str,
- advice_date: moment(this.time).format('YYYY-MM-DD'),
- is_open:this.config.is_open,
- }
- settleNewDoctorAdvice(params).then(response=>{
- if(response.data.state == 1){
- this.$message.success("收费成功!")
- this.requestSchedualDoctors(this.time)
- }
- })
- },
- selectSortType(id){
- this.is_sort = id
- this.requestSchedualDoctors(this.time);
- },
- handleRowClick (row) {
-
- },
- tableRowClassName({row, rowIndex}) {
- row.index = rowIndex
- if(row.index = rowIndex){
- return 'success-row'
- }
-
- },
- handleCurrentChangeList(row){
-
- this.selecting_schs.push(row)
- this.current_row= row
- this.is_status = 2
-
- },
- excutionDoctorAdviceOne(){
- if(this.current_row.execution_state == 1){
- this.$message.error("所选医嘱已核对,无需再核对!")
- return false
- }
- if (this.execTime.length == 0) {
- this.$message.error('请选择执行时间!')
- return false
- }
- var execTime = Math.round(new Date(this.execTime).getTime() / 1000)
- var params= {
- advice_id:this.current_row.id,
- advice_date: moment(this.time).format('YYYY-MM-DD'),
- exec_time:execTime,
- }
- excutionDoctorAdviceById(params).then(response=>{
- if(response.data.state == 1){
- if(response.data.data.msg == 2){
- var drug_name = response.data.data.drug.drug_name
- var dose = response.data.data.drug.dose
- var dose_unit = response.data.data.drug.dose_unit
- var min_number = response.data.data.drug.min_number
- var max_unit = response.data.data.drug.max_unit
- var min_unit = response.data.data.drug.min_unit
- var str = drug_name + " "+dose+dose_unit +"*"+min_number +max_unit +"/"+min_unit
- this.$message.error(str +"库存不足,执行失败!")
- this.exceLoading = false
- this.execTimeDialogVisibleOne = false
- this.requestSchedualDoctors(this.time)
- }
- if(response.data.data.msg == 1){
- var msg = response.data.data.msg
- this.$message.success("执行成功!")
- this.exceLoading = false
- this.execTimeDialogVisibleOne = false
- this.requestSchedualDoctors(this.time)
- }
- if(response.data.data.msg == 3){
- this.$message.error("执行人与核对人不能是同一个人,执行失败!")
- }
- }
- })
- },
-
- toStatic() {
- var str = ""
- if(this.partion_type==0){
- str = this.zoneIdList.join(",")
- }
- if(this.partion_type!=0){
- str = this.partion_type.join(",")
- }
- this.partion_str = ""
- this.partion_str = str
- this.tableList = []
- var params = {
- schedule_type:this.schedule_type,
- partion_type:str,
- selected_date: moment(this.time).format('YYYY-MM-DD'),
- }
-
- console.log("params2332232wo",params)
- getDialysisAdviceToday(params).then(response=>{
- if(response.data.state == 1){
- var doctorList = []
- var druglist = response.data.data.drug
- this.druglist = druglist
- this.startdialogVisible = true
- var list = response.data.data.list
-
- var config = response.data.data.config
- this.manufacturerList = response.data.data.manufacturerList
- console.log("dcotor---------------",this.manufacturerList)
- if(list!=null && list.length > 0){
- for(let i=0;i<list.length;i++){
- for(let j=0;j<list[i].xt_doctor_advice.length;j++){
- doctorList.push(list[i].xt_doctor_advice[j])
- }
- }
- }
-
- if(config.is_open!=1){
- if(doctorList!=null && doctorList.length > 0){
- let dataInfo = {}
- doctorList.forEach((item, index) => {
- let { advice_name } = item
- if (!dataInfo[advice_name]) {
- dataInfo[advice_name] = {
- advice_name:item.advice_name,
- child: [],
- count:0,
- drug_id:item.drug_id,
- specification_name:item.advice_desc +item.drug_spec_unit,
- patient_id:item.patient_id,
- delivery_way:"",
- }
- }
- })
- let arr = Object.values(dataInfo)
- // console.log("arr23332323232",arr)
-
-
- if(arr.length > 0){
- for(let i=0;i<doctorList.length;i++){
- for(let j=0;j<arr.length;j++){
- if(doctorList[i].advice_name == arr[j].advice_name){
- arr[j].child.push(doctorList[i])
- }
- }
- }
- }
-
- this.tableList = []
- for(let i=0;i<list.length;i++){
- for(let j=0;j<arr.length;j++){
- if(list[i].patient_id == arr[j].patient_id){
- this.tableList.push(arr[j])
- }
- }
- }
-
- }
- }
-
- var his_doctor_advice = []
-
- for(let i=0;i<list.length;i++){
- for(let j=0;j<list[i].his_doctor_advice.length;j++){
- his_doctor_advice.push(list[i].his_doctor_advice[j])
- }
- }
- console.log("his_doctor_advice",his_doctor_advice)
-
- var newHisArr = []
- for(let i=0;i<his_doctor_advice.length;i++){
- his_doctor_advice[i].count_one = 0
- if(his_doctor_advice[i].prescribing_number_unit == his_doctor_advice[i].drug.max_unit){
- his_doctor_advice[i].prescribing_number = parseInt(his_doctor_advice[i].prescribing_number) * his_doctor_advice[i].drug.min_number
- his_doctor_advice[i].count_one = parseInt(his_doctor_advice[i].prescribing_number) * his_doctor_advice[i].drug.min_number
- }
- }
-
- for(let i=0;i<his_doctor_advice.length;i++){
- for(let j=0;j<druglist.length;j++){
- if(his_doctor_advice[i].drug_id == druglist[j].id){
- newHisArr.push(his_doctor_advice[i])
- }
- }
- }
- console.log("下盘子3223323223",newHisArr)
-
- if(config.is_open == 1){
- if(newHisArr!=null && newHisArr.length > 0){
- let dataInfoOne = {}
- newHisArr.forEach((item, index) => {
- let { drug_id } = item
- if (!dataInfoOne[drug_id]) {
- dataInfoOne[drug_id] = {
- advice_name:item.advice_name,
- child: [],
- count:0,
- specification_name:this.getSpecification(item.drug_id),
- drug_id:item.drug_id,
- patient_id:item.patient_id,
- min_number:item.drug.min_number,
- max_unit:item.drug.max_unit,
- min_unit:item.drug.min_unit,
- delivery_way:item.delivery_way,
- manufacturer_name:this.getManufacturer(item.drug.manufacturer) ,
- }
- }
- })
- let hisarr = Object.values(dataInfoOne)
- console.log("hisarr233232233232",hisarr)
- if(hisarr.length > 0){
- for(let i=0;i<newHisArr.length;i++){
- for(let j=0;j<hisarr.length;j++){
- if(newHisArr[i].drug_id == hisarr[j].drug_id){
- hisarr[j].child.push(newHisArr[i])
- }
- }
- }
- }
-
- if(this.org_id == 0 || this.org_id ==10644){
- var newArr = []
- var arr_one = []
- for(let i=0;i<hisarr.length;i++){
- if(hisarr[i].delivery_way.indexOf('口服')!=-1){
- newArr.push(hisarr[i])
- }
- }
- for(let i=0;i<hisarr.length;i++){
- if(hisarr[i].delivery_way.indexOf('口服')==-1){
- newArr.push(hisarr[i])
- }
- }
- this.tableList = []
- this.tableList = newArr
- }else{
- this.tableList = []
- this.tableList = hisarr
- }
-
-
- }
-
-
- }
- }
- })
-
- },
- arraySort(property) {
- return function (a, b) {
- var value1 = a[property];
- var value2 = b[property];
- return value1 - value2;
- };
- },
- toStaticOne() {
- var str = ""
- if(this.partion_type==0){
- str = this.zoneIdList.join(",")
- }
- if(this.partion_type!=0){
- str = this.partion_type.join(",")
- }
- this.partion_str = ""
- this.partion_str = str
- this.tableList = []
- var params = {
- schedule_type:this.schedule_type,
- partion_type:str,
- selected_date: moment(this.time).format('YYYY-MM-DD'),
- }
-
- getDialysisAdviceToday(params).then(response=>{
- if(response.data.state == 1){
- var doctorList = []
- var druglist = response.data.data.drug
- this.druglist = druglist
- this.startdialogVisibleOne = true
- var list = response.data.data.list
-
- var config = response.data.data.config
- this.adminUserList = response.data.data.doctorList
-
- if(list!=null && list.length > 0){
- for(let i=0;i<list.length;i++){
- for(let j=0;j<list[i].xt_doctor_advice.length;j++){
- list[i].xt_doctor_advice[j].mode_id = list[i].mode_id
- list[i].xt_doctor_advice[j].zone_name = list[i].device_number.zone.name
- list[i].xt_doctor_advice[j].sort = list[i].device_number.zone.sort
- doctorList.push(list[i].xt_doctor_advice[j])
- }
- }
- }
-
- if(config.is_open!=1){
-
-
- if(doctorList!=null && doctorList.length > 0){
-
- let dataInfo = {}
- doctorList.forEach((item, index) => {
- item.advice_name = item.advice_name.replace(/\s/g,"")
- let { advice_name } = item
- if (!dataInfo[advice_name]) {
- dataInfo[advice_name] = {
- advice_name:item.advice_name,
- child: [],
- count:0,
- execution_staff:item.execution_staff,
- specification_name:item.advice_desc +item.drug_spec_unit,
- patient_id:item.patient_id,
- }
- }
- })
- let arr = Object.values(dataInfo)
- for(let i=0;i<arr.length;i++){
- for(let j=0;j<doctorList.length;j++){
- if(arr[i].advice_name == doctorList[j].advice_name){
- arr[i].child.push(doctorList[j])
- }
- }
- }
- this.tabHead = arr
- console.log("tabHead",this.tabHead)
- }
-
- this.doctorMap = []
- if(doctorList!=null && doctorList.length > 0){
- let dataInfoOne = {}
- doctorList.forEach((item, index) => {
- if(item.advice_name == "肝素钠注射剂"){
- this.doctorMap.push(item)
- }
- let { zone_name } = item
- if (!dataInfoOne[zone_name]) {
- dataInfoOne[zone_name] = {
- zone_name:item.zone_name,
- child: [],
- count:0,
- sort:item.sort,
- }
- }
- })
- let newArr = Object.values(dataInfoOne)
- if(newArr!=null && newArr.length >0){
- for(let i=0;i<newArr.length;i++){
- for(let j=0;j<doctorList.length;j++){
- if(newArr[i].zone_name == doctorList[j].zone_name){
- newArr[i].child.push(doctorList[j])
- }
- }
- }
-
- }
- var newList = newArr.sort(this.compareList('sort'))
- if(newList!=null && newList.length >0){
- for(let i=0;i<newList.length;i++){
- newList[i].is_total = 1
- }
- }
-
- var obj = {is_total:0,count:0,execution_staff:0,child:[],zone_name:""}
- newList.push(obj)
- this.tableDataList = newList
- console.log("999999999999999999-------",this.tableDataList)
- }
-
-
-
- }
-
-
- }
- })
-
- },
- toStaticTwo(){
- var str = ""
- if(this.partion_type==0){
- str = this.zoneIdList.join(",")
- }
- if(this.partion_type!=0){
- str = this.partion_type.join(",")
- }
- this.partion_str = ""
- this.partion_str = str
- this.tableList = []
- var params = {
- schedule_type:this.schedule_type,
- partion_type:str,
- selected_date: moment(this.time).format('YYYY-MM-DD'),
- }
- getDialysisProject(params).then(response=>{
- if(response.data.state ==1){
- var list = response.data.data.list
- var newArr = []
- if(list!=null && list.length>0){
- for(let i=0;i<list.length;i++){
- for(let j=0;j<list[i].his_doctor_project.length;j++){
- newArr.push(list[i].his_doctor_project[j])
- }
- }
- }
-
- let dataInfo = {}
- newArr.forEach((item, index) => {
- let { project_id } = item
- if (!dataInfo[project_id]) {
- dataInfo[project_id] = {
- project_id:item.project_id,
- good_name:item.good.good_name,
- specification_name:item.good.specification_name,
- child: [],
- count:0,
- }
- }
- })
- let arr = Object.values(dataInfo)
-
- if(arr!=null && arr.length >0){
- for(let i =0;i<arr.length;i++){
- for(let j=0;j<newArr.length;j++){
- if(arr[i].project_id == newArr[j].project_id){
- arr[i].child.push(newArr[j])
- }
- }
- }
- for(let i =0;i<arr.length;i++){
- for(let j=0;j<arr[i].child.length;j++){
- arr[i].count += parseInt(arr[i].child[j].count)
- }
- }
-
- console.log("arr0000000000000000000000",arr)
-
- this.startdialogVisibleTwo = true
- this.tableProjectList = []
- this.tableProjectList = arr
-
- }
- }
- })
- },
- getAllQuery(){
- this.toStaticThree()
- },
- toStaticThree(){
- var params = {
- start_time:this.start_time,
- end_time:this.end_time
- }
- getDoctorAdviceMonthList(params).then(response=>{
- if(response.data.state == 1){
- this.startMothdialogVisible = true
- var config = response.data.data.config
- this.config = {}
- this.config = config
- var drugs = response.data.data.drugs
- this.druglist = []
- this.druglist = drugs
- var manufacturerList = response.data.data.manufacturerList
- this.manufacturerList = []
- this.manufacturerList = manufacturerList
- var adviceMonthList = response.data.data.adviceList
- var hisAdviceMonthList = response.data.data.hisAdviceList
- if(config.is_open == 1){
-
- if(hisAdviceMonthList!=null && hisAdviceMonthList.length>0){
- let dataInfo = {}
- hisAdviceMonthList.forEach((item, index) => {
- let { drug_id } = item
- if (!dataInfo[drug_id]) {
- dataInfo[drug_id] = {
- drug_id:item.drug_id,
- advice_name:item.advice_name,
- manufacturer_name:this.getManufacturer(item.drug.manufacturer),
- specification_name:item.drug.dose + item.drug.dose_unit +"*"+item.drug.min_number+item.drug.min_unit+"/"+item.drug.max_unit,
- max_unit:item.drug.max_unit,
- min_unit:item.drug.min_unit,
- min_number:item.drug.min_number,
- child: [],
- }
- }
- })
- let newArr = Object.values(dataInfo)
- console.log("newArr----------------",newArr)
- if(newArr!=null && newArr.length>0){
- for(let i=0;i<newArr.length;i++){
- for(let j=0;j<hisAdviceMonthList.length;j++){
- if(newArr[i].drug_id == hisAdviceMonthList[j].drug_id){
- newArr[i].child.push(hisAdviceMonthList[j])
- }
- }
- }
- }
- this.tableMonthList = []
- this.tableMonthList = newArr
-
- }
- }
-
- if(config.is_open == 2 || config.is_open ==0){
-
- if(adviceMonthList!=null && adviceMonthList.length>0){
-
- if(adviceMonthList!=null && adviceMonthList.length > 0){
- let dataInfo = {}
- adviceMonthList.forEach((item, index) => {
- item.advice_name = item.advice_name.replace(/\s/g,"")
- let { advice_name } = item
- if (!dataInfo[advice_name]) {
- dataInfo[advice_name] = {
- advice_name:item.advice_name,
- child: [],
- count:0,
- specification_name:item.advice_desc +item.drug_spec_unit,
- manufacturer_name:""
- }
- }
- })
- let arr = Object.values(dataInfo)
- for(let i=0;i<arr.length;i++){
- for(let j=0;j<adviceMonthList.length;j++){
- if(arr[i].advice_name == adviceMonthList[j].advice_name){
- arr[i].child.push(adviceMonthList[j])
- }
- }
- }
- this.tableMonthList = []
- this.tableMonthList = arr
- console.log("hhhhhhhhhhhhhh",this.tableMonthList)
- }
- }
- }
- }
- })
-
-
- console.log("params-=----",params)
-
- },
- toStaticFour(){
- var params = {
- start_time:this.start_time,
- end_time:this.end_time
- }
- getHisPrescrptionProjectMonthList(params).then(response=>{
- if(response.data.state ==1){
- var projectMonthList = response.data.data.projectMonthList
- console.log("projectMonthList",projectMonthList)
-
- if(projectMonthList!=null && projectMonthList.length>0){
-
- let dataInfo = {}
- projectMonthList.forEach((item, index) => {
- let { project_id } = item
- if (!dataInfo[project_id]) {
- dataInfo[project_id] = {
- project_id:item.project_id,
- good_name:item.good_info.good_name,
- specification_name:item.good_info.specification_name,
- child: [],
- count:0,
- }
- }
- })
- let arr = Object.values(dataInfo)
-
- if(arr!=null && arr.length >0){
- for(let i =0;i<arr.length;i++){
- for(let j=0;j<projectMonthList.length;j++){
- if(arr[i].project_id == projectMonthList[j].project_id){
- arr[i].child.push(projectMonthList[j])
- }
- }
- }
- for(let i =0;i<arr.length;i++){
- for(let j=0;j<arr[i].child.length;j++){
- arr[i].count += parseInt(arr[i].child[j].count)
- }
- }
-
- console.log("arr0000000000000000000000",arr)
-
- this.startMonthdialogVisible = true
- this.tableProjectList = []
- this.tableProjectList = arr
-
- }
- }
- }
- })
- },
- getDrugAdviceCount(advice_name,zone_name){
- var str = ""
- var arr =[]
- var arrOne = []
- if(this.doctorMap!=null && this.doctorMap.length>0){
-
- for(let i=0;i<this.doctorMap.length;i++){
- if(this.doctorMap[i].advice_name!="" || this.doctorMap[i].advice_name!=undefined){
- this.doctorMap[i].advice_name = this.doctorMap[i].advice_name.replace(/\s/g,"")
- }
- if(this.doctorMap[i].advice_name == advice_name && this.doctorMap[i].zone_name == zone_name && this.doctorMap[i].delivery_way =="导管封管"){
- arr.push(this.doctorMap[i])
- }
-
- if(this.doctorMap[i].advice_name == advice_name && this.doctorMap[i].zone_name == zone_name && this.doctorMap[i].delivery_way.indexOf("泵入")!=-1){
- arrOne.push(this.doctorMap[i])
- }
- }
- }
-
- if(arr!=null && arr.length >0){
- var total = 0
- for(let i=0;i<arr.length;i++){
- total +=arr[i].prescribing_number
- }
- str = "封管" +"("+total+")"
- }
- if(arrOne!=null && arrOne.length >0){
- var total_one = 0
- for(let i=0;i<arrOne.length;i++){
- total_one +=arrOne[i].prescribing_number
- }
- str = str + "泵入" +"("+total_one+")"
- }
- return str
- },
- getSpecification(id){
- var specification_name = ""
- for(let i=0;i<this.druglist.length;i++){
- if(id == this.druglist[i].id){
- specification_name = this.druglist[i].dose+this.druglist[i].dose_unit +"*"+this.druglist[i].min_number+this.druglist[i].min_unit +"/"+this.druglist[i].max_unit
- }
- }
- return specification_name
- },
- getCount(val){
- var count = 0
- if(val!=null && val.length > 0){
- for(let i=0;i<val.length;i++){
- count += parseInt(val[i].prescribing_number)
- }
- }
- if(count > 0){
- return count
- }else{
- return 0
- }
- },
- getHisCount(val,max_unit,min_unit,min_number){
- var total = 0
- var max_str = "";
- var min_str = "";
- for(let i=0;i<val.length;i++){
- total+=parseInt(val[i].prescribing_number)
- }
- if (total < min_number) {
- min_str = total + min_unit;
- }
- if (total == 0) {
- min_str = "";
- max_str = "";
- }
- if (total >= min_number) {
- if (parseInt(total / min_number) != 0) {
- max_str = parseInt(total / min_number) + max_unit;
- }
- if (total % min_number != 0) {
- min_str = (total % min_number) + min_unit;
- }
- }
- return max_str + min_str;
-
- },
- toPrintOne(){
- var schedule_date = moment(this.time).format('YYYY-MM-DD')
- this.$router.push({path:"/dialysis/doctorAdviceStaticPrint?schedule_type="+this.schedule_type+"&partion_type="+this.partion_str+"&schedule_date="+schedule_date+"&is_open="+this.config.is_open})
- },
- toPrintTwo(){
- var schedule_date = moment(this.time).format('YYYY-MM-DD')
- this.$router.push({path:"/dialysis/doctorNewAdviceStaticPrint?schedule_type="+this.schedule_type+"&partion_type="+this.partion_str+"&schedule_date="+schedule_date+"&is_open="+this.config.is_open})
- },
- toPrintThree(){
- var schedule_date = moment(this.time).format('YYYY-MM-DD')
- this.$router.push({path:"/dialysis/doctorNewProjectStaticPrint?schedule_type="+this.schedule_type+"&partion_type="+this.partion_str+"&schedule_date="+schedule_date+"&is_open="+this.config.is_open})
- },
- toExportListOne(){
- import('@/vendor/Export2Excel').then(excel => {
-
- if(this.tableList!=null && this.tableList.length > 0){
- for(let i=0;i<this.tableList.length;i++){
- this.tableList[i].index = i+1
- if(this.config.is_open == 1){
- this.tableList[i].total_count = this.getHisCount(this.tableList[i].child,this.tableList[i].max_unit,this.tableList[i].min_unit,this.tableList[i].min_number)
- }
- if(this.config.is_open!=1){
- this.tableList[i].total_count = this.getCount(this.tableList[i].child)
- }
-
- }
- }
- const tHeader = ['序号','药品名称','规格','数量']
- const filterVal = ['index','advice_name','specification_name','total_count']
-
- const data = this.formatJson(filterVal, this.tableList)
- excel.export_json_to_excel({
- header: tHeader,
- data,
- filename: '药品统计'
- })
- this.downloadLoading = false
- })
- },
- toExportListTwo(){
- import('@/vendor/Export2Excel').then(excel => {
-
- if(this.tableProjectList!=null && this.tableProjectList.length > 0){
- for(let i=0;i<this.tableProjectList.length;i++){
- this.tableProjectList[i].index = i+1
- }
- }
- const tHeader = ['序号','耗材名称','规格','数量']
- const filterVal = ['index','good_name','specification_name','count']
-
- const data = this.formatJson(filterVal, this.tableProjectList)
- excel.export_json_to_excel({
- header: tHeader,
- data,
- filename: '耗材统计'
- })
- this.downloadLoading = false
- })
- },
- toExportListThree(){
- import('@/vendor/Export2Excel').then(excel => {
-
- if(this.tableMonthList!=null && this.tableMonthList.length > 0){
- for(let i=0;i<this.tableMonthList.length;i++){
- this.tableMonthList[i].index = i+1
- if(this.config.is_open == 1){
- this.tableMonthList[i].total_count = this.getHisCount(this.tableMonthList[i].child,this.tableMonthList[i].max_unit,this.tableMonthList[i].min_unit,this.tableMonthList[i].min_number)
- }
- if(this.config.is_open!=1){
- this.tableMonthList[i].total_count = this.getCount(this.tableMonthList[i].child)
- }
-
- }
- }
- const tHeader = ['序号','药品名称','规格','数量','厂家']
- const filterVal = ['index','advice_name','specification_name','total_count','manufacturer_name']
-
- const data = this.formatJson(filterVal, this.tableMonthList)
- excel.export_json_to_excel({
- header: tHeader,
- data,
- filename: '药品月统计'
- })
- this.downloadLoading = false
- })
- },
- toExportListFour(){
- import('@/vendor/Export2Excel').then(excel => {
-
- if(this.tableProjectList!=null && this.tableProjectList.length > 0){
- for(let i=0;i<this.tableProjectList.length;i++){
- this.tableProjectList[i].index = i+1
- }
- }
- const tHeader = ['序号','耗材名称','规格','数量']
- const filterVal = ['index','good_name','specification_name','count']
-
- const data = this.formatJson(filterVal, this.tableProjectList)
- excel.export_json_to_excel({
- header: tHeader,
- data,
- filename: '耗材统计'
- })
- this.downloadLoading = false
- })
- },
- getGoodAllQuery(){
- this.toExportListThree()
- },
- formatJson(filterVal, jsonData) {
- return jsonData.map(v => filterVal.map(j => v[j]));
- },
- changeScheduleType(){
- this.tableList = []
- this.toStatic()
- },
- changePartionType(){
- this.tableList = []
- this.toStatic()
- },
- changeScheduleTypeOne(){
- this.tableDataList = []
- this.toStaticOne()
- },
- changePartionTypeOne(){
- this.tableDataList = []
- this.toStaticOne()
- },
- changeScheduleTypeTwo(){
- this.tableProjectList = []
- this.toStaticTwo()
- },
- changePartionTypeTwo(){
- this.tableProjectList=[]
- this.toStaticTwo()
- },
- getModeId(val){
- if(val!=null && val.length > 0){
- let dataInfo = {}
- val.forEach((item, index) => {
- let { patient_id } = item
- if (!dataInfo[patient_id]) {
- dataInfo[patient_id] = {
- patient_id:item.patient_id,
- child: [],
- count:0,
- mode_id:item.mode_id,
- }
- }
- })
- let newArr = Object.values(dataInfo)
-
- if(newArr!=null && newArr.length >0){
- let dataInfo = {}
- newArr.forEach((item, index) => {
- let { mode_id } = item
- if (!dataInfo[mode_id]) {
- dataInfo[mode_id] = {
- mode_id:item.mode_id,
- child: [],
- count:0,
- }
- }
- })
- let hisNewArr = Object.values(dataInfo)
-
- if(hisNewArr!=null && hisNewArr.length >0){
- for(let i=0;i<hisNewArr.length;i++){
- for(let j=0;j<newArr.length;j++){
- if(hisNewArr[i].mode_id == newArr[j].mode_id){
- hisNewArr[i].child.push(newArr[j])
- }
- }
- }
- }
-
-
- var str = ""
- for(let i=0;i<hisNewArr.length;i++){
- if(hisNewArr[i].mode_id == 1){
- hisNewArr[i].mode_id = "HD"
- }
- if(hisNewArr[i].mode_id == 2){
- hisNewArr[i].mode_id = "HDF"
- }
- if(hisNewArr[i].mode_id == 3){
- hisNewArr[i].mode_id = "HD+HP"
- }
- if(hisNewArr[i].mode_id == 4){
- hisNewArr[i].mode_id = "HP"
- }
- if(hisNewArr[i].mode_id == 5){
- hisNewArr[i].mode_id = "HF"
- }
- if(hisNewArr[i].mode_id == 6){
- hisNewArr[i].mode_id = "SCUF"
- }
- if(hisNewArr[i].mode_id == 7){
- hisNewArr[i].mode_id = "IUF"
- }
- if(hisNewArr[i].mode_id == 8){
- hisNewArr[i].mode_id = "HFHD"
- }
- if(hisNewArr[i].mode_id == 9){
- hisNewArr[i].mode_id = "HFHD+HP"
- }
- if(hisNewArr[i].mode_id == 10){
- hisNewArr[i].mode_id = "PHF"
- }
- if(hisNewArr[i].mode_id == 11){
- hisNewArr[i].mode_id = "HFR"
- }
- if(hisNewArr[i].mode_id == 12){
- hisNewArr[i].mode_id = "HDF+HP"
- }
- if(hisNewArr[i].mode_id == 13){
- hisNewArr[i].mode_id = "CRRT"
- }
- if(hisNewArr[i].mode_id == 14){
- hisNewArr[i].mode_id = "腹水回输"
- }
- if(hisNewArr[i].mode_id == 15){
- hisNewArr[i].mode_id = "IUF+HD"
- }
- if(hisNewArr[i].mode_id == 20){
- hisNewArr[i].mode_id = "UF"
- }
- if(hisNewArr[i].mode_id == 21){
- hisNewArr[i].mode_id = "HD+"
- }
- if(hisNewArr[i].mode_id == 22){
- hisNewArr[i].mode_id = "血浆胆红素吸附+HDF"
- }
- if(hisNewArr[i].mode_id == 23){
- hisNewArr[i].mode_id = "血浆胆红素吸附"
- }
- if(hisNewArr[i].mode_id == 24){
- hisNewArr[i].mode_id = "I-HDF"
- }
- if(hisNewArr[i].mode_id == 25){
- hisNewArr[i].mode_id = "HD高通"
- }
- if(hisNewArr[i].mode_id == 26){
- hisNewArr[i].mode_id = "CVVH"
- }
- if(hisNewArr[i].mode_id == 27){
- hisNewArr[i].mode_id = "CVVHD"
- }
- if(hisNewArr[i].mode_id == 28){
- hisNewArr[i].mode_id = "CVVHDF"
- }
- if(hisNewArr[i].mode_id == 29){
- hisNewArr[i].mode_id = "PE"
- }
- if(hisNewArr[i].mode_id == 30){
- hisNewArr[i].mode_id = "血浆胆红素吸附+HP"
- }
- if(hisNewArr[i].mode_id == 31){
- hisNewArr[i].mode_id = "HPD"
- }
- if(hisNewArr[i].mode_id == 32){
- hisNewArr[i].mode_id = "HDP"
- }
- if(hisNewArr[i].mode_id == 33){
- hisNewArr[i].mode_id = "HFD"
- }
- if(hisNewArr[i].mode_id == 34){
- hisNewArr[i].mode_id = "HDF100"
- }
- if(hisNewArr[i].mode_id == 35){
- hisNewArr[i].mode_id = "HDF600"
- }
- if(hisNewArr[i].mode_id == 36){
- hisNewArr[i].mode_id = "HDF800"
- }
- if(hisNewArr[i].mode_id == 37){
- hisNewArr[i].mode_id = "HDF1000"
- }
- str += hisNewArr[i].mode_id +"("+hisNewArr[i].child.length+")" +"\n"
- }
-
- return str
- }
-
- // return newArr.length
- }
- },
- getDrugCount(val,advice_name){
-
- if(val!=null){
- for(let i=0;i<val.length;i++){
- val[i].advice_name = val[i].advice_name.replace(/\s/g,"")
- }
- }
-
- if(val!=null && val.length >0){
- let dataInfo = {}
- val.forEach((item, index) => {
-
- let { advice_name } = item
- if (!dataInfo[advice_name]) {
- dataInfo[advice_name] = {
- advice_name:item.advice_name,
- child: [],
- count:0,
- }
- }
- })
-
- let newArr = Object.values(dataInfo)
-
-
- if(newArr!=null && newArr.length >0){
- for(let i=0;i<newArr.length;i++){
- for(let j=0;j<val.length;j++){
- if(newArr[i].advice_name == val[j].advice_name){
- newArr[i].child.push(val[j])
- }
- }
- }
- }
-
- var total = 0
- var newHisArr =[]
- if(newArr!=null && newArr.length >0){
- for(let i=0;i<newArr.length;i++){
- if(newArr[i].advice_name == advice_name){
- newHisArr.push(newArr[i])
- }
- }
- }
-
- if(newHisArr!=null && newHisArr.length>0){
-
- for(let i=0;i<newHisArr.length;i++){
- for(let j=0;j<newHisArr[i].child.length;j++){
- total += parseInt(newHisArr[i].child[j].prescribing_number)
- }
- }
- }
-
- return total
- }
-
- },
- getAdminUserName(id){
- var name = ""
- for(let i=0;i<this.adminUserList.length;i++){
- if(id == this.adminUserList[i].id){
- name = this.adminUserList[i].name
- }
- }
- return name
- },
- getZoneName(val){
- var zone_name = ""
- if(val!=null && val.length >0){
- zone_name = val[0].zone_name
- }
- return zone_name
- },
- compareList: function (k) {
- return function (a, b) {
- var M = a[k]
- var N = b[k]
- return M - N // 从低向高排
- // return N - M; // 从高向低排
- }
- },
- getSummaries(param) {
- const { columns, data } = param;
- const sums = [];
- columns.forEach((column, index) => {
-
- if (index === 0) {
- sums[index] = '总数';
- return;
- }
- if(index > 2){
- const values = data.map(item => item[column.property]);
-
-
- }
-
- });
-
- return sums;
- },
-
- getAllSumCount(advice_name){
-
- var hisNewArr =[]
- if(this.tabHead.length!=null && this.tabHead.length >0){
- for(let i=0;i<this.tabHead.length;i++){
- if(this.tabHead[i].advice_name == advice_name){
- hisNewArr.push(this.tabHead[i])
- }
- }
- }
-
- var total = 0
- if(hisNewArr!=null && hisNewArr.length > 0){
- for(let i=0;i<hisNewArr.length;i++){
- for(let j=0;j<hisNewArr[i].child.length;j++){
- total += parseInt(hisNewArr[i].child[j].prescribing_number)
- }
- }
- }
- if (total > 0) {
- return total
- }else{
- return 0
- }
-
- },
- getTimeSix(val) {
- if(val == ""){
- return ""
- }else {
- return uParseTime(val, '{y}-{m}-{d}')
- }
- },
- toJiao(){
- GetMobileScheduleList().then(response=>{
- if(response.data.state == 1){
- var schedule = response.data.data.schedule
- this.$message.success("保存成功!")
- // console.log("schedule---------------",schedule)
- // var arr = []
- // for(let i=0;i<schedule.length;i++){
- // if(schedule[i].monitor_record.ultrafiltration_volume!=schedule[i].xt_assesment_after_dislysis.actual_ultrafiltration){
- // arr.push(schedule[i])
- // }
- // }
-
-
- // import('@/vendor/Export2Excel').then(excel => {
-
- // if(arr!=null && arr.length > 0){
- // for(let i=0;i<arr.length;i++){
- // arr[i].patient_name = arr[i].patient.name
- // arr[i].target_ultrafiltration = arr[i].dialysis_prescription.target_ultrafiltration
- // arr[i].ultrafiltration_volume = arr[i].monitor_record.ultrafiltration_volume
- // arr[i].actual_ultrafiltration = arr[i].xt_assesment_after_dislysis.actual_ultrafiltration
- // arr[i].start_time = this.getTimeSix(arr[i].schedule_date)
- // }
- // }
- // const tHeader = ['序号','日期','患者姓名','目标超滤量','监测超滤量','实际超滤量']
- // const filterVal = ['index','start_time','patient_name','target_ultrafiltration','ultrafiltration_volume','actual_ultrafiltration']
-
- // const data = this.formatJson(filterVal, arr)
- // excel.export_json_to_excel({
- // header: tHeader,
- // data,
- // filename: '监测数据统计'
- // })
- // })
- }
- })
- },
- getManufacturer(id){
- var manufacturer_name = ""
- for(let i=0;i<this.manufacturerList.length;i++){
- if(id== this.manufacturerList[i].id){
- manufacturer_name = this.manufacturerList[i].manufacturer_name
- }
- }
- return manufacturer_name
- },
- getDrugName(drug_id,drugs){
-
- var drug_name = ""
- for(let i=0;i<drugs.length;i++){
- if(drug_id == drugs[i].id){
- drug_name = drugs[i].drug_name
- }
- }
- return drug_name
- },
- getMonthManufacturer(drug_id,drugs,manufacturerList){
- var manufacturer = 0
- for(let i=0;i<drugs.length;i++){
- if(drug_id == drugs[i].id){
- manufacturer = drugs[i].manufacturer
- }
- }
-
- var manufacturer_name = ""
- for(let i=0;i<manufacturerList.length;i++){
- if(manufacturer== manufacturerList[i].id){
- manufacturer_name = manufacturerList[i].manufacturer_name
- }
- }
- return manufacturer_name
- },
- toPrintTen(){
- this.$router.push("/dialysis/doctorMonthAdviceStaticPrint?start_time="+this.start_time+"&end_time="+this.end_time)
- },
- toPrintTenOne(){
- this.$router.push("/dialysis/doctocAdviceProjectPrint?start_time="+this.start_time+"&end_time="+this.end_time)
- }
-
- },
- components: {
- BreadCrumb
- }
- };
- </script>
-
- <style rel="stylesheet/scss" lang="scss" scoped>
- .app-container {
- // margin: 20px;
- font-size: 15px;
- .filter-container {
- padding-bottom: 5px;
- }
- .cqd-dataTitle {
- color: #303133;
- font-size: 14px;
- border-bottom: 2px #e4e7ed solid;
- height: 36px;
- line-height: 36px;
- margin: 0 0 25px 0;
- position: relative;
- }
- .cqd-dataTitle::before {
- position: absolute;
- left: 0;
- bottom: -2px;
- content: "";
- width: 42px;
- height: 2px;
- background: #409eff;
- }
- .search-component {
- width: 500px;
- .searchBox {
- width: 300px;
- height: 36px;
- line-height: 36px;
- padding-left: 15px;
- border: 1px #dcdfe6 solid;
- border-right: none;
- outline: none;
- float: left;
- border-radius: 6px 0 0 6px;
- font-size: 14px;
- color: #333;
- background: #fff;
- box-shadow: 3px 3px 4px rgba(135, 135, 135, 0.05);
- }
- .searchBtn {
- background-color: #409eff;
- color: #fff;
- font-size: 15px;
- text-align: center;
- height: 36px;
- line-height: 36px;
- float: left;
- outline: none;
- width: 70px;
- border: none;
- border-radius: 0 6px 6px 0;
- font-family: "Microsoft Yahei";
- cursor: pointer;
- }
- }
- .amount {
- font-weight: normal;
- padding: 10px 0 0 0;
- color: #606266;
- font-size: 14px;
- span {
- color: #ef2525;
- font-family: "Arial";
- padding: 0 2px;
- }
- }
-
-
- .el-table td .cell{
- white-space: pre-wrap;
- }
- }
- .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-checkbox__inner::after {
- height: 10px;
- left: 7px;
- }
- .el-checkbox__inner {
- width: 20px;
- height: 20px;
- }
-
- </style>
|