From 86060fc139cb2120b1e4f9e1fa4d771192c79370 Mon Sep 17 00:00:00 2001 From: z_yu <1534695664@qq.com> Date: Wed, 15 Jun 2022 14:14:22 +0800 Subject: [PATCH] =?UTF-8?q?=E6=A1=A3=E6=A1=88=E7=AE=A1=E7=90=86=20?= =?UTF-8?q?=E4=B8=8B=E6=8B=89=E5=88=97=E8=A1=A8=E6=A1=86=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/components/category/PreviewForm.vue | 45 +++++++++---------- 1 file changed, 21 insertions(+), 24 deletions(-) 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()