update: 大屏接口

This commit is contained in:
xf
2025-07-08 17:47:36 +08:00
parent 726bd19ad3
commit 7565056a7e
+18 -3
View File
@@ -37,8 +37,8 @@
<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 style="margin: 0 20px"> {{ dataActity == 1 ? '今日' : '本月' }}打卡总人数{{ normalNum ? normalNum : '--' }} </div>
<div> 异常人数{{ abnormalNum ? abnormalNum : '--' }} </div>
</div>
<BasicTable
@table-load="tableLoad"
@@ -61,6 +61,7 @@
import { message } from 'ant-design-vue';
import BasicTable from '/@/components/secondaryScreen/secondMap/components/basicTable/BasicTable.vue';
import { allSecondaryDepartsApi, getThreeDepartByOrgCodeApi } from '/@/views/indexSun/indexSun.api.ts';
import dayjs from 'dayjs';
const props = defineProps({
title: {
@@ -129,8 +130,21 @@
}
function handleDataChange(type) {
console.log(formState.value, formRecord.value);
if (type == dataActity.value) return;
dataActity.value = type;
getField();
if (type == 1) {
formState.value.inputDateBegin = dayjs().format('YYYY-MM-DD');
formState.value.inputDateEnd = dayjs().format('YYYY-MM-DD');
} else {
formState.value.inputDateBegin = dayjs().startOf('month').format('YYYY-MM-DD');
formState.value.inputDateEnd = dayjs().format('YYYY-MM-DD');
}
formState.value = {
...formState.value,
...formRecord.value,
};
}
function changeSecond() {
@@ -296,7 +310,7 @@
display: flex;
.ant-form-item {
flex: 1;
max-width: 200px;
max-width: 280px;
margin-bottom: 0 !important;
}
}
@@ -327,6 +341,7 @@
margin-top: 10px;
padding: 0 10px;
display: flex;
color: #fff;
align-items: center;
.date-change {
> span {