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 e26ea395
authored
Nov 23, 2021
by
杨北旺
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
修复门点端角色新建报错bug
1 parent
95526d49
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
16 deletions
src/views/role/create.vue
src/views/role/create.vue
View file @
e26ea39
...
@@ -6,12 +6,12 @@
...
@@ -6,12 +6,12 @@
</div>
</div>
<div
class=
"main_widget"
>
<div
class=
"main_widget"
>
<el-form
:model=
"ruleForm"
:rules=
"rules"
ref=
"ruleForm"
label-width=
"100px"
class=
"demo-ruleForm"
>
<el-form
:model=
"ruleForm"
:rules=
"rules"
ref=
"ruleForm"
label-width=
"100px"
class=
"demo-ruleForm"
>
<el-form-item
v-if=
"pageType == 'create'
&&accountLevel!=
4"
label=
"所属商户"
prop=
"merchantId"
>
<el-form-item
v-if=
"pageType == 'create'
&& accountLevel !=
4"
label=
"所属商户"
prop=
"merchantId"
>
<el-select
size=
"small"
style=
"width: 40%"
v-model=
"ruleForm.merchantId"
clearable
filterable
placeholder=
"请选择"
@
change=
"selectMerchant"
>
<el-select
size=
"small"
style=
"width: 40%"
v-model=
"ruleForm.merchantId"
clearable
filterable
placeholder=
"请选择"
@
change=
"selectMerchant"
>
<el-option
v-for=
"item in merchantList"
:key=
"item.id"
:label=
"item.merchantName"
:value=
"item.id"
></el-option>
<el-option
v-for=
"item in merchantList"
:key=
"item.id"
:label=
"item.merchantName"
:value=
"item.id"
></el-option>
</el-select>
</el-select>
</el-form-item>
</el-form-item>
<el-form-item
label=
"所属商户"
prop=
"merchantName"
v-if=
"pageType == 'create'
&&accountLevel==
4"
>
<el-form-item
label=
"所属商户"
prop=
"merchantName"
v-if=
"pageType == 'create'
&& accountLevel ==
4"
>
<el-input
size=
"small"
disabled
style=
"width: 40%"
v-model=
"ruleForm.merchantName"
></el-input>
<el-input
size=
"small"
disabled
style=
"width: 40%"
v-model=
"ruleForm.merchantName"
></el-input>
</el-form-item>
</el-form-item>
<el-form-item
label=
"所属商户"
prop=
"merchantName"
v-if=
"pageType == 'edit'"
>
<el-form-item
label=
"所属商户"
prop=
"merchantName"
v-if=
"pageType == 'edit'"
>
...
@@ -47,9 +47,7 @@
...
@@ -47,9 +47,7 @@
</div>
</div>
</
template
>
</
template
>
</div>
</div>
<div
class=
"el-form-item__error"
v-if=
"roleRootRules"
>
<div
class=
"el-form-item__error"
v-if=
"roleRootRules"
>
请选择角色权限
</div>
请选择角色权限
</div>
</div>
</div>
</div>
</div>
</el-col>
</el-col>
...
@@ -129,7 +127,7 @@ export default {
...
@@ -129,7 +127,7 @@ export default {
this
.
getMerchantTree
(
id
,
res
.
responseList
)
this
.
getMerchantTree
(
id
,
res
.
responseList
)
this
.
$refs
.
productFrom
.
accountTypeSearchRequest
({
id
:
res
.
merchantId
},
this
.
roleInfo
.
responseList
)
this
.
$refs
.
productFrom
.
accountTypeSearchRequest
({
id
:
res
.
merchantId
},
this
.
roleInfo
.
responseList
)
this
.
rootList
=
res
.
responseList
||
[]
this
.
rootList
=
res
.
responseList
||
[]
if
(
res
.
delFlag
==
1
)
{
if
(
res
.
delFlag
==
1
)
{
this
.
selectMerchant
(
res
.
merchantId
)
this
.
selectMerchant
(
res
.
merchantId
)
}
}
})
})
...
@@ -152,6 +150,10 @@ export default {
...
@@ -152,6 +150,10 @@ export default {
getMerchantName
()
{
getMerchantName
()
{
this
.
$apis
.
role
.
merchantDataList
({
source
:
'glsx'
}).
then
(
res
=>
{
this
.
$apis
.
role
.
merchantDataList
({
source
:
'glsx'
}).
then
(
res
=>
{
this
.
merchantList
=
res
this
.
merchantList
=
res
if
(
this
.
accountLevel
==
4
)
{
this
.
ruleForm
.
merchantId
=
this
.
merchantList
[
0
].
id
this
.
selectMerchant
(
this
.
merchantList
[
0
].
id
)
}
// this.filterList()
// this.filterList()
})
})
},
},
...
@@ -195,7 +197,7 @@ export default {
...
@@ -195,7 +197,7 @@ export default {
})
})
console
.
log
(
this
.
rootList
,
accounttypeId
,
'99999'
)
console
.
log
(
this
.
rootList
,
accounttypeId
,
'99999'
)
this
.
accounttypeIds
=
accounttypeId
this
.
accounttypeIds
=
accounttypeId
this
.
$refs
.
productFrom
.
findMenuFunTree
(
item
.
accounttypeId
,
item
.
select
)
this
.
$refs
.
productFrom
.
findMenuFunTree
(
item
.
accounttypeId
,
item
.
select
)
},
},
// 确定按钮---处理参数---提交数据---创建为0---草稿为1
// 确定按钮---处理参数---提交数据---创建为0---草稿为1
...
@@ -294,6 +296,11 @@ export default {
...
@@ -294,6 +296,11 @@ export default {
},
},
async
created
()
{
async
created
()
{
const
{
session
}
=
this
.
$globalState
this
.
accountLevel
=
session
.
accountLevel
if
(
this
.
accountLevel
==
4
)
{
this
.
ruleForm
.
merchantName
=
session
.
merchantName
}
let
id
=
Number
(
this
.
$route
.
params
.
id
)
let
id
=
Number
(
this
.
$route
.
params
.
id
)
if
(
!
id
)
{
if
(
!
id
)
{
this
.
pageName
=
'新增角色'
this
.
pageName
=
'新增角色'
...
@@ -307,20 +314,14 @@ export default {
...
@@ -307,20 +314,14 @@ export default {
// document.getElementsByClassName('el-breadcrumb__item')[3].innerText='修改角色'
// document.getElementsByClassName('el-breadcrumb__item')[3].innerText='修改角色'
// document.getElementById('tab-/account/role/create').innerHTML='修改角色'
// document.getElementById('tab-/account/role/create').innerHTML='修改角色'
}
}
const
{
session
}
=
this
.
$globalState
this
.
accountLevel
=
session
.
accountLevel
if
(
this
.
accountLevel
==
4
){
this
.
ruleForm
.
merchantId
=
session
.
merchantId
this
.
ruleForm
.
merchantName
=
session
.
merchantName
}
},
},
mounted
()
{
mounted
()
{
this
.
footerLeft
=
document
.
querySelector
(
'.base-container-right'
).
offsetLeft
this
.
footerLeft
=
document
.
querySelector
(
'.base-container-right'
).
offsetLeft
this
.
footerWidth
=
document
.
documentElement
.
clientWidth
-
this
.
footerLeft
this
.
footerWidth
=
document
.
documentElement
.
clientWidth
-
this
.
footerLeft
if
(
this
.
accountLevel
==
4
){
//
if(this.accountLevel==4){
this
.
selectMerchant
(
this
.
ruleForm
.
merchantId
)
//
this.selectMerchant(this.ruleForm.merchantId)
}
//
}
}
}
}
}
</
script
>
</
script
>
...
...
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