|
@@ -13,7 +13,7 @@
|
|
|
<el-table-column prop="birthday" label="出生日期" align="center"> </el-table-column>
|
|
|
<el-table-column label="操作" align="center" width="220">
|
|
|
<template slot-scope="scope">
|
|
|
- <el-button size="mini" type="primary" @click="editBtn(scope.row)">编辑</el-button>
|
|
|
+ <el-button size="mini" type="primary" @click="editBtn(scope.row.id)">编辑</el-button>
|
|
|
<el-button size="mini" type="danger" @click="deleteBtn(scope.row.id)">删除</el-button>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
@@ -157,8 +157,11 @@ export default {
|
|
|
this.display = 'list';
|
|
|
},
|
|
|
// 编辑
|
|
|
- async editBtn(data) {
|
|
|
- this.$set(this, `form`, data);
|
|
|
+ async editBtn(id) {
|
|
|
+ let res = await this.staffFetch(id);
|
|
|
+ if (this.$checkRes(res)) {
|
|
|
+ this.$set(this, `form`, res.data);
|
|
|
+ }
|
|
|
this.display = 'detail';
|
|
|
},
|
|
|
// 删除
|