|
|
|
@ -7,7 +7,7 @@
|
|
|
|
|
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
|
|
|
|
|
-->
|
|
|
|
|
<script setup lang="ts">
|
|
|
|
|
import { reactive, ref } from "vue";
|
|
|
|
|
import { reactive, ref, onMounted, nextTick } from "vue";
|
|
|
|
|
import AlarmLine from "./components/AlarmLine.vue";
|
|
|
|
|
import DefectLine from "./components/DefectLine.vue";
|
|
|
|
|
import DefectBar3D from "./components/DefectBar3D.vue";
|
|
|
|
@ -16,6 +16,7 @@ import AlarmInfoList from "../../components/alarmInfoList.vue";
|
|
|
|
|
import DeviceStatus from "../../components/deviceStatus.vue";
|
|
|
|
|
import ComputingPowerPie from "./components/ComputingPowerPie.vue";
|
|
|
|
|
import type { TabsPaneContext } from "element-plus";
|
|
|
|
|
import dayjs from "dayjs";
|
|
|
|
|
|
|
|
|
|
import { DsBox2 } from "@/components/DsBox";
|
|
|
|
|
|
|
|
|
@ -81,6 +82,33 @@ const activeName = ref("first");
|
|
|
|
|
const handleClick = (tab: TabsPaneContext, event: Event) => {
|
|
|
|
|
console.log(tab);
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
// 获取最近五天日期
|
|
|
|
|
const recentDates = ref(
|
|
|
|
|
Array.from({ length: 5 }, (_, index) =>
|
|
|
|
|
dayjs().subtract(index, "day").format("M.DD")
|
|
|
|
|
).reverse()
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
// 缺陷总数折线图
|
|
|
|
|
const intervalId = ref(null);
|
|
|
|
|
const defectData = ref([46, 460, 100, 300, 20]);
|
|
|
|
|
const randomIntFn = (min: number, max: number) => {
|
|
|
|
|
return Math.floor(Math.random() * (max - min + 1) + min);
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
onMounted(() => {
|
|
|
|
|
// setInterval(() => {
|
|
|
|
|
// defectData.value = [
|
|
|
|
|
// randomIntFn(0, 500),
|
|
|
|
|
// randomIntFn(0, 500),
|
|
|
|
|
// randomIntFn(0, 500),
|
|
|
|
|
// randomIntFn(0, 500),
|
|
|
|
|
// randomIntFn(0, 500)
|
|
|
|
|
// ];
|
|
|
|
|
// // console.log(defectData.value);
|
|
|
|
|
// }, 2000);
|
|
|
|
|
});
|
|
|
|
|
</script>
|
|
|
|
|
<template>
|
|
|
|
|
<div class="flex justify-between w-full ds_home_wrap">
|
|
|
|
@ -89,7 +117,7 @@ const handleClick = (tab: TabsPaneContext, event: Event) => {
|
|
|
|
|
<DsBox2 title="分类告警" type="w1h1" bgClass="bg_home_item1">
|
|
|
|
|
<template #default>
|
|
|
|
|
<div class="w-full h-full">
|
|
|
|
|
<AlarmLine />
|
|
|
|
|
<AlarmLine :dateData="recentDates" />
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
</DsBox2>
|
|
|
|
@ -98,7 +126,7 @@ const handleClick = (tab: TabsPaneContext, event: Event) => {
|
|
|
|
|
<DsBox2 title="总缺陷数" type="w5h1" bgClass="bg_home_item2">
|
|
|
|
|
<template #default>
|
|
|
|
|
<div class="w-full h-[244px]">
|
|
|
|
|
<DefectLine />
|
|
|
|
|
<DefectLine :dateData="recentDates" :defectData="defectData" />
|
|
|
|
|
</div>
|
|
|
|
|
<div class="w-full h-[270px]">
|
|
|
|
|
<div class="w-full h-[40px]">
|
|
|
|
@ -107,12 +135,11 @@ const handleClick = (tab: TabsPaneContext, event: Event) => {
|
|
|
|
|
class="demo-tabs"
|
|
|
|
|
@tab-click="handleClick"
|
|
|
|
|
>
|
|
|
|
|
<el-tab-pane label="A项目缺陷数" name="first" />
|
|
|
|
|
<el-tab-pane label="B项目缺陷数" name="second" />
|
|
|
|
|
<el-tab-pane label="C项目缺陷数" name="third" />
|
|
|
|
|
<el-tab-pane label="D项目缺陷数" name="fourth" />
|
|
|
|
|
<el-tab-pane label="E项目缺陷数" name="first1" />
|
|
|
|
|
<el-tab-pane label="F项目缺陷数" name="second1" />
|
|
|
|
|
<el-tab-pane label="螺纹缺陷检测" name="first" />
|
|
|
|
|
<el-tab-pane label="PIN间距测量" name="second" />
|
|
|
|
|
<el-tab-pane label="压板缺陷检测" name="third" />
|
|
|
|
|
<el-tab-pane label="划伤缺陷检测" name="fourth" />
|
|
|
|
|
<el-tab-pane label="工件尺寸测量" name="fifth" />
|
|
|
|
|
</el-tabs>
|
|
|
|
|
</div>
|
|
|
|
|
<DefectBar3D />
|
|
|
|
@ -150,7 +177,9 @@ const handleClick = (tab: TabsPaneContext, event: Event) => {
|
|
|
|
|
<div class="mid_box">
|
|
|
|
|
<div class="mid_box_icon" />
|
|
|
|
|
<div class="mid_box_info">
|
|
|
|
|
<span class="mid_box_info_top">893</span>
|
|
|
|
|
<span class="mid_box_info_top"
|
|
|
|
|
>893 <i class="font-normal text-base not-italic">TOPS</i></span
|
|
|
|
|
>
|
|
|
|
|
<span class="mid_box_info_bottom">资源使用</span>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|