Browse Source

档案管理-搜索/智能分类/回收站

master
xuhuajiao 3 years ago
parent
commit
2fc1199879
  1. 5
      src/assets/styles/archives-manage.scss
  2. 4
      src/assets/styles/lend-manage.scss
  3. 4
      src/assets/styles/yxk-admin.scss
  4. 232
      src/views/archivesManage/archivesList/index.vue
  5. 205
      src/views/archivesManage/archivesList/module/archivesAnjuan/index.vue
  6. 3
      src/views/archivesManage/archivesList/module/archivesInfo/index.vue
  7. 204
      src/views/archivesManage/archivesList/module/archivesJuannei/index.vue
  8. 211
      src/views/archivesManage/archivesList/module/archivesProject/index.vue
  9. 172
      src/views/archivesManage/recycleBin/index.vue

5
src/assets/styles/archives-manage.scss

@ -11,6 +11,9 @@ $arcCyan: #0FBED9;
.archives-crud{
float: left;
}
.archives-recycle{
float: left;
}
.head-search{
float: left;
margin-left: 10px;
@ -243,7 +246,7 @@ $arcCyan: #0FBED9;
::v-deep.el-dialog{
width: 940px;
.el-dialog__body{
padding: 20px 0;
padding: 20px 0 30px 0;
}
}
}

4
src/assets/styles/lend-manage.scss

