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
fukai
vue-gjjs
Commits
3787df3d
Commit
3787df3d
authored
Sep 13, 2021
by
潘际乾
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Trnrel
parent
e81589b0
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
86 additions
and
35 deletions
+86
-35
IStreamTable.vue
src/components/IStreamTable.vue
+67
-23
Default.js
src/model/Ditopn/Default.js
+15
-11
Event.js
src/model/Trnrel/Event.js
+4
-1
No files found.
src/components/IStreamTable.vue
View file @
3787df3d
...
...
@@ -54,32 +54,68 @@ export default {
},
computed
:
{
tableColumns
()
{
const
arr
=
[];
for
(
let
i
=
0
;
i
<
this
.
columns
.
length
;
i
++
)
{
const
column
=
this
.
columns
[
i
];
const
label
=
column
.
split
(
"
\"
"
)[
1
]
const
newStr
=
column
.
replace
(
`\"
${
label
}
\"`
,
"label"
)
const
vals
=
newStr
.
split
(
" "
)
// "P VERTLINES TRUE"
if
(
vals
.
length
<=
3
)
continue
;
arr
.
push
({
prop
:
vals
[
0
],
label
:
label
,
// width: vals[3],
width
:
"auto"
,
});
const
columnArr
=
[]
const
lines
=
this
.
columns
;
const
etyReg
=
/
\"(\w
*
\s?\w
*
)\"
/
const
obj
=
{}
for
(
let
i
=
0
;
i
<
lines
.
length
;
i
++
)
{
const
line
=
lines
[
i
];
if
(
etyReg
.
test
(
line
))
{
const
gs
=
line
.
match
(
etyReg
)
const
columnName
=
gs
[
1
]
const
newLine
=
line
.
replace
(
gs
[
0
],
"_"
)
const
colPropArr
=
newLine
.
split
(
" "
)
const
positionArr
=
colPropArr
[
1
].
split
(
":"
)
if
(
!
obj
[
positionArr
[
0
]])
{
obj
[
positionArr
[
0
]]
=
[]
}
obj
[
positionArr
[
0
]].
push
({
idx
:
colPropArr
[
0
],
prop
:
columnName
,
width
:
colPropArr
[
3
]
})
}
}
return
arr
;
for
(
const
k
in
obj
)
{
if
(
Object
.
hasOwnProperty
.
call
(
obj
,
k
))
{
const
o
=
obj
[
k
];
const
tableColumn
=
o
.
map
(
item
=>
item
.
prop
).
join
(
"
\
n"
)
columnArr
.
push
({
prop
:
tableColumn
,
label
:
tableColumn
,
// width: o[0].width,
width
:
"auto"
,
index
:
k
,
children
:
o
})
}
}
return
columnArr
.
sort
((
a
,
b
)
=>
{
return
parseInt
(
a
.
index
)
-
parseInt
(
b
.
index
)
})
},
tableData
()
{
return
this
.
list
.
map
((
row
)
=>
{
const
res
=
{}
const
vals
=
row
.
split
(
"
\
t"
);
for
(
let
i
=
0
;
i
<
vals
.
length
;
i
++
)
{
res
[
`
${
i
}
`
]
=
vals
[
i
];
}
return
res
;
});
// return this.list.map((row) => {
// const res = {}
// const vals = row.split("\t");
// for (let i = 0; i
<
vals
.
length
;
i
++
)
{
// res[`${i}`] = vals[i];
// }
// return res;
// });
const
arr
=
[]
for
(
let
i
=
0
;
i
<
this
.
list
.
length
;
i
++
)
{
const
d
=
this
.
list
[
i
];
const
items
=
d
.
split
(
"
\
t"
)
const
it
=
{}
for
(
let
j
=
0
;
j
<
this
.
tableColumns
.
length
;
j
++
)
{
const
column
=
this
.
tableColumns
[
j
];
it
[
column
[
'prop'
]]
=
column
.
children
.
map
(
c
=>
items
[
c
[
'idx'
]]
||
" "
).
join
(
"
\
n"
)
}
it
[
'IDX'
]
=
i
arr
.
push
(
it
)
}
return
arr
},
},
data
()
{
...
...
@@ -120,6 +156,9 @@ export default {
</
script
>
<
style
>
.eContainer-table-block
{
margin-top
:
15px
;
}
.eContainer-table-block
.paginationLable
{
font-size
:
12px
;
color
:
#808080
;
...
...
@@ -137,4 +176,8 @@ export default {
.el-table
.success-row
{
background
:
#f0f9eb
;
}
.eContainer-table-block
.el-table
.cell
{
white-space
:
pre-wrap
;
}
</
style
>
\ No newline at end of file
src/model/Ditopn/Default.js
View file @
3787df3d
...
...
@@ -231,17 +231,16 @@ function defaultDidgrpCbsNom1Cur(rule, value, callback)
function
defaultDidgrpCbsNom1Amt
(
rule
,
value
,
callback
)
{
const
that
=
this
;
// 信用证最大金额
caculateMaxAmt
(
that
)
// 大写金额
that
.
executeDefault
(
"ditp.amt"
).
then
(
res
=>
{
that
.
model
.
ditp
.
amt
=
res
.
data
.
ditp_amt
;
})
// 摘要
that
.
executeDefault
(
"didgrp.rec.nam"
).
then
(
res
=>
{
that
.
model
.
didgrp
.
rec
.
nam
=
res
.
data
.
didgrp_rec_nam
;
})
callback
()
caculateMaxAmt
(
that
,
callback
)
// // 大写金额
// that.executeDefault("ditp.amt").then(res => {
// that.model.ditp.amt = res.data.ditp_amt;
// })
// // 摘要
// that.executeDefault("didgrp.rec.nam").then(res => {
// that.model.didgrp.rec.nam = res.data.didgrp_rec_nam;
// })
// callback()
}
function
defaultSetmodZmqacc
()
{
}
...
...
@@ -439,6 +438,11 @@ function defaultDidgrpRecNomton(rule, value, callback) {
function
caculateMaxAmt
(
that
,
callback
)
{
that
.
executeDefault
(
"didgrp.cbs.max.amt"
).
then
(
res
=>
{
// 大写金额
that
.
model
.
ditp
.
amt
=
res
.
data
.
ditp_amt
;
// 摘要
that
.
model
.
didgrp
.
rec
.
nam
=
res
.
data
.
didgrp_rec_nam
;
// 信用证最大金额
that
.
model
.
didgrp
.
cbs
.
max
.
amt
=
res
.
data
.
didgrp_cbs_max_amt
;
if
(
callback
)
{
callback
()
...
...
src/model/Trnrel/Event.js
View file @
3787df3d
...
...
@@ -379,7 +379,9 @@ export default {
},
display
(
index
,
row
){
let
viewurl
=
"/#/display/"
+
row
[
'10'
].
toLowerCase
()
+
"?trn="
+
row
[
'1'
]
const
d
=
this
.
stmData
.
data
[
index
]
const
ds
=
d
.
split
(
"
\
t"
)
let
viewurl
=
"/#/display/"
+
ds
[
'10'
].
toLowerCase
()
+
"?trn="
+
ds
[
'1'
]
window
.
open
(
viewurl
,
'newwindow'
,
'height=1200,width=900,top=100,left=100,toolbar=no,resizable=no,menubar=no,location=no, status=no'
);
}
}
\ 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