11 changed files with 633 additions and 439 deletions
-
44public/webA/index.js
-
10src/views/archivesManage/archivesList/archivesAnjuan/index.vue
-
685src/views/archivesManage/archivesList/archivesJuannei/index.vue
-
2src/views/archivesManage/archivesList/index.vue
-
31src/views/archivesManage/archivesList/module/archivesInfo/index.vue
-
90src/views/archivesManage/archivesSearch/index.vue
-
10src/views/archivesManage/archivesSearch/module/detailDialog.vue
-
4src/views/archivesManage/caseManage/caseList/index.vue
-
9src/views/archivesManage/fileImport/dataImport/index.vue
-
26src/views/archivesManage/lendManage/components/lendArchivesList.vue
-
161src/views/storeManage/warehouse3D/deseCabinet/index.vue
@ -1,299 +1,386 @@ |
|||
<template> |
|||
<div class="archives-warp"> |
|||
<!--工具栏--> |
|||
<div class="head-container head-archives clearfix"> |
|||
<div v-if="!recycleMain.isRecycle" class="archives-crud"> |
|||
<!-- 新增 --> |
|||
<el-button v-if="selectedCategory.isType !== 4" size="mini" :disabled="isAnjuan" icon="el-icon-plus" @click="handleForm('add','档案',2)">新增</el-button> |
|||
<!-- 修改 --> |
|||
<el-button size="mini" icon="el-icon-edit" :disabled="selections.length !== 1" @click="handleForm('edit','档案',null)">修改</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> |
|||
<!-- 导出btn :disabled="!crud.data.length" --> |
|||
<el-button v-permission="permission.download" :disabled="isAnjuan && selectedCategory.isType !== 4" :loading="crud.downloadLoading" size="mini" icon="el-icon-download" @click="doExport(1)">导出</el-button> |
|||
<!-- 上传附件btn 针对卷内/文件 单选 --> |
|||
<el-button :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" :disabled="selections.length === 0" size="mini" @click="toDelete(selections)">彻底删除</el-button> |
|||
<el-button size="mini" class="iconfont icon-huanyuan-fanbai" :disabled="selections.length === 0" @click="handleRestore">还原 |
|||
</el-button> |
|||
</div> |
|||
<div class="head-search"> |
|||
<!-- @keyup.enter.native="crud.toQuery" --> |
|||
<el-input v-model="juanneiQuery[juanneiInputSelect]" clearable size="small" placeholder="请输入关键词" style="width: 200px;" class="input-prepend filter-item" @clear="getTableList()" @keyup.enter.native="getTableList"> |
|||
<el-select slot="prepend" v-model="juanneiInputSelect" style="width: 85px" @change="querySelect(juanneiInputSelect)"> |
|||
<el-option |
|||
v-for="item in queryOption" |
|||
:key="item.value" |
|||
:label="item.label" |
|||
:value="item.value" |
|||
/> |
|||
</el-select> |
|||
</el-input> |
|||
<el-button class="filter-item" size="mini" type="success" icon="el-icon-search" @click="getTableList()">搜索</el-button> |
|||
</div> |
|||
</div> |
|||
|
|||
<!--新增 / 编辑 表单组件--> |
|||
<el-dialog class="preview-dialog" :modal-append-to-body="false" :close-on-click-modal="false" :before-close="handleClose" :visible="formVisible" :title="formTitle"> |
|||
<span class="dialog-right-top" /> |
|||
<span class="dialog-left-bottom" /> |
|||
<div class="setting-dialog"> |
|||
<!-- form --> |
|||
<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" :is-des-form-type="isDesFormType" @emitTableList="getTableList" /> |
|||
<div slot="footer" class="dialog-footer"> |
|||
<!-- :loading="crud.status.cu === 2" --> |
|||
<el-button type="primary" @click="handlerArchivesSubmit">保存</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="junneiData" |
|||
highlight-current-row |
|||
style="width: 100%;" |
|||
:height="juanneiTableHeight" |
|||
:row-class-name="tableRowClassName" |
|||
:row-key="rowKey" |
|||
@select-all="selectAll" |
|||
@selection-change="crud.selectionChangeHandler" |
|||
@row-click="clickRowHandler" |
|||
@cell-dblclick="tableDoubleClick" |
|||
@select="handleCurrentChange" |
|||
> |
|||
<el-table-column type="selection" width="55" :reserve-selection="true" align="center" /> |
|||
<el-table-column type="index" label="序号" width="55" align="center" /> |
|||
<el-table-column label="文件" prop="children_num" 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="header"> |
|||
<el-tooltip |
|||
class="item" |
|||
effect="dark" |
|||
:content="field.fieldCnName" |
|||
placement="top-start" |
|||
> |
|||
<span>{{ field.fieldCnName }}</span> |
|||
</el-tooltip> |
|||
</template> |
|||
<template slot-scope="scope"> |
|||
{{ scope.row[field.fieldName] }} |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column v-if="!recycleMain.isRecycle" label="装盒" width="100" align="center" :fixed="fixedStatusBar ? false : 'right' "> |
|||
<!-- state-active 已装/已入/已借/已绑 --> |
|||
<template slot-scope="scope"> |
|||
<!-- 未装 / 已装 --> |
|||
<span :class="['row-state', 'row-packing', scope.row.case_no ? 'state-active' : '' ]">{{ scope.row.case_no ? '已装': '未装' }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column v-if="!recycleMain.isRecycle" label="入库" width="100" align="center" :fixed="fixedStatusBar ? false : 'right' "> |
|||
<template slot-scope="scope"> |
|||
<!-- is_storage 为空的情况下即没装盒 / 0 未入 / 1 待入 / 2 已入 / 3 待出--> |
|||
<!-- <span class="row-state row-warehousing">{{ storageTxt[scope.$index] }}</span> --> |
|||
<span :class="['row-state', 'row-warehousing', (storageTxt[scope.$index] === '已入' )? 'state-active' : '' ]">{{ storageTxt[scope.$index] }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
</el-table> |
|||
<!--分页组件--> |
|||
<el-pagination |
|||
:current-page="page.page" |
|||
:total="page.total" |
|||
:page-size="page.size" |
|||
:pager-count="5" |
|||
layout="total, prev, pager, next, sizes" |
|||
@size-change="handleSizeChange" |
|||
@current-change="handleCurrentPage" |
|||
/> |
|||
</el-card> |
|||
|
|||
<!-- 档案详情 --> |
|||
<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" :is-delt-type="3" /> |
|||
|
|||
<!-- 上传附件 --> |
|||
<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 ref="uploadFile" :category-id="categoryId" :arc-id="arcId" /> |
|||
</div> |
|||
</el-dialog> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import { header, form } from '@crud/crud' |
|||
import { mapGetters } from 'vuex' |
|||
import { archivesCrud } from '../mixins/archives' |
|||
import PreviewForm from '@/views/components/category/PreviewForm' |
|||
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, RestoreArchives, DeltArchives }, |
|||
mixins: [ |
|||
header(), |
|||
form({}), |
|||
archivesCrud |
|||
], |
|||
inject: ['recycleMain'], |
|||
props: { |
|||
selectedCategory: { |
|||
type: Object, |
|||
default: function() { |
|||
return {} |
|||
} |
|||
}, |
|||
isAnjuan: { |
|||
type: Boolean, |
|||
default: true |
|||
}, |
|||
anjuanSelection: { |
|||
type: Object, |
|||
default: function() { |
|||
return {} |
|||
} |
|||
}, |
|||
fixedStatusBar: { |
|||
type: Boolean, |
|||
default: true |
|||
}, |
|||
smartQuery: { |
|||
type: Object, |
|||
default: function() { |
|||
return {} |
|||
} |
|||
} |
|||
}, |
|||
data() { |
|||
return { |
|||
junneiData: [], |
|||
juanneiQuery: {}, |
|||
queryOption: [ |
|||
{ value: 'queryTitle', label: '题名' }, |
|||
{ value: 'archiveNo', label: '档号' }, |
|||
{ value: 'responsibleby', label: '责任者' } |
|||
], |
|||
juanneiInputSelect: '' |
|||
} |
|||
}, |
|||
computed: { |
|||
...mapGetters([ |
|||
'baseApi' |
|||
]) |
|||
}, |
|||
watch: { |
|||
selectedCategory: function(newValue, oldValue) { |
|||
}, |
|||
tableDisplayFields(val) { |
|||
this.doLayout() |
|||
}, |
|||
isAnjuan: function(newValue, oldValue) { |
|||
}, |
|||
fixedStatusBar: function(newValue, oldValue) { |
|||
}, |
|||
anjuanSelection: function(newValue, oldValue) { |
|||
}, |
|||
smartQuery: { |
|||
handler(n, o) { |
|||
}, |
|||
deep: true |
|||
} |
|||
}, |
|||
created() { |
|||
// 初始化带select的输入框的 - 搜索 |
|||
this.juanneiInputSelect = this.queryOption[0].value |
|||
this.query.queryType = null |
|||
this.selections = [] |
|||
}, |
|||
mounted() { |
|||
}, |
|||
methods: { |
|||
// 档案列表获取显示列 |
|||
getTableDisplayFields(type) { |
|||
this.getTableItemCommon(type) |
|||
}, |
|||
handleSizeChange(size) { |
|||
this.page.size = size |
|||
this.page.page = 1 |
|||
this.getListCommon('junneiData', 'juanneiTableHeight', 2) |
|||
this.$nextTick(() => { |
|||
this.selections = this.$refs.table.selection |
|||
}) |
|||
}, |
|||
// list |
|||
getTableList() { |
|||
this.query.queryTitle = '' |
|||
this.query.archiveNo = '' |
|||
this.query.responsibleby = '' |
|||
switch (this.juanneiInputSelect) { |
|||
case 'queryTitle': // 题名 |
|||
this.query.queryTitle = this.juanneiQuery[this.juanneiInputSelect] |
|||
break |
|||
case 'archiveNo': // 档号 |
|||
this.query.archiveNo = this.juanneiQuery[this.juanneiInputSelect] |
|||
break |
|||
case 'responsibleby': // 责任者 |
|||
this.query.responsibleby = this.juanneiQuery[this.juanneiInputSelect] |
|||
break |
|||
} |
|||
this.getListCommon('junneiData', 'juanneiTableHeight', 2) |
|||
}, |
|||
// table - 全选 |
|||
selectAll(val) { |
|||
this.selections = val |
|||
}, |
|||
// table - 双击查看详情 |
|||
tableDoubleClick(row) { |
|||
this.$refs.archivesInfo.isHasFile = true |
|||
this.arcId = row.id |
|||
this.$refs.archivesInfo.isDetailsInfo = true |
|||
this.$refs.archivesInfo.isTidOrBorrow = false |
|||
this.$refs.archivesInfo.detailTitle = '档案详情' |
|||
this.$refs.archivesInfo.archivesInfoVisible = true |
|||
this.$refs.archivesInfo.archivesTabIndex = 0 |
|||
this.$refs.archivesInfo.getDetial(row.id) |
|||
}, |
|||
// table - 当前选中得row |
|||
clickRowHandler(row) { |
|||
this.$refs.table.clearSelection() |
|||
this.$refs.table.toggleRowSelection(row) |
|||
this.selections = this.crud.selections |
|||
}, |
|||
// 触发单选 |
|||
handleCurrentChange(selection, row) { |
|||
this.selections = selection |
|||
} |
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<style rel="stylesheet/scss" lang="scss" scoped> |
|||
@import "~@/assets/styles/archives-manage.scss"; |
|||
::v-deep .input-prepend{ |
|||
.el-select .el-input__inner{ |
|||
padding-left: 15px !important; |
|||
} |
|||
.el-input__inner { |
|||
padding-left: 85px !important; |
|||
} |
|||
} |
|||
::v-deep .el-table__fixed-right-patch{ |
|||
background-color:#02255f; |
|||
border-bottom: none; |
|||
} |
|||
</style> |
|||
<template> |
|||
<div class="archives-warp"> |
|||
<!--工具栏--> |
|||
<div class="head-container head-archives clearfix"> |
|||
<div v-if="!recycleMain.isRecycle" class="archives-crud"> |
|||
<!-- 新增 --> |
|||
<el-button v-if="selectedCategory.isType !== 4" size="mini" :disabled="isAnjuan" icon="el-icon-plus" @click="handleForm('add','档案',2)">新增</el-button> |
|||
<!-- 修改 --> |
|||
<el-button size="mini" icon="el-icon-edit" :disabled="selections.length !== 1" @click="handleForm('edit','档案',null)">修改</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> |
|||
<!-- 导出btn :disabled="!crud.data.length" --> |
|||
<el-button v-permission="permission.download" :disabled="isAnjuan && selectedCategory.isType !== 4" :loading="crud.downloadLoading" size="mini" icon="el-icon-download" @click="doExport(1)">导出</el-button> |
|||
<!-- 上传附件btn 针对卷内/文件 单选 --> |
|||
<el-button :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" :disabled="selections.length === 0" size="mini" @click="toDelete(selections)">彻底删除</el-button> |
|||
<el-button size="mini" class="iconfont icon-huanyuan-fanbai" :disabled="selections.length === 0" @click="handleRestore">还原 |
|||
</el-button> |
|||
</div> |
|||
<div class="head-search"> |
|||
<!-- @keyup.enter.native="crud.toQuery" --> |
|||
<el-input v-model="juanneiQuery[juanneiInputSelect]" clearable size="small" placeholder="请输入关键词" style="width: 200px;" class="input-prepend filter-item" @clear="getTableList()" @keyup.enter.native="getTableList"> |
|||
<el-select slot="prepend" v-model="juanneiInputSelect" style="width: 85px" @change="querySelect(juanneiInputSelect)"> |
|||
<el-option |
|||
v-for="item in queryOption" |
|||
:key="item.value" |
|||
:label="item.label" |
|||
:value="item.value" |
|||
/> |
|||
</el-select> |
|||
</el-input> |
|||
<el-button class="filter-item" size="mini" type="success" icon="el-icon-search" @click="getTableList()">搜索</el-button> |
|||
</div> |
|||
<div v-if="!recycleMain.isRecycle" class="archives-handler-btn"> |
|||
<!-- 借阅btn 多选 --> |
|||
<el-button class="lending-btn iconfont" :disabled="selections.length === 0" type="primary" @click="handleLending"><svg-icon icon-class="jieyue" class="svg-arc-style" />借阅</el-button> |
|||
<!-- 绑定标签btn 单选 --> |
|||
<el-button class="binding-btn iconfont" type="primary" :disabled="selections.length !== 1" @click="bindingTag(selections)"><svg-icon icon-class="bindbiaoqian" class="svg-arc-style" />绑定标签</el-button> |
|||
</div> |
|||
</div> |
|||
|
|||
<!--新增 / 编辑 表单组件--> |
|||
<el-dialog class="preview-dialog" :modal-append-to-body="false" :close-on-click-modal="false" :before-close="handleClose" :visible="formVisible" :title="formTitle"> |
|||
<span class="dialog-right-top" /> |
|||
<span class="dialog-left-bottom" /> |
|||
<div class="setting-dialog"> |
|||
<!-- form --> |
|||
<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" :is-des-form-type="isDesFormType" @emitTableList="getTableList" /> |
|||
<div slot="footer" class="dialog-footer"> |
|||
<!-- :loading="crud.status.cu === 2" --> |
|||
<el-button type="primary" @click="handlerArchivesSubmit">保存</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="junneiData" |
|||
highlight-current-row |
|||
style="width: 100%;" |
|||
:height="juanneiTableHeight" |
|||
:row-class-name="tableRowClassName" |
|||
:row-key="rowKey" |
|||
@select-all="selectAll" |
|||
@selection-change="crud.selectionChangeHandler" |
|||
@row-click="clickRowHandler" |
|||
@cell-dblclick="tableDoubleClick" |
|||
@select="handleCurrentChange" |
|||
> |
|||
<el-table-column type="selection" width="55" :reserve-selection="true" align="center" /> |
|||
<el-table-column type="index" label="序号" width="55" align="center" /> |
|||
<el-table-column label="文件" prop="children_num" 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="header"> |
|||
<el-tooltip |
|||
class="item" |
|||
effect="dark" |
|||
:content="field.fieldCnName" |
|||
placement="top-start" |
|||
> |
|||
<span>{{ field.fieldCnName }}</span> |
|||
</el-tooltip> |
|||
</template> |
|||
<template slot-scope="scope"> |
|||
{{ scope.row[field.fieldName] }} |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column v-if="!recycleMain.isRecycle" label="标签" width="100" align="center" :fixed="fixedStatusBar ? false : 'right' "> |
|||
<template slot-scope="scope"> |
|||
<!-- 未绑 / 已绑 --> |
|||
<span :class="['row-state', 'row-binding', scope.row.tid ? 'state-active' : '' ]">{{ scope.row.tid ? '已绑': '未绑' }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column v-if="!recycleMain.isRecycle" label="装盒" width="100" align="center" :fixed="fixedStatusBar ? false : 'right' "> |
|||
<!-- state-active 已装/已入/已借/已绑 --> |
|||
<template slot-scope="scope"> |
|||
<!-- 未装 / 已装 --> |
|||
<span :class="['row-state', 'row-packing', scope.row.case_no ? 'state-active' : '' ]">{{ scope.row.case_no ? '已装': '未装' }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column v-if="!recycleMain.isRecycle" label="入库" width="100" align="center" :fixed="fixedStatusBar ? false : 'right' "> |
|||
<template slot-scope="scope"> |
|||
<!-- is_storage 为空的情况下即没装盒 / 0 未入 / 1 待入 / 2 已入 / 3 待出--> |
|||
<!-- <span class="row-state row-warehousing">{{ storageTxt[scope.$index] }}</span> --> |
|||
<span :class="['row-state', 'row-warehousing', (storageTxt[scope.$index] === '已入' )? 'state-active' : '' ]">{{ storageTxt[scope.$index] }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column v-if="!recycleMain.isRecycle" label="借阅" width="100" align="center" :fixed="fixedStatusBar ? false : 'right' "> |
|||
<template slot-scope="scope"> |
|||
<!-- is_borrow 4 已归还 / 为空 - 未加入待借列表 - 在库 / 2 待借阅(在待借列表/借出确认列表) - 待借 / 1待登记 - 不可借-用“—” 表示 / 3 待归还 - 已借 --> |
|||
<span :class="['row-state', 'row-lending', (borrowTxt[scope.$index] === '已借' )? 'state-active' : '' ]">{{ borrowTxt[scope.$index] }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
</el-table> |
|||
<!--分页组件--> |
|||
<el-pagination |
|||
:current-page="page.page" |
|||
:total="page.total" |
|||
:page-size="page.size" |
|||
:pager-count="5" |
|||
layout="total, prev, pager, next, sizes" |
|||
@size-change="handleSizeChange" |
|||
@current-change="handleCurrentPage" |
|||
/> |
|||
</el-card> |
|||
|
|||
<!-- 档案详情 --> |
|||
<ArchivesInfo ref="archivesInfo" :is-has-file="true" :category-id="categoryId" :arc-id="arcId" /> |
|||
<!-- 绑定标签 --> |
|||
<binding-tag-dlg ref="bindingTag" :binding-id="selections[0] && 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" :is-delt-type="3" /> |
|||
|
|||
<!-- 上传附件 --> |
|||
<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 ref="uploadFile" :category-id="categoryId" :arc-id="arcId" /> |
|||
</div> |
|||
</el-dialog> |
|||
|
|||
<!-- 借阅 --> |
|||
<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="handleLendingConfirm">确定</el-button> |
|||
</div> |
|||
</div> |
|||
</el-dialog> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import { header, form } from '@crud/crud' |
|||
import { mapGetters } from 'vuex' |
|||
import { archivesCrud } from '../mixins/archives' |
|||
import PreviewForm from '@/views/components/category/PreviewForm' |
|||
import ArchivesInfo from '../module/archivesInfo/index' |
|||
import BindingTagDlg from '@/views/components/BindingTagDlg' |
|||
import UploadFile from '../module/uploadFile/index' |
|||
import RestoreArchives from '../module/restoreArchives/index' |
|||
import DeltArchives from '../module/deltArchives/index' |
|||
import { FetchIsExistBorrow, FetchAddArchivesWaitRegister } from '@/api/archivesManage/lendManage' |
|||
export default { |
|||
name: 'ArchivesJuannei', |
|||
components: { PreviewForm, ArchivesInfo, BindingTagDlg, UploadFile, RestoreArchives, DeltArchives }, |
|||
mixins: [ |
|||
header(), |
|||
form({}), |
|||
archivesCrud |
|||
], |
|||
inject: ['recycleMain'], |
|||
props: { |
|||
selectedCategory: { |
|||
type: Object, |
|||
default: function() { |
|||
return {} |
|||
} |
|||
}, |
|||
isAnjuan: { |
|||
type: Boolean, |
|||
default: true |
|||
}, |
|||
anjuanSelection: { |
|||
type: Object, |
|||
default: function() { |
|||
return {} |
|||
} |
|||
}, |
|||
fixedStatusBar: { |
|||
type: Boolean, |
|||
default: true |
|||
}, |
|||
smartQuery: { |
|||
type: Object, |
|||
default: function() { |
|||
return {} |
|||
} |
|||
} |
|||
}, |
|||
data() { |
|||
return { |
|||
junneiData: [], |
|||
juanneiQuery: {}, |
|||
queryOption: [ |
|||
{ value: 'queryTitle', label: '题名' }, |
|||
{ value: 'archiveNo', label: '档号' }, |
|||
{ value: 'responsibleby', label: '责任者' } |
|||
], |
|||
juanneiInputSelect: '', |
|||
lengingVisible: false // 借阅 |
|||
} |
|||
}, |
|||
computed: { |
|||
...mapGetters([ |
|||
'baseApi' |
|||
]) |
|||
}, |
|||
watch: { |
|||
selectedCategory: function(newValue, oldValue) { |
|||
}, |
|||
tableDisplayFields(val) { |
|||
this.doLayout() |
|||
}, |
|||
isAnjuan: function(newValue, oldValue) { |
|||
}, |
|||
fixedStatusBar: function(newValue, oldValue) { |
|||
}, |
|||
anjuanSelection: function(newValue, oldValue) { |
|||
}, |
|||
smartQuery: { |
|||
handler(n, o) { |
|||
}, |
|||
deep: true |
|||
} |
|||
}, |
|||
created() { |
|||
// 初始化带select的输入框的 - 搜索 |
|||
this.juanneiInputSelect = this.queryOption[0].value |
|||
this.query.queryType = null |
|||
this.selections = [] |
|||
}, |
|||
mounted() { |
|||
}, |
|||
methods: { |
|||
// 档案列表获取显示列 |
|||
getTableDisplayFields(type) { |
|||
this.getTableItemCommon(type) |
|||
}, |
|||
handleSizeChange(size) { |
|||
this.page.size = size |
|||
this.page.page = 1 |
|||
this.getListCommon('junneiData', 'juanneiTableHeight', 2) |
|||
this.$nextTick(() => { |
|||
this.selections = this.$refs.table.selection |
|||
}) |
|||
}, |
|||
// list |
|||
getTableList() { |
|||
this.query.queryTitle = '' |
|||
this.query.archiveNo = '' |
|||
this.query.responsibleby = '' |
|||
switch (this.juanneiInputSelect) { |
|||
case 'queryTitle': // 题名 |
|||
this.query.queryTitle = this.juanneiQuery[this.juanneiInputSelect] |
|||
break |
|||
case 'archiveNo': // 档号 |
|||
this.query.archiveNo = this.juanneiQuery[this.juanneiInputSelect] |
|||
break |
|||
case 'responsibleby': // 责任者 |
|||
this.query.responsibleby = this.juanneiQuery[this.juanneiInputSelect] |
|||
break |
|||
} |
|||
this.getListCommon('junneiData', 'juanneiTableHeight', 2) |
|||
}, |
|||
// table - 全选 |
|||
selectAll(val) { |
|||
this.selections = val |
|||
}, |
|||
// table - 双击查看详情 |
|||
tableDoubleClick(row) { |
|||
this.$refs.archivesInfo.isHasFile = true |
|||
this.arcId = row.id |
|||
this.$refs.archivesInfo.isDetailsInfo = true |
|||
this.$refs.archivesInfo.isTidOrBorrow = false |
|||
this.$refs.archivesInfo.detailTitle = '档案详情' |
|||
this.$refs.archivesInfo.archivesInfoVisible = true |
|||
this.$refs.archivesInfo.archivesTabIndex = 0 |
|||
this.$refs.archivesInfo.getDetial(row.id) |
|||
}, |
|||
// table - 当前选中得row |
|||
clickRowHandler(row) { |
|||
this.$refs.table.clearSelection() |
|||
this.$refs.table.toggleRowSelection(row) |
|||
this.selections = this.crud.selections |
|||
}, |
|||
// 触发单选 |
|||
handleCurrentChange(selection, row) { |
|||
this.selections = selection |
|||
}, |
|||
// 绑定标签 |
|||
bindingTag(data) { |
|||
if (data[0].tid) { |
|||
this.$refs.bindingTag.isBinding = true |
|||
this.$refs.bindingTag.tidCode = data[0].tid |
|||
} |
|||
this.$refs.bindingTag.bindingVisible = true |
|||
}, |
|||
// 借阅 |
|||
handleLending() { |
|||
const index = this.selections.findIndex((item) => item.is_storage === 0 || item.is_storage === '' || item.is_storage === 1) |
|||
const index2 = this.selections.findIndex((item) => item.is_borrow === 3) |
|||
const index3 = this.selections.findIndex((item) => item.is_storage === 3) |
|||
if (index !== -1) { |
|||
this.$message.error('所选档案还未入库不能借阅') |
|||
return false |
|||
} |
|||
if (index3 !== -1) { |
|||
this.$message.error('待出档案不可借阅') |
|||
return false |
|||
} |
|||
if (index2 !== -1) { |
|||
this.$message.error('当前档案已借出,还未归还') |
|||
return false |
|||
} |
|||
const params = this.selections.map(item => { |
|||
return item.id |
|||
}) |
|||
FetchIsExistBorrow(params).then(data => { |
|||
if (data.length === 0) { |
|||
this.lengingVisible = true |
|||
} else if (data.length === this.selections.length) { |
|||
this.$message.error('所选档案不可借阅') |
|||
} else { |
|||
this.$message.error('部分档案不可借阅') |
|||
} |
|||
}) |
|||
}, |
|||
// 确认借阅 |
|||
handleLendingConfirm() { |
|||
const params = this.selections.map(item => { |
|||
return item.id |
|||
}) |
|||
FetchAddArchivesWaitRegister(params).then(data => { |
|||
if (data.length !== 0) { |
|||
this.$message.success('借阅成功') |
|||
this.lengingVisible = false |
|||
this.crud.refresh() |
|||
} |
|||
}) |
|||
} |
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<style rel="stylesheet/scss" lang="scss" scoped> |
|||
@import "~@/assets/styles/archives-manage.scss"; |
|||
::v-deep .input-prepend{ |
|||
.el-select .el-input__inner{ |
|||
padding-left: 15px !important; |
|||
} |
|||
.el-input__inner { |
|||
padding-left: 85px !important; |
|||
} |
|||
} |
|||
::v-deep .el-table__fixed-right-patch{ |
|||
background-color:#02255f; |
|||
border-bottom: none; |
|||
} |
|||
</style> |
Write
Preview
Loading…
Cancel
Save
Reference in new issue