Browse Source

竖井台账关联业务空间

LXXXY 5 years ago
parent
commit
ccf8b23008

+ 13 - 7
src/router/system.js

@@ -55,8 +55,8 @@ import partsadd from '@/views/ledger/facility/partsmanage/addparts'
 import deviceadd from '@/views/ledger/facility/addfacility'
 import propertyadd from '@/views/ledger/property/addproperty'
 import propertyLedger from '@/views/ledger/property'
-import spacelist from '@/views/ledger/spacelist'//业务空间台账
-import addPropertys from '@/views/ledger/property/addpropertys'//根据未关联资产的设备或部件批量创建设备
+import spacelist from '@/views/ledger/spacelist' //业务空间台账
+import addPropertys from '@/views/ledger/property/addpropertys' //根据未关联资产的设备或部件批量创建设备
 import batchlinkAssets from '@/views/ledger/facility/batchlink' //批量关联资产
 import cenotelist from '@/views/ledger/cenotelist' //竖井清单
 import cenoteadd from '@/views/ledger/cenotelist/cenoteadd' //添加竖井
@@ -67,6 +67,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'
@@ -80,7 +81,7 @@ import dataUtil from '@/views/business_space/dataUtil'
 
 /**市场及商务 */
 const OwnerManage = () =>
-    import('@/views/market/owner/manage')
+    import ('@/views/market/owner/manage')
 
 export default [
     { path: '/', name: '', component: LayoutMain, children: [{ path: '', name: 'blank', component: Dasboard }] },
@@ -88,7 +89,7 @@ export default [
     { path: '/auth', name: 'auth', component: auth },
     { path: '/noUser', name: 'noUser', component: noUser },
     // 业务空间数据导入工具
-    { path: '/dataUtil', name: 'dataUtil', component: LayoutMain,children:[{path:'index',component: dataUtil}] },
+    { path: '/dataUtil', name: 'dataUtil', component: LayoutMain, children: [{ path: 'index', component: dataUtil }] },
     // 平台管理
     {
         path: '/platform',
@@ -110,7 +111,7 @@ export default [
             // { path: 'buildfloor', name: 'buildFloor', component: Dasboard, meta: { keepAlive: false, breadcrumbs: [{ label: '建筑楼层管理' }] } },
             { path: 'collectsetting', name: 'collectsetting', component: collectsetting, meta: { keepAlive: false, breadcrumbs: [{ label: '需采集的信息点' }] } },
             { path: 'appuser', name: 'buildUser', component: buildUser, meta: { keepAlive: false, breadcrumbs: [{ label: '扫楼App用户管理' }] } },
-            { path: 'repetitionGraphy', name: 'repetitionGraphy', component: repetitionGraphy, meta: { keepAlive: false, breadcrumbs: [{ label: '建筑楼层管理', path: '/ready/buildfloor' }, { label:'平面图维护' }] }}
+            { path: 'repetitionGraphy', name: 'repetitionGraphy', component: repetitionGraphy, meta: { keepAlive: false, breadcrumbs: [{ label: '建筑楼层管理', path: '/ready/buildfloor' }, { label: '平面图维护' }] } }
         ]
     },
     //模型管理
@@ -322,7 +323,7 @@ export default [
                 path: 'systemDetail',
                 name: 'systemDetail',
                 component: systemDetail,
-                meta: { keepAlive: false, breadcrumbs: [{ label: '台账管理', path: '/ledger/facility' }, { label: '系统台账', path: '/ledger/facility' }, { label: '系统详情'}] }
+                meta: { keepAlive: false, breadcrumbs: [{ label: '台账管理', path: '/ledger/facility' }, { label: '系统台账', path: '/ledger/facility' }, { label: '系统详情' }] }
             },
             {
                 path: 'systemadd',
@@ -340,7 +341,7 @@ export default [
                 path: 'spaceDetail',
                 name: 'spaceDetail',
                 component: spaceDetail,
-                meta: { keepAlive: false, breadcrumbs: [{ label: '台账管理', path: '/ledger/facility' }, { label: '业务空间台账',path: '/ledger/spacelist' }, {label:'业务空间详情'}] }
+                meta: { keepAlive: false, breadcrumbs: [{ label: '台账管理', path: '/ledger/facility' }, { label: '业务空间台账', path: '/ledger/spacelist' }, { label: '业务空间详情' }] }
             },
             {
                 path: 'cenotelist',
@@ -359,6 +360,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>