|
@ -1,178 +1,235 @@ |
|
|
<template> |
|
|
<template> |
|
|
<el-dialog class="detail-dialog" title="详情" :close-on-click-modal="false" :modal-append-to-body="false" append-to-body :visible.sync="archivesInfoVisible" :before-close="handleClose"> |
|
|
|
|
|
<!-- <span class="dialog-right-top" /> |
|
|
|
|
|
|
|
|
<div> |
|
|
|
|
|
<el-dialog class="detail-dialog" title="详情" :close-on-click-modal="false" :modal-append-to-body="false" append-to-body :visible.sync="archivesInfoVisible" :before-close="handleClose"> |
|
|
|
|
|
<!-- <span class="dialog-right-top" /> |
|
|
<span class="dialog-left-bottom" /> --> |
|
|
<span class="dialog-left-bottom" /> --> |
|
|
<div class="setting-dialog"> |
|
|
|
|
|
<div class="detail-tab tab-content"> |
|
|
|
|
|
<!-- tab --> |
|
|
|
|
|
<ul class="tab-nav"> |
|
|
|
|
|
<li :class="{'active-tab-nav': archivesTabIndex == 0}" @click="changeActiveTab(0)">基本信息</li> |
|
|
|
|
|
<li :class="{'active-tab-nav': archivesTabIndex == 1}" @click="changeActiveTab(1)">传阅记录</li> |
|
|
|
|
|
<li :class="{'active-tab-nav': archivesTabIndex == 2}" @click="changeActiveTab(2)">操作记录</li> |
|
|
|
|
|
</ul> |
|
|
|
|
|
<div style="position: absolute; right: 0; top:0;"> |
|
|
|
|
|
<span |
|
|
|
|
|
class="row-state" |
|
|
|
|
|
:class="getStateClass(readStatus)" |
|
|
|
|
|
> |
|
|
|
|
|
{{ readStatus || '未传阅' }} |
|
|
|
|
|
</span> |
|
|
|
|
|
</div> |
|
|
|
|
|
<!-- 基本信息 --> |
|
|
|
|
|
<div v-if="archivesTabIndex===0" class="base-info-new item-content"> |
|
|
|
|
|
<el-row> |
|
|
|
|
|
<el-col v-for="(item,index) in archivesDetailsData" :key="index" :span="item.isLine ? 24 : 12" class="base-info-item"> |
|
|
|
|
|
<span>{{ item.fieldCnName }}:</span> |
|
|
|
|
|
<p :style="{ width: ( item.editLength ? item.editLength+'px' : '' ), flex: ( !item.editLength ? 1 : '' ), whiteSpace: 'pre-line'}">{{ item.context }}</p> |
|
|
|
|
|
</el-col> |
|
|
|
|
|
</el-row> |
|
|
|
|
|
<div> |
|
|
|
|
|
<div v-if="borrowerList.length !== 0" class="childDevice-info"> |
|
|
|
|
|
<p><i style="font-style:normal; font-weight: bold;">待传阅者:</i><span>{{ borrowerList | formatBorrowerList }}</span></p> |
|
|
|
|
|
</div> |
|
|
|
|
|
<div style="display: flex; justify-content: space-between; align-items: center; margin-top: 20px; margin-bottom: 10px; padding: 0 20px 0 10px;"> |
|
|
|
|
|
<h4 style="font-size: 16px; color: #1c1c1c;">文件列表</h4> |
|
|
|
|
|
<el-button v-if="archivesFiledata.length !== 0 && !isMidoRecord" size="mini" style="padding: 7px 7px 7px 10px; " @click="handleAddDocDetails"> |
|
|
|
|
|
<i class="iconfont icon-tianjiawenjian" /> |
|
|
|
|
|
</el-button> |
|
|
|
|
|
|
|
|
<div class="setting-dialog"> |
|
|
|
|
|
<div class="detail-tab tab-content"> |
|
|
|
|
|
<!-- tab --> |
|
|
|
|
|
<ul class="tab-nav"> |
|
|
|
|
|
<li :class="{'active-tab-nav': archivesTabIndex == 0}" @click="changeActiveTab(0)">基本信息</li> |
|
|
|
|
|
<li :class="{'active-tab-nav': archivesTabIndex == 1}" @click="changeActiveTab(1)">传阅记录</li> |
|
|
|
|
|
<li :class="{'active-tab-nav': archivesTabIndex == 2}" @click="changeActiveTab(2)">操作记录</li> |
|
|
|
|
|
</ul> |
|
|
|
|
|
<div style="position: absolute; right: 0; top:0;"> |
|
|
|
|
|
<span |
|
|
|
|
|
class="row-state" |
|
|
|
|
|
:class="getStateClass(readStatus)" |
|
|
|
|
|
> |
|
|
|
|
|
{{ readStatus || '未传阅' }} |
|
|
|
|
|
</span> |
|
|
|
|
|
</div> |
|
|
|
|
|
<!-- 基本信息 --> |
|
|
|
|
|
<div v-if="archivesTabIndex===0" class="base-info-new item-content"> |
|
|
|
|
|
<el-row> |
|
|
|
|
|
<el-col v-for="(item,index) in archivesDetailsData" :key="index" :span="item.isLine ? 24 : 12" class="base-info-item"> |
|
|
|
|
|
<span>{{ item.fieldCnName }}:</span> |
|
|
|
|
|
<p :style="{ width: ( item.editLength ? item.editLength+'px' : '' ), flex: ( !item.editLength ? 1 : '' ), whiteSpace: 'pre-line'}">{{ item.context }}</p> |
|
|
|
|
|
</el-col> |
|
|
|
|
|
</el-row> |
|
|
|
|
|
<div> |
|
|
|
|
|
<div v-if="borrowerList.length !== 0" class="childDevice-info"> |
|
|
|
|
|
<p><i style="font-style:normal; font-weight: bold;">待传阅者:</i><span>{{ borrowerList | formatBorrowerList }}</span></p> |
|
|
|
|
|
</div> |
|
|
|
|
|
<div style="display: flex; justify-content: space-between; align-items: center; margin-top: 20px; margin-bottom: 10px; padding: 0 20px 0 10px;"> |
|
|
|
|
|
<h4 style="font-size: 16px; color: #1c1c1c;">文件列表</h4> |
|
|
|
|
|
<el-button v-if="archivesFiledata.length !== 0 && !isMidoRecord" size="mini" style="padding: 7px 7px 7px 10px; " @click="handleAddDocDetails"> |
|
|
|
|
|
<i class="iconfont icon-tianjiawenjian" /> |
|
|
|
|
|
</el-button> |
|
|
|
|
|
</div> |
|
|
|
|
|
<el-table |
|
|
|
|
|
v-loading="archivesFiledataLoading" |
|
|
|
|
|
:data="archivesFiledata" |
|
|
|
|
|
style="min-width: 100%;" |
|
|
|
|
|
height="calc(100vh - 716px)" |
|
|
|
|
|
> |
|
|
|
|
|
<el-table-column prop="reg_no" label="登记号" show-overflow-tooltip min-width="140" /> |
|
|
|
|
|
<el-table-column prop="details_type" label="类型" min-width="85"> |
|
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
|
<el-tag v-if="scope.row.details_type === 1">原件</el-tag> |
|
|
|
|
|
<el-tag v-else>复印件</el-tag> |
|
|
|
|
|
</template> |
|
|
|
|
|
</el-table-column> |
|
|
|
|
|
<el-table-column prop="pass_location" label="传阅所在位置" min-width="180" /> |
|
|
|
|
|
<el-table-column v-if="isMidoRecord" prop="read_type" label="传阅状态" min-width="80" align="center"> |
|
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
|
<div> |
|
|
|
|
|
<span v-if="scope.row.read_type==='传阅中'" class="row-state end-state">{{ scope.row.read_type }}</span> |
|
|
|
|
|
<span v-if="scope.row.read_type==='空闲中' || scope.row.read_type==='未传阅'" class="row-state defalut-state">{{ scope.row.read_type }}</span> |
|
|
|
|
|
</div> |
|
|
|
|
|
</template> |
|
|
|
|
|
</el-table-column> |
|
|
|
|
|
<el-table-column prop="tid" label="电子标签绑定" min-width="120" align="center"> |
|
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
|
<span v-if="scope.row.tid && (scope.row.tid!==null || scope.row.tid !=='')" class="row-state end-state">已绑定</span> |
|
|
|
|
|
<span v-else class="row-state defalut-state">未绑定</span> |
|
|
|
|
|
</template> |
|
|
|
|
|
</el-table-column> |
|
|
|
|
|
<el-table-column v-if="!isMidoRecord" prop="update_time" label="操作" min-width="160"> |
|
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
|
<!-- 绑定标签 --> |
|
|
|
|
|
<el-button |
|
|
|
|
|
:loading="bindLoading[scope.row.id]" |
|
|
|
|
|
style="padding: 4px 4px 4px 6px !important; color: #0348f3 !important; background-color: #dcedfd !important; border: 1px solid #9bd1ff !important;" |
|
|
|
|
|
@click="bindingTag(scope.row)" |
|
|
|
|
|
><i class="iconfont icon-bendiguajie" /></el-button> |
|
|
|
|
|
<!-- 解绑标签 --> |
|
|
|
|
|
<el-button |
|
|
|
|
|
:loading="unbindBtnLoading[scope.row.id]" |
|
|
|
|
|
style="padding: 4px 4px 4px 6px !important; color: #ff8329 !important; background-color: #fff3e5 !important; border: 1px solid #febd98 !important;" |
|
|
|
|
|
@click="handleUnbind(scope.row)" |
|
|
|
|
|
><i class="iconfont icon-jiebang" /></el-button> |
|
|
|
|
|
<!-- 删除文件 --> |
|
|
|
|
|
<el-button |
|
|
|
|
|
v-if="scope.row.details_type !== 1" |
|
|
|
|
|
:loading="deleteBtnLoading[scope.row.id]" |
|
|
|
|
|
style="padding: 4px 6px 4px 6px !important; color: #ed4a41!important; background-color: #fcece9 !important; border: 1px solid #fbc0b5 !important;" |
|
|
|
|
|
@click="toDelete(scope.row)" |
|
|
|
|
|
><i class="iconfont icon-shanchu" /></el-button> |
|
|
|
|
|
</template> |
|
|
|
|
|
</el-table-column> |
|
|
|
|
|
<el-table-column v-if="!isMidoRecord" prop="update_time" label="传阅操作" min-width="80" align="center"> |
|
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
|
<!-- 传阅 - 选择用户 --> |
|
|
|
|
|
<el-button v-if="scope.row.read_type!=='传阅中'" :loading="lendBtnLoading[scope.row.id]" style="padding: 4px 2px 4px 6px !important; color: #0348f3 !important; background-color: #dcedfd !important; border: 1px solid #9bd1ff !important;" @click="handleLendFile(scope.row)"><i class="iconfont icon-liuchengfaqi" /></el-button> |
|
|
|
|
|
</template> |
|
|
|
|
|
</el-table-column> |
|
|
|
|
|
</el-table> |
|
|
</div> |
|
|
</div> |
|
|
|
|
|
</div> |
|
|
|
|
|
<!-- 传阅记录 --> |
|
|
|
|
|
<div v-if="archivesTabIndex===1" class="item-content"> |
|
|
<el-table |
|
|
<el-table |
|
|
v-loading="archivesFiledataLoading" |
|
|
|
|
|
:data="archivesFiledata" |
|
|
|
|
|
|
|
|
:data="borrowTableData" |
|
|
style="min-width: 100%;" |
|
|
style="min-width: 100%;" |
|
|
height="calc(100vh - 716px)" |
|
|
|
|
|
|
|
|
height="calc(100vh - 280px)" |
|
|
> |
|
|
> |
|
|
<el-table-column prop="reg_no" label="登记号" show-overflow-tooltip min-width="140" /> |
|
|
|
|
|
|
|
|
<el-table-column prop="reg_no" label="公文登记号" show-overflow-tooltip min-width="140" /> |
|
|
<el-table-column prop="details_type" label="类型" min-width="85"> |
|
|
<el-table-column prop="details_type" label="类型" min-width="85"> |
|
|
<template slot-scope="scope"> |
|
|
<template slot-scope="scope"> |
|
|
<el-tag v-if="scope.row.details_type === 1">原件</el-tag> |
|
|
<el-tag v-if="scope.row.details_type === 1">原件</el-tag> |
|
|
<el-tag v-else>复印件</el-tag> |
|
|
<el-tag v-else>复印件</el-tag> |
|
|
</template> |
|
|
</template> |
|
|
</el-table-column> |
|
|
</el-table-column> |
|
|
<el-table-column prop="pass_location" label="传阅所在位置" min-width="180" /> |
|
|
|
|
|
<el-table-column v-if="isMidoRecord" prop="read_type" label="传阅状态" min-width="80" align="center"> |
|
|
|
|
|
|
|
|
<el-table-column prop="borrow_name" label="传阅者" min-width="85" /> |
|
|
|
|
|
<el-table-column prop="borrow_type" label="类型"> |
|
|
<template slot-scope="scope"> |
|
|
<template slot-scope="scope"> |
|
|
<div> |
|
|
<div> |
|
|
<span v-if="scope.row.read_type==='传阅中'" class="row-state end-state">{{ scope.row.read_type }}</span> |
|
|
|
|
|
<span v-if="scope.row.read_type==='空闲中'" class="row-state defalut-state">{{ scope.row.read_type }}</span> |
|
|
|
|
|
|
|
|
<span v-if="scope.row.borrow_type === 1">部门</span> |
|
|
|
|
|
<span v-if="scope.row.borrow_type === 2">个人</span> |
|
|
</div> |
|
|
</div> |
|
|
</template> |
|
|
</template> |
|
|
</el-table-column> |
|
|
</el-table-column> |
|
|
<el-table-column prop="tid" label="电子标签绑定" min-width="120" align="center"> |
|
|
|
|
|
|
|
|
<el-table-column prop="start_time" label="开始时间" width="180"> |
|
|
<template slot-scope="scope"> |
|
|
<template slot-scope="scope"> |
|
|
<span v-if="scope.row.tid && (scope.row.tid!==null || scope.row.tid !=='')" class="row-state end-state">已绑定</span> |
|
|
|
|
|
<span v-else class="row-state defalut-state">未绑定</span> |
|
|
|
|
|
|
|
|
<div>{{ scope.row.start_time | parseTime }}</div> |
|
|
</template> |
|
|
</template> |
|
|
</el-table-column> |
|
|
</el-table-column> |
|
|
<el-table-column v-if="!isMidoRecord" prop="update_time" label="操作" min-width="160"> |
|
|
|
|
|
|
|
|
<el-table-column prop="latest_time" label="结束时间" width="180"> |
|
|
<template slot-scope="scope"> |
|
|
<template slot-scope="scope"> |
|
|
<!-- 绑定标签 --> |
|
|
|
|
|
<el-button |
|
|
|
|
|
:loading="bindLoading[scope.row.id]" |
|
|
|
|
|
style="padding: 4px 4px 4px 6px !important; color: #0348f3 !important; background-color: #dcedfd !important; border: 1px solid #9bd1ff !important;" |
|
|
|
|
|
@click="bindingTag(scope.row)" |
|
|
|
|
|
><i class="iconfont icon-bendiguajie" /></el-button> |
|
|
|
|
|
<!-- 解绑标签 --> |
|
|
|
|
|
<el-button |
|
|
|
|
|
:loading="unbindBtnLoading[scope.row.id]" |
|
|
|
|
|
style="padding: 4px 4px 4px 6px !important; color: #ff8329 !important; background-color: #fff3e5 !important; border: 1px solid #febd98 !important;" |
|
|
|
|
|
@click="handleUnbind(scope.row)" |
|
|
|
|
|
><i class="iconfont icon-jiebang" /></el-button> |
|
|
|
|
|
<!-- 删除文件 --> |
|
|
|
|
|
<el-button |
|
|
|
|
|
v-if="scope.row.details_type !== 1" |
|
|
|
|
|
:loading="deleteBtnLoading[scope.row.id]" |
|
|
|
|
|
style="padding: 4px 6px 4px 6px !important; color: #ed4a41!important; background-color: #fcece9 !important; border: 1px solid #fbc0b5 !important;" |
|
|
|
|
|
@click="toDelete(scope.row)" |
|
|
|
|
|
><i class="iconfont icon-shanchu" /></el-button> |
|
|
|
|
|
|
|
|
<div>{{ scope.row.latest_time | parseTime }}</div> |
|
|
</template> |
|
|
</template> |
|
|
</el-table-column> |
|
|
</el-table-column> |
|
|
</el-table> |
|
|
</el-table> |
|
|
|
|
|
<!--分页组件--> |
|
|
|
|
|
<el-pagination |
|
|
|
|
|
v-if="borrowTableData.length !== 0" |
|
|
|
|
|
:current-page="pageBorrow.page+1" |
|
|
|
|
|
:total="pageBorrow.total" |
|
|
|
|
|
:page-size="pageBorrow.size" |
|
|
|
|
|
:pager-count="5" |
|
|
|
|
|
layout="total, prev, pager, next, sizes" |
|
|
|
|
|
@size-change="handleBorrowSizeChange" |
|
|
|
|
|
@current-change="handleBorrowCurrentPage" |
|
|
|
|
|
/> |
|
|
|
|
|
</div> |
|
|
|
|
|
<!-- 操作记录 --> |
|
|
|
|
|
<div v-if="archivesTabIndex==2" class="item-content"> |
|
|
|
|
|
<el-table class="archives-table" :data="handleTableData" style="min-width: 100%; " height="calc(100vh - 280px)"> |
|
|
|
|
|
<el-table-column prop="operateType" label="操作类型" min-width="60" align="center"> |
|
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
|
<!-- getOperateTypeText(scope.row.operateType) --> |
|
|
|
|
|
<span class="row-state row-packing state-active">{{ scope.row.operateType }}</span> |
|
|
|
|
|
</template> |
|
|
|
|
|
</el-table-column> |
|
|
|
|
|
<el-table-column prop="createBy" label="处理人" min-width="60" /> |
|
|
|
|
|
<el-table-column prop="createTime" label="处理时间" width="180"> |
|
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
|
<div>{{ scope.row.createTime | parseTime }}</div> |
|
|
|
|
|
</template> |
|
|
|
|
|
</el-table-column> |
|
|
|
|
|
<el-table-column prop="remarks" label="备注" min-width="180" show-overflow-tooltip /> |
|
|
|
|
|
</el-table> |
|
|
|
|
|
<!--分页组件--> |
|
|
|
|
|
<el-pagination |
|
|
|
|
|
v-if="handleTableData.length !== 0" |
|
|
|
|
|
:current-page="page.page+1" |
|
|
|
|
|
:total="page.total" |
|
|
|
|
|
:page-size="page.size" |
|
|
|
|
|
:pager-count="5" |
|
|
|
|
|
layout="total, prev, pager, next, sizes" |
|
|
|
|
|
@size-change="handleSizeChange" |
|
|
|
|
|
@current-change="handleCurrentPage" |
|
|
|
|
|
/> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
<!-- 传阅记录 --> |
|
|
|
|
|
<div v-if="archivesTabIndex===1" class="item-content"> |
|
|
|
|
|
<el-table |
|
|
|
|
|
:data="borrowTableData" |
|
|
|
|
|
style="min-width: 100%;" |
|
|
|
|
|
height="calc(100vh - 280px)" |
|
|
|
|
|
> |
|
|
|
|
|
<el-table-column prop="reg_no" label="公文登记号" show-overflow-tooltip min-width="140" /> |
|
|
|
|
|
<el-table-column prop="details_type" label="类型" min-width="85"> |
|
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
|
<el-tag v-if="scope.row.details_type === 1">原件</el-tag> |
|
|
|
|
|
<el-tag v-else>复印件</el-tag> |
|
|
|
|
|
</template> |
|
|
|
|
|
</el-table-column> |
|
|
|
|
|
<el-table-column prop="borrow_name" label="传阅者" min-width="85" /> |
|
|
|
|
|
<el-table-column prop="borrow_type" label="类型"> |
|
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
|
<div> |
|
|
|
|
|
<span v-if="scope.row.borrow_type === 1">部门</span> |
|
|
|
|
|
<span v-if="scope.row.borrow_type === 2">个人</span> |
|
|
|
|
|
</div> |
|
|
|
|
|
</template> |
|
|
|
|
|
</el-table-column> |
|
|
|
|
|
<el-table-column prop="start_time" label="开始时间" width="180"> |
|
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
|
<div>{{ scope.row.start_time | parseTime }}</div> |
|
|
|
|
|
</template> |
|
|
|
|
|
</el-table-column> |
|
|
|
|
|
<el-table-column prop="latest_time" label="结束时间" width="180"> |
|
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
|
<div>{{ scope.row.latest_time | parseTime }}</div> |
|
|
|
|
|
</template> |
|
|
|
|
|
</el-table-column> |
|
|
|
|
|
</el-table> |
|
|
|
|
|
<!--分页组件--> |
|
|
|
|
|
<el-pagination |
|
|
|
|
|
v-if="borrowTableData.length !== 0" |
|
|
|
|
|
:current-page="pageBorrow.page+1" |
|
|
|
|
|
:total="pageBorrow.total" |
|
|
|
|
|
:page-size="pageBorrow.size" |
|
|
|
|
|
:pager-count="5" |
|
|
|
|
|
layout="total, prev, pager, next, sizes" |
|
|
|
|
|
@size-change="handleBorrowSizeChange" |
|
|
|
|
|
@current-change="handleBorrowCurrentPage" |
|
|
|
|
|
/> |
|
|
|
|
|
</div> |
|
|
|
|
|
<!-- 操作记录 --> |
|
|
|
|
|
<div v-if="archivesTabIndex==2" class="item-content"> |
|
|
|
|
|
<el-table class="archives-table" :data="handleTableData" style="min-width: 100%; " height="calc(100vh - 280px)"> |
|
|
|
|
|
<el-table-column prop="operateType" label="操作类型" min-width="60" align="center"> |
|
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
|
<!-- getOperateTypeText(scope.row.operateType) --> |
|
|
|
|
|
<span class="row-state row-packing state-active">{{ scope.row.operateType }}</span> |
|
|
|
|
|
</template> |
|
|
|
|
|
</el-table-column> |
|
|
|
|
|
<el-table-column prop="createBy" label="处理人" min-width="60" /> |
|
|
|
|
|
<el-table-column prop="createTime" label="处理时间" width="180"> |
|
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
|
<div>{{ scope.row.createTime | parseTime }}</div> |
|
|
|
|
|
</template> |
|
|
|
|
|
</el-table-column> |
|
|
|
|
|
<el-table-column prop="remarks" label="备注" min-width="180" show-overflow-tooltip /> |
|
|
|
|
|
</el-table> |
|
|
|
|
|
<!--分页组件--> |
|
|
|
|
|
<el-pagination |
|
|
|
|
|
v-if="handleTableData.length !== 0" |
|
|
|
|
|
:current-page="page.page+1" |
|
|
|
|
|
:total="page.total" |
|
|
|
|
|
:page-size="page.size" |
|
|
|
|
|
:pager-count="5" |
|
|
|
|
|
layout="total, prev, pager, next, sizes" |
|
|
|
|
|
@size-change="handleSizeChange" |
|
|
|
|
|
@current-change="handleCurrentPage" |
|
|
|
|
|
/> |
|
|
|
|
|
</div> |
|
|
|
|
|
</div> |
|
|
</div> |
|
|
</div> |
|
|
|
|
|
</el-dialog> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</el-dialog> |
|
|
|
|
|
<!-- @open="onDialogOpen" --> |
|
|
|
|
|
<el-dialog class="miod-depts-dialog" :append-to-body="true" :visible="deptsVisible" :before-close="handleBorrowClose" :close-on-click-modal="false" title="领导及部门"> |
|
|
|
|
|
<span class="dialog-right-top" /> |
|
|
|
|
|
<span class="dialog-left-bottom" /> |
|
|
|
|
|
<div class="setting-dialog"> |
|
|
|
|
|
<el-table ref="deptsMiodTable" :data="deptsMiodTable" highlight-current-row row-key="id" height="400" style="width: 100%;" @row-click="clickRowHandlerDepts" @selection-change="selectionChangeHandlerDepts"> |
|
|
|
|
|
<el-table-column type="selection" width="55" /> |
|
|
|
|
|
<el-table-column prop="borrowName" label="借阅者名称" /> |
|
|
|
|
|
<el-table-column prop="borrowType" label="借阅者类型"> |
|
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
|
<div> |
|
|
|
|
|
<span v-if="scope.row.borrowType === 1">部门</span> |
|
|
|
|
|
<span v-if="scope.row.borrowType === 2">个人</span> |
|
|
|
|
|
</div> |
|
|
|
|
|
</template> |
|
|
|
|
|
</el-table-column> |
|
|
|
|
|
<el-table-column prop="borrowNo" label="借阅证绑定"> |
|
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
|
<div> |
|
|
|
|
|
<span v-if="scope.row.borrowNo && (scope.row.borrowNo !== null || scope.row.borrowNo !== '')" class="row-state end-state">已绑定</span> |
|
|
|
|
|
<span v-else class="row-state cancel-state">未绑定</span> |
|
|
|
|
|
</div> |
|
|
|
|
|
</template> |
|
|
|
|
|
</el-table-column> |
|
|
|
|
|
<el-table-column prop="create_time" label="创建日期" width="200px"> |
|
|
|
|
|
<template slot-scope="scope"> |
|
|
|
|
|
<div>{{ scope.row.create_time | parseTime }}</div> |
|
|
|
|
|
</template> |
|
|
|
|
|
</el-table-column> |
|
|
|
|
|
</el-table> |
|
|
|
|
|
<!--分页组件--> |
|
|
|
|
|
<el-pagination |
|
|
|
|
|
v-if="deptsMiodTable.length !== 0" |
|
|
|
|
|
:current-page="pageDepts.page" |
|
|
|
|
|
:total="pageDepts.total" |
|
|
|
|
|
:page-size="pageDepts.size" |
|
|
|
|
|
:pager-count="5" |
|
|
|
|
|
layout="total, prev, pager, next, sizes" |
|
|
|
|
|
@size-change="handleDeptsSizeChange" |
|
|
|
|
|
@current-change="handleDeptsCurrentPage" |
|
|
|
|
|
/> |
|
|
|
|
|
</div> |
|
|
|
|
|
<div slot="footer" class="dialog-footer"> |
|
|
|
|
|
<el-button type="text" @click="handleBorrowClose">取消</el-button> |
|
|
|
|
|
<el-button type="primary" @click.native="handleComfireDepts">确定</el-button> |
|
|
|
|
|
</div> |
|
|
|
|
|
</el-dialog> |
|
|
|
|
|
</div> |
|
|
</template> |
|
|
</template> |
|
|
|
|
|
|
|
|
<script> |
|
|
<script> |
|
|
// import { crud } from '@crud/crud' |
|
|
// import { crud } from '@crud/crud' |
|
|
import { FetchArchivesDetails, FetchInitDocumentDetailsList, FetchAddDocumentDetails, FetchDeleteDocumentDetails, FetchInitDistributorByDocumentId, FetchInitOperate, FetchReadGW, FetchBingdingLabel, FetchUnbindTag, FetchArchivesDetailsBorrowLog } from '@/api/system/documentArchives' |
|
|
|
|
|
|
|
|
import { FetchArchivesDetails, FetchInitDocumentDetailsList, FetchAddDocumentDetails, FetchDeleteDocumentDetails, FetchInitDistributorByDocumentId, FetchInitOperate, FetchReadGW, FetchBingdingLabel, FetchUnbindTag, FetchArchivesDetailsBorrowLog, FetchLend } from '@/api/system/documentArchives' |
|
|
|
|
|
import { FetchInitBorrowerList } from '@/api/system/borrower' |
|
|
import { mapGetters } from 'vuex' |
|
|
import { mapGetters } from 'vuex' |
|
|
|
|
|
|
|
|
export default { |
|
|
export default { |
|
@ -254,7 +311,17 @@ export default { |
|
|
}, |
|
|
}, |
|
|
bindLoading: {}, |
|
|
bindLoading: {}, |
|
|
unbindBtnLoading: {}, |
|
|
unbindBtnLoading: {}, |
|
|
deleteBtnLoading: {} |
|
|
|
|
|
|
|
|
deleteBtnLoading: {}, |
|
|
|
|
|
lendBtnLoading: {}, |
|
|
|
|
|
deptsVisible: false, |
|
|
|
|
|
deptsMiodTable: [], |
|
|
|
|
|
pageDepts: { |
|
|
|
|
|
page: 0, |
|
|
|
|
|
size: 10, |
|
|
|
|
|
total: 0 |
|
|
|
|
|
}, |
|
|
|
|
|
singleSelectedDept: null, |
|
|
|
|
|
currentLendData: null |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
computed: { |
|
|
computed: { |
|
@ -641,6 +708,92 @@ export default { |
|
|
this.$set(this.deleteBtnLoading, datas.id, false) |
|
|
this.$set(this.deleteBtnLoading, datas.id, false) |
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|
|
|
|
handleLendFile(data) { |
|
|
|
|
|
console.log('data', data) |
|
|
|
|
|
this.currentLendData = data |
|
|
|
|
|
this.deptsVisible = true |
|
|
|
|
|
this.FetchDeptsList() |
|
|
|
|
|
}, |
|
|
|
|
|
// 获取部门/人员列表 |
|
|
|
|
|
FetchDeptsList() { |
|
|
|
|
|
this.singleSelectedDept = null |
|
|
|
|
|
this.deptsMiodTable = [] |
|
|
|
|
|
// this.btnLoading = true |
|
|
|
|
|
FetchInitBorrowerList(this.filterParams) |
|
|
|
|
|
.then(res => { |
|
|
|
|
|
this.deptsMiodTable = res.content || [] |
|
|
|
|
|
this.pageDepts.total = res.totalElements || 0 |
|
|
|
|
|
}) |
|
|
|
|
|
.catch(error => { |
|
|
|
|
|
this.$message.error('获取数据失败,请稍后重试') |
|
|
|
|
|
console.error('获取部门/人员列表失败', error) |
|
|
|
|
|
}) |
|
|
|
|
|
.finally(() => { |
|
|
|
|
|
// this.btnLoading = false |
|
|
|
|
|
}) |
|
|
|
|
|
}, |
|
|
|
|
|
handleComfireDepts() { |
|
|
|
|
|
// if (this.miodDeptsSelections.length === 0) { |
|
|
|
|
|
// this.$message.warning('请选择部门/人员') |
|
|
|
|
|
// return |
|
|
|
|
|
// } |
|
|
|
|
|
// this.miodDeptsTags = [...this.miodDeptsSelections] |
|
|
|
|
|
if (this.singleSelectedDept !== null) { |
|
|
|
|
|
const param = { |
|
|
|
|
|
'borrowDocumentTid': this.currentLendData.reg_no, |
|
|
|
|
|
'borrowerNo': this.singleSelectedDept.borrowNo |
|
|
|
|
|
} |
|
|
|
|
|
console.log('param', param) |
|
|
|
|
|
FetchLend(param).then((res) => { |
|
|
|
|
|
console.log('resLend', res) |
|
|
|
|
|
if (res.code !== -1) { |
|
|
|
|
|
this.$message({ message: res.msg, type: 'success', offset: 8 }) |
|
|
|
|
|
this.getInitDocumentDetailsList() |
|
|
|
|
|
} else { |
|
|
|
|
|
this.$message({ message: res.msg, type: 'error', offset: 8 }) |
|
|
|
|
|
} |
|
|
|
|
|
this.deptsVisible = false |
|
|
|
|
|
this.$set(this.lendBtnLoading, this.currentLendData.id, false) |
|
|
|
|
|
}).catch(error => { |
|
|
|
|
|
console.error(error) |
|
|
|
|
|
this.$set(this.lendBtnLoading, this.currentLendData.id, false) |
|
|
|
|
|
}) |
|
|
|
|
|
} else { |
|
|
|
|
|
this.$message({ message: '请选择借阅者', type: 'error', offset: 8 }) |
|
|
|
|
|
} |
|
|
|
|
|
}, |
|
|
|
|
|
clickRowHandlerDepts(row, event, column) { |
|
|
|
|
|
this.$refs.deptsMiodTable.toggleRowSelection(row, true) // 选中当前行 |
|
|
|
|
|
this.singleSelectedDept = row // 保存选中行数据 |
|
|
|
|
|
}, |
|
|
|
|
|
selectionChangeHandlerDepts(selection) { |
|
|
|
|
|
if (selection.length > 1) { |
|
|
|
|
|
// 如果选择了多个,只保留最后一个选中的 |
|
|
|
|
|
const latestRow = selection[selection.length - 1] |
|
|
|
|
|
this.$refs.deptsMiodTable.clearSelection() |
|
|
|
|
|
this.$refs.deptsMiodTable.toggleRowSelection(latestRow, true) |
|
|
|
|
|
this.singleSelectedDept = latestRow |
|
|
|
|
|
} else if (selection.length === 1) { |
|
|
|
|
|
// 如果选择了一个,保存选中项 |
|
|
|
|
|
this.singleSelectedDept = selection[0] |
|
|
|
|
|
} else { |
|
|
|
|
|
// 如果没有选择,清空选中状态 |
|
|
|
|
|
this.singleSelectedDept = null |
|
|
|
|
|
} |
|
|
|
|
|
}, |
|
|
|
|
|
handleDeptsSizeChange(size) { |
|
|
|
|
|
this.pageDepts.size = size |
|
|
|
|
|
this.pageDepts.page = 0 |
|
|
|
|
|
this.FetchDeptsList() |
|
|
|
|
|
}, |
|
|
|
|
|
handleDeptsCurrentPage(pageVal) { |
|
|
|
|
|
this.pageDepts.page = pageVal - 1 |
|
|
|
|
|
this.FetchDeptsList() |
|
|
|
|
|
}, |
|
|
|
|
|
handleBorrowClose(done) { |
|
|
|
|
|
this.deptsVisible = false |
|
|
|
|
|
done() |
|
|
|
|
|
}, |
|
|
handleClose(done) { |
|
|
handleClose(done) { |
|
|
this.archivesInfoVisible = false |
|
|
this.archivesInfoVisible = false |
|
|
done() |
|
|
done() |
|
|