Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
amos-convertor-view
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
station
amos-convertor-view
Commits
c287f5dc
Commit
c287f5dc
authored
Nov 22, 2024
by
KeYong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改重点设备分类组件
parent
5d419e98
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
11 deletions
+26
-11
EquipmentModel.js
src/view/bizview/equipmentLedger/Equipment/EquipmentModel.js
+26
-11
No files found.
src/view/bizview/equipmentLedger/Equipment/EquipmentModel.js
View file @
c287f5dc
...
@@ -391,14 +391,22 @@ class EquipmentModel extends Component {
...
@@ -391,14 +391,22 @@ class EquipmentModel extends Component {
queryDictionaryAction(type).then(data => {
queryDictionaryAction(type).then(data => {
const categoryDictionary = data[type];
const categoryDictionary = data[type];
if (categoryDictionary) {
if (categoryDictionary) {
const options = [];
// const options = [];
categoryDictionary.forEach(dict => {
// categoryDictionary.forEach(dict => {
options.push({
// options.push({
label: dict.label,
// label: dict.label,
value: dict.value
// value: dict.value
});
// });
});
// });
this.setState({ categories: options });
this.setState({ categories: recursive(categoryDictionary).map((e) => {
return {
key: e.key,
value: e.value,
title: e.title,
children: e.children && e.children.length > 0 ? e.children : undefined
};
})
})
}
}
});
});
}
}
...
@@ -433,12 +441,19 @@ class EquipmentModel extends Component {
...
@@ -433,12 +441,19 @@ class EquipmentModel extends Component {
<Input className='
risk_factor_input
' required value={form.code} onChange={e => this.onInputChange('
code
', e.target.value)} />
<Input className='
risk_factor_input
' required value={form.code} onChange={e => this.onInputChange('
code
', e.target.value)} />
</FormItem>
</FormItem>
<FormItem label={<span>分类</span>} field="category" {...formItemLayout}>
<FormItem label={<span>分类</span>} field="category" {...formItemLayout}>
<Select
<
Tree
Select
className="risk_factor_select"
className="risk_factor_select"
d
ata={categories}
treeD
ata={categories}
renderOption={item => <Option value={item.value}>{item.label}</Option>}
renderOption={item => <Option value={item.value}>{item.label}</Option>}
value={form.category}
onChange={e => this.onSelectChange('
category
', e)}
onChange={e => this.onSelectChange('
category
', e)}
placeholder='
请选择
'
value={`${form.category ? form.category : ''}`}
style={{ width: '
200
px
' }}
dropdownStyle={{ maxHeight: 200, overflow: '
auto
' }}
treeDefaultExpandAll
// showSearch
// treeNodeFilterProp='
title
'
// filterTreeNode={(inputValue, treeNode) => treeNode.props.title.toLocaleLowerCase().includes(inputValue.toLocaleLowerCase())}
/>
/>
</FormItem>
</FormItem>
<FormItem label={<span>所属区域</span>} field="riskSourceId" {...formItemLayout}>
<FormItem label={<span>所属区域</span>} field="riskSourceId" {...formItemLayout}>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment