|
@ -41,7 +41,6 @@ |
|
|
import draggable from 'vuedraggable' |
|
|
import draggable from 'vuedraggable' |
|
|
import Treeselect from '@riophae/vue-treeselect' |
|
|
import Treeselect from '@riophae/vue-treeselect' |
|
|
import '@riophae/vue-treeselect/dist/vue-treeselect.css' |
|
|
import '@riophae/vue-treeselect/dist/vue-treeselect.css' |
|
|
import { LOAD_CHILDREN_OPTIONS } from '@riophae/vue-treeselect' |
|
|
|
|
|
import { FetchFindAllSubsetById } from '@/api/archivesConfig/dictDetail' |
|
|
import { FetchFindAllSubsetById } from '@/api/archivesConfig/dictDetail' |
|
|
export default { |
|
|
export default { |
|
|
name: 'PreviewForm', |
|
|
name: 'PreviewForm', |
|
@ -94,12 +93,10 @@ export default { |
|
|
getAllSubset() { |
|
|
getAllSubset() { |
|
|
this.formPreviewData.map(item => { |
|
|
this.formPreviewData.map(item => { |
|
|
if (item.dictionaryConfigId) { |
|
|
if (item.dictionaryConfigId) { |
|
|
item.options = [] |
|
|
|
|
|
console.log(item.options) |
|
|
|
|
|
|
|
|
this.$set(item, 'options', []) |
|
|
FetchFindAllSubsetById({ id: item.dictionaryConfigId.id }).then(res => { |
|
|
FetchFindAllSubsetById({ id: item.dictionaryConfigId.id }).then(res => { |
|
|
if (item.isInputClass === 'select') { |
|
|
if (item.isInputClass === 'select') { |
|
|
// Vue.set(item, "options", res) |
|
|
|
|
|
console.log(item.options) |
|
|
|
|
|
|
|
|
this.$set(item, 'options', res) |
|
|
} else if (item.isInputClass === 'popover') { |
|
|
} else if (item.isInputClass === 'popover') { |
|
|
this.tableData = res |
|
|
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 单选 |
|
|
// popover - table 单选 |
|
|
clickRowHandler(row) { |
|
|
clickRowHandler(row) { |
|
|
this.$refs.table.clearSelection() |
|
|
this.$refs.table.clearSelection() |
|
|