|
@@ -10,8 +10,8 @@
|
|
|
<template>
|
|
<template>
|
|
|
<el-table :data="tableData" style="width: 100%">
|
|
<el-table :data="tableData" style="width: 100%">
|
|
|
<el-table-column label="序号" type="index" width="180"></el-table-column>
|
|
<el-table-column label="序号" type="index" width="180"></el-table-column>
|
|
|
- <el-table-column label="等级ID" prop="date"></el-table-column>
|
|
|
|
|
- <el-table-column label="等级名称" prop="name"></el-table-column>
|
|
|
|
|
|
|
+ <el-table-column label="等级ID" prop="jrid"></el-table-column>
|
|
|
|
|
+ <el-table-column label="等级名称" prop="levelname"></el-table-column>
|
|
|
<el-table-column label="操作">
|
|
<el-table-column label="操作">
|
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
|
<el-button size="mini" @click="handleEdit(scope.$index, scope.row)">编辑</el-button>
|
|
<el-button size="mini" @click="handleEdit(scope.$index, scope.row)">编辑</el-button>
|
|
@@ -32,23 +32,7 @@ export default {
|
|
|
name: 'LevelList',
|
|
name: 'LevelList',
|
|
|
data() {
|
|
data() {
|
|
|
return {
|
|
return {
|
|
|
- tableData: [
|
|
|
|
|
- {
|
|
|
|
|
- date: '2016-05-02',
|
|
|
|
|
- name: '王小虎',
|
|
|
|
|
- address: '上海市普陀区金沙江路 1518 弄'
|
|
|
|
|
- },
|
|
|
|
|
- {
|
|
|
|
|
- date: '2016-05-04',
|
|
|
|
|
- name: '王小虎',
|
|
|
|
|
- address: '上海市普陀区金沙江路 1517 弄'
|
|
|
|
|
- },
|
|
|
|
|
- {
|
|
|
|
|
- date: '2016-05-01',
|
|
|
|
|
- name: '王小虎',
|
|
|
|
|
- address: '上海市普陀区金沙江路 1519 弄'
|
|
|
|
|
- }
|
|
|
|
|
- ]
|
|
|
|
|
|
|
+ tableData: []
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
// 生命周期函数 created 组件创建完成后调用
|
|
// 生命周期函数 created 组件创建完成后调用
|
|
@@ -63,7 +47,8 @@ export default {
|
|
|
// 调用获取等级列表的方法
|
|
// 调用获取等级列表的方法
|
|
|
getLevelList().then(res => {
|
|
getLevelList().then(res => {
|
|
|
// 接收到数据后 赋值给 tableData
|
|
// 接收到数据后 赋值给 tableData
|
|
|
- this.tableData = res.data
|
|
|
|
|
|
|
+ console.log(res.data.records)
|
|
|
|
|
+ this.tableData = res.data.records
|
|
|
})
|
|
})
|
|
|
},
|
|
},
|
|
|
handleEdit(index, row) {
|
|
handleEdit(index, row) {
|