Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
E
ElectricitySheep
Project
Project
Details
Activity
Releases
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
黄媛媛
ElectricitySheep
Commits
de359595
Commit
de359595
authored
May 21, 2020
by
zhengke
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加轮播图选择
parent
0f7f1bd1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
89 additions
and
3 deletions
+89
-3
chooseLunbo.vue
src/components/common/chooseLunbo.vue
+57
-0
banner.vue
src/components/sallCenter/plugin/banner.vue
+32
-3
No files found.
src/components/common/chooseLunbo.vue
0 → 100644
View file @
de359595
<
template
>
<div>
<el-table
ref=
"multipleTable"
:data=
"dataList"
tooltip-effect=
"dark"
style=
"width: 100%"
@
selection-change=
"handleSelectionChange"
>
<el-table-column
type=
"selection"
width=
"55"
>
</el-table-column>
<el-table-column
prop=
"NavName"
label=
"名称"
>
</el-table-column>
<el-table-column
prop=
"NavLink"
label=
"导航链接"
>
</el-table-column>
</el-table>
</div>
</
template
>
<
script
>
export
default
{
data
()
{
return
{
dataList
:
[],
selectRow
:[],
};
},
created
()
{},
methods
:
{
//获取所有菜单
getList
()
{
this
.
apipost
(
"/api/Tenant/GetMallNavList"
,
{},
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
dataList
=
res
.
data
.
data
}
else
{
this
.
Info
(
res
.
data
.
message
);
}
})
},
handleSelectionChange
(
val
){
this
.
selectRow
=
JSON
.
parse
(
JSON
.
stringify
(
val
));
},
//父组件调用方法
getChoicedLunbo
(){
return
this
.
selectRow
;
},
//清空多选方法
toggleSelection
(
rows
)
{
if
(
rows
)
{
rows
.
forEach
(
row
=>
{
this
.
$refs
.
multipleTable
.
toggleRowSelection
(
row
);
});
}
else
{
this
.
$refs
.
multipleTable
.
clearSelection
();
}
},
},
mounted
()
{
this
.
getList
();
}
};
</
script
>
src/components/sallCenter/plugin/banner.vue
View file @
de359595
...
@@ -168,7 +168,7 @@
...
@@ -168,7 +168,7 @@
</el-input>
</el-input>
</el-form-item>
</el-form-item>
<el-form-item
label=
"拉取轮播图"
>
<el-form-item
label=
"拉取轮播图"
>
<el-button
size=
"small"
>
选择
</el-button>
<el-button
size=
"small"
@
click=
"isShowLunbo=true"
>
选择
</el-button>
</el-form-item>
</el-form-item>
<el-form-item
label=
"轮播图"
>
<el-form-item
label=
"轮播图"
>
<div
flex=
"dir:top"
>
<div
flex=
"dir:top"
>
...
@@ -211,11 +211,19 @@
...
@@ -211,11 +211,19 @@
<el-dialog
title=
"选择文件"
:visible
.
sync=
"choicImg"
width=
"1240px"
>
<el-dialog
title=
"选择文件"
:visible
.
sync=
"choicImg"
width=
"1240px"
>
<ChooseImg
@
SelectId=
"SelectId"
></ChooseImg>
<ChooseImg
@
SelectId=
"SelectId"
></ChooseImg>
</el-dialog>
</el-dialog>
<!-- 选择轮播图 -->
<el-dialog
title=
"选择文件"
:visible
.
sync=
"isShowLunbo"
width=
"900px"
>
<chooseLunbo
ref=
"lunbo"
></chooseLunbo>
<span
slot=
"footer"
class=
"dialog-footer"
>
<el-button
size=
"small"
@
click=
"quxiaoLunbo()"
>
取 消
</el-button>
<el-button
size=
"small"
type=
"danger"
@
click=
"getChiceLunbo()"
>
确 定
</el-button>
</span>
</el-dialog>
</div>
</div>
</template>
</template>
<
script
>
<
script
>
import
chooseMeun
from
"../../common/chooseMeun.vue"
;
import
chooseMeun
from
"../../common/chooseMeun.vue"
;
import
chooseLunbo
from
"../../common/chooseLunbo.vue"
;
import
ChooseImg
from
"@/components/global/ChooseImg.vue"
;
import
ChooseImg
from
"@/components/global/ChooseImg.vue"
;
export
default
{
export
default
{
props
:
[
"banData"
,
"index"
,
"dataLeng"
],
props
:
[
"banData"
,
"index"
,
"dataLeng"
],
...
@@ -224,11 +232,14 @@
...
@@ -224,11 +232,14 @@
isShowLink
:
false
,
isShowLink
:
false
,
choicImg
:
false
,
choicImg
:
false
,
commonIndex
:
0
,
commonIndex
:
0
,
//显示轮播图弹窗
isShowLunbo
:
false
};
};
},
},
components
:
{
components
:
{
chooseMeun
,
chooseMeun
,
ChooseImg
ChooseImg
,
chooseLunbo
},
},
created
()
{
created
()
{
...
@@ -277,6 +288,24 @@
...
@@ -277,6 +288,24 @@
delPlugin
(){
delPlugin
(){
this
.
$emit
(
'comDelPlugin'
,
this
.
index
);
this
.
$emit
(
'comDelPlugin'
,
this
.
index
);
},
},
//取消选择
quxiaoLunbo
(){
this
.
isShowLunbo
=
false
;
this
.
$refs
.
lunbo
.
toggleSelection
();
},
getChiceLunbo
(){
var
ckedArr
=
this
.
$refs
.
lunbo
.
getChoicedLunbo
();
ckedArr
.
forEach
(
x
=>
{
let
obj
=
{
picUrl
:
this
.
getIconLink
(
x
.
NavImg
),
url
:
x
.
NavLink
,
openType
:
''
}
this
.
banData
.
data
.
banners
.
push
(
obj
);
});
this
.
isShowLunbo
=
false
;
this
.
$refs
.
lunbo
.
toggleSelection
();
}
},
},
mounted
()
{
mounted
()
{
...
...
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