+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
搜索
重置
@@ -158,12 +175,14 @@ import detail from './module/detail'
import { exportFile } from '@/utils/index'
import qs from 'qs'
import { mapGetters } from 'vuex'
-
+import DateRangePicker from '@/components/DateRangePicker'
import PdfDialog from './module/pdfDialog'
+import { FetchDictionaryTree } from '@/api/system/dict'
+import { FetchInitBorrowerListOrderNo } from '@/api/system/borrower'
export default {
name: 'MiodLibrary',
- components: { TreeList, PreviewForm, detail, crudOperation, pagination, PdfDialog },
+ components: { TreeList, PreviewForm, detail, crudOperation, pagination, PdfDialog, DateRangePicker },
cruds() {
return [
CRUD({
@@ -229,7 +248,13 @@ export default {
parentInfo: null,
pageType: null,
allDownloadLoading: false,
- isMiodSaveBind: null
+ isMiodSaveBind: null,
+ securityClassOptions: [],
+ emergencyDegreeOptions: [],
+ readTypeOptions: [],
+ blurryTime: [],
+ distributorsOptions: [],
+ distributorIds: []
}
},
computed: {
@@ -244,8 +269,54 @@ export default {
}
},
created() {
+ this.getDictsList()
},
methods: {
+ getDictsList() {
+ FetchDictionaryTree().then((res) => {
+ const filterCodes = ['security_class']
+ const filteredItems = JSON.parse(JSON.stringify(res)).filter(item => filterCodes.includes(item.dictionaryCode))
+ this.securityClassOptions = filteredItems[0].childDictionarys
+
+ const filterCodes2 = ['emergency_degree']
+ const filteredItems2 = JSON.parse(JSON.stringify(res)).filter(item => filterCodes2.includes(item.dictionaryCode))
+ this.emergencyDegreeOptions = filteredItems2[0].childDictionarys
+
+ const filterCodes3 = ['read_type']
+ const filteredItems3 = JSON.parse(JSON.stringify(res)).filter(item => filterCodes3.includes(item.dictionaryCode))
+ this.readTypeOptions = filteredItems3[0].childDictionarys
+ }).catch(err => {
+ console.log(err)
+ })
+ },
+ handleClear() {
+ this.distributorIds = []
+ this.crud.query.distributorIds = null
+ },
+ fetchDeptsList() {
+ console.log('this.selectedDocument', this.selectedDocument)
+ let documentId
+ if (this.selectedDocument.isType === 2) {
+ documentId = this.selectedDocument.id
+ } else {
+ documentId = this.selectedDocument.documentId
+ }
+ const param = {
+ 'documentId': documentId
+ }
+ console.log('param', param)
+ FetchInitBorrowerListOrderNo(param)
+ .then(res => {
+ console.log('res', res)
+ this.distributorsOptions = res || []
+ })
+ .catch(error => {
+ this.$message.error('获取数据失败,请稍后重试')
+ console.error('获取部门/人员列表失败', error)
+ })
+ .finally(() => {
+ })
+ },
handleSearch() {
this.crud.query.search = this.search
this.crud.toQuery()
@@ -254,6 +325,9 @@ export default {
this.$refs.treeList.refreshData()
},
resetQuery() {
+ this.crud.query.securityClass = ''
+ this.crud.query.emergencyDegree = ''
+ this.crud.query.readType = ''
this.search = ''
this.crud.query.search = ''
if (this.selectedDocument.isType === 3) {
@@ -266,6 +340,11 @@ export default {
this.crud.query.docDepartment = null
this.crud.query.archiveYear = null
}
+ this.blurryTime = []
+ this.crud.query.startTime = null
+ this.crud.query.endTime = null
+ this.distributorIds = []
+ this.crud.query.distributorIds = null
this.crud.toQuery()
},
[CRUD.HOOK.beforeRefresh]() {
@@ -274,6 +353,21 @@ export default {
} else {
this.crud.query.documentId = this.selectedDocument.documentId
}
+
+ if (this.blurryTime.length !== 0) {
+ this.crud.query.startTime = this.blurryTime[0].split(' ')[0]
+ this.crud.query.endTime = this.blurryTime[1].split(' ')[0]
+ } else {
+ this.crud.query.startTime = null
+ this.crud.query.endTime = null
+ }
+
+ if (this.distributorIds.length !== 0) {
+ this.crud.query.distributorIds = this.distributorIds.join(',')
+ } else {
+ this.crud.query.distributorIds = null
+ }
+
this.crud.query.isdel = this.isdel
// this.crud.query.ignore = false
this.crud.query.fondsAffiliation = this.selectedDocument.fondsId
@@ -283,12 +377,12 @@ export default {
this.archivesBtnLoading = loadingType
},
handleNodeClick(data, type) {
- if (type && type === 'targetNode') {
- console.log('非手动点击tree')
- } else {
- this.search = ''
- this.crud.query.search = ''
- }
+ // if (type && type === 'targetNode') {
+ // console.log('非手动点击tree')
+ // } else {
+ // this.search = ''
+ // this.crud.query.search = ''
+ // }
this.selectedDocument = data
let documentId = null
if (data.isType === 2) {
@@ -296,6 +390,7 @@ export default {
} else {
documentId = data.documentId
}
+ this.fetchDeptsList()
this.getInitDocumentsViewTable(documentId, type)
},
// table字段项
@@ -655,7 +750,13 @@ export default {
'ids': ids,
'docDepartment': type === '1' ? (this.selectedDocument.isType === 4 ? this.selectedDocument.dictionaryName : this.selectedDocument.label) : null,
'archivesYear': type === '1' ? (this.selectedDocument.isType === 4 ? this.selectedDocument.label : null) : null,
- 'search': type === '1' ? this.search : null
+ 'search': type === '1' ? this.search : null,
+ 'securityClass': type === '1' ? this.crud.query.securityClass : null,
+ 'emergencyDegree': type === '1' ? this.crud.query.emergencyDegree : null,
+ 'readType': type === '1' ? this.crud.query.readType : null,
+ 'startTime': type === '1' ? (this.blurryTime.length !== 0 ? this.blurryTime[0].split(' ')[0] : null) : null,
+ 'endTime': type === '1' ? (this.blurryTime.length !== 0 ? this.blurryTime[1].split(' ')[0] : null) : null,
+ 'distributorIds': type === '1' ? (this.blurryTime.distributorIds !== 0 ? this.distributorIds.join(',') : null) : null
}
console.log('exportFile', params)
exportFile(this.baseApi + '/api/documentArchives/downloadDocumentArchives?' + qs.stringify(params, { indices: false, allowDots: true, skipNulls: false }))
diff --git a/src/views/archivesMIOD/miodLibrary/module/detail.vue b/src/views/archivesMIOD/miodLibrary/module/detail.vue
index f82b51e..c27c51d 100644
--- a/src/views/archivesMIOD/miodLibrary/module/detail.vue
+++ b/src/views/archivesMIOD/miodLibrary/module/detail.vue
@@ -33,25 +33,29 @@
主办部门:
-
- {{ tag.borrowName }}
-
+
+
+ {{ tag.borrowName }}
+
+
传阅者:
-
- {{ tag.borrowName }}
-
+
+
+ {{ tag.borrowName }}
+
+