123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130 |
- <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">
- <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>
-
- </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: 250px;"
- type="date"
- placeholder="选择日期时间"
- align="right"
- format="yyyy-MM-dd"
- value-format="timestamp"
- ></el-date-picker>
- </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="toStaticOne" >统计</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>
- </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"
- align="center"
- min-width="30px"
- label="执行时间"
- 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"
- 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-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="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>
- </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>
-
-
- <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="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>
-
- </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">
- {{scope.row.zone_name }}
- </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>
- <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>
- </div>
-
-
- </div>
- </template>
-
- <script>
- const moment = require('moment')
- import { getSchedualPatient, GetAllZone,getLongDialysisAdviceToday } 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 { getNewLongSchedualDoctors,excutionDoctorAdvice,checkNewDoctorAdvice,settleNewDoctorAdvice,excutionDoctorAdviceById,GetMobileScheduleList } 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,
- schedule_type:0,
- partion_type:0,
- druglist:[],
- config:{},
- tabHead:[],
- tableDataList:[],
- adminUserList:[],
- doctorMap:[],
- excutList:[],
- execution_frequency:"",
- zoneIdList:[],
- partion_str:"",
- keyword:""
- };
- },
- 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)
- }
- 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
-
- getNewLongSchedualDoctors({date: newTime,patient_type: 0,advice_type: 1,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 schedules = resp.data.scheduals
- if(schedules!=null && schedules.length >0){
-
- }
- for(let i=0;i<schedules.length;i++){
- schedules[i].new_doctor_advice = []
- for(let j=0;j<schedules[i].doctor_advice.length;j++){
- if((schedules[i].doctor_advice[j].frequency_type == 1) || (schedules[i].doctor_advice[j].frequency_type == 3 && schedules[i].doctor_advice[j].week_day.indexOf(this.getweekday(time))!=-1)){
- schedules[i].new_doctor_advice.push(schedules[i].doctor_advice[j])
- }
- }
- }
- console.log("schedules-----------",schedules)
- 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.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.new_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.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"
- })
-
- 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
- }
- console.log("this.scheduleMap",this.scheduleMap)
- 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)
- }
-
- })
-
- },
- 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 = ""
- }
-
-
- this.$router.push({ path: "/dialysis/doctorlongAdvicePrint",query:{time: new Date(this.time).getTime(),delivery_way:name} });
-
-
-
-
-
-
-
- },
- 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/signLongPrint",query:{time: new Date(this.time).getTime(),delivery_way:name,execution_frequency:nameOne,patient_id:this.patient_id,keyword:this.keyword} });
-
- },
- 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) {
- 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 : '' + '' + row.single_dose_unit ? row.single_dose_unit : ''
- }
- }
-
- if (row.advice_desc) {
- tempDrugSpecDesc = '(' + row.advice_desc + row.drug_spec_unit + ')'
- }
-
- if (isChild == 1) {
-
-
- return (
- row.advice_name +
- tempDrugSpecDesc +
- ' ' +
- tempPrescribingNumberDesc +
- tempSingleDoseDesc +
- ' ' +
- row.delivery_way +
- ' ' +
- row.execution_frequency
- )
- } else {
- // 是子药
- return (
- row.advice_name +
- tempDrugSpecDesc +
- ' ' +
- tempPrescribingNumberDesc +
- tempSingleDoseDesc
- )
- }
- },
- handleSelectionChange(val){
- console.log("val88888888",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) {
- console.log("val323223232323232323",val)
- this.patient_id = val.id
- this.listQuery.keyword = val.name
- this.requestSchedualDoctors(this.time)
- },
- toSeach(){
- this.patient_id = 0
- 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("执行人与核对人不能是同一个人,执行失败!")
- }
- }
- })
- },
-
-
- 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'),
- }
-
- getLongDialysisAdviceToday(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
- console.log("list2332233223",list)
- if(list!=null && list.length>0){
- for(let i=0;i<list.length;i++){
- list[i].new_doctor_advice = []
- for(let j=0;j<list[i].xt_doctor_advice.length;j++){
- if((list[i].xt_doctor_advice[j].frequency_type == 1) || (list[i].xt_doctor_advice[j].frequency_type == 3 && list[i].xt_doctor_advice[j].week_day.indexOf(this.getweekday(this.time))!=-1)){
- list[i].new_doctor_advice.push(list[i].xt_doctor_advice[j])
- }
- }
- }
- }
-
-
- 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].new_doctor_advice.length;j++){
- list[i].new_doctor_advice[j].mode_id = list[i].mode_id
- list[i].new_doctor_advice[j].zone_name = list[i].device_number.zone.name
- list[i].new_doctor_advice[j].sort = list[i].device_number.zone.sort
- doctorList.push(list[i].new_doctor_advice[j])
- }
- }
- }
-
- 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)
- }
- }
- })
-
- },
- 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/doctorLongNewAdvicePrint?schedule_type="+this.schedule_type+"&partion_type="+this.partion_str+"&schedule_date="+schedule_date})
- },
- 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
- })
- },
- 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()
- },
- 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"
- }
- 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) => {
- console.log("index---------",index)
- if (index === 0) {
- sums[index] = '总数';
- return;
- }
- if(index > 2){
- const values = data.map(item => item[column.property]);
- console.log("data0----------------",data)
-
- }
-
- });
-
- 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("保存成功!")
- }
- })
- },
- getweekday(date){
- var weekArray = new Array("周日", "周一", "周二", "周三", "周四", "周五", "周六");
-
- var week = weekArray[new Date(date).getDay()];//注意此处必须是先new一个Date
-
- return week;
- },
- toSeachOne(){
- this.requestSchedualDoctors(this.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>
-
|