瀏覽代碼

Merge branch 'systz' of git.sagacloud.cn:web/ibms into systz

zhangyu 5 年之前
父節點
當前提交
97992d555e

+ 35 - 41
src/components/ledger/handsontables/system.vue

@@ -32,18 +32,7 @@
     <details-dialog :iframeSrc="iframeSrc" v-if="myDialog.details" :dialog="myDialog"></details-dialog>
     <system-relevance @close="reset" :id="systemId" :dialog="myDialog"></system-relevance>
     <!-- 不支持的输入方式 -->
-    <el-dialog title="临时维护信息点" :visible.sync="myDialog.update" @close="handleCloseUpdate" width="670px">
-      <el-row>
-        该信息点未定义对应组件,现在维护数据不确定后续是否可用。如确实需要维护,请点击<el-link @click="updateInputShow = true" type="primary" :underline="false">继续维护</el-link>。
-      </el-row>
-      <el-row style="margin-top:20px;" v-show="updateInputShow">
-        <el-input type="textarea" :autosize="{ minRows: 4, maxRows: 8}" placeholder="请输入内容" v-model="updateInput"></el-input>
-      </el-row>
-      <span slot="footer" class="dialog-footer">
-        <el-button @click="myDialog.update = false">取 消</el-button>
-        <el-button type="primary" @click="handleClickUpdate">确 认</el-button>
-      </span>
-    </el-dialog>
+    <editSysfloor ref="editFloor" @handleClickUpdate="handleClickUpdate"></editSysfloor>
     <!-- 新增系统 -->
     <el-dialog title="确定新增系统的类型" :visible.sync="myDialog.addDevice" width="30%">
       <el-row>
