Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
T
topsun-bpm
Project
Project
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
鲁鑫
topsun-bpm
Commits
c3711749
Commit
c3711749
authored
Dec 20, 2023
by
覃振观
👶
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
333
parent
05120e95
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
10 deletions
+11
-10
listeningFromData.js
...xt/src/main/webapp/biz/topsun/common/listeningFromData.js
+11
-10
No files found.
topsun-xt/src/main/webapp/biz/topsun/common/listeningFromData.js
View file @
c3711749
...
...
@@ -208,7 +208,7 @@ function listeningGrid(elId, options) {
const
originalOnClick
=
but
.
click
;
but
.
click
=
function
()
{
let
mappingEntry
=
Object
.
entries
(
window
.
dataMapping
);
tryForEach
(
mappingEntry
,
entry
=>
{
mappingEntry
.
forEach
(
entry
=>
{
let
beanName
=
entry
[
0
];
if
(
elId
.
indexOf
(
beanName
)
>=
0
)
{
let
idProperty
=
entry
[
1
].
id
;
...
...
@@ -223,11 +223,11 @@ function listeningGrid(elId, options) {
// ------------- 设置 mapper -------------
debugger
;
tryForEach
(
entry
[
1
].
columns
,
property
=>
{
mapperData
[
'
beanName'
]
=
beanName
;
mapperData
[
'
listeningKey'
]
=
rowId
+
''
;
if
(
!
mapper
[
property
])
{
mapper
[
property
]
=
{};
}
mapper
[
property
][
rowId
]
=
mapperData
;
mapper
[
property
][
beanName
]
=
mapperData
;
data
[
property
]
=
''
;
});
data
[
idProperty
]
=
rowId
;
...
...
@@ -249,7 +249,6 @@ function listeningGrid(elId, options) {
}
})
originalOnClick
.
call
(
this
,
data
);
debugger
;
}
}
...
...
@@ -291,12 +290,14 @@ function listenerContent(event) {
let
inputIds
=
editId
.
split
(
'_'
);
debugger
;
tryForEach
(
Object
.
entries
(
beanMapping
),
mapperEntry
=>
{
let
mapperVal
=
mapperEntry
[
1
],
mapperKey
=
mapperEntry
[
0
];
if
(
mapperVal
.
rowIndex
===
inputIds
[
2
]
*
1
)
{
window
.
dataSet
.
newData
[
mapperVal
.
beanName
].
compares
[
mapperKey
][
event
.
target
.
getAttribute
(
'name'
)]
=
event
.
target
.
value
;
console
.
log
(
'Input value changed:'
,
event
.
target
.
value
);
}
else
{
console
.
error
(
'当前输入框 '
+
event
.
target
.
id
+
'无法与数据行'
+
mapperKey
+
':'
+
mapperVal
.
rowIndex
+
'匹配!'
);
let
mapperKey
=
mapperEntry
[
0
],
mapperVal
=
mapperEntry
[
1
];
if
(
inputIds
[
0
].
lastIndexOf
(
mapperKey
)
>=
0
)
{
if
(
mapperVal
.
rowIndex
===
inputIds
[
2
]
*
1
)
{
window
.
dataSet
.
newData
[
mapperKey
].
compares
[
mapperVal
.
listeningKey
][
inputIds
[
1
]]
=
event
.
target
.
value
;
console
.
log
(
'Input value changed:'
,
event
.
target
.
value
);
}
else
{
console
.
error
(
'当前输入框 '
+
event
.
target
.
id
+
'无法与数据行'
+
mapperKey
+
':'
+
mapperVal
.
rowIndex
+
'匹配!'
);
}
}
})
return
;
...
...
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