Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
SuperMan
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
1
Issues
1
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
罗超
SuperMan
Commits
18421cf2
Commit
18421cf2
authored
Mar 14, 2019
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
广告图修改
parent
6df32693
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
178 additions
and
172 deletions
+178
-172
GroupAdvertising.vue
src/components/TravelManager/TravelList/GroupAdvertising.vue
+178
-172
No files found.
src/components/TravelManager/TravelList/GroupAdvertising.vue
View file @
18421cf2
<
style
>
<
style
>
@import
"../../../assets/css/advert/advmanager"
;
@import
"../../../assets/css/advert/advmanager"
;
.GroupAdvert
.zezhao
{
left
:
0
!important
;
top
:
0
!important
;
bottom
:
0
!important
;
width
:
100%
;
height
:
100%
;
z-index
:
999
;}
.GroupAdvert
.zezhao
{
left
:
0
!important
;
top
:
0
!important
;
bottom
:
0
!important
;
width
:
100%
;
height
:
100%
;
z-index
:
999
;}
.GroupAdvert
img
{
width
:
100%
;
height
:
100%
;}
.GroupAdvert
img
{
width
:
100%
;
height
:
100%
;}
</
style
>
</
style
>
<
template
>
<
template
>
<div
class=
"advmanager-box"
>
<div
class=
"advmanager-box"
>
<div
class=
"query-box"
>
<div
class=
"query-box"
>
<ul>
<ul>
<li>
<li>
<span>
<span>
<em>
广告类型
</em>
<em>
广告类型
</em>
<el-select
class=
'w150'
v-model=
"msg.AdType"
filterable
:placeholder=
"$t('pub.pleaseSel')"
>
<el-select
class=
'w150'
v-model=
"msg.AdType"
filterable
:placeholder=
"$t('pub.pleaseSel')"
>
<el-option
:label=
"$t('pub.unlimitedSel')"
:value=
'SelectDefaultValue'
></el-option>
<el-option
:label=
"$t('pub.unlimitedSel')"
:value=
'SelectDefaultValue'
></el-option>
<el-option
v-for=
"item in AdTypeList"
:label=
'item.name'
:value=
'item.Id'
:key=
'item.Id'
>
<el-option
v-for=
"item in AdTypeList"
:label=
'item.name'
:value=
'item.Id'
:key=
'item.Id'
>
</el-option>
</el-option>
</el-select>
</el-select>
</span>
</span>
</li>
</li>
<li>
<li>
<span>
<span>
<input
type=
"button"
class=
"normalBtn"
@
click=
"getaddatas"
value=
"查询"
/>
<input
type=
"button"
class=
"normalBtn"
@
click=
"getaddatas"
value=
"查询"
/>
</span>
</span>
<span>
<span>
<el-upload
class=
"upload-demo"
:http-request=
"UploadImage"
:multiple=
"true"
accept=
"image/jpeg,image/gif,image/png,image/bmp"
<el-upload
class=
"upload-demo"
:http-request=
"UploadImage"
:multiple=
"true"
accept=
"image/jpeg,image/gif,image/png,image/bmp"
:show-file-list=
"false"
action=
""
>
:show-file-list=
"false"
action=
""
>
<input
type=
"button"
class=
"normalBtn"
value=
"上传图片"
/>
<input
type=
"button"
class=
"normalBtn"
value=
"上传图片"
/>
</el-upload>
</el-upload>
</span>
</span>
<span>
<span>
<input
type=
"button"
class=
"normalBtn"
@
click=
'goUrl("advert",LineID,msg.TCID,"制作广告")'
value=
"制作广告"
/>
<input
type=
"button"
class=
"normalBtn"
@
click=
'goUrl("advert",LineID,msg.TCID,"制作广告")'
value=
"制作广告"
/>
</span>
</span>
</li>
</li>
</ul>
</ul>
</div>
</div>
<div
class=
"content GroupAdvert"
>
<div
class=
"content GroupAdvert"
>
<ul>
<ul>
<li
v-for=
'(item,index) in dataList'
:key=
"item.id"
@
click=
"getPicList(index)"
>
<li
v-for=
'(item,index) in dataList'
:key=
"item.id"
@
click=
"getPicList(index)"
>
<div
class=
"img-box"
>
<div
class=
"img-box"
>
<img
:src=
"item.AdvertisingPicUrl"
/>
<img
:src=
"item.AdvertisingPicUrl"
/>
<span
class=
"free"
v-if=
"item.AdType==1"
>
广告
</span>
<span
class=
"free"
v-if=
"item.AdType==1"
>
广告
</span>
<span
class=
"free"
v-if=
"item.AdType==2"
>
本地
</span>
<span
class=
"free"
v-if=
"item.AdType==2"
>
本地
</span>
<div
class=
"zezhao"
>
<div
class=
"zezhao"
>
<a
v-if=
"item.AdType==1"
:href=
'`/#/advert?id=$
{item.AdvertId}
&
TCID=${item.TCID}`'>
<i
class=
"el-icon-edit"
title=
"修改"
></i></a>
<a
v-if=
"item.AdType==1"
:href=
'`/#/advert?id=$
{item.AdvertId}
&
TCID=${item.TCID}`'>
<i
class=
"el-icon-edit"
<a
:href=
'item.AdvertisingPicUrl'
download=
"广告图.png"
><i
class=
"el-icon-download"
title=
"下载"
></i></a>
title=
"修改"
></i></a>
<i
class=
"el-icon-delete"
title=
"删除"
@
click
.
stop=
"deleteItem(item.ID)"
></i>
<a
:href=
'item.AdvertisingPicUrl'
download=
"广告图.png"
><i
class=
"el-icon-download"
title=
"下载"
></i></a>
</div>
<i
class=
"el-icon-delete"
title=
"删除"
@
click
.
stop=
"deleteItem(item.ID)"
></i>
</div>
</li>
</ul>
<div
v-if=
'dataList.length==0'
style=
'width:100%;margin-top:50px;text-align:center;color: #ccc;'
>
<i
class=
"iconfont icon-kong"
style=
"font-size: 120px;"
></i><br/>
还没有广告哦
</div>
</div>
</div>
</div>
<div
v-if=
'picIsShow'
class=
"viewBigPicLayer"
@
click=
"picIsShow=false"
>
</li>
<i
class=
"el-icon-circle-close-outline clolseViewBigPicLayer"
@
click=
"picIsShow=false"
></i>
</ul>
<el-carousel
height=
"600px"
:initial-index=
'initialIndex'
:interval=
"5000"
trigger=
"click"
>
<div
v-if=
'dataList.length==0'
style=
'width:100%;margin-top:50px;text-align:center;color: #ccc;'
>
<el-carousel-item
v-for=
"(item,index) in picObj"
:key=
"index"
>
<i
class=
"iconfont icon-kong"
style=
"font-size: 120px;"
></i><br
/>
<div
class=
"inlineDiv ownScrollbarStyle"
><img
:src=
"item"
/></div>
还没有广告哦
</el-carousel-item>
</div>
</el-carousel>
</div>
</div>
<div
v-if=
'picIsShow'
class=
"viewBigPicLayer"
@
click=
"picIsShow=false"
>
<i
class=
"el-icon-circle-close-outline clolseViewBigPicLayer"
@
click=
"picIsShow=false"
></i>
<el-carousel
height=
"600px"
:initial-index=
'initialIndex'
:interval=
"5000"
trigger=
"click"
>
<el-carousel-item
v-for=
"(item,index) in picObj"
:key=
"index"
>
<div
class=
"inlineDiv ownScrollbarStyle"
><img
:src=
"item"
/></div>
</el-carousel-item>
</el-carousel>
</div>
</div>
</div>
</
template
>
</
template
>
<
script
>
<
script
>
import
vueWaterfallEasy
from
'vue-waterfall-easy'
import
vueWaterfallEasy
from
'vue-waterfall-easy'
export
default
{
export
default
{
data
(){
data
()
{
return
{
return
{
dataList
:
[],
dataList
:
[],
pageIndex
:
0
,
pageIndex
:
0
,
pageSize
:
15
,
pageSize
:
15
,
picObj
:
[],
picObj
:
[],
picIsShow
:
false
,
picIsShow
:
false
,
initialIndex
:
0
,
initialIndex
:
0
,
total
:
0
,
total
:
0
,
LineID
:
0
,
LineID
:
0
,
msg
:
{
msg
:
{
TCID
:
0
,
TCID
:
0
,
AdType
:
0
AdType
:
0
},
},
SelectDefaultValue
:
0
,
SelectDefaultValue
:
0
,
AdTypeList
:
[{
AdTypeList
:
[{
Id
:
1
,
Id
:
1
,
name
:
'广告制作'
name
:
'广告制作'
},
{
},
{
Id
:
2
,
Id
:
2
,
name
:
'本地上传'
name
:
'本地上传'
}],
}],
}
}
},
},
components
:
{
components
:
{
vueWaterfallEasy
vueWaterfallEasy
},
},
mounted
(){
mounted
()
{
this
.
msg
.
TCID
=
this
.
$route
.
query
.
TCID
;
this
.
msg
.
TCID
=
this
.
$route
.
query
.
TCID
;
this
.
LineID
=
this
.
$route
.
query
.
LineID
this
.
LineID
=
this
.
$route
.
query
.
LineID
this
.
user
=
JSON
.
parse
(
window
.
localStorage
.
userInfo
)
this
.
user
=
JSON
.
parse
(
window
.
localStorage
.
userInfo
)
this
.
getaddatas
()
this
.
getaddatas
()
},
},
methods
:{
methods
:
{
//删除广告
//删除广告
deleteItem
(
ID
){
deleteItem
(
ID
)
{
var
that
=
this
;
var
that
=
this
;
var
Ids
=
[];
var
Ids
=
[];
Ids
.
push
(
ID
);
Ids
.
push
(
ID
);
that
.
Confirm
(
"是否删除?"
,
function
()
{
that
.
Confirm
(
"是否删除?"
,
function
()
{
var
msg
=
{
var
msg
=
{
Ids
:
Ids
Ids
:
Ids
};
};
that
.
apipost
(
that
.
apipost
(
"travel_post_DeletePriceAdvert"
,
"travel_post_DeletePriceAdvert"
,
msg
,
msg
,
res
=>
{
res
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
if
(
res
.
data
.
resultCode
==
1
)
{
that
.
Success
(
res
.
data
.
message
);
that
.
Success
(
res
.
data
.
message
);
that
.
getaddatas
();
that
.
getaddatas
();
}
}
},
},
null
null
);
);
});
});
},
},
handleCurrentChange
(
val
)
{
this
.
pageIndex
++
this
.
getaddatas
()
},
getaddatas
(){
this
.
apipost
(
"travel_post_GetPriceAdvert"
,
this
.
msg
,
res
=>
{
if
(
res
.
data
.
resultCode
==
1
){
this
.
dataList
=
res
.
data
.
data
;
console
.
log
(
this
.
dataList
,
'dataListtttt'
);
}
else
{
this
.
Error
(
res
.
data
.
message
);
}
},
err
=>
{})
},
//获取轮播路径
getPicList
(
index
){
this
.
picIsShow
=
true
;
this
.
picObj
=
[];
this
.
initialIndex
=
index
;
this
.
dataList
.
forEach
((
x
,
index
)
=>
{
this
.
picObj
.
push
(
x
.
AdvertisingPicUrl
);
})
},
//上传广告图片
UploadImage
(
file
)
{
let
newArr
=
[];
newArr
.
push
(
file
.
file
);
let
fileName
=
file
.
file
.
name
;
var
path
=
"/Upload/DMC/Price/"
;
var
imgArr
=
[];
this
.
UploadSelfFile
(
path
,
newArr
,
x
=>
{
var
obj
=
this
.
$DMCUtils
.
DMCImageObj
();
var
str
=
x
.
name
;
var
imgUrl
=
this
.
domainManager
().
ViittoFileUrl
+
x
.
data
.
FilePath
;
obj
.
Path
=
x
.
data
.
FilePath
;
obj
.
ShowPath
=
imgUrl
;
imgArr
.
push
(
obj
.
Path
);
let
msg
=
{
TCID
:
this
.
msg
.
TCID
,
AdvertisingPicUrlList
:
imgArr
}
this
.
apipost
(
"travel_post_AddPriceLocalAdvert"
,
msg
,
res
=>
{
handleCurrentChange
(
val
)
{
if
(
res
.
data
.
resultCode
==
1
){
this
.
pageIndex
++
this
.
Success
(
res
.
data
.
message
);
this
.
getaddatas
()
this
.
getaddatas
();
},
}
else
{
getaddatas
()
{
this
.
Error
(
res
.
data
.
message
);
this
.
apipost
(
"travel_post_GetPriceAdvert"
,
this
.
msg
,
res
=>
{
}
if
(
res
.
data
.
resultCode
==
1
)
{
},
err
=>
{})
this
.
dataList
=
res
.
data
.
data
;
}
else
{
this
.
Error
(
res
.
data
.
message
);
}
},
err
=>
{})
},
//获取轮播路径
getPicList
(
index
)
{
this
.
picIsShow
=
true
;
this
.
picObj
=
[];
this
.
initialIndex
=
index
;
this
.
dataList
.
forEach
((
x
,
index
)
=>
{
this
.
picObj
.
push
(
x
.
AdvertisingPicUrl
);
})
},
//上传广告图片
UploadImage
(
file
)
{
let
newArr
=
[];
newArr
.
push
(
file
.
file
);
let
fileName
=
file
.
file
.
name
;
var
path
=
"/Upload/DMC/Price/"
;
var
imgArr
=
[];
this
.
UploadSelfFile
(
path
,
newArr
,
x
=>
{
var
obj
=
this
.
$DMCUtils
.
DMCImageObj
();
var
str
=
x
.
name
;
var
imgUrl
=
this
.
domainManager
().
ViittoFileUrl
+
x
.
data
.
FilePath
;
obj
.
Path
=
x
.
data
.
FilePath
;
obj
.
ShowPath
=
imgUrl
;
imgArr
.
push
(
obj
.
Path
);
let
msg
=
{
TCID
:
this
.
msg
.
TCID
,
AdvertisingPicUrlList
:
imgArr
}
});
this
.
apipost
(
"travel_post_AddPriceLocalAdvert"
,
msg
,
res
=>
{
},
if
(
res
.
data
.
resultCode
==
1
)
{
//跳转
this
.
Success
(
res
.
data
.
message
);
goUrl
(
path
,
LineID
,
TCID
,
name
)
{
this
.
getaddatas
();
this
.
$router
.
push
({
}
else
{
name
:
path
,
this
.
Error
(
res
.
data
.
message
);
query
:
{
LineID
:
LineID
,
TCID
:
TCID
,
blank
:
'y'
,
tab
:
name
}
}
});
},
err
=>
{})
},
});
},
//跳转
goUrl
(
path
,
LineID
,
TCID
,
name
)
{
this
.
$router
.
push
({
name
:
path
,
query
:
{
LineID
:
LineID
,
TCID
:
TCID
,
blank
:
'y'
,
tab
:
name
}
});
},
}
}
}
}
</
script
>
\ No newline at end of file
</
script
>
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