1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429 |
- <template>
- <div>
- <div :class="Screencasting==true ? 'fullscreenbroad' : 'scheduleTablePrint'" >
- <div class="butt" style="text-align: right;">
- <el-button type="primary" @click="touping">{{Screencasting==true ? '取消投屏':'投屏'}}</el-button>
- <el-button type="primary" @click="printAction">打印</el-button>
- </div>
- <div class="tab" style="margin-top: 10px;">
- <table id="scheduleTable" class="scheduleTable" border="1" cellspacing="0" style='width: 100%;table-layout:fixed;text-align: center;word-break: break-all;word-wrap: break-word;'>
- <tr>
- <td rowspan="2">分区</td>
- <td rowspan="2">机号</td>
- <td colspan="3" v-if="first_day == 1">周一({{ weekTitle[0] }})</td>
- <td colspan="3" v-if="second_day == 2">周二({{ weekTitle[1] }})</td>
- <td colspan="3" v-if="three_day == 3">周三({{ weekTitle[2] }})</td>
- <td colspan="3" v-if="four_day == 4">周四({{ weekTitle[3] }})</td>
- <td colspan="3" v-if="five_day == 5">周五({{ weekTitle[4] }})</td>
- <td colspan="3" v-if="six_day == 6">周六({{ weekTitle[5] }})</td>
- <td colspan="3" v-if="seven_day == 7">周日({{ weekTitle[6] }})</td>
- <!-- <td>总数</td> -->
- </tr>
- <tr>
- <td v-if="first_day == 1">上午</td>
- <td v-if="first_day == 1">下午</td>
- <td v-if="first_day == 1">晚上</td>
- <td v-if="second_day == 2">上午</td>
- <td v-if="second_day == 2">下午</td>
- <td v-if="second_day == 2">晚上</td>
- <td v-if="three_day == 3">上午</td>
- <td v-if="three_day == 3">下午</td>
- <td v-if="three_day == 3">晚上</td>
- <td v-if="four_day == 4">上午</td>
- <td v-if="four_day == 4">下午</td>
- <td v-if="four_day == 4">晚上</td>
- <td v-if="five_day == 5">上午</td>
- <td v-if="five_day == 5">下午</td>
- <td v-if="five_day == 5">晚上</td>
- <td v-if="six_day == 6">上午</td>
- <td v-if="six_day == 6">下午</td>
- <td v-if="six_day == 6">晚上</td>
- <td v-if="seven_day == 7">上午</td>
- <td v-if="seven_day == 7">下午</td>
- <td v-if="seven_day == 7">晚上</td>
- </tr>
- <tr v-for="(item,index) in scheduleZone" :key="index">
- <td style="min-width:50px;">{{ item.area }}</td>
- <td style="min-width:50px;">{{ item.cut }}</td>
- <td style="min-width:50px;" v-if="first_day == 1">
- <span v-if="item.Mon_M.patient_id">
- <span>{{ item.Mon_M.patient }} </span><br/>
- <span >{{ item.Mon_M.mode_name }}</span><br/>
- <span v-if="org_id==10469 || org_id ==0">{{getAnticoagulant(item.Mon_M.anticoagulant)}}</span><br/>
- <span v-show="showflag">{{item.Mon_M.dialysis_machine_name}}
-
- </span>
- </span>
- </td>
- <td style="min-width:50px;" v-if="first_day == 1">
- <span v-if="item.Mon_A.patient_id">
- <span>{{ item.Mon_A.patient }} </span><br/>
- <span >{{ item.Mon_A.mode_name }}</span><br/>
- <span v-if="org_id==10469 || org_id == 0">{{getAnticoagulant(item.Mon_A.anticoagulant) }}</span>
- <span v-show="showflag">{{item.Mon_A.dialysis_machine_name}}
-
- </span>
- </span>
- </td>
- <td style="min-width:50px;" v-if="first_day == 1">
- <span v-if="item.Mon_N.patient_id">
- <span>{{ item.Mon_N.patient }} </span><br/>
- <span >{{ item.Mon_N.mode_name }}</span><br/>
- <span v-if="org_id ==10469 || org_id == 0">{{getAnticoagulant(item.Mon_N.anticoagulant) }}</span>
- <span v-show="showflag">{{item.Mon_N.dialysis_machine_name}}
-
- </span>
- </span>
- </td>
- <td style="min-width:50px;" v-if="second_day == 2">
- <span v-if="item.Tue_M.patient_id">
- <span>{{ item.Tue_M.patient }} </span><br/>
- <span >{{ item.Tue_M.mode_name }}</span><br/>
- <span v-if="org_id==0||org_id==10469">{{getAnticoagulant(item.Tue_M.anticoagulant ) }}</span><br/>
- <span v-show="showflag">{{item.Tue_M.dialysis_machine_name}}
-
- </span>
- </span>
- </td>
- <td style="min-width:50px;" v-if="second_day == 2">
- <span v-if="item.Tue_A.patient_id">
- <span>{{ item.Tue_A.patient }} </span><br/>
- <span >{{ item.Tue_A.mode_name }}</span><br/>
- <span v-if="org_id ==0||org_id == 10469">{{ getAnticoagulant(item.Tue_A.anticoagulant)}}</span>
- <span v-show="showflag">{{item.Tue_A.dialysis_machine_name}}
-
- </span>
-
- </span>
- </td>
- <td style="min-width:50px;" v-if="second_day == 2">
- <span v-if="item.Tue_N.patient_id">
- <span>{{ item.Tue_N.patient }} </span><br/>
- <span >{{ item.Tue_N.mode_name }}</span><br/>
- <span v-if="org_id==0||org_id ==10469">{{getAnticoagulant(item.Tue_N.anticoagulant) }}</span>
- <span v-show="showflag">{{item.Tue_N.dialysis_machine_name}}
-
- </span>
- </span>
- </td>
- <td style="min-width:50px;" v-if="three_day == 3">
- <span v-if="item.Wed_M.patient_id">
- <span>{{ item.Wed_M.patient }} </span><br/>
- <span >{{ item.Wed_M.mode_name }}</span><br/>
- <span v-if="org_id == 0 || org_id ==10469">{{getAnticoagulant(item.Wed_M.anticoagulant) }}</span><br/>
- <span v-show="showflag">{{item.Wed_M.dialysis_machine_name}}
-
- </span>
- </span>
- </td>
- <td style="min-width:50px;" v-if="three_day == 3">
- <span v-if="item.Wed_A.patient_id">
- <span>{{ item.Wed_A.patient }} </span><br/>
- <span >{{ item.Wed_A.mode_name }}</span><br/>
- <span v-if="org_id ==0||org_id ==10469">{{getAnticoagulant(item.Wed_A.anticoagulant)}}</span>
- <span v-show="showflag">{{item.Wed_A.dialysis_machine_name}}
-
- </span>
- </span>
- </td>
- <td style="min-width:50px;" v-if="three_day == 3">
- <span v-if="item.Wed_N.patient_id">
- <span>{{ item.Wed_N.patient }} </span><br/>
- <span >{{ item.Wed_N.mode_name }}</span><br/>
- <span v-if="org_id ==0 || org_id ==10469">{{ getAnticoagulant(item.Wed_N.anticoagulant) }}</span>
- <span v-show="showflag">{{item.Wed_N.dialysis_machine_name}}
-
- </span>
- </span>
- </td>
- <td style="min-width:50px;" v-if="four_day == 4">
- <span v-if="item.Thurs_M.patient_id">
- <span>{{ item.Thurs_M.patient }} </span><br/>
- <span >{{ item.Thurs_M.mode_name }}</span><br/>
- <span v-if="org_id == 0||org_id ==10469">{{ getAnticoagulant(item.Thurs_M.anticoagulant) }}</span>
- <span v-show="showflag">{{item.Thurs_M.dialysis_machine_name}}
-
- </span>
- </span>
- </td>
- <td style="min-width:50px;" v-if="four_day == 4">
- <span v-if="item.Thurs_A.patient_id">
- <span>{{ item.Thurs_A.patient }} </span><br/>
- <span >{{ item.Thurs_A.mode_name }}</span><br/>
- <span v-if="org_id ==0||org_id ==10469">{{getAnticoagulant(item.Thurs_A.anticoagulant) }}</span>
-
- <span v-show="showflag">{{item.Thurs_A.dialysis_machine_name}}
-
- </span>
- </span>
- </td>
- <td style="min-width:50px;" v-if="four_day == 4">
- <span v-if="item.Thurs_N.patient_id">
- <span>{{ item.Thurs_N.patient }} </span><br/>
- <span >{{ item.Thurs_N.mode_name }}</span><br/>
- <span v-if="org_id ==0 || org_id ==10469" >{{ getAnticoagulant(item.Thurs_N.anticoagulant) }}</span>
- <span v-show="showflag">{{item.Thurs_N.dialysis_machine_name}}
-
- </span>
- </span>
- </td>
- <td style="min-width:50px;" v-if="five_day == 5">
- <span v-if="item.Fri_M.patient_id">
- <span>{{ item.Fri_M.patient }} </span><br/>
- <span >{{ item.Fri_M.mode_name }}</span><br/>
- <span v-if="org_id ==0||org_id ==10469">{{ getAnticoagulant(item.Fri_M.anticoagulant) }} </span><br/>
- <span v-show="showflag">{{item.Fri_M.dialysis_machine_name}}
-
- </span>
- </span>
- </td>
- <td style="min-width:50px;" v-if="five_day == 5">
- <span v-if="item.Fri_A.patient_id">
- <span>{{ item.Fri_A.patient }} </span><br/>
- <span >{{ item.Fri_A.mode_name }}</span><br/>
- <span v-if="org_id ==0||org_id ==10469">{{ getAnticoagulant(item.Fri_A.anticoagulant) }}</span>
- <span v-show="showflag">{{item.Fri_A.dialysis_machine_name}}
-
- </span>
- </span>
- </td>
- <td style="min-width:50px;" v-if="five_day == 5">
- <span v-if="item.Fri_N.patient_id">
- <span>{{ item.Fri_N.patient }} </span><br/>
- <span >{{ item.Fri_N.mode_name }}</span><br/>
- <span v-if="org_id == 0||org_id ==10469">{{getAnticoagulant(item.Fri_N.anticoagulant) }}</span>
- <span v-show="showflag">{{item.Fri_N.dialysis_machine_name}}
-
- </span>
- </span>
- </td>
- <td style="min-width:50px;" v-if="six_day == 6">
- <span v-if="item.Sat_M.patient_id">
- <span>{{ item.Sat_M.patient }} </span><br/>
- <span >{{ item.Sat_M.mode_name }}</span><br/>
- <span v-if="org_id ==0 || org_id ==10469">{{ getAnticoagulant(item.Sat_M.anticoagulant) }}</span>
- <span v-show="showflag">{{item.Sat_M.dialysis_machine_name}}
-
- </span>
- </span>
- </td>
- <td style="min-width:50px;" v-if="six_day == 6">
- <span v-if="item.Sat_A.patient_id">
- <span>{{ item.Sat_A.patient }} </span><br/>
- <span >{{ item.Sat_A.mode_name }}</span><br/>
- <span v-if="org_id ==0||org_id ==10469">{{ getAnticoagulant(item.Sat_A.anticoagulant) }}</span>
- <span v-show="showflag">{{item.Sat_A.dialysis_machine_name}}
-
- </span>
- </span>
- </td>
- <td style="min-width:50px;" v-if="six_day == 6">
- <span v-if="item.Sat_N.patient_id">
- <span>{{ item.Sat_N.patient }} </span><br/>
- <span >{{ item.Sat_N.mode_name }}</span><br/>
- <span v-if="org_id ==0||org_id ==10469">{{ getAnticoagulant(item.Sat_N.anticoagulant) }}</span>
- <span v-show="showflag">{{item.Sat_N.dialysis_machine_name}}
-
- </span>
- </span>
- </td>
- <td style="min-width:50px;" v-if="seven_day == 7">
- <span v-if="item.Sun_M.patient_id">
- <span>{{ item.Sun_M.patient }} </span><br/>
- <span >{{ item.Sun_M.mode_name }}</span><br/>
- <span v-if="org_id ==0||org_id ==10469">{{ getAnticoagulant(item.Sun_M.anticoagulant) }}</span>
- <span v-show="showflag">{{item.Sun_M.dialysis_machine_name}}
-
- </span>
- </span>
- </td>
- <td style="min-width:50px;" v-if="seven_day == 7">
- <span v-if="item.Sun_A.patient_id">
- <span>{{ item.Sun_A.patient }} </span><br/>
- <span >{{ item.Sun_A.mode_name }}</span><br/>
- <span v-if="org_id ==0 || org_id ==10469">{{getAnticoagulant(item.Sun_A.anticoagulant)}}</span>
- <span v-show="showflag">{{item.Sun_A.dialysis_machine_name}}
-
- </span>
-
- </span>
- </td>
- <td style="min-width:50px;" v-if="seven_day == 7">
- <span v-if="item.Sun_N.patient_id">
- <span>{{ item.Sun_N.patient }} </span><br/>
- <span >{{ item.Sun_N.mode_name }}</span><br/>
- <span v-if="org_id ==0||org_id ==10469">{{ getAnticoagulant(item.Sun_N.anticoagulant ) }}</span>
- <span v-show="showflag">{{item.Sun_N.dialysis_machine_name}}
-
- </span>
- </span>
- </td>
- <!-- <td>{{item.total}}</td> -->
- </tr>
- </table>
- </div>
- </div>
- </div>
- </template>
-
- <script>
- import {getSchedulesTwo,getWeekPanelsOne,getPatientSheduleCount,getAllZones,getSolutionSchedule} from "@/api/schedule";
- import print from 'print-js'
- export default {
- props:{
- scheduleZoneProp: {
- type: Array,
- dafault: []
- },
- },
- data(){
- return{
- showflag:sessionStorage.getItem('value1'),
- schedule_type:'',
- partition_id:'',
- theType:2,
- scheduleZone:[],
- weekTitle:[],
- scheduleZoneRow: [],
- partitions: {},
- theWeek: {
- lastWeek: 0,
- thisWeek: 0,
- nextWeek: 0,
- nextTwoWeek: 0
- },
- scheduleCountList:[],
- total:0,
- zones:[],
- zoneIdList:[],
- strArr:"",
- solutionList:[],
- week_date:"",
- Screencasting:false,//投屏
- first_day:0,
- second_day:0,
- three_day:0,
- four_day:0,
- five_day:0,
- six_day:0,
- seven_day:0,
- org_id:0
- }
- },
- created(){
- this.org_id = this.$store.getters.xt_user.org.id
- this.getAllZones()
- this.modeOptions = this.$store.getters.treatment_mode;
- this.partition_id = this.$route.query.partition_id
- var newList = []
- var arr = this.$route.query.week_date
-
- if(arr!=""){
- var newArr = arr.split(",")
-
- if(newArr!=null&&newArr.length > 0){
- for(let i=0;i<newArr.length;i++){
- if(newArr[i] == "周一"){
- newList.push(1)
- this.first_day = 1
- }
- if(newArr[i] == "周二"){
- newList.push(2)
- this.second_day = 2
- }
- if(newArr[i] == "周三"){
- newList.push(3)
- this.three_day = 3
- }
- if(newArr[i] == "周四"){
- newList.push(4)
- this.four_day = 4
- }
- if(newArr[i] == "周五"){
- newList.push(5)
- this.five_day = 5
- }
- if(newArr[i] == "周六"){
- newList.push(6)
- this.six_day = 6
- }
- if(newArr[i] == "周日"){
- newList.push(7)
- this.seven_day = 7
- }
- }
-
- this.week_date = newList.join(",")
- }
-
- }else{
- newList = [1,2,3,4,5,6,7]
- this.first_day = 1
- this.second_day = 2
- this.three_day = 3
- this.four_day = 4
- this.five_day = 5
- this.six_day = 6
- this.seven_day = 7
- this.week_date = newList.join(",")
-
- }
- // this.getSolutionSchedule()
- },
- methods:{
- getAllZones(){
- getAllZones().then(response=>{
- if(response.data.state == 1){
- var zones = response.data.data.zones
- for(let i=0;i<zones.length;i++){
- this.zoneIdList.push(zones[i].id)
- }
- this.zones.push(...zones)
- var strArr = this.zoneIdList.join(",")
-
- this.strArr = strArr
- this.getWeekPanels()
- //统计患者排班数量
- this.getPatientSheduleCount()
- }
- })
- },
- compare(p) { //这是比较函数
- return function (m, n) {
- var a = m[p];
- var b = n[p];
- return a - b; //升序
- }
- },
- getWeekPanels() {
- this.scheduleZone = []
- var partionStr = this.partition_id
- var arr = this.zoneIdList.join(',')
- var str = ""
- if(partionStr == 0){
- str = arr
- }
- if(partionStr != 0){
- str = partionStr
- }
- getWeekPanelsOne(1,str).then(response => {
- if (response.data.state == 0) {
- return false
- }
- var partitions = response.data.data.partitions
- console.log("分区",partitions)
- this.theWeek.thisWeek = response.data.data.theWeek
- this.theWeek.lastWeek = this.theWeek.thisWeek - 1
- this.theWeek.nextWeek = this.theWeek.thisWeek + 1
- this.theWeek.nextTwoWeek = this.theWeek.thisWeek + 2
- var that = this
- if (partitions.length > 0) {
-
- partitions.forEach(function(partition) {
- if (partition.jihaos.length == 0) {
- return false
- }
- that.scheduleZoneRow.push(partition.jihaos.length)
- that.partitions[partition.id] = partition
- partition.jihaos.forEach(function(jihao) {
- var thisPa = {
- area: partition.name,
- zone_id: partition.id,
- zone_type: partition.type,
- cut: jihao.number,
- jihao_id: jihao.id,
- sort:jihao.sort,
- Mon_M: {
- schedule_id: 0,
- mode_id: 0,
- mode_name: '',
- patient_id: 0,
- patient: '',
- type:1,
- dialysis_machine_name:"",
- anticoagulant:"",
- },
- Mon_A: {
- schedule_id: 0,
- mode_id: 0,
- mode_name: '',
- patient_id: 0,
- patient: '',
- type:1,
- dialysis_machine_name:"",
- anticoagulant:""
-
- },
- Mon_N: {
- schedule_id: 0,
- mode_id: 0,
- mode_name: '',
- patient_id: 0,
- patient: '',
- type:1,
- dialysis_machine_name:"",
- anticoagulant:""
-
- },
- Tue_M: {
- schedule_id: 0,
- mode_id: 0,
- mode_name: '',
- patient_id: 0,
- patient: '',
- type:1,
- dialysis_machine_name:"",
- anticoagulant:""
-
- },
- Tue_A: {
- schedule_id: 0,
- mode_id: 0,
- mode_name: '',
- patient_id: 0,
- patient: '',
- type:1,
- dialysis_machine_name:"",
- anticoagulant:""
-
-
- },
- Tue_N: {
- schedule_id: 0,
- mode_id: 0,
- mode_name: '',
- patient_id: 0,
- patient: '',
- type:1,
- dialysis_machine_name:"",
- anticoagulant:""
-
- },
- Wed_M: {
- schedule_id: 0,
- mode_id: 0,
- mode_name: '',
- patient_id: 0,
- patient: '',
- type:1,
- dialysis_machine_name:"",
- anticoagulant:""
-
- },
- Wed_A: {
- schedule_id: 0,
- mode_id: 0,
- mode_name: '',
- patient_id: 0,
- patient: '',
- type:1,
- dialysis_machine_name:"",
- anticoagulant:""
-
- },
- Wed_N: {
- schedule_id: 0,
- mode_id: 0,
- mode_name: '',
- patient_id: 0,
- patient: '',
- type:1,
- dialysis_machine_name:"",
- anticoagulant:""
-
- },
- Thurs_M: {
- schedule_id: 0,
- mode_id: 0,
- mode_name: '',
- patient_id: 0,
- patient: '',
- type:1,
- dialysis_machine_name:"",
- anticoagulant:""
-
- },
- Thurs_A: {
- schedule_id: 0,
- mode_id: 0,
- mode_name: '',
- patient_id: 0,
- patient: '',
- type:1,
- dialysis_machine_name:"",
- anticoagulant:""
-
- },
- Thurs_N: {
- schedule_id: 0,
- mode_id: 0,
- mode_name: '',
- patient_id: 0,
- patient: '',
- type:1,
- dialysis_machine_name:"",
- anticoagulant:""
-
- },
- Fri_M: {
- schedule_id: 0,
- mode_id: 0,
- mode_name: '',
- patient_id: 0,
- patient: '',
- type:1,
- dialysis_machine_name:"",
- anticoagulant:""
-
- },
- Fri_A: {
- schedule_id: 0,
- mode_id: 0,
- mode_name: '',
- patient_id: 0,
- patient: '',
- type:1,
- dialysis_machine_name:"",
- anticoagulant:""
-
- },
- Fri_N: {
- schedule_id: 0,
- mode_id: 0,
- mode_name: '',
- patient_id: 0,
- patient: '',
- type:1,
- dialysis_machine_name:"",
- anticoagulant:""
-
- },
- Sat_M: {
- schedule_id: 0,
- mode_id: 0,
- mode_name: '',
- patient_id: 0,
- patient: '',
- type:1,
- dialysis_machine_name:"",
- anticoagulant:""
-
- },
- Sat_A: {
- schedule_id: 0,
- mode_id: 0,
- mode_name: '',
- patient_id: 0,
- patient: '',
- type:1,
- dialysis_machine_name:"",
- anticoagulant:""
-
- },
- Sat_N: {
- schedule_id: 0,
- mode_id: 0,
- mode_name: '',
- patient_id: 0,
- patient: '',
- type:1,
- dialysis_machine_name:"",
- anticoagulant:""
-
- },
- Sun_A: {
- schedule_id: 0,
- mode_id: 0,
- mode_name: '',
- patient_id: 0,
- patient: '',
- type:1,
- dialysis_machine_name:"",
- anticoagulant:""
-
- },
- Sun_N: {
- schedule_id: 0,
- mode_id: 0,
- mode_name: '',
- patient_id: 0,
- patient: '',
- type:1,
- dialysis_machine_name:"",
- anticoagulant:""
-
- },
- Sun_M: {
- schedule_id: 0,
- mode_id: 0,
- mode_name: '',
- patient_id: 0,
- patient: '',
- type:1,
- dialysis_machine_name:"",
- anticoagulant:""
-
- },
- total: 0
- }
- that.scheduleZone.push(thisPa)
-
- })
- })
- }
- this.scheduleZone.sort(this.compare('sort'))
-
- this.getSchedules()
- })
- },
- getSchedules() {
- var theType = 2;
- if(this.$route.query.weekTime == "lastWeek"){
- theType = 1
- }
- if(this.$route.query.weekTime == "thisWeek"){
- theType = 2
- }
- if(this.$route.query.weekTime == "nextWeek"){
- theType = 3
- }
- if(this.$route.query.weekTime == "nextTwoWeek"){
- theType = 4
- }
- var partionStr = this.partition_id
- var arr = this.zoneIdList.join(',')
- var str = ""
- if(partionStr == 0){
- str = arr
- }
- if(partionStr != 0){
- str = partionStr
- }
- const params = {
- weekTime:theType,
- patitionid:str,
- schedule_type:this.schedule_type,
- week_date:this.week_date,
- }
- getSchedulesTwo(params).then(response => {
- if (response.data.state == 1) {
- this.weekTitle = response.data.data.weekTitle;
- console.log("weekTitle99923232",this.weekTitle)
- this.weekDays = response.data.data.days;
- this.toDay = response.data.data.today;
- var theSchedules = response.data.data.schdules;
- var that = this;
- that.scheduleZone.forEach(function(zone, index) {
-
- that.scheduleZone[index].Mon_M = {
- mode_id: 0,
- mode_name: "",
- patient_id: 0,
- patient: "",
- type:1,
- dialysis_machine_name:"",
- anticoagulant:"",
-
- };
- that.scheduleZone[index].Mon_A = {
- mode_id: 0,
- mode_name: "",
- patient_id: 0,
- patient: "",
- type:1,
- dialysis_machine_name:"",
- anticoagulant:"",
-
- };
- that.scheduleZone[index].Mon_N = {
- mode_id: 0,
- mode_name: "",
- patient_id: 0,
- patient: "",
- type:1,
- dialysis_machine_name:"",
- anticoagulant:"",
-
- };
- that.scheduleZone[index].Tue_M = {
- mode_id: 0,
- mode_name: "",
- patient_id: 0,
- patient: "",
- type:1,
- dialysis_machine_name:"",
- anticoagulant:"",
-
- };
- that.scheduleZone[index].Tue_A = {
- mode_id: 0,
- mode_name: "",
- patient_id: 0,
- patient: "",
- type:1,
- dialysis_machine_name:"",
- anticoagulant:"",
-
- };
- that.scheduleZone[index].Tue_N = {
- mode_id: 0,
- mode_name: "",
- patient_id: 0,
- patient: "",
- type:1,
- dialysis_machine_name:"",
- anticoagulant:"",
-
- };
- that.scheduleZone[index].Wed_M = {
- mode_id: 0,
- mode_name: "",
- patient_id: 0,
- patient: "",
- type:1,
- dialysis_machine_name:"",
- anticoagulant:"",
-
- };
- that.scheduleZone[index].Wed_A = {
- mode_id: 0,
- mode_name: "",
- patient_id: 0,
- patient: "",
- type:1,
- dialysis_machine_name:"",
- anticoagulant:"",
-
- };
- that.scheduleZone[index].Wed_N = {
- mode_id: 0,
- mode_name: "",
- patient_id: 0,
- patient: "",
- type:1,
- dialysis_machine_name:"",
- anticoagulant:"",
-
- };
- that.scheduleZone[index].Thurs_M = {
- mode_id: 0,
- mode_name: "",
- patient_id: 0,
- patient: "",
- type:1,
- dialysis_machine_name:"",
- anticoagulant:"",
-
- };
- that.scheduleZone[index].Thurs_A = {
- mode_id: 0,
- mode_name: "",
- patient_id: 0,
- patient: "",
- type:1,
- dialysis_machine_name:"",
- anticoagulant:"",
-
- };
- that.scheduleZone[index].Thurs_N = {
- mode_id: 0,
- mode_name: "",
- patient_id: 0,
- patient: "",
- type:1,
- dialysis_machine_name:"",
- anticoagulant:"",
-
- };
- that.scheduleZone[index].Fri_M = {
- mode_id: 0,
- mode_name: "",
- patient_id: 0,
- patient: "",
- type:1,
- dialysis_machine_name:"",
- anticoagulant:"",
-
- };
- that.scheduleZone[index].Fri_A = {
- mode_id: 0,
- mode_name: "",
- patient_id: 0,
- patient: "",
- type:1,
- dialysis_machine_name:"",
- anticoagulant:"",
-
- };
- that.scheduleZone[index].Fri_N = {
- mode_id: 0,
- mode_name: "",
- patient_id: 0,
- patient: "",
- type:1,
- dialysis_machine_name:"",
- anticoagulant:"",
-
- };
- that.scheduleZone[index].Sat_M = {
- mode_id: 0,
- mode_name: "",
- patient_id: 0,
- patient: "",
- type:1,
- dialysis_machine_name:"",
- anticoagulant:"",
-
- };
- that.scheduleZone[index].Sat_A = {
- mode_id: 0,
- mode_name: "",
- patient_id: 0,
- patient: "",
- type:1,
- dialysis_machine_name:"",
- anticoagulant:"",
-
- };
- that.scheduleZone[index].Sat_N = {
- mode_id: 0,
- mode_name: "",
- patient_id: 0,
- patient: "",
- type:1,
- dialysis_machine_name:"",
- anticoagulant:"",
-
- };
- that.scheduleZone[index].Sun_A = {
- mode_id: 0,
- mode_name: "",
- patient_id: 0,
- patient: "",
- type:1,
- dialysis_machine_name:"",
- anticoagulant:"",
-
- };
- that.scheduleZone[index].Sun_N = {
- mode_id: 0,
- mode_name: "",
- patient_id: 0,
- patient: "",
- type:1,
- dialysis_machine_name:"",
- anticoagulant:"",
-
- };
- that.scheduleZone[index].Sun_M = {
- mode_id: 0,
- mode_name: "",
- patient_id: 0,
- patient: "",
- type:1,
- dialysis_machine_name:"",
- anticoagulant:"",
-
-
- };
- that.scheduleZone[index].total = 0;
-
- if (response.data.data.schdules.length > 0) {
- theSchedules.forEach(function(schedule, sindex) {
-
- if (zone.jihao_id == schedule.bed_id) {
- // if(zone.zone_id == schedule.partition_id && zone.jihao_id == schedule.bed_id) {
- var weekPath = that.weekPath(
- schedule.schedule_week,
- schedule.schedule_type
- );
-
- if (weekPath.length == 2) {
- // console.log(schedule);
-
- var weekPathKey = weekPath[0] + "_" + weekPath[1];
- that.scheduleZone[index][weekPathKey] = {
- schedule_id: schedule.id,
- mode_id: schedule.mode_id,
- patient_id: schedule.patient_id,
- patient: schedule.patient,
- patient_contagions: schedule.patient_contagions,
- dialysis_machine_name: schedule.dialysis_machine_name,
- mode_name:typeof that.modeOptions[schedule.mode_id] ==="undefined"? "": that.modeOptions[schedule.mode_id].name,
- anticoagulant:schedule.dialysissolution.anticoagulant
- };
- that.scheduleZone[index].total += 1;
-
- }
-
- }
-
- });
- }
-
- });
- var newArr= [{"area":"总数","cut":0,"Fri_A":{mode_id:0,mode_name:"",patient:"0",patient_id:"1",type:0},"Fri_M":{mode_id:0,mode_name:"",patient:"0",patient_id:"1",type:0},"Fri_N":{mode_id:0,mode_name:"",patient:"0",patient_id:"1",type:0},"Mon_A":{mode_id:0,mode_name:"",patient:"",patient_id:"1",type:0},"Mon_M":{mode_id:0,mode_name:"",patient:"0",patient_id:"1",type:0},"Mon_N":{mode_id:0,mode_name:"",patient:"0",patient_id:"1",type:0},"Sat_A":{mode_id:0,mode_name:"",patient:"0",patient_id:"1",type:0},"Sat_M":{mode_id:0,mode_name:"",patient:"0",patient_id:"1",type:0},"Sat_N":{mode_id:0,mode_name:"",patient:"0",patient_id:"1",type:0},"Sun_A":{mode_id:0,mode_name:"",patient:"0",patient_id:"1",type:0},"Sun_M":{mode_id:0,mode_name:"",patient:"0",patient_id:"1",type:0},"Sun_N":{mode_id:0,mode_name:"",patient:"0",patient_id:"1",type:0},"Thurs_A":{mode_id:0,mode_name:"",patient:"0",patient_id:"1",type:0},"Thurs_M":{mode_id:0,mode_name:"",patient:"0",patient_id:"1",type:0},"Thurs_N":{mode_id:0,mode_name:"",patient:"0",patient_id:"1",type:0},"Tue_A":{mode_id:0,mode_name:"",patient:"0",patient_id:"1",type:0},"Tue_M":{mode_id:0,mode_name:"",patient:"0",patient_id:"1",type:0},"Tue_N":{mode_id:0,mode_name:"",patient:"0",patient_id:"1",type:0},"Wed_A":{mode_id:0,mode_name:"",patient:"0",patient_id:"1",type:0},"Wed_M":{mode_id:0,mode_name:"",patient:"0",patient_id:"1",type:0},"Wed_N":{mode_id:0,mode_name:"",patient:"0",patient_id:"1",type:0},"jihao_id":"","total":"","zone_id":"","zone_type":"",sort:""}]
-
- for(let i=0;i<newArr.length;i++){
- for(let j=0;j<this.scheduleCountList.length;j++){
- newArr[i].cut = this.total
- //礼拜一上午
- if(this.scheduleCountList[j].schedule_week == 1 && this.scheduleCountList[j].schedule_type == 1){
-
- newArr[i].Mon_M.patient = this.scheduleCountList[j].Count
- }
- //礼拜一下午
- if(this.scheduleCountList[j].schedule_week == 1 && this.scheduleCountList[j].schedule_type == 2){
-
- newArr[i].Mon_A.patient = this.scheduleCountList[j].Count
- }
-
- //礼拜一晚上
- if(this.scheduleCountList[j].schedule_week == 1 && this.scheduleCountList[j].schedule_type == 3){
-
- newArr[i].Mon_N.patient = this.scheduleCountList[j].Count
- }
-
- //礼拜二上午
- if(this.scheduleCountList[j].schedule_week == 2 && this.scheduleCountList[j].schedule_type == 1){
-
- newArr[i].Tue_M.patient = this.scheduleCountList[j].Count
- }
- //礼拜二下午
- if(this.scheduleCountList[j].schedule_week == 2 && this.scheduleCountList[j].schedule_type == 2){
-
- newArr[i].Tue_A.patient = this.scheduleCountList[j].Count
- }
-
- //礼拜二晚上
- if(this.scheduleCountList[j].schedule_week == 2 && this.scheduleCountList[j].schedule_type == 3){
-
- newArr[i].Tue_N.patient = this.scheduleCountList[j].Count
- }
-
- //礼拜三上午
- if(this.scheduleCountList[j].schedule_week == 3 && this.scheduleCountList[j].schedule_type == 1){
-
- newArr[i].Wed_M.patient = this.scheduleCountList[j].Count
- }
-
- //礼拜三下午
- if(this.scheduleCountList[j].schedule_week == 3 && this.scheduleCountList[j].schedule_type == 2){
-
- newArr[i].Wed_A.patient = this.scheduleCountList[j].Count
- }
-
- //礼拜三晚上
- if(this.scheduleCountList[j].schedule_week == 3 && this.scheduleCountList[j].schedule_type == 3){
-
- newArr[i].Wed_N.patient = this.scheduleCountList[j].Count
- }
-
-
-
- //礼拜四上午
- if(this.scheduleCountList[j].schedule_week == 4 && this.scheduleCountList[j].schedule_type == 1){
-
- newArr[i].Thurs_M.patient = this.scheduleCountList[j].Count
- }
-
- //礼拜四下午
- if(this.scheduleCountList[j].schedule_week == 4 && this.scheduleCountList[j].schedule_type == 2){
-
- newArr[i].Thurs_A.patient = this.scheduleCountList[j].Count
- }
-
- //礼拜四晚上
- if(this.scheduleCountList[j].schedule_week == 4 && this.scheduleCountList[j].schedule_type == 3){
-
- newArr[i].Thurs_N.patient = this.scheduleCountList[j].Count
- }
-
-
- //礼拜五上午
- if(this.scheduleCountList[j].schedule_week == 5 && this.scheduleCountList[j].schedule_type == 1){
-
- newArr[i].Fri_M.patient = this.scheduleCountList[j].Count
- }
-
- //礼拜五下午
- if(this.scheduleCountList[j].schedule_week == 5 && this.scheduleCountList[j].schedule_type == 2){
-
- newArr[i].Fri_A.patient = this.scheduleCountList[j].Count
- }
-
- //礼拜五晚上
- if(this.scheduleCountList[j].schedule_week == 5 && this.scheduleCountList[j].schedule_type == 3){
-
- newArr[i].Fri_N.patient = this.scheduleCountList[j].Count
- }
-
-
- //礼拜六上午
- if(this.scheduleCountList[j].schedule_week == 6 && this.scheduleCountList[j].schedule_type == 1){
-
- newArr[i].Sat_M.patient = this.scheduleCountList[j].Count
- }
-
- //礼拜六下午
- if(this.scheduleCountList[j].schedule_week == 6 && this.scheduleCountList[j].schedule_type == 2){
-
- newArr[i].Sat_A.patient = this.scheduleCountList[j].Count
- }
-
- //礼拜六晚上
- if(this.scheduleCountList[j].schedule_week == 6 && this.scheduleCountList[j].schedule_type == 3){
-
- newArr[i].Sat_N.patient = this.scheduleCountList[j].Count
- }
-
-
- //礼拜日上午
- if(this.scheduleCountList[j].schedule_week == 7 && this.scheduleCountList[j].schedule_type == 1){
-
- newArr[i].Sun_M.patient = this.scheduleCountList[j].Count
- }
-
- //礼拜日下午
- if(this.scheduleCountList[j].schedule_week == 7 && this.scheduleCountList[j].schedule_type == 2){
-
- newArr[i].Sun_A.patient = this.scheduleCountList[j].Count
- }
-
- //礼拜日晚上
- if(this.scheduleCountList[j].schedule_week == 7 && this.scheduleCountList[j].schedule_type == 3){
-
- newArr[i].Sun_N.patient = this.scheduleCountList[j].Count
- }
- }
- }
- console.log("newArr222222222",newArr)
- that.scheduleZone.push(...newArr)
- for(let i=0;i<that.scheduleZone.length;i++){
- if(that.scheduleZone[i].area == "总数"){
- that.scheduleZone[i].sort = 999999
- }
- }
- that.scheduleZone.sort(this.compare('sort'))
- console.log('总数据77777777777',that.scheduleZone)
- } else {
- this.$message.error("网络错误");
- return false;
- }
- });
- },
- weekPath(week, schedule_type) {
- var weekArr = {
- 1: "Mon",
- 2: "Tue",
- 3: "Wed",
- 4: "Thurs",
- 5: "Fri",
- 6: "Sat",
- 7: "Sun"
- };
- var typeArr = { 1: "M", 2: "A", 3: "N" };
- if (
- typeof weekArr[week] === "undefined" ||
- typeof typeArr[schedule_type] === "undefined"
- ) {
- return [];
- }
- return [weekArr[week], typeArr[schedule_type]];
- },
- printAction: function() {
- // const style = '@media print {#scheduleTable{font-size:16px;} .scheduleTable tr td{text-align: center;padding: 5px;}}'
- const style = '@media print {#scheduleTable{font-size:14px;} }'
- printJS({
- printable: 'scheduleTable',
- type: 'html',
- documentTitle: ' ',
- style: style,
- scanStyles: false
- })
- },
- getPatientSheduleCount(){
- var theType = 2;
- if(this.$route.query.weekTime == "lastWeek"){
- theType = 1
- }
- if(this.$route.query.weekTime == "thisWeek"){
- theType = 2
- }
- if(this.$route.query.weekTime == "nextWeek"){
- theType = 3
- }
- if(this.$route.query.weekTime == "nextTwoWeek"){
- theType = 4
- }
- var partionStr = this.partition_id
- console.log("partionStr",partionStr)
- var arr = this.zoneIdList.join(',')
- var str = ""
- if(partionStr == 0){
- str = arr
- }
- if(partionStr != 0){
- str = partionStr
- }
- var params = {
- weekTime:theType,
- partition_id:str,
-
- }
- getPatientSheduleCount(params).then(response=>{
- if(response.data.state == 1){
- var list = response.data.data.list
- console.log("list22222",list)
-
- this.scheduleCountList = list
- var total = response.data.data.total
- console.log("totalw222",total)
- this.total = total
- }
- })
- },
- getSolutionSchedule(){
- getSolutionSchedule().then(response=>{
- if(response.data.state ==1){
- var solution = response.data.data.solution
- console.log("solution",solution)
- for(let i=0;i<solution.length;i++){
- if(solution[i].mode_id == 1){
- solution[i].mode_name = "HD"
- }
- if(solution[i].mode_id == 2){
- solution[i].mode_name = "HDF"
- }
- if(solution[i].mode_id == 3){
- solution[i].mode_name = "HD+HP"
- }
- if(solution[i].mode_id == 4){
- solution[i].mode_name = "HP"
- }
- if(solution[i].mode_id == 5){
- solution[i].mode_name = "HF"
- }
- if(solution[i].mode_id == 6){
- solution[i].mode_name = "SCUF"
- }
- if(solution[i].mode_id == 7){
- solution[i].mode_name = "IUF"
- }
- if(solution[i].mode_id == 8){
- solution[i].mode_name = "HFHD"
- }
- if(solution[i].mode_id == 9){
- solution[i].mode_name = "HFHD+HP"
- }
- if(solution[i].mode_id == 10){
- solution[i].mode_name = "PHF"
- }
- if(solution[i].mode_id == 11){
- solution[i].mode_name = "HFR"
- }
- if(solution[i].mode_id == 12){
- solution[i].mode_name = "HDF+HP"
- }
- if(solution[i].mode_id == 13){
- solution[i].mode_name = "CRRT"
- }
- if(solution[i].mode_id == 14){
- solution[i].mode_name = "腹水回输"
- }
- if(solution[i].mode_id == 19){
- solution[i].mode_name = "IUF+HD"
- }
- if(solution[i].mode_id == 20){
- solution[i].mode_name = "UF"
- }
- if(solution[i].mode_id == 21){
- solution[i].mode_name = "HD+"
- }
- if(solution[i].mode_id == 18){
- solution[i].mode_name = "SCUF"
- }
- if(solution[i].mode_id == 19){
- solution[i].mode_name = "SCUF"
- }
- if(solution[i].mode_id == 20){
- solution[i].mode_name = "SCUF"
- }
- if(solution[i].mode_id == 21){
- solution[i].mode_name = "HD+"
- }
- if(solution[i].mode_id == 22){
- solution[i].mode_name = "血浆胆红素吸附+HDF"
- }
- if(solution[i].mode_id == 23){
- solution[i].mode_name = "血浆胆红素吸附"
- }
- if(solution[i].mode_id == 24){
- solution[i].mode_name = "I-HDF"
- }
- if(solution[i].mode_id == 25){
- solution[i].mode_name = "HD高通"
- }
- if(solution[i].mode_id == 26){
- solution[i].mode_name = "CVVH"
- }
- if(solution[i].mode_id == 27){
- solution[i].mode_name = "CVVH"
- }
- if(solution[i].mode_id == 28){
- solution[i].mode_name = "CVVHDF"
- }
- if(solution[i].mode_id == 29){
- solution[i].mode_name = "PE"
- }
- if(solution[i].mode_id == 30){
- solution[i].mode_name = "血浆胆红素吸附+HP"
- }
- if(solution[i].solution!=undefined){
- solution[i].dialysis_dialyszers = solution[i].solution.dialysis_dialyszers
- solution[i].dialysis_irrigation = solution[i].solution.dialysis_irrigation
- solution[i].dialyzer_perfusion_apparatus = solution[i].solution.dialyzer_perfusion_apparatus
- }
-
- }
- this.solutionList = solution
- }
- })
- },
- getDialyzer(patient_id,mode){
- var diazers = ""
- var irrigation = ""
- for(let i=0;i<this.solutionList.length;i++){
- if(patient_id == 0){
- return ""
- }
- if(patient_id == this.solutionList[i].patient_id && mode == this.solutionList[i].mode_name){
- if(this.solutionList[i].dialyzer_perfusion_apparatus!=""){
- diazers = this.solutionList[i].dialyzer_perfusion_apparatus
- irrigation = this.solutionList[i].dialysis_irrigation
- }else{
- diazers = this.solutionList[i].dialysis_dialyszers
- irrigation = this.solutionList[i].dialysis_irrigation
-
- }
-
- }
- }
- if(irrigation!=""){
- return diazers + "/" + irrigation
- }else{
- return diazers
- }
- },
- compare (property) {
- return function (a, b) {
- var value1 = a[property]
- var value2 = b[property]
- return value1 - value2
- }
- },
- // 投屏
- touping(){
- if(this.Screencasting ==false){
-
- return this.Screencasting =true
- }else{
- return this.Screencasting =false
- }
-
- },
- getAnticoagulant(val){
- var name= ""
- if(val == 1){
- name ="无肝素"
- }
- if(val == 2){
- name ="普通肝素"
- }
- if(val == 3){
- name ="低分子肝素"
- }
- if(val == 4){
- name ="阿加曲班"
- }
- if(val == 5){
- name ="枸橼酸钠"
- }
- if(val == 6){
- name ="低分子肝素钙"
- }
- if(val == 7){
- name ="低分子肝素钠"
- }
- if(val == 8){
- name ="依诺肝素"
- }
- if(val == 9){
- name ="达肝素"
- }
- if(val == 10){
- name ="体外抗凝"
- }
- if(val == 11){
- name ="那屈肝素"
- }
- if(val == 12){
- name ="无抗凝剂"
- }
- if(val == 13){
- name ="那屈肝素钙"
- }
- if(val == 14){
- name ="肝素钙注射液"
- }
- if(val == 15){
- name ="甲磺酸萘莫司他"
- }
-
- return name
- }
- }
- }
- </script>
-
-
- <style lang="scss">
- .scheduleTablePrint{
- width: 100%;
- height: 100vh;
- .butt{
- height: 50px;
- line-height: 50px;
- }
- .tab{
- table{
- td{
- text-align: center;
- padding: 5px;
- word-wrap:break-word;
- }
- }
- }
-
- }
- </style>
- <style lang="scss" scoped>
- .fullscreenbroad{
- position: fixed;
- top: 0;
- right: 0;
- bottom: 0;
- left: 0;
- overflow: auto;
- margin: 0;
- background: #fff;
- padding: 20px;
- z-index:5000;
- height: 100%;
- // .butt{
- // margin-bottom: ;
- // }
- }
-
- </style>
|