|
@ -58,6 +58,7 @@ |
|
|
<script> |
|
|
<script> |
|
|
import { form } from '@crud/crud' |
|
|
import { form } from '@crud/crud' |
|
|
import { edit, FetchDoeditIsRepeat } from '@/api/archivesManage/archivesList' |
|
|
import { edit, FetchDoeditIsRepeat } from '@/api/archivesManage/archivesList' |
|
|
|
|
|
import { getNoFormatField } from '@/api/category/fileNoFormat' |
|
|
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' |
|
@ -112,6 +113,7 @@ export default { |
|
|
categoryId: null, |
|
|
categoryId: null, |
|
|
setParentsId: null, |
|
|
setParentsId: null, |
|
|
result: null, |
|
|
result: null, |
|
|
|
|
|
autoMatic: null, |
|
|
normalizer(node) { |
|
|
normalizer(node) { |
|
|
if (node.childMenus == null || node.childMenus === 'null') { |
|
|
if (node.childMenus == null || node.childMenus === 'null') { |
|
|
delete node.childMenus |
|
|
delete node.childMenus |
|
@ -134,8 +136,30 @@ export default { |
|
|
}, |
|
|
}, |
|
|
mounted() { |
|
|
mounted() { |
|
|
this.editFormRow() |
|
|
this.editFormRow() |
|
|
|
|
|
this.FetchNoFormatField() |
|
|
}, |
|
|
}, |
|
|
methods: { |
|
|
methods: { |
|
|
|
|
|
getAuto() { |
|
|
|
|
|
let string = '' |
|
|
|
|
|
this.autoMatic.forEach(val => { |
|
|
|
|
|
if (this.addOrUpdateForm[val.fieldName] === '' || this.addOrUpdateForm[val.fieldName] === null) { |
|
|
|
|
|
string += '' |
|
|
|
|
|
} else { |
|
|
|
|
|
string += '' + this.addOrUpdateForm[val.fieldName] + val.connector |
|
|
|
|
|
} |
|
|
|
|
|
this.formPreviewData.map(item => { |
|
|
|
|
|
if (item.isAutomatic) { |
|
|
|
|
|
this.$set(this.addOrUpdateForm, item.fieldName, string) |
|
|
|
|
|
} |
|
|
|
|
|
}) |
|
|
|
|
|
}) |
|
|
|
|
|
}, |
|
|
|
|
|
FetchNoFormatField() { |
|
|
|
|
|
getNoFormatField({ categoryId: this.selectedCategory.id }).then(res => { |
|
|
|
|
|
this.autoMatic = res |
|
|
|
|
|
this.getAuto() |
|
|
|
|
|
}) |
|
|
|
|
|
}, |
|
|
// 获取对应字典子集数据 |
|
|
// 获取对应字典子集数据 |
|
|
getAllSubset(item) { |
|
|
getAllSubset(item) { |
|
|
if (item.dictionaryConfigId) { |
|
|
if (item.dictionaryConfigId) { |
|
@ -143,26 +167,10 @@ export default { |
|
|
if (item.isInputClass === 'select') { |
|
|
if (item.isInputClass === 'select') { |
|
|
this.$set(item, 'options', res) |
|
|
this.$set(item, 'options', res) |
|
|
} else if (item.isInputClass === 'popover') { |
|
|
} else if (item.isInputClass === 'popover') { |
|
|
// if (item.fieldName === this.currentFieldName) { |
|
|
|
|
|
this.popoverTableData = res |
|
|
this.popoverTableData = res |
|
|
// } |
|
|
|
|
|
} |
|
|
} |
|
|
}) |
|
|
}) |
|
|
} |
|
|
} |
|
|
// this.formPreviewData.map(item => { |
|
|
|
|
|
// this.$set(item, 'options', []) |
|
|
|
|
|
// if (item.dictionaryConfigId) { |
|
|
|
|
|
// FetchFindAllSubsetById({ id: item.dictionaryConfigId.id }).then(res => { |
|
|
|
|
|
// if (item.isInputClass === 'select') { |
|
|
|
|
|
// this.$set(item, 'options', res) |
|
|
|
|
|
// } else if (item.isInputClass === 'popover') { |
|
|
|
|
|
// if (item.fieldName === this.currentFieldName) { |
|
|
|
|
|
// this.popoverTableData = res |
|
|
|
|
|
// } |
|
|
|
|
|
// } |
|
|
|
|
|
// }) |
|
|
|
|
|
// } |
|
|
|
|
|
// }) |
|
|
|
|
|
}, |
|
|
}, |
|
|
// 判断重复api |
|
|
// 判断重复api |
|
|
handlerIsRepeat(params, item) { |
|
|
handlerIsRepeat(params, item) { |
|
@ -184,6 +192,9 @@ export default { |
|
|
} |
|
|
} |
|
|
this.handlerIsRepeat(params, item) |
|
|
this.handlerIsRepeat(params, item) |
|
|
} |
|
|
} |
|
|
|
|
|
if (!item.isAutomatic) { |
|
|
|
|
|
this.getAuto() |
|
|
|
|
|
} |
|
|
}, |
|
|
}, |
|
|
// tree - open |
|
|
// tree - open |
|
|
openTree(item) { |
|
|
openTree(item) { |
|
@ -204,6 +215,8 @@ export default { |
|
|
} |
|
|
} |
|
|
this.handlerIsRepeat(params, this.treeCurrentFiled) |
|
|
this.handlerIsRepeat(params, this.treeCurrentFiled) |
|
|
} |
|
|
} |
|
|
|
|
|
console.log(val) |
|
|
|
|
|
this.getAuto() |
|
|
}, |
|
|
}, |
|
|
// popover - table 单选 |
|
|
// popover - table 单选 |
|
|
clickRowHandler(row) { |
|
|
clickRowHandler(row) { |
|
@ -217,6 +230,7 @@ export default { |
|
|
} |
|
|
} |
|
|
this.$refs.popoverTable.clearSelection() |
|
|
this.$refs.popoverTable.clearSelection() |
|
|
this.popoverVisible = false |
|
|
this.popoverVisible = false |
|
|
|
|
|
this.getAuto() |
|
|
}, |
|
|
}, |
|
|
// popover - 当前选中得 |
|
|
// popover - 当前选中得 |
|
|
handleCurrentFieldName(item) { |
|
|
handleCurrentFieldName(item) { |
|
@ -317,7 +331,7 @@ export default { |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
</script> |
|
|
</script> |
|
|
<style lang="scss" scoped> |
|
|
|
|
|
|
|
|
<style rel="stylesheet/scss" lang="scss" scoped> |
|
|
.preview-content { |
|
|
.preview-content { |
|
|
// width: 640px !important; |
|
|
// width: 640px !important; |
|
|
// height: calc(100vh - 312px); |
|
|
// height: calc(100vh - 312px); |
|
|