update: 大屏接口

This commit is contained in:
xf
2025-07-08 15:52:42 +08:00
parent a2da7e4be7
commit 07f14c7703
8 changed files with 465 additions and 37 deletions
+128 -8
View File
@@ -1,5 +1,5 @@
<template>
<Dialog class="index-modal" :openVis="visible" width="60%" :title="dialogTitle" @close="closeDialog" :maskClosable="false">
<Dialog class="index-modal" :openVis="visible" width="60%" :title="dialogTitle" @close="handleClose" :maskClosable="false">
<template #container>
<div v-if="useForm" class="form-container">
<Form :model="formRecord" v-bind="formItemLayout">
@@ -22,7 +22,7 @@
<slot name="searchSecond"></slot>
</Form>
<div class="form-btn">
<a-button @click="handleClicksearch" style="border-color: #00ccff">重置</a-button>
<a-button @click="handleClickReset" style="border-color: #00ccff">重置</a-button>
<a-button
@click="handleClicksearch"
:loading="loading"
@@ -32,7 +32,23 @@
</a-button>
</div>
</div>
<BasicTable @table-load="tableLoad" ref="registerTable" class="table-container" :key="visible" :columns="column" :apiParams="formState" />
<div class="top-bottom-center" v-if="twoROnly">
<div class="date-change">
<span :class="dataActity == 1 ? 'date-item' : ''" @click="handleDataChange(1)">今日</span>
<span :class="dataActity == 2 ? 'date-item' : ''" @click="handleDataChange(2)">本月</span>
</div>
<div style="margin: 0 20px"> {{ dataActity == 1 ? '今日' : '本月' }}打卡总人数{{ normalNum }} </div>
<div> 异常人数{{ abnormalNum }} </div>
</div>
<BasicTable
@table-load="tableLoad"
ref="registerTable"
class="table-container"
:api="api"
:key="visible"
:columns="column"
:apiParams="formState"
/>
</template>
</Dialog>
</template>
@@ -64,13 +80,23 @@
type: Array,
default: () => [],
},
api: {
type: Function,
default: () => {},
},
twoROnly: {
type: Object,
},
apiParams: {
type: Object,
},
});
const loading = ref<boolean>(false);
const formState = ref();
const registerTable = ref();
const dialogTitle = ref('');
const formRecord = ref({
sex: SexType.all,
});
const formRecord = ref({});
const dataActity = ref(1);
function changeDept() {
if (!orgCode.value) {
return message.warning('请先选择单位');
@@ -79,6 +105,10 @@
onMounted(() => {
getSecondDept();
});
function handleDataChange(type) {
if (type == dataActity.value) return;
dataActity.value = type;
}
function getSecondDept() {
getSecondaryDepartmentList().then((res) => {
console.log(res, 'shshakjhdsjbjanmdjka');
@@ -99,9 +129,52 @@
};
watch(props, () => {
dialogTitle.value = props.title;
formState.value = {
...formState.value,
...props.apiParams,
};
if (props.twoROnly) {
twoROnlyFun();
}
getField();
getSecondDept();
});
const normalNum = ref();
const abnormalNum = ref();
function twoROnlyFun() {
normalNum.value = '';
abnormalNum.value = '';
dataActity.value = props.twoROnly.date;
const twoRData = localStorage.getItem('twoRList');
const newData = JSON.parse(twoRData);
if (newData) {
if (props.twoROnly.type == 1) {
if (props.twoROnly.date == 1) {
normalNum.value = newData.weightLossCountDay;
abnormalNum.value = newData.weightLossAbnormalCountDay;
} else {
normalNum.value = newData.weightLossCountMonth;
abnormalNum.value = newData.weightLossCountMonth;
}
} else if (props.twoROnly.type == 2) {
if (props.twoROnly.date == 1) {
normalNum.value = newData.bloodSugarCountDay;
abnormalNum.value = newData.bloodSugarAbnormalCountDay;
} else {
normalNum.value = newData.bloodSugarCountMonth;
abnormalNum.value = newData.bloodSugarAbnormalCountMonth;
}
} else {
if (props.twoROnly.date == 1) {
normalNum.value = newData.bloodPressureCountDay;
abnormalNum.value = newData.bloodPressureAbnormalCountDay;
} else {
normalNum.value = newData.bloodPressureCountMonth;
abnormalNum.value = newData.bloodPressureAbnormalCountMonth;
}
}
}
}
function tableLoad(b: boolean) {
loading.value = b;
@@ -120,11 +193,28 @@
console.log(formRecord.value);
}
function handleClicksearch() {
console.log(formRecord.value);
formState.value = {
...formState.value,
...formRecord.value,
};
// registerTable.value.getRecords();
}
const { orgCode, option, fieldNames, setOrgCode } = useDepart();
const { visible, closeDialog, openDialog } = useDialog({ title: dialogTitle.value });
function handleClose() {
formRecord.value = {};
closeDialog();
}
function handleClickReset() {
getField();
formState.value = {
...formState.value,
...formRecord.value,
};
console.log(formState.value, formRecord.value);
}
defineExpose({
openDialog,
});
@@ -156,6 +246,7 @@
display: flex;
.ant-form-item {
flex: 1;
margin-bottom: 0 !important;
}
}
.form-btn {
@@ -170,7 +261,7 @@
}
}
.table-container {
margin: 0 10px;
margin: 10px 10px 0;
}
}
@@ -181,4 +272,33 @@
:deep(.ant-form-item-control) {
margin-right: 20px !important;
}
.top-bottom-center {
margin-top: 10px;
padding: 0 10px;
display: flex;
align-items: center;
.date-change {
> span {
display: inline-block;
cursor: pointer;
width: 80px;
text-align: center;
line-height: 30px;
background: #072246;
border: 1px solid #1684fc;
&:nth-child(1) {
border-top-left-radius: 4px;
border-bottom-left-radius: 4px;
}
&:nth-child(2) {
border-left: none;
border-top-right-radius: 4px;
border-bottom-right-radius: 4px;
}
}
.date-item {
background: #02ccfc;
}
}
}
</style>
+8
View File
@@ -7,6 +7,10 @@ enum Api {
oneR = '/health-watch/watch/watchMonitorData/getMonitorList',
threeR = '/health-emergency/emergency/LargeScreenNew/medicalAbnormalStatistics',
twoR = '/health-emergency/emergency/LargeScreenNew/healthSign',
threeRModal = '/health-emergency/emergency/LargeScreenNew/medicalAbnormal',
twoRModal1 = '/health-emergency/emergency/LargeScreenNew/healthWeightLoss',
twoRModal2 = '/health-emergency/emergency/LargeScreenNew/healthBloodSugar',
twoRModal3 = '/health-emergency/emergency/LargeScreenNew/healthBloodPressure',
getSecondaryDepartment = '/sys/sysDepart/allSecondaryDeparts',
}
@@ -17,4 +21,8 @@ export const oneRApi = (params) => get(Api.oneR, params);
export const threeRApi = (params) => post(Api.threeR, params);
export const twoRApi = (params) => post(Api.twoR, params);
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 getSecondaryDepartmentList = () => get({ url: Api.getSecondaryDepartment });
+213 -1
View File
@@ -1,6 +1,6 @@
import * as echarts from 'echarts';
import { legend1, legend2, legend3, legend4, legend5 } from '/@/components/xianMap/xianMapHooks.ts';
import { SexType, sexTypeList } from '/@/utils/settings.ts';
import { normalTypeList, SexType, sexTypeList } from '/@/utils/settings.ts';
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;
@@ -263,3 +263,215 @@ const fromList2 = [
export const columns = [columns1, columns2];
export const fromLists = [fromList, fromList2];
export const threeRModalColumns = [
{
title: '单位',
dataIndex: 'departName',
key: 'departName',
},
{
title: '姓名',
dataIndex: 'name',
key: 'name',
},
{
title: '性别',
dataIndex: 'sex_dictText',
key: 'sex_dictText',
},
{
title: '年龄',
dataIndex: 'age',
key: 'age',
},
{
title: '体检医院',
dataIndex: 'hospitalName',
key: 'hospitalName',
},
{
title: '检查日期',
dataIndex: 'checkInDate',
key: 'checkInDate',
},
];
export const threeRModalFromList = [
{
label: '姓名',
field: 'name',
type: 'input',
placeholder: '请输入姓名',
defaultValue: '',
},
{
label: '体检医院',
field: 'hospitalName',
type: 'input',
placeholder: '请输入体检医院',
defaultValue: '',
},
];
const towRcolumn1 = [
{
title: '单位',
dataIndex: 'departName',
key: 'departName',
},
{
title: '姓名',
dataIndex: 'name',
key: 'name',
},
{
title: '性别',
dataIndex: 'sex_dictText',
key: 'sex_dictText',
},
{
title: '年龄',
dataIndex: 'age',
key: 'age',
},
{
title: '身高(cm)',
dataIndex: 'height',
key: 'height',
},
{
title: '体重(kg)',
dataIndex: 'weight',
key: 'weight',
},
{
title: 'BMI',
dataIndex: 'bmi',
key: 'bmi',
},
{
title: 'BMI是否异常',
dataIndex: 'bmiException',
key: 'bmiException',
},
{
title: '腰围(cm)',
dataIndex: 'waist',
key: 'waist',
},
{
title: '填报日期',
dataIndex: 'createTime',
key: 'createTime',
},
];
const towRcolumn2 = [
{
title: '单位',
dataIndex: 'departName',
key: 'departName',
},
{
title: '姓名',
dataIndex: 'name',
key: 'name',
},
{
title: '性别',
dataIndex: 'sex_dictText',
key: 'sex_dictText',
},
{
title: '年龄',
dataIndex: 'age',
key: 'age',
},
{
title: '血糖值(mmol/L)',
dataIndex: 'height',
key: 'height',
},
{
title: '血糖是否异常',
dataIndex: 'weight',
key: 'weight',
},
{
title: '腰围(cm)',
dataIndex: 'waist',
key: 'waist',
},
{
title: '填报日期',
dataIndex: 'createTime',
key: 'createTime',
},
];
const towRcolumn3 = [
{
title: '单位',
dataIndex: 'departName',
key: 'departName',
},
{
title: '姓名',
dataIndex: 'name',
key: 'name',
},
{
title: '性别',
dataIndex: 'sex_dictText',
key: 'sex_dictText',
},
{
title: '年龄',
dataIndex: 'age',
key: 'age',
},
{
title: '收缩压(mmHg)',
dataIndex: 'height',
key: 'height',
},
{
title: '收缩压是否异常',
dataIndex: 'weight',
key: 'weight',
},
{
title: '舒张压(mmHg)',
dataIndex: 'bmi',
key: 'bmi',
},
{
title: '舒张压是否异常',
dataIndex: 'bmiException',
key: 'bmiException',
},
{
title: '填报日期',
dataIndex: 'createTime',
key: 'createTime',
},
];
export function twoRform(type) {
return [
{
label: '员工姓名',
field: 'realName',
type: 'input',
placeholder: '请输入',
defaultValue: '',
},
{
label: '异常标记',
field: 'abFlag',
type: 'select',
placeholder: '请选择性别',
options: normalTypeList,
defaultValue: type,
},
];
}
export const towRcolumns = [towRcolumn1, towRcolumn2, towRcolumn3];
+5 -7
View File
@@ -84,13 +84,11 @@
letter-spacing: 0;
margin-bottom: 20px;
cursor: pointer;
.item-d-img {
img {
display: inline-block;
width: 32px;
height: 32px;
cursor: pointer;
}
img {
display: inline-block;
width: 32px;
height: 32px;
cursor: pointer;
}
}
}
+2 -2
View File
@@ -47,6 +47,7 @@
import { ref, onMounted } from 'vue';
import { threeRApi } from '/@/views/indexSun/indexSun.api.ts';
const scrollList = ref();
const emit = defineEmits(['handleClick']);
onMounted(() => {
threeRApi({}).then((res) => {
if (res.code == 200) {
@@ -55,8 +56,7 @@
});
});
function handleClickNum(type) {
console.log(type);
console.log(123);
emit('handleClick', type);
}
</script>
<style lang="less" scoped>
+36 -13
View File
@@ -16,22 +16,28 @@
<div class="content-item-clock">
<div>
<span class="clock-text">今日打卡人数</span>
<span class="clock-num1">{{ twoRList?.weightLossCountDay ? twoRList?.weightLossCountDay : '--' }}</span>
<span class="clock-num1" @click="handleClickNum1(1, 1, 1)"
>{{ twoRList?.weightLossCountDay ? twoRList?.weightLossCountDay : '--' }}</span
>
</div>
<div>
<span class="clock-text">异常人数</span>
<span class="clock-num2">{{ twoRList?.weightLossAbnormalCountDay ? twoRList?.weightLossAbnormalCountDay : '--' }}</span>
<span class="clock-num2" @click="handleClickNum1(1, 1, 2)"
>{{ twoRList?.weightLossAbnormalCountDay ? twoRList?.weightLossAbnormalCountDay : '--' }}</span
>
</div>
</div>
<div class="content-item-clock" style="margin-bottom: 0">
<div>
<span class="clock-text">本月打卡人数</span>
<span class="clock-num1">{{ twoRList?.weightLossCountMonth ? twoRList?.weightLossCountMonth : '--' }}</span>
<span class="clock-num1" @click="handleClickNum1(1, 2, 1)"
>{{ twoRList?.weightLossCountMonth ? twoRList?.weightLossCountMonth : '--' }}</span
>
</div>
<div>
<span class="clock-text">异常人数</span>
<span class="clock-num2"
>{{ twoRList?.weightLossAbnormalCountMonth ? twoRList?.weightLossAbnormalCountMonth : '--' }}</span
<span class="clock-num2" @click="handleClickNum1(1, 2, 2)"
>{{ twoRList?.weightLossCountMonth ? twoRList?.weightLossAbnormalCountMonth : '--' }}</span
>
</div>
</div>
@@ -48,21 +54,27 @@
<div class="content-item-clock">
<div>
<span class="clock-text">今日打卡人数</span>
<span class="clock-num1">{{ twoRList?.bloodSugarCountDay ? twoRList?.bloodSugarCountDay : '--' }}</span>
<span class="clock-num1" @click="handleClickNum1(2, 1, 1)"
>{{ twoRList?.bloodSugarCountDay ? twoRList?.bloodSugarCountDay : '--' }}</span
>
</div>
<div>
<span class="clock-text">异常人数</span>
<span class="clock-num2">{{ twoRList?.bloodSugarAbnormalCountDay ? twoRList?.bloodSugarAbnormalCountDay : '--' }}</span>
<span class="clock-num2" @click="handleClickNum1(2, 1, 2)"
>{{ twoRList?.bloodSugarAbnormalCountDay ? twoRList?.bloodSugarAbnormalCountDay : '--' }}</span
>
</div>
</div>
<div class="content-item-clock" style="margin-bottom: 0">
<div>
<span class="clock-text">本月打卡人数</span>
<span class="clock-num1">{{ twoRList?.bloodSugarCountMonth ? twoRList?.bloodSugarCountMonth : '--' }}</span>
<span class="clock-num1" @click="handleClickNum1(2, 2, 1)"
>{{ twoRList?.bloodSugarCountMonth ? twoRList?.bloodSugarCountMonth : '--' }}</span
>
</div>
<div>
<span class="clock-text">异常人数</span>
<span class="clock-num2"
<span class="clock-num2" @click="handleClickNum1(2, 2, 2)"
>{{ twoRList?.bloodSugarAbnormalCountMonth ? twoRList?.bloodSugarAbnormalCountMonth : '--' }}</span
>
</div>
@@ -80,11 +92,13 @@
<div class="content-item-clock">
<div>
<span class="clock-text">今日打卡人数</span>
<span class="clock-num1">{{ twoRList?.bloodPressureCountDay ? twoRList?.bloodPressureCountDay : '--' }}</span>
<span class="clock-num1" @click="handleClickNum1(3, 1, 1)"
>{{ twoRList?.bloodPressureCountDay ? twoRList?.bloodPressureCountDay : '--' }}</span
>
</div>
<div>
<span class="clock-text">异常人数</span>
<span class="clock-num2"
<span class="clock-num2" @click="handleClickNum1(3, 1, 2)"
>{{ twoRList?.bloodPressureAbnormalCountDay ? twoRList?.bloodPressureAbnormalCountDay : '--' }}</span
>
</div>
@@ -92,11 +106,13 @@
<div class="content-item-clock" style="margin-bottom: 0">
<div>
<span class="clock-text">本月打卡人数</span>
<span class="clock-num1">{{ twoRList?.bloodPressureCountMonth ? twoRList?.bloodPressureCountMonth : '--' }}</span>
<span class="clock-num1" @click="handleClickNum1(3, 2, 1)"
>{{ twoRList?.bloodPressureCountMonth ? twoRList?.bloodPressureCountMonth : '--' }}</span
>
</div>
<div>
<span class="clock-text">异常人数</span>
<span class="clock-num2"
<span class="clock-num2" @click="handleClickNum1(3, 2, 2)"
>{{ twoRList?.bloodPressureAbnormalCountMonth ? twoRList?.bloodPressureAbnormalCountMonth : '--' }}</span
>
</div>
@@ -113,16 +129,23 @@
import { onMounted, ref } from 'vue';
import { twoRApi } from '/@/views/indexSun/indexSun.api.ts';
const twoRList = ref();
const emit = defineEmits(['handleClick']);
onMounted(() => {
getList();
});
function getList() {
twoRApi({}).then((res) => {
if (res.code == 200) {
localStorage.removeItem('twoRList');
twoRList.value = res.result;
localStorage.setItem('twoRList', JSON.stringify(res.result));
}
});
}
function handleClickNum1(type, date, normal) {
emit('handleClick', { type, date, normal });
}
</script>
<style lang="less" scoped>
.two-r-box {