Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
H
haoban-3
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
office
haoban-3
Commits
40bd4579
Commit
40bd4579
authored
May 27, 2022
by
caoyanzhi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update: 导购设置
parent
5589e978
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
51 additions
and
38 deletions
+51
-38
guide-setting.vue
src/views/enterprise/guide-setting.vue
+51
-38
No files found.
src/views/enterprise/guide-setting.vue
View file @
40bd4579
<
template
>
<
template
>
<div
class=
"guide-setting"
>
<el-tabs
v-model=
"activeName"
>
<dm-sub-title
class=
"guide-setting-title"
>
导购操作权限设置
</dm-sub-title>
<el-tab-pane
label=
"导购操作权限设置"
name=
"first"
>
<div
class=
"guide-auth-list"
>
<div
class=
"guide-setting"
>
<div
class=
"guide-auth-item"
>
<div
class=
"guide-auth-list"
>
<span
class=
"auth-item-label"
>
允许编辑导购信息
</span>
<div
class=
"guide-auth-item"
>
<el-switch
v-model=
"settingData.editClerkFlag"
:active-value=
"1"
:inactive-value=
"0"
></el-switch>
<span
class=
"auth-item-label"
>
允许编辑导购信息
</span>
<el-switch
v-model=
"settingData.editClerkFlag"
:active-value=
"1"
:inactive-value=
"0"
></el-switch>
</div>
<div
class=
"guide-auth-item"
>
<span
class=
"auth-item-label"
>
允许店长添加导购
</span>
<el-switch
v-model=
"settingData.addClerkFlag"
:active-value=
"1"
:inactive-value=
"0"
></el-switch>
</div>
<div
class=
"guide-auth-item"
>
<span
class=
"auth-item-label"
>
允许店长删除导购
</span>
<el-switch
v-model=
"settingData.delClerkFlag"
:active-value=
"1"
:inactive-value=
"0"
></el-switch>
</div>
</div>
<el-button
class=
"save-btn"
v-if=
"$getButtonLimit($buttonCode.saveGuideSetting)"
:limit-code=
"$buttonCode.saveGuideSetting"
:loading=
"loading"
type=
"primary"
@
click=
"onSave"
>
保存
</el-button>
</div>
</div>
<div
class=
"guide-auth-item"
>
</el-tab-pane>
<span
class=
"auth-item-label"
>
允许店长添加导购
</span>
<el-tab-pane
label=
"应用可见权限设置"
name=
"second"
>
<el-switch
v-model=
"settingData.addClerkFlag"
:active-value=
"1"
:inactive-value=
"0"
></el-switch>
<div
class=
"guide-setting"
>
<p
class=
"app-auth-tip"
>
设置导购可见应用
</p>
<el-row>
<el-checkbox-group
v-model=
"settingData.checked"
>
<el-col
:span=
"3"
v-for=
"el in allApps"
:key=
"el.applicationId"
style=
"margin-bottom: 12px"
>
<el-checkbox
:label=
"el.applicationId"
>
{{
el
.
applicationName
}}
</el-checkbox>
</el-col>
</el-checkbox-group>
</el-row>
<el-button
class=
"save-btn"
v-if=
"$getButtonLimit($buttonCode.saveAppsVisible)"
:limit-code=
"$buttonCode.saveAppsVisible"
:loading=
"loading"
type=
"primary"
@
click=
"onSave"
>
保存
</el-button>
</div>
</div>
<div
class=
"guide-auth-item"
>
</el-tab-pane>
<span
class=
"auth-item-label"
>
允许店长删除导购
</span>
</el-tabs>
<el-switch
v-model=
"settingData.delClerkFlag"
:active-value=
"1"
:inactive-value=
"0"
></el-switch>
</div>
</div>
<dm-sub-title
class=
"guide-setting-title"
>
应用可见权限设置
</dm-sub-title>
<p
class=
"app-auth-tip"
>
设置导购可见应用
</p>
<el-row>
<el-checkbox-group
v-model=
"settingData.checked"
>
<el-col
:span=
"3"
v-for=
"el in allApps"
:key=
"el.applicationId"
style=
"margin-bottom: 12px"
>
<el-checkbox
:label=
"el.applicationId"
>
{{
el
.
applicationName
}}
</el-checkbox>
</el-col>
</el-checkbox-group>
</el-row>
<hb-form-bottom
v-if=
"$getButtonLimit($buttonCode.saveGuideSetting)"
>
<el-button
:limit-code=
"$buttonCode.saveGuideSetting"
:loading=
"loading"
type=
"primary"
@
click=
"onSave"
>
保存
</el-button>
</hb-form-bottom>
</div>
</
template
>
</
template
>
<
script
>
<
script
>
...
@@ -38,6 +43,7 @@ export default {
...
@@ -38,6 +43,7 @@ export default {
data
()
{
data
()
{
return
{
return
{
loading
:
false
,
loading
:
false
,
activeName
:
'first'
,
settingData
:
{
settingData
:
{
editClerkFlag
:
0
,
editClerkFlag
:
0
,
addClerkFlag
:
0
,
addClerkFlag
:
0
,
...
@@ -67,13 +73,21 @@ export default {
...
@@ -67,13 +73,21 @@ export default {
onSave
()
{
onSave
()
{
this
.
loading
=
true
;
this
.
loading
=
true
;
const
{
editClerkFlag
,
addClerkFlag
,
delClerkFlag
,
checked
}
=
this
.
settingData
;
const
{
editClerkFlag
,
addClerkFlag
,
delClerkFlag
,
checked
}
=
this
.
settingData
;
const
params
=
{
editClerkFlag
,
addClerkFlag
,
delClerkFlag
,
dataJson
:
''
};
let
params
=
{};
params
.
dataJson
=
this
.
allApps
.
map
(
el
=>
{
if
(
this
.
activeName
==
'first'
)
{
return
{
applicationId
:
el
.
applicationId
,
openFlag
:
checked
.
includes
(
el
.
applicationId
)
?
1
:
0
};
params
=
{
editClerkFlag
,
addClerkFlag
,
delClerkFlag
};
});
}
else
if
(
this
.
activeName
==
'second'
)
{
params
.
dataJson
=
JSON
.
stringify
(
params
.
dataJson
);
const
dataJson
=
this
.
allApps
.
map
(
el
=>
{
return
{
applicationId
:
el
.
applicationId
,
openFlag
:
checked
.
includes
(
el
.
applicationId
)
?
1
:
0
};
});
params
=
{
dataJson
:
JSON
.
stringify
(
dataJson
)
};
}
const
methods
=
{
first
:
params
=>
postRequest
(
'/haoban-manage3-web/save-clerk-edit-flag'
,
params
),
second
:
params
=>
postRequest
(
'/haoban-manage3-web/open-or-close'
,
params
)
};
postRequest
(
'/haoban-manage3-web/open-or-close'
,
params
)
methods
[
this
.
activeName
](
params
)
.
then
(
res
=>
{
.
then
(
res
=>
{
const
{
errorCode
}
=
res
.
data
||
{};
const
{
errorCode
}
=
res
.
data
||
{};
if
(
errorCode
!=
1
)
{
if
(
errorCode
!=
1
)
{
...
@@ -91,12 +105,8 @@ export default {
...
@@ -91,12 +105,8 @@ export default {
<
style
lang=
"scss"
scoped
>
<
style
lang=
"scss"
scoped
>
.guide-setting
{
.guide-setting
{
padding
:
20px
;
padding
:
0
20px
20px
;
.guide-setting-title
{
margin-bottom
:
22px
;
}
.guide-auth-list
{
.guide-auth-list
{
margin-bottom
:
44px
;
border-radius
:
4px
;
border-radius
:
4px
;
border
:
1px
solid
#dcdfe6
;
border
:
1px
solid
#dcdfe6
;
.guide-auth-item
{
.guide-auth-item
{
...
@@ -123,5 +133,8 @@ export default {
...
@@ -123,5 +133,8 @@ export default {
color
:
#303133
;
color
:
#303133
;
line-height
:
20px
;
line-height
:
20px
;
}
}
.save-btn
{
margin-top
:
40px
;
}
}
}
</
style
>
</
style
>
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