12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697 |
- <template>
- <div class='compute-item'>
- <div class='compute-table'>
- <el-table
- :border='true'
- @row-click='innerTable'
- v-loading='loading'
- :data='table3'
- style='width: 100%'
- :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='60' :index="indexMethod"></el-table-column>
- <el-table-column prop :show-overflow-tooltip='true' label='设备简称' resizable min-width='150'>
- <template slot-scope='{row}'>{{row.classqc||'--'}}</template>
- </el-table-column>
- <el-table-column prop label='数量' :show-overflow-tooltip='true' width='80'>
- <template slot-scope='{row}'>{{row.sl||'--'}}</template>
- </el-table-column>
- <el-table-column prop label='品牌' :show-overflow-tooltip='true' width="120">
- <template slot-scope='{row}'>{{row.brand||'--'}}</template>
- </el-table-column>
- <el-table-column prop label='型号' :show-overflow-tooltip='true' width="150">
- <template slot-scope='{row}'>{{row.sbxh||'--'}}</template>
- </el-table-column>
- <el-table-column prop label='楼层' :show-overflow-tooltip='true' width='100'>
- <template slot-scope='{row}'>{{row.floorcode||'--'}}</template>
- </el-table-column>
- <el-table-column prop :show-overflow-tooltip='true' label='生产厂商' min-width='150'>
- <template slot-scope='{row}'>{{row.manufacturer||'--'}}</template>
- </el-table-column>
- </el-table>
- </div>
- <div class='foot'>
- <el-pagination
- background
- layout='prev, pager, next'
- :total='total'
- :page-size='size'
- @prev-click='pageChanged'
- @next-click='pageChanged'
- @current-change='pageChanged'
- ></el-pagination>
- </div>
- <el-dialog width='90%' title='设备清单' :visible.sync='innerVisible' append-to-body>
- <detail v-if='row' :row='row' :floorChange='floorChange'></detail>
- </el-dialog>
- </div>
- </template>
- <script>
- import Select from '@/components/Select/Select.vue'
- import Detail from './detail'
- export default {
- props: ['table3', 'total', 'page', 'size', 'loading', 'floorChange'],
- data() {
- return {
- innerVisible: false,
- row: {}
- }
- },
- components: { Select, Detail },
- methods: {
- indexMethod(index) {
- return (this.page-1) * this.size + index+1
- },
- modalClose() {
- this.innerVisible = false
- },
- pageChanged(page) {
- this.$emit('Index2Emit', page)
- },
- innerTable(row) {
- this.row = row
- this.innerVisible = true
- }
- },
- mounted() {}
- }
- </script>
- <style lang="less" scoped>
- </style>
- <style lang="less">
- .compute-item {
- .foot {
- height: 32px;
- display: flex;
- justify-content: flex-end;
- margin-top: 28px;
- }
- .el-dialog {
- height: 95% !important;
- margin-top: 50px;
- }
- }
- </style>
|