feat: 大屏分区+呼叫分区

main
shengwen.chen 1 month ago
parent 7386f85283
commit 1ad983b6e3

@ -41,7 +41,7 @@ const routes = [
], ],
}, },
{ {
path: '/waitList', path: '/waitList/:groupIndex?',
name: 'waitList', name: 'waitList',
meta: { title: '家属等候大屏' }, meta: { title: '家属等候大屏' },
component: () => import('@/views/waitList/index.vue'), component: () => import('@/views/waitList/index.vue'),

@ -129,7 +129,9 @@ export default {
colList: [], colList: [],
queryCondition: [], queryCondition: [],
logoUrl: "", logoUrl: "",
logoUrlBackup:"" logoUrlBackup: "",
groupIndex: 0,
roomNameList: [],
}; };
}, },
methods: { methods: {
@ -152,7 +154,17 @@ export default {
}) })
.then(res => { .then(res => {
this.patientList = []; this.patientList = [];
if (res['Data']['Data']['length']) { 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++) { for (let index = 0; index < res['Data']['Data']['length']; index++) {
const element = res['Data']['Data'][index]; const element = res['Data']['Data'][index];
const groupIndex = parseInt(index / this.showItemNum); const groupIndex = parseInt(index / this.showItemNum);
@ -221,9 +233,18 @@ export default {
try { try {
if (frame.body) { if (frame.body) {
let data = JSON.parse(frame.body); let data = JSON.parse(frame.body);
this.popupMsgList.push(data['msg'].replaceAll('', ',')); if (this.groupIndex >= 0) {
this.popupMsgList.push(data['msg'].replaceAll('', ',')); if (this.roomNameList[this.groupIndex]) {
this.popupMsgList.push(data['msg'].replaceAll('', ',')); if (!this.roomNameList[this.groupIndex].includes(data['msg']['patientRoomName'])) {
return
}
} else {
return;
}
}
this.popupMsgList.push(data['msg']['notice'].replaceAll('', ','));
this.popupMsgList.push(data['msg']['notice'].replaceAll('', ','));
this.popupMsgList.push(data['msg']['notice'].replaceAll('', ','));
} }
} catch (e) { } catch (e) {
console.warn(e); console.warn(e);
@ -299,21 +320,14 @@ export default {
if (item['Key'] == "CorporateLogo") { if (item['Key'] == "CorporateLogo") {
this.logoUrlBackup = item['Value'] this.logoUrlBackup = item['Value']
} }
if (item['Key'] == "RoomName") {
this.roomNameList = JSON.parse(item['Value'])
}
}) })
this.onInitData()
}) })
}
}, },
mounted() { onInitData() {
this.$nextTick(() => {
this.onCalculate();
this.onGetblobe();
//
this.dateTimer = setInterval(() => {
this.currentDateTime = dayjs().format('YYYY-MM-DD HH:mm dddd');
}, 10000);
getDynamicTableHeader({ getDynamicTableHeader({
query: 'JSDHQDP', query: 'JSDHQDP',
}).then(res => { }).then(res => {
@ -331,13 +345,19 @@ export default {
}, 2000); }, 2000);
window.addEventListener('resize', this.onCalculate); window.addEventListener('resize', this.onCalculate);
this.setRabitMQ(); this.setRabitMQ();
// setTimeout(() => {
// this.popupMsgList.push(',,#,');
// this.popupMsgList.push(',,#,');
// this.popupMsgList.push(',,#,');
// }, 3000);
}); });
}
},
mounted() {
this.$nextTick(() => {
this.onCalculate();
this.onGetblobe();
//
this.dateTimer = setInterval(() => {
this.currentDateTime = dayjs().format('YYYY-MM-DD HH:mm dddd');
}, 10000);
}); });
}, },
components: { components: {
@ -372,6 +392,16 @@ export default {
return this.currentDateTime.split(' ')[1]; return this.currentDateTime.split(' ')[1];
}, },
}, },
watch: {
'$route.params.groupIndex'(newVal) {
if (newVal) {
this.groupIndex = newVal;
} else {
this.groupIndex = -1;
}
this.onInitData();
}
},
beforeDestroy() { beforeDestroy() {
// //
clearInterval(this.dateTimer); clearInterval(this.dateTimer);

Loading…
Cancel
Save