|
@@ -12,7 +12,12 @@
|
|
</div>
|
|
</div>
|
|
<h4>建筑</h4>
|
|
<h4>建筑</h4>
|
|
<div class="build-list">
|
|
<div class="build-list">
|
|
- <div v-for="(item,index) in buildList" :key="item.BuildID" :class="{'floor-item':true,active:item.active}" @click="changeBuild(index)">
|
|
|
|
|
|
+ <div
|
|
|
|
+ v-for="(item,index) in buildList"
|
|
|
|
+ :key="item.BuildID"
|
|
|
|
+ :class="{'floor-item':true,active:item.active}"
|
|
|
|
+ @click="changeBuild(index)"
|
|
|
|
+ >
|
|
<span>
|
|
<span>
|
|
{{item.BuildLocalName || item.BuildName}}
|
|
{{item.BuildLocalName || item.BuildName}}
|
|
<el-badge class="mark" :is-dot="false" />
|
|
<el-badge class="mark" :is-dot="false" />
|
|
@@ -25,28 +30,38 @@
|
|
<el-button size="small" type="default" @click="addFloor">添加楼层</el-button>
|
|
<el-button size="small" type="default" @click="addFloor">添加楼层</el-button>
|
|
</div>
|
|
</div>
|
|
<div class="table-box">
|
|
<div class="table-box">
|
|
- <el-table :data="tableData" style="width: 100%" height="100%" v-loading="loading" :header-cell-style="headerStyle">
|
|
|
|
|
|
+ <el-table
|
|
|
|
+ :data="tableData"
|
|
|
|
+ style="width: 100%"
|
|
|
|
+ height="100%"
|
|
|
|
+ v-loading="loading"
|
|
|
|
+ :header-cell-style="headerStyle"
|
|
|
|
+ >
|
|
<el-table-column label="楼层本地名">
|
|
<el-table-column label="楼层本地名">
|
|
<template slot-scope="scope">{{scope.row.FloorLocalName||scope.row.FloorName}}</template>
|
|
<template slot-scope="scope">{{scope.row.FloorLocalName||scope.row.FloorName}}</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
<el-table-column label="楼层信息">
|
|
<el-table-column label="楼层信息">
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
- <el-button size="mini" @click="editFloorData(scope.row)" plain icon="el-icon-edit-outline"></el-button>
|
|
|
|
|
|
+ <el-button
|
|
|
|
+ size="mini"
|
|
|
|
+ @click="editFloorData(scope.row)"
|
|
|
|
+ plain
|
|
|
|
+ icon="el-icon-edit-outline"
|
|
|
|
+ ></el-button>
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
<el-table-column prop="Datasource" label="平面图">
|
|
<el-table-column prop="Datasource" label="平面图">
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
- <p v-if="scope.row.StructureInfo&&scope.row.StructureInfo.FloorMap">
|
|
|
|
|
|
+ <p v-if="scope.row.StructureInfo&&scope.row.StructureInfo.FloorMap" @click="checfDrawImg(scope.row,1)">
|
|
<i class="iconfont icon-floorplan"></i>
|
|
<i class="iconfont icon-floorplan"></i>
|
|
查看平面图
|
|
查看平面图
|
|
</p>
|
|
</p>
|
|
- <p v-else-if="scope.row.type==2">
|
|
|
|
|
|
+ <p v-else-if="scope.row.type==2" @click="checfDrawImg(scope.row,2)">
|
|
<el-badge is-dot>
|
|
<el-badge is-dot>
|
|
<i class="iconfont icon-floorplan"></i>
|
|
<i class="iconfont icon-floorplan"></i>
|
|
- </el-badge>
|
|
|
|
- 平面图重复
|
|
|
|
|
|
+ </el-badge>平面图重复
|
|
</p>
|
|
</p>
|
|
- <p v-else>
|
|
|
|
|
|
+ <p v-else @click="checfDrawImg(scope.row,3)">
|
|
<i class="iconfont icon-nopicture"></i>
|
|
<i class="iconfont icon-nopicture"></i>
|
|
暂无平面图
|
|
暂无平面图
|
|
</p>
|
|
</p>
|
|
@@ -54,29 +69,62 @@
|
|
</el-table-column>
|
|
</el-table-column>
|
|
<el-table-column prop="SubTypeName" label="楼层贯通关系">
|
|
<el-table-column prop="SubTypeName" label="楼层贯通关系">
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
- <span style="margin-right:20px">{{scope.row.FloorThroughList?scope.row.FloorThroughList.length:0}}</span>
|
|
|
|
- <el-button size="mini" @click="changeConnection(scope.row)" plain icon="el-icon-edit-outline"></el-button>
|
|
|
|
|
|
+ <span
|
|
|
|
+ style="margin-right:20px"
|
|
|
|
+ >{{scope.row.FloorThroughList?scope.row.FloorThroughList.length:0}}</span>
|
|
|
|
+ <el-button
|
|
|
|
+ size="mini"
|
|
|
|
+ @click="changeConnection(scope.row)"
|
|
|
|
+ plain
|
|
|
|
+ icon="el-icon-edit-outline"
|
|
|
|
+ ></el-button>
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
<el-table-column prop="action" label="操作">
|
|
<el-table-column prop="action" label="操作">
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
- <el-button size="mini" @click="handleDelete(scope.row)" type="danger" plain icon="el-icon-delete"></el-button>
|
|
|
|
|
|
+ <el-button
|
|
|
|
+ size="mini"
|
|
|
|
+ @click="handleDelete(scope.row)"
|
|
|
|
+ type="danger"
|
|
|
|
+ plain
|
|
|
|
+ icon="el-icon-delete"
|
|
|
|
+ ></el-button>
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
</el-table>
|
|
</el-table>
|
|
</div>
|
|
</div>
|
|
<!-- 分页 -->
|
|
<!-- 分页 -->
|
|
- <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>
|
|
|
|
|
|
+ <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>
|
|
</div>
|
|
</el-row>
|
|
</el-row>
|
|
<!-- 添加-修改楼层 -->
|
|
<!-- 添加-修改楼层 -->
|
|
- <addFloor :title="floorTitle" ref="addFloorDialog" :curBuildId="curBuildId" :curFloorId="curFloorId" @refresh="refresh"></addFloor>
|
|
|
|
|
|
+ <addFloor
|
|
|
|
+ :title="floorTitle"
|
|
|
|
+ ref="addFloorDialog"
|
|
|
|
+ :curBuildId="curBuildId"
|
|
|
|
+ :curFloorId="curFloorId"
|
|
|
|
+ @refresh="refresh"
|
|
|
|
+ ></addFloor>
|
|
<!-- 添加-修改建筑 -->
|
|
<!-- 添加-修改建筑 -->
|
|
<addBuild :title="buildTitle" ref="addBuildDialog"></addBuild>
|
|
<addBuild :title="buildTitle" ref="addBuildDialog"></addBuild>
|
|
<!-- 删除建筑-删除楼层 -->
|
|
<!-- 删除建筑-删除楼层 -->
|
|
- <el-dialog title="提示" :visible.sync="delDialogVis" width="20%" @close="handleClose" id="messageDialog">
|
|
|
|
|
|
+ <el-dialog
|
|
|
|
+ title="提示"
|
|
|
|
+ :visible.sync="delDialogVis"
|
|
|
|
+ width="20%"
|
|
|
|
+ @close="handleClose"
|
|
|
|
+ id="messageDialog"
|
|
|
|
+ >
|
|
<div>确定要删除该{{delText}}?</div>
|
|
<div>确定要删除该{{delText}}?</div>
|
|
<span slot="footer" class="dialog-footer">
|
|
<span slot="footer" class="dialog-footer">
|
|
<el-button size="small" @click="delDialogVis=false">取消</el-button>
|
|
<el-button size="small" @click="delDialogVis=false">取消</el-button>
|
|
@@ -85,6 +133,10 @@
|
|
</el-dialog>
|
|
</el-dialog>
|
|
<!-- 添加贯通关系弹窗 -->
|
|
<!-- 添加贯通关系弹窗 -->
|
|
<addConnectivity ref="addConnectivity" @refresh="refresh"></addConnectivity>
|
|
<addConnectivity ref="addConnectivity" @refresh="refresh"></addConnectivity>
|
|
|
|
+ <!-- 查看图片弹窗 -->
|
|
|
|
+ <checkGraphy :checkGraphyVisible="checkGraphyVisible" @handleCloseCGraphy="checkGraphyVisible=false"></checkGraphy>
|
|
|
|
+ <!-- 替换楼层 -->
|
|
|
|
+ <repetitionGraphy :repetitionGraphyVisible="repetitionGraphyVisible" @closeRepeatVisible="repetitionGraphyVisible=false"></repetitionGraphy>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
@@ -93,6 +145,10 @@ import addFloor from "@/views/ready/buildfloor/addFloor/index";
|
|
import addBuild from "@/components/ready/buildfloor/addBuild";
|
|
import addBuild from "@/components/ready/buildfloor/addBuild";
|
|
import { mapGetters, mapActions } from "vuex";
|
|
import { mapGetters, mapActions } from "vuex";
|
|
import addConnectivity from "@/components/ready/buildfloor/addConnectivity";
|
|
import addConnectivity from "@/components/ready/buildfloor/addConnectivity";
|
|
|
|
+
|
|
|
|
+import checkGraphy from "./drawGraphy/checkGraphy"; //查看图片
|
|
|
|
+import noGraphy from "./drawGraphy/noGraphy"; //无图片
|
|
|
|
+import repetitionGraphy from "./drawGraphy/repetitionGraphy"; //重复图片
|
|
import {
|
|
import {
|
|
buildingQuery,
|
|
buildingQuery,
|
|
floorQuery,
|
|
floorQuery,
|
|
@@ -102,18 +158,23 @@ export default {
|
|
components: {
|
|
components: {
|
|
addFloor,
|
|
addFloor,
|
|
addBuild,
|
|
addBuild,
|
|
- addConnectivity
|
|
|
|
|
|
+ addConnectivity,
|
|
|
|
+ checkGraphy,
|
|
|
|
+ noGraphy,
|
|
|
|
+ repetitionGraphy
|
|
},
|
|
},
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
- floorTitle: '添加楼层',
|
|
|
|
- buildTitle: '添加建筑',
|
|
|
|
|
|
+ checkGraphyVisible: false, //查看平面图弹窗
|
|
|
|
+ repetitionGraphyVisible: false, // 替换平面图弹窗
|
|
|
|
+ floorTitle: "添加楼层",
|
|
|
|
+ buildTitle: "添加建筑",
|
|
delDialogVis: false,
|
|
delDialogVis: false,
|
|
- delText: '建筑',
|
|
|
|
|
|
+ delText: "建筑",
|
|
headerStyle: {
|
|
headerStyle: {
|
|
- backgroundColor: '#d9d9d9',
|
|
|
|
- color: '#2b2b2b',
|
|
|
|
- lineHeight: '30px'
|
|
|
|
|
|
+ backgroundColor: "#d9d9d9",
|
|
|
|
+ color: "#2b2b2b",
|
|
|
|
+ lineHeight: "30px"
|
|
},
|
|
},
|
|
buildList: [],
|
|
buildList: [],
|
|
tableData: [
|
|
tableData: [
|
|
@@ -128,107 +189,124 @@ export default {
|
|
total: 0
|
|
total: 0
|
|
},
|
|
},
|
|
loading: false, //列表loading
|
|
loading: false, //列表loading
|
|
- curBuildId: '', //当前选中的建筑id
|
|
|
|
- curFloorId: '', //当前选中的楼层id
|
|
|
|
- }
|
|
|
|
|
|
+ curBuildId: "", //当前选中的建筑id
|
|
|
|
+ curFloorId: "" //当前选中的楼层id
|
|
|
|
+ };
|
|
},
|
|
},
|
|
computed: {
|
|
computed: {
|
|
...mapGetters("layout", ["projectId"])
|
|
...mapGetters("layout", ["projectId"])
|
|
},
|
|
},
|
|
- mounted() { },
|
|
|
|
|
|
+ mounted() {},
|
|
created() {
|
|
created() {
|
|
- this.init()
|
|
|
|
|
|
+ this.init();
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
init() {
|
|
init() {
|
|
let bdParam = {
|
|
let bdParam = {
|
|
PageNumber: 1,
|
|
PageNumber: 1,
|
|
PageSize: 500
|
|
PageSize: 500
|
|
- }
|
|
|
|
|
|
+ };
|
|
buildingQuery(bdParam, res => {
|
|
buildingQuery(bdParam, res => {
|
|
this.buildList = res.Content;
|
|
this.buildList = res.Content;
|
|
if (this.buildList.length) {
|
|
if (this.buildList.length) {
|
|
- this.changeBuild(0)
|
|
|
|
|
|
+ this.changeBuild(0);
|
|
}
|
|
}
|
|
- })
|
|
|
|
|
|
+ });
|
|
},
|
|
},
|
|
//change build
|
|
//change build
|
|
changeBuild(index) {
|
|
changeBuild(index) {
|
|
this.buildList.map(item => {
|
|
this.buildList.map(item => {
|
|
- item.active = false
|
|
|
|
- return item
|
|
|
|
- })
|
|
|
|
|
|
+ item.active = false;
|
|
|
|
+ return item;
|
|
|
|
+ });
|
|
this.buildList[index].active = true;
|
|
this.buildList[index].active = true;
|
|
this.curBuildId = this.buildList[index].BuildID;
|
|
this.curBuildId = this.buildList[index].BuildID;
|
|
- this.getFloorTableData()
|
|
|
|
- this.$forceUpdate()
|
|
|
|
|
|
+ this.getFloorTableData();
|
|
|
|
+ this.$forceUpdate();
|
|
},
|
|
},
|
|
//add build
|
|
//add build
|
|
addBuild() {
|
|
addBuild() {
|
|
- this.$refs.addBuildDialog.showDialog()
|
|
|
|
|
|
+ this.$refs.addBuildDialog.showDialog();
|
|
},
|
|
},
|
|
//delete build
|
|
//delete build
|
|
delBuild() {
|
|
delBuild() {
|
|
- this.delText = '建筑';
|
|
|
|
- this.delDialogVis = true
|
|
|
|
|
|
+ this.delText = "建筑";
|
|
|
|
+ this.delDialogVis = true;
|
|
},
|
|
},
|
|
//edit build
|
|
//edit build
|
|
- editBuild() { },
|
|
|
|
|
|
+ editBuild() {},
|
|
//delete floor
|
|
//delete floor
|
|
handleDelete(floor) {
|
|
handleDelete(floor) {
|
|
- this.delText = '楼层';
|
|
|
|
|
|
+ this.delText = "楼层";
|
|
this.delDialogVis = true;
|
|
this.delDialogVis = true;
|
|
this.curFloorId = floor.FloorID;
|
|
this.curFloorId = floor.FloorID;
|
|
},
|
|
},
|
|
//确认删除弹窗关闭
|
|
//确认删除弹窗关闭
|
|
- handleClose() { },
|
|
|
|
- handleSizeChange(pageSize) { },
|
|
|
|
- handleCurrentChange(pageNumber) { },
|
|
|
|
|
|
+ handleClose() {},
|
|
|
|
+ handleSizeChange(pageSize) {},
|
|
|
|
+ handleCurrentChange(pageNumber) {},
|
|
addFloor() {
|
|
addFloor() {
|
|
- this.curFloorId = ''
|
|
|
|
- this.$refs.addFloorDialog.showDialog()
|
|
|
|
|
|
+ this.curFloorId = "";
|
|
|
|
+ this.$refs.addFloorDialog.showDialog();
|
|
},
|
|
},
|
|
// 获取列表
|
|
// 获取列表
|
|
getFloorTableData() {
|
|
getFloorTableData() {
|
|
let floorParam = {
|
|
let floorParam = {
|
|
- Cascade: [{ Name: 'floorThroughList' }],
|
|
|
|
|
|
+ Cascade: [{ Name: "floorThroughList" }],
|
|
Orders: "FloorSequenceID desc",
|
|
Orders: "FloorSequenceID desc",
|
|
PageNumber: this.page.pageNumber,
|
|
PageNumber: this.page.pageNumber,
|
|
PageSize: this.page.pageSize,
|
|
PageSize: this.page.pageSize,
|
|
Filters: `BuildID='${this.curBuildId}'`
|
|
Filters: `BuildID='${this.curBuildId}'`
|
|
- }
|
|
|
|
|
|
+ };
|
|
floorQuery(floorParam, res => {
|
|
floorQuery(floorParam, res => {
|
|
this.tableData = res.Content;
|
|
this.tableData = res.Content;
|
|
- this.page.total = res.Total
|
|
|
|
- })
|
|
|
|
|
|
+ this.page.total = res.Total;
|
|
|
|
+ });
|
|
},
|
|
},
|
|
// 创建楼层成功-修改关系成功
|
|
// 创建楼层成功-修改关系成功
|
|
refresh() {
|
|
refresh() {
|
|
- this.getFloorTableData()
|
|
|
|
|
|
+ this.getFloorTableData();
|
|
},
|
|
},
|
|
// 确认删除(删除建筑-楼层公用)
|
|
// 确认删除(删除建筑-楼层公用)
|
|
confirmDel() {
|
|
confirmDel() {
|
|
- if (this.delText == '楼层') {
|
|
|
|
- let delParam = [{ FloorID: this.curFloorId }]
|
|
|
|
|
|
+ if (this.delText == "楼层") {
|
|
|
|
+ let delParam = [{ FloorID: this.curFloorId }];
|
|
manageDeleteFloor(delParam, res => {
|
|
manageDeleteFloor(delParam, res => {
|
|
- this.$message.success('删除成功');
|
|
|
|
|
|
+ this.$message.success("删除成功");
|
|
this.delDialogVis = false;
|
|
this.delDialogVis = false;
|
|
- this.getFloorTableData()
|
|
|
|
- })
|
|
|
|
|
|
+ this.getFloorTableData();
|
|
|
|
+ });
|
|
} else {
|
|
} else {
|
|
//todo
|
|
//todo
|
|
}
|
|
}
|
|
},
|
|
},
|
|
// 修改楼层信息
|
|
// 修改楼层信息
|
|
editFloorData(floor) {
|
|
editFloorData(floor) {
|
|
- this.floorTitle = '编辑楼层信息'
|
|
|
|
|
|
+ this.floorTitle = "编辑楼层信息";
|
|
this.curFloorId = floor.FloorID;
|
|
this.curFloorId = floor.FloorID;
|
|
- this.$refs.addFloorDialog.showDialog(floor)
|
|
|
|
|
|
+ this.$refs.addFloorDialog.showDialog(floor);
|
|
},
|
|
},
|
|
// 修改楼层贯通关系
|
|
// 修改楼层贯通关系
|
|
changeConnection(row) {
|
|
changeConnection(row) {
|
|
- this.$refs.addConnectivity.showDialog()
|
|
|
|
- this.$refs.addConnectivity.floor = row
|
|
|
|
|
|
+ this.$refs.addConnectivity.showDialog();
|
|
|
|
+ this.$refs.addConnectivity.floor = row;
|
|
|
|
+ },
|
|
|
|
+ // 查看平面图
|
|
|
|
+ checfDrawImg(item,index) {
|
|
|
|
+ console.log(item)
|
|
|
|
+ if (1 == index) {
|
|
|
|
+ // 查看
|
|
|
|
+ this.checkGraphyVisible = true;
|
|
|
|
+ this.repetitionGraphyVisible = false;
|
|
|
|
+ } else if (2 == index) {
|
|
|
|
+ // 重复
|
|
|
|
+ this.checkGraphyVisible = false;
|
|
|
|
+ this.repetitionGraphyVisible = true;
|
|
|
|
+ } else {
|
|
|
|
+ //暂无
|
|
|
|
+ this.checkGraphyVisible = false;
|
|
|
|
+ this.repetitionGraphyVisible = true;
|
|
|
|
+ }
|
|
}
|
|
}
|
|
},
|
|
},
|
|
watch: {
|
|
watch: {
|
|
@@ -236,7 +314,7 @@ export default {
|
|
this.init();
|
|
this.init();
|
|
}
|
|
}
|
|
}
|
|
}
|
|
-}
|
|
|
|
|
|
+};
|
|
</script>
|
|
</script>
|
|
<style lang="less" scoped>
|
|
<style lang="less" scoped>
|
|
#bd-fl-manage {
|
|
#bd-fl-manage {
|