feat;添加全局配置定义需要使用的数据集类型

main
liu.tao3 2 years ago
parent c9248286e2
commit ae9c6a453a

@ -51,6 +51,7 @@ registerConfig(
'--bs-el-color-primary-active': '64, 158, 255', // 主要激活 => rgba(64, 158, 255, 1) = #409EFF
'--bs-el-border': 'transparent' // 边框颜色
},
// datasetTypeList: ['original','custom'],
customPlots: [],
// 远程组件列表
remoteComponents,

@ -50,7 +50,7 @@
<el-row :gutter="20">
<el-col :span="12">
<el-form-item
label="名称"
label="数据集名称"
prop="name"
>
<el-input

@ -296,10 +296,6 @@ export default {
type: [Array, Object],
default: null
},
dataSetList: {
type: [Array, Object],
default: () => []
},
appCode: {
type: String,
default: ''
@ -535,8 +531,8 @@ export default {
{ name: '脚本数据集', datasetType: 'script', componentName: 'ScriptEditForm' },
{ name: 'JS数据集', datasetType: 'js', componentName: 'JsEditForm' }
]
if (this.dataSetList.length !== 0) {
this.datasetTypeList = [{ name: '全部', datasetType: '' }, ...list.filter(item => this.dataSetList.findIndex(x => x === item.datasetType) !== -1)]
if (window.BS_CONFIG?.datasetTypeList&&window.BS_CONFIG?.datasetTypeList?.length!=0) {
this.datasetTypeList = [{ name: '全部', datasetType: '' }, ...list.filter(item => window.BS_CONFIG?.datasetTypeList.findIndex(x => x === item.datasetType) !== -1)]
} else {
this.datasetTypeList = [
...list

Loading…
Cancel
Save