|
@@ -2,19 +2,48 @@
|
|
|
<div class='gdqd-dialog'>
|
|
|
<div class='top'></div>
|
|
|
<div class='gdqd-dialog-top'>
|
|
|
- <Select width='120' style='margin-right:12px' tipPlace='top' caption='楼层:' size='small' :selectdata='floorSelect'></Select>
|
|
|
- <Select width='224' style='margin-right:12px' tipPlace='top' caption='管理归属' size='small' :selectdata='dataSelect2'></Select>
|
|
|
- <Select width='224' style='margin-right:12px' tipPlace='top' caption='设备状态' size='small' :selectdata='dataSelect2'></Select>
|
|
|
+ <Select
|
|
|
+ width='120'
|
|
|
+ style='margin-right:12px'
|
|
|
+ tipPlace='top'
|
|
|
+ caption='楼层:'
|
|
|
+ size='small'
|
|
|
+ @change='changeFloorStr'
|
|
|
+ v-model='floorStr'
|
|
|
+ :selectdata='floorSelect'
|
|
|
+ ></Select>
|
|
|
+ <Select
|
|
|
+ width='224'
|
|
|
+ v-model='sbglgsStr'
|
|
|
+ style='margin-right:12px'
|
|
|
+ v-if='sbglgs.length>0'
|
|
|
+ tipPlace='top'
|
|
|
+ caption='管理归属'
|
|
|
+ @change='changeSbglgsStr'
|
|
|
+ size='small'
|
|
|
+ :selectdata='sbglgs'
|
|
|
+ ></Select>
|
|
|
+ <Select
|
|
|
+ width='224'
|
|
|
+ style='margin-right:12px'
|
|
|
+ v-if='sb_status.length>0'
|
|
|
+ tipPlace='top'
|
|
|
+ caption='设备状态'
|
|
|
+ size='small'
|
|
|
+ @change='changeSb_status'
|
|
|
+ v-model='statusStr'
|
|
|
+ :selectdata='sb_status'
|
|
|
+ ></Select>
|
|
|
<el-input placeholder='请输入设备简称、设备编号、品牌、型号、安装位置、生产厂商、服务商搜索' style='width:490px;' size='small' prefix-icon='el-icon-search' v-model='input'></el-input>
|
|
|
</div>
|
|
|
<el-table
|
|
|
- v-loading='loading'
|
|
|
- :data='tableData'
|
|
|
+ v-loading='loadingDetail'
|
|
|
+ :data='detailData'
|
|
|
style='width:100%;margin-top:12px'
|
|
|
:header-cell-style='{background:"rgba(245,246,247,1)",fontFamily:"MicrosoftYaHei",color:"rgba(100,108,115,1)",lineHeight:"16px",fontSize:"12px"}'
|
|
|
>
|
|
|
<el-table-column type='index' label='序号' width='50'></el-table-column>
|
|
|
- <el-table-column prop='sbjc' label='设备简称'>
|
|
|
+ <el-table-column prop='sbjc' label='设备简称' :show-overflow-tooltip='true'>
|
|
|
<template slot-scope='{row}'>{{row.sbjc||'--'}}</template>
|
|
|
</el-table-column>
|
|
|
<el-table-column prop='sbbh' label='设备编号'>
|
|
@@ -41,30 +70,47 @@
|
|
|
<el-table-column prop='wzqy' label='安装位置'>
|
|
|
<template slot-scope='{row}'>{{row.wzqy||'--'}}</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column prop='manufacturer' label='生产厂商'>
|
|
|
+ <el-table-column prop='manufacturer' label='生产厂商' :show-overflow-tooltip='true'>
|
|
|
<template slot-scope='{row}'>{{row.manufacturer||'--'}}</template>
|
|
|
</el-table-column>
|
|
|
- <el-table-column prop='fws' label='服务商'>
|
|
|
+ <el-table-column prop='fws' label='服务商' :show-overflow-tooltip='true'>
|
|
|
<template slot-scope='{row}'>{{row.fws||'--'}}</template>
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
|
+ <div class='foot'>
|
|
|
+ <el-pagination
|
|
|
+ background
|
|
|
+ layout='prev, pager, next'
|
|
|
+ :total='totalDetail'
|
|
|
+ :page-size='sizeDetail'
|
|
|
+ @prev-click='pageChanged'
|
|
|
+ @next-click='pageChanged'
|
|
|
+ @current-change='pageChanged'
|
|
|
+ ></el-pagination>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</template>
|
|
|
<script>
|
|
|
import Select from '@/components/Select/Select.vue'
|
|
|
+import { querySelect } from '@/api/public.js'
|
|
|
import { mapGetters } from 'vuex'
|
|
|
+import { queryHxsbDetail } from '@/api/room.js'
|
|
|
+
|
|
|
export default {
|
|
|
+ props: ['type_code'],
|
|
|
data() {
|
|
|
return {
|
|
|
- loading: false,
|
|
|
- tableData: [],
|
|
|
- dataSelect2: [
|
|
|
- { id: 'test1', name: '选择项' },
|
|
|
- { id: 'test2', name: '单平米' },
|
|
|
- { id: 'test3', name: '下级分项' },
|
|
|
- { id: 'test4', name: '滑动平均滑动平均' }
|
|
|
- ],
|
|
|
- input: ''
|
|
|
+ sb_status: [],
|
|
|
+ sbglgs: [],
|
|
|
+ input: '',
|
|
|
+ floorStr: '',
|
|
|
+ sbglgsStr: '',
|
|
|
+ statusStr: '',
|
|
|
+ loadingDetail: true,
|
|
|
+ totalDetail: 0,
|
|
|
+ pageDetail: 1,
|
|
|
+ sizeDetail: 10,
|
|
|
+ detailData: []
|
|
|
}
|
|
|
},
|
|
|
components: {
|
|
@@ -73,21 +119,114 @@ export default {
|
|
|
computed: {
|
|
|
...mapGetters(['floorSelect'])
|
|
|
},
|
|
|
- mounted() {},
|
|
|
+ mounted() {
|
|
|
+ if (this.type_code) {
|
|
|
+ this.queryDetail()
|
|
|
+ this.query()
|
|
|
+ }
|
|
|
+ },
|
|
|
methods: {
|
|
|
- open() {
|
|
|
- this.visible = true
|
|
|
+ // 改变楼层
|
|
|
+ changeFloorStr() {
|
|
|
+ this.queryDetail()
|
|
|
+ },
|
|
|
+ // 改变管理归属
|
|
|
+ changeSbglgsStr() {
|
|
|
+ this.queryDetail()
|
|
|
+ },
|
|
|
+ // 改变设备状态
|
|
|
+ changeSb_status() {
|
|
|
+ this.queryDetail()
|
|
|
+ },
|
|
|
+ // 点击分页
|
|
|
+ pageChanged(page) {
|
|
|
+ this.pageDetail = page
|
|
|
+ this.queryDetail()
|
|
|
+ },
|
|
|
+ // 设备详情
|
|
|
+ queryDetail() {
|
|
|
+ this.detailData = []
|
|
|
+ let postParams = {
|
|
|
+ type_code: this.type_code //自定义分类内码 主要设备清单必传
|
|
|
+ }
|
|
|
+ if (this.floorStr) {
|
|
|
+ postParams.floor = this.floorStr
|
|
|
+ }
|
|
|
+ if (this.sbglgsStr) {
|
|
|
+ postParams.sbglgs = this.sbglgsStr
|
|
|
+ }
|
|
|
+ if (this.statusStr) {
|
|
|
+ postParams.sb_status = this.statusStr
|
|
|
+ }
|
|
|
+
|
|
|
+ let data = {
|
|
|
+ plazaId: this.$store.state.plazaId,
|
|
|
+ page: this.pageDetail,
|
|
|
+ size: this.sizeDetail
|
|
|
+ }
|
|
|
+ queryHxsbDetail({ data, postParams }).then(res => {
|
|
|
+ console.log('钻取表', res)
|
|
|
+ this.loadingDetail = false
|
|
|
+ this.detailData = res.data.data
|
|
|
+ this.totalDetail = res.data.count
|
|
|
+ })
|
|
|
+ },
|
|
|
+ // 下拉框数据
|
|
|
+ query() {
|
|
|
+ let postParams = [
|
|
|
+ {
|
|
|
+ columnName: { sbglgs: 'sbglgs', sb_status: 'sb_status' },
|
|
|
+ params: {
|
|
|
+ type_code: this.type_code
|
|
|
+ },
|
|
|
+ tableName: 'glsms_asset'
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ let data = {
|
|
|
+ plazaId: this.$store.state.plazaId
|
|
|
+ }
|
|
|
+ querySelect({ data, postParams }).then(res => {
|
|
|
+ console.log('管理归属', res)
|
|
|
+ if (res.data.data) {
|
|
|
+ let sb_status = [],
|
|
|
+ sbglgs = []
|
|
|
+ sb_status = res.data.data.glsms_asset.sb_status ? res.data.data.glsms_asset.sb_status : []
|
|
|
+ sbglgs = res.data.data.glsms_asset.sbglgs ? res.data.data.glsms_asset.sbglgs : []
|
|
|
+ if (sb_status.length > 0) {
|
|
|
+ sb_status.forEach(el => {
|
|
|
+ let obj = {
|
|
|
+ id: el.key,
|
|
|
+ name: el.value
|
|
|
+ }
|
|
|
+ this.sb_status.push(obj)
|
|
|
+ })
|
|
|
+ }
|
|
|
+ if (sbglgs.length > 0) {
|
|
|
+ sbglgs.forEach(el => {
|
|
|
+ let obj = {
|
|
|
+ id: el.key,
|
|
|
+ name: el.value
|
|
|
+ }
|
|
|
+ this.sbglgs.push(obj)
|
|
|
+ })
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
</script>
|
|
|
<style lang="less" scoped>
|
|
|
.gdqd-dialog {
|
|
|
- .top {
|
|
|
- }
|
|
|
.gdqd-dialog-top {
|
|
|
display: flex;
|
|
|
}
|
|
|
+ .foot {
|
|
|
+ height: 32px;
|
|
|
+ display: flex;
|
|
|
+ justify-content: flex-end;
|
|
|
+ margin-top: 28px;
|
|
|
+ }
|
|
|
}
|
|
|
</style>
|
|
|
<style lang="less">
|