|
|
@ -1,7 +1,30 @@ |
|
|
|
<template> |
|
|
|
<div> |
|
|
|
<div class="collect-header"> |
|
|
|
<h4 :class="classType">{{ collectTitle }} <span v-if="isTitleType !== 2 && !(isTitleType === 3 && (selectedCategory.arrangeType === 1 || selectedCategory.arrangeType === 2) )"> > {{ test }}</span></h4> |
|
|
|
<h4 :class="classType">{{ collectTitle }} </h4> |
|
|
|
<!-- :class="[!(isRecycle && (isTitleType === 2 || (isTitleType === 3 && selectedCategory.arrangeType !== 3))) ? 'head-search is-recycle':'head-search']" --> |
|
|
|
<div class="collect-filter"> |
|
|
|
<treeselect |
|
|
|
v-if="selectedCategory.arrangeType === 3 && isTitleType !== 4 && isTitleType !== 6 && activeIndex !== 1" |
|
|
|
v-model="query.projectClass" |
|
|
|
:options="projectOptions" |
|
|
|
style="width: 180px;" |
|
|
|
flat |
|
|
|
:multiple="false" |
|
|
|
:normalizer="normalizerProject" |
|
|
|
placeholder="请选择" |
|
|
|
/> |
|
|
|
<treeselect |
|
|
|
v-if="isTitleType !== 6" |
|
|
|
v-model="query.classify" |
|
|
|
:options="classifyOptions" |
|
|
|
style="width: 180px;" |
|
|
|
flat |
|
|
|
:multiple="false" |
|
|
|
:normalizer="normalizer" |
|
|
|
placeholder="请选择档案分类" |
|
|
|
/> |
|
|
|
</div> |
|
|
|
<div v-if="isTitleType !== 6" class="head-search"> |
|
|
|
<!-- 搜索 --> |
|
|
|
<el-input v-model="query.search" clearable size="small" :placeholder="placeholderType" prefix-icon="el-icon-search" style="width: 200px;" class="filter-item" /> |
|
|
@ -40,11 +63,12 @@ |
|
|
|
<el-menu-item v-if="isTitleType !== 2" index="2-1" @click="handleBlukImport">批量导入</el-menu-item> |
|
|
|
<!-- 项目 / 案卷 / 卷内 / 文件--> |
|
|
|
<el-menu-item v-if="activeIndex !== 1 || (isTitleType === 3 && selectedCategory.arrangeType === 1 && activeIndex === 1)" index="2-2" @click="handleBlukEditing">批量修改</el-menu-item> |
|
|
|
<el-menu-item v-if="isTitleType !== 2 && !(isTitleType === 3 && (selectedCategory.arrangeType === 3 || selectedCategory.arrangeType === 2) && activeIndex === 1)" index="2-3" @click="handleAdjustment">档案调整</el-menu-item> |
|
|
|
<el-menu-item v-if="isTitleType !== 2 && !(isTitleType === 3 && (selectedCategory.arrangeType === 3 || selectedCategory.arrangeType === 2) && activeIndex === 1)" index="2-4" @click="handleFileNumberUpdate">档号更新</el-menu-item> |
|
|
|
<el-menu-item v-if="(isTitleType === 3 && selectedCategory.arrangeType === 2) && activeIndex === 0" index="2-3" @click="handleAdjustment('anjuan')">案卷顺序调整</el-menu-item> |
|
|
|
<el-menu-item v-if="isTitleType === 3 && activeIndex === 0 && selectedCategory.arrangeType !== 1 " index="2-12" @click="handleJnSeqAdjustment">卷内顺序调整</el-menu-item> |
|
|
|
<el-menu-item v-if="isTitleType === 3 && selectedCategory.arrangeType === 1" index="2-3" @click="handleAdjustment('file')">文件顺序调整</el-menu-item> |
|
|
|
<el-menu-item v-if="isTitleType !== 2 && !(isTitleType === 3 && (selectedCategory.arrangeType === 1|| selectedCategory.arrangeType === 2) && activeIndex === 1)" index="2-4" @click="handleFileNumberUpdate">档号更新</el-menu-item> |
|
|
|
<!-- 案卷 --> |
|
|
|
<el-menu-item v-if="isTitleType === 3 && activeIndex === 0 && selectedCategory.arrangeType !== 1 " index="2-5" @click="handleFileNumberUpdate">卷内档号更新</el-menu-item> |
|
|
|
<el-menu-item v-if="isTitleType === 3 && activeIndex === 0 && selectedCategory.arrangeType !== 1 " index="2-12" @click="handleFileSeqAdjustment">卷内顺序调整</el-menu-item> |
|
|
|
<el-menu-item v-if="isTitleType === 3 && activeIndex === 0 && selectedCategory.arrangeType !== 1" index="2-6" @click="handleUncoil">拆卷</el-menu-item> |
|
|
|
<el-menu-item v-if="isTitleType === 3 && activeIndex === 0 && selectedCategory.arrangeType !== 1" index="2-7" @click="handleCombineFile">合卷</el-menu-item> |
|
|
|
<el-menu-item v-if="isTitleType === 3 && selectedCategory.arrangeType !== 1" index="2-8" @click="handleInsertFile">插件</el-menu-item> |
|
|
@ -266,13 +290,19 @@ |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</el-dialog> |
|
|
|
|
|
|
|
</div> |
|
|
|
<div style="height: 30px; line-height: 30px; padding: 0 20px;"> <span v-if="(isTitleType !== 2 && selectedCategory.arrangeType === 3 ) || ((isTitleType === 4 || isTitleType === 6) && selectedCategory.arrangeType === 2) || (isTitleType === 6 && selectedCategory.arrangeType === 1)">{{ test }}</span></div> |
|
|
|
</div> |
|
|
|
</template> |
|
|
|
|
|
|
|
<script> |
|
|
|
import { collectionLibraryCrud } from '../mixins/index' |
|
|
|
import { FetchInitCategoryInputFieldByPid } from '@/api/system/category/category' |
|
|
|
import { FetchArchivesClassTree } from '@/api/system/archivesClass' |
|
|
|
import { FetchDictionaryTree } from '@/api/system/dict' |
|
|
|
import Treeselect from '@riophae/vue-treeselect' |
|
|
|
import '@riophae/vue-treeselect/dist/vue-treeselect.css' |
|
|
|
// import { LOAD_CHILDREN_OPTIONS } from '@riophae/vue-treeselect' |
|
|
|
import PreviewForm from '@/views/components/category/PreviewForm' |
|
|
|
import UploadOriginal from './uploadOriginal/index' |
|
|
|
import BlukImport from './bulkImport/index' |
|
|
@ -287,9 +317,10 @@ import FourTest from './fourTest/index' |
|
|
|
import QuickPaper from './quickPaper/index' |
|
|
|
// import { exportFile } from '@/utils/index' |
|
|
|
import { mapGetters } from 'vuex' |
|
|
|
|
|
|
|
export default { |
|
|
|
name: 'CollectHeader', |
|
|
|
components: { PreviewForm, UploadOriginal, BlukImport, BlukEditing, FileNumberAdjustment, FileSeqAdjustment, CombineFile, InsertFile, CollectMoveFile, Print, FourTest, QuickPaper }, |
|
|
|
components: { Treeselect, PreviewForm, UploadOriginal, BlukImport, BlukEditing, FileNumberAdjustment, FileSeqAdjustment, CombineFile, InsertFile, CollectMoveFile, Print, FourTest, QuickPaper }, |
|
|
|
mixins: [collectionLibraryCrud], |
|
|
|
props: { |
|
|
|
selectedCategory: { |
|
|
@ -335,6 +366,12 @@ export default { |
|
|
|
formVisible: false, |
|
|
|
formTitle: '项目', |
|
|
|
formPreviewData: [], // 预览界面data |
|
|
|
query: { |
|
|
|
projectClass: null, |
|
|
|
classify: null |
|
|
|
}, |
|
|
|
projectOptions: [], |
|
|
|
classifyOptions: [], |
|
|
|
deleteVisible: false, |
|
|
|
moveVisible: false, |
|
|
|
updateVisible: false, |
|
|
@ -346,7 +383,7 @@ export default { |
|
|
|
recoverVisible: false, |
|
|
|
completelyDeleteVisible: false, |
|
|
|
parentsId: null, // 父id |
|
|
|
isDesFormType: null // 区分是门类得还是档案得 |
|
|
|
isDesFormType: 'arcives' // 区分是门类得还是档案得 |
|
|
|
} |
|
|
|
}, |
|
|
|
computed: { |
|
|
@ -394,11 +431,92 @@ export default { |
|
|
|
return '输入项目名称或编号' |
|
|
|
} |
|
|
|
}, |
|
|
|
watch: { |
|
|
|
selectedCategory: function(newValue, oldValue) { |
|
|
|
if (newValue && newValue.id) { |
|
|
|
this.getInitArchivesClass() |
|
|
|
this.getDictsList() |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
created() { |
|
|
|
}, |
|
|
|
mounted() { |
|
|
|
this.getInitArchivesClass() |
|
|
|
this.getDictsList() |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
getInitArchivesClass() { |
|
|
|
this.classifyOptions = [] |
|
|
|
const params = { |
|
|
|
'categoryId': this.selectedCategory.id |
|
|
|
} |
|
|
|
FetchArchivesClassTree(params).then((res) => { |
|
|
|
this.classifyOptions = JSON.parse(JSON.stringify(res)) |
|
|
|
}).catch(err => { |
|
|
|
console.log(err) |
|
|
|
}) |
|
|
|
}, |
|
|
|
normalizer(node) { |
|
|
|
if (node.childArchivesClass === null) { |
|
|
|
delete node.childArchivesClass |
|
|
|
} |
|
|
|
return { |
|
|
|
id: node.code, |
|
|
|
label: node.name, |
|
|
|
children: node.childArchivesClass |
|
|
|
} |
|
|
|
}, |
|
|
|
getDictsList() { |
|
|
|
this.projectOptions = [] |
|
|
|
FetchDictionaryTree().then((res) => { |
|
|
|
console.log(res) |
|
|
|
const filterCodes = ['project_class'] |
|
|
|
let filteredItems = JSON.parse(JSON.stringify(res)).filter(item => filterCodes.includes(item.dictionaryCode)) |
|
|
|
filteredItems = this.addLevelToDictionaryList(filteredItems, 1) |
|
|
|
if (this.selectedCategory.arrangeType === 3 && this.isTitleType === 3) { |
|
|
|
this.projectOptions = filteredItems |
|
|
|
console.log(this.projectOptions) |
|
|
|
} else { |
|
|
|
this.projectOptions = this.filterData(filteredItems, filteredItems[0].id) |
|
|
|
} |
|
|
|
}).catch(err => { |
|
|
|
console.log(err) |
|
|
|
}) |
|
|
|
}, |
|
|
|
// 显示第一级和第二级 |
|
|
|
filterData(data, targetId) { |
|
|
|
return data.filter(item => { |
|
|
|
if (item.id === targetId || item.dictionaryParents === targetId) { |
|
|
|
if (item.childDictionarys && item.childDictionarys.length > 0) { |
|
|
|
item.childDictionarys = this.filterData(item.childDictionarys, targetId) |
|
|
|
} |
|
|
|
return true |
|
|
|
} |
|
|
|
return false |
|
|
|
}) |
|
|
|
}, |
|
|
|
// 给筛选出来的数据加level 方便后面是否可点击 |
|
|
|
addLevelToDictionaryList(dictionaryList, level) { |
|
|
|
dictionaryList.forEach(dictionary => { |
|
|
|
dictionary.level = level |
|
|
|
if (dictionary.childDictionarys) { |
|
|
|
dictionary.childDictionarys = this.addLevelToDictionaryList(dictionary.childDictionarys, level + 1) |
|
|
|
} |
|
|
|
}) |
|
|
|
return dictionaryList |
|
|
|
}, |
|
|
|
normalizerProject(node) { |
|
|
|
if (node.childDictionarys && !node.childDictionarys.length) { |
|
|
|
delete node.childDictionarys |
|
|
|
} |
|
|
|
return { |
|
|
|
id: node.dictionaryCode, |
|
|
|
label: node.dictionaryName, |
|
|
|
children: node.childDictionarys, |
|
|
|
isDisabled: this.isTitleType === 3 ? node.level !== 3 : node.level === 1 |
|
|
|
} |
|
|
|
}, |
|
|
|
handleSelect(key, keyPath) { |
|
|
|
console.log(key, keyPath) |
|
|
|
}, |
|
|
@ -526,14 +644,35 @@ export default { |
|
|
|
} |
|
|
|
this.$refs.blukEditingRef.bulkEditingVisible = true |
|
|
|
}, |
|
|
|
// 档案调整 |
|
|
|
handleAdjustment() { |
|
|
|
this.$refs.fileNumberAdjustmentRef.isType = this.isTitleType |
|
|
|
if (this.selections.length === 0) { |
|
|
|
this.$refs.fileNumberAdjustmentRef.adjustmentTipVisible = true |
|
|
|
// 案卷/文件顺序调整 |
|
|
|
handleAdjustment(type) { |
|
|
|
if (this.selections.length < 2) { |
|
|
|
this.$message('请选择多个案卷后进行操作!') |
|
|
|
return false |
|
|
|
} |
|
|
|
if (type === 'anjuan') { |
|
|
|
this.$refs.fileNumberAdjustmentRef.titleAdjustment = '案卷顺序调整' |
|
|
|
} else { |
|
|
|
this.$refs.fileNumberAdjustmentRef.titleAdjustment = '文件顺序调整' |
|
|
|
} |
|
|
|
this.$refs.fileNumberAdjustmentRef.adjustmentVisible = true |
|
|
|
// if (this.selections.length === 0) { |
|
|
|
// this.$refs.fileNumberAdjustmentRef.adjustmentTipVisible = true |
|
|
|
// } else { |
|
|
|
// this.$refs.fileNumberAdjustmentRef.adjustmentVisible = true |
|
|
|
// } |
|
|
|
}, |
|
|
|
// 卷内顺序调整 |
|
|
|
handleJnSeqAdjustment() { |
|
|
|
if (this.selections.length === 0) { |
|
|
|
this.$message('您还未勾选需要操作的条目,请先确认!') |
|
|
|
return false |
|
|
|
} |
|
|
|
if (this.selections.length > 1) { |
|
|
|
this.$message('顺序调整操作只可勾选唯一目标条目,请先确认!') |
|
|
|
return false |
|
|
|
} |
|
|
|
this.$refs.fileSeqAdjustmentRef.adjustmentVisible = true |
|
|
|
}, |
|
|
|
// 档号更新 |
|
|
|
handleFileNumberUpdate() { |
|
|
@ -546,18 +685,6 @@ export default { |
|
|
|
handleUpdateConfirm() { |
|
|
|
this.updateVisible = false |
|
|
|
}, |
|
|
|
// 卷内顺序调整 |
|
|
|
handleFileSeqAdjustment() { |
|
|
|
if (this.selections.length === 0) { |
|
|
|
this.$message('您还未勾选需要操作的条目,请先确认!') |
|
|
|
return false |
|
|
|
} |
|
|
|
if (this.selections.length > 1) { |
|
|
|
this.$message('顺序调整操作只可勾选唯一目标条目,请先确认!') |
|
|
|
return false |
|
|
|
} |
|
|
|
this.$refs.fileSeqAdjustmentRef.adjustmentVisible = true |
|
|
|
}, |
|
|
|
// 拆卷 |
|
|
|
handleUncoil() { |
|
|
|
if (this.selections.length === 0) { |
|
|
@ -702,4 +829,18 @@ export default { |
|
|
|
</script> |
|
|
|
|
|
|
|
<style lang='scss' scoped> |
|
|
|
.collect-filter{ |
|
|
|
display: flex; |
|
|
|
// width: 360px; |
|
|
|
height: 32px; |
|
|
|
justify-content: flex-end; |
|
|
|
::v-deep .vue-treeselect{ |
|
|
|
font-size: 12px; |
|
|
|
margin-right: 10px !important; |
|
|
|
.vue-treeselect__control{ |
|
|
|
height: 33px !important; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
</style> |