@ -52,9 +52,7 @@ color:#F65163;
color: #F65163;
border: 1px solid #F65163;
}
.svg-style{
margin-right: 5px;
}
//3D库房
.iframe_box{

4
src/assets/styles/yxk-admin.scss

@ -978,4 +978,8 @@ input[type='number'] {
.el-table__header-wrapper{
background-color: #02255f;
border-top: 1px solid #113d72;
}
.svg-style{
margin-right: 5px;
}

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

@ -7,21 +7,21 @@
<span class="right-top-line" />
<span class="left-bottom-line" />
<div class="tree-title">档案门类</div>
<!--门类树状结构-->
<!--档案门类树状结构-->
<el-tree ref="archivesTree" v-loading="crud.loading" :data="crud.data" :props="defaultProps" node-key="id" :expand-on-click-node="false" highlight-current @node-click="handleNodeClick" />
</div>
<div class="container-left left-tree-item">
<div v-if="!isRecycle" class="container-left left-tree-item">
<span class="right-top-line" />
<span class="left-bottom-line" />
<div class="tree-title">智能分类</div>
<!--类树状结构-->
<el-tree ref="tree" v-loading="intellClassifyLoading" :data="intellClassifyTree" :props="intellDefaultProps" node-key="id" :expand-on-click-node="false" highlight-current @node-click="handleIntellNodeClick" />
<!--智能分类树状结构-->
<el-tree ref="smartTree" v-loading="intellClassifyLoading" :data="intellClassifyTree" :props="intellDefaultProps" node-key="id" :expand-on-click-node="false" highlight-current @node-click="handleIntellNodeClick" />
</div>
</el-col>
<!-- 档案管理列表 -->
<el-col class="archives-right-list" :xs="14" :sm="18" :md="19" :lg="18" :xl="19">
<div v-if="selectedCategory.isType !== 1" :class="['archives-top', {'archives-fixed-top': selectedCategory.isType===2 || selectedCategory.isType===4 }]">
<div v-if="selectedCategory.isType !== 1 && !isRecycle" :class="['archives-top', {'archives-fixed-top': selectedCategory.isType===2 || selectedCategory.isType===4 }]">
<el-checkbox v-model="fixedStatusBar">隐藏固定状态栏</el-checkbox>
</div>
<!-- <archivesDetail :selected-category="selectedCategory" /> -->
@ -29,7 +29,10 @@
<archivesProject
v-if="selectedCategory.isType === 2"
ref="project"
:isdel="isdel"
:is-recycle="isRecycle"
:selected-category="selectedCategory"
:smart-query="smartQuery"
@getAjInProjectBtnState="getAjInProjectBtnState"
@getProjectSelections="getProjectSelections"
/>
@ -37,21 +40,29 @@
<archivesAnjuan
v-if="selectedCategory.isType === 2 || selectedCategory.isType === 3|| selectedCategory.isType === 5"
ref="anjuan"
:isdel="isdel"
:is-recycle="isRecycle"
:selected-category="selectedCategory"
:is-project="isProject"
:project-selection="projectSelection"
:fixed-status-bar="fixedStatusBar"
:archive-year="archiveYear"
:smart-query="smartQuery"
@getJnInAjBtnState="getJnInAjBtnState"
@getSelections="getSelections"
v-on="$listeners"
/>
<!-- 卷内 -->
<archivesJuannei
v-if="selectedCategory.isType === 2 || selectedCategory.isType === 3 || selectedCategory.isType === 4"
ref="file"
:isdel="isdel"
:is-recycle="isRecycle"
:is-anjuan="isAnjuan"
:anjuan-selection="anjuanSelection"
:selected-category="selectedCategory"
:fixed-status-bar="fixedStatusBar"
:smart-query="smartQuery"
/>
</el-col>
</el-row>
@ -59,7 +70,6 @@
</template>
<script>
// import archivesDetail from './archivesDetail'
import { getDicts } from '@/api/archivesConfig/dict'
import archivesProject from './module/archivesProject/index'
import archivesAnjuan from './module/archivesAnjuan/index'
@ -79,6 +89,16 @@ export default {
]
},
mixins: [presenter()],
props: {
isdel: {
type: Boolean,
default: false
},
isRecycle: {
type: Boolean,
default: false
}
},
data() {
return {
intellClassifyTree: [],
@ -96,7 +116,21 @@ export default {
anjuanSelection: {},
projectSelection: {},
intellClassifyLoading: false,
fixedStatusBar: false
fixedStatusBar: false,
archiveYear: null,
smartQuery: {
'archiveYear': null,
'department': null,
'retention': null,
'securityClass': null,
'organizationMatter': null
}
}
},
watch: {
isdel: function(newValue, oldValue) {
},
isRecycle: function(newValue, oldValue) {
}
},
methods: {
@ -169,67 +203,28 @@ export default {
//
handleNodeClick(val) {
if (val) {
this.crud.selectionChangeHandler([val])
this.selectedCategory = val
if (val.isType === 2) {
this.$nextTick(() => {
this.$refs.anjuan.anjuanData = []
this.$refs.file.junneiData = []
if (val.children.length !== 0) {
this.$refs.anjuan.getTableDisplayFields()
this.$refs.file.getTableDisplayFields()
}
this.$refs.project.getTableList()
this.getYear('project')
})
} else if (val.isType === 3) {
this.$nextTick(() => {
this.$refs.anjuan.anjuanData = []
this.$refs.file.junneiData = []
this.$refs.anjuan.getTableDisplayFields()
if (val.children.length !== 0) {
this.$refs.file.getTableDisplayFields()
}
this.$refs.anjuan.getTableList()
this.getYear('anjuan')
})
} else if (val.isType === 4) {
this.$nextTick(() => {
this.$refs.file.junneiData = []
this.$refs.file.getTableDisplayFields()
this.$refs.file.getTableList()
this.getYear('file')
})
} else if (val.isType === 5) {
this.$nextTick(() => {
this.$refs.anjuan.anjuanData = []
this.$refs.anjuan.getTableDisplayFields()
this.$refs.anjuan.getTableList()
this.getYear('anjuan')
//
if (this.$refs.smartTree) {
const smartTreeList = this.intellClassifyTree
this.smartQuery = {
'archiveYear': null,
'department': null,
'retention': null,
'securityClass': null,
'organizationMatter': null
}
this.$refs.smartTree.setCurrentKey(null)
smartTreeList.forEach((item, index) => {
this.$refs.smartTree.store.nodesMap[smartTreeList[index].id].expanded = false
})
}
this.crud.selectionChangeHandler([val])
this.selectedCategory = val
this.handleTableList()
//
localStorage.setItem('currentArchivesKey', JSON.stringify(val))
}
},
getYear(obj) {
this.intellClassifyLoading = true
setTimeout(() => {
if (this.intellClassifyTree[0].dicName === '年度') {
this.intellClassifyTree = this.intellClassifyTree.slice(1)
}
if (this.$refs[obj].yearGroup.length !== 0) {
const newYearArr = this.$refs[obj].yearGroup.map(item => {
const json = {}
json.dicName = item
json.childMenus = []
return json
})
this.intellClassifyTree.unshift({ 'dicName': '年度', 'childMenus': newYearArr })
}
this.intellClassifyLoading = false
}, 500)
},
// -btn-
getJnInAjBtnState(data) {
this.isAnjuan = data
@ -238,6 +233,13 @@ export default {
this.isProject = data
},
getProjectSelections(data, selectData) {
this.smartQuery = {
'archiveYear': null,
'department': null,
'retention': null,
'securityClass': null,
'organizationMatter': null
}
if ((selectData && selectData.length > 1) || (selectData && selectData.length === 0)) {
this.projectSelection = {}
this.$nextTick(() => {
@ -262,6 +264,13 @@ export default {
}
},
getSelections(data, selectData) {
this.smartQuery = {
'archiveYear': null,
'department': null,
'retention': null,
'securityClass': null,
'organizationMatter': null
}
if ((selectData && selectData.length > 1) || (selectData && selectData.length === 0)) {
this.anjuanSelection = {}
this.$nextTick(() => {
@ -285,10 +294,107 @@ export default {
})
}
},
getYear(obj) {
if (this.$refs.smartTree) {
this.intellClassifyLoading = true
setTimeout(() => {
if (this.intellClassifyTree[0].dicName === '年度') {
this.intellClassifyTree = this.intellClassifyTree.slice(1)
}
if (this.$refs[obj].yearGroup.length !== 0) {
const newYearArr = this.$refs[obj].yearGroup.map((item, index) => {
const json = {}
json.id = index
json.dicName = item
json.childMenus = []
return json
})
this.intellClassifyTree.unshift({ id: -1, dicName: '年度', childMenus: newYearArr })
}
this.intellClassifyLoading = false
}, 500)
}
},
//
handleIntellNodeClick(val) {
if (val) {
console.log(val)
const selectedKey = this.$refs.smartTree.getCurrentNode()
const selectedParentVal = this.$refs.smartTree.getNode(selectedKey).parent.label
switch (selectedParentVal) {
case '年度':
if (selectedKey.dicName !== '年度') {
this.smartQuery.archiveYear = selectedKey.dicName
}
break
case '部门名称':
if (selectedKey.dicName !== '部门名称') {
this.smartQuery.department = selectedKey.dicName
}
break
case '保管期限':
if (selectedKey.dicName !== '保管期限') {
this.smartQuery.retention = selectedKey.dicName
}
break
case '密级':
if (selectedKey.dicName !== '密级') {
this.smartQuery.securityClass = selectedKey.dicName
}
break
case ' 机构(问题)':
if (selectedKey.dicName !== '机构(问题)') {
this.smartQuery.organizationMatter = selectedKey.dicName
}
break
// default:
// this.smartQuery = {
// 'archiveYear': null,
// 'department': null,
// 'retention': null,
// 'securityClass': null,
// 'organizationMatter': null
// }
}
this.handleTableList()
}
},
handleTableList() {
if (this.selectedCategory.isType === 2) {
this.$nextTick(() => {
this.$refs.anjuan.anjuanData = []
this.$refs.file.junneiData = []
if (this.selectedCategory.children.length !== 0) {
this.$refs.anjuan.getTableDisplayFields()
this.$refs.file.getTableDisplayFields()
}
this.$refs.project.getTableList()
this.getYear('project')
})
} else if (this.selectedCategory.isType === 3) {
this.$nextTick(() => {
this.$refs.anjuan.anjuanData = []
this.$refs.file.junneiData = []
this.$refs.anjuan.getTableDisplayFields()
if (this.selectedCategory.children.length !== 0) {
this.$refs.file.getTableDisplayFields()
}
this.$refs.anjuan.getTableList()
this.getYear('anjuan')
})
} else if (this.selectedCategory.isType === 4) {
this.$nextTick(() => {
this.$refs.file.junneiData = []
this.$refs.file.getTableDisplayFields()
this.$refs.file.getTableList()
this.getYear('file')
})
} else if (this.selectedCategory.isType === 5) {
this.$nextTick(() => {
this.$refs.anjuan.anjuanData = []
this.$refs.anjuan.getTableDisplayFields()
this.$refs.anjuan.getTableList()
this.getYear('anjuan')
})
}
}
}

205
src/views/archivesManage/archivesList/module/archivesAnjuan/index.vue

@ -2,7 +2,7 @@
<div class="archives-warp">
<!--工具栏-->
<div class="head-container head-archives clearfix">
<div class="archives-crud">
<div v-if="!isRecycle" class="archives-crud">
<!-- 新增 -->
<el-button size="mini" :disabled="isProject && selectedCategory.isType === 2" icon="el-icon-plus" @click="handleForm('add')">新增</el-button>
<!-- 修改 -->
@ -14,16 +14,22 @@
<!-- 上传附件btn 针对卷内/文件 单选 -->
<el-button v-if="selectedCategory.isType===5" :disabled="selections.length !== 1" size="mini" icon="el-icon-download" @click="uploadFile">上传附件</el-button>
</div>
<div v-else class="archives-recycle">
<el-button icon="el-icon-delete" size="mini" :disabled="selections.length === 0" @click="toDelete(selections)">彻底删除</el-button>
<el-button size="mini" :disabled="selections.length === 0" @click="handleRestore">
<svg-icon icon-class="huanyuan-fanbai" class="svg-style" />
还原
</el-button>
</div>
<div class="head-search">
<!-- 搜索 -->
<!-- @change="crud.toQuery" -->
<el-select v-model="query.enabled" clearable size="small" placeholder="状态" class="filter-item" style="width: 100px">
<el-select v-model="anjuanQuery.enabled" clearable size="small" placeholder="状态" class="filter-item" style="width: 100px">
<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>
<!-- @keyup.enter.native="crud.toQuery" -->
<el-input v-model="query[inputSelect]" clearable size="small" placeholder="请输入关键词" style="width: 200px;" class="input-prepend filter-item">
<el-select slot="prepend" v-model="inputSelect" style="width: 80px" @change="querySelect">
<el-input v-model="anjuanQuery[anjuanInputSelect]" clearable size="small" placeholder="请输入关键词" style="width: 200px;" class="input-prepend filter-item" @clear="getTableList()">
<el-select slot="prepend" v-model="anjuanInputSelect" style="width: 80px" @change="querySelect">
<el-option
v-for="item in queryOption"
:key="item.value"
@ -32,14 +38,14 @@
/>
</el-select>
</el-input>
<el-button class="filter-item" size="mini" type="success" icon="el-icon-search" @click="crud.toQuery">搜索</el-button>
<el-button class="filter-item" size="mini" type="success" icon="el-icon-search" @click="getTableList()">搜索</el-button>
</div>
<div class="archives-handler-btn">
<div v-if="!isRecycle" class="archives-handler-btn">
<!-- 装盒btn 多选 -->
<!-- <svg-icon icon-class="zhuanghe" /> -->
<el-button class="packing-btn iconfont icon-sr-dn-pz" type="primary" :disabled="selections.length === 0" @click="handlePacking(selections)">装盒</el-button>
<!-- 分卷装盒btn 针对案卷-单选 -->
<el-button v-if="selectedCategory.isType === 3" class="part-btn iconfont icon-weibiaoti-2" type="primary" :disabled="selections.length !== 1" @click="handlePartPacking(selections)">分卷装盒</el-button>
<el-button v-if="selectedCategory.isType === 3 || selectedCategory.isType === 2" class="part-btn iconfont icon-weibiaoti-2" type="primary" :disabled="selections.length !== 1" @click="handlePartPacking(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="selections.length === 0" type="primary" @click="lengingVisible=true">借阅</el-button>
@ -54,7 +60,7 @@
<span class="dialog-left-bottom" />
<div class="setting-dialog">
<!-- form -->
<PreviewForm v-if="formPreviewData.length && archivesTabIndex == 0" ref="previewForm" :is-has-code="false" :is-disabled="false" :form-preview-data.sync="formPreviewData" :selected-category="selectedCategory" :parents-id="parentsId" :arc-id="arcId" @emitTableList="getTableList" />
<PreviewForm v-if="formPreviewData.length" ref="previewForm" :is-has-code="false" :is-disabled="false" :form-preview-data.sync="formPreviewData" :selected-category="selectedCategory" :parents-id="parentsId" :arc-id="arcId" @emitTableList="getTableList" />
<div slot="footer" class="dialog-footer">
<!-- :loading="crud.status.cu === 2" -->
<el-button type="primary" @click="handlerArchivesSubmit">保存</el-button>
@ -90,7 +96,8 @@
class="archives-table"
:data="anjuanData"
highlight-current-row
style="width: 100%; "
style="width: 100%;"
@select-all="selectAll"
@selection-change="crud.selectionChangeHandler"
@row-click="clickRowHandler"
@cell-dblclick="tableDoubleClick"
@ -114,26 +121,26 @@
{{ scope.row[field.fieldName] }}
</template>
</el-table-column>
<el-table-column label="装盒" width="100" align="center" :fixed="fixedStatusBar?false:'right'">
<el-table-column v-if="!isRecycle" 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 label="入库" width="100" align="center" :fixed="fixedStatusBar?false:'right'">
<el-table-column v-if="!isRecycle" 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 label="借阅" width="100" align="center" :fixed="fixedStatusBar?false:'right'">
<el-table-column v-if="!isRecycle" 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 label="标签" width="100" align="center" :fixed="fixedStatusBar?false:'right'">
<el-table-column v-if="!isRecycle" label="标签" width="100" align="center" :fixed="fixedStatusBar?false:'right'">
<template slot-scope="scope">
<!-- 未绑 / 已绑 -->
<span class="row-state row-binding">{{ scope.row.tid ? '已绑': '未绑' }}</span>
@ -183,12 +190,25 @@
</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 } from '@/api/archivesManage/archivesList'
import { del, FetchTableDisplayFields, FetchInitArchivesView, FetchFormDisplayFields, FetchArchivesDetails, FetchArchivesMetadata, FetchCompletelyDelete, FetchReduction } from '@/api/archivesManage/archivesList'
import { header, form } from '@crud/crud'
import { mapGetters } from 'vuex'
import { exportFile } from '@/utils/index'
@ -226,10 +246,30 @@ export default {
fixedStatusBar: {
type: Boolean,
default: false
},
smartQuery: {
type: Object,
default: function() {
return {}
}
},
isdel: {
type: Boolean,
default: false
},
isRecycle: {
type: Boolean,
default: false
}
},
data() {
return {
permission: {
add: ['admin', 'archivesList:add'],
edit: ['admin', 'archivesList:edit'],
del: ['admin', 'archivesList:del'],
download: ['admin', 'archivesList:download']
},
page: {
page: 0,
size: 10,
@ -238,10 +278,17 @@ export default {
anjuanData: [],
formVisible: false,
formTitle: '新建档案',
isAddOrEditBtn: null,
tableDisplayFields: [], // table-list-title
getTableDisplayFieldsLoading: false, // table-loading
formPreviewData: [], // data
anjuanQuery: {},
query: {
'queryType': null,
'queryTitle': null,
'recordNo': null,
'archiveCtgNo': null,
'archiveNo': null
},
stateOptions: [ // -
{ key: '1', label: '全部' },
{ key: '2', label: '未装' },
@ -251,33 +298,27 @@ export default {
{ key: '6', label: '已借' }
],
queryOption: [
{ value: 'maintitle', label: '题名' },
{ value: 'archive_no', label: '档号' }
{ value: 'queryTitle', label: '题名' },
{ value: 'archiveNo', label: '档号' }
],
inputSelect: '',
permission: {
add: ['admin', 'archivesList:add'],
edit: ['admin', 'archivesList:edit'],
del: ['admin', 'archivesList:del'],
download: ['admin', 'archivesList:download']
},
anjuanInputSelect: '',
deleteVisible: false, // dialog
deleteData: {}, // data
totalSumAll: 0, //
arrySort: [], // sort-query
selections: [], // table
archivesTabIndex: 0, //
categoryId: null,
categoryId: null, // 使
parentsId: null, // id
arcId: null, // ID
arrySort: [], // sort-query
uploadFileVisible: false, //
archivesInfoVisible: false, //
lengingVisible: false, //
isBinding: false, //
parentsId: null,
isAnjuan: true,
totalSumAll: 0, //
yearGroup: [],
archivesDetailsData: [],
archivesDetailsMetadata: ''
isAnjuan: true, // -/
yearGroup: [], // -
archivesDetailsData: [], // data -
archivesDetailsMetadata: '', // data -
restoreVisible: false
}
},
computed: {
@ -296,15 +337,21 @@ export default {
fixedStatusBar: function(newValue, oldValue) {
},
projectSelection: function(newValue, oldValue) {
},
smartQuery: {
handler(n, o) {
},
deep: true
}
},
created() {
// select -
this.inputSelect = this.queryOption[0].value
this.anjuanInputSelect = this.queryOption[0].value
},
mounted() {
},
methods: {
doExport(fileName = '未知文件') {
this.crud.downloadLoading = true
if (this.selectedCategory.pid !== '0') {
@ -321,7 +368,7 @@ export default {
},
// -select
querySelect(val) {
this.inputSelect = val
this.anjuanInputSelect = val
},
//
getTableDisplayFields() {
@ -348,6 +395,15 @@ export default {
},
// list
getTableList(page) {
switch (this.anjuanInputSelect) {
case 'queryTitle': //
this.query.queryTitle = this.anjuanQuery[this.anjuanInputSelect]
break
case 'archiveNo': //
this.query.archiveNo = this.anjuanQuery[this.anjuanInputSelect]
break
}
this.page.page = isNaN(page - 1) ? 0 : page - 1
this.formVisible = false
this.getTableDisplayFieldsLoading = true
@ -359,10 +415,20 @@ export default {
const params = {
'categoryId': this.categoryId,
'parentsId': this.parentsId,
'isdel': false,
'isdel': this.isdel,
'page': this.page.page,
'size': this.page.size,
'sort': this.arrySort
'sort': this.arrySort,
'queryType': this.query.queryType,
'queryTitle': this.query.queryTitle,
'recordNo': this.query.recordNo,
'archiveCtgNo': this.query.archiveCtgNo,
'archiveNo': this.query.archiveNo,
'archiveYear': this.smartQuery.archiveYear,
'department': this.smartQuery.department,
'retention': this.smartQuery.retention,
'securityClass': this.smartQuery.securityClass,
'organizationMatter': this.smartQuery.organizationMatter
}
FetchInitArchivesView(params).then(data => {
this.getTableDisplayFieldsLoading = false
@ -395,7 +461,6 @@ export default {
},
getFormInfo(params, type) {
FetchFormDisplayFields(params).then(data => {
// this.formPreviewData = data.showFiled.filter((fields) => { return fields.isInput })
this.formPreviewData = data.showFiled
this.$nextTick(() => {
if (type === 'edit') {
@ -409,6 +474,12 @@ export default {
this.$refs.previewForm.submitForm('addOrUpdateForm', this.categoryId)
this.selections = []
},
// table -
selectAll(val) {
this.selections = val
this.isAnjuan = val.length !== 1
this.$emit('getJnInAjBtnState', this.isAnjuan)
},
// table -
tableDoubleClick(row) {
if (this.selectedCategory.isType !== 5) {
@ -480,20 +551,34 @@ export default {
'categoryId': this.categoryId
}
// fetch
del(params).then(res => {
this.crud.delAllLoading = false
this.$notify({
title: '删除成功',
type: 'success',
duration: 2500
if (!this.isRecycle) {
del(params).then(res => {
this.crud.delAllLoading = false
this.$notify({
title: '删除成功',
type: 'success',
duration: 2500
})
this.selections = []
this.getTableList()
})
this.selections = []
this.getTableList()
})
} else {
FetchCompletelyDelete(params).then(res => {
this.crud.delAllLoading = false
this.$notify({
title: '删除成功',
type: 'success',
duration: 2500
})
this.selections = []
this.getTableList()
})
}
},
// -
handleClose(done) {
this.formVisible = false
this.restoreVisible = false
this.deleteData = {}
done()
},
@ -512,6 +597,30 @@ export default {
this.$refs.uploadFile.getFileList()
})
},
//
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 => {
this.$notify({
title: '还原成功',
type: 'success',
duration: 2500
})
this.selections = []
this.getTableList()
this.restoreVisible = false
})
},
//
handleBinding(data) {
this.$refs.bind.bindingVisible = true

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

@ -36,9 +36,6 @@
</pre>
</div>
</div>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click.native="archivesInfoVisible = false">确定</el-button>
</div>
</div>
</el-dialog>
</template>

204
src/views/archivesManage/archivesList/module/archivesJuannei/index.vue

@ -2,7 +2,7 @@
<div class="archives-warp">
<!--工具栏-->
<div class="head-container head-archives clearfix">
<div class="archives-crud">
<div v-if="!isRecycle" class="archives-crud">
<!-- 新增 -->
<el-button v-if="selectedCategory.isType !== 4" size="mini" :disabled="isAnjuan" icon="el-icon-plus" @click="handleForm('add')">新增</el-button>
<!-- 修改 -->
@ -14,10 +14,16 @@
<!-- 上传附件btn 针对卷内/文件 单选 -->
<el-button :disabled="selections.length !== 1" size="mini" icon="el-icon-download" @click="uploadFile">上传附件</el-button>
</div>
<div class="head-search">
<div v-else class="archives-recycle">
<el-button icon="el-icon-delete" :disabled="selections.length === 0" size="mini" @click="toDelete(selections)">彻底删除</el-button>
<el-button size="mini" :disabled="selections.length === 0" @click="handleRestore">
<svg-icon icon-class="huanyuan-fanbai" class-name="svg-style" />还原
</el-button>
</div>
<div v-if="!isRecycle" class="head-search">
<!-- @keyup.enter.native="crud.toQuery" -->
<el-input v-model="query[inputSelect]" clearable size="small" placeholder="请输入关键词" style="width: 200px;" class="input-prepend filter-item">
<el-select slot="prepend" v-model="inputSelect" style="width: 80px" @change="querySelect">
<el-input v-model="juanneiQuery[juanneiInputSelect]" clearable size="small" placeholder="请输入关键词" style="width: 200px;" class="input-prepend filter-item" @clear="getTableList()">
<el-select slot="prepend" v-model="juanneiInputSelect" style="width: 80px" @change="querySelect">
<el-option
v-for="item in queryOption"
:key="item.value"
@ -26,7 +32,7 @@
/>
</el-select>
</el-input>
<el-button class="filter-item" size="mini" type="success" icon="el-icon-search" @click="crud.toQuery">搜索</el-button>
<el-button class="filter-item" size="mini" type="success" icon="el-icon-search" @click="getTableList()">搜索</el-button>
</div>
</div>
@ -36,7 +42,7 @@
<span class="dialog-left-bottom" />
<div class="setting-dialog">
<!-- form -->
<PreviewForm v-if="formPreviewData.length && archivesTabIndex == 0" ref="previewForm" :is-has-code="false" :is-disabled="false" :form-preview-data.sync="formPreviewData" :selected-category="selectedCategory" :parents-id="parentsId" :arc-id="arcId" @emitTableList="getTableList" />
<PreviewForm v-if="formPreviewData.length" ref="previewForm" :is-has-code="false" :is-disabled="false" :form-preview-data.sync="formPreviewData" :selected-category="selectedCategory" :parents-id="parentsId" :arc-id="arcId" @emitTableList="getTableList" />
<div slot="footer" class="dialog-footer">
<!-- :loading="crud.status.cu === 2" -->
<el-button type="primary" @click="handlerArchivesSubmit">保存</el-button>
@ -61,7 +67,6 @@
</el-dialog>
<!-- table表格渲染 -->
<!-- height="calc(100vh - 350px)" -->
<el-card class="box-card" shadow="never">
<span class="right-top-line" />
<span class="left-bottom-line" />
@ -71,7 +76,8 @@
class="archives-table"
:data="junneiData"
highlight-current-row
style="width: 100%; "
style="width: 100%;"
@select-all="selectAll"
@selection-change="crud.selectionChangeHandler"
@row-click="clickRowHandler"
@cell-dblclick="tableDoubleClick"
@ -95,14 +101,14 @@
{{ scope.row[field.fieldName] }}
</template>
</el-table-column>
<el-table-column label="装盒" width="100" align="center" :fixed="fixedStatusBar?false:'right'">
<el-table-column v-if="!isRecycle" 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 label="入库" width="100" align="center" :fixed="fixedStatusBar?false:'right'">
<el-table-column v-if="!isRecycle" label="入库" width="100" align="center" :fixed="fixedStatusBar?false:'right'">
<template slot-scope="">
<!-- 未入 / 已入 -->
<span class="row-state row-warehousing">未入</span>
@ -132,19 +138,29 @@
<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 } from '@/api/archivesManage/archivesList'
import { del, FetchTableDisplayFields, FetchInitArchivesView, FetchFormDisplayFields, FetchArchivesDetails, FetchArchivesMetadata, FetchCompletelyDelete, FetchReduction } from '@/api/archivesManage/archivesList'
import { header, form } from '@crud/crud'
import { mapGetters } from 'vuex'
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 ArchivesInfo from '../archivesInfo/index'
import UploadFile from '../uploadFile/index'
@ -176,10 +192,30 @@ export default {
default: function() {
return {}
}
},
smartQuery: {
type: Object,
default: function() {
return {}
}
},
isdel: {
type: Boolean,
default: false
},
isRecycle: {
type: Boolean,
default: false
}
},
data() {
return {
permission: {
add: ['admin', 'archivesList:add'],
edit: ['admin', 'archivesList:edit'],
del: ['admin', 'archivesList:del'],
download: ['admin', 'archivesList:download']
},
page: {
page: 0,
size: 10,
@ -192,6 +228,14 @@ export default {
tableDisplayFields: [], // table-list-title
getTableDisplayFieldsLoading: false, // table-loading
formPreviewData: [], // data
juanneiQuery: {},
query: {
'queryType': null,
'queryTitle': null,
'recordNo': null,
'archiveCtgNo': null,
'archiveNo': null
},
stateOptions: [ // -
{ key: '1', label: '全部' },
{ key: '2', label: '未装' },
@ -201,33 +245,25 @@ export default {
{ key: '6', label: '已借' }
],
queryOption: [
{ value: 'maintitle', label: '题名' },
{ value: 'archive_no', label: '档号' }
{ value: 'queryTitle', label: '题名' },
{ value: 'archiveNo', label: '档号' },
{ value: 'archiveCtgNo', label: '实体分类号' }
],
inputSelect: '',
permission: {
add: ['admin', 'archivesList:add'],
edit: ['admin', 'archivesList:edit'],
del: ['admin', 'archivesList:del'],
download: ['admin', 'archivesList:download']
},
juanneiInputSelect: '',
deleteVisible: false, // dialog
deleteData: {}, // data
totalSumAll: 0, //
selections: [], // table
archivesTabIndex: 0, //
categoryId: null,
parentsId: null, // id
arcId: null, // ID
arrySort: [], // sort-query
yearGroup: [], // -
uploadFileVisible: false, //
archivesInfoVisible: false, //
lengingVisible: false, //
isBinding: false, //
parentsId: null,
categoryId: null,
totalSumAll: 0,
yearGroup: [],
archivesDetailsData: [],
archivesDetailsMetadata: '',
doubleCurrentRow: null
archivesDetailsData: [], // data -
archivesDetailsMetadata: '', // data -
restoreVisible: false
}
},
computed: {
@ -247,11 +283,16 @@ export default {
fixedStatusBar: function(newValue, oldValue) {
},
anjuanSelection: function(newValue, oldValue) {
},
smartQuery: {
handler(n, o) {
},
deep: true
}
},
created() {
// select -
this.inputSelect = this.queryOption[0].value
this.juanneiInputSelect = this.queryOption[0].value
this.selections = []
},
mounted() {
@ -274,7 +315,7 @@ export default {
},
// -select
querySelect(val) {
this.inputSelect = val
this.juanneiInputSelect = val
},
//
getTableDisplayFields() {
@ -304,6 +345,17 @@ export default {
},
// list
getTableList(page) {
switch (this.juanneiInputSelect) {
case 'queryTitle': //
this.query.queryTitle = this.juanneiQuery[this.juanneiInputSelect]
break
case 'archiveNo': //
this.query.archiveNo = this.juanneiQuery[this.juanneiInputSelect]
break
case 'archiveCtgNo': //
this.query.archiveCtgNo = this.juanneiQuery[this.juanneiInputSelect]
break
}
this.page.page = isNaN(page - 1) ? 0 : page - 1
this.formVisible = false
this.getTableDisplayFieldsLoading = true
@ -315,10 +367,20 @@ export default {
const params = {
'categoryId': this.categoryId,
'parentsId': this.parentsId,
'isdel': false,
'isdel': this.isdel,
'page': this.page.page,
'size': this.page.size,
'sort': this.arrySort
'sort': this.arrySort,
'queryType': this.query.queryType,
'queryTitle': this.query.queryTitle,
'recordNo': this.query.recordNo,
'archiveCtgNo': this.query.archiveCtgNo,
'archiveNo': this.query.archiveNo,
'archiveYear': this.smartQuery.archiveYear,
'department': this.smartQuery.department,
'retention': this.smartQuery.retention,
'securityClass': this.smartQuery.securityClass,
'organizationMatter': this.smartQuery.organizationMatter
}
FetchInitArchivesView(params).then(data => {
this.getTableDisplayFieldsLoading = false
@ -351,7 +413,6 @@ export default {
},
getFormInfo(params, type) {
FetchFormDisplayFields(params).then(data => {
// this.formPreviewData = data.showFiled.filter((fields) => { return fields.isInput })
this.formPreviewData = data.showFiled
this.$nextTick(() => {
if (type === 'edit') {
@ -365,13 +426,16 @@ export default {
this.$refs.previewForm.submitForm('addOrUpdateForm', this.categoryId)
this.selections = []
},
// table -
selectAll(val) {
this.selections = val
},
// table -
tableDoubleClick(row) {
this.$refs.archivesInfo.isHasFile = true
this.$refs.archivesInfo.detailTitle = '档案详情'
this.$refs.archivesInfo.archivesInfoVisible = true
this.$refs.archivesInfo.archivesTabIndex = 0
this.doubleCurrentRow = row
const params = {
categoryId: this.categoryId,
archivesId: row.id
@ -387,6 +451,9 @@ export default {
},
// table - row
clickRowHandler(row) {
this.selections = this.crud.selections
this.$refs.table.clearSelection()
this.$refs.table.toggleRowSelection(row)
},
//
handleCurrentChange(selection, row) {
@ -396,7 +463,6 @@ export default {
toDelete(data) {
this.deleteData = data
this.deleteVisible = true
this.totalSumAll = 0
this.deleteData.map((item) => { if (!isNaN(item.children_num)) this.totalSumAll += item.children_num })
if (isNaN(this.totalSumAll)) {
@ -417,20 +483,34 @@ export default {
'categoryId': this.categoryId
}
// fetch
del(params).then(res => {
this.crud.delAllLoading = false
this.$notify({
title: '删除成功',
type: 'success',
duration: 2500
if (!this.isRecycle) {
del(params).then(res => {
this.crud.delAllLoading = false
this.$notify({
title: '删除成功',
type: 'success',
duration: 2500
})
this.selections = []
this.getTableList()
})
this.selections = []
this.getTableList()
})
} else {
FetchCompletelyDelete(params).then(res => {
this.crud.delAllLoading = false
this.$notify({
title: '删除成功',
type: 'success',
duration: 2500
})
this.selections = []
this.getTableList()
})
}
},
// -
handleClose(done) {
this.formVisible = false
this.restoreVisible = false
this.deleteData = {}
done()
},
@ -448,6 +528,30 @@ export default {
this.$refs.uploadFile.tableData = []
this.$refs.uploadFile.getFileList()
})
},
//
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 => {
this.$notify({
title: '还原成功',
type: 'success',
duration: 2500
})
this.selections = []
this.getTableList()
this.restoreVisible = false
})
}
}
}

211
src/views/archivesManage/archivesList/module/archivesProject/index.vue

@ -2,18 +2,24 @@
<div class="archives-warp">
<!--工具栏-->
<div class="head-container head-archives clearfix">
<div class="archives-crud">
<div v-if="!isRecycle" class="archives-crud">
<!-- 新增 -->
<el-button size="mini" icon="el-icon-plus" @click="handleForm('add')">新增</el-button>
<!-- 修改 -->
<el-button size="mini" icon="el-icon-edit" :disabled="selections .length !== 1" @click="handleForm('edit')">修改</el-button>
<!-- 删除btn 多选 -->
<el-button v-permission="permission.del" icon="el-icon-delete" size="mini" :loading="crud.delAllLoading" :disabled="selections .length === 0" @click="toDelete(selections )">删除</el-button>
<el-button icon="el-icon-delete" size="mini" :loading="crud.delAllLoading" :disabled="selections.length === 0" @click="toDelete(selections)">删除</el-button>
</div>
<div v-else class="archives-recycle">
<el-button icon="el-icon-delete" size="mini" :disabled="selections.length === 0" @click="toDelete(selections)">彻底删除</el-button>
<el-button size="mini" :disabled="selections.length === 0" @click="handleRestore">
<svg-icon icon-class="huanyuan-fanbai" class-name="svg-style" />还原
</el-button>
</div>
<div class="head-search">
<!-- @keyup.enter.native="crud.toQuery" -->
<el-input v-model="query[inputSelect]" clearable size="small" placeholder="请输入关键词" style="width: 200px;" class="input-prepend filter-item">
<el-select slot="prepend" v-model="inputSelect" style="width: 80px" @change="querySelect">
<el-input v-model="projectQuery[projectInputSelect]" clearable size="small" placeholder="请输入关键词" style="width: 200px;" class="input-prepend filter-item" @clear="getTableList()">
<el-select slot="prepend" v-model="projectInputSelect" style="width: 80px" @change="querySelect">
<el-option
v-for="item in queryOption"
:key="item.value"
@ -22,7 +28,7 @@
/>
</el-select>
</el-input>
<el-button class="filter-item" size="mini" type="success" icon="el-icon-search" @click="crud.toQuery">搜索</el-button>
<el-button class="filter-item" size="mini" type="success" icon="el-icon-search" @click="getTableList()">搜索</el-button>
</div>
</div>
@ -32,7 +38,7 @@
<span class="dialog-left-bottom" />
<div class="setting-dialog">
<!-- form -->
<PreviewForm v-if="formPreviewData.length && archivesTabIndex == 0" ref="previewForm" :is-has-code="true" :is-disabled="false" :form-preview-data.sync="formPreviewData" :selected-category="selectedCategory" :parents-id="parentsId" :arc-id="arcId" @emitTableList="getTableList" />
<PreviewForm v-if="formPreviewData.length" ref="previewForm" :is-has-code="true" :is-disabled="false" :form-preview-data.sync="formPreviewData" :selected-category="selectedCategory" :parents-id="parentsId" :arc-id="arcId" @emitTableList="getTableList" />
<div slot="footer" class="dialog-footer">
<!-- :loading="crud.status.cu === 2" -->
<el-button type="primary" @click="handlerArchivesSubmit">保存</el-button>
@ -67,7 +73,8 @@
class="archives-table"
:data="projectData"
highlight-current-row
style="width: 100%; "
style="width: 100%;"
@select-all="selectAll"
@selection-change="crud.selectionChangeHandler"
@row-click="clickRowHandler"
@cell-dblclick="tableDoubleClick"
@ -106,16 +113,26 @@
<!-- 档案详情 -->
<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>
</div>
</template>
<script>
import { del, FetchTableDisplayFields, FetchInitArchivesView, FetchFormDisplayFields, FetchArchivesDetails, FetchArchivesMetadata } from '@/api/archivesManage/archivesList'
import { del, FetchTableDisplayFields, FetchInitArchivesView, FetchFormDisplayFields, FetchArchivesDetails, FetchArchivesMetadata, FetchCompletelyDelete, FetchReduction } from '@/api/archivesManage/archivesList'
import { header, form } from '@crud/crud'
// 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 ArchivesInfo from '../archivesInfo/index'
@ -132,10 +149,30 @@ export default {
default: function() {
return {}
}
},
smartQuery: {
type: Object,
default: function() {
return {}
}
},
isdel: {
type: Boolean,
default: false
},
isRecycle: {
type: Boolean,
default: false
}
},
data() {
return {
permission: {
add: ['admin', 'archivesList:add'],
edit: ['admin', 'archivesList:edit'],
del: ['admin', 'archivesList:del'],
download: ['admin', 'archivesList:download']
},
page: {
page: 0,
size: 10,
@ -143,11 +180,18 @@ export default {
},
projectData: [],
formVisible: false,
formTitle: '新建项目',
isAddOrEditBtn: null,
formTitle: '新建项目', // form - title
tableDisplayFields: [], // table-list-title
getTableDisplayFieldsLoading: false, // table-loading
formPreviewData: [], // data
projectQuery: {},
query: {
'queryType': null,
'queryTitle': null,
'recordNo': null,
'archiveCtgNo': null,
'archiveNo': null
},
stateOptions: [ // -
{ key: '1', label: '全部' },
{ key: '2', label: '未装' },
@ -157,34 +201,22 @@ export default {
{ key: '6', label: '已借' }
],
queryOption: [
{ value: 'maintitle', label: '题名' },
{ value: 'archive_no', label: '号' }
{ value: 'queryTitle', label: '题名' },
{ value: 'recordNo', label: '项目代号' }
],
inputSelect: '',
permission: {
add: ['admin', 'archivesList:add'],
edit: ['admin', 'archivesList:edit'],
del: ['admin', 'archivesList:del'],
download: ['admin', 'archivesList:download']
},
fixedStatusBar: false, // table-fixed
projectInputSelect: '',
arrySort: [], // sort - query
parentsId: null, // id
arcId: null, // ID
isProject: true, // -/
deleteVisible: false, // dialog
deleteData: {}, // data
selections: [], // table
archivesTabIndex: 0, //
arcId: null, // ID
arrySort: [], // sort-query
uploadFileVisible: false, //
archivesInfoVisible: false, //
lengingVisible: false, //
isBinding: false, //
parentsId: null,
isProject: true,
anjuanSelection: {},
totalSumAll: 0,
yearGroup: [],
archivesDetailsData: [],
archivesDetailsMetadata: ''
totalSumAll: 0, // - num
yearGroup: [], // -
archivesDetailsData: [], // data -
archivesDetailsMetadata: '', // data -
restoreVisible: false
}
},
watch: {
@ -192,11 +224,16 @@ export default {
},
tableDisplayFields(val) {
this.doLayout()
},
smartQuery: {
handler(n, o) {
},
deep: true
}
},
created() {
// select -
this.inputSelect = this.queryOption[0].value
this.projectInputSelect = this.queryOption[0].value
this.selections = []
},
mounted() {
@ -205,9 +242,9 @@ export default {
methods: {
// -select
querySelect(val) {
this.inputSelect = val
this.projectInputSelect = val
},
//
// -
getTableDisplayFields() {
this.selections = []
FetchTableDisplayFields({ categoryId: this.selectedCategory.id }).then(data => {
@ -222,8 +259,16 @@ export default {
}
})
},
// list
// table - list
getTableList(page) {
switch (this.projectInputSelect) {
case 'queryTitle': //
this.query.queryTitle = this.projectQuery[this.projectInputSelect]
break
case 'record_no': // -
this.query.recordNo = this.projectQuery[this.projectInputSelect]
break
}
this.page.page = isNaN(page - 1) ? 0 : page - 1
this.formVisible = false
this.getTableDisplayFieldsLoading = true
@ -231,10 +276,20 @@ export default {
const params = {
'categoryId': this.selectedCategory.id,
'parentsId': this.parentsId,
'isdel': false,
'isdel': this.isdel,
'page': this.page.page,
'size': this.page.size,
'sort': this.arrySort
'sort': this.arrySort,
'queryType': this.query.queryType,
'queryTitle': this.query.queryTitle,
'recordNo': this.query.recordNo,
'archiveCtgNo': this.query.archiveCtgNo,
'archiveNo': this.query.archiveNo,
'archiveYear': this.smartQuery.archiveYear,
'department': this.smartQuery.department,
'retention': this.smartQuery.retention,
'securityClass': this.smartQuery.securityClass,
'organizationMatter': this.smartQuery.organizationMatter
}
FetchInitArchivesView(params).then(data => {
this.getTableDisplayFieldsLoading = false
@ -266,7 +321,6 @@ export default {
},
getFormInfo(params, type) {
FetchFormDisplayFields(params).then(data => {
// this.formPreviewData = data.showFiled.filter((fields) => { return fields.isInput })
this.formPreviewData = data.showFiled
this.$nextTick(() => {
if (type === 'edit') {
@ -280,9 +334,14 @@ export default {
this.$refs.previewForm.submitForm('addOrUpdateForm', this.selectedCategory.id)
this.selections = []
},
// table -
selectAll(val) {
this.selections = val
this.isProject = val.length !== 1
this.$emit('getAjInProjectBtnState', this.isProject)
},
// table -
tableDoubleClick(row) {
console.log('无附件-project')
this.$refs.archivesInfo.detailTitle = '项目详情'
this.$refs.archivesInfo.isHasFile = false
this.$refs.archivesInfo.archivesInfoVisible = true
@ -291,10 +350,11 @@ export default {
categoryId: this.selectedCategory.id,
archivesId: row.id
}
//
FetchArchivesDetails(params).then(data => {
this.archivesDetailsData = data
})
//
FetchArchivesMetadata(params).then(data => {
this.archivesDetailsMetadata = data
})
@ -330,7 +390,6 @@ export default {
handleDeltConfirm() {
this.deleteVisible = false
this.crud.delAllLoading = true
// this.crud.doDelete(this.deleteData)
const ids = []
this.deleteData.forEach(val => {
ids.push(val.id)
@ -340,23 +399,61 @@ export default {
'categoryId': this.selectedCategory.id
}
// fetch
del(params).then(res => {
this.crud.delAllLoading = false
this.$notify({
title: '删除成功',
type: 'success',
duration: 2500
if (!this.isRecycle) {
del(params).then(res => {
this.crud.delAllLoading = false
this.$notify({
title: '删除成功',
type: 'success',
duration: 2500
})
this.selections = []
this.getTableList()
})
this.selections = []
this.getTableList()
})
} else {
FetchCompletelyDelete(params).then(res => {
this.crud.delAllLoading = false
this.$notify({
title: '删除成功',
type: 'success',
duration: 2500
})
this.selections = []
this.getTableList()
})
}
},
// -
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 => {
this.$notify({
title: '还原成功',
type: 'success',
duration: 2500
})
this.selections = []
this.getTableList()
this.restoreVisible = false
})
},
/* 重新渲染table组件 防止table-fixed 错位 配合watch-table数据 */
doLayout() {
this.$nextTick(() => {

172
src/views/archivesManage/recycleBin/index.vue

@ -1,189 +1,25 @@
<template>
<div class="app-container">
<el-row class="container-main" :gutter="20">
<!--左侧树状数据-->
<el-col class="container-left" :xs="9" :sm="6" :md="5" :lg="4" :xl="4">
<span class="right-top-line" />
<span class="left-bottom-line" />
<div class="head-container" style="color:#fff">
档案门类
</div>
<el-tree ref="archivesTree" v-loading="crud.loading" :data="crud.data" :props="defaultProps" node-key="id" :expand-on-click-node="false" highlight-current @node-click="handleNodeClick" />
</el-col>
<!--用户数据-->
<el-col class="container-right" :xs="15" :sm="18" :md="19" :lg="20" :xl="20">
<span class="right-top-line" />
<span class="left-bottom-line" />
<!--工具栏-->
<div class="head-container">
<el-button icon="el-icon-delete" size="mini" @click="handleDelete">彻底删除</el-button>
<el-button size="mini" style="margin-right:10px" @click="handleRestore">
<svg-icon icon-class="huanyuan-fanbai" class-name="svg-style" />还原</el-button>
<!-- 搜索 -->
<!-- <div v-if="crud.props.searchToggle" class="head-search"> -->
<el-input
v-model="query.blurry"
clearable
size="small"
prefix-icon="el-icon-search"
placeholder="请输入关键词"
style="width: 200px;margin-right:10px"
class="filter-item"
/>
<rrOperation />
<!-- </div> -->
</div>
<!--表格渲染-->
<el-table
ref="table"
:data="tableData"
style="min-width: 100%"
height="calc(100vh - 355px)"
@selection-change="selectionChangeHandler"
@row-click="clickRowHandler"
>
<el-table-column type="selection" width="55" />
<el-table-column type="index" label="序号" width="55" />
<el-table-column prop="" label="文件" min-width="55" />
<el-table-column prop="" label="全宗名" min-width="85" />
<el-table-column prop="archivesID" :show-overflow-tooltip="true" label="档号" min-width="110" />
<el-table-column prop="" label="部门名称" min-width="85" />
<el-table-column prop="" label="件号" min-width="55" />
<el-table-column :show-overflow-tooltip="true" prop="titleName" label="题名" min-width="100" />
<el-table-column prop="" label="成文日期" min-width="80" />
<el-table-column prop="" label="机构(问题)" :show-overflow-tooltip="true" min-width="80" />
<el-table-column prop="" label="页号" min-width="60" />
<el-table-column prop="" label="责任者" min-width="85" />
<el-table-column prop="" label="保管期限" min-width="85" />
<el-table-column prop="" label="备注" min-width="85" />
</el-table>
<!-- 删除模态框 -->
<el-dialog title="确认删除" :visible.sync="deleteVisible">
<span class="dialog-right-top" />
<span class="dialog-left-bottom" />
<div class="setting-dialog">
<p><span style="color:#fff;">确定要彻底删除当前档案数据吗?</span></p>
<p><span style="color:#fff;">数据来源:文件1条数据</span></p>
<p><span style="color:#f00;">提示:确定彻底删除后该档案数据及所属文件不能还原</span></p>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click.native="handleDelConfirm">确定</el-button>
</div>
</div>
</el-dialog>
<!-- 还原模态框 -->
<el-dialog title="确认还原" :visible.sync="restoreVisible">
<span class="dialog-right-top" />
<span class="dialog-left-bottom" />
<div class="setting-dialog">
<p><span style="color:#fff;">确定将当前选择的档案数据进行还原?</span></p>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click.native="handleRestoreConfirm">确定</el-button>
</div>
</div>
</el-dialog>
<!--分页组件-->
<pagination />
</el-col>
</el-row>
<div>
<archivesList :isdel="true" :is-recycle="true" />
</div>
</template>
<script>
import CRUD, { presenter, header, crud } from '@crud/crud'
import rrOperation from '@crud/RR.operation'
import pagination from '@crud/Pagination'
import data1 from '../lendManage/data1.json'
import crudCategory from '@/api/category/category'
import archivesList from '@/views/archivesManage/archivesList/index'
export default {
name: 'RecycleBin',
components: { rrOperation, pagination },
cruds() {
return CRUD({
title: '门类',
url: 'api/archives-type/menu',
crudMethod: { ...crudCategory },
optShow: {
add: false,
edit: false,
del: false,
download: true,
group: false
}
})
},
mixins: [presenter(), header(), crud()],
//
dicts: ['user_status'],
components: { archivesList },
data() {
return {
selections: [], //
deleteVisible: false,
restoreVisible: false,
tableData: [],
defaultProps: { children: 'children', label: 'cnName' }
}
},
created() {
this.getData()
console.log(this.crud, '1111111111')
},
methods: {
//
getData() {
this.tableData = data1.rows
},
//
handleNodeClick(data) {
console.log(data)
},
//
handleDelete() {
if (this.selections.length > 0) {
this.deleteVisible = true
} else {
this.$message({
message: '请选择要删除的数据',
type: 'warning'
})
}
},
//
handleRestore() {
if (this.selections.length > 0) {
this.restoreVisible = true
} else {
this.$message({
message: '请选择要还原的数据',
type: 'warning'
})
}
},
clickRowHandler(row) {
this.$refs.table.toggleRowSelection(row) //
},
selectionChangeHandler(val) {
this.selections = val
},
handleDelConfirm() {
this.deleteVisible = false
},
handleRestoreConfirm() {
this.restoreVisible = false
}
}
}
</script>
<style rel="stylesheet/scss" lang="scss" scoped>
::v-deep .vue-treeselect__control,::v-deep .vue-treeselect__placeholder,::v-deep .vue-treeselect__single-value {
height: 30px;
line-height: 30px;
}
::v-deep .head-container .filter-item input{
height: 30px;
line-height: 30px;
}
</style>
Loading…
Cancel
Save