update
This commit is contained in:
@@ -20,7 +20,7 @@
|
||||
</Dialog>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import { computed, nextTick, ref, watch } from 'vue';
|
||||
import { computed, ref, watch } from 'vue';
|
||||
import Dialog from '/@/components/dialog/Dialog.vue';
|
||||
import { useDialog } from '/@/views/components/dialogHooks.ts';
|
||||
import BasicTable from '/@/components/secondaryScreen/secondMap/components/basicTable/BasicTable.vue';
|
||||
@@ -91,15 +91,9 @@
|
||||
}));
|
||||
const { visible, title, closeDialog, openDialog } = useDialog({ title: props.title });
|
||||
const registerTable = ref();
|
||||
watch(
|
||||
props,
|
||||
() => {
|
||||
registerTable.value?.getRecords();
|
||||
}
|
||||
// {
|
||||
// immediate: true,
|
||||
// }
|
||||
);
|
||||
watch(props, () => {
|
||||
registerTable.value?.getRecords();
|
||||
});
|
||||
defineExpose({
|
||||
openDialog,
|
||||
});
|
||||
|
||||
+1
-1
@@ -77,7 +77,7 @@
|
||||
|
||||
const tabState = ref('');
|
||||
|
||||
//判断窗口是否处于激活状态,切换浏览器tab会导致部门echarts显示不正常
|
||||
//判断窗口是否处于激活状态,切换浏览器tab会导致部分echarts显示不正常
|
||||
function checkTabState() {
|
||||
tabState.value = document.hidden ? 'inactive' : 'active';
|
||||
}
|
||||
|
||||
+15
-3
@@ -14,7 +14,7 @@
|
||||
</div>
|
||||
<div class="body-d">
|
||||
<div class="body-d-left">
|
||||
<screen-left :orgCode="orgCode" :type="type" :refreshState="refreshState" />
|
||||
<screen-left :key="tabState" :orgCode="orgCode" :type="type" :refreshState="refreshState" />
|
||||
</div>
|
||||
<div class="body-d-middle">
|
||||
<SecondMap :orgCode="orgCode" :type="type">
|
||||
@@ -31,8 +31,8 @@
|
||||
</SecondMap>
|
||||
</div>
|
||||
<div class="body-d-right">
|
||||
<one-r :orgCode="orgCode" :type="type" :refreshState="refreshState" />
|
||||
<two-r :orgCode="orgCode" :type="type" :refreshState="refreshState" />
|
||||
<one-r :key="tabState" :orgCode="orgCode" :type="type" :refreshState="refreshState" />
|
||||
<two-r :key="tabState" :orgCode="orgCode" :type="type" :refreshState="refreshState" />
|
||||
<three-r :orgCode="orgCode" :type="type" :refreshState="refreshState" />
|
||||
</div>
|
||||
</div>
|
||||
@@ -53,6 +53,7 @@
|
||||
import { useUserStore } from '/@/store/modules/user.ts';
|
||||
import { useRefresh } from '/@/hooks/autoRefresh';
|
||||
import { DEFAULT_TIME } from '/@/hooks/autoRefresh/pageRefreshTime.ts';
|
||||
import { onUnmounted } from 'vue';
|
||||
|
||||
const { refreshState } = useRefresh(DEFAULT_TIME);
|
||||
const useStore = useUserStore();
|
||||
@@ -66,7 +67,18 @@
|
||||
});
|
||||
}
|
||||
init();
|
||||
document.addEventListener('visibilitychange', checkTabState);
|
||||
});
|
||||
onUnmounted(() => {
|
||||
document.removeEventListener('visibilitychange', checkTabState);
|
||||
});
|
||||
const tabState = ref('');
|
||||
|
||||
//判断窗口是否处于激活状态,切换浏览器tab会导致部分echarts显示不正常
|
||||
function checkTabState() {
|
||||
tabState.value = document.hidden ? 'inactive' : 'active';
|
||||
}
|
||||
|
||||
const { type, timeRangeOption } = useTimeType('week');
|
||||
|
||||
function init() {
|
||||
|
||||
@@ -98,12 +98,14 @@
|
||||
import { useMessage } from '/@/hooks/web/useMessage';
|
||||
import { t } from '/@/hooks/locales/useLocales.ts';
|
||||
import { encipher } from '/@/utils/jsencrypt';
|
||||
import { useRouter } from 'vue-router';
|
||||
import { useRoute, useRouter } from 'vue-router';
|
||||
import { getAuthCache } from '/@/utils/auth.ts';
|
||||
import { TOKEN_KEY } from '/@/enum/cacheEnum.ts';
|
||||
import { PageEnum, setBaseLogin } from '/@/enum/pageEnum.ts';
|
||||
|
||||
const router = useRouter();
|
||||
// console.log(t('login'));
|
||||
const route = useRoute();
|
||||
console.log('route', route);
|
||||
const prefixCls = 'mini-login';
|
||||
const { notification, createMessage } = useMessage();
|
||||
const userStore = useUserStore();
|
||||
@@ -188,7 +190,10 @@
|
||||
description: `${t('login.loginSuccessDesc')}: ${userInfo.realname}`,
|
||||
duration: 3,
|
||||
});
|
||||
router.replace({ path: '/home' });
|
||||
|
||||
let path = route.path == PageEnum.BASE_LOGIN_YINCHUAN ? PageEnum.YINCHUAN_HOME : PageEnum.BASE_HOME;
|
||||
setBaseLogin(route.path);
|
||||
router.replace({ path: path });
|
||||
}
|
||||
} catch (error) {
|
||||
notification.error({
|
||||
@@ -312,4 +317,4 @@
|
||||
.ant-btn-primary:not(.ant-btn-background-ghost):not([disabled]) {
|
||||
color: #fff;
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
<template></template>
|
||||
<script setup lang="ts">
|
||||
import { useRoute, useRouter } from 'vue-router';
|
||||
import { setBaseLogin } from '/@/enum/pageEnum.ts';
|
||||
import { getUserInfo } from '/@/api/user.ts';
|
||||
import { useUserStore } from '/@/store/modules/user.ts';
|
||||
|
||||
const route = useRoute();
|
||||
const router = useRouter();
|
||||
const userStore = useUserStore();
|
||||
const { baseLogin, baseHome, msg } = JSON.parse(route.query.data);
|
||||
setBaseLogin(baseLogin);
|
||||
getUserInfo().then((res) => {
|
||||
const { code, result } = res;
|
||||
if (code == 200) {
|
||||
userStore.setToken(msg);
|
||||
userStore.setUserInfo(result.userInfo);
|
||||
router.push(baseHome);
|
||||
}
|
||||
});
|
||||
console.log('route', route);
|
||||
</script>
|
||||
<style scoped lang="less"></style>
|
||||
@@ -1,17 +1,16 @@
|
||||
<template>
|
||||
<Dialog :openVis="visible" width="50%" title="健康终端报警列表" @close="closeDialog" :maskClosable="false">
|
||||
<template #container>
|
||||
<BasicTable class="table-container" :columns="columns" :api="getPhoneList" :apiParams="formState"></BasicTable>
|
||||
<BasicTable ref="registerTable" class="table-container" :columns="columns" :api="getMonitorList" :apiParams="formState"></BasicTable>
|
||||
</template>
|
||||
</Dialog>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import { ref } from 'vue';
|
||||
import { computed, ref, watch } from 'vue';
|
||||
import Dialog from '/@/components/dialog/Dialog.vue';
|
||||
import { useDialog } from '/@/views/components/dialogHooks.ts';
|
||||
import BasicTable from '/@/components/secondaryScreen/secondMap/components/basicTable/BasicTable.vue';
|
||||
import { SexType, sexTypeList } from '/@/utils/settings.ts';
|
||||
import { getPhoneList } from '/@/views/yinChuan/yinChuan.api.ts';
|
||||
import { getMonitorList } from '/@/components/body-d-right/right.api.ts';
|
||||
|
||||
const props = defineProps({
|
||||
record: Object,
|
||||
@@ -26,47 +25,52 @@
|
||||
const columns = [
|
||||
{
|
||||
title: '姓名',
|
||||
dataIndex: 'name',
|
||||
key: 'name',
|
||||
dataIndex: 'realName',
|
||||
key: 'realName',
|
||||
},
|
||||
{
|
||||
title: '二级单位',
|
||||
dataIndex: 'department',
|
||||
key: 'department',
|
||||
dataIndex: 'orgName1',
|
||||
key: 'orgName1',
|
||||
},
|
||||
{
|
||||
title: '联系电话',
|
||||
dataIndex: 'sex',
|
||||
key: 'sex',
|
||||
dataIndex: 'phone',
|
||||
key: 'phone',
|
||||
},
|
||||
{
|
||||
title: '异常事件',
|
||||
dataIndex: 'time',
|
||||
key: 'time',
|
||||
dataIndex: 'eventType_dictText',
|
||||
key: 'eventType_dictText',
|
||||
},
|
||||
{
|
||||
title: '异常值',
|
||||
dataIndex: 'time',
|
||||
key: 'time',
|
||||
dataIndex: 'dataValue',
|
||||
key: 'dataValue',
|
||||
},
|
||||
{
|
||||
title: '发生时间',
|
||||
dataIndex: 'time',
|
||||
key: 'time',
|
||||
dataIndex: 'warnTime',
|
||||
key: 'warnTime',
|
||||
},
|
||||
{
|
||||
title: '发生地点',
|
||||
dataIndex: 'time',
|
||||
key: 'time',
|
||||
dataIndex: 'address',
|
||||
key: 'address',
|
||||
customRender: ({ record }) => {
|
||||
return record?.address || record?.gpsErrorMsg;
|
||||
},
|
||||
},
|
||||
];
|
||||
const formState = ref({
|
||||
sex: SexType.all,
|
||||
const formState = computed(() => ({
|
||||
dataType: props.setting.dataType,
|
||||
phoneType: props.phoneType,
|
||||
orgCode: props.setting?.orgCode,
|
||||
}));
|
||||
const { visible, closeDialog, openDialog } = useDialog({ title: props.title });
|
||||
const registerTable = ref();
|
||||
watch(props, () => {
|
||||
registerTable.value?.getRecords();
|
||||
});
|
||||
const { visible, title, closeDialog, openDialog } = useDialog({ title: props.title });
|
||||
|
||||
defineExpose({
|
||||
openDialog,
|
||||
});
|
||||
|
||||
@@ -3,7 +3,7 @@ import { get } from '/@/api/request';
|
||||
export enum Api {
|
||||
phoneList = '/health-emergency/emergency/tblUserHelp/phoneList',
|
||||
getWorkDaily = '/health-emergency/emergency/ycLargeScreen/medicalCenter',
|
||||
getTeamHealth = '/health-archives/archives/groupUserA/getGroupUserAInfo',
|
||||
getTeamHealth = '/health-emergency/emergency/ycLargeScreen/userHealthCenter',
|
||||
}
|
||||
|
||||
// 呼入电话、受理电话
|
||||
|
||||
@@ -49,7 +49,6 @@
|
||||
import { basicPath, emergencyPath, useSocket } from '/@/utils/socket.ts';
|
||||
import { useRefresh } from '/@/hooks/autoRefresh';
|
||||
import { DEFAULT_TIME } from '/@/hooks/autoRefresh/pageRefreshTime.ts';
|
||||
// import { useUserStore } from '/@/store/modules/user.ts';
|
||||
import { useRoute } from 'vue-router';
|
||||
import { DataType, getSettings } from '/@/utils/settings.ts';
|
||||
import { ServerDetailType } from '/@/components/body-d-left/bodyLeftHooks.ts';
|
||||
@@ -57,14 +56,6 @@
|
||||
const route = useRoute();
|
||||
const setting = getSettings(DataType.yinChuan);
|
||||
onMounted(() => {
|
||||
// const userStore = useUserStore();
|
||||
// let data = JSON.parse(route.query.data as string);
|
||||
// if (data.token) {
|
||||
// localStorage.setItem('token', data.token);
|
||||
// userStore.setToken(data.token);
|
||||
// userStore.setUserInfo(data.userInfo);
|
||||
// console.log(useUserStore);
|
||||
// }
|
||||
init();
|
||||
document.addEventListener('visibilitychange', checkTabState);
|
||||
});
|
||||
@@ -74,7 +65,7 @@
|
||||
});
|
||||
const tabState = ref('');
|
||||
|
||||
//判断窗口是否处于激活状态,切换浏览器tab会导致部门echarts显示不正常
|
||||
//判断窗口是否处于激活状态,切换浏览器tab会导致部分echarts显示不正常
|
||||
function checkTabState() {
|
||||
tabState.value = document.hidden ? 'inactive' : 'active';
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user