功能选择按钮修改
This commit is contained in:
@@ -6,53 +6,10 @@
|
||||
</div>
|
||||
<!-- <span class="new_span">测试scss颜色</span> -->
|
||||
<div class="right_container">
|
||||
<div class="container_charts">
|
||||
<div class="charts_info">
|
||||
<pie
|
||||
:customData="{
|
||||
title: '检测状态',
|
||||
textAlign: 'right',
|
||||
}"
|
||||
:legendData="{
|
||||
icon: 'circle',
|
||||
left: 'left',
|
||||
}"
|
||||
:chartsData="chartsData1"
|
||||
ref="pieRef1"
|
||||
></pie>
|
||||
</div>
|
||||
<div class="charts_info">
|
||||
<pie
|
||||
:customData="{
|
||||
title: '检测结果',
|
||||
textAlign: 'right',
|
||||
}"
|
||||
:legendData="{
|
||||
icon: 'circle',
|
||||
left: 'left',
|
||||
}"
|
||||
:chartsData="chartsData2"
|
||||
ref="pieRef2"
|
||||
></pie>
|
||||
</div>
|
||||
<div class="charts_info">
|
||||
<pie
|
||||
:customData="{
|
||||
title: '报告状态',
|
||||
textAlign: 'right',
|
||||
}"
|
||||
:legendData="{
|
||||
icon: 'circle',
|
||||
left: 'left',
|
||||
}"
|
||||
:chartsData="chartsData3"
|
||||
ref="pieRef3"
|
||||
></pie>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 筛选条件 -->
|
||||
<div class="container_title">
|
||||
<el-form :model="form" label-width="80px" :inline="true">
|
||||
<el-form-item label="功能选择">
|
||||
<!-- <el-form-item label="功能选择">
|
||||
<el-select v-model="form.activeTabs" @change="changeSelect">
|
||||
<el-option
|
||||
v-for="(item, index) in tabsList"
|
||||
@@ -61,7 +18,7 @@
|
||||
:key="index"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-form-item> -->
|
||||
<el-form-item label="检测状态" v-if="form.activeTabs != 5">
|
||||
<el-select v-model="form.checkStatus" @change="changeSelect">
|
||||
<el-option
|
||||
@@ -146,7 +103,71 @@
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
|
||||
<!-- 功能选择 -->
|
||||
<div class="container_function">
|
||||
<div
|
||||
class="function_item"
|
||||
:class="
|
||||
item.checked ? 'function_item checked_function' : 'function_item'
|
||||
"
|
||||
v-for="(item, index) in tabsList"
|
||||
:key="index"
|
||||
@click="handleCheckFunction(index)"
|
||||
>
|
||||
<div class="item_img">
|
||||
<img :src="item.img" alt="" />
|
||||
</div>
|
||||
<div class="item_text">
|
||||
<p>{{ item.label }}</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 饼图 -->
|
||||
<div class="container_charts">
|
||||
<div class="charts_info">
|
||||
<pie
|
||||
:customData="{
|
||||
title: '检测状态',
|
||||
textAlign: 'right',
|
||||
}"
|
||||
:legendData="{
|
||||
icon: 'circle',
|
||||
left: 'left',
|
||||
}"
|
||||
:chartsData="chartsData1"
|
||||
ref="pieRef1"
|
||||
></pie>
|
||||
</div>
|
||||
<div class="charts_info">
|
||||
<pie
|
||||
:customData="{
|
||||
title: '检测结果',
|
||||
textAlign: 'right',
|
||||
}"
|
||||
:legendData="{
|
||||
icon: 'circle',
|
||||
left: 'left',
|
||||
}"
|
||||
:chartsData="chartsData2"
|
||||
ref="pieRef2"
|
||||
></pie>
|
||||
</div>
|
||||
<div class="charts_info">
|
||||
<pie
|
||||
:customData="{
|
||||
title: '报告状态',
|
||||
textAlign: 'right',
|
||||
}"
|
||||
:legendData="{
|
||||
icon: 'circle',
|
||||
left: 'left',
|
||||
}"
|
||||
:chartsData="chartsData3"
|
||||
ref="pieRef3"
|
||||
></pie>
|
||||
</div>
|
||||
</div>
|
||||
<!-- 列表数据 -->
|
||||
<div class="container_table">
|
||||
<Table></Table>
|
||||
</div>
|
||||
@@ -155,11 +176,13 @@
|
||||
</template>
|
||||
<script lang="ts" setup>
|
||||
import { ref, onMounted } from "vue";
|
||||
import { getStaticTreeData } from "@/api/plan/static";
|
||||
import { getStaticTreeData } from "@/api/plan/static.ts";
|
||||
import pie from "@/components/echarts/pie/default.vue";
|
||||
import { useRouter } from "vue-router";
|
||||
import tree from "../components/tree.vue";
|
||||
import Table from "../components/table.vue";
|
||||
import {data} from "@/api/plan/static.json"
|
||||
console.log(data,"??????????185");
|
||||
const treeRef = ref();
|
||||
const form: any = ref({
|
||||
activeTabs: 0, //功能选择
|
||||
@@ -173,32 +196,44 @@ const form: any = ref({
|
||||
const router = useRouter();
|
||||
localStorage.setItem("color", "red");
|
||||
//功能选择数据
|
||||
const tabsList = [
|
||||
const tabsList = ref([
|
||||
{
|
||||
label: "自动检测",
|
||||
value: 0,
|
||||
img: "/src/assets/images/plan/static/1.svg",
|
||||
checked: true,
|
||||
},
|
||||
{
|
||||
label: "手动检测",
|
||||
value: 1,
|
||||
img: "/src/assets/images/plan/static/2.svg",
|
||||
checked: false,
|
||||
},
|
||||
{
|
||||
label: "报告生成",
|
||||
value: 2,
|
||||
img: "/src/assets/images/plan/static/3.svg",
|
||||
checked: false,
|
||||
},
|
||||
{
|
||||
label: "设备归档",
|
||||
value: 3,
|
||||
img: "/src/assets/images/plan/static/4.svg",
|
||||
checked: false,
|
||||
},
|
||||
{
|
||||
label: "设备浏览",
|
||||
value: 4,
|
||||
img: "/src/assets/images/plan/static/5.svg",
|
||||
checked: false,
|
||||
},
|
||||
{
|
||||
label: "设备导入",
|
||||
value: 5,
|
||||
img: "/src/assets/images/plan/static/6.svg",
|
||||
checked: false,
|
||||
},
|
||||
];
|
||||
]);
|
||||
//检测状态数据
|
||||
const checkStatusList = [
|
||||
{
|
||||
@@ -297,7 +332,7 @@ const manufacturerList = [
|
||||
value: 2,
|
||||
},
|
||||
];
|
||||
form.value.activeTabs = tabsList[0].value;
|
||||
form.value.activeTabs = tabsList.value[0].value;
|
||||
const pieRef1 = ref(),
|
||||
pieRef2 = ref(),
|
||||
pieRef3 = ref();
|
||||
@@ -331,7 +366,8 @@ const getPieData = () => {
|
||||
const getTree = () => {
|
||||
getStaticTreeData({ userName: "zhangsan", planName: "111" }).then((res) => {
|
||||
console.log(res, "99999999");
|
||||
treeRef.value.getTreeData(res.data);
|
||||
// treeRef.value.getTreeData(res.data);
|
||||
treeRef.value.getTreeData(data);
|
||||
});
|
||||
};
|
||||
//前往检测
|
||||
@@ -346,6 +382,17 @@ const planDetail = () => {
|
||||
path: "/plan/planList",
|
||||
});
|
||||
};
|
||||
//功能选择css切换
|
||||
const handleCheckFunction = (val: any) => {
|
||||
tabsList.value.map((item: any, index: any) => {
|
||||
if (val == index) {
|
||||
item.checked = true;
|
||||
} else {
|
||||
item.checked = false;
|
||||
}
|
||||
});
|
||||
form.value.activeTabs=val;
|
||||
};
|
||||
onMounted(() => {
|
||||
console.log();
|
||||
getTree();
|
||||
@@ -355,7 +402,7 @@ onMounted(() => {
|
||||
<style lang="scss" scoped>
|
||||
.static {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
height: calc(100vh - 120px);
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
background-color: #eee;
|
||||
@@ -366,7 +413,7 @@ onMounted(() => {
|
||||
}
|
||||
.right_container {
|
||||
flex: 1;
|
||||
width: 100%;
|
||||
// width: 100%;
|
||||
padding: 0 10px 0 10px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
@@ -397,9 +444,68 @@ onMounted(() => {
|
||||
margin-bottom: 8px !important;
|
||||
}
|
||||
}
|
||||
.container_function {
|
||||
width: 100%;
|
||||
height: 70px;
|
||||
background: #fff;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
margin-bottom: 10px;
|
||||
padding: 10px 50px;
|
||||
box-sizing: border-box;
|
||||
.function_item {
|
||||
width: 120px;
|
||||
height: 50px;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
cursor: pointer;
|
||||
// border: 1px solid var(--el-color-primary);
|
||||
.item_img {
|
||||
width: 50px;
|
||||
height: 50px;
|
||||
border-radius: 50%;
|
||||
background-color: #c6c6c6;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
img {
|
||||
width: 30px;
|
||||
height: auto;
|
||||
}
|
||||
}
|
||||
.item_img:nth-child(3),
|
||||
.item_img:nth-child(6) {
|
||||
padding: 10px !important;
|
||||
img {
|
||||
width: 20px !important;
|
||||
height: auto;
|
||||
}
|
||||
}
|
||||
.item_text {
|
||||
p {
|
||||
margin: 0;
|
||||
color: var(--el-color-primary);
|
||||
font-weight: 800;
|
||||
color: #000;
|
||||
}
|
||||
}
|
||||
}
|
||||
.function_item:hover,
|
||||
.checked_function {
|
||||
.item_img {
|
||||
background-color: var(--el-color-primary);
|
||||
}
|
||||
.item_text {
|
||||
p {
|
||||
color: var(--el-color-primary);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.container_charts {
|
||||
width: 100%;
|
||||
height: 350px;
|
||||
height: 200px;
|
||||
// border: 2px solid green;
|
||||
background-color: #eee;
|
||||
display: flex;
|
||||
@@ -416,7 +522,7 @@ onMounted(() => {
|
||||
}
|
||||
.container_table {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
flex:1;
|
||||
border-radius: 4px;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user