Browse Source

公文新增编辑列表优化

master
xuhuajiao 2 weeks ago
parent
commit
f843a2605c
  1. 22
      src/views/archivesMIOD/miodLibrary/index.vue
  2. 7
      src/views/archivesMIOD/miodLibrary/treeList.vue
  3. 9
      src/views/components/category/PreviewForm.vue

22
src/views/archivesMIOD/miodLibrary/index.vue

@ -111,6 +111,7 @@
@close-dialog="closeDialog"
@formLoadingShow="formLoadingShow"
@refreshTree="refreshTreeList"
@resetQuery="resetQuery"
/>
<div slot="footer" class="dialog-footer" style="margin-top: 20px !important;">
<el-button type="text" @click="closeDialog">取消</el-button>
@ -277,7 +278,13 @@ export default {
formLoadingShow(loadingType) {
this.archivesBtnLoading = loadingType
},
handleNodeClick(data) {
handleNodeClick(data, type) {
if (type && type === 'targetNode') {
console.log('非手动点击tree')
} else {
this.search = ''
this.crud.query.search = ''
}
this.selectedDocument = data
let documentId = null
if (data.isType === 2) {
@ -285,10 +292,10 @@ export default {
} else {
documentId = data.documentId
}
this.getInitDocumentsViewTable(documentId)
this.getInitDocumentsViewTable(documentId, type)
},
// table
getInitDocumentsViewTable(documentId) {
getInitDocumentsViewTable(documentId, type) {
crudDocumentArchives.FetchInitDocumentsViewTable({ documentId: documentId }).then(data => {
if (data) {
this.arrySort = []
@ -307,12 +314,16 @@ export default {
this.crud.query.docDepartment = this.selectedDocument.dictionaryName
this.crud.query.archiveYear = this.selectedDocument.label
} else {
this.search = ''
this.crud.query.search = ''
// this.search = ''
// this.crud.query.search = ''
this.crud.query.docDepartment = null
this.crud.query.archiveYear = null
}
if (type && type === 'targetNode') {
this.crud.refresh()
} else {
this.crud.toQuery()
}
})
}
})
@ -346,7 +357,6 @@ export default {
this.getFormInfo(params, type)
},
getFormInfo(params, type) {
this.archivesType = type
crudDocumentArchives.FetchDoeditDocument(params).then(data => {

7
src/views/archivesMIOD/miodLibrary/treeList.vue

@ -177,7 +177,7 @@ export default {
console.log('111')
console.log(targetNode.id)
this.$refs.tree.setCurrentKey(targetNode.id)
this.handleNodeClick(targetNode)
this.handleNodeClick(targetNode, 'targetNode')
}
//
@ -270,11 +270,10 @@ export default {
return null //
},
//
handleNodeClick(val) {
console.log('val', val)
handleNodeClick(val, type) {
if (val) {
this.currentTreeVal = val
this.$emit('nodeClick', val)
this.$emit('nodeClick', val, type)
}
}
}

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

@ -679,6 +679,9 @@ export default {
refreshTreeList() {
this.$emit('refreshTree')
},
resetQuery() {
this.$emit('resetQuery')
},
//
currentYear() {
return new Date().getFullYear()
@ -1555,7 +1558,13 @@ export default {
if (res) {
this.$message({ message: res.message, type: 'success', offset: 8 })
this.$emit('close-dialog')
if (this.archivesType === 'edit') {
this.crud.refresh()
} else {
this.resetQuery()
this.crud.toQuery()
}
// this.fileOriginal = null
this.refreshTreeList()
}

Loading…
Cancel
Save