update 整改reducer
This commit is contained in:
@@ -3,7 +3,7 @@ import { Button, Card, Form, Input, Popconfirm, message as Message } from 'antd'
|
||||
import { isEqual } from 'lodash'
|
||||
import { AntIcon, Auth, Container, ModalForm, QueryTable, QueryTableActions } from 'components'
|
||||
import { api } from 'common/api'
|
||||
import getDicData from 'util/dic'
|
||||
import getDictData from 'util/dic'
|
||||
import auth from 'components/authorized/handler'
|
||||
import { toCamelCase } from 'util/format'
|
||||
import FormBody from './form'
|
||||
@@ -134,7 +134,7 @@ export default class index extends Component {
|
||||
*/
|
||||
componentDidMount() {
|
||||
this.table.current.onLoading()
|
||||
getDicData('common_status').then(res => {
|
||||
getDictData('common_status').then(res => {
|
||||
this.setState({
|
||||
codes: res
|
||||
}, () => {
|
||||
@@ -250,12 +250,6 @@ export default class index extends Component {
|
||||
onClick={() => this.onOpen(this.addForm)}
|
||||
>新增{name}</Button>
|
||||
}
|
||||
expandedRowRender={
|
||||
record => {
|
||||
console.log(record)
|
||||
return <div>123</div>
|
||||
}
|
||||
}
|
||||
/>
|
||||
</Card>
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@ import React, { Component } from 'react'
|
||||
import { Form, Input, InputNumber, Select, Spin } from 'antd'
|
||||
import { AntIcon } from 'components'
|
||||
import { cloneDeep } from 'lodash'
|
||||
import getDicData from 'util/dic'
|
||||
import getDictData from 'util/dic'
|
||||
|
||||
const initialValues = {
|
||||
sort: 100
|
||||
@@ -40,7 +40,7 @@ export default class form extends Component {
|
||||
this.record = cloneDeep(params.record)
|
||||
//#region 从后端转换成前段所需格式
|
||||
|
||||
const codes = await getDicData('dic_areacode_type')
|
||||
const codes = await getDictData('dic_areacode_type')
|
||||
const exist = !!params.record;
|
||||
this.setState({
|
||||
codes,
|
||||
|
||||
@@ -5,7 +5,7 @@ import { api } from 'common/api'
|
||||
import auth from 'components/authorized/handler'
|
||||
import { toCamelCase } from 'util/format'
|
||||
import { isEqual } from 'lodash'
|
||||
import getDicData from 'util/dic'
|
||||
import getDictData from 'util/dic'
|
||||
import FormBody from './form'
|
||||
|
||||
const apiAction = {
|
||||
@@ -118,7 +118,7 @@ export default class index extends Component {
|
||||
*/
|
||||
componentDidMount() {
|
||||
this.table.current.onLoading()
|
||||
getDicData('dic_areacode_type').then(res => {
|
||||
getDictData('dic_areacode_type').then(res => {
|
||||
this.setState({
|
||||
codes: res
|
||||
}, () => {
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
import React, { Component } from 'react'
|
||||
import { Form, Input, InputNumber, message as Message, Spin } from 'antd'
|
||||
import { AntIcon, IconSelector } from 'components'
|
||||
import { Form, message as Message, Spin } from 'antd'
|
||||
import { AntIcon } from 'components'
|
||||
import { cloneDeep } from 'lodash'
|
||||
import * as monaco from 'monaco-editor'
|
||||
import MonacoEditor from 'react-monaco-editor'
|
||||
|
||||
const initialValues = {}
|
||||
@@ -71,7 +70,7 @@ export default class form extends Component {
|
||||
if (code.constructor === Object) {
|
||||
postData.extCode = JSON.stringify(code);
|
||||
} else {
|
||||
throw 0;
|
||||
throw new Error(0);
|
||||
}
|
||||
} catch {
|
||||
Message.error('错误的JSON格式')
|
||||
|
||||
@@ -3,7 +3,7 @@ import { Button, Card, Form, Input, Popconfirm, message as Message, InputNumber
|
||||
import { isEqual } from 'lodash'
|
||||
import { AntIcon, Auth, Container, ModalForm, QueryTable, QueryTableActions } from 'components'
|
||||
import { api } from 'common/api'
|
||||
import getDicData from 'util/dic'
|
||||
import getDictData from 'util/dic'
|
||||
import auth from 'components/authorized/handler'
|
||||
import { toCamelCase } from 'util/format'
|
||||
import FormBody from './form'
|
||||
@@ -185,7 +185,7 @@ export default class index extends Component {
|
||||
*/
|
||||
componentDidMount() {
|
||||
this.table.current.onLoading()
|
||||
getDicData('common_status').then(res => {
|
||||
getDictData('common_status').then(res => {
|
||||
this.setState({
|
||||
codes: res
|
||||
}, () => {
|
||||
|
||||
@@ -5,7 +5,7 @@ import { api } from 'common/api'
|
||||
import auth from 'components/authorized/handler'
|
||||
import { toCamelCase } from 'util/format'
|
||||
import { isEqual } from 'lodash'
|
||||
import getDicData from 'util/dic'
|
||||
import getDictData from 'util/dic'
|
||||
import FormBody from './form'
|
||||
import DictData from './dictdata'
|
||||
|
||||
@@ -126,7 +126,7 @@ export default class index extends Component {
|
||||
*/
|
||||
componentDidMount() {
|
||||
this.table.current.onLoading()
|
||||
getDicData('common_status').then(res => {
|
||||
getDictData('common_status').then(res => {
|
||||
this.setState({
|
||||
codes: res
|
||||
}, () => {
|
||||
|
||||
@@ -4,7 +4,7 @@ import { Auth, Container, QueryTable } from 'components'
|
||||
import { api } from 'common/api'
|
||||
import { toCamelCase } from 'util/format'
|
||||
import { isEqual } from 'lodash'
|
||||
import getDicData from 'util/dic'
|
||||
import getDictData from 'util/dic'
|
||||
import moment from 'moment'
|
||||
|
||||
const { RangePicker } = DatePicker;
|
||||
@@ -80,7 +80,7 @@ export default class index extends Component {
|
||||
*/
|
||||
componentDidMount() {
|
||||
this.table.current.onLoading()
|
||||
getDicData('op_type').then(res => {
|
||||
getDictData('op_type').then(res => {
|
||||
this.setState({
|
||||
codes: res
|
||||
}, () => {
|
||||
|
||||
@@ -4,7 +4,7 @@ import { Auth, Container, QueryTable } from 'components'
|
||||
import { api } from 'common/api'
|
||||
import { toCamelCase } from 'util/format'
|
||||
import { isEqual } from 'lodash'
|
||||
import getDicData from 'util/dic'
|
||||
import getDictData from 'util/dic'
|
||||
import moment from 'moment'
|
||||
|
||||
const { RangePicker } = DatePicker;
|
||||
@@ -80,7 +80,7 @@ export default class index extends Component {
|
||||
*/
|
||||
componentDidMount() {
|
||||
this.table.current.onLoading()
|
||||
getDicData('vis_type').then(res => {
|
||||
getDictData('vis_type').then(res => {
|
||||
this.setState({
|
||||
codes: res
|
||||
}, () => {
|
||||
|
||||
@@ -2,7 +2,7 @@ import React, { Component } from 'react'
|
||||
import { Form, Input, InputNumber, Radio, Select, Spin, Switch, TreeSelect } from 'antd'
|
||||
import { AntIcon, IconSelector } from 'components'
|
||||
import { cloneDeep } from 'lodash'
|
||||
import getDicData from 'util/dic'
|
||||
import getDictData from 'util/dic'
|
||||
import { api } from 'common/api'
|
||||
import { EMPTY_ID } from 'util/global'
|
||||
|
||||
@@ -56,7 +56,7 @@ export default class form extends Component {
|
||||
async fillData(params) {
|
||||
this.record = cloneDeep(params.record)
|
||||
//#region 从后端转换成前段所需格式
|
||||
const { menuType, openType } = await getDicData('menu_type', 'open_type')
|
||||
const { menuType, openType } = await getDictData('menu_type', 'open_type')
|
||||
const appList = await this.onLoadSysApplist()
|
||||
let parentTreeData = []
|
||||
if (params.isParent) {
|
||||
|
||||
@@ -3,7 +3,7 @@ import { Button, Card, Form, Input, Popconfirm, message as Message } from 'antd'
|
||||
import { isEqual } from 'lodash'
|
||||
import { AntIcon, Auth, Container, ModalForm, QueryTable, QueryTableActions } from 'components'
|
||||
import { api } from 'common/api'
|
||||
import getDicData from 'util/dic'
|
||||
import getDictData from 'util/dic'
|
||||
import auth from 'components/authorized/handler'
|
||||
import { toCamelCase } from 'util/format'
|
||||
import FormBody from './form'
|
||||
@@ -130,7 +130,7 @@ export default class index extends Component {
|
||||
*/
|
||||
componentDidMount() {
|
||||
this.table.current.onLoading()
|
||||
getDicData('menu_type', 'menu_weight').then(res => {
|
||||
getDictData('menu_type', 'menu_weight').then(res => {
|
||||
this.setState({
|
||||
codes: res
|
||||
}, () => {
|
||||
|
||||
@@ -2,7 +2,7 @@ import React, { Component } from 'react'
|
||||
import { Cascader, Form, Input, InputNumber, Select, Spin, TreeSelect } from 'antd'
|
||||
import { AntIcon } from 'components'
|
||||
import { cloneDeep } from 'lodash'
|
||||
import getDicData from 'util/dic'
|
||||
import getDictData from 'util/dic'
|
||||
import { EMPTY_ID } from 'util/global'
|
||||
import { api } from 'common/api'
|
||||
|
||||
@@ -52,7 +52,7 @@ export default class form extends Component {
|
||||
const orgData = await this.loadOrgData()
|
||||
const areaData = await this.loadAreaData()
|
||||
|
||||
const codes = await getDicData('org_type')
|
||||
const codes = await getDictData('org_type')
|
||||
this.setState({
|
||||
codes,
|
||||
options: {
|
||||
|
||||
@@ -5,7 +5,7 @@ import { api } from 'common/api'
|
||||
import auth from 'components/authorized/handler'
|
||||
import { toCamelCase } from 'util/format'
|
||||
import { isEqual } from 'lodash'
|
||||
import getDicData from 'util/dic'
|
||||
import getDictData from 'util/dic'
|
||||
import FormBody from './form'
|
||||
|
||||
const apiAction = {
|
||||
@@ -120,7 +120,7 @@ export default class index extends Component {
|
||||
*/
|
||||
componentDidMount() {
|
||||
this.table.current.onLoading()
|
||||
getDicData('org_type').then(res => {
|
||||
getDictData('org_type').then(res => {
|
||||
this.setState({
|
||||
codes: res
|
||||
}, () => {
|
||||
|
||||
@@ -3,7 +3,7 @@ import { Form, Select, Spin, TreeSelect } from 'antd'
|
||||
import { AntIcon } from 'components'
|
||||
import { cloneDeep } from 'lodash'
|
||||
import { api } from 'common/api'
|
||||
import getDicData from 'util/dic'
|
||||
import getDictData from 'util/dic'
|
||||
|
||||
const { SHOW_PARENT } = TreeSelect
|
||||
|
||||
@@ -45,7 +45,7 @@ export default class data extends Component {
|
||||
|
||||
this.record = cloneDeep(params.record)
|
||||
//#region 从后端转换成前段所需格式
|
||||
const { dataScopeType } = await getDicData('data_scope_type')
|
||||
const { dataScopeType } = await getDictData('data_scope_type')
|
||||
const orgTreeData = await this.onLoadOrgTreeData()
|
||||
const arerTreeData = await this.onLoadAreaTreeData()
|
||||
const orgCheckedKeys = await this.onLoadRoleOwn(this.record.id)
|
||||
|
||||
@@ -2,7 +2,7 @@ import React, { Component } from 'react'
|
||||
import { Cascader, Form, Input, InputNumber, Select, Spin, TreeSelect } from 'antd'
|
||||
import { AntIcon } from 'components'
|
||||
import { cloneDeep } from 'lodash'
|
||||
import getDicData from 'util/dic'
|
||||
import getDictData from 'util/dic'
|
||||
import { EMPTY_ID } from 'util/global'
|
||||
import { api } from 'common/api'
|
||||
|
||||
@@ -52,7 +52,7 @@ export default class form extends Component {
|
||||
const orgData = await this.loadOrgData()
|
||||
const areaData = await this.loadAreaData()
|
||||
|
||||
const codes = await getDicData('org_type')
|
||||
const codes = await getDictData('org_type')
|
||||
this.setState({
|
||||
codes,
|
||||
options: {
|
||||
|
||||
@@ -4,7 +4,7 @@ import { AntIcon, Auth, Container, Image, ModalForm, QueryList, QueryTreeLayout
|
||||
import { api } from 'common/api'
|
||||
import { toCamelCase } from 'util/format'
|
||||
import { isEqual } from 'lodash'
|
||||
import getDicData from 'util/dic'
|
||||
import getDictData from 'util/dic'
|
||||
import FormBody from './form'
|
||||
|
||||
// 配置页面所需接口函数
|
||||
@@ -60,7 +60,7 @@ export default class index extends Component {
|
||||
*/
|
||||
componentDidMount() {
|
||||
this.list.current.onLoading()
|
||||
getDicData('sex', 'common_status').then(res => {
|
||||
getDictData('sex', 'common_status').then(res => {
|
||||
this.setState({
|
||||
codes: res
|
||||
}, () => {
|
||||
|
||||
Reference in New Issue
Block a user