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 790cdc41
authored
Nov 18, 2021
by
ym
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
role
1 parent
df980388
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
27 additions
and
12 deletions
src/components/mapView/index.vue
src/views/account/components/baseInfo.vue
src/views/account/components/selectProduct.vue
src/views/account/editAccount.vue
src/views/account/index.vue
src/views/role/components/selectProduct.vue
vue.config.js
src/components/mapView/index.vue
View file @
790cdc4
...
...
@@ -34,7 +34,7 @@ export default {
mapInit
()
{
map
=
new
AMap
.
Map
(
"container"
,
{
resizeEnable
:
true
,
zoom
:
1
0
,
zoom
:
1
5
,
});
AMap
.
plugin
([
"AMap.PlaceSearch"
],
function
()
{
//构造地点查询类
...
...
src/views/account/components/baseInfo.vue
View file @
790cdc4
...
...
@@ -34,6 +34,7 @@
v-model=
"accountAddForm.merchantOrgcode"
placeholder=
"请输入组织机构号码"
v-if=
"accountAddForm.merchantType == 2"
maxlength=
"50"
>
<el-select
v-model=
"accountAddForm.merchantType"
...
...
src/views/account/components/selectProduct.vue
View file @
790cdc4
This diff is collapsed.
Click to expand it.
src/views/account/editAccount.vue
View file @
790cdc4
...
...
@@ -306,9 +306,9 @@ export default {
this
.
$router
.
push
(
"/account/index"
);
},
//保存
handleSave
(
status
)
{
handleSave
()
{
let
product
=
this
.
$refs
.
productForm
.
getSelectInfo
();
if
(
status
==
2
&&
product
&&
product
.
every
((
item
)
=>
item
.
products
.
length
==
0
))
{
if
(
product
&&
product
.
every
((
item
)
=>
item
.
products
.
length
==
0
))
{
this
.
$message
.
error
(
"请选择产品"
);
return
;
}
...
...
@@ -320,7 +320,7 @@ export default {
};
this
.
$apis
.
store
.
updatePermissions
(
params
).
then
((
res
)
=>
{
if
(
res
)
{
status
?
this
.
handleTabs
(
status
)
:
this
.
$router
.
push
(
"/account/index"
);
this
.
$router
.
push
(
"/account/index"
);
}
});
},
...
...
src/views/account/index.vue
View file @
790cdc4
...
...
@@ -181,7 +181,7 @@ export default {
label
:
"关联的企业微信"
,
prop
:
"entmicroName"
,
formatter
:
(
cellValue
)
=>
{
return
cellValue
.
entmicroName
?
cellValue
.
entmicroName
:
"-
-
"
;
return
cellValue
.
entmicroName
?
cellValue
.
entmicroName
:
"-"
;
},
},
{
...
...
@@ -202,7 +202,7 @@ export default {
label
:
"上级商户"
,
prop
:
"parentMerchant"
,
formatter
:
(
cellValue
)
=>
{
return
cellValue
.
parentMerchant
?
cellValue
.
parentMerchant
:
"-
-
"
;
return
cellValue
.
parentMerchant
?
cellValue
.
parentMerchant
:
"-"
;
},
},
{
...
...
@@ -214,7 +214,7 @@ export default {
label
:
"联系人"
,
prop
:
"merchantLegalPerson"
,
formatter
:
(
cellValue
)
=>
{
return
cellValue
.
merchantLegalPerson
?
cellValue
.
merchantLegalPerson
:
"-
-
"
;
return
cellValue
.
merchantLegalPerson
?
cellValue
.
merchantLegalPerson
:
"-"
;
},
},
{
...
...
src/views/role/components/selectProduct.vue
View file @
790cdc4
<
template
>
<div
class=
"account-body scrm-box-f"
v-loading=
"loading"
v-if=
"tabMenu
.length > 0
"
>
<div
class=
"account-body scrm-box-f"
v-loading=
"loading"
v-if=
"tabMenu
Status
"
>
<div
class=
"account-title"
>
{{
title
}}
</div>
<el-tabs
v-if=
"tabMenu.length != 0"
...
...
@@ -104,6 +104,7 @@ export default {
data
()
{
return
{
loading
:
false
,
tabMenuStatus
:
false
,
treeHeight
:
450
,
tabMenu
:
[],
tabMenu_r
:
[],
...
...
@@ -123,13 +124,22 @@ export default {
accountTypes
:
[],
};
},
watch
:
{
tabMenu
:
{
handler
()
{
this
.
tabMenuStatus
=
this
.
tabMenu
.
every
(
item
=>
item
)
},
deep
:
true
,
},
},
methods
:
{
handleClik
(
tab
,
event
)
{
console
.
log
(
tab
,
event
);
const
tabId
=
tab
.
name
;
this
.
productTab
=
this
.
tabMenu
.
find
(
const
productTab
=
this
.
tabMenu
.
find
(
(
i
)
=>
i
.
accounttypeId
==
tabId
).
productsArr
[
0
].
productId
;
)
this
.
productTab
=
productTab
.
productsArr
[
0
]?
productTab
.
productsArr
[
0
].
productId
:
''
;
},
selectPro
(
data
)
{
this
.
$parent
.
roleRootRules
=
false
;
...
...
@@ -141,7 +151,7 @@ export default {
var
arr
=
tabMenu
.
find
((
i
)
=>
i
.
accounttypeId
==
tabName
)
.
products
.
find
((
j
)
=>
j
.
productId
==
productTab
).
merchantProTreeResponses
;
this
.
$refs
[
`tree_
${
tabName
}
_
${
productTab
}
`
]
[
0
].
setCheckedKeys
(
this
.
getAllId
(
arr
))
;
this
.
$refs
[
`tree_
${
tabName
}
_
${
productTab
}
`
]
?
this
.
$refs
[
`tree_
${
tabName
}
_
${
productTab
}
`
][
0
].
setCheckedKeys
(
this
.
getAllId
(
arr
)):
''
;
console
.
log
(
tabMenu
);
},
productClick
(
productId
)
{
...
...
@@ -223,6 +233,9 @@ export default {
this
.
accountList
.
forEach
((
itm
)
=>
{
if
(
item
.
accounttypeId
==
itm
.
accounttypeId
)
{
this
.
tabMenu
.
push
(
itm
);
if
(
!
item
.
productList
)
{
return
}
item
.
productList
.
forEach
((
i
)
=>
{
itm
.
products
.
forEach
((
j
)
=>
{
if
(
i
.
productId
==
j
.
productId
)
{
...
...
@@ -378,6 +391,7 @@ export default {
return
arr
;
},
getSelectInfo
()
{
this
.
tabMenu
=
this
.
tabMenu
.
filter
(
item
=>
item
)
this
.
accountTypes
=
this
.
tabMenu
.
map
((
item
)
=>
{
let
products
=
[];
let
productList
=
[];
...
...
vue.config.js
View file @
790cdc4
...
...
@@ -14,7 +14,7 @@ const cdn = {
`
${
CDN_DOMAIN
}
ajax/libs/element-ui/2.11.1/index.js`
,
`
${
CDN_DOMAIN
}
ajax/libs/vuex/3.6.2/vuex.min.js`
,
`
${
CDN_DOMAIN
}
ajax/libs/echarts/5.1.2/echarts.min.js`
,
'http
s
://webapi.amap.com/maps?v=2.0&key=bd290dc27d0945959280753215ddda71&plugin=AMap.Geocoder'
'http://webapi.amap.com/maps?v=2.0&key=bd290dc27d0945959280753215ddda71&plugin=AMap.Geocoder'
]
}
module
.
exports
=
{
...
...
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