30869d5a by fanguang

fix

1 parent 1eaa62f4
......@@ -337,8 +337,7 @@ function inputTypeChange (val, item) {
const loading = ref(false)
function getDetail () {
loading.value = true
loading.value = true
return getMetaStandardDetail(props.guid).then((res:any) => {
if (res.code === proxy.$passCode) {
const data = res.data
......@@ -366,7 +365,9 @@ function confirm () {
formEl.value.validate(valid => {
if (!valid) return
let body = { ...form.value }
console.log(body)
if (!body.parentGuid) {
body.parentGuid = null
}
delete body.fieldRSVOS
// return
const request = props.type === 'add' ? saveMetaStandard : updateMetaStandard
......
......@@ -923,6 +923,9 @@ const tableBtnClick = (scope, btn) => {
} else if (type === 'remove') {
let removeRows = () => {
console.log('formTableData.value', formTableData.value)
console.log('row', row)
// return
const existIndex = formTableData.value.findIndex(s => s.ROWID == row.ROWID)
existIndex > -1 && formTableData.value.splice(existIndex, 1)
}
......
......@@ -417,12 +417,7 @@ function importData () {
console.log('currentTree', currentTreeObj)
let uploadSetting:any = []
if (currentTreeObj.children) {
uploadSetting = currentTreeObj.children.map((item:any) => {
return {
standardName: item.standardName,
standardGuid: item.guid
}
})
formatChildrenLastItem(currentTreeObj.children, uploadSetting)
} else {
uploadSetting = [{
standardName: currentTreeObj.standardName,
......@@ -434,6 +429,18 @@ function importData () {
path: '/data-meta/metadata-standard/standard-meta-import',
});
}
function formatChildrenLastItem (list, returnList = []) {
list.forEach((item:any) => {
if (!item.children) {
returnList.push({
standardName: item.standardName,
standardGuid: item.guid
})
} else {
formatChildrenLastItem(item.children, returnList)
}
})
}
function exportData () {
let body = [treeInfo.value.currentObj.guid]
......
Styling with Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!