12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559 |
- <template>
- <div>
- <div class="cell clearfix" style="float: right">
- <el-button
- style="float: right"
- size="small"
- icon="el-icon-printer"
- @click="signPrint()"
- type="primary"
- >标签打印
- </el-button>
- <el-button
- style="float: right"
- size="small"
- icon="el-icon-printer"
- @click="printAction()"
- type="primary"
- >打印
- </el-button>
-
- <el-button
- style="float: right"
- size="small"
- icon="el-icon-printer"
- @click="printActionSetting()"
- type="primary">
- 打印设置
- </el-button>
- </div>
-
- <div class="cell clearfix">
- <label class="title"> <span class="name">时间</span> : </label>
- <div class="time">
- <ul class>
- <li
- :class="item.id == week_type ? 'active' : ''"
- @click="selectWeekType(item.id)"
- v-for="item in weekArr"
- :key="item.id"
- >
- {{ item.name }}
- </li>
- </ul>
- </div>
- </div>
- <div class="cell clearfix">
- <div class="title"><span class="name">班 次</span> :</div>
- <div class="time">
- <ul class>
- <li
- :class="item.id == week_time ? 'active' : ''"
- @click="selectWeekTime(item.id)"
- v-for="item in weekTimes"
- :key="item.id"
- >
- {{ item.name }}
- </li>
- </ul>
- </div>
- </div>
- <div class="cell clearfix">
- <div class="title"><span class="name">处方状态</span> :</div>
- <div class="time">
- <ul class>
- <li
- :class="item.id == pre_status ? 'active' : ''"
- @click="selectPreStatus(item.id)"
- v-for="item in preStatus"
- :key="item.id"
- >
- {{ item.name }}
- </li>
- </ul>
- </div>
- </div>
- <div class="cell clearfix">
- <div class="title"><span class="name">分区</span> :</div>
- <!-- <div class="time">
- <ul class>
- <li
- :class="item.id == zone ? 'active' : ''"
- @click="selectZoneList(item.id)"
- v-for="item in zoneList"
- :key="item.id"
- >
- {{ item.name }}
- </li>
- </ul>
- </div> -->
- <el-select v-model="zone" multiple placeholder="请选择" @change="changeZone">
- <el-option
- v-for="item in zoneList"
- :key="item.id"
- :label="item.name"
- :value="item.id">
- </el-option>
- </el-select>
- </div>
- <el-table
- v-loading="isloading"
- :row-style="{ color: '#303133' }"
- :data="summarySchData"
- border
- :header-cell-style="{
- backgroundColor: 'rgb(245, 247, 250)',
- color: '#606266'
- }"
- style="width: 100%"
- >
-
- <el-table-column label="分区" min-width="70" align="center">
- <template slot-scope="scope">
- {{ scope.row.zone.name }}
- </template>
- </el-table-column>
-
- <el-table-column label="透析模式" min-width="100" align="center">
- <template slot-scope="scope">
- <!--{{getModeDesc(scope.row.list)}}-->
- <div v-html>{{getModeDesc(scope.row.list)}}</div>
-
- </template>
- </el-table-column>
- <el-table-column label="透析液" min-width="100" align="center">
- <template slot-scope="scope">
- <div v-html>{{getDialysisLiquidDesc(scope.row.list)}}</div>
- </template>
- </el-table-column>
-
- <el-table-column label="透析管路" min-width="100" align="center">
- <template slot-scope="scope">
- <div v-html>{{getDialysisPipeDesc(scope.row.list)}}</div>
-
- </template>
- </el-table-column>
-
- <el-table-column label="穿刺针" min-width="100" align="center">
- <template slot-scope="scope">
- <div v-html>{{getPunctureNeedleDesc(scope.row.list)}}</div>
-
- </template>
- </el-table-column>
-
-
- <el-table-column label="抗凝剂" min-width="100" align="center">
- <template slot-scope="scope">
- <div v-html>{{getAnticoagulantDesc(scope.row.list)}}</div>
-
- </template>
- </el-table-column>
-
-
- <el-table-column label="促红素" min-width="100" align="center">
- <template slot-scope="scope">
- <div v-html>{{getEPODesc(scope.row.list)}}</div>
-
- </template>
- </el-table-column>
-
-
- </el-table>
-
- <el-table
- v-loading="isloading"
- :row-style="{ color: '#303133' }"
- :data="scheduleData"
- border
- :header-cell-style="{
- backgroundColor: 'rgb(245, 247, 250)',
- color: '#606266'
- }"
- style="width: 100%"
- >
- <el-table-column label="透析处方" min-width="100" align="center">
- <template slot-scope="scope">
- <span v-if="scope.row.prescription.id>0">已确定</span>
- <span v-if="scope.row.prescription.id == 0">未确定</span>
- </template>
- </el-table-column>
- <el-table-column label="星期" min-width="100" align="center">
- <template slot-scope="scope">
- <span v-if="scope.row.schedule_week == 0">周日</span>
- <span v-if="scope.row.schedule_week == 1">周一</span>
- <span v-if="scope.row.schedule_week == 2">周二</span>
- <span v-if="scope.row.schedule_week == 3">周三</span>
- <span v-if="scope.row.schedule_week == 4">周四</span>
- <span v-if="scope.row.schedule_week == 5">周五</span>
- <span v-if="scope.row.schedule_week == 6">周六</span>
- </template>
- </el-table-column>
- <el-table-column label="姓名" min-width="100" align="center">
- <template slot-scope="scope">
- {{ scope.row.patient.name }}
- </template>
- </el-table-column>
- <el-table-column label="分区" min-width="70" align="center">
- <template slot-scope="scope">
- {{ scope.row.zone.name }}
- </template>
- </el-table-column>
- <el-table-column label="班次" min-width="70" align="center">
- <template slot-scope="scope">
- {{ getSchedulesType(scope.row.schedule_type) }}
- </template>
- </el-table-column>
- <el-table-column label="机号" min-width="70" align="center">
- <template slot-scope="scope">
- {{ scope.row.number.number }}
- </template>
- </el-table-column>
- <el-table-column label="透析模式" min-width="100" align="center">
- <template slot-scope="scope">
- {{
- scope.row.mode_id && modeOptions[scope.row.mode_id]
- ? modeOptions[scope.row.mode_id].name
- : ''
- }}
- </template>
- </el-table-column>
- <el-table-column label="透析器/灌流器" min-width="100" align="center">
- <template slot-scope="scope">
- <span v-if="org_id!=9987&&org_id!=10131">
- <span v-if="scope.row.prescription.dialyzer_perfusion_apparatus!=''">
- <span>{{ scope.row.prescription.dialyzer_perfusion_apparatus }}</span>
- </span>
- <span v-if="scope.row.prescription.dialyzer_perfusion_apparatus==''&& scope.row.dialysissolution.id > 0 ">{{getDialysisDialyszerPerfusion(scope.row.patient_id)}}</span>
- </span>
- <span v-if="org_id==10131">{{getDialysisDialyszerPerfusionOne(scope.row.patient_id)}}</span>
- {{scope.row.prescription.dialysis_dialyszers}}
- <span v-if="scope.row.prescription.dialysis_dialyszers!='' && scope.row.prescription.dialysis_irrigation!=''">/</span>
- <span v-if="scope.row.prescription.dialysis_irrigation!=''">{{scope.row.prescription.dialysis_irrigation}}</span>
- </template>
- </el-table-column>
-
- <el-table-column label="抗凝剂(商品名称)" min-width="70" align="center">
- <template slot-scope="scope">
- <span v-if="scope.row.dialysissolution.anticoagulant === 1">无肝素</span>
- <span v-if="scope.row.dialysissolution.anticoagulant === 2">普通肝素</span>
- <span v-if="scope.row.dialysissolution.anticoagulant === 3">低分子肝素</span>
- <span v-if="scope.row.dialysissolution.anticoagulant === 4">阿加曲班</span>
- <span v-if="scope.row.dialysissolution.anticoagulant === 5">枸橼酸钠</span>
- <span v-if="scope.row.dialysissolution.anticoagulant === 6">低分子肝素钙</span>
- <span v-if="scope.row.dialysissolution.anticoagulant === 7">低分子肝素钠</span>
- <span v-if="scope.row.dialysissolution.anticoagulant === 8">伊诺肝素</span>
- <span v-if="scope.row.dialysissolution.anticoagulant === 9">达肝素</span>
- <span v-if="scope.row.dialysissolution.anticoagulant === 10">体外抗凝</span>
- <span v-if="scope.row.dialysissolution.anticoagulant === 11">那曲肝素</span>
-
- <span v-if="scope.row.dialysissolution.antioxidant_commodity_name!=''">
- (<span>{{scope.row.prescription.antioxidant_commodity_name}}</span>)
- </span>
- </template>
- </el-table-column>
- <el-table-column label="总量" min-width="100" align="center">
- <template slot-scope="scope">
- <span v-if="scope.row.dialysissolution.anticoagulant == 1">{{
- scope.row.dialysissolution.anticoagulant_zongliang
- ? scope.row.dialysissolution.anticoagulant_zongliang + 'mg'
- : ''
- }}</span>
- <span v-if="scope.row.dialysissolution.anticoagulant == 2">{{
- scope.row.dialysissolution.anticoagulant_zongliang
- ? scope.row.dialysissolution.anticoagulant_zongliang + 'iu'
- : ''
- }}</span>
- <span v-if="scope.row.dialysissolution.anticoagulant == 3">{{
- scope.row.dialysissolution.anticoagulant_zongliang
- ? scope.row.dialysissolution.anticoagulant_zongliang + 'iu'
- : ''
- }}</span>
- <span v-if="scope.row.dialysissolution.anticoagulant == 4">{{
- scope.row.dialysissolution.anticoagulant_zongliang
- ? scope.row.dialysissolution.anticoagulant_zongliang + 'mg'
- : ''
- }}</span>
- <span v-if="scope.row.dialysissolution.anticoagulant == 5">{{
- scope.row.dialysissolution.anticoagulant_zongliang
- ? scope.row.dialysissolution.anticoagulant_zongliang + 'mg'
- : ''
- }}</span>
- <span v-if="scope.row.dialysissolution.anticoagulant == 6">{{scope.row.dialysissolution.anticoagulant_zongliang? scope.row.dialysissolution.anticoagulant_zongliang + 'iu': ''}}</span>
- <span v-if="scope.row.dialysissolution.anticoagulant == 7">{{scope.row.dialysissolution.anticoagulant_zongliang? scope.row.dialysissolution.anticoagulant_zongliang + 'iu': ''}}</span>
- <span v-if="scope.row.dialysissolution.anticoagulant == 8">{{scope.row.dialysissolution.anticoagulant_zongliang? scope.row.dialysissolution.anticoagulant_zongliang + 'iu': ''}}</span>
- <span v-if="scope.row.dialysissolution.anticoagulant == 9">{{scope.row.dialysissolution.anticoagulant_zongliang? scope.row.dialysissolution.anticoagulant_zongliang + 'iu': ''}}</span>
- <span v-if="scope.row.dialysissolution.anticoagulant == 10">{{scope.row.dialysissolution.anticoagulant_zongliang? scope.row.dialysissolution.anticoagulant_zongliang + 'iu': ''}}</span>
- <span v-if="scope.row.dialysissolution.anticoagulant == 11">{{scope.row.dialysissolution.anticoagulant_zongliang? scope.row.dialysissolution.anticoagulant_zongliang + 'iu': ''}}</span>
- </template>
- </el-table-column>
-
- <el-table-column label="长期医嘱" min-width="440" align="center">
- <template slot-scope="scope">
- <span style="white-space: pre">
- <span v-if="scope.row.doctoradvice.length >0">{{ getAdvice(scope.row.doctoradvice)}}</span>
- <span v-if="scope.row.hisdoctoradviceinfo.length>0">{{ getAdviceOne(scope.row.hisdoctoradviceinfo)}}</span>
- </span>
- </template>
- </el-table-column>
- </el-table>
-
- <el-dialog
- title="打印设置"
- :visible.sync="dialogVisible"
- width="30%"
- >
- <span>
- <ul>
- <li>
- <el-checkbox v-model="prescription_status">透析处方状态</el-checkbox>
- </li>
- <li>
- <el-checkbox v-model="week">星期</el-checkbox>
- </li>
- <li>
- <el-checkbox v-model="name">姓名</el-checkbox>
- </li>
- <li>
- <el-checkbox v-model="zone_name">分区</el-checkbox>
- </li>
- <li>
- <el-checkbox v-model="classes">班次</el-checkbox>
- </li>
- <li>
- <el-checkbox v-model="number">机号</el-checkbox>
- </li>
- <li>
- <el-checkbox v-model="mode">透析模式</el-checkbox>
- </li>
- <li>
- <el-checkbox v-model="dialyzers">透析器</el-checkbox>
- </li>
- <li>
- <el-checkbox v-model="perfusion_apparatus">灌流器</el-checkbox>
- </li>
- <li>
- <el-checkbox v-model="anticoagulant">抗凝剂(商品名称)</el-checkbox>
- </li>
- <li>
- <el-checkbox v-model="anticoagulant_zongliang">总量</el-checkbox>
- </li>
- <li>
- <el-checkbox v-model="doctor_advice">长期医嘱</el-checkbox>
- </li>
- </ul>
-
- </span>
- <span slot="footer" class="dialog-footer">
- <el-button @click="dialogVisible = false">取 消</el-button>
- <el-button type="primary" @click="saveRemindPrint">保 存</el-button>
- </span>
- </el-dialog>
-
-
- </div>
- </template>
-
- <script>
- import { getDataConfig } from '@/utils/data'
-
- import {
- getAllZoneList,
- getRemindPrintList,
- getScheduleList,
- getSchedules,
- getScheduleWeekDay,
- saveRemindPrint
- } from '@/api/schedule'
- import WeekItem from './WeekItem'
-
- export default {
- name: 'tableWeeks',
- props: {
- weekTime: {
- type: String,
- default: 'thisWeek'
- }
- },
-
- data() {
- return {
- isloading:false,
- weekArr: [
- { id: 0, name: '全部' },
- { id: 1, name: '周一' },
- { id: 2, name: '周二' },
- { id: 3, name: '周三' },
- { id: 4, name: '周四' },
- { id: 5, name: '周五' },
- { id: 6, name: '周六' },
- { id: 7, name: '周日' }
- ],
- anticoagulants_confit: null,
-
- week_type: '1',
- week_time: 0,
- pre_status: 0,
- weekTimes: [
- { id: 0, name: '全部' },
- { id: 1, name: '上午' },
- { id: 2, name: '下午' },
- { id: 3, name: '晚上' }
- ],
- preStatus: [
- { id: 0, name: '全部' },
- { id: 1, name: '已确认' },
- { id: 2, name: '未确认' }
- ],
- weekTitle: ['', '', '', '', '', '', ''],
- weekData: {
- Monday: [],
- Tuesday: [],
- Wednesday: [],
- Thursday: [],
- Friday: [],
- Saturday: [],
- Sunday: []
- },
- scheduleData: [],
- modeOptions: null,
- org_id: 0,
- dialogVisible: false,
- prescription_status: false,
- week: false,
- name: false,
- zone_name: false,
- classes: false,
- number: false,
- mode: false,
- dialyzers: false,
- perfusion_apparatus: false,
- anticoagulant: false,
- anticoagulant_zongliang: false,
- doctor_advice: false,
- form: {
- id: 0,
- prescription_status: '',
- week: '',
- name: '',
- zone: '',
- classes: '',
- number: '',
- mode: '',
- dialyzers: '',
- perfusion_apparatus: '',
- anticoagulant: '',
- anticoagulant_zongliang: '',
- doctor_advice: ''
- },
- // zone: 0,
- // zoneList: [{ id: 0, name: '全部' }],
- summarySchData: [],
- zone:0,
- zoneList:[],
- }
- },
- watch: {
- weekTime: function() {
-
- var theType = this.weekType(this.weekTime)
- this.getSchedules(theType)
- }
- },
-
- methods: {
- getModeName(mode_id) {
- return this.$store.getters.treatment_mode[mode_id] != undefined ? this.$store.getters.treatment_mode[mode_id].name : ''
-
- }, getDialysisLiquidName(id) {
- let dialysate_formulation_options = getDataConfig(
- 'hemodialysis',
- 'dialysate_formulation'
- )
- // return this.$store.getters.dialysate_formulation[mode_id] != undefined ? this.$store.getters.treatment_mode[mode_id].name: ""
- for (let i = 0; i < dialysate_formulation_options.length; i++) {
- if (id == dialysate_formulation_options[i].id) {
- return dialysate_formulation_options[i].name
- }
- }
-
-
- return ''
-
- },getAnticoagulantName(id) {
-
- return this.$store.getters.anticoagulants_confit[id] != undefined ? this.$store.getters.anticoagulants_confit[id].name: ""
-
-
- },
- getModeDesc(list) {
- let modes = []
- for (let b = 0; b < list.length; b++) {
- let obj = {
- mode_id: list[b].mode_id,
- mode_name: this.getModeName(list[b].mode_id),
- count: 0
-
- }
- modes.push(obj)
- }
- modes = this.uniqueMode(modes)
-
- for (let i = 0; i < list.length; i++) {
- switch (list[i].mode_id) {
- case 1:
- for (let b = 0; b < modes.length; b++) {
- if (modes[b].mode_id == list[i].mode_id) {
- modes[b].count = modes[b].count + 1
- }
- }
- break
- case 2:
- for (let b = 0; b < modes.length; b++) {
- if (modes[b].mode_id == list[i].mode_id) {
- modes[b].count = modes[b].count + 1
- }
- }
- break
- case 3:
- for (let b = 0; b < modes.length; b++) {
- if (modes[b].mode_id == list[i].mode_id) {
- modes[b].count = modes[b].count + 1
- }
- }
- break
- case 4:
- for (let b = 0; b < modes.length; b++) {
- if (modes[b].mode_id == list[i].mode_id) {
- modes[b].count = modes[b].count + 1
- }
- }
- break
- case 5:
- for (let b = 0; b < modes.length; b++) {
- if (modes[b].mode_id == list[i].mode_id) {
- modes[b].count = modes[b].count + 1
- }
- }
- break
- case 6:
- for (let b = 0; b < modes.length; b++) {
- if (modes[b].mode_id == list[i].mode_id) {
- modes[b].count = modes[b].count + 1
- }
- }
- break
- case 7:
- for (let b = 0; b < modes.length; b++) {
- if (modes[b].mode_id == list[i].mode_id) {
- modes[b].count = modes[b].count + 1
- }
- }
- break
- case 8:
- for (let b = 0; b < modes.length; b++) {
- if (modes[b].mode_id == list[i].mode_id) {
- modes[b].count = modes[b].count + 1
- }
- }
- break
- case 9:
- for (let b = 0; b < modes.length; b++) {
- if (modes[b].mode_id == list[i].mode_id) {
- modes[b].count = modes[b].count + 1
- }
- }
- break
- case 10:
- for (let b = 0; b < modes.length; b++) {
- if (modes[b].mode_id == list[i].mode_id) {
- modes[b].count = modes[b].count + 1
- }
- }
- break
- case 11:
- for (let b = 0; b < modes.length; b++) {
- if (modes[b].mode_id == list[i].mode_id) {
- modes[b].count = modes[b].count + 1
- }
- }
- break
- case 12:
- for (let b = 0; b < modes.length; b++) {
- if (modes[b].mode_id == list[i].mode_id) {
- modes[b].count = modes[b].count + 1
- }
- }
- break
- case 13:
- for (let b = 0; b < modes.length; b++) {
- if (modes[b].mode_id == list[i].mode_id) {
- modes[b].count = modes[b].count + 1
- }
- }
- break
- case 14:
- for (let b = 0; b < modes.length; b++) {
- if (modes[b].mode_id == list[i].mode_id) {
- modes[b].count = modes[b].count + 1
- }
- }
- break
- case 19:
- for (let b = 0; b < modes.length; b++) {
- if (modes[b].mode_id == list[i].mode_id) {
- modes[b].count = modes[b].count + 1
- }
- }
- break
- case 20:
- for (let b = 0; b < modes.length; b++) {
- if (modes[b].mode_id == list[i].mode_id) {
- modes[b].count = modes[b].count + 1
- }
- }
- break
- case 21:
- for (let b = 0; b < modes.length; b++) {
- if (modes[b].mode_id == list[i].mode_id) {
- modes[b].count = modes[b].count + 1
- }
- }
- break
- case 22:
- for (let b = 0; b < modes.length; b++) {
- if (modes[b].mode_id == list[i].mode_id) {
- modes[b].count = modes[b].count + 1
- }
- }
- break
- case 23:
- for (let b = 0; b < modes.length; b++) {
- if (modes[b].mode_id == list[i].mode_id) {
- modes[b].count = modes[b].count + 1
- }
- }
- break
- }
- }
-
- let desc = ''
- for (let i = 0; i < modes.length; i++) {
- if (desc.length == 0) {
- desc = modes[i].mode_name + ': ' + modes[i].count + '次'
-
- } else {
-
- desc = desc + ' ' + modes[i].mode_name + ': ' + modes[i].count + '次'
-
- }
-
- }
- return desc
-
- },
- getDialysisLiquidDesc(list) {
- let modes = []
- for (let b = 0; b < list.length; b++) {
- let obj = {
- id: list[b].dialysissolution.dialysate_formulation,
- name: this.getDialysisLiquidName(list[b].dialysissolution.dialysate_formulation),
- count: 0
-
- }
- modes.push(obj)
-
- }
-
- modes = this.uniqueDialysisFormulation(modes)
- for (let i = 0; i < list.length; i++) {
- for (let c = 0; c < modes.length; c++) {
- if (modes[c].id == list[i].dialysissolution.dialysate_formulation) {
- modes[c].count = modes[c].count + 1
- }
- }
- }
- let desc = ''
- for (let b = 0; b < modes.length; b++) {
- if (desc.length == 0) {
- desc = modes[b].name + ': ' + modes[b].count
- } else {
- desc = desc + ' ' + modes[b].name + ': ' + modes[b].count
- }
- }
-
- return desc
-
- },
- getDialysisPipeDesc(list) {
-
- let dialysisPipe = []
- for (let b = 0; b < list.length; b++) {
- var hemodialysis_pipelines_arr = []
-
- if (list[b].dialysissolution.hemodialysis_pipelines.length > 0) {
- hemodialysis_pipelines_arr = list[b].dialysissolution.hemodialysis_pipelines.split(',')
- } else {
- hemodialysis_pipelines_arr = []
- }
-
- for (let c = 0; c < hemodialysis_pipelines_arr.length; c++) {
- let obj = {
- name: hemodialysis_pipelines_arr[c],
- count: 0
- }
- dialysisPipe.push(obj)
- }
- }
- console.log(dialysisPipe)
- dialysisPipe = this.uniqueDialysisPipe(dialysisPipe)
- console.log(dialysisPipe)
-
- let desc = ''
- for (let b = 0; b < dialysisPipe.length; b++) {
- for (let i = 0; i < list.length; i++) {
-
- let hemodialysis_pipelines_arr = list[i].dialysissolution.hemodialysis_pipelines.split(',')
- console.log(hemodialysis_pipelines_arr)
- for (let c = 0; c < hemodialysis_pipelines_arr.length; c++) {
- if (dialysisPipe[b].name == hemodialysis_pipelines_arr[c]) {
- dialysisPipe[b].count = dialysisPipe[b].count + list[i].dialysissolution.hemodialysis_pipelines_count
- }
- }
- }
- }
-
- for (let b = 0; b < dialysisPipe.length; b++) {
- if (desc.length == 0) {
- desc = dialysisPipe[b].name + ': ' + dialysisPipe[b].count + '支'
- } else {
- desc = desc + ' ' + dialysisPipe[b].name + ': ' + dialysisPipe[b].count + '支'
- }
- }
-
- return desc
- }
- ,
- getPunctureNeedleDesc(list) {
-
- let punctureNeedle = []
- for (let b = 0; b < list.length; b++) {
- var puncture_needle_arr = []
-
- if (list[b].dialysissolution.puncture_needle.length > 0) {
- puncture_needle_arr = list[b].dialysissolution.puncture_needle.split(',')
- } else {
- puncture_needle_arr = []
- }
-
- for (let c = 0; c < puncture_needle_arr.length; c++) {
- let obj = {
- name: puncture_needle_arr[c],
- count: 0
- }
- punctureNeedle.push(obj)
- }
- }
- punctureNeedle = this.uniqueDialysisPipe(punctureNeedle)
-
- let desc = ''
- for (let b = 0; b < punctureNeedle.length; b++) {
- for (let i = 0; i < list.length; i++) {
- let puncture_needle_arr = list[i].dialysissolution.puncture_needle.split(',')
- for (let c = 0; c < puncture_needle_arr.length; c++) {
- if (punctureNeedle[b].name == puncture_needle_arr[c]) {
- punctureNeedle[b].count = punctureNeedle[b].count + list[i].dialysissolution.puncture_needle_count
-
- }
- }
- }
- }
-
- for (let b = 0; b < punctureNeedle.length; b++) {
- if (desc.length == 0) {
- desc = punctureNeedle[b].name + ': ' + punctureNeedle[b].count + '支'
- } else {
- desc = desc + ' ' + punctureNeedle[b].name + ': ' + punctureNeedle[b].count + '支'
- }
- }
-
- return desc
- }
- ,
- getAnticoagulantDesc(list) {
- let modes = []
- for (let b = 0; b < list.length; b++) {
- let obj = {
- id: list[b].dialysissolution.anticoagulant,
- name: this.getAnticoagulantName(list[b].dialysissolution.anticoagulant),
- count: 0
-
- }
- modes.push(obj)
-
- }
- modes = this.uniqueAnticoagulant(modes)
- for (let i = 0; i < list.length; i++) {
- for (let c = 0; c < modes.length; c++) {
- if (modes[c].id == list[i].dialysissolution.anticoagulant) {
- modes[c].count = modes[c].count + 1
- }
- }
- }
- let desc = ''
- for (let b = 0; b < modes.length; b++) {
- if (desc.length == 0) {
- desc = modes[b].name + ': ' + modes[b].count + '支'
- } else {
- desc = desc + ' ' + modes[b].name + ': ' + modes[b].count + '支'
- }
- }
- return desc
- },
- getEPODesc(list) {
- let EPO = []
- for (let b = 0; b < list.length; b++) {
- var epo_arr = []
- if (list[b].dialysissolution.epo.length > 0) {
- epo_arr = list[b].dialysissolution.epo.split(',')
- } else {
- epo_arr = []
- }
-
- for (let c = 0; c < epo_arr.length; c++) {
- let obj = {
- name: epo_arr[c],
- count: 0
- }
- EPO.push(obj)
- }
- }
- EPO = this.uniqueDialysisPipe(EPO)
-
- let desc = ''
- for (let b = 0; b < EPO.length; b++) {
- for (let i = 0; i < list.length; i++) {
- let epo_arr = list[i].dialysissolution.epo.split(',')
- for (let c = 0; c < epo_arr.length; c++) {
- if (EPO[b].name == epo_arr[c]) {
- EPO[b].count = EPO[b].count + list[i].dialysissolution.epo_count
-
- }
- }
- }
- }
- for (let b = 0; b < EPO.length; b++) {
- if (desc.length == 0) {
- desc = EPO[b].name + ': ' + EPO[b].count + '支'
- } else {
- desc = desc + ' ' + EPO[b].name + ': ' + EPO[b].count + '支'
- }
- }
-
- return desc
-
- }
- ,
- printAction() {
- var zone = this.zone
- var newArr = []
- for(let i=0;i<this.zoneList.length;i++){
- newArr.push(this.zoneList[i].id)
- }
- var arr = newArr.join(",")
- var str = ""
- if(this.zone == 0){
- str = arr
- }
- if(zone != 0){
- str = zone.join(",")
- }
- this.$router.push({
- path: '/schedule/remind/print?week_type=' + this.week_type + '&week_time=' + this.week_time + '&zone=' + str
- })
- }
- ,
- signPrint() {
- var zone = this.zone
- console.log("zone23232",zone)
- var newArr = []
- for(let i=0;i<this.zoneList.length;i++){
- newArr.push(this.zoneList[i].id)
- }
- var arr = newArr.join(",")
- var str = ""
- if(this.zone == 0){
- str = arr
- }
- if(zone != 0){
- str = zone.join(",")
- }
- this.$router.push({
- path: '/schedule/remind/print/setting?week_type=' + this.week_type + '&week_time=' + this.week_time + '&zone=' + str + '&prestatus=' + this.pre_status+"&type="+1
- })
- }
- ,
- compare(property) {
- return function(a, b) {
- var value1 = a[property]
- var value2 = b[property]
- return value1 - value2
- }
- }
- ,
- getScheduleWeekDay() {
-
- const params = {
- week_type: this.week_type,
- week_time: this.week_time
- }
- getScheduleWeekDay(params).then(response => {
- this.scheduleData = []
- if (response.data.state == 1) {
- var scheduleData = response.data.data.schdules
- console.log('列表', scheduleData)
- for (let i = 0; i < scheduleData.length; i++) {
- scheduleData[i].sort = scheduleData[i].number.sort
- }
- var arr = scheduleData.sort(this.compare('sort'))
-
- var arr = scheduleData.sort(this.compare('sort'))
-
- this.scheduleData = arr
- } else {
- this.$message.error('网络错误')
- return false
- }
- })
- }
- ,
- uniqueZone(arr) {
- const res = new Map()
- return arr.filter((arr) => !res.has(arr.id) && res.set(arr.id, 1))
- }
- ,
- uniqueMode(arr) {
- const res = new Map()
- return arr.filter((arr) => !res.has(arr.mode_id) && res.set(arr.mode_id, 1))
- }
- ,
- uniqueDialysisPipe(arr) {
- const res = new Map()
- return arr.filter((arr) => !res.has(arr.name) && res.set(arr.name, 1))
- }
- ,
- uniqueDialysisFormulation(arr) {
- const res = new Map()
- return arr.filter((arr) => !res.has(arr.id) && res.set(arr.id, 1))
- }
- , uniqueAnticoagulant(arr) {
- const res = new Map()
- return arr.filter((arr) => !res.has(arr.id) && res.set(arr.id, 1))
- }
- ,
-
- getScheduleList() {
-
- var zone = this.zone
- var newArr = []
- for(let i=0;i<this.zoneList.length;i++){
- newArr.push(this.zoneList[i].id)
- }
- var arr = newArr.join(",")
- var str = ""
- if(this.zone == 0){
- str = arr
- }
- if(zone != 0){
- str = zone.join(",")
- }
- const params = {
- week_type: this.week_type,
- week_time: this.week_time,
- zone: str,
- }
- console.log("param",params)
- this.scheduleData = []
- this.isloading = true
- getScheduleList(params).then(response => {
- if (response.data.state == 1) {
- this.isloading = false
-
- console.log('22333333333', this.pre_status)
- var list = response.data.data.list
- if (this.pre_status == 0) {
-
- for (let i = 0; i < list.length; i++) {
- list[i].sort = list[i].number.sort
- }
-
- var arr = list.sort(this.compare('sort'))
- this.scheduleData = arr
-
- //汇总逻辑
- var zones = []
- for (let b = 0; b < arr.length; b++) {
- zones.push(arr[b].zone)
- }
-
- zones = this.uniqueZone(zones)
- this.summarySchData = []
- for (let i = 0; i < zones.length; i++) {
- let obj = {
- zone: zones[i],
- list: []
- }
- for (let b = 0; b < arr.length; b++) {
- if (zones[i].id == arr[b].zone.id) {
- obj.list.push(arr[b])
- }
- }
- this.summarySchData.push(obj)
- }
-
- }
- if (this.pre_status == 1) {
- var newList = []
- for (let i = 0; i < list.length; i++) {
- if (list[i].prescription.id > 0) {
- newList.push(list[i])
- }
- }
- var arr = newList.sort(this.compare('sort'))
- this.scheduleData = arr
-
- //汇总逻辑
- var zones = []
- for (let b = 0; b < arr.length; b++) {
- zones.push(arr[b].zone)
- }
-
- zones = this.uniqueZone(zones)
- this.summarySchData = []
- for (let i = 0; i < zones.length; i++) {
- let obj = {
- zone: zones[i],
- list: []
- }
- for (let b = 0; b < arr.length; b++) {
- if (zones[i].id == arr[b].zone.id) {
- obj.list.push(arr[b])
- }
- }
- this.summarySchData.push(obj)
- }
- }
-
- if (this.pre_status == 2) {
- var newList = []
- for (let i = 0; i < list.length; i++) {
- if (list[i].prescription.id == 0) {
- newList.push(list[i])
- }
- }
- var arr = newList.sort(this.compare('sort'))
- this.scheduleData = arr
-
- //汇总逻辑
- var zones = []
- for (let b = 0; b < arr.length; b++) {
- zones.push(arr[b].zone)
- }
-
- zones = this.uniqueZone(zones)
- this.summarySchData = []
- for (let i = 0; i < zones.length; i++) {
- let obj = {
- zone: zones[i],
- list: []
- }
- for (let b = 0; b < arr.length; b++) {
- if (zones[i].id == arr[b].zone.id) {
- obj.list.push(arr[b])
- }
- }
- this.summarySchData.push(obj)
- }
- }
-
- }
- })
- }
- ,
-
- weekType(weekTime) {
- var theType = 2
- switch (weekTime) {
- case 'lastWeek':
- theType = 1
- break
- case 'thisWeek':
- theType = 2
- break
- case 'nextWeek':
- theType = 3
- break
- case 'nextTwoWeek':
- theType = 4
- break
- default:
- theType = 2
- break
- }
- return theType
- }
- ,
- weekPath(week) {
- var weekArr = {
- 1: 'Monday',
- 2: 'Tuesday',
- 3: 'Wednesday',
- 4: 'Thursday',
- 5: 'Friday',
- 6: 'Saturday',
- 7: 'Sunday'
- }
- if (typeof weekArr[week] == 'undefined') {
- return ''
- }
- return weekArr[week]
- }
- ,
- selectWeekType(type) {
- this.week_type = type
- this.getScheduleList()
- }
- ,
-
- selectWeekTime(type) {
- this.week_time = type
- this.getScheduleList()
- }
- ,
- selectPreStatus(type) {
- this.pre_status = type
- this.getScheduleList()
- }
- ,
- selectZoneList(type) {
- this.zone = type
- this.getScheduleList()
- }
- ,
- getSchedulesType: function(type) {
- let type_name = ''
- switch (type) {
- case 1:
- type_name = '上午'
- break
- case 2:
- type_name = '下午'
- break
- case 3:
- type_name = '晚上'
- break
- }
- return type_name
- }
- ,
- getAdvice: function(doctor_advice) {
-
- if (doctor_advice.length > 0) {
- let name = ''
- for (let i = 0; i < doctor_advice.length; i++) {
- let prescribing_number = ''
- let single_dose = ''
- let drug_spec = ''
-
- if (doctor_advice[i].prescribing_number > 0) {
- prescribing_number =
- doctor_advice[i].prescribing_number +
- doctor_advice[i].prescribing_number_unit
- }
- if (doctor_advice[i].single_dose > 0) {
- single_dose =
- ' 单次用量 ' +
- doctor_advice[i].single_dose +
- doctor_advice[i].single_dose_unit
- }
-
- if (doctor_advice[i].drug_spec > 0) {
- drug_spec =
- doctor_advice[i].drug_spec + doctor_advice[i].drug_spec_unit
- }
-
- name =
- name +
- doctor_advice[i].advice_name +
- ' ' +
- drug_spec +
- ' ' +
- prescribing_number +
- ' ' +
- single_dose +
- ' ' +
- doctor_advice[i].delivery_way +
- ' ' +
- doctor_advice[i].execution_frequency +
- ' ' +
- doctor_advice[i].remark +
- '\n'
-
- if (doctor_advice[i].child.length > 0) {
- for (let a = 0; a < doctor_advice[i].child.length; a++) {
- if (doctor_advice[i].child[a].prescribing_number > 0) {
- doctor_advice[i].child[a]['presc'] =
- doctor_advice[i].child[a].prescribing_number +
- doctor_advice[i].child[a].prescribing_number_unit
- } else {
- doctor_advice[i].child[a]['presc'] = ''
- }
-
- if (doctor_advice[i].child[a].single_dose > 0) {
- doctor_advice[i].child[a]['single'] =
- ' ' +
- ' 单次用量 ' +
- ' ' +
- doctor_advice[i].child[a].single_dose +
- doctor_advice[i].child[a].single_dose_unit
- } else {
- doctor_advice[i].child[a]['single'] = ''
- }
-
- name =
- name +
- '▲' +
- doctor_advice[i].child[a].advice_name +
- '' +
- doctor_advice[i].child[a].advice_desc +
- doctor_advice[i].child[a].drug_spec_unit +
- doctor_advice[i].child[a].presc +
- doctor_advice[i].child[a].single +
- '\n'
- }
- }
- }
- return name
- } else {
- return ''
- }
- }
- ,
- getAdviceOne: function(doctor_advice) {
-
- if (doctor_advice.length > 0) {
- let name = ''
- for (let i = 0; i < doctor_advice.length; i++) {
- let prescribing_number = ''
- let single_dose = ''
- let drug_spec = ''
-
- if (doctor_advice[i].prescribing_number > 0) {
- prescribing_number =
- doctor_advice[i].prescribing_number +
- doctor_advice[i].prescribing_number_unit
- }
- if (doctor_advice[i].single_dose > 0) {
- single_dose =
- ' 单次用量 ' +
- doctor_advice[i].single_dose +
- doctor_advice[i].single_dose_unit
- }
-
- if (doctor_advice[i].drug_spec > 0) {
- drug_spec =
- doctor_advice[i].drug_spec + doctor_advice[i].drug_spec_unit
- }
-
- name =
- name +
- doctor_advice[i].advice_name +
- ' ' +
- drug_spec +
- ' ' +
- prescribing_number +
- ' ' +
- single_dose +
- ' ' +
- doctor_advice[i].delivery_way +
- ' ' +
- doctor_advice[i].execution_frequency +
- ' ' +
- doctor_advice[i].remark +
- '\n'
- }
- return name
- } else {
- return ''
- }
- }
- ,
- printActionSetting() {
- this.getAllZoneList()
- this.getlist()
- this.dialogVisible = true
-
- }
- ,
- saveRemindPrint() {
- console.log('455555555', this.perfusion_apparatus)
-
- if (this.perfusion_apparatus == true) {
- console.log('3333')
- this.form.perfusion_apparatus = 1
- }
- if (this.perfusion_apparatus == false) {
- this.form.perfusion_apparatus = 2
- }
- if (this.prescription_status == true) {
- this.form.prescription_status = 1
- }
- if (this.prescription_status == false) {
- this.form.prescription_status = 2
- }
- if (this.week == true) {
- this.form.week = 1
- }
- if (this.week == false) {
- this.form.week = 2
- }
- if (this.name == true) {
- this.form.name = 1
- }
- if (this.name == false) {
- this.form.name = 2
- }
- if (this.zone_name == true) {
- this.form.zone = 1
- }
- if (this.zone_name == false) {
- this.form.zone = 2
- }
- if (this.classes == true) {
- this.form.classes = 1
- }
- if (this.classes == false) {
- this.form.classes = 2
- }
- if (this.number == true) {
- this.form.number = 1
- }
- if (this.number == false) {
- this.form.number = 2
- }
- if (this.mode == true) {
- this.form.mode = 1
- }
- if (this.mode == false) {
- this.form.mode = 2
- }
- if (this.dialyzers == true) {
- this.form.dialyzers = 1
- }
- if (this.dialyzers == false) {
- this.form.dialyzers = 2
- }
-
- if (this.anticoagulant == true) {
- this.form.anticoagulant = 1
- }
- if (this.anticoagulant == false) {
- this.form.anticoagulant = 2
- }
- if (this.anticoagulant_zongliang == true) {
- this.form.anticoagulant_zongliang = 1
- }
- if (this.anticoagulant_zongliang == false) {
- this.form.anticoagulant_zongliang = 2
- }
- if (this.doctor_advice == true) {
- this.form.doctor_advice = 1
- }
- if (this.doctor_advice == false) {
- this.form.doctor_advice = 2
- }
- console.log('555555555', this.form.prescription_status)
- var params = {
- id: this.form.id,
- prescription_status: this.form.prescription_status,
- week: this.form.week,
- name: this.form.name,
- zone: this.form.zone,
- classes: this.form.classes,
- number: this.form.number,
- mode: this.form.mode,
- dialyzers: this.form.dialyzers,
- perfusion_apparatus: this.form.perfusion_apparatus,
- anticoagulant: this.form.anticoagulant,
- anticoagulant_zongliang: this.form.anticoagulant_zongliang,
- doctor_advice: this.form.doctor_advice
- }
- console.log('params', params)
- saveRemindPrint(params).then(response => {
- if (response.data.state == 1) {
- var settting = response.data.data.setting
- this.$message.success('保存成功')
- this.dialogVisible = false
- this.getlist()
- }
- })
- }
- ,
- getlist() {
- getRemindPrintList().then(response => {
- if (response.data.state == 1) {
- var list = response.data.data.list
- console.log('list222332', list)
- if (list.anticoagulant == 1) {
- console.log('进来22222')
- this.anticoagulant = true
- }
- if (list.anticoagulant == 2) {
- this.anticoagulant = false
- }
- if (list.anticoagulant_zongliang == 1) {
- this.anticoagulant_zongliang = true
- }
- if (list.anticoagulant_zongliang == 2) {
- this.anticoagulant_zongliang = false
- }
- if (list.classes == 1) {
- this.classes = true
- }
- if (list.classes == 2) {
- this.classes = false
- }
- if (list.dialyzers == 1) {
- this.dialyzers = true
- }
- if (list.dialyzers == 2) {
- this.dialyzers = false
- }
- if (list.doctor_advice == 1) {
- this.doctor_advice = true
- }
- if (list.doctor_advice == 2) {
- this.doctor_advice = false
- }
- if (list.name == 1) {
- this.name = true
- }
- if (list.name == 2) {
- this.name = false
- }
- if (list.number == 1) {
- this.number = true
- }
- if (list.number == 2) {
- this.number = false
- }
- if (list.perfusion_apparatus == 1) {
- this.perfusion_apparatus = true
- }
- if (list.perfusion_apparatus == 2) {
- this.perfusion_apparatus = false
- }
- if (list.prescription_status == 1) {
- this.prescription_status = true
- }
- if (list.prescription_status == 2) {
- this.prescription_status = false
- }
- if (list.week == 1) {
- this.week = true
- }
- if (list.week == 2) {
- this.week = false
- }
- if (list.zone == 1) {
- this.zone_name = true
- }
- if (list.zone == 2) {
- this.zone_name = false
- }
- if (list.mode == 1) {
- this.mode = true
- }
- if (list.mode == 2) {
- this.mode = false
- }
- this.form.id = list.id
- }
- })
- }
- ,
- getAllZoneList() {
- getAllZoneList().then(response => {
- if (response.data.state == 1) {
- var zonelist = response.data.data.zoneList
- this.zoneList.push(...zonelist)
- this.getScheduleList()
- }
- })
- }
- ,
- getDialysisDialyszerPerfusion(patient_id) {
- var name = ''
- for (let i = 0; i < this.scheduleData.length; i++) {
- if (patient_id == this.scheduleData[i].patient_id) {
- // var arrLength = this.scheduleData[i].dialysissolution.length
- // if (arrLength > 0) {
- name = this.scheduleData[i].dialysissolution.dialysis_dialyszers
- // }
- }
- }
- return name
- }
- ,
- getDialysisDialyszerPerfusionOne(patient_id) {
- var name = ''
- for (let i = 0; i < this.scheduleData.length; i++) {
- if (patient_id == this.scheduleData[i].patient_id) {
- // var arrLength = this.scheduleData[i].dialysissolution
- // console.log('病人ID', patient_id, '数组', this.scheduleData[i].dialysissolution)
- // if (arrLength > 0) {
- name = this.scheduleData[i].dialysissolution.dialyzer_perfusion_apparatus
- // }
- }
- }
- console.log('name', name)
- return name
- },
- changeZone(val){
- this.zone = val
- this.getScheduleList()
- }
- },
- components: {
- WeekItem
- }
- ,
- created() {
- this.getAllZoneList()
- this.modeOptions = this.$store.getters.treatment_mode
- this.anticoagulants_confit = this.$store.getters.anticoagulants_confit
- this.week_type = new Date().getDay()
- if (this.week_type == 0) {
- this.week_type = 7
- }
- this.org_id = this.$store.getters.xt_user.org.id
-
-
- }
- }
- </script>
-
- <style rel="stylesheet/css" lang="scss">
- .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;
- }
- </style>
|