Commit ac12874d by zhaochengxiang

bug fix

parent c4be8d2e
......@@ -12,12 +12,14 @@ import { getAssetType, getAssetTypeName, getQueryParam, isSzseEnv } from '../../
import '../Model/Component/EditModel.less'
import { ElementItem, MultipleItem } from '../AssetManage/Component/AssetAction'
import { AssetDictionaryItem } from './add-to-asset'
import produce from 'immer'
const pathElement = {
name: '资产目录',
supportBatchEdit: '是',
}
//elementIds为空时,表示资源批量转资产.
const FC = (props) => {
const ids = getQueryParam('ids', props.location?.search)
const elementIds = getQueryParam('elementIds', props.location?.search)
......@@ -81,6 +83,9 @@ const FC = (props) => {
setWaiting(false)
setAction('detail')
LocalStorage.set('editAssetsChange', !(LocalStorage.get('editAssetsChange')??false))
if ((elementIds??[]).length === 0) {
window.close()
}
},
error: () => {
setWaiting(false)
......@@ -154,7 +159,13 @@ export const EditAssets = React.forwardRef(function ({ action, type, ids, elemen
getModifyData: () => {
return {
elementList: elements,
rowDataList: modifyData
rowDataList: produce(modifyData, (draft) => {
for (const item of draft??[]) {
if ((item.paths??[]).length > 0) {
item.dirIds = item.paths.map(_item => _item.value)
}
}
})
}
},
}), [form, editingKey, modifyData, elements])
......
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