|
@@ -4,80 +4,67 @@
|
|
|
<template>
|
|
|
<div id="businessSpace">
|
|
|
<!------------------------ 头部弹窗,选择楼层信息 -------------->
|
|
|
- <!-- <no-model-dialog :param="param" title="选择要进行空间管理的楼层" :isShow="floor" @close="close"></no-model-dialog> -->
|
|
|
<influence-dialog ref="influence" :param="param" :tabsList="tabsList" title="受元空间变化影响的业务空间" :isShow="floor"></influence-dialog>
|
|
|
- <details-dialog ref="details" @del="delSuccess" :param="param" :tabsList="tabsList" title="业务空间详情" :isShow="floor" :activeTabType="activeTabType"></details-dialog>
|
|
|
+ <details-dialog ref="details" @del="delSuccess" :param="param" :tabsList="tabsList" title="业务空间详情" :isShow="floor" :activeTabType="activeTabType">
|
|
|
+ </details-dialog>
|
|
|
<not-related ref="notRelated" @createSuccess="createSuccess" :isShow="floor"></not-related>
|
|
|
<facility-dialog ref="facility" :activeTabType="activeTabType" :isShow="floor"></facility-dialog>
|
|
|
<!--------- 页面头部 -------------->
|
|
|
<div class="saga-title">
|
|
|
- <!-- <div class="saga-build-mess">
|
|
|
- <p>
|
|
|
- <i class="iconfont icon-jianzhu"></i> {{buildMess.buildName}} - {{buildMess.name}}
|
|
|
- </p>
|
|
|
- <el-button class="saga-btn" type="text" @click="changeShow">切换楼层</el-button>
|
|
|
- </div> -->
|
|
|
<div class="saga-build-mess">
|
|
|
<span style="padding-right:12px;color:#999999;">建筑楼层</span>
|
|
|
- <el-cascader :options="options" v-model="buildMess.selectd" :props="props" @change="close"></el-cascader>
|
|
|
+ <el-cascader :options="options" v-model="buildFloorSelectd" :props="props" @change="changeCascader"></el-cascader>
|
|
|
</div>
|
|
|
<div class="saga-build-tab">
|
|
|
- <!-- <div class="tab-main" @click="tabList(1)" :class="isMyTab == 1 ? 'tab-active' : ''">
|
|
|
- <i class="iconfont icon-tupian"></i>
|
|
|
- <span>平面图</span>
|
|
|
- </div>
|
|
|
- <div class="tab-main" @click="tabList(2)" :class="isMyTab == 2 ? 'tab-active' : ''">
|
|
|
- <i class="iconfont icon-liebiao"></i>
|
|
|
- <span>列表</span>
|
|
|
- </div> -->
|
|
|
<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>
|
|
|
- <div v-show="isMyTab == 1" class="saga-business-sapce-main">
|
|
|
- <el-tabs v-model="activeName" @tab-click="tab1Click">
|
|
|
- <template v-for="(item,index) in tabsList">
|
|
|
- <el-tab-pane :name="item.code" :key="index" :disabled="item.code > 3">
|
|
|
- <span slot="label">{{item.name}}</span>
|
|
|
- <graphy @getSp="checkSpace" @dimension="checkSpace" @businessDetails="getBuinessDetails"
|
|
|
- :ref="'graphy' + item.code" :canvasId="item.code"></graphy>
|
|
|
- </el-tab-pane>
|
|
|
- </template>
|
|
|
- </el-tabs>
|
|
|
- <!-- <space-graphy @dimension="checkSpace" :tabsList="tabsList" ref="graphy" :param="param"></space-graphy> -->
|
|
|
- </div>
|
|
|
- <div v-show="isMyTab == 2" class="saga-business-sapce-main">
|
|
|
- <el-tabs v-model="activeName" @tab-click="handleClick">
|
|
|
- <template v-for="(item,index) in tabsList">
|
|
|
- <el-tab-pane :name="item.code" :key="index" :disabled="item.code > 3">
|
|
|
- <span slot="label">{{item.name}}</span>
|
|
|
- <handsontable-main @lookEqu="lookEqu" :ref="'handsontable' + item.code" :zoneObj="item" :id="'handsontable' + item.code" :param="param"></handsontable-main>
|
|
|
- </el-tab-pane>
|
|
|
- </template>
|
|
|
- </el-tabs>
|
|
|
- <!-- <space-handsontable :tabsList="tabsList" ref="spaceTable" :param="param"></space-handsontable> -->
|
|
|
+ <div class="saga-business-sapce-main">
|
|
|
+ <el-row class="spaceTypes">
|
|
|
+ <div class="types">
|
|
|
+ <el-tabs v-model="activeName" type='card' @tab-click="tabClick">
|
|
|
+ <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="groupAdd">
|
|
|
+ <el-button size="small" @click="groupCreateBSpace">批量创建业务空间</el-button>
|
|
|
+ </div>
|
|
|
+ </el-row>
|
|
|
+ <div v-show="isMyTab == 1" style="width:100%;height:100%">
|
|
|
+ <graphy @getSp="checkSpace" @dimension="checkSpace" @businessDetails="getBuinessDetails" ref="graphy"></graphy>
|
|
|
+ </div>
|
|
|
+ <div v-show="isMyTab == 2">
|
|
|
+ <handsontable-main @lookEqu="lookEqu" ref="handsontable" :zoneCode="activeName" :id="`handsontable${activeName}`"></handsontable-main>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</div>
|
|
|
</template>
|
|
|
-
|
|
|
<script>
|
|
|
import noModelDialog from "@/components/business_space/dialogs/noModelDialog";
|
|
|
import influenceDialog from "@/components/business_space/dialogs/influenceDialog";
|
|
|
import detailsDialog from "@/components/business_space/dialogs/detailsDialog";
|
|
|
import notRelated from "@/components/business_space/dialogs/notRelated";
|
|
|
import facilityDialog from "@/components/business_space/dialogs/facilityDialog";
|
|
|
-// import spaceHandsontable from "@/components/business_space/business/spaceHandsontable";
|
|
|
-import graphy from "@/components/business_space/graphy/business";
|
|
|
+// import graphy from "@/components/business_space/graphy/business";
|
|
|
+import graphy from "@/components/business_space/newGraphy/graphy";
|
|
|
import handsontableMain from "@/components/business_space/business/handsontable";
|
|
|
-import { getDataDictionary, getAllbusiness, getBussTypes, getSpaceFloor, buildingQuery, floorQuery } from "@/api/scan/request";
|
|
|
+import {
|
|
|
+ getDataDictionary,
|
|
|
+ getAllbusiness,
|
|
|
+ getSpaceFloor,
|
|
|
+ buildingQuery, //数据中心-建筑查询
|
|
|
+ queryDictionaryHead, //数据中心-字典头部信息查询接口
|
|
|
+} from "@/api/scan/request";
|
|
|
import tools from '@/utils/scan/tools'
|
|
|
import { mapGetters, mapActions } from "vuex";
|
|
|
export default {
|
|
|
components: {
|
|
|
noModelDialog,
|
|
|
- // spaceHandsontable,
|
|
|
influenceDialog,
|
|
|
detailsDialog,
|
|
|
notRelated,
|
|
@@ -91,7 +78,6 @@ export default {
|
|
|
data() {
|
|
|
return {
|
|
|
floor: {
|
|
|
- // dialogVisible: true, //选择楼层弹窗
|
|
|
influence: false, //受影响的业务空间弹窗
|
|
|
details: false, //详情弹窗
|
|
|
notRelated: false,
|
|
@@ -112,203 +98,140 @@ export default {
|
|
|
buildCode: ""
|
|
|
},
|
|
|
isMyTab: 1,
|
|
|
- activeName: "GeneralZone",
|
|
|
+ activeName: "0",
|
|
|
tabsList: [],
|
|
|
activeTabType: {
|
|
|
"code": "GeneralZone",
|
|
|
"name": "默认分区",
|
|
|
"rel_type": "99"
|
|
|
},
|
|
|
- options: [],
|
|
|
- props: {
|
|
|
- value: "code",
|
|
|
- label: "name",
|
|
|
- children: "children"
|
|
|
- }
|
|
|
+ options: [], //建筑楼层级联下拉
|
|
|
+ props: { //自定义字段
|
|
|
+ value: "BuildID",
|
|
|
+ label: "BuildLocalName",
|
|
|
+ children: "Floor"
|
|
|
+ },
|
|
|
+ floorToMap: {}, //楼层及其对应的模型图
|
|
|
+ FloorMap: "", //当前选中的楼层平面图
|
|
|
+ buildFloorSelectd: [], //当前所选的建筑楼层
|
|
|
+ childBackParam: {}
|
|
|
};
|
|
|
},
|
|
|
created() {
|
|
|
- this.changeData()
|
|
|
+ this.init();
|
|
|
+ this.childBackParam = this.$route.params;
|
|
|
},
|
|
|
mounted() { },
|
|
|
methods: {
|
|
|
- changeData() {
|
|
|
- this.param.ProjId = this.projectId
|
|
|
- this.param.UserId = this.userId
|
|
|
- this.param.secret = this.secret
|
|
|
- this.getFloor()
|
|
|
+ // 初始化
|
|
|
+ init() {
|
|
|
this.getTypes()
|
|
|
+ this.getBuilding()
|
|
|
},
|
|
|
- changeRadio() {
|
|
|
- if (!this.buildMess.selectd.length) {
|
|
|
- this.$message("请选择楼层")
|
|
|
- return false
|
|
|
+ // 获取项目下建筑
|
|
|
+ getBuilding() {
|
|
|
+ let pa = {
|
|
|
+ Cascade: [{ name: 'floor', Orders: 'SequenceId desc' }],
|
|
|
+ Orders: "BuildLocalName asc",
|
|
|
}
|
|
|
- this.tabClick(this.isMyTab)
|
|
|
+ buildingQuery(pa, res => {
|
|
|
+ this.options = res.Content.map(t => {
|
|
|
+ if (t.Floor) {
|
|
|
+ t.Floor = t.Floor.map(item => {
|
|
|
+ item.BuildID = item.FloorID;
|
|
|
+ item.BuildLocalName = item.FloorLocalName;
|
|
|
+ this.floorToMap[item.FloorID] = item.StructureInfo ? item.StructureInfo.FloorMap : '';
|
|
|
+ return item;
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ t.Floor = []
|
|
|
+ }
|
|
|
+ return t;
|
|
|
+ })
|
|
|
+ if (this.childBackParam.zone) {
|
|
|
+ this.changeCascader(this.buildFloorSelectd)
|
|
|
+ }
|
|
|
+ })
|
|
|
},
|
|
|
- //获取楼层
|
|
|
- getFloor() {
|
|
|
- // let data, buildParams = {
|
|
|
- // PageNumber: 1,
|
|
|
- // PageSize: 500
|
|
|
- // }, floorParams = {
|
|
|
- // Orders: "FloorSequenceID desc",
|
|
|
- // PageNumber: 1,
|
|
|
- // PageSize: 500
|
|
|
- // }
|
|
|
- // let promise1 = new Promise((resolve, reject) => {
|
|
|
- // buildingQuery(buildParams, res => {
|
|
|
- // resolve(res)
|
|
|
- // })
|
|
|
- // })
|
|
|
- // let promise2 = new Promise((resolve, reject) => {
|
|
|
- // floorQuery(floorParams, res => {
|
|
|
- // resolve(res)
|
|
|
- // })
|
|
|
- // })
|
|
|
- // Promise.all([promise1, promise2]).then(values => {
|
|
|
- // let builData = values[0].Content, floorData = values[1].Content
|
|
|
- // data = builData.map(build => {
|
|
|
- // return {
|
|
|
- // code: build.BuildID,
|
|
|
- // name: build.BuildLocalName
|
|
|
- // }
|
|
|
- // })
|
|
|
- // data.forEach(build => {
|
|
|
- // floorData.forEach(floor => {
|
|
|
- // if (build.code == floor.BuildID && floor.FloorID && floor.FloorLocalName) {
|
|
|
- // if (build.children) {
|
|
|
- // build.children.push({
|
|
|
- // code: floor.FloorID,
|
|
|
- // name: (floor.FloorLocalName || floor.FloorName || "未知") + this.myMess(floor),
|
|
|
- // map: floor.StructureInfo?floor.StructureInfo.FloorMap?floor.StructureInfo.FloorMap:null:null,
|
|
|
- // affected: floor.affected,
|
|
|
- // buildCode: build.BuildID,
|
|
|
- // buildName: build.BuildLocalName,
|
|
|
- // FloorSequenceID: floor.FloorSequenceID
|
|
|
- // })
|
|
|
- // } else {
|
|
|
- // build.children = []
|
|
|
- // build.children.push({
|
|
|
- // code: floor.FloorID,
|
|
|
- // name: (floor.FloorLocalName || floor.FloorName || "未知") + this.myMess(floor),
|
|
|
- // map: floor.StructureInfo?floor.StructureInfo.FloorMap?floor.StructureInfo.FloorMap:null:null,
|
|
|
- // affected: floor.affected,
|
|
|
- // buildCode: build.BuildID,
|
|
|
- // buildName: build.BuildLocalName,
|
|
|
- // FloorSequenceID: floor.FloorSequenceID
|
|
|
- // })
|
|
|
- // }
|
|
|
- // }
|
|
|
- // })
|
|
|
- // })
|
|
|
- // this.options = data
|
|
|
- // })
|
|
|
-
|
|
|
- let param = {
|
|
|
- ProjId: this.projectId,
|
|
|
- UserId: this.UserId,
|
|
|
- secret: this.secret
|
|
|
- };
|
|
|
- getSpaceFloor(param).then(res => {
|
|
|
- console.log(res, 'res')
|
|
|
- if (res.data.Result == 'success') {
|
|
|
- let data = this.changeArr(res.data.Content).map(item => {
|
|
|
- if (item.children && item.children.length) {
|
|
|
- item.children = tools.sortArr(item.children, "shunxu", false)
|
|
|
- }
|
|
|
- return item
|
|
|
- })
|
|
|
- console.log(data, 'res.data')
|
|
|
- this.options = data
|
|
|
+ // 切换平面图和列表
|
|
|
+ changeRadio(val) {
|
|
|
+ this.changeGraphyOrTable(val)
|
|
|
+ },
|
|
|
+ // 获取tabs的列表
|
|
|
+ getTypes() {
|
|
|
+ let pa = {
|
|
|
+ Filters: `parentId = 'Space'`
|
|
|
+ }
|
|
|
+ queryDictionaryHead(pa, res => {
|
|
|
+ this.tabsList = res.Content;
|
|
|
+ if (this.childBackParam.zone) {
|
|
|
+ this.activeName = this.childBackParam.zone;
|
|
|
+ this.buildFloorSelectd = [this.childBackParam.BuildingId, this.childBackParam.FloorId];
|
|
|
+ this.isMyTab = this.childBackParam.isMyTab;
|
|
|
} else {
|
|
|
- this.$message.error(res.data.ResultMsg)
|
|
|
+ this.activeName = 'GeneralZone';
|
|
|
}
|
|
|
- }).catch(() => {
|
|
|
- this.$message.error("请求出错")
|
|
|
})
|
|
|
},
|
|
|
-
|
|
|
- //修改已有数组
|
|
|
- changeArr(arr) {
|
|
|
- return arr.map(item => {
|
|
|
- console.log(item.floors)
|
|
|
- if (item.floors && item.floors.length) {
|
|
|
- return {
|
|
|
- code: item.id,
|
|
|
- name: item.infos.BuildLocalName,
|
|
|
- children: item.floors.map(i => {
|
|
|
- return {
|
|
|
- code: i.id,
|
|
|
- name: (i.infos.FloorLocalName || i.infos.FloorName || "未知") + this.myMess(i),
|
|
|
- map: i.infos.FloorMap || null,
|
|
|
- affected: i.affected,
|
|
|
- isChilren: 2,
|
|
|
- buildCode: item.id,
|
|
|
- buildName: item.infos.BuildLocalName,
|
|
|
- shunxu: i.infos.FloorSequenceID || 0
|
|
|
- }
|
|
|
- })
|
|
|
- }
|
|
|
- } else {
|
|
|
- return {
|
|
|
- code: item.id,
|
|
|
- name: item.infos.BuildLocalName,
|
|
|
- children: null,
|
|
|
- isChilren: 1,
|
|
|
- }
|
|
|
+ // 通过选中的tab-Code 获取选中的tab的所有数据
|
|
|
+ getItemForType() {
|
|
|
+ let data = {}
|
|
|
+ this.tabsList.map(item => {
|
|
|
+ if (item.Code == this.activeName) {
|
|
|
+ data.code = item.Code;
|
|
|
+ data.name = item.Name;
|
|
|
}
|
|
|
})
|
|
|
+ return data
|
|
|
+ },
|
|
|
+ // 点击tab
|
|
|
+ tabClick(val) {
|
|
|
+ this.changeGraphyOrTable(this.isMyTab)
|
|
|
+ },
|
|
|
+ //修改所选建筑楼层
|
|
|
+ changeCascader(val) {
|
|
|
+ // val[0]->建筑 val[1]->楼层
|
|
|
+ if (!this.floorToMap[val[1]]) {
|
|
|
+ this.isMyTab = 2;
|
|
|
+ }
|
|
|
+ this.FloorMap = this.floorToMap[val[1]];
|
|
|
+ this.changeGraphyOrTable(this.isMyTab)
|
|
|
},
|
|
|
- myMess(i) {
|
|
|
- if (i.affected) {
|
|
|
- return "(该业务空间受元空间变化影响)"
|
|
|
+ // 判断切换至图还是表
|
|
|
+ changeGraphyOrTable(num) {
|
|
|
+ if (!this.buildFloorSelectd.length) {
|
|
|
+ this.$message("请选择楼层")
|
|
|
+ return false
|
|
|
+ }
|
|
|
+ this.activeTabType = this.getItemForType()
|
|
|
+ if (num == 2) {
|
|
|
+ this.initMessage();
|
|
|
} else {
|
|
|
- if (i.infos.FloorMap) {
|
|
|
- // if (i.StructureInfo && i.StructureInfo.FloorMap) {
|
|
|
- return ''
|
|
|
- } else {
|
|
|
- return "(请初始化平面图)"
|
|
|
- }
|
|
|
+ this.$refs.graphy.getData(this.buildFloorSelectd, this.FloorMap, this.activeTabType);
|
|
|
}
|
|
|
},
|
|
|
- //获取tabs的列表
|
|
|
- getTypes() {
|
|
|
- getBussTypes(res => {
|
|
|
- let arr = [{
|
|
|
- "code": "GeneralZone",
|
|
|
- "name": "默认分区",
|
|
|
- "rel_type": "99"
|
|
|
- },
|
|
|
- {
|
|
|
- "name": "供电分区",
|
|
|
- "rel_type": "1",
|
|
|
- "code": "PowerSupplyZone"
|
|
|
- },
|
|
|
- {
|
|
|
- "name": "照明分区",
|
|
|
- "rel_type": "2",
|
|
|
- "code": "LightingZone"
|
|
|
+ // 触发获取表头-获取初始化信息点
|
|
|
+ initMessage() {
|
|
|
+ let params = {
|
|
|
+ data: {
|
|
|
+ Orders: "sort asc",
|
|
|
+ PageNumber: 1,
|
|
|
+ PageSize: 500
|
|
|
},
|
|
|
- {
|
|
|
- "name": "空调分区",
|
|
|
- "rel_type": "4",
|
|
|
- "code": "AirConditioningZone"
|
|
|
- }, {
|
|
|
- "name": '租赁分区',
|
|
|
- 'rel_type': '10',
|
|
|
- "code": 'TenantZone'
|
|
|
- }
|
|
|
- ]
|
|
|
- this.tabsList = arr
|
|
|
- // console.log(res)
|
|
|
- // this.tabsList = res.Content
|
|
|
+ type: this.activeName
|
|
|
+ }
|
|
|
+ getDataDictionary(params, res => {
|
|
|
+ this.$refs.handsontable.getHeader(res.Content, this.buildFloorSelectd);
|
|
|
})
|
|
|
},
|
|
|
+ // 批量创建业务空间
|
|
|
+ groupCreateBSpace() {
|
|
|
+ this.$refs.graphy.groupCreateBSpace()
|
|
|
+ },
|
|
|
checkSpace(list, build, graphyId) {
|
|
|
this.floor.notRelated = true;
|
|
|
this.$refs.notRelated.getIdList(list, build, graphyId, this.activeTabType);
|
|
|
- this.$refs["graphy" + this.activeName][0].getHasSpace();
|
|
|
+ this.$refs["graphy"].getHasSpace();
|
|
|
},
|
|
|
changeShow() {
|
|
|
this.floor.dialogVisible = true;
|
|
@@ -316,50 +239,15 @@ export default {
|
|
|
},
|
|
|
//成功关联平面图
|
|
|
createSuccess() {
|
|
|
- this.$refs["graphy" + this.activeName][0].getHasSpace();
|
|
|
- this.$refs["graphy" + this.activeName][0].clearDimension();
|
|
|
+ this.$refs["graphy"].getHasSpace();
|
|
|
+ this.$refs["graphy"].clearDimension();
|
|
|
this.floor.notRelated = false;
|
|
|
},
|
|
|
//成功删除业务空间
|
|
|
delSuccess() {
|
|
|
this.floor.details = false;
|
|
|
- this.$refs["graphy" + this.activeName][0].getData(this.buildMess.map, this.buildMess, this.activeTabType);
|
|
|
- // this.$refs["graphy" + this.activeName][0].getHasSpace();
|
|
|
- // this.$refs["graphy" + this.activeName][0].clearDimension();
|
|
|
- },
|
|
|
- close() {
|
|
|
- this.buildMess = this.changeBuildMess(this.buildMess, this.options)
|
|
|
- console.log(this.buildMess, 'this.buildMess')
|
|
|
- if (this.buildMess.affected) {
|
|
|
- this.floor.influence = true;
|
|
|
- this.$nextTick(() => {
|
|
|
- this.$refs.influence.getData(this.buildMess);
|
|
|
- });
|
|
|
- }
|
|
|
- if (!this.buildMess.map) {
|
|
|
- this.isMyTab = 2;
|
|
|
- }
|
|
|
- if (this.isMyTab == 2) {
|
|
|
- this.initTabs(this.buildMess);
|
|
|
- } else {
|
|
|
- let data = this.getItemForType()
|
|
|
- this.$refs["graphy" + this.activeName][0].getData(this.buildMess.map, this.buildMess, this.activeTabType);
|
|
|
- }
|
|
|
- },
|
|
|
-
|
|
|
- //通过code查询options中的其他参数
|
|
|
- changeBuildMess(mess, options) {
|
|
|
- options.map(item => {
|
|
|
- if (!!item.children && item.children.length) {
|
|
|
- item.children.map(child => {
|
|
|
- if (child.code == mess.selectd[1]) {
|
|
|
- console.log(child, mess)
|
|
|
- mess = Object.assign(mess, child)
|
|
|
- }
|
|
|
- })
|
|
|
- }
|
|
|
- })
|
|
|
- return mess
|
|
|
+ this.$refs["graphy"].getHasSpace();
|
|
|
+ this.$refs["graphy"].clearDimension();
|
|
|
},
|
|
|
//查看业务空间详情
|
|
|
getBuinessDetails(list) {
|
|
@@ -372,87 +260,18 @@ export default {
|
|
|
this.floor.facility = true
|
|
|
this.$refs.facility.getData(infos, this.buildMess)
|
|
|
},
|
|
|
- tabClick(num) {
|
|
|
- console.log(this.$refs)
|
|
|
- this.isMyTab = num;
|
|
|
- if (num == 2) {
|
|
|
- this.initTabs(this.buildMess);
|
|
|
- } else {
|
|
|
- let data = this.getItemForType()
|
|
|
- this.$refs["graphy" + this.activeName][0].getData(this.buildMess.map, this.buildMess, this.activeTabType);
|
|
|
- }
|
|
|
- },
|
|
|
- //获取初始化信息点
|
|
|
- initMessage() {
|
|
|
- let params = {
|
|
|
- data: {
|
|
|
- Orders: "sort asc",
|
|
|
- PageNumber: 1,
|
|
|
- PageSize: 500
|
|
|
- },
|
|
|
- type: this.activeTabType.code
|
|
|
- }
|
|
|
- getDataDictionary(params, res => {
|
|
|
- let refFlag = "handsontable" + this.activeName;
|
|
|
- this.$refs[refFlag][0].getHeader(res.Content, this.activeTabType);
|
|
|
- this.getTableMain()
|
|
|
- })
|
|
|
- },
|
|
|
- getItemForType() {
|
|
|
- let data = {}
|
|
|
- this.tabsList.map(item => {
|
|
|
- if (item.code == this.activeName) {
|
|
|
- data = item
|
|
|
- }
|
|
|
- })
|
|
|
- return data
|
|
|
- },
|
|
|
- tab1Click() {
|
|
|
- this.activeTabType = this.getItemForType()
|
|
|
- this.$refs["graphy" + this.activeName][0].getData(this.buildMess.map, this.buildMess, this.activeTabType);
|
|
|
- },
|
|
|
- /**
|
|
|
- * tab标签被点击触发后的函数
|
|
|
- * @param tab tab实例
|
|
|
- * @param event tab的dom
|
|
|
- *
|
|
|
- */
|
|
|
- handleClick(tab, event) {
|
|
|
- this.activeTabType = this.getItemForType()
|
|
|
- this.initMessage();
|
|
|
- },
|
|
|
- /**
|
|
|
- * 选择楼层后初始化tabs
|
|
|
- * 由父级页面调用
|
|
|
- *
|
|
|
- * @param floorParam 父级传入的楼层信息
|
|
|
- */
|
|
|
- initTabs(floorParam) {
|
|
|
- // this.floor = floorParam;
|
|
|
- this.initMessage();
|
|
|
- },
|
|
|
- getTableMain() {
|
|
|
- let refFlag = "handsontable" + this.activeName;
|
|
|
- this.$nextTick(() => {
|
|
|
- this.$refs[refFlag][0].getData(this.buildMess);
|
|
|
- });
|
|
|
- // for (let i = 0; i < this.tabsList.length; i++) {
|
|
|
- // if (i == 0) {
|
|
|
- // }
|
|
|
- // }
|
|
|
- }
|
|
|
},
|
|
|
watch: {
|
|
|
floor: {
|
|
|
deep: true,
|
|
|
handler: function () {
|
|
|
if (this.floor.notRelated) {
|
|
|
- this.$refs["graphy" + this.activeName][0].clearDimension();
|
|
|
+ this.$refs["graphy"].clearDimension();
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
projectId() {
|
|
|
- this.changeData()
|
|
|
+ this.init()
|
|
|
}
|
|
|
}
|
|
|
};
|
|
@@ -534,23 +353,28 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
.saga-business-sapce-main {
|
|
|
- flex: 1;
|
|
|
- top: 40px;
|
|
|
- left: 0;
|
|
|
- right: 0;
|
|
|
- bottom: 0;
|
|
|
overflow: hidden;
|
|
|
- overflow-y: auto;
|
|
|
+ height: 100%;
|
|
|
background: #fff;
|
|
|
padding: 10px;
|
|
|
- .el-tabs__nav {
|
|
|
- padding-left: 10px;
|
|
|
+ /deep/ .el-tabs__item.is-top {
|
|
|
+ border-top: 2px solid transparent;
|
|
|
+ &.is-active {
|
|
|
+ border-top: 2px solid #409eff;
|
|
|
+ }
|
|
|
}
|
|
|
- .el-tabs__header{
|
|
|
- margin-bottom: 10px;
|
|
|
+ }
|
|
|
+ .spaceTypes {
|
|
|
+ .types {
|
|
|
+ float: left;
|
|
|
+ width: calc(100% - 200px);
|
|
|
}
|
|
|
- .el-tabs__active-bar {
|
|
|
- padding-left: 24px;
|
|
|
+ .groupAdd {
|
|
|
+ float: left;
|
|
|
+ width: 200px;
|
|
|
+ text-align: right;
|
|
|
+ height: 40px;
|
|
|
+ border-bottom: 1px solid #e4e7ed;
|
|
|
}
|
|
|
}
|
|
|
}
|