This commit is contained in:
zk
2023-12-26 17:39:59 +08:00
parent 541fbb4b0a
commit dd89375d40
10 changed files with 78 additions and 56 deletions
-1
View File
@@ -126,7 +126,6 @@ export const Map = {
} }
// 创建一个 Icon // 创建一个 Icon
let startIcon = typeToIcon(type); let startIcon = typeToIcon(type);
// debugger;
// 将 icon 传入 marker // 将 icon 传入 marker
let startMarker = new AMap.Marker({ let startMarker = new AMap.Marker({
// 点的坐标 // 点的坐标
@@ -132,6 +132,7 @@ export function ringOption(chartData, total) {
color: '#ffffff', color: '#ffffff',
fontSize: 16, fontSize: 16,
}, },
selectedMode: false,
}, },
series: [ series: [
{ {
+10
View File
@@ -74,6 +74,16 @@
height: calc(100% - 40px); height: calc(100% - 40px);
} }
.inner::after {
content: '';
position: absolute;
left: 0;
top: 0;
width: 20px;
height: 20px;
background-color: #051a2b;
}
.left-pie { .left-pie {
position: relative; position: relative;
padding-bottom: 0 !important; padding-bottom: 0 !important;
+4 -4
View File
@@ -2,6 +2,7 @@
import {visibleChartLabel} from "/@/utils/utils.ts"; import {visibleChartLabel} from "/@/utils/utils.ts";
export function screenPie(chartData, total, color) { export function screenPie(chartData, total, color) {
const data = visibleChartLabel(chartData)
return { return {
color: color, color: color,
tooltip: { tooltip: {
@@ -43,7 +44,7 @@ export function screenPie(chartData, total, color) {
length2: 10, length2: 10,
minTurnAngle: 120, minTurnAngle: 120,
}, },
data: chartData, data: data,
}, },
], ],
}; };
@@ -51,8 +52,7 @@ export function screenPie(chartData, total, color) {
//左侧圆 //左侧圆
export function circleRing(chartData, total, color) { export function circleRing(chartData, total, color) {
// const data = visibleChartLabel(chartData) const data = visibleChartLabel(chartData)
// const data = chartData
return { return {
color: color, color: color,
tooltip: { tooltip: {
@@ -92,7 +92,7 @@ export function circleRing(chartData, total, color) {
labelLine: { labelLine: {
show: false, show: false,
}, },
data: chartData, data: data,
}, },
], ],
}; };
+1 -1
View File
@@ -1,7 +1,7 @@
import { get, post } from '/@/api/request.ts'; import { get, post } from '/@/api/request.ts';
export enum Api { export enum Api {
depart = 'sys/sysDepart/allSecondaryDeparts', depart = '/health-watch/watch/watchDevice/getUnitList',
getWatchDataByOrgCode = '/health-watch/watch/watchData/getWatchDataByOrgCode', getWatchDataByOrgCode = '/health-watch/watch/watchData/getWatchDataByOrgCode',
getMonitorList = '/health-watch/watch/watchMonitorData/getMonitorList', getMonitorList = '/health-watch/watch/watchMonitorData/getMonitorList',
sleepApi = '/health-watch/watch/watchData/getSleep', sleepApi = '/health-watch/watch/watchData/getSleep',
@@ -71,6 +71,7 @@ export function sleepCharts({ time, short, long, awake, type }) {
itemHeight: 14, itemHeight: 14,
top: -5, top: -5,
right: '15%', right: '15%',
selectedMode: false,
}, },
color: ['#14B3F8', '#6D7BEB', '#5451DC'], color: ['#14B3F8', '#6D7BEB', '#5451DC'],
xAxis: { xAxis: {
@@ -1,6 +1,6 @@
<template> <template>
<div class="modal-content"> <div class="modal-content">
<div class="empty-png"></div> <!-- <div class="empty-png"></div>-->
<div class="modal-header"> <div class="modal-header">
<button type="button" aria-label="Close" class="modal-close" @click="closeDialog">X</button> <button type="button" aria-label="Close" class="modal-close" @click="closeDialog">X</button>
<div class="modal-title" id="vcDialogTitle0">健康报警员工信息</div> <div class="modal-title" id="vcDialogTitle0">健康报警员工信息</div>
@@ -38,13 +38,6 @@
border: 0; border: 0;
border-radius: 2px; border-radius: 2px;
.empty-png {
width: 100%;
height: 16px;
background: url('../../../../assets/images/bg.png') no-repeat;
background-position-y: -500px;
}
.modal-close { .modal-close {
width: 40px; width: 40px;
height: 40px; height: 40px;
@@ -1,5 +1,9 @@
<template> <template>
<div style="display: flex; align-items: center; justify-content: center; position: relative" :style="{ minHeight: props.showList ? '30px' : '' }"> <div
class="public-title"
style="display: flex; align-items: center; justify-content: center; position: relative"
:style="{ minHeight: props.showList ? '30px' : '' }"
>
<a-radio-group v-model:value="active" button-style="solid" @change="changeType" v-if="showStatus && props.showList"> <a-radio-group v-model:value="active" button-style="solid" @change="changeType" v-if="showStatus && props.showList">
<a-radio-button v-if="props.showOne" :value="1"></a-radio-button> <a-radio-button v-if="props.showOne" :value="1"></a-radio-button>
<a-radio-button :value="2"></a-radio-button> <a-radio-button :value="2"></a-radio-button>
@@ -12,18 +16,12 @@
</div> </div>
</div> </div>
<div <div
class="public-title"
style="display: flex; justify-content: center; margin-top: 20px; align-items: center; position: relative" style="display: flex; justify-content: center; margin-top: 20px; align-items: center; position: relative"
:style="{ minHeight: props.showList ? '' : '30px' }" :style="{ minHeight: props.showList ? '' : '30px' }"
> >
<div class="fff" style="position: absolute; left: 10px; display: flex; align-items: center; color: #fff" v-if="!props.showList"> <div class="fff" style="position: absolute; left: 10px; display: flex; align-items: center; color: #fff" v-if="!props.showList">
锻炼类型 锻炼类型
<!-- <JDictSelectTag-->
<!-- v-model:value="motionType"-->
<!-- style="min-width: 140px"-->
<!-- placeholder="请选择锻炼类型"-->
<!-- dictCode="watch_exercise_type"-->
<!-- @change="changeSelect"-->
<!-- />-->
<a-select <a-select
v-model:value="motionType" v-model:value="motionType"
class="type-select" class="type-select"
@@ -32,8 +30,10 @@
@change="changeSelect" @change="changeSelect"
></a-select> ></a-select>
</div> </div>
<div class="item-picker" style="display: flex; font-size: 20px" v-if="showStatus && props.showList"> <div style="display: flex; font-size: 20px; align-items: center" v-if="showStatus && props.showList">
<span style="margin: 0 0 0 5px; cursor: pointer" @click="changeDate('0')">&lt;</span> <a-button class="btn" type="primary" size="small" @click="changeDate('0')">
<LeftOutlined class="icon" style="color: #fff" />
</a-button>
<div style="position: relative"> <div style="position: relative">
<a-date-picker <a-date-picker
ref="datePicker" ref="datePicker"
@@ -42,6 +42,7 @@
:format="rType()" :format="rType()"
:picker="getP()" :picker="getP()"
@change="changeValue" @change="changeValue"
:allow-clear="false"
style="opacity: 0; z-index: 99; position: absolute; top: 0; left: 0" style="opacity: 0; z-index: 99; position: absolute; top: 0; left: 0"
> >
<template #dateRender="{ current }"> <template #dateRender="{ current }">
@@ -50,21 +51,22 @@
</div> </div>
</template> </template>
</a-date-picker> </a-date-picker>
<div style="z-index: 1; min-width: 150px; text-align: center" <div style="z-index: 1; min-width: 150px; text-align: center; color: #fff">{{ getDateFormat(dateInfo) }} </div>
><span>{{ getDateFormat(dateInfo) }}</span></div
>
</div> </div>
<span style="margin: 0 0 5px 5px; cursor: pointer" @click="changeDate('1')">&gt;</span> <a-button class="btn" type="primary" :disabled="!isRight" size="small" @click="changeDate('1')">
<RightOutlined class="icon" style="color: #fff" />
</a-button>
</div> </div>
</div> </div>
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import { nextTick, onMounted, ref } from 'vue'; import { computed, nextTick, onMounted, ref } from 'vue';
import { RightOutlined, LeftOutlined } from '@ant-design/icons-vue';
import chartImg from '/@/assets/images/chart.png'; import chartImg from '/@/assets/images/chart.png';
import listImg from '/@/assets/images/list.png'; import listImg from '/@/assets/images/list.png';
import dayjs from 'dayjs'; import dayjs from 'dayjs';
import { propTypes } from '/@/utils/propTypes'; import { propTypes } from '/@/utils/propTypes';
// import JDictSelectTag from '/@/components/Form/src/jeecg/components/JDictSelectTag.vue';
import { userDataDayByYearApi } from '/@/components/secondaryScreen/secondMap/secondMapApi.ts'; import { userDataDayByYearApi } from '/@/components/secondaryScreen/secondMap/secondMapApi.ts';
import { getCodeInfo, montionFieldNames } from '/@/api/dictCode.ts'; import { getCodeInfo, montionFieldNames } from '/@/api/dictCode.ts';
@@ -95,6 +97,8 @@
const active = ref(props.showOne ? 1 : 2); const active = ref(props.showOne ? 1 : 2);
const showStatus = ref(true); const showStatus = ref(true);
const dateInfo = ref(dayjs()); const dateInfo = ref(dayjs());
const isRight = computed(() => dayjs(dateInfo.value).format('YYYY-MM-DD') != dayjs().format('YYYY-MM-DD'));
const motionType = ref(); const motionType = ref();
const dateFormat = 'YYYY-MM-DD'; const dateFormat = 'YYYY-MM-DD';
@@ -262,4 +266,22 @@
border: 1px solid #1890ff; border: 1px solid #1890ff;
border-radius: 50px; border-radius: 50px;
} }
.btn {
.icon {
color: #fff !important;
height: 20px;
line-height: 20px;
}
}
.public-title {
:deep(.ant-btn-primary[disabled], .ant-btn-primary[disabled]:hover, .ant-btn-primary[disabled]:focus, .ant-btn-primary[disabled]:active) {
color: rgba(0, 0, 0, 0.25);
border-color: #92bfe9;
background: #92bfe9;
text-shadow: none;
box-shadow: none;
}
}
</style> </style>
@@ -9,8 +9,7 @@
</div> </div>
<div v-show="false" id="container"></div> <div v-show="false" id="container"></div>
<div v-show="false" id="panel"></div> <div v-show="false" id="panel"></div>
<div v-show="isShow" :class="className" class="footer-data" style="--moveUp: 50px; --moveDown: -90px"> <div v-show="isShow" :class="className" class="footer-data" style="--moveUp: 50px; --moveDown: -60px">
<div class="empty-png"></div>
<div <div
v-for="item in footerList" v-for="item in footerList"
:style="{ cursor: item.key == 'allotDeviceNum' ? 'pointer' : 'default' }" :style="{ cursor: item.key == 'allotDeviceNum' ? 'pointer' : 'default' }"
@@ -25,7 +24,7 @@
v-show="isShowAlarm" v-show="isShowAlarm"
:class="isShowAlarm ? 'slide-top' : 'slide-bottom'" :class="isShowAlarm ? 'slide-top' : 'slide-bottom'"
class="footer-dialog-con" class="footer-dialog-con"
style="--moveUp: 120px; --moveDown: -120px" style="--moveUp: 110px; --moveDown: -100px"
> >
<FooterDialog :detailLeft="detailLeft" :detailRight="detailRight" @closeDialog="closeDialog"></FooterDialog> <FooterDialog :detailLeft="detailLeft" :detailRight="detailRight" @closeDialog="closeDialog"></FooterDialog>
</div> </div>
@@ -73,7 +72,7 @@
async function getFooterTable(orgCode) { async function getFooterTable(orgCode) {
const params = { const params = {
orgCode: orgCode || props.orgCode, orgCode: orgCode || props.orgCode,
dataDate: getToday(), // dataDate: getToday(),
}; };
const { code, result } = await footerApi(params); const { code, result } = await footerApi(params);
if (code == 200) { if (code == 200) {
@@ -87,6 +86,10 @@
if (code == 200 && result.length > 0) { if (code == 200 && result.length > 0) {
const newArr = result.map((item) => ({ ...item, type: '6' })); const newArr = result.map((item) => ({ ...item, type: '6' }));
mapList.value = newArr; mapList.value = newArr;
let orgCode = newArr[0].orgCode?.substring(0, 6);
getFooterTable(orgCode);
setIsShow(true);
Map.createOverlay( Map.createOverlay(
newArr, newArr,
{ {
@@ -107,6 +110,7 @@
); );
} else { } else {
Map.removeOverlayGroup(); Map.removeOverlayGroup();
setIsShow(false);
} }
} catch {} } catch {}
} }
@@ -160,6 +164,7 @@
display: flex; display: flex;
flex-direction: column; flex-direction: column;
position: relative; position: relative;
overflow: hidden;
} }
.form-container { .form-container {
@@ -176,21 +181,12 @@
.footer-data { .footer-data {
position: absolute; position: absolute;
left: 0; left: 4px;
right: 0; right: 4px;
bottom: var(--moveDown); bottom: var(--moveDown);
display: flex; display: flex;
z-index: 999; z-index: 999;
border: 1px solid rgba(35, 132, 221);
.empty-png {
position: absolute;
top: -16px;
left: 0;
width: 100%;
height: 16px;
background: url('../../../assets/images/bg.png') no-repeat;
background-position-y: -500px;
}
.col-item { .col-item {
flex: 1; flex: 1;
@@ -200,7 +196,7 @@
.col-text { .col-text {
height: 40px; height: 40px;
line-height: 40px; line-height: 40px;
background: rgba(35, 132, 221); background: rgba(35, 132, 221, 0.5);
} }
.col-value { .col-value {
@@ -213,8 +209,8 @@
.footer-dialog-con { .footer-dialog-con {
position: absolute; position: absolute;
left: 0; left: 4px;
right: 0; right: 4px;
bottom: var(--moveDown); bottom: var(--moveDown);
z-index: 999; z-index: 999;
} }
@@ -22,7 +22,7 @@ export function useDepart() {
} }
async function getOptionData() { async function getOptionData() {
const { result, code } = await allSecondaryDeparts(); const { result = [], code } = await allSecondaryDeparts();
if (code == 200) { if (code == 200) {
let res = [{ departName: '长庆油田', orgCode: 'A01' }, ...result]; let res = [{ departName: '长庆油田', orgCode: 'A01' }, ...result];
setOption(res); setOption(res);
@@ -80,12 +80,12 @@ export function useFooterTable() {
key: 'userCount', key: 'userCount',
extData: {}, extData: {},
}, },
{ // {
name: '入库设备数量', // name: '入库设备数量',
value: '', // value: '',
key: 'deviceNum', // key: 'deviceNum',
extData: {}, // extData: {},
}, // },
{ {
name: '佩戴手表人数', name: '佩戴手表人数',
value: '', value: '',