diff --git a/src/router/index.js b/src/router/index.js
index e02d100..798273f 100644
--- a/src/router/index.js
+++ b/src/router/index.js
@@ -41,7 +41,7 @@ const routes = [
],
},
{
- path: '/waitList',
+ path: '/waitList/:groupIndex?',
name: 'waitList',
meta: { title: '家属等候大屏' },
component: () => import('@/views/waitList/index.vue'),
diff --git a/src/views/waitList/index.vue b/src/views/waitList/index.vue
index a5f902c..7642838 100644
--- a/src/views/waitList/index.vue
+++ b/src/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">
@@ -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);
@@ -294,26 +315,19 @@ export default {
res['Data']['Item'].forEach(item => {
if (item['Key'] == 'HospitalLogo') {
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);