update 调整银川大屏和西安大屏

This commit is contained in:
zk
2024-05-17 13:07:39 +08:00
parent 45aec85fad
commit 13faaa92a6
15 changed files with 145 additions and 88 deletions
+20 -7
View File
@@ -10,15 +10,15 @@
<div class="body-d">
<div class="body-d-left">
<one-l :setting="setting" :refreshState="refreshState" @handleClick="handlePhoneDialog" />
<two-l :refreshState="refreshState" />
<three-l :refreshState="refreshState" />
<two-l :key="tabState" :refreshState="refreshState" />
<three-l :key="tabState" :setting="setting" :refreshState="refreshState" />
</div>
<div class="body-d-middle">
<china-map />
</div>
<div class="body-d-right">
<one-r :setting="setting" :refreshState="refreshState" />
<two-r :refreshState="refreshState" />
<two-r :key="tabState" :setting="setting" :refreshState="refreshState" />
<three-r :key="refreshState" />
</div>
</div>
@@ -29,7 +29,7 @@
</div>
</template>
<script setup lang="ts">
import { onUnmounted, ref, watch, nextTick } from 'vue';
import { onUnmounted, ref, watch, nextTick, onMounted } from 'vue';
import OneL from '/@/components/body-d-left/oneL.vue';
import TwoL from '/@/components/body-d-left/twoL.vue';
import ThreeL from '/@/components/body-d-left/threeL.vue';
@@ -44,6 +44,7 @@
import { useRefresh } from '/@/hooks/autoRefresh';
import { DEFAULT_TIME } from '/@/hooks/autoRefresh/pageRefreshTime.ts';
import { DataType, getSettings } from '/@/utils/settings.ts';
import { ServerDetailType } from '/@/components/body-d-left/bodyLeftHooks.ts';
import PhoneDialog from '/@/views/components/phoneDialog/phoneDialog.vue';
const { refreshState } = useRefresh(DEFAULT_TIME);
@@ -65,10 +66,22 @@
dayTimeT.value = timeRight;
}
onMounted(() => {
init();
document.addEventListener('visibilitychange', checkTabState);
});
onUnmounted(() => {
clearInterval(interval.value);
document.removeEventListener('visibilitychange', checkTabState);
});
init();
const tabState = ref('');
//判断窗口是否处于激活状态,切换浏览器tab会导致部门echarts显示不正常
function checkTabState() {
tabState.value = document.hidden ? 'inactive' : 'active';
}
// 健康监测工具报警
const { socketData, setSocketData, closeSocket } = useSocket(basicPath);
const employeeDialogRef = ref();
@@ -113,11 +126,11 @@
nextTick(() => {
//呼入电话
if (key == 'gross') {
phoneType.value = '2';
phoneType.value = ServerDetailType['gross'];
}
//受理电话
if (key == 'alerdyreceive') {
phoneType.value = '1';
phoneType.value = ServerDetailType['alerdyreceive'];
}
phoneDialogTitle.value = name;
phoneDialogRef.value.openDialog();