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
900ad4d4
Commit
900ad4d4
authored
Oct 24, 2022
by
Jings
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: 修改区经权限展示逻辑
parent
0545b20f
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
77 additions
and
14 deletions
+77
-14
add-relate-new.vue
src/components/company/add-relate-new.vue
+5
-2
related-table.vue
src/components/company/related-table.vue
+20
-2
guide-setting-new.vue
src/views/enterprise/guide-setting-new.vue
+52
-10
No files found.
src/components/company/add-relate-new.vue
View file @
900ad4d4
...
...
@@ -3,7 +3,7 @@
* @Author : 无尘
* @Date : 2020-02-13 16:13:59
* @LastEditors: Drama
* @LastEditTime: 2022-10-
12 17:20:09
* @LastEditTime: 2022-10-
24 16:48:26
* @FilePath: /haoban-3/src/components/company/add-relate-new.vue
-->
<!--
...
...
@@ -18,7 +18,7 @@
<el-form-item
label=
"关联角色"
prop=
"manageFlag"
>
<el-radio-group
v-model=
"partForm.manageFlag"
@
change=
"manageChange"
>
<el-radio
:label=
"0"
>
导购
</el-radio>
<el-radio
:label=
"1"
>
区经/督导
</el-radio>
<el-radio
v-if=
"isShowSupervisionType"
:label=
"1"
>
区经/督导
</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item
label=
"关联账号"
prop=
"salerName"
>
...
...
@@ -73,6 +73,9 @@ export default {
default
()
{
return
{};
}
},
isShowSupervisionType
:
{
type
:
Boolean
}
},
data
()
{
...
...
src/components/company/related-table.vue
View file @
900ad4d4
...
...
@@ -70,7 +70,7 @@
<
/div>--
>
<!--
<
add
-
relate
v
-
if
=
"addShow"
:
departObj
=
"relateRow"
@
refreshData
=
"refreshData"
><
/add-relate> --
>
<!--
新版关联
-->
<
add
-
relate
-
new
v
-
if
=
"addShow"
:
departObj
=
"relateRow"
@
refreshData
=
"refreshData"
><
/add-relate-new
>
<
add
-
relate
-
new
v
-
if
=
"addShow"
:
departObj
=
"relateRow"
@
refreshData
=
"refreshData"
:
isShowSupervisionType
=
"isShowSupervisionType"
><
/add-relate-new
>
<
/el-dialog
>
<
/template
>
<
script
>
...
...
@@ -99,11 +99,24 @@ export default {
total
:
0
,
tableData
:
[],
addShow
:
false
,
isType
:
0
isType
:
0
,
isShowSupervisionType
:
false
,
addLoading
:
false
}
;
}
,
computed
:
{
}
,
methods
:
{
async
getGicRole
()
{
this
.
addLoading
=
true
;
await
getRequest
(
'/haoban-manage3-web/hasManagerFlag'
,
{
}
).
then
(
res
=>
{
this
.
addLoading
=
false
;
if
(
res
.
data
.
code
==
0
)
{
this
.
isShowSupervisionType
=
res
.
data
.
result
;
}
else
{
this
.
$message
.
error
(
res
.
data
.
message
);
}
}
);
}
,
refreshData
(
data
)
{
const
that
=
this
;
that
.
addShow
=
false
;
...
...
@@ -149,6 +162,8 @@ export default {
* 添加关联
*/
toAddRelate
()
{
// 避免点击过快
if
(
this
.
addLoading
)
return
;
const
that
=
this
;
that
.
addShow
=
true
;
}
,
...
...
@@ -261,6 +276,9 @@ export default {
}
}
}
,
created
()
{
this
.
getGicRole
();
}
,
mounted
()
{
const
that
=
this
;
if
(
Object
.
keys
(
that
.
relateRow
).
length
)
{
...
...
src/views/enterprise/guide-setting-new.vue
View file @
900ad4d4
...
...
@@ -4,7 +4,7 @@
* @Author: Drama
* @Date: 2022-09-14 11:09:43
* @LastEditors: Drama
* @LastEditTime: 2022-10-
18 15:13:58
* @LastEditTime: 2022-10-
24 16:46:14
* @FilePath: /haoban-3/src/views/enterprise/guide-setting-new.vue
* Copyright (C) 2022 huzhenhong. All rights reserved.
-->
...
...
@@ -46,9 +46,9 @@ export default {
return
{
roleForm
:
{},
titleList
:
[
{
title
:
'导购'
,
isEmpty
:
false
},
{
title
:
'店长'
,
isEmpty
:
false
},
{
title
:
'区经/督导'
,
isEmpty
:
false
}
//
{ title: '导购', isEmpty: false },
//
{ title: '店长', isEmpty: false },
//
{ title: '区经/督导', isEmpty: false }
],
activeNum
:
0
,
defaultProps
:
{
...
...
@@ -76,16 +76,45 @@ export default {
copyMenu_1
:
[],
copyMenu_2
:
[],
loading
:
false
,
isShowErrorTip
:
false
isShowErrorTip
:
false
,
isShowSupervisionType
:
false
// 是否展示区经tab
};
},
computed
:
{},
async
created
()
{
await
this
.
getGicRole
();
},
async
mounted
()
{
// await this.getGicRole();
await
this
.
getMenuRoleList
(
0
);
await
this
.
getMenuRoleList
(
1
);
await
this
.
getMenuRoleList
(
2
);
if
(
this
.
isShowSupervisionType
)
{
// 有权限才获取区经权限
await
this
.
getMenuRoleList
(
2
);
}
},
methods
:
{
// 判断是否有分权
async
getGicRole
()
{
await
getRequest
(
'/haoban-manage3-web/hasManagerFlag'
,
{}).
then
(
res
=>
{
if
(
res
.
data
.
code
==
0
)
{
let
normalTitleList
=
[
{
title
:
'导购'
,
isEmpty
:
false
},
{
title
:
'店长'
,
isEmpty
:
false
}
];
this
.
isShowSupervisionType
=
res
.
data
.
result
;
if
(
this
.
isShowSupervisionType
)
{
// 有权限
normalTitleList
.
push
({
title
:
'区经/督导'
,
isEmpty
:
false
});
this
.
titleList
=
normalTitleList
;
}
else
{
this
.
titleList
=
normalTitleList
;
}
}
else
{
this
.
$message
.
error
(
res
.
data
.
message
);
}
});
},
chooseType
(
index
)
{
this
.
isShowErrorTip
=
false
;
this
.
treeData
=
deepClone
(
this
[
'copyMenu_'
+
index
]);
...
...
@@ -251,7 +280,8 @@ export default {
let
errFlag_0
=
this
.
withoutParents_0
.
length
?
true
:
false
;
let
errFlag_1
=
this
.
withoutParents_1
.
length
?
true
:
false
;
let
errFlag_2
=
this
.
withoutParents_2
.
length
?
true
:
false
;
let
errFlag_2
=
this
.
isShowSupervisionType
?
(
this
.
withoutParents_2
.
length
?
true
:
false
)
:
true
;
// let delMenu_0 = getArrDifference(this.curMenuCode_0, this.withoutParents_0);
// let delMenu_1 = getArrDifference(this.curMenuCode_1, this.withoutParents_1);
// let delMenu_2 = getArrDifference(this.curMenuCode_2, this.withoutParents_2);
...
...
@@ -266,7 +296,10 @@ export default {
if
(
!
errFlag_0
||
!
errFlag_1
||
!
errFlag_2
)
{
this
.
$set
(
this
.
titleList
[
0
],
'isEmpty'
,
!
errFlag_0
);
this
.
$set
(
this
.
titleList
[
1
],
'isEmpty'
,
!
errFlag_1
);
this
.
$set
(
this
.
titleList
[
2
],
'isEmpty'
,
!
errFlag_2
);
if
(
this
.
isShowSupervisionType
)
{
this
.
$set
(
this
.
titleList
[
2
],
'isEmpty'
,
!
errFlag_2
);
}
// this.$set(this.titleList[2], 'isEmpty', !errFlag_2);
this
.
isShowErrorTip
=
true
;
return
;
}
...
...
@@ -296,6 +329,10 @@ export default {
addMenuCodes
:
addMenu_2
}
};
// GIC没有权限 需要删除区经参数
if
(
!
this
.
isShowSupervisionType
)
{
delete
para
.
managerMenus
;
}
postJsonRequest
(
'/haoban-manage3-web/role/edit'
,
para
).
then
(
async
res
=>
{
let
data
=
res
.
data
;
if
(
data
.
code
==
0
)
{
...
...
@@ -306,11 +343,16 @@ export default {
// 重置校验
this
.
$set
(
this
.
titleList
[
0
],
'isEmpty'
,
false
);
this
.
$set
(
this
.
titleList
[
1
],
'isEmpty'
,
false
);
this
.
$set
(
this
.
titleList
[
2
],
'isEmpty'
,
false
);
if
(
this
.
isShowSupervisionType
)
{
this
.
$set
(
this
.
titleList
[
2
],
'isEmpty'
,
false
);
}
this
.
isShowErrorTip
=
false
;
await
this
.
getMenuRoleList
(
0
);
await
this
.
getMenuRoleList
(
1
);
await
this
.
getMenuRoleList
(
2
);
if
(
this
.
isShowSupervisionType
)
{
// 有区经权限-则获取列表
await
this
.
getMenuRoleList
(
2
);
}
}
else
{
this
.
$message
.
warning
(
data
.
message
);
}
...
...
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