update
1.修改socket弹窗等
This commit is contained in:
+1
-1
@@ -26,7 +26,7 @@
|
|||||||
if (result?.screenPath) {
|
if (result?.screenPath) {
|
||||||
router.replace(result?.screenPath);
|
router.replace(result?.screenPath);
|
||||||
} else {
|
} else {
|
||||||
router.replace('centralScreen');
|
router.replace('/home');
|
||||||
}
|
}
|
||||||
userStore.setCenterInfo(result);
|
userStore.setCenterInfo(result);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -86,3 +86,7 @@ export function openTestModal() {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export function handleSocketUrl(url: string, centerId: string) {
|
||||||
|
return url.substring(0, url.indexOf('/websocket/') + 11) + centerId;
|
||||||
|
}
|
||||||
|
|||||||
@@ -4,8 +4,8 @@
|
|||||||
<template #container>
|
<template #container>
|
||||||
<div class="police-con" :class="[themeType]">
|
<div class="police-con" :class="[themeType]">
|
||||||
<div class="sub-text">
|
<div class="sub-text">
|
||||||
<span v-if="userInfo['type'] == '0'">有一个员工刚刚发起 应急求助(120),请马上处理!</span>
|
<span v-if="userInfo['callType'] == '0'">有一个员工刚刚发起 应急求助(120),请马上处理!</span>
|
||||||
<span v-if="userInfo['type'] == '1'">有一个员工刚刚发起 应急求助,请马上处理!</span>
|
<span v-if="userInfo['callType'] == '1'">有一个员工刚刚发起 应急求助,请马上处理!</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="con-item">
|
<div class="con-item">
|
||||||
<span>姓名:</span>
|
<span>姓名:</span>
|
||||||
@@ -82,11 +82,13 @@
|
|||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
margin-left: 8px;
|
margin-left: 8px;
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
|
color: #ffffff;
|
||||||
}
|
}
|
||||||
|
|
||||||
.con-item {
|
.con-item {
|
||||||
padding: 1.3% 0;
|
padding: 1.3% 0;
|
||||||
display: flex;
|
display: flex;
|
||||||
|
color: #ffffff;
|
||||||
|
|
||||||
span:nth-child(1) {
|
span:nth-child(1) {
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
|
|||||||
@@ -73,6 +73,7 @@
|
|||||||
<style scoped lang="less">
|
<style scoped lang="less">
|
||||||
.police-con {
|
.police-con {
|
||||||
padding: 2% 0 2% 5%;
|
padding: 2% 0 2% 5%;
|
||||||
|
color: #ffffff;
|
||||||
|
|
||||||
.sub-text {
|
.sub-text {
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
@@ -83,6 +84,7 @@
|
|||||||
.con-item {
|
.con-item {
|
||||||
padding: 1.3% 0;
|
padding: 1.3% 0;
|
||||||
display: flex;
|
display: flex;
|
||||||
|
color: #ffffff;
|
||||||
|
|
||||||
span:nth-child(1) {
|
span:nth-child(1) {
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
|
|||||||
+206
-3
@@ -20,7 +20,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="sun-body-center">
|
<div class="sun-body-center">
|
||||||
<CenterMap />
|
<CenterMap :showHospitalList="showHospitalList" :hospitalList="hospitalList" @clear-hospital-list="clearHospitalList" />
|
||||||
</div>
|
</div>
|
||||||
<div class="sun-body-right">
|
<div class="sun-body-right">
|
||||||
<div class="sun-body-right-one">
|
<div class="sun-body-right-one">
|
||||||
@@ -36,6 +36,11 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<PhoneDialog ref="phoneDialogRef" :title="phoneDialogTitle" :useForm="true" :setting="setting" :phoneType="phoneType" />
|
<PhoneDialog ref="phoneDialogRef" :title="phoneDialogTitle" :useForm="true" :setting="setting" :phoneType="phoneType" />
|
||||||
|
<!-- <YunZuoXiDialog ref="yunZuoXiDialogRef" :record="xianYunData" @confirmHelp="confirmHelp" />-->
|
||||||
|
<!-- 健康监测弹窗 -->
|
||||||
|
<EmployeeDialog ref="employeeDialogRef" :record="socketData" />
|
||||||
|
<!-- 应急、120弹窗 -->
|
||||||
|
<EmergencyDialog ref="emergencyDialogRef" :record="socketData1" @confirm-help="confirmHelp" />
|
||||||
<IndexModal
|
<IndexModal
|
||||||
ref="indexModalRef"
|
ref="indexModalRef"
|
||||||
:api="modalApi"
|
:api="modalApi"
|
||||||
@@ -57,14 +62,23 @@
|
|||||||
import threeR from '/@/views/indexSun/threeR.vue';
|
import threeR from '/@/views/indexSun/threeR.vue';
|
||||||
import CenterMap from '/@/views/indexSun/centerMap.vue';
|
import CenterMap from '/@/views/indexSun/centerMap.vue';
|
||||||
import { ServerDetailType } from '/@/components/body-d-left/bodyLeftHooks.ts';
|
import { ServerDetailType } from '/@/components/body-d-left/bodyLeftHooks.ts';
|
||||||
import { nextTick, onMounted, ref } from 'vue';
|
|
||||||
import { columns, fromLists, threeRModalColumns, threeRModalFromList, towRcolumns, twoRform } from '/@/views/indexSun/indexSun.ts';
|
import { columns, fromLists, threeRModalColumns, threeRModalFromList, towRcolumns, twoRform } from '/@/views/indexSun/indexSun.ts';
|
||||||
|
import { nextTick, onMounted, onUnmounted, ref, watch } from 'vue';
|
||||||
import PhoneDialog from '/@/views/components/phoneDialog/phoneDialog.vue';
|
import PhoneDialog from '/@/views/components/phoneDialog/phoneDialog.vue';
|
||||||
import { DataType, getSettings } from '/@/utils/settings.ts';
|
import { DataType, getSettings } from '/@/utils/settings.ts';
|
||||||
import IndexModal from '/@/views/indexSun/indexModal.vue';
|
import IndexModal from '/@/views/indexSun/indexModal.vue';
|
||||||
import LoginOutButton from '/@/views/components/loginOutButton.vue';
|
import LoginOutButton from '/@/views/components/loginOutButton.vue';
|
||||||
import router from '/@/router';
|
import router from '/@/router';
|
||||||
import { getAuthCache } from '/@/utils/auth.ts';
|
import { getAuthCache } from '/@/utils/auth.ts';
|
||||||
|
import { basicPath, useSocket, emergencyPath } from '/@/utils/socket.ts';
|
||||||
|
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 { handleSocketUrl } from '/@/utils/utils.ts';
|
||||||
|
import { useUserStore } from '/@/store/modules/user.ts';
|
||||||
|
|
||||||
|
const { getCenterInfo } = useUserStore();
|
||||||
import { threeRModalApi, twoRModal1Api, twoRModal2Api, twoRModal3Api } from '/@/views/indexSun/indexSun.api.ts';
|
import { threeRModalApi, twoRModal1Api, twoRModal2Api, twoRModal3Api } from '/@/views/indexSun/indexSun.api.ts';
|
||||||
import dayjs from 'dayjs';
|
import dayjs from 'dayjs';
|
||||||
//0:处置 1:处理 2:呼入 3:全部
|
//0:处置 1:处理 2:呼入 3:全部
|
||||||
@@ -84,6 +98,7 @@
|
|||||||
const centerInfo = getAuthCache('centerInfo');
|
const centerInfo = getAuthCache('centerInfo');
|
||||||
centerId.value = centerInfo.id;
|
centerId.value = centerInfo.id;
|
||||||
});
|
});
|
||||||
|
|
||||||
function handleOneLeftClick(item) {
|
function handleOneLeftClick(item) {
|
||||||
const { name, key } = item;
|
const { name, key } = item;
|
||||||
//呼入电话
|
//呼入电话
|
||||||
@@ -99,6 +114,7 @@
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function handleTwoLClick() {
|
function handleTwoLClick() {
|
||||||
indexModalTitle.value = '主诉分类详情';
|
indexModalTitle.value = '主诉分类详情';
|
||||||
indexColumn.value = columns[1];
|
indexColumn.value = columns[1];
|
||||||
@@ -108,12 +124,184 @@
|
|||||||
indexModalRef.value.openDialog();
|
indexModalRef.value.openDialog();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function handleOneRClick() {
|
function handleOneRClick() {
|
||||||
console.log(12333);
|
|
||||||
router.push({
|
router.push({
|
||||||
path: '/indexSon',
|
path: '/indexSon',
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 健康监测工具报警
|
||||||
|
let socketUrl = handleSocketUrl(basicPath, getCenterInfo?.id);
|
||||||
|
const { socketData, setSocketData, closeSocket } = useSocket(socketUrl);
|
||||||
|
const employeeDialogRef = ref();
|
||||||
|
|
||||||
|
function employeeDialogOpen() {
|
||||||
|
setSocketData({
|
||||||
|
userId: '001a9878fdaf401c844a03e2fc7c370b',
|
||||||
|
realName: '曹燕',
|
||||||
|
lon: 87.587482,
|
||||||
|
lat: 43.856052,
|
||||||
|
sex: 2,
|
||||||
|
age: 40,
|
||||||
|
orgCode: 'A01A33A05',
|
||||||
|
orgName: '地质研究所',
|
||||||
|
hospitalList: [
|
||||||
|
{
|
||||||
|
id: null,
|
||||||
|
name: '交大一附院',
|
||||||
|
lat: 34.22,
|
||||||
|
lon: 108.94,
|
||||||
|
type: null,
|
||||||
|
ambulance: null,
|
||||||
|
docNum: null,
|
||||||
|
nurseNum: null,
|
||||||
|
expertNum: null,
|
||||||
|
distance: null,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: null,
|
||||||
|
name: '高新医院',
|
||||||
|
lat: 34.23,
|
||||||
|
lon: 108.88,
|
||||||
|
type: null,
|
||||||
|
ambulance: null,
|
||||||
|
docNum: null,
|
||||||
|
nurseNum: null,
|
||||||
|
expertNum: null,
|
||||||
|
distance: null,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: null,
|
||||||
|
name: '人民医院',
|
||||||
|
lat: 34.24,
|
||||||
|
lon: 108.93,
|
||||||
|
type: null,
|
||||||
|
ambulance: null,
|
||||||
|
docNum: null,
|
||||||
|
nurseNum: null,
|
||||||
|
expertNum: null,
|
||||||
|
distance: null,
|
||||||
|
},
|
||||||
|
],
|
||||||
|
});
|
||||||
|
emergencyDialogRef.value.openDialog();
|
||||||
|
}
|
||||||
|
|
||||||
|
setTimeout(() => {
|
||||||
|
// employeeDialogOpen();
|
||||||
|
// openEmergencyOpen();
|
||||||
|
// yunZOpen();
|
||||||
|
}, 5000);
|
||||||
|
|
||||||
|
watch(socketData, (nVal) => {
|
||||||
|
if (nVal) {
|
||||||
|
nextTick(() => {
|
||||||
|
setSocketData(nVal);
|
||||||
|
employeeDialogRef.value.openDialog();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
//应急求助、120弹窗
|
||||||
|
let socketUrl1 = handleSocketUrl(emergencyPath, getCenterInfo?.id);
|
||||||
|
const { socketData: socketData1, setSocketData: setSocketData1, closeSocket: closeSocket1 } = useSocket(socketUrl1, false);
|
||||||
|
const emergencyDialogRef = ref(); //紧急求助
|
||||||
|
watch(socketData1, (nVal) => {
|
||||||
|
if (nVal) {
|
||||||
|
setSocketData1(nVal);
|
||||||
|
emergencyDialogRef.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;
|
||||||
|
}
|
||||||
|
|
||||||
|
onUnmounted(() => {
|
||||||
|
// 监听窗口关闭事件,当窗口关闭时,主动去关闭websocket连接,防止连接还没断开就关闭窗口,server端会抛异常。
|
||||||
|
window.onbeforeunload = function () {
|
||||||
|
closeSocket();
|
||||||
|
closeSocket1(); //西安云坐席
|
||||||
|
};
|
||||||
|
});
|
||||||
function handleThreeRClick(type) {
|
function handleThreeRClick(type) {
|
||||||
const textArr = ['心血管异常人员列表', '脑血管异常人员列表', '冠状CT异常人员列表'];
|
const textArr = ['心血管异常人员列表', '脑血管异常人员列表', '冠状CT异常人员列表'];
|
||||||
console.log(type);
|
console.log(type);
|
||||||
@@ -159,6 +347,7 @@
|
|||||||
letter-spacing: 2px;
|
letter-spacing: 2px;
|
||||||
background: url('/@/assets/indexSun/bigBg.png') no-repeat;
|
background: url('/@/assets/indexSun/bigBg.png') no-repeat;
|
||||||
background-size: 100% 100%;
|
background-size: 100% 100%;
|
||||||
|
|
||||||
.sun-screen-title {
|
.sun-screen-title {
|
||||||
height: 80px;
|
height: 80px;
|
||||||
background: url('/@/assets/indexSun/bg.png') no-repeat;
|
background: url('/@/assets/indexSun/bg.png') no-repeat;
|
||||||
@@ -168,10 +357,12 @@
|
|||||||
color: #fff;
|
color: #fff;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
line-height: 60px;
|
line-height: 60px;
|
||||||
|
|
||||||
.sun-title-left,
|
.sun-title-left,
|
||||||
.sun-title-right {
|
.sun-title-right {
|
||||||
width: 23%;
|
width: 23%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.sun-title-center {
|
.sun-title-center {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
font-size: 50px;
|
font-size: 50px;
|
||||||
@@ -181,11 +372,13 @@
|
|||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.sun-body-content {
|
.sun-body-content {
|
||||||
height: calc(100% - 80px);
|
height: calc(100% - 80px);
|
||||||
padding: 10px 20px;
|
padding: 10px 20px;
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
|
|
||||||
.sun-body-left,
|
.sun-body-left,
|
||||||
.sun-body-right {
|
.sun-body-right {
|
||||||
height: 100%;
|
height: 100%;
|
||||||
@@ -194,6 +387,7 @@
|
|||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
}
|
}
|
||||||
|
|
||||||
.sun-body-center {
|
.sun-body-center {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
margin: 0 10px;
|
margin: 0 10px;
|
||||||
@@ -201,6 +395,7 @@
|
|||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
}
|
}
|
||||||
|
|
||||||
.sun-body-left {
|
.sun-body-left {
|
||||||
.sun-body-left-one,
|
.sun-body-left-one,
|
||||||
.sun-body-left-two,
|
.sun-body-left-two,
|
||||||
@@ -208,6 +403,7 @@
|
|||||||
margin-bottom: 10px;
|
margin-bottom: 10px;
|
||||||
border: 1px solid #00ccff;
|
border: 1px solid #00ccff;
|
||||||
border-radius: 14px;
|
border-radius: 14px;
|
||||||
|
|
||||||
.one-l-box,
|
.one-l-box,
|
||||||
.two-l-box,
|
.two-l-box,
|
||||||
.three-l-box,
|
.three-l-box,
|
||||||
@@ -215,14 +411,17 @@
|
|||||||
height: 100%;
|
height: 100%;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.sun-body-left-one {
|
.sun-body-left-one {
|
||||||
height: 27%;
|
height: 27%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.sun-body-left-two,
|
.sun-body-left-two,
|
||||||
.sun-body-left-three {
|
.sun-body-left-three {
|
||||||
height: 36%;
|
height: 36%;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.sun-body-right {
|
.sun-body-right {
|
||||||
.sun-body-right-one,
|
.sun-body-right-one,
|
||||||
.sun-body-right-two,
|
.sun-body-right-two,
|
||||||
@@ -230,18 +429,22 @@
|
|||||||
border: 1px solid #00ccff;
|
border: 1px solid #00ccff;
|
||||||
border-radius: 14px;
|
border-radius: 14px;
|
||||||
margin-bottom: 10px;
|
margin-bottom: 10px;
|
||||||
|
|
||||||
.one-r-box,
|
.one-r-box,
|
||||||
.two-r-box,
|
.two-r-box,
|
||||||
.three-r-box {
|
.three-r-box {
|
||||||
height: 100%;
|
height: 100%;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.sun-body-right-one {
|
.sun-body-right-one {
|
||||||
height: 30%;
|
height: 30%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.sun-body-right-two {
|
.sun-body-right-two {
|
||||||
height: 42%;
|
height: 42%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.sun-body-right-three {
|
.sun-body-right-three {
|
||||||
height: 26%;
|
height: 26%;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -19,22 +19,22 @@
|
|||||||
<a-button class="search-btn" @click="searchRoute" :loading="searchFlag" :disabled="searchFlag"> 路线规划 </a-button>
|
<a-button class="search-btn" @click="searchRoute" :loading="searchFlag" :disabled="searchFlag"> 路线规划 </a-button>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-form>
|
</a-form>
|
||||||
<div v-show="showRoutePanel" v-click-outside="outClick" class="line-container">
|
</div>
|
||||||
<div v-show="routeList.length" class="has-data">
|
<div v-show="showRoutePanel" v-click-outside="outClick" class="line-container">
|
||||||
<div class="line-title"> {{ panelTitle }}</div>
|
<div v-show="routeList.length" class="has-data">
|
||||||
<div class="line-content">
|
<div class="line-title"> {{ panelTitle }}</div>
|
||||||
<div class="start">起点</div>
|
<div class="line-content">
|
||||||
<div class="line-body">
|
<div class="start">起点</div>
|
||||||
<div class="line"></div>
|
<div class="line-body">
|
||||||
<div class="line-desc">
|
<div class="line"></div>
|
||||||
<p v-for="(item, i) in routeList" :key="i">{{ item }}</p>
|
<div class="line-desc">
|
||||||
</div>
|
<p v-for="(item, i) in routeList" :key="i">{{ item }}</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="end">终点</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
<div class="end">终点</div>
|
||||||
</div>
|
</div>
|
||||||
<div v-show="!routeList.length" class="empty-data"> 暂无数据</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
<div v-show="!routeList.length" class="empty-data"> 暂无数据</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="map">
|
<div class="map">
|
||||||
<div style="flex: 1; overflow: hidden">
|
<div style="flex: 1; overflow: hidden">
|
||||||
@@ -59,10 +59,18 @@
|
|||||||
<div class="text">累计处置</div>
|
<div class="text">累计处置</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="hospital-list" :class="[themeType]" 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>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { onMounted, ref } from 'vue';
|
import { nextTick, onMounted, ref } from 'vue';
|
||||||
import { infoContent, legendList, tabList } from '/@/views/indexSun/indexSun.ts';
|
import { infoContent, legendList, tabList } from '/@/views/indexSun/indexSun.ts';
|
||||||
import { message } from 'ant-design-vue';
|
import { message } from 'ant-design-vue';
|
||||||
import { innerLineLight, outerLineOption } from '/@/assets/mapUtils/mapConstant.ts';
|
import { innerLineLight, outerLineOption } from '/@/assets/mapUtils/mapConstant.ts';
|
||||||
@@ -71,7 +79,8 @@
|
|||||||
import { useDetailStore } from '/@/store/modules/detailData.ts';
|
import { useDetailStore } from '/@/store/modules/detailData.ts';
|
||||||
import $bus from '/@/utils/bus.ts';
|
import $bus from '/@/utils/bus.ts';
|
||||||
import { earlyWarning } from '/@/utils/busConstant.ts';
|
import { earlyWarning } from '/@/utils/busConstant.ts';
|
||||||
|
import { useTheme } from '/@/hooks/theme/useTheme.ts';
|
||||||
|
const { themeType } = useTheme();
|
||||||
const list = ref(tabList);
|
const list = ref(tabList);
|
||||||
const currentIndex = ref(0);
|
const currentIndex = ref(0);
|
||||||
let searchFlag = ref(false);
|
let searchFlag = ref(false);
|
||||||
@@ -87,11 +96,25 @@
|
|||||||
return true;
|
return true;
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
//是否展示最近的三个医院
|
||||||
|
showHospitalList: {
|
||||||
|
type: Boolean,
|
||||||
|
default: () => {
|
||||||
|
return false;
|
||||||
|
},
|
||||||
|
},
|
||||||
|
hospitalList: {
|
||||||
|
type: Array,
|
||||||
|
default: () => {
|
||||||
|
return [];
|
||||||
|
},
|
||||||
|
},
|
||||||
});
|
});
|
||||||
const useDetail = useDetailStore();
|
const useDetail = useDetailStore();
|
||||||
const showRoutePanel = ref(false);
|
const showRoutePanel = ref(false);
|
||||||
const panelTitle = ref();
|
const panelTitle = ref();
|
||||||
const level = ref(0);
|
const level = ref(0);
|
||||||
|
const drivingTitle = ref('');
|
||||||
const routeList = ref([]);
|
const routeList = ref([]);
|
||||||
const emits = defineEmits(['clearHospitalList']);
|
const emits = defineEmits(['clearHospitalList']);
|
||||||
const showDrivingPanel = ref(false);
|
const showDrivingPanel = ref(false);
|
||||||
@@ -121,6 +144,19 @@
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
function showDrivingLine(item) {
|
||||||
|
nextTick(() => {
|
||||||
|
panelTitle.value = '全程' + item.driveTime + item.distance;
|
||||||
|
routeList.value = item.routeList?.map((item) => item?.instruction);
|
||||||
|
showDrivingPanel.value = true;
|
||||||
|
if (item.lon) {
|
||||||
|
Map.clearNaviLine();
|
||||||
|
Map.createNaviLine(item.userLocation, [item.lon, item.lat]);
|
||||||
|
}
|
||||||
|
showRoutePanel.value = true;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
function setLevel() {
|
function setLevel() {
|
||||||
//获取当前地图级别
|
//获取当前地图级别
|
||||||
level.value = Map.map.getZoom();
|
level.value = Map.map.getZoom();
|
||||||
@@ -377,88 +413,6 @@
|
|||||||
background: #6d8bf1;
|
background: #6d8bf1;
|
||||||
border-radius: 5px;
|
border-radius: 5px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.line-container {
|
|
||||||
position: absolute;
|
|
||||||
right: 0;
|
|
||||||
top: 54px;
|
|
||||||
width: 288px;
|
|
||||||
padding: 9px 18px;
|
|
||||||
min-height: 200px;
|
|
||||||
max-height: 473px;
|
|
||||||
overflow: auto;
|
|
||||||
background: rgba(0, 0, 0, 0.7);
|
|
||||||
border-radius: 2px;
|
|
||||||
//border: 1px solid #1b7ef2;
|
|
||||||
|
|
||||||
.line-title {
|
|
||||||
margin-bottom: 9px;
|
|
||||||
font-size: 14px;
|
|
||||||
font-weight: 700;
|
|
||||||
color: var(--cardFontColor);
|
|
||||||
}
|
|
||||||
|
|
||||||
.line-content {
|
|
||||||
font-size: 12px;
|
|
||||||
color: var(--cardFontColor);
|
|
||||||
|
|
||||||
.start {
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
|
|
||||||
&::before {
|
|
||||||
content: '起';
|
|
||||||
color: var(--cardFontFFF);
|
|
||||||
width: 20px;
|
|
||||||
height: 20px;
|
|
||||||
margin-right: 7px;
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
justify-content: center;
|
|
||||||
border-radius: 50%;
|
|
||||||
background: var(--circelBg);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.end {
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
|
|
||||||
&::before {
|
|
||||||
content: '终';
|
|
||||||
color: var(--cardFontFFF);
|
|
||||||
width: 20px;
|
|
||||||
height: 20px;
|
|
||||||
margin-right: 7px;
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
justify-content: center;
|
|
||||||
border-radius: 50%;
|
|
||||||
background: var(--circelBg);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.line-body {
|
|
||||||
display: flex;
|
|
||||||
color: var(--cardFontColor);
|
|
||||||
}
|
|
||||||
|
|
||||||
.line {
|
|
||||||
width: 1px;
|
|
||||||
background-color: var(--circelBg);
|
|
||||||
margin: 5px 19px 5px 8px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.line-desc {
|
|
||||||
flex: 1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.empty-data {
|
|
||||||
margin-top: 30%;
|
|
||||||
text-align: center;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.map {
|
.map {
|
||||||
@@ -578,5 +532,113 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.hospital-list {
|
||||||
|
position: absolute;
|
||||||
|
bottom: 160px;
|
||||||
|
left: 50%;
|
||||||
|
transform: translateX(-50%);
|
||||||
|
display: flex;
|
||||||
|
|
||||||
|
.hospital-item {
|
||||||
|
background: #0a1d36;
|
||||||
|
border: 1px solid #0a1d36;
|
||||||
|
box-shadow: 0 0 3px 3px #0a1d36;
|
||||||
|
position: relative;
|
||||||
|
flex: 1;
|
||||||
|
gap: 20px;
|
||||||
|
min-width: 200px;
|
||||||
|
max-width: 200px;
|
||||||
|
text-align: center;
|
||||||
|
padding: 10px;
|
||||||
|
margin: 0 10px;
|
||||||
|
font-size: 16px;
|
||||||
|
border-radius: 12px;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.line-container {
|
||||||
|
position: absolute;
|
||||||
|
right: 0;
|
||||||
|
top: 54px;
|
||||||
|
width: 288px;
|
||||||
|
padding: 9px 18px;
|
||||||
|
min-height: 200px;
|
||||||
|
max-height: 473px;
|
||||||
|
overflow: auto;
|
||||||
|
background: #0a1d36;
|
||||||
|
border-radius: 2px;
|
||||||
|
//border: 1px solid #1b7ef2;
|
||||||
|
|
||||||
|
.line-title {
|
||||||
|
margin-bottom: 9px;
|
||||||
|
font-size: 14px;
|
||||||
|
font-weight: 700;
|
||||||
|
background: #0a1d36 !important;
|
||||||
|
color: var(--cardFontColor);
|
||||||
|
}
|
||||||
|
|
||||||
|
.line-content {
|
||||||
|
font-size: 12px;
|
||||||
|
color: var(--cardFontColor);
|
||||||
|
|
||||||
|
.start {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
|
||||||
|
&::before {
|
||||||
|
content: '起';
|
||||||
|
color: var(--cardFontFFF);
|
||||||
|
width: 20px;
|
||||||
|
height: 20px;
|
||||||
|
margin-right: 7px;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
border-radius: 50%;
|
||||||
|
background: var(--circelBg);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.end {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
|
||||||
|
&::before {
|
||||||
|
content: '终';
|
||||||
|
color: var(--cardFontFFF);
|
||||||
|
width: 20px;
|
||||||
|
height: 20px;
|
||||||
|
margin-right: 7px;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
border-radius: 50%;
|
||||||
|
background: var(--circelBg);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.line-body {
|
||||||
|
display: flex;
|
||||||
|
color: var(--cardFontColor);
|
||||||
|
}
|
||||||
|
|
||||||
|
.line {
|
||||||
|
width: 1px;
|
||||||
|
background-color: var(--circelBg);
|
||||||
|
margin: 5px 19px 5px 8px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.line-desc {
|
||||||
|
flex: 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.empty-data {
|
||||||
|
margin-top: 30%;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -14,10 +14,10 @@
|
|||||||
/>
|
/>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
<a-form-item label="单位">
|
<a-form-item label="单位">
|
||||||
<a-select placeholder="选择单位" v-model:value="orgCode" :options="option" :field-names="fieldNames" />
|
<a-select placeholder="选择单位" @change="changeSecond" v-model:value="orgCode1" :options="option1" />
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
<a-form-item label="部门">
|
<a-form-item label="部门">
|
||||||
<a-select placeholder="选择单位" @focus="changeDept" v-model:value="orgCode" :options="option" :field-names="fieldNames" />
|
<a-select placeholder="选择部门" v-model:value="orgCode2" :options="option2" />
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
<slot name="searchSecond"></slot>
|
<slot name="searchSecond"></slot>
|
||||||
</Form>
|
</Form>
|
||||||
@@ -56,12 +56,11 @@
|
|||||||
import Dialog from '/@/components/dialog/Dialog.vue';
|
import Dialog from '/@/components/dialog/Dialog.vue';
|
||||||
import { useDialog } from '/@/views/components/dialogHooks.ts';
|
import { useDialog } from '/@/views/components/dialogHooks.ts';
|
||||||
import { onMounted, ref, watch } from 'vue';
|
import { onMounted, ref, watch } from 'vue';
|
||||||
import { SexType, sexTypeList } from '/@/utils/settings.ts';
|
import { SexType } from '/@/utils/settings.ts';
|
||||||
import { Form } from 'ant-design-vue';
|
import { Form } from 'ant-design-vue';
|
||||||
import { useDepart } from '/@/components/secondaryScreen/secondMap/secondMapHooks.ts';
|
|
||||||
import { message } from 'ant-design-vue';
|
import { message } from 'ant-design-vue';
|
||||||
import BasicTable from '/@/components/secondaryScreen/secondMap/components/basicTable/BasicTable.vue';
|
import BasicTable from '/@/components/secondaryScreen/secondMap/components/basicTable/BasicTable.vue';
|
||||||
import { getSecondaryDepartmentList } from '/@/views/indexSun/indexSun.api.ts';
|
import { allSecondaryDepartsApi, getThreeDepartByOrgCodeApi } from '/@/views/indexSun/indexSun.api.ts';
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
title: {
|
title: {
|
||||||
@@ -95,28 +94,71 @@
|
|||||||
const formState = ref();
|
const formState = ref();
|
||||||
const registerTable = ref();
|
const registerTable = ref();
|
||||||
const dialogTitle = ref('');
|
const dialogTitle = ref('');
|
||||||
|
const option1 = ref([{ label: '全部', value: '' }]);
|
||||||
|
const option2 = ref([{ label: '全部', value: '' }]);
|
||||||
|
const orgCode1 = ref('');
|
||||||
|
const orgCode2 = ref('');
|
||||||
const formRecord = ref({});
|
const formRecord = ref({});
|
||||||
const dataActity = ref(1);
|
const dataActity = ref(1);
|
||||||
function changeDept() {
|
|
||||||
if (!orgCode.value) {
|
|
||||||
return message.warning('请先选择单位');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
getSecondDept();
|
getSecondDepart();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
function getSecondDepart() {
|
||||||
|
allSecondaryDepartsApi({})
|
||||||
|
.then((res: any) => {
|
||||||
|
if (res.code === 200) {
|
||||||
|
const op: any[] = res?.result
|
||||||
|
? res.result.map((it: any) => {
|
||||||
|
return {
|
||||||
|
label: it.departName,
|
||||||
|
value: it.orgCode,
|
||||||
|
};
|
||||||
|
})
|
||||||
|
: [];
|
||||||
|
option1.value = option1.value.concat(op);
|
||||||
|
} else {
|
||||||
|
}
|
||||||
|
})
|
||||||
|
.catch((err) => {
|
||||||
|
console.log(err);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
function handleDataChange(type) {
|
function handleDataChange(type) {
|
||||||
if (type == dataActity.value) return;
|
if (type == dataActity.value) return;
|
||||||
dataActity.value = type;
|
dataActity.value = type;
|
||||||
}
|
}
|
||||||
function getSecondDept() {
|
|
||||||
getSecondaryDepartmentList().then((res) => {
|
function changeSecond() {
|
||||||
console.log(res, 'shshakjhdsjbjanmdjka');
|
orgCode2.value = '';
|
||||||
if (res.code == 200) {
|
option2.value = [{ label: '全部', value: '' }];
|
||||||
console.log(res, 'ddddddddd');
|
if (orgCode1.value) {
|
||||||
}
|
getThirdD();
|
||||||
});
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function getThirdD() {
|
||||||
|
getThreeDepartByOrgCodeApi({ orgCode: orgCode1.value })
|
||||||
|
.then((res: any) => {
|
||||||
|
if (res.code === 200) {
|
||||||
|
const op: any[] = res?.result
|
||||||
|
? res.result.map((it: any) => {
|
||||||
|
return {
|
||||||
|
label: it.departName,
|
||||||
|
value: it.orgCode,
|
||||||
|
};
|
||||||
|
})
|
||||||
|
: [];
|
||||||
|
option2.value = option2.value.concat(op);
|
||||||
|
} else {
|
||||||
|
}
|
||||||
|
})
|
||||||
|
.catch((err) => {
|
||||||
|
console.log(err);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
const formItemLayout = {
|
const formItemLayout = {
|
||||||
labelCol: {
|
labelCol: {
|
||||||
style: { width: '80px' },
|
style: { width: '80px' },
|
||||||
@@ -137,7 +179,6 @@
|
|||||||
twoROnlyFun();
|
twoROnlyFun();
|
||||||
}
|
}
|
||||||
getField();
|
getField();
|
||||||
getSecondDept();
|
|
||||||
});
|
});
|
||||||
const normalNum = ref();
|
const normalNum = ref();
|
||||||
const abnormalNum = ref();
|
const abnormalNum = ref();
|
||||||
@@ -189,7 +230,6 @@
|
|||||||
...formRecord.value,
|
...formRecord.value,
|
||||||
...result,
|
...result,
|
||||||
};
|
};
|
||||||
getSecondDept();
|
|
||||||
console.log(formRecord.value);
|
console.log(formRecord.value);
|
||||||
}
|
}
|
||||||
function handleClicksearch() {
|
function handleClicksearch() {
|
||||||
@@ -200,7 +240,6 @@
|
|||||||
// registerTable.value.getRecords();
|
// registerTable.value.getRecords();
|
||||||
}
|
}
|
||||||
|
|
||||||
const { orgCode, option, fieldNames, setOrgCode } = useDepart();
|
|
||||||
const { visible, closeDialog, openDialog } = useDialog({ title: dialogTitle.value });
|
const { visible, closeDialog, openDialog } = useDialog({ title: dialogTitle.value });
|
||||||
|
|
||||||
function handleClose() {
|
function handleClose() {
|
||||||
|
|||||||
@@ -7,6 +7,8 @@ enum Api {
|
|||||||
oneR = '/health-watch/watch/watchMonitorData/getMonitorList',
|
oneR = '/health-watch/watch/watchMonitorData/getMonitorList',
|
||||||
threeR = '/health-emergency/emergency/LargeScreenNew/medicalAbnormalStatistics',
|
threeR = '/health-emergency/emergency/LargeScreenNew/medicalAbnormalStatistics',
|
||||||
twoR = '/health-emergency/emergency/LargeScreenNew/healthSign',
|
twoR = '/health-emergency/emergency/LargeScreenNew/healthSign',
|
||||||
|
allSecondaryDeparts = '/sys/sysDepart/allSecondaryDeparts',
|
||||||
|
getThreeDepartByOrgCode = '/sys/sysDepart/getThreeDepartByOrgCode',
|
||||||
threeRModal = '/health-emergency/emergency/LargeScreenNew/medicalAbnormal',
|
threeRModal = '/health-emergency/emergency/LargeScreenNew/medicalAbnormal',
|
||||||
twoRModal1 = '/health-emergency/emergency/LargeScreenNew/healthWeightLoss',
|
twoRModal1 = '/health-emergency/emergency/LargeScreenNew/healthWeightLoss',
|
||||||
twoRModal2 = '/health-emergency/emergency/LargeScreenNew/healthBloodSugar',
|
twoRModal2 = '/health-emergency/emergency/LargeScreenNew/healthBloodSugar',
|
||||||
@@ -26,3 +28,5 @@ export const twoRModal1Api = (params) => post(Api.twoRModal1, params);
|
|||||||
export const twoRModal2Api = (params) => post(Api.twoRModal2, params);
|
export const twoRModal2Api = (params) => post(Api.twoRModal2, params);
|
||||||
export const twoRModal3Api = (params) => post(Api.twoRModal3, params);
|
export const twoRModal3Api = (params) => post(Api.twoRModal3, params);
|
||||||
export const getSecondaryDepartmentList = () => get({ url: Api.getSecondaryDepartment });
|
export const getSecondaryDepartmentList = () => get({ url: Api.getSecondaryDepartment });
|
||||||
|
export const allSecondaryDepartsApi = (params) => get(Api.allSecondaryDeparts, params);
|
||||||
|
export const getThreeDepartByOrgCodeApi = (params) => get(Api.getThreeDepartByOrgCode, params);
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import { normalTypeList, SexType, sexTypeList } from '/@/utils/settings.ts';
|
|||||||
export const legend1 = new URL('/@/assets/img/legend1.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/legend5.png', import.meta.url).href;
|
export const legend2 = new URL('/@/assets/img/legend5.png', import.meta.url).href;
|
||||||
export const legend3 = new URL('/@/assets/img/legend3.png', import.meta.url).href;
|
export const legend3 = new URL('/@/assets/img/legend3.png', import.meta.url).href;
|
||||||
export function getClassCharts(dx, dy) {
|
export function getClassCharts(dx, dy, m) {
|
||||||
return {
|
return {
|
||||||
grid: {
|
grid: {
|
||||||
top: 40,
|
top: 40,
|
||||||
@@ -50,6 +50,7 @@ export function getClassCharts(dx, dy) {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
interval: 25, // 步长
|
interval: 25, // 步长
|
||||||
|
max: m,
|
||||||
min: 0, // 起始 - 设置y轴刻度的最小值
|
min: 0, // 起始 - 设置y轴刻度的最小值
|
||||||
axisLabel: {
|
axisLabel: {
|
||||||
color: '#65C6E7',
|
color: '#65C6E7',
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="content">
|
<div class="content">
|
||||||
<div class="content-search">
|
<div class="content-search">
|
||||||
<div class="type-select">
|
<div>
|
||||||
<a-select v-model:value="selectValue" class="type-select" :options="selectOptions">
|
<a-select v-model:value="selectValue" class="type-select" :options="selectOptions">
|
||||||
<a-select-option value="全部数据">全部数据</a-select-option>
|
<a-select-option value="全部数据">全部数据</a-select-option>
|
||||||
</a-select>
|
</a-select>
|
||||||
@@ -42,7 +42,7 @@
|
|||||||
import { ref, onMounted } from 'vue';
|
import { ref, onMounted } from 'vue';
|
||||||
import * as echarts from 'echarts';
|
import * as echarts from 'echarts';
|
||||||
import { getClassCharts } from '/@/views/indexSun/indexSun.ts';
|
import { getClassCharts } from '/@/views/indexSun/indexSun.ts';
|
||||||
import { twoLApi } from '/@/views/indexSun/indexSun.api.ts';
|
import { allSecondaryDepartsApi, twoLApi } from '/@/views/indexSun/indexSun.api.ts';
|
||||||
|
|
||||||
const chooseType = ref('0');
|
const chooseType = ref('0');
|
||||||
const selectValue = ref('all');
|
const selectValue = ref('all');
|
||||||
@@ -52,12 +52,35 @@
|
|||||||
if (chooseType.value === type) return;
|
if (chooseType.value === type) return;
|
||||||
chooseType.value = type;
|
chooseType.value = type;
|
||||||
getData();
|
getData();
|
||||||
// initChart();
|
|
||||||
}
|
}
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
getData();
|
getData();
|
||||||
// initChart();
|
if (selectOptions.value.length === 1) {
|
||||||
|
getAllDepart();
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
function getAllDepart() {
|
||||||
|
allSecondaryDepartsApi({})
|
||||||
|
.then((res: any) => {
|
||||||
|
if (res.code === 200) {
|
||||||
|
const op: any[] = res?.result
|
||||||
|
? res.result.map((it: any) => {
|
||||||
|
return {
|
||||||
|
label: it.departName,
|
||||||
|
value: it.orgCode,
|
||||||
|
};
|
||||||
|
})
|
||||||
|
: [];
|
||||||
|
selectOptions.value = selectOptions.value.concat(op);
|
||||||
|
} else {
|
||||||
|
}
|
||||||
|
})
|
||||||
|
.catch((err) => {
|
||||||
|
console.log(err);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
const myChart = ref(null);
|
const myChart = ref(null);
|
||||||
function getData() {
|
function getData() {
|
||||||
twoLApi({
|
twoLApi({
|
||||||
@@ -81,7 +104,10 @@
|
|||||||
value.map((item) => {
|
value.map((item) => {
|
||||||
return item.count;
|
return item.count;
|
||||||
}) || [];
|
}) || [];
|
||||||
let option = getClassCharts(dx, dy);
|
|
||||||
|
const max = value.sort((a, b) => b.count - a.count).length > 0 ? value.sort((a, b) => b.count - a.count)[0].count : [];
|
||||||
|
const m = max % 25 === 0 ? max : (parseInt(max / 25) + 1) * 25;
|
||||||
|
let option = getClassCharts(dx, dy, m);
|
||||||
myChart.value.setOption(option);
|
myChart.value.setOption(option);
|
||||||
window.addEventListener('resize', () => {
|
window.addEventListener('resize', () => {
|
||||||
myChart.value.resize();
|
myChart.value.resize();
|
||||||
@@ -123,6 +149,7 @@
|
|||||||
align-items: center;
|
align-items: center;
|
||||||
margin: 5px 10px;
|
margin: 5px 10px;
|
||||||
.type-select {
|
.type-select {
|
||||||
|
width: 200px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.type-time {
|
.type-time {
|
||||||
|
|||||||
+3
-42
@@ -201,56 +201,17 @@
|
|||||||
|
|
||||||
let goPath = PageEnum.BASE_HOME;
|
let goPath = PageEnum.BASE_HOME;
|
||||||
if (code == 200) {
|
if (code == 200) {
|
||||||
let flag1 = result?.codeList?.find((item: any) => ['emergency:screen:show:yinchuan'].includes(item));
|
|
||||||
let flag2 = result?.codeList?.find((item: any) => ['emergency:screen:show:xian'].includes(item));
|
|
||||||
let flag3 =
|
let flag3 =
|
||||||
result?.codeList?.find((item: any) => ['emergency:screen:show:centralScreen'].includes(item)) ||
|
result?.codeList?.find((item: any) => ['emergency:screen:show:centralScreen'].includes(item)) ||
|
||||||
userInfo?.roleCodes.split(',').findIndex((item: any) => item === 'large_screen' || item === 'large_screen_admin') > -1;
|
userInfo?.roleCodes.split(',').findIndex((item: any) => item === 'large_screen' || item === 'large_screen_admin') > -1;
|
||||||
let flag4 = result?.codeList?.find((item: any) => ['emergency:screen:show:qinghai'].includes(item));
|
|
||||||
userStore.setFlag1(flag1 || '');
|
|
||||||
userStore.setFlag2(flag2 || '');
|
|
||||||
userStore.setFlag3(flag3 || '');
|
userStore.setFlag3(flag3 || '');
|
||||||
userStore.setFlag4(flag4 || '');
|
if (!flag3) {
|
||||||
if (!flag1 && !flag2 && !flag3) {
|
|
||||||
userStore.setToken('');
|
userStore.setToken('');
|
||||||
userStore.setUserInfo({});
|
userStore.setUserInfo(null);
|
||||||
userStore.setCenterInfo({});
|
userStore.setCenterInfo({});
|
||||||
return message.warn('您没有权限访问大屏,请联系管理员!');
|
return message.warn('您没有权限访问大屏,请联系管理员!');
|
||||||
}
|
}
|
||||||
//1如果有权限 2025-06-16补充判断,如果登陆路由为qLogin 青海登陆,则不走原有逻辑
|
goPath = PageEnum.BASE_HOME;
|
||||||
//1.2若果是有两种权限
|
|
||||||
// debugger;
|
|
||||||
if (route.path === PageEnum.Q_SCREEN_LOGIN && flag4) {
|
|
||||||
goPath = PageEnum.Q_SCREEN;
|
|
||||||
} else if (flag1 && flag2) {
|
|
||||||
// 1.2.1 如果是登录地址是西安
|
|
||||||
// 1.2.2 如果是登录地址是银川
|
|
||||||
if (route.path == PageEnum.BASE_LOGIN_YINCHUAN) {
|
|
||||||
goPath = PageEnum.YINCHUAN_HOME;
|
|
||||||
} else if (route.path == PageEnum.BASE_LOGIN) {
|
|
||||||
goPath = PageEnum.BASE_HOME;
|
|
||||||
} else if (route.path == PageEnum.CENTRAL_SCREEN_LOGIN) {
|
|
||||||
// goPath = PageEnum.CENTRAL_SCREEN;
|
|
||||||
|
|
||||||
goPath = centerInfo?.screenPath || PageEnum.CENTRAL_SCREEN;
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
if (flag1) {
|
|
||||||
goPath = PageEnum.YINCHUAN_HOME;
|
|
||||||
} else if (flag2) {
|
|
||||||
goPath = PageEnum.BASE_HOME;
|
|
||||||
} else if (flag3) {
|
|
||||||
// goPath = PageEnum.CENTRAL_SCREEN;
|
|
||||||
goPath = centerInfo?.screenPath || PageEnum.CENTRAL_SCREEN;
|
|
||||||
} else {
|
|
||||||
userStore.setToken('');
|
|
||||||
userStore.setUserInfo({});
|
|
||||||
userStore.setCenterInfo({});
|
|
||||||
return message.warn('没有权限请联系管理员!');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
return message.warn(msg);
|
|
||||||
}
|
}
|
||||||
notification.success({
|
notification.success({
|
||||||
message: t('login.loginSuccessTitle'),
|
message: t('login.loginSuccessTitle'),
|
||||||
|
|||||||
Reference in New Issue
Block a user