update
This commit is contained in:
@@ -6,3 +6,7 @@ VITE_GLOB_API_URL=http://cqyt.test.yg.dt.io
|
||||
VITE_GLOB_API_YIN_JI=ws://cqyt.test.yg.dt.io/health-emergency/websocket/watchMonitor
|
||||
#健康监测工具报警-websocket
|
||||
VITE_GLOB_API_JIAN_CE=ws://cqyt.test.yg.dt.io/health-emergency/websocket/emergency
|
||||
#西安云坐席
|
||||
VITE_GLOB_API_XIAN_YUN=ws://cqyt.test.yg.dt.io/health-emergency/websocket/emergency3
|
||||
#银川云坐席
|
||||
VITE_GLOB_API_YIN_CHUAN=ws://cqyt.test.yg.dt.io/health-emergency/websocket/emergency4
|
||||
@@ -31,8 +31,10 @@ service.interceptors.response.use(
|
||||
},
|
||||
(error) => {
|
||||
if (error.response) {
|
||||
console.log('response', error.response);
|
||||
switch (error.response.data.code) {
|
||||
case 401:
|
||||
// debugger;
|
||||
let path = getBaseLogin();
|
||||
if (!path) {
|
||||
path = toLoginByNowPath(router.currentRoute.value.path);
|
||||
|
||||
@@ -6,6 +6,7 @@ enum Api {
|
||||
Logout = '/sys/logout',
|
||||
GetUserInfo = '/sys/user/getUserInfo',
|
||||
auth = '/sys/permission/getPermCode',
|
||||
emergencyCenter = '/health-emergency/emergency/center/getCenterDetail',
|
||||
}
|
||||
|
||||
export const getCodeInfo = (params: any) => get(Api.getInputCode + `/${params}`);
|
||||
@@ -14,6 +15,14 @@ export function loginApi(params: any) {
|
||||
return post(Api.Login, params);
|
||||
}
|
||||
|
||||
/**
|
||||
* @description 获取登录人应急中心数据
|
||||
* @param params
|
||||
*/
|
||||
export function getEmergencyCenterApi(params?: any) {
|
||||
return get(Api.emergencyCenter, params);
|
||||
}
|
||||
|
||||
/**
|
||||
* @description: getUserInfo
|
||||
*/
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 22 KiB |
@@ -1,4 +1,4 @@
|
||||
import { mapIcon1, mapIcon2, mapIcon3, mapIcon4 } from '/@/components/chinaMap/chinaHooks.ts';
|
||||
import { mapIcon1, mapIcon2, mapIcon3, mapIcon4, mapIcon7 } from '/@/components/chinaMap/chinaHooks.ts';
|
||||
import { watchIcon } from '/@/components/secondaryScreen/secondMap/secondMapHooks.ts';
|
||||
import * as turf from '@turf/turf';
|
||||
|
||||
@@ -20,7 +20,7 @@ export function createIcon({ icon, iconSize, imageSize }) {
|
||||
* @desc 根据类型创建Icon
|
||||
* @type 1:油田医院,2:合作医院,3:医疗点
|
||||
*/
|
||||
export function typeToIcon(type: string) {
|
||||
export function typeToIcon(type: string, centerResource: boolean) {
|
||||
const iconSize = [18, 44];
|
||||
const imageSize = [18, 44];
|
||||
if (type == '1') {
|
||||
@@ -29,6 +29,10 @@ export function typeToIcon(type: string) {
|
||||
if (type == '2') {
|
||||
return createIcon({ icon: mapIcon4, iconSize, imageSize });
|
||||
}
|
||||
//关联医疗点
|
||||
if (type == '3' && centerResource) {
|
||||
return createIcon({ icon: mapIcon7, iconSize, imageSize });
|
||||
}
|
||||
if (type == '3') {
|
||||
return createIcon({ icon: mapIcon2, iconSize, imageSize });
|
||||
}
|
||||
|
||||
@@ -144,7 +144,7 @@ export const Map = {
|
||||
this.setZoomCenter(center, zoom);
|
||||
}
|
||||
for (let i = 0; i < result.length; i++) {
|
||||
let { type, lon, lat, lng } = result[i];
|
||||
let { type, lon, lat, lng, centerResource } = result[i];
|
||||
if (lng) {
|
||||
lon = lng;
|
||||
}
|
||||
@@ -152,7 +152,7 @@ export const Map = {
|
||||
continue;
|
||||
}
|
||||
// 创建一个 Icon
|
||||
let startIcon = typeToIcon(type);
|
||||
let startIcon = typeToIcon(type, centerResource);
|
||||
// 将 icon 传入 marker
|
||||
let startMarker = new AMap.Marker({
|
||||
// 点的坐标
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import { ref, unref } from 'vue';
|
||||
import * as echarts from 'echarts';
|
||||
import { emptyChart } from '/@/utils/utils.ts';
|
||||
|
||||
//服务详情数据弹窗参数
|
||||
export enum ServerDetailType {
|
||||
@@ -205,8 +206,24 @@ const radarChartsTheme = {
|
||||
* @param countList:数据项
|
||||
*/
|
||||
export const radarCharts = ({ indicator, countList, theme }) => {
|
||||
if (!countList?.length) {
|
||||
return emptyChart();
|
||||
}
|
||||
const { radarName, splitLine, axisName, areaStyle, lineStyle, itemStyle } = radarChartsTheme[theme] || radarChartsTheme.dark;
|
||||
return {
|
||||
noDataLoadingOption: {
|
||||
text: '暂无数据',
|
||||
effect: 'whirling',
|
||||
effectOption: {
|
||||
period: 3,
|
||||
radius: 10,
|
||||
frame: 3,
|
||||
},
|
||||
textStyle: {
|
||||
color: '#333',
|
||||
fontSize: 16,
|
||||
},
|
||||
},
|
||||
grid: {
|
||||
top: '1%',
|
||||
left: '5%',
|
||||
|
||||
@@ -120,6 +120,7 @@ export const mapIcon3 = new URL('/@/assets/img/mapIcon3.png', import.meta.url).h
|
||||
export const mapIcon4 = new URL('/@/assets/img/mapIcon4.png', import.meta.url).href;
|
||||
export const mapIcon5 = new URL('/@/assets/img/mapIcon5.png', import.meta.url).href;
|
||||
export const mapIcon6 = new URL('/@/assets/img/mapIcon6.png', import.meta.url).href;
|
||||
export const mapIcon7 = new URL('/@/assets/img/mapIcon7.png', import.meta.url).href;
|
||||
|
||||
export const legend1 = new URL('/@/assets/img/legend1.png', import.meta.url).href;
|
||||
export const legend2 = new URL('/@/assets/img/legend2.png', import.meta.url).href;
|
||||
|
||||
+11
-1
@@ -4,7 +4,10 @@ export enum PageEnum {
|
||||
BASE_LOGIN = '/login',
|
||||
BASE_HOME = '/home',
|
||||
BASE_LOGIN_YINCHUAN = '/screenLogin',
|
||||
// centralScreenLogin
|
||||
CENTRAL_SCREEN_LOGIN = '/centralScreenLogin',
|
||||
YINCHUAN_HOME = '/yinChuanHome',
|
||||
CENTRAL_SCREEN = '/centralScreen',
|
||||
}
|
||||
|
||||
export function setBaseLogin(baseLogin) {
|
||||
@@ -18,12 +21,15 @@ export function getBaseLogin() {
|
||||
//根据当前路径跳转登录页
|
||||
export function toLoginByNowPath(nowPath: string) {
|
||||
const xianPath = ['/home', '/secondScreen', '/'];
|
||||
|
||||
const yinchuanPath = ['/yinChuanHome', '/yinChuanTest'];
|
||||
//其他应急中心的页面路径
|
||||
const centerPath = ['/centralScreen', '/centralScreenLogin'];
|
||||
if (xianPath.includes(nowPath)) {
|
||||
return PageEnum.BASE_LOGIN;
|
||||
} else if (yinchuanPath.includes(nowPath)) {
|
||||
return PageEnum.BASE_LOGIN_YINCHUAN;
|
||||
} else if (centerPath.includes(nowPath)) {
|
||||
return PageEnum.CENTRAL_SCREEN_LOGIN;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -33,10 +39,14 @@ export function toHomeByLogoutPath(nowPath: string) {
|
||||
const xianPath = ['/home', '/secondScreen', '/'];
|
||||
//银川的页面路径
|
||||
const yinchuanPath = ['/yinChuanHome', '/yinChuanTest'];
|
||||
//其他应急中心的页面路径
|
||||
const centerPath = ['/centralScreen'];
|
||||
if (xianPath.includes(nowPath)) {
|
||||
return PageEnum.BASE_HOME;
|
||||
} else if (yinchuanPath.includes(nowPath)) {
|
||||
return PageEnum.YINCHUAN_HOME;
|
||||
} else if (centerPath.includes(nowPath)) {
|
||||
return PageEnum.YINCHUAN_HOME;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+12
-1
@@ -12,6 +12,7 @@ const routes: Array<RouteRecordRaw> = [
|
||||
path: '/login',
|
||||
name: 'login',
|
||||
meta: {
|
||||
//西安大屏登录
|
||||
title: '登录',
|
||||
},
|
||||
component: () => import('/@/views/sys/login.vue'),
|
||||
@@ -20,6 +21,16 @@ const routes: Array<RouteRecordRaw> = [
|
||||
path: '/screenLogin',
|
||||
name: 'screenLogin',
|
||||
meta: {
|
||||
//银川大屏登录
|
||||
title: '登录',
|
||||
},
|
||||
component: () => import('/@/views/sys/login.vue'),
|
||||
},
|
||||
{
|
||||
path: '/centralScreenLogin',
|
||||
name: 'centralScreenLogin',
|
||||
meta: {
|
||||
//分中心大屏登录
|
||||
title: '登录',
|
||||
},
|
||||
component: () => import('/@/views/sys/login.vue'),
|
||||
@@ -68,7 +79,7 @@ const routes: Array<RouteRecordRaw> = [
|
||||
path: '/centralScreen',
|
||||
name: 'centralScreen',
|
||||
meta: {
|
||||
title: '应急大屏',
|
||||
title: '应急中心',
|
||||
},
|
||||
component: () => import('/@/views/centralScreen/centralScreen.vue'),
|
||||
},
|
||||
|
||||
@@ -20,6 +20,7 @@ export const useUserStore = defineStore({
|
||||
flag1: '', //银川权限标识
|
||||
flag2: '', //西安权限标识
|
||||
centerId: '', //中心点id
|
||||
centerInfo: null, //应急中心信息
|
||||
}),
|
||||
getters: {
|
||||
getUserInfo(): UserInfo {
|
||||
@@ -43,6 +44,9 @@ export const useUserStore = defineStore({
|
||||
getCenterId(): string {
|
||||
return this.centerId || getAuthCache('centerId');
|
||||
},
|
||||
getCenterInfo(): any {
|
||||
return this.centerInfo || getAuthCache('centerInfo');
|
||||
},
|
||||
},
|
||||
actions: {
|
||||
setToken(info: string | undefined) {
|
||||
@@ -72,6 +76,10 @@ export const useUserStore = defineStore({
|
||||
this.centerId = info ? info : '';
|
||||
setAuthCache('centerId', info);
|
||||
},
|
||||
setCenterInfo(info: any) {
|
||||
this.centerInfo = info;
|
||||
setAuthCache('centerInfo', info);
|
||||
},
|
||||
/**
|
||||
* 登录事件
|
||||
*/
|
||||
|
||||
+12
-2
@@ -19,7 +19,12 @@ export const xianYunPath = VITE_GLOB_API_XIAN_YUN;
|
||||
export const yinChuanPath = VITE_GLOB_API_YIN_CHUAN;
|
||||
let t = token || getAuthCache(TOKEN_KEY);
|
||||
|
||||
export function useSocket(p = basicPath) {
|
||||
/**
|
||||
*
|
||||
* @param p websocket地址
|
||||
* @param hasTimestamp 是否需要时间戳
|
||||
*/
|
||||
export function useSocket(p = basicPath, hasTimestamp: boolean = true) {
|
||||
const socket = ref();
|
||||
let socketData = ref({});
|
||||
let lockReconnect = ref(false); //避免ws重复连接
|
||||
@@ -75,7 +80,12 @@ export function useSocket(p = basicPath) {
|
||||
} else {
|
||||
closeSocket();
|
||||
// 实例化socket
|
||||
socket.value = new WebSocket(path.value + Date.now(), [t]);
|
||||
//判断是否需要时间戳
|
||||
if (hasTimestamp) {
|
||||
socket.value = new WebSocket(path.value + Date.now(), [t]);
|
||||
} else {
|
||||
socket.value = new WebSocket(path.value, [t]);
|
||||
}
|
||||
|
||||
socket.value.onclose = function () {
|
||||
reconnect(path.value);
|
||||
|
||||
@@ -53,3 +53,18 @@ export function visibleChartLabel(chartData) {
|
||||
}
|
||||
return data;
|
||||
}
|
||||
|
||||
export function emptyChart() {
|
||||
return {
|
||||
title: {
|
||||
text: '暂无数据',
|
||||
x: 'center',
|
||||
y: 'center',
|
||||
textStyle: {
|
||||
color: '#fff',
|
||||
fontWeight: 'normal',
|
||||
fontSize: 14,
|
||||
},
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
@@ -2,7 +2,7 @@ import { get, post } from '/@/api/request.ts';
|
||||
|
||||
enum Api {
|
||||
server = '/health-emergency/emergency/tblUserHelp/statistics',
|
||||
getDetail = '/health-medical/medical/hospital/getMedicalHospital',
|
||||
getDetail = '/health-medical/medical/hospital/getMedicalHospitalNew',
|
||||
getMonitorList = '/health-watch/watch/watchMonitorData/getMonitorList',
|
||||
statisticsNew = '/health-emergency/emergency/LargeScreenNew/statisticsNew',
|
||||
phoneListNew = '/health-emergency/emergency/LargeScreenNew/phoneListNew',
|
||||
@@ -27,20 +27,31 @@ export const medicalCenterNew = (params: any) => post(Api.medicalCenterNew, para
|
||||
* @param params
|
||||
*/
|
||||
|
||||
export const userHealthCenterNew = (params: any) => get(Api.userHealthCenterNew, params);
|
||||
export const userHealthCenterNew = (params: any) => {
|
||||
return post(Api.userHealthCenterNew, params);
|
||||
};
|
||||
/**
|
||||
* @description 获取体检数据
|
||||
* @param params
|
||||
*/
|
||||
export const getPhysicalData = (params: any) => get(Api.getDetail, params);
|
||||
export const getPhysicalData = (params: any) => {
|
||||
let { centerId, ...other } = params;
|
||||
return post(Api.getDetail, other);
|
||||
};
|
||||
/**
|
||||
* @description 呼入电话、受理电话
|
||||
* @param params
|
||||
*/
|
||||
export const getPhoneList = (params: any) => post(Api.phoneListNew, params);
|
||||
|
||||
//健康终端报警
|
||||
export const getMonitorList = (params: any) => get(Api.getMonitorList, params);
|
||||
/**
|
||||
* @description 健康终端报警
|
||||
* @param params
|
||||
*/
|
||||
export const getMonitorList = (params: any) => {
|
||||
let { orgCodeList, ...otherParams } = params;
|
||||
return get(Api.getMonitorList + '?orgCodeList=' + orgCodeList, otherParams);
|
||||
};
|
||||
|
||||
/**
|
||||
* @description 获取地图所有资源
|
||||
|
||||
@@ -42,15 +42,19 @@
|
||||
<PhysicalExaminationData :key="tabState" :refreshState="refreshState" :setting="setting" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="bottom-d"> </div>
|
||||
<div class="bottom-d"></div>
|
||||
<EmployeeDialog ref="employeeDialogRef" :record="socketData" />
|
||||
<EmergencyDialog ref="emergencyDialogRef" :record="socketData" @confirmHelp="confirmHelp" />
|
||||
<YunZuoXiDialog ref="yunZuoXiDialogRef" :record="socketData" @confirmHelp="confirmHelp" />
|
||||
|
||||
<!--呼入电话、受理电话-->
|
||||
<PhoneDialog ref="phoneDialogRef" :phoneType="phoneType" :setting="setting" :title="phoneDialogTitle" :useForm="true" />
|
||||
<!--健康终端查看详情-->
|
||||
<TerminakAlarmDialog ref="terminalAlarmDialogRef" :setting="setting" />
|
||||
<TerminalAlarmDialog ref="terminalAlarmDialogRef" :setting="setting" />
|
||||
</div>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import { onMounted, onUnmounted, ref, nextTick } from 'vue';
|
||||
import { onMounted, onUnmounted, ref, nextTick, watch } 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';
|
||||
@@ -65,14 +69,22 @@
|
||||
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';
|
||||
import TerminalAlarmDialog from '/@/views/centralScreen/components/terminalAlarmDialog.vue';
|
||||
import { Map } from '/@/assets/mapUtils/map.ts';
|
||||
import YunZuoXiDialog from '/@/views/components/yunZuoXiDialog.vue';
|
||||
import EmployeeDialog from '/@/views/components/employeeDialog.vue';
|
||||
import EmergencyDialog from '/@/views/components/emergencyDialog.vue';
|
||||
import { basicPath, emergencyPath, useSocket, yinChuanPath } from '/@/utils/socket.ts';
|
||||
import { handleSocketUrl } from '/@/views/centralScreen/components/centerMapHooks.ts';
|
||||
|
||||
const userStore = useUserStore();
|
||||
let { simpleName, centerTel } = userStore.getCenterInfo || { simpleName: '', centerTel: '' };
|
||||
const { refreshState } = useRefresh(DEFAULT_TIME);
|
||||
const dayTimeO = ref();
|
||||
const dayTimeT = ref();
|
||||
const interval = ref(1);
|
||||
const title = ref('新版应急就医服务中心');
|
||||
const phone = ref('0951-6805199');
|
||||
const title = ref(simpleName + '应急就医服务中心');
|
||||
const phone = ref(centerTel || '0951-6805199');
|
||||
|
||||
function init() {
|
||||
getTime();
|
||||
@@ -100,6 +112,15 @@
|
||||
onUnmounted(() => {
|
||||
clearInterval(interval.value);
|
||||
document.removeEventListener('visibilitychange', checkTabState);
|
||||
|
||||
// 监听窗口关闭事件,当窗口关闭时,主动去关闭websocket连接,防止连接还没断开就关闭窗口,server端会抛异常。
|
||||
window.onbeforeunload = function () {
|
||||
closeSocket();
|
||||
// closeSocket2();
|
||||
// closeSocket3(); //银川云坐席
|
||||
};
|
||||
|
||||
clearInterval(interval.value);
|
||||
});
|
||||
const tabState = ref('');
|
||||
|
||||
@@ -133,6 +154,146 @@
|
||||
function handleEmployeeDialog() {
|
||||
terminalAlarmDialogRef.value.openDialog();
|
||||
}
|
||||
|
||||
//确认应急求助
|
||||
const hospitalList = ref([]); //医院列表
|
||||
const showHospitalList = ref(false);
|
||||
|
||||
async function confirmHelp(data) {
|
||||
if (!data.lon) return;
|
||||
hospitalList.value = [];
|
||||
//用户的坐标信息
|
||||
let point = [data.lon, data.lat];
|
||||
if (data.hospitalList && data.hospitalList.length > 0) {
|
||||
try {
|
||||
hospitalList.value = await getHospitalList(data.hospitalList, point);
|
||||
showHospitalList.value = true;
|
||||
} catch (error) {
|
||||
console.log('获取医院列表时出错:', error);
|
||||
}
|
||||
} else {
|
||||
console.log('没有医院list');
|
||||
}
|
||||
Map.getAddressByPoint(point).then((res) => {
|
||||
const option = {
|
||||
lon: data.lon,
|
||||
lat: data.lat,
|
||||
position: point,
|
||||
name: data.realName,
|
||||
address: res,
|
||||
sex: data.sex,
|
||||
};
|
||||
Map.createEmergencyMarker(option);
|
||||
});
|
||||
}
|
||||
|
||||
async function getHospitalList(hospitalList, userLocation) {
|
||||
const hospitalPromises = hospitalList.map(async (item) => {
|
||||
item.distance = getDistance(userLocation, [item.lon, item.lat]);
|
||||
const { time, routeList } = await getDriveTime(userLocation, [item.lon, item.lat]);
|
||||
item.driveTime = time;
|
||||
item.routeList = routeList;
|
||||
item.userLocation = userLocation;
|
||||
return item; // 返回更新后的医院条目
|
||||
});
|
||||
return Promise.all(hospitalPromises);
|
||||
}
|
||||
|
||||
function getDistance(userLocation, destination) {
|
||||
const value = Map.getDistance(userLocation, destination);
|
||||
return value > 1000 ? (value / 1000).toFixed(2) + 'km' : value + 'm';
|
||||
}
|
||||
|
||||
async function getDriveTime(userLocation, destination) {
|
||||
let { time, steps } = await Map.getDriveTime(userLocation, destination);
|
||||
let h,
|
||||
m,
|
||||
s = 0;
|
||||
if (time <= 60) {
|
||||
return {
|
||||
time: `${s}秒`,
|
||||
routeList: steps,
|
||||
};
|
||||
}
|
||||
if (time > 60 && time < 3600) {
|
||||
m = Math.floor(time / 60);
|
||||
return {
|
||||
time: `${m}分`,
|
||||
routeList: steps,
|
||||
};
|
||||
}
|
||||
if (time >= 3600) {
|
||||
h = Math.floor(time / 3600);
|
||||
m = Math.floor((time - h * 3600) / 60);
|
||||
return {
|
||||
time: `${h}小时${m}分`,
|
||||
routeList: steps,
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
function clearHospitalList() {
|
||||
hospitalList.value = [];
|
||||
showHospitalList.value = false;
|
||||
}
|
||||
|
||||
// //websocket消息
|
||||
// // 健康监测工具报警
|
||||
//
|
||||
// let basicUrl = handleSocketUrl(basicPath + `${DataType.yinChuan}`, userStore.getCenterInfo.id);
|
||||
// const { socketData, setSocketData, closeSocket } = useSocket(basicUrl, false);
|
||||
// const employeeDialogRef = ref();
|
||||
// watch(socketData, (nVal) => {
|
||||
// if (nVal) {
|
||||
// nextTick(() => {
|
||||
// setSocketData(nVal);
|
||||
// employeeDialogRef.value.openDialog();
|
||||
// });
|
||||
// }
|
||||
// });
|
||||
// //应急求助
|
||||
// let emergencyUrl = handleSocketUrl(emergencyPath + `${DataType.yinChuan}`, userStore.getCenterInfo.id);
|
||||
// const { socketData: emergencyData, setSocketData: setEmergencyData, closeSocket: closeSocket2 } = useSocket(emergencyUrl, false);
|
||||
// const emergencyDialogRef = ref();
|
||||
//
|
||||
// watch(emergencyData, (nVal) => {
|
||||
// if (nVal) {
|
||||
// nextTick(() => {
|
||||
// setEmergencyData(nVal);
|
||||
// emergencyDialogRef.value.openDialog();
|
||||
// });
|
||||
// }
|
||||
// });
|
||||
//银川云坐席
|
||||
let socketUrl = handleSocketUrl(basicPath, userStore.getCenterInfo?.id);
|
||||
const { socketData, setSocketData, closeSocket } = useSocket(socketUrl, false);
|
||||
const yunZuoXiDialogRef = ref(); //云坐席
|
||||
const emergencyDialogRef = ref(); //紧急求助
|
||||
const employeeDialogRef = ref(); //终端报警||健康监测
|
||||
//title = "1:紧急求助 2:云坐席 3:终端报警")
|
||||
watch(socketData, (nVal) => {
|
||||
if (nVal) {
|
||||
let { popType } = nVal;
|
||||
if (popType == 1) {
|
||||
nextTick(() => {
|
||||
setSocketData(nVal);
|
||||
emergencyDialogRef.value.openDialog();
|
||||
});
|
||||
}
|
||||
if (popType == 2) {
|
||||
nextTick(() => {
|
||||
setSocketData(nVal);
|
||||
yunZuoXiDialogRef.value.openDialog();
|
||||
});
|
||||
}
|
||||
if (popType == 3) {
|
||||
nextTick(() => {
|
||||
setSocketData(nVal);
|
||||
employeeDialogRef.value.openDialog();
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
</script>
|
||||
<style lang="less" scoped>
|
||||
.outer {
|
||||
|
||||
@@ -56,7 +56,7 @@
|
||||
<div><img :src="item.img" alt="" class="legend-img" /> {{ item.text }}</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- <div class="level">地图层级:{{ level }}</div>-->
|
||||
<!--<div class="level">地图层级:{{ level }}</div>-->
|
||||
</div>
|
||||
<div class="center-footer" v-if="showFooter">
|
||||
<div class="count-item">
|
||||
@@ -71,9 +71,9 @@
|
||||
<!-- 附近医院、医疗点 -->
|
||||
<div class="hospital-list" v-if="showHospitalList">
|
||||
<div class="hospital-item" v-for="(item, index) in hospitalList" :key="index" @click="showDrivingLine(item)">
|
||||
<div>{{ item.name }}</div>
|
||||
<div>相距{{ item.distance }}</div>
|
||||
<div>驾车大约{{ item.driveTime }}</div>
|
||||
<div>{{ item?.name }}</div>
|
||||
<div>相距{{ item?.distance }}</div>
|
||||
<div>驾车大约{{ item?.driveTime }}</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -87,6 +87,7 @@
|
||||
import { useDetailStore } from '/@/store/modules/detailData.ts';
|
||||
import RoutePanel from '/@/components/chinaMap/components/routePanel.vue';
|
||||
import { legendList, mapApiSwitch } from '/@/views/centralScreen/components/centerMapHooks.ts';
|
||||
import { useUserStore } from '/@/store/modules/user.ts';
|
||||
|
||||
const props = defineProps({
|
||||
//是否展示底部统计
|
||||
@@ -132,6 +133,7 @@
|
||||
});
|
||||
const list = ref(tabList);
|
||||
const currentIndex = ref(0);
|
||||
const userStore = useUserStore();
|
||||
|
||||
function changeTab(item, i: number) {
|
||||
currentIndex.value = i; // 地方医院
|
||||
@@ -143,7 +145,7 @@
|
||||
Map.map.on('moveend', logMapinfo);
|
||||
return;
|
||||
} else {
|
||||
getMapData(item.type, { type: item.type });
|
||||
getMapData(item.type, { type: item.type, centerId: userStore.getCenterInfo?.id });
|
||||
}
|
||||
}
|
||||
|
||||
@@ -198,7 +200,7 @@
|
||||
|
||||
onMounted(() => {
|
||||
Map.initMap({ el: 'centerMap', option: props.mapOptions }).then(() => {
|
||||
getMapData(tabList[0].type);
|
||||
getMapData(tabList[0].type, { centerId: userStore.getCenterInfo?.id });
|
||||
Map.map && Map.map.on('zoomend', setLevel);
|
||||
Map.map && Map.map.on('zoomend', setLevel);
|
||||
});
|
||||
|
||||
@@ -21,8 +21,17 @@ export function mapApiSwitch(type: string, params: any) {
|
||||
lat: 34, //纬度34
|
||||
lon: 108, //经度
|
||||
};
|
||||
// 全部 油田 医疗点 合作医院
|
||||
if ([TabType.all, TabType.youTianYiYuan, TabType.yiLiaoDian, TabType.heZuoYiYuan, TabType.jiuHuChe, TabType.jiuHuChe].includes(type)) {
|
||||
// 全部 医疗点
|
||||
if ([TabType.all, TabType.yiLiaoDian].includes(type)) {
|
||||
return getMapListApi({ ...basicParams, ...params });
|
||||
}
|
||||
// 其他
|
||||
if ([TabType.youTianYiYuan, TabType.heZuoYiYuan, TabType.jiuHuChe, TabType.jiuHuChe].includes(type)) {
|
||||
let { centerId, ...other } = params;
|
||||
return getMapListApi({ ...basicParams, ...other });
|
||||
}
|
||||
}
|
||||
|
||||
export function handleSocketUrl(url: string, centerId: string) {
|
||||
return url.substring(0, url.indexOf('/websocket/') + 11) + centerId;
|
||||
}
|
||||
|
||||
@@ -1,19 +1,23 @@
|
||||
<template>
|
||||
<div>
|
||||
<public-title title="一线医疗点每日工作动态" themeType="dark" />
|
||||
<div class="inner">
|
||||
<div class="inner" v-if="trendsData.length">
|
||||
<div class="trends-item" v-for="(item, k) in trendsData" :key="k">
|
||||
<div class="trends-title-con">
|
||||
<span class="icon-medical"></span>
|
||||
<span class="trends-item-title">{{ item.name }}</span>
|
||||
</div>
|
||||
<div class="trends-item-span-box">
|
||||
<span class="trends-item-span">高风险干预{{ item?.high }}人</span>
|
||||
<!-- <span class="trends-item-span">高风险干预{{ item?.high }}人</span>-->
|
||||
<span class="trends-item-span">慢病管理{{ item?.slow }}人</span>
|
||||
<span class="trends-item-span">巡诊{{ item?.tour }}人</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div v-else class="empty-box">
|
||||
<img class="img" :src="EmptyImg" alt="" />
|
||||
<div class="no-data">暂无数据</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
@@ -21,14 +25,18 @@
|
||||
import { onMounted, ref } from 'vue';
|
||||
import { caching, useSession } from '/@/hooks/autoRefresh/caching.ts';
|
||||
import { medicalCenterNew } from '/@/views/centralScreen/centralScreen.api.ts';
|
||||
import { useUserStore } from '/@/store/modules/user.ts';
|
||||
import EmptyImg from '/@/assets/img/empty-img.png';
|
||||
|
||||
const { setSession, getSession } = useSession();
|
||||
const { WORK_DAILY_NEW } = caching;
|
||||
const trendsData = ref([]);
|
||||
const userStore = useUserStore();
|
||||
|
||||
async function getTrendsData() {
|
||||
try {
|
||||
const { code, result } = await medicalCenterNew({});
|
||||
let centerId = userStore.getCenterInfo?.id;
|
||||
const { code, result } = await medicalCenterNew({ centerId });
|
||||
if (code != 200) {
|
||||
return;
|
||||
}
|
||||
@@ -92,4 +100,16 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.empty-box {
|
||||
color: #fff;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
|
||||
.img {
|
||||
width: 100px;
|
||||
margin-top: 80px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
import PublicTitle from '/@/components/publicTitle.vue';
|
||||
import { caching, useSession } from '/@/hooks/autoRefresh/caching.ts';
|
||||
import { userHealthCenterNew } from '/@/views/centralScreen/centralScreen.api.ts';
|
||||
import { useUserStore } from '/@/store/modules/user.ts';
|
||||
|
||||
const props = defineProps({
|
||||
setting: Object,
|
||||
@@ -66,9 +67,12 @@
|
||||
});
|
||||
}
|
||||
|
||||
const userStore = useUserStore();
|
||||
|
||||
async function viewDetail() {
|
||||
try {
|
||||
const { code, result } = await userHealthCenterNew({ dataType: props.setting?.dataType });
|
||||
let centerId = userStore.getCenterInfo?.id;
|
||||
const { code, result } = await userHealthCenterNew({ dataType: props.setting?.dataType, centerId });
|
||||
if (code != 200) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -29,6 +29,7 @@
|
||||
import { SexType, sexTypeList } from '/@/utils/settings.ts';
|
||||
import { getPhoneList } from '/@/views/centralScreen/centralScreen.api.ts';
|
||||
import { useTheme } from '/@/hooks/theme/useTheme.ts';
|
||||
import { useUserStore } from '/@/store/modules/user.ts';
|
||||
|
||||
const props = defineProps({
|
||||
record: Object,
|
||||
@@ -89,12 +90,14 @@
|
||||
const formRecord = ref({
|
||||
sex: SexType.all,
|
||||
});
|
||||
const userStore = useUserStore();
|
||||
const formState = computed(() => ({
|
||||
...formRecord.value,
|
||||
centerId: '',
|
||||
dataType: props.setting.dataType,
|
||||
phoneType: props.phoneType,
|
||||
showType: '0',
|
||||
centerId: userStore.getCenterInfo?.id,
|
||||
}));
|
||||
const dialogTitle = ref();
|
||||
const { visible, closeDialog, openDialog } = useDialog({ title: dialogTitle.value });
|
||||
|
||||
@@ -26,6 +26,7 @@
|
||||
import * as echarts from 'echarts';
|
||||
import { useTheme } from '/@/hooks/theme/useTheme.ts';
|
||||
import { getPhysicalData } from '/@/views/centralScreen/centralScreen.api.ts';
|
||||
import { useUserStore } from '/@/store/modules/user.ts';
|
||||
|
||||
const props = defineProps({
|
||||
refreshState: {
|
||||
@@ -54,11 +55,15 @@
|
||||
});
|
||||
|
||||
const { radarList, setRadarList, getRadarList } = useHospitalList();
|
||||
const userStore = useUserStore();
|
||||
|
||||
async function getList() {
|
||||
setSpin(true);
|
||||
try {
|
||||
const { code, result } = (await getPhysicalData({ dataType: props.setting.dataType, condition: selectVal.value })) || {};
|
||||
let orgCodeList = userStore.getCenterInfo?.serviceScope || '';
|
||||
let centerId = userStore.getCenterInfo?.id || '';
|
||||
const { code, result } =
|
||||
(await getPhysicalData({ dataType: props.setting.dataType, condition: selectVal.value, orgCodeList, centerId })) || {};
|
||||
setSpin(!spinning.value);
|
||||
if (code != 200) {
|
||||
return;
|
||||
@@ -75,19 +80,21 @@
|
||||
function setValue(result) {
|
||||
setRadarList(result);
|
||||
const everyEmpty = allValueEmpty('value', getRadarList());
|
||||
everyEmpty && initChart();
|
||||
// everyEmpty && initChart();
|
||||
initChart();
|
||||
}
|
||||
|
||||
const radarChartsRef = ref<HTMLElement>();
|
||||
|
||||
function initChart() {
|
||||
const myChart = echarts.init(radarChartsRef.value);
|
||||
let countList = radarList?.value.map((item) => item?.userCount);
|
||||
if (countList.length < 1) return;
|
||||
let countList = radarList?.value?.map((item) => item?.userCount) || [];
|
||||
// if (countList?.length < 1) return;
|
||||
let max = Math.max(...countList);
|
||||
const indicator = radarList?.value.map((item) => ({ name: item?.hospitalName, max: max }));
|
||||
const indicator = radarList?.value?.map((item) => ({ name: item?.hospitalName, max: max }));
|
||||
const option = radarCharts({ indicator, countList, theme: unref(themeType) });
|
||||
myChart.setOption(option);
|
||||
myChart.showLoading('noData');
|
||||
window.addEventListener('resize', () => {
|
||||
myChart.resize();
|
||||
});
|
||||
|
||||
@@ -35,6 +35,7 @@
|
||||
import { useSession, caching } from '/@/hooks/autoRefresh/caching.ts';
|
||||
import { useTheme } from '/@/hooks/theme/useTheme.ts';
|
||||
import { statisticsNewApi } from '/@/views/centralScreen/centralScreen.api.ts';
|
||||
import { useUserStore } from '/@/store/modules/user.ts';
|
||||
|
||||
const { themeType } = useTheme();
|
||||
const { SERVER_DETAIL } = caching;
|
||||
@@ -62,11 +63,13 @@
|
||||
|
||||
const useDetail = useDetailStore();
|
||||
const { setSession, getSession } = useSession();
|
||||
const userStore = useUserStore();
|
||||
|
||||
async function getList() {
|
||||
setSpin(true);
|
||||
try {
|
||||
const { code, result } = (await statisticsNewApi({ condition: selectVal.value, centerId: '' })) || {};
|
||||
let centerId = userStore.getCenterInfo?.id;
|
||||
const { code, result } = (await statisticsNewApi({ condition: selectVal.value, centerId })) || {};
|
||||
setSpin(false);
|
||||
if (code != 200 || !result) {
|
||||
return;
|
||||
|
||||
@@ -47,7 +47,7 @@
|
||||
</div>
|
||||
<div class="con-item">
|
||||
<div>发生地点:</div>
|
||||
<div v-if="userInfo?.address">{{ userInfo?.address }} </div>
|
||||
<div v-if="userInfo?.address">{{ userInfo?.address }}</div>
|
||||
<div style="color: #eb3636" v-else>{{ userInfo?.gpsErrorMsg }}</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -67,6 +67,7 @@
|
||||
import { DataType } from '/@/utils/settings.ts';
|
||||
import { useTheme } from '/@/hooks/theme/useTheme.ts';
|
||||
import { message } from 'ant-design-vue';
|
||||
import { useUserStore } from '/@/store/modules/user.ts';
|
||||
|
||||
const props = defineProps({
|
||||
setting: Object,
|
||||
@@ -115,10 +116,12 @@
|
||||
* @desc 终端报警
|
||||
* */
|
||||
const scrollList = ref([]);
|
||||
const userStore = useUserStore();
|
||||
|
||||
async function getScrollList() {
|
||||
try {
|
||||
const { code, result } = await getMonitorList({ pageSize: 10, pageNo: 1, orgCode: props.setting?.orgCode });
|
||||
let orgCodeList = userStore.getCenterInfo?.serviceScope;
|
||||
const { code, result } = await getMonitorList({ pageSize: 10, pageNo: 1, orgCode: props.setting?.orgCode, orgCodeList });
|
||||
if (code == 200) {
|
||||
setSession(RIGHT_KEY1_NEW, JSON.stringify(result.records));
|
||||
scrollList.value = result.records;
|
||||
|
||||
+4
@@ -16,6 +16,7 @@
|
||||
import { useDialog } from '/@/views/components/dialogHooks.ts';
|
||||
import BasicTable from '/@/components/secondaryScreen/secondMap/components/basicTable/BasicTable.vue';
|
||||
import { getMonitorList } from '/@/views/centralScreen/centralScreen.api.ts';
|
||||
import { useUserStore } from '/@/store/modules/user.ts';
|
||||
|
||||
const props = defineProps({
|
||||
record: Object,
|
||||
@@ -72,9 +73,12 @@
|
||||
// },
|
||||
},
|
||||
];
|
||||
const userStore = useUserStore();
|
||||
|
||||
const formState = computed(() => ({
|
||||
dataType: props.setting.dataType,
|
||||
orgCode: props.setting?.orgCode,
|
||||
orgCodeList: userStore.getCenterInfo?.serviceScope,
|
||||
}));
|
||||
const { visible, closeDialog, openDialog } = useDialog({ title: props.title });
|
||||
const registerTable = ref();
|
||||
+19
-4
@@ -91,7 +91,7 @@
|
||||
</div>
|
||||
</template>
|
||||
<script lang="ts" name="login-mini" setup>
|
||||
import { getAuth, getCodeInfo, getUserInfo } from '/@/api/user';
|
||||
import { getAuth, getCodeInfo, getEmergencyCenterApi, getUserInfo } from '/@/api/user';
|
||||
import { onMounted, reactive, ref, toRaw, watch } from 'vue';
|
||||
import codeImg from '/@/assets/images/checkcode.png';
|
||||
import { useUserStore } from '/@/store/modules/user';
|
||||
@@ -190,17 +190,27 @@
|
||||
if (userInfo) {
|
||||
try {
|
||||
let { code, result, message: msg } = await getAuth();
|
||||
let centerInfo = {};
|
||||
try {
|
||||
let { result } = await getEmergencyCenterApi();
|
||||
centerInfo = result;
|
||||
userStore.setCenterInfo(centerInfo);
|
||||
} catch (e) {}
|
||||
|
||||
// console.log('centerInfo', centerInfo);
|
||||
let goPath = PageEnum.BASE_HOME;
|
||||
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));
|
||||
|
||||
let flag3 = result?.codeList?.find((item) => ['emergency:screen:show:centralScreen'].includes(item));
|
||||
// console.log('flag3', flag3);
|
||||
userStore.setFlag1(flag1 || '');
|
||||
userStore.setFlag2(flag2 || '');
|
||||
// debugger;
|
||||
if (!flag1 && !flag2) {
|
||||
if (!flag1 && !flag2 && !flag3) {
|
||||
userStore.setToken('');
|
||||
userStore.setUserInfo({});
|
||||
userStore.setCenterInfo({});
|
||||
return message.warn('您没有权限访问大屏,请联系管理员!');
|
||||
}
|
||||
//1如果有权限
|
||||
@@ -211,17 +221,22 @@
|
||||
// 1.2.2 如果是登录地址是银川
|
||||
if (route.path == PageEnum.BASE_LOGIN_YINCHUAN) {
|
||||
goPath = PageEnum.YINCHUAN_HOME;
|
||||
} else {
|
||||
} else if (route.path == PageEnum.BASE_LOGIN) {
|
||||
goPath = PageEnum.BASE_HOME;
|
||||
} else if (route.path == PageEnum.CENTRAL_SCREEN_LOGIN) {
|
||||
goPath = PageEnum.CENTRAL_SCREEN;
|
||||
}
|
||||
} else {
|
||||
if (flag1) {
|
||||
goPath = PageEnum.YINCHUAN_HOME;
|
||||
} else if (flag2) {
|
||||
goPath = PageEnum.BASE_HOME;
|
||||
} else if (flag3) {
|
||||
goPath = PageEnum.CENTRAL_SCREEN;
|
||||
} else {
|
||||
userStore.setToken('');
|
||||
userStore.setUserInfo({});
|
||||
userStore.setCenterInfo({});
|
||||
return message.warn('没有权限请联系管理员!');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -67,7 +67,6 @@
|
||||
import { basicPath, emergencyPath, useSocket, yinChuanPath } from '/@/utils/socket.ts';
|
||||
import { useRefresh } from '/@/hooks/autoRefresh';
|
||||
import { DEFAULT_TIME } from '/@/hooks/autoRefresh/pageRefreshTime.ts';
|
||||
import { useRoute } from 'vue-router';
|
||||
import { DataType, getSettings, ThemeType } from '/@/utils/settings.ts';
|
||||
import { ServerDetailType } from '/@/components/body-d-left/bodyLeftHooks.ts';
|
||||
import { YinChuanOption } from '/@/assets/mapUtils/mapConstant.ts';
|
||||
@@ -76,7 +75,6 @@
|
||||
|
||||
const title = ref('银川片应急就医服务中心');
|
||||
const phone = '(0951-6805199)';
|
||||
const route = useRoute();
|
||||
const setting = getSettings(DataType.yinChuan);
|
||||
onMounted(() => {
|
||||
init();
|
||||
|
||||
Reference in New Issue
Block a user