检测首页、主页、数据展示界面样式修改

This commit is contained in:
GYYM
2024-11-13 18:58:53 +08:00
parent 328696eb55
commit 86e7705985
9 changed files with 178 additions and 68 deletions

View File

@@ -1,11 +1,11 @@
<template>
<div class="plan_tree">
<div class="search_view">
<!-- <div class="search_view">
<el-input
placeholder="请输入计划名称"
v-model="searchForm.planName"
></el-input>
</div>
</div> -->
<div class="tree_container">
<el-tree
:data="data"
@@ -19,12 +19,14 @@
@node-click="handleNodeClick"
@check-change="changeSelect"
>
<!-- scriptIdx -->
<template #default="{ node, data }">
<span
class="custom-tree-node"
style="display: flex; align-items: center"
>
<!-- <Platform v-if="!data.pid" style="width:18px;height: 18px;margin-right:8px;" :style="{color:node.label=='未检测'?'#F56C6C':node.label=='检测中'?'#E6A23C':'#67C23A'}"/> -->
<CircleCheck v-if="data.isChildNode && data.scriptIdx < currentIndex" style="width:18px;height: 18px;margin-right:8px;color:#67C23A;"/>
<Loading v-if="data.isChildNode && data.scriptIdx === currentIndex" style="width:18px;height: 18px;margin-right:8px;color:#E6A23C;"/>
<span>{{ node.label }}</span>
</span>
</template>
@@ -34,7 +36,7 @@
</template>
<script lang="ts" setup>
import { ref, onMounted, defineExpose, watch } from "vue";
import { Menu, Platform } from "@element-plus/icons-vue";
import { Menu, Platform, CircleCheck,Loading } from "@element-plus/icons-vue";
const emit = defineEmits(["jump"]);
const data: any = ref([]);
const defaultProps = {
@@ -55,6 +57,17 @@ const getTreeData = (val: any) => {
};
const filterText = ref("");
const treeRef = ref();
const currentIndex = ref(0);
const timer = setInterval(() => {
currentIndex.value++;
if (currentIndex.value > 14)
currentIndex.value = 0;
console.log(currentIndex.value);
}, 2000);
watch(
() => searchForm.value.planName,
(val) => {