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
771f4687
Commit
771f4687
authored
Jun 25, 2021
by
nature
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ios
parent
1a5f370f
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
146 additions
and
148 deletions
+146
-148
main.js
src/main.js
+0
-2
repay-detail.vue
src/pages/contractInquire/repay-detail.vue
+145
-145
previewPdf.vue
src/pages/contractSigning/previewPdf.vue
+1
-1
No files found.
src/main.js
View file @
771f4687
...
...
@@ -13,7 +13,6 @@ import router from './router'
import
App
from
'./App'
import
Vuex
from
'vuex'
import
vuexI18n
from
'vuex-i18n'
import
PDFJS
from
'pdfjs-dist'
import
flexible
from
'./common/ydui.flexible'
import
components
from
'./components/component'
...
...
@@ -99,7 +98,6 @@ let hlsHttp = {
get
:
get
,
post
:
post
,
}
Vue
.
prototype
.
PDFJS
=
window
.
PDFJS
=
hlsHttp
Vue
.
prototype
.
hlsHttp
=
window
.
hlsHttp
=
hlsHttp
Vue
.
prototype
.
PDFJS
=
window
.
PDFJS
=
PDFJS
...
...
src/pages/contractInquire/repay-detail.vue
View file @
771f4687
...
...
@@ -96,164 +96,164 @@
<
script
>
export
default
{
name
:
'RepayDetail'
,
filters
:
{
lengthCheck
:
function
(
value
)
{
if
((
value
.
toString
()).
length
===
1
)
{
return
`0
${
value
}
`
}
else
{
return
value
}
},
export
default
{
name
:
'RepayDetail'
,
filters
:
{
lengthCheck
:
function
(
value
)
{
if
((
value
.
toString
()).
length
===
1
)
{
return
`0
${
value
}
`
}
else
{
return
value
}
},
data
()
{
return
{
lists
:
[],
pagenum
:
1
,
hidden
:
false
,
detailInfo
:
{},
fileArray
:
[],
},
data
()
{
return
{
lists
:
[],
pagenum
:
1
,
hidden
:
false
,
detailInfo
:
{},
fileArray
:
[],
}
},
computed
:
{},
watch
:
{},
beforeRouteEnter
(
to
,
from
,
next
)
{
next
(
vm
=>
{
if
(
from
.
name
===
'ContractRecords'
)
{
vm
.
pagenum
=
1
vm
.
detailQuery
()
vm
.
equipQuery
()
}
})
},
methods
:
{
// val: contract_id
toRepayPlans
(
val
)
{
this
.
$router
.
push
({
name
:
'RepayPlans'
,
params
:
{
contract_id
:
val
,
lease_num
:
this
.
detailInfo
.
lease_num
,
},
})
},
computed
:
{},
watch
:
{},
beforeRouteEnter
(
to
,
from
,
next
)
{
next
(
vm
=>
{
if
(
from
.
name
===
'ContractRecords'
)
{
vm
.
pagenum
=
1
vm
.
detailQuery
()
vm
.
equipQuery
()
downLoad
()
{
let
vm
=
this
let
url
=
$config
.
basePath
+
'get_download_app'
let
param
=
{
project_id
:
vm
.
$route
.
params
.
project_id
,
phone
:
window
.
localStorage
.
user_phone
,
}
vm
.
hlsPopup
.
showLoading
(
'数据加载中'
)
vm
.
hlsHttp
.
post
(
url
,
param
).
then
(
function
(
res
)
{
vm
.
hlsPopup
.
hideLoading
()
if
(
res
.
result
===
'S'
)
{
vm
.
fileArray
=
res
.
info
vm
.
fileArray
.
forEach
(
i
=>
{
// cordova.InAppBrowser.open(i.fileUrl, '_system', 'location=yes,hideurlbar=no,toolbarposition=top')
// cordova.InAppBrowser.open(i.fileUrl, '_system', 'location=yes')
if
(
vum
.
Platform
.
isAndroid
())
{
// android终端
window
.
open
(
i
.
fileUrl
,
'_system'
,
'location=yes'
)
}
else
if
(
vum
.
Platform
.
isIOS
()
||
vum
.
Platform
.
isIPad
())
{
// ios终端
cordova
.
InAppBrowser
.
open
(
i
.
fileUrl
,
'_system'
,
'location=yes,hideurlbar=no,toolbarposition=top'
)
}
else
{
window
.
open
(
i
.
fileUrl
,
'_system'
,
'location=yes'
)
}
})
// vm.pdfDownload()
}
else
{
hlsPopup
.
showLongCenter
(
res
.
message
)
}
})
},
methods
:
{
// val: contract_id
toRepayPlans
(
val
)
{
this
.
$router
.
push
({
name
:
'RepayPlans'
,
params
:
{
contract_id
:
val
,
lease_num
:
this
.
detailInfo
.
lease_num
,
},
})
},
downLoad
()
{
let
vm
=
this
let
url
=
$config
.
basePath
+
'get_download_app'
let
param
=
{
project_id
:
vm
.
$route
.
params
.
project_id
,
phone
:
window
.
localStorage
.
user_phone
,
pdfDownload
()
{
// 下载pdf文件
let
vm
=
this
vm
.
fileArray
.
forEach
(
element
=>
{
if
(
element
.
fileUrl
)
{
console
.
log
(
'vm.$refs.pdf'
+
vm
.
$refs
.
pdf
)
// debugger
vm
.
$refs
.
pdf
.
downloadPDF
(
element
.
fileUrl
,
element
.
fileName
)
}
vm
.
hlsPopup
.
showLoading
(
'数据加载中'
)
vm
.
hlsHttp
.
post
(
url
,
param
).
then
(
function
(
res
)
{
vm
.
hlsPopup
.
hideLoading
()
if
(
res
.
result
===
'S'
)
{
vm
.
fileArray
=
res
.
info
vm
.
fileArray
.
forEach
(
i
=>
{
//cordova.InAppBrowser.open(i.fileUrl, '_system', 'location=yes,hideurlbar=no,toolbarposition=top')
//cordova.InAppBrowser.open(i.fileUrl, '_system', 'location=yes')
if
(
vum
.
Platform
.
isAndroid
())
{
//android终端
window
.
open
(
i
.
fileUrl
,
"_system"
,
"location=yes"
)
}
else
if
(
vum
.
Platform
.
isIOS
()
||
vum
.
Platform
.
isIPad
())
{
//ios终端
window
.
location
.
href
=
i
.
fileUrl
;
}
else
{
window
.
open
(
i
.
fileUrl
,
"_system"
,
"location=yes"
)
}
})
// vm.pdfDownload()
}
else
{
hlsPopup
.
showLongCenter
(
res
.
message
)
}
})
},
pdfDownload
()
{
// 下载pdf文件
let
vm
=
this
vm
.
fileArray
.
forEach
(
element
=>
{
if
(
element
.
fileUrl
)
{
console
.
log
(
'vm.$refs.pdf'
+
vm
.
$refs
.
pdf
)
// debugger
vm
.
$refs
.
pdf
.
downloadPDF
(
element
.
fileUrl
,
element
.
fileName
)
}
})
},
// 合同明细
detailQuery
()
{
let
vm
=
this
let
url
=
$config
.
basePath
+
'con_contract_detial'
let
param
=
{
project_id
:
vm
.
$route
.
params
.
project_id
,
})
},
// 合同明细
detailQuery
()
{
let
vm
=
this
let
url
=
$config
.
basePath
+
'con_contract_detial'
let
param
=
{
project_id
:
vm
.
$route
.
params
.
project_id
,
}
vm
.
hlsPopup
.
showLoading
(
'数据加载中'
)
vm
.
hlsHttp
.
post
(
url
,
param
).
then
(
function
(
res
)
{
vm
.
hlsPopup
.
hideLoading
()
if
(
res
.
result
===
'S'
)
{
vm
.
detailInfo
=
res
.
info
}
else
{
hlsPopup
.
showLongCenter
(
res
.
message
)
}
vm
.
hlsPopup
.
showLoading
(
'数据加载中'
)
vm
.
hlsHttp
.
post
(
url
,
param
).
then
(
function
(
res
)
{
vm
.
hlsPopup
.
hideLoading
()
if
(
res
.
result
===
'S'
)
{
vm
.
detailInfo
=
res
.
info
}
else
{
hlsPopup
.
showLongCenter
(
res
.
message
)
})
},
// 设备清单
equipQuery
()
{
let
vm
=
this
let
url
=
$config
.
basePath
+
'con_equip_list'
let
param
=
{
pagesize
:
10
,
pagenum
:
vm
.
pagenum
,
project_id
:
vm
.
$route
.
params
.
project_id
,
}
vm
.
hlsPopup
.
showLoading
(
'数据加载中'
)
vm
.
hlsHttp
.
post
(
url
,
param
).
then
(
function
(
res
)
{
vm
.
hlsPopup
.
hideLoading
()
if
(
res
.
result
===
'S'
)
{
vm
.
lists
=
res
.
lists
if
(
res
.
lists
.
length
>=
0
&&
res
.
lists
.
length
<
10
)
{
vm
.
$refs
.
scroll
.
update
(
true
)
}
else
if
(
res
.
lists
.
length
===
10
)
{
vm
.
$refs
.
scroll
.
update
(
false
)
}
})
},
// 设备清单
equipQuery
()
{
let
vm
=
this
let
url
=
$config
.
basePath
+
'con_equip_list'
let
param
=
{
pagesize
:
10
,
pagenum
:
vm
.
pagenum
,
project_id
:
vm
.
$route
.
params
.
project_id
,
}
else
{
hlsPopup
.
showLongCenter
(
res
.
message
)
}
vm
.
hlsPopup
.
showLoading
(
'数据加载中'
)
vm
.
hlsHttp
.
post
(
url
,
param
).
then
(
function
(
res
)
{
vm
.
hlsPopup
.
hideLoading
()
if
(
res
.
result
===
'S'
)
{
vm
.
lists
=
res
.
lists
if
(
res
.
lists
.
length
>=
0
&&
res
.
lists
.
length
<
10
)
{
vm
.
$refs
.
scroll
.
update
(
true
)
}
else
if
(
res
.
lists
.
length
===
10
)
{
vm
.
$refs
.
scroll
.
update
(
false
)
}
}
else
{
hlsPopup
.
showLongCenter
(
res
.
message
)
})
},
loadMore
()
{
let
vm
=
this
let
url
=
$config
.
basePath
+
'con_equip_list'
vm
.
pagenum
++
let
param
=
{
pagesize
:
10
,
pagenum
:
vm
.
pagenum
,
project_id
:
vm
.
$route
.
params
.
project_id
,
}
vm
.
hlsPopup
.
showLoading
(
'请稍候'
)
vm
.
$post
(
url
,
param
).
then
(
function
(
res
)
{
vm
.
hlsPopup
.
hideLoading
()
if
(
res
.
result
===
'S'
)
{
let
returnData
=
[]
returnData
=
res
.
lists
if
(
returnData
.
length
===
0
)
{
vm
.
$refs
.
scroll
.
update
(
true
)
}
else
if
(
returnData
.
length
>
0
&&
returnData
.
length
<
10
)
{
vum
.
forEach
(
returnData
,
function
(
data
,
index
,
array
)
{
vm
.
lists
.
push
(
array
[
index
])
})
vm
.
$refs
.
scroll
.
update
(
true
)
}
else
if
(
returnData
.
length
===
10
)
{
vum
.
forEach
(
returnData
,
function
(
data
,
index
,
array
)
{
vm
.
lists
.
push
(
array
[
index
])
})
vm
.
$refs
.
scroll
.
update
(
false
)
}
})
},
loadMore
()
{
let
vm
=
this
let
url
=
$config
.
basePath
+
'con_equip_list'
vm
.
pagenum
++
let
param
=
{
pagesize
:
10
,
pagenum
:
vm
.
pagenum
,
project_id
:
vm
.
$route
.
params
.
project_id
,
}
else
{
hlsPopup
.
showLongCenter
(
res
.
message
)
}
vm
.
hlsPopup
.
showLoading
(
'请稍候'
)
vm
.
$post
(
url
,
param
).
then
(
function
(
res
)
{
vm
.
hlsPopup
.
hideLoading
()
if
(
res
.
result
===
'S'
)
{
let
returnData
=
[]
returnData
=
res
.
lists
if
(
returnData
.
length
===
0
)
{
vm
.
$refs
.
scroll
.
update
(
true
)
}
else
if
(
returnData
.
length
>
0
&&
returnData
.
length
<
10
)
{
vum
.
forEach
(
returnData
,
function
(
data
,
index
,
array
)
{
vm
.
lists
.
push
(
array
[
index
])
})
vm
.
$refs
.
scroll
.
update
(
true
)
}
else
if
(
returnData
.
length
===
10
)
{
vum
.
forEach
(
returnData
,
function
(
data
,
index
,
array
)
{
vm
.
lists
.
push
(
array
[
index
])
})
vm
.
$refs
.
scroll
.
update
(
false
)
}
}
else
{
hlsPopup
.
showLongCenter
(
res
.
message
)
}
})
},
})
},
}
},
}
</
script
>
<
style
lang=
'less'
>
#repay-detail {
...
...
src/pages/contractSigning/previewPdf.vue
View file @
771f4687
...
...
@@ -12,7 +12,7 @@
</h-view>
</
template
>
<
script
>
//import PDFJS from 'pdfjs-dist'
//
import PDFJS from 'pdfjs-dist'
// const Base64 = require('js-base64').Base64
export
default
{
...
...
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