Merge branch 'master' of http://118.178.224.202:3000/ewide/ewide_core
This commit is contained in:
@@ -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) {
|
||||
|
||||
@@ -3,6 +3,9 @@ import { Form, message as Message, Spin } from 'antd'
|
||||
import { AntIcon } from 'components'
|
||||
import { cloneDeep } from 'lodash'
|
||||
import MonacoEditor from 'react-monaco-editor'
|
||||
import store from 'store'
|
||||
|
||||
const { getState } = store
|
||||
|
||||
const initialValues = {}
|
||||
|
||||
@@ -10,6 +13,7 @@ export default class form extends Component {
|
||||
state = {
|
||||
// 加载状态
|
||||
loading: true,
|
||||
...getState('layout'),
|
||||
}
|
||||
|
||||
// 表单实例
|
||||
@@ -83,6 +87,8 @@ export default class form extends Component {
|
||||
//#endregion
|
||||
|
||||
render() {
|
||||
const { theme } = this.state
|
||||
|
||||
return (
|
||||
<Form initialValues={initialValues} ref={this.form} className="yo-form">
|
||||
<Spin spinning={this.state.loading} indicator={<AntIcon type="loading" />}>
|
||||
@@ -90,7 +96,7 @@ export default class form extends Component {
|
||||
<MonacoEditor
|
||||
height={300}
|
||||
language="json"
|
||||
theme="vs-dark"
|
||||
theme={theme === 'dark' ? 'vs-dark' : 'default'}
|
||||
options={{
|
||||
fontSize: 12,
|
||||
}}
|
||||
|
||||
Reference in New Issue
Block a user