Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
杨明
/
scrm-micro-config
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 503b59cd
authored
Nov 01, 2021
by
杨北旺
Browse Files
Options
Browse Files
Tag
Download
Plain Diff
Merge branch 'master' of 192.168.3.233:yangming/scrm-micro-config
2 parents
82baf40a
18ec2e71
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
150 additions
and
11 deletions
src/api/modules/merchant.js
src/components/mapView/index.vue
src/views/account/detailAccount.vue
src/views/account/editAccount.vue
src/api/modules/merchant.js
View file @
503b59c
...
...
@@ -62,6 +62,16 @@ const getSecondInfo = params => {
sign
:
true
})
}
const
getSecondTree
=
params
=>
{
params
.
method
=
'cn.com.glsx.merchants.merchant.findMerchantTree'
return
http
({
url
:
'/rop-merchants/router'
,
method
:
'POST'
,
data
:
params
,
sign
:
true
})
}
const
getSecondTable
=
params
=>
{
params
.
method
=
'cn.com.glsx.merchants.staff.findMerchantStaffList'
...
...
@@ -76,7 +86,9 @@ const getSecondTable = params => {
export
default
{
// getThirdTable,
getFirstInfo
,
findMenuFunTreeByMerId
,
getSecondInfo
,
getSecondTree
,
getSecondTable
}
src/components/mapView/index.vue
View file @
503b59c
...
...
@@ -25,6 +25,7 @@ export default {
return
{
input
:
""
,
address
:
""
,
lnglat
:
[],
};
},
...
...
@@ -60,6 +61,7 @@ export default {
AMap
.
plugin
(
"AMap.Geocoder"
,
()
=>
{
const
geocoder
=
new
AMap
.
Geocoder
();
geocoder
.
getAddress
(
lnglat
,
(
status
,
result
)
=>
{
self
.
lnglat
=
lnglat
;
self
.
address
=
result
.
regeocode
.
formattedAddress
;
});
});
...
...
@@ -74,7 +76,7 @@ export default {
selectAddress
(
e
)
{
//这里获得点选地点的经纬度
this
.
getAddress
();
}
,
}
},
mounted
()
{
...
...
src/views/account/detailAccount.vue
View file @
503b59c
...
...
@@ -54,11 +54,29 @@
<span
class=
"content-title"
>
功能权限
</span>
<div
class=
"powerTreeWrap"
>
<div
class=
"manTitleWrap"
>
<div
class=
"mainTitle"
:class=
"
{ activeMainTitle: currentIndex == index }" v-for="(item, index) in
firstPageObj.accountTypes
" :key="index" @click="powerTabClick(index)">
<div
class=
"ma
i
nTitleWrap"
>
<div
class=
"mainTitle"
:class=
"
{ activeMainTitle: currentIndex == index }" v-for="(item, index) in
powerDataArray
" :key="index" @click="powerTabClick(index)">
{{
item
.
accounttypeName
||
'null'
}}
</div>
</div>
<div
class=
"content"
>
<div
class=
"subTitleWrap"
>
<div
class=
"subTitle"
:class=
"
{ acitveSubTitle: subCurrentIndex == sindex }" v-for="(ele, sindex) in products" :key="sindex" @click="powerSubTabClick(sindex)">
{{
ele
.
productName
}}
</div>
</div>
<div
class=
"contentTree"
>
<!-- powerDataArray.length > 0 && powerDataArray[currentIndex].products[subCurrentIndex]. -->
<!-- powerDataArray[currentIndex].products[subCurrentIndex].merchantProTreeResponses这是树的数据 -->
<template
v-if=
"merchantProTreeResponses.length > 0"
>
<el-tree
default-expand-all
:data=
"merchantProTreeResponses"
:props=
"defaultProps"
></el-tree>
</
template
>
<div
v-else
class=
"noDataContent"
>
<img
src=
"../../assets/img/empty.png"
alt=
""
/>
<div>
暂无数据
</div>
</div>
</div>
</div>
</div>
</div>
<div
class=
"MsgWrap companyMsg"
>
...
...
@@ -143,7 +161,10 @@
</div>
<div
class=
"searchTreeInputWrap"
>
<el-input
v-model=
"treeInputName"
placeholder=
"请输入"
size=
"small"
></el-input>
<el-button
type=
"primary"
size=
"small"
>
查询
</el-button>
<el-button
type=
"primary"
size=
"small"
@
click=
"filterTreeListFun"
>
查询
</el-button>
</div>
<div
class=
"secondTreeWrap"
>
<el-tree
ref=
"tree"
:default-expanded-keys=
"expandedIds"
:data=
"secondTreeList"
node-key=
"id"
:filter-node-method=
"filterNode"
></el-tree>
</div>
<!-- <form class="layui-form" action="">
<div class="layui-inline">
...
...
@@ -191,10 +212,19 @@ export default {
titles
:
[
'商户信息'
,
'上级/下级商户'
,
'修改记录'
],
curIndex
:
0
,
currentIndex
:
0
,
//功能权限主标题的索引
subCurrentIndex
:
0
,
firstPageObj
:
{},
powerDataArray
:
[],
defaultProps
:
{
children
:
'children'
,
label
:
'label'
},
//第二页表
secondPageObj
:
{},
secondTreeList
:
[],
expandedIds
:
[],
treeInputName
:
''
,
secondInputName
:
''
,
subMerchantTableList
:
[],
//第二页的后台给表数据
...
...
@@ -262,9 +292,32 @@ export default {
pageConf
:
{
pageSize
:
'pageSize'
,
pageNum
:
'pageNum'
,
totalCount
:
'count'
},
// layout: 'sizes, prev, pager, next, jumper, ->, total',
tableTotal
:
0
,
merchantId
:
this
.
$route
.
params
.
id
//需要从外面传进来
merchantId
:
58
//
this.$route.params.id //需要从外面传进来
}
},
computed
:
{
products
()
{
if
(
!
this
.
powerDataArray
.
length
)
{
return
[]
}
return
this
.
powerDataArray
[
this
.
currentIndex
].
products
},
//功能树的数据
merchantProTreeResponses
()
{
if
(
!
this
.
powerDataArray
.
length
)
{
return
[]
}
else
if
(
this
.
powerDataArray
.
length
>
0
&&
this
.
powerDataArray
[
this
.
currentIndex
].
products
.
length
==
0
)
{
return
[]
}
return
this
.
powerDataArray
[
this
.
currentIndex
].
products
[
this
.
subCurrentIndex
].
merchantProTreeResponses
}
},
// watch: {
// treeInputName(val) {
// this.$refs.tree.filter(val)
// }
// },
methods
:
{
tabClick
(
index
)
{
...
...
@@ -283,6 +336,11 @@ export default {
},
powerTabClick
(
index
)
{
this
.
currentIndex
=
index
//每次切换将subCurrentIndex置为0
this
.
subCurrentIndex
=
0
},
powerSubTabClick
(
index
)
{
this
.
subCurrentIndex
=
index
},
getFirstInfo
()
{
this
.
$apis
.
merchant
.
getFirstInfo
({
id
:
this
.
merchantId
}).
then
(
res
=>
{
...
...
@@ -291,14 +349,30 @@ export default {
}
})
},
findMenuFunTreeByMerId
()
{
this
.
$apis
.
merchant
.
findMenuFunTreeByMerId
({
id
:
this
.
merchantId
}).
then
(
res
=>
{
if
(
res
)
{
console
.
log
(
res
,
'功能树的信息'
)
this
.
powerDataArray
=
res
}
})
},
getSecondInfo
()
{
this
.
$apis
.
merchant
.
getSecondInfo
({
id
:
this
.
merchantId
}).
then
(
res
=>
{
if
(
res
)
{
console
.
log
(
'二页'
,
res
)
this
.
secondPageObj
=
res
}
})
},
getSecondTree
()
{
this
.
$apis
.
merchant
.
getSecondTree
({
id
:
this
.
merchantId
}).
then
(
res
=>
{
if
(
res
)
{
console
.
log
(
'二页的树'
,
res
)
this
.
secondTreeList
=
res
this
.
expandedIds
=
res
.
map
(
item
=>
item
.
id
)
}
})
},
getSecondTable
()
{
var
param
=
{}
param
.
keyword
=
this
.
secondInputName
...
...
@@ -335,6 +409,13 @@ export default {
this
.
$refs
.
updateRecord
.
setTableHeightFun
()
}
})
},
filterNode
(
value
,
data
)
{
if
(
!
value
)
return
true
return
data
.
label
.
indexOf
(
value
)
!==
-
1
},
filterTreeListFun
()
{
this
.
$refs
.
tree
.
filter
(
this
.
treeInputName
)
}
},
...
...
@@ -345,9 +426,10 @@ export default {
moduleName
:
'商户模块'
}
this
.
getFirstInfo
()
//
this.findMenuFunTreeByMerId()
this
.
findMenuFunTreeByMerId
()
this
.
getSecondInfo
()
// this.getSecondTree()
this
.
getSecondTree
()
},
mounted
()
{
...
...
@@ -454,7 +536,8 @@ export default {
min-height
:
300px
;
padding-top
:
2px
;
padding-left
:
2px
;
.manTitleWrap
{
padding-bottom
:
10px
;
.mainTitleWrap
{
height
:
32px
;
display
:
flex
;
...
...
@@ -471,6 +554,45 @@ export default {
color
:
#5850ff
;
}
}
.content
{
background-color
:
#fff
;
margin
:
20px
10px
0
;
.subTitleWrap
{
height
:
40px
;
display
:
flex
;
background-color
:
#f4f6fc
;
.subTitle
{
background-color
:
#f4f6fc
;
height
:
40px
;
width
:
180px
;
line-height
:
40px
;
text-align
:
center
;
border-radius
:
2px
;
}
.acitveSubTitle
{
background-color
:
#fff
!important
;
color
:
#5850ff
;
}
}
.contentTree
{
padding
:
20px
;
min-height
:
250px
;
position
:
relative
;
.noDataContent
{
width
:
64px
;
height
:
64px
;
position
:
absolute
;
left
:
50%
;
top
:
50%
;
margin-top
:
-32px
;
margin-left
:
-32px
;
div
{
margin-top
:
12px
;
}
}
}
}
}
}
}
...
...
@@ -483,7 +605,7 @@ export default {
padding-left
:
20px
;
min-height
:
calc
(
100vh
-
200px
);
background-color
:
#fff
;
width
:
3
4
0px
;
width
:
3
6
0px
;
margin-right
:
20px
;
box-sizing
:
border-box
;
overflow
:
auto
;
...
...
@@ -531,6 +653,9 @@ export default {
margin-left
:
10px
;
}
}
.secondTreeWrap
{
margin-top
:
20px
;
}
}
//
.ztree
.wrapper-tree
{
//
overflow-y
:
auto
;
...
...
@@ -552,7 +677,7 @@ export default {
.merchant-right
{
padding-top
:
15px
;
padding-bottom
:
20px
;
width
:
calc
(
100vw
-
3
4
0px
-
20px
);
width
:
calc
(
100vw
-
3
6
0px
-
20px
);
overflow-x
:
auto
;
background-color
:
#fff
;
padding-left
:
20px
;
...
...
src/views/account/editAccount.vue
View file @
503b59c
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
Attach a file
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 post a comment