Commit a957d1c4 by 放生的三文鱼

修复部分bug

parent 98b4de6b
......@@ -553,7 +553,7 @@ const AssetManageTree = (props) => {
payload: {
params: {
dirId: currentRightClickDir.nodeId,
currentDirIsCustom: currentRightClickDir.type==='custom'
currentDirIsCustom: true
}
},
callback: able => {
......
......@@ -412,8 +412,7 @@ const AssetTable = (props) => {
temp = {...asset,...temp}
data.push(temp)
});
console.log('data',data);
console.log('assets',assets);
return data
},[assets,columns])
......@@ -630,7 +629,6 @@ const AssetTable = (props) => {
_columns.push(params);
})
console.log('columns',_columns);
setAssets([]);
......@@ -690,20 +688,15 @@ const AssetTable = (props) => {
payload: params,
callback: data => {
const _assets = [];
(data.data||[]).forEach(asset => {
(data.data||[]).forEach(asset => {
let _asset = {...asset}, index = 0;
(asset.elementValuesWithoutTypeAttribute||[]).forEach((elementValue) => {
(elementValue.values||[]).forEach((value, i) => {
(asset?.elementValuesWithoutTypeAttribute||[]).forEach((value) => {
index++;
if (projectIndex === `element${index}`) {
let metadata = {};
try {
metadata = JSON.parse(value);
_asset['metadata'] = metadata;
_asset[`element${index}`] = metadata;
......@@ -715,14 +708,11 @@ const AssetTable = (props) => {
} else {
_asset[`element${index}`] = value;
}
});
})
_assets.push(_asset);
})
setAssets(_assets);
if (shouldScrollRef.current) {
let scrollId = null;
if (remoteRelationRef.current) {
......
......@@ -5,7 +5,7 @@ import FilterColumnAction from './FilterColumnAction';
const { Title } = Typography;
export const defaultColumnTitles = ['数据项标准编码','数据项标准名称'];
export const defaultColumnTitles = ['英文名称','中文名称','数据项标准编码','数据项标准名称'];
const VersionCompareTable = (props) => {
const { data, direction = 'left', selectedColumnTitles = defaultColumnTitles, onFilterChange,title='数据表结构',columntype='' } = props;
......
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