update
1.手表监测添加参数,查询当天信息
This commit is contained in:
@@ -79,7 +79,7 @@
|
||||
</div>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import { onMounted, ref } from 'vue';
|
||||
import { onMounted, onUnmounted, ref, watch } from 'vue';
|
||||
import { useRouter } from 'vue-router';
|
||||
import PublicTitle from '/@/components/publicTitle.vue';
|
||||
import Dialog from '/@/components/dialog/Dialog.vue';
|
||||
@@ -91,6 +91,7 @@
|
||||
import { useTheme } from '/@/hooks/theme/useTheme.ts';
|
||||
import { Col, message, Row } from 'ant-design-vue';
|
||||
import { useUserStore } from '/@/store/modules/user.ts';
|
||||
import dayjs from 'dayjs';
|
||||
|
||||
const props = defineProps({
|
||||
setting: Object,
|
||||
@@ -134,13 +135,27 @@
|
||||
openInfor.value = false;
|
||||
classOption.value.step = 0.3;
|
||||
}
|
||||
|
||||
/**
|
||||
* @desc 终端报警
|
||||
* */
|
||||
const scrollList = ref([]);
|
||||
const userStore = useUserStore();
|
||||
|
||||
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);
|
||||
});
|
||||
|
||||
onUnmounted(() => {
|
||||
clearInterval(interval.value);
|
||||
});
|
||||
|
||||
async function getScrollList() {
|
||||
try {
|
||||
let orgCodeList = userStore.getCenterInfo?.serviceScope;
|
||||
@@ -150,7 +165,13 @@
|
||||
} else {
|
||||
codeList = props.setting?.orgCode;
|
||||
}
|
||||
const { code, result } = await getMonitorList({ pageSize: 10, pageNo: 1, orgCodeList: codeList });
|
||||
const { code, result } = await getMonitorList({
|
||||
pageSize: 10,
|
||||
pageNo: 1,
|
||||
orgCodeList: codeList,
|
||||
startDate: dayjs().format('YYYY-MM-DD'),
|
||||
endDate: dayjs().format('YYYY-MM-DD'),
|
||||
});
|
||||
if (code == 200) {
|
||||
setSession(RIGHT_KEY1_NEW, JSON.stringify(result.records));
|
||||
scrollList.value = result.records;
|
||||
|
||||
Reference in New Issue
Block a user