index.vue 1.5 KB
<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>