Commit 2932184e by zhaochengxiang

批量标签

parent 5b1e3aaf
......@@ -370,7 +370,11 @@ const FC = (props) => {
const onBatchAddTagClick = () => {
setTagSelectPopupParams({
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) => {
/>
<TagSelectPopup
{...tagSelectPopupParams}
type='dataAsset'
onCancel={() => {
setTagSelectPopupParams({
visible: false,
......
......@@ -596,7 +596,11 @@ const FC = (props) => {
const onBatchAddTagClick = () => {
setTagSelectPopupParams({
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) => {
const onBatchAddTagClick = () => {
setTagSelectPopupParams({
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) => {
/>
<TagSelectPopup
{...tagSelectPopupParams}
type='dataAsset'
onCancel={() => {
setTagSelectPopupParams({
visible: false,
......
......@@ -754,7 +754,11 @@ const FC = (props) => {
const onBatchAddTagClick = () => {
setTagSelectPopupParams({
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) => {
/>
<TagSelectPopup
{...tagSelectPopupParams}
type='dataAsset'
onCancel={() => {
setTagSelectPopupParams({
visible: false,
......
......@@ -75,7 +75,7 @@ const FC = ({ type, id, did, tags, onChange }) => {
setTagSelectPopupParams({
visible: true,
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
payload: {
params: {
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,
overrideAll: (items??[]).length === 1 ? true : false,
}
},
data: items
},
callback: () => {
setWaiting(false)
......
......@@ -830,7 +830,7 @@ class Model extends React.Component {
this.setState({
tagSelectPopupParams: {
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 {
<TagSelectPopup
{...this.state.tagSelectPopupParams}
type='model'
onCancel={() => {
this.setState({
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