|
@@ -1,20 +1,16 @@
|
|
<template>
|
|
<template>
|
|
<div class="mainContentBox" style="padding: 0 24px">
|
|
<div class="mainContentBox" style="padding: 0 24px">
|
|
<el-row :gutter="20">
|
|
<el-row :gutter="20">
|
|
- <el-col :span="4" class="elColClasss">
|
|
|
|
|
|
+ <el-col :span="4" class="elColClasss" style="height: calc(100vh - 80px)">
|
|
<!-- 侧边栏盒子 -->
|
|
<!-- 侧边栏盒子 -->
|
|
<Jiluxiang />
|
|
<Jiluxiang />
|
|
</el-col>
|
|
</el-col>
|
|
<el-col :span="20" class="elColClasss">
|
|
<el-col :span="20" class="elColClasss">
|
|
<div class="container">
|
|
<div class="container">
|
|
<div class="typeContainer">
|
|
<div class="typeContainer">
|
|
- <div
|
|
|
|
- v-for="(item, index) in stepComponents"
|
|
|
|
- :key="index"
|
|
|
|
- :class="getNameClass(index)"
|
|
|
|
- class="typeBox"
|
|
|
|
- >
|
|
|
|
- <router-link :to="{ name: item.path }">
|
|
|
|
|
|
+ <div v-for="(item, index) in stepComponents" :key="index" :class="getNameClass(index)" class="typeBox"
|
|
|
|
+ @click="setSelectIndex(index)">
|
|
|
|
+ <router-link :to="{ name: item.name }">
|
|
<div class="svgIcon">
|
|
<div class="svgIcon">
|
|
<svg-icon :icon-class="item.compentType" size="30" />
|
|
<svg-icon :icon-class="item.compentType" size="30" />
|
|
</div>
|
|
</div>
|
|
@@ -49,62 +45,67 @@ const stepComponents = ref([
|
|
{
|
|
{
|
|
compentName: "记录项",
|
|
compentName: "记录项",
|
|
compentType: "jiluxiang",
|
|
compentType: "jiluxiang",
|
|
- path: "Jiluxiang",
|
|
|
|
|
|
+ path: "jiluxiang",
|
|
|
|
+ name: "Jiluxiang",
|
|
},
|
|
},
|
|
{
|
|
{
|
|
compentName: "物料采集",
|
|
compentName: "物料采集",
|
|
compentType: "wuliaocaiji",
|
|
compentType: "wuliaocaiji",
|
|
path: "wuliaocaiji",
|
|
path: "wuliaocaiji",
|
|
|
|
+ name: "Wuliaocaiji",
|
|
},
|
|
},
|
|
{
|
|
{
|
|
compentName: "ESOP",
|
|
compentName: "ESOP",
|
|
compentType: "ESOP",
|
|
compentType: "ESOP",
|
|
path: "esop",
|
|
path: "esop",
|
|
|
|
+ path: "Esop",
|
|
},
|
|
},
|
|
{
|
|
{
|
|
compentName: "点检",
|
|
compentName: "点检",
|
|
compentType: "dianjian",
|
|
compentType: "dianjian",
|
|
|
|
+ path: "dianjian",
|
|
path: "Dianjian",
|
|
path: "Dianjian",
|
|
},
|
|
},
|
|
{
|
|
{
|
|
compentName: "设备记录",
|
|
compentName: "设备记录",
|
|
compentType: "shebeijilu",
|
|
compentType: "shebeijilu",
|
|
path: "shebeijilu",
|
|
path: "shebeijilu",
|
|
|
|
+ path: "Shebeijilu",
|
|
},
|
|
},
|
|
{
|
|
{
|
|
compentName: "紧固",
|
|
compentName: "紧固",
|
|
compentType: "jingu",
|
|
compentType: "jingu",
|
|
path: "jingu",
|
|
path: "jingu",
|
|
|
|
+ path: "Jingu",
|
|
},
|
|
},
|
|
{
|
|
{
|
|
compentName: "调试配对",
|
|
compentName: "调试配对",
|
|
compentType: "tiaoshipipei",
|
|
compentType: "tiaoshipipei",
|
|
path: "tiaoshipipei",
|
|
path: "tiaoshipipei",
|
|
|
|
+ path: "Tiaoshipipei",
|
|
},
|
|
},
|
|
{
|
|
{
|
|
compentName: "铭牌绑定",
|
|
compentName: "铭牌绑定",
|
|
compentType: "mingpai",
|
|
compentType: "mingpai",
|
|
path: "mingpaibangding",
|
|
path: "mingpaibangding",
|
|
|
|
+ path: "Mingpaibangding",
|
|
},
|
|
},
|
|
{
|
|
{
|
|
compentName: "多媒体采集",
|
|
compentName: "多媒体采集",
|
|
compentType: "duomeiticaiji",
|
|
compentType: "duomeiticaiji",
|
|
path: "duomeiticaiji",
|
|
path: "duomeiticaiji",
|
|
|
|
+ path: "Duomeiticaiji",
|
|
},
|
|
},
|
|
]);
|
|
]);
|
|
//当前路由在setpComponents中的index
|
|
//当前路由在setpComponents中的index
|
|
-const selectIndex = ref(-1);
|
|
|
|
|
|
+const selectIndex = ref(0);
|
|
|
|
|
|
const getNameClass = (index) => {
|
|
const getNameClass = (index) => {
|
|
return index === selectIndex.value ? "typeBoxSelected" : "typeBoxNormal";
|
|
return index === selectIndex.value ? "typeBoxSelected" : "typeBoxNormal";
|
|
};
|
|
};
|
|
//设置标签是否被选中
|
|
//设置标签是否被选中
|
|
-const setSelectIndex = () => {
|
|
|
|
- stepComponents.value.forEach((item, index) => {
|
|
|
|
- if (item.path == route.name) {
|
|
|
|
- selectIndex.value = index;
|
|
|
|
- }
|
|
|
|
- });
|
|
|
|
|
|
+const setSelectIndex = (index) => {
|
|
|
|
+ selectIndex.value = index;
|
|
};
|
|
};
|
|
onMounted(() => {
|
|
onMounted(() => {
|
|
setSelectIndex();
|
|
setSelectIndex();
|
|
@@ -116,7 +117,6 @@ onMounted(() => {
|
|
display: flex;
|
|
display: flex;
|
|
flex: 1;
|
|
flex: 1;
|
|
flex-direction: column;
|
|
flex-direction: column;
|
|
- background-color: aqua;
|
|
|
|
width: 100%;
|
|
width: 100%;
|
|
height: calc(100vh - 80px);
|
|
height: calc(100vh - 80px);
|
|
|
|
|
|
@@ -135,7 +135,6 @@ onMounted(() => {
|
|
.routerView {
|
|
.routerView {
|
|
display: flex;
|
|
display: flex;
|
|
flex: 1;
|
|
flex: 1;
|
|
- background-color: red;
|
|
|
|
overflow-y: auto;
|
|
overflow-y: auto;
|
|
}
|
|
}
|
|
|
|
|