You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
719 lines
27 KiB
719 lines
27 KiB
<template>
|
|
<div>
|
|
<div class="collect-header">
|
|
<h4 :class="classType">{{ collectTitle }} </h4>
|
|
<div class="collect-filter">
|
|
<el-select
|
|
v-if="isTitleType === 3 && selectedCategory.arrangeType !== 3"
|
|
v-model="selectStatus"
|
|
multiple
|
|
collapse-tags
|
|
style="margin-right: 10px; width: 160px;"
|
|
placeholder="请选择"
|
|
>
|
|
<el-option
|
|
v-for="item in statusOptions"
|
|
:key="item.value"
|
|
:label="item.label"
|
|
:value="item.value"
|
|
/>
|
|
</el-select>
|
|
<treeselect
|
|
v-if="selectedCategory.arrangeType === 3 && isTitleType !== 4 && isTitleType !== 6"
|
|
v-model="query.project_class"
|
|
:options="projectOptions"
|
|
style="width: 160px;"
|
|
flat
|
|
:multiple="false"
|
|
:normalizer="normalizerProject"
|
|
placeholder="请选择"
|
|
@input="handleSearch(collectLevel)"
|
|
@select="handleSearch(collectLevel)"
|
|
/>
|
|
<treeselect
|
|
v-if="isTitleType !== 6"
|
|
v-model="query.archive_ctg_no"
|
|
:options="classifyOptions"
|
|
style="width: 160px;"
|
|
flat
|
|
:multiple="false"
|
|
:normalizer="normalizer"
|
|
placeholder="请选择档案分类"
|
|
@input="handleSearch(collectLevel)"
|
|
@select="handleSearch(collectLevel)"
|
|
/>
|
|
</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" @keyup.enter.native="handleSearch(collectLevel)" @clear="handleSearch(collectLevel)" />
|
|
<el-button class="filter-item filter-search" size="mini" type="success" icon="el-icon-search" @click="handleSearch(collectLevel)">搜索</el-button>
|
|
<el-button class="filter-item filter-refresh" size="mini" type="warning" icon="el-icon-refresh-left" @click="resetQuery">重置</el-button>
|
|
</div>
|
|
<div v-if="!isRecycle" class="collect-menu">
|
|
<el-menu
|
|
:default-active="activeMenuIndex"
|
|
mode="horizontal"
|
|
@select="handleSelect"
|
|
>
|
|
<el-submenu v-if="isTitleType !== 6" index="1">
|
|
<template slot="title">
|
|
<i class="iconfont icon-changgui" />
|
|
<span>常规</span>
|
|
</template>
|
|
<el-menu-item-group class="collect-submenu-group">
|
|
<el-menu-item v-if="isTitleType !== 6" index="1-1" @click="handleForm('edit')">编辑</el-menu-item>
|
|
</el-menu-item-group>
|
|
</el-submenu>
|
|
<el-submenu v-if="selectedCategory.isType === 2 && isTitleType !==4 && isTitleType !== 6" index="2">
|
|
<template slot="title">
|
|
<i class="iconfont icon-zhengli" />
|
|
<span>整理</span>
|
|
</template>
|
|
<el-menu-item-group class="collect-submenu-group">
|
|
<el-menu-item v-if="isTitleType === 3" index="2-1" @click="bindingTag(selections)">标签绑定</el-menu-item>
|
|
<el-menu-item-group v-if="isTitleType === 3" class="collect-submenu-group submenu-tree">
|
|
<template slot="title">档案装盒</template>
|
|
<el-menu-item index="2-2" @click="handlePackingBox(0)">装盒</el-menu-item>
|
|
<el-menu-item v-if="selectedCategory.arrangeType !== 1" index="2-3" @click="handlePackingBox(1)">分卷装盒</el-menu-item>
|
|
</el-menu-item-group>
|
|
<el-menu-item-group v-if="selectedCategory.isType === 2" class="collect-submenu-group submenu-tree">
|
|
<template slot="title">档案移交</template>
|
|
<el-menu-item index="2-4" @click="handleOnlineHandover">在线移交</el-menu-item>
|
|
<el-menu-item index="2-5" @click="handleOffLineHandover">离线移交</el-menu-item>
|
|
</el-menu-item-group>
|
|
<!-- <el-menu-item v-if="selectedCategory.isType === 2" index="2-6" @click="handleExportZip">导出ZIP包</el-menu-item> -->
|
|
<el-menu-item v-if="selectedCategory.arrangeType !== 3" index="2-7" @click="handleArcReturn">档案退回</el-menu-item>
|
|
<el-menu-item v-if="isTitleType === 3 " index="2-8" @click="handleJD(0)">开放审核</el-menu-item>
|
|
<el-menu-item v-if="isTitleType === 3 " index="2-9" @click="handleJD(1)">销毁鉴定</el-menu-item>
|
|
</el-menu-item-group>
|
|
</el-submenu>
|
|
<el-submenu v-if="isTitleType !== 6" index="3">
|
|
<template slot="title">
|
|
<i class="iconfont icon-gengduo" />
|
|
<span>更多</span>
|
|
</template>
|
|
<el-menu-item-group class="collect-submenu-group">
|
|
<el-menu-item v-if="isTitleType !== 6" index="3-1" @click="handleExport">导出</el-menu-item>
|
|
<el-menu-item v-if="isTitleType === 3" index="3-2" @click="handlePrint">打印</el-menu-item>
|
|
<el-menu-item v-if="isTitleType === 6" index="3-3" @click="handleOriginalDownload">下载</el-menu-item>
|
|
</el-menu-item-group>
|
|
</el-submenu>
|
|
</el-menu>
|
|
</div>
|
|
|
|
<div v-if="isRecycle && (isTitleType === 2 || (isTitleType === 3 && selectedCategory.arrangeType !== 3))" class="collect-menu">
|
|
<el-button class="filter-item" size="mini" type="success" @click="toRecover"><i class="iconfont icon-huifu" />恢复</el-button>
|
|
<el-button class="filter-item" size="mini" type="success" @click="toCompletelyDelete"><i class="iconfont icon-shanchu" />彻底删除</el-button>
|
|
<el-button class="filter-item" size="mini" type="success" :disabled="selections.length === 0" @click="handleExport"><i class="iconfont icon-daochu" />导出</el-button>
|
|
</div>
|
|
|
|
<!--新增 / 编辑 表单组件-->
|
|
<el-dialog class="preview-dialog" :modal-append-to-body="false" :close-on-click-modal="false" append-to-body :before-close="handleClose" :visible="formVisible" :title="formTitle">
|
|
<span class="dialog-right-top" />
|
|
<span class="dialog-left-bottom" />
|
|
<div class="setting-dialog">
|
|
<PreviewForm
|
|
v-if="formPreviewData.length"
|
|
ref="previewForm"
|
|
:is-has-code="true"
|
|
:is-disabled="false"
|
|
:form-preview-data.sync="formPreviewData"
|
|
:selected-category="selectedCategory"
|
|
:arc-id="arcId"
|
|
:is-des-form-type="isDesFormType"
|
|
:is-title-type="isTitleType"
|
|
:collect-level="collectLevel"
|
|
@close-dialog="closeDialog"
|
|
/>
|
|
<div slot="footer" class="dialog-footer">
|
|
<el-button type="primary" @click="handlerArchivesSubmit">保存</el-button>
|
|
</div>
|
|
</div>
|
|
</el-dialog>
|
|
|
|
<!-- 绑定标签 -->
|
|
<binding-tag-dlg ref="bindingTag" :binding-id="selections[0] && selections[0].id" :binding-type="1" binding-txt="档案" @close-dialog="closeDialog" />
|
|
<!-- 装盒 / 分卷装盒 -->
|
|
<PackingBox ref="packingBox" :selected-category="selectedCategory" :selections="selections" @close-dialog="closeDialog" />
|
|
<!-- 在线移交 -->
|
|
<OnlineHandover ref="onlineHandover" :selected-category="selectedCategory" :selections="selections" @close-dialog="closeDialog" />
|
|
<!-- 离线移交 -->
|
|
<OffLineHandover ref="offLineHandover" :selected-category="selectedCategory" :selections="selections" @close-dialog="closeDialog" />
|
|
<!-- 导出zip -->
|
|
<ExportZip ref="exportZip" :selected-category="selectedCategory" :selections="selections" @close-dialog="closeDialog" />
|
|
<!-- 开放审核 / 销毁鉴定 -->
|
|
<HandOverForm ref="formModule" :selected-category="selectedCategory" :selections="selections" @close-dialog="closeDialog" />
|
|
<!-- 打印 -->
|
|
<Print ref="printRef" :selected-category="selectedCategory" :collect-level="collectLevel" :selections="selections" @close-dialog="closeDialog" />
|
|
|
|
</div>
|
|
<div style="display: flex; justify-content: space-between; height: 30px; line-height: 30px; padding: 0 10px; ">
|
|
<span v-if="(isTitleType !== 2 && selectedCategory.arrangeType === 3 ) || ((isTitleType === 4 || isTitleType === 6) && selectedCategory.arrangeType === 2) || (isTitleType === 6 && selectedCategory.arrangeType === 1)" style="font-size: 12px;">{{ test }}</span>
|
|
<div v-if="isTitleType !== 2 && !isRecycle && isTitleType !== 6" class="mangement-fixed-top">
|
|
<el-checkbox v-model="parentsData.fixedStatusBar" @change="statusBarChecked">隐藏状态栏</el-checkbox>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
|
|
<script>
|
|
import CRUD, { crud } from '@crud/crud'
|
|
import { manageLibraryCrud } from '../mixins/index'
|
|
import { FetchInitCategoryInputFieldByPid } from '@/api/system/category/category'
|
|
import { FetchDetailsById, FetchCompleteDelArchives, FetchRestoreArchives } from '@/api/collect/collect'
|
|
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 PreviewForm from '@/views/components/category/PreviewForm'
|
|
import Print from './print/index'
|
|
import BindingTagDlg from '@/views/components/BindingTagDlg'
|
|
import PackingBox from './packingBox/index'
|
|
import OnlineHandover from './onlineHandover/index'
|
|
import OffLineHandover from './offLineHandover/index'
|
|
import ExportZip from './exportZip/index'
|
|
import HandOverForm from './handOverForm'
|
|
import qs from 'qs'
|
|
import { downloadFile, exportFile } from '@/utils/index'
|
|
import { mapGetters } from 'vuex'
|
|
|
|
export default {
|
|
name: 'CollectHeader',
|
|
components: { Treeselect, PreviewForm, BindingTagDlg, Print, PackingBox, OnlineHandover, OffLineHandover, ExportZip, HandOverForm },
|
|
mixins: [manageLibraryCrud, crud()],
|
|
props: {
|
|
selectedCategory: {
|
|
type: Object,
|
|
default: function() {
|
|
return {}
|
|
}
|
|
},
|
|
isTitleType: {
|
|
type: Number,
|
|
default: 2
|
|
},
|
|
test: {
|
|
type: String,
|
|
default: function() {
|
|
return ''
|
|
}
|
|
},
|
|
isRecycle: {
|
|
type: Boolean,
|
|
default: false
|
|
},
|
|
selections: {
|
|
type: Array,
|
|
default: function() {
|
|
return []
|
|
}
|
|
}
|
|
},
|
|
inject: ['parentsData'],
|
|
data() {
|
|
return {
|
|
statusOptions: [
|
|
{
|
|
value: '未装盒',
|
|
label: '未装盒'
|
|
},
|
|
{
|
|
value: '已装盒',
|
|
label: '已装盒'
|
|
},
|
|
{
|
|
value: '未入库',
|
|
label: '未入库'
|
|
},
|
|
{
|
|
value: '已入库',
|
|
label: '已入库'
|
|
},
|
|
{
|
|
value: '无实体',
|
|
label: '无实体'
|
|
},
|
|
{
|
|
value: '有实体',
|
|
label: '有实体'
|
|
},
|
|
{
|
|
value: '实体在库',
|
|
label: '实体在库'
|
|
},
|
|
{
|
|
value: '实体待借',
|
|
label: '实体待借'
|
|
},
|
|
{
|
|
value: '实体已借',
|
|
label: '实体已借'
|
|
}
|
|
],
|
|
selectStatus: null,
|
|
activeMenuIndex: '1',
|
|
formVisible: false,
|
|
formTitle: '项目',
|
|
formPreviewData: [], // 预览界面data
|
|
projectOptions: [],
|
|
classifyOptions: [],
|
|
isDesFormType: 'manageArcives', // 区分是门类得还是档案得
|
|
arcId: null
|
|
}
|
|
},
|
|
computed: {
|
|
...mapGetters([
|
|
'baseApi'
|
|
]),
|
|
collectTitle() {
|
|
if (this.isTitleType === 2) {
|
|
return '项目'
|
|
} else if (this.isTitleType === 3) {
|
|
if (this.selectedCategory.arrangeType === 1) {
|
|
return '文件'
|
|
} else {
|
|
return '案卷'
|
|
}
|
|
} else if (this.isTitleType === 4) {
|
|
return '卷内'
|
|
} else if (this.isTitleType === 6) {
|
|
return '原文'
|
|
}
|
|
return ''
|
|
},
|
|
collectLevel() {
|
|
if (this.isTitleType === 2) {
|
|
return 1
|
|
} else if (this.isTitleType === 3) {
|
|
if (this.selectedCategory.arrangeType === 1) {
|
|
return 3
|
|
} else {
|
|
return 2
|
|
}
|
|
} else if (this.isTitleType === 4) {
|
|
return 3
|
|
} else if (this.isTitleType === 6) {
|
|
return 4
|
|
}
|
|
return null
|
|
},
|
|
classType() {
|
|
if (this.isTitleType === 2) {
|
|
return ''
|
|
} else if (this.isTitleType === 3) {
|
|
return 'is-anjuan'
|
|
} else if (this.isTitleType === 4) {
|
|
return 'is-juannei'
|
|
} else if (this.isTitleType === 6) {
|
|
return 'is-file'
|
|
}
|
|
return ''
|
|
},
|
|
placeholderType() {
|
|
if (this.isTitleType === 2) {
|
|
return '输入项目名称或编号搜索'
|
|
} else if (this.isTitleType === 3 || this.isTitleType === 4) {
|
|
return '输入题名或档号搜索'
|
|
}
|
|
return '输入项目名称或编号搜索'
|
|
}
|
|
},
|
|
created() {
|
|
},
|
|
mounted() {
|
|
this.getInitArchivesClass()
|
|
this.getDictsList()
|
|
if (localStorage.getItem('statusBarFixedType') !== 'undefined') {
|
|
this.parentsData.fixedStatusBar = JSON.parse(localStorage.getItem('statusBarFixedType')) === true
|
|
}
|
|
},
|
|
methods: {
|
|
resetQuery() {
|
|
this.query = {
|
|
'search': null,
|
|
'project_class': null,
|
|
'archive_ctg_no': null
|
|
}
|
|
this.handleSearch(this.collectLevel)
|
|
},
|
|
// 筛选 - 档案分类
|
|
getInitArchivesClass() {
|
|
this.classifyOptions = []
|
|
this.query = {
|
|
'search': null,
|
|
'project_class': null,
|
|
'archive_ctg_no': null
|
|
}
|
|
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) => {
|
|
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) || node.childDictionarys === null) {
|
|
delete node.childDictionarys
|
|
}
|
|
return {
|
|
id: node.dictionaryName,
|
|
label: node.dictionaryName,
|
|
children: node.childDictionarys,
|
|
isDisabled: this.isTitleType === 3 ? node.level !== 3 : node.level === 1
|
|
}
|
|
},
|
|
handleSelect(key, keyPath) {
|
|
console.log(key, keyPath)
|
|
},
|
|
// 著录界面-form/详情-api
|
|
handleForm(type) {
|
|
if (type === 'add') {
|
|
this.formTitle = '新增' + this.collectTitle
|
|
this.arcId = null
|
|
} else if (type === 'edit') {
|
|
console.log(this.selections)
|
|
if (this.selections.length === 0) {
|
|
this.$message('您还未勾选需要操作的条目,请先确认!')
|
|
return false
|
|
} else if (this.selections.length > 1) {
|
|
this.$message('编辑操作只可勾选唯一目标条目,请先确认!')
|
|
return false
|
|
}
|
|
this.arcId = this.selections[0].id
|
|
this.formTitle = '编辑' + this.collectTitle
|
|
}
|
|
// this.form.dictionaryConfigId = {}
|
|
// this.formPreviewData = []
|
|
// 档案预编辑获取字段
|
|
this.formVisible = true
|
|
this.$nextTick(() => {
|
|
this.getFormInfo(type)
|
|
})
|
|
},
|
|
getFormInfo(type) {
|
|
if (type === 'edit') {
|
|
const params = {
|
|
'categoryId': this.selectedCategory.id,
|
|
'categoryLevel': this.collectLevel,
|
|
'id': this.arcId
|
|
}
|
|
FetchDetailsById(params).then(data => {
|
|
const showFiledAll = data.showFiled.filter(item => item.isSequence).sort((a, b) => a.isSequence - b.isSequence)
|
|
this.$nextTick(() => {
|
|
this.formPreviewData = showFiledAll
|
|
this.isDesFormType = 'manageArcives'
|
|
this.$nextTick(() => {
|
|
this.$refs.previewForm.archivesType = 'edit'
|
|
this.$refs.previewForm.addOrUpdateForm = data.echo
|
|
this.$refs.previewForm.FetchNoFormatField(this.selectedCategory.id)
|
|
})
|
|
})
|
|
})
|
|
} else {
|
|
const params = {
|
|
'categoryId': this.selectedCategory.id,
|
|
'categoryLevel': this.collectLevel
|
|
}
|
|
FetchInitCategoryInputFieldByPid(params).then(data => {
|
|
this.formPreviewData = data
|
|
this.isDesFormType = 'manageArcives'
|
|
this.$nextTick(() => {
|
|
this.$refs.previewForm.archivesType = 'add'
|
|
this.$refs.previewForm.FetchNoFormatField(this.selectedCategory.id)
|
|
})
|
|
})
|
|
}
|
|
},
|
|
// form - submit
|
|
handlerArchivesSubmit() {
|
|
this.$refs.previewForm.submitForm('addOrUpdateForm', this.selectedCategory.id,)
|
|
},
|
|
// 删除 - 关闭
|
|
handleClose(done) {
|
|
this.formVisible = false
|
|
done()
|
|
},
|
|
// 绑定标签
|
|
bindingTag(data) {
|
|
if (this.selections.length === 0) {
|
|
this.$message('您还未勾选需要操作的条目,请先确认!')
|
|
return false
|
|
}
|
|
if (this.selections.length > 1) {
|
|
this.$message('只可勾选唯一目标条目,请先确认!')
|
|
return false
|
|
}
|
|
|
|
if (data[0].tid) {
|
|
// this.$refs.bindingTag.isBinding = true
|
|
this.$refs.bindingTag.tidCode = data[0].tid
|
|
this.$confirm('当前标签已被绑定,是否覆盖' + '<span>你是否还要继续?</span>', '提示', {
|
|
confirmButtonText: '继续',
|
|
cancelButtonText: '取消',
|
|
type: 'warning',
|
|
dangerouslyUseHTMLString: true
|
|
}).then(() => {
|
|
this.$refs.bindingTag.bindingVisible = true
|
|
this.$refs.bindingTag.opened()
|
|
}).catch(() => {
|
|
})
|
|
} else {
|
|
this.$refs.bindingTag.bindingVisible = true
|
|
}
|
|
},
|
|
// 导出
|
|
handleExport() {
|
|
if (this.selections.length === 0) {
|
|
this.$message('您还未勾选需要操作的条目,请先确认!')
|
|
return false
|
|
}
|
|
this.$confirm('此操作将导出所选数据' + '<span>你是否还要继续?</span>', '提示', {
|
|
confirmButtonText: '继续',
|
|
cancelButtonText: '取消',
|
|
type: 'warning',
|
|
dangerouslyUseHTMLString: true
|
|
}).then(() => {
|
|
const archivesIds = []
|
|
this.selections.forEach(val => {
|
|
archivesIds.push(val.id)
|
|
})
|
|
const params = {
|
|
'categoryId': this.selectedCategory.id,
|
|
'categoryLevel': this.collectLevel,
|
|
'archivesIds': archivesIds
|
|
}
|
|
exportFile(this.baseApi + '/api/collect/exportDate?' + qs.stringify(params, { indices: false }))
|
|
}).catch(() => {
|
|
})
|
|
},
|
|
// 打印
|
|
handlePrint() {
|
|
if (this.selections.length === 0) {
|
|
this.$refs.printRef.form.printRange = '当页条目'
|
|
} else {
|
|
this.$refs.printRef.form.printRange = '勾选条目'
|
|
}
|
|
this.$refs.printRef.printVisible = true
|
|
},
|
|
// 原文内的附件下载
|
|
handleOriginalDownload() {
|
|
if (this.selections.length > 1 || this.selections.length === 0) {
|
|
this.$message('下载操作只可勾选唯一目标条目,请先确认!')
|
|
return false
|
|
}
|
|
const url = this.baseApi + '/downloadFile' + this.selections[0].file_path
|
|
fetch(url).then(res => res.blob()).then(blob => {
|
|
downloadFile(blob, this.selections[0].file_name.split('.')[0], this.selections[0].file_type)
|
|
}).catch(() => {
|
|
this.$message.error('下载文件失败!')
|
|
})
|
|
},
|
|
// 回收站 - 恢复
|
|
toRecover() {
|
|
if (this.selections.length === 0) {
|
|
this.$message('您还未勾选需要操作的条目,请先确认!')
|
|
return false
|
|
}
|
|
this.$confirm('此恢复将会把所选条目及其子集一并恢复' + '<span>你是否还要继续?</span>', '提示', {
|
|
confirmButtonText: '继续',
|
|
cancelButtonText: '取消',
|
|
type: 'warning',
|
|
dangerouslyUseHTMLString: true
|
|
}).then(() => {
|
|
const archivesIds = []
|
|
this.selections.forEach(val => {
|
|
archivesIds.push(val.id)
|
|
})
|
|
const params = {
|
|
'categoryId': this.selectedCategory.id,
|
|
'categoryLevel': this.collectLevel,
|
|
'archivesIds': archivesIds
|
|
}
|
|
FetchRestoreArchives(params).then((res) => {
|
|
if (res.code !== 500) {
|
|
console.log(res)
|
|
this.crud.notify(res, CRUD.NOTIFICATION_TYPE.SUCCESS)
|
|
this.handleSearch(this.collectLevel)
|
|
} else {
|
|
this.crud.notify('回复所选档案失败', CRUD.NOTIFICATION_TYPE.ERROR)
|
|
}
|
|
}).catch(err => {
|
|
console.log(err)
|
|
})
|
|
}).catch(() => {
|
|
})
|
|
},
|
|
// 回收站 - 彻底删除
|
|
toCompletelyDelete() {
|
|
if (this.selections.length === 0) {
|
|
this.$message('您还未勾选需要操作的条目,请先确认!')
|
|
return false
|
|
}
|
|
this.$confirm('此删除将把会所选条目与其子集彻底删除' + '<span>你是否还要继续?</span>', '提示', {
|
|
confirmButtonText: '继续',
|
|
cancelButtonText: '取消',
|
|
type: 'warning',
|
|
dangerouslyUseHTMLString: true
|
|
}).then(() => {
|
|
const archivesIds = []
|
|
this.selections.forEach(val => {
|
|
archivesIds.push(val.id)
|
|
})
|
|
const params = {
|
|
'categoryId': this.selectedCategory.id,
|
|
'categoryLevel': this.collectLevel,
|
|
'archivesIds': archivesIds
|
|
}
|
|
FetchCompleteDelArchives(params).then((res) => {
|
|
if (res.code !== 500) {
|
|
this.crud.notify(res, CRUD.NOTIFICATION_TYPE.SUCCESS)
|
|
this.handleSearch(this.collectLevel)
|
|
} else {
|
|
this.crud.notify('删除所选档案失败', CRUD.NOTIFICATION_TYPE.ERROR)
|
|
}
|
|
}).catch(err => {
|
|
console.log(err)
|
|
})
|
|
}).catch(() => {
|
|
})
|
|
},
|
|
// 装盒 / 分卷装盒
|
|
handlePackingBox(type) {
|
|
if (this.selections.length === 0) {
|
|
this.$message('您还未勾选需要操作的条目,请先确认!')
|
|
return false
|
|
}
|
|
// 后面与后端对接确定字段name
|
|
// const existsNotEmpty = this.selections.some(item => item.caseNum)
|
|
// if (existsNotEmpty) {
|
|
// this.$message('所选条目中存在已装盒档案,请勿重复操作!')
|
|
// return false
|
|
// }
|
|
this.$refs.packingBox.packingVisible = true
|
|
this.$refs.packingBox.isPackingOrPartType = type
|
|
if (type === 0) {
|
|
this.$refs.packingBox.packingTitle = '装盒'
|
|
} else {
|
|
this.$refs.packingBox.packingTitle = '分卷装盒'
|
|
}
|
|
},
|
|
// 在线移交
|
|
handleOnlineHandover() {
|
|
if (this.selections.length === 0) {
|
|
this.$message('您还未勾选需要操作的条目,请先确认!')
|
|
return false
|
|
}
|
|
this.$refs.onlineHandover.onlineHandoverVisible = true
|
|
},
|
|
// 离线移交
|
|
handleOffLineHandover() {
|
|
if (this.selections.length === 0) {
|
|
this.$message('您还未勾选需要操作的条目,请先确认!')
|
|
return false
|
|
}
|
|
this.$refs.offLineHandover.offLineHandoverVisible = true
|
|
},
|
|
// 导出zip包
|
|
handleExportZip() {
|
|
if (this.selections.length === 0) {
|
|
this.$message('您还未勾选需要操作的条目,请先确认!')
|
|
return false
|
|
}
|
|
this.$refs.exportZip.exportZipVisible = true
|
|
},
|
|
// 档案退回
|
|
handleArcReturn() {
|
|
if (this.selections.length === 0) {
|
|
this.$message('您还未勾选需要操作的条目,请先确认!')
|
|
return false
|
|
}
|
|
this.$confirm('此移出将把会所选条目退回到收集库' + '<span>你是否还要继续?</span>', '提示', {
|
|
confirmButtonText: '继续',
|
|
cancelButtonText: '取消',
|
|
type: 'warning',
|
|
dangerouslyUseHTMLString: true
|
|
}).then(() => {
|
|
console.log('subimit')
|
|
}).catch(() => {
|
|
})
|
|
},
|
|
// 开放审核 / 销毁鉴定
|
|
handleJD(type) {
|
|
if (type === 0) {
|
|
this.$refs.formModule.overDetialTitle = '开放审核-流程'
|
|
} else {
|
|
this.$refs.formModule.overDetialTitle = '销毁鉴定-流程'
|
|
}
|
|
this.$refs.formModule.overDetialVisible = true
|
|
},
|
|
closeDialog(data) {
|
|
this.formVisible = false
|
|
setTimeout(() => {
|
|
this.handleSearch(this.collectLevel)
|
|
})
|
|
}
|
|
}
|
|
}
|
|
</script>
|
|
|
|
<style lang='scss' scoped>
|
|
.collect-header{
|
|
border-top: none !important;
|
|
padding: 20px 0 0 0 !important;
|
|
}
|
|
.manage-fixed-style{
|
|
margin-bottom: 30px;
|
|
}
|
|
|
|
</style>
|