1.修改标准化大屏跳转逻辑,根据获取分中心信息,进行跳转至对应页面
This commit is contained in:
2024-11-14 13:04:05 +08:00
parent 1cfc2e5d89
commit f81fb4a868
8 changed files with 1360 additions and 33 deletions
@@ -0,0 +1,198 @@
<template>
<Dialog :openVis="visible" width="60%" title="急救列表" @close="closeDialog" :maskClosable="false">
<template #container>
<BasicTable ref="registerTable" class="table-container" :columns="columns" :api="ambulancePageApi">
<template #bodyCell="{ column, record }">
<template v-if="column?.dataIndex === 'tz'">
<Dropdown :trigger="['click']">
<span
style="color: #45a2ff; cursor: pointer"
@click="
() => {
console.log('aaa');
}
"
>查看</span
>
<template #overlay>
<div class="drop-down-div">
<div>
<span>舒张压(mmHg)</span><span>{{ record?.diastolicPressure || '--' }}</span>
</div>
<div>
<span>收缩压(mmHg)</span><span>{{ record?.systolicPressure || '--' }}</span>
</div>
<div>
<span>血糖(mmoV/L)</span><span>{{ record?.bloodSugar || '--' }}</span>
</div>
<div>
<span>血氧饱和度(%)</span><span>{{ record?.bloodOxygenSaturation || '--' }}</span>
</div>
<div>
<span>体温()</span><span>{{ record?.temperature || '--' }}</span>
</div>
<div>
<span>脉搏(/分钟)</span><span>{{ record?.pulse || '--' }}</span>
</div>
<div>
<span>心率(/分钟)</span><span>{{ record?.heartRate || '--' }}</span>
</div>
<div>
<span>呼吸率(/分钟)</span><span>{{ record?.breathingRate || '--' }}</span>
</div>
</div>
</template>
</Dropdown>
</template>
<template v-if="column?.dataIndex === 'arriveSceneTime'">
<Dropdown :trigger="['click']">
<span
style="color: #45a2ff; cursor: pointer; margin-left: 10px"
@click="
() => {
console.log('aaa');
}
"
>全部</span
>
<template #overlay>
<div class="drop-down-div" style="width: 300px">
<div>
<span>救护车出发时间</span><span>{{ record?.startTime || '--' }}</span>
</div>
<div>
<span>到达现场时间</span><span>{{ record?.arriveSceneTime || '--' }}</span>
</div>
<div>
<span>离开现场时间</span><span>{{ record?.leaveSceneTime || '--' }}</span>
</div>
<div>
<span>到达医院时间</span><span>{{ record?.arriveHospitalTime || '--' }}</span>
</div>
<div>
<span>院前预警时间</span><span>{{ record?.earlyWarningTime || '--' }}</span>
</div>
</div>
</template>
</Dropdown>
</template>
</template>
</BasicTable>
</template>
</Dialog>
</template>
<script setup lang="ts">
import { nextTick, ref } from 'vue';
import Dialog from '/@/components/dialog/Dialog.vue';
import { useDialog } from '/@/views/components/dialogHooks.ts';
import BasicTable from '/@/components/secondaryScreen/secondMap/components/basicTable/BasicTable.vue';
import { ambulancePageApi } from '/@/views/yinChuan/yinChuan.api.ts';
import { Dropdown } from 'ant-design-vue';
const columns = [
{
title: '二级单位',
dataIndex: 'secondDepart',
key: 'secondDepart',
width: 120,
},
{
title: '三级单位',
dataIndex: 'thirdDepart',
key: 'secondDepart',
width: 120,
},
{
title: '姓名',
dataIndex: 'patientName',
key: 'patientName',
width: 120,
},
{
title: '性别',
dataIndex: 'gender_dictText',
key: 'gender_dictText',
width: 45,
},
{
title: '年龄',
dataIndex: 'age',
key: 'age',
width: 45,
},
{
title: '联系电话',
dataIndex: 'phone',
key: 'phone',
width: 110,
},
{
title: '病人MPDS类型',
dataIndex: 'mpdsCategoryId_dictText',
key: 'mpdsCategoryId_dictText',
width: 110,
},
{
title: '生命体征',
dataIndex: 'tz',
key: 'tz',
slot: 'tz',
width: 75,
},
{
title: '病情判断',
dataIndex: 'injuryLevel_dictText',
key: 'injuryLevel_dictText',
width: 80,
},
{
title: '到达现场时间',
dataIndex: 'arriveSceneTime',
key: 'arriveSceneTime',
width: 180,
},
{
title: '发病地点',
dataIndex: 'attackAddress',
key: 'attackAddress',
width: 220,
// customRender: ({ record }) => {
// if (record?.address) {
// return record?.address;
// } else {
// return h('span', { style: { color: '#eb3636' } }, record?.gpsErrorMsg);
// }
// },
},
];
const { visible, closeDialog, openDialog } = useDialog({ title: '急救列表' });
function openDia() {
openDialog();
// nextTick(() => {
// registerTable.value?.getRecords();
// });
}
const registerTable = ref();
defineExpose({
openDialog: openDia,
});
</script>
<style scoped lang="less">
.table-container {
margin: 0 10px;
}
.drop-down-div {
background-color: #0f2841;
color: #ffffff;
border: 1px solid #1960a3;
padding: 10px 10px 0;
width: 200px;
div {
width: 100%;
padding: 0 0 10px 0;
display: flex;
justify-content: space-between;
}
}
</style>
@@ -0,0 +1,228 @@
<template>
<div>
<public-title title="急救数据" themeType="dark">
<template #right>
<span class="right-text" :class="[themeType]" @click="viewDetail">查看详情</span>
</template>
</public-title>
<div class="inner">
<div class="type-time">
<span
v-for="(item, index) in typeTime"
:key="index"
:class="[selectIndex === index ? 'select' : 'unSelect', themeType]"
@click="handleSelect(index, item.value)"
>{{ item.name }}</span
>
</div>
<div class="server-container">
<a-spin :spinning="spinning" class="spin"></a-spin>
<div class="RadarCharts" ref="chartsRef"></div>
</div>
</div>
</div>
</template>
<script setup lang="ts">
import PublicTitle from '/@/components/publicTitle.vue';
import { useTheme } from '/@/hooks/theme/useTheme.ts';
import { useSession } from '/@/hooks/autoRefresh/caching.ts';
import { onMounted, ref, watch } from 'vue';
import { getOptions, useSpin } from '/@/components/body-d-left/bodyLeftHooks.ts';
import { ambulanceStatApi } from '/@/views/yinChuan/yinChuan.api.ts';
import * as echarts from 'echarts';
const { themeType } = useTheme();
const props = defineProps({
refreshState: {
type: Boolean,
},
setting: {
type: Object,
},
theme: {
type: String,
},
});
const typeTime = ref([
{
name: '本年',
value: '2',
},
{
name: '本月',
value: '1',
},
{
name: '本周',
value: '0',
},
]);
const emergencyTypeList = ref([
{
type: '1',
name: '濒危',
color: '#5087ec',
value: 0,
},
{
type: '2',
name: '危重',
color: '#68bbc4',
value: 0,
},
{
type: '3',
name: '急症',
color: '#58a55c',
value: 0,
},
{
type: '4',
name: '非急症',
color: '#f2bd42',
value: 0,
},
{
type: '5',
name: '死亡',
color: '#ee752f',
value: 0,
},
]);
const selectIndex = ref(0);
const selectVal = ref('2'); //本年
const { setSpin, spinning } = useSpin();
onMounted(() => {
getList();
});
const { setSession, getSession } = useSession();
const chartsRef = ref();
async function getList() {
try {
emergencyTypeList.value = [
{
type: '1',
name: '濒危',
color: '#5087ec',
value: 0,
},
{
type: '2',
name: '危重',
color: '#68bbc4',
value: 0,
},
{
type: '3',
name: '急症',
color: '#58a55c',
value: 0,
},
{
type: '4',
name: '非急症',
color: '#f2bd42',
value: 0,
},
{
type: '5',
name: '死亡',
color: '#ee752f',
value: 0,
},
];
const { result, success } = await ambulanceStatApi({ type: selectVal.value });
if (success) {
result &&
result.map((item: any) => {
emergencyTypeList.value.forEach((it: any) => {
if (item.type == it.type) {
it['value'] = item.count || 0;
}
});
});
let data: any[] = [];
let colors: any[] = [];
let totalTimes = 0;
emergencyTypeList.value.map((item: any) => {
data.push({
name: item.name,
value: item.value,
});
colors.push(item.colors);
totalTimes += item.value || 0;
});
const option = getOptions(data, colors, totalTimes);
const myChart = echarts.init(chartsRef.value);
myChart.setOption(option);
window.addEventListener('resize', () => {
myChart.resize();
});
}
} catch (e) {
console.log(e);
} finally {
setSpin(false);
}
}
function handleSelect(index: number, value: string) {
setSpin(true);
selectIndex.value = index;
selectVal.value = value;
getList();
}
const emit = defineEmits(['emergencyDataList']);
function viewDetail() {
emit('emergencyDataList');
}
watch(
() => props.refreshState,
() => {
getList();
}
);
</script>
<style scoped lang="less">
.inner {
height: calc(100% - 40px);
}
.right-text {
font-weight: 100;
cursor: pointer;
margin-right: 3px;
font-size: 18px;
}
.server-container {
margin-top: 15px;
width: 96%;
height: calc(100% - 40px);
display: flex;
flex-wrap: wrap;
align-content: space-around;
position: relative;
.spin {
position: absolute;
left: 50%;
top: 50%;
}
.RadarCharts {
width: 100%;
height: 100%;
}
}
</style>