Commit 75c5a171 by zhaochengxiang

资产属性值

parent 8fb2964d
import React from 'react' import React from 'react'
import { Modal, Button, Form, Checkbox, Spin, Row, Col } from 'antd' import { Modal, Button, Form, Checkbox, Spin, Row, Col } from 'antd'
import { getAssetType } from '../../../util' import { getAssetRange, getAssetType } from '../../../util'
import { dispatch } from '../../../model' import { dispatch } from '../../../model'
const FC = (props) => { const FC = (props) => {
...@@ -19,13 +19,16 @@ const FC = (props) => { ...@@ -19,13 +19,16 @@ const FC = (props) => {
const getElementValues = () => { const getElementValues = () => {
setLoading(true) setLoading(true)
dispatch({ dispatch({
type: 'assetmanage.getElementValues', type: 'assetmanage.listElements',
payload: { payload: {
dataAssetType: getAssetType(type) params: {
range: getAssetRange(type),
dataAssetType: getAssetType(type),
}
}, },
callback: data => { callback: data => {
setLoading(false) setLoading(false)
setData(data) setData((data??[]).filter(item => item.globalParam === '是'))
}, },
error: () => { error: () => {
setLoading(false) setLoading(false)
...@@ -121,7 +124,7 @@ export const Basic = React.forwardRef(function ({ data, defaultValue }, ref) { ...@@ -121,7 +124,7 @@ export const Basic = React.forwardRef(function ({ data, defaultValue }, ref) {
<Checkbox.Group style={{ width: '100%' }}> <Checkbox.Group style={{ width: '100%' }}>
<Row> <Row>
{ {
(item.value?.content??[]).map((item, index) => { ((item.optional??'').split(',')).map((item, index) => {
return ( return (
<Col span={6} key={index}> <Col span={6} key={index}>
<Checkbox <Checkbox
......
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