前端逻辑调整
This commit is contained in:
parent
ca1a0fd049
commit
abaf0757e5
|
|
@ -131,17 +131,20 @@
|
||||||
addLog(topic, payload);
|
addLog(topic, payload);
|
||||||
let initData = data.rw_prot;
|
let initData = data.rw_prot;
|
||||||
if (!initData) {
|
if (!initData) {
|
||||||
|
console.log('initDataC========goParams');
|
||||||
initData = data.params;
|
initData = data.params;
|
||||||
}
|
}
|
||||||
|
console.log('initData========', initData);
|
||||||
if (initData) {
|
if (initData) {
|
||||||
let dataJson = initData.r_data;
|
let dataJson = initData.r_data;
|
||||||
if (!dataJson) {
|
if (!dataJson) {
|
||||||
|
console.log('dataJsonC========GoWdata');
|
||||||
dataJson = initData.w_data;
|
dataJson = initData.w_data;
|
||||||
}
|
}
|
||||||
|
console.log('dataJson========', dataJson);
|
||||||
if (dataJson !== undefined) {
|
if (dataJson !== undefined) {
|
||||||
// 先构建源数据的 Map
|
// 先构建源数据的 Map
|
||||||
const sourceMap = initData.r_data.reduce((map, item) => {
|
const sourceMap = dataJson.reduce((map, item) => {
|
||||||
map[item.name] = item.value;
|
map[item.name] = item.value;
|
||||||
return map;
|
return map;
|
||||||
}, {});
|
}, {});
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue