update
1.修改新疆反馈问题(12.24) 2.修改健康咨询大屏不定时刷新问题
This commit is contained in:
@@ -13,16 +13,16 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="sun-body-content">
|
<div class="sun-body-content">
|
||||||
<div class="sun-body-content-top">
|
<div class="sun-body-content-top">
|
||||||
<health-content-top />
|
<health-content-top :b-key="bKey" />
|
||||||
</div>
|
</div>
|
||||||
<div class="sun-body-content-middle">
|
<div class="sun-body-content-middle">
|
||||||
<health-content-middle />
|
<health-content-middle :b-key="bKey" />
|
||||||
</div>
|
</div>
|
||||||
<div class="sun-body-content-bottom">
|
<div class="sun-body-content-bottom">
|
||||||
<health-content-bottom-item1 class="item" />
|
<health-content-bottom-item1 :b-key="bKey" class="item" />
|
||||||
<health-content-bottom-item2 class="item" />
|
<health-content-bottom-item2 :b-key="bKey" class="item" />
|
||||||
<health-content-bottom-item3 class="item" />
|
<health-content-bottom-item3 :b-key="bKey" class="item" />
|
||||||
<health-content-bottom-item4 class="item" />
|
<health-content-bottom-item4 :b-key="bKey" class="item" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -60,6 +60,8 @@
|
|||||||
const rightDate = ref<string>('');
|
const rightDate = ref<string>('');
|
||||||
const initDate = ref(startTime);
|
const initDate = ref(startTime);
|
||||||
const timer = ref<number | null>(null);
|
const timer = ref<number | null>(null);
|
||||||
|
const interval = ref();
|
||||||
|
const bKey = ref(0);
|
||||||
const pageRef = ref();
|
const pageRef = ref();
|
||||||
|
|
||||||
const getTime = () => {
|
const getTime = () => {
|
||||||
@@ -79,6 +81,18 @@
|
|||||||
updateRightDate();
|
updateRightDate();
|
||||||
}, 1000);
|
}, 1000);
|
||||||
};
|
};
|
||||||
|
// 定时器,定时刷新接口
|
||||||
|
const startInterval = () => {
|
||||||
|
if (interval.value) {
|
||||||
|
clearInterval(interval.value);
|
||||||
|
}
|
||||||
|
interval.value = setInterval(
|
||||||
|
() => {
|
||||||
|
bKey.value++;
|
||||||
|
},
|
||||||
|
5 * 60 * 1000
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
const updateRightDate = () => {
|
const updateRightDate = () => {
|
||||||
rightDate.value = '累计运行时间:' + (dayjs().diff(dayjs(initDate.value), 'days') + 1) + ' 天';
|
rightDate.value = '累计运行时间:' + (dayjs().diff(dayjs(initDate.value), 'days') + 1) + ' 天';
|
||||||
@@ -88,6 +102,7 @@
|
|||||||
getTime();
|
getTime();
|
||||||
updateRightDate();
|
updateRightDate();
|
||||||
startTimer(); // 启动定时器
|
startTimer(); // 启动定时器
|
||||||
|
startInterval(); // 启动定时器
|
||||||
document.title = '健康咨询平台';
|
document.title = '健康咨询平台';
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -103,6 +118,9 @@
|
|||||||
if (timer.value) {
|
if (timer.value) {
|
||||||
clearInterval(timer.value);
|
clearInterval(timer.value);
|
||||||
}
|
}
|
||||||
|
if (interval.value) {
|
||||||
|
clearInterval(interval.value);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
// 健康监测工具报警
|
// 健康监测工具报警
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { onMounted, onBeforeUnmount, ref } from 'vue';
|
import { onMounted, onBeforeUnmount, ref, watch } from 'vue';
|
||||||
import * as echarts from 'echarts';
|
import * as echarts from 'echarts';
|
||||||
|
|
||||||
import { getDocCountStat } from '/@/views/healthConsultation/api/health';
|
import { getDocCountStat } from '/@/views/healthConsultation/api/health';
|
||||||
@@ -15,6 +15,20 @@
|
|||||||
const chartRef = ref<HTMLDivElement | null>(null);
|
const chartRef = ref<HTMLDivElement | null>(null);
|
||||||
let chartInstance: echarts.ECharts | null = null;
|
let chartInstance: echarts.ECharts | null = null;
|
||||||
|
|
||||||
|
const props = defineProps({
|
||||||
|
bKey: {
|
||||||
|
type: Number,
|
||||||
|
default: () => 0,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
watch(
|
||||||
|
() => props,
|
||||||
|
() => {
|
||||||
|
getData();
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
const transformHospitalData = (hospitals: { docCount: number; hospitalName: string }[]) => {
|
const transformHospitalData = (hospitals: { docCount: number; hospitalName: string }[]) => {
|
||||||
return hospitals.map((hospital) => ({
|
return hospitals.map((hospital) => ({
|
||||||
name: hospital.hospitalName,
|
name: hospital.hospitalName,
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { ref, onMounted, onBeforeUnmount } from 'vue';
|
import { ref, onMounted, onBeforeUnmount, watch } from 'vue';
|
||||||
import * as echarts from 'echarts';
|
import * as echarts from 'echarts';
|
||||||
|
|
||||||
import { getDeptCountStat } from '/@/views/healthConsultation/api/health';
|
import { getDeptCountStat } from '/@/views/healthConsultation/api/health';
|
||||||
@@ -15,6 +15,20 @@
|
|||||||
const chartRef = ref<HTMLDivElement | null>(null);
|
const chartRef = ref<HTMLDivElement | null>(null);
|
||||||
let chart: echarts.ECharts | null = null;
|
let chart: echarts.ECharts | null = null;
|
||||||
|
|
||||||
|
const props = defineProps({
|
||||||
|
bKey: {
|
||||||
|
type: Number,
|
||||||
|
default: () => 0,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
watch(
|
||||||
|
() => props,
|
||||||
|
() => {
|
||||||
|
getData();
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
function getData() {
|
function getData() {
|
||||||
getDeptCountStat()
|
getDeptCountStat()
|
||||||
.then((res: any) => {
|
.then((res: any) => {
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { ref, onMounted, onBeforeUnmount } from 'vue';
|
import { ref, onMounted, onBeforeUnmount, watch } from 'vue';
|
||||||
import * as echarts from 'echarts';
|
import * as echarts from 'echarts';
|
||||||
|
|
||||||
import { getDepartmentCountStat } from '/@/views/healthConsultation/api/health';
|
import { getDepartmentCountStat } from '/@/views/healthConsultation/api/health';
|
||||||
@@ -15,6 +15,20 @@
|
|||||||
const chartRef = ref<HTMLDivElement | null>(null);
|
const chartRef = ref<HTMLDivElement | null>(null);
|
||||||
let chart: echarts.ECharts | null = null;
|
let chart: echarts.ECharts | null = null;
|
||||||
|
|
||||||
|
const props = defineProps({
|
||||||
|
bKey: {
|
||||||
|
type: Number,
|
||||||
|
default: () => 0,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
watch(
|
||||||
|
() => props,
|
||||||
|
() => {
|
||||||
|
getData();
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
function getData() {
|
function getData() {
|
||||||
getDepartmentCountStat()
|
getDepartmentCountStat()
|
||||||
.then((res: any) => {
|
.then((res: any) => {
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { ref, onMounted, onBeforeUnmount } from 'vue';
|
import { ref, onMounted, onBeforeUnmount, watch } from 'vue';
|
||||||
import * as echarts from 'echarts';
|
import * as echarts from 'echarts';
|
||||||
|
|
||||||
import { getHospitalCountStat } from '/@/views/healthConsultation/api/health';
|
import { getHospitalCountStat } from '/@/views/healthConsultation/api/health';
|
||||||
@@ -15,6 +15,20 @@
|
|||||||
const chartRef = ref<HTMLDivElement | null>(null);
|
const chartRef = ref<HTMLDivElement | null>(null);
|
||||||
let chart: echarts.ECharts | null = null;
|
let chart: echarts.ECharts | null = null;
|
||||||
|
|
||||||
|
const props = defineProps({
|
||||||
|
bKey: {
|
||||||
|
type: Number,
|
||||||
|
default: () => 0,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
watch(
|
||||||
|
() => props,
|
||||||
|
() => {
|
||||||
|
getData();
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
// 格式化医院名称,如果太长则在中间添加换行符
|
// 格式化医院名称,如果太长则在中间添加换行符
|
||||||
const formatHospitalName = (hospitalName: string, maxLength: number = 8) => {
|
const formatHospitalName = (hospitalName: string, maxLength: number = 8) => {
|
||||||
if (hospitalName.length > maxLength) {
|
if (hospitalName.length > maxLength) {
|
||||||
|
|||||||
@@ -35,7 +35,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { onMounted, ref } from 'vue';
|
import { onMounted, ref, watch } from 'vue';
|
||||||
import { Swiper, SwiperSlide } from 'swiper/vue';
|
import { Swiper, SwiperSlide } from 'swiper/vue';
|
||||||
import 'swiper/css';
|
import 'swiper/css';
|
||||||
import 'swiper/css/navigation';
|
import 'swiper/css/navigation';
|
||||||
@@ -47,6 +47,20 @@
|
|||||||
import { getDocList } from '/@/views/healthConsultation/api/health';
|
import { getDocList } from '/@/views/healthConsultation/api/health';
|
||||||
import { getAppEnvConfig } from '/@/utils/env.ts';
|
import { getAppEnvConfig } from '/@/utils/env.ts';
|
||||||
|
|
||||||
|
const props = defineProps({
|
||||||
|
bKey: {
|
||||||
|
type: Number,
|
||||||
|
default: () => 0,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
watch(
|
||||||
|
() => props,
|
||||||
|
() => {
|
||||||
|
getData();
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
const { VITE_GLOB_API_URL } = getAppEnvConfig();
|
const { VITE_GLOB_API_URL } = getAppEnvConfig();
|
||||||
function getFileUrl(path?: string) {
|
function getFileUrl(path?: string) {
|
||||||
const GATEWAY_URL = VITE_GLOB_API_URL;
|
const GATEWAY_URL = VITE_GLOB_API_URL;
|
||||||
|
|||||||
@@ -16,10 +16,24 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { onMounted, ref } from 'vue';
|
import { onMounted, ref, watch } from 'vue';
|
||||||
|
|
||||||
import { getStaticCount } from '/@/views/healthConsultation/api/health';
|
import { getStaticCount } from '/@/views/healthConsultation/api/health';
|
||||||
|
|
||||||
|
const props = defineProps({
|
||||||
|
bKey: {
|
||||||
|
type: Number,
|
||||||
|
default: () => 0,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
watch(
|
||||||
|
() => props,
|
||||||
|
() => {
|
||||||
|
getData();
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
interface CountData {
|
interface CountData {
|
||||||
docCount: number;
|
docCount: number;
|
||||||
consultCount: number; // 假设这是“累计咨询”的字段名,请根据实际接口调整
|
consultCount: number; // 假设这是“累计咨询”的字段名,请根据实际接口调整
|
||||||
|
|||||||
@@ -163,9 +163,7 @@
|
|||||||
twoRModal1Api,
|
twoRModal1Api,
|
||||||
twoRModal2Api,
|
twoRModal2Api,
|
||||||
twoRModal3Api,
|
twoRModal3Api,
|
||||||
twoRNApi,
|
|
||||||
twoRNDetailApi,
|
twoRNDetailApi,
|
||||||
watchPageApi,
|
|
||||||
} from '/@/views/indexSun/indexSun.api.ts';
|
} from '/@/views/indexSun/indexSun.api.ts';
|
||||||
import dayjs from 'dayjs';
|
import dayjs from 'dayjs';
|
||||||
import ThreeLeftNew from '/@/views/indexSun/threeLeftNew.vue';
|
import ThreeLeftNew from '/@/views/indexSun/threeLeftNew.vue';
|
||||||
@@ -416,6 +414,8 @@
|
|||||||
data['careLiaisonPhone'] = res?.result?.careLiaisonPhone;
|
data['careLiaisonPhone'] = res?.result?.careLiaisonPhone;
|
||||||
data['lifeguardName'] = res?.result?.lifeguardName;
|
data['lifeguardName'] = res?.result?.lifeguardName;
|
||||||
data['lifeguardPhone'] = res?.result?.lifeguardPhone;
|
data['lifeguardPhone'] = res?.result?.lifeguardPhone;
|
||||||
|
data['lifeguardName2'] = res?.result?.lifeguardName2;
|
||||||
|
data['lifeguardPhone2'] = res?.result?.lifeguardPhone2;
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
console.log(err);
|
console.log(err);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -956,7 +956,7 @@
|
|||||||
|
|
||||||
.t-c-d {
|
.t-c-d {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 55px;
|
bottom: 5px;
|
||||||
right: 5px;
|
right: 5px;
|
||||||
|
|
||||||
button {
|
button {
|
||||||
|
|||||||
@@ -210,7 +210,7 @@
|
|||||||
|
|
||||||
function handleClickSearch() {
|
function handleClickSearch() {
|
||||||
formState.value = {
|
formState.value = {
|
||||||
orgCode: orgCode2.value || orgCode1.value,
|
salvageUserDepart: orgCode2.value || orgCode1.value,
|
||||||
realName: name.value,
|
realName: name.value,
|
||||||
initiatorType: initiatorType.value,
|
initiatorType: initiatorType.value,
|
||||||
type: initForm.value.type,
|
type: initForm.value.type,
|
||||||
|
|||||||
@@ -57,6 +57,11 @@
|
|||||||
/>
|
/>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</Col>
|
</Col>
|
||||||
|
<Col :span="8">
|
||||||
|
<a-form-item label="类型">
|
||||||
|
<a-select v-model:value="searchType" :options="options" />
|
||||||
|
</a-form-item>
|
||||||
|
</Col>
|
||||||
<Col :span="8">
|
<Col :span="8">
|
||||||
<div class="form-btn">
|
<div class="form-btn">
|
||||||
<a-button size="middle" @click="handleClickReset" style="border-color: #00ccff">重置</a-button>
|
<a-button size="middle" @click="handleClickReset" style="border-color: #00ccff">重置</a-button>
|
||||||
@@ -101,9 +106,11 @@
|
|||||||
const name = ref('');
|
const name = ref('');
|
||||||
const orgCode1 = ref('');
|
const orgCode1 = ref('');
|
||||||
const orgCode2 = ref('');
|
const orgCode2 = ref('');
|
||||||
|
const searchType = ref();
|
||||||
const formState = ref({});
|
const formState = ref({});
|
||||||
const dateTime = ref([]);
|
const dateTime = ref([]);
|
||||||
const initForm = ref({});
|
const initForm = ref({});
|
||||||
|
const options = ref([]);
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
getSecondDepart();
|
getSecondDepart();
|
||||||
});
|
});
|
||||||
@@ -166,7 +173,7 @@
|
|||||||
orgCode: orgCode2.value || orgCode1.value,
|
orgCode: orgCode2.value || orgCode1.value,
|
||||||
realName: name.value,
|
realName: name.value,
|
||||||
type: initForm.value.type,
|
type: initForm.value.type,
|
||||||
search: initForm.value.search,
|
search: searchType.value,
|
||||||
startTime: dateTime.value && dateTime.value.length > 0 ? dateTime.value[0] : '',
|
startTime: dateTime.value && dateTime.value.length > 0 ? dateTime.value[0] : '',
|
||||||
endTime: dateTime.value && dateTime.value.length > 0 ? dateTime.value[1] : '',
|
endTime: dateTime.value && dateTime.value.length > 0 ? dateTime.value[1] : '',
|
||||||
};
|
};
|
||||||
@@ -177,6 +184,7 @@
|
|||||||
orgCode2.value = '';
|
orgCode2.value = '';
|
||||||
name.value = '';
|
name.value = '';
|
||||||
dateTime.value = [];
|
dateTime.value = [];
|
||||||
|
searchType.value = initForm.value.search + '';
|
||||||
formState.value = initForm.value;
|
formState.value = initForm.value;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -193,8 +201,11 @@
|
|||||||
dialogTitle.value = params.title;
|
dialogTitle.value = params.title;
|
||||||
formState.value = { ...params };
|
formState.value = { ...params };
|
||||||
dateTime.value = [params.startTime, params.endTime];
|
dateTime.value = [params.startTime, params.endTime];
|
||||||
|
options.value = params.options;
|
||||||
delete params['startTime'];
|
delete params['startTime'];
|
||||||
delete params['endTime'];
|
delete params['endTime'];
|
||||||
|
delete params['options'];
|
||||||
|
searchType.value = params.search + '';
|
||||||
initForm.value = params;
|
initForm.value = params;
|
||||||
openDialog();
|
openDialog();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -143,23 +143,15 @@ export function infoContent(res: any) {
|
|||||||
<span class="item-one">单位:</span>
|
<span class="item-one">单位:</span>
|
||||||
<span class="item-two">${res.orgName ? res.orgName : '--'}</span>
|
<span class="item-two">${res.orgName ? res.orgName : '--'}</span>
|
||||||
</div>
|
</div>
|
||||||
// <div class="modal-item" style="margin: 5px 0">
|
<div class="modal-item">
|
||||||
// <span class="item-one">管理员:</span>
|
|
||||||
// <span class="item-two">${res.manageName ? res.manageName : '--'}</span>
|
|
||||||
// </div>
|
|
||||||
<div class="modal-item" style="margin: 5px 0">
|
|
||||||
<span class="item-one">管理员电话:</span>
|
<span class="item-one">管理员电话:</span>
|
||||||
<span class="item-two">${res.loveNum ? res.loveNum : '--'}</span>
|
<span class="item-two">${res.mobile ? res.mobile : '--'}</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-item" style="margin: 5px 0">
|
<div class="modal-item">
|
||||||
<span class="item-one">关爱人数:</span>
|
<span class="item-one">关爱人数:</span>
|
||||||
<span class="item-two">${res.managePhone ? res.managePhone : '--'}</span>
|
<span class="item-two">${res.managePhone ? res.managePhone : '--'}</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-item" style="margin: 0 0 5px 0;">
|
<div class="modal-item">
|
||||||
<span class="item-one">电话:</span>
|
|
||||||
<span class="item-two">${res.mobile ? res.mobile : '--'}</span>
|
|
||||||
</div>
|
|
||||||
<div class="modal-item" style="margin: 0 0 5px 0;">
|
|
||||||
<span class="item-one">地点:</span>
|
<span class="item-one">地点:</span>
|
||||||
<span class="item-two">${res.address ? res.address : '--'}</span>
|
<span class="item-two">${res.address ? res.address : '--'}</span>
|
||||||
</div>
|
</div>
|
||||||
@@ -1041,7 +1033,7 @@ export const pieColumns = [
|
|||||||
key: 'thirdDeptName',
|
key: 'thirdDeptName',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '异常数据',
|
title: '数据值',
|
||||||
dataIndex: 'dataValue',
|
dataIndex: 'dataValue',
|
||||||
key: 'dataValue',
|
key: 'dataValue',
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -70,14 +70,9 @@
|
|||||||
<div>
|
<div>
|
||||||
<div class="emer-info-title">急救人员1</div>
|
<div class="emer-info-title">急救人员1</div>
|
||||||
<template v-if="props.userData?.lifeguardName">
|
<template v-if="props.userData?.lifeguardName">
|
||||||
<div style="display: flex; justify-content: center">
|
<div>
|
||||||
<template v-if="props.userData?.lifeguardName">
|
|
||||||
<div style="color: #ffffff; margin-right: 5px">{{ props.userData?.lifeguardName }}</div>
|
<div style="color: #ffffff; margin-right: 5px">{{ props.userData?.lifeguardName }}</div>
|
||||||
<div style="color: #ffffff">{{ props.userData?.lifeguardPhone }}</div>
|
<div style="color: #ffffff">{{ props.userData?.lifeguardPhone }}</div>
|
||||||
</template>
|
|
||||||
<template v-else>
|
|
||||||
<div style="color: #ffffff">--</div>
|
|
||||||
</template>
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<template v-else>
|
<template v-else>
|
||||||
@@ -87,14 +82,9 @@
|
|||||||
<div>
|
<div>
|
||||||
<div class="emer-info-title">急救人员2</div>
|
<div class="emer-info-title">急救人员2</div>
|
||||||
<template v-if="props.userData?.lifeguardName2">
|
<template v-if="props.userData?.lifeguardName2">
|
||||||
<div style="display: flex; justify-content: center">
|
<div>
|
||||||
<template v-if="props.userData?.lifeguardName2">
|
|
||||||
<div style="color: #ffffff; margin-right: 5px">{{ props.userData?.lifeguardName2 }}</div>
|
<div style="color: #ffffff; margin-right: 5px">{{ props.userData?.lifeguardName2 }}</div>
|
||||||
<div style="color: #ffffff">{{ props.userData?.lifeguardPhone2 }}</div>
|
<div style="color: #ffffff">{{ props.userData?.lifeguardPhone2 }}</div>
|
||||||
</template>
|
|
||||||
<template v-else>
|
|
||||||
<div style="color: #ffffff">--</div>
|
|
||||||
</template>
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<template v-else>
|
<template v-else>
|
||||||
|
|||||||
@@ -31,8 +31,37 @@
|
|||||||
<div> <img :src="imgList[chooseType]" alt="" />{{ tabList[chooseType].label }}</div>
|
<div> <img :src="imgList[chooseType]" alt="" />{{ tabList[chooseType].label }}</div>
|
||||||
<div v-if="[0].includes(chooseType)"> {{ tabList[chooseType].tips }} </div>
|
<div v-if="[0].includes(chooseType)"> {{ tabList[chooseType].tips }} </div>
|
||||||
<div v-if="[1].includes(chooseType)"> 参考范围: {{ tabList[chooseType].tips }} </div>
|
<div v-if="[1].includes(chooseType)"> 参考范围: {{ tabList[chooseType].tips }} </div>
|
||||||
|
<div v-if="[2].includes(chooseType)" style="line-height: normal; font-size: 10px">
|
||||||
|
<div style="display: flex">
|
||||||
|
<div style="display: flex; align-items: center; flex: 1; margin-right: 10px">
|
||||||
|
<div class="dot" style="background: #1dcc79"></div> 放松:1-29
|
||||||
</div>
|
</div>
|
||||||
<div style="height: 210px; display: flex; align-items: center; justify-content: center; width: 100%">
|
<div style="display: flex; align-items: center; flex: 1">
|
||||||
|
<div class="dot" style="background: #0098fa"></div> 正常:30-59
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div style="display: flex">
|
||||||
|
<div style="display: flex; align-items: center; flex: 1; margin-right: 10px">
|
||||||
|
<div class="dot" style="background: #0cd9b5"></div> 中等:60-79
|
||||||
|
</div>
|
||||||
|
<div style="display: flex; align-items: center; flex: 1">
|
||||||
|
<div class="dot" style="background: #6c63f0"></div> 偏高:80-99
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div v-if="[3].includes(chooseType)">
|
||||||
|
<div style="display: flex">
|
||||||
|
<div style="display: flex; align-items: center; margin-right: 15px">
|
||||||
|
<div class="dot1" style="background: #0098fa"></div> <37.2
|
||||||
|
</div>
|
||||||
|
<div style="display: flex; align-items: center; margin-right: 15px">
|
||||||
|
<div class="dot1" style="background: #0cd9b5"></div> 37.2-38
|
||||||
|
</div>
|
||||||
|
<div style="display: flex; align-items: center"> <div class="dot1" style="background: #3b72ad"></div> >38 </div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div style="height: 210px; display: flex; align-items: center; justify-content: center; width: 100%; padding-left: 10px">
|
||||||
<div style="height: 100%" class="content-chart">
|
<div style="height: 100%" class="content-chart">
|
||||||
<template v-if="[0, 1, 2, 3].includes(chooseType)">
|
<template v-if="[0, 1, 2, 3].includes(chooseType)">
|
||||||
<three-left-new-item
|
<three-left-new-item
|
||||||
@@ -173,32 +202,105 @@
|
|||||||
p['startTime'] = dayjs().subtract(1, 'year').format('YYYY-MM-DD');
|
p['startTime'] = dayjs().subtract(1, 'year').format('YYYY-MM-DD');
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
console.log(params);
|
|
||||||
switch (chooseType.value) {
|
switch (chooseType.value) {
|
||||||
case 0:
|
case 0:
|
||||||
p['type'] = 1;
|
p['type'] = 1;
|
||||||
p['search'] = heart(params);
|
p['search'] = heart(params);
|
||||||
p['title'] = `心率${params.name}`;
|
p['title'] = `心率`;
|
||||||
|
p['options'] = [
|
||||||
|
{
|
||||||
|
value: '0',
|
||||||
|
label: '异常',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
value: '1',
|
||||||
|
label: '正常',
|
||||||
|
},
|
||||||
|
];
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
p['type'] = 2;
|
p['type'] = 2;
|
||||||
p['search'] = oxygen(params);
|
p['search'] = oxygen(params);
|
||||||
p['title'] = `血氧${params.name}`;
|
p['title'] = `血氧`;
|
||||||
|
p['options'] = [
|
||||||
|
{
|
||||||
|
value: '0',
|
||||||
|
label: '异常',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
value: '1',
|
||||||
|
label: '正常',
|
||||||
|
},
|
||||||
|
];
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
p['type'] = 3;
|
p['type'] = 3;
|
||||||
p['search'] = pressure(params);
|
p['search'] = pressure(params);
|
||||||
p['title'] = `压力${params.name}`;
|
p['title'] = `压力`;
|
||||||
|
p['options'] = [
|
||||||
|
{
|
||||||
|
value: '0',
|
||||||
|
label: '偏高',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
value: '1',
|
||||||
|
label: '中等',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
value: '2',
|
||||||
|
label: '正常',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
value: '3',
|
||||||
|
label: '放松',
|
||||||
|
},
|
||||||
|
];
|
||||||
break;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
p['type'] = 5;
|
p['type'] = 5;
|
||||||
p['search'] = temperature(params);
|
p['search'] = temperature(params);
|
||||||
p['title'] = `体温${params.name}`;
|
p['title'] = `体温`;
|
||||||
|
p['options'] = [
|
||||||
|
{
|
||||||
|
value: '0',
|
||||||
|
label: '>38',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
value: '1',
|
||||||
|
label: '37.2-38',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
value: '2',
|
||||||
|
label: '<37.2',
|
||||||
|
},
|
||||||
|
];
|
||||||
break;
|
break;
|
||||||
case 5:
|
case 5:
|
||||||
p['type'] = 7;
|
p['type'] = 7;
|
||||||
p['search'] = step(params);
|
p['search'] = step(params);
|
||||||
p['title'] = `步数${params.name}`;
|
p['title'] = `步数`;
|
||||||
|
p['options'] = [
|
||||||
|
{
|
||||||
|
value: '0',
|
||||||
|
label: '<5000',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
value: '1',
|
||||||
|
label: '5000-10000',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
value: '2',
|
||||||
|
label: '10000-15000',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
value: '2',
|
||||||
|
label: '15000-20000',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
value: '2',
|
||||||
|
label: '>20000',
|
||||||
|
},
|
||||||
|
];
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -233,10 +335,10 @@
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
if (params.dataIndex === 1) {
|
if (params.dataIndex === 1) {
|
||||||
return 3;
|
return 2;
|
||||||
}
|
}
|
||||||
if (params.dataIndex === 0) {
|
if (params.dataIndex === 0) {
|
||||||
return 2;
|
return 3;
|
||||||
}
|
}
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
@@ -562,4 +664,18 @@
|
|||||||
.chart-title {
|
.chart-title {
|
||||||
font-size: 16px !important;
|
font-size: 16px !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.dot {
|
||||||
|
width: 5px;
|
||||||
|
height: 5px;
|
||||||
|
border-radius: 5px;
|
||||||
|
margin-right: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.dot1 {
|
||||||
|
width: 10px;
|
||||||
|
height: 10px;
|
||||||
|
border-radius: 10px;
|
||||||
|
margin-right: 5px;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -66,24 +66,9 @@
|
|||||||
nextTick(() => {
|
nextTick(() => {
|
||||||
let myChart = echarts.init(healthChart.value);
|
let myChart = echarts.init(healthChart.value);
|
||||||
myChart.off('click');
|
myChart.off('click');
|
||||||
let options = circleRing(chartData, total, color, props.chooseIndex);
|
let options = circleRing(chartData, total, color, props.chooseIndex, props.userCount);
|
||||||
const obj =
|
|
||||||
props.chooseIndex > 1
|
|
||||||
? {
|
|
||||||
legend: {
|
|
||||||
right: '5%',
|
|
||||||
top: 'center',
|
|
||||||
orient: 'vertical', // 设置垂直排列
|
|
||||||
icon: 'circle',
|
|
||||||
textStyle: {
|
|
||||||
color: '#ffffff',
|
|
||||||
},
|
|
||||||
selectedMode: false,
|
|
||||||
},
|
|
||||||
}
|
|
||||||
: {};
|
|
||||||
myChart.clear();
|
myChart.clear();
|
||||||
myChart.setOption({ ...options, ...obj });
|
myChart.setOption(options);
|
||||||
|
|
||||||
myChart.on('click', function (params) {
|
myChart.on('click', function (params) {
|
||||||
if (params.componentType === 'series') {
|
if (params.componentType === 'series') {
|
||||||
@@ -128,8 +113,8 @@
|
|||||||
height: 100%;
|
height: 100%;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
justify-content: center;
|
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
color: #fff;
|
color: #fff;
|
||||||
font-size: 22px;
|
font-size: 22px;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
|
|||||||
@@ -93,10 +93,11 @@ export function circleRing(chartData: any, total: any, color: any, index = 0) {
|
|||||||
position: 'outside',
|
position: 'outside',
|
||||||
// formatter: '{a}{d}%\n{c}人次',
|
// formatter: '{a}{d}%\n{c}人次',
|
||||||
formatter: function (params: any) {
|
formatter: function (params: any) {
|
||||||
|
const name = index === 2 ? params.name.substring(0, params.name.indexOf(':')) : params.name;
|
||||||
if (index === 3) {
|
if (index === 3) {
|
||||||
return `{name|${params.name}}\n{percent|占比:${params.percent}%}\n{value|${params.value}次}`;
|
return `{name|${params.name}}\n{percent|占比:${params.percent}%}\n{value|${params.value}次}`;
|
||||||
} else {
|
} else {
|
||||||
return `{name|${params.name}:${params.percent}%}\n{value|${params.value}次}`;
|
return `{name|${name}:${params.percent}%}\n{value|${params.value}次}`;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
rich: {
|
rich: {
|
||||||
|
|||||||
@@ -48,10 +48,10 @@
|
|||||||
{
|
{
|
||||||
title: '压力',
|
title: '压力',
|
||||||
data: [
|
data: [
|
||||||
{ name: '正常', value: 0, key: 'normalCount' },
|
{ name: '放松:1-29', value: 0, key: 'unwindCount' },
|
||||||
{ name: '放松', value: 0, key: 'unwindCount' },
|
{ name: '正常:30-59', value: 0, key: 'normalCount' },
|
||||||
{ name: '中等', value: 0, key: 'warnCount' },
|
{ name: '中等:60-79', value: 0, key: 'warnCount' },
|
||||||
{ name: '偏高', value: 0, key: 'riskCount' },
|
{ name: '偏高:80-99', value: 0, key: 'riskCount' },
|
||||||
],
|
],
|
||||||
type: '3',
|
type: '3',
|
||||||
color: ['#1DCC79', '#0098FA', '#0CD9B5', '#6C63F0'],
|
color: ['#1DCC79', '#0098FA', '#0CD9B5', '#6C63F0'],
|
||||||
@@ -167,7 +167,7 @@
|
|||||||
item.userCount = resData.userCount;
|
item.userCount = resData.userCount;
|
||||||
if (item.type === '1') {
|
if (item.type === '1') {
|
||||||
item.tips =
|
item.tips =
|
||||||
resData?.minData === null || resData?.maxData === null ? '' : `最小值${resData?.minData}~最大值${resData?.maxData}次/分钟`;
|
resData?.minData === null || resData?.maxData === null ? '' : `最小值-最大值:${resData?.minData}~${resData?.maxData}次/分钟`;
|
||||||
}
|
}
|
||||||
item.data = item.data.map((val: any) => {
|
item.data = item.data.map((val: any) => {
|
||||||
val.value = resData[val.key];
|
val.value = resData[val.key];
|
||||||
|
|||||||
Reference in New Issue
Block a user