济菏高速业务端
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

562 lines
14 KiB

1 year ago
<template>
12 months ago
<div class="topolog">
1 year ago
<div class="list">
12 months ago
<div
v-for="(item, index) in list"
@click="listClick(index)"
:class="
'listItem keep-ratio ' + (selIndex === index ? 'listItemAction' : '')
"
>
12 months ago
{{ item.name }}
1 year ago
</div>
</div>
<div class="card">
12 months ago
<div class="top">
12 months ago
<div class="t-left">{{ name }}</div>
12 months ago
<div style="display: flex">
<div class="t-right" v-for="(item, index) in card">
交换机总数
<template v-if="card.length > 1">({{ index + 1 }})</template><span
class="len"
>{{ item.total }}</span
>
12 months ago
<div class="space"></div>
12 months ago
故障数<span class="len err">{{ item.error }}</span
>
12 months ago
</div>
12 months ago
</div>
12 months ago
</div>
12 months ago
<div class="content" v-if="selIndex === 0">
12 months ago
<div class="c c-border">
<div class="arrow-panel-line">
<div class="arrowdow"></div>
<div class="arrowdow"></div>
</div>
12 months ago
<div class="arrow-panel" style="margin-top: -5px">
12 months ago
<div class="arrow"></div>
<div class="arrow"></div>
<div class="arrow"></div>
<div class="arrow"></div>
</div>
<div v-for="(item, index) in topo" v-if="index < 5" class="switch">
12 months ago
<div :class="'line ' + (item.netWorkStatus ? '' : 'liner')" style="height: 70px;margin-top: -10px;"></div>
12 months ago
<div
:class="'arrowdown ' + (item.netWorkStatus ? '' : 'arrowr')"
></div>
<div :class="'c-name ' + (item.netWorkStatus ? '' : 'c-namer')">
{{ item.switchName }}
</div>
12 months ago
<div :class="'line ' + (item.netWorkStatus ? '' : 'liner')"></div>
12 months ago
<div
:class="'arrowdown ' + (item.netWorkStatus ? '' : 'arrowr')"
style="margin-top: -35px"
></div>
<img v-if="item.netWorkStatus" src="./switch1.png" />
<img v-else src="./switch0.png" />
12 months ago
<div :class="'c-desc ' + (item.netWorkStatus ? '' : 'c-descr')">
<div>桩号{{ item.stakeMark }}</div>
<div>IP{{ item.switchIp }}</div>
</div>
</div>
12 months ago
<div class="arrow-panel" style="margin-top: 308px">
12 months ago
<div class="arrow arrowrig"></div>
<div class="arrow arrowrig"></div>
<div class="arrow arrowrig"></div>
<div class="arrow arrowrig"></div>
</div>
12 months ago
<div class="arrow-panel-line" style="margin-left: 100.1%">
12 months ago
<div class="arrowdow arrowtop"></div>
<div class="arrowdow arrowtop"></div>
</div>
</div>
12 months ago
<div class="c" style="margin-top: -5px">
12 months ago
<div v-for="(item, index) in topo" v-if="index >= 5" class="switch">
12 months ago
<div :class="'line ' + (item.netWorkStatus ? '' : 'liner')" style="height: 70px;margin-top: -10px;"></div>
12 months ago
<div
:class="'arrowdown ' + (item.netWorkStatus ? '' : 'arrowr')"
></div>
<div :class="'c-name ' + (item.netWorkStatus ? '' : 'c-namer')">
{{ item.switchName }}
</div>
12 months ago
<div :class="'line ' + (item.netWorkStatus ? '' : 'liner')"></div>
12 months ago
<div
:class="'arrowdown ' + (item.netWorkStatus ? '' : 'arrowr')"
style="margin-top: -35px"
></div>
12 months ago
<img class="imgsw" v-if="item.netWorkStatus" src="./switch1.png" />
12 months ago
<img class="imgsw" v-else src="./switch0.png" />
<div
:class="'c-name ' + (item.netWorkStatus ? '' : 'c-namer')"
style="padding: 0px 50px; margin-top: -5px; border: 0px"
></div>
12 months ago
<div :class="'c-desc ' + (item.netWorkStatus ? '' : 'c-descr')">
<div>桩号{{ item.stakeMark }}</div>
<div>IP{{ item.switchIp }}</div>
</div>
</div>
</div>
</div>
<div class="content" v-else>
12 months ago
<div
class="c c-border"
style="margin-bottom: 30px"
v-for="(item, index) of topo"
>
12 months ago
<div class="arrow-panel-line">
<div class="arrowdow"></div>
<div class="arrowdow"></div>
</div>
12 months ago
<div class="arrow-panel" style="margin-top: -5px">
12 months ago
<div class="arrow"></div>
<div class="arrow"></div>
<div class="arrow"></div>
<div class="arrow"></div>
</div>
<div class="cscorll">
12 months ago
<!-- width:' + item.length * 200 + 'px;' -->
<!-- <div style="height: 290px"> -->
<div v-for="(itm, idx) in item" class="switchScro">
<div class="switch">
<div
:class="'line ' + (itm.netWorkStatus ? '' : 'liner')"
></div>
<div
:class="'arrowdown ' + (itm.netWorkStatus ? '' : 'arrowr')"
style="margin-top: -30px"
></div>
<img
class="imgsw"
v-if="itm.netWorkStatus"
src="./switch1.png"
/>
<img class="imgsw" v-else src="./switch0.png" />
12 months ago
<el-tooltip
class="item"
effect="dark"
:content="itm.switchName"
placement="top-end"
><div
:class="
'c-name c-namesw ' + (itm.netWorkStatus ? '' : 'c-namer')
"
>
{{ itm.switchName }}({{ index + 1 }})
</div></el-tooltip
12 months ago
>
12 months ago
12 months ago
<div
:class="'line ' + (itm.netWorkStatus ? '' : 'liner')"
style="height: 40px"
></div>
<div
:class="'arrowdown ' + (itm.netWorkStatus ? '' : 'arrowr')"
style="margin-top: -30px"
></div>
<div
:class="
'device-list ' + (itm.netWorkStatus ? '' : 'device-list-r')
"
>
<div
v-for="(idv, idvx) in itm.dcDeviceList"
class="device-item"
>
12 months ago
<img :src="require(`./t${itm.netWorkStatus}${idv.childType||'1-1'}.svg`)" />
12 months ago
<el-tooltip
class="item"
effect="dark"
:content="idv.deviceName"
placement="top-end"
><div class="device-item-text">
{{ idv.deviceName }}
</div></el-tooltip
>
12 months ago
</div>
</div>
</div>
</div>
12 months ago
<!-- </div> -->
12 months ago
</div>
12 months ago
<div class="arrow-panel" style="margin-top: 308px">
12 months ago
<div class="arrow"></div>
<div class="arrow"></div>
<div class="arrow"></div>
<div class="arrow"></div>
</div>
12 months ago
<div class="arrow-panel-line" style="margin-left: 100.1%">
12 months ago
<div class="arrowdow"></div>
<div class="arrowdow"></div>
</div>
</div>
1 year ago
</div>
</div>
1 year ago
</div>
</template>
<script>
12 months ago
import request from "@/utils/request";
1 year ago
import { Message } from "element-ui";
12 months ago
const enum_device_type = [{ type: "1", label: "枪机" }];
1 year ago
export default {
12 months ago
name: "InDevelopment",
components: {},
12 months ago
1 year ago
data() {
return {
list: [],
12 months ago
selIndex: 0,
12 months ago
name: "",
card: [{ total: 0, error: 0 }],
topo: [],
};
1 year ago
},
1 year ago
mounted() {
12 months ago
this.bind();
1 year ago
},
12 months ago
methods: {
bind() {
1 year ago
request({
12 months ago
url: "/business/switch/list",
method: "get",
}).then((result) => {
12 months ago
if (result.code != 200) return Message.error(result?.msg);
this.map = result.data[0];
12 months ago
let list = [{ name: this.map.switchName }];
this.map.children.forEach((e) => {
list.push({ name: e.switchName });
});
12 months ago
this.list = list;
this.listClick();
12 months ago
});
12 months ago
},
listClick(e = 0) {
this.selIndex = e;
if (e === 0) {
12 months ago
(this.name = this.map.switchName),
(this.card = [
{
total: this.map.children.length,
error: this.map.children.filter((x) => x.netWorkStatus === 0)
.length,
},
]);
this.topo = this.map.children;
12 months ago
} else {
12 months ago
this.name = this.map.children[e - 1].switchName;
12 months ago
let cards = [];
let topo = [];
12 months ago
const list = this.map.children[e - 1].children;
const list1 = list.filter((x) => x.ringNetWork === 1);
if (list1) {
12 months ago
cards.push({
total: list1.length,
12 months ago
error: list1.filter((x) => x.netWorkStatus === 0).length,
});
topo.push(list1);
12 months ago
}
12 months ago
const list2 = list.filter((x) => x.ringNetWork === 2);
if (list2 && list2.length > 0) {
12 months ago
cards.push({
total: list2.length,
12 months ago
error: list2.filter((x) => x.netWorkStatus === 0).length,
});
topo.push(list2);
12 months ago
}
this.topo = topo;
this.card = cards;
}
12 months ago
},
},
};
1 year ago
</script>
12 months ago
<style lang="scss" scoped>
1 year ago
.topolog {
width: 100%;
height: 100%;
position: relative;
z-index: 6;
color: white;
display: flex;
justify-content: center;
align-items: center;
p {
font-size: 200px;
}
}
12 months ago
.list {
width: 15vw;
1 year ago
height: 100%;
color: white;
12 months ago
margin: 0px 40px 0px 20px;
.listItem {
1 year ago
background-image: url(../topology/left-bg.png);
background-repeat: no-repeat;
background-size: 100% 100%;
12 months ago
height: 50px;
1 year ago
width: 100%;
text-align: center;
12 months ago
line-height: 50px;
1 year ago
margin-top: 20px;
}
12 months ago
.listItemAction {
background-image: url(../topology/left-bg-action.png);
}
1 year ago
}
12 months ago
.card {
1 year ago
flex: 1;
12 months ago
height: 100%;
.top {
width: 99%;
height: 50px;
margin-top: 20px;
display: flex;
justify-content: space-between;
.t-left {
height: 50px;
padding: 0px 20px;
line-height: 50px;
border-radius: 5px;
background: linear-gradient(to top, #278ea9, #ffffff00);
}
.t-right {
display: flex;
padding: 0px 30px;
border-radius: 5px;
background: linear-gradient(to top, #278ea9, #ffffff00);
justify-content: center;
align-items: flex-end;
padding-bottom: 10px;
margin-left: 20px;
.len {
12 months ago
color: #12f7b2;
12 months ago
font-size: 26px;
font-weight: bold;
margin: 0px 10px;
}
.err {
12 months ago
color: #ff5935;
12 months ago
}
.space {
width: 40px;
}
}
}
}
.content {
width: 99%;
margin-top: 20px;
}
.c {
display: flex;
flex-direction: row;
justify-content: space-around;
12 months ago
height: 315px;
12 months ago
}
.c-border {
border: 2px solid #34d3eb;
position: relative;
12 months ago
// width: 98%;
// margin: auto;
// overflow: auto;
12 months ago
}
.arrow-panel {
position: absolute;
z-index: 999;
width: 65%;
display: flex;
justify-content: space-around;
.arrow {
width: 25px;
height: 10px;
background: linear-gradient(to right, #34d3eb, #ffffff00);
border-radius: 50%;
}
.arrowrig {
background: linear-gradient(to left, #34d3eb, #ffffff00);
}
}
.arrow-right {
width: 100%;
position: absolute;
background-color: #ff0000dd;
}
.arrow-panel-line {
height: 300px;
display: flex;
flex-direction: column;
position: absolute;
margin-left: -100.1%;
z-index: 99999;
justify-content: space-around;
.arrowdow {
border-radius: 50%;
width: 10px;
height: 20px;
background: linear-gradient(to top, #34d3eb, #ffffff00);
}
.arrowtop {
background: linear-gradient(to bottom, #34d3eb, #ffffff00);
}
}
12 months ago
.cscorll {
// width: 80vw;
width: 100%;
position: absolute;
display: flex;
justify-content: space-around;
height: 310px;
padding: 0 20px;
12 months ago
overflow-y: hidden;
12 months ago
overflow-x: auto;
12 months ago
z-index: 9999;
}
12 months ago
.switchScro {
12 months ago
height: 300px;
width: 200px;
margin-right: 20px;
float: left;
}
.switch {
display: flex;
justify-content: center;
align-items: center;
flex-direction: column;
.line {
height: 50px;
background-color: #34d3eb;
width: 2px;
}
.liner {
12 months ago
background-color: #ff5935;
12 months ago
}
.arrowdown {
width: 10px;
height: 20px;
background: linear-gradient(to top, #34d3eb, #ffffff00);
margin-top: -25px;
border-radius: 50%;
}
.arrowr {
12 months ago
background: linear-gradient(to top, #ff5935, #ffffff00);
12 months ago
}
.c-name {
12 months ago
background: linear-gradient(
270deg,
rgba(61, 231, 253, 0) 0%,
rgba(61, 231, 253, 0.7) 51%,
rgba(61, 231, 253, 0) 100%
);
12 months ago
border-radius: 4px;
padding: 10px 30px;
margin-top: 5px;
border: 1px solid #34d3eb;
}
12 months ago
.c-namesw {
12 months ago
width: 180px;
text-align: center;
// padding: 0px 50px;
12 months ago
margin-top: -5px;
font-size: 14px;
12 months ago
border: 0px !important;
12 months ago
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
12 months ago
}
.c-namer {
12 months ago
background: linear-gradient(
270deg,
rgba(255, 90, 54, 0) 0%,
rgba(255, 90, 54, 0.8) 51%,
rgba(255, 90, 54, 0) 100%
);
border: 1px solid #ff5935;
// white-space: nowrap;
// overflow: hidden;
// text-overflow: ellipsis;
12 months ago
}
.c-desc {
background: linear-gradient(to bottom, #102229 5%, #34d3eb);
padding: 5px 50px;
margin-bottom: 30px;
font-size: 14px;
padding-top: 10px;
}
.c-descr {
12 months ago
background: linear-gradient(to bottom, #102229 5%, #ff5935);
12 months ago
}
img {
width: 70px;
height: 50px;
margin-top: 10px;
}
}
12 months ago
.device-list {
12 months ago
border: 1px dashed #34d3eb;
12 months ago
height: 112px;
12 months ago
min-width: 160px;
margin-top: 10px;
12 months ago
overflow: auto;
12 months ago
display: grid;
grid-template-rows: repeat(2, minmax(45px, auto));
grid-auto-columns: 1fr;
grid-gap: 0px;
grid-template-columns: repeat(auto-fill, minmax(40px, 1fr));
padding: 10px;
12 months ago
}
12 months ago
.device-list-r {
border-color: #ff5935;
// display: flex;
// flex-wrap: wrap;
// justify-content: space-around;
// overflow: hidden;
12 months ago
}
12 months ago
.device-item {
12 months ago
// overflow: hidden;
12 months ago
img {
margin: 0;
width: 25px;
height: 25px;
}
.device-item-text {
width: 40px;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
font-size: 12px;
12 months ago
}
1 year ago
}
1 year ago
</style>