Commit 2932184e by zhaochengxiang

批量标签

parent 5b1e3aaf
...@@ -370,7 +370,11 @@ const FC = (props) => { ...@@ -370,7 +370,11 @@ const FC = (props) => {
const onBatchAddTagClick = () => { const onBatchAddTagClick = () => {
setTagSelectPopupParams({ setTagSelectPopupParams({
visible: true, visible: true,
items: (selectedRows??[]).map(item => ({ resourceId: item.id })) items: (selectedRows??[]).map(item => ({
resourceId: item.id,
catalogId: item.dirId,
type: 'dataAsset',
}))
}) })
} }
...@@ -533,7 +537,6 @@ const FC = (props) => { ...@@ -533,7 +537,6 @@ const FC = (props) => {
/> />
<TagSelectPopup <TagSelectPopup
{...tagSelectPopupParams} {...tagSelectPopupParams}
type='dataAsset'
onCancel={() => { onCancel={() => {
setTagSelectPopupParams({ setTagSelectPopupParams({
visible: false, visible: false,
......
...@@ -596,7 +596,11 @@ const FC = (props) => { ...@@ -596,7 +596,11 @@ const FC = (props) => {
const onBatchAddTagClick = () => { const onBatchAddTagClick = () => {
setTagSelectPopupParams({ setTagSelectPopupParams({
visible: true, visible: true,
items: (selectedRows??[]).map(item => ({ resourceId: item.id })) items: (selectedRows??[]).map(item => ({
resourceId: item.id,
catalogId: item.dirId,
type: 'dataAsset',
}))
}) })
} }
......
...@@ -370,7 +370,11 @@ const FC = (props) => { ...@@ -370,7 +370,11 @@ const FC = (props) => {
const onBatchAddTagClick = () => { const onBatchAddTagClick = () => {
setTagSelectPopupParams({ setTagSelectPopupParams({
visible: true, visible: true,
items: (selectedRows??[]).map(item => ({ resourceId: item.id })) items: (selectedRows??[]).map(item => ({
resourceId: item.id,
catalogId: item.dirId,
type: 'dataAsset',
}))
}) })
} }
...@@ -533,7 +537,6 @@ const FC = (props) => { ...@@ -533,7 +537,6 @@ const FC = (props) => {
/> />
<TagSelectPopup <TagSelectPopup
{...tagSelectPopupParams} {...tagSelectPopupParams}
type='dataAsset'
onCancel={() => { onCancel={() => {
setTagSelectPopupParams({ setTagSelectPopupParams({
visible: false, visible: false,
......
...@@ -754,7 +754,11 @@ const FC = (props) => { ...@@ -754,7 +754,11 @@ const FC = (props) => {
const onBatchAddTagClick = () => { const onBatchAddTagClick = () => {
setTagSelectPopupParams({ setTagSelectPopupParams({
visible: true, visible: true,
items: (selectedRows??[]).map(item => ({ resourceId: item.id })) items: (selectedRows??[]).map(item => ({
resourceId: item.id,
catalogId: item.dirId,
type: 'dataAsset',
}))
}) })
} }
...@@ -1475,7 +1479,6 @@ const FC = (props) => { ...@@ -1475,7 +1479,6 @@ const FC = (props) => {
/> />
<TagSelectPopup <TagSelectPopup
{...tagSelectPopupParams} {...tagSelectPopupParams}
type='dataAsset'
onCancel={() => { onCancel={() => {
setTagSelectPopupParams({ setTagSelectPopupParams({
visible: false, visible: false,
......
...@@ -75,7 +75,7 @@ const FC = ({ type, id, did, tags, onChange }) => { ...@@ -75,7 +75,7 @@ const FC = ({ type, id, did, tags, onChange }) => {
setTagSelectPopupParams({ setTagSelectPopupParams({
visible: true, visible: true,
type, type,
items: [{ resourceId: id, resourceCatalogId: did }] items: [{ resourceId: id, catalogId: did, type, }]
}) })
}} }}
/> />
...@@ -316,12 +316,10 @@ export function TagSelectPopup({ visible, type, value, items, onCancel, onChange ...@@ -316,12 +316,10 @@ export function TagSelectPopup({ visible, type, value, items, onCancel, onChange
payload: { payload: {
params: { params: {
tagIds: (selectedRows??[]).map(item => item.id).toString(), tagIds: (selectedRows??[]).map(item => item.id).toString(),
resourceIds: (items??[]).map(item => item.resourceId).toString(),
type,
catalogId: (items??[]).length>0?items[0].resourceCatalogId:'',
creator: app?.user?.userName, creator: app?.user?.userName,
overrideAll: (items??[]).length === 1 ? true : false, overrideAll: (items??[]).length === 1 ? true : false,
} },
data: items
}, },
callback: () => { callback: () => {
setWaiting(false) setWaiting(false)
......
...@@ -830,7 +830,7 @@ class Model extends React.Component { ...@@ -830,7 +830,7 @@ class Model extends React.Component {
this.setState({ this.setState({
tagSelectPopupParams: { tagSelectPopupParams: {
visible: true, visible: true,
items: (selectModelerIds??[]).map(item => ({ resourceId: item })) items: (selectModelerIds??[]).map(item => ({ resourceId: item, type: 'model' }))
} }
}) })
}} }}
...@@ -1053,7 +1053,6 @@ class Model extends React.Component { ...@@ -1053,7 +1053,6 @@ class Model extends React.Component {
<TagSelectPopup <TagSelectPopup
{...this.state.tagSelectPopupParams} {...this.state.tagSelectPopupParams}
type='model'
onCancel={() => { onCancel={() => {
this.setState({ this.setState({
tagSelectPopupParams: { tagSelectPopupParams: {
......
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