|
@@ -1,58 +1,105 @@
|
|
<template>
|
|
<template>
|
|
<div>
|
|
<div>
|
|
- <el-tabs v-model="activeName" class="demo-tabs">
|
|
|
|
|
|
+ <el-tabs v-model="activeName" class="demo-tabs" @tab-click="handleClick">
|
|
<div class="nav">
|
|
<div class="nav">
|
|
- <div v-for="(item, index) in navtopData" :key="index" :class="{ 'nav-item-active': activeNav == index }"
|
|
|
|
- @click="clickNav(index)" class="nav-item" style="font-size: 12px;">
|
|
|
|
|
|
+ <div
|
|
|
|
+ v-for="(item, index) in navtopData"
|
|
|
|
+ :key="index"
|
|
|
|
+ :class="{ 'nav-item-active': activeNav == index }"
|
|
|
|
+ @click="clickNav(item, index)"
|
|
|
|
+ class="nav-item"
|
|
|
|
+ style="font-size: 12px"
|
|
|
|
+ >
|
|
{{ item.name }}
|
|
{{ item.name }}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="mostHead" v-if="activeName == 'first' && activeNav == 0">
|
|
<div class="mostHead" v-if="activeName == 'first' && activeNav == 0">
|
|
- <h2 style="display: inline-block;margin-right: 2px;font-size: 20px;">CID文件一次性检测</h2>
|
|
|
|
- <el-button type="primary" plain @click="portExcel">结果导出Excel</el-button>
|
|
|
|
|
|
+ <h2 style="display: inline-block; margin-right: 2px; font-size: 20px">
|
|
|
|
+ CID文件一次性检测
|
|
|
|
+ </h2>
|
|
|
|
+ <el-button type="primary" plain @click="portExcel"
|
|
|
|
+ >结果导出Excel</el-button
|
|
|
|
+ >
|
|
<span class="closeX" @click="closeX">×</span>
|
|
<span class="closeX" @click="closeX">×</span>
|
|
</div>
|
|
</div>
|
|
<el-tab-pane label="网络结构图" name="first">
|
|
<el-tab-pane label="网络结构图" name="first">
|
|
<net-work v-if="activeName == 'first' && activeNav == null"></net-work>
|
|
<net-work v-if="activeName == 'first' && activeNav == null"></net-work>
|
|
<div class="disappear" v-if="activeName == 'first' && activeNav == 0">
|
|
<div class="disappear" v-if="activeName == 'first' && activeNav == 0">
|
|
<!-- 左侧树形数据 -->
|
|
<!-- 左侧树形数据 -->
|
|
- <div style="width: 15%;">
|
|
|
|
|
|
+ <div style="width: 15%">
|
|
<CidTree :nowScdId="nowScdId" @treeBack="treeBack"></CidTree>
|
|
<CidTree :nowScdId="nowScdId" @treeBack="treeBack"></CidTree>
|
|
</div>
|
|
</div>
|
|
<!-- 右侧展示图 -->
|
|
<!-- 右侧展示图 -->
|
|
- <div style="width: 85%; height: calc(100vh - 280px);position: relative;">
|
|
|
|
|
|
+ <div
|
|
|
|
+ style="width: 85%; height: calc(100vh - 280px); position: relative"
|
|
|
|
+ >
|
|
<div class="abBox">
|
|
<div class="abBox">
|
|
<div>
|
|
<div>
|
|
- <span style="border-right: 1px solid black;padding-right: 300px;font-size: 12px;">
|
|
|
|
|
|
+ <span
|
|
|
|
+ style="
|
|
|
|
+ border-right: 1px solid black;
|
|
|
|
+ padding-right: 300px;
|
|
|
|
+ font-size: 12px;
|
|
|
|
+ "
|
|
|
|
+ >
|
|
基准文件:{{ arrName }}
|
|
基准文件:{{ arrName }}
|
|
</span>
|
|
</span>
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<div>
|
|
- <span style="font-size: 12px;">
|
|
|
|
- 对比文件:{{ upName }}
|
|
|
|
- </span>
|
|
|
|
|
|
+ <span style="font-size: 12px"> 对比文件:{{ upName }} </span>
|
|
</div>
|
|
</div>
|
|
<div class="uploadBox">
|
|
<div class="uploadBox">
|
|
- <el-upload ref="upload" class="upload-demo" :http-request="nowUpload" :limit="2"
|
|
|
|
- element-loading-text="上传中..." element-loading-background="rgba(255, 255, 255, 0.8)"
|
|
|
|
- :on-remove="handleRemove" :on-change="fileSuccess" :show-file-list="false">
|
|
|
|
|
|
+ <el-upload
|
|
|
|
+ ref="upload"
|
|
|
|
+ class="upload-demo"
|
|
|
|
+ :http-request="nowUpload"
|
|
|
|
+ :limit="2"
|
|
|
|
+ element-loading-text="上传中..."
|
|
|
|
+ element-loading-background="rgba(255, 255, 255, 0.8)"
|
|
|
|
+ :on-remove="handleRemove"
|
|
|
|
+ :on-change="fileSuccess"
|
|
|
|
+ :show-file-list="false"
|
|
|
|
+ >
|
|
<template #trigger>
|
|
<template #trigger>
|
|
- <el-button style="border-bottom: 1px solid #7BBAFD;" type="text" plain>上传CID</el-button>
|
|
|
|
|
|
+ <el-button
|
|
|
|
+ style="border-bottom: 1px solid #7bbafd"
|
|
|
|
+ type="text"
|
|
|
|
+ plain
|
|
|
|
+ >上传CID</el-button
|
|
|
|
+ >
|
|
</template>
|
|
</template>
|
|
</el-upload>
|
|
</el-upload>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
- <Gsix :activeName="activeName" :activeNav="activeNav" :backName="backName" :mustVal="mustVal"
|
|
|
|
- :arrName="arrName" :upName="upName"></Gsix>
|
|
|
|
|
|
+ <Gsix
|
|
|
|
+ :activeName="activeName"
|
|
|
|
+ :activeNav="activeNav"
|
|
|
|
+ :backName="backName"
|
|
|
|
+ :mustVal="mustVal"
|
|
|
|
+ :arrName="arrName"
|
|
|
|
+ :upName="upName"
|
|
|
|
+ ></Gsix>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="scdCheck" v-if="activeName == 'first' && activeNav == 1">
|
|
<div class="scdCheck" v-if="activeName == 'first' && activeNav == 1">
|
|
<div class="mostHead" v-if="activeName == 'first' && activeNav == 1">
|
|
<div class="mostHead" v-if="activeName == 'first' && activeNav == 1">
|
|
- <h2 style="display: inline-block;margin-right: 2px;font-size: 20px;">SCD文件一次性检测</h2>
|
|
|
|
|
|
+ <h2
|
|
|
|
+ style="display: inline-block; margin-right: 2px; font-size: 20px"
|
|
|
|
+ >
|
|
|
|
+ SCD文件一次性检测
|
|
|
|
+ </h2>
|
|
<span class="closeX" @click="closeX">×</span>
|
|
<span class="closeX" @click="closeX">×</span>
|
|
</div>
|
|
</div>
|
|
<!-- 内容 -->
|
|
<!-- 内容 -->
|
|
- <div style="width: 100%;display: flex;justify-content: space-around;align-items: center;margin-top: 5px;">
|
|
|
|
|
|
+ <div
|
|
|
|
+ style="
|
|
|
|
+ width: 100%;
|
|
|
|
+ display: flex;
|
|
|
|
+ justify-content: space-around;
|
|
|
|
+ align-items: center;
|
|
|
|
+ margin-top: 5px;
|
|
|
|
+ "
|
|
|
|
+ >
|
|
<div class="treeBtn">
|
|
<div class="treeBtn">
|
|
<scdTree @scdTreeBack="scdTreeBack"></scdTree>
|
|
<scdTree @scdTreeBack="scdTreeBack"></scdTree>
|
|
</div>
|
|
</div>
|
|
@@ -61,11 +108,26 @@
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
- <CrcCheck v-if="activeName == 'first' && activeNav == 3" :nowScdId="nowScdId"></CrcCheck>
|
|
|
|
- <SlcCheck v-if="activeName == 'first' && activeNav == 2" :nowScdId="nowScdId"></SlcCheck>
|
|
|
|
|
|
+ <CrcCheck
|
|
|
|
+ v-if="activeName == 'first' && activeNav == 3"
|
|
|
|
+ :nowScdId="nowScdId"
|
|
|
|
+ ></CrcCheck>
|
|
|
|
+ <SlcCheck
|
|
|
|
+ v-if="activeName == 'first' && activeNav == 2"
|
|
|
|
+ :nowScdId="nowScdId"
|
|
|
|
+ ></SlcCheck>
|
|
|
|
+ <!-- 虚端子关系图 -->
|
|
|
|
+ <div v-if="clickNavCode == 'virtual'">
|
|
|
|
+ <!-- <virtual-relation
|
|
|
|
+ :checkData="checkData"
|
|
|
|
+ :isOpen="isOpen"
|
|
|
|
+ :iedRelation="iedRelation"
|
|
|
|
+ @result="result">
|
|
|
|
+ </virtual-relation> -->
|
|
|
|
+ </div>
|
|
</el-tab-pane>
|
|
</el-tab-pane>
|
|
<el-tab-pane label="SCD可视化" name="second">
|
|
<el-tab-pane label="SCD可视化" name="second">
|
|
- <scd-visual></scd-visual>
|
|
|
|
|
|
+ <scd-visual v-if="!clickNavCode"></scd-visual>
|
|
</el-tab-pane>
|
|
</el-tab-pane>
|
|
</el-tabs>
|
|
</el-tabs>
|
|
</div>
|
|
</div>
|
|
@@ -79,103 +141,125 @@ import scdVisual from "./components/scdVisual";
|
|
import CidTree from "./components/CidTree.vue";
|
|
import CidTree from "./components/CidTree.vue";
|
|
import Gsix from "./components/Gsix.vue";
|
|
import Gsix from "./components/Gsix.vue";
|
|
import scdTree from "./components/scdTree.vue";
|
|
import scdTree from "./components/scdTree.vue";
|
|
-import scdMap from "./components/scdMap.vue"
|
|
|
|
-import CrcCheck from "./newTitle/CrcCheck"
|
|
|
|
|
|
+import scdMap from "./components/scdMap.vue";
|
|
|
|
+import CrcCheck from "./newTitle/CrcCheck";
|
|
import SlcCheck from "./newTitle/SlcCheck.vue";
|
|
import SlcCheck from "./newTitle/SlcCheck.vue";
|
|
-import { useRoute } from 'vue-router';
|
|
|
|
|
|
+import { useRoute } from "vue-router";
|
|
import cid from "@/api/cid/cid";
|
|
import cid from "@/api/cid/cid";
|
|
import { ElMessage } from "element-plus";
|
|
import { ElMessage } from "element-plus";
|
|
import systemRow from "@/api/systemRow";
|
|
import systemRow from "@/api/systemRow";
|
|
import scdCheck from "@/api/scdCheck/scdCheck";
|
|
import scdCheck from "@/api/scdCheck/scdCheck";
|
|
-let route = useRoute()
|
|
|
|
-const activeName = ref("first");//默认展示网络结构图
|
|
|
|
|
|
+import virtualRelation from "./components/virtualRelation.vue";//虚端
|
|
|
|
+let route = useRoute();
|
|
|
|
+const activeName = ref("first"); //默认展示网络结构图
|
|
const navtopData = ref([
|
|
const navtopData = ref([
|
|
- { name: "CID一致性校核" },
|
|
|
|
- { name: "SCD文件一致性校核" },
|
|
|
|
- { name: "SCL文件校核" },
|
|
|
|
- { name: "CRC校核" },
|
|
|
|
- { name: "虚端子关系图" },
|
|
|
|
|
|
+ { name: "CID一致性校核", code: "CID" },
|
|
|
|
+ { name: "SCD文件一致性校核", code: "SCD" },
|
|
|
|
+ { name: "SCL文件校核", code: "SCL" },
|
|
|
|
+ { name: "CRC校核", code: "CRC" },
|
|
|
|
+ { name: "虚端子关系图", code: "virtual" },
|
|
]);
|
|
]);
|
|
const activeNav = ref(null);
|
|
const activeNav = ref(null);
|
|
-const backName = ref('')//树组件返回名称
|
|
|
|
-let mustVal = ref(false)
|
|
|
|
-let upName = ref('')//上传的文件名称
|
|
|
|
-let arrName = ref('')//基准的文件名称
|
|
|
|
-let upFile = ref({})//上传文件流
|
|
|
|
-let backId = ref('')//返回id
|
|
|
|
-let nowScdId = ref('')//路由传参的scdid
|
|
|
|
-let antherBack = ref([])
|
|
|
|
-watch(() => antherBack.value, (newVal) => {
|
|
|
|
- antherBack.value = newVal
|
|
|
|
-}, {
|
|
|
|
- deep: true
|
|
|
|
-})
|
|
|
|
|
|
+const backName = ref(""); //树组件返回名称
|
|
|
|
+let mustVal = ref(false);
|
|
|
|
+let upName = ref(""); //上传的文件名称
|
|
|
|
+let arrName = ref(""); //基准的文件名称
|
|
|
|
+let upFile = ref({}); //上传文件流
|
|
|
|
+let backId = ref(""); //返回id
|
|
|
|
+let nowScdId = ref(""); //路由传参的scdid
|
|
|
|
+let antherBack = ref([]);
|
|
|
|
+watch(
|
|
|
|
+ () => antherBack.value,
|
|
|
|
+ (newVal) => {
|
|
|
|
+ antherBack.value = newVal;
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ deep: true,
|
|
|
|
+ }
|
|
|
|
+);
|
|
const reload = () => {
|
|
const reload = () => {
|
|
- nowScdId.value = route.query.id
|
|
|
|
-}
|
|
|
|
-const clickNav = (navIndex) => { //点击导航栏事件
|
|
|
|
|
|
+ nowScdId.value = route.query.id;
|
|
|
|
+};
|
|
|
|
+//虚端子关系====
|
|
|
|
+const isOpen = ref(false);
|
|
|
|
+//虚端子关系====
|
|
|
|
+const clickNavCode = ref(""); //点击导航栏的头部
|
|
|
|
+const clickNav = (item, navIndex) => {
|
|
|
|
+ //点击导航栏事件
|
|
|
|
+ clickNavCode.value = item.code;
|
|
activeNav.value = navIndex;
|
|
activeNav.value = navIndex;
|
|
-}
|
|
|
|
|
|
+ switch(item.code){
|
|
|
|
+ case 'virtual':
|
|
|
|
+ isOpen.value = true;
|
|
|
|
+ break;
|
|
|
|
+ }
|
|
|
|
+};
|
|
const handleClick = (val) => {
|
|
const handleClick = (val) => {
|
|
- if (val.props.name == 'first') {
|
|
|
|
- activeNav.value = null
|
|
|
|
- activeName.value = val.props.name
|
|
|
|
|
|
+ if (val.props.name == "first") {
|
|
|
|
+ activeNav.value = null;
|
|
|
|
+ activeName.value = val.props.name;
|
|
}
|
|
}
|
|
-}
|
|
|
|
|
|
+ clickNavCode.value = ""
|
|
|
|
+};
|
|
const treeBack = (data, ids) => {
|
|
const treeBack = (data, ids) => {
|
|
- backName.value = data
|
|
|
|
- arrName.value = data
|
|
|
|
- backId.value = ids
|
|
|
|
- console.log(ids, 'ids');
|
|
|
|
-}
|
|
|
|
|
|
+ backName.value = data;
|
|
|
|
+ arrName.value = data;
|
|
|
|
+ backId.value = ids;
|
|
|
|
+ console.log(ids, "ids");
|
|
|
|
+};
|
|
const closeX = () => {
|
|
const closeX = () => {
|
|
- activeName.value = 'first'
|
|
|
|
- activeNav.value = null
|
|
|
|
-}
|
|
|
|
|
|
+ activeName.value = "first";
|
|
|
|
+ activeNav.value = null;
|
|
|
|
+};
|
|
const nowUpload = (file, e) => {
|
|
const nowUpload = (file, e) => {
|
|
- upFile.value = file.file
|
|
|
|
- upName.value = file.file.name
|
|
|
|
- cid.fileUpload({ station_id: 861, file: upFile.value, data_type: "cid" }).then(res => {
|
|
|
|
- if (res.code == 0) {
|
|
|
|
- let idp = `${file.file.uid},${backId.value}`
|
|
|
|
- ElMessage({
|
|
|
|
- type: 'success',
|
|
|
|
- message: "上传成功!"
|
|
|
|
- })
|
|
|
|
- scdCheck.scdStart({ type: 'cid', station_id: 861, ids: idp }).then(res => {
|
|
|
|
- console.log(res, 'show');
|
|
|
|
- })
|
|
|
|
- }
|
|
|
|
- })
|
|
|
|
-
|
|
|
|
|
|
+ upFile.value = file.file;
|
|
|
|
+ upName.value = file.file.name;
|
|
|
|
+ cid
|
|
|
|
+ .fileUpload({ station_id: 861, file: upFile.value, data_type: "cid" })
|
|
|
|
+ .then((res) => {
|
|
|
|
+ if (res.code == 0) {
|
|
|
|
+ let idp = `${file.file.uid},${backId.value}`;
|
|
|
|
+ ElMessage({
|
|
|
|
+ type: "success",
|
|
|
|
+ message: "上传成功!",
|
|
|
|
+ });
|
|
|
|
+ scdCheck
|
|
|
|
+ .scdStart({ type: "cid", station_id: 861, ids: idp })
|
|
|
|
+ .then((res) => {
|
|
|
|
+ console.log(res, "show");
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
+ });
|
|
};
|
|
};
|
|
|
|
|
|
const handleRemove = (file, e) => {
|
|
const handleRemove = (file, e) => {
|
|
- console.log(file, e, '删除');
|
|
|
|
-}
|
|
|
|
|
|
+ console.log(file, e, "删除");
|
|
|
|
+};
|
|
const fileSuccess = (file, e) => {
|
|
const fileSuccess = (file, e) => {
|
|
- mustVal.value = true
|
|
|
|
-}
|
|
|
|
|
|
+ mustVal.value = true;
|
|
|
|
+};
|
|
function scdTreeBack(data) {
|
|
function scdTreeBack(data) {
|
|
- antherBack.value = data
|
|
|
|
|
|
+ antherBack.value = data;
|
|
}
|
|
}
|
|
const portExcel = () => {
|
|
const portExcel = () => {
|
|
- systemRow.portExcel({
|
|
|
|
- code: "scd-comp-result"
|
|
|
|
- }).then(res => {
|
|
|
|
- if (res.data) {
|
|
|
|
- return
|
|
|
|
- } else {
|
|
|
|
- ElMessage({
|
|
|
|
- message: res.msg,
|
|
|
|
- type: "info"
|
|
|
|
- })
|
|
|
|
- }
|
|
|
|
- })
|
|
|
|
-}
|
|
|
|
|
|
+ systemRow
|
|
|
|
+ .portExcel({
|
|
|
|
+ code: "scd-comp-result",
|
|
|
|
+ })
|
|
|
|
+ .then((res) => {
|
|
|
|
+ if (res.data) {
|
|
|
|
+ return;
|
|
|
|
+ } else {
|
|
|
|
+ ElMessage({
|
|
|
|
+ message: res.msg,
|
|
|
|
+ type: "info",
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
+ });
|
|
|
|
+};
|
|
onMounted(() => {
|
|
onMounted(() => {
|
|
- reload()
|
|
|
|
-})
|
|
|
|
|
|
+ reload();
|
|
|
|
+});
|
|
</script>
|
|
</script>
|
|
|
|
|
|
<style scoped lang="scss">
|
|
<style scoped lang="scss">
|
|
@@ -224,7 +308,8 @@ $height: 40px;
|
|
}
|
|
}
|
|
|
|
|
|
.nav-item-active {
|
|
.nav-item-active {
|
|
- background: #fff url("~@/assets/image/instruct/navtop_active.png") no-repeat center;
|
|
|
|
|
|
+ background: #fff url("~@/assets/image/instruct/navtop_active.png") no-repeat
|
|
|
|
+ center;
|
|
background-size: 144px $height;
|
|
background-size: 144px $height;
|
|
color: #fff;
|
|
color: #fff;
|
|
}
|
|
}
|
|
@@ -245,7 +330,7 @@ $height: 40px;
|
|
.mostHead {
|
|
.mostHead {
|
|
width: 97%;
|
|
width: 97%;
|
|
height: auto;
|
|
height: auto;
|
|
- border-bottom: 1px solid #A3ADE0;
|
|
|
|
|
|
+ border-bottom: 1px solid #a3ade0;
|
|
margin: 0px auto;
|
|
margin: 0px auto;
|
|
position: relative;
|
|
position: relative;
|
|
}
|
|
}
|
|
@@ -303,6 +388,6 @@ $height: 40px;
|
|
width: 65%;
|
|
width: 65%;
|
|
height: calc(100vh - 205px);
|
|
height: calc(100vh - 205px);
|
|
// border: 1px solid teal;
|
|
// border: 1px solid teal;
|
|
- background-color: #F6F8FA;
|
|
|
|
|
|
+ background-color: #f6f8fa;
|
|
}
|
|
}
|
|
</style>
|
|
</style>
|