yunxing 4 년 전
부모
커밋
c8fd8a06d9
4개의 변경된 파일146개의 추가작업 그리고 94개의 파일을 삭제
  1. 65 0
      src/components/editview/addEquipmentDialog.vue
  2. 0 0
      src/components/editview/equipmentDeatilDialog.vue
  3. 80 93
      src/views/editer.vue
  4. 1 1
      src/views/home.vue

+ 65 - 0
src/components/editview/addEquipmentDialog.vue

@@ -0,0 +1,65 @@
+/**
+ * 添加设备 显示实例
+ */
+<template>
+    <div class="add-equipment">
+        <el-dialog custom-class="equipment-detail-dialog" title="添加显示实例" :visible.sync="dialogTableVisible">
+            <div class="header">
+                <span>选择设备:</span>
+                <Cascader caption="设备实例范围:" multiple :data="cascaderData1" showPanel width="300"></Cascader>
+            </div>
+        </el-dialog>
+    </div>
+</template>
+<script>
+/**
+ * 添加设备 显示实例
+ */
+export default {
+    name: "addEquipmentDialog",
+    props: {},
+    components: {},
+    data() {
+        return {
+            dialogTableVisible: true,
+            cascaderData1: [
+                {
+                    title: "1",
+                    code: "1code",
+                    children: [
+                        {
+                            title: "1_1",
+                            code: "1_1code",
+                        },
+                        {
+                            title: "1_2",
+                            code: "1_2code",
+                        },
+                    ],
+                },
+                {
+                    title: "2",
+                    code: "2code",
+                    children: [
+                        {
+                            title: "2_1",
+                            code: "2_1code",
+                        },
+                    ],
+                },
+            ],
+        };
+    },
+    created() {},
+    methods: {},
+};
+</script>
+<style lang='less' scoped>
+.add-equipment {
+    /deep/ .equipment-detail-dialog {
+        width: 1200px;
+        height: 648px;
+        // background-color: blueviolet;
+    }
+}
+</style>

src/components/editview/equipmentDeatil.vue → src/components/editview/equipmentDeatilDialog.vue


+ 80 - 93
src/views/editer.vue

@@ -1,112 +1,99 @@
 <template>
-  <div class="editer">
-    <div class="top-bar">
-      <div class="left">
-        <div class="project-name">{{ tupoName }}</div>
-        <div class="project-type">/ {{ categoryName }}</div>
-        <div class="project-save">自动保存成功- v {{ version }}</div>
-      </div>
-      <div class="right">
-        <el-tooltip
-          class="item"
-          effect="dark"
-          content="下载"
-          placement="bottom"
-        >
-          <span @click="saveTopoImg" class="icon iconfont icon-xiazai"></span>
-        </el-tooltip>
-        <el-tooltip
-          class="item"
-          effect="dark"
-          content="保存"
-          placement="bottom"
-        >
-          <span @click="saveTopo" class="icon iconfont icon-baocun"></span>
-        </el-tooltip>
-        <el-tooltip
-          class="item"
-          effect="dark"
-          content="发布"
-          placement="bottom"
-        >
-          <span @click="issueTopo" class="icon iconfont icon-fabu"></span>
-        </el-tooltip>
-      </div>
+    <div class="editer">
+        <div class="top-bar">
+            <div class="left">
+                <div class="project-name">{{ tupoName }}</div>
+                <div class="project-type">/ {{ categoryName }}</div>
+                <div class="project-save">自动保存成功- v {{ version }}</div>
+            </div>
+            <div class="right">
+                <el-tooltip class="item" effect="dark" content="下载" placement="bottom">
+                    <span @click="saveTopoImg" class="icon iconfont icon-xiazai"></span>
+                </el-tooltip>
+                <el-tooltip class="item" effect="dark" content="保存" placement="bottom">
+                    <span @click="saveTopo" class="icon iconfont icon-baocun"></span>
+                </el-tooltip>
+                <el-tooltip class="item" effect="dark" content="发布" placement="bottom">
+                    <span @click="issueTopo" class="icon iconfont icon-fabu"></span>
+                </el-tooltip>
+            </div>
+        </div>
+        <topo-editer></topo-editer>
+        <add-equipment />
     </div>
