|
@@ -19,7 +19,10 @@
|
|
|
:key="index"
|
|
|
@click="tagClick(item, index)"
|
|
|
>
|
|
|
- {{ item.desc }}
|
|
|
+ <span v-if="!OpensclTrue">{{
|
|
|
+ `(${item.ied_name})${item.desc}`
|
|
|
+ }}</span>
|
|
|
+ <span v-else>{{ `(${item.ied_name})${item.ied_desc}` }}</span>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="setting">
|
|
@@ -29,136 +32,229 @@
|
|
|
highlight-current
|
|
|
@node-click="handleNodeClick"
|
|
|
>
|
|
|
- <template #default="{ node }">
|
|
|
- <span class="label" :class="{'tree-label':node.expanded}">{{ node.label }}</span>
|
|
|
- </template>
|
|
|
- </el-tree>
|
|
|
+ <template #default="{ node }">
|
|
|
+ <span class="label" :class="{ 'tree-label': node.expanded }">{{
|
|
|
+ node.label
|
|
|
+ }}</span>
|
|
|
+ </template>
|
|
|
+ </el-tree>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
-<script>
|
|
|
+<script setup>
|
|
|
import { ref, onMounted, toRefs, watch } from "vue";
|
|
|
import cid from "@/api/cid/cid";
|
|
|
import scdCheck from "@/api/scdCheck/scdCheck";
|
|
|
import { stringify } from "uuid";
|
|
|
-export default {
|
|
|
- props: {
|
|
|
- nowScdId: {
|
|
|
- type: Number || String,
|
|
|
- required: true,
|
|
|
- },
|
|
|
+import { useRoute } from "vue-router";
|
|
|
+const route = useRoute();
|
|
|
+const props = defineProps({
|
|
|
+ nowScdId: {
|
|
|
+ type: Number || String,
|
|
|
+ required: true,
|
|
|
},
|
|
|
- setup(props, { emit }) {
|
|
|
- let tagList = ref([]);
|
|
|
- let tagChoose = ref(0);
|
|
|
- let treeData = ref([
|
|
|
- {
|
|
|
- label: "通信参数部分",
|
|
|
- children: [
|
|
|
- {
|
|
|
- label: "站控层通信参数",
|
|
|
- },
|
|
|
- {
|
|
|
- label: "GOOSE通信参数",
|
|
|
- },
|
|
|
- {
|
|
|
- label: "SV通信参数",
|
|
|
- },
|
|
|
- ],
|
|
|
- },
|
|
|
- {
|
|
|
- label: "测点信息部分",
|
|
|
- children: [
|
|
|
- {
|
|
|
- label: "信息部分-1",
|
|
|
- },
|
|
|
- ],
|
|
|
- },
|
|
|
- {
|
|
|
- label: "回路配置",
|
|
|
- children: [
|
|
|
- {
|
|
|
- label: "回路配置-1",
|
|
|
- },
|
|
|
- ],
|
|
|
- },
|
|
|
- {
|
|
|
- label: "建模信息",
|
|
|
- children: [
|
|
|
- {
|
|
|
- label: "建模信息-1",
|
|
|
- },
|
|
|
- ],
|
|
|
- },
|
|
|
- ]);
|
|
|
- let needName = ref("");
|
|
|
- let defaultProps = ref({
|
|
|
- label: "label",
|
|
|
- children: "children",
|
|
|
+ OpensclTrue: {
|
|
|
+ type: Boolean,
|
|
|
+ default: false,
|
|
|
+ },
|
|
|
+ iedRelation: {
|
|
|
+ type: Object,
|
|
|
+ default: () => {},
|
|
|
+ },
|
|
|
+});
|
|
|
+const emit = defineEmits(["treeBack"]);
|
|
|
+let tagList = ref([]);
|
|
|
+let tagChoose = ref(0);
|
|
|
+let treeData = ref([
|
|
|
+ {
|
|
|
+ label: "装置信息",
|
|
|
+ num: 1,
|
|
|
+ children: [
|
|
|
+ {
|
|
|
+ label: "基本信息",
|
|
|
+ num: 1,
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "通信参数",
|
|
|
+ num: 3,
|
|
|
+ children: [
|
|
|
+ {
|
|
|
+ label: "通信接入点",
|
|
|
+ num: 2,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "站控层通信参数",
|
|
|
+ num: 1,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "GOOSE 通信参数",
|
|
|
+ num: 0,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "SV 通信参数",
|
|
|
+ num: 0,
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "测点",
|
|
|
+ num: 409,
|
|
|
+ children: [
|
|
|
+ {
|
|
|
+ label: "遥信",
|
|
|
+ num: 97,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "遥控",
|
|
|
+ num: 14,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "遥测",
|
|
|
+ num: 2,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "遥脉",
|
|
|
+ num: 0,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "定值",
|
|
|
+ num: 296,
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "回路配置",
|
|
|
+ children: [
|
|
|
+ {
|
|
|
+ label: "回路配置-1",
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "回路配置",
|
|
|
+ num: 205,
|
|
|
+ children: [
|
|
|
+ {
|
|
|
+ label: "发布虚端子",
|
|
|
+ num: 109,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "定阅虚端子",
|
|
|
+ num: 96,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "虚回路信息",
|
|
|
+ num: 96,
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "建模信息",
|
|
|
+ num: 116,
|
|
|
+ children: [
|
|
|
+ {
|
|
|
+ label: "数据集",
|
|
|
+ num: 0,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "数据集成员",
|
|
|
+ num: 109,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "GOOSE控制块",
|
|
|
+ num: 0,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "SV控制块",
|
|
|
+ num: 0,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "报告控制块",
|
|
|
+ num: 7,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "日志控制块",
|
|
|
+ num: 0,
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ },
|
|
|
+]);
|
|
|
+let needName = ref("");
|
|
|
+let defaultProps = ref({
|
|
|
+ label: "label",
|
|
|
+ children: "children",
|
|
|
+});
|
|
|
+let scdId = ref(""); //传递的scdid
|
|
|
+watch(
|
|
|
+ () => props.nowScdId,
|
|
|
+ (newVal) => {
|
|
|
+ scdId.value = newVal;
|
|
|
+ }
|
|
|
+);
|
|
|
+watch(
|
|
|
+ () => props.iedRelation,
|
|
|
+ (newValue) => {
|
|
|
+ if (newValue) {
|
|
|
+ console.log('first', newValue)
|
|
|
+ tagList.value =newValue;
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+);
|
|
|
+const reload = () => {
|
|
|
+ scdId.value = props.nowScdId;
|
|
|
+ if (!props.OpensclTrue) {
|
|
|
+ cid.getAll({ scd_id: scdId.value - 0, ied_name: "" }).then((res) => {
|
|
|
+ tagList.value = res.data;
|
|
|
});
|
|
|
- let scdId = ref(""); //传递的scdid
|
|
|
- watch(
|
|
|
- () => props.nowScdId,
|
|
|
- (newVal) => {
|
|
|
- scdId.value = newVal;
|
|
|
+ }
|
|
|
+};
|
|
|
+const tagClick = (row, num) => {
|
|
|
+ tagChoose.value = num;
|
|
|
+ cid
|
|
|
+ .findFile({
|
|
|
+ scd_id: scdId.value - 0,
|
|
|
+ ied_name: row.desc,
|
|
|
+ pageno: 1,
|
|
|
+ pagesize: 10,
|
|
|
+ station_id: route.query.stationId,
|
|
|
+ })
|
|
|
+ .then((res) => {});
|
|
|
+ scdCheck
|
|
|
+ .lookCheck({
|
|
|
+ pageindex: 1,
|
|
|
+ pagesize: 10,
|
|
|
+ station_id: route.query.stationId,
|
|
|
+ scd_id: scdId.value - 0,
|
|
|
+ is_checkin: 2,
|
|
|
+ ied_name: row.ied_name,
|
|
|
+ })
|
|
|
+ .then((res) => {
|
|
|
+ let fileInfo;
|
|
|
+ if (res.data) {
|
|
|
+ fileInfo = res.data.filter((item) => item.scd_id == scdId.value);
|
|
|
+ console.log("res", fileInfo);
|
|
|
+ if (fileInfo.length > 0) {
|
|
|
+ emit("treeBack", row, fileInfo[0]);
|
|
|
+ }
|
|
|
}
|
|
|
- );
|
|
|
- function reload() {
|
|
|
- scdId.value = props.nowScdId;
|
|
|
- cid.getAll({ scd_id: scdId.value - 0, ied_name: "" }).then((res) => {
|
|
|
- tagList.value = res.data;
|
|
|
- });
|
|
|
- }
|
|
|
- function tagClick(row, num) {
|
|
|
- tagChoose.value = num;
|
|
|
- cid
|
|
|
- .findFile({
|
|
|
- scd_id: scdId.value - 0,
|
|
|
- ied_name: row.desc,
|
|
|
- pageno: 1,
|
|
|
- pagesize: 10,
|
|
|
- station_id: 861,
|
|
|
- })
|
|
|
- .then((res) => {
|
|
|
- console.log(res, "文件");
|
|
|
- });
|
|
|
- scdCheck
|
|
|
- .lookCheck({
|
|
|
- pageindex: 1,
|
|
|
- pagesize: 10,
|
|
|
- station_id: 861,
|
|
|
- scd_id: scdId.value - 0,
|
|
|
- is_checkin: 2,
|
|
|
- ied_name: row.ied_name,
|
|
|
- })
|
|
|
- .then((res) => {
|
|
|
- // let a = res.data.filter((item) => item.type_name == "CID");
|
|
|
- // if (a.length > 0) {
|
|
|
- // needName.value = a[0].file_name;
|
|
|
- // emit("treeBack", needName.value, a[0].id);
|
|
|
- // }
|
|
|
- });
|
|
|
- }
|
|
|
- function handleNodeClick(e) {
|
|
|
- console.log(e, "eee");
|
|
|
- }
|
|
|
- onMounted(() => {
|
|
|
- reload();
|
|
|
+ // let a = res.data.filter((item) => item.type_name == "CID");
|
|
|
+ // if (a.length > 0) {
|
|
|
+ // needName.value = a[0].file_name;
|
|
|
+ // emit("treeBack", needName.value, a[0].id);
|
|
|
+ // }
|
|
|
});
|
|
|
- return {
|
|
|
- tagList, //标签数据
|
|
|
- tagChoose, //标签点击事件
|
|
|
- treeData, //树形数据
|
|
|
- tagClick, //tag点击事件
|
|
|
- defaultProps, //树形默认展示
|
|
|
- handleNodeClick, //树形点击事件
|
|
|
- needName, //返回父组件的名称
|
|
|
- scdId, //传递的scdid
|
|
|
- };
|
|
|
- },
|
|
|
};
|
|
|
+const handleNodeClick = (e) => {
|
|
|
+ console.log(e, "eee");
|
|
|
+};
|
|
|
+onMounted(() => {
|
|
|
+ reload();
|
|
|
+});
|
|
|
</script>
|
|
|
|
|
|
<style scoped lang="scss">
|
|
@@ -189,7 +285,7 @@ h3 {
|
|
|
}
|
|
|
.tagBox {
|
|
|
width: 92%;
|
|
|
- height: 50%;
|
|
|
+ height: 45%;
|
|
|
overflow-y: auto;
|
|
|
margin: 8px 16px 0px 16px;
|
|
|
}
|
|
@@ -203,13 +299,33 @@ h3 {
|
|
|
}
|
|
|
.setting {
|
|
|
width: 92%;
|
|
|
- height: 50%;
|
|
|
+ height: 45%;
|
|
|
+ overflow-y: auto;
|
|
|
border-top: 1px solid #a3ade0;
|
|
|
margin: 2px auto;
|
|
|
- :deep(.el-tree--highlight-current .el-tree-node.is-current>.el-tree-node__content .label){
|
|
|
- color: #134BEA;
|
|
|
- border: 1px solid #255CE7;
|
|
|
- padding:5px 8px;
|
|
|
+ .label {
|
|
|
+ padding: 5px 8px;
|
|
|
+ }
|
|
|
+ :deep(.el-tree--highlight-current .el-tree-node) {
|
|
|
+ margin: 5px 0;
|
|
|
+ color: #1a2447;
|
|
|
+ }
|
|
|
+ :deep(
|
|
|
+ .el-tree--highlight-current
|
|
|
+ .el-tree-node.is-current
|
|
|
+ > .el-tree-node__content
|
|
|
+ ) {
|
|
|
+ background: transparent;
|
|
|
+ }
|
|
|
+ :deep(
|
|
|
+ .el-tree--highlight-current
|
|
|
+ .el-tree-node.is-current
|
|
|
+ > .el-tree-node__content
|
|
|
+ .label
|
|
|
+ ) {
|
|
|
+ color: #134bea;
|
|
|
+ border: 1px solid #255ce7;
|
|
|
+ background: #f6f9ff;
|
|
|
}
|
|
|
}
|
|
|
.titles {
|
|
@@ -230,7 +346,7 @@ h3 {
|
|
|
.clicktag {
|
|
|
color: #255ce7;
|
|
|
}
|
|
|
-.tree-label{
|
|
|
- color: #134BEA;
|
|
|
+.tree-label {
|
|
|
+ color: #134bea;
|
|
|
}
|
|
|
</style>
|