31
0
Fork 0

fix: bug修复

develop
JINGYJ 2 years ago
parent d63468fd41
commit 8330d1df8c

@ -10,4 +10,7 @@ VITE_CDN = false
# 是否启用gzip压缩或brotli压缩分两种情况删除原始文件和不删除原始文件
# 压缩时不删除原始文件的配置gzip、brotli、both同时开启 gzip 与 brotli 压缩、none不开启压缩默认
# 压缩时删除原始文件的配置gzip-clear、brotli-clear、both-clear同时开启 gzip 与 brotli 压缩、none不开启压缩默认
VITE_COMPRESSION = "none"
VITE_COMPRESSION = "none"
# 生产环境后端地址
VITE_APP_BASE_URL = 'http://192.168.10.13:8000'

@ -14,3 +14,6 @@ VITE_CDN = true
# 压缩时不删除原始文件的配置gzip、brotli、both同时开启 gzip 与 brotli 压缩、none不开启压缩默认
# 压缩时删除原始文件的配置gzip-clear、brotli-clear、both-clear同时开启 gzip 与 brotli 压缩、none不开启压缩默认
VITE_COMPRESSION = "none"
# 预发布环境后端地址
VITE_APP_BASE_URL = 'http://192.168.10.13:8000'

@ -45,15 +45,15 @@ export function useDept() {
{
label: "创建时间",
minWidth: 200,
prop: "createTime",
formatter: ({ createTime }) =>
dayjs(createTime).format("YYYY-MM-DD HH:mm:ss")
},
{
label: "备注",
prop: "remark",
minWidth: 320
prop: "create_time",
formatter: ({ create_time }) =>
dayjs(create_time).format("YYYY-MM-DD HH:mm:ss")
},
// {
// label: "备注",
// prop: "remark",
// minWidth: 320
// },
{
label: "操作",
fixed: "right",

@ -44,14 +44,7 @@ defineExpose({ getRef });
value: 'id',
label: 'name',
emitPath: false,
checkStrictly: true,
disabled: function (data) {
if (data.children && data.children.length > 0) {
return true;
} else {
return false;
}
}
checkStrictly: true
}"
:show-all-levels="false"
clearable

@ -394,13 +394,24 @@ export function useUser() {
isIndeterminate.value = value.length !== allRole.value.length;
}
/** 密码正则密码格式应为8-18位数字、字母、符号的任意两种组合 */
const REGEXP_PWD =
/^(?![0-9]+$)(?![a-z]+$)(?![A-Z]+$)(?!([^(0-9a-zA-Z)]|[()])+$)(?!^.*[\u4E00-\u9FA5].*$)([^(0-9a-zA-Z)]|[()]|[a-z]|[A-Z]|[0-9]){8,18}$/;
function resetPassword(row: { username: string; id: any }) {
ElMessageBox.prompt(
"请输入用户「" + row.username + "」的新密码",
"重置密码",
{
confirmButtonText: "确定",
cancelButtonText: "取消"
cancelButtonText: "取消",
inputValidator: val => {
if (val === null) {
return true; //初始化的值为null不做处理的话刚打开MessageBox就会校验出错影响用户体验
}
return REGEXP_PWD.test(val);
},
inputErrorMessage: "密码格式应为8-18位数字、字母、符号的任意两种组合"
}
)
.then(({ value }) => {
@ -409,6 +420,29 @@ export function useUser() {
type: "warning"
});
return false;
} else {
const params = {
id: row.id,
password: value
};
updateUser(params)
.then(res => {
console.log(res);
if (res.success) {
message(`${res.msg}`, {
type: "success"
});
} else {
message(`${res.msg}`, {
type: "warning"
});
}
})
.catch(error => {
message(`${error}`, {
type: "warning"
});
});
}
})
.catch(() => {});

Loading…
Cancel
Save