12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141 |
- <template>
- <div class="page_consumables">
- <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>
-
- <label class="title"><span class="name">日期查询</span> : </label>
- <el-date-picker size="small" v-model="selected_date" prefix-icon="el-icon-date" @change="handleScheduleDateChange"
- :editable="false" :clearable="false" style="width: 196px;margin-right:10px;" type="date"
- format="yyyy-MM-dd"
- value-format="yyyy-MM-dd"
- placeholder="选择日期时间" align="right"
- :picker-options="pickerOptions"></el-date-picker>
- <el-input size="small" style="width: 180px;" @keyup.enter.native='searchAction' v-model.trim="search_input"
- class="filter-item" v-model="query.keywords"/>
- <el-button size="small" class="filter-item" type="primary" icon="el-icon-search" @click="search">搜索</el-button>
- </div>
- <div class="cell clearfix" style="justify-content: space-between;">
- <div style="display:flex;">
- <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>
- <el-button size="small" icon="el-icon-printer" @click="toSett" type="primary" v-if="his_config.is_open == 1">设置</el-button>
- <!-- <el-button size="small" icon="el-icon-printer" @click="toClick" type="primary">脚本</el-button>-->
- <el-button size="small" icon="el-icon-printer" @click="toPrint" type="primary">打印</el-button>
- <el-button size="small" @click="exportListOne" type="primary" v-if="his_config.is_open == 1">导出</el-button>
- <el-button size="small" @click="exportList" type="primary" v-if="his_config.is_open != 1">导出</el-button>
- <el-button size="small" type="primary" v-if="his_config.is_open != 1" @click="statistics">统计表</el-button>
- <el-button size="small" type="primary" v-if="his_config.is_open == 1" @click="toStatistics">统计表</el-button>
- </div>
- </div>
-
- <div v-if="his_config.is_open != 1">
- <el-table
- @selection-change="handleSelectionChange"
- :data="list"
- border
- :row-style="{ color: '#303133' }"
- :header-cell-style="{
- backgroundColor: 'rgb(245, 247, 250)',
- color: '#606266'
- }"
- >
- <el-table-column
- align="center"
- type="selection"
- width="55">
- </el-table-column>
- <el-table-column align="center" width="55" label="序号">
- <template slot-scope="scope">
- {{scope.$index + 1}}
- </template>
- </el-table-column>
- <el-table-column align="center" width="100" label="透析机号">
- <template slot-scope="scope">
- {{scope.row.device_number.zone.name}} {{scope.row.device_number.number}}
- </template>
- </el-table-column>
- <el-table-column align="center" width="55" label="姓名">
- <template slot-scope="scope">
- {{scope.row.patient.name}}
- </template>
- </el-table-column>
-
- <el-table-column align="center" width="55" label="透析号">
- <template slot-scope="scope">
- {{scope.row.patient.dialysis_no}}
- </template>
- </el-table-column>
-
- <el-table-column
- align="center"
- prop="name"
- v-for="(item,index) in rowList"
- :key="item.id"
- :label="item.filed_name_cn"
- >
- <template slot-scope="scope">
- {{getName(scope.row.rowList[index].filed_name_cn,scope.row.dialysis_solution)}}
- </template>
-
- </el-table-column>
-
- <el-table-column align="center" width="100" label="备注">
- <template slot-scope="scope">
- {{scope.row.dialysis_solution.remark}}
- </template>
- </el-table-column>
-
- </el-table>
-
- <el-pagination
- @size-change="handleSizeChange"
- @current-change="handleCurrentChange"
- :page-sizes="[10, 50, 100]"
- :page-size="10"
- background
- align="right"
- style="margin-top:20px;"
- layout="total, sizes, prev, pager, next, jumper"
- :total="total"
- >
- </el-pagination>
- </div>
-
- <div v-if="his_config.is_open == 1">
- <el-table
- @selection-change="handleSelectionChange"
- :data="list"
- border
- :row-style="{ color: '#303133' }"
- :header-cell-style="{
- backgroundColor: 'rgb(245, 247, 250)',
- color: '#606266'
- }"
- >
- <el-table-column
- align="center"
- type="selection"
- width="55">
- </el-table-column>
- <el-table-column align="center" width="55" label="序号">
- <template slot-scope="scope">
- {{scope.$index + 1}}
- </template>
- </el-table-column>
- <el-table-column align="center" width="100" label="透析机号">
- <template slot-scope="scope">
- {{scope.row.device_number.zone.name}} {{scope.row.device_number.number}}
- </template>
- </el-table-column>
- <el-table-column align="center" width="55" label="姓名">
- <template slot-scope="scope">
- {{scope.row.patient.name}}
- </template>
- </el-table-column>
-
- <el-table-column align="center" width="55" label="透析号">
- <template slot-scope="scope">
- {{scope.row.patient.dialysis_no}}
- </template>
- </el-table-column>
-
- <el-table-column
- align="center"
- prop="name"
- v-for="(item,index) in typeList"
- :key="item.id"
- :label="item.type_name"
- >
- <template slot-scope="scope">
- {{getStr(scope.row.typeList[index].id,scope.row.projectList,scope.row.patient_id)}}
- </template>
-
- </el-table-column>
-
-
-
- </el-table>
-
- <el-pagination
- @size-change="handleSizeChangeOne"
- @current-change="handleCurrentChangeOne"
- :page-sizes="[10, 50, 100]"
- :page-size="10"
- background
- align="right"
- style="margin-top:20px;"
- layout="total, sizes, prev, pager, next, jumper"
- :total="total"
- >
- </el-pagination>
- </div>
-
-
- <el-dialog
- title="耗材统计表"
- :visible.sync="startDialogVisible"
- width="70%">
- <span>
- <div class="cell clearfix">
- <label class="title"> <span class="name">排班班次</span> : </label>
- <el-select v-model="schedule_type" placeholder="请选择" @change="changeScheduleType">
- <el-option
- v-for="item in schedulArr"
- :key="item.value"
- :label="item.label"
- :value="item.value">
- </el-option>
- </el-select>
- <label class="title"> <span class="name">病区选择</span> : </label>
- <el-select v-model="partion_type" placeholder="请选择" multiple @change="changePartionType" >
- <el-option
- v-for="item in partitionArr"
- :key="item.id"
- :label="item.name"
- :value="item.id">
- </el-option>
- </el-select>
-
- <el-button size="small" icon="el-icon-printer" @click="toPrintOne" type="primary">打印</el-button>
- <el-button size="small" @click="toExportListOne" type="primary">导出</el-button>
- </div>
- <el-table
- :data="tableList"
- border
- :row-style="{ color: '#303133' }"
- :header-cell-style="{
- backgroundColor: 'rgb(245, 247, 250)',
- color: '#606266'
- }"
- >
- <el-table-column align="center" label="序号">
- <template slot-scope="scope">
- {{scope.$index+1}}
- </template>
- </el-table-column>
- <el-table-column align="center" label="耗材名称">
- <template slot-scope="scope">
- {{scope.row.name}}
- </template>
- </el-table-column>
- <el-table-column align="center" label="规格">
- <template slot-scope="scope">
- {{scope.row.specification_name}}
- </template>
- </el-table-column>
-
- <el-table-column align="center" label="数量">
- <template slot-scope="scope">
- {{scope.row.count}}
- </template>
- </el-table-column>
-
-
-
- </el-table>
- </span>
- <span slot="footer" class="dialog-footer">
- <el-button @click="startDialogVisible = false">取 消</el-button>
- <el-button type="primary" @click="startDialogVisible = false">确 定</el-button>
- </span>
- </el-dialog>
-
-
- <el-dialog
- title="设置"
- :visible.sync="startDialogVisibleOne"
- width="60%">
- <span>
- <div v-for="(item,index) in goodTypeList" :key="index">
- <span v-if="index == 0"><el-checkbox v-model="checkedOne" >{{item.type_name}}</el-checkbox></span>
- <span v-if="index == 1"><el-checkbox v-model="checkedTwo" >{{item.type_name}}</el-checkbox></span>
- <span v-if="index == 2"><el-checkbox v-model="checkedThree" >{{item.type_name}}</el-checkbox></span>
- <span v-if="index == 3"><el-checkbox v-model="checkedFour" >{{item.type_name}}</el-checkbox></span>
- <span v-if="index == 4"><el-checkbox v-model="checkedFive" >{{item.type_name}}</el-checkbox></span>
- <span v-if="index == 5"><el-checkbox v-model="checkedSix" >{{item.type_name}}</el-checkbox></span>
- <span v-if="index == 6"><el-checkbox v-model="checkedSeven" >{{item.type_name}}</el-checkbox></span>
- <span v-if="index == 7"><el-checkbox v-model="checkedEnight" >{{item.type_name}}</el-checkbox></span>
- <span v-if="index == 8"><el-checkbox v-model="checkedNight" >{{item.type_name}}</el-checkbox></span>
- <span v-if="index == 9"><el-checkbox v-model="checkedTen" >{{item.type_name}}</el-checkbox></span>
- <span v-if="index == 10"><el-checkbox v-model="checkedEleven">{{item.type_name}}</el-checkbox></span>
- <span v-if="index == 11"><el-checkbox v-model="checkedTwenty">{{item.type_name}}</el-checkbox></span>
- <span v-if="index == 12"><el-checkbox v-model="checkedTwentyOne">{{item.type_name}}</el-checkbox></span>
- <span v-if="index == 13"><el-checkbox v-model="checkedTwentyTwo">{{item.type_name}}</el-checkbox></span>
- <span v-if="index == 14"><el-checkbox v-model="checkedTwentyThree">{{item.type_name}}</el-checkbox></span>
- <span v-if="index == 15"><el-checkbox v-model="checkedTwentyFour">{{item.type_name}}</el-checkbox></span>
- <span v-if="index == 16"><el-checkbox v-model="checkedTwentyFive">{{item.type_name}}</el-checkbox></span>
- <span v-if="index == 17"><el-checkbox v-model="checkedTwentySix">{{item.type_name}}</el-checkbox></span>
- <span v-if="index == 18"><el-checkbox v-model="checkedTwentySeven">{{item.type_name}}</el-checkbox></span>
- <span v-if="index == 19"><el-checkbox v-model="checkedTwentyEight">{{item.type_name}}</el-checkbox></span>
- <span v-if="index == 20"><el-checkbox v-model="checkedTwentyNight">{{item.type_name}}</el-checkbox></span>
- </div>
-
- </span>
- <span slot="footer" class="dialog-footer">
- <el-button @click="startDialogVisibleOne = false">取 消</el-button>
- <el-button type="primary" @click="saveHisDialysis">确 定</el-button>
- </span>
- </el-dialog>
-
-
-
- <el-dialog
- title="耗材统计表"
- :visible.sync="startHisDialogVisible"
- width="70%">
- <span>
- <div class="cell clearfix">
- <label class="title"> <span class="name">排班班次</span> : </label>
- <el-select v-model="schedule_type" placeholder="请选择" @change="changeScheduleType">
- <el-option
- v-for="item in schedulArr"
- :key="item.value"
- :label="item.label"
- :value="item.value">
- </el-option>
- </el-select>
- <label class="title"> <span class="name">病区选择</span> : </label>
- <el-select v-model="partion_type" placeholder="请选择" multiple @change="changePartionType">
- <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="toHisPrint" type="primary">打印</el-button>
- <el-button size="small" @click="toExportListTwo" type="primary">导出</el-button>
- </div>
- <el-table
- :data="tableList"
- border
- :row-style="{ color: '#303133' }"
- :header-cell-style="{
- backgroundColor: 'rgb(245, 247, 250)',
- color: '#606266'
- }"
- >
- <el-table-column align="center" label="序号">
- <template slot-scope="scope">
- {{scope.$index+1}}
- </template>
- </el-table-column>
- <el-table-column align="center" label="耗材名称">
- <template slot-scope="scope">
- {{scope.row.good_name}}
- </template>
- </el-table-column>
- <el-table-column align="center" label="规格">
- <template slot-scope="scope">
- {{scope.row.specification_name}}
- </template>
- </el-table-column>
-
- <el-table-column align="center" label="数量">
- <template slot-scope="scope">
- {{scope.row.count}}
- </template>
- </el-table-column>
-
-
-
- </el-table>
- </span>
- <span slot="footer" class="dialog-footer">
- <el-button @click="startHisDialogVisible = false">取 消</el-button>
- <el-button type="primary" @click="startHisDialogVisible = false">确 定</el-button>
- </span>
- </el-dialog>
-
- </div>
- </template>
-
-
- <script>
- import { GetAllZone,getPatientDialysisSolutionGroupList,getDialysisGoodTotalCount,saveHisDialysis,getHisDialysisGoodCount,getSolutionlistByOrgId } from '@/api/dialysis'
- import {GetAllGoodType} from '@/api/stock'
- import { uParseTime } from "@/utils/tools";
- import { getDataConfig } from '@/utils/data'
- export default {
- components: {
-
- },
- data() {
- return {
- query:{
- total:"",
- schedule_date:"",
- schedule_type:0,
- partition_id:0,
- page:1,
- limit:10,
- keywords:"",
- good_type:0,
- ids:""
- },
- schedulType: 0,
- schedulArr: [
- { value: 0, label: '全部' },
- { value: 1, label: '上午' },
- { value: 2, label: '下午' },
- { value: 3, label: '晚上' }
- ],
- selected_date: "",
- partitionArr: [],
- goodList:[
- { id: 0, name: '全部' },
- { id: 1, name: '已出库' },
- { id: 2, name: '未出库' },
- ],
- partitionType: 0,
- goodType:0,
- tableData: [{
- date: '2016-05-03',
- name: '王小虎',
- address: '上海市普陀区金沙江路 1518 弄'
- }
- ],
- search_input: '',
- searchAction: '',
- allGoodInfo:[],
- list:[],
- new_list:[],
-
- good_types: [],
- arrKey:[],
- arrList:[],
- total:0,
- pickerOptions:{ //禁用当前日期之前的日期
- disabledDate(v) {
- //Date.now()是javascript中的内置函数,它返回自1970年1月1日00:00:00 UTC以来经过的毫秒数。
- return v.getTime() < new Date().getTime() - 86400000;
- },
- },
- rowList:[],
- dialysate_formulation:[],
- body_fluid_option:[],
- displace_liqui_part_option:[],
- blood_access_option:[],
- hemodialysisPipelinesOptions:[],
- startDialogVisible:false,
- tableList:[],
- schedule_type:0,
- partion_type:0,
- goodTypeList:[],
- his_config:{},
- startDialogVisibleOne:false,
- type_name:false,
- checkedOne:false,
- checkedTwo:false,
- checkedThree:false,
- checkedFour:false,
- checkedFive:false,
- checkedSix:false,
- checkedSeven:false,
- checkedEnight:false,
- checkedNight:false,
- checkedTen:false,
- checkedEleven:false,
- checkedTwenty:false,
- checkedTwentyOne:false,
- checkedTwentyTwo:false,
- checkedTwentyThree:false,
- checkedTwentyFour:false,
- checkedTwentyFive:false,
- checkedTwentySix:false,
- checkedTwentySeven:false,
- checkedTwentyEight:false,
- checkedTwentyNight:false,
- startHisDialogVisible:false,
- typeList:[],
- ids:"",
- org_id:0,
- zoneIdList:[],
- pationType_str:"",
- }
- },
- created() {
- this.org_id = this.$store.getters.xt_user.org.id
- let date = uParseTime(new Date(), "{y}-{m}-{d}")
- var newDate = new Date();
- var y = newDate.getFullYear();
- var m = newDate.getMonth() + 1;
- var d = newDate.getDate();
- var schedule_date =
- y + "-" + (m < 10 ? "0" + m : m) + "-" + (d < 10 ? "0" + d : d);
-
- this.selected_date = date
- this.query.schedule_date = schedule_date
- this.query.schedule_type = 0
- this.query.partition_id = 0
- this.query.page = 1
- this.query.ids = this.ids
- this.getAllZone()
- this.dialysate_formulation = getDataConfig(
- 'hemodialysis',
- 'dialysate_formulation'
- )
- this.body_fluid_option = this.$store.getters.body_fluid
- this.displace_liqui_part_option = this.$store.getters.displace_liqui
- this.blood_access_option = this.$store.getters.blood_access
- this.blood_access_option = getDataConfig('hemodialysis', 'vascular_access_desc')
- this.hemodialysisPipelinesOptions = getDataConfig('hemodialysis', 'hemodialysis_pipelines')
- var filedList = this.$store.getters.xt_user.fileds
- for (let i = 0; i < filedList.length; i++) {
- if ( filedList[i].module == 1 && filedList[i].is_show == 1 && (filedList[i].filed_name_cn == '透析器/灌流器' || filedList[i].filed_name_cn == '透析器' || filedList[i].filed_name_cn == '灌流器' || filedList[i].filed_name_cn == '钾' || filedList[i].filed_name_cn == '钠' || filedList[i].filed_name_cn == '钙' || filedList[i].filed_name_cn == '葡萄糖' || filedList[i].filed_name_cn == '穿刺针' || filedList[i].filed_name_cn == '滤过器')) {
- this.rowList.push(filedList[i])
- }
- }
- this.getlist()
- },
- methods: {
-
- exportList(){
- import('@/vendor/Export2Excel').then(excel => {
-
- var arr= []
-
- arr.push('序号')
- arr.push('透析机号')
- arr.push('姓名')
- arr.push('透析号')
-
- // console.log("list23322323232",this.rowList)
- if(this.rowList!=null && this.rowList.length > 0){
- for(let i=0;i<this.rowList.length;i++){
- arr.push(this.rowList[i].filed_name_cn)
- }
- }
-
- arr.push("备注")
- // console.log("arr",arr)
-
- var arrTwo = []
- for(let i=0;i<arr.length;i++){
- arrTwo.push('name'+i)
- }
- // console.log("arrTwo",arrTwo)
- const tHeader = arr
- const filterVal = arrTwo
-
- if(this.list!=null && this.list.length > 0){
- for(let i=0;i<this.list.length;i++){
- this.list[i].name0 = i+1
- this.list[i].name1= this.list[i].device_number.zone.name + this.list[i].device_number.number
- this.list[i].name2 = this.list[i].patient.name
- this.list[i].name3 = this.list[i].patient.dialysis_no
- if(this.rowList!=null && this.rowList.length > 0){
- for(let j=0;j<this.rowList.length;j++){
- this.list[i]['name'+(j+4)] = this.getName(this.list[i].rowList[j].filed_name_cn,this.list[i].dialysis_solution)
- this.list[i]['name'+(this.rowList.length+4)] = this.list[i].dialysis_solution.remark
- }
- }
-
- }
- }
- // console.log("list32232232323wi",this.list)
- const data = this.formatJson(filterVal, this.list)
- excel.export_json_to_excel({
- header: tHeader,
- data,
- filename: '透析耗材查询'
- })
- this.downloadLoading = false
- })
- },
- exportListOne(){
- import('@/vendor/Export2Excel').then(excel => {
-
- var arr= []
-
- arr.push('序号')
- arr.push('透析机号')
- arr.push('姓名')
- arr.push('透析号')
-
- // console.log("list23322323232",this.typeList)
- if(this.typeList!=null && this.typeList.length > 0){
- for(let i=0;i<this.typeList.length;i++){
- arr.push(this.typeList[i].type_name)
- }
- }
- // console.log("arr",arr)
-
- var arrTwo = []
- for(let i=0;i<arr.length;i++){
- arrTwo.push('name'+i)
- }
- // console.log("arrTwo",arrTwo)
- const tHeader = arr
- const filterVal = arrTwo
- console.log("list23323223wo",this.list)
- if(this.list!=null && this.list.length > 0){
- for(let i=0;i<this.list.length;i++){
- this.list[i].name0 = i+1
- this.list[i].name1= this.list[i].device_number.zone.name + this.list[i].device_number.number
- this.list[i].name2 = this.list[i].patient.name
- this.list[i].name3 = this.list[i].patient.dialysis_no
- if(this.typeList!=null && this.typeList.length > 0){
- for(let j=0;j<this.typeList.length;j++){
- this.list[i]['name'+(j+4)] = this.getStr(this.list[i].typeList[j].id,this.list[i].projectList,this.list[i].patient_id)
- }
- }
-
- }
- }
-
- console.log("list32232232323wi",this.list)
-
- const data = this.formatJson(filterVal, this.list)
- excel.export_json_to_excel({
- header: tHeader,
- data,
- filename: '透析耗材查询'
- })
- this.downloadLoading = false
- })
- },
- formatJson(filterVal, jsonData) {
- return jsonData.map(v => filterVal.map(j => v[j]));
- },
- createKeys(arr){
- const obj = {};
- arr.forEach((value,index)=>{
- obj['name' + index] = value;
- })
- return obj;
- },
- open(){
- this.rowList = []
- var filedList = this.$store.getters.xt_user.fileds
- for (let i = 0; i < filedList.length; i++) {
- if ( filedList[i].module == 1 && filedList[i].is_show == 1 && (filedList[i].filed_name_cn == '透析器/灌流器' || filedList[i].filed_name_cn == '透析器' || filedList[i].filed_name_cn == '灌流器' || filedList[i].filed_name_cn == '钾' || filedList[i].filed_name_cn == '钠' || filedList[i].filed_name_cn == '钙' || filedList[i].filed_name_cn == '葡萄糖' || filedList[i].filed_name_cn == '穿刺针')) {
- this.rowList.push(filedList[i])
- }
- }
- this.getlist()
- },
- getlist(){
- getPatientDialysisSolutionGroupList(this.query).then(response=>{
- if(response.data.state == 1){
- var list = response.data.data.list
-
- var total = response.data.data.total
- this.total = total
- var goodType = response.data.data.goodType
- var config = response.data.data.config
- this.his_config = config
-
- if(config.is_open !=1){
- if(list!=null){
- for(let i=0;i<list.length;i++){
- list[i].rowList = []
- list[i].rowList = this.rowList
- }
- }
- this.list= []
- this.list = list
- }
- if(config.is_open == 1){
- if(list!=null){
- this.typeList= []
- for(let i=0;i<goodType.length;i++){
- if(goodType[i].is_open == 1){
- this.typeList.push(goodType[i])
- }
- }
- for(let i=0;i<list.length;i++){
- list[i].projectList = []
- list[i].typeList = []
- list[i].typeList = this.typeList
- }
-
- for(let i=0;i<list.length;i++){
- if(list[i].his_prescription_template.his_prescription_info!=null && list[i].his_prescription_template.his_prescription_info.length >0){
- for(let j=0;j<list[i].his_prescription_template.his_prescription_info.length;j++){
- for(let z=0;z<list[i].his_prescription_template.his_prescription_info[j].project.length;z++){
- list[i].projectList.push(list[i].his_prescription_template.his_prescription_info[j].project[z])
- }
- }
- }
-
- }
- this.list = list
- }
- }
- }
- })
- },
- handleSizeChangeOne(val) {
- this.query.limit = val;
- this.getlist();
- },
- handleCurrentChangeOne(val) {
- this.query.page = val;
- this.getlist();
- },
- handleSizeChange(val) {
- this.query.limit = val;
- this.getlist();
- },
- handleCurrentChange(val) {
- this.query.page = val;
- this.getlist();
- },
-
- calCount(query_warehouseout_info) {
- let total = 0
- var array = []
- array = query_warehouseout_info
- for (let i = 0; i < array.length; i++) {
- total = total + array[i].count
- }
- return total
-
- },
- getGoodUserInfo(good_type_id,good_user,last_good_user) {
- var arrlist =[]
- if (good_user != null && good_user.length > 0) {
- let desc = ""
- for (let b = 0; b < good_user.length; b++){
- if(good_type_id == good_user[b].good_type_id)
- desc = desc + "\n" + good_user[b].info.specification_name +"*" +good_user[b].count
- }
- arrlist.push(desc)
- return desc
- }
- return ""
- },
-
- selectSchedulType(scheduleType) {
- this.schedulType = scheduleType
- this.query.schedule_type = scheduleType
- this.query.page = 1
- this.getlist()
- },
- selectPartitionType(partitionType) {
- this.partitionType = partitionType
- this.query.partition_id = partitionType
- this.query.page = 1
- this.getlist()
- },
- selectGoodType(goodType){
- this.goodType = goodType
- this.query.good_type = goodType
- this.getlist()
- },
- getAllZone: function() {
- GetAllZone().then(response => {
- if (response.data.state == 0) {
- this.$message.error(response.data.msg)
- return false
- } else {
- this.partitionArr = response.data.data.zone
- for(let i=0;i<this.partitionArr.length;i++){
- this.zoneIdList.push(this.partitionArr[i].id)
- }
- // this.partitionArr.unshift({ id: 0, name: '全部' })
- }
- })
- },
- statistics() {
- this.tableList = []
-
- var arr = this.zoneIdList.join(",")
- var str = ""
- if(this.partion_type == 0){
- str = arr
- }
- if(this.partion_type != 0){
- str = this.partion_type.join(',')
- }
- this.pationType_str = ""
- this.pationType_str = str
- console.log("str-==-------",str)
- var params = {
- schedule_type:this.schedule_type,
- partion_type:str,
- selected_date:this.query.schedule_date,
- }
-
- getDialysisGoodTotalCount(params).then(response=>{
- if(response.data.state == 1){
- this.startDialogVisible = true
- var list = response.data.data.list
- var kaliumCount = 0
- var sodiumCount = 0
- var calciumCount = 0
- var glucoseCount = 0
- var kaliumArr = []
- var sodiumArr = []
- var calciumArr = []
- var glucoseArr = []
- console.log("rowlist233223323223w",this.rowList)
- if(list!=null && list.length>0){
- for(let i=0;i<list.length;i++){
- list[i].dialysis_dialyszers_arr = []
- list[i].dialyzer_perfusion_apparatus_arr = []
- list[i].dialysis_irrigation_arr = []
- list[i].puncture_needle_arr = []
- list[i].dialysis_strainer_arr = []
-
- if(list[i].dialysis_solution.dialysis_dialyszers!=""){
- list[i].dialysis_dialyszers_arr = list[i].dialysis_solution.dialysis_dialyszers.split(",")
- }
- if(list[i].dialysis_solution.dialyzer_perfusion_apparatus!=""){
- list[i].dialyzer_perfusion_apparatus_arr = list[i].dialysis_solution.dialyzer_perfusion_apparatus.split(",")
- }
- if(list[i].dialysis_solution.dialysis_irrigation!=""){
- list[i].dialysis_irrigation_arr = list[i].dialysis_solution.dialysis_irrigation.split(",")
- }
- if(list[i].dialysis_solution.dialysis_strainer!=""){
- list[i].dialysis_strainer_arr = list[i].dialysis_solution.dialysis_strainer.split(",")
- }
- if(list[i].dialysis_solution.puncture_needle!="" ){
- list[i].puncture_needle_arr = list[i].dialysis_solution.puncture_needle.split(",")
- }
- kaliumCount += parseInt(list[i].dialysis_solution.kalium)
- sodiumCount += parseInt(list[i].dialysis_solution.sodium)
- calciumCount +=parseInt(list[i].dialysis_solution.calcium)
- glucoseCount += parseInt(list[i].dialysis_solution.glucose)
-
- if(list[i].dialysis_solution!=null &&list[i].dialysis_solution.kalium > 0){
- list[i].dialysis_solution.specification = "钾" + list[i].dialysis_solution.kalium
- kaliumArr.push(list[i].dialysis_solution)
- }
-
- if(list[i].dialysis_solution!=null&&list[i].dialysis_solution.sodium > 0){
- list[i].dialysis_solution.specification_one = "钠" + list[i].dialysis_solution.sodium
- sodiumArr.push(list[i].dialysis_solution)
- }
-
- if(list[i].dialysis_solution!=null&&list[i].dialysis_solution.calcium > 0){
- list[i].dialysis_solution.specification_two = "钙" + list[i].dialysis_solution.calcium
- calciumArr.push(list[i].dialysis_solution)
- }
-
- if(list[i].dialysis_solution!=null&&list[i].dialysis_solution.amylaceum !=0){
- list[i].dialysis_solution.specification_three = "葡萄糖" + list[i].dialysis_solution.amylaceum
- glucoseArr.push(list[i].dialysis_solution)
- }
-
-
- }
- }
-
- console.log("glucoseArr",glucoseArr)
- if(kaliumArr!=null && kaliumArr.length > 0){
- let dataInfo = {}
- kaliumArr.forEach((item, index) => {
- let { specification } = item
- if (!dataInfo[specification]) {
- dataInfo[specification] = {
- name:"钾(mmol/L)",
- specification:item.specification,
- specification_name:item.kalium,
- child: [],
- count:0,
- }
- }
- })
- let newArr = Object.values(dataInfo)
-
-
- for(let i=0;i<kaliumArr.length;i++){
- for(let j=0;j<newArr.length;j++){
- if(kaliumArr[i].specification == newArr[j].specification){
- newArr[j].child.push(kaliumArr[i])
- }
- }
- }
-
- for(let i=0;i<newArr.length;i++){
- newArr[i].count = newArr[i].child.length
- }
-
- console.log("newArr",newArr)
- for(let i=0;i<newArr.length;i++){
- this.tableList.push(newArr[i])
- }
-
- }
-
-
- if(sodiumArr!=null && sodiumArr.length > 0){
- let dataInfo = {}
- sodiumArr.forEach((item, index) => {
- let { specification_one } = item
- if (!dataInfo[specification_one]) {
- dataInfo[specification_one] = {
- name:"钠(mmol/L)",
- specification_one:item.specification_one,
- specification_name:item.sodium,
- child: [],
- count:0,
- }
- }
- })
- let newArr = Object.values(dataInfo)
-
-
- for(let i=0;i<sodiumArr.length;i++){
- for(let j=0;j<newArr.length;j++){
- if(sodiumArr[i].specification_one == newArr[j].specification_one){
- newArr[j].child.push(sodiumArr[i])
- }
- }
- }
-
- for(let i=0;i<newArr.length;i++){
- newArr[i].count += newArr[i].child.length
-
- }
-
- console.log("newArr",newArr)
- for(let i=0;i<newArr.length;i++){
- this.tableList.push(newArr[i])
- }
- }
-
-
- if(calciumArr!=null && calciumArr.length > 0){
- let dataInfo = {}
- calciumArr.forEach((item, index) => {
- let { specification_two } = item
- if (!dataInfo[specification_two]) {
- dataInfo[specification_two] = {
- name:"钠(mmol/L)",
- specification_two:item.specification_two,
- specification_name:item.calcium,
- child: [],
- count:0,
- }
- }
- })
- let newArr = Object.values(dataInfo)
-
-
- for(let i=0;i<calciumArr.length;i++){
- for(let j=0;j<newArr.length;j++){
- if(calciumArr[i].specification_two == newArr[j].specification_two){
- newArr[j].child.push(calciumArr[i])
- }
- }
- }
-
- for(let i=0;i<newArr.length;i++){
- newArr[i].count = newArr[i].child.length
-
- }
-
- console.log("newArr",newArr)
- for(let i=0;i<newArr.length;i++){
- this.tableList.push(newArr[i])
- }
- }
-
-
-
- if(glucoseArr!=null && glucoseArr.length > 0){
- let dataInfo = {}
- glucoseArr.forEach((item, index) => {
- let { specification_three } = item
- if (!dataInfo[specification_three]) {
- dataInfo[specification_three] = {
- name:"葡萄糖",
- specification_three:item.specification_three,
- specification_name:item.amylaceum,
- child: [],
- count:0,
- }
- }
- })
- let newArr = Object.values(dataInfo)
-
-
- for(let i=0;i<glucoseArr.length;i++){
- for(let j=0;j<newArr.length;j++){
- if(glucoseArr[i].specification_three == newArr[j].specification_three){
- newArr[j].child.push(glucoseArr[i])
- }
- }
- }
-
- for(let i=0;i<newArr.length;i++){
- newArr[i].count += newArr[i].child.length
-
- }
-
- console.log("newArr",newArr)
- for(let i=0;i<newArr.length;i++){
- this.tableList.push(newArr[i])
- }
- }
-
- var dialysisDialyszersArr = []
- var dialyzerPerfusionApparaArr = []
- var dialysisIrrigationArr = []
- var dialysisStrainerArr = []
- var punctureNeedleArr = []
-
-
- for(let i=0;i<list.length;i++){
- for(let j=0;j<list[i].dialysis_dialyszers_arr.length;j++){
-
- dialysisDialyszersArr.push(list[i].dialysis_dialyszers_arr[j])
- }
- for(let z=0;z<list[i].dialyzer_perfusion_apparatus_arr.length;z++){
- dialyzerPerfusionApparaArr.push(list[i].dialyzer_perfusion_apparatus_arr[z])
- }
- for(let y=0;y<list[i].dialysis_irrigation_arr.length;y++){
- dialysisIrrigationArr.push(list[i].dialysis_irrigation_arr[y])
- }
- for(let h=0;h<list[i].puncture_needle_arr.length;h++){
- punctureNeedleArr.push(list[i].puncture_needle_arr[h])
- }
- for(let w=0;w<list[i].dialysis_strainer_arr.length;w++){
- dialysisStrainerArr.push(list[i].dialysis_strainer_arr[w])
- }
- }
- let obj = {}
- let objOne = {}
- let objTwo = {}
- let objThree = {}
- let objFour = {}
- for(let i = 0 ; i < dialysisDialyszersArr.length; i++){
- if(obj[dialysisDialyszersArr[i]]){
- obj[dialysisDialyszersArr[i]] +=1
- }else{
- obj[dialysisDialyszersArr[i]] = 1
- }
- }
- let Arr = [];
- for (let i in obj) {
- let a = {};
- a[i] = obj[i];
- a.name = "透析器"
- a.count = obj[i]
- a.specification_name = i
- Arr.push(a);
- }
-
- for(let i=0;i<dialyzerPerfusionApparaArr.length;i++){
- if(objOne[dialyzerPerfusionApparaArr[i]]){
- objOne[dialyzerPerfusionApparaArr[i]] +=1
- }else{
- objOne[dialyzerPerfusionApparaArr[i]] = 1
- }
- }
-
- for (let i in objOne) {
- let a = {};
- a[i] = objOne[i];
- a.name = "透析器/灌流器"
- a.count = objOne[i]
- a.specification_name = i
- Arr.push(a);
- }
-
- for(let i=0;i<dialysisIrrigationArr.length;i++){
- if(objTwo[dialysisIrrigationArr[i]]){
- objTwo[dialysisIrrigationArr[i]] +=1
- }else{
- objTwo[dialysisIrrigationArr[i]] = 1
- }
- }
-
- for (let i in objTwo) {
- let a = {};
- a[i] = objTwo[i];
- a.name = "灌流器"
- a.count = objTwo[i]
- a.specification_name = i
- Arr.push(a);
- }
-
- for(let i = 0 ; i < punctureNeedleArr.length; i++){
- if(objThree[punctureNeedleArr[i]]){
- objThree[punctureNeedleArr[i]] +=1
- }else{
- objThree[punctureNeedleArr[i]] = 1
- }
- }
- for (let i in objThree) {
- let a = {};
- a[i] = objThree[i];
- a.name = "穿刺针"
- a.count = objThree[i]
- a.specification_name = i
- Arr.push(a);
- }
-
-
-
- for(let i=0;i<dialysisStrainerArr.length;i++){
- if(objFour[dialysisStrainerArr[i]]){
- objFour[dialysisStrainerArr[i]] +=1
- }else{
- objFour[dialysisStrainerArr[i]] = 1
- }
- }
-
- for (let i in objFour) {
- let a = {};
- a[i] = objFour[i];
- a.name = "滤过器"
- a.count = objFour[i]
- a.specification_name = i
- Arr.push(a);
- }
-
-
-
-
-
- // var objfive = {name:"钾(mmol/L)",specification_name:"2.0",count:""}
- // var objsix = {name:"钠(mmol/L)",specification_name:"1.25",count:""}
- // var objseven = {name:"钙(mmol/L)",specification_name:"1.5",count:""}
- // var objeight = {name:"葡萄糖(mmol/L)",specification_name:"无糖",count:""}
-
-
- // objfive.count = kaliumCount
- // objsix.count = sodiumCount
- // objseven.count = calciumCount
- // objeight.count = glucoseCount
-
- // this.tableList.push(objfive)
- // this.tableList.push(objsix)
- // this.tableList.push(objseven)
- // this.tableList.push(objeight)
- console.log("arARRRR2323223232=------------",Arr)
- for(let i=0;i<Arr.length;i++){
- for(let j=0;j<this.rowList.length;j++){
- if(Arr[i].name == this.rowList[j].filed_name_cn){
- this.tableList.push(Arr[i])
- }
- }
- }
-
- console.log("tablistlist233323232",this.tableList)
-
- }
- })
-
- },
- toStatistics(){
- this.tableList = []
- var arr = this.zoneIdList.join(",")
- var str = ""
- if(this.partion_type == 0){
- str = arr
- }
- if(this.partion_type != 0){
- str = this.partion_type.join(',')
- }
- this.pationType_str=""
- this.pationType_str = str
- var params = {
- schedule_type:this.schedule_type,
- partion_type:str,
- selected_date:this.query.schedule_date,
- }
- getHisDialysisGoodCount(params).then(response=>{
- if(response.data.state == 1){
- var list = response.data.data.list
- // console.log("list23233223232wode",list)
- this.startHisDialogVisible = true
- var projectList = []
- for(let i=0;i<list.length;i++){
- if(list[i].his_prescription_template.his_prescription_info!=null && list[i].his_prescription_template.his_prescription_info.length>0){
- for(let j=0;j<list[i].his_prescription_template.his_prescription_info.length;j++){
- for(let z=0;z<list[i].his_prescription_template.his_prescription_info[j].project.length;z++){
- projectList.push(list[i].his_prescription_template.his_prescription_info[j].project[z])
- }
- }
- }
- }
- // console.log("projectList",projectList)
-
- if(projectList!=null && projectList.length > 0){
- for(let i=0;i<projectList.length;i++){
- projectList[i].good_id = 0
- projectList[i].good_id = projectList[i].good_info.id
- }
- }
-
- let dataInfo = {}
- projectList.forEach((item, index) => {
- let { good_id } = item
- if (!dataInfo[good_id]) {
- dataInfo[good_id] = {
- good_id:item.good_info.id,
- child: [],
- count:0,
- specification_name:item.good_info.specification_name,
- good_name:item.good_info.good_name
- }
- }
- })
- let newArr = Object.values(dataInfo)
-
- for(let i=0;i<projectList.length;i++){
- for(let j=0;j<newArr.length;j++){
- if(projectList[i].good_id == newArr[j].good_id){
- newArr[j].child.push(projectList[i])
- }
- }
- }
-
- for(let i=0;i<newArr.length;i++){
- for(let j=0;j<newArr[i].child.length;j++){
- newArr[i].count += parseInt(newArr[i].child[j].count)
- }
- }
- console.log("newArr32323233223wo",newArr)
- this.tableList = newArr
- }
- })
- },
- handleScheduleDateChange(val) {
- this.query.schedule_date = val
- this.query.page = 1
- this.getlist()
- },
- search() {
- this.query.page = 1
- this.getlist()
- },
- formatJson(filterVal, jsonData) {
- return jsonData.map(v => filterVal.map(j => v[j]));
- },
- getName(filed_name_cn,val){
- if(filed_name_cn == "透析模式"){
- return this.getModeName(val.mode_id)
- }
- if(filed_name_cn == "血流量"){
- if(val.blood_flow_volume > 0){
- return val.blood_flow_volume
- }else{
- return ""
- }
-
- }
- if(filed_name_cn == "目标超滤量"){
-
- return val.target_ultrafiltration?val.target_ultrafiltration:""
- }
- if(filed_name_cn == "透析液配方"){
- return this.getDialysateFormulation(val.dialysate_formulation)
- }
- if(filed_name_cn == "抗凝剂"){
- return this.getAnticoagulant(val.anticoagulant)
- }
- if(filed_name_cn == "首剂"){
- return val.anticoagulant_shouji?val.anticoagulant_shouji:""
- }
- if(filed_name_cn == "维持"){
- return val.anticoagulant_weichi?val.anticoagulant_weichi:""
- }
- if(filed_name_cn == "总量"){
- return val.anticoagulant_zongliang?val.anticoagulant_zongliang:""
- }
- if(filed_name_cn == "置换量"){
- return val.replacement_total?val.replacement_total:""
- }
- if(filed_name_cn == "钾"){
- return val.kalium?val.kalium:""
- }
- if(filed_name_cn == "钠"){
- return val.sodium?val.sodium:""
- }
- if(filed_name_cn == "钙"){
- return val.calcium?val.calcium:""
- }
- if(filed_name_cn == "碳酸氢盐"){
- return val.bicarbonate?val.bicarbonate:""
- }
- if(filed_name_cn == "透析液流量"){
- return val.dialysate_flow?val.dialysate_flow:""
- }
- if(filed_name_cn == "透析液温度"){
- return val.dialysate_temperature?val.dialysate_temperature:""
- }
- if(filed_name_cn == "电导度"){
- return val.conductivity?val.conductivity:""
- }
- if(filed_name_cn == "透析器/灌流器"){
- return val.dialyzer_perfusion_apparatus
- }
- if(filed_name_cn == "钙名称"){
- return val.anticoagulant_gaimingcheng?val.anticoagulant_gaimingcheng:""
- }
- if(filed_name_cn == "钙剂量"){
- return val.anticoagulant_gaijiliang?val.anticoagulant_gaijiliang:""
- }
- if(filed_name_cn == "体液过多症状"){
- return this.getBodyFluid(val.body_fluid)
- }
- if(filed_name_cn == "透析前使用特殊药物"){
- return val.special_medicine
- }
- if(filed_name_cn == "透析前使用其他特殊药物"){
- return val.special_medicine_other
- }
- if(filed_name_cn == "置换液"){
- return this.getDisplace(val.displace_liqui_part)
- }
- if(filed_name_cn == "血管通路"){
- return this.getBloodAccess(val.blood_access)
- }
- if(filed_name_cn == "体液过多其他症状"){
- return val.body_fluid_other
- }
- if(filed_name_cn == "透析时长"){
- return val.dialysis_duration_hour + "小时" + val.dialysis_duration_minute + "分钟"
- }
- if(filed_name_cn == "置换液总量"){
- return val.displace_liqui_value?val.displace_liqui_value:""
- }
- if(filed_name_cn == "透析器"){
- return val.dialysis_dialyszers
- }
- if(filed_name_cn == "注射器"){
- return ""
- }
- if(filed_name_cn == "抗凝提前停止"){
- return ""
- }
- if(filed_name_cn == "肝素钠"){
- return ""
- }
- if(filed_name_cn == "鱼精蛋白"){
- return ""
- }
- if(filed_name_cn == "下机前推住鱼精蛋白"){
- return ""
- }
- if(filed_name_cn == "无肝素钠备注"){
- return ""
- }
- if(filed_name_cn == "灌流器"){
- return val.dialysis_irrigation
- }
- if(filed_name_cn == "抗凝剂商品名称"){
- return ""
- }
- if(filed_name_cn == "置换速度"){
- return ""
- }
- if(filed_name_cn == "病情"){
- return ""
- }
- if(filed_name_cn == "葡萄糖"){
- return val.amylaceum?val.amylaceum:""
- }
- if(filed_name_cn == "单超时长"){
- return ""
- }
- if(filed_name_cn == "单超脱水"){
- return ""
- }
- if(filed_name_cn == "置换流量"){
- return ""
- }
- if(filed_name_cn == "血浆分离器"){
- return val.plasma_separator?val.plasma_separator:""
- }
- if(filed_name_cn == "透析管路"){
- return this.getHemodialysisPipelines(val.hemodialysis_pipelines)
- }
- if(filed_name_cn == "透析管路支数"){
- return ""
- }
- if(filed_name_cn == "穿刺针"){
- return val.puncture_needle?val.puncture_needle:""
- }
- // if(filed_name_cn == "穿刺针支数"){
- // return val.puncture_needle_count
- // }
- if(filed_name_cn == "促红素"){
- return val.epo_count?val.epo_count:""
- }
- if(filed_name_cn == "促红素支数"){
- return val.epo_count?val.epo_count:""
- }
- if(filed_name_cn == "最大超滤率"){
- return val.max_ultrafiltration_rate?val.max_ultrafiltration_rate:""
- }
-
- if(filed_name_cn == "滤过器"){
- return val.dialysis_strainer?val.dialysis_strainer:""
- }
- },
- getModeName(id){
- var name = ""
- if(id == 1){
- name = "HD"
- }
- if(id == 2){
- name = "HDF"
- }
- if(id == 3){
- name = "HD+HP"
- }
- if(id == 4){
- name = "HP"
- }
- if(id == 5){
- name = "HF"
- }
- if(id == 6){
- name = "SCUF"
- }
- if(id == 7){
- name = "IUF"
- }
- if(id == 8){
- name = "HFHD"
- }
- if(id == 9){
- name = "HFHD+HP"
- }
- if(id == 10){
- name = "PHF"
- }
- if(id == 11){
- name = "HFR"
- }
- if(id == 12){
- name = "HDF+HP"
- }
- if(id == 13){
- name = "CRRT"
- }
- if(id == 14){
- name = "腹水回输"
- }
- if(id == 19){
- name = "IUF+HD"
- }
- if(id == 20){
- name = "UF"
- }
- if(id == 21){
- name = "HD+"
- }
- if(id == 22){
- name = "血浆胆红素吸附+HDF"
- }
- if(id == 23){
- name = "血浆胆红素吸附"
- }
- if(id == 24){
- name = "I-HDF"
- }
- if(id == 25){
- name = "HD高通"
- }
- if(id == 26){
- name = "CVVH"
- }
- if(id == 27){
- name = "CVVHD"
- }
- if(id == 28){
- name = "CVVHDF"
- }
- if(id == 29){
- name = "PE"
- }
- if(id == 30){
- name = "血浆胆红素吸附+HP"
- }
- if(id == 31){
- name = "HPD"
- }
- if(id == 32){
- name = "HDP"
- }
- return name
- },
- getDialysateFormulation(id){
- var name = ""
- for(let i=0;i<this.dialysate_formulation.length;i++){
- if(id == this.dialysate_formulation[i].id){
- name = this.dialysate_formulation[i].name
- }
- }
- return name
- },
- getAnticoagulant(id){
- var name = ""
- if(id == 1){
- name = "无肝素"
- }
- if(id == 2){
- name = "普通肝素"
- }
- if(id == 3){
- name = "低分子肝素"
- }
- if(id == 4){
- name = "阿加曲班"
- }
- if(id == 5){
- name ="枸橼酸钠"
- }
- if(id == 6){
- name = "低分子肝素钙"
- }
- if(id == 7){
- name = "低分子肝素钠"
- }
- if(id ==8){
- name = "依诺肝素"
- }
- if(id ==9){
- name = "达肝素"
- }
- if(id ==10){
- name = "体外抗凝"
- }
- if(id ==11){
- name = "那曲肝素"
- }
- if(id ==12){
- name = "无抗凝剂"
- }
- if(id ==13){
- name = "那曲肝素钙"
- }
- return name
- },
- getBodyFluid(id){
- var name = ""
- for(let i=0;i<this.body_fluid_option.length;i++){
- if(id == this.body_fluid_option[i].id){
- name = this.body_fluid_option[i].name
- }
- }
- return name
- },
- getDisplace(id){
- var name = ""
- for(let i=0;i<this.displace_liqui_part_option.length;i++){
- if(id == this.displace_liqui_part_option[i].id){
- name = this.displace_liqui_part_option[i].name
- }
- }
- return name
- },
- getBloodAccess(id){
- var name = ""
- for(let i=0;i<this.blood_access_option.length;i++){
- if(id == this.blood_access_option[i].id){
- name = this.blood_access_option[i].name
- }
- }
- return name
- },
- getHemodialysisPipelines(id){
- var name = ""
- for(let i=0;i<this.hemodialysisPipelinesOptions.length;i++){
- if(id == this.hemodialysisPipelinesOptions[i].id){
- name = this.hemodialysisPipelinesOptions[i].name
- }
- }
- return name
- },
- toSett(){
- GetAllGoodType().then(response=>{
- if(response.data.state == 1){
- this.goodTypeList = []
- this.goodTypeList = response.data.data.goodType
-
- // console.log("typelist2332233223wo",this.goodTypeList)
- for(let i=0;i<this.goodTypeList.length;i++){
- if(i == 0 && this.goodTypeList[i].is_open == 1){
- this.checkedOne = true
- }
- if(i == 1 && this.goodTypeList[i].is_open == 1){
- this.checkedTwo = true
- }
- if(i == 2 && this.goodTypeList[i].is_open == 1){
- this.checkedThree = true
- }
- if(i == 3 && this.goodTypeList[i].is_open == 1){
- this.checkedFour = true
- }
- if(i == 4 && this.goodTypeList[i].is_open == 1){
- // console.log("进来22323")
- this.checkedFive = true
- }
- if(i == 5 && this.goodTypeList[i].is_open == 1){
- this.checkedSix = true
- }
- if(i == 6 && this.goodTypeList[i].is_open == 1){
- this.checkedSeven= true
- }
- if(i == 7 && this.goodTypeList[i].is_open == 1){
- this.checkedEnight= true
- }
- if(i == 8 && this.goodTypeList[i].is_open == 1){
- this.checkedNight= true
- }
- if(i == 9 && this.goodTypeList[i].is_open == 1){
- this.checkedTen= true
- }
- if(i == 10 && this.goodTypeList[i].is_open == 1){
- this.checkedEleven= true
- }
- if(i == 11 && this.goodTypeList[i].is_open == 1){
- this.checkedTwenty= true
- }
- if(i == 12 && this.goodTypeList[i].is_open == 1){
- this.checkedTwentyOne= true
- }
- if(i == 13 && this.goodTypeList[i].is_open == 1){
- this.checkedTwentyTwo= true
- }
- if(i == 14 && this.goodTypeList[i].is_open == 1){
- this.checkedTwentyThree= true
- }
- if(i == 15 && this.goodTypeList[i].is_open == 1){
- this.checkedTwentyFour= true
- }
- if(i == 16 && this.goodTypeList[i].is_open == 1){
- this.checkedTwentyFive= true
- }
- if(i == 17 && this.goodTypeList[i].is_open == 1){
- this.checkedTwentySix= true
- }
- if(i == 18 && this.goodTypeList[i].is_open == 1){
- this.checkedTwentySeven= true
- }
- if(i == 19 && this.goodTypeList[i].is_open == 1){
- this.checkedTwentyEight= true
- }
- if(i == 20 && this.goodTypeList[i].is_open == 1){
- this.checkedTwentyNight= true
- }
-
- }
- this.startDialogVisibleOne = true
- }
- })
- },
- saveHisDialysis(){
- var index = 0
- var arr = []
- if(this.checkedOne == true){
- index = 0
- }else{
- index = -1
- }
- for(let i=0;i<this.goodTypeList.length;i++){
- if(index == i){
- arr.push(this.goodTypeList[i].id)
- }
- }
-
- var index_one = 0
- if(this.checkedTwo == true){
- index_one = 1
- }else{
- index_one = -1
- }
- for(let i=0;i<this.goodTypeList.length;i++){
- if(index_one == i){
- arr.push(this.goodTypeList[i].id)
- }
- }
-
- var index_two = 0
- if(this.checkedThree == true){
- index_two = 2
- }else{
- index_two = -1
- }
- for(let i=0;i<this.goodTypeList.length;i++){
- if(index_two == i){
- arr.push(this.goodTypeList[i].id)
- }
- }
-
- var index_three = 0
- if(this.checkedFour == true){
- index_three = 3
- }else{
- index_three = -1
- }
- for(let i=0;i<this.goodTypeList.length;i++){
- if(index_three == i){
- arr.push(this.goodTypeList[i].id)
- }
- }
-
- var index_four = 0
- if(this.checkedFive == true){
- index_four = 4
- }else{
- index_four = -1
- }
- for(let i=0;i<this.goodTypeList.length;i++){
- if(index_four == i){
- arr.push(this.goodTypeList[i].id)
- }
- }
-
- var index_five = 0
- if(this.checkedSix == true){
- index_five = 5
- }else{
- index_five = -1
- }
- for(let i=0;i<this.goodTypeList.length;i++){
- if(index_five == i){
- arr.push(this.goodTypeList[i].id)
- }
- }
-
- var index_six = 0
- if(this.checkedSeven == true){
- index_six = 6
- }else{
- index_six = -1
- }
- for(let i=0;i<this.goodTypeList.length;i++){
- if(index_six == i){
- arr.push(this.goodTypeList[i].id)
- }
- }
-
- var index_seven = 0
- if(this.checkedEnight == true){
- index_seven = 7
- }else{
- index_seven = -1
- }
- for(let i=0;i<this.goodTypeList.length;i++){
- if(index_seven == i){
- arr.push(this.goodTypeList[i].id)
- }
- }
-
- var index_eight =0
-
- if(this.checkedNight == true){
- index_eight = 8
- }else{
- index_eight = -1
- }
- for(let i=0;i<this.goodTypeList.length;i++){
- if(index_eight == i){
- arr.push(this.goodTypeList[i].id)
- }
- }
-
- var index_night = 0
- if(this.checkedTen == true){
- index_night = 9
- }else{
- index_night = -1
- }
- for(let i=0;i<this.goodTypeList.length;i++){
- if(index_night == i){
- arr.push(this.goodTypeList[i].id)
- }
- }
-
- var index_ten = 0
- if(this.checkedEleven == true){
- index_ten = 10
- }else{
- index_ten = -1
- }
- for(let i=0;i<this.goodTypeList.length;i++){
- if(index_ten == i){
- arr.push(this.goodTypeList[i].id)
- }
- }
-
- var index_eleven =0
- if(this.checkedTwenty == true){
- index_eleven = 11
- }else{
- index_eleven = -1
- }
- for(let i=0;i<this.goodTypeList.length;i++){
- if(index_eleven == i){
- arr.push(this.goodTypeList[i].id)
- }
- }
-
- var index_twenty_one = 0
- if(this.checkedTwentyOne == true){
- index_twenty_one = 12
- }else{
- index_twenty_one = -1
- }
- for(let i=0;i<this.goodTypeList.length;i++){
- if(index_twenty_one == i){
- arr.push(this.goodTypeList[i].id)
- }
- }
-
- var index_twenty_two = 0
- if(this.checkedTwentyTwo == true){
- index_twenty_two = 13
- }else{
- index_twenty_two = -1
- }
- for(let i=0;i<this.goodTypeList.length;i++){
- if(index_twenty_two == i){
- arr.push(this.goodTypeList[i].id)
- }
- }
-
- var index_twenty_three = 0
- if(this.checkedTwentyThree == true){
- index_twenty_three = 14
- }else{
- index_twenty_three = -1
- }
- for(let i=0;i<this.goodTypeList.length;i++){
- if(index_twenty_three == i){
- arr.push(this.goodTypeList[i].id)
- }
- }
-
- var index_twenty_four = 0
- if(this.checkedTwentyFour == true){
- index_twenty_four = 15
- }else{
- index_twenty_four = -1
- }
- for(let i=0;i<this.goodTypeList.length;i++){
- if(index_twenty_four == i){
- arr.push(this.goodTypeList[i].id)
- }
- }
-
- var index_twenty_five = 0
- if(this.checkedTwentyFive == true){
- index_twenty_five = 16
- }else{
- index_twenty_five = -1
- }
- for(let i=0;i<this.goodTypeList.length;i++){
- if(index_twenty_five == i){
- arr.push(this.goodTypeList[i].id)
- }
- }
-
- var index_twenty_six = 0
- if(this.checkedTwentySix == true){
- index_twenty_six = 17
- }else{
- index_twenty_six = -1
- }
- for(let i=0;i<this.goodTypeList.length;i++){
- if(index_twenty_six == i){
- arr.push(this.goodTypeList[i].id)
- }
- }
-
- var index_twenty_seven = 0
- if(this.checkedTwentySeven == true){
- index_twenty_seven = 18
- }else{
- index_twenty_seven = -1
- }
- for(let i=0;i<this.goodTypeList.length;i++){
- if(index_twenty_seven == i){
- arr.push(this.goodTypeList[i].id)
- }
- }
-
- var index_twenty_eight = 0
- if(this.checkedTwentyEight == true){
- index_twenty_eight = 19
- }else{
- index_twenty_eight = -1
- }
- for(let i=0;i<this.goodTypeList.length;i++){
- if(index_twenty_eight == i){
- arr.push(this.goodTypeList[i].id)
- }
- }
-
- var index_twenty_night =0
- if(this.checkedTwentyNight == true){
- index_twenty_night = 20
- }else{
- index_twenty_night = -1
- }
- for(let i=0;i<this.goodTypeList.length;i++){
- if(index_twenty_night == i){
- arr.push(this.goodTypeList[i].id)
- }
- }
-
- var params = {
- ids:arr.join(","),
- }
- // console.log("params23322322332",params)
- saveHisDialysis(params).then(response=>{
- if(response.data.state == 1){
- var msg = response.data.data.msg
- this.$message.success("保存成功!")
- this.startDialogVisibleOne = false
- this.getlist()
- }
- })
-
- },
- getTypeName(val,patient_id){
-
- var str = ""
- var arrNew = []
- if(val.project!=null){
- if(val.patient_id == patient_id){
- var arr = []
- if(val.project!=null){
- for(let i=0;i<val.project.length;i++){
- arr.push(val.project[i])
- }
- for(let i=0;i<arr.length;i++){
- arr[i].good_type_id = 0
- arr[i].good_type_id = arr[i].good_info.good_type_id
- }
-
- let dataInfo = {}
- arr.forEach((item, index) => {
- let { good_type_id } = item
- if (!dataInfo[good_type_id]) {
- dataInfo[good_type_id] = {
- good_type_id:item.good_type_id,
- child: [],
- count:0,
- specification_name:item.good_info.specification_name,
- }
- }
- })
- let newArr = Object.values(dataInfo)
-
- for(let i=0;i<newArr.length;i++){
- for(let j=0;j<arr.length;j++){
- if(newArr[i].good_type_id == arr[j].good_type_id){
- newArr[i].child.push(arr[j])
- }
- }
- }
-
- if(newArr!=null && newArr.length > 0){
- for(let i=0;i<newArr.length;i++){
- for(let j=0;j<newArr[i].child.length;j++){
- newArr[i].count += parseInt(newArr[i].child[j].count)
- }
- }
- }
-
- if(newArr!=null && newArr.length >0){
- for(let i=0;i<newArr.length;i++){
- arrNew.push(newArr[i])
- }
- }
-
- }
- }
-
- return arrNew
-
- }
-
- },
- getStr(good_type_id,arrNew,patient_id){
- // console.log("ARR233323",arrNew)
- var arr= []
- var str = ""
- if(arrNew!=null && arrNew.length > 0){
- for(let i=0;i<arrNew.length;i++){
- arrNew[i].good_type_id = 0
- arrNew[i].good_type_id = arrNew[i].good_info.good_type_id
- arrNew[i].good_id = 0
- arrNew[i].good_id = arrNew[i].good_info.id
- if(arrNew[i].patient_id == patient_id && arrNew[i].good_info.good_type_id == good_type_id){
- arr.push(arrNew[i])
- }
- }
- }
-
- let dataInfo = {}
- if(arr!=null && arr.length > 0){
- arr.forEach((item, index) => {
- let { good_id } = item
- if (!dataInfo[good_id]) {
- dataInfo[good_id] = {
- good_id:item.good_id,
- child: [],
- count:0,
- specification_name:item.good_info.specification_name
- }
- }
- })
- let newArr = Object.values(dataInfo)
- // console.log("newArr",newArr)
- for(let i=0;i<arr.length;i++){
- for(let j=0;j<newArr.length;j++){
- if( arr[i].good_info.id == newArr[j].good_id){
- newArr[j].child.push(arr[i])
- }
- }
- }
-
- if(newArr!=null && newArr.length > 0){
- for(let j=0;j<newArr.length;j++){
- for(let z=0;z<newArr[j].child.length;z++){
- newArr[j].count += parseInt(newArr[j].child[z].count)
- }
- }
- for(let j=0;j<newArr.length;j++){
- str += newArr[j].specification_name + "*" + newArr[j].count + " "
- }
- }
- }
-
- return str
- },
- toPrint(){
- this.$router.push({path:'/dialysis/consumable/dialysisgoodprint?limit='+this.query.limit+"&page="+this.query.page+"&partition_id="+this.query.partition_id+"&schedule_date="+this.query.schedule_date+"&schedule_type="+this.query.schedule_type+"&keywords="+this.query.keywords+"&ids="+this.ids})
- },
- toPrintOne(){
- this.$router.push({path:"/dialysis/consumable/dialysisgoodcountprint?schedule_type="+this.schedule_type+"&partion_type="+this.pationType_str+"&schedule_date="+this.query.schedule_date+"&is_open="+this.his_config.is_open})
- },
- toHisPrint(){
- this.$router.push({path:"/dialysis/consumable/dialysisgoodcountprint?schedule_type="+this.schedule_type+"&partion_type="+this.pationType_str+"&schedule_date="+this.query.schedule_date+"&is_open="+this.his_config.is_open})
- },
- toExportListOne(){
- import('@/vendor/Export2Excel').then(excel => {
-
- if(this.tableList!=null && this.tableList.length > 0){
- for(let i=0;i<this.tableList.length;i++){
- this.tableList[i].index = i+1
- }
- }
- const tHeader = ['序号','耗材名称','规格','数量']
- const filterVal = ['index', 'name','specification_name','count']
-
- const data = this.formatJson(filterVal, this.tableList)
- excel.export_json_to_excel({
- header: tHeader,
- data,
- filename: '透析耗材统计'
- })
- this.downloadLoading = false
- })
- },
- toExportListTwo(){
- import('@/vendor/Export2Excel').then(excel => {
- if(this.tableList!=null && this.tableList.length > 0){
- for(let i=0;i<this.tableList.length;i++){
- this.tableList[i].index = i+1
- }
- }
- const tHeader = ['序号','耗材名称','规格','数量']
- const filterVal = ['index', 'good_name','specification_name','count']
-
- const data = this.formatJson(filterVal, this.tableList)
- excel.export_json_to_excel({
- header: tHeader,
- data,
- filename: '透析耗材统计'
- })
- this.downloadLoading = false
- })
- },
- handleSelectionChange(val){
- var arr = []
- for(let i=0;i<val.length;i++){
- arr.push(val[i].id)
- }
- this.ids = arr.join(",")
- // console.log("ids23323232",this.ids)
- },
- changeScheduleType(){
- console.log("changeScheduleType",this.his_config)
- if(this.his_config.is_open != 1){
- this.tableList = []
- this.statistics()
- }
- if(this.his_config.is_open == 1){
- this.tableList = []
- this.toStatistics()
- }
- },
- changePartionType(){
- if(this.his_config.is_open != 1){
- this.tableList = []
- this.statistics()
- }
- if(this.his_config.is_open == 1){
- this.tableList = []
- this.toStatistics()
- }
- },
- toClick(){
- const loading = this.$loading({
- lock: true,
- text: 'Loading',
- spinner: 'el-icon-loading',
- background: 'rgba(0, 0, 0, 0.7)'
- })
- getSolutionlistByOrgId().then(response=>{
- if(response.data.state == 1){
- var list = response.data.data.list
- console.log("list23322323",list)
- loading.close()
- this.$message.success("更新成功!")
- }
- })
- }
- }
- }
- </script>
-
-
- <style lang="scss" scoped>
- .page_consumables {
-
- .clearfix:after {
- content: none;
- }
-
- }
- </style>
|