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
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
18 deletions
src/views/role/create.vue
src/views/role/create.vue
View file @
e26ea39
...
...
@@ -6,12 +6,12 @@
</div>
<div
class=
"main_widget"
>
<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-option
v-for=
"item in merchantList"
:key=
"item.id"
:label=
"item.merchantName"
:value=
"item.id"
></el-option>
</el-select>
</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-form-item>
<el-form-item
label=
"所属商户"
prop=
"merchantName"
v-if=
"pageType == 'edit'"
>
...
...
@@ -21,7 +21,7 @@
<el-input
size=
"small"
maxlength=
"20"
show-word-limit
style=
"width: 40%"
v-model=
"ruleForm.roleName"
placeholder=
"请输入角色名称"
></el-input>
</el-form-item>
<el-form-item
label=
"角色说明"
prop=
"roleDesc"
>
<el-input
size=
"small"
maxlength=
"50"
show-word-limit
style=
"width: 40%"
v-model=
"ruleForm.roleDesc"
placeholder=
"请输入角色说明"
></el-input>
<el-input
size=
"small"
maxlength=
"50"
show-word-limit
style=
"width: 40%"
v-model=
"ruleForm.roleDesc"
placeholder=
"请输入角色说明"
></el-input>
</el-form-item>
<!--
<el-form-item
label=
"角色权限"
prop=
"roleRoot"
>
<div
class=
"custom_element"
>
...
...
@@ -47,9 +47,7 @@
</div>
</
template
>
</div>
<div
class=
"el-form-item__error"
v-if=
"roleRootRules"
>
请选择角色权限
</div>
<div
class=
"el-form-item__error"
v-if=
"roleRootRules"
>
请选择角色权限
</div>
</div>
</div>
</el-col>
...
...
@@ -129,7 +127,7 @@ export default {
this
.
getMerchantTree
(
id
,
res
.
responseList
)
this
.
$refs
.
productFrom
.
accountTypeSearchRequest
({
id
:
res
.
merchantId
},
this
.
roleInfo
.
responseList
)
this
.
rootList
=
res
.
responseList
||
[]
if
(
res
.
delFlag
==
1
)
{
if
(
res
.
delFlag
==
1
)
{
this
.
selectMerchant
(
res
.
merchantId
)
}
})
...
...
@@ -152,6 +150,10 @@ export default {
getMerchantName
()
{
this
.
$apis
.
role
.
merchantDataList
({
source
:
'glsx'
}).
then
(
res
=>
{
this
.
merchantList
=
res
if
(
this
.
accountLevel
==
4
)
{
this
.
ruleForm
.
merchantId
=
this
.
merchantList
[
0
].
id
this
.
selectMerchant
(
this
.
merchantList
[
0
].
id
)
}
// this.filterList()
})
},
...
...
@@ -195,7 +197,7 @@ export default {
})
console
.
log
(
this
.
rootList
,
accounttypeId
,
'99999'
)
this
.
accounttypeIds
=
accounttypeId
this
.
$refs
.
productFrom
.
findMenuFunTree
(
item
.
accounttypeId
,
item
.
select
)
this
.
$refs
.
productFrom
.
findMenuFunTree
(
item
.
accounttypeId
,
item
.
select
)
},
// 确定按钮---处理参数---提交数据---创建为0---草稿为1
...
...
@@ -293,7 +295,12 @@ 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
)
if
(
!
id
)
{
this
.
pageName
=
'新增角色'
...
...
@@ -307,20 +314,14 @@ export default {
// document.getElementsByClassName('el-breadcrumb__item')[3].innerText='修改角色'
// 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
()
{
this
.
footerLeft
=
document
.
querySelector
(
'.base-container-right'
).
offsetLeft
this
.
footerWidth
=
document
.
documentElement
.
clientWidth
-
this
.
footerLeft
if
(
this
.
accountLevel
==
4
){
this
.
selectMerchant
(
this
.
ruleForm
.
merchantId
)
}
//
if(this.accountLevel==4){
//
this.selectMerchant(this.ruleForm.merchantId)
//
}
}
}
</
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