Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
肖康
/
cloudSystem
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
96b8a361
authored
Aug 08, 2023
by
LJM
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
bug
parent
164efb85
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
28 deletions
src/App.vue
src/views/Info/subAccountAdd.vue
src/views/Info/subAccountEdit.vue
src/App.vue
View file @
96b8a361
<
template
>
<
template
>
<div
id=
"app"
>
<div
id=
"app"
>
<keep-alive
exclude=
"InquireDetail,ListDetail,orderTrackGoodsDetail,orderTrackPurAdd,enter,list,inquire,quote,orderTrackInvoice"
>
<keep-alive
exclude=
"InquireDetail,ListDetail,orderTrackGoodsDetail,orderTrackPurAdd,enter,list,inquire,quote,orderTrackInvoice
,subAccount,subAccountAdd,subAccountEdit
"
>
<router-view
class=
"router-view"
></router-view>
<router-view
class=
"router-view"
></router-view>
</keep-alive>
</keep-alive>
</div>
</div>
...
...
src/views/Info/subAccountAdd.vue
View file @
96b8a361
...
@@ -65,14 +65,6 @@ export default {
...
@@ -65,14 +65,6 @@ export default {
children
:
'children'
,
children
:
'children'
,
label
:
'name'
label
:
'name'
},
},
data
:
[{
name
:
'询报价管理'
,
children
:
[{
name
:
'询价管理'
,
},
{
name
:
'报价管理'
}]
}],
rules
:
{
rules
:
{
mobile
:
[{
mobile
:
[{
required
:
true
,
required
:
true
,
...
@@ -96,8 +88,8 @@ export default {
...
@@ -96,8 +88,8 @@ export default {
}],
}],
},
},
menuData
:
[],
//权限菜单
menuData
:
[],
//权限菜单
checkedNodes
:
[],
//存储勾选的子账号权限配置
messageMenu
:
[],
//消息权限菜单
messageMenu
:
[],
//消息权限菜单
checkedNodes
:
[],
//存储勾选的子账号权限配置
checkedMessageNodes
:
[],
//存储勾选的消息菜单
checkedMessageNodes
:
[],
//存储勾选的消息菜单
formParam
:
{
formParam
:
{
mobile
:
''
,
mobile
:
''
,
...
@@ -134,7 +126,7 @@ export default {
...
@@ -134,7 +126,7 @@ export default {
* 获取当前用户的消息权限菜单
* 获取当前用户的消息权限菜单
*/
*/
getMessageMenu
()
{
getMessageMenu
()
{
this
.
$http
(
'GET'
,
"/api/subAccount/getMessageMenu"
,
{
ynat_id
:
''
}).
then
(
res
=>
{
this
.
$http
(
'GET'
,
"/api/subAccount/getMessageMenu"
,
{}).
then
(
res
=>
{
if
(
res
.
code
===
0
)
{
if
(
res
.
code
===
0
)
{
let
newMenuData
=
res
.
data
.
data
.
map
(
item
=>
[
item
]);
let
newMenuData
=
res
.
data
.
data
.
map
(
item
=>
[
item
]);
this
.
messageMenu
=
newMenuData
;
this
.
messageMenu
=
newMenuData
;
...
@@ -146,6 +138,11 @@ export default {
...
@@ -146,6 +138,11 @@ export default {
}
}
})
})
},
},
/**
* 筛选子账号勾选的权限配置
* @param data
* @param checked
*/
handleCheckChange
(
data
,
checked
)
{
handleCheckChange
(
data
,
checked
)
{
if
(
checked
)
{
if
(
checked
)
{
if
(
!
this
.
checkedNodes
.
includes
(
data
.
name
))
{
if
(
!
this
.
checkedNodes
.
includes
(
data
.
name
))
{
...
@@ -163,6 +160,11 @@ export default {
...
@@ -163,6 +160,11 @@ export default {
}
}
}
}
},
},
/**
* 筛选子账号勾选的消息推送配置
* @param data
* @param checked
*/
handleCheckMsgChange
(
data
,
checked
)
{
handleCheckMsgChange
(
data
,
checked
)
{
if
(
checked
)
{
if
(
checked
)
{
if
(
!
this
.
checkedMessageNodes
.
includes
(
data
.
name
))
{
if
(
!
this
.
checkedMessageNodes
.
includes
(
data
.
name
))
{
...
@@ -180,12 +182,15 @@ export default {
...
@@ -180,12 +182,15 @@ export default {
}
}
}
}
},
},
/**
* 表单提交
* @param formName
*/
submitForm
(
formName
)
{
submitForm
(
formName
)
{
this
.
$refs
[
formName
].
validate
((
valid
)
=>
{
this
.
$refs
[
formName
].
validate
((
valid
)
=>
{
if
(
valid
)
{
if
(
valid
)
{
this
.
formParam
.
user_message_rule
=
JSON
.
stringify
(
this
.
checkedMessageNodes
);
this
.
formParam
.
user_message_rule
=
JSON
.
stringify
(
this
.
checkedMessageNodes
);
this
.
formParam
.
user_rule
=
JSON
.
stringify
(
this
.
checkedNodes
);
this
.
formParam
.
user_rule
=
JSON
.
stringify
(
this
.
checkedNodes
);
this
.
$http
(
'POST'
,
"/api/subAccount/create"
,
this
.
formParam
).
then
(
res
=>
{
this
.
$http
(
'POST'
,
"/api/subAccount/create"
,
this
.
formParam
).
then
(
res
=>
{
if
(
res
.
code
===
0
)
{
if
(
res
.
code
===
0
)
{
this
.
$message
({
this
.
$message
({
...
...
src/views/Info/subAccountEdit.vue
View file @
96b8a361
...
@@ -58,21 +58,13 @@ Vue.use(Button).use(Form).use(Select).use(Tree).use(Option).use(Input).use(FormI
...
@@ -58,21 +58,13 @@ Vue.use(Button).use(Form).use(Select).use(Tree).use(Option).use(Input).use(FormI
Vue
.
use
(
DatePicker
).
use
(
Dropdown
).
use
(
DropdownMenu
).
use
(
DropdownItem
).
use
(
TableColumn
).
use
(
Table
).
use
(
Pagination
).
use
(
Popover
).
use
(
Tag
).
use
(
Tooltip
).
use
(
Row
);
Vue
.
use
(
DatePicker
).
use
(
Dropdown
).
use
(
DropdownMenu
).
use
(
DropdownItem
).
use
(
TableColumn
).
use
(
Table
).
use
(
Pagination
).
use
(
Popover
).
use
(
Tag
).
use
(
Tooltip
).
use
(
Row
);
export
default
{
export
default
{
name
:
"subAccount
Add
"
,
name
:
"subAccount
Edit
"
,
data
()
{
data
()
{
return
{
return
{
defaultProps
:
{
defaultProps
:
{
children
:
'children'
,
children
:
'children'
,
label
:
'name'
label
:
'name'
},
},
data
:
[{
name
:
'询报价管理'
,
children
:
[{
name
:
'询价管理'
,
},
{
name
:
'报价管理'
}]
}],
rules
:
{
rules
:
{
mobile
:
[{
mobile
:
[{
required
:
true
,
required
:
true
,
...
@@ -234,13 +226,6 @@ export default {
...
@@ -234,13 +226,6 @@ export default {
}
}
},
},
/**
/**
* 获取需要勾选的数据
*/
getDefaultCheckedKeys
(
item
)
{
console
.
log
(
item
)
return
[
3
];
},
/**
* 表单提交
* 表单提交
* @param formName
* @param formName
*/
*/
...
...
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