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
b5380156
Commit
b5380156
authored
Jul 06, 2021
by
罗超
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
f2de6bc5
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
5979 additions
and
5815 deletions
+5979
-5815
cssReset.css
src/assets/css/cssReset.css
+3
-0
myadvert.vue
src/components/SalesModule/myadvert.vue
+177
-128
advmanager.vue
src/components/platformModule/advmanager.vue
+490
-381
main.js
src/main.js
+34
-32
config.js
src/router/config.js
+5275
-5274
No files found.
src/assets/css/cssReset.css
View file @
b5380156
...
...
@@ -535,6 +535,9 @@ input:-webkit-autofill {
.w780
{
width
:
780px
!important
;
}
.w1000
{
width
:
1000px
!important
;
}
.w50
{
width
:
50px
!important
;
...
...
src/components/SalesModule/myadvert.vue
View file @
b5380156
<
style
>
@import
"../../assets/css/advert/advmanager"
;
@import
"../../assets/css/advert/advmanager"
;
</
style
>
<
template
>
<div
class=
"advmanager-box"
>
<div
class=
"content"
style=
"top:50px;"
>
<!--
<ul>
<div
class=
"advmanager-box"
>
<div
class=
"content"
style=
"top: 50px"
>
<!--
<ul>
<li
v-for=
'item in addatas'
:key=
"item.id"
>
<div
class=
"img-box"
>
<img
:src=
"item.advertisingPicUrlStr"
/>
...
...
@@ -18,139 +17,189 @@
</div>
</li>
</ul>
-->
<vueWaterfallEasy
v-if=
'addatas.length!=0'
ref=
"waterfall"
:imgsArr=
"addatas"
@
scrollReachBottom=
"handleCurrentChange"
:maxCols=
'7'
:imgWidth=
'208'
:enablePullDownEvent=
'true'
>
<template
slot-scope=
"props"
>
<span
class=
"free"
><i
class=
"el-icon-share"
></i>
0
</span>
<div
class=
"zezhao"
>
<a
:href=
'`/#/advert?id=$
{props.value.id}`'>
<i
class=
"el-icon-edit"
title=
"修改"
></i></a>
<a
:href=
'props.value.advertisingPicUrlStr'
download=
"广告图.png"
><i
class=
"el-icon-download"
title=
"下载"
></i></a>
<i
class=
"el-icon-delete"
title=
"删除"
@
click=
"deleteItem(props.value)"
></i>
</div>
</
template
>
</vueWaterfallEasy>
<vueWaterfallEasy
v-if=
"addatas.length != 0"
ref=
"waterfall"
:imgsArr=
"addatas"
@
scrollReachBottom=
"handleCurrentChange"
:maxCols=
"7"
:imgWidth=
"208"
:enablePullDownEvent=
"true"
>
<template
slot-scope=
"props"
>
<span
class=
"free"
><i
class=
"el-icon-share"
></i>
0
</span>
<div
class=
"zezhao"
>
<a
:href=
"`/#/advert?id=$
{props.value.id}`"
>
<i
class=
"el-icon-edit"
title=
"修改"
></i
></a>
<a
:href=
"props.value.advertisingPicUrlStr"
download=
"广告图.png"
><i
class=
"el-icon-download"
title=
"下载"
></i
></a>
<i
class=
"el-icon-delete"
title=
"删除"
@
click=
"deleteItem(props.value)"
></i>
</div>
</
template
>
</vueWaterfallEasy>
<div
v-if=
'addatas.length==0'
style=
'width:100%;margin-top:50px;text-align:center;color: #ccc;'
>
<i
class=
"iconfont icon-kong"
style=
"font-size: 120px;"
></i><br/>
还没有广告哦,
<a
href=
'/#/advert'
style=
"color:rgb(0, 129, 255)"
>
立即制作
</a>
</div>
</div>
<div
v-if=
"addatas.length == 0"
style=
"width: 100%; margin-top: 50px; text-align: center; color: #ccc"
>
<i
class=
"iconfont icon-kong"
style=
"font-size: 120px"
></i><br
/>
还没有广告哦,
<a
href=
"/#/advert"
style=
"color: rgb(0, 129, 255)"
>
立即制作
</a
>
</div>
</div>
</div>
</template>
<
script
>
import
vueWaterfallEasy
from
'vue-waterfall-easy'
import
vueWaterfallEasy
from
"vue-waterfall-easy"
;
export
default
{
data
(){
return
{
lines
:[],
teams
:[],
modelTeams
:[],
countrys
:[],
addatas
:[],
pageIndex
:
0
,
pageSize
:
15
,
total
:
0
,
msg
:{
lineId
:
'0'
,
teamId
:
'0'
,
countryId
:
'0'
,
type
:
'0'
},
user
:{},
model
:{},
isAdd
:
false
,
uploadType
:
0
,
}
},
components
:
{
vueWaterfallEasy
data
()
{
return
{
lines
:
[],
teams
:
[],
modelTeams
:
[],
countrys
:
[],
addatas
:
[],
pageIndex
:
0
,
pageSize
:
15
,
total
:
0
,
msg
:
{
lineId
:
"0"
,
teamId
:
"0"
,
countryId
:
"0"
,
type
:
"0"
,
},
user
:
{},
model
:
{},
isAdd
:
false
,
uploadType
:
0
,
};
},
components
:
{
vueWaterfallEasy
,
},
mounted
()
{
this
.
user
=
JSON
.
parse
(
window
.
localStorage
.
userInfo
);
this
.
getline
();
this
.
getcountry
();
this
.
getaddatas
(
0
);
},
methods
:
{
deleteItem
(
x
)
{
this
.
apipost
(
"Advertising_post_Remove"
,
{
ID
:
x
.
id
},
(
x
)
=>
{
if
(
x
.
data
.
resultCode
==
1
)
{
this
.
$message
.
success
(
"删除成功"
);
this
.
getaddatas
(
0
);
}
else
{
this
.
$message
.
error
(
x
.
data
.
message
);
}
},
(
err
)
=>
{}
);
},
mounted
(){
this
.
user
=
JSON
.
parse
(
window
.
localStorage
.
userInfo
)
this
.
getline
()
this
.
getcountry
()
this
.
getaddatas
(
0
)
handleCurrentChange
(
val
)
{
this
.
pageIndex
++
;
this
.
getaddatas
(
1
);
},
methods
:{
deleteItem
(
x
){
this
.
apipost
(
"Advertising_post_Remove"
,
{
'ID'
:
x
.
id
},
x
=>
{
if
(
x
.
data
.
resultCode
==
1
){
this
.
$message
.
success
(
'删除成功'
)
this
.
getaddatas
(
0
)
}
else
{
this
.
$message
.
error
(
x
.
data
.
message
)
}
},
err
=>
{})
},
handleCurrentChange
(
val
)
{
this
.
pageIndex
++
this
.
getaddatas
(
1
)
},
getaddatas
(
type
){
if
(
type
==
0
){
this
.
pageIndex
=
0
}
let
msg
=
{
pageIndex
:
this
.
pageIndex
,
pageSize
:
this
.
pageSize
}
this
.
apipost
(
"Advertising_post_GetPageList"
,
msg
,
x
=>
{
x
.
data
.
data
.
pageData
.
forEach
(
x
=>
{
x
.
src
=
`
${
x
.
advertisingPicUrlStr
}
?x-oss-process=image/resize,w_200`
})
if
(
x
.
data
.
data
.
pageData
.
length
==
0
){
this
.
$refs
.
waterfall
.
waterfallOver
()
}
this
.
addatas
=
[];
this
.
addatas
=
this
.
addatas
.
concat
(
x
.
data
.
data
.
pageData
)
this
.
total
=
x
.
data
.
data
.
pageCount
},
err
=>
{})
},
getcountry
(){
this
.
apipost
(
"dict_post_Destination_GetCountry"
,
{},
x
=>
{
this
.
countrys
=
x
.
data
.
data
},
err
=>
{})
getaddatas
(
type
)
{
if
(
type
==
0
)
{
this
.
pageIndex
=
0
;
}
let
msg
=
{
pageIndex
:
this
.
pageIndex
,
pageSize
:
this
.
pageSize
,
};
this
.
apipost
(
"Advertising_post_GetPageList"
,
msg
,
(
x
)
=>
{
x
.
data
.
data
.
pageData
.
forEach
((
x
)
=>
{
x
.
src
=
`
${
x
.
advertisingPicUrlStr
}
?x-oss-process=image/resize,w_200`
;
});
if
(
x
.
data
.
data
.
pageData
.
length
==
0
)
{
this
.
$refs
.
waterfall
.
waterfallOver
();
}
this
.
addatas
=
[];
this
.
addatas
=
this
.
addatas
.
concat
(
x
.
data
.
data
.
pageData
);
this
.
total
=
x
.
data
.
data
.
pageCount
;
},
getteam
(){
let
msg
=
{
'RB_Branch_id'
:
this
.
user
.
RB_Branch_id
,
'isTOOP'
:
1
,
'lineID'
:
this
.
msg
.
lineId
}
this
.
apipost
(
"team_post_GetList"
,
msg
,
x
=>
{
this
.
teams
=
x
.
data
.
data
if
(
x
.
data
.
data
.
length
>
0
)
this
.
msg
.
teamId
=
x
.
data
.
data
[
0
].
LtID
},
err
=>
{})
(
err
)
=>
{}
);
},
getcountry
()
{
this
.
apipost
(
"dict_post_Destination_GetCountry"
,
{},
(
x
)
=>
{
this
.
countrys
=
x
.
data
.
data
;
},
changeLine
(){
this
.
teams
.
splice
(
0
,
this
.
teams
.
length
-
1
)
if
(
this
.
msg
.
lineId
!==
0
){
this
.
getteam
()
}
(
err
)
=>
{}
);
},
getteam
()
{
let
msg
=
{
RB_Branch_id
:
this
.
user
.
RB_Branch_id
,
isTOOP
:
1
,
lineID
:
this
.
msg
.
lineId
,
};
this
.
apipost
(
"team_post_GetList"
,
msg
,
(
x
)
=>
{
this
.
teams
=
x
.
data
.
data
;
if
(
x
.
data
.
data
.
length
>
0
)
this
.
msg
.
teamId
=
x
.
data
.
data
[
0
].
LtID
;
},
changeLineForm
(){
this
.
modelTeams
.
splice
(
0
,
this
.
modelTeams
.
length
-
1
)
if
(
this
.
model
.
LineID
!==
0
&&
this
.
model
.
LineID
!=
''
){
let
msg
=
{
'RB_Branch_id'
:
this
.
user
.
RB_Branch_id
,
'isTOOP'
:
1
,
'lineID'
:
this
.
model
.
LineID
}
this
.
apipost
(
"team_post_GetList"
,
msg
,
x
=>
{
this
.
modelTeams
=
x
.
data
.
data
if
(
x
.
data
.
data
.
length
>
0
)
this
.
model
.
SeriesID
=
x
.
data
.
data
[
0
].
LtID
},
err
=>
{})
}
(
err
)
=>
{}
);
},
changeLine
()
{
this
.
teams
.
splice
(
0
,
this
.
teams
.
length
-
1
);
if
(
this
.
msg
.
lineId
!==
0
)
{
this
.
getteam
();
}
},
changeLineForm
()
{
this
.
modelTeams
.
splice
(
0
,
this
.
modelTeams
.
length
-
1
);
if
(
this
.
model
.
LineID
!==
0
&&
this
.
model
.
LineID
!=
""
)
{
let
msg
=
{
RB_Branch_id
:
this
.
user
.
RB_Branch_id
,
isTOOP
:
1
,
lineID
:
this
.
model
.
LineID
,
};
this
.
apipost
(
"team_post_GetList"
,
msg
,
(
x
)
=>
{
this
.
modelTeams
=
x
.
data
.
data
;
if
(
x
.
data
.
data
.
length
>
0
)
this
.
model
.
SeriesID
=
x
.
data
.
data
[
0
].
LtID
;
},
(
err
)
=>
{}
);
}
},
getline
()
{
let
msg
=
{
pageIndex
:
0
,
pageSize
:
100
};
this
.
apipost
(
"line_post_GetPageList"
,
msg
,
(
x
)
=>
{
this
.
lines
=
x
.
data
.
data
.
pageData
;
},
getline
(){
let
msg
=
{
'pageIndex'
:
0
,
'pageSize'
:
100
}
this
.
apipost
(
"line_post_GetPageList"
,
msg
,
x
=>
{
this
.
lines
=
x
.
data
.
data
.
pageData
},
err
=>
{})
}
}
}
(
err
)
=>
{}
);
},
},
};
</
script
>
\ No newline at end of file
src/components/platformModule/advmanager.vue
View file @
b5380156
This diff is collapsed.
Click to expand it.
src/main.js
View file @
b5380156
...
...
@@ -37,33 +37,35 @@ import pinyin from 'pinyin'
// import JsPDF from 'jspdf'
import
lrz
from
'lrz'
import
'vue-easytable/libs/themes-base/index.css'
import
{
VTable
,
VPagination
}
from
'vue-easytable'
import
{
VTable
,
VPagination
}
from
'vue-easytable'
import
'viewerjs/dist/viewer.css'
import
Viewer
from
'v-viewer'
Vue
.
component
(
VTable
.
name
,
VTable
)
Vue
.
component
(
VPagination
.
name
,
VPagination
)
Vue
.
config
.
productionTip
=
false
Vue
.
http
=
Vue
.
prototype
.
$http
=
axios
Vue
.
cookie
=
Vue
.
prototype
.
$cookie
=
cookie
Vue
.
commonUtils
=
Vue
.
prototype
.
$commonUtils
=
commonUtils
Vue
.
tripUtils
=
Vue
.
prototype
.
$tripUtils
=
tripUtils
Vue
.
DMCUtils
=
Vue
.
prototype
.
$DMCUtils
=
DMCUtils
Vue
.
languageUtils
=
Vue
.
prototype
.
$languageUtils
=
languageUtils
Vue
.
calendarUtils
=
Vue
.
prototype
.
$calendarUtils
=
calendarUtils
Vue
.
lunarCalendar
=
Vue
.
prototype
.
$lunarCalendar
=
lunarCalendar
Vue
.
googleMap
=
Vue
.
prototype
.
$googleMap
=
googleMap
Vue
.
AuthCode
=
Vue
.
prototype
.
$AuthCode
=
AuthCode
Vue
.
cookie
=
Vue
.
prototype
.
$cookie
=
cookie
Vue
.
commonUtils
=
Vue
.
prototype
.
$commonUtils
=
commonUtils
Vue
.
tripUtils
=
Vue
.
prototype
.
$tripUtils
=
tripUtils
Vue
.
DMCUtils
=
Vue
.
prototype
.
$DMCUtils
=
DMCUtils
Vue
.
languageUtils
=
Vue
.
prototype
.
$languageUtils
=
languageUtils
Vue
.
calendarUtils
=
Vue
.
prototype
.
$calendarUtils
=
calendarUtils
Vue
.
lunarCalendar
=
Vue
.
prototype
.
$lunarCalendar
=
lunarCalendar
Vue
.
googleMap
=
Vue
.
prototype
.
$googleMap
=
googleMap
Vue
.
AuthCode
=
Vue
.
prototype
.
$AuthCode
=
AuthCode
Vue
.
prototype
.
$echarts
=
echarts
Vue
.
chartsUtils
=
Vue
.
prototype
.
$chartsUtils
=
chartsUtils
Vue
.
chartsUtils
=
Vue
.
prototype
.
$chartsUtils
=
chartsUtils
Vue
.
prototype
.
$VueBarcode
=
VueBarcode
// Vue.prototype.GLOBAL = global_
// Vue.component('barcode', VueBarcode);
Vue
.
prototype
.
pinyin
=
pinyin
// Vue.prototype.h2c=h2c
Vue
.
prototype
.
lrz
=
lrz
Vue
.
prototype
.
lrz
=
lrz
/* eslint-disable no-new */
// Vue.use(htmlToPdf)
...
...
@@ -74,7 +76,7 @@ Vue.use(vueQuillEditor)
//Vue.use(VueAMap);
Vue
.
use
(
VueBarcode
);
//声明条形码组件
Vue
.
use
(
store
);
Vue
.
use
(
Viewer
,{
Vue
.
use
(
Viewer
,
{
defaultOptions
:
{
zIndex
:
9999
}
...
...
@@ -87,28 +89,28 @@ Vue.use(Viewer,{
// 时间扩展格式化
Date
.
prototype
.
Format
=
function
(
fmt
)
{
var
o
=
{
"M+"
:
this
.
getMonth
()
+
1
,
//月份
"d+"
:
this
.
getDate
(),
//日
"h+"
:
this
.
getHours
(),
//小时
"m+"
:
this
.
getMinutes
(),
//分
"s+"
:
this
.
getSeconds
()
//秒
"M+"
:
this
.
getMonth
()
+
1
,
//月份
"d+"
:
this
.
getDate
(),
//日
"h+"
:
this
.
getHours
(),
//小时
"m+"
:
this
.
getMinutes
(),
//分
"s+"
:
this
.
getSeconds
()
//秒
};
if
(
/
(
y+
)
/
.
test
(
fmt
)){
//根据y的长度来截取年
fmt
=
fmt
.
replace
(
RegExp
.
$1
,
(
this
.
getFullYear
()
+
""
).
substr
(
4
-
RegExp
.
$1
.
length
));
if
(
/
(
y+
)
/
.
test
(
fmt
))
{
//根据y的长度来截取年
fmt
=
fmt
.
replace
(
RegExp
.
$1
,
(
this
.
getFullYear
()
+
""
).
substr
(
4
-
RegExp
.
$1
.
length
));
}
for
(
var
k
in
o
){
if
(
new
RegExp
(
"("
+
k
+
")"
).
test
(
fmt
))
fmt
=
fmt
.
replace
(
RegExp
.
$1
,
(
RegExp
.
$1
.
length
==
1
)
?
(
o
[
k
])
:
((
"00"
+
o
[
k
]).
substr
((
""
+
o
[
k
]).
length
)));
for
(
var
k
in
o
)
{
if
(
new
RegExp
(
"("
+
k
+
")"
).
test
(
fmt
))
fmt
=
fmt
.
replace
(
RegExp
.
$1
,
(
RegExp
.
$1
.
length
==
1
)
?
(
o
[
k
])
:
((
"00"
+
o
[
k
]).
substr
((
""
+
o
[
k
]).
length
)));
}
return
fmt
;
};
Vue
.
prototype
.
DateDiff
=
function
(
sDate1
,
sDate2
)
{
var
aDate
,
oDate1
,
oDate2
,
iDays
aDate
=
sDate1
.
split
(
"-"
)
oDate1
=
new
Date
(
aDate
[
1
]
+
'-'
+
aDate
[
2
]
+
'-'
+
aDate
[
0
])
aDate
=
sDate2
.
split
(
"-"
)
oDate2
=
new
Date
(
aDate
[
1
]
+
'-'
+
aDate
[
2
]
+
'-'
+
aDate
[
0
])
iDays
=
parseInt
(
Math
.
abs
(
oDate1
-
oDate2
)
/
1000
/
60
/
60
/
24
)
//把相差的毫秒数转换为天数
return
iDays
Vue
.
prototype
.
DateDiff
=
function
(
sDate1
,
sDate2
)
{
var
aDate
,
oDate1
,
oDate2
,
iDays
aDate
=
sDate1
.
split
(
"-"
)
oDate1
=
new
Date
(
aDate
[
1
]
+
'-'
+
aDate
[
2
]
+
'-'
+
aDate
[
0
])
aDate
=
sDate2
.
split
(
"-"
)
oDate2
=
new
Date
(
aDate
[
1
]
+
'-'
+
aDate
[
2
]
+
'-'
+
aDate
[
0
])
iDays
=
parseInt
(
Math
.
abs
(
oDate1
-
oDate2
)
/
1000
/
60
/
60
/
24
)
//把相差的毫秒数转换为天数
return
iDays
}
// 数组对比
...
...
@@ -155,7 +157,7 @@ const i18n = new VueI18n({
'zh-CN'
:
require
(
'./assets/common/lang/zh'
),
// 中文语言包
'en-US'
:
require
(
'./assets/common/lang/en'
),
// 英文语言包
'zh-TW'
:
require
(
'./assets/common/lang/zh-tw'
),
// 台湾语言包
'Japanese'
:
require
(
'./assets/common/lang/jp'
)
// 日本语言包
'Japanese'
:
require
(
'./assets/common/lang/jp'
)
// 日本语言包
}
})
...
...
src/router/config.js
View file @
b5380156
This diff is collapsed.
Click to expand it.
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