@@ -57,11 +46,7 @@
 </template>
 <script>
 import {
-  getTableHeader,
-  getBillSystemList,
-  updateBusiness,
   BeatchQueryParam,
-  delBatchList,
   getDataDictionary,
   queryLinkSys,
   updateGeneralSys,
@@ -80,13 +65,11 @@ import dialogAssets from "@/components/ledger/addDialog/dialogSystem"
 import detailsDialog from "@/components/business_space/lib/detailsDia"
 import systemRelevance from "@/components/ledger/tableTransfers"
 import Handsontable from "handsontable-pro"
+import text from "@/utils/handsontable/mainText"
 import 'handsontable-pro/dist/handsontable.full.css'
-import zhCN from 'handsontable-pro/languages/zh-CN'
+import editSysfloor from "@/components/ledger/lib/editSysFloor";
 
-import {
-  mapGetters,
-  mapActions
-} from "vuex";
+import { mapGetters } from "vuex";
 export default {
   components: {
     qrcode, //二维码页面
@@ -97,7 +80,8 @@ export default {
     dialogAssets,
     detailsDialog,
     systemRelevance,
-    myCascader
+    myCascader,
+    editSysfloor
   },
   computed: {
     ...mapGetters("layout", ["projectId", "secret", "userId"]),
@@ -187,7 +171,7 @@ export default {
         getDataDictionary(params, res => {
           this.tableHeader = res.Content;
           this.tableHeader.forEach(item => {
-            if(item.Path && item.InputMode){
+            if (item.Path && item.InputMode) {
               this.inputMap[item.Path] = item.InputMode
             }
           })
@@ -272,6 +256,9 @@ export default {
       let arr = tools.copyArr(list)
       let data = showTools.headerTextFilter(arr, 'system', this.onlyRead, this.showType)
       data.unshift("操作", "关联设备数量");
+      if (this.showType == "all") {
+        data.splice(3, 0, "所属建筑楼层")
+      }
       return data;
     },
     //格式化表内容
@@ -295,6 +282,13 @@ export default {
           item.readOnly = true
         })
       }
+      if (this.showType == "all") {
+        data.splice(3, 0, {
+          data: "sysInBuildFloor",
+          renderer: text.sysInBuildFloor,
+          readOnly: this.onlyRead
+        })
+      }
       return data;
     },
     //获取动态参数
@@ -478,7 +472,7 @@ export default {
     async removeSys(param) {
       await deleteGeneralSys(param, res => {
         this.$message.success("删除成功")
-        this.$emit('close','')
+        this.$emit('close', '')
         this.getTableData()
       })
     },
@@ -488,7 +482,7 @@ export default {
         Content: [],
         Projection: []
       }, keyList = [];
-       //生成要修改字段列表
+      //生成要修改字段列表
       change.map(item => {
         let key = item[1].split(".")[0]
         if (item[1] && keyList.indexOf(key) == -1) {
@@ -520,7 +514,11 @@ export default {
         //操作
         case 'caozuo':
           // window.open(`http://adm.sagacloud.cn:8058/system?id=${infos.id}&pid=${this.projectId}&secret=${this.secret}`,"_blank")
-          this.$message("开发中...")
+          // this.$message("开发中...")
+          this.$router.push({
+            path: "/ledger/systemDetail",
+            query: { SysID: infos.SysID, Name: infos.SysLocalName || infos.SysName, SysType:infos.Category }
+          })
           return false
         //设备二维码图片
         case 'EquipQRCode':
@@ -541,24 +539,20 @@ export default {
           break;
       }
       if (!this.onlyRead && showTools.InputModeArr.indexOf(inputMode) == '-1') {
-        this.updateInfoPoint = val
-        this.updateInput = tools.dataForKey(this.tableData[row.row], val)
-        this.myDialog.update = true
+        // this.updateInfoPoint = val
+        // this.updateInput = tools.dataForKey(this.tableData[row.row], val)
+        let floor = tools.dataForKey(this.tableData[row.row], val);
+        this.$refs.editFloor.showDialog();
       }
     },
-    //关闭临时维护弹窗回调
-    handleCloseUpdate() {
-      this.updateInputShow = false
-      this.updateInfoPoint = ''
-      this.updateInput = ''
-    },
     //更新临时维护信息点
-    handleClickUpdate(){
-      tools.setDataForKey(this.tableData[this.row], this.updateInfoPoint, this.updateInput)
-      this.handleUpdataTable([[this.row, this.updateInfoPoint, null, this.updateInput]], "edit")
-      this.updateInputShow = false
-      this.myDialog.update = false
-      this.updateInput = ''
+    handleClickUpdate() {
+      // this.$message("更新成功");
+      // tools.setDataForKey(this.tableData[this.row], this.updateInfoPoint, this.updateInput)
+      // this.handleUpdataTable([[this.row, this.updateInfoPoint, null, this.updateInput]], "edit")
+      // this.updateInputShow = false
+      // this.myDialog.update = false
+      // this.updateInput = ''
     },
     //获取被筛选掉的行号
     trimmedRows() {

+ 80 - 0
src/components/ledger/lib/editSysFloor.vue

@@ -0,0 +1,80 @@
+<template>
+  <el-dialog title="楼层贯通关系维护" :visible.sync="connectDialogVis" width="50%" id="messageDialog">
+    <el-row>
+      <div style="line-height:32px;">添加与{{floor.FloorLocalName}}层有贯通关系的楼层 : </div>
+      <div style="width:70%">
+        <bfCascader ref="bfCascader" :FloorID="floor.FloorID"></bfCascader>
+      </div>
+    </el-row>
+    <span slot="footer" class="dialog-footer">
+      <el-button size="small" @click="connectDialogVis=false">取消</el-button>
+      <el-button size="small" type="primary" @click="save">确认</el-button>
+    </span>
+  </el-dialog>
+</template>
+<script>
+import bfCascader from '@/components/ready/buildfloor/buildfloorCascader'
+import { createRelationInFloor } from "@/api/scan/request";
+export default {
+  data() {
+    return {
+      buildName: '',
+      connectDialogVis: false,
+      floor: {}
+    }
+  },
+  components: {
+    bfCascader
+  },
+  methods: {
+    showDialog() {
+      this.connectDialogVis = true
+      this.$nextTick(() => {
+        this.$refs.bfCascader.getCascader()
+        let arr = this.floor.FloorThroughList || [];
+        let value = []
+        if (arr.length) {
+          arr.map(t => {
+            value.push([t.BuildID, t.FloorID])
+          })
+        }
+        this.$refs.bfCascader.value = value
+      })
+    },
+    save() {
+      let arr = this.$refs.bfCascader.value;
+      let param = {
+        FloorId: this.floor.FloorID,
+        FloorOtherIdList: []
+      }
+      arr.map(t => {
+        param.FloorOtherIdList.push(t[1])
+      })
+      // createRelationInFloor(param, res => {
+        this.connectDialogVis = false;
+        this.$message.success('关联成功');
+        this.$emit('handleClickUpdate')
+      // })
+    }
+  }
+}
+</script>
+<style lang="less" scoped>
+#messageDialog {
+  .el-row{
+    height: 50px;
+    max-height: 200px;
+    overflow-y: auto;
+    overflow-x: hidden;
+  }
+  .el-row > div {
+    float: left;
+  }
+  .el-row > div + div {
+    margin-left: 10px;
+  }
+  /deep/ .el-input__inner {
+    vertical-align: baseline;
+  }
+}
+</style>

+ 64 - 0
src/components/ledger/lib/spaceSelect.vue

@@ -0,0 +1,64 @@
+<template>
+  <div id="spaceSelect">
+    <span class="buildFloor" style="padding-right:12px">业务空间</span>
+    <el-select v-model="value" placeholder="请选择" :props="props" filterable :style="isWidth ? '' : 'width:160px;'" size="small" @change="changeVal">
+      <el-option v-for="item in options" :key="item.Code" :label="item.Name" :value="item.Code"></el-option>
+    </el-select>
+  </div>
+</template>
+
+<script>
+import { queryDictionaryHead } from '@/api/scan/request';
+export default {
+  props: {
+    isWidth: {
+      type: Boolean,
+      default: true
+    }
+  },
+  data() {
+    return {
+      value:null,
+      spaceVal: null,//值
+      options: [],
+      props: {
+        isWidth:false
+      }
+    }
+  },
+  methods: {
+    //获取下拉框数据
+    getOptionData() {
+      let pa = {
+        Filters: `parentId = 'Space'`
+      }
+      queryDictionaryHead(pa, res => {
+        this.options = res.Content.map(t => {
+          if (t.Name == "元空间") {
+            return undefined;
+          }
+          return t;
+        }).filter(item => item);
+      })
+    },
+    //改变空间
+    changeVal(value) {
+      this.$emit('change', value)
+    }
+  },
+  created() {
+    this.getOptionData();
+  }
+}
+</script>
+
+<style lang="less" scoped>
+#spaceSelect {
+  float: left;
+  margin-left: 10px;
+  .buildFloor {
+    color: #999999;
+    font-size: 14px;
+  }
+}
+</style>

+ 179 - 0
src/components/ledger/system/dialog/addCenoteDialog.vue

@@ -0,0 +1,179 @@
+<template>
+  <el-dialog :title="title" :visible.sync="dialogVisible" width="900px" id="addEqDialog">
+    <el-row class="filters" :gutter="20">
+      <el-col :span="8">
+        <el-input placeholder="输入竖井名称或竖井本地编码进行查询" v-model="keycode" clearable @keyup.enter.native="getTableData">
+          <i slot="suffix" class="el-input__icon el-icon-search" @click="getTableData"></i>
+        </el-input>
+      </el-col>
+      <el-col :span="9">
+        <cenote-type @change="changeCenote"></cenote-type>
+      </el-col>
+    </el-row>
+    <div class="table-box">
+      <el-table :data="tableData" style="width: 100%" height="350" v-loading="loading" :header-cell-style="headerStyle" ref="multipleTable"
+        @selection-change="handleSelectionChange">
+        <el-table-column type="selection" width="55"></el-table-column>
+        <el-table-column :label="`${inSpaceType}名称`" show-overflow-tooltip min-width="100">
+          <template slot-scope="scope">
+            <div>
+              {{scope.row.ShaftLocalName||scope.row.ShaftName||''}}
+            </div>
+          </template>
+        </el-table-column>
+        <el-table-column prop="ShaftLocalID" :label="`${inSpaceType}本地编码`" show-overflow-tooltip min-width="100"></el-table-column>
+        <el-table-column prop="StructureInfo.ShaftFuncType" :label="`${inSpaceType}类`" show-overflow-tooltip min-width="100"></el-table-column>
+        <el-table-column prop="action" label="操作" min-width="100">
+          <template slot-scope="scope">
+            <el-button size="mini" @click="toDetail(scope.$index, scope.row)" plain>查看详情</el-button>
+          </template>
+        </el-table-column>
+      </el-table>
+      <!-- 分页 -->
+      <el-pagination class="fr" v-show="tableData && tableData.length" @size-change="handleSizeChange" @current-change="handleCurrentChange"
+        :current-page="page.pageNumber" :page-sizes="page.pageSizes" :page-size="page.pageSize" layout="total, sizes, prev, pager, next, jumper"
+        :total="page.total"></el-pagination>
+    </div>
+    <span slot="footer" class="dialog-footer">
+      <el-button size="small" @click="dialogVisible = false">取 消</el-button>
+      <el-button size="small" type="primary" @click="savaRelation">确 定</el-button>
+    </span>
+  </el-dialog>
+</template>
+
+<script>
+import { unshaftThroughShaft, queryShaftType, linkShaft } from "@/api/scan/request";
+import cenoteType from "@/components/ledger/lib/cenoteType";
+import { mapGetters } from "vuex";
+export default {
+  components: {
+    cenoteType
+  },
+  computed: {
+    ...mapGetters("layout", ["projectId"])
+  },
+  data() {
+    return {
+      title: "添加系统所在竖井",
+      keycode: '', //输入查询条件
+      cenoteType: '', // 选中的竖井类型
+      shaftType: {}, //全部竖井类型
+      inSpaceType: '竖井',
+      dialogVisible: false,
+      tableData: [],
+      loading: false,
+      selections: [], // 选中项
+      page: {
+        pageSize: 50,
+        pageSizes: [10, 20, 50, 100],
+        pageNumber: 1,
+        total: 0
+      },
+      headerStyle: {
+        backgroundColor: '#e1e4e5',
+        color: '#2b2b2b',
+        lineHeight: '30px'
+      } // 列表样式
+    };
+  },
+  props: {
+    type: String, //选中的tab页
+    params: Object //查看的竖井关系信息
+  },
+  created() {
+    queryShaftType(res => {
+      res.Content.forEach(item => {
+        this.shaftType[item.Code] = item.Name
+      })
+    })
+  },
+  methods: {
+    //修改竖井类型
+    changeCenote(value) {
+      this.cenoteType = value.Id
+      this.getTableData()
+    },
+    // 显示弹窗
+    showDialog() {
+      this.dialogVisible = true
+      this.page.pageNumber = 1
+      this.tableData = []
+      this.getTableData()
+    },
+    getTableData() {
+      let params = {
+        data: {
+          Filters: this.cenoteType ? `ProjectId='${this.projectId}';structureInfo.ShaftFuncType='${this.cenoteType}'` : `ProjectId='${this.projectId}'`,
+          Orders: "createTime desc, ShaftID asc",
+          PageNumber: this.page.pageNumber,
+          PageSize: this.page.pageSize,
+        },
+        shaftId: this.params.ShaftID
+      }
+      if (this.keycode != '') {
+        params.data.Filters += `;ShaftName contain '${this.keycode}' or ShaftLocalName contain '${this.keycode}' or ShaftLocalID contain '${this.keycode}'`
+      }
+      unshaftThroughShaft(params, res => {
+        this.tableData = res.Content
+        this.tableData.forEach(item => {
+          if (item.StructureInfo && item.StructureInfo.ShaftFuncType) {
+            item.StructureInfo.ShaftFuncType = this.shaftType[item.StructureInfo.ShaftFuncType]
+          }
+        })
+        this.page.total = res.Total
+      })
+    },
+    //选中项修改
+    handleSelectionChange(val) {
+      this.selections = val;
+    },
+    savaRelation() {
+      if (this.selections.length) {
+        let params = {
+          ShaftId: this.params.ShaftID,
+          ShaftOtherIdList: this.selections.map(item => {
+            return item.ShaftID
+          })
+        }
+        linkShaft(params, res => {
+          this.dialogVisible = false
+          this.$message.success('关联成功!')
+          this.$emit('refresh')
+        })
+      } else {
+        this.$message('请选择要关联的设备')
+      }
+    },
+    //改变pagesize
+    handleSizeChange(pageSize) {
+      this.page.pageSize = pageSize;
+      this.getTableData();
+    },
+    //改变pageno
+    handleCurrentChange(pageNo) {
+      this.page.pageNumber = pageNo;
+      this.getTableData();
+    },
+    // 查看详情
+    toDetail() {
+      this.$message('开发中')
+    }
+  },
+};
+</script>
+<style lang="less" scoped>
+#addEqDialog {
+  .filters {
+    margin-bottom: 10px;
+    /deep/ .el-input__inner {
+      vertical-align: baseline;
+    }
+  }
+  .table-box {
+    height: 370px;
+    .fr {
+      margin-top: 10px;
+    }
+  }
+}
+</style>

+ 198 - 0
src/components/ledger/system/dialog/addEquipDialog.vue

@@ -0,0 +1,198 @@
+<template>
+  <el-dialog :title="title" :visible.sync="dialogVisible" width="900px" id="addEqDialog">
+    <el-row class="filters">
+      <el-col :span="7.5" style="width:276px">
+        <el-input placeholder="输入设备名称或设备本地编码进行查询" v-model="keycode" clearable @keyup.enter.native="getTableData">
+          <i slot="suffix" class="el-input__icon el-icon-search" @click="getTableData"></i>
+        </el-input>
+      </el-col>
+      <el-col :span="8.5" style="padding:0 0;">
+        <floor-cascader @change="changeFloor"></floor-cascader>
+      </el-col>
+      <el-col :span="8.5" style="padding-right:0;">
+        <myCascader @change="changeDevice" :params="params"></myCascader>
+      </el-col>
+    </el-row>
+
+    <div class="table-box">
+      <el-table :data="tableData" style="width: 100%" height="350" v-loading="loading" :header-cell-style="headerStyle" ref="multipleTable"
+        @selection-change="handleSelectionChange">
+        <el-table-column type="selection" width="55"></el-table-column>
+        <el-table-column :label="`${inSpaceType}名称`" show-overflow-tooltip min-width="100">
+          <template slot-scope="scope">
+            <div>
+              {{scope.row.EquipLocalName||scope.row.EquipName||''}}
+            </div>
+          </template>
+        </el-table-column>
+        <el-table-column prop="EquipLocalID" :label="`${inSpaceType}本地编码`" show-overflow-tooltip min-width="100"></el-table-column>
+        <el-table-column prop="EquipCategory.EquipName" :label="`${inSpaceType}类`" show-overflow-tooltip min-width="100"></el-table-column>
+        <el-table-column prop="action" label="操作" min-width="100">
+          <template slot-scope="scope">
+            <el-button size="mini" @click="toDetail(scope.$index, scope.row)" plain>查看详情</el-button>
+          </template>
+        </el-table-column>
+      </el-table>
+      <!-- 分页 -->
+      <el-pagination class="fr" v-show="tableData && tableData.length" @size-change="handleSizeChange" @current-change="handleCurrentChange"
+        :current-page="page.pageNumber" :page-sizes="page.pageSizes" :page-size="page.pageSize" layout="total, sizes, prev, pager, next, jumper"
+        :total="page.total"></el-pagination>
+    </div>
+    <span slot="footer" class="dialog-footer">
+      <el-button size="small" @click="dialogVisible = false">取 消</el-button>
+      <el-button size="small" type="primary" @click="savaRelation">确 定</el-button>
+    </span>
+  </el-dialog>
+</template>
+
+<script>
+import { unshaftInEq, linkEqSh } from "@/api/scan/request";
+import floorCascader from "@/components/ledger/lib/floorCascader";
+import myCascader from "@/components/ledger/system/lib/equipType";
+import { mapGetters } from "vuex";
+export default {
+  components: {
+    floorCascader,
+    myCascader
+  },
+  computed: {
+    ...mapGetters("layout", ["projectId"])
+  },
+  data() {
+    return {
+      title: "添加系统内设备",
+      keycode: '', //输入查询条件
+      Buildfloor: ['all'], // 选中的建筑楼层
+      Equipcategory: null,// 选中的设备类型
+      inSpaceType: '设备',
+      dialogVisible: false,
+      tableData: [],
+      loading: false,
+      selections: [], // 选中项
+      page: {
+        pageSize: 50,
+        pageSizes: [10, 20, 50, 100],
+        pageNumber: 1,
+        total: 0
+      },
+      headerStyle: {
+        backgroundColor: '#e1e4e5',
+        color: '#2b2b2b',
+        lineHeight: '30px'
+      } // 列表样式
+    };
+  },
+  props: {
+    type: String, //选中的tab页
+    params: Object //查看的竖井关系信息
+  },
+  created() { },
+  methods: {
+    //修改建筑楼层
+    changeFloor(value) {
+      this.Buildfloor = value
+      this.getTableData()
+    },
+    //修改设备类别
+    changeDevice(value) {
+      this.Equipcategory = value.code
+      this.getTableData()
+    },
+    // 显示弹窗
+    showDialog() {
+      this.dialogVisible = true
+      this.page.pageNumber = 1
+      this.tableData = []
+      this.getTableData()
+    },
+    getTableData() {
+      let params = {
+        data: {
+          Cascade: [{ Name: 'equipCategory' }, { Name: 'shaftList' }],
+          Filters: `not EquipID isNull`,
+          Orders: "createTime desc, EquipID desc",
+          PageNumber: this.page.pageNumber,
+          PageSize: this.page.pageSize,
+        },
+        shaftId: this.params.ShaftID
+      }
+      if (this.Buildfloor[0] == "noKnow") {
+        params.data.Filters += `;buildingId isNull`
+      } else if (this.Buildfloor[0] && this.Buildfloor[0] != "all") {
+        params.data.Filters += `;buildingId='${this.Buildfloor[0]}'`
+      }
+      if (this.Buildfloor[1] == "noKnow") {
+        params.data.Filters += `;floorId isNull`
+      } else if (this.Buildfloor[1] && this.Buildfloor[1] != "all") {
+        params.data.Filters += `;floorId='${this.Buildfloor[1]}'`
+      }
+      if (this.keycode != '') {
+        params.data.Filters += `;EquipName contain '${this.keycode}' or EquipLocalName contain '${this.keycode}' or EquipLocalID contain '${this.keycode}'`
+      }
+      if (this.Equipcategory) {
+        params.data.Filters += `;category='${this.Equipcategory}'`
+      }
+      unshaftInEq(params, res => {
+        res.Content.forEach(item => {
+          item.ShaftListName = ""
+          if (item.ShaftList && item.ShaftList.length) {
+            item.ShaftListName = item.ShaftList.map(shaft => {
+              return shaft.ShaftLocalName ? shaft.ShaftLocalName : shaft.ShaftName
+            }).join("、")
+          }
+        })
+        this.tableData = res.Content
+        this.page.total = res.Total
+      })
+    },
+    //选中项修改
+    handleSelectionChange(val) {
+      this.selections = val;
+    },
+    savaRelation() {
+      if (this.selections.length) {
+        let params = {
+          ShaftId: this.params.ShaftID,
+          EquipIdList: this.selections.map(item => {
+            return item.EquipID
+          })
+        }
+        linkEqSh(params, res => {
+          this.dialogVisible = false
+          this.$message.success('关联成功!')
+          this.$emit('refresh')
+        })
+      } else {
+        this.$message('请选择要关联的设备')
+      }
+    },
+    //改变pagesize
+    handleSizeChange(pageSize) {
+      this.page.pageSize = pageSize;
+      this.getTableData();
+    },
+    //改变pageno
+    handleCurrentChange(pageNo) {
+      this.page.pageNumber = pageNo;
+      this.getTableData();
+    },
+    // 查看详情
+    toDetail() {
+      this.$message('开发中')
+    }
+  },
+};
+</script>
+<style lang="less" scoped>
+#addEqDialog {
+  .filters {
+    margin-bottom: 10px;
+  }
+  .table-box {
+    height: 370px;
+    .fr {
+      margin-top: 10px;
+    }
+  }
+}
+</style>

+ 179 - 0
src/components/ledger/system/dialog/addSpaceDialog.vue

@@ -0,0 +1,179 @@
+<template>
+  <el-dialog :title="title" :visible.sync="dialogVisible" width="900px" id="addEqDialog">
+    <el-row class="filters" :gutter="20">
+      <el-col :span="8">
+        <el-input placeholder="输入业务空间名称、本地编码进行查询" v-model="keycode" clearable @keyup.enter.native="getTableData">
+          <i slot="suffix" class="el-input__icon el-icon-search" @click="getTableData"></i>
+        </el-input>
+      </el-col>
+      <el-col :span="8.5" style="padding:0 0;">
+        <floor-cascader @change="changeFloor"></floor-cascader>
+      </el-col>
+       <el-col :span="8.5" style="padding:0 0;">
+         <space-select @change="changeSpace"></space-select>
+      </el-col>
+    </el-row>
+    <el-row class="filters" :gutter="20">
+      
+     
+    </el-row>
+    <div class="table-box">
+      <el-table :data="tableData" style="width: 100%" height="350" v-loading="loading" :header-cell-style="headerStyle" ref="multipleTable"
+        @selection-change="handleSelectionChange">
+        <el-table-column  type="selection" width="55"></el-table-column>
+        <el-table-column :label="`${inSpaceType}本地名称`" show-overflow-tooltip min-width="100">
+          <template slot-scope="scope">
+            <div>
+              {{scope.row.SysLocalName||scope.row.SysName||''}}
+            </div>
+          </template>
+        </el-table-column>
+        <el-table-column prop="SysLocalId" :label="`${inSpaceType}本地编码`" show-overflow-tooltip min-width="100"></el-table-column>
+        <el-table-column prop="" :label="`所属建筑楼层`" show-overflow-tooltip min-width="100"></el-table-column>
+        <el-table-column prop="" :label="`空间类型`" show-overflow-tooltip min-width="100"></el-table-column>
+        <el-table-column prop="action" label="操作" min-width="100">
+          <template slot-scope="scope">
+            <el-button size="mini" @click="toDetail(scope.$index, scope.row)" plain>查看详情</el-button>
+          </template>
+        </el-table-column>
+      </el-table>
+      <!-- 分页 -->
+      <el-pagination class="fr" v-show="tableData && tableData.length" @size-change="handleSizeChange" @current-change="handleCurrentChange"
+        :current-page="page.pageNumber" :page-sizes="page.pageSizes" :page-size="page.pageSize" layout="total, sizes, prev, pager, next, jumper"
+        :total="page.total"></el-pagination>
+    </div>
+    <span slot="footer" class="dialog-footer">
+      <el-button size="small" @click="dialogVisible = false">取 消</el-button>
+      <el-button size="small" type="primary" @click="savaRelation">确 定</el-button>
+    </span>
+  </el-dialog>
+</template>
+
+<script>
+import { unshaftInSys, linkSySh } from "@/api/scan/request";
+import floorCascader from "@/components/ledger/lib/floorCascader";
+import dictionaryCas from '@/components/config_point/dictionaryCascader'
+import spaceSelect from '@/components/ledger/lib/spaceSelect'
+import { mapGetters } from "vuex";
+export default {
+  components: {
+    floorCascader,
+    dictionaryCas,
+    spaceSelect
+  },
+  computed: {
+    ...mapGetters("layout", ["projectId"])
+  },
+  data() {
+    return {
+      title: "添加系统所在业务空间",
+      keycode: '', //输入查询条件
+      inSpaceType: '业务空间',
+      dialogVisible: false,
+      Buildfloor: ['all'], // 选中的建筑楼层
+      Spacecategory: null,// 选中的业务空间类型
+      tableData: [],
+      loading: false,
+      selections: [], // 选中项
+      page: {
+        pageSize: 50,
+        pageSizes: [10, 20, 50, 100],
+        pageNumber: 1,
+        total: 0
+      },
+      headerStyle: {
+        backgroundColor: '#e1e4e5',
+        color: '#2b2b2b',
+        lineHeight: '30px'
+      } // 列表样式
+    };
+  },
+  props: {
+    type: String, //选中的tab页
+    params: Object //查看的竖井关系信息
+  },
+  created() { },
+  methods: {
+    // 显示弹窗
+    showDialog() {
+      this.dialogVisible = true
+      this.page.pageNumber = 1
+      this.tableData = []
+      this.getTableData()
+    },
+    //修改建筑楼层
+    changeFloor(value) {
+      this.Buildfloor = value
+      this.getTableData()
+    },
+    //修改空间类型
+    changeSpace(value) {
+      this.Spacecategory = value.code
+      this.getTableData()
+    },
+    getTableData() {
+      let params = {
+        data: {
+          Cascade: [{ Name: 'categoryNames' }],
+          Orders: "createTime desc, SysID desc",
+          PageNumber: this.page.pageNumber,
+          PageSize: this.page.pageSize,
+        },
+        shaftId: this.params.ShaftID
+      }
+      unshaftInSys(params, res => {
+        this.tableData = res.Content
+        this.page.total = res.Total
+      })
+    },
+    //选中项修改
+    handleSelectionChange(val) {
+      this.selections = val;
+    },
+    savaRelation() {
+      if(this.selections.length){
+        let params = {
+          ShaftId: this.params.ShaftID,
+          SysIdList: this.selections.map(item => {
+            return item.SysID
+          })
+        }
+        linkSySh(params, res => {
+          this.dialogVisible = false
+          this.$message.success('关联成功!')
+          this.$emit('refresh')
+        })
+      }else {
+        this.$message('请选择要关联的设备')
+      }
+    },
+    //改变pagesize
+    handleSizeChange(pageSize) {
+      this.page.pageSize = pageSize;
+      this.getTableData();
+    },
+    //改变pageno
+    handleCurrentChange(pageNo) {
+      this.page.pageNumber = pageNo;
+      this.getTableData();
+    },
+    // 查看详情
+    toDetail() {
+      this.$message('开发中')
+    }
+  },
+};
+</script>
+<style lang="less" scoped>
+#addEqDialog {
+  .filters {
+    margin-bottom: 10px; 
+  }
+  .table-box {
+    height: 370px;
+    .fr{
+      margin-top: 10px;
+    }
+  }
+}
+</style>

+ 140 - 0
src/components/ledger/system/lib/equipType.vue

@@ -0,0 +1,140 @@
+<template>
+  <div id="cascaderMap">
+    <span class="buildFloor" style="margin-right: 12px;">设备类别</span>
+    <el-select v-model="value" placeholder="请选择" :props="props" filterable :style="isWidth ? '' : 'width:160px;'" size="small" @change="changeVal">
+      <el-option v-for="item in options" :key="item.code" :label="item.facility" :value="item.code"></el-option>
+    </el-select>
+  </div>
+</template>
+<script>
+import { mapGetters } from 'vuex';
+import { queryPhysicsAllType, queryEquip } from "@/api/scan/request";
+export default {
+  name: "getCode",
+  props: {
+    isWidth: {
+      type: Boolean,
+      default: true
+    },
+    all: {
+      type: Boolean,
+      default: false,
+    },
+    //系统
+    params: Object
+  },
+  computed: {
+    ...mapGetters("layout", ["projectId"])
+  },
+  data() {
+    return {
+      value: "",
+      options: [],
+      props: {
+        value: "code",
+        label: "facility"
+      },
+      falg: true,
+      content: []
+    };
+  },
+  created() {
+    this.getData();
+  },
+  watch: {
+    projectId() {
+      this.value = '';
+      this.getData();
+    }
+  },
+  methods: {
+    setValue(val) {
+      this.value = val
+    },
+    //修改val
+    changeVal(val) {
+      let value = {}
+      this.options.map(item => {
+        if (item.code == val) {
+          value = item
+        }
+      })
+      this.value = val
+      this.$emit("change", value)
+    },
+    //获取当前项目下的设备类型(只拿到编码-需要过滤)
+    getData() {
+      let param2 = {
+        Distinct: true,
+        PageNumber: 1,
+        PageSize: 500,
+        Projection: [
+          "Category"
+        ]
+      }
+      let param1 = 'Equipment'
+      let promise2 = new Promise((resolve, reject) => {
+        queryEquip(param2, res => {
+          resolve(res)
+        })
+      })
+      let promise1 = new Promise((resolve, reject) => {
+        queryPhysicsAllType(param1, res => {    
+          let tempArr = res.Content.filter(t => {
+            return t.ParentId == `${this.params.SysType}`
+          })
+          console.log(tempArr)
+          resolve(tempArr)
+        })
+      })
+      Promise.all([promise1, promise2]).then((res) => {
+        let allData = res[0], data = res[1]
+        console.log(allData)
+        this.options = this.formatOptions(allData)
+        console.log(this.options)
+        if (this.value) {
+          this.changeVal(this.value)
+        }
+        if (!this.all) {
+          this.content = data.Content.map(t => {
+            return t.Category
+          });
+          this.filterForOptions();
+          if (this.value) {
+            this.changeVal(this.value)
+          }
+        }
+      })
+    },
+    //格式化options数据
+    formatOptions(arr) {
+      let data = [];
+      arr.map(t => {
+        let temp = {};
+        temp.code = t.Code;
+        temp.facility = t.Name;
+        data.push(temp)
+      })
+      return data;
+    },
+    //过滤
+    filterForOptions() {
+      this.options = this.options.filter(item => {
+        if (this.content.indexOf(item.code) > -1) {
+          return item
+        }
+      })
+    }
+  }
+};
+</script>
+<style lang="less" scoped>
+#cascaderMap {
+  float: left;
+  margin-left: 10px;
+  .buildFloor {
+    color: #999999;
+    font-size: 14px;
+  }
+}
+</style>

+ 156 - 0
src/components/ledger/system/table/cenoteTable.vue

@@ -0,0 +1,156 @@
+<template>
+  <div id="eqInSp">
+    <el-row>
+      <el-button type="primary" @click="add">添加{{inSpaceType}}</el-button>
+      <el-tooltip class="item" effect="dark" content="可前往“全部关系总览”中,按系统内包含的设备与竖井关系计算" placement="right">
+        <el-button>按系统内设备与竖井关系计算</el-button>
+      </el-tooltip>
+    </el-row>
+    <div class="table-box">
+      <el-table :data="tableData" style="width: 100%" height="100%" v-loading="loading" :header-cell-style="headerStyle">
+        <el-table-column :label="`${inSpaceType}名称`" show-overflow-tooltip min-width="100">
+          <template slot-scope="scope">
+            <div>
+              {{scope.row.ShaftLocalName||scope.row.ShaftName||''}}
+            </div>
+          </template>
+        </el-table-column>
+        <el-table-column prop="ShaftLocalID" :label="`${inSpaceType}本地编码`" show-overflow-tooltip min-width="100"></el-table-column>
+        <el-table-column :label="`${inSpaceType}类型`" show-overflow-tooltip min-width="100">
+          <template slot-scope="scope">
+            <div>
+              {{scope.row.StructureInfo.ShaftFuncType}}
+            </div>
+          </template>
+        </el-table-column>
+        <el-table-column prop="action" label="操作" min-width="100">
+          <template slot-scope="scope">
+            <el-tooltip class="item" effect="dark" content="删除关系" placement="left">
+              <el-button size="mini" @click="handleDelete(scope.$index, scope.row)" type="danger" plain icon="el-icon-delete"></el-button>
+            </el-tooltip>
+          </template>
+        </el-table-column>
+        <template slot="empty">
+          <div style="height: 60%;transform: translateY(50%);">
+            <i class="icon-wushuju iconfont"></i>
+            可前往“全部关系总览”中计算连通的其它竖井
+          </div>
+        </template>
+      </el-table>
+    </div>
+    <!-- 添加设备弹窗 -->
+    <addCenoteDialog ref="addCenoteDialog" @refresh="getTableData" :type="type" :params="params"></addCenoteDialog>
+  </div>
+</template>
+
+<script>
+import { queryLinkSys, queryShaftType, shthroughshUnlink } from "@/api/scan/request";
+import { mapGetters } from "vuex";
+import addCenoteDialog from "@/components/ledger/system/dialog/addCenoteDialog"
+export default {
+  components: {
+    addCenoteDialog
+  },
+  computed: {
+    ...mapGetters("layout", ["projectId"])
+  },
+  data() {
+    return {
+      inSpaceType: '竖井',
+      headerStyle: {
+        backgroundColor: '#e1e4e5',
+        color: '#2b2b2b',
+        lineHeight: '30px'
+      }, // 列表样式
+      loading: false, // loading
+      tableData: [], //列表数据
+      shaftType: {} //竖井类型
+    };
+  },
+  props: {
+    params: Object,
+    type: String
+  },
+  created() {
+    queryShaftType(res => {
+      res.Content.forEach(item => {
+        this.shaftType[item.Code] = item.Name
+      })
+      this.getTableData()
+    })
+  },
+  methods: {
+    // 获取列表数据
+    getTableData() {
+      let params = {
+        Filters: `SysID='${this.params.SysID}'`,
+        Cascade: [
+          {
+            Name: 'shaftList',
+
+          }
+        ]
+      }
+      queryLinkSys(params, res => {
+        this.tableData = res.Content[0].ShaftThroughList || []
+        this.tableData.forEach(item => {
+          if (item.StructureInfo && item.StructureInfo.ShaftFuncType) {
+            item.StructureInfo.ShaftFuncType = this.shaftType[item.StructureInfo.ShaftFuncType]
+          }
+        })
+      })
+    },
+    // 删除关系
+    handleDelete(index, row) {
+      this.$confirm("确认删除该关系?", "提示", {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning'
+      }).then(() => {
+        let params = {
+          ShaftOtherId: row.ShaftID,
+          ShaftId: this.params.ShaftID
+        }
+        this.deleteShThroughSh(params);
+      }).catch(() => {
+        this.$message("取消删除")
+      })
+    },
+    // 删除设备所在空间关系
+    deleteShThroughSh(params) {
+      shthroughshUnlink(params, res => {
+        this.$message.success('删除成功')
+        this.getTableData()
+      })
+    },
+    // 改变pagesize
+    handleSizeChange(pageSize) {
+      this.page.pageSize = pageSize;
+      this.getTableData();
+    },
+    // 改变pageno
+    handleCurrentChange(pageNo) {
+      this.page.pageNumber = pageNo;
+      this.getTableData();
+    },
+    // 添加设备
+    add() {
+      this.$refs.addCenoteDialog.showDialog()
+    }
+  },
+  watch: {
+    type() {
+      // this.getTableData()
+    }
+  }
+};
+</script>
+<style lang="less" scoped>
+#eqInSp {
+  height: 100%;
+  .table-box {
+    margin-top: 10px;
+    height: calc(100% - 50px);
+  }
+}
+</style>

+ 143 - 0
src/components/ledger/system/table/deviceTable.vue

@@ -0,0 +1,143 @@
+<template>
+  <div id="eqInSp">
+    <el-row>
+      <el-button type="primary" @click="add">添加{{inSpaceType}}</el-button>
+      <!-- <el-tooltip class="item" effect="dark" content="可前往“全部关系总览”中计算竖井内设备" placement="right">
+        <el-button>按空间计算</el-button>
+      </el-tooltip> -->
+    </el-row>
+    <div class="table-box">
+      <el-table :data="tableData" style="width: 100%" height="100%" v-loading="loading" :header-cell-style="headerStyle">
+        <el-table-column :label="`${inSpaceType}名称`" show-overflow-tooltip min-width="100">
+          <template slot-scope="scope">
+            <div>
+              {{scope.row.EquipLocalName||scope.row.EquipName||''}}
+            </div>
+          </template>
+        </el-table-column>
+        <el-table-column prop="EquipLocalID" :label="`${inSpaceType}本地编码`" show-overflow-tooltip min-width="100"></el-table-column>
+        <el-table-column :label="`${inSpaceType}类型`" show-overflow-tooltip min-width="100">
+          <template slot-scope="scope">
+            <div>
+              {{scope.row.EquipCategory.EquipName}}
+            </div>
+          </template>
+        </el-table-column>
+        <el-table-column prop="action" label="操作" min-width="100">
+          <template slot-scope="scope">
+            <el-button title="删除关系" size="mini" @click="handleDelete(scope.$index, scope.row)" type="danger" plain icon="el-icon-delete"></el-button>
+          </template>
+        </el-table-column>
+        <template slot="empty">
+          <div style="height: 60%;transform: translateY(50%);">
+            <i class="icon-wushuju iconfont"></i>
+            可前往“全部关系总览”中计算竖井内设备
+          </div>
+        </template>
+      </el-table>
+    </div>
+    <!-- 添加设备弹窗 -->
+    <addEquipDialog ref="addEqDialog" @refresh="getTableData" :type="type" :params="params"></addEquipDialog>
+  </div>
+</template>
+
+<script>
+import { queryLinkSys, eqinshUnlink } from "@/api/scan/request";
+import { mapGetters } from "vuex";
+import addEquipDialog from "@/components/ledger/system/dialog/addEquipDialog"
+export default {
+  components: {
+    addEquipDialog
+  },
+  computed: {
+    ...mapGetters("layout", ["projectId"])
+  },
+  data() {
+    return {
+      inSpaceType: '设备',
+      headerStyle: {
+        backgroundColor: '#e1e4e5',
+        color: '#2b2b2b',
+        lineHeight: '30px'
+      }, // 列表样式
+      loading: false, // loading
+      tableData: [] //列表数据
+    };
+  },
+  props: {
+    params: Object,
+    type: String
+  },
+  created() {
+    this.getTableData()
+  },
+  methods: {
+    // 获取列表数据
+    getTableData() {
+      let params = {
+        Filters: `SysID='${this.params.SysID}'`,
+        Cascade: [
+          {
+            Name: 'equipmentList',
+            Cascade: [{ Name: 'equipCategory' }]
+          }
+        ]
+      }
+      queryLinkSys(params, res => {
+        this.tableData = res.Content[0].Equipment || []
+      })
+    },
+    // 删除关系
+    handleDelete(index, row) {
+      this.$confirm("确认删除该关系?", "提示", {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning'
+      }).then(() => {
+        let params = {
+          EquipId: row.EquipID,
+          ShaftId: this.params.ShaftID
+        }
+        this.deleteEqInSh(params);
+      }).catch(() => {
+        this.$message("取消删除")
+      })
+    },
+    // 删除设备所在竖井关系
+    deleteEqInSh(params) {
+      eqinshUnlink(params, res => {
+        this.$message.success('删除成功')
+        this.getTableData()
+      })
+    },
+    // 改变pagesize
+    handleSizeChange(pageSize) {
+      this.page.pageSize = pageSize;
+      this.getTableData();
+    },
+    // 改变pageno
+    handleCurrentChange(pageNo) {
+      this.page.pageNumber = pageNo;
+      this.getTableData();
+    },
+    // 添加设备
+    add() {
+      this.$refs.addEqDialog.showDialog()
+    }
+  },
+  watch: {
+    type() {
+      // this.getTableData()
+    }
+  }
+};
+</script>
+<style lang="less" scoped>
+#eqInSp {
+  height: 100%;
+  .table-box {
+    margin-top: 10px;
+    height: calc(100% - 50px);
+  }
+}
+</style>

+ 144 - 0
src/components/ledger/system/table/spaceTable.vue

@@ -0,0 +1,144 @@
+<template>
+  <div id="eqInSp">
+    <el-row>
+      <el-button type="primary" @click="add">添加{{inSpaceType}}</el-button>
+      <el-tooltip class="item" effect="dark" content="可前往“全部关系总览”中,按系统内包含的设备与空间关系计算" placement="right">
+        <el-button>按系统内设备与业务空间关系计算</el-button>
+      </el-tooltip>
+    </el-row>
+    <div class="table-box">
+      <el-table :data="tableData" style="width: 100%" height="100%" v-loading="loading" :header-cell-style="headerStyle">
+        <el-table-column :label="`${inSpaceType}名称`" show-overflow-tooltip min-width="100">
+          <template slot-scope="scope">
+            <div>
+              {{scope.row.SysLocalName||scope.row.SysName||''}}
+            </div>
+          </template>
+        </el-table-column>
+        <el-table-column prop="SysLocalID" :label="`${inSpaceType}本地编码`" show-overflow-tooltip min-width="100"></el-table-column>
+        <el-table-column :label="`${inSpaceType}类型`" show-overflow-tooltip min-width="100">
+          <template slot-scope="scope">
+            <div>
+              {{scope.row.CategoryNames.CategoryName}}
+            </div>
+          </template>
+        </el-table-column>
+        <el-table-column prop="action" label="操作" min-width="100">
+          <template slot-scope="scope">
+            <el-tooltip class="item" effect="dark" content="删除关系" placement="left">
+              <el-button size="mini" @click="handleDelete(scope.$index, scope.row)" type="danger" plain icon="el-icon-delete"></el-button>
+            </el-tooltip>
+          </template>
+        </el-table-column>
+        <template slot="empty">
+          <div style="height: 60%;transform: translateY(50%);">
+            <i class="icon-wushuju iconfont"></i>
+            可前往“全部关系总览”中计算竖井内系统
+          </div>
+        </template>
+      </el-table>
+    </div>
+    <!-- 添加空间弹窗 -->
+    <addSpaceDialog ref="addSpaceDialog" @refresh="getTableData" :type="type" :params="params"></addSpaceDialog>
+  </div>
+</template>
+
+<script>
+import { queryLinkSys, syinshUnlink } from "@/api/scan/request";
+import { mapGetters } from "vuex";
+import addSpaceDialog from "@/components/ledger/system/dialog/addSpaceDialog"
+export default {
+  components: {
+    addSpaceDialog
+  },
+  computed: {
+    ...mapGetters("layout", ["projectId"])
+  },
+  data() {
+    return {
+      inSpaceType: '业务空间',
+      headerStyle: {
+        backgroundColor: '#e1e4e5',
+        color: '#2b2b2b',
+        lineHeight: '30px'
+      }, // 列表样式
+      loading: false, // loading
+      tableData: [] //列表数据
+    };
+  },
+  props: {
+    params: Object,
+    type: String
+  },
+  created() {
+    this.getTableData()
+  },
+  methods: {
+    // 获取列表数据
+    getTableData() {
+      let params = {
+        Filters: `SysID='${this.params.SysID}'`,
+        Cascade: [
+          {
+            Name: 'zoneSpaceBaseTableList'
+          }
+        ]
+      }
+      queryLinkSys(params, res => {
+        this.tableData = res.Content[0].SystemList || []
+      })
+    },
+    // 删除关系
+    handleDelete(index, row) {
+      this.$confirm("确认删除该关系?", "提示", {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning'
+      }).then(() => {
+        let params = {
+          SysId: row.SysID,
+          ShaftId: this.params.ShaftID
+        }
+        this.deleteSyInSh(params);
+      }).catch(() => {
+        this.$message("取消删除")
+      })
+    },
+    // 删除系统所在竖井关系
+    deleteSyInSh(params) {
+      syinshUnlink(params, res => {
+        this.$message.success('删除成功')
+        this.getTableData()
+      })
+    },
+    // 改变pagesize
+    handleSizeChange(pageSize) {
+      this.page.pageSize = pageSize;
+      this.getTableData();
+    },
+    // 改变pageno
+    handleCurrentChange(pageNo) {
+      this.page.pageNumber = pageNo;
+      this.getTableData();
+    },
+    // 添加设备
+    add() {
+      this.$refs.addSpaceDialog.showDialog()
+    }
+  },
+  watch: {
+    type() {
+      // this.getTableData()
+    }
+  }
+};
+</script>
+<style lang="less" scoped>
+#eqInSp {
+  height: 100%;
+  .table-box {
+    margin-top: 10px;
+    height: calc(100% - 50px);
+  }
+}
+</style>

+ 9 - 2
src/router/system.js

@@ -47,6 +47,7 @@ import buildGraphy from '@/views/data_admin/buildGraphy'
 /**  台账管理 */
 import systemLedger from '@/views/ledger/system'
 import systemadd from '@/views/ledger/system/addsystem'
+import systemDetail from '@/views/ledger/system/systemDetail'
 import facilityLedger from '@/views/ledger/facility'
 import partsLedger from '@/views/ledger/facility/parts'
 import partsmanageLedger from '@/views/ledger/facility/partsmanage'
@@ -105,8 +106,8 @@ export default [
         name: 'LayoutMain',
         component: LayoutMain,
         children: [
-            // { path: 'buildfloor', name: 'buildFloor', component: buildFloor, meta: { keepAlive: false, breadcrumbs: [{ label: '建筑楼层管理' }] } },
-            { path: 'buildfloor', name: 'buildFloor', component: Dasboard, meta: { keepAlive: false, breadcrumbs: [{ label: '建筑楼层管理' }] } },
+            { path: 'buildfloor', name: 'buildFloor', component: buildFloor, meta: { keepAlive: false, breadcrumbs: [{ label: '建筑楼层管理' }] } },
+            // { 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:'平面图维护' }] }}
@@ -318,6 +319,12 @@ export default [
                 meta: { keepAlive: false, breadcrumbs: [{ label: '台账管理', path: '/ledger/facility' }, { label: '系统台账' }] }
             },
             {
+                path: 'systemDetail',
+                name: 'systemDetail',
+                component: systemDetail,
+                meta: { keepAlive: false, breadcrumbs: [{ label: '台账管理', path: '/ledger/facility' }, { label: '系统台账', path: '/ledger/facility' }, { label: '系统详情'}] }
+            },
+            {
                 path: 'systemadd',
                 name: 'systemadd',
                 component: systemadd,

+ 33 - 1
src/utils/handsontable/mainText.js

@@ -95,7 +95,39 @@ const text = {
         td.style.cursor = "pointer";
         td.innerHTML = "查看二维码"
         return td
-    }
+    },
+
+    //系统所属建筑楼层
+    sysInBuildFloor: (instance, td, row, col, prop, value, cellProperties) => {
+        td.style.color = "#409EFF";
+        td.style.cursor = "pointer";
+        if (value instanceof Array && value.length > 0) {
+            if (value.length == 1) {
+                td.innerHTML = !!value[0].infos ? (value[0].infos.SysLocalName || value[0].infos.SysName) : (value[0].SysLocalName || value[0].SysName)
+            } else {
+                let text = ""
+                for (let i = 0; i < value.length; i++) {
+                    if (!!value[i].SysLocalName || !!value[i].SysName) {
+                        if (i == value.length) {
+                            text += value[i].SysLocalName || value[i].SysName
+                        } else {
+                            text = value[i].SysLocalName || value[i].SysName + "、" + text
+                        }
+                    } else {
+                        if (i == value.length) {
+                            text += value[i].infos.SysLocalName || value[i].infos.SysName
+                        } else {
+                            text = value[i].infos.SysLocalName || value[i].infos.SysName + "、" + text
+                        }
+                    }
+                }
+                td.innerHTML = text.substring(0, 40) + "..."
+            }
+        } else {
+            td.innerHTML = "无所属建筑楼层"
+        }
+        return td;
+    },
 }
 
 export default text

+ 5 - 11
src/views/ledger/system/index.vue

@@ -20,14 +20,9 @@ import floorCascader from "@/components/ledger/lib/floorCascader";
 import myCascader from "@/components/ledger/lib/system";
 import hansonTable from "@/components/ledger/handsontables/system";
 import tableTransfers from "@/components/ledger/tableTransfers";
-import {
-  mapGetters,
-  mapActions
-} from "vuex";
+import { mapGetters } from "vuex";
 import { countGeneralSys } from "@/api/scan/request"
-import Handsontable from "handsontable-pro"
 import 'handsontable-pro/dist/handsontable.full.css'
-import zhCN from 'handsontable-pro/languages/zh-CN';
 
 export default {
   components: {
@@ -64,11 +59,10 @@ export default {
     this.param.ProjId = this.projectId
     this.param.secret = this.secret
     this.countGeneralSys()
-
-    let deviceId = this.$route.params.deviceId;
-    if (deviceId) {
+    let SysType = this.$route.params.SysType;
+    if (SysType) {
       this.$nextTick(() => {
-        this.$refs.cascader.changeVal(deviceId)
+        this.$refs.cascader.changeVal(SysType)
       })
     }
   },
@@ -89,7 +83,7 @@ export default {
       this.$refs.cascader.getData()
     },
     //获取系统统计信息
-    countGeneralSys(){
+    countGeneralSys() {
       let param = {}
       countGeneralSys(param, res => {
         this.mess.name[0].num = res.Count

+ 164 - 0
src/views/ledger/system/systemDetail/index.vue

@@ -0,0 +1,164 @@
+<template>
+  <div class="box">
+    <div class="condition">
+      <div class="header">
+        <el-button style="float:left;" size="small" type="default" icon="el-icon-back" @click="goBack"></el-button>
+        <span>{{params.Name}}</span>
+      </div>
+      <el-row class="spaceTypes">
+        <div class="types">
+          <el-tabs v-model="activeTab" type='card'>
+            <template v-for="(item,index) in tabsList">
+              <el-tab-pane :name="item.Code" :key="index" :label="item.Name"></el-tab-pane>
+            </template>
+          </el-tabs>
+        </div>
+        <div class="deleBtn">
+          <el-button size="small" @click="deleteSystem">删除系统</el-button>
+        </div>
+      </el-row>
+      <div v-if="activeTab=='detail'" style="height:calc(100% - 110px)">
+        <div>开发中...</div>
+      </div>
+      <!-- 系统内设备 -->
+      <deviceTable v-if="activeTab=='Equipment'" :params="params" :type="activeTab"></deviceTable>
+      <!-- 系统所在竖井 -->
+      <cenoteTable v-else-if="activeTab=='cenote'" :params="params" :type="activeTab"></cenoteTable>
+      <!-- 系统所在业务空间 -->
+      <spaceTable v-else-if="activeTab=='space'" :params="params" :type="activeTab"></spaceTable>
+    </div>
+  </div>
+</template>
+
+<script>
+import { mapGetters } from "vuex"
+import { queryLinkSys, deleteGeneralSys } from '@/api/scan/request'
+import cenoteTable from '@/components/ledger/system/table/cenoteTable'
+import deviceTable from '@/components/ledger/system/table/deviceTable'
+import spaceTable from '@/components/ledger/system/table/spaceTable'
+export default {
+  data() {
+    return {
+      params: {}, //参数-包含系统id 分区类型
+      tabsList: [
+        { Code: 'detail', Name: '系统详情' },
+        { Code: 'Equipment', Name: '系统内设备' },
+        { Code: 'cenote', Name: '系统所在竖井' },
+        { Code: 'space', Name: '系统所在业务空间' },
+      ], //tab页
+      activeTab: 'detail', //当前选中的tab
+      systemDetails: {}, //系统信息
+    }
+  },
+  computed: {
+    ...mapGetters("layout", ["projectId", "userId", "secret"])
+  },
+  components: {
+    cenoteTable,
+    deviceTable,
+    spaceTable
+  },
+  created() {
+    this.params = this.$route.query;
+    this.getSystemDetails();
+  },
+  mounted() { },
+  watch: {
+    projectId() { }
+  },
+  methods: {
+    // 返回
+    goBack() {
+      this.$router.push({
+        name: "systemlist",
+        params: this.params
+      })
+    },
+    // 查询系统详情
+    getSystemDetails() {
+      let pa = {
+        Filters: `SysID="${this.params.SysID}"`
+      }
+      queryLinkSys(pa, res => {
+        this.systemDetails = res.Content[0];
+      })
+    },
+    // 删除系统
+    deleteSystem() {
+      this.$confirm("此操作将删除系统,是否继续?", "提示", {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning'
+      }).then(() => {
+        let pa = [{
+          SysID: this.systemDetails.SysID
+        }]
+        this.removeSys(pa)
+      }).catch(() => {
+        this.$message("取消删除")
+      })
+    },
+    async removeSys(param) {
+      await deleteGeneralSys(param, res => {
+        this.$message.success("删除成功")
+        this.goBack()
+      })
+    },
+  }
+};
+</script>
+
+<style scoped lang='less'>
+.box {
+  .condition {
+    padding: 10px;
+    display: flex;
+    height: 100%;
+    flex-direction: column;
+    border: 1px solid #dfe6ec;
+    background: #fff;
+    margin-bottom: 10px;
+    .header {
+      padding-bottom: 10px;
+      span {
+        line-height: 33px;
+        margin-left: 15px;
+      }
+    }
+    .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;
+      }
+    }
+    .main {
+      margin-top: 10px;
+      height: calc(100% - 96px);
+    }
+    .footer {
+      margin-bottom: 10px;
+    }
+  }
+}
+</style>
+
+<style lang="less">
+.el-table th {
+  background-color: #d9d9d9;
+  color: #000;
+}
+</style>
+