Commit 075236c5 by zhaochengxiang

bug fix

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