Commit 75c3d23e by zhaochengxiang

bug fix

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