fix: 修复自定义JS数据集,脚本发生变化,输出字段不对应的情况

main
wu.jian2 2 years ago
parent b5b3119f19
commit 5acdf292a5

@ -9,7 +9,7 @@
<template slot="content">
<div class="page-header">
<div class="page-header-left">
{{ !isEdit ? 'js数据集详情' : dataForm.id ? 'js数据集编辑' : 'js数据集新增' }}
{{ !isEdit ? 'JS数据集详情' : dataForm.id ? 'JS数据集编辑' : 'JS数据集新增' }}
</div>
<div class="page-header-right">
<el-button
@ -637,7 +637,20 @@ export default {
}
})
}
// keysoutputFieldListoutputFieldList
if (this.outputFieldList.length !== keys.length) {
const newKeys = keys.filter(item => {
return !this.outputFieldList.some(key => {
return key.fieldName === item
})
})
newKeys.forEach(item => {
this.outputFieldList.push({
fieldName: item,
fieldDesc: ''
})
})
}
if (this.outputFieldList.length && this.fieldDesc && !isInit) {
this.buildFieldDesc()
}

@ -120,7 +120,7 @@
</div>
<div class="big-screen-card-img">
<el-image
:src="catalogInfo !== 'system'?screen.coverPicture:screen.img"
:src="catalogInfo !== 'system' ? screen.coverPicture : screen.img"
fit="fill"
style="width: 100%; height: 100%"
>

Loading…
Cancel
Save