123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978 |
- <template>
- <div>
- <el-button type="primary" @click="printAction">打印</el-button>
- <table id="scheduleTable" class="scheduleTable" border="1" cellspacing="0">
- <tr>
- <td rowspan="2">分区</td>
- <td rowspan="2">机号</td>
- <td colspan="3">周一({{ weekTitle[0] }})</td>
- <td colspan="3">周二({{ weekTitle[1] }})</td>
- <td colspan="3">周三({{ weekTitle[2] }})</td>
- <td colspan="3">周四({{ weekTitle[3] }})</td>
- <td colspan="3">周五({{ weekTitle[4] }})</td>
- <td colspan="3">周六({{ weekTitle[5] }})</td>
- <td colspan="3">周日({{ weekTitle[6] }})</td>
- <td>总数</td>
- </tr>
- <tr>
- <td>上午</td>
- <td>下午</td>
- <td>晚上</td>
- <td>上午</td>
- <td>下午</td>
- <td>晚上</td>
- <td>上午</td>
- <td>下午</td>
- <td>晚上</td>
- <td>上午</td>
- <td>下午</td>
- <td>晚上</td>
- <td>上午</td>
- <td>下午</td>
- <td>晚上</td>
- <td>上午</td>
- <td>下午</td>
- <td>晚上</td>
- <td>上午</td>
- <td>下午</td>
- <td>晚上</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;">
- <span v-if="item.Mon_M.patient_id">
- <div>{{ item.Mon_M.patient }} </div>
- <div v-if="item.Mon_M.mode_name != 'HD'">
- {{ item.Mon_M.mode_name }}
- </div>
- </span>
- </td>
- <td style="min-width:50px;">
- <span v-if="item.Mon_A.patient_id">
- <div>{{ item.Mon_A.patient }} </div>
- <div v-if="item.Mon_A.mode_name != 'HD'">{{ item.Mon_A.mode_name }}</div>
- </span>
- </td>
- <td style="min-width:50px;">
- <span v-if="item.Mon_N.patient_id">
- <div>{{ item.Mon_N.patient }}</div>
- <div v-if="item.Mon_N.mode_name != 'HD'">{{ item.Mon_N.mode_name }}</div>
- </span>
- </td>
- <td style="min-width:50px;">
- <span v-if="item.Tue_M.patient_id">
- <div>{{ item.Tue_M.patient }}</div>
- <div v-if="item.Tue_M.mode_name != 'HD'">{{ item.Tue_M.mode_name }}</div>
- </span>
- </td>
- <td style="min-width:50px;">
- <span v-if="item.Tue_A.patient_id">
- <div>{{ item.Tue_A.patient }}</div>
- <div v-if="item.Tue_A.mode_name != 'HD'">{{ item.Tue_A.mode_name }}</div>
- </span>
- </td>
- <td style="min-width:50px;">
- <span v-if="item.Tue_N.patient_id">
- <div>{{ item.Tue_N.patient }}</div>
- <div v-if="item.Tue_N.mode_name != 'HD'">{{ item.Tue_N.mode_name }}</div>
- </span>
- </td>
- <td style="min-width:50px;">
- <span v-if="item.Wed_M.patient_id">
- <div>{{ item.Wed_M.patient }}</div>
- <div v-if="item.Wed_M.mode_name != 'HD'">{{ item.Wed_M.mode_name }}</div>
- </span>
- </td>
- <td style="min-width:50px;">
- <span v-if="item.Wed_A.patient_id">
- <div>{{ item.Wed_A.patient }}</div>
- <div v-if="item.Wed_A.mode_name != 'HD'">{{ item.Wed_A.mode_name }}</div>
- </span>
- </td>
- <td style="min-width:50px;">
- <span v-if="item.Wed_N.patient_id">
- <div>{{ item.Wed_N.patient }}</div>
- <div v-if="item.Wed_N.mode_name != 'HD'">{{ item.Wed_N.mode_name }}</div>
- </span>
- </td>
- <td style="min-width:50px;">
- <span v-if="item.Thurs_M.patient_id">
- <div>{{ item.Thurs_M.patient }}</div>
- <div v-if="item.Thurs_M.mode_name != 'HD'">{{ item.Thurs_M.mode_name }}</div>
- </span>
- </td>
- <td style="min-width:50px;">
- <span v-if="item.Thurs_A.patient_id">
- <div>{{ item.Thurs_A.patient }}</div>
- <div v-if="item.Thurs_A.mode_name != 'HD'">{{ item.Thurs_A.mode_name }}</div>
- </span>
- </td>
- <td style="min-width:50px;">
- <span v-if="item.Thurs_N.patient_id">
- <div>{{ item.Thurs_N.patient }}</div>
- <div v-if="item.Thurs_N.mode_name != 'HD'">{{ item.Thurs_N.mode_name }}</div>
- </span>
- </td>
- <td style="min-width:50px;">
- <span v-if="item.Fri_M.patient_id">
- <div>{{ item.Fri_M.patient }}</div>
- <div v-if="item.Fri_M.mode_name != 'HD'">{{ item.Fri_M.mode_name }}</div>
- </span>
- </td>
- <td style="min-width:50px;">
- <span v-if="item.Fri_A.patient_id">
- <div>{{ item.Fri_A.patient }}</div>
- <div v-if="item.Fri_A.mode_name != 'HD'">{{ item.Fri_A.mode_name }}</div>
- </span>
- </td>
- <td style="min-width:50px;">
- <span v-if="item.Fri_N.patient_id">
- <div>{{ item.Fri_N.patient }}</div>
- <div v-if="item.Sat_M.mode_name != 'HD'">{{ item.Sat_M.mode_name }}</div>
- </span>
- </td>
- <td style="min-width:50px;">
- <span v-if="item.Sat_M.patient_id">
- <div>{{ item.Sat_M.patient }}</div>
- <div v-if="item.Sat_M.mode_name != 'HD'">{{ item.Sat_M.mode_name }}</div>
- </span>
- </td>
- <td style="min-width:50px;">
- <span v-if="item.Sat_A.patient_id">
- <div>{{ item.Sat_A.patient }}</div>
- <div v-if="item.Sat_A.mode_name != 'HD'">{{ item.Sat_A.mode_name }}</div>
- </span>
- </td>
- <td style="min-width:50px;">
- <span v-if="item.Sat_N.patient_id">
- <div>{{ item.Sat_N.patient }}</div>
- <div v-if="item.Sat_N.mode_name != 'HD'">{{ item.Sat_N.mode_name }}</div>
- </span>
- </td>
- <td style="min-width:50px;">
- <span v-if="item.Sun_M.patient_id">
- <div>{{ item.Sun_M.patient }}</div>
- <div v-if="item.Sun_M.mode_name != 'HD'">{{ item.Sun_M.mode_name }} </div>
- <div>{{getDialyzer(item.Sun_M.patient_id,item.Sun_M.mode_name)}}</div>
- </span>
- </td>
- <td style="min-width:50px;">
- <span v-if="item.Sun_A.patient_id">
- <div>{{ item.Sun_A.patient }}</div>
- <div v-if="item.Sun_A.mode_name != 'HD'">{{ item.Sun_A.mode_name }} </div>
- <div>{{getDialyzer(item.Sun_A.patient_id, item.Sun_A.mode_name)}}</div>
- </span>
- </td>
- <td style="min-width:50px;">
- <span v-if="item.Sun_N.patient_id">
- <div>{{ item.Sun_N.patient }}</div>
- <div v-if="item.Sun_N.mode_name != 'HD'">{{ item.Sun_N.mode_name }} </div>
- <div>{{getDialyzer(item.Sun_N.patient_id,item.Sun_N.mode_name)}}</div>
- </span>
- </td>
- <td>{{item.total}}</td>
- </tr>
- </table>
- </div>
- </template>
-
-
-
- <script>
- import {getSchedulesOne,getWeekPanelsOne,getPatientSheduleCount,getAllZones,getSolutionSchedule} from "@/api/schedule";
- import print from 'print-js'
- export default {
- props:{
- scheduleZoneProp: {
- type: Array,
- dafault: []
- },
- },
- data(){
- return{
- 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:[]
- }
- },
- created(){
- this.getAllZones()
- this.modeOptions = this.$store.getters.treatment_mode;
- this.partition_id = this.$route.query.partition_id
- 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()
- }
- })
- },
- 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,
- Mon_M: {
- schedule_id: 0,
- mode_id: 0,
- mode_name: '',
- patient_id: 0,
- patient: ''
- },
- Mon_A: {
- schedule_id: 0,
- mode_id: 0,
- mode_name: '',
- patient_id: 0,
- patient: ''
- },
- Mon_N: {
- schedule_id: 0,
- mode_id: 0,
- mode_name: '',
- patient_id: 0,
- patient: ''
- },
- Tue_M: {
- schedule_id: 0,
- mode_id: 0,
- mode_name: '',
- patient_id: 0,
- patient: ''
- },
- Tue_A: {
- schedule_id: 0,
- mode_id: 0,
- mode_name: '',
- patient_id: 0,
- patient: ''
- },
- Tue_N: {
- schedule_id: 0,
- mode_id: 0,
- mode_name: '',
- patient_id: 0,
- patient: ''
- },
- Wed_M: {
- schedule_id: 0,
- mode_id: 0,
- mode_name: '',
- patient_id: 0,
- patient: ''
- },
- Wed_A: {
- schedule_id: 0,
- mode_id: 0,
- mode_name: '',
- patient_id: 0,
- patient: ''
- },
- Wed_N: {
- schedule_id: 0,
- mode_id: 0,
- mode_name: '',
- patient_id: 0,
- patient: ''
- },
- Thurs_M: {
- schedule_id: 0,
- mode_id: 0,
- mode_name: '',
- patient_id: 0,
- patient: ''
- },
- Thurs_A: {
- schedule_id: 0,
- mode_id: 0,
- mode_name: '',
- patient_id: 0,
- patient: ''
- },
- Thurs_N: {
- schedule_id: 0,
- mode_id: 0,
- mode_name: '',
- patient_id: 0,
- patient: ''
- },
- Fri_M: {
- schedule_id: 0,
- mode_id: 0,
- mode_name: '',
- patient_id: 0,
- patient: ''
- },
- Fri_A: {
- schedule_id: 0,
- mode_id: 0,
- mode_name: '',
- patient_id: 0,
- patient: ''
- },
- Fri_N: {
- schedule_id: 0,
- mode_id: 0,
- mode_name: '',
- patient_id: 0,
- patient: ''
- },
- Sat_M: {
- schedule_id: 0,
- mode_id: 0,
- mode_name: '',
- patient_id: 0,
- patient: ''
- },
- Sat_A: {
- schedule_id: 0,
- mode_id: 0,
- mode_name: '',
- patient_id: 0,
- patient: ''
- },
- Sat_N: {
- schedule_id: 0,
- mode_id: 0,
- mode_name: '',
- patient_id: 0,
- patient: ''
- },
- Sun_A: {
- schedule_id: 0,
- mode_id: 0,
- mode_name: '',
- patient_id: 0,
- patient: ''
- },
- Sun_N: {
- schedule_id: 0,
- mode_id: 0,
- mode_name: '',
- patient_id: 0,
- patient: ''
- },
- Sun_M: {
- schedule_id: 0,
- mode_id: 0,
- mode_name: '',
- patient_id: 0,
- patient: ''
- },
- total: 0
- }
- that.scheduleZone.push(thisPa)
-
- })
- })
- }
- 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,
- }
- getSchedulesOne(params).then(response => {
- if (response.data.state == 1) {
- this.weekTitle = response.data.data.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: ""
- };
- that.scheduleZone[index].Mon_A = {
- mode_id: 0,
- mode_name: "",
- patient_id: 0,
- patient: ""
- };
- that.scheduleZone[index].Mon_N = {
- mode_id: 0,
- mode_name: "",
- patient_id: 0,
- patient: ""
- };
- that.scheduleZone[index].Tue_M = {
- mode_id: 0,
- mode_name: "",
- patient_id: 0,
- patient: ""
- };
- that.scheduleZone[index].Tue_A = {
- mode_id: 0,
- mode_name: "",
- patient_id: 0,
- patient: ""
- };
- that.scheduleZone[index].Tue_N = {
- mode_id: 0,
- mode_name: "",
- patient_id: 0,
- patient: ""
- };
- that.scheduleZone[index].Wed_M = {
- mode_id: 0,
- mode_name: "",
- patient_id: 0,
- patient: ""
- };
- that.scheduleZone[index].Wed_A = {
- mode_id: 0,
- mode_name: "",
- patient_id: 0,
- patient: ""
- };
- that.scheduleZone[index].Wed_N = {
- mode_id: 0,
- mode_name: "",
- patient_id: 0,
- patient: ""
- };
- that.scheduleZone[index].Thurs_M = {
- mode_id: 0,
- mode_name: "",
- patient_id: 0,
- patient: ""
- };
- that.scheduleZone[index].Thurs_A = {
- mode_id: 0,
- mode_name: "",
- patient_id: 0,
- patient: ""
- };
- that.scheduleZone[index].Thurs_N = {
- mode_id: 0,
- mode_name: "",
- patient_id: 0,
- patient: ""
- };
- that.scheduleZone[index].Fri_M = {
- mode_id: 0,
- mode_name: "",
- patient_id: 0,
- patient: ""
- };
- that.scheduleZone[index].Fri_A = {
- mode_id: 0,
- mode_name: "",
- patient_id: 0,
- patient: ""
- };
- that.scheduleZone[index].Fri_N = {
- mode_id: 0,
- mode_name: "",
- patient_id: 0,
- patient: ""
- };
- that.scheduleZone[index].Sat_M = {
- mode_id: 0,
- mode_name: "",
- patient_id: 0,
- patient: ""
- };
- that.scheduleZone[index].Sat_A = {
- mode_id: 0,
- mode_name: "",
- patient_id: 0,
- patient: ""
- };
- that.scheduleZone[index].Sat_N = {
- mode_id: 0,
- mode_name: "",
- patient_id: 0,
- patient: ""
- };
- that.scheduleZone[index].Sun_A = {
- mode_id: 0,
- mode_name: "",
- patient_id: 0,
- patient: ""
- };
- that.scheduleZone[index].Sun_N = {
- mode_id: 0,
- mode_name: "",
- patient_id: 0,
- patient: ""
- };
- that.scheduleZone[index].Sun_M = {
- mode_id: 0,
- mode_name: "",
- patient_id: 0,
- patient: ""
- };
- 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,
- mode_name:
- typeof that.modeOptions[schedule.mode_id] ===
- "undefined"
- ? ""
- : that.modeOptions[schedule.mode_id].name
- };
- that.scheduleZone[index].total += 1;
-
- }
-
- }
-
- });
- }
-
- });
- var newArr= [{"area":"总数","cut":0,"Fri_A":{mode_id:0,mode_name:"",patient:"0",patient_id:"1"},"Fri_M":{mode_id:0,mode_name:"",patient:"0",patient_id:"1"},"Fri_N":{mode_id:0,mode_name:"",patient:"0",patient_id:"1"},"Mon_A":{mode_id:0,mode_name:"",patient:"",patient_id:"1"},"Mon_M":{mode_id:0,mode_name:"",patient:"0",patient_id:"1"},"Mon_N":{mode_id:0,mode_name:"",patient:"0",patient_id:"1"},"Sat_A":{mode_id:0,mode_name:"",patient:"0",patient_id:"1"},"Sat_M":{mode_id:0,mode_name:"",patient:"0",patient_id:"1"},"Sat_N":{mode_id:0,mode_name:"",patient:"0",patient_id:"1"},"Sun_A":{mode_id:0,mode_name:"",patient:"0",patient_id:"1"},"Sun_M":{mode_id:0,mode_name:"",patient:"0",patient_id:"1"},"Sun_N":{mode_id:0,mode_name:"",patient:"0",patient_id:"1"},"Thurs_A":{mode_id:0,mode_name:"",patient:"0",patient_id:"1"},"Thurs_M":{mode_id:0,mode_name:"",patient:"0",patient_id:"1"},"Thurs_N":{mode_id:0,mode_name:"",patient:"0",patient_id:"1"},"Tue_A":{mode_id:0,mode_name:"",patient:"0",patient_id:"1"},"Tue_M":{mode_id:0,mode_name:"",patient:"0",patient_id:"1"},"Tue_N":{mode_id:0,mode_name:"",patient:"0",patient_id:"1"},"Wed_A":{mode_id:0,mode_name:"",patient:"0",patient_id:"1"},"Wed_M":{mode_id:0,mode_name:"",patient:"0",patient_id:"1"},"Wed_N":{mode_id:0,mode_name:"",patient:"0",patient_id:"1"},"jihao_id":"","total":"","zone_id":"","zone_type":""}]
-
-
- 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)
- 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;}}'
-
- 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"
- }
- }
- this.solutionList = solution
- }
- })
- },
- getDialyzer(patient_id,mode){
- var diazers = ""
- for(let i=0;i<this.solutionList.length;i++){
- 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
- }else{
- diazers = this.solutionList[i].dialysis_dialyszers
- if(this.solutionList[i].dialysis_dialyszers == ""){
- diazers = this.solutionList[i].dialysis_irrigation
- }
-
- }
-
- }
- }
- return diazers
- }
- }
- }
- </script>
-
-
- <style lang="scss">
- td{
- text-align: center;
- padding: 5px;
- }
- </style>
|