index.vue
1.5 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
<template>
<div class="app-container">
<iframe :src="iframeUrl" width="90%" height="90%"></iframe>
<!-- 可视化大屏暂未开放 -->
</div>
</template>
<script setup name="Index">
import { getBigViewDataList } from "@/api/report/report.js";
import moment from "moment";
import { onMounted, ref } from "vue";
const iframeUrl = ref(import.meta.env.VITE_BIG_VIEW_URL)
// 创建一个对象保存日期
const date = ref("");
const qinpuMapDiv = ref(null);
const stakedLine = ref(null);
const loading = ref(false);
// 字体颜色为红色
const textColor = ref(["greenyellow", "red"]);
// 获取签到表单
const tableList = ref([]);
// 创建一个对象保存表单数据
const fromParams = ref({
lineCode: "",
jobCode: "",
dateRange: ""
});
// 获取数据
const getData = () => {
loading.value = true;
getBigViewDataList({
jobCode: fromParams.value.jobCode,
date: fromParams.value.date ? fromParams.value.date : ""
}).then((res) => {
tableList.value = res.data
loading.value = false;
});
};
// 创建一个方法
const handleDateChange = () => {
};
// 查询
const onQuery = () => {
getData();
};
onMounted(() => {
// 初始化折线图
// initLineChart();
// 初始化地图
// initQinPuMapData();
fromParams.value.date = moment().format("YYYY-MM-DD");
getData();
})
</script>
<style scoped lang="scss">
// 可视化大屏
.app-container {
width: 100vw;
height: 100vh;
// 整体蓝色背景
// background-image: url("@/assets/indexbg/page-bg.png");
}
</style>