Merge remote-tracking branch 'origin/master'

main
liu.shiyi 2 years ago
commit c4967b40da

@ -1,11 +0,0 @@
const config = {
name: 'JS数据集',
datasetType: 'js',
className: 'com.gccloud.dataset.entity.config.JsDataSetConfig',
componentName: 'JsDataSet',
showOperate: true
}
export default {
config
}

@ -72,7 +72,7 @@ export default {
</script>
<style lang="scss" scoped>
@import '../../../packages/assets/style/bsTheme.scss';
@import '../../../assets/style/bsTheme.scss';
::v-deep .el-dialog__body {
height: fit-content;

@ -108,5 +108,5 @@ export default {
</script>
<style lang="scss" scoped>
@import '../../../packages/assets/style/bsTheme.scss';
@import '../../../assets/style/bsTheme.scss';
</style>

@ -217,5 +217,5 @@ export default {
</script>
<style lang="scss" scoped>
@import '../../../packages/assets/style/bsTheme.scss';
@import '../../../assets/style/bsTheme.scss';
</style>

@ -352,16 +352,16 @@
</template>
<script>
import ParamsSettingDialog from './ParamsSettingDialog.vue'
import OutputFieldDialog from './OutputFieldDialog.vue'
import FieldFillDialog from './FieldFillDialog.vue'
import ParamsSettingDialog from './JsComponents/ParamsSettingDialog.vue'
import OutputFieldDialog from './JsComponents/OutputFieldDialog.vue'
import FieldFillDialog from './JsComponents/FieldFillDialog.vue'
import { nameCheckRepeat, datasetAdd, datasetUpdate, getDataset, getCategoryTree } from 'data-room-ui/js/utils/datasetConfigService'
import { codemirror } from 'vue-codemirror'
import 'codemirror/mode/javascript/javascript'
import 'codemirror/lib/codemirror.css'
import 'codemirror/theme/nord.css'
export default {
name: 'JsDataSet',
name: 'JsEditForm',
components: {
codemirror,
FieldFillDialog,
@ -742,7 +742,7 @@ export default {
</script>
<style lang="scss" scoped>
@import '../../../packages/assets/style/bsTheme.scss';
@import '../../assets/style/bsTheme.scss';
.data-set-scrollbar {
height: 100%;

@ -239,6 +239,7 @@
<script>
import TypeTree from './TypeTree.vue'
import JsEditForm from './JsEditForm.vue'
import JsonEditForm from './JsonEditForm.vue'
import table from 'data-room-ui/js/utils/table.js'
import ScriptEditForm from './ScriptEditForm.vue'
@ -261,7 +262,8 @@ export default {
CustomEditForm,
JsonEditForm,
StoredProcedureEditForm,
ScriptEditForm
ScriptEditForm,
JsEditForm
},
mixins: [pageMixins],
props: {
@ -456,6 +458,8 @@ export default {
},
// -
openAddForm (type, componentName) {
console.log('type', type)
console.log('componentName', componentName)
this.datasetType = type
this.componentData = this.getComponents(componentName)
this.typeId = this.queryForm.typeId
@ -465,16 +469,17 @@ export default {
return this.getComponents(this.datasetTypeList.find(type => type.datasetType === datasetType)?.componentName)?.config?.showOperate ?? true
},
getComponents (componentName) {
const components = Object.values(this.$options.components)
let remoteComponentData = null
if (window.BS_CONFIG?.customDatasetComponents && window.BS_CONFIG?.customDatasetComponents.length > 0) {
const components = Object.values(this.$options.components)
let remoteComponentData = null
//
remoteComponentData = window.BS_CONFIG?.customDatasetComponents.find(item => item.config.componentName === componentName)
return {
component: components.find(component => component.name === componentName) || remoteComponentData?.vueFile,
config: remoteComponentData?.config || null,
key: new Date().getTime()
}
}
return {
component: components.find(component => component.name === componentName) || remoteComponentData?.vueFile,
config: remoteComponentData?.config || null,
key: new Date().getTime()
}
},
//
@ -496,7 +501,8 @@ export default {
{ name: '自助数据集', datasetType: 'custom', componentName: 'CustomEditForm' },
{ name: '存储过程数据集', datasetType: 'storedProcedure', componentName: 'StoredProcedureEditForm' },
{ name: 'JSON数据集', datasetType: 'json', componentName: 'JsonEditForm' },
{ name: '脚本数据集', datasetType: 'script', componentName: 'ScriptEditForm' }
{ 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)]

@ -50,7 +50,7 @@ module.exports = {
resolve: {
alias: {
'@': resolve('example'),
packages: resolve('packages')
'data-room-ui': resolve('packages')
},
fallback: {
path: false,

Loading…
Cancel
Save