Commit 6aa6d882 authored by 高建强's avatar 高建强

item:剔除电力设备编辑为null的属性

parent 2bbf0da8
......@@ -276,6 +276,14 @@ class Equipment extends Component {
dataValues.imageUrl3 && formData.append('img3', dataValues.imageUrl3[0]);
dataValues.imageUrl4 && formData.append('img4', dataValues.imageUrl4[0]);
if (dataValues) {
for (var key in dataValues) {
if (dataValues[key] == null || typeof(dataValues[key]) == "undefined") {
delete dataValues[key];
}
}
}
Object.keys(dataValues).map(item => {
if (item === 'chargeDeptId' && dataValues[item] === null) {
formData.append(item, -1);
......
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