update: 修改接口路径,弹窗搬运
This commit is contained in:
@@ -32,6 +32,8 @@ export const caching = {
|
||||
TEAM_HEALTH_NEW: 'TEAM_HEALTH_NEW',
|
||||
//体检数据
|
||||
PHYSICAL_DATA: 'PHYSICAL_DATA',
|
||||
//健康终端报警
|
||||
RIGHT_KEY1_NEW: 'RIGHT_KEY1_NEW',
|
||||
/************************新应急中心***************************/
|
||||
};
|
||||
|
||||
|
||||
@@ -19,6 +19,7 @@ export const useUserStore = defineStore({
|
||||
themeType: '', // dark 1, light 2
|
||||
flag1: '', //银川权限标识
|
||||
flag2: '', //西安权限标识
|
||||
centerId: '', //中心点id
|
||||
}),
|
||||
getters: {
|
||||
getUserInfo(): UserInfo {
|
||||
@@ -39,6 +40,9 @@ export const useUserStore = defineStore({
|
||||
getFlag2(): string {
|
||||
return this.flag2 || getAuthCache('flag2');
|
||||
},
|
||||
getCenterId(): string {
|
||||
return this.centerId || getAuthCache('centerId');
|
||||
},
|
||||
},
|
||||
actions: {
|
||||
setToken(info: string | undefined) {
|
||||
@@ -64,6 +68,10 @@ export const useUserStore = defineStore({
|
||||
this.flag2 = info ? info : '';
|
||||
setAuthCache('flag2', info);
|
||||
},
|
||||
setCenterId(info: string | undefined) {
|
||||
this.centerId = info ? info : '';
|
||||
setAuthCache('centerId', info);
|
||||
},
|
||||
/**
|
||||
* 登录事件
|
||||
*/
|
||||
|
||||
@@ -1,30 +1,52 @@
|
||||
import { get } from '/@/api/request.ts';
|
||||
import { get, post } from '/@/api/request.ts';
|
||||
|
||||
enum Api {
|
||||
server = '/health-emergency/emergency/tblUserHelp/statistics',
|
||||
getWorkDaily = '/health-emergency/emergency/ycLargeScreen/medicalCenter',
|
||||
getTeamHealth = '/health-emergency/emergency/ycLargeScreen/userHealthCenter',
|
||||
getDetail = '/health-medical/medical/hospital/getMedicalHospital',
|
||||
phoneList = '/health-emergency/emergency/tblUserHelp/phoneList',
|
||||
getMonitorList = '/health-watch/watch/watchMonitorData/getMonitorList',
|
||||
statisticsNew = '/health-emergency/emergency/LargeScreenNew/statisticsNew',
|
||||
phoneListNew = '/health-emergency/emergency/LargeScreenNew/phoneListNew',
|
||||
medicalCenterNew = '/health-emergency/emergency/LargeScreenNew/medicalCenterNew',
|
||||
userHealthCenterNew = '/health-emergency/emergency/LargeScreenNew/userHealthCenterNew',
|
||||
getAllListNew = '/health-emergency/emergency/LargeScreenNew/getAllListNew',
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: 服务详情数据
|
||||
* @param params
|
||||
*/
|
||||
export const serverApi = (params: any) => get(Api.server, params);
|
||||
// export const serverApi = (params: any) => get(Api.server, params);
|
||||
export const statisticsNewApi = (params: any) => post(Api.statisticsNew, params);
|
||||
|
||||
/**
|
||||
* @description 一线医疗点每日工作动态
|
||||
* @param params
|
||||
*/
|
||||
export const getWorkDaily = (params: any) => get(Api.getWorkDaily, params);
|
||||
// export const getWorkDaily = (params: any) => get(Api.getWorkDaily, params);
|
||||
export const medicalCenterNew = (params: any) => post(Api.medicalCenterNew, params);
|
||||
/**
|
||||
* @description 员工队伍健康状况
|
||||
* @param params
|
||||
*/
|
||||
export const getTeamHealthApi = (params: any) => get(Api.getTeamHealth, params);
|
||||
// export const getTeamHealthApi = (params: any) => get(Api.getTeamHealth, params);
|
||||
|
||||
export const userHealthCenterNew = (params: any) => get(Api.userHealthCenterNew, params);
|
||||
/**
|
||||
* @description 获取体检数据
|
||||
* @param params
|
||||
*/
|
||||
export const getPhysicalData = (params: any) => get(Api.getDetail, params);
|
||||
/**
|
||||
* @description 呼入电话、受理电话
|
||||
* @param params
|
||||
*/
|
||||
export const getPhoneList = (params: any) => post(Api.phoneListNew, params);
|
||||
|
||||
//健康终端报警
|
||||
export const getMonitorList = (params: any) => get(Api.getMonitorList, params);
|
||||
|
||||
//获取所有资源
|
||||
export const getAllListNew = (params: any) => post(Api.getAllListNew, params);
|
||||
|
||||
@@ -42,15 +42,20 @@
|
||||
<PhysicalExaminationData :key="tabState" :refreshState="refreshState" :setting="setting" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="bottom-d"></div>
|
||||
<div class="bottom-d">
|
||||
<!--呼入电话、受理电话-->
|
||||
<PhoneDialog ref="phoneDialogRef" :phoneType="phoneType" :setting="setting" :title="phoneDialogTitle" :useForm="true" />
|
||||
<!--健康终端查看详情-->
|
||||
<TerminakAlarmDialog ref="terminalAlarmDialogRef" :setting="setting" />
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import { onMounted, onUnmounted, ref } from 'vue';
|
||||
import { onMounted, onUnmounted, ref, nextTick } from 'vue';
|
||||
import { YinChuanOption } from '/@/assets/mapUtils/mapConstant.ts';
|
||||
import ServiceDetails from '/@/views/centralScreen/components/serviceDetails.vue';
|
||||
import CenterMap from '/@/views/centralScreen/components/centerMap.vue';
|
||||
import TerminalAlarm from '/@/components/body-d-right/oneR.vue';
|
||||
import TerminalAlarm from '/@/views/centralScreen/components/terminalAlarm.vue';
|
||||
import DailyWorkTrends from '/@/views/centralScreen/components/dailyWorkTrends.vue';
|
||||
import EmployeeHealth from '/@/views/centralScreen/components/employeeHealth.vue';
|
||||
import PhysicalExaminationData from '/@/views/centralScreen/components/physicalExaminationData.vue';
|
||||
@@ -59,6 +64,9 @@
|
||||
import { useTopTime } from '/@/utils/utils.ts';
|
||||
import { DataType, getSettings, ThemeType } from '/@/utils/settings.ts';
|
||||
import { useUserStore } from '/@/store/modules/user.ts';
|
||||
import PhoneDialog from '/@/views/centralScreen/components/phoneDialog.vue';
|
||||
import { ServerDetailType } from '/@/components/body-d-left/bodyLeftHooks.ts';
|
||||
import TerminakAlarmDialog from '/@/views/centralScreen/components/terminakAlarmDialog.vue';
|
||||
|
||||
const { refreshState } = useRefresh(DEFAULT_TIME);
|
||||
const dayTimeO = ref();
|
||||
@@ -110,18 +118,20 @@
|
||||
function handlePhoneDialog(item) {
|
||||
const { name, key } = item;
|
||||
//呼入电话
|
||||
if (key == 'gross') {
|
||||
phoneType.value = ServerDetailType['gross'];
|
||||
//受理电话
|
||||
if (key == 'alerdyreceive') {
|
||||
phoneType.value = ServerDetailType['alerdyreceive'];
|
||||
}
|
||||
//受理电话
|
||||
if (key == 'alerdyreceive' || key == 'gross') {
|
||||
phoneType.value = ServerDetailType[key];
|
||||
phoneDialogTitle.value = name;
|
||||
nextTick(() => {
|
||||
phoneDialogTitle.value = name;
|
||||
phoneDialogRef.value.openDialog();
|
||||
});
|
||||
}
|
||||
}
|
||||
const terminalAlarmDialogRef = ref();
|
||||
//终端预警列表弹窗
|
||||
function handleEmployeeDialog() {
|
||||
terminalAlarmDialogRef.value.openDialog();
|
||||
}
|
||||
</script>
|
||||
<style lang="less" scoped>
|
||||
.outer {
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
import PublicTitle from '/@/components/publicTitle.vue';
|
||||
import { onMounted, ref } from 'vue';
|
||||
import { caching, useSession } from '/@/hooks/autoRefresh/caching.ts';
|
||||
import { getWorkDaily } from '/@/views/centralScreen/centralScreen.api.ts';
|
||||
import { medicalCenterNew } from '/@/views/centralScreen/centralScreen.api.ts';
|
||||
|
||||
const { setSession, getSession } = useSession();
|
||||
const { WORK_DAILY_NEW } = caching;
|
||||
@@ -28,7 +28,7 @@
|
||||
|
||||
async function getTrendsData() {
|
||||
try {
|
||||
const { code, result } = await getWorkDaily({});
|
||||
const { code, result } = await medicalCenterNew({});
|
||||
if (code != 200) {
|
||||
return;
|
||||
}
|
||||
@@ -50,7 +50,7 @@
|
||||
|
||||
.trends-item {
|
||||
font-size: 16px;
|
||||
padding: 10px 20px;
|
||||
padding: 10px 20px 5px;
|
||||
|
||||
.trends-title-con {
|
||||
display: flex;
|
||||
@@ -77,8 +77,14 @@
|
||||
}
|
||||
|
||||
.trends-item-span {
|
||||
//flex: 1;
|
||||
//color: #ededed;
|
||||
flex: 1;
|
||||
color: #ededed;
|
||||
color: #d0c4c4;
|
||||
font-size: 13px;
|
||||
justify-content: space-around;
|
||||
display: flex;
|
||||
margin-top: 5px;
|
||||
}
|
||||
|
||||
.trends-item-span:first-child {
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
</template>
|
||||
</public-title>
|
||||
<div class="inner">
|
||||
<div v-for="item in list" :key="item.label" class="health-item">
|
||||
<div v-for="(item, index) in list" :key="index" class="health-item">
|
||||
<span>{{ item.label }}</span>
|
||||
<span>{{ item.value }}</span>
|
||||
</div>
|
||||
@@ -17,7 +17,7 @@
|
||||
import { onMounted, ref } from 'vue';
|
||||
import PublicTitle from '/@/components/publicTitle.vue';
|
||||
import { caching, useSession } from '/@/hooks/autoRefresh/caching.ts';
|
||||
import { getTeamHealthApi } from '/@/views/centralScreen/centralScreen.api.ts';
|
||||
import { userHealthCenterNew } from '/@/views/centralScreen/centralScreen.api.ts';
|
||||
|
||||
const props = defineProps({
|
||||
setting: Object,
|
||||
@@ -68,7 +68,7 @@
|
||||
|
||||
async function viewDetail() {
|
||||
try {
|
||||
const { code, result } = await getTeamHealthApi({ dataType: props.setting?.dataType });
|
||||
const { code, result } = await userHealthCenterNew({ dataType: props.setting?.dataType });
|
||||
if (code != 200) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -91,6 +91,7 @@
|
||||
});
|
||||
const formState = computed(() => ({
|
||||
...formRecord.value,
|
||||
centerId: '',
|
||||
dataType: props.setting.dataType,
|
||||
phoneType: props.phoneType,
|
||||
showType: '0',
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
import { useDetailStore } from '/@/store/modules/detailData.ts';
|
||||
import { useSession, caching } from '/@/hooks/autoRefresh/caching.ts';
|
||||
import { useTheme } from '/@/hooks/theme/useTheme.ts';
|
||||
import { serverApi } from '/@/views/centralScreen/centralScreen.api.ts';
|
||||
import { statisticsNewApi } from '/@/views/centralScreen/centralScreen.api.ts';
|
||||
|
||||
const { themeType } = useTheme();
|
||||
const { SERVER_DETAIL } = caching;
|
||||
@@ -66,7 +66,7 @@
|
||||
async function getList() {
|
||||
setSpin(true);
|
||||
try {
|
||||
const { code, result } = (await serverApi({ condition: selectVal.value, dataType: props.setting.dataType })) || {};
|
||||
const { code, result } = (await statisticsNewApi({ condition: selectVal.value, centerId: '' })) || {};
|
||||
setSpin(false);
|
||||
if (code != 200 || !result) {
|
||||
return;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<Dialog class="phone-dialog" :openVis="visible" width="60%" :title="title" @close="closeDialog" :maskClosable="false">
|
||||
<Dialog class="phone-dialog" :openVis="visible" width="60%" :title="dialogTitle" @close="closeDialog" :maskClosable="false">
|
||||
<template #container>
|
||||
<div v-if="useForm" class="form-container">
|
||||
<Form :model="formRecord" :label-width="100" v-bind="formItemLayout">
|
||||
@@ -95,10 +95,12 @@
|
||||
phoneType: props.phoneType,
|
||||
showType: '0',
|
||||
}));
|
||||
const { visible, title, closeDialog, openDialog } = useDialog({ title: props.title });
|
||||
const dialogTitle = ref();
|
||||
const { visible, closeDialog, openDialog } = useDialog({ title: dialogTitle.value });
|
||||
const registerTable = ref();
|
||||
watch(props, () => {
|
||||
registerTable.value?.getRecords();
|
||||
dialogTitle.value = props.title;
|
||||
});
|
||||
defineExpose({
|
||||
openDialog,
|
||||
|
||||
+8
-11
@@ -212,18 +212,15 @@
|
||||
//呼入电话、受理电话弹窗
|
||||
function handlePhoneDialog(item) {
|
||||
const { name, key } = item;
|
||||
nextTick(() => {
|
||||
//呼入电话
|
||||
if (key == 'gross') {
|
||||
phoneType.value = ServerDetailType['gross'];
|
||||
}
|
||||
//受理电话
|
||||
if (key == 'alerdyreceive') {
|
||||
phoneType.value = ServerDetailType['alerdyreceive'];
|
||||
}
|
||||
//呼入电话
|
||||
//受理电话
|
||||
if (key == 'alerdyreceive' || key == 'gross') {
|
||||
phoneType.value = ServerDetailType[key];
|
||||
phoneDialogTitle.value = name;
|
||||
phoneDialogRef.value.openDialog();
|
||||
});
|
||||
nextTick(() => {
|
||||
phoneDialogRef.value.openDialog();
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
const hospitalList = ref([]); //医院列表
|
||||
|
||||
@@ -194,6 +194,7 @@
|
||||
if (code == 200) {
|
||||
let flag1 = result?.codeList?.find((item) => ['emergency:screen:show:yinchuan'].includes(item));
|
||||
let flag2 = result?.codeList?.find((item) => ['emergency:screen:show:xian'].includes(item));
|
||||
|
||||
userStore.setFlag1(flag1 || '');
|
||||
userStore.setFlag2(flag2 || '');
|
||||
// debugger;
|
||||
|
||||
@@ -226,15 +226,13 @@
|
||||
//呼入电话、受理电话弹窗
|
||||
function handlePhoneDialog(item) {
|
||||
const { name, key } = item;
|
||||
|
||||
//呼入电话
|
||||
if (key == 'gross') {
|
||||
phoneType.value = ServerDetailType['gross'];
|
||||
//受理电话
|
||||
if (key == 'alerdyreceive') {
|
||||
phoneType.value = ServerDetailType['alerdyreceive'];
|
||||
}
|
||||
//受理电话
|
||||
if (key == 'alerdyreceive' || key == 'gross') {
|
||||
phoneType.value = ServerDetailType[key];
|
||||
phoneDialogTitle.value = name;
|
||||
nextTick(() => {
|
||||
phoneDialogTitle.value = name;
|
||||
phoneDialogRef.value.openDialog();
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user