Browse Source

公文档案

master
xuhuajiao 2 months ago
parent
commit
444278f650
  1. 10
      src/api/system/documentArchives.js
  2. 110
      src/views/archivesMIOD/miodLibrary/index.vue
  3. 10
      src/views/archivesMIOD/miodLibrary/treeList.vue
  4. 29
      src/views/archivesMIOD/recycled/index.vue
  5. 21
      src/views/components/category/PreviewForm.vue

10
src/api/system/documentArchives.js

@ -54,6 +54,15 @@ export function miodEditDocument(data) {
}) })
} }
// 删除公文档案
export function FetchDelArchives(data) {
return request({
url: 'api/documentArchives/delArchives',
method: 'post',
data
})
}
// 根据公文库和文件来源获取登记号 // 根据公文库和文件来源获取登记号
export function FetchRegNoByDocumentIdAndDocDepartment(params) { export function FetchRegNoByDocumentIdAndDocDepartment(params) {
return request({ return request({
@ -70,5 +79,6 @@ export default {
FetchInitDocumentsViewTable, FetchInitDocumentsViewTable,
FetchDoeditDocument, FetchDoeditDocument,
miodEditDocument, miodEditDocument,
FetchDelArchives,
FetchRegNoByDocumentIdAndDocDepartment FetchRegNoByDocumentIdAndDocDepartment
} }

110
src/views/archivesMIOD/miodLibrary/index.vue

@ -5,16 +5,16 @@
<div class="elect-cont-left"> <div class="elect-cont-left">
<TreeList ref="treeList" @nodeClick="handleNodeClick" /> <TreeList ref="treeList" @nodeClick="handleNodeClick" />
</div> </div>
<div class="elect-cont-right">
<div v-if="selectedDocument.isType!==1" class="elect-cont-right">
<!--工具栏--> <!--工具栏-->
<div class="head-container">
<div class="head-search">
<div class="head-container" :style="isRecycle?'display:flex;justify-content: space-between; align-items: center;':'' ">
<div class="head-search" :style="isRecycle?'margin: 0;':''">
<!-- 搜索 --> <!-- 搜索 -->
<el-input v-model="query.search" clearable size="small" placeholder="输入题名搜索" prefix-icon="el-icon-search" style="width: 200px;" class="filter-item" @keyup.enter.native="crud.toQuery" /> <el-input v-model="query.search" clearable size="small" placeholder="输入题名搜索" prefix-icon="el-icon-search" style="width: 200px;" class="filter-item" @keyup.enter.native="crud.toQuery" />
<rrOperation /> <rrOperation />
<el-button class="filter-item filter-refresh" size="mini" type="warning" icon="el-icon-refresh-left" @click="resetQuery">重置</el-button> <el-button class="filter-item filter-refresh" size="mini" type="warning" icon="el-icon-refresh-left" @click="resetQuery">重置</el-button>
</div> </div>
<crudOperation :permission="permission">
<crudOperation v-if="!isRecycle" :permission="permission">
<template v-slot:left> <template v-slot:left>
<!-- 新增 --> <!-- 新增 -->
<el-button size="mini" @click="handleForm('add')"><i class="iconfont icon-xinzeng" />新增</el-button> <el-button size="mini" @click="handleForm('add')"><i class="iconfont icon-xinzeng" />新增</el-button>
@ -33,6 +33,10 @@
</div> </div>
</template> </template>
</crudOperation> </crudOperation>
<div v-if="isRecycle">
<el-button size="mini" type="success" @click="toRecover"><i class="iconfont icon-huifu" />恢复</el-button>
<el-button size="mini" type="success" @click="toCompletelyDelete"><i class="iconfont icon-shanchu" />彻底删除</el-button>
</div>
</div> </div>
<!--表格渲染--> <!--表格渲染-->
<div class="container-right"> <div class="container-right">
@ -63,14 +67,20 @@
</el-tooltip> </el-tooltip>
</template> </template>
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.row[field.fieldName] }}
<!-- 仅针对read_type字段添加特殊处理 -->
<span
v-if="field.fieldName === 'read_type'"
:class="{
'row-state row-packing': scope.row.read_type === '未传阅',
'row-state row-warehousing state-active': scope.row.read_type === '传阅中',
'row-state row-binding state-active': scope.row.read_type === '已完成',
}"
>
{{ scope.row[field.fieldName] }}
</span>
<span v-else>{{ scope.row[field.fieldName] }}</span>
</template> </template>
</el-table-column> </el-table-column>
<!-- <el-table-column label="传阅状态" width="88" align="center" fixed="right">
<template slot-scope="scope">
<span :class="['row-state', 'row-packing', scope.row.read_type !== '未传阅' ? 'state-active' : '' ]">{{ scope.row.read_type }}</span>
</template>
</el-table-column> -->
</el-table> </el-table>
<!--分页组件--> <!--分页组件-->
<pagination v-if="crud.data.length !== 0" /> <pagination v-if="crud.data.length !== 0" />
@ -129,7 +139,7 @@
<script> <script>
import CRUD, { presenter, header } from '@crud/crud' import CRUD, { presenter, header } from '@crud/crud'
import { miodLibraryCrud } from './mixins/index' import { miodLibraryCrud } from './mixins/index'
import crudDocumentArchives from '@/api/system/documentArchives'
import crudDocumentArchives, { FetchDelArchives } from '@/api/system/documentArchives'
import rrOperation from '@crud/RR.operation' import rrOperation from '@crud/RR.operation'
import crudOperation from '@crud/CRUD.operation' import crudOperation from '@crud/CRUD.operation'
import pagination from '@crud/Pagination' import pagination from '@crud/Pagination'
@ -166,6 +176,16 @@ export default {
} }
}, },
mixins: [presenter(), header(), miodLibraryCrud], mixins: [presenter(), header(), miodLibraryCrud],
props: {
isRecycle: {
type: Boolean,
default: false
},
isdel: {
type: Boolean,
default: false
}
},
data() { data() {
return { return {
archivesBtnLoading: false, archivesBtnLoading: false,
@ -198,6 +218,12 @@ export default {
'baseApi' 'baseApi'
]) ])
}, },
watch: {
isdel: function(newValue, oldValue) {
},
isRecycle: function(newValue, oldValue) {
}
},
created() { created() {
}, },
methods: { methods: {
@ -226,7 +252,8 @@ export default {
} else { } else {
this.crud.query.documentId = this.selectedDocument.documentId this.crud.query.documentId = this.selectedDocument.documentId
} }
this.crud.query.isdel = this.isdel
// this.crud.query.ignore = false
this.crud.query.fondsAffiliation = this.selectedDocument.fondsId this.crud.query.fondsAffiliation = this.selectedDocument.fondsId
this.crud.query.sort = this.arrySort this.crud.query.sort = this.arrySort
}, },
@ -256,7 +283,6 @@ export default {
} }
}) })
this.$nextTick(() => { this.$nextTick(() => {
this.crud.query.isdel = false
if (this.selectedDocument.isType === 3) { if (this.selectedDocument.isType === 3) {
this.crud.query.docDepartment = this.selectedDocument.label this.crud.query.docDepartment = this.selectedDocument.label
this.crud.query.archiveYear = null this.crud.query.archiveYear = null
@ -273,33 +299,6 @@ export default {
} }
}) })
}, },
// -form/-api
// handleForm(type) {
// this.selectedCategory = this.selectedDocument
// this.isDesFormType = 'miodLibrary'
// let documentId
// if (this.selectedDocument.isType === 2) {
// documentId = this.selectedDocument.id
// } else {
// documentId = this.selectedDocument.documentId
// }
// let params
// if (type === 'add') {
// this.formTitle = ''
// params = {
// documentId: documentId,
// archivesId: null
// }
// } else if (type === 'edit') {
// this.formTitle = ''
// this.arcId = this.crud.selections[0].id
// params = {
// documentId: documentId,
// archivesId: this.crud.selections[0].id
// }
// }
// this.getFormInfo(params, type)
// },
handleForm(type) { handleForm(type) {
const { selectedDocument, crud } = this const { selectedDocument, crud } = this
@ -324,12 +323,6 @@ export default {
this.formTitle = '新增文件' this.formTitle = '新增文件'
params.archivesId = null params.archivesId = null
} else if (type === 'edit') { } else if (type === 'edit') {
// selections
if (!crud || !Array.isArray(crud.selections) || crud.selections.length === 0) {
console.warn('当前无选中项,无法执行编辑')
return
}
this.formTitle = '编辑文件' this.formTitle = '编辑文件'
const { id: archivesId } = crud.selections[0] const { id: archivesId } = crud.selections[0]
this.arcId = archivesId this.arcId = archivesId
@ -355,7 +348,6 @@ export default {
if (data.fileecho) { if (data.fileecho) {
const fileecho = [] const fileecho = []
fileecho.push(data.fileecho) fileecho.push(data.fileecho)
// this.$refs.previewForm.addOrUpdateForm.fileOriginal = fileecho[0].file_name
this.$refs.previewForm.fileOriginal = fileecho[0].file_name this.$refs.previewForm.fileOriginal = fileecho[0].file_name
this.$refs.previewForm.fileJsonString = JSON.stringify(fileecho) this.$refs.previewForm.fileJsonString = JSON.stringify(fileecho)
} else { } else {
@ -403,14 +395,27 @@ export default {
datas.forEach(val => { datas.forEach(val => {
ids.push(val.id) ids.push(val.id)
}) })
let documentId
if (this.selectedDocument.isType === 2) {
documentId = this.selectedDocument.id
} else {
documentId = this.selectedDocument.documentId
}
const params = { const params = {
'documentId': this.selectedDocument.id,
'ids': ids
'documentId': documentId,
'archivesIds': ids
} }
crudDocumentArchives.del(params).then(() => {
this.crud.notify('删除成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
FetchDelArchives(params).then((res) => {
console.log('res', res)
if (res.code !== 500) {
this.crud.notify('删除成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
this.crud.refresh()
} else {
this.crud.notify('删除失败', CRUD.NOTIFICATION_TYPE.ERROR)
}
this.crud.delAllLoading = false this.crud.delAllLoading = false
this.crud.refresh()
}).catch(err => { }).catch(err => {
this.crud.delAllLoading = false this.crud.delAllLoading = false
console.log(err) console.log(err)
@ -453,7 +458,6 @@ export default {
this.$refs.previewForm.$refs['addOrUpdateForm'].clearValidate() this.$refs.previewForm.$refs['addOrUpdateForm'].clearValidate()
this.$refs.previewForm.$refs['addOrUpdateForm'].resetFields() this.$refs.previewForm.$refs['addOrUpdateForm'].resetFields()
} }
this.refreshData()
} }
} }
} }

10
src/views/archivesMIOD/miodLibrary/treeList.vue

@ -149,8 +149,18 @@ export default {
font-size: 14px; font-size: 14px;
height: calc(100vh - 183px); height: calc(100vh - 183px);
overflow-y: scroll; overflow-y: scroll;
} }
.el-card .el-tree, .container-left .el-tree{ .el-card .el-tree, .container-left .el-tree{
margin: 0 !important; margin: 0 !important;
} }
::v-deep ::-webkit-scrollbar {
width: 5px !important;
height: 5px !important;
}
::v-deep ::-webkit-scrollbar-thumb {
background-color:rgba(0,0,0,.1) !important;
}
</style> </style>

29
src/views/archivesMIOD/recycled/index.vue

@ -0,0 +1,29 @@
<template>
<div>
<MiodLibraryModule :is-recycle="isRecycle" :isdel="isdel" />
</div>
</template>
<script>
import MiodLibraryModule from '../miodLibrary/index'
export default {
name: 'Recycled',
components: { MiodLibraryModule },
data() {
return {
isdel: true,
isRecycle: true
}
},
computed: {
},
created() {
},
methods: {
}
}
</script>
<style lang='scss' scoped>
</style>

21
src/views/components/category/PreviewForm.vue

@ -15,7 +15,7 @@
(item.fieldName === 'fonds_no' && (isDesFormType === 'arcives' || isDesFormType === 'manageArcives')? (item.fieldName === 'fonds_no' && (isDesFormType === 'arcives' || isDesFormType === 'manageArcives')?
((collectLevel === 1 || (isTitleType === 3 && selectedCategory.arrangeType!== 1) || (isTitleType === 4 && selectedCategory.arrangeType!== 2))? ((collectLevel === 1 || (isTitleType === 3 && selectedCategory.arrangeType!== 1) || (isTitleType === 4 && selectedCategory.arrangeType!== 2))?
'disabled-fonds-xm' : 'disabled-fonds') : 'disabled-fonds-xm' : 'disabled-fonds') :
(item.fieldName === 'fonds_no' && (isDesFormType === 'prearchiveLibrary' || isDesFormType === 'mergeFile')?
((item.fieldName === 'fonds_no' && (isDesFormType === 'prearchiveLibrary' || isDesFormType === 'mergeFile') || (item.fieldName === 'doc_department'&& archivesType === 'edit'))?
'disabled-fonds' : '') 'disabled-fonds' : '')
) )
]" ]"
@ -34,7 +34,7 @@
:multiple="false" :multiple="false"
:class="{ 'select-required-null': item.isSelectRequiredNull }" :class="{ 'select-required-null': item.isSelectRequiredNull }"
:style="{ width: item.editLength+'px'}" :style="{ width: item.editLength+'px'}"
:disabled="isDisabled|| (item.fieldName === 'fonds_no' && isDesFormType !== 'category') "
:disabled="isDisabled|| (item.fieldName === 'fonds_no' && isDesFormType !== 'category') || (item.fieldName === 'doc_department'&& archivesType === 'edit' ) || (item.fieldName === 'reg_no'&& archivesType === 'edit' )"
:validate-event="!isDisabled" :validate-event="!isDisabled"
no-options-text="无数据" no-options-text="无数据"
@select="selectTree" @select="selectTree"
@ -56,7 +56,7 @@
:rows="item.isInputClass === 'textarea' ? 3 : ''" :rows="item.isInputClass === 'textarea' ? 3 : ''"
:class="{'input-popover':(item.isInputClass === 'popover')}" :class="{'input-popover':(item.isInputClass === 'popover')}"
:style="{ width: item.editLength+'px'}" :style="{ width: item.editLength+'px'}"
:disabled="isDisabled || (item.fieldName === 'archival_category_code') || (item.fieldName === 'fonds_no' && isDesFormType !== 'category') "
:disabled="isDisabled || (item.fieldName === 'archival_category_code') || (item.fieldName === 'fonds_no' && isDesFormType !== 'category') || (item.fieldName === 'doc_department'&& archivesType === 'edit' ) || (item.fieldName === 'reg_no'&& archivesType === 'edit' )"
:validate-event="!isDisabled" :validate-event="!isDisabled"
@mousewheel.native.prevent @mousewheel.native.prevent
@DOMMouseScroll.native.prevent @DOMMouseScroll.native.prevent
@ -687,7 +687,7 @@ export default {
}) })
} }
} }
if (this.isDesFormType === 'miodLibrary') {
if (this.isDesFormType === 'miodLibrary' && this.archivesType === 'add') {
if (item.fieldName === 'archive_year' || item.fieldName === 'doc_department') { if (item.fieldName === 'archive_year' || item.fieldName === 'doc_department') {
console.log('111') console.log('111')
this.handleRegNo(item.fieldName, this.addOrUpdateForm[item.fieldName]) this.handleRegNo(item.fieldName, this.addOrUpdateForm[item.fieldName])
@ -812,7 +812,7 @@ export default {
} }
} }
} }
if (this.isDesFormType === 'miodLibrary') {
if (this.isDesFormType === 'miodLibrary' && this.archivesType === 'add') {
if (this.treeCurrentFiled.fieldName === 'doc_department' || this.treeCurrentFiled.fieldName === 'archive_year') { if (this.treeCurrentFiled.fieldName === 'doc_department' || this.treeCurrentFiled.fieldName === 'archive_year') {
this.handleRegNo(this.treeCurrentFiled.fieldName, val.dictionaryCode) this.handleRegNo(this.treeCurrentFiled.fieldName, val.dictionaryCode)
} }
@ -980,10 +980,11 @@ export default {
if (item.fieldName === 'archive_year') { if (item.fieldName === 'archive_year') {
this.$set(this.addOrUpdateForm, item.fieldName, this.currentYear()) this.$set(this.addOrUpdateForm, item.fieldName, this.currentYear())
if (this.isDesFormType === 'miodLibrary') {
this.isRepeatHandle(item)
}
this.$nextTick(() => {
if (this.isDesFormType === 'miodLibrary' && this.archivesType === 'add') {
this.isRepeatHandle(item)
}
})
// //
const validateArchiveYear = (value) => { const validateArchiveYear = (value) => {
@ -1037,7 +1038,7 @@ export default {
} }
} }
if (item.fieldName === 'doc_department') {
if (item.fieldName === 'doc_department' && this.archivesType === 'add') {
if (this.isDesFormType === 'miodLibrary') { if (this.isDesFormType === 'miodLibrary') {
if (this.selectedCategory.isType === 3) { if (this.selectedCategory.isType === 3) {
this.$set(this.addOrUpdateForm, item.fieldName, this.selectedCategory.label) this.$set(this.addOrUpdateForm, item.fieldName, this.selectedCategory.label)

Loading…
Cancel
Save