Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
H
hls-xcmg-vue-app
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
xugong
hls-xcmg-vue-app
Commits
79b320bd
Commit
79b320bd
authored
Feb 11, 2020
by
Jennie Shi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
解决合同预览显示空白
parent
f65230b6
Changes
8
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
5 additions
and
91 deletions
+5
-91
dev.env.js
config/dev.env.js
+3
-3
uat.env.js
config/uat.env.js
+1
-1
package.json
package.json
+0
-1
PDFDownload.vue
src/components/PDFDownload.vue
+0
-71
repay-detail.vue
src/pages/contractInquire/repay-detail.vue
+0
-5
1e37fad1fce0ebb3e0e5.worker.js
www/1e37fad1fce0ebb3e0e5.worker.js
+0
-8
1e37fad1fce0ebb3e0e5.worker.js.map
www/1e37fad1fce0ebb3e0e5.worker.js.map
+0
-1
index.html
www/index.html
+1
-1
No files found.
config/dev.env.js
View file @
79b320bd
...
...
@@ -8,10 +8,10 @@ module.exports = merge(prodEnv, {
debug
:
true
,
isMobilePlatform
:
false
,
loginPath
:
'"http://180.104.121.66:8088/oauth/token?client_id=client2&client_secret=secret&grant_type=password&username=appadmin&password=" '
,
basePath
:
'"http://180.104.121.66:8088/r/api/interface?sysName=XCMG_
DEV
&apiName="'
,
basePath
:
'"http://180.104.121.66:8088/r/api/interface?sysName=XCMG_
UAT
&apiName="'
,
rootPath
:
'"http://180.104.121.66:8088/r/api"'
,
filePath
:
'"http://180.104.121.66:8088/r/api/app/fileViewSvc?sysName=XCMG_
DEV
&apiName=file_view&"'
,
filePath
:
'"http://180.104.121.66:8088/r/api/app/fileViewSvc?sysName=XCMG_
UAT
&apiName=file_view&"'
,
ocrPath
:
'"http://180.104.121.66:8088/r/api"'
,
appId
:
'"com.xcmg.app.dev"'
,
currentVersion
:
'"1.8.
1
"'
,
currentVersion
:
'"1.8.
4
"'
,
})
config/uat.env.js
View file @
79b320bd
...
...
@@ -11,5 +11,5 @@ module.exports = {
ocrPath
:
'"http://180.104.121.66:8088/r/api"'
,
fileUploadSvcPath
:
'"http://180.104.121.66:8088/r/api/app/fileUploadSvc?sysName=XCMG_UAT&apiName="'
,
appId
:
'"com.xcmg.app"'
,
currentVersion
:
'"1.4.
3
"'
currentVersion
:
'"1.4.
4
"'
}
package.json
View file @
79b320bd
...
...
@@ -29,7 +29,6 @@
"
js-base64
"
:
"
^2.5.1
"
,
"
pdfjs-dist
"
:
"
^2.2.228
"
,
"
vue
"
:
"
^2.5.2
"
,
"
vue-pdf
"
:
"
^4.0.7
"
,
"
vue-router
"
:
"
^3.0.1
"
,
"
vuex
"
:
"
^2.1.1
"
,
"
vuex-i18n
"
:
"
^1.3.1
"
,
...
...
src/components/PDFDownload.vue
deleted
100644 → 0
View file @
f65230b6
<
template
>
<div
v-if=
"hidden"
style=
"height: 75vh;overflow-y: auto;overflow-x: hidden;"
>
<pdf
:src=
"src"
/>
</div>
</
template
>
<
script
>
import
axios
from
'axios'
import
pdf
from
'vue-pdf'
export
default
{
components
:
{
pdf
},
data
()
{
return
{
src
:
''
,
hidden
:
false
,
}
},
methods
:
{
// 预览pdf
previewPDF
(
url
)
{
this
.
src
=
pdf
.
createLoadingTask
(
url
)
},
// 下载PDF
downloadPDF
(
url
,
fileName
)
{
axios
({
method
:
'get'
,
responseType
:
'arraybuffer'
,
url
:
url
,
}).
then
(
function
(
res
)
{
// 调用下载方法,把后端传过来的流传给fileDownload方法
this
.
fileDownload
(
res
.
data
,
fileName
)
}.
bind
(
this
)
)
.
catch
(
function
(
error
)
{
hlsPopup
.
showLongCenter
(
'网络请求出错'
)
console
.
log
(
error
)
}
)
},
fileDownload
:
function
(
data
,
fileName
)
{
let
blob
=
new
Blob
([
data
],
{
// type类型后端返回来的数据中会有,根据自己实际进行修改
// type: 'application/vnd.ms-excel',
type
:
'application/json'
,
})
let
filename
=
fileName
+
'.pdf'
||
'合同.pdf'
if
(
typeof
window
.
navigator
.
msSaveBlob
!==
'undefined'
)
{
window
.
navigator
.
msSaveBlob
(
blob
,
filename
)
}
else
{
var
blobURL
=
window
.
URL
.
createObjectURL
(
blob
)
// 创建隐藏
<
a
>
标签进行下载
var
tempLink
=
document
.
createElement
(
'a'
)
tempLink
.
style
.
display
=
'none'
tempLink
.
href
=
blobURL
tempLink
.
setAttribute
(
'download'
,
filename
)
if
(
typeof
tempLink
.
download
===
'undefined'
)
{
tempLink
.
setAttribute
(
'target'
,
'_blank'
)
}
document
.
body
.
appendChild
(
tempLink
)
tempLink
.
click
()
document
.
body
.
removeChild
(
tempLink
)
window
.
URL
.
revokeObjectURL
(
blobURL
)
}
},
},
}
</
script
>
<
style
lang=
"less"
scoped
>
</
style
>
src/pages/contractInquire/repay-detail.vue
View file @
79b320bd
...
...
@@ -92,18 +92,13 @@
</list-item>
</scroll>
</h-content>
<PDFDown
ref=
"pdf"
/>
</h-view>
</
template
>
<
script
>
import
PDFDown
from
'@/components/PDFDownload'
export
default
{
name
:
'RepayDetail'
,
components
:
{
PDFDown
,
},
filters
:
{
lengthCheck
:
function
(
value
)
{
if
((
value
.
toString
()).
length
===
1
)
{
...
...
www/1e37fad1fce0ebb3e0e5.worker.js
deleted
100644 → 0
View file @
f65230b6
This diff is collapsed.
Click to expand it.
www/1e37fad1fce0ebb3e0e5.worker.js.map
deleted
100644 → 0
View file @
f65230b6
This diff is collapsed.
Click to expand it.
www/index.html
View file @
79b320bd
<!DOCTYPE html>
<html><head><meta
charset=
utf-8
><meta
name=
viewport
content=
"initial-scale=1,maximum-scale=1,minimum-scale=1,user-scalable=no,width=device-width,viewport-fit=cover"
><meta
name=
format-detection
content=
"telephone=no"
><meta
name=
format-detection
content=
"email=no"
><meta
name=
apple-mobile-web-app-capable
content=
yes
><meta
name=
apple-mobile-web-app-status-bar-style
content=
black
><script
type=
text/javascript
src=
./static/vuePlatform.js
></script><script
type=
text/javascript
src=
./static/prototype.js
></script><script
type=
text/javascript
src=
cordova.js
></script><script
type=
text/javascript
src=
"http://api.map.baidu.com/api?v=2.0&ak=Eoo0EtfjYCdAy7r8D19gZ0vMojdZpHqU"
></script><title>
徐工金服
</title><link
href=
./static/css/app.5492293c65c2eebfcafa283a8c948cde.css
rel=
stylesheet
></head><body><div
id=
app-box
></div><script
type=
text/javascript
src=
./static/js/manifest.5b23605dc2d9cfefc737.js
></script><script
type=
text/javascript
src=
./static/js/vendor.9516a64f4eb2c109f0d8.js
></script><script
type=
text/javascript
src=
./static/js/app.179b65375f80947d84ac.js
></script></body></html>
\ No newline at end of file
<!DOCTYPE html>
<html><head><meta
charset=
utf-8
><meta
name=
viewport
content=
"initial-scale=1,maximum-scale=1,minimum-scale=1,user-scalable=no,width=device-width,viewport-fit=cover"
><meta
name=
format-detection
content=
"telephone=no"
><meta
name=
format-detection
content=
"email=no"
><meta
name=
apple-mobile-web-app-capable
content=
yes
><meta
name=
apple-mobile-web-app-status-bar-style
content=
black
><script
type=
text/javascript
src=
./static/vuePlatform.js
></script><script
type=
text/javascript
src=
./static/prototype.js
></script><script
type=
text/javascript
src=
cordova.js
></script><script
type=
text/javascript
src=
"http://api.map.baidu.com/api?v=2.0&ak=Eoo0EtfjYCdAy7r8D19gZ0vMojdZpHqU"
></script><title>
徐工金服
</title><link
href=
./static/css/app.25d8ab4fa9a9b84e32668d1acf234cd3.css
rel=
stylesheet
></head><body><div
id=
app-box
></div><script
type=
text/javascript
src=
./static/js/manifest.6a178e8d77c32e3c385d.js
></script><script
type=
text/javascript
src=
./static/js/vendor.0a4e11017ea45af58444.js
></script><script
type=
text/javascript
src=
./static/js/app.1c3e37182172494499eb.js
></script></body></html>
\ No newline at end of file
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