Commit 021220eb by 李长胜

调整表格无数据高度

1 parent 861484fb
...@@ -82,7 +82,7 @@ ...@@ -82,7 +82,7 @@
</el-form-item> </el-form-item>
</el-row> </el-row>
</el-form> </el-form>
<GLTable ref="memberCenterRef" v-if="isReload" @setTableFinishFun="setTableFinishFun" :searchForm="searchFormTable" :tableParams="tableParams" :getListApi="getListApi" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn"> <GLTable ref="memberCenterRef" @setTableFinishFun="setTableFinishFun" :searchForm="searchFormTable" :tableParams="tableParams" :getListApi="getListApi" :pageConf="pageConf" :beforeSearchFn="beforeSearchFn">
<span slot="accountName" slot-scope="scope"> <span slot="accountName" slot-scope="scope">
<div>{{ scope.scope.accountName }}</div> <div>{{ scope.scope.accountName }}</div>
<div>{{ scope.scope.mobile }}</div> <div>{{ scope.scope.mobile }}</div>
...@@ -142,7 +142,6 @@ export default { ...@@ -142,7 +142,6 @@ export default {
// }, 1000) // }, 1000)
} }
return { return {
isReload: true,
pickerOptions: { pickerOptions: {
disabledDate(time) { disabledDate(time) {
return time.getTime() > Date.now() || time.getTime() < new Date('2017-12-31').getTime() return time.getTime() > Date.now() || time.getTime() < new Date('2017-12-31').getTime()
...@@ -361,20 +360,20 @@ mounted () { ...@@ -361,20 +360,20 @@ mounted () {
}) })
}, },
handleReset() { handleReset() {
this.isReload = false
this.searchForm = {} this.searchForm = {}
this.$nextTick(() => { this.handleSearch()
this.isReload = true
})
}, },
handleSearch() { handleSearch() {
this.$refs.memberCenterRef.refreshTable() this.$refs.memberCenterRef.refreshTable()
}, },
setTableFinishFun() { setTableFinishFun() {
//接收到的数据为空 //接收到的数据为空
if (!this.$refs.memberCenterRef.data.length) { // if (!this.$refs.memberCenterRef.data.length) {
this.$refs.memberCenterRef.setTableHeightFun() // this.$refs.memberCenterRef.setTableHeightFun()
} // }
this.$refs.memberCenterRef.data.length ? (this.$refs.memberCenterRef.tableHeightValues = '') : this.$refs.memberCenterRef.setTableHeightFun()
}, },
handleClose() { handleClose() {
this.isDialogVisible = !this.isDialogVisible this.isDialogVisible = !this.isDialogVisible
......
...@@ -184,9 +184,10 @@ export default { ...@@ -184,9 +184,10 @@ export default {
setTableFinishFun(content) { setTableFinishFun(content) {
// console.log(content, this.$refs.memberServiceRef.data.length, '获取数据') // console.log(content, this.$refs.memberServiceRef.data.length, '获取数据')
//接收到的数据为空 //接收到的数据为空
if (!this.$refs.memberServiceRef.data.length) { // if (!this.$refs.memberServiceRef.data.length) {
this.$refs.memberServiceRef.setTableHeightFun() // this.$refs.memberServiceRef.setTableHeightFun()
} // }
this.$refs.memberServiceRef.data.length ? (this.$refs.memberServiceRef.tableHeightValues = '') : this.$refs.memberServiceRef.setTableHeightFun()
}, },
//创建服务 //创建服务
handleCreate() { handleCreate() {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!