|
@ -32,7 +32,7 @@ |
|
|
:rows="item.isInputClass === 'textarea' ? 3 : ''" |
|
|
:rows="item.isInputClass === 'textarea' ? 3 : ''" |
|
|
:class="{'input-popover':(item.isInputClass === 'popover')}" |
|
|
:class="{'input-popover':(item.isInputClass === 'popover')}" |
|
|
:style="{ width: item.editLength+'px'}" |
|
|
:style="{ width: item.editLength+'px'}" |
|
|
:disabled="isDisabled || (item.fieldName === 'archival_category_code')" |
|
|
|
|
|
|
|
|
:disabled="isDisabled || (item.fieldName === 'archival_category_code') " |
|
|
:validate-event="!isDisabled" |
|
|
:validate-event="!isDisabled" |
|
|
@mousewheel.native.prevent |
|
|
@mousewheel.native.prevent |
|
|
@DOMMouseScroll.native.prevent |
|
|
@DOMMouseScroll.native.prevent |
|
@ -190,6 +190,10 @@ export default { |
|
|
isTitleType: { |
|
|
isTitleType: { |
|
|
type: Number, |
|
|
type: Number, |
|
|
default: 2 |
|
|
default: 2 |
|
|
|
|
|
}, |
|
|
|
|
|
categoryMenu: { |
|
|
|
|
|
type: Array, |
|
|
|
|
|
default: () => { return [] } |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
@ -351,7 +355,6 @@ export default { |
|
|
string += '' |
|
|
string += '' |
|
|
} else { |
|
|
} else { |
|
|
const fieldInfo = this.formPreviewData.find(element => element.fieldName === val.fieldName) |
|
|
const fieldInfo = this.formPreviewData.find(element => element.fieldName === val.fieldName) |
|
|
console.log('fieldInfo', fieldInfo) |
|
|
|
|
|
if (fieldInfo.isInputClass === 'select' || fieldInfo.isInputClass === 'popover') { |
|
|
if (fieldInfo.isInputClass === 'select' || fieldInfo.isInputClass === 'popover') { |
|
|
if (fieldInfo.mateData === 3) { |
|
|
if (fieldInfo.mateData === 3) { |
|
|
await FetchSonDictionaryList({ 'pid': fieldInfo.dictionaryId.id }).then(res => { |
|
|
await FetchSonDictionaryList({ 'pid': fieldInfo.dictionaryId.id }).then(res => { |
|
@ -378,7 +381,6 @@ export default { |
|
|
}) |
|
|
}) |
|
|
} |
|
|
} |
|
|
if (fieldInfo.mateData === 2) { |
|
|
if (fieldInfo.mateData === 2) { |
|
|
console.log('进来了') |
|
|
|
|
|
let categoryId |
|
|
let categoryId |
|
|
if (this.isDesFormType !== 'mergeFile' && this.isDesFormType !== 'arcives' && this.isDesFormType !== 'manageArcives') { |
|
|
if (this.isDesFormType !== 'mergeFile' && this.isDesFormType !== 'arcives' && this.isDesFormType !== 'manageArcives') { |
|
|
categoryId = this.selectedCategory.pid |
|
|
categoryId = this.selectedCategory.pid |
|
@ -386,9 +388,7 @@ export default { |
|
|
categoryId = this.selectedCategory.id |
|
|
categoryId = this.selectedCategory.id |
|
|
} |
|
|
} |
|
|
await FetchArchivesClassTree({ 'categoryId': categoryId }).then(res => { |
|
|
await FetchArchivesClassTree({ 'categoryId': categoryId }).then(res => { |
|
|
console.log('res', res) |
|
|
|
|
|
const option = this.getClassfiyNode(res, this.addOrUpdateForm[val.fieldName]) |
|
|
const option = this.getClassfiyNode(res, this.addOrUpdateForm[val.fieldName]) |
|
|
console.log('option', option) |
|
|
|
|
|
if (option) { |
|
|
if (option) { |
|
|
const obj = {} |
|
|
const obj = {} |
|
|
obj.name = val.name |
|
|
obj.name = val.name |
|
@ -583,7 +583,6 @@ export default { |
|
|
}, |
|
|
}, |
|
|
// tree - select |
|
|
// tree - select |
|
|
selectTree(val) { |
|
|
selectTree(val) { |
|
|
console.log('val111', val) |
|
|
|
|
|
if (val.fondsNo) { |
|
|
if (val.fondsNo) { |
|
|
this.addOrUpdateForm[this.treeCurrentFiled.fieldName] = val.fondsName |
|
|
this.addOrUpdateForm[this.treeCurrentFiled.fieldName] = val.fondsName |
|
|
} else if (val.name) { |
|
|
} else if (val.name) { |
|
@ -707,9 +706,8 @@ export default { |
|
|
const targetId = this.selectedCategory.pid |
|
|
const targetId = this.selectedCategory.pid |
|
|
targetNode = this.findNodeById(this.crud.data[0], targetId) |
|
|
targetNode = this.findNodeById(this.crud.data[0], targetId) |
|
|
} else { |
|
|
} else { |
|
|
targetNode = this.selectedCategory |
|
|
|
|
|
|
|
|
targetNode = this.findNodeById(this.categoryMenu[0], this.selectedCategory.id) |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
if (targetNode) { |
|
|
if (targetNode) { |
|
|
this.$set(this.addOrUpdateForm, item.fieldName, targetNode.code) |
|
|
this.$set(this.addOrUpdateForm, item.fieldName, targetNode.code) |
|
|
} else { |
|
|
} else { |
|
@ -720,7 +718,9 @@ export default { |
|
|
if (item.fieldName === 'is_entity') { |
|
|
if (item.fieldName === 'is_entity') { |
|
|
this.$set(this.addOrUpdateForm, item.fieldName, 1) |
|
|
this.$set(this.addOrUpdateForm, item.fieldName, 1) |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if (item.fieldName === 'fonds_no') { |
|
|
|
|
|
this.$set(this.addOrUpdateForm, item.fieldName, this.selectedCategory.fondsNo) |
|
|
|
|
|
} |
|
|
this.$set(this.rules, item.fieldName, [ |
|
|
this.$set(this.rules, item.fieldName, [ |
|
|
{ |
|
|
{ |
|
|
required: !!item.isRequired, |
|
|
required: !!item.isRequired, |
|
@ -728,7 +728,6 @@ export default { |
|
|
trigger: item.isInputClass === 'text' ? 'blur' : 'change' |
|
|
trigger: item.isInputClass === 'text' ? 'blur' : 'change' |
|
|
} |
|
|
} |
|
|
]) |
|
|
]) |
|
|
|
|
|
|
|
|
// this.$set(this.rules, 'fileOriginal', [ |
|
|
// this.$set(this.rules, 'fileOriginal', [ |
|
|
// { |
|
|
// { |
|
|
// required: fas, |
|
|
// required: fas, |
|
@ -767,9 +766,8 @@ export default { |
|
|
} |
|
|
} |
|
|
}) |
|
|
}) |
|
|
if (this.archivesType === 'add') { |
|
|
if (this.archivesType === 'add') { |
|
|
this.addOrUpdateForm.fonds_affiliation = this.user.fonds.id |
|
|
|
|
|
|
|
|
this.addOrUpdateForm.fonds_affiliation = this.selectedCategory.fondsId |
|
|
} |
|
|
} |
|
|
console.log(this.addOrUpdateForm) |
|
|
|
|
|
delete this.addOrUpdateForm.id |
|
|
delete this.addOrUpdateForm.id |
|
|
this.$refs[formName].validate((valid) => { |
|
|
this.$refs[formName].validate((valid) => { |
|
|
if (valid) { |
|
|
if (valid) { |
|
@ -872,7 +870,6 @@ export default { |
|
|
}) |
|
|
}) |
|
|
} else { |
|
|
} else { |
|
|
collectEdit(params).then(res => { |
|
|
collectEdit(params).then(res => { |
|
|
console.log(res) |
|
|
|
|
|
if (res.code === 200) { |
|
|
if (res.code === 200) { |
|
|
this.$message({ message: res.message, type: 'success', offset: 8 }) |
|
|
this.$message({ message: res.message, type: 'success', offset: 8 }) |
|
|
this.$emit('close-dialog', parentsId) |
|
|
this.$emit('close-dialog', parentsId) |
|
@ -944,7 +941,6 @@ export default { |
|
|
arrayUpload.push(json) |
|
|
arrayUpload.push(json) |
|
|
this.fileOriginal = this.fileNames |
|
|
this.fileOriginal = this.fileNames |
|
|
// this.$set(this.addOrUpdateForm, 'fileOriginal', this.fileNames) |
|
|
// this.$set(this.addOrUpdateForm, 'fileOriginal', this.fileNames) |
|
|
console.log('ddd', this.fileOriginal) |
|
|
|
|
|
|
|
|
|
|
|
this.fileJsonString = JSON.stringify(arrayUpload) |
|
|
this.fileJsonString = JSON.stringify(arrayUpload) |
|
|
}, |
|
|
}, |
|
|