Browse Source

dd2

shibei_master
13176889840 4 years ago
parent
commit
74e6cb18b1
  1. 8
      src/views/modules/importRecord/index.vue
  2. 15
      src/views/modules/workSys/demandCate.vue
  3. 8
      src/views/modules/workSys/elegantCate.vue
  4. 22
      src/views/modules/workSys/resiCate.vue

8
src/views/modules/importRecord/index.vue

@ -1,6 +1,6 @@
<template> <template>
<div> <div>
<el-card class="resi-card-table"> <el-card>
<div class="resi-row-btn"> <div class="resi-row-btn">
<h2 type="success" size="small">导入记录</h2> <h2 type="success" size="small">导入记录</h2>
</div> </div>
@ -8,8 +8,8 @@
:data="tableData" :data="tableData"
border border
style="width: 100%" style="width: 100%"
:height="maxTableHeight"
class="resi-table" class="resi-table"
:max-height="maxTableHeight"
> >
<el-table-column label="序号" type="index" align="center" width="50" /> <el-table-column label="序号" type="index" align="center" width="50" />
<el-table-column prop="originFileName" label="文件名"> <el-table-column prop="originFileName" label="文件名">
@ -45,7 +45,7 @@
:current-page.sync="pageNo" :current-page.sync="pageNo"
:page-sizes="[20, 50, 100, 200]" :page-sizes="[20, 50, 100, 200]"
:page-size="parseInt(pageSize)" :page-size="parseInt(pageSize)"
layout="sizes, prev, pager, next" layout="sizes, prev, pager, next, total"
:total="total" :total="total"
> >
</el-pagination> </el-pagination>
@ -85,7 +85,7 @@ export default {
}, },
computed: { computed: {
maxTableHeight() { maxTableHeight() {
return this.clientHeight - 300; return this.clientHeight - 280;
}, },
...mapGetters(["clientHeight"]), ...mapGetters(["clientHeight"]),
}, },

15
src/views/modules/workSys/demandCate.vue

