1.修改大屏问题
This commit is contained in:
2025-09-29 15:41:01 +08:00
parent 7154314e93
commit e4d3e3ba1c
8 changed files with 89 additions and 60 deletions
+7 -7
View File
@@ -32,10 +32,10 @@ export function getToday() {
} }
//分钟转小时 //分钟转小时
export function minuteToStr(minutes) { export function minuteToStr(minutes: any) {
if (!minutes) return '0分'; if (!minutes) return '0分';
let h = Math.floor(minutes / 60); const h: any = Math.floor(minutes / 60);
let m = Math.floor(minutes % 60); const m: any = Math.floor(minutes % 60);
if (h) { if (h) {
return `${h}小时${m > 0 ? `${m}分钟` : ''}`; return `${h}小时${m > 0 ? `${m}分钟` : ''}`;
} }
@@ -43,12 +43,12 @@ export function minuteToStr(minutes) {
} }
//处理echarts-环形图 数据为0时不显示label //处理echarts-环形图 数据为0时不显示label
export function visibleChartLabel(chartData) { export function visibleChartLabel(chartData: any) {
const data = cloneDeep(chartData); const data = cloneDeep(chartData);
let list = data?.map((item) => item?.value); const list: any = data?.map((item: any) => item?.value);
let flag = list.every((item) => item == 0); const flag: any = list.every((item: any) => item == 0);
if (!flag) { if (!flag) {
data.forEach((val) => { data.forEach((val: any) => {
if (val.value == 0) { if (val.value == 0) {
val.value = 0; val.value = 0;
} }
@@ -54,6 +54,7 @@
onMounted(() => { onMounted(() => {
getTime(); getTime();
rightDate.value = '累计运行时间:' + (dayjs().diff(dayjs(initDate.value), 'days') + 1) + ' 天'; rightDate.value = '累计运行时间:' + (dayjs().diff(dayjs(initDate.value), 'days') + 1) + ' 天';
document.title = '健康咨询平台';
}); });
watch( watch(
@@ -72,7 +73,7 @@
background-size: 100% 100%; background-size: 100% 100%;
.sun-screen-title { .sun-screen-title {
height: 87px; height: 80px;
background: url('/@/assets/indexSun/bg.png') no-repeat; background: url('/@/assets/indexSun/bg.png') no-repeat;
background-size: 100% 100%; background-size: 100% 100%;
display: flex; display: flex;
@@ -100,10 +101,10 @@
.sun-title-center { .sun-title-center {
flex: 1; flex: 1;
font-size: 58px; font-size: 50px;
letter-spacing: 10px; letter-spacing: 10px;
// text-shadow: 2px 2px 5px rgba(118, 141, 219, 0.53); // text-shadow: 2px 2px 5px rgba(118, 141, 219, 0.53);
font-weight: 400; font-weight: bold;
font-family: PangMenZhengDao; font-family: PangMenZhengDao;
} }
} }
@@ -1,6 +1,13 @@
<template> <template>
<swiper :slides-per-view="1" :space-between="10" :loop="true" :autoplay="{ delay: 10000, disableOnInteraction: false }" class="mySwiper"> <swiper
<swiper-slide v-for="(page, index) in pages" :key="index"> v-if="pages().length > 0"
:slides-per-view="1"
:space-between="10"
:loop="true"
:autoplay="{ delay: 10000, disableOnInteraction: false }"
class="mySwiper"
>
<swiper-slide v-for="(page, index) in pages()" :key="index">
<div class="grid-container"> <div class="grid-container">
<div v-for="item in page" :key="item.id" class="item"> <div v-for="item in page" :key="item.id" class="item">
<div class="item-left"> <div class="item-left">
@@ -9,7 +16,7 @@
<div class="item-right"> <div class="item-right">
<div class="name"> <div class="name">
<span>{{ item.doctorName }}</span> <span>{{ item.doctorName }}</span>
<span class="position">{{ item.doctorJob_dictText }}</span> <span class="position">{{ item.doctorTitle_dictText }}</span>
</div> </div>
<div class="hospital">{{ item.resourceName }} | {{ item.departmentName }}</div> <div class="hospital">{{ item.resourceName }} | {{ item.departmentName }}</div>
<div class="experience"> <div class="experience">
@@ -28,7 +35,7 @@
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import { onMounted, ref, computed } from 'vue'; import { onMounted, ref } from 'vue';
import { Swiper, SwiperSlide } from 'swiper/vue'; import { Swiper, SwiperSlide } from 'swiper/vue';
import 'swiper/css'; import 'swiper/css';
import 'swiper/css/navigation'; import 'swiper/css/navigation';
@@ -60,13 +67,15 @@
// 将每 6 个元素分为一页 // 将每 6 个元素分为一页
const items = ref<Doctor[]>([]); const items = ref<Doctor[]>([]);
const pages = computed(() => {
const pages = () => {
const result: Doctor[][] = []; const result: Doctor[][] = [];
for (let i = 0; i < items.value.length; i += 6) { for (let i = 0; i < items.value.length; i += 6) {
result.push(items.value.slice(i, i + 6)); result.push(items.value.slice(i, i + 6));
} }
console.log(result);
return result; return result;
}); };
function getData() { function getData() {
getDocList() getDocList()
+30 -18
View File
@@ -8,7 +8,7 @@
<div class="sun-title-center">{{ getCenterInfo.screenTitle || '健康服务中心' }}</div> <div class="sun-title-center">{{ getCenterInfo.screenTitle || '健康服务中心' }}</div>
<div class="sun-title-right"> <div class="sun-title-right">
<a-button class="top-right-button" @click="toZ">咨询服务平台</a-button> <a-button class="top-right-button" @click="toZ">咨询服务平台</a-button>
<a-button class="top-right-button" @click="toOther">健康监测大屏</a-button> <a-button class="top-right-button" @click="toOther" :loading="otherLoading">健康监测大屏</a-button>
</div> </div>
</div> </div>
<div class="sun-body-content"> <div class="sun-body-content">
@@ -143,6 +143,7 @@
nearResourcesApi, nearResourcesApi,
oneLApi, oneLApi,
oneRApi, oneRApi,
queryAnYanTokenApi,
roomDetailApi, roomDetailApi,
threeRModalApi, threeRModalApi,
todayEmergencyListApi, todayEmergencyListApi,
@@ -156,6 +157,7 @@
import ThreeLeftNew from '/@/views/indexSun/threeLeftNew.vue'; import ThreeLeftNew from '/@/views/indexSun/threeLeftNew.vue';
import OneRightNew from '/@/views/indexSun/oneRightNew.vue'; import OneRightNew from '/@/views/indexSun/oneRightNew.vue';
import TwoNewR from '/@/views/indexSun/twoNewR.vue'; import TwoNewR from '/@/views/indexSun/twoNewR.vue';
import { message } from 'ant-design-vue';
//0:处置 1:处理 2:呼入 3:全部 //0:处置 1:处理 2:呼入 3:全部
const phoneType = ref(''); const phoneType = ref('');
const phoneDialogTitle = ref('呼入电话'); const phoneDialogTitle = ref('呼入电话');
@@ -180,6 +182,7 @@
const showMapBottom = ref(false); const showMapBottom = ref(false);
const userData = ref<object>({}); const userData = ref<object>({});
const centerMapRef = ref(); const centerMapRef = ref();
const otherLoading = ref<boolean>(false);
onMounted(() => { onMounted(() => {
getTime(); getTime();
@@ -238,10 +241,22 @@
} }
function toOther() { function toOther() {
window.open('http://aygc.jy.pc.iosp.ydpt.tech/envShow/envFullscreen', '_blank'); otherLoading.value = true;
queryAnYanTokenApi()
.then((res: any) => {
if (res.code === 200) {
otherLoading.value = false;
window.open('http://aygc.pc.iosp.ydpt.tech/monitor/health?tokens=' + res?.result, '_blank');
} else {
message.error(res?.message);
}
})
.catch((err) => {
otherLoading.value = false;
console.log(err);
});
} }
function toZ() { async function toZ() {
return;
const routeUrl = router.resolve({ const routeUrl = router.resolve({
path: '/home2', path: '/home2',
}).href; }).href;
@@ -415,11 +430,15 @@
async function confirmHelp(data: any) { async function confirmHelp(data: any) {
Map.driveLine && Map.driveLine.clear(); Map.driveLine && Map.driveLine.clear();
const res = await careUserApi({ userId: data?.userId }); try {
data['careLiaisonName'] = res?.result?.careLiaisonName; const res = await careUserApi({ userId: data?.userId });
data['careLiaisonPhone'] = res?.result?.careLiaisonPhone; data['careLiaisonName'] = res?.result?.careLiaisonName;
data['lifeguardName'] = res?.result?.lifeguardName; data['careLiaisonPhone'] = res?.result?.careLiaisonPhone;
data['lifeguardPhone'] = res?.result?.lifeguardPhone; data['lifeguardName'] = res?.result?.lifeguardName;
data['lifeguardPhone'] = res?.result?.lifeguardPhone;
} catch (err) {
console.log(err);
}
userData.value = data; userData.value = data;
if (!data.lon || !data.lat) { if (!data.lon || !data.lat) {
centerMapRef.value.newResetMap(); centerMapRef.value.newResetMap();
@@ -468,22 +487,15 @@
Map.createInfoModal({ option: val, content: infoContentSpecial(val) }, false); Map.createInfoModal({ option: val, content: infoContentSpecial(val) }, false);
} }
const end = await Map.getAddressByPoint([val.lon, val.lat]); const end = await Map.getAddressByPoint([val.lon, val.lat]);
console.log(res);
if (!data?.address) { if (!data?.address) {
data['address'] = await Map.getAddressByPoint([data.lon, data.lat]); data['address'] = await Map.getAddressByPoint([data.lon, data.lat]);
} }
// Map.clearNaviLine();
// Map.createNaviLine([data.lon, data.lat], [val.lon, val.lat]);
centerMapRef.value.getSearch({ centerMapRef.value.getSearch({
startPosition: [data.lon, data.lat], startPosition: [data.lon, data.lat],
endPosition: [val.lon, val.lat], endPosition: [val.lon, val.lat],
start: data['address'], start: data['address'],
end, end,
}); });
// const viewBtn = document.getElementById(val.id);
// viewBtn.onclick = () => {
// handleClcikDetail(val);
// };
(''); ('');
}, },
true, true,
@@ -667,8 +679,8 @@
firstFormOne.value = []; firstFormOne.value = [];
const params = { const params = {
centerId: centerId.value, centerId: centerId.value,
startDate: '2000-01-01', // startDate: '2000-01-01',
endDate: '2030-12-31', // endDate: '2030-12-31',
}; };
indexModalTitle.value = '今日应急'; indexModalTitle.value = '今日应急';
modalApi.value = todayEmergencyListApi; modalApi.value = todayEmergencyListApi;
+2
View File
@@ -23,6 +23,7 @@ enum Api {
healthArchives = '/health-emergency/emergency/LargeScreenNew/healthArchives', healthArchives = '/health-emergency/emergency/LargeScreenNew/healthArchives',
contactList = '/health-system/sys/api/emergencyContact/contactList', contactList = '/health-system/sys/api/emergencyContact/contactList',
careUser = '/health-emergency/emergency/LargeScreenNew/careUser', careUser = '/health-emergency/emergency/LargeScreenNew/careUser',
queryAnYanToken = '/health-emergency/emergency/LargeScreenNew/queryAnYanToken',
} }
export const statisticsNewApi = (params: any) => post(Api.statisticsNew, params); export const statisticsNewApi = (params: any) => post(Api.statisticsNew, params);
@@ -39,6 +40,7 @@ export const todayEmergencyListApi = (params: any) => post(Api.todayEmergencyLis
export const healthArchivesApi = (params: any) => get(Api.healthArchives, params); export const healthArchivesApi = (params: any) => get(Api.healthArchives, params);
export const contactListApi = (params: any) => get(Api.contactList, params); export const contactListApi = (params: any) => get(Api.contactList, params);
export const careUserApi = (params: any) => get(Api.careUser, params); export const careUserApi = (params: any) => get(Api.careUser, params);
export const queryAnYanTokenApi = () => get(Api.queryAnYanToken, {});
export const threeRModalApi = (params: any) => post(Api.threeRModal, params); export const threeRModalApi = (params: any) => post(Api.threeRModal, params);
export const twoRModal1Api = (params: any) => post(Api.twoRModal1, params); export const twoRModal1Api = (params: any) => post(Api.twoRModal1, params);
+5
View File
@@ -838,6 +838,7 @@ export const oneRNewColumns = [
title: '性别', title: '性别',
dataIndex: 'sex', dataIndex: 'sex',
key: 'sex', key: 'sex',
width: 80,
customRender: ({ text }) => { customRender: ({ text }) => {
if (text == '1') { if (text == '1') {
return '女'; return '女';
@@ -850,11 +851,13 @@ export const oneRNewColumns = [
title: '年龄', title: '年龄',
dataIndex: 'age', dataIndex: 'age',
key: 'age', key: 'age',
width: 80,
}, },
{ {
title: '应急方式', title: '应急方式',
dataIndex: 'emergencyType', dataIndex: 'emergencyType',
key: 'emergencyType', key: 'emergencyType',
width: 90,
customRender: ({ text }) => { customRender: ({ text }) => {
switch (text) { switch (text) {
case '0': case '0':
@@ -879,12 +882,14 @@ export const oneRNewColumns = [
title: '详细地址', title: '详细地址',
dataIndex: 'd', dataIndex: 'd',
key: 'd', key: 'd',
width: 90,
ellipsis: true, ellipsis: true,
}, },
{ {
title: '操作', title: '操作',
dataIndex: 'cz', dataIndex: 'cz',
key: 'cz', key: 'cz',
width: 80,
}, },
]; ];
+8 -8
View File
@@ -93,7 +93,6 @@
}); });
} }
const myChart = ref();
function getData() { function getData() {
twoLApi({ twoLApi({
sex: chooseType.value, sex: chooseType.value,
@@ -110,23 +109,24 @@
}); });
} }
function initChart(value) { function initChart(value: any) {
myChart.value = echarts.init(newChart.value!); let myChart = echarts.init(newChart.value);
const dx = const dx =
value.map((item) => { value.map((item: any) => {
return item.name; return item.name;
}) || []; }) || [];
const dy = const dy =
value.map((item) => { value.map((item: any) => {
return item.count; return item.count;
}) || []; }) || [];
const max = value.sort((a, b) => b.count - a.count).length > 0 ? value.sort((a, b) => b.count - a.count)[0].count : []; const max: any =
value.sort((a: any, b: any) => b.count - a.count).length > 0 ? value.sort((a: any, b: any) => b.count - a.count)[0].count : [];
const m = max % 25 === 0 ? max : (parseInt(max / 25) + 1) * 25; const m = max % 25 === 0 ? max : (parseInt(max / 25) + 1) * 25;
let option = getClassCharts(dx, dy, m); let option = getClassCharts(dx, dy, m);
myChart.value.setOption(option); myChart.setOption(option);
window.addEventListener('resize', () => { window.addEventListener('resize', () => {
myChart.value.resize(); myChart && myChart.resize();
}); });
} }
const emit = defineEmits(['handleView']); const emit = defineEmits(['handleView']);
+18 -18
View File
@@ -7,13 +7,13 @@ export const list = [
}, },
{ {
label: '关爱联络员', label: '关爱联络员',
field: '', field: 'careLiaisonName',
span: 12, span: 12,
options: null, options: null,
}, },
{ {
label: '单位', label: '单位',
field: 'workNoUnit', field: 'workUnit',
span: 24, span: 24,
options: null, options: null,
}, },
@@ -84,13 +84,13 @@ export const list = [
options: null, options: null,
}, },
{ {
label: '血压控制目标(收缩压)', label: '目标',
field: 'systolicPressureTarget', field: 'systolicPressureTarget',
span: 8, span: 8,
options: null, options: null,
}, },
{ {
label: '目前收缩压监测值', label: '目前',
field: 'systolicPressureCurrent', field: 'systolicPressureCurrent',
span: 8, span: 8,
options: null, options: null,
@@ -102,13 +102,13 @@ export const list = [
options: null, options: null,
}, },
{ {
label: '血压控制目标(舒张压)', label: '目标',
field: 'diastolicPressureTarget', field: 'diastolicPressureTarget',
span: 8, span: 8,
options: null, options: null,
}, },
{ {
label: '目前舒张压监测值', label: '目前',
field: 'diastolicPressureCurrent', field: 'diastolicPressureCurrent',
span: 8, span: 8,
options: null, options: null,
@@ -135,13 +135,13 @@ export const list = [
options: null, options: null,
}, },
{ {
label: '血糖控制目标', label: '目标',
field: 'bloodSugarTarget', field: 'bloodSugarTarget',
span: 8, span: 8,
options: null, options: null,
}, },
{ {
label: '目前血糖监测值', label: '目前',
field: 'bloodSugarCurrent', field: 'bloodSugarCurrent',
span: 8, span: 8,
options: null, options: null,
@@ -153,13 +153,13 @@ export const list = [
options: null, options: null,
}, },
{ {
label: 'LDL控制目标', label: '目标',
field: 'ldlTarget', field: 'ldlTarget',
span: 8, span: 8,
options: null, options: null,
}, },
{ {
label: '目前LDL监测值', label: '目前',
field: 'ldlCurrent', field: 'ldlCurrent',
span: 8, span: 8,
options: null, options: null,
@@ -171,13 +171,13 @@ export const list = [
options: null, options: null,
}, },
{ {
label: 'TC控制目标', label: '目标',
field: 'tcTarget', field: 'tcTarget',
span: 8, span: 8,
options: null, options: null,
}, },
{ {
label: '目前TC监测值', label: '目前',
field: 'tcCurrent', field: 'tcCurrent',
span: 8, span: 8,
options: null, options: null,
@@ -189,13 +189,13 @@ export const list = [
options: null, options: null,
}, },
{ {
label: 'TG控制目标', label: '目标',
field: 'tgTarget', field: 'tgTarget',
span: 8, span: 8,
options: null, options: null,
}, },
{ {
label: '目前TG监测值', label: '目前',
field: 'tgCurrent', field: 'tgCurrent',
span: 8, span: 8,
options: null, options: null,
@@ -207,13 +207,13 @@ export const list = [
options: null, options: null,
}, },
{ {
label: '血尿酸控制目标', label: '目标',
field: 'uricAcidTarget', field: 'uricAcidTarget',
span: 8, span: 8,
options: null, options: null,
}, },
{ {
label: '目前血尿酸监测值', label: '目前',
field: 'uricAcidCurrent', field: 'uricAcidCurrent',
span: 8, span: 8,
options: null, options: null,
@@ -225,13 +225,13 @@ export const list = [
options: null, options: null,
}, },
{ {
label: '同型半胱氨酸控制目标', label: '目标',
field: 'homocysteineTarget', field: 'homocysteineTarget',
span: 8, span: 8,
options: null, options: null,
}, },
{ {
label: '目前同型半胱氨酸监测值', label: '目前',
field: 'homocysteineCurrent', field: 'homocysteineCurrent',
span: 8, span: 8,
options: null, options: null,