update
1.手表监测添加参数,查询当天信息
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user