diff --git a/src/api/system/lockUser.js b/src/api/system/lockUser.js new file mode 100644 index 00000000..521e2a62 --- /dev/null +++ b/src/api/system/lockUser.js @@ -0,0 +1,18 @@ +import request from '@/utils/request' + +// 查询【请填写功能名称】列表 +export function list() { + return request({ + url: '/system/user/getLockUser', + method: 'get' + }) +} + +// 查询【请填写功能名称】详细 +export function delLockUser(data) { + return request({ + url: '/system/user/delLockUser', + method: 'post', + data:data + }) +} diff --git a/src/api/system/user.js b/src/api/system/user.js index 07c7190d..fa78c0e3 100644 --- a/src/api/system/user.js +++ b/src/api/system/user.js @@ -154,3 +154,16 @@ export function checkPasswordStatus(data) { }) } +export function confirmPassword(password) { + const data = { + password + } + return request({ + url: '/system/user/confirmPassword', + method: 'post', + data:data + }) +} + + + diff --git a/src/components/bonus/passwordVerifiers/index.vue b/src/components/bonus/passwordVerifiers/index.vue new file mode 100644 index 00000000..762e8b79 --- /dev/null +++ b/src/components/bonus/passwordVerifiers/index.vue @@ -0,0 +1,11 @@ + + + + + + + diff --git a/src/views/system/ipWhitelist/index.vue b/src/views/system/ipWhitelist/index.vue index cb876cd3..991f4a00 100644 --- a/src/views/system/ipWhitelist/index.vue +++ b/src/views/system/ipWhitelist/index.vue @@ -75,17 +75,17 @@ - + {{scope.row.ipAddress?scope.row.ipAddress:scope.row.ipRangeStart+" - " + scope.row.ipRangeEnd}} - + - {{!scope.row.accessStartTime?"不限时间":parseTime(scope.row.accessStartTime,'{h}:{i}:{s}')+" - " + parseTime(scope.row.accessEndTime,'{h}:{i}:{s}')}} + {{!scope.row.accessStartTime?"不限时间":parseTime(scope.row.accessStartTime)+" - " + parseTime(scope.row.accessEndTime)}} - + - - + start-placeholder="开始日期" + end-placeholder="结束日期"> + @@ -472,7 +469,7 @@ export default { /** 删除按钮操作 */ handleDelete(row) { const ids = row.id || this.ids - this.$modal.confirm('是否确认删除【请填写功能名称】编号为"' + ids + '"的数据项?').then(function() { + this.$modal.confirm('是否确认删除这些数据项?').then(function() { return delWhitelist(ids) }).then(() => { this.getList() diff --git a/src/views/system/lockUser/index.vue b/src/views/system/lockUser/index.vue index 762e8b79..7d8d23bc 100644 --- a/src/views/system/lockUser/index.vue +++ b/src/views/system/lockUser/index.vue @@ -1,11 +1,83 @@ - - + + + + 解除锁定 + + + + + + + + + + - + diff --git a/src/views/system/user/index.vue b/src/views/system/user/index.vue index 17a0e260..ba4e99ee 100644 --- a/src/views/system/user/index.vue +++ b/src/views/system/user/index.vue @@ -56,7 +56,7 @@ - 修改 @@ -108,7 +108,7 @@ - {{scope.row.isPermanent==0?"长期账号":"临时账号" }} + {{scope.row.isPermanent==1?"长期账号":"临时账号" }} @@ -124,7 +124,7 @@ - 修改 @@ -321,7 +321,7 @@ import { updateUser, resetUserPwd, changeUserStatus, - deptTreeSelect, approvalStatus + deptTreeSelect, approvalStatus, confirmPassword } from '@/api/system/user' import { getToken } from '@/utils/auth' import Treeselect from '@riophae/vue-treeselect' @@ -627,6 +627,32 @@ export default { this.form.password = '' }) }, + confirmPassword(row){ + this.$prompt('请输入密码,鉴别用户', '提示', { + confirmButtonText: '确定', + cancelButtonText: '取消', + closeOnClickModal: false, + inputPattern: /^.{8,16}$/, + inputErrorMessage: '用户密码长度必须介于 8 和 16 之间', + inputValidator: (value) => { + // 调用 validateNewPassword 校验 + const errorMessage=function(error) { + if (error) { + return error.message; + } else { + console.log('验证通过'); + } + }; + validateNewPassword(null, value, errorMessage); + } + }).then(({ value }) => { + confirmPassword(value).then(response => { + this.$modal.msgSuccess('验证成功') + this.handleUpdate(row) + }) + }).catch(() => { + }) + }, /** 重置密码按钮操作 */ handleResetPwd(row) { this.$prompt('请输入"' + row.userName + '"的新密码', '提示', { diff --git a/src/views/system/user/profile/index.vue b/src/views/system/user/profile/index.vue index 529c5644..c230c32f 100644 --- a/src/views/system/user/profile/index.vue +++ b/src/views/system/user/profile/index.vue @@ -62,7 +62,8 @@ import userAvatar from "./userAvatar"; import userInfo from "./userInfo"; import resetPwd from "./resetPwd"; -import { getUserProfile } from "@/api/system/user"; +import { confirmPassword, getUserProfile } from '@/api/system/user' +import { validateNewPassword } from '@/utils/validate' export default { name: "Profile", @@ -76,7 +77,8 @@ export default { }; }, created() { - this.getUser(); + this.confirmPassword(); + //this.getUser(); }, methods: { getUser() { @@ -85,7 +87,34 @@ export default { this.roleGroup = response.roleGroup; this.postGroup = response.postGroup; }); - } + }, + confirmPassword(){ + this.$prompt('请输入密码,鉴别用户', '提示', { + confirmButtonText: '确定', + cancelButtonText: '取消', + closeOnClickModal: false, + inputPattern: /^.{8,16}$/, + inputErrorMessage: '用户密码长度必须介于 8 和 16 之间', + inputValidator: (value) => { + // 调用 validateNewPassword 校验 + const errorMessage=function(error) { + if (error) { + return error.message; + } else { + console.log('验证通过'); + } + }; + validateNewPassword(null, value, errorMessage); + } + }).then(({ value }) => { + confirmPassword(value).then(response => { + this.$modal.msgSuccess('验证成功') + this.getUser() + }) + }).catch(() => { + this.$tab.closePage(); + }) + }, } };