update: 大屏接口

This commit is contained in:
xf
2025-07-09 15:10:30 +08:00
parent f6e5bb78da
commit 91abcfd78d
22 changed files with 418 additions and 78 deletions
+17 -9
View File
@@ -74,7 +74,7 @@
</template>
<script setup lang="ts">
import { nextTick, onMounted, ref, watch } from 'vue';
import { infoContent, legendList, tabList } from '/@/views/indexSun/indexSun.ts';
import { infoContent, infoContent1, legendList, tabList } from '/@/views/indexSun/indexSun.ts';
import { message } from 'ant-design-vue';
import { innerLineLight, outerLineOption } from '/@/assets/mapUtils/mapConstant.ts';
import { Map } from '/@/assets/mapUtils/map.ts';
@@ -122,7 +122,7 @@
const panelTitle = ref();
const level = ref(0);
const routeList = ref([]);
const emits = defineEmits(['clearHospitalList', 'showRestB']);
const emits = defineEmits(['clearHospitalList', 'showRestB', 'handleDetail']);
watch(
() => props.showHospitalList,
@@ -150,7 +150,6 @@
document.addEventListener('click', (e) => {
let t = e.target.closest('.viewBtn');
if (t) {
console.log(t.id);
if (t.id) {
handleClcikDetail(JSON.parse(t.id));
}
@@ -184,7 +183,9 @@
function changeTab(item: any, i: number) {
closeDrivingElement();
currentIndex.value = i;
tab(item);
if (item.type) {
tab(item);
}
}
function tab(item: any) {
@@ -280,8 +281,12 @@
},
},
async (val) => {
console.log(val);
Map.createInfoModal({ option: val, content: infoContent(val) });
if (val.type == '2') {
Map.createInfoModal({ option: val, content: infoContent(val) });
} else {
Map.createInfoModal({ option: val, content: infoContent1(val) });
}
// const viewBtn = document.getElementById(val.id);
// viewBtn.onclick = () => {
// handleClcikDetail(val);
@@ -307,7 +312,7 @@
}
function handleClcikDetail(res) {
console.log(res);
emits('handleDetail', res);
}
function setTitle({ time, distance }) {
@@ -560,7 +565,10 @@
}
}
}
:deep(.modal-box-normal) {
width: 330px;
height: 110px;
}
.hospital-list {
position: absolute;
bottom: 160px;
@@ -590,7 +598,7 @@
z-index: 99;
position: absolute;
right: 0;
top: 54px;
top: 100px;
width: 288px;
padding: 9px 18px;
min-height: 200px;
+42 -12
View File
@@ -20,17 +20,17 @@
<a-select placeholder="选择部门" v-model:value="orgCode2" :options="option2" />
</a-form-item>
<slot name="searchSecond"></slot>
<div class="form-btn">
<a-button @click="handleClickReset" style="border-color: #00ccff">重置</a-button>
<a-button
@click="handleClicksearch"
:loading="loading"
style="margin-left: 10px; background: #00ccff; border-color: #00ccff; color: #ffffff"
>
搜索
</a-button>
</div>
</Form>
<div class="form-btn">
<a-button @click="handleClickReset" style="border-color: #00ccff">重置</a-button>
<a-button
@click="handleClicksearch"
:loading="loading"
style="margin-left: 10px; background: #00ccff; border-color: #00ccff; color: #ffffff"
>
搜索
</a-button>
</div>
</div>
<div class="top-bottom-center" v-if="twoROnly">
<div class="date-change">
@@ -134,6 +134,35 @@
if (type == dataActity.value) return;
dataActity.value = type;
getField();
if (props.twoROnly) {
const twoRData = localStorage.getItem('twoRList');
const newData = JSON.parse(twoRData);
if (props.twoROnly.type == 1) {
if (type == 1) {
normalNum.value = newData.weightLossCountDay;
abnormalNum.value = newData.weightLossAbnormalCountDay;
} else {
normalNum.value = newData.weightLossCountMonth;
abnormalNum.value = newData.weightLossAbnormalCountMonth;
}
} else if (props.twoROnly.type == 2) {
if (type == 1) {
normalNum.value = newData.bloodSugarCountDay;
abnormalNum.value = newData.bloodSugarAbnormalCountDay;
} else {
normalNum.value = newData.bloodSugarCountMonth;
abnormalNum.value = newData.bloodSugarAbnormalCountMonth;
}
} else {
if (type == 1) {
normalNum.value = newData.bloodPressureCountDay;
abnormalNum.value = newData.bloodPressureAbnormalCountDay;
} else {
normalNum.value = newData.bloodPressureCountMonth;
abnormalNum.value = newData.bloodPressureAbnormalCountMonth;
}
}
}
if (type == 1) {
formState.value.inputDateBegin = dayjs().format('YYYY-MM-DD');
formState.value.inputDateEnd = dayjs().format('YYYY-MM-DD');
@@ -212,7 +241,7 @@
abnormalNum.value = newData.weightLossAbnormalCountDay;
} else {
normalNum.value = newData.weightLossCountMonth;
abnormalNum.value = newData.weightLossCountMonth;
abnormalNum.value = newData.weightLossAbnormalCountMonth;
}
} else if (props.twoROnly.type == 2) {
if (props.twoROnly.date == 1) {
@@ -270,6 +299,7 @@
orgCode2.value = '';
orgCode1.value = '';
getField();
formRecord.value = {};
formState.value = {
...formState.value,
...formRecord.value,
@@ -303,7 +333,7 @@
border-radius: 4px !important;
}
:deep(.ant-form) {
width: 80%;
width: 100%;
display: flex;
.ant-form-item {
flex: 1;
+2
View File
@@ -15,6 +15,7 @@ enum Api {
twoRModal1 = '/health-emergency/emergency/LargeScreenNew/healthWeightLoss',
twoRModal2 = '/health-emergency/emergency/LargeScreenNew/healthBloodSugar',
twoRModal3 = '/health-emergency/emergency/LargeScreenNew/healthBloodPressure',
roomDetail = '/health-emergency/emergency/LargeScreenNew/healthRoomDetail',
getSecondaryDepartment = '/sys/sysDepart/allSecondaryDeparts',
}
@@ -31,6 +32,7 @@ export const threeRModalApi = (params) => post(Api.threeRModal, params);
export const twoRModal1Api = (params) => post(Api.twoRModal1, params);
export const twoRModal2Api = (params) => post(Api.twoRModal2, params);
export const twoRModal3Api = (params) => post(Api.twoRModal3, params);
export const roomDetailApi = (params) => post(Api.roomDetail, params);
export const getSecondaryDepartmentList = () => get({ url: Api.getSecondaryDepartment });
export const allSecondaryDepartsApi = (params) => get(Api.allSecondaryDeparts, params);
export const getThreeDepartByOrgCodeApi = (params) => get(Api.getThreeDepartByOrgCode, params);
+134 -14
View File
@@ -1,9 +1,17 @@
import * as echarts from 'echarts';
import { legend1, legend2, legend3, legend4, legend5 } from '/@/components/xianMap/xianMapHooks.ts';
import { initatorTypee, normalTypeList, SexType, sexTypeList, sexTypeListNew } from '/@/utils/settings.ts';
import { checkTypeList, initatorTypee, isTrueOfFalse, normalTypeList, SexType, sexTypeList, sexTypeListNew } from '/@/utils/settings.ts';
import { getDictByCode, getDictByCode2 } from '/@/views/index.api.ts';
import { get } from '/@/api/request';
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;
async function getDict(code) {
return await getDictByCode2({ dictCode: code });
}
export const checkData = await getDict('xj_check_type');
export function getClassCharts(dx, dy, m) {
return {
grid: {
@@ -129,7 +137,7 @@ export function infoContent(res) {
<span class="item-one">单位:</span>
<span class="item-two">${res.orgName ? res.orgName : '--'}</span>
</div>
<div class="modal-item">
<div class="modal-item" >
<span class="item-one">关爱人数:</span>
<span class="item-two">${res.loveNum ? res.loveNum : '--'}</span>
</div>
@@ -142,7 +150,19 @@ export function infoContent(res) {
</div>
</div> `;
}
export function infoContent1(res) {
return `
<div class="modal-box modal-box-normal">
<div class="modal-item">
<span class="item-one">单位:</span>
<span class="item-two">${res.orgName ? res.orgName : '--'}</span>
</div>
<div class="modal-item">
<span class="item-one">地点:</span>
<span class="item-two">${res.name ? res.name : '--'}</span>
</div>
</div> `;
}
const columns1 = [
{
title: '姓名',
@@ -320,6 +340,13 @@ export const threeRModalFromList = [
placeholder: '请输入体检医院',
defaultValue: '',
},
{
label: '单位',
field: 'departName',
type: 'input',
placeholder: '请输入单位',
defaultValue: '',
},
];
const towRcolumn1 = [
@@ -360,8 +387,8 @@ const towRcolumn1 = [
},
{
title: 'BMI是否异常',
dataIndex: 'bmiException',
key: 'bmiException',
dataIndex: 'bmiFlag',
key: 'bmiFlag',
},
{
title: '腰围(cm)',
@@ -370,8 +397,8 @@ const towRcolumn1 = [
},
{
title: '填报日期',
dataIndex: 'createTime',
key: 'createTime',
dataIndex: 'inputDate',
key: 'inputDate',
},
];
const towRcolumn2 = [
@@ -397,13 +424,13 @@ const towRcolumn2 = [
},
{
title: '血糖值(mmol/L)',
dataIndex: 'height',
key: 'height',
dataIndex: 'bsVal',
key: 'bsVal',
},
{
title: '血糖是否异常',
dataIndex: 'weight',
key: 'weight',
dataIndex: 'bmiFlag',
key: 'bmiFlag',
},
{
title: '腰围(cm)',
@@ -412,8 +439,8 @@ const towRcolumn2 = [
},
{
title: '填报日期',
dataIndex: 'createTime',
key: 'createTime',
dataIndex: 'inputDate',
key: 'inputDate',
},
];
const towRcolumn3 = [
@@ -476,7 +503,7 @@ export function twoRform(type) {
label: '异常标记',
field: 'abFlag',
type: 'select',
placeholder: '请选择性别',
placeholder: '请选择',
options: normalTypeList,
defaultValue: type,
},
@@ -489,3 +516,96 @@ export function twoRform(type) {
];
}
export const towRcolumns = [towRcolumn1, towRcolumn2, towRcolumn3];
export const centerMapColumns = [
{
title: '单位',
dataIndex: 'departName',
key: 'departName',
},
{
title: '姓名',
dataIndex: 'name',
key: 'name',
},
{
title: '检查日期',
dataIndex: 'checkInDate',
key: 'checkInDate',
},
{
title: '检查类型',
dataIndex: 'checkType',
key: 'checkType',
customRender: ({ text }) => {
console.log(text, checkData);
const dddd = checkData.filter((item) => item.value == text);
return dddd[0].label;
},
},
{
title: '去年检查值',
dataIndex: 'lastVal',
key: 'lastYearCheckVal',
},
{
title: '控降目标',
dataIndex: 'goalVal',
key: 'targetVal',
},
{
title: '本次测量值',
dataIndex: 'currentVal',
key: 'thisCheckVal',
},
{
title: '控降差值',
dataIndex: 'compareVal',
key: 'diffVal',
},
{
title: '是否成功控降',
dataIndex: 'successFlag',
key: 'successFlag',
customRender: ({ text }) => {
if (text == '1') {
return '是';
} else {
return '否';
}
},
},
];
export const centerMapFromList = [
{
label: '员工姓名',
field: 'name',
type: 'input',
placeholder: '请输入姓名',
defaultValue: '',
},
{
label: '检查类型',
field: 'checkType',
type: 'select',
placeholder: '请输入检查类型',
options: checkData,
defaultValue: '',
},
{
label: '是否成功控降',
field: 'successFlag',
type: 'select',
placeholder: '请输入是否成功控降',
options: isTrueOfFalse,
defaultValue: '',
},
{
label: '单位名称',
field: 'departName',
type: 'input',
placeholder: '请输入单位名称',
defaultValue: '',
},
];
+13 -3
View File
@@ -21,7 +21,7 @@
</template>
<template v-else>
<div style="height: 100%; width: 100%; display: flex; align-items: center; justify-content: center">
<Empty :description="'暂无数据'" />
<Empty :description="'暂无数据'" :image="nomalPng" />
</div>
</template>
</div>
@@ -34,6 +34,7 @@
import { onMounted, ref, watch } from 'vue';
import hospitalPng from '/@/assets/indexSun/hospital.png';
import { threeLApi } from '/@/views/indexSun/indexSun.api.ts';
import nomalPng from '/@/assets/indexSun/nomal.png';
const scrollList = ref<any[]>([]);
const props = defineProps({
bKey: {
@@ -98,14 +99,23 @@
font-size: 14px;
letter-spacing: 0;
margin-bottom: 20px;
cursor: pointer;
img {
display: inline-block;
width: 32px;
height: 32px;
cursor: pointer;
}
}
:deep(.ant-empty-image) {
height: auto;
img {
display: inline-block;
width: 51px;
height: 54px;
}
}
:deep(.ant-empty-description) {
color: #c9daff;
}
}
}
}
+13 -1
View File
@@ -34,7 +34,7 @@
</template>
<template v-else>
<div style="height: 100%; width: 100%; display: flex; align-items: center; justify-content: center">
<Empty :description="'暂无数据'" />
<Empty :description="'暂无数据'" :image="nomalPng" />
</div>
</template>
</div>
@@ -44,6 +44,7 @@
<script setup lang="ts">
import { Empty } from 'ant-design-vue';
import { ref, onMounted, watch } from 'vue';
import nomalPng from '/@/assets/indexSun/nomal.png';
import { threeRApi } from '/@/views/indexSun/indexSun.api.ts';
const scrollList = ref();
const emit = defineEmits(['handleClick']);
@@ -116,6 +117,17 @@
color: #fff;
justify-content: space-between;
}
:deep(.ant-empty-image) {
height: auto;
img {
display: inline-block;
width: 51px;
height: 54px;
}
}
:deep(.ant-empty-description) {
color: #c9daff;
}
}
}
}
+1 -1
View File
@@ -37,7 +37,7 @@
<div>
<span class="clock-text">异常人数</span>
<span class="clock-num2" @click="handleClickNum1(1, 2, 2)"
>{{ twoRList?.weightLossCountMonth ? twoRList?.weightLossAbnormalCountMonth : '--' }}</span
>{{ twoRList?.weightLossAbnormalCountMonth ? twoRList?.weightLossAbnormalCountMonth : '--' }}</span
>
</div>
</div>