|
@@ -74,7 +74,12 @@
|
|
|
<el-button-group>
|
|
|
<el-button type="primary" text @click="clickToEdit(scope.$index, scope.row)">编辑</el-button>
|
|
|
<el-button text size="small" v-if="competence" @click="viewUserRoles(scope.row)">角色</el-button>
|
|
|
- <el-button text size="small" v-if="competence" @click="resetPasswordClick(scope.row)">重置密码</el-button>
|
|
|
+ <el-button size="small"
|
|
|
+ v-if="competence"
|
|
|
+ @contextmenu.stop.prevent="resetPasswordClick(scope.row, true)"
|
|
|
+ @click="resetPasswordClick(scope.row)">
|
|
|
+ 重置密码
|
|
|
+ </el-button>
|
|
|
</el-button-group>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
@@ -291,13 +296,38 @@ const addEmployees = () => {
|
|
|
userInfo.value = {}
|
|
|
}
|
|
|
|
|
|
-function resetPasswordClick(row) {
|
|
|
- CyMessageBox.confirm({
|
|
|
- type: 'info',
|
|
|
- message: `是否要重置:【${row.name}】密码`,
|
|
|
- }).then(() => {
|
|
|
- resetPasswordByCode(row.code)
|
|
|
- })
|
|
|
+function resetPasswordClick(row, setNextDate = false) {
|
|
|
+ if (setNextDate) {
|
|
|
+ CyMessageBox.prompt({
|
|
|
+ type: 'info',
|
|
|
+ message: `是否要重置:【${row.name}】密码`,
|
|
|
+ selectOption: [
|
|
|
+ {code: 0, name: '立刻'},
|
|
|
+ {code: 20, name: '20分钟'},
|
|
|
+ {code: 30, name: '30分钟'},
|
|
|
+ {code: 40, name: '40分钟'},
|
|
|
+ {code: 50, name: '50分钟'}
|
|
|
+ ],
|
|
|
+ inputDefaultValue: 30
|
|
|
+ }).then(({value}) => {
|
|
|
+ resetPasswordByCode({
|
|
|
+ code: row.code,
|
|
|
+ nextTime: value
|
|
|
+ })
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ CyMessageBox.confirm({
|
|
|
+ type: 'info',
|
|
|
+ message: `是否要重置:【${row.name}】密码`,
|
|
|
+ }).then(() => {
|
|
|
+ resetPasswordByCode({
|
|
|
+ code: row.code,
|
|
|
+ nextTime: 20
|
|
|
+ })
|
|
|
+ })
|
|
|
+
|
|
|
+
|
|
|
+ }
|
|
|
|
|
|
}
|
|
|
|