v1.5 beta版发布,详细查看发行版说明

This commit is contained in:
郑杰
2019-01-20 19:34:40 +08:00
parent 5bb9c0a156
commit 45655e2bec
37 changed files with 634 additions and 293 deletions

View File

@@ -0,0 +1,62 @@
<template>
<div class="app-container">
<eHeader :query="query"/>
<!--表格渲染-->
<el-table v-loading="loading" :data="data" size="small" border style="width: 100%;">
<el-table-column label="序号" width="80" align="center">
<template slot-scope="scope">
<div>{{ scope.$index + 1 }}</div>
</template>
</el-table-column>
<el-table-column :show-overflow-tooltip="true" prop="tableName" label="表名"/>
<el-table-column prop="createTime" label="创建日期">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.createTime) }}</span>
</template>
</el-table-column>
<el-table-column label="操作" width="160px" align="center">
<template slot-scope="scope">
<Generator :name="scope.row.tableName"/>
</template>
</el-table-column>
</el-table>
<!--分页组件-->
<el-pagination
:total="total"
style="margin-top: 8px;"
layout="total, prev, pager, next, sizes"
@size-change="sizeChange"
@current-change="pageChange"/>
</div>
</template>
<script>
import initData from '@/mixins/initData'
import { parseTime } from '@/utils/index'
import eHeader from './module/header'
import Generator from './module/generator'
export default {
components: { eHeader, Generator },
mixins: [initData],
created() {
this.$nextTick(() => {
this.init()
})
},
methods: {
parseTime,
beforeInit() {
this.url = 'api/generator/tables'
const query = this.query
const name = query.name
this.params = { page: this.page, size: this.size }
if (name) { this.params['name'] = name }
return true
}
}
}
</script>
<style scoped>
</style>