From 7154314e9335431b816fdf40ee7431cc79e6f162 Mon Sep 17 00:00:00 2001 From: wx <645899409@qq.com> Date: Fri, 26 Sep 2025 18:57:17 +0800 Subject: [PATCH 1/2] =?UTF-8?q?update=201.=E4=BF=AE=E6=94=B9=E5=A4=A7?= =?UTF-8?q?=E5=B1=8F=E9=97=AE=E9=A2=98=E5=8F=8A=E6=B7=BB=E5=8A=A0=E6=96=B0?= =?UTF-8?q?=E9=9C=80=E6=B1=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/assets/mapUtils/map.ts | 8 +- .../components/basicTable/BasicTable.vue | 8 +- src/router/1.svg | 5 + src/router/iconPath.ts | 2 + src/router/index.ts | 4 +- src/views/components/emergencyDialog.vue | 1 + src/views/components/employeeDialog.vue | 42 ++- .../components/healthContentBottomItem1.vue | 138 +++------ .../components/healthContentBottomItem2.vue | 4 +- .../components/healthContentBottomItem3.vue | 6 +- .../components/healthContentBottomItem4.vue | 6 +- src/views/indexSun.vue | 264 +++++++++++++----- src/views/indexSun/centerMap.vue | 200 ++++++++++--- src/views/indexSun/indexSun.api.ts | 4 + src/views/indexSun/indexSun.ts | 94 ++++++- src/views/indexSun/oneRightNew.vue | 170 +++++++++-- src/views/indexSun/threeLeftNew.vue | 29 +- .../indexSun/threeLeftNewItem/item-d.vue | 6 +- .../indexSun/threeLeftNewItem/pieCharts.ts | 44 ++- .../indexSun/threeLeftNewItem/stepItem.vue | 1 + .../threeLeftNewItem/threeLeftNewItem.vue | 1 + 21 files changed, 766 insertions(+), 271 deletions(-) create mode 100644 src/router/1.svg create mode 100644 src/router/iconPath.ts diff --git a/src/assets/mapUtils/map.ts b/src/assets/mapUtils/map.ts index 399f8cc..449c1bd 100644 --- a/src/assets/mapUtils/map.ts +++ b/src/assets/mapUtils/map.ts @@ -22,6 +22,8 @@ export const Map = { emergencyMarker: null, // 应急人员marker startMarker: null, endMarker: null, + driving: null, + walking: null, /** * @desc 地图舒适化 * @param el dom元素 id选择器 @@ -246,7 +248,7 @@ export const Map = { ctx.textAlign = 'right'; ctx.textBaseline = 'middle'; ctx.fillStyle = '#ffffff'; - ctx.fillText(text, 25, 10); + ctx.fillText(text, 24.5, 10.8); resolve(canvas.toDataURL()); }; @@ -431,13 +433,13 @@ export const Map = { * @desc 创建地图详情弹窗 * * */ - createInfoModal({ option, content }) { + createInfoModal({ option, content }, flag = true) { let { latitude, longitude } = option; this.infoWindow = new AMap.InfoWindow({ position: [longitude, latitude], offset: new AMap.Pixel(-8, -25), content: content, - closeWhenClickMap: true, + closeWhenClickMap: flag, }); this.infoWindow.open(this.map); }, diff --git a/src/components/secondaryScreen/secondMap/components/basicTable/BasicTable.vue b/src/components/secondaryScreen/secondMap/components/basicTable/BasicTable.vue index d9d65e8..1e88476 100644 --- a/src/components/secondaryScreen/secondMap/components/basicTable/BasicTable.vue +++ b/src/components/secondaryScreen/secondMap/components/basicTable/BasicTable.vue @@ -82,10 +82,12 @@ if (props.afterFetch && isFunction(props.afterFetch)) { dataSource.value = props.afterFetch({ result, setPage: setPage, setDataSource: setDataSource }); } else { - dataSource.value = result?.records; + dataSource.value = result?.records ? result?.records : result; + } + if (result.hasOwnProperty('records')) { + paginationProp.value = { ...paginationProp.value, ...result }; + paginationProp.value.pageSize = result.size; } - paginationProp.value = { ...paginationProp.value, ...result }; - paginationProp.value.pageSize = result.size; } } catch (e) { dataSource.value = []; diff --git a/src/router/1.svg b/src/router/1.svg new file mode 100644 index 0000000..2964c32 --- /dev/null +++ b/src/router/1.svg @@ -0,0 +1,5 @@ + + + \ No newline at end of file diff --git a/src/router/iconPath.ts b/src/router/iconPath.ts new file mode 100644 index 0000000..f36d5a0 --- /dev/null +++ b/src/router/iconPath.ts @@ -0,0 +1,2 @@ +export const iconPath: string = + 'path://M827.076923 78.769231C590.769231 78.769231 393.846154 259.938462 393.846154 496.246154 393.846154 764.061538 590.769231 945.230769 827.076923 945.230769S1260.307692 771.938462 1260.307692 496.246154c0-236.307692-196.923077-417.476923-433.230769-417.476923zM0 456.861538h315.076923v78.769231H0v-78.769231z m1339.076923 70.892308c0 275.692308-228.430769 496.246154-512 496.246154S315.076923 803.446154 315.076923 527.753846v-31.507692C315.076923 228.430769 535.630769 7.876923 811.323077 0h15.753846c259.938462 0 480.492308 189.046154 512 441.107692v15.753846h315.076923v78.769231h-315.076923z'; diff --git a/src/router/index.ts b/src/router/index.ts index c8ffec9..ec69c93 100644 --- a/src/router/index.ts +++ b/src/router/index.ts @@ -24,7 +24,7 @@ const routes: Array = [ meta: { title: '副屏', }, - component: () => import('/@/views/indexSun.vue'), + component: () => import('/@/views/healthConsultation/HealthConsultationIndex.vue'), }, { path: '/home', @@ -32,7 +32,7 @@ const routes: Array = [ meta: { title: '健康咨询', }, - component: () => import('../views/healthConsultation/HealthConsultationIndex.vue'), + component: () => import('/@/views/indexSun.vue'), }, { path: '/indexSon', diff --git a/src/views/components/emergencyDialog.vue b/src/views/components/emergencyDialog.vue index 4ebcd85..7d72215 100644 --- a/src/views/components/emergencyDialog.vue +++ b/src/views/components/emergencyDialog.vue @@ -87,6 +87,7 @@ closeDialog(); emit('confirmHelp', { ...userInfo.value, + emergencyType: userInfo.value?.popType + '', hospitalList: list.map((item: any) => { item['latitude'] = item['lat']; item['longitude'] = item['lon']; diff --git a/src/views/components/employeeDialog.vue b/src/views/components/employeeDialog.vue index 5623183..106af64 100644 --- a/src/views/components/employeeDialog.vue +++ b/src/views/components/employeeDialog.vue @@ -14,7 +14,7 @@
二级单位: - {{ userInfo?.orgName }} + {{ userInfo?.deptName }}
手机号码: @@ -32,6 +32,9 @@ 发生地点: {{ userInfo?.address || userInfo?.gpsErrorMsg }}
+
+ 确认 +
@@ -41,12 +44,15 @@ import { useDialog } from '/@/views/components/dialogHooks.ts'; import { watch, ref } from 'vue'; import { useTheme } from '/@/hooks/theme/useTheme.ts'; + import { nearResourcesApi } from '/@/views/indexSun/indexSun.api.ts'; const props = defineProps({ record: Object, }); const userInfo = ref({}); const { themeType } = useTheme(); + const helpLoading = ref(false); + const emit = defineEmits(['confirmHelp']); watch( () => props.record, (nVal) => { @@ -55,6 +61,35 @@ ); const { visible, title, closeDialog, openDialog } = useDialog({ title: '健康监测工具报警' }); + //确认帮助 + async function confirmHelp() { + let list: any = []; + try { + helpLoading.value = true; + const res: any = await nearResourcesApi({ longitude: userInfo.value?.lon, latitude: userInfo.value?.lat }); + if (res.code === 200) { + list = res.result || []; + } + } catch (err: any) { + console.error(err); + } finally { + helpLoading.value = false; + } + closeDialog(); + emit('confirmHelp', { + ...userInfo.value, + departName: userInfo.value?.deptName, + orgName: userInfo.value?.orgName, + emergencyType: '3', + userId: userInfo.value?.bindUserId, + hospitalList: list.map((item: any) => { + item['latitude'] = item['lat']; + item['longitude'] = item['lon']; + return item; + }), + }); + } + defineExpose({ openDialog, }); @@ -89,4 +124,9 @@ } } } + + .btn-box { + text-align: center; + margin-top: 2%; + } diff --git a/src/views/healthConsultation/components/healthContentBottomItem1.vue b/src/views/healthConsultation/components/healthContentBottomItem1.vue index 19d9bb6..cc30fc1 100644 --- a/src/views/healthConsultation/components/healthContentBottomItem1.vue +++ b/src/views/healthConsultation/components/healthContentBottomItem1.vue @@ -10,19 +10,11 @@ import * as echarts from 'echarts'; import { getDocCountStat } from '/@/views/healthConsultation/api/health'; + import { iconPath } from '/@/router/iconPath.ts'; const chartRef = ref(null); let chartInstance: echarts.ECharts | null = null; - // const total = 2920; - - // const data = [ - // { name: '新疆医科大学第一附属医院', value: 650 }, - // { name: '昌吉州宝石花医院', value: 422 }, - // { name: '新疆维吾尔自治区人民医院', value: 928 }, - // { name: '新克拉玛依市中心医院', value: 560 }, - // ]; - const transformHospitalData = (hospitals: { docCount: number; hospitalName: string }[]) => { return hospitals.map((hospital) => ({ name: hospital.hospitalName, @@ -54,36 +46,29 @@ chartInstance = echarts.init(chartRef.value); const option: echarts.EChartsOption = { - // title: { - // text: '医院专家数量统计', - // left: 'center', - // top: 10, - // textStyle: { - // color: '#fff', - // fontSize: 18, - // fontWeight: 'bold', - // }, - // }, tooltip: { trigger: 'item', formatter: '{b}: {c}人 ({d}%)', + position: 'right', }, series: [ { name: '专家人数', type: 'pie', - radius: ['30%', '40%'], - center: ['50%', '55%'], + radius: ['30%', '50%'], + center: ['40%', '50%'], data: value, + minAngle: 10, label: { + position: 'outside', show: true, color: '#fff', - fontSize: 12, - lineHeight: 20, + fontSize: 10, + lineHeight: 19, formatter: (params: any) => { const name: string = params.name; const value: number = params.value; - const maxLen = 6; // 超过 6 个字就换行 + const maxLen = name.length > 10 ? 6 : 5; let newName = ''; for (let i = 0; i < name.length; i += maxLen) { @@ -93,18 +78,27 @@ return `${newName}(${value}人)`; }, }, - // itemStyle: { - // borderRadius: 5, - // borderColor: '#0f2c44', - // borderWidth: 2, + labelLine: { + show: true, + length: 20, // 第一段线长度(从圆到转折点) + length2: 15, // 第二段线长度(从转折点到文字) + smooth: 0.2, // 平滑度 + lineStyle: { + width: 2, + type: 'solid', + }, + }, + // emphasis: { + // scale: true, + // scaleSize: -10, // }, }, ], graphic: [ { type: 'text', - left: 'center', - top: '48%', + left: '34%', + top: '44%', style: { text: `总人数`, // textAlign: 'center', @@ -116,8 +110,8 @@ }, { type: 'text', - left: 'center', - top: '56%', // 第二行位置 + left: '37%', + top: '53.7%', // 第二行位置 style: { // text: `${total}`, text: `${getTotalDocCount(value)}`, @@ -132,78 +126,32 @@ legend: [ { orient: 'vertical', - left: 20, - top: 10, - itemGap: 10, - icon: 'path://M200 512 H307 a154,154 0 1,0 308,0 a154,154 0 1,0 -308,0 H824', + right: 20, + top: 'center', + icon: iconPath, + formatter: (name) => { + let newName = []; + const maxLen = 6; // 超过 6 个字就换行 + for (let i = 0; i < name.length; i += maxLen) { + newName.push(name.substring(i, i + maxLen)); + } + + return `{name|${newName.join('\n')}}`; + }, textStyle: { color: '#fff', - fontSize: 12, + fontSize: 10, rich: { name: { - fontSize: 12, + lineHeight: 12, + fontSize: 10, color: '#fff', align: 'left', // 左对齐 - // lineHeight: 20, - fontFamily: 'HarmonyOS Sans SC', + verticalAlign: 'middle', }, - // value: { - // fontSize: 14, - // color: '#aaa', - // align: 'left', // 左对齐 - // lineHeight: 20, - // }, }, }, - // data: [data[0].name, data[3].name], - data: - value && Array.isArray(value) - ? value - .filter((_, index) => index % 2 === 0) - .slice(0, 2) - .map((item) => item.name || '') - : ['', ''], - // formatter: (name: string) => { - // const item = data.find((d) => d.name === name); - // return `{name|${name}}\n{value|${item?.value}人}`; - // }, - }, - { - orient: 'vertical', - right: 20, - top: 10, - itemGap: 10, - icon: 'circle', - textStyle: { - color: '#fff', - fontSize: 12, - rich: { - name: { - fontSize: 12, - color: '#fff', - align: 'right', // 右对齐 - // lineHeight: 20, - }, - // value: { - // fontSize: 14, - // color: '#aaa', - // align: 'right', // 右对齐 - // lineHeight: 20, - // }, - }, - }, - // data: [data[1].name, data[2].name], - data: - value && Array.isArray(value) - ? value - .filter((_, index) => index % 2 === 1) - .slice(0, 2) - .map((item) => item.name || '') - : ['', ''], - // formatter: (name: string) => { - // const item = data.find((d) => d.name === name); - // return `{name|${name}}\n{value|${item?.value}人}`; - // }, + data: value, }, ], color: colors, diff --git a/src/views/healthConsultation/components/healthContentBottomItem2.vue b/src/views/healthConsultation/components/healthContentBottomItem2.vue index d5737e5..2cd3edb 100644 --- a/src/views/healthConsultation/components/healthContentBottomItem2.vue +++ b/src/views/healthConsultation/components/healthContentBottomItem2.vue @@ -10,6 +10,7 @@ import * as echarts from 'echarts'; import { getDeptCountStat } from '/@/views/healthConsultation/api/health'; + import { iconPath } from '/@/router/iconPath.ts'; const chartRef = ref(null); let chart: echarts.ECharts | null = null; @@ -36,6 +37,7 @@ const option: echarts.EChartsOption = { backgroundColor: 'transparent', + tooltip: {}, // title: { // text: '单位咨询数量统计', // left: 'center', @@ -53,7 +55,7 @@ itemGap: 30, // 默认 10,这里改成 30,让两段文字隔开一些 // 圆环 icon // icon: 'path://M512 0a512 512 0 1 0 0 1024A512 512 0 0 0 512 0zm0 896a384 384 0 1 1 0-768 384 384 0 0 1 0 768z', - icon: 'circle', + icon: iconPath, data: ['员工咨询全科医生', '员工咨询专家'], }, grid: { diff --git a/src/views/healthConsultation/components/healthContentBottomItem3.vue b/src/views/healthConsultation/components/healthContentBottomItem3.vue index 81ee8d6..c36e328 100644 --- a/src/views/healthConsultation/components/healthContentBottomItem3.vue +++ b/src/views/healthConsultation/components/healthContentBottomItem3.vue @@ -10,6 +10,7 @@ import * as echarts from 'echarts'; import { getDepartmentCountStat } from '/@/views/healthConsultation/api/health'; + import { iconPath } from '/@/router/iconPath.ts'; const chartRef = ref(null); let chart: echarts.ECharts | null = null; @@ -36,6 +37,7 @@ const option: echarts.EChartsOption = { backgroundColor: 'transparent', + tooltip: {}, // title: { // text: '科室咨询数量统计', // left: 'center', @@ -51,9 +53,7 @@ itemWidth: 20, itemHeight: 16, itemGap: 30, // 默认 10,这里改成 30,让两段文字隔开一些 - // 圆环 icon - // icon: 'path://M512 0a512 512 0 1 0 0 1024A512 512 0 0 0 512 0zm0 896a384 384 0 1 1 0-768 384 384 0 0 1 0 768z', - icon: 'circle', + icon: iconPath, data: ['图文', '视频'], }, grid: { diff --git a/src/views/healthConsultation/components/healthContentBottomItem4.vue b/src/views/healthConsultation/components/healthContentBottomItem4.vue index c3bd9bf..f727799 100644 --- a/src/views/healthConsultation/components/healthContentBottomItem4.vue +++ b/src/views/healthConsultation/components/healthContentBottomItem4.vue @@ -10,6 +10,7 @@ import * as echarts from 'echarts'; import { getHospitalCountStat } from '/@/views/healthConsultation/api/health'; + import { iconPath } from '/@/router/iconPath.ts'; const chartRef = ref(null); let chart: echarts.ECharts | null = null; @@ -67,6 +68,7 @@ const option: echarts.EChartsOption = { backgroundColor: 'transparent', + tooltip: {}, // title: { // text: '单位咨询数量统计', // left: 'center', @@ -82,9 +84,7 @@ itemWidth: 20, itemHeight: 16, itemGap: 30, // 默认 10,这里改成 30,让两段文字隔开一些 - // 圆环 icon - // icon: 'path://M512 0a512 512 0 1 0 0 1024A512 512 0 0 0 512 0zm0 896a384 384 0 1 1 0-768 384 384 0 0 1 0 768z', - icon: 'circle', + icon: iconPath, data: ['图文', '视频'], }, grid: { diff --git a/src/views/indexSun.vue b/src/views/indexSun.vue index bd50b16..16332af 100644 --- a/src/views/indexSun.vue +++ b/src/views/indexSun.vue @@ -7,6 +7,7 @@
{{ getCenterInfo.screenTitle || '健康服务中心' }}
+ 咨询服务平台 健康监测大屏
@@ -34,6 +35,7 @@ :hospitalList="hospitalList" @clear-hospital-list="clearHospitalList" :show-rest-b="showRestB" + :user-data="userData" @handle-detail="handleCenterMapClick" :show-map-bottom="showMapBottom" @show-rest-b=" @@ -47,7 +49,7 @@
- +
- + @@ -668,11 +768,19 @@ padding: 9px 18px; min-height: 200px; max-height: 473px; - overflow: auto; + overflow: hidden; background: #0a1d36; border-radius: 2px; + display: flex; + flex-direction: column; //border: 1px solid #1b7ef2; + .has-data { + height: 100%; + display: flex; + flex-direction: column; + overflow: auto; + } .line-title { margin-bottom: 9px; font-size: 14px; @@ -682,6 +790,8 @@ } .line-content { + flex: 1; + overflow: auto; font-size: 12px; color: var(--cardFontColor); @@ -785,4 +895,8 @@ } } } + + .no-top { + top: 50px !important; + } diff --git a/src/views/indexSun/indexSun.api.ts b/src/views/indexSun/indexSun.api.ts index b02c7b0..f441d5f 100644 --- a/src/views/indexSun/indexSun.api.ts +++ b/src/views/indexSun/indexSun.api.ts @@ -21,6 +21,8 @@ enum Api { nearResources = '/health-emergency/emergency/LargeScreenNew/nearResources', todayEmergencyList = '/health-emergency/emergency/LargeScreenNew/todayEmergencyList', healthArchives = '/health-emergency/emergency/LargeScreenNew/healthArchives', + contactList = '/health-system/sys/api/emergencyContact/contactList', + careUser = '/health-emergency/emergency/LargeScreenNew/careUser', } export const statisticsNewApi = (params: any) => post(Api.statisticsNew, params); @@ -35,6 +37,8 @@ export const twoRNApi = (params: any) => get(Api.twoRN, params); export const nearResourcesApi = (params: any) => get(Api.nearResources, params); export const todayEmergencyListApi = (params: any) => post(Api.todayEmergencyList, params); export const healthArchivesApi = (params: any) => get(Api.healthArchives, params); +export const contactListApi = (params: any) => get(Api.contactList, params); +export const careUserApi = (params: any) => get(Api.careUser, params); export const threeRModalApi = (params: any) => post(Api.threeRModal, params); export const twoRModal1Api = (params: any) => post(Api.twoRModal1, params); diff --git a/src/views/indexSun/indexSun.ts b/src/views/indexSun/indexSun.ts index 1877180..f158d08 100644 --- a/src/views/indexSun/indexSun.ts +++ b/src/views/indexSun/indexSun.ts @@ -2,6 +2,7 @@ import * as echarts from 'echarts'; import { initatorTypee, isTrueOfFalse, SexType, sexTypeList, sexTypeListNew } from '/@/utils/settings.ts'; import { getDictByCode2 } from '/@/views/index.api.ts'; import dayjs from 'dayjs'; +import { h } from 'vue'; 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 legend3 = new URL('/@/assets/img/legend3.png', import.meta.url).href; @@ -44,7 +45,7 @@ export function getClassCharts(dx: any, dy: any, m: any) { // nameGap: 10, // nameRotate: 0, // 设置旋转角度,0 表示水平 nameTextStyle: { - fontSize: 12, + fontSize: 10, color: '#65C6E7', left: 100, }, @@ -56,7 +57,7 @@ export function getClassCharts(dx: any, dy: any, m: any) { type: 'solid', }, }, - interval: 25, // 步长 + // interval: 25, // 步长 max: m, min: 0, // 起始 - 设置y轴刻度的最小值 axisLabel: { @@ -869,9 +870,98 @@ export const oneRNewColumns = [ } }, }, + { + title: '应急时间', + dataIndex: 'time', + key: 'time', + }, + { + title: '详细地址', + dataIndex: 'd', + key: 'd', + ellipsis: true, + }, { title: '操作', dataIndex: 'cz', key: 'cz', }, ]; + +export const monitorColumns = [ + { + title: '姓名', + dataIndex: 'realName', + key: 'realName', + }, + { + title: '单位名称', + dataIndex: 'orgName1', + key: 'orgName1', + }, + { + title: '部门名称', + dataIndex: 'orgName2', + key: 'orgName2', + }, + { + title: '手机号码', + dataIndex: 'phone', + key: 'phone', + width: 100, + }, + { + title: '事件类型', + dataIndex: 'eventType_dictText', + key: 'eventType_dictText', + width: 100, + }, + { + title: '异常值', + dataIndex: 'dataValue', + key: 'dataValue', + width: 80, + }, + { + title: '详细地址', + dataIndex: 'address', + key: 'address', + customRender: ({ record }) => { + return !record?.address ? h('div', { style: { color: 'red' } }, record?.gpsErrorMsg) : record?.address; + }, + ellipsis: true, + }, + { + title: '预警时间', + dataIndex: 'warnTime', + key: 'warnTime', + }, +]; +export const contactListColumns = [ + { + title: '联系人姓名', + dataIndex: 'name', + key: 'name', + }, + { + title: '关系', + dataIndex: 'familyRelation_dictText', + key: 'familyRelation_dictText', + }, + { + title: '联系人电话', + dataIndex: 'phone', + key: 'phone', + }, + { + title: '身份证号', + dataIndex: 'idCard', + key: 'idCard', + customRender: ({ text }) => { + if (text) { + return text.substring(0, 6) + '********' + text.substring(14); + } + return '-'; + }, + }, +]; diff --git a/src/views/indexSun/oneRightNew.vue b/src/views/indexSun/oneRightNew.vue index 9cf0164..6c1f176 100644 --- a/src/views/indexSun/oneRightNew.vue +++ b/src/views/indexSun/oneRightNew.vue @@ -1,7 +1,7 @@