@ -1,7 +1,7 @@
<template> <template>
<div v-if="pageLoading" class="resi-container"> <div v-if="pageLoading" class="resi-container">
<el-card class="resi-card-table"> <el-card ref="searchCard" class="search-card">
<div class="resi-row-btn"> <div>
<el-form :inline="true" :model="form" class="demo-form-inline"> <el-form :inline="true" :model="form" class="demo-form-inline">
<el-form-item label="需求分类"> <el-form-item label="需求分类">
<el-select v-model="form.firstCategoryCode" filterable placeholder="请选择" clearable> <el-select v-model="form.firstCategoryCode" filterable placeholder="请选择" clearable>
@ -18,6 +18,8 @@
</el-form-item> </el-form-item>
</el-form> </el-form>
</div> </div>
</el-card>
<el-card class="resi-card-table">
<div class="resi-row-btn"> <div class="resi-row-btn">
<el-button type="success" @click="handleAdd('1', 'add')">新增分类</el-button> <el-button type="success" @click="handleAdd('1', 'add')">新增分类</el-button>
</div> </div>
@ -27,7 +29,7 @@
row-key="categoryId" row-key="categoryId"
v-loading="tableLoading" v-loading="tableLoading"
border border
max-height="800" :height="tableHeight"
style="width: 100%" style="width: 100%"
class="resi-table" class="resi-table"
> >
@ -80,7 +82,7 @@
:current-page.sync="currentPage" :current-page.sync="currentPage"
:page-sizes="[20, 50, 100, 200]" :page-sizes="[20, 50, 100, 200]"
:page-size="pageSize" :page-size="pageSize"
layout="sizes, prev, pager, next" layout="sizes, prev, pager, next, total"
:total="total" :total="total"
> >
</el-pagination> </el-pagination>
@ -135,6 +137,7 @@ export default {
pageSize: 20, pageSize: 20,
total: null, total: null,
tableData: [], tableData: [],
tableHeight: 500,
addLevel: '1', addLevel: '1',
addType: 'add', addType: 'add',
value: '', value: '',
@ -185,6 +188,10 @@ export default {
this.pageLoading = true this.pageLoading = true
}, },
mounted() { mounted() {
this.$nextTick(() => {
this.tableHeight = document.documentElement.clientHeight - this.$refs.searchCard.$el.offsetHeight - 280 + 'px'
console.log('tableHeight', this.tableHeight)
})
}, },
methods: { methods: {
handleSizeChange(val) { handleSizeChange(val) {

8
src/views/modules/workSys/elegantCate.vue

@ -12,6 +12,7 @@
:default-expand-all="false" :default-expand-all="false"
row-key="categoryId" row-key="categoryId"
:cell-style="cellStyle" :cell-style="cellStyle"
:height="tableHeight"
border border
style="width: 100%;" class="resi-table"> style="width: 100%;" class="resi-table">
<el-table-column prop="categoryName" <el-table-column prop="categoryName"
@ -77,6 +78,7 @@ export default {
tableParams: { tableParams: {
customerId: '' customerId: ''
}, },
tableHeight: 500,
search: '', search: '',
dataList: [], dataList: [],
@ -108,6 +110,12 @@ export default {
console.log('user----', user) console.log('user----', user)
this.initData(user.customerId, user.customerName) this.initData(user.customerId, user.customerName)
}, },
mounted() {
this.$nextTick(() => {
this.tableHeight = document.documentElement.clientHeight - 220 + 'px'
console.log('tableHeight', this.tableHeight)
})
},
methods: { methods: {
cellStyle ({ row, column, rowIndex, columnIndex }) { cellStyle ({ row, column, rowIndex, columnIndex }) {
// //

22
src/views/modules/workSys/resiCate.vue

@ -1,7 +1,7 @@
<template> <template>
<div v-if="pageLoading" class="resi-container"> <div v-if="pageLoading" class="resi-container">
<el-card class="resi-card-table"> <el-card ref="searchCard" class="search-card">
<div class="resi-row-btn"> <div >
<el-form :inline="true" :model="form" class="demo-form-inline"> <el-form :inline="true" :model="form" class="demo-form-inline">
<el-form-item label="是否预警"> <el-form-item label="是否预警">
<el-select <el-select
@ -40,11 +40,15 @@
</el-form-item> </el-form-item>
</el-form> </el-form>
</div> </div>
</el-card>
<el-card class="resi-card-table">
<el-table <el-table
:data="tableData" :data="tableData"
row-key="id" row-key="id"
v-loading="tableLoading" v-loading="tableLoading"
border border
:height="tableHeight"
style="width: 100%" style="width: 100%"
class="resi-table" class="resi-table"
> >
@ -93,7 +97,7 @@
:current-page.sync="currentPage" :current-page.sync="currentPage"
:page-sizes="[20, 50, 100, 200]" :page-sizes="[20, 50, 100, 200]"
:page-size="pageSize" :page-size="pageSize"
layout="sizes, prev, pager, next" layout="sizes, prev, pager, next, total"
:total="total" :total="total"
> >
</el-pagination> </el-pagination>
@ -103,12 +107,13 @@
<el-dialog <el-dialog
title="居民类别配置" title="居民类别配置"
:visible.sync="dialogVisible" :visible.sync="dialogVisible"
width="40%" width="50%"
append-to-body append-to-body
class="dialog-h"
:close-on-click-modal="false" :close-on-click-modal="false"
:before-close="handlerCancle" :before-close="handlerCancle"
> >
<el-form label-width="100px" :model="form" :rules="rules" ref="ruleForm"> <el-form label-width="150px" :model="form" :rules="rules" ref="ruleForm" class="dialog-h-content scroll-h">
<el-form-item label="类别名称"> <el-form-item label="类别名称">
<el-input v-model="form.label" size="small" style="width: 180px;" disabled></el-input> <el-input v-model="form.label" size="small" style="width: 180px;" disabled></el-input>
</el-form-item> </el-form-item>
@ -196,6 +201,7 @@ export default {
total: null, total: null,
conditions: [], conditions: [],
tableData: [], tableData: [],
tableHeight: 500,
isWarn: null, isWarn: null,
level: null, level: null,
options: [ options: [
@ -282,6 +288,10 @@ export default {
}, },
mounted() { mounted() {
this.rowDrop() this.rowDrop()
this.$nextTick(() => {
this.tableHeight = document.documentElement.clientHeight - this.$refs.searchCard.$el.offsetHeight - 230 + 'px'
console.log('tableHeight', this.tableHeight)
})
}, },
methods: { methods: {
rowDrop() { rowDrop() {
@ -501,7 +511,7 @@ export default {
return this.$message.error(res.msg) return this.$message.error(res.msg)
} else { } else {
this.tableData = res.data this.tableData = res.data
this.total = res.data.total this.total = res.data.length
} }
}) })
.catch(() => { .catch(() => {

Loading…
Cancel
Save