Commit 234bea52 authored by “yiyousong”'s avatar “yiyousong”

perf: 开发修改密码和平台设置板块

parent f04d434a
......@@ -580,216 +580,216 @@ const routes = [
},
],
},
// {
// path: "thePlatformIsSet",
// name: "thePlatformIsSet",
// redirect: "/home/thePlatformIsSet/setPlatformes",
// component: () =>
// import(
// /* webpackChunkName: "thePlatformIsSet" */ "@/components/viewport/viewport.vue"
// ),
// meta: { title: "平台设置" },
// children: [
// {
// path: "setPlatformes",
// name: "setPlatformes",
// component: () =>
// import(
// /* webpackChunkName: "setPlatformes" */ "@/views/thePlatformIsSet/setPlatformes.vue"
// ),
// meta: { title: "平台设置" },
// },
// {
// path: "APIServe",
// name: "APIServe",
// component: () =>
// import(
// /* webpackChunkName: "APIServe" */ "@/views/thePlatformIsSet/components/APIServe/APIServe.vue"
// ),
// meta: { title: "API服务" },
// },
// {
// path: "productManage",
// name: "productManage",
// component: () =>
// import(
// /* webpackChunkName: "productManage" */ "@/views/thePlatformIsSet/components/productManage/productManage.vue"
// ),
// meta: { title: "产品管理" },
// },
// {
// path: "applService",
// name: "applService",
// component: () =>
// import(
// /* webpackChunkName: "applService" */ "@/views/thePlatformIsSet/components/applService.vue"
// ),
// meta: { title: "应用服务" },
// },
// {
// path: "portDocument",
// name: "portDocument",
// component: () =>
// import(
// /* webpackChunkName: "portDocument" */ "@/views/thePlatformIsSet/components/APIServe/components/portDocument.vue"
// ),
// meta: { title: "接口信息" },
// },
// {
// path: "dictionary",
// name: "dictionary",
// component: () =>
// import(
// /* webpackChunkName: "portDocument" */ "@/views/thePlatformIsSet/components/dictionary/dictionary.vue"
// ),
// meta: { title: "字典管理" },
// },
// {
// path: "permissionsModel",
// name: "permissionsModel",
// redirect: "/home/thePlatformIsSet/permissionsModel/userManagement",
// component: () =>
// import(
// /* webpackChunkName: "permissionsModel" */ "@/views/thePlatformIsSet/components/permissionsModel/permissionsModel.vue"
// ),
// meta: { title: "权限模型" },
// children: [
// {
// path: "userManagement",
// name: "userManagement",
// component: () =>
// import(
// /* webpackChunkName: "userManagement" */ "@/views/thePlatformIsSet/components/permissionsModel/userManagement.vue"
// ),
// meta: { title: "用户管理" },
// },
// {
// path: "authorityMis",
// name: "authorityMis",
// component: () =>
// import(
// /* webpackChunkName: "authorityMis" */ "@/views/thePlatformIsSet/components/permissionsModel/authorityMis.vue"
// ),
// meta: { title: "角色权限管理" },
// },
// ],
// },
// {
// path: "setMenuPerms",
// name: "setMenuPerms",
// component: () =>
// import(
// /* webpackChunkName: "setMenuPerms" */ "@/views/thePlatformIsSet/components/permissionsModel/setMenuPerms.vue"
// ),
// meta: { title: "菜单权限设置" },
// },
// {
// path: "menuManagement",
// name: "menuManagement",
// redirect: "/home/thePlatformIsSet/menuManagement/menuMgmt",
// component: () =>
// import(
// /* webpackChunkName: "menuManagement" */ "@/views/thePlatformIsSet/components/menuManagement/menuManagement.vue"
// ),
// meta: { title: "菜单管理" },
// children: [
// {
// path: "menuMgmt",
// name: "menuMgmt",
// component: () =>
// import(
// /* webpackChunkName: "menuMgmt" */ "@/views/thePlatformIsSet/components/menuManagement/menuMgmt.vue"
// ),
// meta: { title: "菜单管理" },
// },
// ],
// },
// {
// path: "logService",
// name: "logService",
// redirect: "/home/thePlatformIsSet/logService/Service",
// component: () =>
// import(
// /* webpackChunkName: "logService" */ "@/views/thePlatformIsSet/components/logService/logService.vue"
// ),
// meta: { title: "日志服务" },
// children: [
// {
// path: "Service",
// name: "Service",
// component: () =>
// import(
// /* webpackChunkName: "Service" */ "@/views/thePlatformIsSet/components/logService/Service.vue"
// ),
// meta: { title: "日志服务" },
// },
// ],
// },
// {
// path: "InterfaceManage",
// name: "InterfaceManage",
// redirect: "/home/thePlatformIsSet/InterfaceManage/manage",
// component: () =>
// import(
// /* webpackChunkName: "InterfaceManage" */ "@/views/thePlatformIsSet/components/productManage/components/InterfaceManage/module.vue"
// ),
// meta: { title: "接口管理" },
// children: [
// {
// path: "manage",
// name: "manage",
// component: () =>
// import(
// /* webpackChunkName: "manage " */ "@/views/thePlatformIsSet/components/productManage/components/InterfaceManage/alerting.vue"
// ),
// meta: { title: "接口管理" },
// },
// ],
// },
// {
// path: "appManage",
// name: "appManage",
// redirect: "/home/thePlatformIsSet/appManage/application",
// component: () =>
// import(
// /* webpackChunkName: "appManage" */ "@/views/thePlatformIsSet/components/productManage/components/appManage/module.vue"
// ),
// meta: { title: "应用管理" },
// children: [
// {
// path: "application",
// name: "application",
// component: () =>
// import(
// /* webpackChunkName: "application " */ "@/views/thePlatformIsSet/components/productManage/components/appManage/application.vue"
// ),
// meta: { title: "应用管理" },
// },
// ],
// },
// {
// path: "docData",
// name: "docData",
// redirect: "/home/thePlatformIsSet/docData/fileData",
// component: () =>
// import(
// /* webpackChunkName: "docData" */ "@/views/thePlatformIsSet/components/productManage/components/docData/module.vue"
// ),
// meta: { title: "文档资料" },
// children: [
// {
// path: "fileData",
// name: "fileData",
// component: () =>
// import(
// /* webpackChunkName: "fileData " */ "@/views/thePlatformIsSet/components/productManage/components/docData/fileData.vue"
// ),
// meta: { title: "文档资料" },
// },
// ],
// },
// ],
// },
{
path: "thePlatformIsSet",
name: "thePlatformIsSet",
redirect: "/home/thePlatformIsSet/setPlatformes",
component: () =>
import(
/* webpackChunkName: "thePlatformIsSet" */ "@/components/viewport/viewport.vue"
),
meta: { title: "平台设置" },
children: [
{
path: "setPlatformes",
name: "setPlatformes",
component: () =>
import(
/* webpackChunkName: "setPlatformes" */ "@/views/thePlatformIsSet/setPlatformes.vue"
),
meta: { title: "平台设置" },
},
{
path: "APIServe",
name: "APIServe",
component: () =>
import(
/* webpackChunkName: "APIServe" */ "@/views/thePlatformIsSet/components/APIServe/APIServe.vue"
),
meta: { title: "API服务" },
},
{
path: "productManage",
name: "productManage",
component: () =>
import(
/* webpackChunkName: "productManage" */ "@/views/thePlatformIsSet/components/productManage/productManage.vue"
),
meta: { title: "产品管理" },
},
{
path: "applService",
name: "applService",
component: () =>
import(
/* webpackChunkName: "applService" */ "@/views/thePlatformIsSet/components/applService.vue"
),
meta: { title: "应用服务" },
},
{
path: "portDocument",
name: "portDocument",
component: () =>
import(
/* webpackChunkName: "portDocument" */ "@/views/thePlatformIsSet/components/APIServe/components/portDocument.vue"
),
meta: { title: "接口信息" },
},
{
path: "dictionary",
name: "dictionary",
component: () =>
import(
/* webpackChunkName: "portDocument" */ "@/views/thePlatformIsSet/components/dictionary/dictionary.vue"
),
meta: { title: "字典管理" },
},
{
path: "permissionsModel",
name: "permissionsModel",
redirect: "/home/thePlatformIsSet/permissionsModel/userManagement",
component: () =>
import(
/* webpackChunkName: "permissionsModel" */ "@/views/thePlatformIsSet/components/permissionsModel/permissionsModel.vue"
),
meta: { title: "权限模型" },
children: [
{
path: "userManagement",
name: "userManagement",
component: () =>
import(
/* webpackChunkName: "userManagement" */ "@/views/thePlatformIsSet/components/permissionsModel/userManagement.vue"
),
meta: { title: "用户管理" },
},
{
path: "authorityMis",
name: "authorityMis",
component: () =>
import(
/* webpackChunkName: "authorityMis" */ "@/views/thePlatformIsSet/components/permissionsModel/authorityMis.vue"
),
meta: { title: "角色权限管理" },
},
],
},
{
path: "setMenuPerms",
name: "setMenuPerms",
component: () =>
import(
/* webpackChunkName: "setMenuPerms" */ "@/views/thePlatformIsSet/components/permissionsModel/setMenuPerms.vue"
),
meta: { title: "菜单权限设置" },
},
{
path: "menuManagement",
name: "menuManagement",
redirect: "/home/thePlatformIsSet/menuManagement/menuMgmt",
component: () =>
import(
/* webpackChunkName: "menuManagement" */ "@/views/thePlatformIsSet/components/menuManagement/menuManagement.vue"
),
meta: { title: "菜单管理" },
children: [
{
path: "menuMgmt",
name: "menuMgmt",
component: () =>
import(
/* webpackChunkName: "menuMgmt" */ "@/views/thePlatformIsSet/components/menuManagement/menuMgmt.vue"
),
meta: { title: "菜单管理" },
},
],
},
{
path: "logService",
name: "logService",
redirect: "/home/thePlatformIsSet/logService/Service",
component: () =>
import(
/* webpackChunkName: "logService" */ "@/views/thePlatformIsSet/components/logService/logService.vue"
),
meta: { title: "日志服务" },
children: [
{
path: "Service",
name: "Service",
component: () =>
import(
/* webpackChunkName: "Service" */ "@/views/thePlatformIsSet/components/logService/Service.vue"
),
meta: { title: "日志服务" },
},
],
},
{
path: "InterfaceManage",
name: "InterfaceManage",
redirect: "/home/thePlatformIsSet/InterfaceManage/manage",
component: () =>
import(
/* webpackChunkName: "InterfaceManage" */ "@/views/thePlatformIsSet/components/productManage/components/InterfaceManage/module.vue"
),
meta: { title: "接口管理" },
children: [
{
path: "manage",
name: "manage",
component: () =>
import(
/* webpackChunkName: "manage " */ "@/views/thePlatformIsSet/components/productManage/components/InterfaceManage/alerting.vue"
),
meta: { title: "接口管理" },
},
],
},
{
path: "appManage",
name: "appManage",
redirect: "/home/thePlatformIsSet/appManage/application",
component: () =>
import(
/* webpackChunkName: "appManage" */ "@/views/thePlatformIsSet/components/productManage/components/appManage/module.vue"
),
meta: { title: "应用管理" },
children: [
{
path: "application",
name: "application",
component: () =>
import(
/* webpackChunkName: "application " */ "@/views/thePlatformIsSet/components/productManage/components/appManage/application.vue"
),
meta: { title: "应用管理" },
},
],
},
{
path: "docData",
name: "docData",
redirect: "/home/thePlatformIsSet/docData/fileData",
component: () =>
import(
/* webpackChunkName: "docData" */ "@/views/thePlatformIsSet/components/productManage/components/docData/module.vue"
),
meta: { title: "文档资料" },
children: [
{
path: "fileData",
name: "fileData",
component: () =>
import(
/* webpackChunkName: "fileData " */ "@/views/thePlatformIsSet/components/productManage/components/docData/fileData.vue"
),
meta: { title: "文档资料" },
},
],
},
],
},
],
},
{
......
......@@ -43,10 +43,20 @@ export const changeAccount = (rule, value, callback) => {
// 验证密码
export const changePassWord = (rule, value, callback) => {
let reg =
/^\S*(?=\S{8,})(?=\S*\d)(?=\S*[A-Z])(?=\S*[a-z])(?=\S*[!@#$%^&*()_+{}|:;<>,.?~])\S*$/;
if (!value) {
callback(new Error("请输入密码"));
} else if (!/^[a-zA-Z0-9_!@#$%^&*`~()-+=]{5,18}$/.test(value)) {
callback(new Error("5到18位(字母、数字、特殊字符)"));
if (rule.required) {
callback(new Error(rule.msg || "请输入密码"));
} else {
callback();
}
} else if (!reg.test(value)) {
callback(
new Error(
"最少8位,包括至少1个大写字母,1个小写字母,1个数字,1个特殊字符"
)
);
} else {
callback();
}
......
......@@ -56,7 +56,7 @@ export default {
data() {
const changePwdAgain = (rule, value, callback) => {
if (!value) {
callback(new Error("请再次输入密码"));
callback(new Error("请再次输入密码"));
} else if (value !== this.form.newPwd) {
callback(new Error("两次密码输入不一致"));
} else {
......@@ -75,10 +75,19 @@ export default {
// { required: true, validator: changeAccount, trigger: "blur" },
// ],
oldPwd: [
{ required: true, validator: changePassWord, trigger: "blur" },
{
required: true,
message: "请输入原密码",
trigger: "blur",
},
],
newPwd: [
{ required: true, validator: changePassWord, trigger: "blur" },
{
required: true,
msg: "请输入新密码",
validator: changePassWord,
trigger: "blur",
},
],
newPwdAgain: [
{ required: true, validator: changePwdAgain, trigger: "blur" },
......
......@@ -61,9 +61,9 @@
<a-icon type="down" />
</a>
<a-menu slot="overlay">
<!-- <a-menu-item>
<a-menu-item>
<a href="javascript:;" @click="fnChangePassword">修改密码</a>
</a-menu-item> -->
</a-menu-item>
<a-menu-item>
<a href="javascript:;" @click="Logout">退出登录</a>
</a-menu-item>
......
......@@ -13,10 +13,10 @@
:model="form"
:rules="rules"
ref="formData"
:label-col="{ span: 5 }"
:wrapper-col="{ span: 19 }"
:label-col="{ span: 6 }"
:wrapper-col="{ span: 18 }"
>
<a-form-model-item label="用户名" prop="loginName">
<a-form-model-item label="用户名">
<a-input
disabled
v-model="form.loginName"
......@@ -24,10 +24,15 @@
/>
</a-form-model-item>
<a-form-model-item label="新密码" prop="newPwd">
<a-input-password v-model="form.newPwd" placeholder="请输入新密码" />
<a-input-password
allowClear
v-model="form.newPwd"
placeholder="请输入新密码"
/>
</a-form-model-item>
<a-form-model-item label="确认新密码" prop="newPwdAgain">
<a-input-password
allowClear
v-model="form.newPwdAgain"
placeholder="请再次输入新密码"
/>
......@@ -58,7 +63,7 @@ export default {
data() {
const changePwdAgain = (rule, value, callback) => {
if (!value) {
callback(new Error("请再次输入密码"));
callback(new Error("请再次输入密码"));
} else if (value !== this.form.newPwd) {
callback(new Error("两次密码输入不一致"));
} else {
......@@ -76,7 +81,12 @@ export default {
{ required: true, validator: changeAccount, trigger: "blur" },
],
newPwd: [
{ required: true, validator: changePassWord, trigger: "blur" },
{
required: true,
msg: "请输入新密码",
validator: changePassWord,
trigger: "blur",
},
],
newPwdAgain: [
{ required: true, validator: changePwdAgain, trigger: "blur" },
......@@ -121,5 +131,4 @@ export default {
};
</script>
<style lang="less" scoped>
</style>
\ No newline at end of file
<style lang="less" scoped></style>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment