|
@@ -1,259 +1,217 @@
|
|
|
<template>
|
|
|
- <div style="display: flex;justify-content: space-around; align-items: center;">
|
|
|
- <div class="scdBox">
|
|
|
- <div>
|
|
|
- <img src="../../../assets/image/squer_scd.png" alt="">
|
|
|
- <p>SCD版本</p>
|
|
|
- </div>
|
|
|
- <div>
|
|
|
- <div id="oldScd">
|
|
|
- <img src="../../../assets/icon/cilce_gray.png" alt="">
|
|
|
- <span>V1.1.0</span>
|
|
|
- </div>
|
|
|
- <div id="newScd">
|
|
|
- <img src="../../../assets/icon/clice_blue.png" alt="">
|
|
|
- <span>V1.1.1</span>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
+ <div class="main">
|
|
|
+ <div class="scdBox">
|
|
|
+ <div class="navs">
|
|
|
+ <img src="../../../assets/image/squer_scd.png" alt="" />
|
|
|
+ <p>SCD版本</p>
|
|
|
+ </div>
|
|
|
+ <div>
|
|
|
+ <div id="oldScd">
|
|
|
+ <img src="../../../assets/icon/cilce_gray.png" alt="" />
|
|
|
+ <span>V1.1.0</span>
|
|
|
</div>
|
|
|
- <div class="crcBox">
|
|
|
- <div>
|
|
|
- <img src="../../../assets/image/squer_crc.png" alt="">
|
|
|
- <p>CRC</p>
|
|
|
- </div>
|
|
|
- <div>
|
|
|
- <div id="oldCrc">
|
|
|
- <img src="../../../assets/icon/cilce_gray.png" alt="">
|
|
|
- <span>1000000111100000</span>
|
|
|
- </div>
|
|
|
- <div id="newCrc">
|
|
|
- <img src="../../../assets/icon/clice_blue.png" alt="">
|
|
|
- <span>1000000111100022</span>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
+ <img :src="jiantouPng" alt="" class="jiantou" />
|
|
|
+ <div id="newScd">
|
|
|
+ <img src="../../../assets/icon/clice_blue.png" alt="" />
|
|
|
+ <span>1000000111100022</span>
|
|
|
</div>
|
|
|
- <div class="iedBox">
|
|
|
- <div id="oldIed">
|
|
|
- <img src="../../../assets/image/squer_ied.png" alt="">
|
|
|
- <p>IED</p>
|
|
|
- </div>
|
|
|
- <div id="newIed">
|
|
|
- <p id="addId" @click="lookAdd">
|
|
|
- <el-icon style="color: #1D48E8;font-size: 18px;display: block;">
|
|
|
- <CirclePlus />
|
|
|
- </el-icon>
|
|
|
- <span style="display: block;color: #1D48E8;">新增(5)</span>
|
|
|
- </p>
|
|
|
- <p id="editId" @click="lookEdit">
|
|
|
- <el-icon style="color: #FECC2A;font-size: 18px;display: block;">
|
|
|
- <EditPen />
|
|
|
- </el-icon>
|
|
|
- <span style="display: block;color: #FECC2A;">修改(10)</span>
|
|
|
- </p>
|
|
|
- <p id="delId" @click="lookDel">
|
|
|
- <el-icon style="color: red;font-size: 18px;display: block;">
|
|
|
- <Delete />
|
|
|
- </el-icon>
|
|
|
- <span style="display: block;color: red;">删除(2)</span>
|
|
|
- </p>
|
|
|
- </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="crcBox">
|
|
|
+ <div class="navs">
|
|
|
+ <img src="../../../assets/image/squer_crc.png" alt="" />
|
|
|
+ <p>CRC</p>
|
|
|
+ </div>
|
|
|
+ <div>
|
|
|
+ <div id="oldCrc">
|
|
|
+ <img src="../../../assets/icon/cilce_gray.png" alt="" />
|
|
|
+ <span>1000000111100000</span>
|
|
|
+ </div>
|
|
|
+ <img :src="jiantouPng" alt="" class="jiantou" />
|
|
|
+ <div id="newCrc">
|
|
|
+ <img src="../../../assets/icon/clice_blue.png" alt="" />
|
|
|
+ <span>1000000111100022</span>
|
|
|
</div>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
+ <div class="iedBox">
|
|
|
+ <div id="oldIed">
|
|
|
+ <img src="../../../assets/image/squer_ied.png" alt="" />
|
|
|
+ <p>IED</p>
|
|
|
+ </div>
|
|
|
+ <div id="newIed">
|
|
|
+ <p id="addId" @click="lookAdd">
|
|
|
+ <img :src="newlyPng" alt="" class="icons"/>
|
|
|
+ <span style="color: #134BEA">新增(5)</span>
|
|
|
+ </p>
|
|
|
+ <p id="editId" @click="lookEdit">
|
|
|
+ <img :src="modifyPng" alt="" class="icons" />
|
|
|
+ <span style="color: #FFCB11">修改(10)</span>
|
|
|
+ </p>
|
|
|
+ <p id="delId" @click="lookDel">
|
|
|
+ <img :src="delPng" alt="" class="icons"/>
|
|
|
+ <span style="color: #E50505">删除(2)</span>
|
|
|
+ </p>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
</template>
|
|
|
|
|
|
-<script>
|
|
|
-import { ref, onMounted, toRefs, watch, onBeforeUnmount } from 'vue';
|
|
|
-import LeaderLine from '../../../../public/leader-line.min.js';
|
|
|
-export default {
|
|
|
- setup(props,{emit}) {
|
|
|
- let lineList = []
|
|
|
- let lookType = ref(0)
|
|
|
- function lineWrite() {
|
|
|
- let oldScd = document.getElementById("oldScd")
|
|
|
- let newScd = document.getElementById("newScd")
|
|
|
- let oldCrc = document.getElementById("oldCrc")
|
|
|
- let newCrc = document.getElementById("newCrc")
|
|
|
- let oldIed = document.getElementById("oldIed")
|
|
|
- let newIed = document.getElementById("newIed")
|
|
|
- let addId = document.getElementById("addId")
|
|
|
- let editId = document.getElementById('editId')
|
|
|
- let delId = document.getElementById("delId")
|
|
|
- lineList.push(new LeaderLine(oldScd, newScd, {
|
|
|
- color: "blue",//连接线颜色
|
|
|
- size: 10,//连接线宽度
|
|
|
- path: "straight",//连接线样式
|
|
|
- startSocket: "bottom",//开始链接元素位置
|
|
|
- endSocket: "top",//结束链接元素位置
|
|
|
- dash: {
|
|
|
- // 绘制线的长度 'auto'=size*2
|
|
|
- len: 1,
|
|
|
- // 绘制线之间的间隙 'auto'=size
|
|
|
- gap: 6,
|
|
|
- // 线条滚动 true 是(或者{duration: 1000, timing: 'linear'},详见动画选项), false 否(默认)
|
|
|
- animation: {
|
|
|
- duration: 800,//动画速度
|
|
|
- timing: "linear",
|
|
|
- },
|
|
|
- },//动画开启
|
|
|
- endPlug: 'arrow3',//结束箭头
|
|
|
- endPlugSize: 0.5,//结束箭头size
|
|
|
- }))
|
|
|
- lineList.push(new LeaderLine(oldCrc, newCrc, {
|
|
|
- color: "blue",//连接线颜色
|
|
|
- size: 10,//连接线宽度
|
|
|
- path: "straight",//连接线样式
|
|
|
- startSocket: "bottom",//开始链接元素位置
|
|
|
- endSocket: "top",//结束链接元素位置
|
|
|
- dash: {
|
|
|
- // 绘制线的长度 'auto'=size*2
|
|
|
- len: 1,
|
|
|
- // 绘制线之间的间隙 'auto'=size
|
|
|
- gap: 6,
|
|
|
- // 线条滚动 true 是(或者{duration: 1000, timing: 'linear'},详见动画选项), false 否(默认)
|
|
|
- animation: {
|
|
|
- duration: 800,//动画速度
|
|
|
- timing: "linear",
|
|
|
- },
|
|
|
- },//动画开启
|
|
|
- endPlug: 'arrow3',//结束箭头
|
|
|
- endPlugSize: 0.5,//结束箭头size
|
|
|
- }))
|
|
|
- lineList.push(new LeaderLine(oldIed, addId, {
|
|
|
- color: "gray",//连接线颜色
|
|
|
- size: 2,//连接线宽度
|
|
|
- path: "grid",//连接线样式
|
|
|
- startSocket: "bottom",//开始链接元素位置
|
|
|
- endSocket: "left",//结束链接元素位置
|
|
|
- endPlug: 'disc',//结束箭头
|
|
|
- endPlugSize: 2,//结束箭头size
|
|
|
- }))
|
|
|
- lineList.push(new LeaderLine(oldIed, editId, {
|
|
|
- color: "gray",//连接线颜色
|
|
|
- size: 2,//连接线宽度
|
|
|
- path: "grid",//连接线样式
|
|
|
- startSocket: "bottom",//开始链接元素位置
|
|
|
- endSocket: "left",//结束链接元素位置
|
|
|
- endPlug: 'disc',//结束箭头
|
|
|
- endPlugSize: 2,//结束箭头size
|
|
|
- }))
|
|
|
- lineList.push(new LeaderLine(oldIed, delId, {
|
|
|
- color: "gray",//连接线颜色
|
|
|
- size: 2,//连接线宽度
|
|
|
- path: "grid",//连接线样式
|
|
|
- startSocket: "bottom",//开始链接元素位置
|
|
|
- endSocket: "left",//结束链接元素位置
|
|
|
- endPlug: 'disc',//结束箭头
|
|
|
- endPlugSize: 2,//结束箭头size
|
|
|
- }))
|
|
|
- }
|
|
|
- function lookAdd() {
|
|
|
- lookType.value = 1
|
|
|
- emit('nowBack',lookType.value)
|
|
|
- }
|
|
|
- function lookEdit() {
|
|
|
- lookType.value = 2
|
|
|
- emit('nowBack',lookType.value)
|
|
|
- }
|
|
|
- function lookDel() {
|
|
|
- lookType.value = 3
|
|
|
- emit('nowBack',lookType.value)
|
|
|
- }
|
|
|
- onMounted(()=>{
|
|
|
- setTimeout(()=>{
|
|
|
- lineWrite()
|
|
|
- },1500)
|
|
|
- })
|
|
|
- onBeforeUnmount(()=>{
|
|
|
- lineList.forEach(item=>item.remove())
|
|
|
- })
|
|
|
- return {
|
|
|
- lineWrite,
|
|
|
- lineList,
|
|
|
- lookType,
|
|
|
- lookAdd,//查看新增
|
|
|
- lookDel,//查看删除
|
|
|
- lookEdit,//查看修改
|
|
|
- }
|
|
|
- }
|
|
|
-}
|
|
|
+<script setup>
|
|
|
+import {
|
|
|
+ ref,
|
|
|
+ onMounted,
|
|
|
+ toRefs,
|
|
|
+ watch,
|
|
|
+ onBeforeUnmount,
|
|
|
+ defineEmits,
|
|
|
+} from "vue";
|
|
|
+import LeaderLine from "../../../../public/leader-line.min.js";
|
|
|
+import jiantouPng from "@/assets/image/scdcheck/jiantou.png";
|
|
|
+import modifyPng from "@/assets/image/scdcheck/modify.png";
|
|
|
+import newlyPng from "@/assets/image/scdcheck/newly.png";
|
|
|
+import delPng from "@/assets/image/scdcheck/del.png";
|
|
|
+let lineList = [];
|
|
|
+let lookType = ref(0);
|
|
|
+const emit = defineEmits(["nowBack"]);
|
|
|
+const lineWrite = () => {
|
|
|
+ let oldIed = document.getElementById("oldIed");
|
|
|
+ let newIed = document.getElementById("newIed");
|
|
|
+ let addId = document.getElementById("addId");
|
|
|
+ let editId = document.getElementById("editId");
|
|
|
+ let delId = document.getElementById("delId");
|
|
|
+ lineList.push(
|
|
|
+ new LeaderLine(oldIed, addId, {
|
|
|
+ color: "#7484AB", //连接线颜色
|
|
|
+ size: 2, //连接线宽度
|
|
|
+ path: "grid", //连接线样式
|
|
|
+ startSocket: "bottom", //开始链接元素位置
|
|
|
+ endSocket: "left", //结束链接元素位置
|
|
|
+ endPlug: "disc", //结束箭头
|
|
|
+ endPlugSize: 2, //结束箭头size
|
|
|
+ })
|
|
|
+ );
|
|
|
+ lineList.push(
|
|
|
+ new LeaderLine(oldIed, editId, {
|
|
|
+ color: "#7484AB", //连接线颜色
|
|
|
+ size: 2, //连接线宽度
|
|
|
+ path: "grid", //连接线样式
|
|
|
+ startSocket: "bottom", //开始链接元素位置
|
|
|
+ endSocket: "left", //结束链接元素位置
|
|
|
+ endPlug: "disc", //结束箭头
|
|
|
+ endPlugSize: 2, //结束箭头size
|
|
|
+ })
|
|
|
+ );
|
|
|
+ lineList.push(
|
|
|
+ new LeaderLine(oldIed, delId, {
|
|
|
+ color: "#7484AB", //连接线颜色
|
|
|
+ size: 2, //连接线宽度
|
|
|
+ path: "grid", //连接线样式
|
|
|
+ startSocket: "bottom", //开始链接元素位置
|
|
|
+ endSocket: "left", //结束链接元素位置
|
|
|
+ endPlug: "disc", //结束箭头
|
|
|
+ endPlugSize: 2, //结束箭头size
|
|
|
+ })
|
|
|
+ );
|
|
|
+};
|
|
|
+const lookAdd = () => {
|
|
|
+ lookType.value = 1;
|
|
|
+ emit("nowBack", lookType.value);
|
|
|
+};
|
|
|
+const lookEdit = () => {
|
|
|
+ lookType.value = 2;
|
|
|
+ emit("nowBack", lookType.value);
|
|
|
+};
|
|
|
+const lookDel = () => {
|
|
|
+ lookType.value = 3;
|
|
|
+ emit("nowBack", lookType.value);
|
|
|
+};
|
|
|
+onMounted(() => {
|
|
|
+ setTimeout(() => {
|
|
|
+ lineWrite();
|
|
|
+ }, 1500);
|
|
|
+});
|
|
|
+onBeforeUnmount(() => {
|
|
|
+ lineList.forEach((item) => item.remove());
|
|
|
+});
|
|
|
</script>
|
|
|
|
|
|
-<style>
|
|
|
+<style scoped lang="scss">
|
|
|
+.main {
|
|
|
+ display: flex;
|
|
|
+ justify-content: center;
|
|
|
+}
|
|
|
p {
|
|
|
- margin: 0;
|
|
|
- padding: 0;
|
|
|
+ margin: 0;
|
|
|
+ padding: 0;
|
|
|
+ font-size: 16px;
|
|
|
}
|
|
|
-.scdBox {
|
|
|
- width: 33%;
|
|
|
- height: auto;
|
|
|
- text-align: center;
|
|
|
- /* border: 1px solid red; */
|
|
|
+.scdBox,.crcBox,.iedBox {
|
|
|
+ width:23%;
|
|
|
+ height: auto;
|
|
|
+ text-align: center;
|
|
|
+ /* border: 1px solid red; */
|
|
|
}
|
|
|
|
|
|
.crcBox {
|
|
|
- width: 33%;
|
|
|
- height: auto;
|
|
|
- text-align: center;
|
|
|
- /* border: 1px solid red; */
|
|
|
}
|
|
|
|
|
|
.iedBox {
|
|
|
- width: 33%;
|
|
|
- height: auto;
|
|
|
- text-align: center;
|
|
|
- /* border: 1px solid red; */
|
|
|
- position: relative;
|
|
|
+ position: relative;
|
|
|
}
|
|
|
#newIed {
|
|
|
- position: absolute;
|
|
|
- top: 100px;
|
|
|
- right: -10px;
|
|
|
-}
|
|
|
-
|
|
|
-#oldScd {
|
|
|
- margin-bottom: 40px;
|
|
|
-}
|
|
|
-
|
|
|
-#oldCrc {
|
|
|
- margin-bottom: 40px;
|
|
|
+ position: absolute;
|
|
|
+ right: -50px;
|
|
|
+ margin-top: 24px;
|
|
|
+ span{
|
|
|
+ font-size: 16px;
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
-#addId {
|
|
|
- display: flex;
|
|
|
- justify-content: center;
|
|
|
- align-items: center;
|
|
|
- width: 112px;
|
|
|
- height: 40px;
|
|
|
- border: 1px dashed #1D48E8;
|
|
|
- background-color: rgb(239, 243, 255);
|
|
|
- border-radius: 5px;
|
|
|
- margin-bottom: 20px;
|
|
|
- cursor: pointer;
|
|
|
+#addId,#editId,#delId {
|
|
|
+ display: flex;
|
|
|
+ justify-content: center;
|
|
|
+ align-items: center;
|
|
|
+ width: 112px;
|
|
|
+ height: 40px;
|
|
|
+ border: 2px dashed #255CE7;
|
|
|
+ background-color: rgb(239, 243, 255);
|
|
|
+ border-radius: 2px;
|
|
|
+ margin-bottom: 20px;
|
|
|
+ cursor: pointer;
|
|
|
}
|
|
|
|
|
|
#editId {
|
|
|
- display: flex;
|
|
|
- justify-content: center;
|
|
|
- align-items: center;
|
|
|
- width: 112px;
|
|
|
- height: 40px;
|
|
|
- border: 1px dashed #FECC2A;
|
|
|
- background-color: rgb(255, 251, 242);
|
|
|
- border-radius: 5px;
|
|
|
- margin-bottom: 20px;
|
|
|
- cursor: pointer;
|
|
|
+ border: 2px dashed #FFCB11;
|
|
|
+ background-color: rgb(255, 251, 242);
|
|
|
}
|
|
|
|
|
|
#delId {
|
|
|
- display: flex;
|
|
|
- justify-content: center;
|
|
|
- align-items: center;
|
|
|
- width: 112px;
|
|
|
- height: 40px;
|
|
|
- border: 1px dashed red;
|
|
|
- background-color: rgb(255, 236, 236);
|
|
|
- border-radius: 5px;
|
|
|
- margin-bottom: 20px;
|
|
|
- cursor: pointer;
|
|
|
+ border: 2px dashed #E50505;
|
|
|
+ background-color: rgb(255, 236, 236);
|
|
|
+}
|
|
|
+.jiantou {
|
|
|
+ width: 10px;
|
|
|
+ height: 42px;
|
|
|
+ margin: 4px 0;
|
|
|
+}
|
|
|
+#oldScd,
|
|
|
+#oldCrc {
|
|
|
+ color: #7484ab;
|
|
|
+ font-size: 16px;
|
|
|
+}
|
|
|
+#newScd,
|
|
|
+#newCrc {
|
|
|
+ font-size: 16px;
|
|
|
+}
|
|
|
+.navs {
|
|
|
+ color: #1a2447;
|
|
|
+ font-size: 16px;
|
|
|
+ margin-bottom: 24px;
|
|
|
+}
|
|
|
+.icons{
|
|
|
+ width: 20px;
|
|
|
+ height: 20px;
|
|
|
+ margin-right: 4px;
|
|
|
}
|
|
|
</style>
|