|
@@ -1,14 +1,20 @@
|
|
<template>
|
|
<template>
|
|
<!-- 记录事项 -->
|
|
<!-- 记录事项 -->
|
|
<div class='detail-dialog'>
|
|
<div class='detail-dialog'>
|
|
- <el-dialog :title='`${major}${tabName}记录事项`' :visible.sync='visible'>
|
|
|
|
- <div class='bottom-table'>
|
|
|
|
- <el-table :data='tableData' style='width: 100%'>
|
|
|
|
- <el-table-column label='位置' prop width='100'>
|
|
|
|
- <template slot-scope='{row}'>{{row.locfldes || '--'}}</template>
|
|
|
|
|
|
+ <el-dialog :title='`${major}${tabName}记录事项`' :visible.sync='visible' style='height:900px;overflow-y:scroll;'>
|
|
|
|
+ <div class='bottom-table' style='height:520px'>
|
|
|
|
+ <el-table :data='tableData' height='500' :border='true' style='width: 100%;margin-bottom:12px;' :span-method='objectSpanMethod'>
|
|
|
|
+ <el-table-column label='位置' prop width='140' show-overflow-tooltip resizable>
|
|
|
|
+ <template slot-scope='{row}'>{{row.smswz || '--'}}</template>
|
|
|
|
+ </el-table-column>
|
|
|
|
+ <el-table-column prop='system' label='设备' width='200' show-overflow-tooltip resizable>
|
|
|
|
+ <template slot-scope='{row}'>{{row.smsasset || '--'}}</template>
|
|
|
|
+ </el-table-column>
|
|
|
|
+ <el-table-column prop='matter' label='记录事项' show-overflow-tooltip resizable>
|
|
|
|
+ <template slot-scope='{row}'>
|
|
|
|
+ <p class='p-style' v-for='(item,index) in row.children' :key='item.sn'>{{index+1}}) {{item.matter}}</p>
|
|
|
|
+ </template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
- <el-table-column prop='system' label='设备' width='100'></el-table-column>
|
|
|
|
- <el-table-column prop='matter' label='记录事项'></el-table-column>
|
|
|
|
</el-table>
|
|
</el-table>
|
|
</div>
|
|
</div>
|
|
</el-dialog>
|
|
</el-dialog>
|
|
@@ -16,6 +22,7 @@
|
|
</template>
|
|
</template>
|
|
<script>
|
|
<script>
|
|
import { queryRecord } from '@/api/equipmentList.js'
|
|
import { queryRecord } from '@/api/equipmentList.js'
|
|
|
|
+
|
|
export default {
|
|
export default {
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
@@ -37,46 +44,57 @@ export default {
|
|
this.tabName = '其他'
|
|
this.tabName = '其他'
|
|
}
|
|
}
|
|
if (major.slice(0, 2) == 'GD') {
|
|
if (major.slice(0, 2) == 'GD') {
|
|
- this.major = '供电'
|
|
|
|
|
|
+ this.major = '供电系统'
|
|
} else if (major.slice(0, 2) == 'XF') {
|
|
} else if (major.slice(0, 2) == 'XF') {
|
|
- this.major = '消防'
|
|
|
|
|
|
+ this.major = '消防系统'
|
|
} else if (major.slice(0, 2) == 'GPS') {
|
|
} else if (major.slice(0, 2) == 'GPS') {
|
|
- this.major = '给排水'
|
|
|
|
|
|
+ this.major = '给排水系统'
|
|
} else if (major.slice(0, 2) == 'DT') {
|
|
} else if (major.slice(0, 2) == 'DT') {
|
|
- this.major = '电梯'
|
|
|
|
|
|
+ this.major = '电梯系统'
|
|
} else if (major.slice(0, 2) == 'RQ') {
|
|
} else if (major.slice(0, 2) == 'RQ') {
|
|
- this.major = '燃气'
|
|
|
|
|
|
+ this.major = '燃气系统'
|
|
} else if (major.slice(0, 2) == 'RD') {
|
|
} else if (major.slice(0, 2) == 'RD') {
|
|
- this.major = '弱电'
|
|
|
|
|
|
+ this.major = '弱电系统'
|
|
} else if (major.slice(0, 2) == 'NT') {
|
|
} else if (major.slice(0, 2) == 'NT') {
|
|
- this.major = '暖通'
|
|
|
|
|
|
+ this.major = '暖通系统'
|
|
} else if (major.slice(0, 2) == 'TJ') {
|
|
} else if (major.slice(0, 2) == 'TJ') {
|
|
- this.major = '土建'
|
|
|
|
|
|
+ this.major = '土建系统'
|
|
}
|
|
}
|
|
this.visible = true
|
|
this.visible = true
|
|
this.getRecordList(this.major)
|
|
this.getRecordList(this.major)
|
|
},
|
|
},
|
|
- objectSpanMethod({ row, column, rowIndex, columnIndex }) {},
|
|
|
|
|
|
+ objectSpanMethod({ row, column, rowIndex, columnIndex }) {
|
|
|
|
+ if (columnIndex === 0) {
|
|
|
|
+ if (row.col0Count > 0) {
|
|
|
|
+ return {
|
|
|
|
+ rowspan: row.col0Count,
|
|
|
|
+ colspan: 1
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ return {
|
|
|
|
+ rowspan: 0,
|
|
|
|
+ colspan: 0
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ },
|
|
getRecordList(major) {
|
|
getRecordList(major) {
|
|
let getParams = {
|
|
let getParams = {
|
|
- // major: major,
|
|
|
|
|
|
+ system: major,
|
|
plazaId: this.$store.state.plazaId
|
|
plazaId: this.$store.state.plazaId
|
|
}
|
|
}
|
|
queryRecord({ getParams }).then(res => {
|
|
queryRecord({ getParams }).then(res => {
|
|
- console.log('设备设施记录事项', res)
|
|
|
|
- let data = res.data || []
|
|
|
|
- for (let i in data) {
|
|
|
|
- console.log(data[i])
|
|
|
|
- console.log(data[i][0].wxwbsxline)
|
|
|
|
- for (let j in data[i][0].wxwbsxline) {
|
|
|
|
|
|
+ res.data.forEach(i => {
|
|
|
|
+ i.children.forEach((j, index) => {
|
|
this.tableData.push({
|
|
this.tableData.push({
|
|
- locfldes: i,
|
|
|
|
- system: data[i][0].wxwbsxline[j].system,
|
|
|
|
- matter: data[i][0].wxwbsxline[j].matter
|
|
|
|
|
|
+ smswz: i.smswz,
|
|
|
|
+ smsasset: j.smsasset,
|
|
|
|
+ col0Count: index === 0 ? i.children.length : 0,
|
|
|
|
+ children: j.children
|
|
})
|
|
})
|
|
- }
|
|
|
|
- }
|
|
|
|
|
|
+ })
|
|
|
|
+ })
|
|
})
|
|
})
|
|
|
|
+ console.log(this.tabName)
|
|
}
|
|
}
|
|
},
|
|
},
|
|
mounted() {}
|
|
mounted() {}
|
|
@@ -84,18 +102,15 @@ export default {
|
|
</script>
|
|
</script>
|
|
<style lang="less" scoped>
|
|
<style lang="less" scoped>
|
|
.detail-dialog {
|
|
.detail-dialog {
|
|
- .bottom {
|
|
|
|
- padding: 0 30px 14px 30px;
|
|
|
|
- p {
|
|
|
|
- font-size: 14px;
|
|
|
|
- font-family: PingFangSC-Regular, PingFang SC;
|
|
|
|
- font-weight: 400;
|
|
|
|
- color: rgba(96, 106, 120, 1);
|
|
|
|
- line-height: 22px;
|
|
|
|
- }
|
|
|
|
- .bottom-table {
|
|
|
|
- margin-top: 12px;
|
|
|
|
- }
|
|
|
|
|
|
+}
|
|
|
|
+</style>
|
|
|
|
+<style lang="less" scoped>
|
|
|
|
+.detail-dialog {
|
|
|
|
+ .el-dialog__wrapper {
|
|
|
|
+ overflow: hidden !important;
|
|
|
|
+ }
|
|
|
|
+ .el-dialog {
|
|
|
|
+ overflow-y: scroll !important;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
</style>
|
|
</style>
|