1.手表监测添加参数,查询当天信息
This commit is contained in:
2025-03-05 15:20:20 +08:00
parent a4bddba648
commit 0b48810f5c
6 changed files with 75 additions and 21 deletions
+20 -1
View File
@@ -91,6 +91,7 @@
import { useTheme } from '/@/hooks/theme/useTheme.ts';
import { message } from 'ant-design-vue';
import { Row, Col } from 'ant-design-vue';
import dayjs from 'dayjs';
const props = defineProps({
setting: Object,
@@ -140,9 +141,27 @@
* */
const scrollList = ref([]);
const interval = ref<any>(null);
const nowDate = ref(dayjs());
onMounted(() => {
interval.value = setInterval(() => {
if (dayjs(nowDate.value).diff(dayjs(), 'date') < 0) {
nowDate.value = dayjs();
getScrollList();
}
}, 1000);
});
async function getScrollList() {
console.log(dayjs());
try {
const { code, result } = await getMonitorList({ pageSize: 10, pageNo: 1, orgCode: props.setting?.orgCode });
const { code, result } = await getMonitorList({
pageSize: 10,
pageNo: 1,
orgCode: props.setting?.orgCode,
startDate: dayjs().format('YYYY-MM-DD'),
endDate: dayjs().format('YYYY-MM-DD'),
});
if (code == 200) {
setSession(RIGHT_KEY1, JSON.stringify(result.records));
scrollList.value = result.records;