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
593ae06a
Commit
593ae06a
authored
Jan 12, 2022
by
fukai
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
完善stream组件,补充公共请求提示,修复content报错误问题
parent
e487bf2b
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
97 additions
and
8 deletions
+97
-8
Content.vue
src/components/Content.vue
+4
-0
IStreamTable.vue
src/components/IStreamTable.vue
+57
-2
commonApi.js
src/mixin/commonApi.js
+32
-4
Infsea.vue
src/views/Business/Infdid/Infsea.vue
+4
-2
No files found.
src/components/Content.vue
View file @
593ae06a
...
@@ -34,6 +34,10 @@
...
@@ -34,6 +34,10 @@
},
},
handleResize
:
(
contentRef
,
height
)
=>
{
handleResize
:
(
contentRef
,
height
)
=>
{
let
content
=
document
.
getElementById
(
contentRef
)
let
content
=
document
.
getElementById
(
contentRef
)
if
(
!
content
){
//切换顶部tab,会隐藏元素,所以有可能找不到
return
}
let
clientHeight
=
`
${
document
.
documentElement
.
clientHeight
}
`
let
clientHeight
=
`
${
document
.
documentElement
.
clientHeight
}
`
content
.
style
.
height
=
clientHeight
-
height
+
'px'
content
.
style
.
height
=
clientHeight
-
height
+
'px'
}
}
...
...
src/components/IStreamTable.vue
View file @
593ae06a
...
@@ -20,6 +20,7 @@
...
@@ -20,6 +20,7 @@
v-if=
"showSelection"
v-if=
"showSelection"
:reserve-selection=
"true"
:reserve-selection=
"true"
></el-table-column>
></el-table-column>
<el-table-column
<el-table-column
v-for=
"(item, key) in tableColumns"
v-for=
"(item, key) in tableColumns"
:key=
"key"
:key=
"key"
...
@@ -27,6 +28,9 @@
...
@@ -27,6 +28,9 @@
:label=
"item.label"
:label=
"item.label"
:width=
"item.width"
:width=
"item.width"
>
>
<template
slot-scope=
"scope"
>
<span>
{{
!
item
.
render
?
scope
.
row
[
item
.
prop
]:
item
.
render
(
item
.
prop
,
scope
)
}}
</span>
</
template
>
</el-table-column>
</el-table-column>
<slot></slot>
<slot></slot>
<el-table-column
fixed=
"right"
width=
"48px"
v-if=
"showButtonFlg"
class-name=
"buttonColumn"
>
<el-table-column
fixed=
"right"
width=
"48px"
v-if=
"showButtonFlg"
class-name=
"buttonColumn"
>
...
@@ -185,6 +189,24 @@ export default {
...
@@ -185,6 +189,24 @@ export default {
const
obj
=
{};
const
obj
=
{};
for
(
let
i
=
0
;
i
<
lines
.
length
;
i
++
)
{
for
(
let
i
=
0
;
i
<
lines
.
length
;
i
++
)
{
const
line
=
lines
[
i
];
const
line
=
lines
[
i
];
if
(
typeof
line
===
"object"
){
//如果是对象,支持自定义处理
//{width,position,index,label,pattern,render}
let
{
width
,
position
,
index
,
label
,
pattern
,
render
,...
rest
}
=
line
position
+=
''
if
(
!
obj
[
position
])
{
obj
[
position
]
=
[];
}
obj
[
position
].
push
({
idx
:
index
,
prop
:
label
,
width
:
width
+
'px'
,
pattern
,
render
,
...
rest
})
continue
}
if
(
etyReg
.
test
(
line
))
{
if
(
etyReg
.
test
(
line
))
{
const
gs
=
line
.
match
(
etyReg
);
const
gs
=
line
.
match
(
etyReg
);
const
columnName
=
gs
[
1
];
const
columnName
=
gs
[
1
];
...
@@ -205,14 +227,24 @@ export default {
...
@@ -205,14 +227,24 @@ export default {
if
(
Object
.
hasOwnProperty
.
call
(
obj
,
k
))
{
if
(
Object
.
hasOwnProperty
.
call
(
obj
,
k
))
{
const
o
=
obj
[
k
];
const
o
=
obj
[
k
];
const
tableColumn
=
o
.
map
((
item
)
=>
item
.
prop
).
join
(
"
\
n"
);
const
tableColumn
=
o
.
map
((
item
)
=>
item
.
prop
).
join
(
"
\
n"
);
columnArr
.
push
(
{
let
colInfo
=
{
prop
:
tableColumn
,
prop
:
tableColumn
,
label
:
tableColumn
,
label
:
tableColumn
,
width
:
o
[
0
].
width
,
width
:
o
[
0
].
width
,
// width: "auto",
// width: "auto",
index
:
k
,
index
:
k
,
children
:
o
,
children
:
o
,
});
}
//支持自定义处理
if
(
o
.
length
==
1
){
if
(
o
[
0
].
pattern
&&
this
[
o
[
0
].
pattern
]){
colInfo
.
render
=
this
[
o
[
0
].
pattern
]
colInfo
.
code
=
o
[
0
].
code
}
else
if
(
o
[
0
].
render
){
colInfo
.
render
=
o
[
0
].
render
}
}
columnArr
.
push
(
colInfo
);
}
}
}
}
const
arr
=
columnArr
.
sort
((
a
,
b
)
=>
{
const
arr
=
columnArr
.
sort
((
a
,
b
)
=>
{
...
@@ -271,6 +303,29 @@ export default {
...
@@ -271,6 +303,29 @@ export default {
handleColumnChange
()
{
handleColumnChange
()
{
this
.
selectAll
=
this
.
tableColumnsOrigin
.
length
===
this
.
columnGroup
.
length
;
this
.
selectAll
=
this
.
tableColumnsOrigin
.
length
===
this
.
columnGroup
.
length
;
},
},
//补充自定义列处理函数
date
(
prop
,
scope
){
let
value
=
scope
.
row
[
prop
]
if
(
!
value
){
return
""
}
let
idx
=
value
.
indexOf
(
" "
)
if
(
idx
>
0
)
return
value
.
substring
(
0
,
idx
)
return
value
},
code
(
prop
,
scope
,
code
){
let
value
=
scope
.
row
[
prop
]
if
(
!
value
||
!
code
){
return
""
}
let
em
=
code
.
find
(
item
=>
item
.
value
.
trim
()
==
value
.
trim
())
if
(
!
em
){
return
value
}
return
em
.
label
}
}
}
};
};
</
script
>
</
script
>
...
...
src/mixin/commonApi.js
View file @
593ae06a
...
@@ -57,26 +57,42 @@ export default {
...
@@ -57,26 +57,42 @@ export default {
const
tab
=
Utils
.
positioningErrorMsg
(
fieldErrors
,
fields
);
const
tab
=
Utils
.
positioningErrorMsg
(
fieldErrors
,
fields
);
return
tab
;
return
tab
;
},
},
loading
(
text
){
const
loading
=
this
.
$loading
({
lock
:
true
,
text
,
spinner
:
'el-icon-loading'
,
background
:
'rgba(200, 200, 200, 0.3)'
});
return
loading
},
getRoot
(){
getRoot
(){
return
(
this
.
root
||
this
)
return
(
this
.
root
||
this
)
},
},
async
init
(
params
)
{
async
init
(
params
)
{
const
loading
=
this
.
loading
(
"交易加载中"
)
let
rtnmsg
=
await
Api
.
post
(
this
.
declareParams
.
trnName
+
"/init"
,
{
params
})
let
rtnmsg
=
await
Api
.
post
(
this
.
declareParams
.
trnName
+
"/init"
,
{
params
})
if
(
rtnmsg
.
respCode
==
SUCCESS
){
if
(
rtnmsg
.
respCode
==
SUCCESS
){
this
.
updapteValueSet
(
rtnmsg
.
codeSet
)
this
.
updapteValueSet
(
rtnmsg
.
codeSet
)
}
}
loading
.
close
()
return
rtnmsg
return
rtnmsg
},
},
save
(
params
)
{
async
save
(
params
)
{
return
Api
.
post
(
this
.
declareParams
.
trnName
+
"/saveData"
,
this
.
wrapper
(
params
))
const
loading
=
this
.
loading
(
"正在保存交易"
)
let
rtnmsg
=
await
Api
.
post
(
this
.
declareParams
.
trnName
+
"/saveData"
,
this
.
wrapper
(
params
))
loading
.
close
()
return
rtnmsg
},
},
async
executeCheck
(
rulePath
,
params
){
async
executeCheck
(
rulePath
,
params
){
const
loading
=
this
.
loading
(
"校验进行中"
)
let
rtnmsg
=
await
Api
.
post
(
this
.
declareParams
.
trnName
+
"/executeCheck/"
+
rulePath
,
this
.
wrapper
(
params
))
let
rtnmsg
=
await
Api
.
post
(
this
.
declareParams
.
trnName
+
"/executeCheck/"
+
rulePath
,
this
.
wrapper
(
params
))
if
(
rtnmsg
.
respCode
==
SUCCESS
){
if
(
rtnmsg
.
respCode
==
SUCCESS
){
this
.
updapteValueSet
(
rtnmsg
.
codeSet
)
this
.
updapteValueSet
(
rtnmsg
.
codeSet
)
this
.
showBackendErrors
(
rtnmsg
.
fieldErrors
)
this
.
showBackendErrors
(
rtnmsg
.
fieldErrors
)
}
}
loading
.
close
()
return
rtnmsg
return
rtnmsg
},
},
async
executeDefault
(
rulePath
,
params
)
{
async
executeDefault
(
rulePath
,
params
)
{
...
@@ -88,29 +104,41 @@ export default {
...
@@ -88,29 +104,41 @@ export default {
return
rtnmsg
return
rtnmsg
},
},
async
executeRule
(
rulePath
,
params
,
delayCb
)
{
async
executeRule
(
rulePath
,
params
,
delayCb
)
{
const
loading
=
this
.
loading
(
"正在请求数据"
)
let
rtnmsg
=
await
Api
.
post
(
this
.
declareParams
.
trnName
+
"/executeRule/"
+
rulePath
,
this
.
wrapper
(
params
,
delayCb
))
let
rtnmsg
=
await
Api
.
post
(
this
.
declareParams
.
trnName
+
"/executeRule/"
+
rulePath
,
this
.
wrapper
(
params
,
delayCb
))
if
(
rtnmsg
.
respCode
==
SUCCESS
){
if
(
rtnmsg
.
respCode
==
SUCCESS
){
this
.
updapteValueSet
(
rtnmsg
.
codeSet
)
this
.
updapteValueSet
(
rtnmsg
.
codeSet
)
this
.
showBackendErrors
(
rtnmsg
.
fieldErrors
)
this
.
showBackendErrors
(
rtnmsg
.
fieldErrors
)
}
}
loading
.
close
()
return
rtnmsg
return
rtnmsg
},
},
async
checkAll
(
params
)
{
async
checkAll
(
params
)
{
const
loading
=
this
.
loading
(
"正在校验数据"
)
const
rtnmsg
=
await
Api
.
post
(
this
.
declareParams
.
trnName
+
"/checkAll"
,
this
.
wrapper
(
params
))
const
rtnmsg
=
await
Api
.
post
(
this
.
declareParams
.
trnName
+
"/checkAll"
,
this
.
wrapper
(
params
))
if
(
rtnmsg
.
respCode
==
SUCCESS
){
if
(
rtnmsg
.
respCode
==
SUCCESS
){
this
.
updapteValueSet
(
rtnmsg
.
codeSet
)
this
.
updapteValueSet
(
rtnmsg
.
codeSet
)
}
}
loading
.
close
()
return
rtnmsg
return
rtnmsg
},
},
pedding
(
params
)
{
async
pedding
(
params
)
{
return
Api
.
post
(
this
.
declareParams
.
trnName
+
"/pending"
,
this
.
wrapper
(
params
))
const
loading
=
this
.
loading
(
"正在暂存数据"
)
const
rtnmsg
=
await
Api
.
post
(
this
.
declareParams
.
trnName
+
"/pending"
,
this
.
wrapper
(
params
))
if
(
rtnmsg
.
respCode
==
SUCCESS
){
this
.
updapteValueSet
(
rtnmsg
.
codeSet
)
}
loading
.
close
()
return
rtnmsg
},
},
async
restoreDisplay
()
{
async
restoreDisplay
()
{
let
inr
=
this
.
$route
.
query
.
trn
let
inr
=
this
.
$route
.
query
.
trn
if
(
!
inr
)
if
(
!
inr
)
return
return
const
loading
=
this
.
loading
(
"快照数据加载中"
)
let
data
=
await
Api
.
post
(
"display/"
+
inr
)
let
data
=
await
Api
.
post
(
"display/"
+
inr
)
Utils
.
copyValueFromVO
(
this
.
model
,
JSON
.
parse
(
data
.
data
))
Utils
.
copyValueFromVO
(
this
.
model
,
JSON
.
parse
(
data
.
data
))
loading
.
close
()
},
},
async
executeNotify
(
params
)
{
async
executeNotify
(
params
)
{
const
rtnmsg
=
await
Api
.
post
(
this
.
declareParams
.
trnName
+
"/executeNotify"
,
this
.
wrapper
(
params
))
const
rtnmsg
=
await
Api
.
post
(
this
.
declareParams
.
trnName
+
"/executeNotify"
,
this
.
wrapper
(
params
))
...
...
src/views/Business/Infdid/Infsea.vue
View file @
593ae06a
...
@@ -612,8 +612,10 @@ export default {
...
@@ -612,8 +612,10 @@ export default {
'9 6 "Beneficiary Party Number" 170'
,
'9 6 "Beneficiary Party Number" 170'
,
'10 7 "Beneficiary" 150'
,
'10 7 "Beneficiary" 150'
,
'11 8 "BIC" 150'
,
'11 8 "BIC" 150'
,
'4 9 "Opened" 150'
,
// '4 9 "Opened" 150',
'5 10 "Expired" 150'
,
{
index
:
4
,
position
:
9
,
width
:
100
,
pattern
:
'date'
,
label
:
'Opened'
},
// '5 10 "Expired" 150',
{
index
:
5
,
position
:
10
,
width
:
100
,
pattern
:
'date'
,
label
:
'Expired'
},
'6 11 "Closed" 100'
,
'6 11 "Closed" 100'
,
'12 12 "L/C Amt Cur" 100'
,
'12 12 "L/C Amt Cur" 100'
,
'13 13 "L/C Amount" 120'
,
'13 13 "L/C Amount" 120'
,
...
...
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