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
16648d7d
Commit
16648d7d
authored
Oct 25, 2022
by
何小勇
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
系统账号管理
parent
79c3a4a1
Changes
8
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
647 additions
and
220 deletions
+647
-220
src/assets/css/index.css
src/assets/css/index.css
+13
-0
src/bg-ui/bg-upload-image.vue
src/bg-ui/bg-upload-image.vue
+1
-1
src/bg-ui/index.scss
src/bg-ui/index.scss
+1
-0
src/page/main/develop/account/add/contact-form.vue
src/page/main/develop/account/add/contact-form.vue
+24
-12
src/page/main/develop/account/add/index.vue
src/page/main/develop/account/add/index.vue
+121
-49
src/page/main/develop/account/add/system-form.vue
src/page/main/develop/account/add/system-form.vue
+142
-41
src/page/main/develop/account/index.vue
src/page/main/develop/account/index.vue
+339
-117
vite.config.js
vite.config.js
+6
-0
No files found.
src/assets/css/index.css
View file @
16648d7d
...
@@ -1513,6 +1513,11 @@ border-radius:8px;
...
@@ -1513,6 +1513,11 @@ border-radius:8px;
font-weight
:
bold
;
font-weight
:
bold
;
margin-bottom
:
20px
;
margin-bottom
:
20px
;
}
}
.header_info
{
font-size
:
14px
;
color
:
#404a62
;
padding-left
:
20px
;
}
.name_btn
{
.name_btn
{
color
:
#3759be
;
color
:
#3759be
;
cursor
:
pointer
;
cursor
:
pointer
;
...
@@ -1527,3 +1532,11 @@ border-radius:8px;
...
@@ -1527,3 +1532,11 @@ border-radius:8px;
font-size
:
14px
;
font-size
:
14px
;
color
:
#404a62
;
color
:
#404a62
;
}
}
.icon_eye
{
font-size
:
12px
;
color
:
#a9b1c7
;
margin-right
:
8px
;
vertical-align
:
baseline
;
cursor
:
pointer
;
}
src/bg-ui/bg-upload-image.vue
View file @
16648d7d
...
@@ -59,7 +59,7 @@ export default {
...
@@ -59,7 +59,7 @@ export default {
},
},
action
:
{
action
:
{
type
:
String
,
type
:
String
,
default
:
"
/apaas/
static/imag
e/upload
"
,
default
:
"
/apaas/
common/fil
e/upload
"
,
},
},
autoUpload
:
{
autoUpload
:
{
type
:
Boolean
,
type
:
Boolean
,
...
...
src/bg-ui/index.scss
View file @
16648d7d
...
@@ -2045,6 +2045,7 @@ a {
...
@@ -2045,6 +2045,7 @@ a {
background-color
:
#2b4695
;
background-color
:
#2b4695
;
cursor
:
pointer
;
cursor
:
pointer
;
user-select
:
none
;
user-select
:
none
;
transition
:
all
.3s
;
>
.label
{
>
.label
{
font-size
:
12px
;
font-size
:
12px
;
...
...
src/page/main/develop/account/add/contact-form.vue
View file @
16648d7d
...
@@ -7,16 +7,16 @@
...
@@ -7,16 +7,16 @@
ref=
"contactRef"
ref=
"contactRef"
style=
"max-width: 66%"
style=
"max-width: 66%"
>
>
<el-form-item
label=
"联系人姓名"
prop=
"contact_
user
"
>
<el-form-item
label=
"联系人姓名"
prop=
"contact_
name
"
>
<el-input
v-model=
"contactForm.contact_
user
"
/>
<el-input
v-model=
"contactForm.contact_
name
"
/>
</el-form-item>
</el-form-item>
<el-form-item
label=
"联系人手机号"
prop=
"phone"
>
<el-form-item
label=
"联系人手机号"
prop=
"
contact_
phone"
>
<el-input
v-model=
"contactForm.phone"
/>
<el-input
v-model=
"contactForm.
contact_
phone"
/>
</el-form-item>
</el-form-item>
<el-form-item
label=
"联系人邮箱"
>
<el-form-item
label=
"联系人邮箱"
prop=
"contact_email"
>
<el-input
v-model=
"contactForm.email"
/>
<el-input
v-model=
"contactForm.
contact_
email"
/>
</el-form-item>
</el-form-item>
<el-form-item
label=
"备注"
>
<el-form-item
label=
"备注"
prop=
"remark"
>
<el-input
type=
"textarea"
:rows=
"3"
v-model=
"contactForm.remark"
/>
<el-input
type=
"textarea"
:rows=
"3"
v-model=
"contactForm.remark"
/>
</el-form-item>
</el-form-item>
</el-form>
</el-form>
...
@@ -26,18 +26,30 @@
...
@@ -26,18 +26,30 @@
import
{
reactive
,
ref
,
onMounted
}
from
'
vue
'
import
{
reactive
,
ref
,
onMounted
}
from
'
vue
'
const
contactForm
=
reactive
({
const
contactForm
=
reactive
({
contact_
user
:
''
,
contact_
name
:
''
,
phone
:
''
,
contact_
phone
:
''
,
email
:
''
,
contact_
email
:
''
,
remark
:
''
,
remark
:
''
,
})
})
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
contactFormRules
=
reactive
({
const
contactFormRules
=
reactive
({
contact_
user
:
[
contact_
name
:
[
{
required
:
true
,
message
:
'
请输入联系人姓名
'
,
trigger
:
'
blur
'
},
{
required
:
true
,
message
:
'
请输入联系人姓名
'
,
trigger
:
'
blur
'
},
],
],
phone
:
[
contact_
phone
:
[
{
required
:
true
,
message
:
'
请输入联系人手机号
'
,
trigger
:
'
blur
'
},
{
required
:
true
,
message
:
'
请输入联系人手机号
'
,
trigger
:
'
blur
'
},
{
validator
:
checkPhone
,
trigger
:
'
blur
'
},
],
],
})
})
const
contactRef
=
ref
(
null
)
const
contactRef
=
ref
(
null
)
...
...
src/page/main/develop/account/add/index.vue
View file @
16648d7d
...
@@ -4,7 +4,7 @@
...
@@ -4,7 +4,7 @@
<el-breadcrumb
separator=
"/"
>
<el-breadcrumb
separator=
"/"
>
<el-breadcrumb-item>
开发管理
</el-breadcrumb-item>
<el-breadcrumb-item>
开发管理
</el-breadcrumb-item>
<el-breadcrumb-item
:to=
"
{ path: '/develop/account' }"> 系统账号管理
</el-breadcrumb-item>
<el-breadcrumb-item
:to=
"
{ path: '/develop/account' }"> 系统账号管理
</el-breadcrumb-item>
<el-breadcrumb-item>
{{
route
.
query
.
type
===
"
0
"
?
'
新建
'
:
'
编辑
'
}}
</el-breadcrumb-item>
<el-breadcrumb-item>
{{
route
.
query
.
id
?
'
编辑
'
:
'
新建
'
}}
</el-breadcrumb-item>
</el-breadcrumb>
</el-breadcrumb>
</div>
</div>
<div
class=
"page_content flex_cloumn"
>
<div
class=
"page_content flex_cloumn"
>
...
@@ -44,14 +44,17 @@
...
@@ -44,14 +44,17 @@
</div>
</div>
<div
class=
"content_main"
>
<div
class=
"content_main"
>
<systemForm
v-show=
"step === 1"
ref=
"systemFormRef"
@
action=
"getSystemFormData"
></systemForm>
<systemForm
v-show=
"step === 1"
ref=
"systemFormRef"
:form-type=
"route.query.id ? true : false"
:id=
"route.query.id"
@
action=
"getSystemFormData"
></systemForm>
<contactForm
v-show=
"step === 2"
ref=
"contactFormRef"
@
action=
"getContactFormData"
></contactForm>
<contactForm
v-show=
"step === 2"
ref=
"contactFormRef"
@
action=
"getContactFormData"
></contactForm>
<div
class=
"process_end"
v-show=
"step === 3"
>
<div
class=
"process_end"
v-show=
"step === 3"
>
<div>
<div>
<div><img
src=
"@/assets/imgs/img_data-complete.png"
alt=
""
></div>
<div>
<div
class=
"font_bold"
>
业务系统新增成功
</div>
<img
v-if=
"successFlag"
src=
"@/assets/imgs/img_data-complete.png"
alt=
""
>
<img
v-else
src=
"@/assets/imgs/img_data-fail.png"
alt=
""
>
</div>
<div
class=
"font_bold"
>
{{route.query.id ? (successFlag ? '业务系统编辑成功' : '业务系统编辑失败') : (successFlag ? '业务系统新建成功' : '业务系统新建失败')}}
</div>
<el-button
@
click=
"cancel"
>
返回列表
</el-button>
<el-button
@
click=
"cancel"
>
返回列表
</el-button>
<el-button
type=
"primary"
@
click=
"continueCreate"
>
继续创建
</el-button>
<el-button
v-if=
"!route.query.id"
type=
"primary"
@
click=
"continueCreate"
>
继续创建
</el-button>
</div>
</div>
</div>
</div>
...
@@ -78,30 +81,35 @@
...
@@ -78,30 +81,35 @@
import
{
useRoute
,
useRouter
}
from
'
vue-router
'
;
import
{
useRoute
,
useRouter
}
from
'
vue-router
'
;
import
systemForm
from
'
./system-form.vue
'
;
import
systemForm
from
'
./system-form.vue
'
;
import
contactForm
from
'
./contact-form.vue
'
;
import
contactForm
from
'
./contact-form.vue
'
;
import
{
reactive
,
ref
,
onBeforeMount
,
toRefs
,
computed
,
onBeforeUnmount
,
onMounted
}
from
'
vue
'
;
import
{
reactive
,
ref
,
onBeforeMount
,
toRefs
,
computed
,
onBeforeUnmount
,
onMounted
,
getCurrentInstance
}
from
'
vue
'
;
import
CryptoJS
from
"
crypto-js
"
;
const
{
proxy
}
=
getCurrentInstance
()
const
{
$axios
,
$message
}
=
proxy
const
route
=
useRoute
();
const
route
=
useRoute
();
const
router
=
useRouter
();
const
router
=
useRouter
();
const
step
=
ref
(
1
);
const
step
=
ref
(
1
);
const
systemFormRef
=
ref
(
null
);
const
systemFormRef
=
ref
(
null
);
const
contactFormRef
=
ref
(
null
);
const
contactFormRef
=
ref
(
null
);
const
formData
=
reactive
({
const
formData
=
reactive
({
org
:
''
,
org
anization_id
:
''
,
code
:
''
,
business_
code
:
''
,
name
:
''
,
business_
name
:
''
,
desc
:
''
,
business_
desc
:
''
,
logo
:
''
,
logo
:
''
,
role
:
''
,
system_role_id
:
''
,
account
:
''
,
system_
account
:
''
,
password
:
''
,
password
:
''
,
url
:
''
,
confirm_password
:
''
,
firm_name
:
''
,
access_address
:
''
,
is_use
:
''
,
develop_id
:
''
,
contact_user
:
''
,
state
:
1
,
phone
:
''
,
email
:
''
,
contact_name
:
''
,
contact_phone
:
''
,
contact_email
:
''
,
remark
:
''
,
remark
:
''
,
});
//业务系统表单+联系人表单
});
//业务系统表单+联系人表单
const
successFlag
=
ref
(
false
)
// 下一步
// 下一步
const
nextStep
=
()
=>
{
const
nextStep
=
()
=>
{
...
@@ -118,10 +126,62 @@ const getSystemFormData = (data) => {
...
@@ -118,10 +126,62 @@ const getSystemFormData = (data) => {
}
}
//联系人表单检验触发事件 data为null 校验失败
//联系人表单检验触发事件 data为null 校验失败
const
getContactFormData
=
(
data
)
=>
{
const
getContactFormData
=
(
data
)
=>
{
if
(
data
)
{
if
(
data
)
{
formData
.
value
=
Object
.
assign
(
formData
,
data
);
formData
.
value
=
Object
.
assign
(
formData
,
data
);
console
.
log
(
formData
);
if
(
route
.
query
.
id
)
{
console
.
log
(
formData
)
let
params
=
{
id
:
parseInt
(
route
.
query
.
id
),
business_name
:
formData
.
value
.
business_name
,
system_account
:
formData
.
value
.
system_account
,
contact_email
:
formData
.
value
.
contact_email
,
contact_phone
:
formData
.
value
.
contact_phone
,
contact_name
:
formData
.
value
.
contact_name
,
logo
:
formData
.
value
.
logo
&&
formData
.
value
.
logo
.
length
>
0
?
formData
.
value
.
logo
[
0
].
url
:
''
,
state
:
formData
.
value
.
state
,
business_desc
:
formData
.
value
.
business_desc
,
develop_id
:
formData
.
value
.
develop_id
,
access_address
:
formData
.
value
.
access_address
,
remark
:
formData
.
value
.
remark
}
$axios
.
post
(
`/apaas/system/v5/user/update`
,
params
)
.
then
((
res
)
=>
{
if
(
res
.
data
.
code
==
200
)
{
successFlag
.
value
=
true
;
step
.
value
=
3
;
step
.
value
=
3
;
}
else
{
$message
.
error
(
res
.
data
.
msg
)
}
})
}
else
{
let
params
=
{
organization_id
:
formData
.
value
.
organization_id
,
system_role_id
:
"
ab98a936-9046-455b-aba3-4c73671024d0
"
,
logo
:
formData
.
value
.
logo
&&
formData
.
value
.
logo
.
length
>
0
?
formData
.
value
.
logo
[
0
].
url
:
''
,
password
:
CryptoJS
.
AES
.
encrypt
(
formData
.
value
.
password
,
"
swuE9cmCZQwrkYRV
"
).
toString
(),
business_code
:
formData
.
value
.
business_code
,
business_name
:
formData
.
value
.
business_name
,
business_desc
:
formData
.
value
.
business_desc
,
system_account
:
formData
.
value
.
system_account
,
access_address
:
formData
.
value
.
access_address
,
develop_id
:
formData
.
value
.
develop_id
,
state
:
formData
.
value
.
state
,
contact_name
:
formData
.
value
.
contact_name
,
contact_phone
:
formData
.
value
.
contact_phone
,
contact_email
:
formData
.
value
.
contact_email
,
remark
:
formData
.
value
.
remark
,
}
$axios
.
put
(
`/apaas/system/v5/user/create`
,
params
)
.
then
((
res
)
=>
{
if
(
res
.
data
.
code
==
200
)
{
successFlag
.
value
=
true
;
step
.
value
=
3
;
}
else
{
$message
.
error
(
res
.
data
.
msg
)
}
})
}
}
}
}
}
//上一步
//上一步
...
@@ -137,42 +197,54 @@ const continueCreate = () => {
...
@@ -137,42 +197,54 @@ const continueCreate = () => {
systemFormRef
.
value
.
clearForm
();
systemFormRef
.
value
.
clearForm
();
contactFormRef
.
value
.
clearForm
();
contactFormRef
.
value
.
clearForm
();
step
.
value
=
1
;
step
.
value
=
1
;
successFlag
=
false
;
}
}
//取消
//取消
const
cancel
=
()
=>
{
const
cancel
=
()
=>
{
router
.
go
(
-
1
);
router
.
go
(
-
1
);
}
}
onBeforeUnmount
(()
=>
{
const
getDetail
=
()
=>
{
$axios
.
get
(
`/apaas/system/v5/user/detail/
${
route
.
query
.
id
}
`
)
})
.
then
((
res
)
=>
{
onMounted
(()
=>
{
if
(
res
.
data
.
code
==
200
)
{
if
(
route
.
query
.
type
===
"
1
"
)
{
const
form
=
res
.
data
.
data
;
setTimeout
(()
=>
{
systemFormRef
.
value
.
setForm
({
systemFormRef
.
value
.
setForm
({
org
:
'
a
'
,
organization_id
:
form
.
organization_id
,
code
:
'
b
'
,
system_role_id
:
form
.
system_role_id
,
name
:
'
b
'
,
logo
:
[{
url
:
form
.
logo
}]
,
desc
:
'
b
'
,
business_code
:
form
.
business_code
,
logo
:
[
'
b
'
]
,
business_name
:
form
.
business_name
,
role
:
'
b
'
,
business_desc
:
form
.
business_desc
,
account
:
'
b
'
,
system_account
:
form
.
system_account
,
password
:
'
b
'
,
access_address
:
form
.
access_address
,
confirm_password
:
'
b
'
,
develop_id
:
form
.
develop_id
,
url
:
'
b
'
,
state
:
form
.
state
,
firm_name
:
'
b
'
,
appid
:
form
.
app_id
,
is_use
:
'
b
'
,
appsecret
:
form
.
app_secret
})
})
contactFormRef
.
value
.
setForm
({
contactFormRef
.
value
.
setForm
({
contact_
user
:
'
c
'
,
contact_
name
:
form
.
contact_name
,
phone
:
'
c
'
,
contact_phone
:
form
.
contact_phone
,
email
:
'
c
'
,
contact_email
:
form
.
contact_email
,
remark
:
'
c
'
,
remark
:
form
.
remark
,
})
})
},
500
)
}
else
{
$message
.
error
(
res
.
data
.
msg
)
}
}
})
})
}
onBeforeUnmount
(()
=>
{
})
onMounted
(()
=>
{
if
(
route
.
query
.
id
)
{
getDetail
()
}
})
</
script
>
</
script
>
...
...
src/page/main/develop/account/add/system-form.vue
View file @
16648d7d
...
@@ -7,63 +7,94 @@
...
@@ -7,63 +7,94 @@
ref=
"systemRef"
ref=
"systemRef"
style=
"max-width: 66%"
style=
"max-width: 66%"
>
>
<el-form-item
label=
"所属机构"
prop=
"org"
>
<el-form-item
label=
"所属机构"
prop=
"org
anization_id
"
>
<el-
input
v-model=
"systemForm.org"
/>
<el-
tree-select
v-model=
"systemForm.organization_id"
:data=
"orgData"
:props=
"treeProps"
:render-after-expand=
"false"
:disabled=
"formType"
style=
"width: 100%;"
/>
</el-form-item>
</el-form-item>
<el-form-item
label=
"业务系统编码"
prop=
"code"
>
<el-form-item
label=
"业务系统编码"
prop=
"
business_
code"
>
<el-input
v-model=
"systemForm.
code"
/>
<el-input
v-model=
"systemForm.
business_code"
:disabled=
"formType"
/>
</el-form-item>
</el-form-item>
<el-form-item
label=
"业务系统名称"
prop=
"name"
>
<el-form-item
label=
"业务系统名称"
prop=
"business_name"
>
<el-input
v-model=
"systemForm.name"
/>
<el-input
v-model=
"systemForm.business_name"
/>
</el-form-item>
<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-form-item>
<el-form-item
label=
"AppSecret"
prop=
"appsecret"
v-if=
"formType"
>
<el-input
v-model=
"systemForm.appsecret"
:disabled=
"formType"
style=
"width: 80%;"
/>
<span
class=
"pl-1"
><el-button
type=
"primary"
@
click=
"copyText(systemForm.appsecret)"
>
复制
</el-button></span>
<span
class=
"pl-1"
><el-button
type=
"primary"
>
重置
</el-button></span>
</el-form-item>
</el-form-item>
<el-form-item
label=
"系统LOGO"
prop=
"logo"
>
<el-form-item
label=
"系统LOGO"
prop=
"logo"
>
<bg-upload-image
v-model=
"systemForm.logo"
:showTips=
"true"
:limit=
"1"
:fileSize=
"500"
:fileSizeUnit=
"'KB'"
listType=
"picture-card"
:accept=
"['.jpg','.jpeg','.png']"
customTips=
"请选择图片上传:大小120 * 120像素支持jpg、png等格式,图片需小于500KB"
></bg-upload-image>
<bg-upload-image
v-model=
"systemForm.logo"
:showTips=
"true"
:limit=
"1"
:fileSize=
"500"
:fileSizeUnit=
"'KB'"
listType=
"picture-card"
:accept=
"['.jpg','.jpeg','.png']"
customTips=
"请选择图片上传:大小120 * 120像素支持jpg、png等格式,图片需小于500KB"
></bg-upload-image>
</el-form-item>
</el-form-item>
<el-form-item
label=
"业务系统概述"
prop=
"desc"
>
<el-form-item
label=
"业务系统概述"
prop=
"
business_
desc"
>
<el-input
type=
"textarea"
:rows=
"3"
v-model=
"systemForm.desc"
/>
<el-input
type=
"textarea"
:rows=
"3"
v-model=
"systemForm.
business_
desc"
/>
</el-form-item>
</el-form-item>
<el-form-item
label=
"角色"
prop=
"
rol
e"
>
<el-form-item
label=
"角色"
prop=
"
system_role_id"
v-if=
"!formTyp
e"
>
<el-input
v-model=
"systemForm.
role
"
/>
<el-input
v-model=
"systemForm.
system_role_id
"
/>
</el-form-item>
</el-form-item>
<el-form-item
label=
"账号"
prop=
"account"
>
<el-form-item
label=
"账号"
prop=
"
system_
account"
>
<el-input
v-model=
"systemForm.account"
/>
<el-input
v-model=
"systemForm.
system_
account"
/>
</el-form-item>
</el-form-item>
<el-form-item
label=
"密码"
prop=
"password"
>
<el-form-item
label=
"密码"
prop=
"password"
v-if=
"!formType"
>
<el-input
type=
"password"
v-model=
"systemForm.password"
/>
<el-input
:type=
"password_eye ? 'text' : 'password'"
v-model=
"systemForm.password"
>
<template
#suffix
>
<bg-icon
@
click=
"password_eye = !password_eye"
class=
"icon_eye"
icon=
"#bg-ic-eye"
></bg-icon>
</
template
>
</el-input>
</el-form-item>
</el-form-item>
<el-form-item
label=
"确认密码"
prop=
"confirm_password"
>
<el-form-item
label=
"确认密码"
prop=
"confirm_password"
v-if=
"!formType"
>
<el-input
type=
"password"
v-model=
"systemForm.confirm_password"
/>
<el-input
:type=
"confirm_eye ? 'text' : 'password'"
v-model=
"systemForm.confirm_password"
>
<
template
#suffix
>
<bg-icon
@
click=
"confirm_eye = !confirm_eye"
class=
"icon_eye"
icon=
"#bg-ic-eye"
></bg-icon>
</
template
>
</el-input>
</el-form-item>
</el-form-item>
<el-form-item
label=
"访问地址"
prop=
"
url
"
>
<el-form-item
label=
"访问地址"
prop=
"
access_address
"
>
<el-input
v-model=
"systemForm.
url
"
/>
<el-input
v-model=
"systemForm.
access_address
"
/>
</el-form-item>
</el-form-item>
<el-form-item
label=
"开发厂商名称"
prop=
"
firm_name
"
>
<el-form-item
label=
"开发厂商名称"
prop=
"
develop_id
"
>
<el-input
v-model=
"systemForm.
firm_name
"
/>
<el-input
v-model=
"systemForm.
develop_id
"
/>
</el-form-item>
</el-form-item>
<el-form-item
label=
"是否启用"
prop=
"
is_us
e"
>
<el-form-item
label=
"是否启用"
prop=
"
stat
e"
>
<bg-switch
:labels=
"['否','是']"
:values=
"[0,1]"
v-model=
"systemForm.
is_us
e"
></bg-switch>
<bg-switch
:labels=
"['否','是']"
:values=
"[0,1]"
v-model=
"systemForm.
stat
e"
></bg-switch>
</el-form-item>
</el-form-item>
</el-form>
</el-form>
</template>
</template>
<
script
setup
>
<
script
setup
>
import
{
reactive
,
ref
,
onMounted
}
from
'
vue
'
import
{
reactive
,
ref
,
onBeforeMount
,
onMounted
,
getCurrentInstance
,
computed
}
from
'
vue
'
const
{
proxy
}
=
getCurrentInstance
()
const
{
$axios
,
$message
}
=
proxy
const
props
=
defineProps
({
formType
:
{
type
:
Boolean
,
default
:
false
,
//false 新建 true 编辑
},
id
:
{
type
:
String
,
default
:
''
,
}
});
const
systemForm
=
reactive
({
const
systemForm
=
reactive
({
org
:
''
,
org
anization_id
:
''
,
code
:
''
,
business_
code
:
''
,
name
:
''
,
business_
name
:
''
,
desc
:
''
,
business_
desc
:
''
,
logo
:
''
,
logo
:
[]
,
role
:
''
,
system_role_id
:
''
,
account
:
''
,
system_
account
:
''
,
password
:
''
,
password
:
''
,
confirm_password
:
''
,
confirm_password
:
''
,
url
:
''
,
access_address
:
''
,
firm_name
:
''
,
develop_id
:
''
,
is_use
:
1
,
state
:
1
,
appid
:
''
,
appsecret
:
''
})
})
const
password_eye
=
ref
(
false
)
const
confirm_eye
=
ref
(
false
);
const
validatePass
=
(
rule
,
value
,
callback
)
=>
{
const
validatePass
=
(
rule
,
value
,
callback
)
=>
{
if
(
value
!==
systemForm
.
password
)
{
if
(
value
!==
systemForm
.
password
)
{
...
@@ -72,22 +103,60 @@ const validatePass = (rule, value, callback) => {
...
@@ -72,22 +103,60 @@ const validatePass = (rule, value, callback) => {
callback
()
callback
()
}
}
}
}
const
validateBusinessName
=
(
rule
,
value
,
callback
)
=>
{
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
}
}
$axios
.
post
(
`/apaas/system/v5/user/check/business`
,
params
)
.
then
((
res
)
=>
{
if
(
res
.
data
.
code
==
200
)
{
callback
()
}
else
{
callback
(
new
Error
(
res
.
data
.
data
))
}
})
}
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
formRules
=
reactive
({
const
formRules
=
reactive
({
org
:
[
org
anization_id
:
[
{
required
:
true
,
message
:
'
请选择组织机构
'
,
trigger
:
'
blur
'
},
{
required
:
true
,
message
:
'
请选择组织机构
'
,
trigger
:
'
blur
'
},
],
],
name
:
[
business_
name
:
[
{
required
:
true
,
message
:
'
请输入业务系统名称
'
,
trigger
:
'
blur
'
},
{
required
:
true
,
message
:
'
请输入业务系统名称
'
,
trigger
:
'
blur
'
},
{
validator
:
validateBusinessName
,
trigger
:
'
blur
'
},
],
],
role
:
[
system_role_id
:
[
{
required
:
true
,
message
:
'
请选择角色
'
,
trigger
:
'
blur
'
},
{
required
:
true
,
message
:
'
请选择角色
'
,
trigger
:
'
blur
'
},
],
],
account
:
[
system_
account
:
[
{
required
:
true
,
message
:
'
请输入账号
'
,
trigger
:
'
blur
'
},
{
required
:
true
,
message
:
'
请输入账号
'
,
trigger
:
'
blur
'
},
{
validator
:
validateSystemAccount
,
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
'
},
...
@@ -120,6 +189,38 @@ const setForm = (data) => {
...
@@ -120,6 +189,38 @@ const setForm = (data) => {
systemForm
.
value
=
Object
.
assign
(
systemForm
,
data
);
systemForm
.
value
=
Object
.
assign
(
systemForm
,
data
);
}
}
const
orgData
=
ref
([])
const
treeProps
=
{
label
:
'
name
'
,
children
:
'
Child
'
,
value
:
'
organization_id
'
}
const
getOrgTree
=
()
=>
{
$axios
.
get
(
`/apaas/system/v5/org/tree`
)
.
then
((
res
)
=>
{
if
(
res
.
data
.
code
==
200
)
{
orgData
.
value
=
res
.
data
.
data
||
[];
}
else
{
$message
.
error
(
res
.
data
.
msg
)
}
})
}
const
copyText
=
(
data
)
=>
{
navigator
.
clipboard
.
writeText
(
data
).
then
(
function
()
{
},
function
()
{
}
);
}
onBeforeMount
(()
=>
{
getOrgTree
()
})
onMounted
(()
=>
{
onMounted
(()
=>
{
})
})
...
...
src/page/main/develop/account/index.vue
View file @
16648d7d
...
@@ -20,7 +20,7 @@
...
@@ -20,7 +20,7 @@
/>
/>
</div>
</div>
<div
class=
"tree"
>
<div
class=
"tree"
>
<el-tree
:data=
"
d
ata"
:props=
"defaultProps"
@
node-click=
"handleNodeClick"
:default-expand-all=
"true"
>
<el-tree
:data=
"
orgD
ata"
:props=
"defaultProps"
@
node-click=
"handleNodeClick"
: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,11 +36,26 @@
...
@@ -36,11 +36,26 @@
</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=
"请输入关键字"
>
<
template
v-slot:left_action
>
<div
class=
"apaas_button"
>
<div
class=
"apaas_button"
>
<el-button
type=
"primary"
@
click=
"addAccount(0)"
>
新建
</el-button><el-button
@
click=
"addAccount(1)"
>
编辑
</el-button>
<el-button
class=
"register_btn"
type=
"primary"
@
click=
"addAccount"
>
<bg-icon
style=
"font-size: 12px; color: #fff; margin-right: 8px"
icon=
"#bg-ic-add"
></bg-icon>
新建
</el-button>
<el-button
class=
"register_btn"
@
click=
"deleteBatch"
>
批量删除
</el-button>
<el-button
class=
"register_btn"
@
click=
"resetPsd"
>
重置密码
</el-button>
<span
class=
"header_info"
>
已选择
<span
style=
"color: #202531;font-weight: bold"
>
{{
selected
.
length
}}
</span>
项
</span>
<span
class=
"header_info name_btn"
@
click=
"clearSelected"
>
清空
</span>
</div>
</div>
</
template
>
</bg-filter-group>
<div
class=
"table_container apaas_scroll"
>
<div
class=
"table_container apaas_scroll"
>
<bg-table
ref=
"
bgTable"
:headers=
"headers"
:rows=
"tableRows"
:isIndex=
"true"
:stripe=
"true
"
>
<bg-table
ref=
"
dataTable"
:headers=
"headers"
:rows=
"tableRows"
:isIndex=
"true"
:stripe=
"true"
:select=
"true"
@
selectAc=
"selectRows
"
>
<
template
v-slot:business_name=
"{ row }"
>
<
template
v-slot:business_name=
"{ row }"
>
<span
@
click=
"goDetail(row)"
class=
"name_btn"
>
<span
@
click=
"goDetail(row)"
class=
"name_btn"
>
{{
row
.
business_name
}}
{{
row
.
business_name
}}
...
@@ -50,22 +65,22 @@
...
@@ -50,22 +65,22 @@
<bg-switch
@
click=
"stateChange(row)"
:labels=
"['否','是']"
:values=
"[0,1]"
v-model=
"row.state"
></bg-switch>
<bg-switch
@
click=
"stateChange(row)"
:labels=
"['否','是']"
:values=
"[0,1]"
v-model=
"row.state"
></bg-switch>
</
template
>
</
template
>
<
template
v-slot:action=
"{ row }"
>
<
template
v-slot:action=
"{ row }"
>
<bg-table-btn
class=
"btn"
>
<bg-table-btn
class=
"btn"
@
click=
"editAccount(row.id)"
>
编辑
编辑
</bg-table-btn>
</bg-table-btn>
<bg-table-btn
class=
"btn"
>
<bg-table-btn
class=
"btn"
@
click=
"editPsdAccount(row)"
>
修改密码
修改密码
</bg-table-btn>
</bg-table-btn>
<bg-table-btn
class=
"btn"
>
<bg-table-btn
class=
"btn"
@
click=
"deleteAccount(row)"
>
删除
删除
</bg-table-btn>
</bg-table-btn>
</
template
>
</
template
>
</bg-table>
</bg-table>
<div
class=
"pagination_box"
>
<div
class=
"pagination_box"
>
<bg-pagination
<bg-pagination
:page=
"
1
"
:page=
"
filter.page
"
:size=
"
10
"
:size=
"
filter.limit
"
:total=
"
100
"
:total=
"
tableTotal
"
@
change-page=
"changePage"
@
change-page=
"changePage"
@
change-size=
"changeSize"
@
change-size=
"changeSize"
>
>
...
@@ -77,6 +92,104 @@
...
@@ -77,6 +92,104 @@
</div>
</div>
</div>
</div>
</div>
</div>
<el-dialog
v-model=
"deleteFlag"
title=
"删除"
width=
"520px"
:before-close=
"handleCloseDelete"
>
<div
class=
"warning_info"
>
<bg-icon
style=
"font-size: 12px; color: #a9b1c7; margin-right: 8px;vertical-align: baseline;"
icon=
"#bg-ic-circle-tips"
></bg-icon>
您正在对
<span
class=
"danger_info"
>
{{selectedName.join('、')}}
</span>
做删除操作。
</div>
<
template
#footer
>
<span
class=
"dialog-footer"
>
<el-button
@
click=
"handleCloseDelete"
>
取消
</el-button>
<el-button
type=
"primary"
@
click=
"deleteConfirm"
>
确定
</el-button>
</span>
</
template
>
</el-dialog>
<el-dialog
v-model=
"deleteRowFlag"
title=
"删除"
width=
"520px"
:before-close=
"handleCloseRowDelete"
>
<div
class=
"warning_info"
>
<bg-icon
style=
"font-size: 12px; color: #a9b1c7; margin-right: 8px;vertical-align: baseline;"
icon=
"#bg-ic-circle-tips"
></bg-icon>
您正在对
<span
class=
"danger_info"
>
{{selectedRow.business_name}}
</span>
做删除操作。
</div>
<
template
#footer
>
<span
class=
"dialog-footer"
>
<el-button
@
click=
"handleCloseRowDelete"
>
取消
</el-button>
<el-button
type=
"primary"
@
click=
"deleteRowConfirm"
>
确定
</el-button>
</span>
</
template
>
</el-dialog>
<el-dialog
v-model=
"resetFlag"
title=
"重置密码"
width=
"520px"
:before-close=
"handleCloseReset"
>
<div
class=
"warning_info"
>
<bg-icon
style=
"font-size: 12px; color: #a9b1c7; margin-right: 8px;vertical-align: baseline;"
icon=
"#bg-ic-circle-tips"
></bg-icon>
您正在对
<span
class=
"danger_info"
>
{{selectedName.join('、')}}
</span>
做重置密码操作。
</div>
<div>
重置密码为123456,是否继续?
</div>
<
template
#footer
>
<span
class=
"dialog-footer"
>
<el-button
@
click=
"handleCloseReset"
>
取消
</el-button>
<el-button
type=
"primary"
@
click=
"resetConfirm"
>
确定
</el-button>
</span>
</
template
>
</el-dialog>
<el-dialog
v-model=
"editFlag"
title=
"修改密码"
width=
"520px"
:before-close=
"handleCloseEdit"
>
<div
class=
"warning_info"
>
<bg-icon
style=
"font-size: 12px; color: #a9b1c7; margin-right: 8px;vertical-align: baseline;"
icon=
"#bg-ic-circle-tips"
></bg-icon>
您正在对
<span
class=
"danger_info"
>
{{selectedRow.business_name}}
</span>
做修改密码操作,修改后旧密码将无法登录。
</div>
<div>
<el-form
:label-position=
"'right'"
label-width=
"120px"
:model=
"passwordForm"
:rules=
"passwordFormRules"
ref=
"passwordRef"
style=
"max-width: 80%"
>
<el-form-item
label=
"新密码"
prop=
"password"
>
<el-input
v-model=
"passwordForm.password"
:type=
"password_eye ? 'text' : 'password'"
placeholder=
"请输入密码"
>
<
template
#suffix
>
<bg-icon
@
click=
"password_eye = !password_eye"
class=
"icon_eye"
icon=
"#bg-ic-eye"
></bg-icon>
</
template
>
</el-input>
</el-form-item>
<el-form-item
label=
"确认新密码"
prop=
"confirm_password"
>
<el-input
v-model=
"passwordForm.confirm_password"
:type=
"confirm_eye ? 'text' : 'password'"
placeholder=
"请确认新密码"
>
<
template
#suffix
>
<bg-icon
@
click=
"confirm_eye = !confirm_eye"
class=
"icon_eye"
icon=
"#bg-ic-eye"
></bg-icon>
</
template
>
</el-input>
</el-form-item>
</el-form>
</div>
<
template
#footer
>
<span
class=
"dialog-footer"
>
<el-button
@
click=
"handleCloseEdit"
>
取消
</el-button>
<el-button
type=
"primary"
@
click=
"editConfirm"
>
确定
</el-button>
</span>
</
template
>
</el-dialog>
</div>
</div>
</template>
</template>
...
@@ -86,9 +199,13 @@ import { reactive, toRefs, ref, } from '@vue/reactivity'
...
@@ -86,9 +199,13 @@ 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
{
useRouter
}
from
'
vue-router
'
;
import
{
useRouter
}
from
'
vue-router
'
;
const
{
proxy
}
=
getCurrentInstance
()
import
{
edit
}
from
'
ace-builds
'
;
const
{
$axios
,
$message
}
=
proxy
import
CryptoJS
from
"
crypto-js
"
;
const
{
proxy
}
=
getCurrentInstance
()
const
{
$axios
,
$message
}
=
proxy
const
dataTable
=
ref
(
null
);
const
headers
=
ref
([
const
headers
=
ref
([
{
{
label
:
"
业务系统编码
"
,
label
:
"
业务系统编码
"
,
...
@@ -130,18 +247,49 @@ const { $axios,$message } = proxy
...
@@ -130,18 +247,49 @@ const { $axios,$message } = proxy
const
tableRows
=
ref
([])
const
tableRows
=
ref
([])
const
search
=
ref
(
""
);
const
search
=
ref
(
""
);
const
filter
=
reactive
({
const
filter
=
reactive
({
keyword
:
""
,
search
:
""
,
page
:
1
,
page
:
1
,
size
:
10
,
limit
:
10
,
});
});
const
tableTotal
=
ref
(
0
);
const
tableTotal
=
ref
(
0
);
const
deleteFlag
=
ref
(
false
)
const
deleteRowFlag
=
ref
(
false
)
const
resetFlag
=
ref
(
false
)
const
selectedRow
=
ref
({})
const
selected
=
ref
([])
const
selectedName
=
ref
([])
const
editFlag
=
ref
(
false
)
const
password_eye
=
ref
(
false
)
const
confirm_eye
=
ref
(
false
)
const
passwordRef
=
ref
(
null
)
const
passwordForm
=
reactive
({
password
:
''
,
confirm_password
:
''
,
})
const
validatePass
=
(
rule
,
value
,
callback
)
=>
{
if
(
value
!==
passwordForm
.
password
)
{
callback
(
new
Error
(
"
密码输入不一致
"
))
}
else
{
callback
()
}
}
const
passwordFormRules
=
reactive
({
password
:
[
{
required
:
true
,
message
:
'
请输入密码
'
,
trigger
:
'
blur
'
},
],
confirm_password
:
[
{
required
:
true
,
message
:
'
请确认密码
'
,
trigger
:
'
blur
'
},
{
validator
:
validatePass
,
trigger
:
'
blur
'
}
],
})
const
router
=
useRouter
();
const
router
=
useRouter
();
const
getTableRows
=
()
=>
{
const
getTableRows
=
()
=>
{
let
params
=
{...
filter
.
value
}
let
params
=
{...
filter
}
$axios
$axios
.
get
(
.
get
(
`/apaas/system/v5/user/list`
,
`/apaas/system/v5/user/list`
,
{
{
params
,
params
,
...
@@ -160,9 +308,6 @@ const { $axios,$message } = proxy
...
@@ -160,9 +308,6 @@ const { $axios,$message } = proxy
const
addAccount
=
(
params
)
=>
{
const
addAccount
=
(
params
)
=>
{
router
.
push
({
router
.
push
({
path
:
"
/develop/account/add
"
,
path
:
"
/develop/account/add
"
,
query
:
{
type
:
params
}
})
})
}
}
...
@@ -170,101 +315,28 @@ const { $axios,$message } = proxy
...
@@ -170,101 +315,28 @@ const { $axios,$message } = proxy
console
.
log
(
data
)
console
.
log
(
data
)
}
}
const
data
=
[
const
orgData
=
ref
([])
{
const
defaultProps
=
{
label
:
'
湖北省
'
,
label
:
'
name
'
,
children
:
[
children
:
'
Child
'
,
{
value
:
'
organization_id
'
label
:
'
武汉市
'
,
children
:
[
{
label
:
'
公安厅公安厅公安厅公安厅公安厅公安厅公安厅公安厅公安厅公安厅公安厅公安厅公安厅公安厅公安厅
'
,
},
{
label
:
'
应急厅
'
,
},
{
label
:
'
水利厅
'
,
},
],
},
{
label
:
'
荆州市
'
,
children
:
[
{
label
:
'
公安局
'
,
},
{
label
:
'
应急管理局
'
,
},
],
}
}
],
},
{
label
:
'
四川省
'
,
children
:
[
{
label
:
'
成都市
'
,
children
:
[
{
label
:
'
天府新区
'
,
},
],
},
],
},
{
label
:
'
比格大数据
'
,
children
:
[
{
label
:
'
武汉研发中心
'
,
children
:
[
{
label
:
'
研发部
'
,
},
],
},
{
label
:
'
西南大区
'
,
children
:
[
{
label
:
'
事业部
'
,
},
{
label
:
'
事业部
'
,
},
{
label
:
'
事业部
'
,
},
{
label
:
'
事业部
'
,
},
{
label
:
'
事业部
'
,
},
{
label
:
'
事业部
'
,
},
{
label
:
'
事业部
'
,
},
],
},
],
},
]
const
defaultProps
=
{
const
getOrgTree
=
()
=>
{
children
:
'
children
'
,
$axios
.
get
(
`/apaas/system/v5/org/tree`
)
label
:
'
label
'
,
.
then
((
res
)
=>
{
if
(
res
.
data
.
code
==
200
)
{
orgData
.
value
=
res
.
data
.
data
||
[];
}
else
{
$message
.
error
(
res
.
data
.
msg
)
}
})
}
}
const
stateChange
=
(
row
)
=>
{
const
stateChange
=
(
row
)
=>
{
const
state
=
row
.
state
.
toString
();
const
state
=
row
.
state
.
toString
();
$axios
$axios
.
post
(
.
post
(
`/apaas/system/v5/user/state/
${
row
.
id
}
/
${
state
}
`
,
`/apaas/system/v5/user/state/
${
row
.
organization_id
}
/
${
state
}
`
,
)
)
.
then
((
res
)
=>
{
.
then
((
res
)
=>
{
if
(
res
.
data
.
code
==
200
)
{
if
(
res
.
data
.
code
==
200
)
{
...
@@ -276,11 +348,14 @@ const { $axios,$message } = proxy
...
@@ -276,11 +348,14 @@ const { $axios,$message } = proxy
}
}
const
changeSize
=
(
size
)
=>
{
const
changeSize
=
(
size
)
=>
{
filter
.
limit
=
size
;
filter
.
page
=
1
;
getTableRows
()
}
}
const
changePage
=
(
size
)
=>
{
const
changePage
=
(
page
)
=>
{
filter
.
page
=
page
;
getTableRows
()
}
}
const
goDetail
=
(
params
)
=>
{
const
goDetail
=
(
params
)
=>
{
...
@@ -292,9 +367,144 @@ const { $axios,$message } = proxy
...
@@ -292,9 +367,144 @@ const { $axios,$message } = proxy
})
})
}
}
const
editAccount
=
(
id
)
=>
{
router
.
push
({
path
:
"
/develop/account/add
"
,
query
:
{
id
:
id
}
})
}
const
deleteAccount
=
(
data
)
=>
{
selectedRow
.
value
=
data
;
deleteRowFlag
.
value
=
true
;
}
const
handleCloseDelete
=
()
=>
{
deleteFlag
.
value
=
false
;
}
const
handleCloseRowDelete
=
()
=>
{
deleteRowFlag
.
value
=
false
;
}
const
deleteConfirm
=
()
=>
{
const
ids
=
selected
.
value
.
map
(
item
=>
item
.
id
)
$axios
.
delete
(
`/apaas/system/v5/user/delete`
,{
data
:
{
ids
:
ids
}}
)
.
then
((
res
)
=>
{
if
(
res
.
data
.
code
==
200
)
{
$message
.
success
(
res
.
data
.
msg
)
getTableRows
()
}
else
{
$message
.
error
(
res
.
data
.
msg
)
}
handleCloseDelete
();
})
}
const
deleteRowConfirm
=
()
=>
{
$axios
.
delete
(
`/apaas/system/v5/user/delete`
,{
data
:
{
ids
:
[
selectedRow
.
value
.
id
]}}
)
.
then
((
res
)
=>
{
if
(
res
.
data
.
code
==
200
)
{
$message
.
success
(
res
.
data
.
msg
)
getTableRows
()
}
else
{
$message
.
error
(
res
.
data
.
msg
)
}
handleCloseRowDelete
();
})
}
const
deleteBatch
=
()
=>
{
if
(
selectedName
.
value
.
length
>
0
){
deleteFlag
.
value
=
true
;
}
else
{
$message
.
error
(
'
请先选择需要操作的数据!
'
)
}
}
const
handleCloseReset
=
()
=>
{
resetFlag
.
value
=
false
;
}
const
resetPsd
=
()
=>
{
if
(
selectedName
.
value
.
length
>
0
){
resetFlag
.
value
=
true
;
}
else
{
$message
.
error
(
'
请先选择需要操作的数据!
'
)
}
}
const
resetConfirm
=
()
=>
{
const
ids
=
selected
.
value
.
map
(
item
=>
item
.
id
)
$axios
.
post
(
`/apaas/system/v5/user/resetpwd`
,{
ids
:
ids
}
)
.
then
((
res
)
=>
{
if
(
res
.
data
.
code
==
200
)
{
$message
.
success
(
res
.
data
.
msg
)
getTableRows
()
}
else
{
$message
.
error
(
res
.
data
.
msg
)
}
handleCloseReset
();
})
}
const
editPsdAccount
=
(
data
)
=>
{
selectedRow
.
value
=
data
;
editFlag
.
value
=
true
;
}
const
handleCloseEdit
=
()
=>
{
if
(
!
passwordRef
)
return
passwordRef
.
value
.
resetFields
()
editFlag
.
value
=
false
;
}
const
editConfirm
=
()
=>
{
if
(
!
passwordRef
)
return
passwordRef
.
value
.
validate
((
valid
,
fields
)
=>
{
if
(
valid
)
{
$axios
.
post
(
`/apaas/system/v5/user/editpwd`
,
{
id
:
selectedRow
.
value
.
id
,
password
:
CryptoJS
.
AES
.
encrypt
(
passwordForm
.
password
,
"
swuE9cmCZQwrkYRV
"
).
toString
()
}
)
.
then
((
res
)
=>
{
if
(
res
.
data
.
code
==
200
)
{
$message
.
success
(
res
.
data
.
msg
)
}
else
{
$message
.
error
(
res
.
data
.
msg
)
}
handleCloseEdit
();
})
}
})
}
const
selectRows
=
(
data
)
=>
{
selected
.
value
=
data
.
selection
;
selectedName
.
value
=
data
.
selection
.
map
(
item
=>
item
.
business_name
)
}
const
clearSelected
=
()
=>
{
dataTable
.
value
.
clearSelection
();
}
onBeforeMount
(()
=>
{
onBeforeMount
(()
=>
{
getOrgTree
()
getTableRows
()
getTableRows
()
})
})
...
@@ -349,15 +559,27 @@ const { $axios,$message } = proxy
...
@@ -349,15 +559,27 @@ const { $axios,$message } = proxy
position
:
sticky
;
position
:
sticky
;
position
:
-webkit-sticky
;
position
:
-webkit-sticky
;
margin-top
:
16px
;
margin-top
:
16px
;
bottom
:
0
px
;
bottom
:
25
px
;
background-color
:
#fff
;
background-color
:
#fff
;
z-index
:
1024
;
z-index
:
1024
;
height
:
40px
;
height
:
40px
;
line-height
:
40px
;
line-height
:
40px
;
padding-top
:
8
px
;
padding-top
:
5
px
;
}
}
.bg-pagination
{
.bg-pagination
{
bottom
:
unset
bottom
:
unset
;
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
vite.config.js
View file @
16648d7d
...
@@ -35,6 +35,12 @@ export default {
...
@@ -35,6 +35,12 @@ export default {
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/common
'
:{
target
:
'
https://apaas5.wodcloud.com/apaas/common
'
,
// 所要代理的目标地址
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
secure
:
false
,
//解决证书缺失问题
}
}
}
}
},
},
...
...
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