Commit f30d679b by zhaochengxiang

query

parent 14847e85
...@@ -434,7 +434,7 @@ const AssetAction = (props) => { ...@@ -434,7 +434,7 @@ const AssetAction = (props) => {
setLoading(false); setLoading(false);
const metadataIndex = data?.elements?.findIndex(item => item.name === '资产项'); const metadataIndex = data?.elements?.findIndex(item => item.name === '资产项');
console.log('metadataIndex', metadataIndex);
if (metadataIndex !== -1) { if (metadataIndex !== -1) {
let metadataValue = data?.elements[metadataIndex].value; let metadataValue = data?.elements[metadataIndex].value;
try { try {
...@@ -511,7 +511,16 @@ const AssetAction = (props) => { ...@@ -511,7 +511,16 @@ const AssetAction = (props) => {
}, },
callback: data => { callback: data => {
setLoadingMetadataColumnList(false); setLoadingMetadataColumnList(false);
setMetadataColumnList(data);
const newData = [...data||[]];
if (prevMetadata?.metadataTableId?.toLowerCase().indexOf('query') !== -1) {
newData.forEach(item => {
item.typeName = item.datatype;
item.size = item.length;
});
}
setMetadataColumnList(newData);
}, },
error: () => { error: () => {
setLoadingMetadataColumnList(false); setLoadingMetadataColumnList(false);
......
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