|
@@ -1,26 +1,25 @@
|
|
<template>
|
|
<template>
|
|
- <el-dialog :title="title" :visible.sync="dialogVisible" width="900px" id="addEqDialog">
|
|
|
|
|
|
+ <el-dialog :title="title" :visible.sync="dialogVisible" :before-close="handleClose" width="900px" id="addEqDialog">
|
|
<el-row class="filters" :gutter="20">
|
|
<el-row class="filters" :gutter="20">
|
|
- <el-col :span="8">
|
|
|
|
- <el-input placeholder="输入业务空间名称、本地编码进行查询" v-model="keycode" clearable @keyup.enter.native="getTableData">
|
|
|
|
|
|
+ <el-col :span="7" style="width:268px;padding:0px;">
|
|
|
|
+ <el-input style="" placeholder="输入业务空间名称、本地编码进行查询" v-model="keycode" clearable @keyup.enter.native="getTableData">
|
|
<i slot="suffix" class="el-input__icon el-icon-search" @click="getTableData"></i>
|
|
<i slot="suffix" class="el-input__icon el-icon-search" @click="getTableData"></i>
|
|
</el-input>
|
|
</el-input>
|
|
</el-col>
|
|
</el-col>
|
|
- <el-col :span="8.5" style="padding:0 0;">
|
|
|
|
- <floor-cascader @change="changeFloor"></floor-cascader>
|
|
|
|
|
|
+ <el-col :span="8.5" style="padding:0 0;margin-left:5px">
|
|
|
|
+ <floor-cascader ref="floorcas" @change="changeFloor"></floor-cascader>
|
|
</el-col>
|
|
</el-col>
|
|
- <el-col :span="8.5" style="padding:0 0;">
|
|
|
|
- <space-select @change="changeSpace"></space-select>
|
|
|
|
|
|
+ <el-col :span="7.5" style="padding:0 0;">
|
|
|
|
+ <space-select ref="spacesel" @change="changeSpace"></space-select>
|
|
</el-col>
|
|
</el-col>
|
|
</el-row>
|
|
</el-row>
|
|
<el-row class="filters" :gutter="20">
|
|
<el-row class="filters" :gutter="20">
|
|
-
|
|
|
|
-
|
|
|
|
|
|
+
|
|
</el-row>
|
|
</el-row>
|
|
<div class="table-box">
|
|
<div class="table-box">
|
|
<el-table :data="tableData" style="width: 100%" height="350" v-loading="loading" :header-cell-style="headerStyle" ref="multipleTable"
|
|
<el-table :data="tableData" style="width: 100%" height="350" v-loading="loading" :header-cell-style="headerStyle" ref="multipleTable"
|
|
@selection-change="handleSelectionChange">
|
|
@selection-change="handleSelectionChange">
|
|
- <el-table-column type="selection" width="55"></el-table-column>
|
|
|
|
|
|
+ <el-table-column type="selection" width="55"></el-table-column>
|
|
<el-table-column :label="`${inSpaceType}本地名称`" show-overflow-tooltip min-width="100">
|
|
<el-table-column :label="`${inSpaceType}本地名称`" show-overflow-tooltip min-width="100">
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
<div>
|
|
<div>
|
|
@@ -29,8 +28,20 @@
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
<el-table-column prop="RoomLocalID" :label="`${inSpaceType}本地编码`" show-overflow-tooltip min-width="100"></el-table-column>
|
|
<el-table-column prop="RoomLocalID" :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="" :label="`所属建筑楼层`" show-overflow-tooltip min-width="100">
|
|
|
|
+ <template slot-scope="scope">
|
|
|
|
+ <div>
|
|
|
|
+ {{(floorType[scope.row.BuildingId] || '') + (floorType[scope.row.FloorID] || '') || ''}}
|
|
|
|
+ </div>
|
|
|
|
+ </template>
|
|
|
|
+ </el-table-column>
|
|
|
|
+ <el-table-column prop="ObjectType" :label="`空间类型`" show-overflow-tooltip min-width="100">
|
|
|
|
+ <template slot-scope="scope">
|
|
|
|
+ <div>
|
|
|
|
+ {{spaceType[scope.row.ObjectType] || ''}}
|
|
|
|
+ </div>
|
|
|
|
+ </template>
|
|
|
|
+ </el-table-column>
|
|
<el-table-column prop="action" label="操作" min-width="100">
|
|
<el-table-column prop="action" label="操作" min-width="100">
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
<el-button size="mini" @click="toDetail(scope.$index, scope.row)" plain>查看详情</el-button>
|
|
<el-button size="mini" @click="toDetail(scope.$index, scope.row)" plain>查看详情</el-button>
|
|
@@ -43,14 +54,14 @@
|
|
:total="page.total"></el-pagination>
|
|
:total="page.total"></el-pagination>
|
|
</div>
|
|
</div>
|
|
<span slot="footer" class="dialog-footer">
|
|
<span slot="footer" class="dialog-footer">
|
|
- <el-button size="small" @click="dialogVisible = false">取 消</el-button>
|
|
|
|
|
|
+ <el-button size="small" @click="handleClose">取 消</el-button>
|
|
<el-button size="small" type="primary" @click="savaRelation">确 定</el-button>
|
|
<el-button size="small" type="primary" @click="savaRelation">确 定</el-button>
|
|
</span>
|
|
</span>
|
|
</el-dialog>
|
|
</el-dialog>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<script>
|
|
<script>
|
|
-import { unSysZoneSpace, linkSySh } from "@/api/scan/request";
|
|
|
|
|
|
+import { unSysZoneSpace, linkSySh, queryDictionaryHead } from "@/api/scan/request";
|
|
import floorCascader from "@/components/ledger/lib/floorCascader";
|
|
import floorCascader from "@/components/ledger/lib/floorCascader";
|
|
import dictionaryCas from '@/components/config_point/dictionaryCascader'
|
|
import dictionaryCas from '@/components/config_point/dictionaryCascader'
|
|
import spaceSelect from '@/components/ledger/lib/spaceSelect'
|
|
import spaceSelect from '@/components/ledger/lib/spaceSelect'
|
|
@@ -69,10 +80,11 @@ export default {
|
|
title: "添加系统所在业务空间",
|
|
title: "添加系统所在业务空间",
|
|
keycode: '', //输入查询条件
|
|
keycode: '', //输入查询条件
|
|
inSpaceType: '业务空间',
|
|
inSpaceType: '业务空间',
|
|
- dialogVisible: false,
|
|
|
|
Buildfloor: ['all'], // 选中的建筑楼层
|
|
Buildfloor: ['all'], // 选中的建筑楼层
|
|
Spacecategory: null,// 选中的业务空间类型
|
|
Spacecategory: null,// 选中的业务空间类型
|
|
tableData: [],
|
|
tableData: [],
|
|
|
|
+ floorData: {},//楼层
|
|
|
|
+ spaceData: {},//业务空间分区
|
|
loading: false,
|
|
loading: false,
|
|
selections: [], // 选中项
|
|
selections: [], // 选中项
|
|
page: {
|
|
page: {
|
|
@@ -90,16 +102,19 @@ export default {
|
|
},
|
|
},
|
|
props: {
|
|
props: {
|
|
type: String, //选中的tab页
|
|
type: String, //选中的tab页
|
|
- params: Object //查看的竖井关系信息
|
|
|
|
|
|
+ params: Object, //查看的竖井关系信息
|
|
|
|
+ spaceType: Object,
|
|
|
|
+ dialogVisible: Boolean,
|
|
|
|
+ floorType: Object
|
|
|
|
+ },
|
|
|
|
+ mounted() {
|
|
|
|
+
|
|
},
|
|
},
|
|
- created() { },
|
|
|
|
methods: {
|
|
methods: {
|
|
// 显示弹窗
|
|
// 显示弹窗
|
|
showDialog() {
|
|
showDialog() {
|
|
this.dialogVisible = true
|
|
this.dialogVisible = true
|
|
- this.page.pageNumber = 1
|
|
|
|
- this.tableData = []
|
|
|
|
- this.getTableData()
|
|
|
|
|
|
+
|
|
},
|
|
},
|
|
//修改建筑楼层
|
|
//修改建筑楼层
|
|
changeFloor(value) {
|
|
changeFloor(value) {
|
|
@@ -114,13 +129,13 @@ export default {
|
|
getTableData() {
|
|
getTableData() {
|
|
let params = {
|
|
let params = {
|
|
data: {
|
|
data: {
|
|
- Filters:"not LocalId isNull",
|
|
|
|
- Orders: "Name desc",
|
|
|
|
|
|
+ Filters: "not RoomID isNull",
|
|
|
|
+ Orders: "RoomLocalName desc",
|
|
PageNumber: this.page.pageNumber,
|
|
PageNumber: this.page.pageNumber,
|
|
PageSize: this.page.pageSize,
|
|
PageSize: this.page.pageSize,
|
|
},
|
|
},
|
|
shaftId: this.params.ShaftID,
|
|
shaftId: this.params.ShaftID,
|
|
- sysId:this.$route.query.SysID
|
|
|
|
|
|
+ sysId: this.$route.query.SysID
|
|
}
|
|
}
|
|
if (this.Buildfloor[0] == "noKnow") {
|
|
if (this.Buildfloor[0] == "noKnow") {
|
|
params.data.Filters += `;buildingId isNull`
|
|
params.data.Filters += `;buildingId isNull`
|
|
@@ -132,23 +147,28 @@ export default {
|
|
} else if (this.Buildfloor[1] && this.Buildfloor[1] != "all") {
|
|
} else if (this.Buildfloor[1] && this.Buildfloor[1] != "all") {
|
|
params.data.Filters += `;floorId='${this.Buildfloor[1]}'`
|
|
params.data.Filters += `;floorId='${this.Buildfloor[1]}'`
|
|
}
|
|
}
|
|
- if(this.Spacecategory){
|
|
|
|
- params.data.Filters += `;ObjectType='${this.Spacecategory}'`
|
|
|
|
|
|
+ if (this.Spacecategory) {
|
|
|
|
+ params.data.Filters += `;ObjectType='${this.Spacecategory}'`
|
|
}
|
|
}
|
|
if (this.keycode != '') {
|
|
if (this.keycode != '') {
|
|
params.data.Filters += `;RoomName contain '${this.keycode}' or RoomLocalName contain '${this.keycode}'`
|
|
params.data.Filters += `;RoomName contain '${this.keycode}' or RoomLocalName contain '${this.keycode}'`
|
|
}
|
|
}
|
|
|
|
+
|
|
unSysZoneSpace(params, res => {
|
|
unSysZoneSpace(params, res => {
|
|
|
|
+ console.log("hh ",this.floorType)
|
|
this.tableData = res.Content
|
|
this.tableData = res.Content
|
|
this.page.total = res.Total
|
|
this.page.total = res.Total
|
|
})
|
|
})
|
|
},
|
|
},
|
|
|
|
+ handleClose() {
|
|
|
|
+ this.$emit('update:dialogVisible', false)
|
|
|
|
+ },
|
|
//选中项修改
|
|
//选中项修改
|
|
handleSelectionChange(val) {
|
|
handleSelectionChange(val) {
|
|
this.selections = val;
|
|
this.selections = val;
|
|
},
|
|
},
|
|
savaRelation() {
|
|
savaRelation() {
|
|
- if(this.selections.length){
|
|
|
|
|
|
+ if (this.selections.length) {
|
|
let params = {
|
|
let params = {
|
|
ShaftId: this.params.ShaftID,
|
|
ShaftId: this.params.ShaftID,
|
|
SysIdList: this.selections.map(item => {
|
|
SysIdList: this.selections.map(item => {
|
|
@@ -160,7 +180,7 @@ export default {
|
|
this.$message.success('关联成功!')
|
|
this.$message.success('关联成功!')
|
|
this.$emit('refresh')
|
|
this.$emit('refresh')
|
|
})
|
|
})
|
|
- }else {
|
|
|
|
|
|
+ } else {
|
|
this.$message('请选择要关联的设备')
|
|
this.$message('请选择要关联的设备')
|
|
}
|
|
}
|
|
},
|
|
},
|
|
@@ -179,16 +199,28 @@ export default {
|
|
this.$message('开发中')
|
|
this.$message('开发中')
|
|
}
|
|
}
|
|
},
|
|
},
|
|
|
|
+ watch: {
|
|
|
|
+ dialogVisible: {
|
|
|
|
+ handler() {
|
|
|
|
+ if (this.dialogVisible) {
|
|
|
|
+ this.page.pageNumber = 1
|
|
|
|
+ this.tableData = []
|
|
|
|
+ this.getTableData()
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ immediate: true
|
|
|
|
+ }
|
|
|
|
+ }
|
|
};
|
|
};
|
|
</script>
|
|
</script>
|
|
<style lang="less" scoped>
|
|
<style lang="less" scoped>
|
|
#addEqDialog {
|
|
#addEqDialog {
|
|
.filters {
|
|
.filters {
|
|
- margin-bottom: 10px;
|
|
|
|
|
|
+ margin-bottom: 10px;
|
|
}
|
|
}
|
|
.table-box {
|
|
.table-box {
|
|
height: 370px;
|
|
height: 370px;
|
|
- .fr{
|
|
|
|
|
|
+ .fr {
|
|
margin-top: 10px;
|
|
margin-top: 10px;
|
|
}
|
|
}
|
|
}
|
|
}
|