diff --git a/web-react/src/pages/business/house/info/form/index.jsx b/web-react/src/pages/business/house/info/form/index.jsx index 5a2363d..1bf327c 100644 --- a/web-react/src/pages/business/house/info/form/index.jsx +++ b/web-react/src/pages/business/house/info/form/index.jsx @@ -1,6 +1,6 @@ import React, { Component } from 'react' import { Form, Button, Input, Descriptions, message as Message, Modal, Spin, Tabs } from 'antd' -import { merge, isEqual } from 'lodash' +import { merge, isEqual, pickBy } from 'lodash' import { AntIcon, ComponentDynamic, Container } from 'components' import { api } from 'common/api' @@ -90,6 +90,10 @@ export default class index extends Component { const { taskId } = this.props.param if (taskId) { api.houseInfoGetByTaskId({ taskId }).then(({ data }) => { + // 删除空节点 + for (const key in data) { + data[key] = pickBy(data[key], p => p !== null && p !== undefined) + } this.setState({ taskStatus: data.patrolInfo.status, record: data, @@ -168,7 +172,6 @@ export default class index extends Component { this.formData.patrolInfo.id = this.props.param.taskId } - console.log(this.formData) this.setState({ saving: true }) if (action) {