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
eb248650
Commit
eb248650
authored
Dec 09, 2023
by
覃振观
👶
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
23-12-9: Test 下班前提交代码
parent
4982d37e
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
48 additions
and
1 deletion
+48
-1
productDetail.js
...un-xt/src/main/webapp/biz/topsun/product/productDetail.js
+47
-1
ProductApplicationImpl.java
...psun/product/application/impl/ProductApplicationImpl.java
+1
-0
No files found.
topsun-xt/src/main/webapp/biz/topsun/product/productDetail.js
View file @
eb248650
...
...
@@ -2,9 +2,10 @@ var rawData={};
$
(
document
).
ready
(
function
()
{
initializeUI
();
initializeToobarContainer
();
$
(
'#pageTab'
).
tab
();
initializateSelectC
();
$
(
'#pageTab'
).
tab
();
loadDataTest
();
runObserver
();
});
function
initializateSelectC
()
{
...
...
@@ -39,6 +40,7 @@ function loadDataTest() {
faceGrid
(
"#frontFaceGrid"
,
fronData
);
fronData
.
Rows
=
data
.
backColors
;
faceGrid
(
"#backFaceGrid"
,
fronData
);
inputEventListener
();
});
}
...
...
@@ -97,6 +99,50 @@ function initializeToobarContainer(){
//dropup==true 更多按钮向上展示
$
(
'#toolBar'
).
data
(
'dropup'
,
true
).
removeClass
(
'job-button-fixed-top'
).
addClass
(
'job-button-fixed-bottom'
);
}
function
runObserver
()
{
observer
.
observe
(
document
.
querySelector
(
'#panelContainer'
),
mutationConfig
);
}
// 补充方案 监听 Value 属性
const
observer
=
new
MutationObserver
((
mutations
)
=>
{
mutations
.
forEach
((
mutation
)
=>
{
if
(
mutation
.
type
===
'attributes'
&&
mutation
.
attributeName
===
'value'
)
{
console
.
log
(
'属性变化节点 : '
+
mutation
.
target
);
console
.
log
(
'变化属性名 : '
+
mutation
.
attributeName
);
console
.
log
(
'变化属性值 : '
+
mutation
.
target
.
value
);
}
})
})
const
mutationConfig
=
{
attributes
:
true
,
childList
:
true
,
subtree
:
true
}
// 监听 input 管理页面显示的 Data,提交数据时,只提交修改过的 Data
function
inputEventListener
()
{
const
inputElements
=
document
.
querySelectorAll
(
'input'
);
inputElements
.
forEach
(
item
=>
{
item
.
addEventListener
(
'input'
,
(
event
)
=>
{
console
.
log
(
'Input value changed:'
,
event
.
target
.
value
);
});
});
}
function
getHashCode
(
str
,
caseSensitive
){
if
(
!
caseSensitive
){
str
=
str
.
toLowerCase
();
}
// 1315423911=b'1001110011001111100011010100111'
var
hash
=
1315423911
,
i
,
ch
;
for
(
i
=
str
.
length
-
1
;
i
>=
0
;
i
--
)
{
ch
=
str
.
charCodeAt
(
i
);
hash
^=
((
hash
<<
5
)
+
ch
+
(
hash
>>
2
));
}
var
hash2
=
hash
^
(
hash
<<
10
)
^
(
hash
>>
6
);
var
str2
=
str
+
str
+
str
;
var
hash3
=
this
.
getHashCode
(
str2
,
caseSensitive
);
return
(
hash
&
0x7FFFFFFF
)
^
hash2
^
hash3
;
}
// checkbox: true,
// enabledSort: false,
// autoAddRowByKeydown:false,
...
...
topsun/src/main/java/com/huigou/topsun/product/application/impl/ProductApplicationImpl.java
View file @
eb248650
...
...
@@ -152,6 +152,7 @@ public class ProductApplicationImpl implements ProductApplication {
continue
;
}
map
.
putAll
(
mapper
.
convertValue
(
item
,
new
TypeReference
<
Map
<?
extends
String
,
?>>()
{}));
// 这里要获取所有的属性名, 保存对应关系, 属性: 所属实体类;
}
return
map
;
}
...
...
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