Quellcode durchsuchen

删除无用文件

yunxing vor 4 Jahren
Ursprung
Commit
66513e8140

+ 0 - 1
src/components/editview/leftToolBar/legendList.vue

@@ -21,7 +21,6 @@
 import pipeList from "./pipeList.vue";
 import equipmentList from "./equipmentList.vue";
 import spaceList from "./spaceList.vue";
-// import addItemModel from "./addItemModel.vue";
 import addBaseItem from "./addBaseItem.vue";
 import addEquipmentDialog from "./addEquipmentDialog";
 import addSpaceDialog from "./addSpaceDialog";

+ 0 - 3
src/components/editview/planEditer.vue

@@ -8,7 +8,6 @@
                 <leftToolBar></leftToolBar>
             </div>
             <div class="base-topo-editer">
-                <!-- <baseTopoEditer></baseTopoEditer> -->
                 <basePlanEditer></basePlanEditer>
             </div>
             <div class="right-bar">
@@ -20,11 +19,9 @@
 <script>
 import leftToolBar from "./leftToolBar";
 import rightPropertyBar from "./rightPropertyBar";
-// import baseTopoEditer from "./baseTopoEditer";
 import basePlanEditer from "./basePlanEditer";
 import topToolBar from "./topToolBar";
 export default {
-    // components: {baseTopoEditer },
     components: { leftToolBar, rightPropertyBar, topToolBar, basePlanEditer },
     data() {
         return {};

+ 0 - 60
src/components/editview/topoEditer.vue

@@ -1,60 +0,0 @@
-<template>
-    <div class="topo-editer">
-        <div class="top-bar">
-            <topToolBar></topToolBar>
-        </div>
-        <div class="contents">
-            <div class="left-bar">
-                <leftToolBar></leftToolBar>
-            </div>
-            <div class="base-topo-editer">
-                <!-- <baseTopoEditer></baseTopoEditer> -->
-                <basePlanEditer></basePlanEditer>
-            </div>
-            <div class="right-bar">
-                <rightPropertyBar></rightPropertyBar>
-            </div>
-        </div>
-    </div>
-</template>
-<script>
-import leftToolBar from "./leftToolBar";
-import rightPropertyBar from "./rightPropertyBar";
-// import baseTopoEditer from "./baseTopoEditer";
-import basePlanEditer from "./basePlanEditer";
-import topToolBar from "./topToolBar";
-export default {
-    // components: {baseTopoEditer },
-    components: { leftToolBar, rightPropertyBar, topToolBar, basePlanEditer },
-    data() {
-        return {
-            view: null,
-            scene: null,
-        };
-    },
-};
-</script>
-<style lang="less">
-.topo-editer {
-    width: 100%;
-    height: 100%;
-    .top-bar {
-        width: 100%;
-        z-index: 99;
-    }
-    .contents {
-        width: 100%;
-        height: calc(~"100% - 48px");
-        display: flex;
-        justify-content: flex-start;
-        .right-bar {
-            // width: 240px;
-            height: 100%;
-        }
-        .base-topo-editer {
-            flex: 1;
-            height: 100%;
-        }
-    }
-}
-</style>

+ 0 - 237
src/components/homeView/createGraphDialog.vue

@@ -1,237 +0,0 @@
-<template>
-  <el-dialog class="create-dialog" title="新建拓扑图" width="600px" :visible.sync="outerVisible" :close-on-click-modal="false" custom-class="createDialog"
-    @close="closeModal">
-    <graphTypeDialog ref="graphTypeDialog" @selectNode="selectNode"></graphTypeDialog>
-    <div class="dialog-bodys">
-      <el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-width="100px" class="demo-ruleForm" label-position="top">
-        <el-form-item label="所属类别" prop="type">
-          <el-button @click="getprojectType" class="typeButton">
-            <span v-if="buttonStr" style="color:#C3C6CBFF">已选 : </span>
-            {{buttonStr?buttonStr:'请选择所属类别'}}
-          </el-button>
-        </el-form-item>
-        <el-form-item label="名称" prop="name">
-          <el-input v-model="ruleForm.name" placeholder="请输入名称" size="small"></el-input>
-        </el-form-item>
-        <el-form-item label="标签" prop="resource">
-          <div class="tagContainer">
-            <el-tag :key="tag" v-for="tag in dynamicTags" closable :disable-transitions="false" @close="handleClose(tag)">
-              {{tag}}
-            </el-tag>
-            <el-input class="input-new-tag" v-if="inputVisible" v-model="inputValue" ref="saveTagInput" size="small"
-              @keyup.enter.native="handleInputConfirm" @blur="handleInputConfirm" :maxlength="10">
-            </el-input>
-            <el-button v-else class="button-new-tag" size="small" @click="showInput">+ 添加</el-button>
-          </div>
-        </el-form-item>
-      </el-form>
-    </div>
-    <div slot="footer" class="dialog-footer">
-      <el-button @click="resetForm('ruleForm')">取消</el-button>
-      <el-button type="primary" @click="submitForm('ruleForm')">确定</el-button>
-    </div>
-  </el-dialog>
-</template>
-<script>
-import graphTypeDialog from "@/components/homeView/graphTypeDialog"
-import { createGraph } from "@/api/home"
-export default {
-  components: {
-    graphTypeDialog
-  },
-  data() {
-    return {
-      buttonStr: '',
-      ruleForm: {
-        name: "",
-        type: "",
-      },
-      rules: {
-        name: [
-          { required: true, message: "请输入名称", trigger: "blur" },
-          { max: 10, message: "最长为10个文字", trigger: "blur" },
-        ],
-        type: [
-          { required: true, message: "请选择所属类别", trigger: "change" },
-        ]
-      },
-      value: [],
-      outerVisible: false,
-      dynamicTags: [],
-      inputValue: '',
-      inputVisible: false,
-    }
-  },
-  methods: {
-    showDialog() {
-      this.outerVisible = true;
-    },
-    // 获取所属类别
-    getprojectType() {
-      this.$refs.graphTypeDialog.showDialog()
-    },
-    handleClose(tag) {
-      this.dynamicTags.splice(this.dynamicTags.indexOf(tag), 1);
-    },
-    showInput() {
-      this.inputVisible = true;
-      this.$nextTick(_ => {
-        this.$refs.saveTagInput.$refs.input.focus();
-      });
-    },
-    handleInputConfirm() {
-      const inputValue = this.inputValue;
-      if (inputValue) {
-        this.dynamicTags.push(inputValue);
-      }
-      this.inputVisible = false;
-      this.inputValue = '';
-    },
-    // 选好所属类别
-    selectNode(node) {
-      console.log(node);
-      this.ruleForm.type = node.data.code;
-      this.buttonStr = node.data.name
-    },
-    submitForm(formName) {
-      this.$refs[formName].validate((valid) => {
-        if (valid) {
-          this.createDraftsGraph()
-        } else {
-          console.log("error submit!!");
-          return false;
-        }
-      });
-    },
-    resetForm(formName) {
-      this.dynamicTags = [];
-      this.buttonStr= '';
-      this.$refs[formName].resetFields();
-      this.outerVisible = false
-    },
-    // 创建拓扑图接口
-    createDraftsGraph() {
-      const pa = {
-        content: [{
-          categoryId: this.ruleForm.type,
-          name: this.ruleForm.name,
-          label: this.dynamicTags
-        }]
-      }
-      createGraph(pa).then(res => {
-        if (res.result == "success") {
-          this.outerVisible = false;
-          this.$message.success('创建成功');
-          this.$router.push({
-            name: 'Editer',
-            query: {
-              graphId: res.entityList[0].graphId,
-              id: res.entityList[0].id,
-              categoryName: encodeURI(this.buttonStr),
-              isPub: 0
-            }
-          })
-        } else {
-          this.$message(res.message)
-        }
-      })
-    },
-    closeModal() {
-      this.resetForm('ruleForm');
-    }
-  },
-}
-</script>
-<style lang="less" scoped>
-/deep/ .createDialog {
-  /deep/ .el-dialog__header {
-    border-bottom: 1px solid #f0f1f2ff;
-  }
-  .dialog-bodys {
-    // max-height: 250px;
-  }
-  /deep/ .el-dialog__body {
-    padding: 16px 120px;
-    height: 270px;
-    overflow: auto;
-  }
-  .el-dialog__footer {
-    padding: 0 20px 20px;
-    .el-button {
-      padding: 0;
-      width: 80px;
-      height: 32px;
-      text-align: center;
-      line-height: 1;
-    }
-  }
-  .el-form-item {
-    margin-bottom: 0;
-    & + .el-form-item {
-      margin-top: 18px;
-    }
-  }
-  .el-form-item__label {
-    line-height: 1;
-  }
-  .el-tag {
-    background: #eff0f1;
-    border-radius: 2px;
-    color: #1f2429ff;
-    margin: 0 8px 8px 0;
-    padding: 5px 6px 5px 8px;
-    font-size: 14px;
-    height: 24px;
-    line-height: 1;
-    border: none;
-    &:hover {
-      border: none;
-    }
-    .el-icon-close {
-      color: #9ca2a9ff;
-      right: 0;
-      &:hover {
-        color: #fff;
-        background-color: #ccc;
-      }
-    }
-  }
-  .input-new-tag {
-    width: 150px;
-    // input{
-    //   height: 24px;
-    // }
-  }
-  .button-new-tag {
-    width: 60px;
-    height: 24px;
-    margin-bottom: 8px;
-    padding: 0;
-    line-height: 1;
-    border-radius: 2px;
-    border: 1px dotted #0091ff;
-    color: #0091ff;
-    &:hover {
-      background: #fff;
-      color: #0091ff;
-      border: 1px dotted #0091ff;
-    }
-  }
-  .typeButton {
-    min-width: 122px;
-    height: 32px;
-    text-align: center;
-    line-height: 32px;
-    border-radius: 4px;
-    padding: 0;
-    border: 1px solid #c3c6cb;
-  }
-  .tagContainer {
-    width: 100%;
-    border-radius: 4px;
-    border: 1px solid #c3c6cb;
-    padding: 7px 12px;
-    line-height: 1;
-  }
-}
-</style>

+ 0 - 139
src/components/homeView/graphTypeDialog.vue

@@ -1,139 +0,0 @@
-<template>
-  <el-dialog class="create-dialog-inner" width="840px" title="所属类别" :visible.sync="innerVisible" append-to-body :close-on-click-modal="false"
-    custom-class="graphTypeDialog">
-    <div class="dialog-bodys">
-      <div class="left content">
-        <p>拓扑图所属类别</p>
-        <div class="treeContainer">
-          <el-tree :data="treeData" :props="defaultProps" accordion @current-change="changeNode" node-key="name"></el-tree>
-        </div>
-      </div>
-      <div class="splitLine"></div>
-      <div class="right content">
-        <p>设备分类参考</p>
-        <div class="treeContainer">
-          <el-tree :data="treeData" :props="defaultProps" accordion @current-change="changeNode"></el-tree>
-        </div>
-      </div>
-    </div>
-    <div slot="footer" class="dialog-footer">
-      <el-button @click="innerVisible=false">取消</el-button>
-      <el-button type="primary" :disabled="disabled" @click="confirm">确定</el-button>
-    </div>
-  </el-dialog>
-</template>
-<script>
-import { queryCategoryGraph } from "@/api/home"
-export default {
-  data() {
-    return {
-      innerVisible: false,
-      treeData: [],
-      disabled: true,
-      defaultProps: {
-        children: 'categoryList',
-        label: 'name'
-      },
-      selectNode: {}
-    }
-  },
-  mounted() {
-    this.init()
-  },
-  methods: {
-    init() {
-      queryCategoryGraph({ switch: true }).then(res => {
-        this.treeData = res.content;
-      })
-    },
-    showDialog() {
-      this.innerVisible = true
-    },
-    changeNode(data, node) {
-      if (node.isLeaf) {
-        this.selectNode = node;
-        this.disabled = false;
-      }
-    },
-    // 确认
-    confirm() {
-      this.innerVisible = false;
-      this.$emit('selectNode', this.selectNode)
-    }
-  }
-}
-</script>
-<style lang="less" scoped>
-/deep/ .graphTypeDialog {
-  /deep/ .el-dialog__header {
-    border-bottom: 1px solid #f0f1f2ff;
-  }
-  /deep/ .el-dialog__body {
-    padding: 16px 32px;
-  }
-  .el-dialog__footer {
-    padding: 0 20px 20px;
-    .el-button {
-      padding: 0;
-      width: 80px;
-      height: 32px;
-      text-align: center;
-      line-height: 1;
-    }
-  }
-  .dialog-bodys {
-    display: flex;
-    overflow: hidden;
-    height: 380px;
-    .splitLine {
-      width: 1px;
-      background-color: #e4e5e7ff;
-      margin: 0 30px;
-    }
-    .content {
-      width: 356px;
-      padding: 16px 0 16px 16px;
-      box-sizing: border-box;
-      .el-tree {
-        /deep/ .el-tree-node {
-          &.is-current {
-            & > .el-tree-node__content {
-              background: #e1f2ffff;
-              color: #0091ffff;
-              &:hover{
-                background: #e1f2ffff;
-                color: #0091ffff;
-              }
-            }
-          }
-          .el-tree-node__content {
-            height: 38px;
-            line-height: 38px;
-            &:hover {
-              background: #F5F6F7;
-              color: #1F2429;
-            }
-          }
-        }
-      }
-      &.right {
-        background: #f7f8f9;
-        .el-tree {
-          background: #f7f8f9;
-        }
-      }
-      .treeContainer {
-        height: 305px;
-        overflow: auto;
-      }
-      & > p {
-        border-left: 4px solid #0091ffff;
-        margin-bottom: 20px;
-        padding-left: 8px;
-        color: #1f2429;
-        line-height: 19px;
-      }
-    }
-  }
-}
-</style>

+ 0 - 76
src/components/homeView/leftAsideTree.vue

@@ -1,76 +0,0 @@
-<!-- 左侧树结构 -->
-<template>
-  <div class="left-aside">
-    <el-tree :data="treeData" :props="defaultProps" accordion @current-change="changeNode">
-    </el-tree>
-  </div>
-</template>
-<script>
-import { queryCategoryGraph } from "@/api/home"
-export default {
-  data() {
-    return {
-      defaultProps: {
-        children: 'categoryList',
-        label: 'name'
-      },
-      treeData: []
-    };
-  },
-  mounted() {
-    this.getCategoryGraph();
-  },
-  methods: {
-    changeNode(data, node) {
-      if (node.isLeaf) {
-        this.$emit('changeNode', data)
-      }
-    },
-    //// 接口
-    // 获取系统图类型
-    getCategoryGraph() {
-      const pa = {
-        switch: false
-      };
-      queryCategoryGraph(pa).then(res => {
-        this.treeData = res.content;
-        if (!res.content.length) {
-          this.$emit('noTree')
-        }
-      })
-    }
-  },
-};
-</script>
-<style lang="less" scoped>
-.left-aside {
-  background: #f7f9fa;
-  color: #1F2429;
-  width: 100%;
-  height: calc(100% - 49px);
-  padding-left: 6px;
-  .el-tree {
-    background: #f7f9fa;
-    /deep/ .el-tree-node {
-      &.is-current {
-        & > .el-tree-node__content {
-          background: #e1f2ffff;
-          color: #0091ffff;
-          &:hover{
-            background: #e1f2ffff;
-            color: #0091ffff;
-          }
-        }
-      }
-      .el-tree-node__content {
-        height: 38px;
-        line-height: 38px;
-        &:hover {
-          background: #F5F6F7;
-          color: #1F2429;
-        }
-      }
-    }
-  }
-}
-</style>

+ 3 - 2
src/components/homeView/planImageCard.vue

@@ -1,4 +1,4 @@
-<!--拓扑图缩略图卡片-->
+<!--平面图缩略图卡片-->
 <template>
     <el-card :class="{ 'box-card': true, active: data.checked }" shadow="hover" :body-style="{ padding: '0px' }">
         <div class="image" v-if="!data.pic" style="line-height: 120px; text-align: center">
@@ -86,6 +86,7 @@ export default {
                 graphId: this.data.graphId,
                 id: this.data.id,
             };
+            let res;
             switch (command) {
                 // 选择编辑,跳转编辑页面
                 case "edit":
@@ -101,7 +102,7 @@ export default {
                     this.$emit(command, this.data);
                     break;
                 case "publish":
-                    let res = await planerPublish(postParams);
+                    res = await planerPublish(postParams);
                     if (res.result == "success") {
                         this.$message.success("发布成功");
                         this.$emit("publishSuc");

+ 1 - 12
src/views/home.vue

@@ -24,7 +24,7 @@
             <!-- 左侧树状导航栏部分 -->
             <el-aside class="aside" width="240px">
                 <left-folder ref="leftFolder" @changeFolder="changeFolder"></left-folder>
-                <!-- <leftAsideTree ref="leftAsideTree" @changeNode="changeNode" @noTree="(noTreeFlag = false), (popVisible = true)"></leftAsideTree>
+                <!-- 
                 <div class="recycle" @click="showRecycleDialog">
                     <img :src="require('@/assets/images/recycle.png')" />
                     <span>回收站</span>
@@ -104,7 +104,6 @@
 
         <!-- 创建画布 -->
         <createPlanarDialog ref="createPlanarDialog" @createPlanar="createPlanarCallback"></createPlanarDialog>
-        <!-- <createGraphDialog ref="createGraphDialog"></createGraphDialog> -->
         <!-- 重命名 -->
         <rename ref="rename" :isPub="isPub" @updateSuc="updateSuc"></rename>
         <!-- 移动到 -->
@@ -123,7 +122,6 @@
 import { Select, DropDownButton } from "meri-design";
 // import { Dropdown } from "meri-design";
 import leftFolder from "@/components/homeView/leftFolder.vue";
-// import leftAsideTree from "@/components/homeView/leftAsideTree.vue";
 import planImageCard from "@/components/homeView/planImageCard.vue";
 // import { queryDraftsGraph, queryPubGraph } from "@/api/home";
 import { planerQuery, pubPlanerQuery, planerRead, pubPlanerRead, planerSave } from "@/api/labsl";
@@ -132,13 +130,11 @@ import move from "@/components/homeView/move";
 import deleteDialog from "@/components/homeView/deleteDialog";
 import tagDialog from "@/components/homeView/tagDialog";
 import recycle from "@/components/homeView/recycle";
-// import createGraphDialog from "@/components/homeView/createGraphDialog";
 import createPlanarDialog from "@/components/homeView/createPlanarDialog";
 import { SNetUtil } from "@persagy-web/base";
 // import equipmentDeatil from "@/components/editview/equipmentDeatilDialog";
 export default {
     name: "home",
-    // components: { leftAsideTree, createGraphDialog },
     components: {
         Select,
         // Dropdown,
@@ -249,10 +245,6 @@ export default {
         batchCreateCanvas(val) {
             alert(`批量创建画布${val}`);
         },
-        // 创建拓扑图
-        createProject() {
-            this.$refs.createGraphDialog.showDialog();
-        },
         // 选项改变
         changeCheck(v) {
             // 获取该对象在选中数组中的下标(按照id匹配)
@@ -328,12 +320,10 @@ export default {
         // 卡片移动事件
         moveSuc() {
             this.queryGraph();
-            // this.$refs.leftAsideTree.getCategoryGraph();
         },
         // 删除成功
         deleteSuc() {
             this.queryGraph();
-            // this.$refs.leftAsideTree.getCategoryGraph();
         },
         /**
          * 更改选中的文件夹
@@ -372,7 +362,6 @@ export default {
         // 回收站关闭
         recycleDialogClose() {
             this.queryGraph();
-            this.$refs.leftAsideTree.getCategoryGraph();
         },
         /**
          * 跳转编辑器