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
35254706
Commit
35254706
authored
Oct 28, 2022
by
何小勇
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
组织管理-平台用户
parent
f5eafea0
Changes
12
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
723 additions
and
141 deletions
+723
-141
src/assets/css/index.css
src/assets/css/index.css
+12
-0
src/page/main/develop/account/add/contact-form.vue
src/page/main/develop/account/add/contact-form.vue
+1
-1
src/page/main/develop/account/add/system-form.vue
src/page/main/develop/account/add/system-form.vue
+22
-1
src/page/main/develop/account/index.vue
src/page/main/develop/account/index.vue
+33
-20
src/page/main/system/organization/index.vue
src/page/main/system/organization/index.vue
+356
-27
src/page/main/system/organization/org-user/index.vue
src/page/main/system/organization/org-user/index.vue
+1
-1
src/page/main/system/organization/org-user/org-account-form.vue
...ge/main/system/organization/org-user/org-account-form.vue
+55
-4
src/page/main/system/organization/org-user/org-person-form.vue
...age/main/system/organization/org-user/org-person-form.vue
+4
-0
src/page/main/system/organization/platform-user/index.vue
src/page/main/system/organization/platform-user/index.vue
+59
-18
src/page/main/system/organization/platform-user/platform-account-form.vue
...stem/organization/platform-user/platform-account-form.vue
+70
-5
src/page/main/system/organization/platform-user/platform-person-form.vue
...ystem/organization/platform-user/platform-person-form.vue
+3
-1
src/page/main/system/organization/user-detail/index.vue
src/page/main/system/organization/user-detail/index.vue
+107
-63
No files found.
src/assets/css/index.css
View file @
35254706
...
@@ -1540,3 +1540,15 @@ border-radius:8px;
...
@@ -1540,3 +1540,15 @@ border-radius:8px;
cursor
:
pointer
;
cursor
:
pointer
;
}
}
.warning_info
{
background-color
:
#f7f7f9
;
font-size
:
14px
;
color
:
#404a62
;
padding
:
5px
;
text-align
:
left
;
margin
:
20px
0
;
}
.danger_info
{
color
:
#d75138
;
}
src/page/main/develop/account/add/contact-form.vue
View file @
35254706
...
@@ -41,7 +41,7 @@ const checkPhone = (rule, value, callback) => {
...
@@ -41,7 +41,7 @@ const checkPhone = (rule, value, callback) => {
callback
();
callback
();
}
}
});
});
};
};
const
contactFormRules
=
reactive
({
const
contactFormRules
=
reactive
({
contact_name
:
[
contact_name
:
[
...
...
src/page/main/develop/account/add/system-form.vue
View file @
35254706
...
@@ -62,7 +62,14 @@
...
@@ -62,7 +62,14 @@
<el-input
v-model=
"systemForm.access_address"
/>
<el-input
v-model=
"systemForm.access_address"
/>
</el-form-item>
</el-form-item>
<el-form-item
label=
"开发厂商名称"
prop=
"develop_id"
>
<el-form-item
label=
"开发厂商名称"
prop=
"develop_id"
>
<el-input
v-model=
"systemForm.develop_id"
/>
<el-select
v-model=
"systemForm.develop_id"
placeholder=
"请选择开发厂商"
style=
"width: 100%"
>
<el-option
v-for=
"item in firmList"
:key=
"item.dict_id"
:label=
"item.dict_name"
:value=
"item.dict_id"
/>
</el-select>
</el-form-item>
</el-form-item>
<el-form-item
label=
"是否启用"
prop=
"state"
>
<el-form-item
label=
"是否启用"
prop=
"state"
>
<bg-switch
:labels=
"['否','是']"
:values=
"[0,1]"
v-model=
"systemForm.state"
></bg-switch>
<bg-switch
:labels=
"['否','是']"
:values=
"[0,1]"
v-model=
"systemForm.state"
></bg-switch>
...
@@ -174,6 +181,7 @@ const formRules = reactive({
...
@@ -174,6 +181,7 @@ const formRules = reactive({
const
systemRef
=
ref
(
null
)
const
systemRef
=
ref
(
null
)
const
emit
=
defineEmits
([
'
action
'
])
const
emit
=
defineEmits
([
'
action
'
])
const
roleList
=
ref
([])
const
roleList
=
ref
([])
const
firmList
=
ref
([])
const
submitForm
=
async
()
=>
{
const
submitForm
=
async
()
=>
{
if
(
!
systemRef
)
return
if
(
!
systemRef
)
return
...
@@ -235,9 +243,22 @@ const getRoleList = () => {
...
@@ -235,9 +243,22 @@ const getRoleList = () => {
})
})
}
}
const
getFirmList
=
()
=>
{
$axios
.
get
(
`/apaas/system/v5/dictionary/developer/list`
)
.
then
((
res
)
=>
{
if
(
res
.
data
.
code
==
200
)
{
firmList
.
value
=
res
.
data
.
data
;
}
else
{
}
})
}
onBeforeMount
(()
=>
{
onBeforeMount
(()
=>
{
getOrgTree
()
getOrgTree
()
getRoleList
()
getRoleList
()
getFirmList
()
})
})
onMounted
(()
=>
{
onMounted
(()
=>
{
...
...
src/page/main/develop/account/index.vue
View file @
35254706
...
@@ -20,7 +20,14 @@
...
@@ -20,7 +20,14 @@
/>
/>
</div>
</div>
<div
class=
"tree"
>
<div
class=
"tree"
>
<el-tree
ref=
"treeRef"
:data=
"orgData"
:props=
"defaultProps"
@
node-click=
"handleNodeClick"
:filter-node-method=
"filterNode"
:default-expand-all=
"true"
>
<el-tree
ref=
"treeRef"
:data=
"orgData"
:props=
"defaultProps"
@
node-click=
"handleNodeClick"
node-key=
"id"
:highlight-current=
"true"
:filter-node-method=
"filterNode"
:default-expand-all=
"true"
>
<template
#default
="
{ node, data }">
<template
#default
="
{ node, data }">
<div
class=
"custom_tree_node"
>
<div
class=
"custom_tree_node"
>
<span
<span
...
@@ -36,7 +43,7 @@
...
@@ -36,7 +43,7 @@
</div>
</div>
<div
class=
"flex_right bgc_white"
>
<div
class=
"flex_right bgc_white"
>
<div
class=
"main_container"
>
<div
class=
"main_container"
>
<bg-filter-group
@
search=
"
getTableRows
"
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
>
<div
class=
"apaas_button"
>
<div
class=
"apaas_button"
>
<el-button
class=
"register_btn"
type=
"primary"
@
click=
"addAccount"
>
<el-button
class=
"register_btn"
type=
"primary"
@
click=
"addAccount"
>
...
@@ -196,7 +203,7 @@
...
@@ -196,7 +203,7 @@
<
script
setup
>
<
script
setup
>
import
{
Search
}
from
'
@element-plus/icons-vue
'
import
{
Search
}
from
'
@element-plus/icons-vue
'
import
{
reactive
,
toRefs
,
ref
,
}
from
'
@vue/reactivity
'
import
{
reactive
,
toRefs
,
ref
,
}
from
'
@vue/reactivity
'
import
{
getCurrentInstance
,
watch
}
from
'
vue
'
import
{
getCurrentInstance
,
watch
,
nextTick
}
from
'
vue
'
import
{
computed
,
onBeforeMount
}
from
'
@vue/runtime-core
'
import
{
computed
,
onBeforeMount
}
from
'
@vue/runtime-core
'
import
{
useRouter
}
from
'
vue-router
'
;
import
{
useRouter
}
from
'
vue-router
'
;
import
{
edit
}
from
'
ace-builds
'
;
import
{
edit
}
from
'
ace-builds
'
;
...
@@ -280,6 +287,7 @@ import CryptoJS from "crypto-js";
...
@@ -280,6 +287,7 @@ import CryptoJS from "crypto-js";
const
passwordFormRules
=
reactive
({
const
passwordFormRules
=
reactive
({
password
:
[
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
'
},
...
@@ -317,8 +325,8 @@ import CryptoJS from "crypto-js";
...
@@ -317,8 +325,8 @@ import CryptoJS from "crypto-js";
console
.
log
(
data
.
data_type
)
console
.
log
(
data
.
data_type
)
if
(
data
.
data_type
==
1
)
{
if
(
data
.
data_type
==
1
)
{
selectNode
.
value
=
data
.
id
;
selectNode
.
value
=
data
.
id
;
changePage
(
1
)
}
}
console
.
log
(
selectNode
)
}
}
const
orgData
=
ref
([])
const
orgData
=
ref
([])
...
@@ -333,8 +341,14 @@ import CryptoJS from "crypto-js";
...
@@ -333,8 +341,14 @@ import CryptoJS from "crypto-js";
.
then
((
res
)
=>
{
.
then
((
res
)
=>
{
if
(
res
.
data
.
code
==
200
)
{
if
(
res
.
data
.
code
==
200
)
{
orgData
.
value
=
res
.
data
.
data
||
[];
orgData
.
value
=
res
.
data
.
data
||
[];
const
orgList
=
searchOrg
(
res
.
data
.
data
);
orgData
.
value
.
shift
()
selectNode
.
value
=
orgList
.
length
>
1
?
orgList
[
1
].
id
:
''
;
const
orgList
=
searchOrg
(
orgData
.
value
);
selectNode
.
value
=
orgList
.
length
>
0
?
orgList
[
0
].
id
:
''
;
nextTick
(()
=>
{
if
(
orgList
.
length
>
0
)
{
treeRef
.
value
.
setCurrentNode
(
orgList
[
0
])
}
})
getTableRows
()
getTableRows
()
}
else
{
}
else
{
$message
.
error
(
res
.
data
.
msg
)
$message
.
error
(
res
.
data
.
msg
)
...
@@ -385,7 +399,7 @@ import CryptoJS from "crypto-js";
...
@@ -385,7 +399,7 @@ import CryptoJS from "crypto-js";
const
changeSize
=
(
size
)
=>
{
const
changeSize
=
(
size
)
=>
{
filter
.
limit
=
size
;
filter
.
limit
=
size
;
filter
.
page
=
1
;
filter
.
page
=
1
;
getTableRows
(
)
changePage
(
1
)
}
}
const
changePage
=
(
page
)
=>
{
const
changePage
=
(
page
)
=>
{
...
@@ -393,6 +407,11 @@ import CryptoJS from "crypto-js";
...
@@ -393,6 +407,11 @@ import CryptoJS from "crypto-js";
getTableRows
()
getTableRows
()
}
}
const
changeSearch
=
(
val
)
=>
{
filter
.
search
=
val
changePage
(
1
)
}
// 表格关键字筛选
const
goDetail
=
(
params
)
=>
{
const
goDetail
=
(
params
)
=>
{
router
.
push
({
router
.
push
({
path
:
"
/develop/account/detail
"
,
path
:
"
/develop/account/detail
"
,
...
@@ -412,8 +431,12 @@ import CryptoJS from "crypto-js";
...
@@ -412,8 +431,12 @@ import CryptoJS from "crypto-js";
}
}
const
deleteAccount
=
(
data
)
=>
{
const
deleteAccount
=
(
data
)
=>
{
selectedRow
.
value
=
data
;
if
(
data
.
state
===
0
)
{
deleteRowFlag
.
value
=
true
;
selectedRow
.
value
=
data
;
deleteRowFlag
.
value
=
true
;
}
else
{
$message
.
error
(
'
当前状态已启用,不可删除!
'
)
}
}
}
const
handleCloseDelete
=
()
=>
{
const
handleCloseDelete
=
()
=>
{
...
@@ -605,16 +628,6 @@ import CryptoJS from "crypto-js";
...
@@ -605,16 +628,6 @@ import CryptoJS from "crypto-js";
bottom
:
unset
;
bottom
:
unset
;
margin-top
:
0px
margin-top
:
0px
}
}
.warning_info
{
background-color
:
#f7f7f9
;
font-size
:
14px
;
color
:
#404a62
;
padding
:
5px
;
text-align
:
left
;
margin
:
20px
0
;
}
.danger_info
{
color
:
#d75138
;
}
</
style
>
</
style
>
\ No newline at end of file
src/page/main/system/organization/index.vue
View file @
35254706
This diff is collapsed.
Click to expand it.
src/page/main/system/organization/org-user/index.vue
View file @
35254706
...
@@ -44,7 +44,7 @@
...
@@ -44,7 +44,7 @@
</div>
</div>
<div
class=
"content_main"
>
<div
class=
"content_main"
>
<orgAccountForm
v-show=
"step === 1"
:form-type=
"route.query.id ? true : false"
ref=
"orgAccountRef"
@
action=
"getOrgAccountFormData"
></orgAccountForm>
<orgAccountForm
v-show=
"step === 1"
:form-type=
"route.query.id ? true : false"
:id=
"route.query.id"
ref=
"orgAccountRef"
@
action=
"getOrgAccountFormData"
></orgAccountForm>
<orgPersonForm
v-show=
"step === 2"
ref=
"orgPersonRef"
@
action=
"getOrgPersonFormData"
></orgPersonForm>
<orgPersonForm
v-show=
"step === 2"
ref=
"orgPersonRef"
@
action=
"getOrgPersonFormData"
></orgPersonForm>
<div
class=
"process_end"
v-show=
"step === 3"
>
<div
class=
"process_end"
v-show=
"step === 3"
>
<div>
<div>
...
...
src/page/main/system/organization/org-user/org-account-form.vue
View file @
35254706
...
@@ -53,10 +53,10 @@ const props = defineProps({
...
@@ -53,10 +53,10 @@ const props = defineProps({
type
:
Boolean
,
type
:
Boolean
,
default
:
false
,
//false 新建 true 编辑
default
:
false
,
//false 新建 true 编辑
},
},
//
id: {
id
:
{
//
type: String,
type
:
String
,
//
default: '',
default
:
''
,
//
}
}
});
});
const
orgAccountForm
=
reactive
({
const
orgAccountForm
=
reactive
({
organization_id
:
''
,
organization_id
:
''
,
...
@@ -77,6 +77,53 @@ const validatePass = (rule, value, callback) => {
...
@@ -77,6 +77,53 @@ const validatePass = (rule, value, callback) => {
}
}
}
}
const
validateSystemAccount
=
(
rule
,
value
,
callback
)
=>
{
let
params
=
null
;
if
(
props
.
id
){
params
=
{
id
:
parseInt
(
props
.
id
),
system_account
:
value
,}
}
else
{
params
=
{
system_account
:
value
}
}
$axios
.
post
(
`/apaas/system/v5/user/check/account`
,
params
)
.
then
((
res
)
=>
{
if
(
res
.
data
.
code
==
200
)
{
callback
()
}
else
{
callback
(
new
Error
(
res
.
data
.
data
))
}
})
}
const
checkPhone
=
(
rule
,
value
,
callback
)
=>
{
var
phone_ruler
=
/^
(?:(?:\+
|00
)
86
)?
1
[
3-9
]\d{9}
$/
;
setTimeout
(()
=>
{
if
(
!
phone_ruler
.
test
(
value
)
&&
value
.
length
!==
0
)
{
callback
(
new
Error
(
"
请输入正确的手机号码
"
));
}
else
{
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
orgAccountFormRules
=
reactive
({
const
orgAccountFormRules
=
reactive
({
organization_id
:
[
organization_id
:
[
{
required
:
true
,
message
:
'
请选择组织
'
,
trigger
:
'
blur
'
},
{
required
:
true
,
message
:
'
请选择组织
'
,
trigger
:
'
blur
'
},
...
@@ -86,13 +133,17 @@ const orgAccountFormRules = reactive({
...
@@ -86,13 +133,17 @@ const orgAccountFormRules = reactive({
],
],
system_account
:
[
system_account
:
[
{
required
:
true
,
message
:
'
请输入账号
'
,
trigger
:
'
blur
'
},
{
required
:
true
,
message
:
'
请输入账号
'
,
trigger
:
'
blur
'
},
{
validator
:
validateSystemAccount
,
trigger
:
'
blur
'
},
],
],
contact_phone
:
[
contact_phone
:
[
{
required
:
true
,
message
:
'
请输入手机号
'
,
trigger
:
'
blur
'
},
{
required
:
true
,
message
:
'
请输入手机号
'
,
trigger
:
'
blur
'
},
{
validator
:
checkPhone
,
trigger
:
'
blur
'
},
{
validator
:
checkPhoneRepet
,
trigger
:
'
blur
'
}
],
],
password
:
[
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
'
},
...
...
src/page/main/system/organization/org-user/org-person-form.vue
View file @
35254706
...
@@ -49,6 +49,10 @@ const documentTypeList = ref([{
...
@@ -49,6 +49,10 @@ const documentTypeList = ref([{
}])
}])
const
orgPersonFormRules
=
reactive
({
const
orgPersonFormRules
=
reactive
({
contact_email
:
[
// { required: true, message: '请输入手机号', trigger: 'blur' },
{
type
:
'
email
'
,
message
:
'
请输入正确的邮箱
'
,
trigger
:
'
blur
'
}
],
})
})
const
orgPersonFormRef
=
ref
(
null
)
const
orgPersonFormRef
=
ref
(
null
)
const
emit
=
defineEmits
([
'
action
'
])
const
emit
=
defineEmits
([
'
action
'
])
...
...
src/page/main/system/organization/platform-user/index.vue
View file @
35254706
...
@@ -9,7 +9,7 @@
...
@@ -9,7 +9,7 @@
</div>
</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"
v-if=
"!route.query.id"
>
<div>
<div>
<el-steps
:active=
"step"
>
<el-steps
:active=
"step"
>
<el-step
title=
""
:class=
"
{'process_complete': step > 1}">
<el-step
title=
""
:class=
"
{'process_complete': step > 1}">
...
@@ -44,7 +44,7 @@
...
@@ -44,7 +44,7 @@
</div>
</div>
<div
class=
"content_main"
>
<div
class=
"content_main"
>
<platformAccountForm
v-show=
"step === 1"
ref=
"platformAccountFormRef"
@
action=
"getPlatformAccountFormData"
></platformAccountForm>
<platformAccountForm
v-show=
"step === 1"
:form-type=
"route.query.id ? true : false"
:id=
"route.query.id"
ref=
"platformAccountFormRef"
@
action=
"getPlatformAccountFormData"
></platformAccountForm>
<platformPersonForm
v-show=
"step === 2"
ref=
"plplatformPersonFormRef"
@
action=
"getPlatformPersonFormData"
></platformPersonForm>
<platformPersonForm
v-show=
"step === 2"
ref=
"plplatformPersonFormRef"
@
action=
"getPlatformPersonFormData"
></platformPersonForm>
<div
class=
"process_end"
v-show=
"step === 3"
>
<div
class=
"process_end"
v-show=
"step === 3"
>
<div>
<div>
...
@@ -61,7 +61,7 @@
...
@@ -61,7 +61,7 @@
</div>
</div>
</div>
</div>
<div
class=
"content_bottom"
v-if=
"step !== 3"
>
<div
class=
"content_bottom"
v-if=
"step !== 3"
>
<div
v-show=
"step === 1"
>
<div
v-show=
"
!route.query.id &&
step === 1"
>
<el-button
@
click=
"cancel"
>
取消
</el-button>
<el-button
@
click=
"cancel"
>
取消
</el-button>
<el-button
type=
"primary"
@
click=
"nextStep"
>
下一步
</el-button>
<el-button
type=
"primary"
@
click=
"nextStep"
>
下一步
</el-button>
</div>
</div>
...
@@ -70,7 +70,10 @@
...
@@ -70,7 +70,10 @@
<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
v-show=
"route.query.id"
>
<el-button
@
click=
"cancel"
>
取消
</el-button>
<el-button
type=
"primary"
@
click=
"nextStep"
>
保存
</el-button>
</div>
</div>
</div>
</div>
</div>
...
@@ -115,8 +118,26 @@ const nextStep = () => {
...
@@ -115,8 +118,26 @@ const nextStep = () => {
//账号信息表单检验触发事件 data为null 校验失败
//账号信息表单检验触发事件 data为null 校验失败
const
getPlatformAccountFormData
=
(
data
)
=>
{
const
getPlatformAccountFormData
=
(
data
)
=>
{
if
(
data
)
{
if
(
data
)
{
Object
.
assign
(
formData
,
data
);
if
(
route
.
query
.
id
)
{
step
.
value
=
2
;
Object
.
assign
(
formData
,
data
);
let
params
=
{
...
formData
,
logo
:
formData
.
logo
&&
formData
.
logo
.
length
>
0
?
formData
.
logo
[
0
].
url
:
''
,
}
$axios
.
put
(
`/apaas/system/v5/org/update/user/
${
route
.
query
.
id
}
`
,
params
)
.
then
((
res
)
=>
{
if
(
res
.
data
.
code
==
200
)
{
successFlag
.
value
=
true
;
step
.
value
=
3
;
}
else
{
$message
.
error
(
res
.
data
.
msg
)
}
})
}
else
{
Object
.
assign
(
formData
,
data
);
step
.
value
=
2
;
}
}
else
{
}
else
{
}
}
...
@@ -127,18 +148,18 @@ const getPlatformPersonFormData = (data) => {
...
@@ -127,18 +148,18 @@ const getPlatformPersonFormData = (data) => {
Object
.
assign
(
formData
,
data
);
Object
.
assign
(
formData
,
data
);
if
(
route
.
query
.
id
)
{
if
(
route
.
query
.
id
)
{
console
.
log
(
formData
)
console
.
log
(
formData
)
let
params
=
{
//
let params = {
}
//
}
$axios
.
post
(
`/apaas/system/v5/org/update/user/:id
`
,
params
)
// $axios.post(`/apaas/system/v5/org/update/user/${route.query.id}
`,params)
.
then
((
res
)
=>
{
//
.then((res) => {
if
(
res
.
data
.
code
==
200
)
{
//
if (res.data.code == 200) {
successFlag
.
value
=
true
;
//
successFlag.value = true;
step
.
value
=
3
;
//
step.value = 3;
}
else
{
//
}else {
$message
.
error
(
res
.
data
.
msg
)
//
$message.error(res.data.msg)
}
//
}
})
//
})
}
else
{
}
else
{
const
params
=
{...
formData
,
const
params
=
{...
formData
,
...
@@ -190,10 +211,30 @@ const getOrgTree = () => {
...
@@ -190,10 +211,30 @@ const getOrgTree = () => {
})
})
}
}
const
getDetail
=
()
=>
{
$axios
.
get
(
`/apaas/system/v5/org/user/
${
route
.
query
.
id
}
`
)
.
then
((
res
)
=>
{
if
(
res
.
data
.
code
==
200
)
{
const
form
=
res
.
data
.
data
;
platformAccountFormRef
.
value
.
setForm
({
logo
:
[{
url
:
form
.
logo
}],
system_account
:
form
.
system_account
,
contact_phone
:
form
.
contact_phone
,
state
:
form
.
state
,
contact_name
:
form
.
contact_name
,
contact_email
:
form
.
contact_email
,
remark
:
form
.
remark
,
})
}
else
{
$message
.
error
(
res
.
data
.
msg
)
}
})
}
onBeforeMount
(()
=>
{
onBeforeMount
(()
=>
{
getOrgTree
()
getOrgTree
()
if
(
route
.
query
.
id
)
{
if
(
route
.
query
.
id
)
{
console
.
log
(
route
.
query
.
id
)
getDetail
(
)
}
}
})
})
onMounted
(()
=>
{
onMounted
(()
=>
{
...
...
src/page/main/system/organization/platform-user/platform-account-form.vue
View file @
35254706
...
@@ -16,13 +16,13 @@
...
@@ -16,13 +16,13 @@
<el-form-item
label=
"手机号"
prop=
"contact_phone"
>
<el-form-item
label=
"手机号"
prop=
"contact_phone"
>
<el-input
v-model=
"platformAccountForm.contact_phone"
/>
<el-input
v-model=
"platformAccountForm.contact_phone"
/>
</el-form-item>
</el-form-item>
<el-form-item
label=
"密码"
prop=
"password"
>
<el-form-item
v-if=
"!formType"
label=
"密码"
prop=
"password"
>
<el-input
type=
"password"
v-model=
"platformAccountForm.password"
/>
<el-input
type=
"password"
v-model=
"platformAccountForm.password"
/>
</el-form-item>
</el-form-item>
<el-form-item
label=
"确认密码"
prop=
"confirm_password"
>
<el-form-item
v-if=
"!formType"
label=
"确认密码"
prop=
"confirm_password"
>
<el-input
type=
"password"
v-model=
"platformAccountForm.confirm_password"
/>
<el-input
type=
"password"
v-model=
"platformAccountForm.confirm_password"
/>
</el-form-item>
</el-form-item>
<el-form-item
label=
"角色授权"
prop=
"select_role"
>
<el-form-item
v-if=
"!formType"
label=
"角色授权"
prop=
"select_role"
>
<el-select
v-model=
"platformAccountForm.select_role"
multiple
placeholder=
"请选择角色"
style=
"width: 100%"
>
<el-select
v-model=
"platformAccountForm.select_role"
multiple
placeholder=
"请选择角色"
style=
"width: 100%"
>
<el-option
<el-option
v-for=
"item in roleList"
v-for=
"item in roleList"
...
@@ -31,6 +31,15 @@
...
@@ -31,6 +31,15 @@
:value=
"item.role_id"
:value=
"item.role_id"
/>
/>
</el-select>
</el-select>
</el-form-item>
<el-form-item
v-if=
"formType"
label=
"姓名"
prop=
"contact_name"
>
<el-input
v-model=
"platformAccountForm.contact_name"
/>
</el-form-item>
<el-form-item
v-if=
"formType"
label=
"邮箱"
prop=
"contact_email"
>
<el-input
v-model=
"platformAccountForm.contact_email"
/>
</el-form-item>
<el-form-item
v-if=
"formType"
label=
"备注"
prop=
"remark"
>
<el-input
type=
"textarea"
:rows=
"3"
v-model=
"platformAccountForm.remark"
/>
</el-form-item>
</el-form-item>
<el-form-item
label=
"是否启用"
prop=
"state"
>
<el-form-item
label=
"是否启用"
prop=
"state"
>
<bg-switch
:labels=
"['否','是']"
:values=
"[0,1]"
v-model=
"platformAccountForm.state"
></bg-switch>
<bg-switch
:labels=
"['否','是']"
:values=
"[0,1]"
v-model=
"platformAccountForm.state"
></bg-switch>
...
@@ -43,6 +52,16 @@
...
@@ -43,6 +52,16 @@
import
{
reactive
,
ref
,
onMounted
,
onBeforeMount
,
getCurrentInstance
}
from
'
vue
'
import
{
reactive
,
ref
,
onMounted
,
onBeforeMount
,
getCurrentInstance
}
from
'
vue
'
const
{
proxy
}
=
getCurrentInstance
()
const
{
proxy
}
=
getCurrentInstance
()
const
{
$axios
,
$message
}
=
proxy
const
{
$axios
,
$message
}
=
proxy
const
props
=
defineProps
({
formType
:
{
type
:
Boolean
,
default
:
false
,
//false 新建 true 编辑
},
id
:
{
type
:
String
,
default
:
''
,
}
});
const
platformAccountForm
=
reactive
({
const
platformAccountForm
=
reactive
({
logo
:
[],
logo
:
[],
system_account
:
''
,
system_account
:
''
,
...
@@ -51,6 +70,10 @@ const platformAccountForm = reactive({
...
@@ -51,6 +70,10 @@ const platformAccountForm = reactive({
confirm_password
:
''
,
confirm_password
:
''
,
select_role
:
''
,
select_role
:
''
,
state
:
1
,
state
:
1
,
contact_name
:
''
,
contact_email
:
''
,
remark
:
''
,
})
})
...
@@ -70,26 +93,68 @@ const checkPhone = (rule, value, callback) => {
...
@@ -70,26 +93,68 @@ const checkPhone = (rule, value, callback) => {
callback
();
callback
();
}
}
});
});
};
};
const
validateSystemAccount
=
(
rule
,
value
,
callback
)
=>
{
let
params
=
null
;
if
(
props
.
id
){
params
=
{
id
:
parseInt
(
props
.
id
),
system_account
:
value
,}
}
else
{
params
=
{
system_account
:
value
}
}
$axios
.
post
(
`/apaas/system/v5/user/check/account`
,
params
)
.
then
((
res
)
=>
{
if
(
res
.
data
.
code
==
200
)
{
callback
()
}
else
{
callback
(
new
Error
(
res
.
data
.
data
))
}
})
}
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
platformAccountFormRules
=
reactive
({
const
platformAccountFormRules
=
reactive
({
system_account
:
[
system_account
:
[
{
required
:
true
,
message
:
'
请输入账号
'
,
trigger
:
'
blur
'
},
{
required
:
true
,
message
:
'
请输入账号
'
,
trigger
:
'
blur
'
},
{
validator
:
validateSystemAccount
,
trigger
:
'
blur
'
},
],
],
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
'
}
],
],
select_role
:
[
select_role
:
[
{
required
:
true
,
message
:
'
请选择角色
'
,
trigger
:
'
blur
'
},
{
required
:
true
,
message
:
'
请选择角色
'
,
trigger
:
'
blur
'
},
],
],
password
:
[
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
'
}
{
validator
:
validatePass
,
trigger
:
'
blur
'
}
],
],
contact_email
:
[
{
type
:
'
email
'
,
message
:
'
请输入正确的邮箱
'
,
trigger
:
'
blur
'
}
],
})
})
const
roleList
=
ref
([])
const
roleList
=
ref
([])
...
...
src/page/main/system/organization/platform-user/platform-person-form.vue
View file @
35254706
...
@@ -29,7 +29,9 @@ const platformPersonForm = reactive({
...
@@ -29,7 +29,9 @@ const platformPersonForm = reactive({
})
})
const
platformPersonFormRules
=
reactive
({
const
platformPersonFormRules
=
reactive
({
contact_email
:
[
{
type
:
'
email
'
,
message
:
'
请输入正确的邮箱
'
,
trigger
:
'
blur
'
}
],
})
})
const
platformPersonFormRef
=
ref
(
null
)
const
platformPersonFormRef
=
ref
(
null
)
const
emit
=
defineEmits
([
'
action
'
])
const
emit
=
defineEmits
([
'
action
'
])
...
...
src/page/main/system/organization/user-detail/index.vue
View file @
35254706
...
@@ -10,29 +10,31 @@
...
@@ -10,29 +10,31 @@
<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"
>
<div><span
class=
"icon_box"
></span>
基础
信息
</div>
<div><span
class=
"icon_box"
></span>
账号
信息
</div>
<div
class=
"dashed_line"
>
<div
class=
"dashed_line"
>
</div>
</div>
</div>
</div>
<div
class=
"info_content"
>
<div
class=
"info_content"
>
<div
class=
"img_box"
>
<div
class=
"img_box"
>
<img
src=
"/src/assets/imgs/home_ic_user.png"
style=
"height: 96px;width: 96px;border-radius: 99px"
alt=
""
>
<img
v-if=
"logo"
:src=
"logo"
style=
"height: 96px;width: 96px;border-radius: 99px"
alt=
""
>
<img
v-else
src=
"/src/assets/imgs/home_ic_user.png"
style=
"height: 96px;width: 96px;border-radius: 99px"
alt=
""
>
</div>
</div>
<div
class=
"info_box"
>
<div
class=
"info_box"
>
<bg-info
:data=
"
base
Info"
></bg-info>
<bg-info
:data=
"
account
Info"
></bg-info>
</div>
</div>
</div>
</div>
</div>
</div>
<div>
<div>
<div
class=
"title"
>
<div
class=
"title"
>
<div><span
class=
"icon_box"
></span>
基础
信息
</div>
<div><span
class=
"icon_box"
></span>
个人
信息
</div>
<div
class=
"dashed_line"
>
<div
class=
"dashed_line"
>
</div>
</div>
</div>
</div>
<div
class=
"info_content"
>
<div
class=
"info_content"
>
<div
class=
"img_box"
></div>
<div
class=
"img_box"
></div>
<div
class=
"info_box"
>
<div
class=
"info_box"
>
<bg-info
:data=
"contactInfo"
></bg-info>
<bg-info
v-if=
"accountType === 2"
:data=
"personInfo"
></bg-info>
<bg-info
v-if=
"accountType === 3"
:data=
"personInfo2"
></bg-info>
</div>
</div>
</div>
</div>
</div>
</div>
...
@@ -44,103 +46,145 @@
...
@@ -44,103 +46,145 @@
import
{
reactive
,
toRefs
,
ref
,
}
from
'
@vue/reactivity
'
import
{
reactive
,
toRefs
,
ref
,
}
from
'
@vue/reactivity
'
import
{
getCurrentInstance
}
from
'
vue
'
import
{
getCurrentInstance
}
from
'
vue
'
import
{
computed
,
onBeforeMount
}
from
'
@vue/runtime-core
'
import
{
computed
,
onBeforeMount
}
from
'
@vue/runtime-core
'
import
{
useRoute
r
}
from
'
vue-router
'
;
import
{
useRoute
}
from
'
vue-router
'
;
const
baseInfo
=
reactive
(
const
{
proxy
}
=
getCurrentInstance
()
const
{
$axios
,
$message
}
=
proxy
const
route
=
useRoute
();
const
accountInfo
=
reactive
(
[
[
{
{
name
:
"
所属机构
"
,
name
:
"
手机号
"
,
value
:
"
某某省/某某市/大数据局
"
,
value
:
""
,
nameWidth
:
1
12
nameWidth
:
1
30
},
},
{
{
name
:
"
业务系统编码
"
,
name
:
"
账号
"
,
value
:
"
00000001
"
,
value
:
""
,
nameWidth
:
1
12
nameWidth
:
1
30
},
},
{
{
name
:
"
业务系统名称
"
,
name
:
"
角色
"
,
value
:
"
大数据处理系统
"
,
value
:
""
,
nameWidth
:
1
12
nameWidth
:
1
30
},
},
{
{
name
:
"
账号
"
,
name
:
"
所属组织
"
,
value
:
"
admin001
"
,
value
:
""
,
nameWidth
:
1
12
nameWidth
:
1
30
},
},
{
{
name
:
"
AppID
"
,
name
:
"
创建人
"
,
value
:
"
dasjkjjk
"
,
value
:
""
,
nameWidth
:
1
12
nameWidth
:
1
30
},
},
{
{
name
:
"
AppSecret
"
,
name
:
"
创建账号
"
,
value
:
"
asda*******************jhjh
"
,
value
:
""
,
nameWidth
:
1
12
nameWidth
:
1
30
},
},
{
{
name
:
"
创建人
"
,
name
:
"
最后编辑时间
"
,
value
:
"
admin(机构管理员)
"
,
value
:
""
,
nameWidth
:
1
12
nameWidth
:
1
30
},
},
{
{
name
:
"
创建时间
"
,
name
:
"
创建时间
"
,
value
:
"
2022-01-01 10:10:10
"
,
value
:
""
,
nameWidth
:
112
nameWidth
:
130
},
]
)
const
personInfo
=
reactive
(
[{
name
:
"
姓名
"
,
value
:
""
,
nameWidth
:
130
},
},
{
{
name
:
"
是否启用
"
,
name
:
"
邮箱
"
,
value
:
"
是
"
,
value
:
""
,
nameWidth
:
1
12
nameWidth
:
1
30
},
},
{
{
name
:
"
开发厂商名单
"
,
name
:
"
证据类型
"
,
value
:
"
某某大数据开发商
"
,
value
:
""
,
nameWidth
:
1
12
nameWidth
:
1
30
},
},
{
{
name
:
"
访问地址
"
,
name
:
"
身份证号
"
,
value
:
"
http://www.bigdata.com
"
,
value
:
""
,
full
:
true
,
nameWidth
:
130
nameWidth
:
112
},
},
{
{
name
:
"
业务系统描述
"
,
name
:
"
备注
"
,
value
:
"
系统描述系统描述系统描述系统描述系统描述系统描述系统描述系统描述系统描述系统描述系统描述系统描述系统描述系统描述系统描述系统描述
"
,
value
:
""
,
full
:
true
,
full
:
true
,
nameWidth
:
1
12
nameWidth
:
1
30
},
},
]
])
)
const
contactInfo
=
reactive
(
const
personInfo2
=
reactive
(
[{
[{
name
:
"
联系人姓名
"
,
name
:
"
姓名
"
,
value
:
"
xxx
"
,
value
:
""
,
nameWidth
:
112
nameWidth
:
130
},
{
name
:
"
联系人手机号
"
,
value
:
"
15627365265
"
,
nameWidth
:
112
},
},
{
{
name
:
"
联系人邮箱
"
,
name
:
"
邮箱
"
,
value
:
"
http://www.bigdata@163.com
"
,
value
:
""
,
full
:
true
,
nameWidth
:
130
nameWidth
:
112
},
},
{
{
name
:
"
备注
"
,
name
:
"
备注
"
,
value
:
"
系统描述系统描述系统描述系统描述系统描述系统描述系统描述系统描述系统描述系统描述系统描述系统描述系统描述系统描述系统描述系统描述
"
,
value
:
""
,
full
:
true
,
full
:
true
,
nameWidth
:
1
12
nameWidth
:
1
30
},
},
]
])
)
const
logo
=
ref
(
''
)
const
accountType
=
ref
(
2
);
//1.业务系统账号 2.组织管理员账号 3.平台用户账号
const
getDetail
=
()
=>
{
$axios
.
get
(
`/apaas/system/v5/org/user/
${
route
.
query
.
id
}
`
)
.
then
((
res
)
=>
{
if
(
res
.
data
.
code
==
200
)
{
const
detail
=
res
.
data
.
data
;
accountInfo
[
0
].
value
=
detail
.
contact_phone
;
accountInfo
[
1
].
value
=
detail
.
system_account
;
accountInfo
[
2
].
value
=
detail
.
system_role
&&
detail
.
system_role
.
length
>
0
?
detail
.
system_role
.
join
(
'
、
'
)
:
''
;
accountInfo
[
3
].
value
=
detail
.
organization
;
accountInfo
[
4
].
value
=
detail
.
created_by
;
accountInfo
[
5
].
value
=
detail
.
created_by_account
;
accountInfo
[
6
].
value
=
detail
.
updated_time
;
accountInfo
[
7
].
value
=
detail
.
created_time
;
personInfo
[
0
].
value
=
detail
.
contact_name
;
personInfo
[
1
].
value
=
detail
.
contact_email
;
personInfo
[
2
].
value
=
detail
.
document_type
===
1
?
'
身份证
'
:
''
;
personInfo
[
3
].
value
=
detail
.
document_number
;
personInfo
[
4
].
value
=
detail
.
remark
;
personInfo2
[
0
].
value
=
detail
.
contact_name
;
personInfo2
[
1
].
value
=
detail
.
contact_email
;
personInfo2
[
2
].
value
=
detail
.
remark
;
logo
.
value
=
detail
.
logo
;
accountType
.
value
=
detail
.
is_admin
;
}
else
{
$message
.
error
(
res
.
data
.
msg
)
}
})
}
onBeforeMount
(()
=>
{
onBeforeMount
(()
=>
{
if
(
route
.
query
.
id
)
{
getDetail
()
}
})
})
</
script
>
</
script
>
...
...
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