Browse Source

档案管理

master
xuhuajiao 3 years ago
parent
commit
5009d611f6
  1. 1
      src/utils/upload.js
  2. 145
      src/views/archivesManage/archivesList/archivesAnjuan/index.vue
  3. 477
      src/views/archivesManage/archivesList/archivesDetail.vue
  4. 141
      src/views/archivesManage/archivesList/archivesJuannei/index.vue
  5. 138
      src/views/archivesManage/archivesList/archivesProject/index.vue
  6. 6
      src/views/archivesManage/archivesList/index.vue
  7. 41
      src/views/archivesManage/archivesList/module/archivesInfo/index.vue
  8. 110
      src/views/archivesManage/archivesList/module/deltArchives/index.vue
  9. 86
      src/views/archivesManage/archivesList/module/restoreArchives/index.vue
  10. 4
      src/views/archivesManage/caseManage/caseList/index.vue

1
src/utils/upload.js

@ -10,6 +10,7 @@ export function upload(api, file) {
return axios.post(api, data, config)
}
// 档案上传附件
export function archivesUpload(api, file, categoryId) {
var data = new FormData()
data.append('file', file)

145
src/views/archivesManage/archivesList/module/archivesAnjuan/index.vue → src/views/archivesManage/archivesList/archivesAnjuan/index.vue

@ -65,23 +65,6 @@
</div>
</el-dialog>
<!-- 删除档案 -->
<el-dialog title="删除档案" :visible.sync="deleteVisible" :close-on-click-modal="false" :before-close="handleClose">
<span class="dialog-right-top" />
<span class="dialog-left-bottom" />
<div class="setting-dialog">
<div class="dialog-delt">
<p><span>确定删除当前档案吗</span></p>
<p v-if="selectedCategory.isType !== 5">数据来源案卷 {{ selections.length }} 条数据 卷内 {{ totalSumAll }} 条数据</p>
<p v-else>数据来源文件 {{ selections.length }} 条数据 附件 {{ totalSumAll }} 条数据</p>
<p class="delt-tip"><span>提示如果删除当前档案此档案内所附带的文件会一并删除</span></p>
</div>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click.native="handleDeltConfirm">确定</el-button>
</div>
</div>
</el-dialog>
<!-- table表格渲染 -->
<!-- height="calc(100vh - 350px)" -->
<el-card class="box-card" shadow="never">
@ -156,9 +139,6 @@
/>
</el-card>
<!-- 档案详情 -->
<ArchivesInfo ref="archivesInfo" :archives-details-data="archivesDetailsData" :archives-details-metadata.sync="archivesDetailsMetadata" :category-id="categoryId" :arc-id="arcId" />
<!-- 上传附件 -->
<el-dialog class="upload-dialog" :modal-append-to-body="false" :close-on-click-modal="false" :before-close="handleClose" :visible.sync="uploadFileVisible" title="上传附件">
<span class="dialog-right-top" />
@ -168,11 +148,17 @@
</div>
</el-dialog>
<!-- 档案详情 -->
<ArchivesInfo ref="archivesInfo" :category-id="categoryId" :arc-id="arcId" />
<!-- 装盒 -->
<Packing ref="packing" />
<!-- 绑定标签 -->
<!-- <Binding ref="bind" :is-binding="isBinding" /> -->
<binding-tag-dlg ref="bindingTag" :binding-id="crud.selections[0] && crud.selections[0].id" :binding-type="1" binding-txt="档案" @refresh="crud.refresh" />
<!-- 还原 -->
<RestoreArchives ref="restore" :selections="selections" :category-id="categoryId" />
<!-- 删除档案 -->
<DeltArchives ref="deltArchives" :selections="selections" :category-id="categoryId" :total-sum-all="totalSumAll" />
<!-- 借阅 -->
<el-dialog title="借阅" :visible.sync="lengingVisible" :close-on-click-modal="false" :before-close="handleClose">
<span class="dialog-right-top" />
@ -186,37 +172,26 @@
</div>
</div>
</el-dialog>
<!-- 回收站-还原 -->
<el-dialog title="确认还原" :visible.sync="restoreVisible" :close-on-click-modal="false" :before-close="handleClose">
<span class="dialog-right-top" />
<span class="dialog-left-bottom" />
<div class="setting-dialog">
<div class="dialog-delt">
<p><span>确定将当前选择的档案数据进行还原?</span></p>
</div>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click.native="handleRestoreConfirm">确定</el-button>
</div>
</div>
</el-dialog>
</div>
</template>
<script>
import qs from 'qs'
import { del, FetchTableDisplayFields, FetchInitArchivesView, FetchFormDisplayFields, FetchArchivesDetails, FetchArchivesMetadata, FetchCompletelyDelete, FetchReduction } from '@/api/archivesManage/archivesList'
import { FetchTableDisplayFields, FetchInitArchivesView, FetchFormDisplayFields } from '@/api/archivesManage/archivesList'
import { header, form } from '@crud/crud'
import { mapGetters } from 'vuex'
import { exportFile } from '@/utils/index'
import PreviewForm from '@/views/components/category/PreviewForm'
import ArchivesInfo from '../archivesInfo/index'
import Packing from '../packing/index'
import ArchivesInfo from '../module/archivesInfo/index'
import Packing from '../module/packing/index'
import BindingTagDlg from '@/views/components/BindingTagDlg'
import UploadFile from '../uploadFile/index'
import UploadFile from '../module/uploadFile/index'
import RestoreArchives from '../module/restoreArchives/index'
import DeltArchives from '../module/deltArchives/index'
export default {
name: 'ArchivesAnjuan',
components: { PreviewForm, ArchivesInfo, Packing, BindingTagDlg, UploadFile },
components: { PreviewForm, ArchivesInfo, Packing, BindingTagDlg, UploadFile, RestoreArchives, DeltArchives },
mixins: [
header(),
form({})
@ -246,7 +221,7 @@ export default {
},
fixedStatusBar: {
type: Boolean,
default: false
default: true
},
smartQuery: {
type: Object,
@ -296,23 +271,16 @@ export default {
{ value: 'archiveNo', label: '档号' }
],
anjuanInputSelect: '',
deleteVisible: false, // dialog
deleteData: {}, // data
totalSumAll: 0, //
arrySort: [], // sort-query
selections: [], // table
categoryId: null, // 使
parentsId: null, // id
arcId: null, // ID
uploadFileVisible: false, //
archivesInfoVisible: false, //
lengingVisible: false, //
isBinding: false, //
isAnjuan: true, // -/
yearGroup: [], // -
archivesDetailsData: [], // data -
archivesDetailsMetadata: '', // data -
restoreVisible: false
isAnjuan: true, // -/
uploadFileVisible: false, //
lengingVisible: false //
}
},
computed: {
@ -357,12 +325,10 @@ export default {
} else {
this.parentsId = null
}
console.log(this.parentsId)
const params = {
'categoryId': this.categoryId,
'parentsId': this.parentsId
}
console.log(params)
exportFile(this.baseApi + '/api/archives/exportArchives?' + qs.stringify(params))
this.crud.downloadLoading = false
},
@ -496,20 +462,11 @@ export default {
} else {
this.$refs.archivesInfo.isHasFile = true
}
this.arcId = row.id
this.$refs.archivesInfo.detailTitle = '档案详情'
this.$refs.archivesInfo.archivesInfoVisible = true
this.$refs.archivesInfo.archivesTabIndex = 0
const params = {
categoryId: this.categoryId,
archivesId: row.id
}
FetchArchivesDetails(params).then(data => {
this.archivesDetailsData = data
})
FetchArchivesMetadata(params).then(data => {
this.archivesDetailsMetadata = data
})
this.arcId = row.id
this.$refs.archivesInfo.getDetial(row.id)
},
// table - row
clickRowHandler(row) {
@ -530,8 +487,7 @@ export default {
},
//
toDelete(data) {
this.deleteData = data
this.deleteVisible = true
this.$refs.deltArchives.deleteVisible = true
this.getTotalSumAll()
},
getTotalSumAll() {
@ -542,43 +498,9 @@ export default {
}
return this.totalSumAll
},
//
handleDeltConfirm() {
this.deleteVisible = false
this.crud.delAllLoading = true
// this.crud.doDelete(this.deleteData)
const ids = []
this.deleteData.forEach(val => {
ids.push(val.id)
})
const params = {
'ids': ids,
'categoryId': this.categoryId
}
// fetch
if (!this.recycleMain.isRecycle) {
del(params).then(res => {
this.crud.delAllLoading = false
this.$message.success('删除成功!')
this.selections = []
this.getTableList()
this.crud.refresh()
})
} else {
FetchCompletelyDelete(params).then(res => {
this.crud.delAllLoading = false
this.$message.success('删除成功!')
this.selections = []
this.getTableList()
this.crud.refresh()
})
}
},
// -
handleClose(done) {
this.formVisible = false
this.restoreVisible = false
this.deleteData = {}
done()
},
/* 重新渲染table组件 防止table-fixed 错位 配合watch-table数据 */
@ -598,30 +520,7 @@ export default {
},
//
handleRestore() {
this.restoreVisible = true
},
handleRestoreConfirm() {
const ids = []
this.selections.forEach(val => {
ids.push(val.id)
})
const params = {
'ids': ids,
'categoryId': this.categoryId
}
FetchReduction(params).then(data => {
if (data === 0) {
this.$message.error('还原失败!')
} else if (this.selections.length === data) {
this.$message.success('还原成功!')
} else if (this.selections.length > data) {
this.$message.success('部分档案还原成功!')
}
this.selections = []
this.getTableList()
this.restoreVisible = false
this.crud.refresh()
})
this.$refs.restore.restoreVisible = true
},
//
bindingTag(data) {

477
src/views/archivesManage/archivesList/archivesDetail.vue

@ -1,477 +0,0 @@
<template>
<div>
<!--工具栏-->
<div class="head-container head-archives">
<crudOperation :permission="permission">
<template v-slot:left>
<!-- 新增 -->
<el-button v-if="selectedCategory.isType !== 4" v-permission="permission.add" :disabled="selectedCategory.isType === 3 && isJuannei" size="mini" icon="el-icon-plus" @click="crud.toAdd">新增</el-button>
</template>
<template v-slot:right>
<!-- 删除btn 多选 -->
<el-button v-permission="permission.del" icon="el-icon-delete" size="mini" :loading="crud.delAllLoading" :disabled="crud.selections.length === 0" @click="toDelete(crud.selections)">删除</el-button>
<!-- 导出btn :disabled="!crud.data.length" -->
<el-button v-if="selectedCategory.isType !== 1 && selectedCategory.isType !== 2" v-permission="permission.download" :loading="crud.downloadLoading" size="mini" icon="el-icon-download" @click="doExport">导出</el-button>
<!-- 上传附件btn 针对卷内/文件 单选 -->
<el-button v-if="selectedCategory.isType === 4 || selectedCategory.isType === 5" :disabled="crud.selections.length !== 1" size="mini" icon="el-icon-download" @click="uploadFile">上传附件</el-button>
<div class="head-search">
<!-- 搜索 -->
<el-select v-if="selectedCategory.isType === 3 || selectedCategory.isType === 5" v-model="query.enabled" clearable size="small" placeholder="状态" class="filter-item" style="width: 100px" @change="crud.toQuery">
<i slot="prefix" class="iconfont icon-zhuangtai-fanbai" />
<el-option v-for="item in stateOptions" :key="item.key" :label="item.label" :value="item.key" />
</el-select>
<el-input v-model="query[inputSelect]" clearable size="small" placeholder="请输入关键词" style="width: 200px;" class="input-prepend filter-item" @keyup.enter.native="crud.toQuery">
<el-select slot="prepend" v-model="inputSelect" style="width: 80px" @change="querySelect">
<el-option
v-for="item in queryOption"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
</el-input>
<rrOperation />
</div>
</template>
<template v-slot:rightButtonGroup>
<div v-if="selectedCategory.isType === 5 || !isJuannei" class="archives-handler-btn">
<!-- 装盒btn 多选 -->
<el-button class="packing-btn iconfont icon-weibiaoti-2" type="primary" :disabled="crud.selections.length === 0" @click="handlePacking(crud.selections)">装盒</el-button>
<!-- 分卷装盒btn 针对案卷-单选 -->
<el-button v-if="selectedCategory.isType === 3" class="part-btn iconfont icon-weibiaoti-2" type="primary" :disabled="crud.selections.length !== 1" @click="handlePacking(crud.selections)">分卷装盒</el-button>
<!-- <el-button class="warehousing-btn iconfont icon-weibiaoti-2" type="primary">入库</el-button> -->
<!-- 借阅btn 多选 -->
<el-button class="lending-btn iconfont icon-weibiaoti-2" :disabled="crud.selections.length === 0" type="primary" @click="lengingVisible=true">借阅</el-button>
<!-- 绑定标签btn 单选 -->
<el-button class="binding-btn iconfont icon-weibiaoti-2" type="primary" :disabled="crud.selections.length !== 1" @click="handleBinding(crud.selections)">绑定标签</el-button>
</div>
</template>
</crudOperation>
</div>
<!--新增 / 编辑 表单组件-->
<el-dialog class="preview-dialog" :modal-append-to-body="false" :close-on-click-modal="false" :before-close="crud.cancelCU" :visible="crud.status.cu > 0" :title="crud.status.title">
<span class="dialog-right-top" />
<span class="dialog-left-bottom" />
<div class="setting-dialog">
<!-- form -->
<PreviewForm v-if="formPreviewData.length && archivesTabIndex == 0" ref="previewForm" :is-disabled="false" :form-preview-data.sync="formPreviewData" :selected-category="selectedCategory" :arc-id="arcId" />
<div slot="footer" class="dialog-footer">
<el-button :loading="crud.status.cu === 2" type="primary" @click="handlerArchivesSubmit">保存</el-button>
</div>
</div>
</el-dialog>
<!-- 上传附件 -->
<el-dialog class="upload-dialog" :modal-append-to-body="false" :close-on-click-modal="false" :before-close="handleClose" :visible.sync="uploadFileVisible" title="上传附件">
<span class="dialog-right-top" />
<span class="dialog-left-bottom" />
<div class="setting-dialog">
<UploadFile :is-upload-detail="true" />
<div slot="footer" class="dialog-footer">
<el-button :loading="crud.status.cu === 2" type="primary" @click="uploadFileSave">保存</el-button>
</div>
</div>
</el-dialog>
<!-- 删除档案 -->
<el-dialog title="删除档案" :visible.sync="deleteVisible" :close-on-click-modal="false" :before-close="handleClose">
<span class="dialog-right-top" />
<span class="dialog-left-bottom" />
<div class="setting-dialog">
<div class="dialog-delt">
<p><span>确定删除当前档案吗</span></p>
<p v-if="selectedCategory.isType == 2">数据来源项目 1条数据 案卷 4条数据</p>
<p v-if="selectedCategory.isType == 3">数据来源案卷 1条数据 卷内 2条数据</p>
<p v-if="selectedCategory.isType == 4">数据来源卷内 1条数据</p>
<p v-if="selectedCategory.isType == 5">数据来源卷内 1条数据</p>
<p class="delt-tip"><span>提示如果删除当前档案此档案内所附带的文件会一并删除</span></p>
</div>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click.native="handleDeltConfirm">确定</el-button>
</div>
</div>
</el-dialog>
<!-- table表格渲染 -->
<el-card class="box-card" shadow="never">
<span class="right-top-line" />
<span class="left-bottom-line" />
<el-table ref="table" v-loading="crud.loading || getTableDisplayFieldsLoading" class="archives-table" :data="crud.data" highlight-current-row style="width: 100%; " height="calc(100vh - 350px)" @selection-change="crud.selectionChangeHandler" @row-click="clickRowHandler" @cell-dblclick="tableDoubleClick">
<el-table-column type="selection" width="55" align="center" />
<el-table-column type="index" label="序号" width="55" align="center" />
<el-table-column v-for="field in tableDisplayFields" :key="field.id" :label="field.fieldCnName" :align="field.displayformatType" :width="field.displayLength" show-overflow-tooltip>
<template slot-scope="scope">
{{ scope.row[field.fieldName] }}
</template>
</el-table-column>
<el-table-column v-if="selectedCategory.isType !== 1 && selectedCategory.isType !== 2" label="装盒" width="100" align="center" :fixed="fixedStatusBar?false:'right'">
<!-- state-active 已装/已入/已借/已绑 -->
<template slot-scope="scope">
<!-- 未装 / 已装 -->
<span class="row-state row-packing state-active">{{ scope.row.case_no ? '已装': '未装' }}</span>
</template>
</el-table-column>
<el-table-column v-if="selectedCategory.isType !== 1 && selectedCategory.isType !== 2" label="入库" width="100" align="center" :fixed="fixedStatusBar?false:'right'">
<template slot-scope="">
<!-- 未入 / 已入 -->
<span class="row-state row-warehousing">未入</span>
</template>
</el-table-column>
<el-table-column v-if="selectedCategory.isType === 3 || selectedCategory.isType === 5" label="借阅" width="100" align="center" :fixed="fixedStatusBar?false:'right'">
<template slot-scope="">
<!-- 待借 / 不可借- 表示 / 已借 -->
<span class="row-state row-lending"></span>
</template>
</el-table-column>
<el-table-column v-if="selectedCategory.isType === 3 || selectedCategory.isType === 5" label="标签" width="100" align="center" :fixed="fixedStatusBar?false:'right'">
<template slot-scope="scope">
<!-- 未绑 / 已绑 -->
<span class="row-state row-binding">{{ scope.row.tid ? '已绑': '未绑' }}</span>
</template>
</el-table-column>
</el-table>
<!--分页组件-->
<pagination />
</el-card>
<!-- 档案详情 -->
<ArchivesInfo ref="archivesInfo" />
<!-- 装盒 -->
<Packing ref="packing" />
<!-- 绑定标签 -->
<Binding ref="bind" :is-binding="isBinding" />
<!-- 借阅 -->
<el-dialog title="借阅" :visible.sync="lengingVisible" :close-on-click-modal="false" :before-close="handleClose">
<span class="dialog-right-top" />
<span class="dialog-left-bottom" />
<div class="setting-dialog">
<div class="dialog-delt">
<p><span>确定将当前档案加入借阅列表</span></p>
</div>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click.native="lengingVisible=false">确定</el-button>
</div>
</div>
</el-dialog>
</div>
</template>
<script>
import qs from 'qs'
import { add, edit, del, getTableDisplayFields, getFormDisplayFields } from '@/api/archivesManage/archivesList'
import CRUD, { presenter, header, form } from '@crud/crud'
import { exportFile } from '@/utils/index'
import { initData } from '@/api/data'
import crudOperation from '@crud/CRUD.operation'
import rrOperation from '@crud/RR.operation'
import pagination from '@crud/Pagination'
import PreviewForm from '@/views/components/category/PreviewForm'
import UploadFile from './module/uploadFile/index'
import ArchivesInfo from './module/archivesInfo/index'
import Packing from './module/packing/index'
export default {
name: 'ArchivesDetail',
components: { crudOperation, rrOperation, pagination, PreviewForm, UploadFile, ArchivesInfo, Packing },
mixins: [
presenter(),
header(),
form({})
],
props: {
selectedCategory: {
type: Object,
default: function() {
return {}
}
},
isJuannei: {
type: Boolean,
default: false
}
},
cruds() {
return [
CRUD({
title: '档案',
url: 'api/archives/initArchivesView',
query: { isdel: false },
crudMethod: { add, edit, del },
optShow: {
add: false,
edit: true,
del: false,
reset: false,
download: false,
group: false
},
queryOnPresenterCreated: false,
sort: []
})
]
},
data() {
return {
stateOptions: [ // -
{ key: '1', label: '全部' },
{ key: '2', label: '未装' },
{ key: '3', label: '未入' },
{ key: '4', label: '在库' },
{ key: '5', label: '待借' },
{ key: '6', label: '已借' }
],
queryOption: [
{ value: 'maintitle', label: '题名' },
{ value: 'archive_no', label: '档号' },
{ value: 'archive_year', label: '年度' }
],
inputSelect: '',
permission: {
add: ['admin', 'archivesList:add'],
edit: ['admin', 'archivesList:edit'],
del: ['admin', 'archivesList:del'],
download: ['admin', 'archivesList:download']
},
fixedStatusBar: false, // table-fixed
deleteVisible: false, // dialog
deleteData: {}, // data
tableDisplayFields: [], // table-list-title
getTableDisplayFieldsLoading: false, // table-loading
formPreviewData: [], // data
isEditOrAdd: '', // crud-add/edit-btn
selectedData: null, // table
archivesTabIndex: 0, //
arcId: null, // ID
arrySort: [], // sort-query
uploadFileVisible: false, //
archivesInfoVisible: false, //
lengingVisible: false, //
isBinding: false, //
parent_id: null
}
},
watch: {
selectedCategory: function(newValue, oldValue) {
//
if (newValue.isType === 3 || newValue.isType === 4 || newValue.isType === 5) {
this.crud.query.categoryId = newValue.id
this.crud.refresh()
}
},
isJuannei: function(newValue, oldValue) {
},
tableDisplayFields(val) {
this.doLayout()
}
},
created() {
// select -
this.inputSelect = this.queryOption[0].value
},
mounted() {
},
methods: {
doExport(fileName = '未知文件') {
this.crud.downloadLoading = true
if (this.selectedCategory.pid !== '0') {
this.parent_id = this.selectedCategory.pid
} else {
this.parent_id = null
}
const params = {
'categoryId': this.selectedCategory.id,
'parentsId': this.parent_id
}
exportFile('api/archives/exportArchives?' + qs.stringify(params))
// this.crud.downloadLoading = false
},
// -select
querySelect(val) {
this.inputSelect = val
},
[CRUD.HOOK.beforeRefresh]() {
// id
if (this.selectedCategory.pid !== '0') {
this.crud.query.parentsId = this.selectedCategory.pid
} else {
this.crud.query.parentsId = null
}
this.getTableDisplayFieldsLoading = true
//
getTableDisplayFields({ categoryId: this.selectedCategory.id }).then(data => {
this.tableDisplayFields = data
this.getTableDisplayFieldsLoading = false
this.tableDisplayFields.map(item => {
if (item.queue) {
this.arrySort.push(item.fieldName + ', ' + (item.displayOrder === 1 ? 'asc' : 'desc'))
}
})
this.crud.sort = this.arrySort
new Promise((resolve, reject) => {
this.crud.loading = true
//
initData(this.crud.url, this.crud.getQueryParams()).then(data => {
const table = this.crud.getTable()
if (table && table.lazy) { //
table.store.states.treeData = {}
table.store.states.lazyTreeNodeMap = {}
}
if (data) {
this.crud.page.total = data.totalElements !== null ? data.totalElements : data.length
this.crud.data = data.content ? data.content : data
this.crud.resetDataStatus()
resolve(data)
// time
setTimeout(() => {
this.crud.loading = false
}, this.crud.time)
}
}).catch(err => {
this.crud.loading = false
reject(err)
})
})
})
return false
},
[CRUD.HOOK.beforeToCU](crud, form, btn) {
this.isEditOrAdd = btn
this.selectedData = crud.selections
this.archivesTabIndex = 0
if (this.isEditOrAdd === 'add') {
this.arcId = null
} else if (this.isEditOrAdd === 'edit') {
this.arcId = this.selectedData[0].id
}
this.form.dictionaryConfigId = {}
this.formPreviewData = []
//
const params = {
categoryId: this.selectedCategory.id,
archivesId: this.arcId
}
this.getFormInfo(params)
},
// -form/-api
getFormInfo(params) {
getFormDisplayFields(params).then(data => {
// this.formPreviewData = data.showFiled.filter((fields) => { return fields.isInput })
this.formPreviewData = data.showFiled
this.form.categoryId = this.selectedCategory.id
this.$nextTick(() => {
if (this.isEditOrAdd === 'edit') {
this.$refs.previewForm.addOrUpdateForm = data.echo
}
})
})
},
// form - submit
handlerArchivesSubmit() {
this.$refs.previewForm.submitForm('addOrUpdateForm')
},
// table -
tableDoubleClick(row) {
this.$refs.archivesInfo.archivesInfoVisible = true
const params = {
categoryId: this.selectedCategory.id,
archivesId: row.id
}
this.getFormInfo(params)
},
// table - row
clickRowHandler(row) {
this.$refs.table.toggleRowSelection(row)
},
//
toDelete(data) {
this.deleteData = data
this.deleteVisible = true
},
//
handleDeltConfirm() {
this.deleteVisible = false
this.crud.delAllLoading = true
// this.crud.doDelete(this.deleteData)
const ids = []
this.deleteData.forEach(val => {
ids.push(val.id)
})
const params = {
'ids': ids,
'categoryId': this.selectedCategory.id
}
// fetch
del(params).then(res => {
this.crud.delAllLoading = false
this.$notify({
title: '删除成功',
type: 'success',
duration: 2500
})
this.crud.refresh()
})
},
// -
handleClose(done) {
this.deleteData = {}
done()
},
/* 重新渲染table组件 防止table-fixed 错位 配合watch-table数据 */
doLayout() {
this.$nextTick(() => {
this.$refs.table.doLayout()
})
},
//
uploadFile() {
this.uploadFileVisible = true
},
uploadFileSave() {
this.uploadFileVisible = false
},
//
handleBinding(data) {
this.$refs.bind.bindingVisible = true
if (data.tid == null) {
this.isBinding = false
this.$refs.bind.bindingTitle = '绑定标签'
} else {
this.isBinding = true
this.$refs.bind.bindingTitle = '重新绑定'
}
},
//
handlePacking(data) {
this.$refs.packing.packingVisible = true
}
}
}
</script>
<style rel="stylesheet/scss" lang="scss" scoped>
@import "~@/assets/styles/archives-manage.scss";
.preview-dialog {
::v-deep .el-dialog {
.el-dialog__body{
padding: 0;
}
.preview-content {
width: auto !important;
margin-right: 6px;
overflow: hidden;
overflow-y: auto;
.el-textarea__inner {
border: 1px solid #339cff;
background-color: transparent;
}
}
.dialog-footer{
margin: 0 auto;
padding: 15px 0 20px 0;
}
}
}
</style>

141
src/views/archivesManage/archivesList/module/archivesJuannei/index.vue → src/views/archivesManage/archivesList/archivesJuannei/index.vue

@ -49,22 +49,6 @@
</div>
</el-dialog>
<!-- 删除档案 -->
<el-dialog title="删除档案" :visible.sync="deleteVisible" :close-on-click-modal="false" :before-close="handleClose">
<span class="dialog-right-top" />
<span class="dialog-left-bottom" />
<div class="setting-dialog">
<div class="dialog-delt">
<p><span>确定删除当前档案吗</span></p>
<p>数据来源卷内 {{ selections.length }} 条数据 附件 {{ totalSumAll }} 条数据 </p>
<p class="delt-tip"><span>提示如果删除当前档案此档案内所附带的文件会一并删除</span></p>
</div>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click.native="handleDeltConfirm">确定</el-button>
</div>
</div>
</el-dialog>
<!-- table表格渲染 -->
<el-card class="box-card" shadow="never">
<span class="right-top-line" />
@ -127,7 +111,11 @@
</el-card>
<!-- 档案详情 -->
<ArchivesInfo ref="archivesInfo" :is-has-file="true" :archives-details-data="archivesDetailsData" :archives-details-metadata.sync="archivesDetailsMetadata" :category-id="categoryId" :arc-id="arcId" />
<ArchivesInfo ref="archivesInfo" :is-has-file="true" :category-id="categoryId" :arc-id="arcId" />
<!-- 还原 -->
<RestoreArchives ref="restore" :selections="selections" :category-id="categoryId" />
<!-- 删除档案 -->
<DeltArchives ref="deltArchives" :selections="selections" :category-id="categoryId" :total-sum-all="totalSumAll" />
<!-- 上传附件 -->
<el-dialog class="upload-dialog" :modal-append-to-body="false" :close-on-click-modal="false" :before-close="handleClose" :visible.sync="uploadFileVisible" title="上传附件">
@ -137,36 +125,24 @@
<UploadFile ref="uploadFile" :category-id="categoryId" :arc-id="arcId" />
</div>
</el-dialog>
<!-- 回收站-还原 -->
<el-dialog title="确认还原" :visible.sync="restoreVisible" :close-on-click-modal="false" :before-close="handleClose">
<span class="dialog-right-top" />
<span class="dialog-left-bottom" />
<div class="setting-dialog">
<div class="dialog-delt">
<p><span>确定将当前选择的档案数据进行还原?</span></p>
</div>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click.native="handleRestoreConfirm">确定</el-button>
</div>
</div>
</el-dialog>
</div>
</template>
<script>
import qs from 'qs'
import { del, FetchTableDisplayFields, FetchInitArchivesView, FetchFormDisplayFields, FetchArchivesDetails, FetchArchivesMetadata, FetchCompletelyDelete, FetchReduction } from '@/api/archivesManage/archivesList'
import { FetchTableDisplayFields, FetchInitArchivesView, FetchFormDisplayFields } from '@/api/archivesManage/archivesList'
import { header, form } from '@crud/crud'
import { mapGetters } from 'vuex'
import { exportFile } from '@/utils/index'
import PreviewForm from '@/views/components/category/PreviewForm'
import ArchivesInfo from '../archivesInfo/index'
import UploadFile from '../uploadFile/index'
import ArchivesInfo from '../module/archivesInfo/index'
import UploadFile from '../module/uploadFile/index'
import RestoreArchives from '../module/restoreArchives/index'
import DeltArchives from '../module/deltArchives/index'
export default {
name: 'ArchivesJuannei',
components: { PreviewForm, ArchivesInfo, UploadFile },
components: { PreviewForm, ArchivesInfo, UploadFile, RestoreArchives, DeltArchives },
mixins: [
header(),
form({})
@ -183,16 +159,16 @@ export default {
type: Boolean,
default: true
},
fixedStatusBar: {
type: Boolean,
default: true
},
anjuanSelection: {
type: Object,
default: function() {
return {}
}
},
fixedStatusBar: {
type: Boolean,
default: true
},
smartQuery: {
type: Object,
default: function() {
@ -242,20 +218,14 @@ export default {
{ value: 'responsibleby', label: '责任者' }
],
juanneiInputSelect: '',
deleteVisible: false, // dialog
deleteData: {}, // data
totalSumAll: 0, //
arrySort: [], // sort-query
selections: [], // table
categoryId: null,
parentsId: null, // id
arcId: null, // ID
arrySort: [], // sort-query
yearGroup: [], // -
uploadFileVisible: false, //
archivesInfoVisible: false, //
archivesDetailsData: [], // data -
archivesDetailsMetadata: '', // data -
restoreVisible: false
uploadFileVisible: false //
}
},
computed: {
@ -311,6 +281,7 @@ export default {
},
//
getTableDisplayFields() {
this.getTableDisplayFieldsLoading = true
this.selections = []
if (this.selectedCategory.isType === 2) {
if (this.selectedCategory.children.length !== 0) {
@ -430,18 +401,8 @@ export default {
this.$refs.archivesInfo.detailTitle = '档案详情'
this.$refs.archivesInfo.archivesInfoVisible = true
this.$refs.archivesInfo.archivesTabIndex = 0
const params = {
categoryId: this.categoryId,
archivesId: row.id
}
FetchArchivesDetails(params).then(data => {
this.archivesDetailsData = data
})
FetchArchivesMetadata(params).then(data => {
this.archivesDetailsMetadata = data
})
this.arcId = row.id
this.$refs.archivesInfo.getDetial(row.id)
},
// table - row
clickRowHandler(row) {
@ -455,51 +416,16 @@ export default {
},
//
toDelete(data) {
this.deleteData = data
this.deleteVisible = true
this.$refs.deltArchives.deleteVisible = true
this.totalSumAll = 0
this.deleteData.map((item) => { if (!isNaN(item.children_num)) this.totalSumAll += item.children_num })
this.selections.map((item) => { if (!isNaN(item.children_num)) this.totalSumAll += item.children_num })
if (isNaN(this.totalSumAll)) {
return 0
}
},
//
handleDeltConfirm() {
this.deleteVisible = false
this.crud.delAllLoading = true
// this.crud.doDelete(this.deleteData)
const ids = []
this.deleteData.forEach(val => {
ids.push(val.id)
})
const params = {
'ids': ids,
'categoryId': this.categoryId
}
// fetch
if (!this.recycleMain.isRecycle) {
del(params).then(res => {
this.crud.delAllLoading = false
this.$message.success('删除成功!')
this.selections = []
this.getTableList()
this.crud.refresh()
})
} else {
FetchCompletelyDelete(params).then(res => {
this.crud.delAllLoading = false
this.$message.success('删除成功!')
this.selections = []
this.getTableList()
this.crud.refresh()
})
}
},
// -
handleClose(done) {
this.formVisible = false
this.restoreVisible = false
this.deleteData = {}
done()
},
/* 重新渲染table组件 防止table-fixed 错位 配合watch-table数据 */
@ -519,30 +445,7 @@ export default {
},
//
handleRestore() {
this.restoreVisible = true
},
handleRestoreConfirm() {
const ids = []
this.selections.forEach(val => {
ids.push(val.id)
})
const params = {
'ids': ids,
'categoryId': this.categoryId
}
FetchReduction(params).then(data => {
if (data === 0) {
this.$message.error('还原失败!')
} else if (this.selections.length === data) {
this.$message.success('还原成功!')
} else if (this.selections.length > data) {
this.$message.success('部分档案还原成功!')
}
this.selections = []
this.getTableList()
this.restoreVisible = false
this.crud.refresh()
})
this.$refs.restore.restoreVisible = true
}
}
}

138
src/views/archivesManage/archivesList/module/archivesProject/index.vue → src/views/archivesManage/archivesList/archivesProject/index.vue

@ -45,22 +45,6 @@
</div>
</el-dialog>
<!-- 删除档案 -->
<el-dialog title="删除档案" :visible.sync="deleteVisible" :close-on-click-modal="false" :before-close="handleClose">
<span class="dialog-right-top" />
<span class="dialog-left-bottom" />
<div class="setting-dialog">
<div class="dialog-delt">
<p><span>确定删除当前项目吗</span></p>
<p>数据来源项目 {{ selections.length }} 条数据 案卷 {{ totalSumAll }} 条数据</p>
<p class="delt-tip"><span>提示如果删除当前档案此档案内所附带的文件会一并删除</span></p>
</div>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click.native="handleDeltConfirm">确定</el-button>
</div>
</div>
</el-dialog>
<!-- table表格渲染 -->
<!-- height="calc(100vh - 350px)" -->
<el-card class="box-card" shadow="never">
@ -111,33 +95,25 @@
</el-card>
<!-- 档案详情 -->
<ArchivesInfo ref="archivesInfo" :archives-details-data="archivesDetailsData" :archives-details-metadata.sync="archivesDetailsMetadata" />
<!-- 回收站-还原 -->
<el-dialog title="确认还原" :visible.sync="restoreVisible" :close-on-click-modal="false" :before-close="handleClose">
<span class="dialog-right-top" />
<span class="dialog-left-bottom" />
<div class="setting-dialog">
<div class="dialog-delt">
<p><span>确定将当前选择的档案数据进行还原?</span></p>
</div>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click.native="handleRestoreConfirm">确定</el-button>
</div>
</div>
</el-dialog>
<ArchivesInfo ref="archivesInfo" :category-id="categoryId" :arc-id="arcId" />
<!-- 还原 -->
<RestoreArchives ref="restore" :selections="selections" :category-id="categoryId" />
<!-- 删除档案 -->
<DeltArchives ref="deltArchives" :selections="selections" :category-id="categoryId" :total-sum-all="totalSumAll" />
</div>
</template>
<script>
import { del, FetchTableDisplayFields, FetchInitArchivesView, FetchFormDisplayFields, FetchArchivesDetails, FetchArchivesMetadata, FetchCompletelyDelete, FetchReduction } from '@/api/archivesManage/archivesList'
import { FetchTableDisplayFields, FetchInitArchivesView, FetchFormDisplayFields } from '@/api/archivesManage/archivesList'
import { header, form } from '@crud/crud'
import PreviewForm from '@/views/components/category/PreviewForm'
import ArchivesInfo from '../archivesInfo/index'
import ArchivesInfo from '../module/archivesInfo/index'
import RestoreArchives from '../module/restoreArchives/index'
import DeltArchives from '../module/deltArchives/index'
export default {
name: 'ArchivesProject',
components: { PreviewForm, ArchivesInfo },
components: { PreviewForm, ArchivesInfo, RestoreArchives, DeltArchives },
mixins: [
header(),
form({})
@ -199,16 +175,12 @@ export default {
projectInputSelect: '',
arrySort: [], // sort - query
parentsId: null, // id
arcId: null, // ID
arcId: null, // ID\
categoryId: null, // 使
isProject: true, // -/
deleteVisible: false, // dialog
deleteData: {}, // data
selections: [], // table
totalSumAll: 0, // - num
yearGroup: [], // -
archivesDetailsData: [], // data -
archivesDetailsMetadata: '', // data -
restoreVisible: false
yearGroup: [] // -
}
},
watch: {
@ -239,7 +211,8 @@ export default {
// -
getTableDisplayFields() {
this.selections = []
FetchTableDisplayFields({ categoryId: this.selectedCategory.id }).then(data => {
this.categoryId = this.selectedCategory.id
FetchTableDisplayFields({ categoryId: this.categoryId }).then(data => {
if (data) {
this.arrySort = []
this.tableDisplayFields = data
@ -267,7 +240,7 @@ export default {
this.getTableDisplayFieldsLoading = true
this.parentsId = null
const params = {
'categoryId': this.selectedCategory.id,
'categoryId': this.categoryId,
'parentsId': this.parentsId,
'isdel': this.recycleMain.isdel,
'page': this.page.page,
@ -307,7 +280,7 @@ export default {
this.formPreviewData = []
//
const params = {
categoryId: this.selectedCategory.id,
categoryId: this.categoryId,
archivesId: this.arcId
}
this.getFormInfo(params, type)
@ -339,18 +312,8 @@ export default {
this.$refs.archivesInfo.isHasFile = false
this.$refs.archivesInfo.archivesInfoVisible = true
this.$refs.archivesInfo.archivesTabIndex = 0
const params = {
categoryId: this.selectedCategory.id,
archivesId: row.id
}
//
FetchArchivesDetails(params).then(data => {
this.archivesDetailsData = data
})
//
FetchArchivesMetadata(params).then(data => {
this.archivesDetailsMetadata = data
})
this.arcId = row.id
this.$refs.archivesInfo.getDetial(row.id)
},
// table - row
clickRowHandler(row) {
@ -371,78 +334,21 @@ export default {
},
//
toDelete(data) {
this.deleteData = data
this.deleteVisible = true
this.$refs.deltArchives.deleteVisible = true
this.totalSumAll = 0
this.deleteData.map((item) => { if (!isNaN(item.children_num)) this.totalSumAll += item.children_num })
this.selections.map((item) => { if (!isNaN(item.children_num)) this.totalSumAll += item.children_num })
if (isNaN(this.totalSumAll)) {
return 0
}
},
//
handleDeltConfirm() {
this.deleteVisible = false
this.crud.delAllLoading = true
const ids = []
this.deleteData.forEach(val => {
ids.push(val.id)
})
const params = {
'ids': ids,
'categoryId': this.selectedCategory.id
}
// fetch
if (!this.recycleMain.isRecycle) {
del(params).then(res => {
this.crud.delAllLoading = false
this.$message.success('删除成功!')
this.selections = []
this.getTableList()
this.crud.refresh()
})
} else {
FetchCompletelyDelete(params).then(res => {
this.crud.delAllLoading = false
this.$message.success('删除成功!')
this.selections = []
this.getTableList()
this.crud.refresh()
})
}
},
// -
handleClose(done) {
this.formVisible = false
this.restoreVisible = false
this.deleteData = {}
done()
},
//
handleRestore() {
this.restoreVisible = true
},
handleRestoreConfirm() {
const ids = []
this.selections.forEach(val => {
ids.push(val.id)
})
const params = {
'ids': ids,
'categoryId': this.selectedCategory.id
}
FetchReduction(params).then(data => {
if (data === 0) {
this.$message.error('还原失败!')
} else if (this.selections.length === data) {
this.$message.success('还原成功!')
} else if (this.selections.length > data) {
this.$message.success('部分档案还原成功!')
}
this.selections = []
this.getTableList()
this.restoreVisible = false
this.crud.refresh()
})
this.$refs.restore.restoreVisible = true
},
/* 重新渲染table组件 防止table-fixed 错位 配合watch-table数据 */
doLayout() {

6
src/views/archivesManage/archivesList/index.vue

@ -67,9 +67,9 @@
<script>
import { getDicts } from '@/api/archivesConfig/dict'
import archivesProject from './module/archivesProject/index'
import archivesAnjuan from './module/archivesAnjuan/index'
import archivesJuannei from './module/archivesJuannei/index'
import archivesProject from './archivesProject/index'
import archivesAnjuan from './archivesAnjuan/index'
import archivesJuannei from './archivesJuannei/index'
import crudCategory from '@/api/category/category'
import CRUD, { presenter } from '@crud/crud'

41
src/views/archivesManage/archivesList/module/archivesInfo/index.vue

@ -43,6 +43,7 @@
<script>
// import vkbeautify from 'vkbeautify'
import { form } from '@crud/crud'
import { FetchArchivesDetails, FetchArchivesMetadata } from '@/api/archivesManage/archivesList'
import UploadFile from '../uploadFile/index'
export default {
name: 'ArchivesInfo',
@ -52,24 +53,6 @@ export default {
],
inject: ['recycleMain'],
props: {
archivesDetailsData: {
type: Array,
default: function() {
return []
}
},
archivesDetailsMetadata: {
type: String,
default: function() {
return ''
}
},
doubleCurrentRow: {
type: Object,
default: function() {
return {}
}
},
categoryId: {
type: String,
default: function() {
@ -89,20 +72,26 @@ export default {
isHasFile: false,
archivesInfoVisible: false,
archivesTabIndex: 0,
archivesDetailsData: [],
archivesDetailsMetadata: [],
xml_show: null
}
},
watch: {
archivesDetailsData: function(newValue, oldValue) {
},
archivesDetailsMetadata: function(newValue, oldValue) {
}
},
created() {
},
mounted() {
},
methods: {
getDetial(rowId) {
const params = {
categoryId: this.categoryId,
archivesId: rowId
}
FetchArchivesDetails(params).then(data => {
this.archivesDetailsData = data
})
FetchArchivesMetadata(params).then(data => {
this.archivesDetailsMetadata = data
})
},
setXml() {
const xmlstr = this.archivesDetailsMetadata
// console.log('xmlstr:', xmlstr)

110
src/views/archivesManage/archivesList/module/deltArchives/index.vue

@ -0,0 +1,110 @@
<template>
<div class="archives-warp">
<!-- 删除档案 -->
<el-dialog title="删除档案" :visible.sync="deleteVisible" :close-on-click-modal="false" :before-close="handleClose">
<span class="dialog-right-top" />
<span class="dialog-left-bottom" />
<div class="setting-dialog">
<div class="dialog-delt">
<p><span>确定删除当前档案吗</span></p>
<p v-if="recycleMain.selectedCategory.isType !== 5">数据来源案卷 {{ selections.length }} 条数据 卷内 {{ totalSumAll }} 条数据</p>
<p v-else>数据来源文件 {{ selections.length }} 条数据 附件 {{ totalSumAll }} 条数据</p>
<p class="delt-tip"><span>提示如果删除当前档案此档案内所附带的文件会一并删除</span></p>
</div>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click.native="handleDeltConfirm">确定</el-button>
</div>
</div>
</el-dialog>
</div></template>
<script>
import { del, FetchCompletelyDelete } from '@/api/archivesManage/archivesList'
import { header, form } from '@crud/crud'
export default {
name: 'DeltArchives',
mixins: [
header(),
form({})
],
props: {
selections: {
type: Array,
default: function() {
return []
}
},
categoryId: {
type: String,
default: function() {
return ''
}
},
totalSumAll: {
type: Number,
default: function() {
return 0
}
}
},
inject: ['recycleMain'],
data() {
return {
deleteVisible: false // dialog
}
},
watch: {
selections: function(newValue, oldValue) {
},
categoryId: function(newValue, oldValue) {
},
totalSumAll: function(newValue, oldValue) {
}
},
created() {
},
mounted() {
},
methods: {
//
handleDeltConfirm() {
this.deleteVisible = false
this.crud.delAllLoading = true
const ids = []
this.selections.forEach(val => {
ids.push(val.id)
})
const params = {
'ids': ids,
'categoryId': this.categoryId
}
// fetch
if (!this.recycleMain.isRecycle) {
del(params).then(res => {
this.crud.delAllLoading = false
this.$message.success('删除成功!')
this.crud.refresh()
})
} else {
FetchCompletelyDelete(params).then(res => {
this.crud.delAllLoading = false
this.$message.success('删除成功!')
this.crud.refresh()
})
}
},
// -
handleClose(done) {
this.deleteVisible = false
done()
}
}
}
</script>
<style rel="stylesheet/scss" lang="scss" scoped>
@import "~@/assets/styles/archives-manage.scss";
</style>

86
src/views/archivesManage/archivesList/module/restoreArchives/index.vue

@ -0,0 +1,86 @@
<template>
<!-- 回收站-还原 -->
<el-dialog title="确认还原" :visible.sync="restoreVisible" :close-on-click-modal="false" :before-close="handleClose">
<span class="dialog-right-top" />
<span class="dialog-left-bottom" />
<div class="setting-dialog">
<div class="dialog-delt">
<p><span>确定将当前选择的档案数据进行还原?</span></p>
</div>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click.native="handleRestoreConfirm">确定</el-button>
</div>
</div>
</el-dialog>
</template>
<script>
import { header, form } from '@crud/crud'
import { FetchReduction } from '@/api/archivesManage/archivesList'
export default {
name: 'RestoreArchives',
mixins: [
header(),
form({})
],
props: {
selections: {
type: Array,
default: function() {
return []
}
},
categoryId: {
type: String,
default: function() {
return ''
}
}
},
data() {
return {
restoreVisible: false
}
},
watch: {
selections: function(newValue, oldValue) {
},
categoryId: function(newValue, oldValue) {
}
},
mounted() {
},
methods: {
//
handleClose(done) {
this.restoreVisible = false
done()
},
handleRestoreConfirm() {
const ids = []
this.selections.forEach(val => {
ids.push(val.id)
})
const params = {
'ids': ids,
'categoryId': this.categoryId
}
FetchReduction(params).then(data => {
if (data === 0) {
this.$message.error('还原失败!')
} else if (this.selections.length === data) {
this.$message.success('还原成功!')
} else if (this.selections.length > data) {
this.$message.success('部分档案还原成功!')
}
this.restoreVisible = false
this.crud.refresh()
})
}
}
}
</script>
<style rel="stylesheet/scss" lang="scss" scoped>
@import "~@/assets/styles/archives-manage.scss";
</style>

4
src/views/archivesManage/caseManage/caseList/index.vue

@ -99,7 +99,8 @@ export default {
del: false,
download: false,
group: false
}
},
sort: []
})
},
data() {
@ -179,7 +180,6 @@ export default {
// caseId: '1716F6C668C83A929C738B'
}
this.crud.crudMethod.findInCase(params).then(res => {
console.log(res, 'res')
if (res) {
this.$refs.detailDom.tableData = res.archives
}

Loading…
Cancel
Save