Prechádzať zdrojové kódy

Merge branch 'msg-sever' of http://39.106.8.246:3003/web/ibms into msg-sever

yangjunjing 5 rokov pred
rodič
commit
728210b822

+ 1 - 1
package.json

@@ -28,7 +28,7 @@
         "@saga-web/base": "2.1.9",
         "@saga-web/draw": "2.1.58",
         "@saga-web/graphy": "2.1.30",
-        "@saga-web/cad-engine": "2.0.358"
+        "@saga-web/cad-engine": "2.0.366"
     },
     "devDependencies": {
         "ajv": "^6.9.1",

+ 1 - 0
src/components/business_space/newGraphy/canvasFun.vue

@@ -15,6 +15,7 @@
         <el-dropdown-menu slot='dropdown'>
           <el-dropdown-item command="savePng">保存为png</el-dropdown-item>
           <el-dropdown-item command="saveSvg">保存为svg</el-dropdown-item>
+          <el-dropdown-item command="saveJson">保存为Json</el-dropdown-item>
         </el-dropdown-menu>
       </el-dropdown>
     </div>

+ 9 - 1
src/components/business_space/newGraphy/graphy.vue

@@ -62,7 +62,7 @@
       <!-- 底部操作按钮 -->
       <el-row class="canvas-actions-box">
         <canvasFun @fit="fit" @savePng="savePng" @saveSvg="saveSvg" @divide="divide" @clearDivide="clearDivide" @undo="undo" @redo="redo"
-          @changeAbsorb="changeAbsorb" @scale="scale" @groupSelect="groupSelect" :config="config" ref="canvasFun"></canvasFun>
+          @changeAbsorb="changeAbsorb" @scale="scale" @groupSelect="groupSelect" :config="config" ref="canvasFun" @saveJson="saveJson"></canvasFun>
       </el-row>
     </div>
     <!--  -->
@@ -679,6 +679,14 @@ export default {
     saveSvg() {
       this.view.saveSceneSvg(`${this.buildFloor[1]}.svg`, 6400, 4800);
     },
+    // 保存为svg
+    saveSvg() {
+      this.view.saveSceneSvg(`${this.buildFloor[1]}.svg`, 6400, 4800);
+    },
+    // 保存json
+    saveJson() {
+      this.view.saveFloorJson(`${this.buildFloor[1]}.json`)
+    },
     // 切割划分
     divide() {
       this.scene.isMarking = true;

+ 6 - 0
src/router/system.js

@@ -68,6 +68,7 @@ import dataReport from '@/views/ledger/report'
 import auth from '@/views/system/auth'
 import noUser from '@/views/system/nouser'
 import spaceDetail from '@/views/ledger/spacelist/spaceDetail'
+import relatedSpace from '@/views/ledger/cenotelist/relatedSpace'
 
 /**  关系维护并计算 */
 import maintain from '@/views/relation/maintain'
@@ -373,6 +374,11 @@ export default [
                 name: 'cenoteDetail',
                 component: cenoteDetail,
                 meta: { keepAlive: false, breadcrumbs: [{ label: '台账管理', path: '/ledger/facility' }, { label: '竖井台账', path: '/ledger/cenotelist' }, { label: '竖井关系详情' }] }
+            }, {
+                path: 'relatedSpace',
+                name: 'relatedSpace',
+                component: relatedSpace,
+                meta: { keepAlive: false, breadcrumbs: [{ label: '台账管理', path: '/ledger/facility' }, { label: '竖井台账', path: '/ledger/cenotelist' }, { label: '竖井关联的元空间' }] }
             },
             {
                 path: 'rentlist',

+ 5 - 27
src/views/ledger/cenotelist/index.vue

@@ -25,24 +25,6 @@
       <div class="tableLeft" v-show="tableData && tableData.length">
         <handson-table ref="table"></handson-table>
       </div>
-      <div class="tableRight">
-        <div v-show="isTableRightShow">
-          <div class="table_right_box"><span class="iconfont close_right" @click="handleCloseRight">&#xe66b;</span></div>
-          <h5>管理需要关联的元空间</h5>
-          <p style="margin-bottom: 10px;">以下为关联的元空间id</p>
-          <el-input
-            type="textarea"
-            :autosize="{ minRows: 6, maxRows: 10}"
-            :disabled="onlyRead"
-            placeholder="请输入元空间id,以“,”分割"
-            v-model="spaceList">
-          </el-input>
-          <el-row class="right" v-show="!onlyRead">
-            <el-button @click="handleCloseRight">取消</el-button>
-            <el-button @click="saveSpaceList" type="primary">保存</el-button>
-          </el-row>
-        </div>
-      </div>
     </div>
     <el-pagination
       class="right"
@@ -75,7 +57,6 @@ import tools from "@/utils/scan/tools"
 import handsonUtils from "@/utils/hasontableUtils"
 import showTools from "@/utils/handsontable/notShow"
 import text from "@/utils/handsontable/mainText"
-
 import cenoteType from "@/components/ledger/lib/cenoteType";
 import handsonTable from "@/components/common/handsontable";
 import { getDataDictionary, getCenoteTableData, updataCenoteTableData, deleteCenoteTableData, saveCenoteRelateSpace, BeatchQueryParam } from "@/api/scan/request"
@@ -89,7 +70,6 @@ export default {
     return {
       cenoteId: "",//竖井类型id
       shaftId: "",//要操作的竖井id
-      isTableRightShow: false,
       spaceList: "",
       options: [{
         value: true,
@@ -297,11 +277,6 @@ export default {
       this.cenoteId = value.Id
       this.getTableHeader()
     },
-    //关闭右侧关联元空间输入按钮
-    handleCloseRight() {
-      this.isTableRightShow = false
-      this.spaceList = ""
-    },
     //切换每页显示多少条数据
     handleSizeChange(val) {
       this.page.pageSize = val
@@ -372,8 +347,11 @@ export default {
       this.shaftId = infos.ShaftID //要操作的数据id
       //点击关联的元空间
       if (val === "SpaceCount") {
-        this.spaceList = infos.SpaceList
-        this.isTableRightShow = true
+        infos.onlyRead = this.onlyRead;
+        this.$router.push({
+          path:'/ledger/relatedSpace',
+          query:{infos: infos}
+        })
         return false
       } else if (val === "OtheRelations") {
         this.$router.push({

+ 173 - 0
src/views/ledger/cenotelist/relatedSpace.vue

@@ -0,0 +1,173 @@
+<template>
+  <div id="relatedSpace">
+    <div class="condition">
+      <div class="header">
+        <el-button style="float:left;" size="small" type="default" icon="el-icon-back" @click="goBack"></el-button>
+        <span style="float:left;">{{ cenoteObj.ShaftLocalName || cenoteObj.ShaftName || '' }}</span>
+        <div class="edit-tool" v-if="!cenoteObj.onlyRead">
+          <el-button v-if="isMyTab == 2" size="small" style="float:right">添加</el-button>
+          <div v-else>
+            <el-button v-show="!isEdit" @click="isEdit = true" size="small" style="float:right">编辑</el-button>
+            <el-button v-show="isEdit" size="small" style="float:right">保存</el-button>
+            <el-button v-show="isEdit" size="small" @click="isEdit = false" style="float:right">取消</el-button>
+          </div>
+        </div>
+        <space-select @change="changeSpace"></space-select>
+      </div>
+      <div class="saga-build-tab">
+        <el-radio-group v-model="isMyTab" @change="changeRadio" style="width: 136px;">
+          <el-radio-button label="1">平面图</el-radio-button>
+          <el-radio-button label="2" class="space-own-radio" style="width: 68px;">列表</el-radio-button>
+        </el-radio-group>
+      </div>
+      <div v-show="isMyTab == 1" class="data-item">
+        <el-select v-model="floor" placeholder="请选择楼层" >
+          <el-option v-for="item in floorList" :key="item.value" :label="item.label" :value="item.value"></el-option>
+        </el-select>
+      </div>
+      <div v-show="isMyTab == 2" class="data-item">
+        <related-spaceList :space="space" ref="spacelist"></related-spaceList>
+      </div>
+    </div>
+  </div>
+</template>
+
+<script>
+import spaceSelect from "@/components/ledger/lib/spaceSelect";
+import relatedSpaceList from "@/views/ledger/cenotelist/relatedSpaceList"
+export default {
+  data() {
+    return {
+      isMyTab: 1,//默认平面图
+      isEdit: false,//是否正在编辑
+      floor:'',//楼层
+      floorList:[],
+      space:'',//当前业务空间
+    }
+  },
+  computed: {
+    cenoteObj() {
+      return this.$route.query.infos;
+    }
+  },
+  props: {
+    showIt: Boolean
+  },
+  components: {
+    spaceSelect,
+    relatedSpaceList
+  },
+  created() {
+    this.load();
+  },
+  methods: {
+    //更改业务空间类型
+    changeSpace(val) {
+      this.space = val;
+      this.load();
+    },
+    //加载数据
+    load() {
+      if(this.isMyTab == 1){
+
+      }
+      else{
+        this.$refs.spacelist.getSpaceList();
+      }
+    },
+    //更换列表或平面图
+    changeRadio(val) {
+      this.isMyTab = val;
+      this.load();
+    },
+    //返回
+    goBack() {
+      this.$router.push({
+        name: 'cenotelist'
+      })
+    }
+  },
+  watch: {
+
+  }
+}
+</script>
+
+<style lang="less" scoped>
+.condition {
+  position: relative;
+  padding: 10px 10px;
+  display: flex;
+  height: calc(100% - 22px);
+  flex-direction: column;
+  border: 1px solid #dfe6ec;
+  background: #fff;
+  .header {
+    padding-bottom: 10px;
+    border-bottom: 1px solid rgba(0, 0, 0, 0.5);
+    span {
+      line-height: 33px;
+      margin-left: 15px;
+    }
+    /deep/ .buildFloor {
+      line-height: 32px;
+    }
+  }
+  .spaceTypes {
+    .types {
+      float: left;
+      width: calc(100% - 200px);
+      /deep/ .el-tabs__item.is-top {
+        border-top: 2px solid transparent;
+        &.is-active {
+          border-top: 2px solid #409eff;
+        }
+      }
+    }
+    .deleBtn {
+      float: left;
+      width: 200px;
+      text-align: right;
+      height: 40px;
+      border-bottom: 1px solid #e4e7ed;
+    }
+  }
+}
+.saga-build-tab {
+  position: absolute;
+  left: 50%;
+  transform: translateX(-50%);
+  .tab-main {
+    float: left;
+    width: 120px;
+    padding: 0 5px;
+    margin: 5px 0;
+    border: 1px solid #ccc;
+    background-color: #fff;
+    height: 30px;
+    box-sizing: border-box;
+    text-align: center;
+    cursor: pointer;
+    overflow: hidden;
+    i {
+      font-size: 18px;
+      padding-right: 10px;
+      float: left;
+      line-height: 30px;
+      margin-left: 10px;
+    }
+    span {
+      line-height: 30px;
+      float: left;
+    }
+  }
+  .tab-active {
+    background-color: #409eff;
+    color: #fff;
+  }
+}
+.data-item {
+  height: calc(100% - 44px);
+  padding: 10px 0px;
+}
+</style>

+ 79 - 0
src/views/ledger/cenotelist/relatedSpaceList.vue

@@ -0,0 +1,79 @@
+<template>
+  <div id="relatedSpaceList" style="height:100%;">
+    <div class="query">
+      <el-input v-model="keyword" placeholder="请输入关键词" @keyup.enter.native="getSpaceList" style="width:240px;">
+        <i slot="suffix" class="el-input__icon el-icon-search" @click="getSpaceList"></i>
+      </el-input>
+      <span style="padding-left:40px;">所属建筑楼层</span>
+      <el-select v-model="floor" placeholder="请选择楼层" @change="getSpaceList">
+        <el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value">
+        </el-option>
+      </el-select>
+    </div>
+    <div class="table-area" style="height:calc(100% - 52px)">
+      <el-scrollbar style="height:calc(100% - 40px);">
+        <el-table :data="tableData" style="width: 100%;height:100%;" v-loading="loading" :header-cell-style="headerStyle">
+          <el-table-column prop='MeterFunc' label='业务空间建筑楼层' show-overflow-tooltip min-width="200" header-align='center' align="center">
+          </el-table-column>
+          <el-table-column prop='MeterFunc' label='业务空间类型' show-overflow-tooltip min-width="200" header-align='center' align="center">
+          </el-table-column>
+          <el-table-column prop='MeterFunc' label='业务空间本地名称' show-overflow-tooltip min-width="200" header-align='center' align="center">
+          </el-table-column>
+          <el-table-column prop='MeterFunc' label='业务空间本地编码' show-overflow-tooltip min-width="200" header-align='center' align="center">
+          </el-table-column>
+          <el-table-column prop='' label='操作' show-overflow-tooltip min-width="90" header-align='center' align='center'>
+            <template slot-scope="scope">
+              <el-button size="mini" @click="handleDelete(scope.$index, scope.row)" type="danger" plain icon="el-icon-delete"></el-button>
+            </template>
+          </el-table-column>
+        </el-table>
+      </el-scrollbar>
+      <!-- 分页 -->
+      <el-pagination @size-change="getSpaceList" @current-change="getSpaceList" :current-page="currentPage" :page-sizes="pageSizes"
+        :page-size="pageSize" layout="total, sizes, prev, pager, next, jumper" :total="tableData.length" style="float:right;">
+      </el-pagination>
+    </div>
+  </div>
+</template>
+
+<script>
+export default {
+  data() {
+    return {
+      //表格头样式
+      headerStyle: {
+        backgroundColor: '#e1e4e5',
+        color: '#2b2b2b',
+        lineHeight: '30px'
+      },
+      pageSizes: [10, 20, 50, 100],
+      pageSize: 50,
+      currentPage: 1,
+      keyword: '',//关键词
+      floor: '',//当前楼层
+      options: [],//楼层
+      tableData: [],//表格数据
+      loading: false,//加载
+    }
+  },
+  methods: {
+    getSpaceList() {
+      console.log(111)
+    },
+  },
+  props: {
+    space: '',//空间id
+  }
+}
+</script>
+
+<style lang="less" scoped>
+.query {
+  padding: 10px 0px;
+}
+#relatedSpaceList {
+  /deep/ .el-scrollbar__wrap {
+    overflow-x: hidden;
+  }
+}
+</style>

+ 5 - 1
src/views/ready/buildfloor/drawGraphy/drawFloor.vue

@@ -3,7 +3,7 @@
     <canvas :id="`floorCanvas${id}`" :width="cadWidth" :height="cadHeight" ref="canvas" tabindex="0"></canvas>
     <div class="operate" v-if="showTools">
       <canvasFun @fit="fit" @savePng="savePng" @saveSvg="saveSvg" @divide="divide" @clearDivide="clearDivide" @undo="undo" @redo="redo" @scale="scale"
-        @changeAbsorb="changeAbsorb" :config="config" ref="canvasFun"></canvasFun>
+        @changeAbsorb="changeAbsorb" :config="config" ref="canvasFun" @saveJson="saveJson"></canvasFun>
     </div>
   </div>
 </template>
@@ -158,6 +158,10 @@ export default {
     changeAbsorb(isAbsorbing) {
       this.drawMainScene.isAbsorbing = isAbsorbing;
     },
+    // 保存json
+    saveJson() {
+      this.view.saveFloorJson(`${this.floor}.json`)
+    },
     // 撤销
     undo() {