feat: 大屏分区+呼叫分区

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

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

@ -4,7 +4,7 @@
class="h-[11.11vh] pl-[3.7vh] pr-[2.22vh] flex justify-between items-center bg-[#5D49AF] relative overflow-hidden">
<div class="logBox h-[7vh]">
<img class="h-full" :src="logoUrl" v-show="logoUrl" />
<img class="h-full" :src="logoUrlBackup" v-show="!logoUrl&&logoUrlBackup" />
<img class="h-full" :src="logoUrlBackup" v-show="!logoUrl && logoUrlBackup" />
</div>
<div class="absolute titleBox w-full flex justify-around">
<div class="flex items-center">
@ -129,7 +129,9 @@ export default {
colList: [],
queryCondition: [],
logoUrl: "",
logoUrlBackup:""
logoUrlBackup: "",
groupIndex: 0,
roomNameList: [],
};
},
methods: {
@ -152,7 +154,17 @@ export default {
})
.then(res => {
this.patientList = [];
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);
@ -221,9 +233,18 @@ export default {
try {
if (frame.body) {
let data = JSON.parse(frame.body);
this.popupMsgList.push(data['msg'].replaceAll('', ','));
this.popupMsgList.push(data['msg'].replaceAll('', ','));
this.popupMsgList.push(data['msg'].replaceAll('', ','));
if (this.groupIndex >= 0) {
if (this.roomNameList[this.groupIndex]) {
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) {
console.warn(e);
@ -296,24 +317,17 @@ export default {
this.logoUrl = item['Value']
}
if(item['Key'] == "CorporateLogo") {
if (item['Key'] == "CorporateLogo") {
this.logoUrlBackup = item['Value']
}
if (item['Key'] == "RoomName") {
this.roomNameList = JSON.parse(item['Value'])
}
})
this.onInitData()
})
}
},
mounted() {
this.$nextTick(() => {
this.onCalculate();
this.onGetblobe();
//
this.dateTimer = setInterval(() => {
this.currentDateTime = dayjs().format('YYYY-MM-DD HH:mm dddd');
}, 10000);
onInitData() {
getDynamicTableHeader({
query: 'JSDHQDP',
}).then(res => {
@ -331,13 +345,19 @@ export default {
}, 2000);
window.addEventListener('resize', this.onCalculate);
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: {
@ -372,6 +392,16 @@ export default {
return this.currentDateTime.split(' ')[1];
},
},
watch: {
'$route.params.groupIndex'(newVal) {
if (newVal) {
this.groupIndex = newVal;
} else {
this.groupIndex = -1;
}
this.onInitData();
}
},
beforeDestroy() {
//
clearInterval(this.dateTimer);

Loading…
Cancel
Save