feat: 完成手术排程增加分区功能

main
shengwen.chen 1 month ago
parent 4144b56141
commit 043dcd1144

@ -47,7 +47,7 @@ const routes = [
component: () => import('@/views/waitList/index.vue'),
},
{
path: '/scheduleList',
path: '/scheduleList/:groupIndex?',
name: 'scheduleList',
meta: { title: '手术排程' },
component: () => import('@/views/scheduleList/index.vue'),

@ -113,6 +113,8 @@ export default {
queryCondition: [],
logoUrl: "",
logoUrlBackup: "",
groupIndex: -1,
roomNameList: [],
};
},
methods: {
@ -134,7 +136,18 @@ export default {
})
.then(res => {
this.patientList = [];
console.log(res['Data']['Data']);
if (res['Data']['Data']['length']) {
if (this.groupIndex >= 0) {
if (this.roomNameList[this.groupIndex]) {
res['Data']['Data'] = res['Data']['Data'].filter(item => {
return this.roomNameList[this.groupIndex].includes(item['RoomName'])
})
} else {
res['Data']['Data'] = [];
}
}
for (let index = 0; index < res['Data']['Data']['length']; index++) {
const element = res['Data']['Data'][index];
const groupIndex = parseInt(index / this.showItemNum);
@ -196,8 +209,10 @@ export default {
if (item['Key'] == "CorporateLogo") {
this.logoUrlBackup = item['Value']
}
if (item['Key'] == "RoomName") {
this.roomNameList = JSON.parse(item['Value'])
}
})
})
}
},
@ -259,6 +274,16 @@ export default {
return this.currentDateTime.split(' ')[1];
},
},
watch: {
'$route.params.groupIndex'(newVal) {
if (newVal) {
this.groupIndex = newVal;
} else {
this.groupIndex = -1;
}
this.onGetPageData();
}
},
beforeDestroy() {
//
clearInterval(this.dateTimer);

@ -267,7 +267,7 @@ export default {
this.popupMag = this.popupMsgList[0].replace(/[,]/g, '').split('#');
this.showPopup = true;
this.playNum++;
if (this.synth) {
const utterance = new SpeechSynthesisUtterance(this.popupMsgList[0].replace(/#/g, ''));
utterance.rate = 0.6;
@ -328,10 +328,17 @@ export default {
this.roomNameList = JSON.parse(item['Value'])
}
})
this.onInitData()
})
},
onInitData() {
},
mounted() {
this.$nextTick(() => {
this.onCalculate();
this.onGetblobe();
//
this.dateTimer = setInterval(() => {
this.currentDateTime = dayjs().format('YYYY-MM-DD HH:mm dddd');
}, 10000);
getDynamicTableHeader({
query: 'JSDHQDP',
}).then(res => {
@ -344,22 +351,12 @@ export default {
this.getDataTimer = setInterval(() => {
this.onGetPageData();
}, 35000);
this.popupTimer = setInterval(() => {
this.onPopupPlay();
}, 2000);
window.addEventListener('resize', this.onCalculate);
this.setRabitMQ();
});
}
},
mounted() {
this.$nextTick(() => {
this.onCalculate();
this.onGetblobe();
//
this.dateTimer = setInterval(() => {
this.currentDateTime = dayjs().format('YYYY-MM-DD HH:mm dddd');
}, 10000);
this.popupTimer = setInterval(() => {
this.onPopupPlay();
}, 2000);
// setTimeout(() => {
// this.popupMsgList.push(',,#,');
// this.popupMsgList.push(',,#,');
@ -406,7 +403,7 @@ export default {
} else {
this.groupIndex = -1;
}
this.onInitData();
this.onGetPageData();
}
},
beforeDestroy() {

Loading…
Cancel
Save