diff --git a/src/views/category/fieldManage/module/form.vue b/src/views/category/fieldManage/module/form.vue index 3d43bfe..3ddd744 100644 --- a/src/views/category/fieldManage/module/form.vue +++ b/src/views/category/fieldManage/module/form.vue @@ -18,11 +18,43 @@ import { form } from '@crud/crud' import SettingForm from '@/views/components/category/SettingForm' const defaultForm = { + id: null, + fieldName: null, + fieldCnName: null, + isDefaultValue: null, + isInputClass: null, + isDataType: null, + isDataTypeDetails: null, + isColumnLength: null, + isColumnType: null, + isSequence: null, + isType: null, + isSystem: true, + isLine: null, + isInput: null, + isRequired: null, + isAutomatic: null, + isAdd: null, + isSearch: null, + isInherit: null, + isFilling: null, + fillingDigit: null, + isRepeat: null, + isDisplay: false, + displayOrder: null, + isDisplayformat: null, + displayformatType: null, + editLength: null, + displayLength: null, dictionaryConfigId: {} } export default { components: { SettingForm }, - mixins: [form(defaultForm)], + mixins: [ + form(function() { + return Object.assign({ categoryId: this.$parent.selectedCategory.id }, defaultForm) + }) + ], data() { return { } diff --git a/src/views/category/index.vue b/src/views/category/index.vue index 65147e4..fd5ac92 100644 --- a/src/views/category/index.vue +++ b/src/views/category/index.vue @@ -38,7 +38,7 @@ @@ -76,7 +76,6 @@ import listBrowsing from './listBrowsing/index' import orderingRule from './orderingRule/index' import fileNoFormat from './fileNoFormat/index' import crudOperation from '@crud/CRUD.operation' -import { findSubsetById } from '@/api/archivesConfig/dictDetail' export default { name: 'Category', @@ -153,12 +152,12 @@ export default { } }, updateKeyChildren(data) { - const oldDatas = this.$refs.tree.getCurrentNode().childMenus + const oldDatas = this.$refs.tree.getCurrentNode().children if (oldDatas) { for (let i = 0; i < data.length; i++) { const oldData = oldDatas.find((d) => { return d.id === data[i].id }) if (oldData) { - data[i].childMenus = oldData.childMenus + data[i].children = oldData.children } } } @@ -182,10 +181,10 @@ export default { done() }, toSort(data) { - findSubsetById(data[0].id).then(res => { - this.$refs.sort.sortTableData = res.content - this.$refs.sort.sortVisible = true - }) + // findSubsetById(data[0].id).then(res => { + this.$refs.sort.sortTableData = data[0].children + this.$refs.sort.sortVisible = true + // }) }, changeActiveTab(data) { this.activeIndex = data