fix: 修复自定义JS数据集编辑、保存接口不存在的问题

main
wu.jian2 2 years ago
parent 1b841c6cad
commit 8bd4403477

@ -353,7 +353,7 @@
import ParamsSettingDialog from './ParamsSettingDialog.vue' import ParamsSettingDialog from './ParamsSettingDialog.vue'
import OutputFieldDialog from './OutputFieldDialog.vue' import OutputFieldDialog from './OutputFieldDialog.vue'
import FieldFillDialog from './FieldFillDialog.vue' import FieldFillDialog from './FieldFillDialog.vue'
import { nameCheckRepeat, datasetAddorUpdate, getDataset, getDatasetTypeList } from 'packages/js/utils/datasetConfigService' import { nameCheckRepeat, datasetAdd, datasetUpdate, getDataset, getCategoryTree } from 'packages/js/utils/datasetConfigService'
import { codemirror } from 'vue-codemirror' import { codemirror } from 'vue-codemirror'
import 'codemirror/mode/javascript/javascript' import 'codemirror/mode/javascript/javascript'
import 'codemirror/lib/codemirror.css' import 'codemirror/lib/codemirror.css'
@ -457,7 +457,7 @@ export default {
}, },
methods: { methods: {
async init () { async init () {
this.categoryData = await getDatasetTypeList({ tableName: 'r_dataset', moduleCode: this.appCode }) this.categoryData = await getCategoryTree({ tableName: 'dataset', moduleCode: this.appCode })
if (this.typeId) { if (this.typeId) {
this.dataForm.typeId = this.typeId this.dataForm.typeId = this.typeId
this.$nextTick(() => { this.$nextTick(() => {
@ -520,8 +520,8 @@ export default {
fieldList: outputFieldList fieldList: outputFieldList
} }
} }
// const datasetSave = this.dataForm.id === '' ? datasetAdd : datasetUpdate const datasetSave = this.dataForm.id === '' ? datasetAdd : datasetUpdate
datasetAddorUpdate(form).then(() => { datasetSave(form).then(() => {
this.$message.success('操作成功') this.$message.success('操作成功')
this.$parent.init(false) this.$parent.init(false)
this.$parent.setType = null this.$parent.setType = null

Loading…
Cancel
Save