Commit 75c3d23e by zhaochengxiang

bug fix

parent 0937d3e3
...@@ -210,7 +210,7 @@ const AssetAction = (props) => { ...@@ -210,7 +210,7 @@ const AssetAction = (props) => {
}, [currentDomainGroup, currentBussinessDomain, treeDataMap]) }, [currentDomainGroup, currentBussinessDomain, treeDataMap])
const tableData = useMemo(() => { const tableData = useMemo(() => {
if (metadataColumnList && standardList) { if (metadataColumnList) {
const newMetadataColumnList = []; const newMetadataColumnList = [];
metadataColumnList.filter(item => { metadataColumnList.filter(item => {
...@@ -220,7 +220,7 @@ const AssetAction = (props) => { ...@@ -220,7 +220,7 @@ const AssetAction = (props) => {
|| (item.cnName??'').indexOf(keyword)!==-1 || (item.cnName??'').indexOf(keyword)!==-1
) )
}).forEach(item => { }).forEach(item => {
const index = standardList?.findIndex(_item => _item.metadataId === item._id); const index = (standardList??[]).findIndex(_item => _item.metadataId === item._id);
let newItem = {...item}; let newItem = {...item};
if (index !== -1) { if (index !== -1) {
newItem.standard = standardList[index]; newItem.standard = standardList[index];
...@@ -976,7 +976,7 @@ const AssetAction = (props) => { ...@@ -976,7 +976,7 @@ const AssetAction = (props) => {
<span> <span>
{element.name} {element.name}
{ {
(currentAction==='add'||currentAction==='edit') && element.required && <span style={{ color: 'red' }}>*</span> (currentAction==='add'||currentAction==='edit') && (element.required === '是') && <span style={{ color: 'red' }}>*</span>
} }
</span> </span>
} }
...@@ -989,7 +989,7 @@ const AssetAction = (props) => { ...@@ -989,7 +989,7 @@ const AssetAction = (props) => {
<Form.Item <Form.Item
label='' label=''
name={element.name} name={element.name}
rules={[{ required: element.required }]} rules={[{ required: element.required === '是' }]}
style={{ marginBottom: 0 }} style={{ marginBottom: 0 }}
> >
{elementEditComponent(element)} {elementEditComponent(element)}
......
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