Browse Source

门类管理-著录项管理Bug修正

master
z_yu 3 years ago
parent
commit
10bb71c1ab
  1. 1
      src/views/category/descriptionPreview/index.vue
  2. 27
      src/views/components/category/PreviewForm.vue

1
src/views/category/descriptionPreview/index.vue

@ -160,6 +160,7 @@ export default {
// //
this.allFieldsData.splice(0, this.allFieldsData.length) this.allFieldsData.splice(0, this.allFieldsData.length)
this.getArchivesType(true) this.getArchivesType(true)
this.thisFields = this.editField
}) })
}) })
return false return false

27
src/views/components/category/PreviewForm.vue

@ -158,14 +158,34 @@ export default {
this.FetchNoFormatField() this.FetchNoFormatField()
}, },
methods: { methods: {
//
getNode(tree, dicName) {
for (let i = 0; i < tree.length; i++) {
if (tree[i].dicName === dicName) {
return tree[i]
} else if (tree[i].childMenus) {
return this.getNode(tree[i].childMenus, dicName)
}
}
},
// //
handleAuto() { handleAuto() {
let string = '' let string = ''
this.autoMatic.forEach(val => {
this.autoMatic.forEach(async val => {
if (!this.addOrUpdateForm[val.fieldName]) { if (!this.addOrUpdateForm[val.fieldName]) {
string += '' string += ''
} else { } else {
string += '' + this.addOrUpdateForm[val.fieldName] + val.connector
const fieldInfo = this.formPreviewData.find(element => element.fieldName === val.fieldName)
if (fieldInfo.isInputClass === 'select' || fieldInfo.isInputClass === 'popover') {
await FetchFindAllSubsetById({ id: fieldInfo.dictionaryConfigId.id }).then(res => {
const option = this.getNode(res, this.addOrUpdateForm[val.fieldName])
if (option) {
string += '' + option.dicCode + val.connector
}
})
} else {
string += '' + this.addOrUpdateForm[val.fieldName] + val.connector
}
} }
this.formPreviewData.map(item => { this.formPreviewData.map(item => {
if (item.isAutomatic) { if (item.isAutomatic) {
@ -226,7 +246,7 @@ export default {
// tree - select // tree - select
selectTree(val) { selectTree(val) {
this.addOrUpdateForm[this.treeCurrentFiled.fieldName] = val.dicName this.addOrUpdateForm[this.treeCurrentFiled.fieldName] = val.dicName
this.treeName = val.dicName
// this.treeName = val.dicName
// - - treeSelect // - - treeSelect
if (this.treeCurrentFiled.isRepeat) { if (this.treeCurrentFiled.isRepeat) {
const params = { const params = {
@ -358,7 +378,6 @@ export default {
} }
} }
// addOrUpdateForm[item.fieldName] = item.isDefaultValue
</script> </script>
<style rel="stylesheet/scss" lang="scss" scoped> <style rel="stylesheet/scss" lang="scss" scoped>
.preview-content { .preview-content {

Loading…
Cancel
Save