|
|
@ -34,11 +34,14 @@ |
|
|
|
<span class="dialog-right-top" /> |
|
|
|
<span class="dialog-left-bottom" /> |
|
|
|
<div class="setting-dialog"> |
|
|
|
<!-- tab --> |
|
|
|
<ul class="archives-tab"> |
|
|
|
<li :class="{'active': archivesTabIndex == 0}" @click="changeActiveTab(0)">基本信息</li> |
|
|
|
<li v-if="isEditOrAdd !== 'add'" :class="{'active': archivesTabIndex == 1}" @click="changeActiveTab(1)">上传附件</li> |
|
|
|
</ul> |
|
|
|
<!-- form --> |
|
|
|
<PreviewForm v-if="formPreviewData.length && archivesTabIndex == 0" ref="previewForm" :is-disabled="false" :form-preview-data.sync="formPreviewData" :selected-category="selectedCategory" :arc-id="arcId" /> |
|
|
|
<!-- 上传附件 --> |
|
|
|
<UploadFile v-if="archivesTabIndex==1" /> |
|
|
|
<div slot="footer" class="dialog-footer"> |
|
|
|
<el-button :loading="crud.status.cu === 2" type="primary" @click="handlerArchivesSubmit">保存</el-button> |
|
|
@ -143,7 +146,7 @@ export default { |
|
|
|
group: false |
|
|
|
}, |
|
|
|
queryOnPresenterCreated: false, |
|
|
|
sort: ['department,asc'] |
|
|
|
sort: [] |
|
|
|
}) |
|
|
|
] |
|
|
|
}, |
|
|
@ -173,7 +176,8 @@ export default { |
|
|
|
selectedData: null, |
|
|
|
archivesTabIndex: 0, // 新增 |
|
|
|
tabDisabled: true, |
|
|
|
arcId: null // 档案ID |
|
|
|
arcId: null, // 档案ID |
|
|
|
arrySort: [] |
|
|
|
} |
|
|
|
}, |
|
|
|
watch: { |
|
|
@ -207,12 +211,20 @@ export default { |
|
|
|
getTableDisplayFields({ categoryId: this.selectedCategory.id }).then(data => { |
|
|
|
this.tableDisplayFields = data |
|
|
|
this.getTableDisplayFieldsLoading = false |
|
|
|
return true |
|
|
|
|
|
|
|
this.tableDisplayFields.map(item => { |
|
|
|
if (item.displayOrder) { |
|
|
|
this.arrySort.push(item.fieldName + ', ' + (item.displayOrder === 1 ? 'asc' : 'desc')) |
|
|
|
} |
|
|
|
}) |
|
|
|
console.log(this.arrySort) |
|
|
|
}) |
|
|
|
this.crud.sort = this.arrySort |
|
|
|
}, |
|
|
|
[CRUD.HOOK.beforeToCU](crud, form, btn) { |
|
|
|
this.isEditOrAdd = btn |
|
|
|
this.selectedData = crud.selections |
|
|
|
this.archivesTabIndex = 0 |
|
|
|
if (this.isEditOrAdd === 'add') { |
|
|
|
this.tabDisabled = true |
|
|
|
this.arcId = null |
|
|
@ -232,27 +244,12 @@ export default { |
|
|
|
this.$refs.previewForm.addOrUpdateForm = this.selectedData[0] |
|
|
|
} |
|
|
|
}) |
|
|
|
return true |
|
|
|
}) |
|
|
|
}, |
|
|
|
// [CRUD.HOOK.beforeToEdit](crud, form, btn) { |
|
|
|
// console.log(this.crud) |
|
|
|
// this.$nextTick(() => { |
|
|
|
// console.log(this.$refs.previewForm) |
|
|
|
// }) |
|
|
|
// }, |
|
|
|
changeActiveTab(index) { |
|
|
|
this.archivesTabIndex = index |
|
|
|
}, |
|
|
|
handlerArchivesSubmit() { |
|
|
|
// let arcId |
|
|
|
// if (this.isEditOrAdd === 'add') { |
|
|
|
// arcId = null |
|
|
|
// this.tabDisabled = true |
|
|
|
// } else if (this.isEditOrAdd === 'edit') { |
|
|
|
// arcId = this.selectedData[0].id |
|
|
|
// this.tabDisabled = false |
|
|
|
// } |
|
|
|
this.$refs.previewForm.submitForm('addOrUpdateForm') |
|
|
|
}, |
|
|
|
// table - 当前选中得row |
|
|
@ -313,6 +310,9 @@ export default { |
|
|
|
height: calc(100vh - 174px); |
|
|
|
} |
|
|
|
.preview-content { |
|
|
|
width: auto !important; |
|
|
|
padding: 20px 144px 0 150px!important; |
|
|
|
margin-right: 6px; |
|
|
|
overflow: hidden; |
|
|
|
overflow-y: auto; |
|
|
|
.el-textarea__inner { |
|
|
|