代码调整

This commit is contained in:
joylink_cuiweidong 2020-05-14 19:42:08 +08:00
parent 8f0129a742
commit bd730d5946

View File

@ -97,7 +97,9 @@ export default {
});
lastData = JSON.parse(lastData);
lastData.forEach(each=>{
each.name = each.role + (each.name == undefined ? '' : each.name);
const name = each.name == undefined ? '' : '-' + each.name;
const deviceName = each.deviceName == undefined ? '' : '-' + each.deviceName;
each.name = each.role + name + deviceName;
});
return lastData;
},