Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
so-manage-ui
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
smart-operation
so-manage-ui
Commits
93515534
Commit
93515534
authored
Mar 16, 2023
by
何小勇
Browse files
Options
Browse Files
Download
Plain Diff
个人中心
parents
15b38901
4d6d53a0
Changes
25
Hide whitespace changes
Inline
Side-by-side
Showing
25 changed files
with
394 additions
and
471 deletions
+394
-471
src/App.vue
src/App.vue
+74
-73
src/bg-ui/bg-nav-list.vue
src/bg-ui/bg-nav-list.vue
+1
-1
src/bg-ui/index.scss
src/bg-ui/index.scss
+1
-1
src/components/login-by-account.vue
src/components/login-by-account.vue
+2
-2
src/components/login-by-code.vue
src/components/login-by-code.vue
+3
-95
src/page/login/index.vue
src/page/login/index.vue
+10
-1
src/page/main/config/dict/index.vue
src/page/main/config/dict/index.vue
+2
-6
src/page/main/develop/account/add/contact-form.vue
src/page/main/develop/account/add/contact-form.vue
+0
-17
src/page/main/develop/account/add/index.vue
src/page/main/develop/account/add/index.vue
+4
-7
src/page/main/develop/account/add/system-form.vue
src/page/main/develop/account/add/system-form.vue
+43
-5
src/page/main/develop/account/detail/index.vue
src/page/main/develop/account/detail/index.vue
+2
-7
src/page/main/develop/account/index.vue
src/page/main/develop/account/index.vue
+3
-7
src/page/main/develop/menu/index.vue
src/page/main/develop/menu/index.vue
+2
-6
src/page/main/system/organization/index.vue
src/page/main/system/organization/index.vue
+5
-8
src/page/main/system/organization/org-detail/index.vue
src/page/main/system/organization/org-detail/index.vue
+2
-7
src/page/main/system/organization/org-user/index.vue
src/page/main/system/organization/org-user/index.vue
+2
-7
src/page/main/system/organization/platform-user/index.vue
src/page/main/system/organization/platform-user/index.vue
+2
-7
src/page/main/system/organization/user-detail/index.vue
src/page/main/system/organization/user-detail/index.vue
+2
-7
src/page/main/system/role/add/role_form.vue
src/page/main/system/role/add/role_form.vue
+2
-7
src/page/main/system/role/index.vue
src/page/main/system/role/index.vue
+2
-6
src/page/password/account-form.vue
src/page/password/account-form.vue
+56
-7
src/page/password/index.vue
src/page/password/index.vue
+23
-75
src/page/password/password-form.vue
src/page/password/password-form.vue
+12
-2
src/page/registe/index.vue
src/page/registe/index.vue
+97
-65
vite.config.js
vite.config.js
+42
-45
No files found.
src/App.vue
View file @
93515534
...
@@ -4,12 +4,17 @@
...
@@ -4,12 +4,17 @@
<bg-menu
:path=
"nowParent.path"
v-if=
"menuShow"
@
openMsg=
"openMsg"
></bg-menu>
<bg-menu
:path=
"nowParent.path"
v-if=
"menuShow"
@
openMsg=
"openMsg"
></bg-menu>
<div
class=
"container"
:class=
"menuShow ? '' : 'full_screen'"
v-if=
"pageShow"
>
<div
class=
"container"
:class=
"menuShow ? '' : 'full_screen'"
v-if=
"pageShow"
>
<!--
<bg-nav
:highlightParentRule=
"highlightParentRule"
:title=
"nowParent.menuName"
width=
"208px"
:list=
"nowParent.children"
v-show=
"navShow"
class=
"con-nav"
/>
-->
<!--
<bg-nav
:highlightParentRule=
"highlightParentRule"
:title=
"nowParent.menuName"
width=
"208px"
:list=
"nowParent.children"
v-show=
"navShow"
class=
"con-nav"
/>
-->
<bg-nav
:highlightParentRule=
"highlightParentRule"
width=
"208px"
:list=
"nowParent.children"
v-show=
"navShow"
class=
"con-nav"
/>
<bg-nav
:highlightParentRule=
"highlightParentRule"
width=
"208px"
:list=
"nowParent.children"
v-show=
"navShow"
class=
"con-nav"
/>
<div
class=
"bg-main view"
>
<div
class=
"bg-main view"
>
<router-view
/>
<router-view
/>
</div>
</div>
</div>
</div>
<div
class=
"container"
v-else-if=
"$route.path
==
'/login'"
>
<div
class=
"container"
v-else-if=
"$route.path
==
'/login'"
>
<div
class=
"bg-main view"
>
<div
class=
"bg-main view"
>
<login></login>
<login></login>
</div>
</div>
...
@@ -41,25 +46,25 @@ import page404 from '@/page/404.vue'
...
@@ -41,25 +46,25 @@ import page404 from '@/page/404.vue'
import
registe
from
'
@/page/registe/index.vue
'
import
registe
from
'
@/page/registe/index.vue
'
import
password
from
'
@/page/password/index.vue
'
import
password
from
'
@/page/password/index.vue
'
export
default
{
export
default
{
components
:{
components
:
{
bgMenu
,
bgMenu
,
login
,
login
,
page404
,
page404
,
registe
,
registe
,
password
password
},
},
computed
:{
computed
:
{
msgBoxFlag
(){
msgBoxFlag
()
{
return
this
.
$store
.
state
.
msgBoxFlag
return
this
.
$store
.
state
.
msgBoxFlag
;
},
},
userInfo
()
{
userInfo
()
{
return
this
.
$store
.
state
.
userInfo
||
{};
return
this
.
$store
.
state
.
userInfo
||
{};
},
},
navMenu
(){
navMenu
()
{
return
this
.
$store
.
state
.
menu
return
this
.
$store
.
state
.
menu
;
},
},
menuObj
(){
menuObj
()
{
return
this
.
$store
.
state
.
menuObj
return
this
.
$store
.
state
.
menuObj
;
},
},
navShow
(){
navShow
(){
return
false
||!
[
'
/
'
,
'
/404
'
,
'
/login
'
,
'
/registe
'
,
'
/password
'
].
includes
(
this
.
$route
.
path
)
return
false
||!
[
'
/
'
,
'
/404
'
,
'
/login
'
,
'
/registe
'
,
'
/password
'
].
includes
(
this
.
$route
.
path
)
...
@@ -67,103 +72,99 @@ export default {
...
@@ -67,103 +72,99 @@ export default {
pageShow
(){
pageShow
(){
return
false
||!
[
'
/404
'
,
'
/login
'
,
'
/registe
'
,
'
/password
'
].
includes
(
this
.
$route
.
path
)
return
false
||!
[
'
/404
'
,
'
/login
'
,
'
/registe
'
,
'
/password
'
].
includes
(
this
.
$route
.
path
)
},
},
rowPath
(){
rowPath
()
{
if
(
this
.
pageShow
&&
this
.
$store
.
state
.
userInfo
)
{
if
(
this
.
pageShow
&&
this
.
$store
.
state
.
userInfo
)
{
return
this
.
menuObj
[
this
.
$route
.
path
]
&&
this
.
menuObj
[
this
.
$route
.
path
].
rowPath
return
this
.
menuObj
[
this
.
$route
.
path
]
&&
this
.
menuObj
[
this
.
$route
.
path
].
rowPath
;
}
else
{
}
else
{
return
''
return
""
;
}
}
},
},
nowParent
(){
nowParent
()
{
if
(
this
.
pageShow
&&
this
.
$store
.
state
.
userInfo
)
{
if
(
this
.
pageShow
&&
this
.
$store
.
state
.
userInfo
)
{
// console.log(2222222)
// console.log(2222222)
// console.log(this.navMenu)
// console.log(this.navMenu)
// console.log(this.rowPath)
// console.log(this.rowPath)
return
this
.
rowPath
?
this
.
navMenu
[
this
.
rowPath
.
slice
(
1
,
2
)]:
''
return
this
.
rowPath
?
this
.
navMenu
[
this
.
rowPath
.
slice
(
1
,
2
)]
:
""
;
}
else
{
}
else
{
return
""
;
return
''
}
}
},
},
menuShow
()
{
menuShow
()
{
return
false
||!
[
"
/ui-example
"
].
includes
(
this
.
$route
.
path
)
return
false
||
!
[
"
/ui-example
"
].
includes
(
this
.
$route
.
path
);
}
}
,
},
},
watch
:{
watch
:
{
msgBoxFlag
(
n
,
o
)
{
msgBoxFlag
(
n
,
o
)
{
this
.
readFlag
=
!
this
.
readFlag
this
.
readFlag
=
!
this
.
readFlag
;
},
},
userInfo
:
{
userInfo
:
{
handler
()
{
handler
()
{
this
.
initMsg
()
this
.
initMsg
()
;
},
},
deep
:
true
,
deep
:
true
,
}
}
,
},
},
data
(){
data
()
{
return
{
return
{
readFlag
:
false
,
readFlag
:
false
,
menuIndex
:
''
,
menuIndex
:
""
,
}
}
;
},
},
created
(){
created
()
{
// this.initMsg()
// this.initMsg()
},
},
mounted
()
{
mounted
()
{},
},
methods
:
{
methods
:{
openMsg
(
data
)
{
openMsg
(
data
)
{
this
.
readFlag
=
!
this
.
readFlag
;
this
.
readFlag
=
!
this
.
readFlag
;
},
},
initMsg
()
{
initMsg
()
{
if
(
this
.
userInfo
&&
this
.
userInfo
.
system_id
)
{
if
(
this
.
userInfo
&&
this
.
userInfo
.
system_id
)
{
this
.
$trace
.
setOptionValue
(
'
userId
'
,
this
.
userInfo
.
system_id
)
this
.
$trace
.
setOptionValue
(
"
userId
"
,
this
.
userInfo
.
system_id
);
// this.$trace.setOptionValue('userType',this.userInfo.userType)
// this.$trace.setOptionValue('userType',this.userInfo.userType)
// this.$trace.setOptionValue('roleId',this.userInfo.roleIds.join(','))
// this.$trace.setOptionValue('roleId',this.userInfo.roleIds.join(','))
this
.
$trace
.
setOptionValue
(
'
organization
'
,
this
.
userInfo
.
organization_id
)
this
.
$trace
.
setOptionValue
(
"
organization
"
,
this
.
userInfo
.
organization_id
);
}
}
},
},
pathToData
(
data
,
path
){
pathToData
(
data
,
path
)
{
let
arr
=
path
.
split
(
"
.
"
);
let
arr
=
path
.
split
(
'
.
'
)
let
temp
=
null
;
let
temp
=
null
let
tempName
=
""
;
let
tempName
=
''
let
tempPath
=
""
;
let
tempPath
=
''
arr
.
forEach
((
e
,
idx
)
=>
{
arr
.
forEach
((
e
,
idx
)
=>
{
if
(
idx
==
1
)
{
temp
=
data
[
e
];
if
(
idx
==
1
){
tempName
=
data
[
e
].
menuName
;
temp
=
data
[
e
]
tempPath
=
data
[
e
].
path
;
tempName
=
data
[
e
].
menuName
data
=
data
[
e
];
tempPath
=
data
[
e
].
path
data
=
data
[
e
]
}
}
if
(
idx
==
2
)
{
if
(
idx
==
2
)
{
if
(
data
.
children
&&
data
.
children
.
length
)
{
if
(
data
.
children
&&
data
.
children
.
length
)
{
temp
=
data
.
children
[
e
]
temp
=
data
.
children
[
e
]
;
data
=
data
.
children
[
e
]
data
=
data
.
children
[
e
]
;
}
}
}
}
});
});
return
{
return
{
menuName
:
tempName
,
menuName
:
tempName
,
path
:
tempPath
,
path
:
tempPath
,
children
:
[
temp
]
children
:
[
temp
],
}
}
;
},
},
highlightParentRule
(
pathArr
){
highlightParentRule
(
pathArr
)
{
return
pathArr
.
includes
(
this
.
$route
.
path
)
return
pathArr
.
includes
(
this
.
$route
.
path
)
;
},
},
ada
(){
ada
()
{
console
.
log
(
12312
);
console
.
log
(
12312
);
}
}
,
}
}
,
}
}
;
</
script
>
</
script
>
<
style
>
<
style
>
#app
{
#app
{
height
:
100%
;
height
:
100%
;
}
}
.container
{
.container
{
width
:
100%
;
width
:
100%
;
height
:
calc
(
100%
-
56px
);
height
:
calc
(
100%
-
56px
);
overflow
:
hidden
;
overflow
:
hidden
;
...
@@ -174,10 +175,10 @@ export default {
...
@@ -174,10 +175,10 @@ export default {
.full_screen
.bg-main
{
.full_screen
.bg-main
{
overflow-x
:
hidden
;
overflow-x
:
hidden
;
}
}
.con-nav
{
.con-nav
{
float
:
left
;
float
:
left
;
}
}
.view
{
.view
{
height
:
100%
;
height
:
100%
;
overflow-y
:
auto
;
overflow-y
:
auto
;
background-color
:
#ebedf2
;
background-color
:
#ebedf2
;
...
...
src/bg-ui/bg-nav-list.vue
View file @
93515534
...
@@ -82,7 +82,7 @@ const showMoreAction = (index) => {
...
@@ -82,7 +82,7 @@ const showMoreAction = (index) => {
const
getChildrenPath
=
(
arr
,
temp
=
[])
=>
{
const
getChildrenPath
=
(
arr
,
temp
=
[])
=>
{
arr
.
forEach
((
e
)
=>
{
arr
.
forEach
((
e
)
=>
{
temp
.
push
(
e
);
temp
.
push
(
e
.
path
);
if
(
e
.
children
&&
e
.
children
.
length
)
{
if
(
e
.
children
&&
e
.
children
.
length
)
{
getChildrenPath
(
e
.
children
,
temp
);
getChildrenPath
(
e
.
children
,
temp
);
}
}
...
...
src/bg-ui/index.scss
View file @
93515534
...
@@ -864,7 +864,7 @@ a {
...
@@ -864,7 +864,7 @@ a {
border-bottom
:
1px
solid
#e6e9ef
;
border-bottom
:
1px
solid
#e6e9ef
;
font-size
:
20px
;
font-size
:
20px
;
line-height
:
25px
;
line-height
:
25px
;
color
:
#
404a62
;
color
:
#
616f94
;
background
:
#f7f7f9
;
background
:
#f7f7f9
;
cursor
:
pointer
;
cursor
:
pointer
;
...
...
src/components/login-by-account.vue
View file @
93515534
...
@@ -74,7 +74,7 @@ import { generateRoutes } from "../router/index";
...
@@ -74,7 +74,7 @@ import { generateRoutes } from "../router/index";
import
{
reactive
,
toRefs
,
ref
,
onBeforeMount
,
nextTick
}
from
"
vue
"
;
import
{
reactive
,
toRefs
,
ref
,
onBeforeMount
,
nextTick
}
from
"
vue
"
;
import
{
ElMessage
}
from
"
element-plus
"
;
import
{
ElMessage
}
from
"
element-plus
"
;
import
axios
from
"
@/request/http.js
"
;
import
axios
from
"
@/request/http.js
"
;
import
{
De
crypt
}
from
"
@/services/secret.js
"
import
{
En
crypt
}
from
"
@/services/secret.js
"
import
{
useStore
}
from
"
vuex
"
import
{
useStore
}
from
"
vuex
"
const
state
=
reactive
({
const
state
=
reactive
({
...
@@ -127,7 +127,7 @@ const loginAction = () => {
...
@@ -127,7 +127,7 @@ const loginAction = () => {
const
login
=
()
=>
{
const
login
=
()
=>
{
axios
.
post
(
`/apaas/system/v5/user/login`
,
{
axios
.
post
(
`/apaas/system/v5/user/login`
,
{
system_account
:
state
.
loginForm
.
userid
,
system_account
:
state
.
loginForm
.
userid
,
password
:
De
crypt
(
state
.
loginForm
.
password
)
password
:
En
crypt
(
state
.
loginForm
.
password
)
})
})
.
then
(({
data
})
=>
{
.
then
(({
data
})
=>
{
if
(
data
.
code
==
200
)
{
if
(
data
.
code
==
200
)
{
...
...
src/components/login-by-code.vue
View file @
93515534
...
@@ -44,7 +44,7 @@
...
@@ -44,7 +44,7 @@
</el-button>
</el-button>
</el-form-item>
</el-form-item>
<div>
<div>
<span
class=
"fr forget_psd"
>
忘记密码?
</span>
<span
class=
"fr forget_psd"
@
click.prevent=
"$emit('password')"
>
忘记密码?
</span>
</div>
</div>
</el-form>
</el-form>
</div>
</div>
...
@@ -91,6 +91,8 @@
...
@@ -91,6 +91,8 @@
axios
.
post
(
'
/apaas/system/v5/sms/verifyCode
'
,{
phone
:
state
.
loginForm
.
mobile
}).
then
(({
data
})
=>
{
axios
.
post
(
'
/apaas/system/v5/sms/verifyCode
'
,{
phone
:
state
.
loginForm
.
mobile
}).
then
(({
data
})
=>
{
if
(
data
.
code
==
200
)
{
if
(
data
.
code
==
200
)
{
countDownAction
();
countDownAction
();
}
else
{
ElMessage
.
error
(
data
.
data
);
}
}
});
});
}
}
...
@@ -165,100 +167,6 @@
...
@@ -165,100 +167,6 @@
}
}
const
{
loginForm
,
loginFormRules
,
countDown
,
countDownTimer
}
=
toRefs
(
state
);
const
{
loginForm
,
loginFormRules
,
countDown
,
countDownTimer
}
=
toRefs
(
state
);
// export default {
// name: "LoginByCode", // 短信验证码登录
// data() {
// const validatePhone = (rule, value, callback) => {
// const reg = /^(?:(?:\+|00)86)?1[3-9]\d{9}$/;
// setTimeout(() => {
// if (!reg.test(value)) {
// callback(new Error("请输入正确的手机号码"));
// } else {
// callback();
// }
// });
// };
// return {
// loginForm: {
// mobile: "",
// code: "",
// },
// loginFormRules: {
// mobile: [
// { required: true, message: "请输入手机号码", trigger: "change" },
// { validator: validatePhone, trigger: "blur" },
// ],
// code: [{ required: true, message: "请输入验证码", trigger: "blur" }],
// },
// countDown: 0,
// countDownTimer: null,
// };
// },
// methods: {
// getMsgCode() {
// this.$refs.loginForm.validateField("mobile", (errMsg) => {
// if (!errMsg) {
// this.$api.general.getCode(this.loginForm.mobile).then(({ data }) => {
// if (data.success == 1) {
// this.countDownAction();
// }
// });
// }
// });
// }, // 获取验证码
// countDownAction() {
// this.countDown = 60;
// if (this.countDownTimer) {
// clearInterval(this.countDownTimer);
// }
// this.countDownTimer = setInterval(() => {
// if (this.countDown > 0) {
// this.countDown--;
// } else {
// clearInterval(this.countDownTimer);
// }
// }, 1000);
// },
// loginAction() {
// this.$refs.loginForm.validate((valid) => {
// if (valid) {
// this.$api.general
// .loginByCode(this.loginForm)
// .then(({ data }) => {
// if (data.success == 1) {
// let redirect = "/apaas/ui/#/index";
// // GIS重定向使用
// if (this.$route.query.ReturnUrl) {
// redirect = this.$route.query.ReturnUrl;
// }
// // 前端重定向使用
// else if (this.$route.query.redirect) {
// redirect = `/apaas/ui/#${this.$route.query.redirect}`;
// }
// window.location.href = redirect;
// } else {
// this.$message({
// message: data.errMsg || data.data || "登陆失败",
// type: "error",
// });
// }
// })
// .catch((error) => {
// console.log(error);
// });
// }
// });
// }, // 短信验证码登录
// },
// };
</
script
>
</
script
>
<
style
lang=
"scss"
scoped
>
<
style
lang=
"scss"
scoped
>
...
...
src/page/login/index.vue
View file @
93515534
<
template
>
<
template
>
<div
class=
"login-container"
>
<div
class=
"login-container"
>
<div
class=
"bg-warning"
>
系统有效期剩余345 天,请管理员及时更换license!
</div>
<div
class=
"bg-main"
>
<div
class=
"bg-main"
>
<!--
<div
class=
"bg-logo"
>
<!--
<div
class=
"bg-logo"
>
<img
class=
"logo"
src=
"../../assets/imgs/login_img_logo.png"
/>
<img
class=
"logo"
src=
"../../assets/imgs/login_img_logo.png"
/>
...
@@ -16,7 +17,7 @@
...
@@ -16,7 +17,7 @@
<LoginByAccount
@
register=
"switchPageType('account')"
@
password=
"password"
/>
<LoginByAccount
@
register=
"switchPageType('account')"
@
password=
"password"
/>
</bg-tab>
</bg-tab>
<bg-tab
label=
"验证码登录"
name=
"register"
>
<bg-tab
label=
"验证码登录"
name=
"register"
>
<LoginByCode
@
register=
"switchPageType('register')"
/>
<LoginByCode
@
register=
"switchPageType('register')"
@
password=
"password"
/>
</bg-tab>
</bg-tab>
</bg-tabs>
</bg-tabs>
</div>
</div>
...
@@ -120,6 +121,14 @@
...
@@ -120,6 +121,14 @@
}
}
}
}
>
.bg-warning
{
text-align
:
center
;
background-color
:
#fdf4e2
;
color
:
#e56600
;
font-size
:
14px
;
height
:
32px
;
line-height
:
32px
;
}
>
.bg-msg
{
>
.bg-msg
{
position
:
absolute
;
position
:
absolute
;
...
...
src/page/main/config/dict/index.vue
View file @
93515534
<
template
>
<
template
>
<div
class=
"detail_container"
>
<div
class=
"detail_container"
>
<div
class=
"bg-breadcrumb"
>
<bg-breadcrumb></bg-breadcrumb>
<el-breadcrumb
separator=
"/"
>
<el-breadcrumb-item>
配置管理
</el-breadcrumb-item>
<el-breadcrumb-item>
字典配置
</el-breadcrumb-item>
</el-breadcrumb>
</div>
<div
class=
"flex_row"
>
<div
class=
"flex_row"
>
<div
class=
"flex_left"
>
<div
class=
"flex_left"
>
<div
class=
"box"
>
<div
class=
"box"
>
...
@@ -174,6 +169,7 @@ import { useRouter } from "vue-router";
...
@@ -174,6 +169,7 @@ import { useRouter } from "vue-router";
import
{
ElMessage
}
from
"
element-plus
"
;
import
{
ElMessage
}
from
"
element-plus
"
;
import
axios
from
"
../../../../request/http.js
"
;
import
axios
from
"
../../../../request/http.js
"
;
import
{
Search
}
from
"
@element-plus/icons-vue
"
;
import
{
Search
}
from
"
@element-plus/icons-vue
"
;
import
bgBreadcrumb
from
"
@/components/bg-breadcrumb.vue
"
;
const
bgForm
=
ref
(
null
);
const
bgForm
=
ref
(
null
);
const
state
=
reactive
({
const
state
=
reactive
({
bgForm
,
bgForm
,
...
...
src/page/main/develop/account/add/contact-form.vue
View file @
93515534
...
@@ -51,22 +51,6 @@ const checkPhone = (rule, value, callback) => {
...
@@ -51,22 +51,6 @@ const checkPhone = (rule, value, callback) => {
});
});
};
};
// const checkPhoneRepet = (rule, value, callback) => {
// let params = null;
// if (props.id){
// params = {id: parseInt(props.id),contact_phone: value,}
// }else {
// params = {id: 0,contact_phone: value}
// }
// $axios.post(`/apaas/system/v5/org/check`,params)
// .then((res) => {
// if (res.data.code == 200) {
// callback()
// }else {
// callback(new Error(res.data.data))
// }
// })
// }
const
checkName
=
(
rule
,
value
,
callback
)
=>
{
const
checkName
=
(
rule
,
value
,
callback
)
=>
{
var
reg
=
/^
[
a-zA-Z0-9
\u
4e00-
\u
9fa5
]
+$/
;
var
reg
=
/^
[
a-zA-Z0-9
\u
4e00-
\u
9fa5
]
+$/
;
...
@@ -86,7 +70,6 @@ const contactFormRules = reactive({
...
@@ -86,7 +70,6 @@ const contactFormRules = reactive({
contact_phone
:
[
contact_phone
:
[
{
required
:
true
,
message
:
"
请输入联系人手机号
"
,
trigger
:
"
blur
"
},
{
required
:
true
,
message
:
"
请输入联系人手机号
"
,
trigger
:
"
blur
"
},
{
validator
:
checkPhone
,
trigger
:
"
blur
"
},
{
validator
:
checkPhone
,
trigger
:
"
blur
"
},
// { validator: checkPhoneRepet, trigger: 'blur' }
],
],
contact_email
:
[
contact_email
:
[
{
type
:
"
email
"
,
message
:
"
请输入正确的邮箱
"
,
trigger
:
"
blur
"
},
{
type
:
"
email
"
,
message
:
"
请输入正确的邮箱
"
,
trigger
:
"
blur
"
},
...
...
src/page/main/develop/account/add/index.vue
View file @
93515534
<
template
>
<
template
>
<div
class=
"page_container"
>
<div
class=
"page_container"
>
<div
class=
"bg-breadcrumb"
>
<bg-breadcrumb></bg-breadcrumb>
<el-breadcrumb
separator=
"/"
>
<el-breadcrumb-item>
开发管理
</el-breadcrumb-item>
<el-breadcrumb-item
:to=
"
{ path: '/develop/account' }"> 系统账号管理
</el-breadcrumb-item>
<el-breadcrumb-item>
{{
route
.
query
.
id
?
"
编辑
"
:
"
新增
"
}}
</el-breadcrumb-item>
</el-breadcrumb>
</div>
<div
class=
"page_content flex_cloumn"
>
<div
class=
"page_content flex_cloumn"
>
<div
class=
"content_top apaas_scroll"
>
<div
class=
"content_top apaas_scroll"
>
<div
class=
"content_process"
>
<div
class=
"content_process"
>
...
@@ -106,6 +100,7 @@ import { reactive, ref, onBeforeMount, toRefs, computed, onBeforeUnmount, onMoun
...
@@ -106,6 +100,7 @@ import { reactive, ref, onBeforeMount, toRefs, computed, onBeforeUnmount, onMoun
import
CryptoJS
from
"
crypto-js
"
;
import
CryptoJS
from
"
crypto-js
"
;
import
axios
from
"
@/request/http.js
"
;
import
axios
from
"
@/request/http.js
"
;
import
{
ElMessage
}
from
"
element-plus
"
;
import
{
ElMessage
}
from
"
element-plus
"
;
import
bgBreadcrumb
from
"
@/components/bg-breadcrumb.vue
"
;
const
route
=
useRoute
();
const
route
=
useRoute
();
const
router
=
useRouter
();
const
router
=
useRouter
();
const
step
=
ref
(
1
);
const
step
=
ref
(
1
);
...
@@ -119,6 +114,7 @@ const formData = reactive({
...
@@ -119,6 +114,7 @@ const formData = reactive({
logo
:
""
,
logo
:
""
,
system_role_id
:
""
,
system_role_id
:
""
,
system_account
:
""
,
system_account
:
""
,
system_phone
:
""
,
password
:
""
,
password
:
""
,
confirm_password
:
""
,
confirm_password
:
""
,
access_address
:
""
,
access_address
:
""
,
...
@@ -218,6 +214,7 @@ const getDetail = () => {
...
@@ -218,6 +214,7 @@ const getDetail = () => {
business_name
:
form
.
business_name
,
business_name
:
form
.
business_name
,
business_desc
:
form
.
business_desc
,
business_desc
:
form
.
business_desc
,
system_account
:
form
.
system_account
,
system_account
:
form
.
system_account
,
system_phone
:
form
.
system_phone
,
access_address
:
form
.
access_address
,
access_address
:
form
.
access_address
,
develop_id
:
form
.
develop_id
,
develop_id
:
form
.
develop_id
,
state
:
form
.
state
,
state
:
form
.
state
,
...
...
src/page/main/develop/account/add/system-form.vue
View file @
93515534
...
@@ -22,13 +22,24 @@
...
@@ -22,13 +22,24 @@
<el-input
v-model=
"systemForm.business_name"
/>
<el-input
v-model=
"systemForm.business_name"
/>
</el-form-item>
</el-form-item>
<el-form-item
label=
"AppId"
prop=
"appid"
v-if=
"formType"
>
<el-form-item
label=
"AppId"
prop=
"appid"
v-if=
"formType"
>
<el-input
v-model=
"systemForm.appid"
:disabled=
"formType"
style=
"width: 80%"
/>
<span
class=
"pl-1"
><el-button
type=
"primary"
@
click=
"copyText(systemForm.appid)"
>
复制
</el-button></span>
<el-input
v-model=
"systemForm.appid"
:disabled=
"formType"
>
<template
#suffix
>
<bg-icon
icon=
"#bg-ic-copy"
style=
"cursor: pointer;"
@
click=
"copyText(systemForm.appid)"
></bg-icon>
</
template
>
</el-input>
<!-- <span class="pl-1"><el-button type="primary" @click="copyText(systemForm.appid)">复制</el-button></span> -->
</el-form-item>
</el-form-item>
<el-form-item
label=
"AppSecret"
prop=
"appsecret"
v-if=
"formType"
>
<el-form-item
label=
"AppSecret"
prop=
"appsecret"
v-if=
"formType"
>
<el-input
v-model=
"systemForm.appsecret"
:disabled=
"formType"
style=
"width: 80%"
/>
<div
style=
"display: flex;width: 100%;"
>
<span
class=
"pl-1"
><el-button
type=
"primary"
@
click=
"copyText(systemForm.appsecret)"
>
复制
</el-button></span>
<el-input
v-model=
"systemForm.appsecret"
:disabled=
"formType"
>
<span
class=
"pl-1"
><el-button
type=
"primary"
@
click=
"resetSecret"
>
重置
</el-button></span>
<
template
#suffix
>
<bg-icon
icon=
"#bg-ic-copy"
style=
"cursor: pointer;"
@
click=
"copyText(systemForm.appsecret)"
></bg-icon>
</
template
>
</el-input>
<span
class=
"pl-1"
><el-button
type=
"primary"
@
click=
"resetSecret"
>
重置
</el-button></span>
</div>
</el-form-item>
</el-form-item>
<el-form-item
label=
"系统LOGO"
prop=
"logo"
>
<el-form-item
label=
"系统LOGO"
prop=
"logo"
>
<bg-upload-image
<bg-upload-image
...
@@ -52,6 +63,9 @@
...
@@ -52,6 +63,9 @@
<el-form-item
label=
"账号"
prop=
"system_account"
>
<el-form-item
label=
"账号"
prop=
"system_account"
>
<el-input
v-model=
"systemForm.system_account"
/>
<el-input
v-model=
"systemForm.system_account"
/>
</el-form-item>
</el-form-item>
<el-form-item
label=
"手机号"
prop=
"system_phone"
>
<el-input
v-model=
"systemForm.system_phone"
/>
</el-form-item>
<el-form-item
label=
"密码"
prop=
"password"
v-if=
"!formType"
>
<el-form-item
label=
"密码"
prop=
"password"
v-if=
"!formType"
>
<el-input
:type=
"password_eye ? 'text' : 'password'"
v-model=
"systemForm.password"
>
<el-input
:type=
"password_eye ? 'text' : 'password'"
v-model=
"systemForm.password"
>
<
template
#suffix
>
<
template
#suffix
>
...
@@ -84,6 +98,7 @@
...
@@ -84,6 +98,7 @@
import
{
reactive
,
ref
,
onBeforeMount
,
onMounted
,
computed
}
from
"
vue
"
;
import
{
reactive
,
ref
,
onBeforeMount
,
onMounted
,
computed
}
from
"
vue
"
;
import
axios
from
"
@/request/http.js
"
;
import
axios
from
"
@/request/http.js
"
;
import
{
ElMessage
}
from
"
element-plus
"
;
import
{
ElMessage
}
from
"
element-plus
"
;
import
{
validatePhone
}
from
"
@/services/rules.js
"
const
props
=
defineProps
({
const
props
=
defineProps
({
formType
:
{
formType
:
{
type
:
Boolean
,
type
:
Boolean
,
...
@@ -102,6 +117,7 @@ const systemForm = reactive({
...
@@ -102,6 +117,7 @@ const systemForm = reactive({
logo
:
[],
logo
:
[],
system_role_id
:
""
,
system_role_id
:
""
,
system_account
:
""
,
system_account
:
""
,
system_phone
:
""
,
password
:
""
,
password
:
""
,
confirm_password
:
""
,
confirm_password
:
""
,
access_address
:
""
,
access_address
:
""
,
...
@@ -164,6 +180,23 @@ const validateSystemAccount = (rule, value, callback) => {
...
@@ -164,6 +180,23 @@ const validateSystemAccount = (rule, value, callback) => {
}
}
};
};
const
checkPhoneRepet
=
(
rule
,
value
,
callback
)
=>
{
let
params
=
null
;
if
(
props
.
id
){
params
=
{
id
:
parseInt
(
props
.
id
),
contact_phone
:
value
,}
}
else
{
params
=
{
id
:
0
,
contact_phone
:
value
}
}
axios
.
post
(
`/apaas/system/v5/org/check`
,
params
)
.
then
((
res
)
=>
{
if
(
res
.
data
.
code
==
200
)
{
callback
()
}
else
{
callback
(
new
Error
(
res
.
data
.
data
))
}
})
}
const
formRules
=
reactive
({
const
formRules
=
reactive
({
organization_id
:
[{
required
:
true
,
message
:
"
请选择组织机构
"
,
trigger
:
"
change
"
}],
organization_id
:
[{
required
:
true
,
message
:
"
请选择组织机构
"
,
trigger
:
"
change
"
}],
business_name
:
[
business_name
:
[
...
@@ -178,6 +211,11 @@ const formRules = reactive({
...
@@ -178,6 +211,11 @@ const formRules = reactive({
{
max
:
20
,
message
:
"
帐号最大长度为20个字符
"
,
trigger
:
"
blur
"
},
{
max
:
20
,
message
:
"
帐号最大长度为20个字符
"
,
trigger
:
"
blur
"
},
{
validator
:
validateSystemAccount
,
trigger
:
"
blur
"
},
{
validator
:
validateSystemAccount
,
trigger
:
"
blur
"
},
],
],
system_phone
:
[
{
required
:
true
,
message
:
"
请输入账号
"
,
trigger
:
"
blur
"
},
{
validator
:
validatePhone
,
trigger
:
"
blur
"
},
{
validator
:
checkPhoneRepet
,
trigger
:
"
blur
"
},
],
password
:
[
password
:
[
{
required
:
true
,
message
:
"
请输入密码
"
,
trigger
:
"
blur
"
},
{
required
:
true
,
message
:
"
请输入密码
"
,
trigger
:
"
blur
"
},
{
min
:
8
,
message
:
"
密码长度不得低于8位
"
,
trigger
:
"
blur
"
},
{
min
:
8
,
message
:
"
密码长度不得低于8位
"
,
trigger
:
"
blur
"
},
...
...
src/page/main/develop/account/detail/index.vue
View file @
93515534
<
template
>
<
template
>
<div
class=
"page_container"
>
<div
class=
"page_container"
>
<div
class=
"bg-breadcrumb"
>
<bg-breadcrumb></bg-breadcrumb>
<el-breadcrumb
separator=
"/"
>
<el-breadcrumb-item>
开发管理
</el-breadcrumb-item>
<el-breadcrumb-item
:to=
"
{ path: '/develop/account' }"> 系统账号管理
</el-breadcrumb-item>
<el-breadcrumb-item>
详情
</el-breadcrumb-item>
</el-breadcrumb>
</div>
<div
class=
"page_content apaas_scroll"
>
<div
class=
"page_content apaas_scroll"
>
<div
class=
"info_row"
>
<div
class=
"info_row"
>
<div
class=
"title"
>
<div
class=
"title"
>
...
@@ -48,6 +42,7 @@ import { reactive, toRefs, ref, onBeforeMount } from "vue";
...
@@ -48,6 +42,7 @@ import { reactive, toRefs, ref, onBeforeMount } from "vue";
import
{
useRoute
,
useRouter
}
from
"
vue-router
"
;
import
{
useRoute
,
useRouter
}
from
"
vue-router
"
;
import
axios
from
"
@/request/http.js
"
;
import
axios
from
"
@/request/http.js
"
;
import
{
ElMessage
}
from
"
element-plus
"
;
import
{
ElMessage
}
from
"
element-plus
"
;
import
bgBreadcrumb
from
"
@/components/bg-breadcrumb.vue
"
;
const
route
=
useRoute
();
const
route
=
useRoute
();
const
baseInfo
=
reactive
([
const
baseInfo
=
reactive
([
{
{
...
...
src/page/main/develop/account/index.vue
View file @
93515534
<
template
>
<
template
>
<div
class=
"page_container"
>
<div
class=
"page_container"
>
<div
class=
"bg-breadcrumb"
>
<bg-breadcrumb></bg-breadcrumb>
<el-breadcrumb
separator=
"/"
>
<el-breadcrumb-item>
开发管理
</el-breadcrumb-item>
<el-breadcrumb-item>
系统账号管理
</el-breadcrumb-item>
</el-breadcrumb>
</div>
<div
class=
"flex_row"
>
<div
class=
"flex_row"
>
<div
class=
"flex_left bgc_white"
>
<div
class=
"flex_left bgc_white"
>
<div
class=
"tree_header"
>
政务机构
</div>
<div
class=
"tree_header"
>
政务机构
</div>
...
@@ -193,6 +188,7 @@ import { edit } from "ace-builds";
...
@@ -193,6 +188,7 @@ import { edit } from "ace-builds";
import
CryptoJS
from
"
crypto-js
"
;
import
CryptoJS
from
"
crypto-js
"
;
import
axios
from
"
@/request/http.js
"
;
import
axios
from
"
@/request/http.js
"
;
import
{
ElMessage
}
from
"
element-plus
"
;
import
{
ElMessage
}
from
"
element-plus
"
;
import
bgBreadcrumb
from
"
@/components/bg-breadcrumb.vue
"
;
const
dataTable
=
ref
(
null
);
const
dataTable
=
ref
(
null
);
const
headers
=
ref
([
const
headers
=
ref
([
...
@@ -429,7 +425,7 @@ const goDetail = (params) => {
...
@@ -429,7 +425,7 @@ const goDetail = (params) => {
const
editAccount
=
(
id
)
=>
{
const
editAccount
=
(
id
)
=>
{
router
.
push
({
router
.
push
({
path
:
"
/develop/account/
add
"
,
path
:
"
/develop/account/
edit
"
,
query
:
{
query
:
{
id
:
id
,
id
:
id
,
},
},
...
...
src/page/main/develop/menu/index.vue
View file @
93515534
<
template
>
<
template
>
<div
class=
"page_container"
>
<div
class=
"page_container"
>
<div
class=
"bg-breadcrumb"
>
<bg-breadcrumb></bg-breadcrumb>
<el-breadcrumb
separator=
"/"
>
<el-breadcrumb-item>
开发管理
</el-breadcrumb-item>
<el-breadcrumb-item>
菜单管理
</el-breadcrumb-item>
</el-breadcrumb>
</div>
<div
class=
"flex_row"
>
<div
class=
"flex_row"
>
<div
class=
"flex_left"
>
<div
class=
"flex_left"
>
<div
class=
"tree_content"
>
<div
class=
"tree_content"
>
...
@@ -104,6 +99,7 @@ import { useRouter } from "vue-router";
...
@@ -104,6 +99,7 @@ import { useRouter } from "vue-router";
import
{
ElMessage
}
from
"
element-plus
"
;
import
{
ElMessage
}
from
"
element-plus
"
;
import
axios
from
"
../../../../request/http.js
"
;
import
axios
from
"
../../../../request/http.js
"
;
import
menuForm
from
"
./menu-form.vue
"
;
import
menuForm
from
"
./menu-form.vue
"
;
import
bgBreadcrumb
from
"
@/components/bg-breadcrumb.vue
"
;
const
router
=
useRouter
();
const
router
=
useRouter
();
const
menuTree
=
ref
(
null
);
// 树形
const
menuTree
=
ref
(
null
);
// 树形
...
...
src/page/main/system/organization/index.vue
View file @
93515534
<
template
>
<
template
>
<div
class=
"page_container"
>
<div
class=
"page_container"
>
<div
class=
"bg-breadcrumb"
>
<bg-breadcrumb></bg-breadcrumb>
<el-breadcrumb
separator=
"/"
>
<el-breadcrumb-item>
系统管理
</el-breadcrumb-item>
<el-breadcrumb-item>
组织管理
</el-breadcrumb-item>
</el-breadcrumb>
</div>
<div
class=
"flex_row"
>
<div
class=
"flex_row"
>
<div
class=
"flex_left bgc_white"
>
<div
class=
"flex_left bgc_white"
>
<div
class=
"tree_header"
>
政务机构
</div>
<div
class=
"tree_header"
>
政务机构
</div>
...
@@ -274,6 +269,7 @@ import { downloadFileFormatNew } from "@/services/helper";
...
@@ -274,6 +269,7 @@ import { downloadFileFormatNew } from "@/services/helper";
import
store
from
"
@/store
"
;
import
store
from
"
@/store
"
;
import
axios
from
"
@/request/http.js
"
;
import
axios
from
"
@/request/http.js
"
;
import
{
ElMessage
}
from
"
element-plus
"
;
import
{
ElMessage
}
from
"
element-plus
"
;
import
bgBreadcrumb
from
"
@/components/bg-breadcrumb.vue
"
;
const
dataTable
=
ref
(
null
);
const
dataTable
=
ref
(
null
);
const
toOrgDetail
=
()
=>
{
const
toOrgDetail
=
()
=>
{
...
@@ -793,14 +789,15 @@ const deleteRowConfirm = () => {
...
@@ -793,14 +789,15 @@ const deleteRowConfirm = () => {
const
editAccount
=
(
data
)
=>
{
const
editAccount
=
(
data
)
=>
{
if
(
selectTreeDataType
.
value
===
1
)
{
if
(
selectTreeDataType
.
value
===
1
)
{
router
.
push
({
router
.
push
({
path
:
"
/system/organization/org-user
"
,
path
:
"
/system/organization/org-user
/edit
"
,
query
:
{
query
:
{
id
:
data
.
id
,
id
:
data
.
id
,
orgId
:
selectOrgNode
.
value
.
organization_id
,
},
},
});
});
}
else
{
}
else
{
router
.
push
({
router
.
push
({
path
:
"
/system/organization/platform-user
"
,
path
:
"
/system/organization/platform-user
/edit
"
,
query
:
{
query
:
{
id
:
data
.
id
,
id
:
data
.
id
,
},
},
...
...
src/page/main/system/organization/org-detail/index.vue
View file @
93515534
<
template
>
<
template
>
<div
class=
"page_container"
>
<div
class=
"page_container"
>
<div
class=
"bg-breadcrumb"
>
<bg-breadcrumb></bg-breadcrumb>
<el-breadcrumb
separator=
"/"
>
<el-breadcrumb-item>
组织管理
</el-breadcrumb-item>
<el-breadcrumb-item
:to=
"
{ path: '/system/organization' }"> 组织管理
</el-breadcrumb-item>
<el-breadcrumb-item>
组织详情
</el-breadcrumb-item>
</el-breadcrumb>
</div>
<div
class=
"page_content apaas_scroll"
>
<div
class=
"page_content apaas_scroll"
>
<div
class=
"info_row"
>
<div
class=
"info_row"
>
<div
class=
"title"
>
<div
class=
"title"
>
...
@@ -61,6 +55,7 @@ import { useRoute } from "vue-router";
...
@@ -61,6 +55,7 @@ import { useRoute } from "vue-router";
import
{
downloadFileFormatNew
}
from
"
@/services/helper
"
;
import
{
downloadFileFormatNew
}
from
"
@/services/helper
"
;
import
axios
from
"
@/request/http.js
"
;
import
axios
from
"
@/request/http.js
"
;
import
{
ElMessage
}
from
"
element-plus
"
;
import
{
ElMessage
}
from
"
element-plus
"
;
import
bgBreadcrumb
from
"
@/components/bg-breadcrumb.vue
"
;
const
route
=
useRoute
();
const
route
=
useRoute
();
const
baseInfo
=
reactive
([
const
baseInfo
=
reactive
([
...
...
src/page/main/system/organization/org-user/index.vue
View file @
93515534
<
template
>
<
template
>
<div
class=
"page_container"
>
<div
class=
"page_container"
>
<div
class=
"bg-breadcrumb"
>
<bg-breadcrumb></bg-breadcrumb>
<el-breadcrumb
separator=
"/"
>
<el-breadcrumb-item>
组织管理
</el-breadcrumb-item>
<el-breadcrumb-item
:to=
"
{ path: '/system/organization' }"> 组织管理
</el-breadcrumb-item>
<el-breadcrumb-item>
{{
route
.
query
.
id
?
"
编辑组织用户
"
:
"
新增组织管理员
"
}}
</el-breadcrumb-item>
</el-breadcrumb>
</div>
<div
class=
"page_content flex_cloumn"
>
<div
class=
"page_content flex_cloumn"
>
<div
class=
"content_top apaas_scroll"
>
<div
class=
"content_top apaas_scroll"
>
<div
class=
"content_process"
>
<div
class=
"content_process"
>
...
@@ -102,6 +96,7 @@ import { reactive, ref, onBeforeMount, toRefs, computed, onBeforeUnmount, onMoun
...
@@ -102,6 +96,7 @@ import { reactive, ref, onBeforeMount, toRefs, computed, onBeforeUnmount, onMoun
import
CryptoJS
from
"
crypto-js
"
;
import
CryptoJS
from
"
crypto-js
"
;
import
axios
from
"
@/request/http.js
"
;
import
axios
from
"
@/request/http.js
"
;
import
{
ElMessage
}
from
"
element-plus
"
;
import
{
ElMessage
}
from
"
element-plus
"
;
import
bgBreadcrumb
from
"
@/components/bg-breadcrumb.vue
"
;
const
route
=
useRoute
();
const
route
=
useRoute
();
const
router
=
useRouter
();
const
router
=
useRouter
();
const
step
=
ref
(
1
);
const
step
=
ref
(
1
);
...
...
src/page/main/system/organization/platform-user/index.vue
View file @
93515534
<
template
>
<
template
>
<div
class=
"page_container"
>
<div
class=
"page_container"
>
<div
class=
"bg-breadcrumb"
>
<bg-breadcrumb></bg-breadcrumb>
<el-breadcrumb
separator=
"/"
>
<el-breadcrumb-item>
组织管理
</el-breadcrumb-item>
<el-breadcrumb-item
:to=
"
{ path: '/system/organization' }"> 组织管理
</el-breadcrumb-item>
<el-breadcrumb-item>
{{
route
.
query
.
id
?
"
编辑平台用户
"
:
"
新增平台用户
"
}}
</el-breadcrumb-item>
</el-breadcrumb>
</div>
<div
class=
"page_content flex_cloumn"
>
<div
class=
"page_content flex_cloumn"
>
<div
class=
"content_top apaas_scroll"
>
<div
class=
"content_top apaas_scroll"
>
<div
class=
"content_process"
v-if=
"!route.query.id"
>
<div
class=
"content_process"
v-if=
"!route.query.id"
>
...
@@ -109,6 +103,7 @@ import CryptoJS from "crypto-js";
...
@@ -109,6 +103,7 @@ import CryptoJS from "crypto-js";
import
{
reactive
,
ref
,
onBeforeMount
,
toRefs
,
computed
,
onMounted
}
from
"
vue
"
;
import
{
reactive
,
ref
,
onBeforeMount
,
toRefs
,
computed
,
onMounted
}
from
"
vue
"
;
import
axios
from
"
@/request/http.js
"
;
import
axios
from
"
@/request/http.js
"
;
import
{
ElMessage
}
from
"
element-plus
"
;
import
{
ElMessage
}
from
"
element-plus
"
;
import
bgBreadcrumb
from
"
@/components/bg-breadcrumb.vue
"
;
const
route
=
useRoute
();
const
route
=
useRoute
();
const
router
=
useRouter
();
const
router
=
useRouter
();
const
step
=
ref
(
1
);
const
step
=
ref
(
1
);
...
...
src/page/main/system/organization/user-detail/index.vue
View file @
93515534
<
template
>
<
template
>
<div
class=
"page_container"
>
<div
class=
"page_container"
>
<div
class=
"bg-breadcrumb"
>
<bg-breadcrumb></bg-breadcrumb>
<el-breadcrumb
separator=
"/"
>
<el-breadcrumb-item>
组织管理
</el-breadcrumb-item>
<el-breadcrumb-item
:to=
"
{ path: '/system/organization' }"> 组织管理
</el-breadcrumb-item>
<el-breadcrumb-item>
用户详情
</el-breadcrumb-item>
</el-breadcrumb>
</div>
<div
class=
"page_content apaas_scroll"
>
<div
class=
"page_content apaas_scroll"
>
<div
class=
"info_row"
>
<div
class=
"info_row"
>
<div
class=
"title"
>
<div
class=
"title"
>
...
@@ -49,6 +43,7 @@ import { reactive, toRefs, ref, computed, onBeforeMount } from "vue";
...
@@ -49,6 +43,7 @@ import { reactive, toRefs, ref, computed, onBeforeMount } from "vue";
import
{
useRoute
}
from
"
vue-router
"
;
import
{
useRoute
}
from
"
vue-router
"
;
import
axios
from
"
@/request/http.js
"
;
import
axios
from
"
@/request/http.js
"
;
import
{
ElMessage
}
from
"
element-plus
"
;
import
{
ElMessage
}
from
"
element-plus
"
;
import
bgBreadcrumb
from
"
@/components/bg-breadcrumb.vue
"
;
const
route
=
useRoute
();
const
route
=
useRoute
();
const
accountInfo
=
reactive
([
const
accountInfo
=
reactive
([
...
...
src/page/main/system/role/add/role_form.vue
View file @
93515534
<!-- 角色管理 -->
<!-- 角色管理 -->
<
template
>
<
template
>
<div
class=
"detail_container"
>
<div
class=
"detail_container"
>
<div
class=
"bg-breadcrumb"
>
<bg-breadcrumb></bg-breadcrumb>
<el-breadcrumb
separator=
"/"
>
<el-breadcrumb-item>
系统管理
</el-breadcrumb-item>
<el-breadcrumb-item
to=
"/system/role"
>
角色管理
</el-breadcrumb-item>
<el-breadcrumb-item>
{{
route
.
query
.
id
?
"
编辑
"
:
"
新增
"
}}
</el-breadcrumb-item>
</el-breadcrumb>
</div>
<div
class=
"main_container"
>
<div
class=
"main_container"
>
<div
class=
"top_form bg-scroll"
>
<div
class=
"top_form bg-scroll"
>
<el-form
ref=
"form"
:rules=
"rules"
:model=
"formData"
class=
"role_form"
>
<el-form
ref=
"form"
:rules=
"rules"
:model=
"formData"
class=
"role_form"
>
...
@@ -65,6 +59,7 @@ import { reactive, toRefs, ref, onBeforeMount, nextTick } from "vue";
...
@@ -65,6 +59,7 @@ import { reactive, toRefs, ref, onBeforeMount, nextTick } from "vue";
import
axios
from
"
../../../../../request/http.js
"
;
import
axios
from
"
../../../../../request/http.js
"
;
import
{
ElMessage
}
from
"
element-plus
"
;
import
{
ElMessage
}
from
"
element-plus
"
;
import
{
useRouter
,
useRoute
}
from
"
vue-router
"
;
import
{
useRouter
,
useRoute
}
from
"
vue-router
"
;
import
bgBreadcrumb
from
"
@/components/bg-breadcrumb.vue
"
;
const
router
=
useRouter
();
const
router
=
useRouter
();
const
route
=
useRoute
();
const
route
=
useRoute
();
const
form
=
ref
(
null
);
const
form
=
ref
(
null
);
...
...
src/page/main/system/role/index.vue
View file @
93515534
<!-- 角色管理 -->
<!-- 角色管理 -->
<
template
>
<
template
>
<div
class=
"detail_container"
>
<div
class=
"detail_container"
>
<div
class=
"bg-breadcrumb"
>
<bg-breadcrumb></bg-breadcrumb>
<el-breadcrumb
separator=
"/"
>
<el-breadcrumb-item>
系统管理
</el-breadcrumb-item>
<el-breadcrumb-item>
角色管理
</el-breadcrumb-item>
</el-breadcrumb>
</div>
<div
class=
"main_container"
>
<div
class=
"main_container"
>
<bg-filter-group
@
search=
"changeSearch"
v-model=
"filter.search"
placeholder=
"请输入角色名称"
>
<bg-filter-group
@
search=
"changeSearch"
v-model=
"filter.search"
placeholder=
"请输入角色名称"
>
<template
v-slot:left_action
>
<template
v-slot:left_action
>
...
@@ -185,6 +180,7 @@ import { reactive, toRefs, ref, onBeforeMount, nextTick } from "vue";
...
@@ -185,6 +180,7 @@ import { reactive, toRefs, ref, onBeforeMount, nextTick } from "vue";
import
axios
from
"
../../../../request/http.js
"
;
import
axios
from
"
../../../../request/http.js
"
;
import
{
ElMessage
}
from
"
element-plus
"
;
import
{
ElMessage
}
from
"
element-plus
"
;
import
{
useRouter
}
from
"
vue-router
"
;
import
{
useRouter
}
from
"
vue-router
"
;
import
bgBreadcrumb
from
"
@/components/bg-breadcrumb.vue
"
;
const
router
=
useRouter
();
const
router
=
useRouter
();
const
Bgtable
=
ref
(
null
);
const
Bgtable
=
ref
(
null
);
const
userTable
=
ref
(
null
);
const
userTable
=
ref
(
null
);
...
...
src/page/password/account-form.vue
View file @
93515534
...
@@ -7,10 +7,10 @@
...
@@ -7,10 +7,10 @@
ref=
"accountRef"
ref=
"accountRef"
style=
"max-width: 90%"
>
style=
"max-width: 90%"
>
<el-form-item
label=
"手机号"
prop=
"phone"
>
<el-form-item
label=
"手机号"
prop=
"phone"
>
<el-input
v-model=
"accountForm.phone"
/>
<el-input
v-model=
"accountForm.phone"
@
input=
"phoneChange"
/>
</el-form-item>
</el-form-item>
<el-form-item
label=
"账号"
prop=
"account"
>
<el-form-item
label=
"账号"
prop=
"account"
>
<el-input
v-model=
"accountForm.account"
/>
<el-input
v-model=
"accountForm.account"
disabled
/>
</el-form-item>
</el-form-item>
<el-form-item
label=
"验证码"
prop=
"code"
>
<el-form-item
label=
"验证码"
prop=
"code"
>
<div
class=
"msg-code"
>
<div
class=
"msg-code"
>
...
@@ -21,8 +21,8 @@
...
@@ -21,8 +21,8 @@
>
>
</el-input>
</el-input>
<div
class=
"yzm_img"
>
<div
class=
"yzm_img"
>
<el-button
type=
"primary"
@
click
=
"sendSms
"
style=
"width: 100%;height: 34px;"
>
<el-button
type=
"primary"
@
click
.prevent=
"getMsgCode()
"
style=
"width: 100%;height: 34px;"
>
发送验证码
{{
countDown
>
0
?
countDown
+
'
秒后再次获取
'
:
'
发送验证码
'
}}
</el-button>
</el-button>
</div>
</div>
</div>
</div>
...
@@ -34,6 +34,7 @@
...
@@ -34,6 +34,7 @@
import
{
reactive
,
ref
,
onBeforeMount
,
onMounted
,
computed
}
from
"
vue
"
;
import
{
reactive
,
ref
,
onBeforeMount
,
onMounted
,
computed
}
from
"
vue
"
;
import
axios
from
"
@/request/http.js
"
;
import
axios
from
"
@/request/http.js
"
;
import
{
ElMessage
}
from
"
element-plus
"
;
import
{
ElMessage
}
from
"
element-plus
"
;
import
{
validatePhone
}
from
"
@/services/rules.js
"
const
props
=
defineProps
({
const
props
=
defineProps
({
});
});
...
@@ -45,7 +46,10 @@ const accountForm = reactive({
...
@@ -45,7 +46,10 @@ const accountForm = reactive({
const
formRules
=
reactive
({
const
formRules
=
reactive
({
phone
:
[{
required
:
true
,
message
:
"
请输入手机号
"
,
trigger
:
"
blur
"
}],
phone
:
[
{
required
:
true
,
message
:
"
请输入手机号
"
,
trigger
:
"
blur
"
},
{
validator
:
validatePhone
,
trigger
:
"
blur
"
},
],
account
:
[
account
:
[
{
required
:
true
,
message
:
"
请输入账号
"
,
trigger
:
"
blur
"
},
{
required
:
true
,
message
:
"
请输入账号
"
,
trigger
:
"
blur
"
},
],
],
...
@@ -54,6 +58,9 @@ const formRules = reactive({
...
@@ -54,6 +58,9 @@ const formRules = reactive({
],
],
});
});
const
countDown
=
ref
(
0
)
const
countDownTimer
=
ref
(
null
)
const
accountRef
=
ref
(
null
);
const
accountRef
=
ref
(
null
);
const
emit
=
defineEmits
([
"
action
"
]);
const
emit
=
defineEmits
([
"
action
"
]);
const
submitForm
=
async
()
=>
{
const
submitForm
=
async
()
=>
{
...
@@ -76,8 +83,50 @@ const setForm = (data) => {
...
@@ -76,8 +83,50 @@ const setForm = (data) => {
Object
.
assign
(
accountForm
,
data
);
Object
.
assign
(
accountForm
,
data
);
};
};
const
sendSms
=
()
=>
{
const
getMsgCode
=
()
=>
{
if
(
accountForm
.
account
)
{
axios
.
post
(
'
/apaas/system/v5/sms/verifyCode
'
,{
phone
:
accountForm
.
phone
}).
then
(({
data
})
=>
{
if
(
data
.
code
==
200
)
{
countDownAction
();
}
else
{
ElMessage
.
error
(
data
.
data
);
}
});
}
else
{
ElMessage
.
error
(
"
该手机号未注册,请核对手机号!
"
);
}
};
// 获取验证码
const
countDownAction
=
()
=>
{
countDown
.
value
=
60
;
if
(
countDownTimer
.
value
)
{
clearInterval
(
countDownTimer
.
value
);
}
countDownTimer
.
value
=
setInterval
(()
=>
{
if
(
countDown
.
value
>
0
)
{
countDown
.
value
--
;
}
else
{
clearInterval
(
countDownTimer
.
value
);
}
},
1000
);
}
const
phoneChange
=
()
=>
{
if
(
accountForm
.
phone
.
length
>
10
)
{
accountRef
.
value
.
validateField
(
'
phone
'
).
then
(
valid
=>
{
if
(
valid
)
{
axios
.
get
(
`/apaas/system/v5/user/phoneToAccount?phone=
${
accountForm
.
phone
}
`
).
then
((
res
)
=>
{
if
(
res
.
data
.
code
==
200
)
{
accountForm
.
account
=
res
.
data
.
data
||
''
}
else
{
ElMessage
.
error
(
res
.
data
.
data
);
}
});
}
})
}
}
}
onBeforeMount
(()
=>
{
onBeforeMount
(()
=>
{
...
...
src/page/password/index.vue
View file @
93515534
...
@@ -73,7 +73,7 @@
...
@@ -73,7 +73,7 @@
}}
}}
</div>
</div>
<el-button
type=
"primary"
@
click=
"cancel"
>
返回登录页
</el-button>
<el-button
type=
"primary"
@
click=
"cancel"
>
返回登录页
</el-button>
<
!-- <el-button v-if="!route.query.id" type="primary" @click="continueCreate">继续创建</el-button> --
>
<
el-button
type=
"primary"
@
click=
"continueEdit"
>
重新修改
</el-button
>
</div>
</div>
</div>
</div>
</div>
</div>
...
@@ -86,7 +86,7 @@
...
@@ -86,7 +86,7 @@
<div
v-show=
"step === 2"
>
<div
v-show=
"step === 2"
>
<el-button
@
click=
"cancel"
>
返回登录页
</el-button>
<el-button
@
click=
"cancel"
>
返回登录页
</el-button>
<el-button
type=
"primary"
@
click=
"previousStep"
>
上一步
</el-button>
<el-button
type=
"primary"
@
click=
"previousStep"
>
上一步
</el-button>
<el-button
type=
"primary"
@
click=
"submit"
>
保存
</el-button>
<el-button
type=
"primary"
@
click=
"submit"
>
提交
</el-button>
</div>
</div>
</div>
</div>
</div>
</div>
...
@@ -101,6 +101,7 @@ import { reactive, ref, onBeforeMount, toRefs, computed, onBeforeUnmount, onMoun
...
@@ -101,6 +101,7 @@ import { reactive, ref, onBeforeMount, toRefs, computed, onBeforeUnmount, onMoun
import
CryptoJS
from
"
crypto-js
"
;
import
CryptoJS
from
"
crypto-js
"
;
import
axios
from
"
@/request/http.js
"
;
import
axios
from
"
@/request/http.js
"
;
import
{
ElMessage
}
from
"
element-plus
"
;
import
{
ElMessage
}
from
"
element-plus
"
;
import
{
Encrypt
}
from
"
@/services/secret.js
"
const
route
=
useRoute
();
const
route
=
useRoute
();
const
router
=
useRouter
();
const
router
=
useRouter
();
const
step
=
ref
(
1
);
const
step
=
ref
(
1
);
...
@@ -124,6 +125,8 @@ const getAccountFromData = (data) => {
...
@@ -124,6 +125,8 @@ const getAccountFromData = (data) => {
if
(
data
)
{
if
(
data
)
{
Object
.
assign
(
formData
,
data
);
Object
.
assign
(
formData
,
data
);
step
.
value
=
2
;
step
.
value
=
2
;
//校验手机号验证码 未出接口
}
else
{
}
else
{
}
}
};
};
...
@@ -131,36 +134,19 @@ const getAccountFromData = (data) => {
...
@@ -131,36 +134,19 @@ const getAccountFromData = (data) => {
const
getPasswordFormData
=
(
data
)
=>
{
const
getPasswordFormData
=
(
data
)
=>
{
if
(
data
)
{
if
(
data
)
{
Object
.
assign
(
formData
,
data
);
Object
.
assign
(
formData
,
data
);
if
(
route
.
query
.
id
)
{
let
params
=
{
// console.log(formData);
phone
:
formData
.
phone
,
// let params = {
password
:
Encrypt
(
formData
.
new_password
)
// ...formData,
};
// id: parseInt(route.query.id),
axios
.
post
(
`/apaas/system/v5/user/update/pwd`
,
params
).
then
((
res
)
=>
{
// logo: formData.logo && formData.logo.length > 0 ? formData.logo[0].url : "",
if
(
res
.
data
.
code
==
200
)
{
// };
successFlag
.
value
=
true
;
// axios.post(`/apaas/system/v5/user/update`, params).then((res) => {
// if (res.data.code == 200) {
}
else
{
// successFlag.value = true;
ElMessage
.
error
(
res
.
data
.
data
);
// step.value = 3;
}
// } else {
step
.
value
=
3
;
// ElMessage.error(res.data.data);
});
// }
// });
}
else
{
// let params = {
// ...formData,
// logo: formData.logo && formData.logo.length > 0 ? formData.logo[0].url : "",
// password: CryptoJS.AES.encrypt(formData.password, "swuE9cmCZQwrkYRV").toString(),
// };
// axios.put(`/apaas/system/v5/user/create`, params).then((res) => {
// if (res.data.code == 200) {
// successFlag.value = true;
// step.value = 3;
// } else {
// ElMessage.error(res.data.data);
// }
// });
}
}
}
};
};
//上一步
//上一步
...
@@ -172,59 +158,21 @@ const submit = () => {
...
@@ -172,59 +158,21 @@ const submit = () => {
passwordFormRef
.
value
.
submitForm
();
passwordFormRef
.
value
.
submitForm
();
};
};
//继续创建 清空表单
//继续创建 清空表单
const
continue
Create
=
()
=>
{
const
continue
Edit
=
()
=>
{
//
accountFromRef.value.clearForm();
accountFromRef
.
value
.
clearForm
();
//
passwordFormRef.value.clearForm();
passwordFormRef
.
value
.
clearForm
();
//
step.value = 1;
step
.
value
=
1
;
//
successFlag.value = false;
successFlag
.
value
=
false
;
};
};
//取消
//取消
const
cancel
=
()
=>
{
const
cancel
=
()
=>
{
router
.
go
(
-
1
);
router
.
go
(
-
1
);
// router.push({
// path: "/develop/account",
// query: {
// id: formData.organization_id,
// },
// });
};
};
const
getDetail
=
()
=>
{
// axios.get(`/apaas/system/v5/user/detail/${route.query.id}`).then((res) => {
// if (res.data.code == 200) {
// const form = res.data.data;
// accountFromRef.value.setForm({
// organization_id: form.organization_id,
// system_role_id: form.system_role_id,
// logo: form.logo ? [{ url: form.logo }] : [],
// business_code: form.business_code,
// business_name: form.business_name,
// business_desc: form.business_desc,
// system_account: form.system_account,
// access_address: form.access_address,
// develop_id: form.develop_id,
// state: form.state,
// appid: form.app_id,
// appsecret: form.app_secret,
// });
// passwordFormRef.value.setForm({
// password_name: form.password_name,
// password_phone: form.password_phone,
// password_email: form.password_email,
// remark: form.remark,
// });
// } else {
// ElMessage.error(res.data.data);
// }
// });
};
onBeforeUnmount
(()
=>
{});
onBeforeUnmount
(()
=>
{});
onMounted
(()
=>
{
onMounted
(()
=>
{
// if (route.query.id) {
// getDetail();
// }
});
});
</
script
>
</
script
>
...
...
src/page/password/password-form.vue
View file @
93515534
...
@@ -7,10 +7,10 @@
...
@@ -7,10 +7,10 @@
ref=
"passwordRef"
ref=
"passwordRef"
style=
"max-width: 90%"
>
style=
"max-width: 90%"
>
<el-form-item
label=
"新密码"
prop=
"new_password"
>
<el-form-item
label=
"新密码"
prop=
"new_password"
>
<el-input
v-model=
"passwordForm.new_password"
/>
<el-input
type=
"password"
v-model=
"passwordForm.new_password"
/>
</el-form-item>
</el-form-item>
<el-form-item
label=
"确认密码"
prop=
"confirm_password"
>
<el-form-item
label=
"确认密码"
prop=
"confirm_password"
>
<el-input
v-model=
"passwordForm.confirm_password"
/>
<el-input
type=
"password"
v-model=
"passwordForm.confirm_password"
/>
</el-form-item>
</el-form-item>
</el-form>
</el-form>
</
template
>
</
template
>
...
@@ -24,12 +24,22 @@ const passwordForm = reactive({
...
@@ -24,12 +24,22 @@ const passwordForm = reactive({
const
props
=
defineProps
({
const
props
=
defineProps
({
});
});
const
validatePass
=
(
rule
,
value
,
callback
)
=>
{
if
(
value
!==
passwordForm
.
new_password
)
{
callback
(
new
Error
(
"
密码输入不一致
"
));
}
else
{
callback
();
}
};
const
passwordFormRules
=
reactive
({
const
passwordFormRules
=
reactive
({
new_password
:
[
new_password
:
[
{
required
:
true
,
message
:
"
请输入新密码
"
,
trigger
:
"
blur
"
},
{
required
:
true
,
message
:
"
请输入新密码
"
,
trigger
:
"
blur
"
},
{
min
:
8
,
message
:
"
密码长度不得低于8位
"
,
trigger
:
"
blur
"
},
],
],
confirm_password
:
[
confirm_password
:
[
{
required
:
true
,
message
:
"
请确认密码
"
,
trigger
:
"
blur
"
},
{
required
:
true
,
message
:
"
请确认密码
"
,
trigger
:
"
blur
"
},
{
validator
:
validatePass
,
trigger
:
"
blur
"
},
],
],
});
});
const
passwordRef
=
ref
(
null
);
const
passwordRef
=
ref
(
null
);
...
...
src/page/registe/index.vue
View file @
93515534
...
@@ -26,13 +26,13 @@
...
@@ -26,13 +26,13 @@
</div>
</div>
<div
class=
"info-form"
>
<div
class=
"info-form"
>
<el-form-item
prop=
"organization_id"
label=
"所属机构"
>
<el-form-item
prop=
"organization_id"
label=
"所属机构"
>
<el-select
<el-
tree-
select
v-model=
"infoForm.organization_id"
v-model=
"infoForm.organization_id"
placeholder=
"请选择
"
:data=
"orgData
"
style=
"width: 100%"
>
:props=
"treeProps"
<el-option
label=
"item.role_name"
value=
"item.role_id"
/>
:render-after-expand=
"false"
<!--
<el-option
v-for=
"item in roleList"
:key=
"item.role_id"
:label=
"item.role_name"
:value=
"item.role_id"
/>
-->
filterable
</el-select
>
style=
"width: 100%"
/
>
</el-form-item>
</el-form-item>
<el-form-item
prop=
"business_name"
label=
"业务系统名称"
>
<el-form-item
prop=
"business_name"
label=
"业务系统名称"
>
<el-input
<el-input
...
@@ -47,16 +47,12 @@
...
@@ -47,16 +47,12 @@
v-model=
"infoForm.develop_id"
v-model=
"infoForm.develop_id"
placeholder=
"请选择"
placeholder=
"请选择"
filterable
filterable
remote
remote-show-suffix
:remote-method=
"remoteMethod"
:loading=
"loading"
style=
"width: 100%"
>
style=
"width: 100%"
>
<el-option
<el-option
v-for=
"item in dev
Options
"
v-for=
"item in dev
elopList
"
:key=
"
item.value
"
:key=
"
'develop_'+item.id
"
:label=
"item.
label
"
:label=
"item.
dict_name
"
:value=
"item.
value
"
:value=
"item.
id
"
/>
/>
<template
#empty
>
<template
#empty
>
<div
class=
"select-empty"
>
<div
class=
"select-empty"
>
...
@@ -74,12 +70,14 @@
...
@@ -74,12 +70,14 @@
</el-form-item>
</el-form-item>
<el-form-item
prop=
"password"
label=
"密码"
>
<el-form-item
prop=
"password"
label=
"密码"
>
<el-input
<el-input
type=
"password"
v-model=
"infoForm.password"
v-model=
"infoForm.password"
placeholder=
"请输入"
placeholder=
"请输入"
/>
/>
</el-form-item>
</el-form-item>
<el-form-item
prop=
"confirm_password"
label=
"确认密码"
>
<el-form-item
prop=
"confirm_password"
label=
"确认密码"
>
<el-input
<el-input
type=
"password"
v-model=
"infoForm.confirm_password"
v-model=
"infoForm.confirm_password"
placeholder=
"请输入"
placeholder=
"请输入"
/>
/>
...
@@ -177,18 +175,13 @@ import { useRouter } from "vue-router";
...
@@ -177,18 +175,13 @@ import { useRouter } from "vue-router";
import
axios
from
"
@/request/http.js
"
;
import
axios
from
"
@/request/http.js
"
;
import
{
Encrypt
}
from
"
@/services/secret.js
"
import
{
Encrypt
}
from
"
@/services/secret.js
"
import
{
ElMessage
}
from
"
element-plus
"
;
import
{
ElMessage
}
from
"
element-plus
"
;
import
{
validatePhone
}
from
"
@/services/rules.js
"
const
validateBusinessName
=
(
rule
,
value
,
callback
)
=>
{
const
validateBusinessName
=
(
rule
,
value
,
callback
)
=>
{
let
reg
=
/^
[
a-zA-Z0-9
\u
4e00-
\u
9fa5
]
+$/
;
let
reg
=
/^
[
a-zA-Z0-9
\u
4e00-
\u
9fa5
]
+$/
;
if
(
!
reg
.
test
(
value
))
{
if
(
!
reg
.
test
(
value
))
{
callback
(
new
Error
(
"
只能输入字母、数字和汉字
"
));
callback
(
new
Error
(
"
只能输入字母、数字和汉字
"
));
}
else
{
}
else
{
// let params = null;
// if (props.id) {
// params = { id: parseInt(props.id), business_name: value, organization_id: systemForm.organization_id };
// } else {
// params = { business_name: value, organization_id: systemForm.organization_id };
// }
let
params
=
{
business_name
:
value
};
let
params
=
{
business_name
:
value
};
axios
.
post
(
`/apaas/system/v5/user/checkBusiness`
,
params
).
then
((
res
)
=>
{
axios
.
post
(
`/apaas/system/v5/user/checkBusiness`
,
params
).
then
((
res
)
=>
{
...
@@ -206,12 +199,6 @@ const validateSystemAccount = (rule, value, callback) => {
...
@@ -206,12 +199,6 @@ const validateSystemAccount = (rule, value, callback) => {
if
(
!
reg
.
test
(
value
))
{
if
(
!
reg
.
test
(
value
))
{
callback
(
new
Error
(
"
只能输入字母和数字
"
));
callback
(
new
Error
(
"
只能输入字母和数字
"
));
}
else
{
}
else
{
// let params = null;
// if (props.id) {
// params = { id: parseInt(props.id), system_account: value };
// } else {
// params = { system_account: value };
// }
let
params
=
{
system_account
:
value
};
let
params
=
{
system_account
:
value
};
axios
.
post
(
`/apaas/system/v5/user/checkAccount`
,
params
).
then
((
res
)
=>
{
axios
.
post
(
`/apaas/system/v5/user/checkAccount`
,
params
).
then
((
res
)
=>
{
...
@@ -226,12 +213,7 @@ const validateSystemAccount = (rule, value, callback) => {
...
@@ -226,12 +213,7 @@ const validateSystemAccount = (rule, value, callback) => {
const
checkPhoneRepet
=
(
rule
,
value
,
callback
)
=>
{
const
checkPhoneRepet
=
(
rule
,
value
,
callback
)
=>
{
let
params
=
{
phone
:
value
};
let
params
=
{
phone
:
value
};
// if (props.id){
axios
.
post
(
`/apaas/system/v5/user/checkPhone`
,
params
)
// params = {id: parseInt(props.id),contact_phone: value,}
// }else {
// params = {id: 0,contact_phone: value}
// }
$axios
.
post
(
`/apaas/system/v5/user/checkPhone`
,
params
)
.
then
((
res
)
=>
{
.
then
((
res
)
=>
{
if
(
res
.
data
.
code
==
200
)
{
if
(
res
.
data
.
code
==
200
)
{
callback
()
callback
()
...
@@ -241,6 +223,14 @@ const checkPhoneRepet = (rule, value, callback) => {
...
@@ -241,6 +223,14 @@ const checkPhoneRepet = (rule, value, callback) => {
})
})
}
}
const
validatePass
=
(
rule
,
value
,
callback
)
=>
{
if
(
value
!==
state
.
infoForm
.
password
)
{
callback
(
new
Error
(
"
密码输入不一致
"
));
}
else
{
callback
();
}
};
const
router
=
useRouter
();
const
router
=
useRouter
();
const
state
=
reactive
({
const
state
=
reactive
({
infoForm
:
{
infoForm
:
{
...
@@ -264,14 +254,25 @@ const state = reactive({
...
@@ -264,14 +254,25 @@ const state = reactive({
develop_id
:
[{
required
:
true
,
message
:
"
请选择开发厂商
"
,
trigger
:
"
blur
"
}],
develop_id
:
[{
required
:
true
,
message
:
"
请选择开发厂商
"
,
trigger
:
"
blur
"
}],
system_account
:
[
system_account
:
[
{
required
:
true
,
message
:
"
请输入账号
"
,
trigger
:
"
blur
"
},
{
required
:
true
,
message
:
"
请输入账号
"
,
trigger
:
"
blur
"
},
{
min
:
4
,
message
:
"
帐号长度不得低于4个字符
"
,
trigger
:
"
blur
"
},
{
max
:
20
,
message
:
"
帐号最大长度为20个字符
"
,
trigger
:
"
blur
"
},
{
validator
:
validateSystemAccount
,
trigger
:
"
blur
"
},
{
validator
:
validateSystemAccount
,
trigger
:
"
blur
"
},
],
],
password
:
[{
required
:
true
,
message
:
"
请输入密码
"
,
trigger
:
"
blur
"
}],
password
:
[
confirm_password
:
[{
required
:
true
,
message
:
"
请确认密码
"
,
trigger
:
"
blur
"
}],
{
required
:
true
,
message
:
"
请输入密码
"
,
trigger
:
"
blur
"
},
phone
:
[{
required
:
true
,
message
:
"
请输入手机号
"
,
trigger
:
"
blur
"
}],
{
min
:
8
,
message
:
"
密码长度不得低于8位
"
,
trigger
:
"
blur
"
},
],
confirm_password
:
[
{
required
:
true
,
message
:
"
请确认密码
"
,
trigger
:
"
blur
"
},
{
validator
:
validatePass
,
trigger
:
"
blur
"
},
],
phone
:
[{
required
:
true
,
message
:
"
请输入手机号
"
,
trigger
:
"
blur
"
},
{
validator
:
validatePhone
,
trigger
:
"
blur
"
},
{
validator
:
checkPhoneRepet
,
trigger
:
"
blur
"
},],
code
:
[{
required
:
true
,
message
:
"
请输入验证码
"
,
trigger
:
"
blur
"
}],
code
:
[{
required
:
true
,
message
:
"
请输入验证码
"
,
trigger
:
"
blur
"
}],
contact_name
:
[{
required
:
true
,
message
:
"
请输入联系人
"
,
trigger
:
"
blur
"
}],
contact_name
:
[{
required
:
true
,
message
:
"
请输入联系人
"
,
trigger
:
"
blur
"
}],
contact_phone
:
[{
required
:
true
,
message
:
"
请输入联系电话
"
,
trigger
:
"
blur
"
}],
contact_phone
:
[{
required
:
true
,
message
:
"
请输入联系电话
"
,
trigger
:
"
blur
"
},
{
validator
:
validatePhone
,
trigger
:
"
blur
"
}],
},
},
developForm
:
{
developForm
:
{
develop
:
""
develop
:
""
...
@@ -279,29 +280,35 @@ const state = reactive({
...
@@ -279,29 +280,35 @@ const state = reactive({
developFormRules
:
{
developFormRules
:
{
develop
:
[{
required
:
true
,
message
:
"
请输入开发厂商名称
"
,
trigger
:
"
blur
"
}],
develop
:
[{
required
:
true
,
message
:
"
请输入开发厂商名称
"
,
trigger
:
"
blur
"
}],
},
},
devOptions
:
[],
dialogVisit
:
false
,
dialogVisit
:
false
,
countDown
:
0
,
countDown
:
0
,
countDownTimer
:
null
countDownTimer
:
null
,
orgData
:
[],
developList
:
[]
})
})
const
loading
=
ref
(
false
)
const
treeProps
=
{
label
:
"
name
"
,
children
:
"
Child
"
,
value
:
"
organization_id
"
,
};
// const loading = ref(false)
const
list
=
ref
([])
const
list
=
ref
([])
const
infoFormRef
=
ref
(
null
)
const
infoFormRef
=
ref
(
null
)
const
developFormRef
=
ref
(
null
)
const
developFormRef
=
ref
(
null
)
const
remoteMethod
=
(
query
)
=>
{
//
const remoteMethod = (query) => {
if
(
query
)
{
//
if (query) {
loading
.
value
=
true
//
loading.value = true
setTimeout
(()
=>
{
//
setTimeout(() => {
loading
.
value
=
false
//
loading.value = false
state
.
devOptions
=
list
.
value
.
filter
((
item
)
=>
{
// state.devOptions = state.developList
.filter((item) => {
return
item
.
label
.
toLowerCase
().
includes
(
query
.
toLowerCase
()
)
// return item.dict_name.includes(query
)
})
//
})
},
200
)
//
}, 200)
}
else
{
//
} else {
state
.
devOptions
=
[]
//
state.devOptions = []
}
//
}
}
//
}
const
submit
=
()
=>
{
const
submit
=
()
=>
{
infoFormRef
.
value
.
validate
((
valid
)
=>
{
infoFormRef
.
value
.
validate
((
valid
)
=>
{
...
@@ -312,7 +319,7 @@ const submit = () => {
...
@@ -312,7 +319,7 @@ const submit = () => {
business_desc
:
state
.
infoForm
.
business_desc
,
business_desc
:
state
.
infoForm
.
business_desc
,
system_account
:
state
.
infoForm
.
system_account
,
system_account
:
state
.
infoForm
.
system_account
,
password
:
Encrypt
(
state
.
infoForm
.
password
),
password
:
Encrypt
(
state
.
infoForm
.
password
),
develop_id
:
state
.
infoForm
.
develop_id
,
develop_id
:
state
.
infoForm
.
develop_id
.
toString
()
,
contact_name
:
state
.
infoForm
.
contact_name
,
contact_name
:
state
.
infoForm
.
contact_name
,
contact_phone
:
state
.
infoForm
.
contact_phone
,
contact_phone
:
state
.
infoForm
.
contact_phone
,
phone
:
state
.
infoForm
.
phone
,
phone
:
state
.
infoForm
.
phone
,
...
@@ -321,6 +328,8 @@ const submit = () => {
...
@@ -321,6 +328,8 @@ const submit = () => {
axios
.
post
(
'
/apaas/system/v5/user/register
'
,
params
).
then
(({
data
})
=>
{
axios
.
post
(
'
/apaas/system/v5/user/register
'
,
params
).
then
(({
data
})
=>
{
if
(
data
.
code
==
200
)
{
if
(
data
.
code
==
200
)
{
ElMessage
.
success
(
'
注册信息已提交!
'
);
router
.
go
(
-
1
)
}
else
{
}
else
{
ElMessage
.
error
(
data
.
data
);
ElMessage
.
error
(
data
.
data
);
}
}
...
@@ -367,26 +376,49 @@ const handleCloseDialog = () => {
...
@@ -367,26 +376,49 @@ const handleCloseDialog = () => {
const
confirmAdd
=
()
=>
{
const
confirmAdd
=
()
=>
{
developFormRef
.
value
.
validate
((
valid
)
=>
{
developFormRef
.
value
.
validate
((
valid
)
=>
{
if
(
valid
)
{
if
(
valid
)
{
axios
.
post
(
'
/apaas/system/v5/user/dict/develop/add
'
,{
dict_name
:
state
.
developForm
.
develop
}).
then
(({
data
})
=>
{
if
(
data
.
code
==
200
)
{
state
.
infoForm
.
develop_id
=
data
.
data
;
getDevelopList
()
}
else
{
ElMessage
.
error
(
data
.
data
);
}
handleCloseDialog
()
});
}
}
})
})
}
}
const
states
=
[
const
getOrgData
=
()
=>
{
'
Alabama
'
,
axios
.
get
(
'
/apaas/system/v5/user/org/tree
'
).
then
(({
data
})
=>
{
'
Alaska
'
,
if
(
data
.
code
==
200
)
{
'
Arizona
'
,
state
.
orgData
=
data
.
data
||
[]
'
Arkansas
'
,
}
'
California
'
});
]
}
const
getDevelopList
=
()
=>
{
axios
.
get
(
'
/apaas/system/v5/user/dict/develop
'
).
then
(({
data
})
=>
{
if
(
data
.
code
==
200
)
{
state
.
developList
=
data
.
data
||
[]
}
});
}
onMounted
(()
=>
{
onMounted
(()
=>
{
list
.
value
=
states
.
map
((
item
)
=>
{
getOrgData
()
return
{
value
:
`value:
${
item
}
`
,
label
:
`label:
${
item
}
`
}
getDevelopList
()
})
})
})
const
{
infoForm
,
infoFormRules
,
devOptions
,
dialogVisit
,
developForm
,
developFormRules
,
countDown
,
countDownTimer
}
=
toRefs
(
state
)
const
{
infoForm
,
infoFormRules
,
dialogVisit
,
developForm
,
developFormRules
,
countDown
,
countDownTimer
,
orgData
,
developList
}
=
toRefs
(
state
)
</
script
>
</
script
>
<
style
lang=
"scss"
scoped
>
<
style
lang=
"scss"
scoped
>
...
...
vite.config.js
View file @
93515534
import
{
defineConfig
}
from
'
vite
'
import
{
defineConfig
}
from
"
vite
"
;
import
vue
from
'
@vitejs/plugin-vue
'
import
vue
from
"
@vitejs/plugin-vue
"
;
const
path
=
require
(
'
path
'
)
const
path
=
require
(
"
path
"
);
console
.
log
(
__dirname
);
console
.
log
(
__dirname
);
function
resolve_path
(
dir
)
{
function
resolve_path
(
dir
)
{
return
path
.
join
(
__dirname
,
'
./
'
,
dir
)
return
path
.
join
(
__dirname
,
"
./
"
,
dir
);
}
}
export
default
{
export
default
{
plugins
:
[
plugins
:
[
vue
()],
vue
()
],
//本地运行基础路径,如:http://localhost:5173/apaas/ui/
//本地运行基础路径,如:http://localhost:5173/apaas/ui/
base
:
"
/apaas/manage/ui/
"
,
base
:
"
/apaas/manage/ui/
"
,
clearScreen
:
false
,
clearScreen
:
false
,
resolve
:{
resolve
:
{
//别名,代码引入时方便引入
//别名,代码引入时方便引入
alias
:{
alias
:
{
'
@
'
:
resolve_path
(
'
src
'
),
"
@
"
:
resolve_path
(
"
src
"
),
}
}
,
},
},
css
:{
css
:
{
devSourcemap
:
true
,
//代码编排,调试时是否能看到源码
devSourcemap
:
true
,
//代码编排,调试时是否能看到源码
},
},
server
:{
server
:
{
host
:
'
0.0.0.0
'
,
//host配置,0.0.0.0会添加本地ip,开启局域网访问路径
host
:
"
0.0.0.0
"
,
//host配置,0.0.0.0会添加本地ip,开启局域网访问路径
hmr
:
true
,
//热更新
hmr
:
true
,
//热更新
open
:
true
,
proxy
:
{
proxy
:
{
// 选项写法
// 选项写法
'
/apaas/system
'
:
{
"
/apaas/system
"
:
{
target
:
'
https://apaas5.wodcloud.com/apaas/system
'
,
// 所要代理的目标地址
target
:
"
https://apaas5.wodcloud.com/apaas/system
"
,
// 所要代理的目标地址
rewrite
:
path
=>
path
.
replace
(
/^
\/
apaas
\/
system/
,
''
),
// 重写传过来的path路径,比如 `/api/index/1?id=10&name=zs`(注意:path路径最前面有斜杠(/),因此,正则匹配的时候不要忘了是斜杠(/)开头的;选项的 key 也是斜杠(/)开头的)
rewrite
:
(
path
)
=>
path
.
replace
(
/^
\/
apaas
\/
system/
,
""
),
// 重写传过来的path路径,比如 `/api/index/1?id=10&name=zs`(注意:path路径最前面有斜杠(/),因此,正则匹配的时候不要忘了是斜杠(/)开头的;选项的 key 也是斜杠(/)开头的)
changeOrigin
:
true
,
// true/false, Default: false - changes the origin of the host header to the target URL
changeOrigin
:
true
,
// true/false, Default: false - changes the origin of the host header to the target URL
secure
:
false
,
//解决证书缺失问题
secure
:
false
,
//解决证书缺失问题
},
},
'
/apaas/portal/ui
'
:
{
"
/apaas/portal/ui
"
:
{
target
:
'
https://apaas5.wodcloud.com/apaas/portal/ui
'
,
// 所要代理的目标地址
target
:
"
https://apaas5.wodcloud.com/apaas/portal/ui
"
,
// 所要代理的目标地址
rewrite
:
path
=>
path
.
replace
(
/^
\/
apaas
\/
portal
\/
ui/
,
''
),
// 重写传过来的path路径,比如 `/api/index/1?id=10&name=zs`(注意:path路径最前面有斜杠(/),因此,正则匹配的时候不要忘了是斜杠(/)开头的;选项的 key 也是斜杠(/)开头的)
rewrite
:
(
path
)
=>
path
.
replace
(
/^
\/
apaas
\/
portal
\/
ui/
,
""
),
// 重写传过来的path路径,比如 `/api/index/1?id=10&name=zs`(注意:path路径最前面有斜杠(/),因此,正则匹配的时候不要忘了是斜杠(/)开头的;选项的 key 也是斜杠(/)开头的)
changeOrigin
:
true
,
// true/false, Default: false - changes the origin of the host header to the target URL
changeOrigin
:
true
,
// true/false, Default: false - changes the origin of the host header to the target URL
secure
:
false
,
//解决证书缺失问题
secure
:
false
,
//解决证书缺失问题
},
},
'
/apaas/service
'
:
{
"
/apaas/service
"
:
{
target
:
'
https://apaas5.wodcloud.com/apaas/service
'
,
// 所要代理的目标地址
target
:
"
https://apaas5.wodcloud.com/apaas/service
"
,
// 所要代理的目标地址
rewrite
:
path
=>
path
.
replace
(
/^
\/
apaas
\/
service/
,
''
),
// 重写传过来的path路径,比如 `/api/index/1?id=10&name=zs`(注意:path路径最前面有斜杠(/),因此,正则匹配的时候不要忘了是斜杠(/)开头的;选项的 key 也是斜杠(/)开头的)
rewrite
:
(
path
)
=>
path
.
replace
(
/^
\/
apaas
\/
service/
,
""
),
// 重写传过来的path路径,比如 `/api/index/1?id=10&name=zs`(注意:path路径最前面有斜杠(/),因此,正则匹配的时候不要忘了是斜杠(/)开头的;选项的 key 也是斜杠(/)开头的)
changeOrigin
:
true
,
// true/false, Default: false - changes the origin of the host header to the target URL
changeOrigin
:
true
,
// true/false, Default: false - changes the origin of the host header to the target URL
secure
:
false
,
//解决证书缺失问题
secure
:
false
,
//解决证书缺失问题
},
},
'
/apaas/common
'
:
{
"
/apaas/common
"
:
{
target
:
'
https://apaas5.wodcloud.com/apaas/common
'
,
// 所要代理的目标地址
target
:
"
https://apaas5.wodcloud.com/apaas/common
"
,
// 所要代理的目标地址
rewrite
:
path
=>
path
.
replace
(
/^
\/
apaas
\/
common/
,
''
),
// 重写传过来的path路径,比如 `/api/index/1?id=10&name=zs`(注意:path路径最前面有斜杠(/),因此,正则匹配的时候不要忘了是斜杠(/)开头的;选项的 key 也是斜杠(/)开头的)
rewrite
:
(
path
)
=>
path
.
replace
(
/^
\/
apaas
\/
common/
,
""
),
// 重写传过来的path路径,比如 `/api/index/1?id=10&name=zs`(注意:path路径最前面有斜杠(/),因此,正则匹配的时候不要忘了是斜杠(/)开头的;选项的 key 也是斜杠(/)开头的)
changeOrigin
:
true
,
// true/false, Default: false - changes the origin of the host header to the target URL
changeOrigin
:
true
,
// true/false, Default: false - changes the origin of the host header to the target URL
secure
:
false
,
//解决证书缺失问题
secure
:
false
,
//解决证书缺失问题
},
},
}
}
,
},
},
build
:{
build
:
{
outDir
:
'
dist/apaas/manage/ui
'
,
//打包输出文件夹
outDir
:
"
dist/apaas/manage/ui
"
,
//打包输出文件夹
assetsDir
:
'
static
'
,
//打包输出静态文件
assetsDir
:
"
static
"
,
//打包输出静态文件
},
},
};
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment