|
|
@@ -61,12 +61,13 @@
|
|
|
<el-table-column prop="phone" label="手机号"> </el-table-column>
|
|
|
<el-table-column prop="isEnabled" label="状态" width="100">
|
|
|
</el-table-column>
|
|
|
- <el-table-column label="操作" width="180">
|
|
|
+ <el-table-column label="操作" width="220">
|
|
|
<template #default='{row}'>
|
|
|
<el-button type="text" @click="editUser(row.id)">修改</el-button>
|
|
|
<!-- <el-button type="text" v-if="row.isEnabled==='启用'">停用</el-button>
|
|
|
<el-button type="text" v-else>启用</el-button> -->
|
|
|
<el-button type="text" @click="cancel(row.id)">注销</el-button>
|
|
|
+ <el-button type="text" @click="reset(row.id)">重置密码</el-button>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
|
@@ -91,7 +92,7 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-import { getUserList, userRemov } from '@/apis/system2'
|
|
|
+import { getUserList, userRemov, resetPass } from '@/apis/system2'
|
|
|
import System2Add from './system2_add.vue'
|
|
|
import System2Edit from './system2_Edit.vue'
|
|
|
import TabList from '@/components/tabLeft4.vue'
|
|
|
@@ -156,6 +157,25 @@ export default {
|
|
|
this.myData.pageSize = val
|
|
|
this.getUserList(this.myData)
|
|
|
},
|
|
|
+ // 点击重置密码
|
|
|
+ reset (id) {
|
|
|
+ this.$confirm('确定重置该用户密码吗?', '提示', {
|
|
|
+ confirmButtonText: '确定',
|
|
|
+ cancelButtonText: '取消',
|
|
|
+ type: 'warning'
|
|
|
+ }).then(async () => {
|
|
|
+ await resetPass(id)
|
|
|
+ this.$message({
|
|
|
+ type: 'success',
|
|
|
+ message: '重置密码成功!'
|
|
|
+ })
|
|
|
+ }).catch(() => {
|
|
|
+ this.$message({
|
|
|
+ type: 'info',
|
|
|
+ message: '已取消'
|
|
|
+ })
|
|
|
+ })
|
|
|
+ },
|
|
|
// 点击查找
|
|
|
find () {
|
|
|
this.myData.pageNum = 1
|