Commit c94ec921 by yuwei

项目初始化

parent 8edecfa3
......@@ -118,33 +118,36 @@
<el-divider content-position="left">返回数据</el-divider>
<el-row>
<el-col :span="24">
<el-table :data="callData.dataList" stripe border
:max-height="200"
style="width: 100%; margin: 15px 0;">
<el-table-column label="序号" align="center">
<template slot-scope="scope">
<span>{{ scope.$index + 1 }}</span>
<div v-if="apiExecuting">
<el-table :data="callData.dataList" stripe border
:max-height="200"
style="width: 100%; margin: 15px 0;">
<el-table-column label="序号" align="center">
<template slot-scope="scope">
<span>{{ scope.$index + 1 }}</span>
</template>
</el-table-column>
<template v-for="(column, index) in callData.columnList">
<el-table-column
:prop="column"
:label="column"
:key="index"
align="center"
show-overflow-tooltip
/>
</template>
</el-table-column>
<template v-for="(column, index) in callData.columnList">
<el-table-column
:prop="column"
:label="column"
:key="index"
align="center"
show-overflow-tooltip
/>
</template>
</el-table>
<el-pagination
:page-sizes="[10, 20, 50, 100]"
layout="total, sizes, prev, pager, next, jumper"
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
:current-page.sync="callData.pageNum"
:page-size.sync="callData.pageSize"
:total="callData.dataTotal"
></el-pagination>
</el-table>
<el-pagination
:page-sizes="[10, 20, 50, 100]"
layout="total, sizes, prev, pager, next, jumper"
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
:current-page.sync="callData.pageNum"
:page-size.sync="callData.pageSize"
:total="callData.dataTotal"
></el-pagination>
</div>
<div v-else>暂无数据</div>
</el-col>
</el-row>
</div>
......@@ -189,6 +192,7 @@ export default {
whereTypeOptions: [],
// 参数类型数据字典
paramTypeOptions: [],
apiExecuting: false,
callData: {
dataList: [],
columnList: [],
......@@ -267,6 +271,7 @@ export default {
this.callData.dataList = dataList
this.callData.columnList = columnList
this.callData.dataTotal = data.total
this.apiExecuting = true
}
})
} else if (this.form.reqMethod === 'POST') {
......@@ -281,6 +286,7 @@ export default {
this.callData.dataList = dataList
this.callData.columnList = columnList
this.callData.dataTotal = data.total
this.apiExecuting = true
}
})
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment