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
2352d021
Commit
2352d021
authored
May 06, 2020
by
zhangjianguo
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
http://gitlab.oytour.com/huangyuanyuan/electricitysheep
parents
da61ea06
12f51a86
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
832 additions
and
68 deletions
+832
-68
NavigationLinks.vue
src/components/common/NavigationLinks.vue
+80
-0
banner.vue
src/components/sallCenter/plugin/banner.vue
+238
-0
navigationIcon.vue
src/components/sallCenter/plugin/navigationIcon.vue
+375
-0
search.vue
src/components/sallCenter/plugin/search.vue
+12
-62
templateEdit.vue
src/components/sallCenter/templateEdit.vue
+127
-6
No files found.
src/components/common/NavigationLinks.vue
0 → 100644
View file @
2352d021
<
style
>
</
style
>
<
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
label=
"导航名称"
>
<template
slot-scope=
"scope"
>
{{
scope
.
row
.
NavIconName
}}
</
template
>
</el-table-column>
<el-table-column
prop=
"name"
label=
"导航链接"
>
<
template
slot-scope=
"scope"
>
{{
scope
.
row
.
NavIconUrl
}}
</
template
>
</el-table-column>
</el-table>
<el-pagination
style=
"text-align:right"
background
@
current-change=
"handleCurrentChange"
:page-size=
"msg.pageSize"
layout=
"prev, pager, next"
:total=
"total"
>
</el-pagination>
</div>
</template>
<
script
>
export
default
{
data
()
{
return
{
loading
:
false
,
dataList
:
[],
msg
:
{
pageIndex
:
1
,
pageSize
:
15
,
NavIconName
:
""
,
MallBaseId
:
0
,
},
total
:
0
,
navArr
:[]
};
},
created
()
{
},
methods
:
{
handleCurrentChange
(
val
)
{
this
.
msg
.
pageIndex
=
val
;
this
.
getList
();
},
getList
()
{
this
.
apipost
(
"/api/Tenant/GetMiniProgrameNaviconPage"
,
this
.
msg
,
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
dataList
=
res
.
data
.
data
.
pageData
;
this
.
total
=
res
.
data
.
data
.
count
;
console
.
log
(
this
.
dataList
,
'datalist'
);
}
else
{
this
.
Info
(
res
.
data
.
message
);
}
})
},
handleSelectionChange
(
val
){
this
.
navArr
=
val
;
},
getChooseLink
(){
var
newArr
=
[];
this
.
navArr
.
forEach
(
x
=>
{
let
obj
=
{
icon
:
x
.
NavIconImg
,
name
:
x
.
NavIconName
,
url
:
x
.
NavIconUrl
,
openType
:
'navigate'
,
key
:
'diy'
}
newArr
.
push
(
obj
);
})
return
newArr
;
}
},
mounted
()
{
this
.
getList
();
}
};
</
script
>
src/components/sallCenter/plugin/banner.vue
0 → 100644
View file @
2352d021
<
style
>
.banner-container
{
background-color
:
#fff
;
}
.banner-container
.el-carousel
{
height
:
100%
;
}
.banner-container
.el-carousel__container
{
height
:
100%
;
}
.bannerStyle-item
{
width
:
100px
;
border
:
1px
solid
#ebeef5
;
cursor
:
pointer
;
padding
:
5px
;
line-height
:
normal
;
text-align
:
center
;
color
:
#606266
;
}
.banner_active
{
border-color
:
#00a0e9
;
color
:
#409EFF
;
}
.banner-style-1
{
background
:
#e6f4ff
;
display
:
block
;
height
:
50px
;
margin
:
0
auto
5px
;
position
:
relative
;
}
.banner-style-2
{
display
:
block
;
height
:
50px
;
margin
:
0
auto
5px
;
position
:
relative
;
}
.banner-style-2
>
div
{
background
:
#e6f4ff
;
position
:
absolute
;
left
:
0
;
top
:
10%
;
height
:
50px
;
width
:
100%
;
z-index
:
0
;
zoom
:
.75
;
}
.banner-style-2
>
div
:last-child
{
left
:
15%
;
zoom
:
1
;
box-shadow
:
0
0
5px
rgba
(
0
,
0
,
0
,
.2
);
z-index
:
1
;
width
:
70%
;
top
:
0
;
}
.banner-edit-item
{
border
:
1px
solid
#dcdfe6
;
padding
:
5px
;
margin-bottom
:
5px
;
}
.navapp-image-upload
.pic-box
{
width
:
70px
;
height
:
70px
;
border
:
1px
solid
#ccc
;
cursor
:
pointer
;
background-color
:
#fff
;
background-size
:
contain
;
background-position
:
center
;
background-repeat
:
no-repeat
;
position
:
relative
;
}
.banner-edit-options
.el-button
{
height
:
25px
;
line-height
:
25px
;
width
:
25px
;
padding
:
0
;
text-align
:
center
;
border
:
none
;
border-radius
:
0
;
position
:
absolute
;
margin-left
:
0
;
}
.navapp-image-upload
.pic-box
.size-tip
{
line-height
:
1.35
;
text-align
:
center
;
position
:
absolute
;
bottom
:
0
;
left
:
0
;
width
:
100%
;
white-space
:
nowrap
;
overflow
:
hidden
;
text-overflow
:
ellipsis
;
font-size
:
12px
;
color
:
#fff
;
background
:
rgba
(
0
,
0
,
0
,
0.2
);
letter-spacing
:
-1px
;
}
.navapp-image-upload
.pic-box
i
{
font-size
:
22px
;
color
:
#909399
;
}
</
style
>
<
template
>
<div
:class=
"
{'active':banData.isCked}">
<div
class=
"diy-component-options"
v-if=
"banData.isCked"
>
<el-button
type=
"primary"
icon=
"el-icon-delete"
style=
"left: -25px; top: 0px;"
></el-button>
<el-button
type=
"primary"
icon=
"el-icon-document-copy"
style=
"left: -25px; top: 30px;"
></el-button>
<el-button
type=
"primary"
icon=
"el-icon-arrow-up"
v-if=
"index>0"
@
click=
"resetSord(0)"
style=
"right: -25px; top: 0;"
></el-button>
<el-button
type=
"primary"
icon=
"el-icon-arrow-down"
v-if=
"index!=dataLeng-1"
@
click=
"resetSord(1)"
style=
"right: -25px; top: 30px;"
></el-button>
</div>
<div
class=
"diy-component-preview"
>
<div
class=
"banner-container"
:style=
"
{height:banData.data.height+'px'}">
<el-carousel
:interval=
"3000"
arrow=
"always"
>
<el-carousel-item
v-for=
"item in 4"
:key=
"item"
>
<h3>
{{
item
}}
</h3>
</el-carousel-item>
</el-carousel>
</div>
</div>
<div
class=
"diy-component-edit"
v-if=
"banData.isCked"
>
<el-form
label-width=
"100px;"
>
<el-form-item
label=
"样式"
>
<div
flex=
"dir:left"
>
<div
class=
"bannerStyle-item banner_active"
>
<div
class=
"banner-style-1"
></div>
<div>
样式1
</div>
</div>
<div
class=
"bannerStyle-item"
style=
"margin-left:5px;"
>
<div
flex
class=
"banner-style-2"
>
<div></div>
<div></div>
</div>
<div>
样式2
</div>
</div>
</div>
</el-form-item>
<el-form-item
label=
"填充方式"
>
<el-radio-group
v-model=
"banData.data.fill"
>
<el-radio
:label=
"0"
>
留白
</el-radio>
<el-radio
:label=
"1"
>
填充
</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item
label=
"高度"
>
<el-input
type=
"number"
size=
"small"
v-model=
"banData.data.height"
>
<template
slot=
"append"
>
px
</
template
>
</el-input>
</el-form-item>
<el-form-item
label=
"拉取轮播图"
>
<el-button
size=
"small"
>
选择
</el-button>
</el-form-item>
<el-form-item
label=
"轮播图"
>
<div
flex=
"dir:top"
>
<div
class=
"banner-edit-item"
v-for=
"(item,index) in banData.data.banners"
:key=
"index"
>
<div
class=
"banner-edit-options"
>
<el-button
type=
"primary"
icon=
"el-icon-delete"
@
click=
"delBanner(index)"
style=
"top: -6px; right: -31px;"
></el-button>
</div>
<div
flex=
"box:first"
>
<div>
<div
class=
"navapp-image-upload"
style=
"margin-right:5px;"
>
<div
flex=
"main:center cross:center"
class=
"pic-box"
:style=
"{backgroundImage:'url(' + item.picUrl + ')'}"
>
<i
class=
"el-icon-picture-outline"
v-if=
"item.picUrl==''"
></i>
<div
class=
"size-tip"
>
720 × 250
</div>
</div>
</div>
</div>
<div>
<div>
<el-input
type=
"text"
v-model=
"item.url"
placeholder=
"点击选择链接"
size=
"small"
>
<el-button
slot=
"append"
@
click=
"getMyChoice(index)"
>
选择链接
</el-button>
</el-input>
</div>
</div>
</div>
</div>
</div>
<el-button
size=
"small"
@
click=
"addBanner()"
>
添加轮播图
</el-button>
</el-form-item>
</el-form>
</div>
<el-dialog
title=
"选择链接"
:visible
.
sync=
"isShowLink"
width=
"800px"
>
<chooseMeun
ref=
"chooseMeun"
></chooseMeun>
<span
slot=
"footer"
class=
"dialog-footer"
>
<el-button
size=
"small"
@
click=
"isShowLink=false"
>
取 消
</el-button>
<el-button
size=
"small"
type=
"danger"
@
click=
"getChoiceLink()"
>
确 定
</el-button>
</span>
</el-dialog>
</div>
</template>
<
script
>
import
chooseMeun
from
"../../common/chooseMeun.vue"
;
export
default
{
props
:
[
"banData"
,
"index"
,
"dataLeng"
],
data
()
{
return
{
isShowLink
:
false
,
commonIndex
:
0
,
};
},
components
:
{
chooseMeun
,
},
created
()
{
},
methods
:
{
//添加轮播图
addBanner
(){
let
obj
=
{
picUrl
:
''
,
url
:
''
,
openType
:
''
}
this
.
banData
.
data
.
banners
.
push
(
obj
);
},
//删除banner
delBanner
(
index
){
this
.
banData
.
data
.
banners
.
splice
(
index
,
1
);
},
//选择链接
getMyChoice
(
index
){
this
.
isShowLink
=
true
;
this
.
commonIndex
=
index
;
},
//获取选择链接
getChoiceLink
(){
//调用子组件方法
var
obj
=
this
.
$refs
.
chooseMeun
.
getChooseMenu
();
this
.
banData
.
data
.
banners
[
this
.
commonIndex
].
url
=
obj
.
PageUrl
;
this
.
isShowLink
=
false
;
},
},
mounted
()
{
}
};
</
script
>
\ No newline at end of file
src/components/sallCenter/plugin/navigationIcon.vue
0 → 100644
View file @
2352d021
This diff is collapsed.
Click to expand it.
src/components/sallCenter/plugin/search.vue
View file @
2352d021
<
style
>
.diy-component-preview
{
cursor
:
pointer
;
position
:
relative
;
zoom
:
0.5
;
-moz-transform
:
scale
(
0.5
);
-moz-transform-origin
:
top
left
;
font-size
:
28px
;
}
.diy-component-edit
{
position
:
absolute
;
top
:
0
;
bottom
:
0
;
left
:
465px
;
right
:
0
;
background
:
#fff
;
padding
:
20px
;
overflow
:
auto
;
min-width
:
650px
;
padding-right
:
20%
;
}
.diy-component-options
{
position
:
relative
;
}
.active
.diy-component-preview
{
border
:
2px
dashed
#409EFF
;
left
:
-2px
;
right
:
-2px
;
width
:
calc
(
100%
+
4px
);
}
.diy-search
{
padding
:
24px
;
cursor
:
pointer
;
background
:
rgb
(
242
,
242
,
242
);
}
.diy-component-options
.el-button
{
height
:
25px
;
line-height
:
25px
;
width
:
25px
;
padding
:
0
;
text-align
:
center
;
border
:
none
;
border-radius
:
0
;
position
:
absolute
;
margin-left
:
0
;
}
.diy-search
>
div
{
height
:
60px
;
line-height
:
60px
;
padding
:
0
24px
;
font-size
:
28px
;
}
.diy-component-edit
.el-color-picker
{
vertical-align
:
middle
;
}
</
style
>
<
template
>
<div
:class=
"
{'a
v
ctive':searchData.isCked}">
<div
:class=
"
{'active':searchData.isCked}">
<div
class=
"diy-component-options"
v-if=
"searchData.isCked"
>
<el-button
type=
"primary"
icon=
"el-icon-delete"
style=
"left: -25px; top: 0px;"
></el-button>
<el-button
type=
"primary"
icon=
"el-icon-document-copy"
style=
"left: -25px; top: 30px;"
></el-button>
<el-button
type=
"primary"
icon=
"el-icon-arrow-up"
v-if=
"index>0"
@
click=
"resetSord(0)"
style=
"right: -25px; top: 0;"
></el-button>
<el-button
type=
"primary"
icon=
"el-icon-arrow-down"
v-if=
"index!=dataLeng-1"
@
click=
"resetSord(1)"
style=
"right: -25px; top: 30px;"
></el-button>
</div>
<div
class=
"diy-component-preview"
>
<div
class=
"diy-search"
>
<div
style=
"background: rgb(255, 255, 255); border-radius: 4px; color: rgb(85, 85, 85); text-align: left;"
>
搜索
<div
class=
"diy-search"
:style=
"
{background:searchData.data.background}">
<div
:style=
"
{background:searchData.data.color,borderRadius:searchData.data.radius+'px',color:searchData.data.textColor,textAlign:searchData.data.textPosition}"
>
{{
searchData
.
data
.
placeholder
}}
</div>
</div>
</div>
</div>
<div
class=
"diy-component-edit"
v-if=
"searchData.isCked"
>
<el-form
label-width=
"100px"
>
<el-form-item
label=
"搜索框颜色"
>
...
...
@@ -97,7 +44,7 @@
</template>
<
script
>
export
default
{
props
:
[
"searchData"
],
props
:
[
"searchData"
,
"index"
,
"dataLeng"
],
data
()
{
return
{
...
...
@@ -106,9 +53,12 @@
created
()
{
},
methods
:
{
//向父组件传值 并调用排序
resetSord
(
IsUp
){
this
.
$emit
(
'getSord'
,
this
.
index
,
IsUp
);
}
},
mounted
()
{
console
.
log
(
this
.
searchData
,
'data'
);
}
};
...
...
src/components/sallCenter/templateEdit.vue
View file @
2352d021
...
...
@@ -87,6 +87,68 @@
background-position
:
left
center
;
}
.diy-component-preview
{
cursor
:
pointer
;
position
:
relative
;
zoom
:
0.5
;
-moz-transform
:
scale
(
0.5
);
-moz-transform-origin
:
top
left
;
font-size
:
28px
;
}
.diy-component-edit
{
position
:
absolute
;
top
:
0
;
bottom
:
0
;
left
:
465px
;
right
:
0
;
background
:
#fff
;
padding
:
20px
;
overflow
:
auto
;
min-width
:
650px
;
padding-right
:
20%
;
}
.diy-component-options
{
position
:
relative
;
}
.active
.diy-component-preview
{
border
:
2px
dashed
#409EFF
;
left
:
-2px
;
right
:
-2px
;
width
:
calc
(
100%
+
4px
);
}
.diy-search
{
padding
:
24px
;
cursor
:
pointer
;
background
:
rgb
(
242
,
242
,
242
);
}
.diy-component-options
.el-button
{
height
:
25px
;
line-height
:
25px
;
width
:
25px
;
padding
:
0
;
text-align
:
center
;
border
:
none
;
border-radius
:
0
;
position
:
absolute
;
margin-left
:
0
;
}
.diy-search
>
div
{
height
:
60px
;
line-height
:
60px
;
padding
:
0
24px
;
font-size
:
28px
;
}
.diy-component-edit
.el-color-picker
{
vertical-align
:
middle
;
}
.tpEdit_btmMenu
{
height
:
54px
;
width
:
100%
;
display
:
flex
;
align-items
:
center
;
justify-content
:
center
;
background
:
#fff
;
}
</
style
>
<
template
>
<div
class=
"templateEdit"
>
...
...
@@ -130,17 +192,24 @@
</div>
<!-- 为空的样式结束 -->
<div
v-for=
"(item,index) in dataList"
:key=
"index"
@
click=
"getItem(item)"
>
<search
v-if=
"item.Id=='search'"
:searchData=
"item"
></search>
<search
v-if=
"item.Id=='search'"
:searchData=
"item"
@
getSord=
"getSord"
:index=
"index"
:dataLeng=
"dataList.length"
></search>
<navigationIcon
v-if=
"item.Id=='nav'"
:navData=
"item"
@
getSord=
"getSord"
:index=
"index"
:dataLeng=
"dataList.length"
></navigationIcon>
<banner
v-if=
"item.Id=='banner'"
:banData=
"item"
@
getSord=
"getSord"
:index=
"index"
:dataLeng=
"dataList.length"
></banner>
</div>
</div>
</div>
</div>
</div>
</div>
<div
class=
"tpEdit_btmMenu"
>
<el-button
type=
"primary"
size=
"small"
>
保存
</el-button>
</div>
</div>
</
template
>
<
script
>
import
search
from
"../sallCenter/plugin/search.vue"
import
navigationIcon
from
"../sallCenter/plugin/navigationIcon.vue"
import
banner
from
"../sallCenter/plugin/banner.vue"
export
default
{
data
()
{
return
{
...
...
@@ -154,7 +223,9 @@
},
components
:
{
search
search
,
navigationIcon
,
banner
,
},
methods
:
{
//获取左侧菜单
...
...
@@ -162,6 +233,7 @@
this
.
apipost
(
"/api/Tenant/GetPlugInList"
,
{},
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
allComponents
=
res
.
data
.
data
;
console
.
log
(
this
.
allComponents
);
}
else
{
this
.
Info
(
res
.
data
.
message
);
}
...
...
@@ -173,7 +245,7 @@
switch
(
Id
.
toString
())
{
//搜索
case
'search'
:
let
o
bj
=
{
let
searchO
bj
=
{
Id
:
'search'
,
isCked
:
false
,
data
:{
...
...
@@ -185,13 +257,62 @@
textPosition
:
"left"
}
}
this
.
dataList
.
push
(
o
bj
);
this
.
dataList
.
push
(
searchO
bj
);
break
;
case
n
:
case
'nav'
:
let
navObj
=
{
Id
:
'nav'
,
isCked
:
false
,
data
:{
color
:
'#353535'
,
rows
:
1
,
columns
:
3
,
scroll
:
true
,
navs
:[],
showImg
:
false
,
backgroundColor
:
'#ffffff'
,
backgroundPicUrl
:
''
,
position
:
5
,
mode
:
1
,
backgroundHeight
:
100
,
backgroundWidth
:
100
,
borderBackground
:
'#ffffff'
}
}
this
.
dataList
.
push
(
navObj
);
break
;
case
'banner'
:
let
banObj
=
{
Id
:
"banner"
,
isCked
:
false
,
data
:{
style
:
1
,
fill
:
1
,
//填充方式0-留白 1填充
height
:
450
,
banners
:[],
}
}
this
.
dataList
.
push
(
banObj
);
break
;
}
},
//给子组件调用 重新排序上移下移
getSord
(
index
,
IsUp
){
var
currentItem
=
this
.
dataList
[
index
];
if
(
IsUp
==
0
){
if
(
index
>
0
)
{
var
upItem
=
this
.
dataList
[
index
-
1
];
this
.
$set
(
this
.
dataList
,
index
-
1
,
currentItem
);
this
.
$set
(
this
.
dataList
,
index
,
upItem
);
}
}
else
{
if
(
index
!=
this
.
dataList
.
length
-
1
){
var
downItem
=
this
.
dataList
[
index
+
1
];
this
.
$set
(
this
.
dataList
,
index
+
1
,
currentItem
);
this
.
$set
(
this
.
dataList
,
index
,
downItem
);
}
}
},
//点击选中
getItem
(
item
){
this
.
dataList
.
forEach
(
x
=>
{
...
...
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