|
@@ -19,12 +19,12 @@
|
|
|
<el-table-column :label="`${inSpaceType}名称`" show-overflow-tooltip min-width="100">
|
|
|
<template slot-scope="scope">
|
|
|
<div>
|
|
|
- {{scope.row.EquipLocalName||scope.row.EquipName||''}}
|
|
|
+ {{scope.row.localName||scope.row.name||''}}
|
|
|
</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="localId" :label="`${inSpaceType}本地编码`" show-overflow-tooltip min-width="100"></el-table-column>
|
|
|
+ <el-table-column prop="equipCategory.name" :label="`${inSpaceType}类`" show-overflow-tooltip min-width="100"></el-table-column>
|
|
|
<el-table-column prop="linkOtherSpace" label="已关联其他业务空间" show-overflow-tooltip min-width="100"></el-table-column>
|
|
|
<el-table-column prop="action" label="操作" min-width="100">
|
|
|
<template slot-scope="scope">
|
|
@@ -88,9 +88,9 @@ export default {
|
|
|
total: 0
|
|
|
},
|
|
|
props: { //自定义字段
|
|
|
- value: "BuildID",
|
|
|
- label: "BuildLocalName",
|
|
|
- children: "Floor"
|
|
|
+ value: "id",
|
|
|
+ label: "localName",
|
|
|
+ children: "floor"
|
|
|
},
|
|
|
};
|
|
|
},
|
|
@@ -113,17 +113,15 @@ export default {
|
|
|
this.options = res.content.map(t => {
|
|
|
if (t.floor) {
|
|
|
t.floor = t.floor.map(item => {
|
|
|
- item.BuildID = item.id;
|
|
|
- item.BuildLocalName = item.localName;
|
|
|
return item;
|
|
|
})
|
|
|
} else {
|
|
|
t.Floor = []
|
|
|
}
|
|
|
- t.floor.unshift({ BuildID: 'all', BuildLocalName: '全部' }, { BuildID: 'isNull', BuildLocalName: '未明确楼层' })
|
|
|
+ t.floor.unshift({ id: 'all', localName: '全部' }, { id: 'isNull', localName: '未明确楼层' })
|
|
|
return t;
|
|
|
})
|
|
|
- this.options.unshift({ BuildID: 'all', BuildLocalName: '全部' }, { BuildID: 'isNull', BuildLocalName: '未明确楼层' })
|
|
|
+ this.options.unshift({ id: 'all', localName: '全部' }, { id: 'isNull', localName: '未明确楼层' })
|
|
|
})
|
|
|
},
|
|
|
// 显示弹窗
|
|
@@ -137,45 +135,44 @@ export default {
|
|
|
this.loading = true
|
|
|
let pa = {
|
|
|
data: {
|
|
|
- Cascade: [{ Name: "equipCategory" }],
|
|
|
- Filters: '',
|
|
|
- PageNumber: this.page.pageNumber,
|
|
|
- PageSize: this.page.pageSize,
|
|
|
- Orders: 'EquipID asc'
|
|
|
+ cascade: [{ name: "equipCategory" }],
|
|
|
+ filters: '',
|
|
|
+ pageNumber: this.page.pageNumber,
|
|
|
+ pageSize: this.page.pageSize,
|
|
|
+ orders: 'id asc'
|
|
|
},
|
|
|
type: this.zone,
|
|
|
spaceId: this.spaceId
|
|
|
}
|
|
|
if (this.floor[0] == 'isNull') {
|
|
|
- pa.data.Filters += `BuildingId isNull`
|
|
|
+ pa.data.filters += `buildingId isNull`
|
|
|
} else if (this.floor[0] && this.floor[0] != 'all') {
|
|
|
- pa.data.Filters += `BuildingId='${this.floor[0]}'`
|
|
|
+ pa.data.filters += `buildingId='${this.floor[0]}'`
|
|
|
}
|
|
|
if (this.floor[1] == 'isNull') {
|
|
|
- pa.data.Filters += `;FloorId isNull`
|
|
|
+ pa.data.filters += `;floorId isNull`
|
|
|
} else if (this.floor[1] && this.floor[1] != 'all') {
|
|
|
- pa.data.Filters += `;FloorId='${this.floor[1]}'`
|
|
|
+ pa.data.filters += `;floorId='${this.floor[1]}'`
|
|
|
}
|
|
|
if (this.keycode != '') {
|
|
|
- pa.data.Filters += `;EquipName contain "${this.keycode}" or EquipLocalName contain "${this.keycode}" or EquipLocalID contain "${this.keycode}"`
|
|
|
+ pa.data.filters += `;name contain "${this.keycode}" or localName contain "${this.keycode}" or localId contain "${this.keycode}"`
|
|
|
}
|
|
|
// 删除首尾分号
|
|
|
- pa.data.Filters = pa.data.Filters.replace(/(^;)|(;$)/g, '');
|
|
|
- if (pa.data.Filters == '') {
|
|
|
- delete pa.data.Filters
|
|
|
+ pa.data.filters = pa.data.filters.replace(/(^;)|(;$)/g, '');
|
|
|
+ if (pa.data.filters == '') {
|
|
|
+ delete pa.data.filters
|
|
|
}
|
|
|
- console.log(this.showType)
|
|
|
if (this.showType) {
|
|
|
if (this.type == "Equipment") {
|
|
|
// pa.data.Cascade.push({ Name: "zoneSpaceInBase" })
|
|
|
- pa.data.Cascade = [{ Name: "equipCategory" }];
|
|
|
+ pa.data.cascade = [{ Name: "equipCategory" }];
|
|
|
getEqNotInSpace(pa, res => {
|
|
|
this.loading = false
|
|
|
this.getDataSuc(res, 'ZoneSpaceBaseIn')
|
|
|
})
|
|
|
} else {
|
|
|
// pa.data.Cascade.push({ Name: "zoneSpaceForBase" })
|
|
|
- pa.data.Cascade = [{ Name: "equipCategory" }];
|
|
|
+ pa.data.cascade = [{ Name: "equipCategory" }];
|
|
|
getEqNotForSpace(pa, res => {
|
|
|
this.loading = false
|
|
|
this.getDataSuc(res, 'ZoneSpaceBaseFor')
|
|
@@ -183,13 +180,13 @@ export default {
|
|
|
}
|
|
|
} else {
|
|
|
if (this.type == "Equipment") {
|
|
|
- pa.data.Cascade.push({ Name: "zoneSpaceInBase" })
|
|
|
+ pa.data.cascade.push({ Name: "zoneSpaceInBase" })
|
|
|
notEqInSpaceQuery(pa, res => {
|
|
|
this.loading = false
|
|
|
this.getDataSuc(res, 'ZoneSpaceBaseIn')
|
|
|
})
|
|
|
} else {
|
|
|
- pa.data.Cascade.push({ Name: "zoneSpaceForBase" })
|
|
|
+ pa.data.cascade.push({ Name: "zoneSpaceForBase" })
|
|
|
notEqForSpaceQuery(pa, res => {
|
|
|
this.loading = false
|
|
|
this.getDataSuc(res, 'ZoneSpaceBaseFor')
|
|
@@ -199,18 +196,18 @@ export default {
|
|
|
},
|
|
|
// 获取列表成功回调
|
|
|
getDataSuc(res, zonespacebase) {
|
|
|
- let response = res.Content.map(t => {
|
|
|
+ let response = res.content.map(t => {
|
|
|
let otherSpace = [];
|
|
|
if (t[zonespacebase] && t[zonespacebase].length) {
|
|
|
t[zonespacebase].map(item => {
|
|
|
- otherSpace.push(item.RoomLocalName || item.RoomName)
|
|
|
+ otherSpace.push(item.localName || item.name)
|
|
|
})
|
|
|
}
|
|
|
t.linkOtherSpace = otherSpace.join(',');
|
|
|
return t;
|
|
|
})
|
|
|
- this.tableData = res.Content;
|
|
|
- this.page.total = res.Total;
|
|
|
+ this.tableData = res.content;
|
|
|
+ this.page.total = res.total;
|
|
|
},
|
|
|
//选中项修改
|
|
|
handleSelectionChange(val) {
|
|
@@ -220,13 +217,13 @@ export default {
|
|
|
savaRelation() {
|
|
|
let pa = {
|
|
|
data: {
|
|
|
- SpaceId: this.spaceId,
|
|
|
- EquipIdList: []
|
|
|
+ spaceId: this.spaceId,
|
|
|
+ equipIdList: []
|
|
|
},
|
|
|
type: this.zone
|
|
|
}
|
|
|
this.selections.map(t => {
|
|
|
- pa.data.EquipIdList.push(t.EquipID)
|
|
|
+ pa.data.equipIdList.push(t.id)
|
|
|
})
|
|
|
if (this.type == "Equipment") {
|
|
|
eqInSpaceCreate(pa, res => {
|