Commit 075236c5 by zhaochengxiang

bug fix

parent 5b49f214
......@@ -3,7 +3,8 @@ import { Modal, Button, Spin, Form, Input, Radio, Select, Space, TreeSelect, Row
import { QuestionCircleOutlined } from '@ant-design/icons'
import { dispatch } from '../../../model'
import { getValidString, showMessage } from '../../../util'
import { getAssetType, getValidString, showMessage } from '../../../util'
import { AssetManageReference } from '../../../util/constant'
const resourceTypes = [
{ key: 'dataAsset', name: '资产' },
......@@ -69,7 +70,8 @@ const FC = (props) => {
payload: {
data: (action === 'add')?rows:{...node??{}, ...rows},
params: {
parentPath
parentPath,
dataAssetType: getAssetType(AssetManageReference)
}
},
callback: data => {
......
......@@ -49,7 +49,7 @@ const FC = ({ value, onChange, readonly = true, terms = [] }) => {
!readonly && <Button type='text' icon={<SettingFilled />} onClick={() => {
app?.setGlobalState?.({
message: 'data-govern-show-metadata-list-message',
data: (typeof decodeData==='string') ? {} : decodeData[0]
data: (IsArr(decodeData)&&decodeData.length>0) ? decodeData[0] : {}
})
}} />
}
......
......@@ -142,13 +142,16 @@ const FC = (props) => {
const menuData = useMemo(() => {
if (rightSelectedNode) {
if (rightSelectedNode.level === 1) {
return [
let newMenuData = [
{ id: 'edit', title: '编辑栏目' },
{ id: 'up', title: '上移栏目' },
{ id: 'down', title: '下移栏目' },
{ id: 'delete', title: '删除栏目' },
{ id: 'sync', title: '同步Schema' },
]
{ id: 'delete', title: '删除栏目' }
]
if (rightSelectedNode.resourceType !== 'custom' && rightSelectedNode.type !== 'custom') {
newMenuData = [...newMenuData, { id: 'sync', title: '同步Schema' },]
}
return newMenuData
} else if (rightSelectedNode.resourceType === 'custom' || rightSelectedNode.type === 'custom') {
return [
{ id: 'up', title: '上移目录' },
......
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