1.修改部分问题(路线等问题)
2.添加定时器
This commit is contained in:
2025-07-08 17:32:13 +08:00
parent 67a2ea75d1
commit 726bd19ad3
11 changed files with 321 additions and 79 deletions
+5 -5
View File
@@ -1,12 +1,12 @@
#后台地址 #后台地址
VITE_GLOB_API_URL=https://api.cqygjk.com VITE_GLOB_API_URL=https://xjgateway.mcrm.vip:8888
#健康监测工具报警-websocket #健康监测工具报警-websocket
VITE_GLOB_API_YIN_JI=wss://api.cqygjk.com/health-watch/websocket/watchMonitor VITE_GLOB_API_YIN_JI=wss://xjgateway.mcrm.vip:8888/health-watch/websocket/watchMonitor
#应急求助-websocket #应急求助-websocket
VITE_GLOB_API_JIAN_CE=wss://api.cqygjk.com/health-emergency/websocket/emergency VITE_GLOB_API_JIAN_CE=wss://xjgateway.mcrm.vip:8888/health-emergency/websocket/emergency
#西安云坐席 #西安云坐席
VITE_GLOB_API_XIAN_YUN=wss://api.cqygjk.com/health-emergency/websocket/emergency3 VITE_GLOB_API_XIAN_YUN=wss://xjgateway.mcrm.vip:8888/health-emergency/websocket/emergency3
#银川云坐席 #银川云坐席
VITE_GLOB_API_YIN_CHUAN=wss://api.cqygjk.com/health-emergency/websocket/emergency4 VITE_GLOB_API_YIN_CHUAN=wss://xjgateway.mcrm.vip:8888/health-emergency/websocket/emergency4
+3 -1
View File
@@ -13,7 +13,7 @@ export function getZero(num: any) {
export function useTopTime(startDay = '2018-10-01') { export function useTopTime(startDay = '2018-10-01') {
startDay = startDay || '2018-10-01'; startDay = startDay || '2018-10-01';
const timeLeft = dayjs().format('YYYY年MM月DD日 HH:mm:ss'); const timeLeft = dayjs().format('YYYY年MM月DD日 HH:mm:ss');
const timeRight = dayjs().diff(dayjs(startDay), 'day') + '天'; const timeRight = parseInt(dayjs().diff(dayjs(startDay), 'day') + 1) + '天';
// + // +
// getZero(dayjs().diff(dayjs(dayjs().format('YYYY-MM-DD') + ' 00:00:00'), 'hours')) + // getZero(dayjs().diff(dayjs(dayjs().format('YYYY-MM-DD') + ' 00:00:00'), 'hours')) +
// '时' + // '时' +
@@ -90,3 +90,5 @@ export function openTestModal() {
export function handleSocketUrl(url: string, centerId: string) { export function handleSocketUrl(url: string, centerId: string) {
return url.substring(0, url.indexOf('/websocket/') + 11) + centerId; return url.substring(0, url.indexOf('/websocket/') + 11) + centerId;
} }
export const startTime = '2025-07-01';
+4 -4
View File
@@ -25,8 +25,8 @@
class="type-select bg-000" class="type-select bg-000"
:options="option" :options="option"
:field-names="fieldNames" :field-names="fieldNames"
></a-select> />
<a-select placeholder="选择时间范围" v-model:value="type" class="type-select bg-000" :options="timeRangeOption"></a-select> <a-select placeholder="选择时间范围" v-model:value="type" class="type-select bg-000" :options="timeRangeOption" />
</template> </template>
</SecondMap> </SecondMap>
</div> </div>
@@ -49,7 +49,7 @@
import screenLeft from '/@/components/secondaryScreen/screen-left/screenLeft.vue'; import screenLeft from '/@/components/secondaryScreen/screen-left/screenLeft.vue';
import router from '/@/router'; import router from '/@/router';
import { useDepart, useTimeType } from '/@/components/secondaryScreen/secondMap/secondMapHooks.ts'; import { useDepart, useTimeType } from '/@/components/secondaryScreen/secondMap/secondMapHooks.ts';
import { useTopTime } from '/@/utils/utils.ts'; import { startTime, useTopTime } from '/@/utils/utils.ts';
import { useUserStore } from '/@/store/modules/user.ts'; import { useUserStore } from '/@/store/modules/user.ts';
import { useRefresh } from '/@/hooks/autoRefresh'; import { useRefresh } from '/@/hooks/autoRefresh';
import { DEFAULT_TIME } from '/@/hooks/autoRefresh/pageRefreshTime.ts'; import { DEFAULT_TIME } from '/@/hooks/autoRefresh/pageRefreshTime.ts';
@@ -100,7 +100,7 @@
const dayTimeT = ref(); const dayTimeT = ref();
function getTime() { function getTime() {
const { timeRight } = useTopTime('2025-07-05'); const { timeRight } = useTopTime(startTime);
dayTimeT.value = timeRight; dayTimeT.value = timeRight;
} }
+62 -22
View File
@@ -2,41 +2,58 @@
<div class="sun-screen-box"> <div class="sun-screen-box">
<login-out-button out-url="login" /> <login-out-button out-url="login" />
<div class="sun-screen-title"> <div class="sun-screen-title">
<div class="sun-title-left">2025年06月14日 12:21:21</div> <div class="sun-title-left">{{ dateInfo?.day }} {{ dateInfo?.times }}</div>
<div class="sun-title-center">应急就医服务中心</div> <div class="sun-title-center">应急就医服务中心</div>
<div class="sun-title-right">累计运行时间3642</div> <div class="sun-title-right">{{ rightDate }}</div>
</div> </div>
<div class="sun-body-content"> <div class="sun-body-content">
<div class="sun-body-left"> <div class="sun-body-left">
<div class="sun-body-left-one"> <div class="sun-body-left-one">
<OneL @handle-click="handleOneLeftClick" :center-id="centerId" /> <OneL @handle-click="handleOneLeftClick" :center-id="centerId" :bKey="`one-l-${count}`" />
</div> </div>
<div class="sun-body-left-two"> <div class="sun-body-left-two">
<twoL @handle-view="handleTwoLClick" /> <twoL @handle-view="handleTwoLClick" :bKey="`two-l-${count}`" />
</div> </div>
<div class="sun-body-left-three" style="margin-bottom: 0"> <div class="sun-body-left-three" style="margin-bottom: 0">
<!-- <threeL />--> <!-- <threeL />-->
<threeNewL /> <threeNewL :bKey="`three-l-${count}`" />
</div> </div>
</div> </div>
<div class="sun-body-center"> <div class="sun-body-center">
<CenterMap :showHospitalList="showHospitalList" :hospitalList="hospitalList" @clear-hospital-list="clearHospitalList" /> <CenterMap
:showHospitalList="showHospitalList"
:hospitalList="hospitalList"
@clear-hospital-list="clearHospitalList"
:show-rest-b="showRestB"
@show-rest-b="
() => {
showRestB = false;
}
"
/>
</div> </div>
<div class="sun-body-right"> <div class="sun-body-right">
<div class="sun-body-right-one"> <div class="sun-body-right-one">
<oneR @handle-view="handleOneRClick" /> <oneR
@handle-view="handleOneRClick"
@show-reset="
() => {
showRestB = true;
}
"
:bKey="`one-r-${count}`"
/>
</div> </div>
<div class="sun-body-right-two"> <div class="sun-body-right-two">
<twoR @handle-click="handleTwoRClick" /> <twoR @handle-click="handleTwoRClick" :bKey="`two-r-${count}`" />
</div> </div>
<div class="sun-body-right-three"> <div class="sun-body-right-three">
<threeR @handle-click="handleThreeRClick" /> <threeR @handle-click="handleThreeRClick" :bKey="`three-r-${count}`" />
</div> </div>
</div> </div>
</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" /> <EmployeeDialog ref="employeeDialogRef" :record="socketData" />
<!-- 应急、120弹窗 --> <!-- 应急、120弹窗 -->
@@ -73,22 +90,13 @@
import { getAuthCache } from '/@/utils/auth.ts'; import { getAuthCache } from '/@/utils/auth.ts';
import { basicPath, useSocket, emergencyPath } from '/@/utils/socket.ts'; import { basicPath, useSocket, emergencyPath } from '/@/utils/socket.ts';
import { Map } from '/@/assets/mapUtils/map.ts'; import { Map } from '/@/assets/mapUtils/map.ts';
import YunZuoXiDialog from '/@/views/components/yunZuoXiDialog.vue';
import EmployeeDialog from '/@/views/components/employeeDialog.vue'; import EmployeeDialog from '/@/views/components/employeeDialog.vue';
import EmergencyDialog from '/@/views/components/emergencyDialog.vue'; import EmergencyDialog from '/@/views/components/emergencyDialog.vue';
import { handleSocketUrl } from '/@/utils/utils.ts'; import { handleSocketUrl, startTime } from '/@/utils/utils.ts';
import { useUserStore } from '/@/store/modules/user.ts'; import { useUserStore } from '/@/store/modules/user.ts';
const { getCenterInfo } = useUserStore(); const { getCenterInfo } = useUserStore();
import { import { oneLApi, threeRModalApi, twoLModalApi, twoRModal1Api, twoRModal2Api, twoRModal3Api } from '/@/views/indexSun/indexSun.api.ts';
oneLApi,
statisticsNewApi,
threeRModalApi,
twoLModalApi,
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:全部
const phoneType = ref(''); const phoneType = ref('');
@@ -104,11 +112,43 @@
const modalApi = ref(); const modalApi = ref();
const needDept = ref(false); const needDept = ref(false);
const twoROnly = ref(); const twoROnly = ref();
const showRestB = ref(false);
const dateInfo = ref<object>({});
const rightDate = ref<string>('');
const count = ref<number>(0);
const qhInterval = ref();
const cInterval = ref();
const initDate = ref(startTime);
onMounted(() => { onMounted(() => {
getTime();
qhInterval.value = setInterval(() => {
getTime();
}, 1000);
cInterval.value = setInterval(
() => {
count.value++;
},
5 * 60 * 1000
);
rightDate.value = '累计运行时间:' + (dayjs().diff(dayjs(initDate.value), 'days') + 1) + ' 天';
const centerInfo = getAuthCache('centerInfo'); const centerInfo = getAuthCache('centerInfo');
centerId.value = centerInfo.id; centerId.value = centerInfo.id;
}); });
const getTime = () => {
dateInfo.value = {
day: dayjs().format('YYYY年MM月DD日'),
times: dayjs().format('HH:mm:ss'),
};
};
watch(
() => dateInfo.value.day,
() => {
rightDate.value = '累计运行时间:' + (dayjs().diff(dayjs(initDate.value), 'days') + 1) + ' 天';
}
);
function handleOneLeftClick(item) { function handleOneLeftClick(item) {
const { name, key } = item; const { name, key } = item;
//呼入电话 //呼入电话
@@ -277,7 +317,7 @@
function getDistance(userLocation, destination) { function getDistance(userLocation, destination) {
const value = Map.getDistance(userLocation, destination); const value = Map.getDistance(userLocation, destination);
return value > 1000 ? (value / 1000).toFixed(2) + 'km' : value + 'm'; return value > 1000 ? (value / 1000).toFixed(2) + 'km' : parseInt(value) + 'm';
} }
async function getDriveTime(userLocation, destination) { async function getDriveTime(userLocation, destination) {
+55 -16
View File
@@ -20,8 +20,11 @@
</a-form-item> </a-form-item>
</a-form> </a-form>
</div> </div>
<div v-show="showHospitalList || showRestB" class="reset-map" :class="[themeType]" @click="resetMap">
<RedoOutlined title="重置地图" />
</div>
<div v-show="showRoutePanel" v-click-outside="outClick" class="line-container"> <div v-show="showRoutePanel" v-click-outside="outClick" class="line-container">
<div v-show="routeList.length" class="has-data"> <div v-show="routeList.length > 0" class="has-data">
<div class="line-title"> {{ panelTitle }}</div> <div class="line-title"> {{ panelTitle }}</div>
<div class="line-content"> <div class="line-content">
<div class="start">起点</div> <div class="start">起点</div>
@@ -34,7 +37,7 @@
<div class="end">终点</div> <div class="end">终点</div>
</div> </div>
</div> </div>
<div v-show="!routeList.length" class="empty-data"> 暂无数据</div> <div v-show="routeList.length === 0" class="empty-data"> 暂无数据</div>
</div> </div>
<div class="map"> <div class="map">
<div style="flex: 1; overflow: hidden"> <div style="flex: 1; overflow: hidden">
@@ -61,7 +64,7 @@
</div> </div>
<div class="hospital-list" :class="[themeType]" v-if="showHospitalList"> <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 class="hospital-item" v-for="(item, index) in hospitalList" :key="index" @click.stop="showDrivingLine(item)">
<div>{{ item.name }}</div> <div>{{ item.name }}</div>
<div>相距{{ item.distance }}</div> <div>相距{{ item.distance }}</div>
<div>驾车大约{{ item.driveTime }}</div> <div>驾车大约{{ item.driveTime }}</div>
@@ -70,7 +73,7 @@
</div> </div>
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import { nextTick, onMounted, ref } from 'vue'; import { nextTick, onMounted, ref, watch } 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';
@@ -80,6 +83,8 @@
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'; import { useTheme } from '/@/hooks/theme/useTheme.ts';
import { RedoOutlined } from '@ant-design/icons-vue';
const { themeType } = useTheme(); const { themeType } = useTheme();
const list = ref(tabList); const list = ref(tabList);
const currentIndex = ref(0); const currentIndex = ref(0);
@@ -99,9 +104,11 @@
//是否展示最近的三个医院 //是否展示最近的三个医院
showHospitalList: { showHospitalList: {
type: Boolean, type: Boolean,
default: () => { default: () => false,
return false; },
}, showRestB: {
type: Boolean,
default: () => false,
}, },
hospitalList: { hospitalList: {
type: Array, type: Array,
@@ -114,10 +121,18 @@
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', 'showRestB']);
const showDrivingPanel = ref(false);
watch(
() => props.showHospitalList,
(v) => {
if (v) {
watchInfoChangeTab(list.value[0], 0);
}
}
);
onMounted(() => { onMounted(() => {
const op = { const op = {
el: 'xianmapContainer', el: 'xianmapContainer',
@@ -130,7 +145,6 @@
Map.map && Map.map.on('zoomend', setLevel); Map.map && Map.map.on('zoomend', setLevel);
}); });
$bus.on(earlyWarning, (params) => { $bus.on(earlyWarning, (params) => {
console.log(params, 12323);
drawMarker(params); drawMarker(params);
}); });
document.addEventListener('click', (e) => { document.addEventListener('click', (e) => {
@@ -148,7 +162,6 @@
nextTick(() => { nextTick(() => {
panelTitle.value = '全程' + item.driveTime + item.distance; panelTitle.value = '全程' + item.driveTime + item.distance;
routeList.value = item.routeList?.map((item) => item?.instruction); routeList.value = item.routeList?.map((item) => item?.instruction);
showDrivingPanel.value = true;
if (item.lon) { if (item.lon) {
Map.clearNaviLine(); Map.clearNaviLine();
Map.createNaviLine(item.userLocation, [item.lon, item.lat]); Map.createNaviLine(item.userLocation, [item.lon, item.lat]);
@@ -168,10 +181,14 @@
searchFlag.value = false; searchFlag.value = false;
} }
function changeTab(item, i: number) { function changeTab(item: any, i: number) {
currentIndex.value = i;
Map.clearActiveHospital();
closeDrivingElement(); closeDrivingElement();
currentIndex.value = i;
tab(item);
}
function tab(item: any) {
Map.clearActiveHospital();
Map.map.off('moveend', logMapinfo); Map.map.off('moveend', logMapinfo);
if (TabType.diFangYiYuan == item.type) { if (TabType.diFangYiYuan == item.type) {
let { lng, lat } = Map.getMapCenter(); let { lng, lat } = Map.getMapCenter();
@@ -190,6 +207,11 @@
} }
} }
function watchInfoChangeTab(item: any) {
currentIndex.value = 0;
tab(item);
}
function searchRoute(callback: ((this: MediaQueryList, ev: MediaQueryListEvent) => any) | null) { function searchRoute(callback: ((this: MediaQueryList, ev: MediaQueryListEvent) => any) | null) {
showRoutePanel.value = false; showRoutePanel.value = false;
panelTitle.value = ''; panelTitle.value = '';
@@ -280,7 +302,7 @@
Map.clearNavigationElements(); Map.clearNavigationElements();
formState.value.start = ''; formState.value.start = '';
formState.value.end = ''; formState.value.end = '';
showDrivingPanel.value = false; showRoutePanel.value = false;
emits('clearHospitalList'); emits('clearHospitalList');
} }
@@ -320,6 +342,12 @@
} }
Map.createMarker({ ...data, realName: data.userName }); Map.createMarker({ ...data, realName: data.userName });
} }
function resetMap() {
closeDrivingElement();
changeTab(list.value[currentIndex.value], currentIndex.value);
emits('showRestB');
}
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
@@ -559,6 +587,7 @@
} }
.line-container { .line-container {
z-index: 99;
position: absolute; position: absolute;
right: 0; right: 0;
top: 54px; top: 54px;
@@ -641,4 +670,14 @@
} }
} }
} }
.reset-map {
position: absolute;
left: 0;
top: 50px;
z-index: 99;
font-size: 20px;
cursor: pointer;
padding: 0px 6px;
}
</style> </style>
+6 -1
View File
@@ -36,7 +36,8 @@
</div> </div>
</div> </div>
</div> </div>
</template>6+ </template>
6+
<script setup lang="ts"> <script setup lang="ts">
import { ref, watch } from 'vue'; import { ref, watch } from 'vue';
import { useStatistics } from '/@/components/body-d-left/bodyLeftHooks.ts'; import { useStatistics } from '/@/components/body-d-left/bodyLeftHooks.ts';
@@ -50,6 +51,10 @@
type: String, type: String,
default: () => '', default: () => '',
}, },
bKey: {
type: Number,
default: () => 0,
},
}); });
const useDetail = useDetailStore(); const useDetail = useDetailStore();
+108 -8
View File
@@ -7,14 +7,14 @@
<div class="content"> <div class="content">
<div class="content-item"> <div class="content-item">
<template v-if="scrollList.length > 0"> <template v-if="scrollList.length > 0">
<vue3-seamless-scroll :list="scrollList" class="scroll" :hover="true" :copyNum="3" :limitScrollNum="5" v-bind="{ step: 0.2 }"> <vue3-seamless-scroll :list="scrollList" class="scroll" :hover="true" :copyNum="3" :limitScrollNum="5" v-bind="{ step: step }">
<div class="item-d" v-for="(item, index) in scrollList" :key="index"> <div class="item-d" v-for="(item, index) in scrollList" :key="index">
<div>{{ item.realName }}</div> <div>{{ item.realName }}</div>
<div style="color: #f6ff00">{{ item.eventType_dictText }}{{ item.dataValue ? `(${item.dataValue})` : '' }}</div> <div style="color: #f6ff00">{{ item.eventType_dictText }}{{ item.dataValue ? `(${item.dataValue})` : '' }}</div>
<div>{{ item.warnTime }}</div> <div>{{ item.warnTime }}</div>
<div class="item-d-img"> <div class="item-d-img">
<img :src="pointPng" alt="" /> <img :src="pointPng" alt="" @click="handlePolice(item)" />
<img :src="addressPng" alt="" /> <img :src="addressPng" alt="" @click="sendPosition(item)" />
</div> </div>
</div> </div>
</vue3-seamless-scroll> </vue3-seamless-scroll>
@@ -26,22 +26,78 @@
</template> </template>
</div> </div>
</div> </div>
<Dialog :openVis="openInfor" width="30%" title="健康报警员工信息" @close="handlePoliceClose">
<template #container>
<div class="police-con" :class="[themeType]">
<Row style="font-size: 14px; font-weight: bold"> 个人信息 </Row>
<Row>
<Col :span="8">姓名{{ userInfo?.realName || '--' }}</Col>
<Col :span="8">性别{{ userInfo?.sex_dictText || '--' }}</Col>
<Col :span="8">年龄{{ userInfo?.age || '--' }}</Col>
</Row>
<Row>
<Col :span="8">二级单位{{ userInfo?.orgName2 || '--' }}</Col>
<Col :span="8">部门{{ userInfo?.orgName || '--' }}</Col>
<Col :span="8">手机号码{{ userInfo?.phone || '--' }}</Col>
</Row>
<Row style="font-size: 14px; font-weight: bold"> 健康信息 </Row>
<Row> 异常事件{{ userInfo?.eventType_dictText || '--' }} </Row>
<Row>
<Col :span="8">异常值{{ userInfo?.dataValue || '--' }}</Col>
<Col :span="16">发生时间{{ userInfo?.warnTime || '--' }}</Col>
</Row>
<div style="display: flex">
<div>发生地点</div>
<div style="padding-left: 10px; display: flex; overflow-wrap: anywhere" :style="{ color: userInfo?.address || 'red' }">
{{ userInfo?.address || userInfo?.gpsErrorMsg || '--' }}
</div>
</div>
</div>
</template>
</Dialog>
</div> </div>
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import { Vue3SeamlessScroll } from 'vue3-seamless-scroll'; import { Vue3SeamlessScroll } from 'vue3-seamless-scroll';
import { Empty } from 'ant-design-vue'; import { Empty, message } from 'ant-design-vue';
import { ref, onMounted } from 'vue'; import { ref, onMounted, watch } from 'vue';
import pointPng from '/@/assets/indexSun/point.png'; import pointPng from '/@/assets/indexSun/point.png';
import addressPng from '/@/assets/indexSun/address.png'; import addressPng from '/@/assets/indexSun/address.png';
import { oneRApi } from '/@/views/indexSun/indexSun.api.ts'; import { oneRApi } from '/@/views/indexSun/indexSun.api.ts';
const loading = ref(true); import { Row, Col } from 'ant-design-vue';
const scrollList = ref<any[]>([]); import Dialog from '/@/components/dialog/Dialog.vue';
import { useTheme } from '/@/hooks/theme/useTheme.ts';
import { Map } from '/@/assets/mapUtils/map.ts';
const emit = defineEmits(['handleView']); const { themeType } = useTheme();
const step = ref(0.2);
const scrollList = ref<any[]>([]);
const openInfor = ref<boolean>(false); //弹窗显示
const userInfo = ref({
realName: '',
orgName1: '',
phone: '',
eventType_dictText: '',
warnTime: '',
address: '',
dataValue: '',
});
const props = defineProps({
bKey: {
type: Number,
default: () => 0,
},
});
const emit = defineEmits(['handleView', 'showReset']);
onMounted(() => { onMounted(() => {
getList(); getList();
}); });
watch(props, () => {
getList();
});
function getList() { function getList() {
oneRApi({}).then((res) => { oneRApi({}).then((res) => {
if (res.code == 200) { if (res.code == 200) {
@@ -49,6 +105,26 @@
} }
}); });
} }
function handlePolice(item) {
userInfo.value = item;
openInfor.value = true;
step.value = 0;
}
function handlePoliceClose() {
openInfor.value = false;
step.value = 0.2;
}
function sendPosition(item) {
let { lon, lat } = item;
if (lon && lat) {
Map.createMarker(item, () => {
handlePolice(item);
});
emit('showReset');
} else {
message.warn('暂无经纬度信息!');
}
}
function handleView() { function handleView() {
emit('handleView'); emit('handleView');
} }
@@ -104,4 +180,28 @@
} }
} }
} }
.police-con {
padding: 2% 5% 2% 5%;
display: grid;
color: #ffffff;
.con-item {
padding: 1.3% 0;
display: flex;
div:nth-child(1) {
font-weight: bold;
width: 100px;
text-align: right;
}
div:nth-child(2) {
width: calc(100% - 100px);
}
}
}
.ant-row {
margin-bottom: 10px;
}
</style> </style>
+22 -7
View File
@@ -31,20 +31,35 @@
<script setup lang="ts"> <script setup lang="ts">
import { Vue3SeamlessScroll } from 'vue3-seamless-scroll'; import { Vue3SeamlessScroll } from 'vue3-seamless-scroll';
import { Empty } from 'ant-design-vue'; import { Empty } from 'ant-design-vue';
import { onMounted, ref } from 'vue'; import { onMounted, ref, watch } from 'vue';
import hospitalPng from '/@/assets/indexSun/hospital.png'; import hospitalPng from '/@/assets/indexSun/hospital.png';
import { threeLApi } from '/@/views/indexSun/indexSun.api.ts'; import { threeLApi } from '/@/views/indexSun/indexSun.api.ts';
const scrollList = ref<any[]>([]); const scrollList = ref<any[]>([]);
const props = defineProps({
bKey: {
type: Number,
default: () => 0,
},
});
onMounted(() => { onMounted(() => {
getList(); getList();
}); });
watch(props, () => {
getList();
});
function getList() { function getList() {
threeLApi({}).then((res) => { threeLApi({})
if (res.code == 200) { .then((res: any) => {
console.log(res.result); if (res.code == 200) {
scrollList.value = res.result; console.log(res.result);
} scrollList.value = res.result;
}); }
})
.catch((err) => {
console.log(err);
});
} }
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
+28 -9
View File
@@ -42,20 +42,39 @@
</div> </div>
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import { Vue3SeamlessScroll } from 'vue3-seamless-scroll';
import { Empty } from 'ant-design-vue'; import { Empty } from 'ant-design-vue';
import { ref, onMounted } from 'vue'; import { ref, onMounted, watch } from 'vue';
import { threeRApi } from '/@/views/indexSun/indexSun.api.ts'; import { threeRApi } from '/@/views/indexSun/indexSun.api.ts';
const scrollList = ref(); const scrollList = ref();
const emit = defineEmits(['handleClick']); const emit = defineEmits(['handleClick']);
onMounted(() => {
threeRApi({}).then((res) => { const props = defineProps({
if (res.code == 200) { bKey: {
scrollList.value = res.result[0]; type: Number,
} default: () => 0,
}); },
}); });
function handleClickNum(type) {
watch(props, () => {
getList();
});
onMounted(() => {
getList();
});
function getList() {
threeRApi({})
.then((res: any) => {
if (res.code == 200) {
scrollList.value = res.result[0];
}
})
.catch((err: any) => {
console.log(err);
});
}
function handleClickNum(type: any) {
emit('handleClick', type); emit('handleClick', type);
} }
</script> </script>
+15 -5
View File
@@ -7,7 +7,7 @@
<div class="content"> <div class="content">
<div class="content-search"> <div class="content-search">
<div> <div>
<a-select v-model:value="selectValue" class="type-select" :options="selectOptions"> <a-select v-model:value="selectValue" class="type-select" :options="selectOptions" @change="getData">
<a-select-option value="全部数据">全部数据</a-select-option> <a-select-option value="全部数据">全部数据</a-select-option>
</a-select> </a-select>
</div> </div>
@@ -39,14 +39,20 @@
</div> </div>
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import { ref, onMounted } from 'vue'; import { ref, onMounted, watch } 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 { allSecondaryDepartsApi, twoLApi } from '/@/views/indexSun/indexSun.api.ts'; import { allSecondaryDepartsApi, twoLApi } from '/@/views/indexSun/indexSun.api.ts';
const props = defineProps({
bKey: {
type: Number,
default: () => 0,
},
});
const chooseType = ref('0'); const chooseType = ref('0');
const selectValue = ref('all'); const selectValue = ref('');
const selectOptions = ref([{ label: '全部数据', value: 'all' }]); const selectOptions = ref([{ label: '全部数据', value: '' }]);
const newChart = ref<HTMLElement>(); const newChart = ref<HTMLElement>();
function clickChooseType(type) { function clickChooseType(type) {
if (chooseType.value === type) return; if (chooseType.value === type) return;
@@ -59,6 +65,10 @@
getAllDepart(); getAllDepart();
} }
}); });
watch(props, () => {
selectValue.value = '';
getData();
});
function getAllDepart() { function getAllDepart() {
allSecondaryDepartsApi({}) allSecondaryDepartsApi({})
@@ -85,7 +95,7 @@
function getData() { function getData() {
twoLApi({ twoLApi({
sex: chooseType.value, sex: chooseType.value,
depart: '', depart: selectValue.value,
}).then((res) => { }).then((res) => {
console.log(res, 'resessss'); console.log(res, 'resessss');
if (res.code == 200) { if (res.code == 200) {
+13 -1
View File
@@ -126,14 +126,26 @@
import WeightPng from '/@/assets/indexSun/weightClock.png'; import WeightPng from '/@/assets/indexSun/weightClock.png';
import FatPng from '/@/assets/indexSun/fatClock.png'; import FatPng from '/@/assets/indexSun/fatClock.png';
import BloodPng from '/@/assets/indexSun/bloodClock.png'; import BloodPng from '/@/assets/indexSun/bloodClock.png';
import { onMounted, ref } from 'vue'; import { onMounted, ref, watch } from 'vue';
import { twoRApi } from '/@/views/indexSun/indexSun.api.ts'; import { twoRApi } from '/@/views/indexSun/indexSun.api.ts';
const twoRList = ref(); const twoRList = ref();
const emit = defineEmits(['handleClick']); const emit = defineEmits(['handleClick']);
const props = defineProps({
bKey: {
type: Number,
default: () => 0,
},
});
onMounted(() => { onMounted(() => {
getList(); getList();
}); });
watch(props, () => {
getList();
});
function getList() { function getList() {
twoRApi({}).then((res) => { twoRApi({}).then((res) => {
if (res.code == 200) { if (res.code == 200) {