Commit eb248650 authored by 覃振观's avatar 覃振观 👶

23-12-9: Test 下班前提交代码

parent 4982d37e
......@@ -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,
......
......@@ -152,6 +152,7 @@ public class ProductApplicationImpl implements ProductApplication {
continue;
}
map.putAll(mapper.convertValue(item, new TypeReference<Map<? extends String, ?>>() {}));
// 这里要获取所有的属性名, 保存对应关系, 属性: 所属实体类;
}
return map;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment