Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
V
vue-gjjs
Overview
Overview
Details
Activity
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
zhouqian
vue-gjjs
Commits
73931ea0
Commit
73931ea0
authored
Jul 22, 2020
by
傅凯
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
支持面函预览
parent
93bf2a36
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
138 additions
and
26 deletions
+138
-26
DocShow.vue
src/components/DocShow.vue
+65
-0
index.js
src/components/index.js
+3
-0
Api.js
src/service/Api.js
+38
-1
PaperShow.vue
src/views/Business/Trnrel/Trndtl/PaperShow.vue
+10
-17
index.vue
src/views/Business/Trnrel/index.vue
+3
-3
Doc.vue
src/views/Public/Doc.vue
+19
-5
No files found.
src/components/DocShow.vue
0 → 100644
View file @
73931ea0
<
template
>
<div>
<div
v-if=
"!isdoc"
style=
"height:600px;overflow:auto;"
>
<pre>
{{
srcmsg
}}
</pre>
</div>
<div
v-if=
"isdoc"
>
<embed
:src=
"realdocpath"
style=
"width:100%;height:600px;"
/>
</div>
</div>
</
template
>
<
script
>
import
Api
from
"~/service/Api"
export
default
{
props
:[
'path'
],
data
(){
return
{
srcmsg
:
""
}
},
methods
:{
async
showDocOrMsg
(){
this
.
dialogOpen
=
true
console
.
log
(
this
.
realdocpath
)
if
(
!
this
.
isdoc
)
{
//发出异步请求
let
msg
=
await
Api
.
pget
(
this
.
realdocpath
)
this
.
srcmsg
=
msg
}
}
},
computed
:{
isdoc
(){
if
(
this
.
path
.
endsWith
(
".pdf"
))
return
true
else
return
false
},
realdocpath
(){
return
'/gjjs/files'
+
this
.
path
},
title
(){
if
(
this
.
isdoc
)
return
"面函展示"
else
return
"报文展示"
}
},
mounted
(){
this
.
showDocOrMsg
()
},
watch
:{
path
(
newValue
,
oldValue
){
if
(
newValue
!=
oldValue
)
this
.
showDocOrMsg
()
}
},
updated
(){
}
}
</
script
>
\ No newline at end of file
src/components/index.js
View file @
73931ea0
import
c_page
from
"./c-page.vue"
import
c_page
from
"./c-page.vue"
import
PtyPicker
from
"./PtyPicker"
import
PtyPicker
from
"./PtyPicker"
import
DocShow
from
"./DocShow"
export
default
{
export
default
{
install
(
Vue
){
install
(
Vue
){
Vue
.
component
(
"c-page"
,
c_page
)
Vue
.
component
(
"c-page"
,
c_page
)
Vue
.
component
(
"c-ptypicker"
,
PtyPicker
)
Vue
.
component
(
"c-ptypicker"
,
PtyPicker
)
Vue
.
component
(
"c-docshow"
,
DocShow
)
}
}
}
}
\ No newline at end of file
src/service/Api.js
View file @
73931ea0
...
@@ -12,9 +12,46 @@ const instance = axios.create({
...
@@ -12,9 +12,46 @@ const instance = axios.create({
export
default
class
Api
export
default
class
Api
{
{
static
get
(
url
,
data
)
static
p
get
(
url
,
data
)
{
{
let
token
=
window
.
sessionStorage
.
token
let
userId
=
window
.
sessionStorage
.
userId
let
headers
=
{
userId
,
token
,
"terminal"
:
"WEB"
};
if
(
url
!=
`
${
BASE_URI
}
login`
&&
token
)
headers
.
token
=
token
;
return
new
Promise
(
(
resolve
,
reject
)
=>
{
axios
.
get
(
url
,
data
,{
headers
,
timeout
:
50000
,
})
.
then
(
response
=>
{
const
{
data
}
=
response
;
resolve
(
data
)
})
.
catch
(
error
=>
{
if
(
error
.
response
)
{
// The request was made and the server responded with a status code
// that falls out of the range of 2xx
console
.
log
(
error
.
response
.
data
);
console
.
log
(
error
.
response
.
status
);
console
.
log
(
error
.
response
.
headers
);
resolve
(
error
.
response
.
status
);
}
else
if
(
error
.
request
)
{
// The request was made but no response was received
// `error.request` is an instance of XMLHttpRequest in the browser and an instance of
// http.ClientRequest in node.js
console
.
log
(
error
.
request
);
resolve
(
'error.request'
);
}
else
{
// Something happened in setting up the request that triggered an Error
console
.
log
(
'Error'
,
error
.
message
);
resolve
(
error
.
message
);
}
console
.
log
(
error
.
config
);
});
})
}
}
static
logout
(){
static
logout
(){
console
.
log
(
'asdasdasdasdasd'
)
console
.
log
(
'asdasdasdasdasd'
)
...
...
src/views/Business/Trnrel/Trndtl/PaperShow.vue
View file @
73931ea0
<
template
>
<
template
>
<span>
<span>
<el-button
type=
"button"
size=
"mini"
@
click=
"showDocOrMsg"
>
显示
</el-button>
<el-button
type=
"button"
size=
"mini"
@
click=
"showDocOrMsg"
>
显示
</el-button>
<el-dialog
title=
"机构选择"
:visible
.
sync=
"dialogOpen"
>
<el-dialog
:title=
"title"
:visible
.
sync=
"dialogOpen"
width=
"95%"
>
<div
v-if=
"srcmsg"
>
<c-docshow
:path=
"path"
/>
<span>
{{
srcmsg
}}
</span>
</div>
<!--
<div
v-if=
"isdoc"
>
<embed
:src=
"realdocpath"
/>
</div>
-->
</el-dialog>
</el-dialog>
</span>
</span>
</
template
>
</
template
>
<
script
>
<
script
>
import
Api
from
"~/service/Api"
export
default
{
export
default
{
props
:[
'path'
],
props
:[
'path'
],
data
(){
data
(){
return
{
return
{
dialogOpen
:
false
,
dialogOpen
:
false
,
srcmsg
:
""
}
}
},
},
methods
:{
methods
:{
showDocOrMsg
(){
async
showDocOrMsg
(){
this
.
dialogOpen
=
true
this
.
dialogOpen
=
true
if
(
!
this
.
isdoc
)
{
//发出异步请求
}
else
window
.
open
(
this
.
realdocpath
)
}
}
},
},
computed
:{
computed
:{
...
@@ -39,8 +29,11 @@ export default {
...
@@ -39,8 +29,11 @@ export default {
else
else
return
false
return
false
},
},
realdocpath
(){
title
(){
return
'/gjjs/files'
+
this
.
path
if
(
this
.
isdoc
)
return
"面函展示"
else
return
"报文展示"
}
}
}
}
}
}
...
...
src/views/Business/Trnrel/index.vue
View file @
73931ea0
<
template
>
<
template
>
<c-page
title=
"复核夹查询"
>
<c-page
title=
"复核夹查询"
>
<el-form
:model=
"model"
:rules=
"rules"
ref=
"modelForm"
label-width=
"100px"
size=
"
small
"
>
<el-form
:model=
"model"
:rules=
"rules"
ref=
"modelForm"
label-width=
"100px"
size=
"
mini
"
>
<el-col
:span=
"12"
>
<el-col
:span=
"12"
>
<el-form-item
label=
"经办"
>
<el-form-item
label=
"经办"
>
...
@@ -113,7 +113,7 @@
...
@@ -113,7 +113,7 @@
sortable
sortable
width=
"100"
>
width=
"100"
>
<template
slot-scope=
"scope"
>
<template
slot-scope=
"scope"
>
{{
dateFormat
(
scope
.
row
.
inidattim
)
}}
{{
dateFormat
(
scope
.
row
.
inidattim
,
'yyyy-MM-dd hh:mm:ss'
)
}}
</
template
>
</
template
>
</el-table-column>
</el-table-column>
<el-table-column
<el-table-column
...
@@ -280,7 +280,7 @@ export default {
...
@@ -280,7 +280,7 @@ export default {
{
{
this
.
$notify
.
error
({
title
:
'错误'
,
message
:
'服务请求失败!'
});
this
.
$notify
.
error
({
title
:
'错误'
,
message
:
'服务请求失败!'
});
}
}
this
.
$notify
.
info
(
'提交成功!'
);
//
this.$notify.info('提交成功!');
})
})
},
},
onDsp
(){
onDsp
(){
...
...
src/views/Public/Doc.vue
View file @
73931ea0
...
@@ -33,6 +33,9 @@
...
@@ -33,6 +33,9 @@
</el-table-column>
</el-table-column>
</el-table>
</el-table>
</div>
</div>
<el-dialog
:title=
"title"
:visible
.
sync=
"dialogOpen"
:destroy-on-close=
"true"
width=
"95%"
>
<c-docshow
:path=
"viewurl"
/>
</el-dialog>
</div>
</div>
</template>
</template>
...
@@ -42,6 +45,13 @@ import Utils from "~/utils"
...
@@ -42,6 +45,13 @@ import Utils from "~/utils"
export
default
{
export
default
{
props
:[
'model'
],
props
:[
'model'
],
data
(){
return
{
viewurl
:
""
,
title
:
''
,
dialogOpen
:
false
}
},
methods
:{
methods
:{
async
detail
(
row
){
async
detail
(
row
){
let
cortyp
=
row
.
cortyp
let
cortyp
=
row
.
cortyp
...
@@ -57,9 +67,10 @@ export default {
...
@@ -57,9 +67,10 @@ export default {
console
.
log
(
rtnmsg
)
console
.
log
(
rtnmsg
)
if
(
rtnmsg
.
code
==
SUCCESS
)
{
if
(
rtnmsg
.
code
==
SUCCESS
)
{
if
(
cortyp
==
'SWT'
||
cortyp
==
'FMT'
||
cortyp
==
'CMT'
)
{
if
(
cortyp
==
'SWT'
||
cortyp
==
'FMT'
||
cortyp
==
'CMT'
)
{
let
viewurl
=
"/gjjs/files"
+
rtnmsg
.
data
.
setmod_msgmod_docpth
;
let
viewurl
=
rtnmsg
.
data
.
setmod_msgmod_docpth
;
this
.
viewurl
=
viewurl
window
.
open
(
viewurl
,
'newwindow'
,
'height=1200,width=800,top=100,left=100,toolbar=no,resizable=no,menubar=no,location=no, status=no'
);
this
.
title
=
"报文"
//window.open(viewurl, 'newwindow', 'height=1200,width=800,top=100,left=100,toolbar=no,resizable=no,menubar=no,location=no, status=no');
}
}
else
if
(
cortyp
==
'ELC'
)
else
if
(
cortyp
==
'ELC'
)
{
{
...
@@ -69,15 +80,18 @@ export default {
...
@@ -69,15 +80,18 @@ export default {
})
})
}
}
else
{
else
{
let
url
=
"/gjjs/files"
+
rtnmsg
.
data
.
trnmod_trndoc_docpth
;
let
url
=
rtnmsg
.
data
.
trnmod_trndoc_docpth
;
this
.
viewurl
=
url
this
.
title
=
"面函"
//console.log(url)
//console.log(url)
window
.
open
(
url
)
//
window.open(url)
// window.location.href = url
// window.location.href = url
// let url = rtnmsg.data.trndoc_docpth;
// let url = rtnmsg.data.trndoc_docpth;
// let viewurl = "/psbcfront/pdfjs/web/viewer.html";
// let viewurl = "/psbcfront/pdfjs/web/viewer.html";
// viewurl += "?file=" + url;
// viewurl += "?file=" + url;
// window.open(viewurl, 'newwindow', 'height=1200,width=800,top=100,left=100,toolbar=no,resizable=no,menubar=no,location=no, status=no');
// window.open(viewurl, 'newwindow', 'height=1200,width=800,top=100,left=100,toolbar=no,resizable=no,menubar=no,location=no, status=no');
}
}
this
.
dialogOpen
=
true
}
}
else
{
else
{
this
.
$notify
.
error
({
title
:
'错误'
,
message
:
'服务请求失败!'
})
this
.
$notify
.
error
({
title
:
'错误'
,
message
:
'服务请求失败!'
})
...
...
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