|
|
<template> <div> <div class="collect-header"> <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" @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">重置</el-button> </div> <div v-if="!isRecycle" class="collect-menu"> <el-menu :default-active="activeMenuIndex" mode="horizontal" @select="handleSelect" > <el-submenu 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('add')">新增</el-menu-item> <el-menu-item v-if="isTitleType !== 6" index="1-2" @click="handleForm('edit')">编辑</el-menu-item> <el-menu-item v-if="isTitleType !== 4" index="1-3" @click="toDelete">删除</el-menu-item> <el-menu-item v-if="isTitleType === 4" index="1-4" @click="toMove">移出</el-menu-item> </el-menu-item-group> <el-menu-item-group v-if="(isTitleType === 3 && selectedCategory.arrangeType === 1) || isTitleType === 4 || isTitleType === 6 || (isTitleType === 3 && activeIndex === 1)" class="collect-submenu-group submenu-tree"> <template slot="title">原文上传</template> <el-menu-item index="1-5" @click="fileUpload(0)">普通上传</el-menu-item> <el-menu-item index="1-6" @click="fileUpload(1)">大文件上传</el-menu-item> </el-menu-item-group> </el-submenu> <el-submenu v-if="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 !== 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 === 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-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> <!-- 案卷 / 卷内 / 文件 --> <el-menu-item v-if="isTitleType !== 2" index="2-9" @click="handleCollectMoveFile">移动</el-menu-item> <!-- 案卷 --> <el-menu-item v-if="isTitleType === 3 && activeIndex === 0" index="2-10" @click="handleFiling">归档</el-menu-item> <!-- 文件 --> <el-menu-item v-if="(isTitleType === 3 && selectedCategory.arrangeType === 1) || (isTitleType === 3 && activeIndex === 1)" index="2-11" @click="handleReturn">退回预归档库</el-menu-item> </el-menu-item-group> <el-menu-item-group v-if="isTitleType === 3 && activeIndex === 1 && selectedCategory.arrangeType !== 1" class="collect-submenu-group submenu-tree"> <template slot="title">组卷</template> <el-menu-item index="2-12" @click="handleQuickPaper">快速组卷</el-menu-item> <el-menu-item index="2-13" @click="handlePaper">手工组卷</el-menu-item> </el-menu-item-group> </el-submenu> <el-submenu 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 && (selectedCategory.arrangeType === 3 || selectedCategory.arrangeType === 2) && activeIndex === 1) && (isTitleType !== 2 && isTitleType !== 6)" index="3-2" @click="handlePrint">打印</el-menu-item> <el-menu-item v-if="!(isTitleType === 3 && (selectedCategory.arrangeType === 3 || selectedCategory.arrangeType === 2) && activeIndex === 1) && (isTitleType !== 2 && isTitleType !== 6)" index="3-3" @click="handleFourTest">四性检测</el-menu-item> <el-menu-item v-if="isTitleType === 6" index="3-4" @click="handleOriginalDownload">下载</el-menu-item> </el-menu-item-group> <el-menu-item-group v-if="!(isTitleType === 3 && (selectedCategory.arrangeType === 3 || selectedCategory.arrangeType === 2) && activeIndex === 1) && (isTitleType !== 2 && isTitleType !== 6)" class="collect-submenu-group submenu-tree"> <template slot="title">电子文件目录</template> <el-menu-item index="3-5" @click="handleCatalogDownload">目录下载</el-menu-item> <el-menu-item index="3-6" @click="fileUpload(2)">目录上传</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> </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"> <!-- form @emitTableList="getTableList" --> <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>
<!--删除对话框组件--> <el-dialog class="tip-dialog" title="提示" :close-on-click-modal="false" :modal-append-to-body="false" append-to-body :visible.sync="deleteVisible"> <div class="setting-dialog"> <div class="tip-content"> <p class="tipMsg">此删除将把会所选条目与其子集放入回收站</p> <span>你是否还要继续?</span> </div> <div slot="footer" class="dialog-footer"> <el-button type="text" @click="deleteVisible = false">取消</el-button> <el-button type="primary" @click.native="handleDelConfirm">确定</el-button> </div> </div> </el-dialog>
<!--卷内移出 组件--> <el-dialog class="tip-dialog" title="提示" :close-on-click-modal="false" :modal-append-to-body="false" append-to-body :visible.sync="moveVisible"> <div class="setting-dialog"> <div class="tip-content"> <p class="tipMsg">此移出将把会所选条目返还到未整理列表</p> <span>你是否还要继续?</span> </div> <div slot="footer" class="dialog-footer"> <el-button type="text" @click="moveVisible = false">取消</el-button> <el-button type="primary" @click.native="handleMoveConfirm">确定</el-button> </div> </div> </el-dialog>
<!-- 原文上传 --> <UploadOriginal ref="uploadOriginalRef" /> <!-- 批量导入 --> <BlukImport ref="blukImportRef" /> <!-- 批量修改 --> <BlukEditing ref="blukEditingRef" /> <!-- 档案调整 --> <FileNumberAdjustment ref="fileNumberAdjustmentRef" :selected-category="selectedCategory" />
<!-- 档号更新 --> <el-dialog class="tip-dialog" title="档号更新" :close-on-click-modal="false" :modal-append-to-body="false" append-to-body :visible.sync="updateVisible"> <div class="setting-dialog"> <div class="tip-content"> <p class="tipMsg">此操作将会自动重新生成档号</p> <span>你是否还要继续?</span> </div> <div slot="footer" class="dialog-footer"> <el-button type="text" @click="updateVisible = false">取消</el-button> <el-button type="primary" @click.native="handleUpdateConfirm">确定</el-button> </div> </div> </el-dialog>
<!-- 卷内顺序调整 --> <FileSeqAdjustment ref="fileSeqAdjustmentRef" :selected-category="selectedCategory" />
<!-- 拆卷 --> <el-dialog class="tip-dialog" title="拆卷" :close-on-click-modal="false" :modal-append-to-body="false" append-to-body :visible.sync="uncoilVisible"> <div class="setting-dialog"> <div class="tip-content"> <p class="tipMsg">拆卷之后,对应的案卷数据将会自动删除</p> <span>你是否还要继续?</span> </div> <div slot="footer" class="dialog-footer"> <el-button type="text" @click="uncoilVisible = false">取消</el-button> <el-button type="primary" @click.native="handleUncoilConfirm">确定</el-button> </div> </div> </el-dialog>
<!-- 合卷 --> <CombineFile ref="combineFileRef" /> <!-- 插件 --> <InsertFile ref="insertFileRef" /> <!-- 移动 --> <CollectMoveFile ref="collectMoveFileRef" />
<!-- 归档 --> <el-dialog class="tip-dialog" title="归档" :close-on-click-modal="false" :modal-append-to-body="false" append-to-body :visible.sync="filingVisible"> <div class="setting-dialog"> <div class="tip-content"> <p class="tipMsg">此操作将会把所选条目提交归档</p> <span>你是否还要继续?</span> </div> <div slot="footer" class="dialog-footer"> <el-button type="text" @click="filingVisible = false">取消</el-button> <el-button type="primary" @click.native="handleFilingConfirm">确定</el-button> </div> </div> </el-dialog>
<!-- 退回预归档库 --> <el-dialog class="tip-dialog" title="退回预归档库" :close-on-click-modal="false" :modal-append-to-body="false" append-to-body :visible.sync="returnVisible"> <div class="setting-dialog"> <div class="tip-content"> <p class="tipMsg">此移出将把会所选条目退回到预归档库</p> <span>你是否还要继续?</span> </div> <div slot="footer" class="dialog-footer"> <el-button type="text" @click="returnVisible = false">取消</el-button> <el-button type="primary" @click.native="handleReturnConfirm">确定</el-button> </div> </div> </el-dialog>
<!-- 导出 --> <el-dialog class="tip-dialog" title="导出" :close-on-click-modal="false" :modal-append-to-body="false" append-to-body :visible.sync="exportVisible"> <div class="setting-dialog"> <div class="tip-content"> <p class="tipMsg">此操作将导出所选数据</p> <span>你是否还要继续?</span> </div> <div slot="footer" class="dialog-footer"> <el-button type="text" @click="downloadVisible = false">取消</el-button> <el-button v-loading="delAllLoading" type="primary" @click.native="handleExportConfirm">确定</el-button> </div> </div> </el-dialog>
<!-- 打印 --> <Print ref="printRef" /> <!-- 四性检测 --> <FourTest ref="fourTestRef" />
<!-- 目录下载 --> <el-dialog class="tip-dialog" title="目录下载" :close-on-click-modal="false" :modal-append-to-body="false" append-to-body :visible.sync="downloadVisible"> <div class="setting-dialog"> <div class="tip-content"> <p class="tipMsg">此操作将下载所选条目目录</p> <span>你是否还要继续?</span> </div> <div slot="footer" class="dialog-footer"> <el-button type="text" @click="downloadVisible = false">取消</el-button> <el-button type="primary" @click.native="handleCatDownloadConfirm">确定</el-button> </div> </div> </el-dialog>
<!-- 快速组卷 --> <QuickPaper ref="quickPaperRef" />
<!-- 回收站 - 恢复 --> <el-dialog class="tip-dialog" title="提示" :close-on-click-modal="false" :modal-append-to-body="false" append-to-body :visible.sync="recoverVisible"> <div class="setting-dialog"> <div class="tip-content"> <p class="tipMsg">此恢复将会把所选条目及其子集一并恢复</p> <span>你是否还要继续?</span> </div> <div slot="footer" class="dialog-footer"> <el-button type="text" @click="recoverVisible = false">取消</el-button> <el-button type="primary" @click.native="handleRecover">确定</el-button> </div> </div> </el-dialog>
<!-- 回收站 - 彻底删除 --> <el-dialog class="tip-dialog" title="提示" :close-on-click-modal="false" :modal-append-to-body="false" append-to-body :visible.sync="completelyDeleteVisible"> <div class="setting-dialog"> <div class="tip-content"> <p class="tipMsg">此删除将把会所选条目与其子集彻底删除</p> <span>你是否还要继续?</span> </div> <div slot="footer" class="dialog-footer"> <el-button type="text" @click="completelyDeleteVisible = false">取消</el-button> <el-button type="primary" @click.native="handleCompletelyDelete">确定</el-button> </div> </div> </el-dialog> </div> <div style="height: 30px; line-height: 30px; padding: 0 20px; font-size: 12px;"> <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 CRUD, { crud } from '@crud/crud' import { collectionLibraryCrud } from '../mixins/index' import { FetchInitCategoryInputFieldByPid } from '@/api/system/category/category' import { FetchDetailsById, collectDel, FetchRemoveArchivesSingle } 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 { LOAD_CHILDREN_OPTIONS } from '@riophae/vue-treeselect'
import PreviewForm from '@/views/components/category/PreviewForm' import UploadOriginal from './uploadOriginal/index' import BlukImport from './bulkImport/index' import BlukEditing from './blukEditing/index' import FileNumberAdjustment from './fileNumberAdjustment/index' import FileSeqAdjustment from './fileSeqAdjustment/index' import CombineFile from './combineFile/index' import InsertFile from './insertFile/index' import CollectMoveFile from './collectMoveFile/index' import Print from './print/index' import FourTest from './fourTest/index' import QuickPaper from './quickPaper/index' // import { exportFile } from '@/utils/index'
import { mapGetters } from 'vuex'
export default { name: 'CollectHeader', components: { Treeselect, PreviewForm, UploadOriginal, BlukImport, BlukEditing, FileNumberAdjustment, FileSeqAdjustment, CombineFile, InsertFile, CollectMoveFile, Print, FourTest, QuickPaper }, mixins: [collectionLibraryCrud, crud()], props: { selectedCategory: { type: Object, default: function() { return {} } }, isTitleType: { type: Number, default: 2 }, selections: { type: Array, default: () => [] }, activeIndex: { type: Number, default: 0 }, test: { type: String, default: function() { return '' } }, isRecycle: { type: Boolean, default: false } }, inject: ['parentsData'], data() { return { activeMenuIndex: '1', formVisible: false, formTitle: '项目', formPreviewData: [], // 预览界面data
query: { projectClass: null, classify: null }, projectOptions: [], classifyOptions: [], delAllLoading: false, deleteVisible: false, moveVisible: false, updateVisible: false, uncoilVisible: false, filingVisible: false, exportVisible: false, returnVisible: false, downloadVisible: false, recoverVisible: false, completelyDeleteVisible: false, isDesFormType: 'arcives', // 区分是门类得还是档案得
arcId: null } }, computed: { ...mapGetters([ 'baseApi' ]), collectTitle() { if (this.isTitleType === 2) { return '项目' } else if (this.isTitleType === 3) { if (this.selectedCategory.arrangeType === 1) { return '文件' } else { if (this.activeIndex === 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 { if (this.activeIndex === 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 '输入项目名称或编号' } }, watch: { selectedCategory: function(newValue, oldValue) { if (newValue && newValue.id) { this.getInitArchivesClass() this.getDictsList() } }, isTitleType: function(newValue, oldValue) { console.log('newValue', newValue) } }, 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) => { 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.dictionaryCode, 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) this.arcId = this.selections[0].id if (this.selections.length === 0) { this.$message('您还未勾选需要操作的条目,请先确认!') return false } else if (this.selections.length > 1) { this.$message('编辑操作只可勾选唯一目标条目,请先确认!') return false } 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 = 'arcives' 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 = 'arcives' 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() }, // 删除
toDelete() { if (this.selections.length === 0) { this.$message('您还未勾选需要操作的条目,请先确认!') return false } this.deleteVisible = true }, // 卷内 - 移除
toMove() { if (this.selections.length === 0) { this.$message('您还未勾选需要操作的条目,请先确认!') return false } this.moveVisible = true }, // 删除 - 确认
handleDelConfirm() { this.delAllLoading = true const archivesIds = [] this.selections.forEach(val => { archivesIds.push(val.id) }) const params = { 'categoryId': this.selectedCategory.id, 'categoryLevel': this.collectLevel, 'archivesIds': archivesIds } console.log(params) collectDel(params).then(() => { this.crud.notify('删除成功', CRUD.NOTIFICATION_TYPE.SUCCESS) this.deleteVisible = false this.crud.refresh() this.delAllLoading = false }).catch(err => { this.delAllLoading = false console.log(err) }) }, // 卷内 - 移除 确认
handleMoveConfirm() { const archivesIds = [] this.selections.forEach(val => { archivesIds.push(val.id) }) const params = { 'categoryId': this.selectedCategory.id, 'categoryLevel': this.collectLevel, 'archivesIds': archivesIds, 'parentsId': this.parentsData.parentsAnjuanId } console.log(params) FetchRemoveArchivesSingle(params).then((res) => { console.log(res) if (res.code !== 500) { this.crud.notify('移出成功', CRUD.NOTIFICATION_TYPE.SUCCESS) this.handleSearch(this.collectLevel) } else { this.crud.notify('移出失败', CRUD.NOTIFICATION_TYPE.SUCCESS) } this.moveVisible = false }).catch(err => { console.log(err) }) }, // 原文上传
fileUpload(uploadType) { if (this.isTitleType !== 6) { if (this.selections.length === 0) { this.$message('您还未勾选需要操作的条目,请先确认!') return false } if (this.selections.length > 1) { this.$message('上传操作只可勾选唯一目标条目,请先确认!') return false } }
if (uploadType === 0) { this.$refs.uploadOriginalRef.uploadTitle = '普通上传' } else if (uploadType === 1) { this.$refs.uploadOriginalRef.uploadTitle = '大文件上传' } else if (uploadType === 2) { this.$refs.uploadOriginalRef.uploadTitle = '原文目录上传' } this.$refs.uploadOriginalRef.uploadVisible = true this.$refs.uploadOriginalRef.uploadType = uploadType this.$refs.uploadOriginalRef.fileList = [] }, // 批量导入
handleBlukImport() { this.$refs.blukImportRef.bulkImportVisible = true }, // 批量修改
handleBlukEditing() { if (this.selections.length === 0) { this.$message('您还未勾选需要操作的条目,请先确认!') return false } this.$refs.blukEditingRef.bulkEditingVisible = 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() { if (this.selections.length === 0) { this.$message('您还未勾选需要操作的条目,请先确认!') return false } this.updateVisible = true }, handleUpdateConfirm() { this.updateVisible = false }, // 拆卷
handleUncoil() { if (this.selections.length === 0) { this.$message('您还未勾选需要操作的条目,请先确认!') return false } this.uncoilVisible = true }, handleUncoilConfirm() { this.uncoilVisible = false }, // 合卷
handleCombineFile() { if (this.selections.length < 2) { this.$message('合卷操作至少勾选2个案卷,请重试!') return false } this.$refs.combineFileRef.combineFileVisible = true }, // 插件
handleInsertFile() { if (this.selections.length !== 1) { this.$message('插卷操作只可勾选唯一目标条目,请先确认!') return false } this.$refs.insertFileRef.insertFileVisible = true }, // 移动
handleCollectMoveFile() { if (this.selections.length === 0) { this.$message('您还未勾选需要操作的条目,请先确认!') return false } this.$refs.collectMoveFileRef.collectMoveFileVisible = true }, // 归档
handleFiling() { if (this.selections.length === 0) { this.$message('您还未勾选需要操作的条目,请先确认!') return false } this.filingVisible = true }, handleFilingConfirm() { this.filingVisible = false }, // 退回预归档库
handleReturn() { if (this.selections.length > 1 || this.selections.length === 0) { this.$message('该操作只可勾选唯一目标条目,请先确认!') return false } this.returnVisible = true }, handleReturnConfirm() { this.returnVisible = false }, // 导出
handleExport() { this.exportVisible = true }, handleExportConfirm() { this.exportVisible = false }, // 打印
handlePrint() { if (this.selections.length === 0) { this.$refs.printRef.form.printRange = '当页条目' } else { this.$refs.printRef.form.printRange = '勾选条目' } this.$refs.printRef.printVisible = true }, // 四性检测
handleFourTest() { if (this.selections.length === 0) { this.$message('您还未勾选需要操作的条目,请先确认!') return false } this.$refs.fourTestRef.fourTestVisible = true this.$refs.fourTestRef.tableData = this.selections }, // 目录下载
handleCatalogDownload() { if (this.selections.length === 0) { this.$message('您还未勾选需要操作的条目,请先确认!') return false } this.downloadVisible = true }, handleCatDownloadConfirm() { // const params = {
// 'orderNo': id
// }
// exportFile(this.baseApi + '/api/arrange/exportArrange?' + qs.stringify(params, { indices: false }))
this.downloadVisible = false }, // 快速组卷
handleQuickPaper() { this.$refs.quickPaperRef.quickVisible = true }, // 手工组卷
handlePaper() { if (this.selections.length === 0) { this.$message('您还未勾选需要操作的条目,请先确认!') return false } this.handleForm('add') }, // 原文内的附件下载
handleOriginalDownload() { if (this.selections.length > 1 || this.selections.length === 0) { this.$message('下载操作只可勾选唯一目标条目,请先确认!') return false } }, // 回收站 - 恢复
toRecover() { if (this.selections.length === 0) { this.$message('您还未勾选需要操作的条目,请先确认!') return false } this.recoverVisible = true }, handleRecover() { this.recoverVisible = false }, // 回收站 - 彻底删除
toCompletelyDelete() { if (this.selections.length === 0) { this.$message('您还未勾选需要操作的条目,请先确认!') return false } this.completelyDeleteVisible = true }, handleCompletelyDelete() { this.completelyDeleteVisible = false }, closeDialog(data) { this.formVisible = false this.$parent.$parent.getTableDisplayFieldsLoading = true setTimeout(() => { this.getViewTableList(this.collectLevel, 'search', data) }) console.log('this', this) } } } </script>
<style lang='scss' scoped> </style>
|