Commit c94ec921 by yuwei

项目初始化

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