|
@@ -0,0 +1,231 @@
|
|
|
+<template>
|
|
|
+ <el-container>
|
|
|
+ <el-header class="custom-header">
|
|
|
+ <el-space :size="spacesize">
|
|
|
+ <el-button>
|
|
|
+ <img :src="getImgPath('newproject.png')" style="width: 24px;" />
|
|
|
+ </el-button>
|
|
|
+ <el-button>
|
|
|
+ <img :src="getImgPath('save.png')" style="width: 24px;" />
|
|
|
+ </el-button>
|
|
|
+ <el-button>
|
|
|
+ <img :src="getImgPath('importpro.png')" style="width: 24px;" />
|
|
|
+ </el-button>
|
|
|
+ <el-button>
|
|
|
+ <img :src="getImgPath('exportpro.png')" style="width: 24px;" />
|
|
|
+ </el-button>
|
|
|
+ <el-divider direction="vertical" ></el-divider>
|
|
|
+ <el-button>
|
|
|
+ <img :src="getImgPath('back.png')" style="width: 24px;" />
|
|
|
+ </el-button>
|
|
|
+ <el-button>
|
|
|
+ <img :src="getImgPath('goon.png')" style="width: 24px;" />
|
|
|
+ </el-button>
|
|
|
+ <el-divider direction="vertical" ></el-divider>
|
|
|
+ <el-button>
|
|
|
+ <img :src="getImgPath('temp.png')" style="width: 24px;" />
|
|
|
+ </el-button>
|
|
|
+ <el-divider direction="vertical" ></el-divider>
|
|
|
+ <el-button>
|
|
|
+ <img :src="getImgPath('temp.png')" style="width: 24px;" />
|
|
|
+ </el-button>
|
|
|
+ <el-divider direction="vertical" ></el-divider>
|
|
|
+ <el-button>
|
|
|
+ <img :src="getImgPath('temp.png')" style="width: 24px;" />
|
|
|
+ </el-button>
|
|
|
+ <el-button>
|
|
|
+ <img :src="getImgPath('temp.png')" style="width: 24px;" />
|
|
|
+ </el-button>
|
|
|
+ <el-button>
|
|
|
+ <img :src="getImgPath('temp.png')" style="width: 24px;" />
|
|
|
+ </el-button>
|
|
|
+ <el-button>
|
|
|
+ <img :src="getImgPath('temp.png')" style="width: 24px;" />
|
|
|
+ </el-button>
|
|
|
+ <el-button>
|
|
|
+ <img :src="getImgPath('temp.png')" style="width: 24px;" />
|
|
|
+ </el-button>
|
|
|
+ <el-button>
|
|
|
+ <img :src="getImgPath('temp.png')" style="width: 24px;" />
|
|
|
+ </el-button>
|
|
|
+ <el-button>
|
|
|
+ <img :src="getImgPath('temp.png')" style="width: 24px;" />
|
|
|
+ </el-button>
|
|
|
+ <el-button>
|
|
|
+ <img :src="getImgPath('temp.png')" style="width: 24px;" />
|
|
|
+ </el-button>
|
|
|
+ <el-divider direction="vertical" ></el-divider>
|
|
|
+ <el-button>
|
|
|
+ <img :src="getImgPath('text.png')" style="width: 24px;" />
|
|
|
+ </el-button>
|
|
|
+ <el-button>
|
|
|
+ <img :src="getImgPath('text2.png')" style="width: 24px;" />
|
|
|
+ </el-button>
|
|
|
+ <el-button>
|
|
|
+ <img :src="getImgPath('text3.png')" style="width: 24px;" />
|
|
|
+ </el-button>
|
|
|
+ <el-divider direction="vertical" ></el-divider>
|
|
|
+ <el-button>
|
|
|
+ <img :src="getImgPath('temp.png')" style="width: 24px;" />
|
|
|
+ </el-button>
|
|
|
+ </el-space>
|
|
|
+ </el-header>
|
|
|
+ <splitpanes class="default-theme">
|
|
|
+ <pane min-size="10" size="20" max-size="50" class="custom-aside">
|
|
|
+ <el-tabs type="border-card" class="full-height-tabs">
|
|
|
+
|
|
|
+ <el-tab-pane label="Liberal">
|
|
|
+ <el-collapse v-model="colactiveNames">
|
|
|
+ <el-collapse-item
|
|
|
+ v-for="item in collapseData"
|
|
|
+ :key="item.ftypecode"
|
|
|
+ :title="item.ftypedesc"
|
|
|
+ :name="String(item.ftypecode)"
|
|
|
+ >
|
|
|
+ <div class="coms-container">
|
|
|
+ <div
|
|
|
+ v-for="com in item.coms"
|
|
|
+ :key="com.comId"
|
|
|
+ class="com-item"
|
|
|
+ >
|
|
|
+ <img
|
|
|
+
|
|
|
+ :src="getImgPath('temp.png')"
|
|
|
+ alt="component image"
|
|
|
+ class="com-image"
|
|
|
+ />
|
|
|
+ <div class="com-name">{{ com.name }}</div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </el-collapse-item>
|
|
|
+ </el-collapse>
|
|
|
+ </el-tab-pane>
|
|
|
+
|
|
|
+ <el-tab-pane label="Project"></el-tab-pane>
|
|
|
+
|
|
|
+ </el-tabs>
|
|
|
+ </pane>
|
|
|
+ <pane class="custom-main">
|
|
|
+ <div class="main-header">
|
|
|
+ <el-tabs type="border-card">
|
|
|
+ <el-tab-pane label="Topology">
|
|
|
+ <el-space :size="spacesize">
|
|
|
+ <el-button
|
|
|
+ v-for="(item, index) in mainbuttons"
|
|
|
+ :key="index"
|
|
|
+ class="custom-icon-button"
|
|
|
+ >
|
|
|
+ <img :src="getImgPath(item.img)" style="width: 24px;" />
|
|
|
+ </el-button>
|
|
|
+ </el-space>
|
|
|
+ </el-tab-pane>
|
|
|
+ </el-tabs>
|
|
|
+ </div>
|
|
|
+ <div class="flow-content">
|
|
|
+
|
|
|
+ </div>
|
|
|
+ </pane>
|
|
|
+ </splitpanes>
|
|
|
+ </el-container>
|
|
|
+
|
|
|
+</template>
|
|
|
+
|
|
|
+<script setup>
|
|
|
+import { Splitpanes, Pane } from 'splitpanes'
|
|
|
+import 'splitpanes/dist/splitpanes.css'
|
|
|
+import { request } from "@/utils/request";
|
|
|
+import { ElMessage} from 'element-plus'
|
|
|
+import { useProjectStore } from '@/store/project'
|
|
|
+import { useI18n } from 'vue-i18n'
|
|
|
+
|
|
|
+const { t, locale } = useI18n()
|
|
|
+
|
|
|
+const projectStore = useProjectStore()
|
|
|
+
|
|
|
+const getImgPath = (url) => {
|
|
|
+ return new URL(`../../assets/img/${url}`, import.meta.url).href
|
|
|
+}
|
|
|
+
|
|
|
+let pid = computed(() => projectStore.pid || '')
|
|
|
+
|
|
|
+let spacesize = ref(10);
|
|
|
+let colactiveNames = ref(['1'])
|
|
|
+let collapseData = ref();
|
|
|
+
|
|
|
+let mainbuttons = ref([
|
|
|
+ {img: 'temp.png'},
|
|
|
+ {img: 'temp.png'},
|
|
|
+ {img: 'temp.png'},
|
|
|
+ {img: 'temp.png'},
|
|
|
+ {img: 'temp.png'},
|
|
|
+ {img: 'temp.png'},
|
|
|
+ {img: 'temp.png'},
|
|
|
+ {img: 'temp.png'},
|
|
|
+ {img: 'temp.png'},
|
|
|
+])
|
|
|
+
|
|
|
+const getComponent = () => {
|
|
|
+ const params = {
|
|
|
+ transCode: 'ES1001',
|
|
|
+ pid:pid.value
|
|
|
+ };
|
|
|
+ request(params)
|
|
|
+ .then((res) => {
|
|
|
+ console.log(res);
|
|
|
+ collapseData.value = res.rows;
|
|
|
+ console.log('zujian:',collapseData.value)
|
|
|
+ })
|
|
|
+ .catch((err) => {
|
|
|
+ ElMessage.error(err.returnMsg);
|
|
|
+ });
|
|
|
+}
|
|
|
+
|
|
|
+onMounted(() => {
|
|
|
+ getComponent();
|
|
|
+});
|
|
|
+
|
|
|
+</script>
|
|
|
+
|
|
|
+<style scoped>
|
|
|
+.main-header {
|
|
|
+ height: 32px;
|
|
|
+ background: #EEEEEE;
|
|
|
+ border-radius: 0px 0px 0px 0px;
|
|
|
+ border: 4px solid #EEEEEE;
|
|
|
+}
|
|
|
+
|
|
|
+.main-header :deep(.el-tabs--border-card>.el-tabs__content) {
|
|
|
+ padding: 5px 15px;
|
|
|
+}
|
|
|
+
|
|
|
+.main-header :deep(.el-tabs__content) {
|
|
|
+ background: #FFFFFF;
|
|
|
+ border-radius: 0px 0px 0px 0px;
|
|
|
+ border: 1px solid #D8D8D8;
|
|
|
+}
|
|
|
+
|
|
|
+.coms-container {
|
|
|
+ display: flex;
|
|
|
+ flex-wrap: wrap;
|
|
|
+ gap: 10px;
|
|
|
+}
|
|
|
+.com-item {
|
|
|
+ display: flex;
|
|
|
+ justify-content: start;
|
|
|
+ align-items: center;
|
|
|
+ width: 130px;
|
|
|
+}
|
|
|
+.com-image {
|
|
|
+ width: 24px;
|
|
|
+ height: 24px;
|
|
|
+ object-fit: contain;
|
|
|
+}
|
|
|
+.com-name {
|
|
|
+ font-size: 11px;
|
|
|
+}
|
|
|
+
|
|
|
+.flow-content {
|
|
|
+ width: 100%;
|
|
|
+ flex: 1;
|
|
|
+}
|
|
|
+</style>
|