|
|
@ -7,11 +7,28 @@ |
|
|
|
</div> |
|
|
|
<div v-if="selectedDocument.isType !== 1" class="elect-cont-right"> |
|
|
|
<!--工具栏--> |
|
|
|
<div class="head-container" :style="isRecycle?'display:flex;justify-content: space-between; align-items: center;':'' "> |
|
|
|
<div class="head-search" :style="isRecycle?'margin: 0;':''"> |
|
|
|
<div class="head-container" :style="isRecycle?'display:flex; justify-content: space-between; align-items: center; flex-wrap: wrap;':'' "> |
|
|
|
<div class="head-search" :style="isRecycle?'margin-bottom: 10px;':''"> |
|
|
|
<!-- 搜索 --> |
|
|
|
<el-input v-model="search" clearable size="small" placeholder="输入题名搜索" prefix-icon="el-icon-search" style="width: 200px;" class="filter-item" @keyup.enter.native="handleSearch" /> |
|
|
|
<el-input v-model="search" clearable size="small" placeholder="输入关键字搜索" prefix-icon="el-icon-search" style="width: 200px;" class="filter-item" @clear="handleSearch" @keyup.enter.native="handleSearch" /> |
|
|
|
<!-- <rrOperation /> --> |
|
|
|
<!-- 密级 --> |
|
|
|
<el-select v-model="query.securityClass" clearable placeholder="密级" style="width: 110px;" @change="crud.toQuery"> |
|
|
|
<el-option v-for="item in securityClassOptions" :key="item.dictionaryCode" :label="item.dictionaryName" :value="item.dictionaryName" /> |
|
|
|
</el-select> |
|
|
|
<!-- 紧急程度 --> |
|
|
|
<el-select v-model="query.emergencyDegree" clearable placeholder="紧急程度" style="width: 110px;" @change="crud.toQuery"> |
|
|
|
<el-option v-for="item in emergencyDegreeOptions" :key="item.dictionaryCode" :label="item.dictionaryName" :value="item.dictionaryName" /> |
|
|
|
</el-select> |
|
|
|
<!-- 传阅状态 --> |
|
|
|
<el-select v-model="query.readType" clearable size="small" placeholder="传阅状态" class="filter-item" style="width: 110px" @change="crud.toQuery"> |
|
|
|
<el-option v-for="item in readTypeOptions" :key="item.dictionaryCode" :label="item.dictionaryName" :value="item.dictionaryName" /> |
|
|
|
</el-select> |
|
|
|
<!-- 登记日期范围 --> |
|
|
|
<date-range-picker v-model="blurryTime" class="date-item" @change="crud.toQuery" /> |
|
|
|
<!-- 需传阅者 --> |
|
|
|
<el-select v-model="distributorIds" clearable multiple collapse-tags placeholder="需传阅者" style="width: 170px" @clear="handleClear" @change="crud.toQuery"> <el-option v-for="item in distributorsOptions" :key="item.id" :label="item.borrowName" :value="item.id" /> |
|
|
|
</el-select> |
|
|
|
<el-button class="filter-item filter-search" size="mini" type="success" icon="el-icon-search" @click="handleSearch">搜索</el-button> |
|
|
|
<el-button class="filter-item filter-refresh" size="mini" type="warning" icon="el-icon-refresh-left" @click="resetQuery">重置</el-button> |
|
|
|
</div> |
|
|
@ -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 })) |
|
|
|