diff --git a/src/views/components/category/PreviewForm.vue b/src/views/components/category/PreviewForm.vue index 86c06d9..f7b55f7 100644 --- a/src/views/components/category/PreviewForm.vue +++ b/src/views/components/category/PreviewForm.vue @@ -41,7 +41,6 @@ import draggable from 'vuedraggable' import Treeselect from '@riophae/vue-treeselect' import '@riophae/vue-treeselect/dist/vue-treeselect.css' -import { LOAD_CHILDREN_OPTIONS } from '@riophae/vue-treeselect' import { FetchFindAllSubsetById } from '@/api/archivesConfig/dictDetail' export default { name: 'PreviewForm', @@ -94,12 +93,10 @@ export default { getAllSubset() { this.formPreviewData.map(item => { if (item.dictionaryConfigId) { - item.options = [] - console.log(item.options) + this.$set(item, 'options', []) FetchFindAllSubsetById({ id: item.dictionaryConfigId.id }).then(res => { if (item.isInputClass === 'select') { - // Vue.set(item, "options", res) - console.log(item.options) + this.$set(item, 'options', res) } else if (item.isInputClass === 'popover') { this.tableData = res } @@ -108,25 +105,25 @@ export default { }) }, // 获取弹窗内部门数据 - loadOptions({ action, parentNode, callback }) { - if (action === LOAD_CHILDREN_OPTIONS) { - this.formPreviewData.map(item => { - if (item.dictionaryConfigId) { - FetchFindAllSubsetById({ id: item.dictionaryConfigId.id }).then(res => { - parentNode.children = res.map(function(obj) { - if (obj.hasChildren) { - obj.children = null - } - return obj - }) - setTimeout(() => { - callback() - }, 100) - }) - } - }) - } - }, + // loadOptions({ action, parentNode, callback }) { + // if (action === LOAD_CHILDREN_OPTIONS) { + // this.formPreviewData.map(item => { + // if (item.dictionaryConfigId) { + // FetchFindAllSubsetById({ id: item.dictionaryConfigId.id }).then(res => { + // parentNode.children = res.map(function(obj) { + // if (obj.hasChildren) { + // obj.children = null + // } + // return obj + // }) + // setTimeout(() => { + // callback() + // }, 100) + // }) + // } + // }) + // } + // }, // popover - table 单选 clickRowHandler(row) { this.$refs.table.clearSelection()