-    <topo-editer></topo-editer>
-  </div>
 </template>
 <script>
 import topoEditer from "@/components/editview/topoEditer.vue";
 import bus from "@/bus/bus";
 import { mapState } from "vuex";
+import addEquipment from "@/components/editview/addEquipmentDialog";
 export default {
-  components: { topoEditer },
-  data() {
-    return {
-      categoryName: "", //项目分类
-    };
-  },
-  methods: {
-    // 保存图片
-    saveTopo() {
-      bus.$emit("saveTopo");
+    components: { topoEditer, addEquipment },
+    data() {
+        return {
+            categoryName: "", //项目分类
+        };
     },
-    // 发布
-    issueTopo() {
-      bus.$emit("issueTopo");
+    methods: {
+        // 保存图片
+        saveTopo() {
+            bus.$emit("saveTopo");
+        },
+        // 发布
+        issueTopo() {
+            bus.$emit("issueTopo");
+        },
+        // 下载图片
+        saveTopoImg() {
+            bus.$emit("saveTopoImg");
+        },
     },
-    // 下载图片
-    saveTopoImg() {
-      bus.$emit("saveTopoImg");
+    computed: {
+        ...mapState(["tupoName", "version"]),
+    },
+    mounted() {
+        this.categoryName = decodeURI(this.$route.query.categoryName);
     },
-  },
-  computed: {
-    ...mapState(["tupoName", "version"]),
-  },
-  mounted() {
-    this.categoryName = decodeURI(this.$route.query.categoryName);
-  },
 };
 </script>
 <style lang="less" scoped>
 .editer {
-  width: 100%;
-  height: calc(~"100% - 37px");
-  .top-bar {
     width: 100%;
-    height: 36px;
-    border-bottom: 1px solid #e4e5e7;
-    padding: 0 20px 0 20px;
-    box-sizing: border-box;
-    display: flex;
-    align-items: center;
-    justify-content: space-between;
-    .left {
-      display: flex;
-      align-items: center;
-      .project-name {
-        font-size: 16px;
-        color: #1f2429;
-        font-weight: bold;
-      }
-      .project-type {
-        color: #8d9399;
-        font-size: 14px;
-        margin: 0 4px;
-      }
-      .project-save {
-        color: #8d9399;
-        font-size: 12px;
-        margin-left: 16px;
-      }
-    }
-    .right {
-      span {
-        margin-left: 20px;
-        cursor: pointer;
-      }
+    height: calc(~"100% - 37px");
+    .top-bar {
+        width: 100%;
+        height: 36px;
+        border-bottom: 1px solid #e4e5e7;
+        padding: 0 20px 0 20px;
+        box-sizing: border-box;
+        display: flex;
+        align-items: center;
+        justify-content: space-between;
+        .left {
+            display: flex;
+            align-items: center;
+            .project-name {
+                font-size: 16px;
+                color: #1f2429;
+                font-weight: bold;
+            }
+            .project-type {
+                color: #8d9399;
+                font-size: 14px;
+                margin: 0 4px;
+            }
+            .project-save {
+                color: #8d9399;
+                font-size: 12px;
+                margin-left: 16px;
+            }
+        }
+        .right {
+            span {
+                margin-left: 20px;
+                cursor: pointer;
+            }
+        }
     }
-  }
 }
 </style>

+ 1 - 1
src/views/home.vue

@@ -131,7 +131,7 @@ import recycle from "@/components/homeView/recycle";
 import createGraphDialog from "@/components/homeView/createGraphDialog";
 import createCanvasDialog from "@/components/homeView/createCanvasDialog";
 import { SNetUtil } from "@persagy-web/base";
-import equipmentDeatil from "@/components/editview/equipmentDeatil";
+import equipmentDeatil from "@/components/editview/equipmentDeatilDialog";
 export default {
     name: "home",
     // components: { leftAsideTree, createGraphDialog },