|
@@ -11,19 +11,23 @@
|
|
|
</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 :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||''}}
|
|
|
+ {{ 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="ShaftListName" label="已关联其他竖井" show-overflow-tooltip min-width="100" max-width="200"></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="ShaftListName" label="已关联其他竖井" show-overflow-tooltip min-width="100"
|
|
|
+ max-width="200"></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>
|
|
@@ -31,9 +35,11 @@
|
|
|
</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>
|
|
|
+ <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>
|
|
@@ -46,6 +52,7 @@
|
|
|
import { unshaftInEq, linkEqSh } from "@/api/scan/request";
|
|
|
import floorCascader from "@/components/ledger/lib/floorCascader";
|
|
|
import { mapGetters } from "vuex";
|
|
|
+
|
|
|
export default {
|
|
|
components: {
|
|
|
floorCascader
|
|
@@ -80,7 +87,8 @@ export default {
|
|
|
type: String, //选中的tab页
|
|
|
params: Object //查看的竖井关系信息
|
|
|
},
|
|
|
- created() { },
|
|
|
+ created() {
|
|
|
+ },
|
|
|
methods: {
|
|
|
//修改建筑楼层
|
|
|
changeFloor(value) {
|
|
@@ -97,38 +105,38 @@ export default {
|
|
|
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,
|
|
|
+ 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`
|
|
|
+ params.data.filters += `;buildingId isNull`
|
|
|
} else if (this.Buildfloor[0] && this.Buildfloor[0] != "all") {
|
|
|
- params.data.Filters += `;buildingId='${this.Buildfloor[0]}'`
|
|
|
+ params.data.filters += `;buildingId='${this.Buildfloor[0]}'`
|
|
|
}
|
|
|
if (this.Buildfloor[1] == "noKnow") {
|
|
|
- params.data.Filters += `;floorId isNull`
|
|
|
+ params.data.filters += `;floorId isNull`
|
|
|
} 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.keycode!=''){
|
|
|
- params.data.Filters += `;EquipName contain '${this.keycode}' or EquipLocalName contain '${this.keycode}' or EquipLocalID contain '${this.keycode}'`
|
|
|
+ if (this.keycode != '') {
|
|
|
+ params.data.filters += `;name contain '${this.keycode}' or localName contain '${this.keycode}' or localId contain '${this.keycode}'`
|
|
|
}
|
|
|
unshaftInEq(params, res => {
|
|
|
- res.Content.forEach(item => {
|
|
|
+ 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
|
|
|
+ if (item.shaftList && item.shaftList.length) {
|
|
|
+ item.ShaftListName = item.shaftList.map(shaft => {
|
|
|
+ return shaft.localName ? shaft.localName : shaft.name
|
|
|
}).join("、")
|
|
|
}
|
|
|
})
|
|
|
- this.tableData = res.Content
|
|
|
- this.page.total = res.Total
|
|
|
+ this.tableData = res.content
|
|
|
+ this.page.total = res.total
|
|
|
})
|
|
|
},
|
|
|
//选中项修改
|
|
@@ -136,11 +144,11 @@ export default {
|
|
|
this.selections = val;
|
|
|
},
|
|
|
savaRelation() {
|
|
|
- if(this.selections.length){
|
|
|
+ if (this.selections.length) {
|
|
|
let params = {
|
|
|
- ShaftId: this.params.ShaftID,
|
|
|
- EquipIdList: this.selections.map(item => {
|
|
|
- return item.EquipID
|
|
|
+ shaftId: this.params.ShaftID,
|
|
|
+ equipIdList: this.selections.map(item => {
|
|
|
+ return item.id
|
|
|
})
|
|
|
}
|
|
|
linkEqSh(params, res => {
|
|
@@ -148,7 +156,7 @@ export default {
|
|
|
this.$message.success('关联成功!')
|
|
|
this.$emit('refresh')
|
|
|
})
|
|
|
- }else {
|
|
|
+ } else {
|
|
|
this.$message('请选择要关联的设备')
|
|
|
}
|
|
|
},
|
|
@@ -173,15 +181,18 @@ export default {
|
|
|
#addEqDialog {
|
|
|
.filters {
|
|
|
margin-bottom: 10px;
|
|
|
+
|
|
|
/deep/ .el-input__inner {
|
|
|
vertical-align: baseline;
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
.table-box {
|
|
|
height: 370px;
|
|
|
- .fr{
|
|
|
+
|
|
|
+ .fr {
|
|
|
margin-top: 10px;
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
-</style>
|
|
|
+</style>
|