|
|
@ -19,7 +19,7 @@ |
|
|
|
</span> |
|
|
|
</div> |
|
|
|
<!-- 基本信息 --> |
|
|
|
<div v-if="archivesTabIndex===0" class="base-info item-content"> |
|
|
|
<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> |
|
|
@ -32,7 +32,7 @@ |
|
|
|
</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" size="mini" style="padding: 7px 7px 7px 10px; " @click="handleAddDocDetails"> |
|
|
|
<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> |
|
|
@ -50,23 +50,38 @@ |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column prop="pass_location" label="传阅所在位置" min-width="180" /> |
|
|
|
<el-table-column prop="tid" label="电子标签" min-width="160" /> |
|
|
|
<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==='空闲中'" 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"> |
|
|
|
<!-- @click="handlePartParking(scope.row,scope.$index)" --> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<!-- 绑定标签 --> |
|
|
|
<el-button |
|
|
|
:loading="bindLoading" |
|
|
|
: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" |
|
|
|
: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" |
|
|
|
: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> |
|
|
@ -78,25 +93,48 @@ |
|
|
|
<!-- 传阅记录 --> |
|
|
|
<div v-if="archivesTabIndex===1" class="item-content"> |
|
|
|
<el-table |
|
|
|
:data="tableData" |
|
|
|
:data="borrowTableData" |
|
|
|
style="min-width: 100%;" |
|
|
|
height="calc(100vh - 280px)" |
|
|
|
> |
|
|
|
<el-table-column prop="file_name" label="公文登记号" show-overflow-tooltip min-width="140" /> |
|
|
|
<el-table-column prop="file_type" label="文件类型" min-width="85" /> |
|
|
|
<el-table-column prop="file_size" label="传阅者" min-width="85" /> |
|
|
|
<el-table-column prop="file_size" label="类型" min-width="85" /> |
|
|
|
<el-table-column prop="update_time" label="开始时间" width="180"> |
|
|
|
<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>{{ scope.row.update_time | parseTime }}</div> |
|
|
|
<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="update_time" label="结束时间" width="180"> |
|
|
|
<el-table-column prop="start_time" label="开始时间" width="180"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<div>{{ scope.row.update_time | parseTime }}</div> |
|
|
|
<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"> |
|
|
@ -128,19 +166,15 @@ |
|
|
|
/> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<!-- :binding-id="crud.selections[0] && crud.selections[0].id" @refresh="crud.refresh" --> |
|
|
|
<!-- <binding-tag-dlg ref="bindingTag" :selected-document="selectedDocument" :binding-id="selections[0] && selections[0].id" :binding-type="1" binding-txt="公文" /> --> |
|
|
|
</div> |
|
|
|
</el-dialog> |
|
|
|
</template> |
|
|
|
|
|
|
|
<script> |
|
|
|
// import { crud } from '@crud/crud' |
|
|
|
// , FetchUnbindTag |
|
|
|
import { FetchArchivesDetails, FetchInitDocumentDetailsList, FetchAddDocumentDetails, FetchDeleteDocumentDetails, FetchInitDistributorByDocumentId, FetchInitOperate, FetchReadGW, FetchBingdingLabel, FetchUnbindTag } from '@/api/system/documentArchives' |
|
|
|
import { FetchArchivesDetails, FetchInitDocumentDetailsList, FetchAddDocumentDetails, FetchDeleteDocumentDetails, FetchInitDistributorByDocumentId, FetchInitOperate, FetchReadGW, FetchBingdingLabel, FetchUnbindTag, FetchArchivesDetailsBorrowLog } from '@/api/system/documentArchives' |
|
|
|
import { mapGetters } from 'vuex' |
|
|
|
|
|
|
|
// import BindingTagDlg from '@/views/components/BindingTagDlg' |
|
|
|
export default { |
|
|
|
name: 'PrearchiveLibraryDetail', |
|
|
|
filters: { |
|
|
@ -162,6 +196,16 @@ export default { |
|
|
|
isMidoRecord: { |
|
|
|
type: Boolean, |
|
|
|
default: false |
|
|
|
}, |
|
|
|
parentInfo: { |
|
|
|
type: Object, |
|
|
|
default: function() { |
|
|
|
return {} |
|
|
|
} |
|
|
|
}, |
|
|
|
pageType: { |
|
|
|
type: String, |
|
|
|
default: null |
|
|
|
} |
|
|
|
}, |
|
|
|
data() { |
|
|
@ -171,12 +215,10 @@ export default { |
|
|
|
archivesDetailsData: [], |
|
|
|
archivesFiledata: [], |
|
|
|
selections: [], |
|
|
|
tableData: [], |
|
|
|
parentInfo: null, |
|
|
|
borrowTableData: [], |
|
|
|
handleTableData: [], |
|
|
|
currentArchives: null, |
|
|
|
currentArchivesId: null, |
|
|
|
pageType: null, |
|
|
|
archivesFiledataLoading: false, |
|
|
|
borrowerList: [], |
|
|
|
page: { |
|
|
@ -184,6 +226,11 @@ export default { |
|
|
|
size: 10, |
|
|
|
total: 0 |
|
|
|
}, |
|
|
|
pageBorrow: { |
|
|
|
page: 0, |
|
|
|
size: 10, |
|
|
|
total: 0 |
|
|
|
}, |
|
|
|
operateTypeMap: { |
|
|
|
1: '归档', |
|
|
|
2: '退回', |
|
|
@ -205,21 +252,20 @@ export default { |
|
|
|
18: '附件删除', |
|
|
|
19: '实体档案归还' |
|
|
|
}, |
|
|
|
bindLoading: false, |
|
|
|
unbindBtnLoading: false, |
|
|
|
deleteBtnLoading: false |
|
|
|
bindLoading: {}, |
|
|
|
unbindBtnLoading: {}, |
|
|
|
deleteBtnLoading: {} |
|
|
|
} |
|
|
|
}, |
|
|
|
computed: { |
|
|
|
...mapGetters([ |
|
|
|
'baseApi' |
|
|
|
]), |
|
|
|
// 计算属性:获取传阅状态 |
|
|
|
readStatus() { |
|
|
|
const readTypeItem = this.archivesDetailsData.find( |
|
|
|
item => item.fieldName === 'read_type' |
|
|
|
) |
|
|
|
return readTypeItem ? readTypeItem.context : '未传阅' |
|
|
|
return readTypeItem?.context ?? '未传阅' |
|
|
|
} |
|
|
|
}, |
|
|
|
created() { |
|
|
@ -232,29 +278,38 @@ export default { |
|
|
|
case '未传阅': |
|
|
|
return 'defalut-state' |
|
|
|
case '传阅中': |
|
|
|
return 'soon-state' |
|
|
|
case '已传阅': |
|
|
|
return 'end-state' |
|
|
|
case '已传阅': |
|
|
|
return 'ing-state' |
|
|
|
default: |
|
|
|
return 'defalut-state' |
|
|
|
} |
|
|
|
}, |
|
|
|
changeActiveTab(index) { |
|
|
|
this.archivesTabIndex = index |
|
|
|
if (index === 2) { |
|
|
|
if (index === 0) { |
|
|
|
this.getDetial() |
|
|
|
} else if (index === 1) { |
|
|
|
this.pageBorrow.size = 10 |
|
|
|
this.pageBorrow.page = 0 |
|
|
|
this.getArchivesDetailsBorrowLog() |
|
|
|
} else if (index === 2) { |
|
|
|
this.page.size = 10 |
|
|
|
this.page.page = 0 |
|
|
|
this.getInitOperate() |
|
|
|
} |
|
|
|
}, |
|
|
|
getOperateTypeText(type) { |
|
|
|
return this.operateTypeMap[type] || '-' |
|
|
|
}, |
|
|
|
getDetial(row, pageType) { |
|
|
|
this.pageType = pageType |
|
|
|
this.currentArchives = row |
|
|
|
this.currentArchivesId = row.id |
|
|
|
getDetial() { |
|
|
|
console.log('this.parentInfo', this.parentInfo) |
|
|
|
// this.pageType = pageType |
|
|
|
// this.currentArchives = this.parentInfo |
|
|
|
// this.currentArchivesId = this.parentInfo.id |
|
|
|
let documentId |
|
|
|
if (pageType && pageType === 'search') { |
|
|
|
documentId = row.document_id |
|
|
|
if (this.pageType && (this.pageType === 'search' || this.pageType === 'miodRecord')) { |
|
|
|
documentId = this.parentInfo.document_id |
|
|
|
} else { |
|
|
|
documentId = this.selectedDocument.isType === 2 |
|
|
|
? this.selectedDocument.id |
|
|
@ -263,16 +318,29 @@ export default { |
|
|
|
|
|
|
|
const commonParams = { |
|
|
|
documentId, |
|
|
|
archivesId: row.id |
|
|
|
archivesId: this.pageType && this.pageType === 'miodRecord' |
|
|
|
? this.parentInfo.details_type === 1 |
|
|
|
? this.parentInfo.archives_id |
|
|
|
: this.parentInfo.parents_id |
|
|
|
: this.parentInfo.id |
|
|
|
} |
|
|
|
const distributorParams = { |
|
|
|
...commonParams, |
|
|
|
readType: 0 |
|
|
|
} |
|
|
|
|
|
|
|
Promise.all([ |
|
|
|
// 获取档案详情 |
|
|
|
FetchArchivesDetails(commonParams).then(data => { |
|
|
|
console.log('archivesDetailsData', data) |
|
|
|
if (data.code !== 500) { |
|
|
|
this.archivesDetailsData = data |
|
|
|
} else { |
|
|
|
this.archivesDetailsData = [] |
|
|
|
} |
|
|
|
}), |
|
|
|
// 获取传阅人列表 |
|
|
|
FetchInitDistributorByDocumentId(commonParams).then(data => { |
|
|
|
FetchInitDistributorByDocumentId(distributorParams).then(data => { |
|
|
|
this.borrowerList = data |
|
|
|
}) |
|
|
|
]).catch(error => { |
|
|
@ -286,8 +354,8 @@ export default { |
|
|
|
this.archivesFiledataLoading = true |
|
|
|
|
|
|
|
let documentId |
|
|
|
if (this.pageType && this.pageType === 'search') { |
|
|
|
documentId = this.currentArchives.document_id |
|
|
|
if (this.pageType && (this.pageType === 'search' || this.pageType === 'miodRecord')) { |
|
|
|
documentId = this.parentInfo.document_id |
|
|
|
} else { |
|
|
|
documentId = this.selectedDocument.isType === 2 |
|
|
|
? this.selectedDocument.id |
|
|
@ -296,7 +364,11 @@ export default { |
|
|
|
|
|
|
|
const params = { |
|
|
|
documentId, |
|
|
|
archivesId: this.currentArchivesId |
|
|
|
archivesId: this.pageType && this.pageType === 'miodRecord' |
|
|
|
? this.parentInfo.details_type === 1 |
|
|
|
? this.parentInfo.archives_id |
|
|
|
: this.parentInfo.parents_id |
|
|
|
: this.parentInfo.id |
|
|
|
} |
|
|
|
|
|
|
|
FetchInitDocumentDetailsList(params).then(data => { |
|
|
@ -327,7 +399,7 @@ export default { |
|
|
|
handleAddDocDetails() { |
|
|
|
let documentId |
|
|
|
if (this.pageType && this.pageType === 'search') { |
|
|
|
documentId = this.currentArchives.document_id |
|
|
|
documentId = this.parentInfo.document_id |
|
|
|
} else { |
|
|
|
documentId = this.selectedDocument.isType === 2 |
|
|
|
? this.selectedDocument.id |
|
|
@ -335,7 +407,7 @@ export default { |
|
|
|
} |
|
|
|
const params = { |
|
|
|
documentId: documentId, |
|
|
|
archivesId: this.currentArchivesId, |
|
|
|
archivesId: this.parentInfo.id, |
|
|
|
regNo: this.archivesFiledata[0].reg_no |
|
|
|
} |
|
|
|
FetchAddDocumentDetails(params).then(data => { |
|
|
@ -348,11 +420,39 @@ export default { |
|
|
|
this.$message({ message: error, type: 'error', offset: 8 }) |
|
|
|
}) |
|
|
|
}, |
|
|
|
// 借阅记录 |
|
|
|
getArchivesDetailsBorrowLog() { |
|
|
|
let documentId |
|
|
|
if (this.pageType && (this.pageType === 'search' || this.pageType === 'miodRecord')) { |
|
|
|
documentId = this.parentInfo.document_id |
|
|
|
} else { |
|
|
|
documentId = this.selectedDocument.isType === 2 |
|
|
|
? this.selectedDocument.id |
|
|
|
: this.selectedDocument.documentId |
|
|
|
} |
|
|
|
const params = { |
|
|
|
documentId: documentId, |
|
|
|
archivesId: this.pageType && this.pageType === 'miodRecord' |
|
|
|
? this.parentInfo.details_type === 1 |
|
|
|
? this.parentInfo.archives_id |
|
|
|
: this.parentInfo.parents_id |
|
|
|
: this.parentInfo.id, |
|
|
|
page: this.pageBorrow.page, |
|
|
|
size: this.pageBorrow.size |
|
|
|
} |
|
|
|
FetchArchivesDetailsBorrowLog(params).then(data => { |
|
|
|
console.log('data', data) |
|
|
|
this.borrowTableData = data.content |
|
|
|
this.pageBorrow.total = data.totalElements |
|
|
|
}).catch(error => { |
|
|
|
this.$message({ message: error, type: 'error', offset: 8 }) |
|
|
|
}) |
|
|
|
}, |
|
|
|
// 操作记录 |
|
|
|
getInitOperate() { |
|
|
|
let documentId |
|
|
|
if (this.pageType && this.pageType === 'search') { |
|
|
|
documentId = this.currentArchives.document_id |
|
|
|
if (this.pageType && (this.pageType === 'search' || this.pageType === 'miodRecord')) { |
|
|
|
documentId = this.parentInfo.document_id |
|
|
|
} else { |
|
|
|
documentId = this.selectedDocument.isType === 2 |
|
|
|
? this.selectedDocument.id |
|
|
@ -360,7 +460,11 @@ export default { |
|
|
|
} |
|
|
|
const params = { |
|
|
|
documentId: documentId, |
|
|
|
archivesId: this.currentArchivesId, |
|
|
|
archivesId: this.pageType && this.pageType === 'miodRecord' |
|
|
|
? this.parentInfo.details_type === 1 |
|
|
|
? this.parentInfo.archives_id |
|
|
|
: this.parentInfo.parents_id |
|
|
|
: this.parentInfo.id, |
|
|
|
page: this.page.page, |
|
|
|
size: this.page.size |
|
|
|
} |
|
|
@ -372,8 +476,9 @@ export default { |
|
|
|
this.$message({ message: error, type: 'error', offset: 8 }) |
|
|
|
}) |
|
|
|
}, |
|
|
|
// 绑定标签 |
|
|
|
bindingTag(row) { |
|
|
|
this.bindLoading = true |
|
|
|
this.$set(this.bindLoading, row.id, true) |
|
|
|
console.log('bindingTag', row) |
|
|
|
if (row.tid && (row.tid !== '' || row.tid !== null)) { |
|
|
|
this.$confirm('当前所选已绑定标签' + '<span>你是否还要继续?</span>', '提示', { |
|
|
@ -384,7 +489,7 @@ export default { |
|
|
|
}).then(() => { |
|
|
|
this.handlBind(row, 'hasLabel') |
|
|
|
}).catch(() => { |
|
|
|
this.bindLoading = false |
|
|
|
this.$set(this.bindLoading, row.id, false) |
|
|
|
}) |
|
|
|
} else { |
|
|
|
this.handlBind(row) |
|
|
@ -399,7 +504,7 @@ export default { |
|
|
|
FetchReadGW(param).then((res) => { |
|
|
|
if (!res) { |
|
|
|
this.$message({ message: '绑定失败', type: 'error', offset: 8 }) |
|
|
|
this.bindLoading = false |
|
|
|
this.$set(this.bindLoading, row.id, false) |
|
|
|
} else { |
|
|
|
const result = JSON.parse(res) |
|
|
|
console.log('result', result) |
|
|
@ -432,25 +537,26 @@ export default { |
|
|
|
this.$message({ message: '绑定成功', type: 'success', offset: 8 }) |
|
|
|
} |
|
|
|
this.getInitDocumentDetailsList() |
|
|
|
this.bindLoading = false |
|
|
|
this.$set(this.bindLoading, row.id, false) |
|
|
|
}).catch(error => { |
|
|
|
console.error(error) |
|
|
|
this.bindLoading = false |
|
|
|
this.$set(this.bindLoading, row.id, false) |
|
|
|
}) |
|
|
|
} else if (result.code === '-1') { |
|
|
|
this.$message({ message: result.message, type: 'error', offset: 8 }) |
|
|
|
this.bindLoading = false |
|
|
|
this.$set(this.bindLoading, row.id, false) |
|
|
|
} else if (result.code === '-1000') { |
|
|
|
// 读写器超时未响应 |
|
|
|
this.$message({ message: result.message, type: 'error', offset: 8 }) |
|
|
|
this.bindLoading = false |
|
|
|
this.$set(this.bindLoading, row.id, false) |
|
|
|
} |
|
|
|
} |
|
|
|
}).catch(error => { |
|
|
|
console.error(error) |
|
|
|
this.bindLoading = false |
|
|
|
this.$set(this.bindLoading, row.id, false) |
|
|
|
}) |
|
|
|
}, |
|
|
|
// 解绑标签 |
|
|
|
handleUnbind(data) { |
|
|
|
console.log('data', data) |
|
|
|
this.$confirm('此操作将解除所选电子标签的绑定关系' + '<span>你是否还要继续?</span>', '提示', { |
|
|
@ -459,10 +565,10 @@ export default { |
|
|
|
type: 'warning', |
|
|
|
dangerouslyUseHTMLString: true |
|
|
|
}).then(() => { |
|
|
|
this.unbindBtnLoading = true |
|
|
|
this.$set(this.unbindBtnLoading, data.id, true) |
|
|
|
let documentId |
|
|
|
if (this.pageType && this.pageType === 'search') { |
|
|
|
documentId = this.currentArchives.document_id |
|
|
|
documentId = this.parentInfo.document_id |
|
|
|
} else { |
|
|
|
documentId = this.selectedDocument.isType === 2 |
|
|
|
? this.selectedDocument.id |
|
|
@ -481,7 +587,7 @@ export default { |
|
|
|
console.log('unbindData', unbindData) |
|
|
|
FetchUnbindTag(unbindData).then((res) => { |
|
|
|
if (res) { |
|
|
|
this.unbindBtnLoading = false |
|
|
|
this.$set(this.unbindBtnLoading, data.id, false) |
|
|
|
this.$message({ message: '解除绑定成功', type: 'success', offset: 8 }) |
|
|
|
this.getInitDocumentDetailsList() |
|
|
|
} else { |
|
|
@ -489,12 +595,13 @@ export default { |
|
|
|
} |
|
|
|
}) |
|
|
|
}).catch(() => { |
|
|
|
this.unbindBtnLoading = false |
|
|
|
this.$set(this.unbindBtnLoading, data.id, false) |
|
|
|
}) |
|
|
|
}, |
|
|
|
// 删除文件 |
|
|
|
toDelete(datas) { |
|
|
|
console.log('datas', datas) |
|
|
|
this.deleteBtnLoading = true |
|
|
|
this.$set(this.deleteBtnLoading, datas.id, true) |
|
|
|
this.$confirm('此操作将删除当前所选公文文件' + '<span>你是否还要继续?</span>', '提示', { |
|
|
|
confirmButtonText: '继续', |
|
|
|
cancelButtonText: '取消', |
|
|
@ -503,7 +610,7 @@ export default { |
|
|
|
}).then(() => { |
|
|
|
let documentId |
|
|
|
if (this.pageType && this.pageType === 'search') { |
|
|
|
documentId = this.currentArchives.document_id |
|
|
|
documentId = this.parentInfo.document_id |
|
|
|
} else { |
|
|
|
documentId = this.selectedDocument.isType === 2 |
|
|
|
? this.selectedDocument.id |
|
|
@ -513,23 +620,27 @@ export default { |
|
|
|
documentId: documentId, |
|
|
|
archivesId: datas.id, // this.currentArchivesId, |
|
|
|
regNo: datas.reg_no, |
|
|
|
isDestroy: true |
|
|
|
isDestroy: true, |
|
|
|
tid: datas.tid ? datas.tid : null // 标签读取的id |
|
|
|
} |
|
|
|
console.log('ids', params) |
|
|
|
FetchDeleteDocumentDetails(params).then((res) => { |
|
|
|
console.log('res', res) |
|
|
|
if (res === '删除成功' && res.code !== 500) { |
|
|
|
this.$message({ message: '删除成功', type: 'success', offset: 8 }) |
|
|
|
} else { |
|
|
|
this.$message({ message: res.message, type: 'error', offset: 8 }) |
|
|
|
} |
|
|
|
this.getInitDocumentDetailsList() |
|
|
|
this.deleteBtnLoading = false |
|
|
|
this.$set(this.deleteBtnLoading, datas.id, false) |
|
|
|
}).catch(err => { |
|
|
|
this.deleteBtnLoading = false |
|
|
|
this.$set(this.deleteBtnLoading, datas.id, false) |
|
|
|
console.log(err) |
|
|
|
}) |
|
|
|
}).catch(() => { |
|
|
|
this.deleteBtnLoading = false |
|
|
|
this.$set(this.deleteBtnLoading, datas.id, false) |
|
|
|
}) |
|
|
|
}, |
|
|
|
// dialog - close |
|
|
|
handleClose(done) { |
|
|
|
this.archivesInfoVisible = false |
|
|
|
done() |
|
|
@ -537,9 +648,20 @@ export default { |
|
|
|
handleSizeChange(size) { |
|
|
|
this.page.size = size |
|
|
|
this.page.page = 0 |
|
|
|
this.getInitOperate() |
|
|
|
}, |
|
|
|
handleCurrentPage(val) { |
|
|
|
this.page.page = val - 1 |
|
|
|
this.getInitOperate() |
|
|
|
}, |
|
|
|
handleBorrowSizeChange(size) { |
|
|
|
this.pageBorrow.size = size |
|
|
|
this.pageBorrow.page = 0 |
|
|
|
this.getArchivesDetailsBorrowLog() |
|
|
|
}, |
|
|
|
handleBorrowCurrentPage(val) { |
|
|
|
this.pageBorrow.page = val - 1 |
|
|
|
this.getArchivesDetailsBorrowLog() |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
@ -549,8 +671,7 @@ export default { |
|
|
|
.item-content { |
|
|
|
height: calc(100vh - 240px); |
|
|
|
} |
|
|
|
.base-info{ |
|
|
|
|
|
|
|
.base-info-new{ |
|
|
|
.el-row{ |
|
|
|
padding: 20px 0 0 0; |
|
|
|
background-color: #F6F8FC; |
|
|
@ -574,7 +695,7 @@ export default { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
.base-info .base-info-item span.el-tag{ |
|
|
|
.base-info-item span.el-tag{ |
|
|
|
width: auto; |
|
|
|
color: #fff; |
|
|
|
} |
|
|
|