|
@@ -25,7 +25,8 @@
|
|
<el-table-column align="center" label="操作" width="300">
|
|
<el-table-column align="center" label="操作" width="300">
|
|
<template v-slot="scope">
|
|
<template v-slot="scope">
|
|
<el-button icon="el-icon-edit" @click="dialogFormVisible = true">修改</el-button>
|
|
<el-button icon="el-icon-edit" @click="dialogFormVisible = true">修改</el-button>
|
|
- <el-button type="danger" icon="el-icon-delete" @click="open(scope.$index)">注销</el-button>
|
|
|
|
|
|
+ <el-button v-if="tableData[scope.row].state == 1" type="danger" icon="el-icon-delete" @click="open1(scope.$index)">注销</el-button>
|
|
|
|
+ <el-button v-if="tableData[scope.row].state == 0" type="danger" icon="el-icon-delete" @click="open2(scope.$index)">恢复</el-button>
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
</el-table>
|
|
</el-table>
|
|
@@ -42,12 +43,12 @@
|
|
</el-form>
|
|
</el-form>
|
|
<div v-if="form.way == 1">
|
|
<div v-if="form.way == 1">
|
|
<el-row :span="24" style="margin-top: 15px;">
|
|
<el-row :span="24" style="margin-top: 15px;">
|
|
- 请输入旧密码: <el-input v-model="input1" style="width:70%"></el-input>
|
|
|
|
|
|
+ 请输入旧密码: <el-input v-model="input1" style="width:70%" type="password"></el-input>
|
|
</el-row>
|
|
</el-row>
|
|
<el-row :span="24" style="margin-top: 15px;">
|
|
<el-row :span="24" style="margin-top: 15px;">
|
|
- 请输入新密码: <el-input v-model="input2" style="width:70%"></el-input>
|
|
|
|
|
|
+ 请输入新密码: <el-input v-model="input2" style="width:70%" type="password"></el-input>
|
|
</el-row>
|
|
</el-row>
|
|
- <el-row :span="24" style="margin-top: 15px;">请重新输入新密码: <el-input v-model="input3" style="width:70%"></el-input></el-row>
|
|
|
|
|
|
+ <el-row :span="24" style="margin-top: 15px;">请重新输入新密码: <el-input v-model="input3" style="width:70%" type="password"></el-input></el-row>
|
|
</div>
|
|
</div>
|
|
<div v-if="form.way == 2"><span>请重新验证证书</span></div>
|
|
<div v-if="form.way == 2"><span>请重新验证证书</span></div>
|
|
<div v-if="form.way == 3"><span>请将手指放置在仪器上,并录入指纹</span></div>
|
|
<div v-if="form.way == 3"><span>请将手指放置在仪器上,并录入指纹</span></div>
|
|
@@ -124,7 +125,7 @@ export default {
|
|
created() {},
|
|
created() {},
|
|
computed: {},
|
|
computed: {},
|
|
methods: {
|
|
methods: {
|
|
- open(num) {
|
|
|
|
|
|
+ open1(num) {
|
|
console.log(num);
|
|
console.log(num);
|
|
this.$confirm('确认注销此用户吗?', '提示', {
|
|
this.$confirm('确认注销此用户吗?', '提示', {
|
|
confirmButtonText: '确定',
|
|
confirmButtonText: '确定',
|
|
@@ -145,6 +146,27 @@ export default {
|
|
});
|
|
});
|
|
});
|
|
});
|
|
},
|
|
},
|
|
|
|
+ open2(num) {
|
|
|
|
+ console.log(num);
|
|
|
|
+ this.$confirm('确认恢复此用户吗?', '提示', {
|
|
|
|
+ confirmButtonText: '确定',
|
|
|
|
+ cancelButtonText: '取消',
|
|
|
|
+ type: 'warning',
|
|
|
|
+ })
|
|
|
|
+ .then(() => {
|
|
|
|
+ this.$set(this.tableData[num], `state`, '1');
|
|
|
|
+ this.$message({
|
|
|
|
+ type: 'success',
|
|
|
|
+ message: '恢复成功!',
|
|
|
|
+ });
|
|
|
|
+ })
|
|
|
|
+ .catch(() => {
|
|
|
|
+ this.$message({
|
|
|
|
+ type: 'info',
|
|
|
|
+ message: '已取消',
|
|
|
|
+ });
|
|
|
|
+ });
|
|
|
|
+ },
|
|
},
|
|
},
|
|
};
|
|
};
|
|
</script>
|
|
</script>
|