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
c69f74d0
Commit
c69f74d0
authored
2 months ago
by
黄奎
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
11
parent
02584cd9
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
48 additions
and
8 deletions
+48
-8
GroupAdvertising.vue
src/components/TravelManager/TravelList/GroupAdvertising.vue
+48
-8
No files found.
src/components/TravelManager/TravelList/GroupAdvertising.vue
View file @
c69f74d0
...
...
@@ -64,6 +64,8 @@
<span
@
click=
"clickDownLoad(item,1)"
><i
class=
"el-icon-download"
title=
"旅小友二维码"
></i></span>
<span
@
click=
"clickDownLoad(item,2)"
><i
class=
"el-icon-download"
title=
"行程二维码"
></i></span>
<span
@
click=
"clickDownLoad(item,3)"
><i
class=
"el-icon-download"
title=
"原图下载"
></i></span>
<i
class=
"el-icon-delete"
:title=
"$t('system.ph_shanchu')"
@
click
.
stop=
"deleteItem(item.ID)"
></i>
</div>
</div>
...
...
@@ -87,7 +89,11 @@
</
template
>
<
script
>
import
vueWaterfallEasy
from
'vue-waterfall-easy'
import
vueWaterfallEasy
from
'vue-waterfall-easy'
;
import
{
setInterval
,
clearInterval
}
from
'timers'
;
export
default
{
data
()
{
return
{
...
...
@@ -119,6 +125,7 @@
download_timer
:
null
,
loadingText
:
""
,
pdfLoading
:
false
,
priceObj
:
{},
}
},
components
:
{
...
...
@@ -128,9 +135,22 @@
this
.
msg
.
TCID
=
this
.
$route
.
query
.
TCID
;
this
.
LineID
=
this
.
$route
.
query
.
LineID
this
.
user
=
JSON
.
parse
(
window
.
localStorage
.
userInfo
)
this
.
getaddatas
()
this
.
getaddatas
();
this
.
getPriceInfo
();
},
methods
:
{
getPriceInfo
()
{
this
.
apipost
(
"travel_get_GetTravelConfigTCID"
,
{
TCID
:
this
.
msg
.
TCID
,
},
(
res
)
=>
{
if
(
res
.
data
.
resultCode
==
1
)
{
this
.
priceObj
=
res
.
data
.
data
.
config
;
}
}
);
},
clickDownLoad
(
item
,
type
)
{
this
.
downLoadMsg
.
Id
=
item
.
ID
;
this
.
downLoadMsg
.
Type
=
type
;
...
...
@@ -138,12 +158,30 @@
var
that
=
this
;
this
.
download_timer
=
setInterval
(
function
()
{
that
.
checkFile
()
},
1
000
);
},
2
000
);
},
//检查文件是否生成
checkFile
()
{
var
that
=
this
;
var
downLoadFileName
=
"广告图.jpg"
;
var
downLoadFileName
=
""
;
if
(
this
.
priceObj
)
{
if
(
this
.
priceObj
.
LtName
)
{
downLoadFileName
+=
this
.
priceObj
.
LtName
;
}
if
(
this
.
priceObj
.
StartDate
)
{
downLoadFileName
+=
"_"
+
this
.
priceObj
.
StartDate
;
}
}
if
(
this
.
downLoadMsg
.
Type
==
1
)
{
downLoadFileName
+=
"旅小友广告"
;
}
if
(
this
.
downLoadMsg
.
Type
==
2
)
{
downLoadFileName
+=
"行程广告"
;
}
if
(
this
.
downLoadMsg
.
Type
==
3
)
{
downLoadFileName
+=
"原广告图"
;
}
downLoadFileName
+=
".jpg"
;
let
urlObj
=
this
.
domainManager
();
var
checkUrl
=
urlObj
.
ocrUrl
+
"/Home/CheckAdFile?Id="
+
this
.
downLoadMsg
.
Id
+
"&Type="
+
this
.
downLoadMsg
.
Type
+
"&CreateBy="
+
this
.
downLoadMsg
.
CreateBy
;
...
...
@@ -173,10 +211,7 @@
responseType
:
'arraybuffer'
,
onDownloadProgress
:
(
progressEvent
)
=>
{
const
progress
=
Math
.
round
((
progressEvent
.
loaded
/
progressEvent
.
total
)
*
100
);
that
.
loadingText
=
that
.
$t
(
'objFill.v101.zhengzxiaz'
)
+
(
that
.
orderId
>
0
?
that
.
$t
(
'Operation.Op_teamNotice'
)
:
that
.
$t
(
'Airticket.Air_Trip'
))
+
that
.
$t
(
'objFill.v101.hote.wenjian'
)
+
progress
+
that
.
$t
(
'objFill.v101.qingwugbhsxyem'
);
that
.
loadingText
=
"正在下载广告图 已完成"
+
progress
+
"%"
;
// 在这里处理下载进度, 如更新界面上的进度条
}
}).
then
(
res
=>
{
...
...
@@ -193,6 +228,11 @@
}).
catch
(
err
=>
{
that
.
pdfLoading
=
false
})
}
else
if
(
res
.
data
==
2
)
{
clearInterval
(
that
.
download_timer
);
that
.
loadingText
=
""
;
that
.
pdfLoading
=
false
;
that
.
Error
(
"未检测到二维码区域"
);
}
}).
catch
(
err
=>
{
that
.
loadingText
=
""
;
...
...
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