This commit is contained in:
zk
2024-09-23 16:43:57 +08:00
parent ca4a9a8c28
commit 278e91c262
26 changed files with 376 additions and 45 deletions
@@ -56,7 +56,7 @@
<div><img :src="item.img" alt="" class="legend-img" /> {{ item.text }}</div>
</div>
</div>
<!-- <div class="level">地图层级{{ level }}</div>-->
<!--<div class="level">地图层级{{ level }}</div>-->
</div>
<div class="center-footer" v-if="showFooter">
<div class="count-item">
@@ -71,9 +71,9 @@
<!-- 附近医院医疗点 -->
<div class="hospital-list" 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>{{ item?.name }}</div>
<div>相距{{ item?.distance }}</div>
<div>驾车大约{{ item?.driveTime }}</div>
</div>
</div>
</div>
@@ -87,6 +87,7 @@
import { useDetailStore } from '/@/store/modules/detailData.ts';
import RoutePanel from '/@/components/chinaMap/components/routePanel.vue';
import { legendList, mapApiSwitch } from '/@/views/centralScreen/components/centerMapHooks.ts';
import { useUserStore } from '/@/store/modules/user.ts';
const props = defineProps({
//是否展示底部统计
@@ -132,6 +133,7 @@
});
const list = ref(tabList);
const currentIndex = ref(0);
const userStore = useUserStore();
function changeTab(item, i: number) {
currentIndex.value = i; // 地方医院
@@ -143,7 +145,7 @@
Map.map.on('moveend', logMapinfo);
return;
} else {
getMapData(item.type, { type: item.type });
getMapData(item.type, { type: item.type, centerId: userStore.getCenterInfo?.id });
}
}
@@ -198,7 +200,7 @@
onMounted(() => {
Map.initMap({ el: 'centerMap', option: props.mapOptions }).then(() => {
getMapData(tabList[0].type);
getMapData(tabList[0].type, { centerId: userStore.getCenterInfo?.id });
Map.map && Map.map.on('zoomend', setLevel);
Map.map && Map.map.on('zoomend', setLevel);
});
@@ -21,8 +21,17 @@ export function mapApiSwitch(type: string, params: any) {
lat: 34, //纬度34
lon: 108, //经度
};
// 全部 油田 医疗点 合作医院
if ([TabType.all, TabType.youTianYiYuan, TabType.yiLiaoDian, TabType.heZuoYiYuan, TabType.jiuHuChe, TabType.jiuHuChe].includes(type)) {
// 全部 医疗点
if ([TabType.all, TabType.yiLiaoDian].includes(type)) {
return getMapListApi({ ...basicParams, ...params });
}
// 其他
if ([TabType.youTianYiYuan, TabType.heZuoYiYuan, TabType.jiuHuChe, TabType.jiuHuChe].includes(type)) {
let { centerId, ...other } = params;
return getMapListApi({ ...basicParams, ...other });
}
}
export function handleSocketUrl(url: string, centerId: string) {
return url.substring(0, url.indexOf('/websocket/') + 11) + centerId;
}
@@ -1,19 +1,23 @@
<template>
<div>
<public-title title="一线医疗点每日工作动态" themeType="dark" />
<div class="inner">
<div class="inner" v-if="trendsData.length">
<div class="trends-item" v-for="(item, k) in trendsData" :key="k">
<div class="trends-title-con">
<span class="icon-medical"></span>
<span class="trends-item-title">{{ item.name }}</span>
</div>
<div class="trends-item-span-box">
<span class="trends-item-span">高风险干预{{ item?.high }}</span>
<!-- <span class="trends-item-span">高风险干预{{ item?.high }}</span>-->
<span class="trends-item-span">慢病管理{{ item?.slow }}</span>
<span class="trends-item-span">巡诊{{ item?.tour }}</span>
</div>
</div>
</div>
<div v-else class="empty-box">
<img class="img" :src="EmptyImg" alt="" />
<div class="no-data">暂无数据</div>
</div>
</div>
</template>
<script setup lang="ts">
@@ -21,14 +25,18 @@
import { onMounted, ref } from 'vue';
import { caching, useSession } from '/@/hooks/autoRefresh/caching.ts';
import { medicalCenterNew } from '/@/views/centralScreen/centralScreen.api.ts';
import { useUserStore } from '/@/store/modules/user.ts';
import EmptyImg from '/@/assets/img/empty-img.png';
const { setSession, getSession } = useSession();
const { WORK_DAILY_NEW } = caching;
const trendsData = ref([]);
const userStore = useUserStore();
async function getTrendsData() {
try {
const { code, result } = await medicalCenterNew({});
let centerId = userStore.getCenterInfo?.id;
const { code, result } = await medicalCenterNew({ centerId });
if (code != 200) {
return;
}
@@ -92,4 +100,16 @@
}
}
}
.empty-box {
color: #fff;
display: flex;
flex-direction: column;
align-items: center;
.img {
width: 100px;
margin-top: 80px;
}
}
</style>
@@ -18,6 +18,7 @@
import PublicTitle from '/@/components/publicTitle.vue';
import { caching, useSession } from '/@/hooks/autoRefresh/caching.ts';
import { userHealthCenterNew } from '/@/views/centralScreen/centralScreen.api.ts';
import { useUserStore } from '/@/store/modules/user.ts';
const props = defineProps({
setting: Object,
@@ -66,9 +67,12 @@
});
}
const userStore = useUserStore();
async function viewDetail() {
try {
const { code, result } = await userHealthCenterNew({ dataType: props.setting?.dataType });
let centerId = userStore.getCenterInfo?.id;
const { code, result } = await userHealthCenterNew({ dataType: props.setting?.dataType, centerId });
if (code != 200) {
return;
}
@@ -29,6 +29,7 @@
import { SexType, sexTypeList } from '/@/utils/settings.ts';
import { getPhoneList } from '/@/views/centralScreen/centralScreen.api.ts';
import { useTheme } from '/@/hooks/theme/useTheme.ts';
import { useUserStore } from '/@/store/modules/user.ts';
const props = defineProps({
record: Object,
@@ -89,12 +90,14 @@
const formRecord = ref({
sex: SexType.all,
});
const userStore = useUserStore();
const formState = computed(() => ({
...formRecord.value,
centerId: '',
dataType: props.setting.dataType,
phoneType: props.phoneType,
showType: '0',
centerId: userStore.getCenterInfo?.id,
}));
const dialogTitle = ref();
const { visible, closeDialog, openDialog } = useDialog({ title: dialogTitle.value });
@@ -26,6 +26,7 @@
import * as echarts from 'echarts';
import { useTheme } from '/@/hooks/theme/useTheme.ts';
import { getPhysicalData } from '/@/views/centralScreen/centralScreen.api.ts';
import { useUserStore } from '/@/store/modules/user.ts';
const props = defineProps({
refreshState: {
@@ -54,11 +55,15 @@
});
const { radarList, setRadarList, getRadarList } = useHospitalList();
const userStore = useUserStore();
async function getList() {
setSpin(true);
try {
const { code, result } = (await getPhysicalData({ dataType: props.setting.dataType, condition: selectVal.value })) || {};
let orgCodeList = userStore.getCenterInfo?.serviceScope || '';
let centerId = userStore.getCenterInfo?.id || '';
const { code, result } =
(await getPhysicalData({ dataType: props.setting.dataType, condition: selectVal.value, orgCodeList, centerId })) || {};
setSpin(!spinning.value);
if (code != 200) {
return;
@@ -75,19 +80,21 @@
function setValue(result) {
setRadarList(result);
const everyEmpty = allValueEmpty('value', getRadarList());
everyEmpty && initChart();
// everyEmpty && initChart();
initChart();
}
const radarChartsRef = ref<HTMLElement>();
function initChart() {
const myChart = echarts.init(radarChartsRef.value);
let countList = radarList?.value.map((item) => item?.userCount);
if (countList.length < 1) return;
let countList = radarList?.value?.map((item) => item?.userCount) || [];
// if (countList?.length < 1) return;
let max = Math.max(...countList);
const indicator = radarList?.value.map((item) => ({ name: item?.hospitalName, max: max }));
const indicator = radarList?.value?.map((item) => ({ name: item?.hospitalName, max: max }));
const option = radarCharts({ indicator, countList, theme: unref(themeType) });
myChart.setOption(option);
myChart.showLoading('noData');
window.addEventListener('resize', () => {
myChart.resize();
});
@@ -35,6 +35,7 @@
import { useSession, caching } from '/@/hooks/autoRefresh/caching.ts';
import { useTheme } from '/@/hooks/theme/useTheme.ts';
import { statisticsNewApi } from '/@/views/centralScreen/centralScreen.api.ts';
import { useUserStore } from '/@/store/modules/user.ts';
const { themeType } = useTheme();
const { SERVER_DETAIL } = caching;
@@ -62,11 +63,13 @@
const useDetail = useDetailStore();
const { setSession, getSession } = useSession();
const userStore = useUserStore();
async function getList() {
setSpin(true);
try {
const { code, result } = (await statisticsNewApi({ condition: selectVal.value, centerId: '' })) || {};
let centerId = userStore.getCenterInfo?.id;
const { code, result } = (await statisticsNewApi({ condition: selectVal.value, centerId })) || {};
setSpin(false);
if (code != 200 || !result) {
return;
@@ -47,7 +47,7 @@
</div>
<div class="con-item">
<div>发生地点</div>
<div v-if="userInfo?.address">{{ userInfo?.address }} </div>
<div v-if="userInfo?.address">{{ userInfo?.address }}</div>
<div style="color: #eb3636" v-else>{{ userInfo?.gpsErrorMsg }}</div>
</div>
</div>
@@ -67,6 +67,7 @@
import { DataType } from '/@/utils/settings.ts';
import { useTheme } from '/@/hooks/theme/useTheme.ts';
import { message } from 'ant-design-vue';
import { useUserStore } from '/@/store/modules/user.ts';
const props = defineProps({
setting: Object,
@@ -115,10 +116,12 @@
* @desc 终端报警
* */
const scrollList = ref([]);
const userStore = useUserStore();
async function getScrollList() {
try {
const { code, result } = await getMonitorList({ pageSize: 10, pageNo: 1, orgCode: props.setting?.orgCode });
let orgCodeList = userStore.getCenterInfo?.serviceScope;
const { code, result } = await getMonitorList({ pageSize: 10, pageNo: 1, orgCode: props.setting?.orgCode, orgCodeList });
if (code == 200) {
setSession(RIGHT_KEY1_NEW, JSON.stringify(result.records));
scrollList.value = result.records;
@@ -16,6 +16,7 @@
import { useDialog } from '/@/views/components/dialogHooks.ts';
import BasicTable from '/@/components/secondaryScreen/secondMap/components/basicTable/BasicTable.vue';
import { getMonitorList } from '/@/views/centralScreen/centralScreen.api.ts';
import { useUserStore } from '/@/store/modules/user.ts';
const props = defineProps({
record: Object,
@@ -72,9 +73,12 @@
// },
},
];
const userStore = useUserStore();
const formState = computed(() => ({
dataType: props.setting.dataType,
orgCode: props.setting?.orgCode,
orgCodeList: userStore.getCenterInfo?.serviceScope,
}));
const { visible, closeDialog, openDialog } = useDialog({ title: props.title });
const registerTable = ref();