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

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

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