update
1.新疆大屏新需求
This commit is contained in:
+241
-79
@@ -2,9 +2,13 @@
|
||||
<div class="sun-screen-box">
|
||||
<login-out-button out-url="login" />
|
||||
<div class="sun-screen-title">
|
||||
<div class="sun-title-left">{{ dateInfo?.day }} {{ dateInfo?.times }}</div>
|
||||
<div class="sun-title-center">应急就医服务中心</div>
|
||||
<div class="sun-title-right">{{ rightDate }}</div>
|
||||
<div class="sun-title-left">
|
||||
{{ dateInfo?.day }} {{ dateInfo?.times }}<span style="margin-left: 10px">{{ rightDate }}</span>
|
||||
</div>
|
||||
<div class="sun-title-center">{{ getCenterInfo.screenTitle || '健康服务中心' }}</div>
|
||||
<div class="sun-title-right">
|
||||
<a-button class="top-right-button" @click="toOther">健康监测大屏</a-button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="sun-body-content">
|
||||
<div class="sun-body-left">
|
||||
@@ -14,10 +18,13 @@
|
||||
<div class="sun-body-left-two">
|
||||
<twoL @handle-view="handleTwoLClick" :center-id="centerId" :bKey="`two-l-${count}`" />
|
||||
</div>
|
||||
<div class="sun-body-left-three" style="margin-bottom: 0">
|
||||
<div class="sun-body-left-three">
|
||||
<!-- <threeL />-->
|
||||
<threeNewL :bKey="`three-l-${count}`" :center-id="centerId" />
|
||||
</div>
|
||||
<div class="sun-body-left-four" style="margin-bottom: 0">
|
||||
<threeR @handle-click="handleThreeRClick" :center-id="centerId" :bKey="`four-l-${count}`" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="sun-body-center">
|
||||
<CenterMap
|
||||
@@ -26,15 +33,18 @@
|
||||
@clear-hospital-list="clearHospitalList"
|
||||
:show-rest-b="showRestB"
|
||||
@handle-detail="handleCenterMapClick"
|
||||
:map-bottom-info="mapBottom"
|
||||
:show-map-bottom="showMapBottom"
|
||||
@show-rest-b="
|
||||
() => {
|
||||
showRestB = false;
|
||||
showMapBottom = false;
|
||||
}
|
||||
"
|
||||
/>
|
||||
</div>
|
||||
<div class="sun-body-right">
|
||||
<div class="sun-body-right-one">
|
||||
<div class="sun-body-right-one" style="height: calc((100% - 350px) / 2 - 10px); margin-bottom: 10px">
|
||||
<oneR
|
||||
@handle-view="handleOneRClick"
|
||||
@show-reset="
|
||||
@@ -45,11 +55,11 @@
|
||||
:bKey="`one-r-${count}`"
|
||||
/>
|
||||
</div>
|
||||
<div class="sun-body-right-two">
|
||||
<twoR @handle-click="handleTwoRClick" :center-id="centerId" :bKey="`two-r-${count}`" />
|
||||
<div class="sun-body-right-two" style="height: calc((100% - 350px) / 2 - 10px); margin-bottom: 10px">
|
||||
<rwo-new-r :center-id="centerId" :bKey="`two-n-r-${count}`" @handle-view="handleTwoNewRClick" />
|
||||
</div>
|
||||
<div class="sun-body-right-three">
|
||||
<threeR @handle-click="handleThreeRClick" :center-id="centerId" :bKey="`three-r-${count}`" />
|
||||
<div class="sun-body-right-three" style="height: 350px">
|
||||
<twoR @handle-click="handleTwoRClick" :center-id="centerId" :bKey="`two-r-${count}`" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -86,10 +96,13 @@
|
||||
centerMapFromList,
|
||||
columns,
|
||||
fromLists,
|
||||
infoContentSpecial,
|
||||
threeRModalColumns,
|
||||
threeRModalFromList,
|
||||
towRcolumns,
|
||||
twoRform,
|
||||
twoRNewColumns,
|
||||
twoRNewForm,
|
||||
} from '/@/views/indexSun/indexSun.ts';
|
||||
import { nextTick, onMounted, onUnmounted, ref, watch } from 'vue';
|
||||
import PhoneDialog from '/@/views/components/phoneDialog/phoneDialog.vue';
|
||||
@@ -114,8 +127,10 @@
|
||||
twoRModal1Api,
|
||||
twoRModal2Api,
|
||||
twoRModal3Api,
|
||||
twoRNApi,
|
||||
} from '/@/views/indexSun/indexSun.api.ts';
|
||||
import dayjs from 'dayjs';
|
||||
import RwoNewR from '/@/views/indexSun/rwoNewR.vue';
|
||||
//0:处置 1:处理 2:呼入 3:全部
|
||||
const phoneType = ref('');
|
||||
const phoneDialogTitle = ref('呼入电话');
|
||||
@@ -137,6 +152,8 @@
|
||||
const qhInterval = ref();
|
||||
const cInterval = ref();
|
||||
const initDate = ref(startTime);
|
||||
const mapBottom = ref({});
|
||||
const showMapBottom = ref(false);
|
||||
|
||||
onMounted(() => {
|
||||
getTime();
|
||||
@@ -152,6 +169,7 @@
|
||||
rightDate.value = '累计运行时间:' + (dayjs().diff(dayjs(initDate.value), 'days') + 1) + ' 天';
|
||||
const centerInfo = getAuthCache('centerInfo');
|
||||
centerId.value = centerInfo.id;
|
||||
document.title = centerInfo.screenTitle || '健康服务中心';
|
||||
});
|
||||
|
||||
const getTime = () => {
|
||||
@@ -167,6 +185,10 @@
|
||||
}
|
||||
);
|
||||
|
||||
function toOther() {
|
||||
window.open('http://aygc.jy.pc.iosp.ydpt.tech/envShow/envFullscreen', '_blank');
|
||||
}
|
||||
|
||||
function handleOneLeftClick(item) {
|
||||
const { name, key } = item;
|
||||
//呼入电话
|
||||
@@ -213,53 +235,77 @@
|
||||
const employeeDialogRef = ref();
|
||||
|
||||
function employeeDialogOpen() {
|
||||
setSocketData({
|
||||
userId: '001a9878fdaf401c844a03e2fc7c370b',
|
||||
realName: '曹燕',
|
||||
lon: 87.587482,
|
||||
lat: 43.856052,
|
||||
setSocketData1({
|
||||
userId: '1942871719583739905',
|
||||
phone: '15129287781',
|
||||
realName: '连龙刚',
|
||||
lon: 108.94734,
|
||||
lat: 34.218951,
|
||||
sex: 2,
|
||||
age: 40,
|
||||
orgCode: 'A01A33A05',
|
||||
orgName: '地质研究所',
|
||||
age: 37,
|
||||
orgCode: 'A01A01A02',
|
||||
orgName: '硬件部',
|
||||
departCode: 'A01A01',
|
||||
departName: '软硬件开发部',
|
||||
hospitalList: [
|
||||
{
|
||||
id: null,
|
||||
name: '交大一附院',
|
||||
lat: 34.22,
|
||||
lon: 108.94,
|
||||
name: '吉祥作业区',
|
||||
lat: 44.000833,
|
||||
lon: 89.214722,
|
||||
type: null,
|
||||
centerResource: false,
|
||||
manageName: null,
|
||||
managePhone: null,
|
||||
address: null,
|
||||
ambulance: null,
|
||||
docNum: null,
|
||||
nurseNum: null,
|
||||
expertNum: null,
|
||||
distance: null,
|
||||
distance: '383km',
|
||||
},
|
||||
{
|
||||
id: null,
|
||||
name: '高新医院',
|
||||
lat: 34.23,
|
||||
lon: 108.88,
|
||||
name: '吉祥作业区',
|
||||
lat: 44.000833,
|
||||
lon: 89.214722,
|
||||
type: null,
|
||||
centerResource: false,
|
||||
manageName: null,
|
||||
managePhone: null,
|
||||
address: null,
|
||||
ambulance: null,
|
||||
docNum: null,
|
||||
nurseNum: null,
|
||||
expertNum: null,
|
||||
distance: null,
|
||||
distance: '383km',
|
||||
},
|
||||
{
|
||||
id: null,
|
||||
name: '人民医院',
|
||||
lat: 34.24,
|
||||
lon: 108.93,
|
||||
name: '页岩油作业区',
|
||||
lat: 44.233333,
|
||||
lon: 89.105278,
|
||||
type: null,
|
||||
centerResource: false,
|
||||
manageName: null,
|
||||
managePhone: null,
|
||||
address: null,
|
||||
ambulance: null,
|
||||
docNum: null,
|
||||
nurseNum: null,
|
||||
expertNum: null,
|
||||
distance: null,
|
||||
distance: '363km',
|
||||
},
|
||||
],
|
||||
type: '0',
|
||||
centerId: '1940693902422519809',
|
||||
popType: 1,
|
||||
queue: null,
|
||||
noticeId: null,
|
||||
careLiaisonName: '周飞飞',
|
||||
careLiaisonPhone: '18800001111',
|
||||
lifeguardName: '李林林',
|
||||
lifeguardPhone: '15511110000',
|
||||
});
|
||||
emergencyDialogRef.value.openDialog();
|
||||
}
|
||||
@@ -297,38 +343,95 @@
|
||||
|
||||
async function confirmHelp(data) {
|
||||
if (!data.lon) return;
|
||||
hospitalList.value = [];
|
||||
Map.removeOverlayGroup();
|
||||
hospitalList.value = data.hospitalList;
|
||||
// showHospitalList.value = true;
|
||||
//用户的坐标信息
|
||||
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);
|
||||
});
|
||||
// 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');
|
||||
// }
|
||||
mapBottom.value = data;
|
||||
// mapBottom.value['careLiaisonName'] = '1';
|
||||
// mapBottom.value['careLiaisonPhone'] = '1';
|
||||
// mapBottom.value['lifeguardName'] = '1';
|
||||
// mapBottom.value['lifeguardPhone'] = '1';
|
||||
showMapBottom.value = true;
|
||||
const arr = Map.createOverlay(
|
||||
[...hospitalList.value, { latitude: data.lat, longitude: data.lon }],
|
||||
{
|
||||
content: (val) => {
|
||||
return `<div style="
|
||||
width: 21px;
|
||||
height: 44px;
|
||||
position: absolute;
|
||||
left: -20px;
|
||||
top: -20px;" title="${val?.name}">
|
||||
</div>`;
|
||||
},
|
||||
},
|
||||
async (val) => {
|
||||
if (val.type == '3') {
|
||||
Map.createInfoModal({ option: val, content: infoContentSpecial(val) });
|
||||
} else if (val.type == '4') {
|
||||
Map.createInfoModal({ option: val, content: infoContentSpecial(val) });
|
||||
} else {
|
||||
Map.createInfoModal({ option: val, content: infoContentSpecial(val) });
|
||||
}
|
||||
Map.clearNaviLine();
|
||||
Map.createNaviLine([val.lon, val.lat], [data.lon, data.lat]);
|
||||
// const viewBtn = document.getElementById(val.id);
|
||||
// viewBtn.onclick = () => {
|
||||
// handleClcikDetail(val);
|
||||
// };
|
||||
('');
|
||||
},
|
||||
true,
|
||||
'1'
|
||||
);
|
||||
|
||||
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);
|
||||
Map.map.setFitView([...arr, Map.emergencyMarker], false, [180, 180, 180, 180]);
|
||||
})
|
||||
.catch((err) => {
|
||||
Map.map.setFitView(arr, false, [180, 180, 180, 180]);
|
||||
});
|
||||
}
|
||||
|
||||
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;
|
||||
|
||||
let t = '';
|
||||
let r = '';
|
||||
if (item.distance > 2000) {
|
||||
const { time, routeList } = await getDriveTime(userLocation, [item.lon, item.lat]);
|
||||
t = time;
|
||||
r = routeList;
|
||||
} else {
|
||||
const { time, routeList } = await getWalkingTime(userLocation, [item.lon, item.lat]);
|
||||
t = time;
|
||||
r = routeList;
|
||||
}
|
||||
item.driveTime = t;
|
||||
item.routeList = r;
|
||||
item.userLocation = userLocation;
|
||||
return item; // 返回更新后的医院条目
|
||||
});
|
||||
@@ -337,7 +440,8 @@
|
||||
|
||||
function getDistance(userLocation, destination) {
|
||||
const value = Map.getDistance(userLocation, destination);
|
||||
return value > 1000 ? (value / 1000).toFixed(2) + 'km' : parseInt(value) + 'm';
|
||||
// return value > 1000 ? (value / 1000).toFixed(2) + 'km' : parseInt(value) + 'm';
|
||||
return value;
|
||||
}
|
||||
|
||||
async function getDriveTime(userLocation, destination) {
|
||||
@@ -367,6 +471,33 @@
|
||||
};
|
||||
}
|
||||
}
|
||||
async function getWalkingTime(userLocation, destination) {
|
||||
let { time, steps } = await Map.getWalkingTime(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 = [];
|
||||
@@ -421,7 +552,22 @@
|
||||
indexModalRef.value.openDialog();
|
||||
});
|
||||
}
|
||||
function handleCenterMapClick(res) {
|
||||
|
||||
function handleTwoNewRClick() {
|
||||
indexColumn.value = twoRNewColumns;
|
||||
firstFormOne.value = twoRNewForm;
|
||||
const params = {
|
||||
centerId: centerId.value,
|
||||
};
|
||||
indexModalTitle.value = '重点关爱趋势预警';
|
||||
modalApi.value = twoRNApi;
|
||||
apiParams.value = params;
|
||||
nextTick(() => {
|
||||
indexModalRef.value.openDialog();
|
||||
});
|
||||
}
|
||||
|
||||
function handleCenterMapClick(res: any) {
|
||||
indexColumn.value = centerMapColumns;
|
||||
firstFormOne.value = centerMapFromList;
|
||||
const params = {
|
||||
@@ -447,14 +593,21 @@
|
||||
background: url('/@/assets/indexSun/bg.png') no-repeat;
|
||||
background-size: 100% 100%;
|
||||
display: flex;
|
||||
font-size: 22px;
|
||||
font-size: 20px;
|
||||
color: #fff;
|
||||
text-align: center;
|
||||
line-height: 60px;
|
||||
|
||||
.sun-title-left,
|
||||
.sun-title-left {
|
||||
text-align: left;
|
||||
flex: 1;
|
||||
line-height: 60px;
|
||||
padding-left: 15px;
|
||||
}
|
||||
.sun-title-right {
|
||||
width: 23%;
|
||||
flex: 1;
|
||||
text-align: right;
|
||||
line-height: 50px;
|
||||
padding-right: 30px;
|
||||
}
|
||||
|
||||
.sun-title-center {
|
||||
@@ -491,9 +644,7 @@
|
||||
}
|
||||
|
||||
.sun-body-left {
|
||||
.sun-body-left-one,
|
||||
.sun-body-left-two,
|
||||
.sun-body-left-three {
|
||||
> div {
|
||||
margin-bottom: 10px;
|
||||
border: 1px solid #00ccff;
|
||||
border-radius: 14px;
|
||||
@@ -501,28 +652,36 @@
|
||||
.one-l-box,
|
||||
.two-l-box,
|
||||
.three-l-box,
|
||||
.three-r-box,
|
||||
.three-new-l {
|
||||
height: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
.sun-body-left-one {
|
||||
height: 27%;
|
||||
height: 20%;
|
||||
}
|
||||
|
||||
.sun-body-left-two {
|
||||
height: 34%;
|
||||
}
|
||||
|
||||
.sun-body-left-two,
|
||||
.sun-body-left-three {
|
||||
height: 36%;
|
||||
height: 28%;
|
||||
}
|
||||
.sun-body-left-four {
|
||||
height: 18%;
|
||||
}
|
||||
}
|
||||
|
||||
.sun-body-right {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
.sun-body-right-one,
|
||||
.sun-body-right-two,
|
||||
.sun-body-right-three {
|
||||
border: 1px solid #00ccff;
|
||||
border-radius: 14px;
|
||||
margin-bottom: 10px;
|
||||
|
||||
.one-r-box,
|
||||
.two-r-box,
|
||||
@@ -530,19 +689,22 @@
|
||||
height: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
.sun-body-right-one {
|
||||
height: 30%;
|
||||
}
|
||||
|
||||
.sun-body-right-two {
|
||||
height: 42%;
|
||||
}
|
||||
|
||||
.sun-body-right-three {
|
||||
height: 26%;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.top-right-button {
|
||||
color: #ffffff;
|
||||
font-weight: bold;
|
||||
font-size: 18px;
|
||||
width: 160px;
|
||||
height: 40px;
|
||||
background: radial-gradient(ellipse at center, #082147 0%, #08254c 55%, #085faa 100%);
|
||||
border-radius: 8px;
|
||||
border: 1px solid #55d3ff;
|
||||
}
|
||||
|
||||
:deep(.amap-info-close) {
|
||||
top: 15px;
|
||||
right: 15px;
|
||||
}
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user