|
@ -21,7 +21,9 @@ export const collectionLibraryCrud = { |
|
|
}, |
|
|
}, |
|
|
timer: null, |
|
|
timer: null, |
|
|
query: { |
|
|
query: { |
|
|
search: null |
|
|
|
|
|
|
|
|
search: null, |
|
|
|
|
|
project_class: null, |
|
|
|
|
|
archive_ctg_no: null |
|
|
}, |
|
|
}, |
|
|
classifyTree: [], |
|
|
classifyTree: [], |
|
|
classifyLoading: false, |
|
|
classifyLoading: false, |
|
@ -34,32 +36,41 @@ export const collectionLibraryCrud = { |
|
|
// 组件共用方法
|
|
|
// 组件共用方法
|
|
|
methods: { |
|
|
methods: { |
|
|
handleSearch(categoryLevel) { |
|
|
handleSearch(categoryLevel) { |
|
|
let parentsId = null |
|
|
|
|
|
|
|
|
this.parentsData.$refs.classifyTree.setCurrentKey(null) |
|
|
|
|
|
this.smartQuery = { |
|
|
|
|
|
'retention': null, |
|
|
|
|
|
'security_class': null, |
|
|
|
|
|
'doc_type': null, |
|
|
|
|
|
'medium_type': null, |
|
|
|
|
|
'archive_year': null, |
|
|
|
|
|
'fonds_no': null |
|
|
|
|
|
} |
|
|
// 2 项目 3 案卷 /文件 4 卷内 6 文件
|
|
|
// 2 项目 3 案卷 /文件 4 卷内 6 文件
|
|
|
if (this.isTitleType === 2) { |
|
|
if (this.isTitleType === 2) { |
|
|
parentsId = null |
|
|
|
|
|
|
|
|
this.parentsId = null |
|
|
|
|
|
this.$parent.getTableDisplayFieldsLoading = true |
|
|
} else if (this.isTitleType === 3) { |
|
|
} else if (this.isTitleType === 3) { |
|
|
console.log('this.isTitleType', this.isTitleType) |
|
|
|
|
|
if (this.selectedCategory.arrangeType === 1) { |
|
|
if (this.selectedCategory.arrangeType === 1) { |
|
|
parentsId = null |
|
|
|
|
|
|
|
|
this.parentsId = null |
|
|
|
|
|
this.$parent.getTableDisplayFieldsLoading = true |
|
|
} else { |
|
|
} else { |
|
|
parentsId = this.parentsData.parentsProjectId |
|
|
|
|
|
|
|
|
this.parentsId = this.parentsData.parentsProjectId |
|
|
this.$parent.getTableDisplayFieldsLoading = true |
|
|
this.$parent.getTableDisplayFieldsLoading = true |
|
|
} |
|
|
} |
|
|
} else if (this.isTitleType === 4) { |
|
|
} else if (this.isTitleType === 4) { |
|
|
// 卷内
|
|
|
// 卷内
|
|
|
this.$parent.$parent.getTableDisplayFieldsLoading = true |
|
|
this.$parent.$parent.getTableDisplayFieldsLoading = true |
|
|
parentsId = this.parentsData.parentsAnjuanId |
|
|
|
|
|
|
|
|
this.parentsId = this.parentsData.parentsAnjuanId |
|
|
} else if (this.isTitleType === 6) { |
|
|
} else if (this.isTitleType === 6) { |
|
|
// 原文
|
|
|
// 原文
|
|
|
this.$parent.$parent.getTableDisplayFieldsLoading = true |
|
|
this.$parent.$parent.getTableDisplayFieldsLoading = true |
|
|
parentsId = this.parentsData.parentsJuanneiId |
|
|
|
|
|
|
|
|
this.parentsId = this.parentsData.parentsJuanneiId |
|
|
} |
|
|
} |
|
|
setTimeout(() => { |
|
|
setTimeout(() => { |
|
|
this.getViewTableList(categoryLevel, 'search', parentsId) |
|
|
|
|
|
|
|
|
this.getViewTableList(categoryLevel, this.parentsId, 'search') |
|
|
}, 200) |
|
|
}, 200) |
|
|
}, |
|
|
}, |
|
|
getViewTable(categoryLevel, parentsId) { |
|
|
|
|
|
|
|
|
getViewTable(categoryLevel, parentsId, type) { |
|
|
this.getTableDisplayFieldsLoading = true |
|
|
this.getTableDisplayFieldsLoading = true |
|
|
this.tableDisplayFields = [] |
|
|
this.tableDisplayFields = [] |
|
|
FetchInitCategoryViewTable({ categoryId: this.selectedCategory.id, categoryLevel: categoryLevel }).then((res) => { |
|
|
FetchInitCategoryViewTable({ categoryId: this.selectedCategory.id, categoryLevel: categoryLevel }).then((res) => { |
|
@ -73,76 +84,103 @@ export const collectionLibraryCrud = { |
|
|
} |
|
|
} |
|
|
}) |
|
|
}) |
|
|
this.$nextTick(() => { |
|
|
this.$nextTick(() => { |
|
|
this.getViewTableList(categoryLevel, null, parentsId) |
|
|
|
|
|
|
|
|
this.getViewTableList(categoryLevel, parentsId, type) |
|
|
}) |
|
|
}) |
|
|
} |
|
|
} |
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|
getViewTableList(categoryLevel, type, parentsId) { |
|
|
|
|
|
|
|
|
getViewTableList(categoryLevel, parentsId, type) { |
|
|
console.log('list', parentsId) |
|
|
console.log('list', parentsId) |
|
|
const params = { |
|
|
const params = { |
|
|
'parentId': parentsId, |
|
|
'parentId': parentsId, |
|
|
'categoryId': this.selectedCategory.id, |
|
|
'categoryId': this.selectedCategory.id, |
|
|
'categoryLevel': categoryLevel, |
|
|
'categoryLevel': categoryLevel, |
|
|
'search': this.query.search, |
|
|
'search': this.query.search, |
|
|
|
|
|
'retention': this.smartQuery.retention, |
|
|
|
|
|
'security_class': this.smartQuery.security_class, |
|
|
|
|
|
'medium_type': this.smartQuery.medium_type, |
|
|
|
|
|
'doc_type': this.smartQuery.doc_type, |
|
|
|
|
|
'archive_year': this.smartQuery.archive_year, |
|
|
|
|
|
'fonds_no': this.smartQuery.fonds_no, |
|
|
|
|
|
'project_class': this.query.project_class, |
|
|
|
|
|
'archive_ctg_no': this.query.archive_ctg_no, |
|
|
'page': this.page.page - 1, |
|
|
'page': this.page.page - 1, |
|
|
'size': this.page.size |
|
|
'size': this.page.size |
|
|
} |
|
|
} |
|
|
FetchInitCategoryView(params).then((res) => { |
|
|
FetchInitCategoryView(params).then((res) => { |
|
|
if (res.code !== 500) { |
|
|
if (res.code !== 500) { |
|
|
if (categoryLevel === 1) { |
|
|
if (categoryLevel === 1) { |
|
|
|
|
|
// 项目
|
|
|
this.projectData = res.list.content |
|
|
this.projectData = res.list.content |
|
|
|
|
|
this.page.total = res.list.totalElements |
|
|
this.yearData = res.yearGroup |
|
|
this.yearData = res.yearGroup |
|
|
if (this.yearData) { |
|
|
|
|
|
|
|
|
if (this.yearData && type !== 'quickFilter') { |
|
|
this.$emit('myYearEvent', this.yearData) |
|
|
this.$emit('myYearEvent', this.yearData) |
|
|
} |
|
|
} |
|
|
if (type === 'search') { |
|
|
if (type === 'search') { |
|
|
this.$parent.projectData = res.list.content |
|
|
this.$parent.projectData = res.list.content |
|
|
|
|
|
this.$parent.page.total = res.list.totalElements |
|
|
this.$parent.getTableDisplayFieldsLoading = false |
|
|
this.$parent.getTableDisplayFieldsLoading = false |
|
|
} |
|
|
} |
|
|
} else if (categoryLevel === 2) { |
|
|
} else if (categoryLevel === 2) { |
|
|
|
|
|
// 案卷
|
|
|
|
|
|
const anjuanObj = this.parentsData.$refs.anjuanEle.$refs.ajContent.$refs.tableList |
|
|
this.anjuanData = res.list.content |
|
|
this.anjuanData = res.list.content |
|
|
|
|
|
this.page.total = res.list.totalElements |
|
|
this.yearData = res.yearGroup |
|
|
this.yearData = res.yearGroup |
|
|
if (this.yearData) { |
|
|
|
|
|
|
|
|
if (this.yearData && type !== 'quickFilter') { |
|
|
this.$parent.$parent.$emit('myYearEvent', this.yearData) |
|
|
this.$parent.$parent.$emit('myYearEvent', this.yearData) |
|
|
} |
|
|
} |
|
|
|
|
|
// 搜索/新增/编辑 非 案卷是主页的时候
|
|
|
if (type === 'search') { |
|
|
if (type === 'search') { |
|
|
this.$parent.anjuanData = res.list.content |
|
|
|
|
|
this.$parent.getTableDisplayFieldsLoading = false |
|
|
|
|
|
|
|
|
anjuanObj.anjuanData = res.list.content |
|
|
|
|
|
anjuanObj.page.total = res.list.totalElements |
|
|
|
|
|
anjuanObj.getTableDisplayFieldsLoading = false |
|
|
} |
|
|
} |
|
|
} else if (categoryLevel === 3) { |
|
|
} else if (categoryLevel === 3) { |
|
|
if (this.isTitleType === 6) { |
|
|
|
|
|
this.fileData = res.list.content |
|
|
|
|
|
} else if (this.isTitleType === 3) { |
|
|
|
|
|
|
|
|
if (this.isTitleType === 3) { |
|
|
|
|
|
console.log('2222') |
|
|
|
|
|
// 案卷下的未整理 / 文件为主页时
|
|
|
|
|
|
const wjObj = this.parentsData.$refs.anjuanEle.$refs.ajContent.$refs.tableList |
|
|
this.anjuanData = res.list.content |
|
|
this.anjuanData = res.list.content |
|
|
|
|
|
this.page.total = res.list.totalElements |
|
|
this.yearData = res.yearGroup |
|
|
this.yearData = res.yearGroup |
|
|
if (this.yearData) { |
|
|
|
|
|
|
|
|
if (this.yearData && type !== 'quickFilter') { |
|
|
this.$parent.$parent.$emit('myYearEvent', this.yearData) |
|
|
this.$parent.$parent.$emit('myYearEvent', this.yearData) |
|
|
} |
|
|
} |
|
|
|
|
|
if (type === 'search') { |
|
|
|
|
|
wjObj.anjuanData = res.list.content |
|
|
|
|
|
wjObj.page.total = res.list.totalElements |
|
|
|
|
|
wjObj.getTableDisplayFieldsLoading = false |
|
|
|
|
|
} |
|
|
} else { |
|
|
} else { |
|
|
if (this.selectedCategory.arrangeType === 1) { |
|
|
|
|
|
this.anjuanData = res.list.content |
|
|
|
|
|
this.yearData = res.yearGroup |
|
|
|
|
|
if (this.yearData) { |
|
|
|
|
|
this.$parent.$parent.$emit('myYearEvent', this.yearData) |
|
|
|
|
|
} |
|
|
|
|
|
if (type === 'search') { |
|
|
|
|
|
this.$parent.anjuanData = res.list.content |
|
|
|
|
|
this.$parent.getTableDisplayFieldsLoading = false |
|
|
|
|
|
} |
|
|
|
|
|
} else { |
|
|
|
|
|
this.junneiData = res.list.content |
|
|
|
|
|
if (type === 'search') { |
|
|
|
|
|
this.$parent.$parent.junneiData = res.list.content |
|
|
|
|
|
this.$parent.$parent.getTableDisplayFieldsLoading = false |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
// 卷内
|
|
|
|
|
|
console.log('5555') |
|
|
|
|
|
this.junneiData = res.list.content |
|
|
|
|
|
this.page.total = res.list.totalElements |
|
|
|
|
|
if (type === 'search') { |
|
|
|
|
|
this.parentsData.$refs.juanneiEle.junneiData = res.list.content |
|
|
|
|
|
this.parentsData.$refs.juanneiEle.page.total = res.list.totalElements |
|
|
|
|
|
this.parentsData.$refs.juanneiEle.getTableDisplayFieldsLoading = false |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
} else { |
|
|
|
|
|
// 原文
|
|
|
|
|
|
this.fileData = res.list.content |
|
|
|
|
|
this.page.total = res.list.totalElements |
|
|
|
|
|
if (type === 'search') { |
|
|
|
|
|
this.parentsData.$refs.fileEle.fileData = res.list.content |
|
|
|
|
|
this.parentsData.$refs.fileEle.page.total = res.list.totalElements |
|
|
|
|
|
this.parentsData.$refs.fileEle.getTableDisplayFieldsLoading = false |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
this.page.total = res.list.totalElements |
|
|
|
|
|
} |
|
|
} |
|
|
this.getTableDisplayFieldsLoading = false |
|
|
this.getTableDisplayFieldsLoading = false |
|
|
this.$parent.$parent.$refs.table.clearSelection() |
|
|
|
|
|
|
|
|
if (!parentsId) { |
|
|
|
|
|
this.selections = [] |
|
|
|
|
|
this.crud.selections = [] |
|
|
|
|
|
this.$refs.table.clearSelection() |
|
|
|
|
|
} |
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|