5 changed files with 120 additions and 294 deletions
-
18src/views/archiveKeeping/caseManage/caseLog/index.vue
-
180src/views/archivesManage/exportTask/index.vue
-
114src/views/archivesManage/exportTask/module/detail.vue
-
63src/views/archivesManage/openInventory/index.vue
-
39src/views/archivesManage/openInventory/module/detail.vue
@ -1,197 +1,27 @@ |
|||
<template> |
|||
<!-- 开放清册 --> |
|||
<div class="app-container row-container"> |
|||
<div class="connection-header collect-header" style="margin-bottom: 20px;"> |
|||
<div class="head-search" style="margin-bottom: 0;"> |
|||
<el-select |
|||
v-model="status" |
|||
style="margin-right: 10px; width: 100px;" |
|||
placeholder="请选择" |
|||
> |
|||
<el-option |
|||
v-for="item in statusOptions" |
|||
:key="item.value" |
|||
:label="item.label" |
|||
:value="item.value" |
|||
/> |
|||
</el-select> |
|||
<el-input v-model="search" clearable size="small" placeholder="输入关键字可模糊搜索" prefix-icon="el-icon-search" style="width: 200px;" class="filter-item" @keyup.enter.native="getBusinessFlowHistory()" @clear="getBusinessFlowHistory()" /> |
|||
<el-button class="filter-item filter-search" size="mini" type="success" icon="el-icon-search" @click="getBusinessFlowHistory()">搜索</el-button> |
|||
<el-button class="filter-item filter-refresh" size="mini" type="warning" icon="el-icon-refresh-left" @click="resetQuery">重置</el-button> |
|||
</div> |
|||
<el-button size="mini" :disabled="selections.length === 0" @click="doExport(selections)"> |
|||
<i class="iconfont icon-daochu" /> |
|||
导出 |
|||
</el-button> |
|||
</div> |
|||
<div style="height: calc(100vh - 232px);"> |
|||
<el-table ref="table" :data="tableData" style="width: 100%;" height="calc(100vh - 330px)" @select="handleCurrentChange" @selection-change="selectionChangeHandler" @row-dblclick="handleDetail"> |
|||
<el-table-column type="selection" align="center" width="55" /> |
|||
<el-table-column prop="business_type" label="类型"> |
|||
<template> |
|||
<div>离线移交</div> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column prop="title" label="包名" min-width="180" /> |
|||
<el-table-column prop="number" label="任务条数"> |
|||
<template> |
|||
<!-- 目前只有1条默认 --> |
|||
<span>1</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column prop="applicant" label="操作人" /> |
|||
<el-table-column prop="dept" label="任务状态"> |
|||
<template> |
|||
<!-- 目前只有导出成功,后续看需求再更改 --> |
|||
<!-- <span class="row-state ing-state">导出中</span> --> |
|||
<span class="row-state end-state">导出成功</span> |
|||
<!-- <span class="row-state cancel-state">导出失败</span> --> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column prop="createTime" label="操作时间"> |
|||
<template slot-scope="scope"> |
|||
<div>{{ scope.row.createTime | parseTime }}</div> |
|||
</template> |
|||
</el-table-column> |
|||
</el-table> |
|||
<!--分页组件--> |
|||
<el-pagination |
|||
v-if="tableData.length !== 0" |
|||
: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" |
|||
/> |
|||
</div> |
|||
<Detail ref="mDetail" /> |
|||
<div> |
|||
<InventoryModule :invent-type="7" /> |
|||
</div> |
|||
|
|||
</template> |
|||
|
|||
<script> |
|||
import { FetchBusinessFlowHistory } from '@/api/archivesManage/library' |
|||
import Detail from './module/detail' |
|||
import qs from 'qs' |
|||
import { exportFile } from '@/utils/index' |
|||
import { mapGetters } from 'vuex' |
|||
import InventoryModule from '../openInventory/index' |
|||
|
|||
export default { |
|||
name: 'ExportTask', |
|||
components: { Detail }, |
|||
components: { InventoryModule }, |
|||
data() { |
|||
return { |
|||
statusOptions: [ |
|||
{ |
|||
label: '全部', |
|||
value: 0 |
|||
}, |
|||
{ |
|||
label: '导出中', |
|||
value: 1 |
|||
}, |
|||
{ |
|||
label: '导出成功', |
|||
value: 2 |
|||
}, |
|||
{ |
|||
label: '导出失败', |
|||
value: 3 |
|||
} |
|||
], |
|||
status: '', |
|||
tableData: [], |
|||
selections: [], |
|||
page: { |
|||
page: 0, |
|||
size: 10, |
|||
total: 0 |
|||
}, |
|||
businessType: 7, |
|||
search: '' |
|||
} |
|||
}, |
|||
computed: { |
|||
...mapGetters([ |
|||
'baseApi' |
|||
]) |
|||
}, |
|||
created() { |
|||
}, |
|||
mounted() { |
|||
this.getBusinessFlowHistory() |
|||
}, |
|||
methods: { |
|||
resetQuery() { |
|||
this.search = '' |
|||
this.status = null |
|||
this.getBusinessFlowHistory() |
|||
}, |
|||
getBusinessFlowHistory() { |
|||
const params = { |
|||
'status': this.status, |
|||
'search': this.search, |
|||
'businessType': this.businessType, |
|||
'page': this.page.page, |
|||
'size': this.page.size |
|||
} |
|||
FetchBusinessFlowHistory(params).then((res) => { |
|||
if (res.code !== 500) { |
|||
this.tableData = res.content |
|||
this.page.total = res.totalElements |
|||
} else { |
|||
this.$message.error('获取数据失败') |
|||
} |
|||
}).catch(err => { |
|||
console.log(err) |
|||
}) |
|||
}, |
|||
handleDetail(row) { |
|||
this.$refs.mDetail.rowCurrent = row |
|||
this.$refs.mDetail.detialVisible = true |
|||
}, |
|||
// 触发单选 |
|||
handleCurrentChange(selection, row) { |
|||
this.selections = selection |
|||
}, |
|||
handleSizeChange(size) { |
|||
this.page.size = size |
|||
this.page.page = 1 |
|||
}, |
|||
handleCurrentPage(val) { |
|||
this.page.page = val |
|||
}, |
|||
selectionChangeHandler(val) { |
|||
this.selections = val |
|||
}, |
|||
doExport(data) { |
|||
this.$confirm('此操作将导出所选数据' + '<span>你是否还要继续?</span>', '提示', { |
|||
confirmButtonText: '继续', |
|||
cancelButtonText: '取消', |
|||
type: 'warning', |
|||
dangerouslyUseHTMLString: true |
|||
}).then(() => { |
|||
const ids = [] |
|||
data.forEach(val => { |
|||
ids.push(val.id) |
|||
}) |
|||
const params = { |
|||
'businessIds': ids, |
|||
'businessType': this.businessType |
|||
} |
|||
exportFile(this.baseApi + '/api/control/exportBusinessFlow?' + qs.stringify(params, { indices: false })) |
|||
}).catch(() => { |
|||
}) |
|||
} |
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<style lang="scss" scoped> |
|||
@import "~@/assets/styles/collect-reorganizi.scss"; |
|||
.connection-header{ |
|||
padding: 0 !important; |
|||
} |
|||
<style lang='scss' scoped> |
|||
</style> |
@ -1,114 +0,0 @@ |
|||
<template> |
|||
<!-- 详情 --> |
|||
<el-dialog title="导出任务详情" :close-on-click-modal="false" :modal-append-to-body="false" append-to-body :visible.sync="detialVisible" @opened="opened"> |
|||
<div class="setting-dialog"> |
|||
<ul class="hitch-info"> |
|||
<li><span>包名:</span>{{ rowCurrent && rowCurrent.title }}</li> |
|||
<li><span>操作时间:</span>{{ rowCurrent && rowCurrent.createTime }}</li> |
|||
<li><span>操作人:</span>{{ rowCurrent && rowCurrent.applicant }}</li> |
|||
<li><span>导出方式:</span>离线移交</li> |
|||
<!-- <li><span>任务状态:</span><i class="row-state end-state">导出成功</i></li> --> |
|||
<li><span>完成时间:</span>{{ rowCurrent && rowCurrent.completeTime }}</li> |
|||
<li><span>审批意见:</span>{{ rowCurrent && rowCurrent.opinion }}</li> |
|||
<li class="state-list"> |
|||
<span class="row-state end-state">导出成功</span> |
|||
</li> |
|||
</ul> |
|||
<div style="display: flex; justify-content: flex-end; margin-bottom: 12px;"> |
|||
<el-button class="task-btn" @click="downloadFile"><i class="iconfont icon-xiazai" />下载文件</el-button> |
|||
</div> |
|||
<el-table ref="table" :data="tableData" style="width: 100%;"> |
|||
<el-table-column type="index" align="center" width="55" label="序号" /> |
|||
<el-table-column prop="fondsName" label="所属全宗" /> |
|||
<el-table-column prop="categoryName" label="门类名称" /> |
|||
<el-table-column prop="categoryLevel" label="整理方式"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.categoryLevel === 2 ? '案卷整理' : '按件整理' }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column prop="archiveNo" label="项目号/档号" /> |
|||
<el-table-column prop="maintitle" label="题名" /> |
|||
<el-table-column prop="reason" label="状态" align="center"> |
|||
<template> |
|||
<span class="row-state end-state">成功</span> |
|||
<!-- <span class="row-state cancel-state">失败</span> --> |
|||
</template> |
|||
</el-table-column> |
|||
</el-table> |
|||
</div> |
|||
</el-dialog> |
|||
</template> |
|||
|
|||
<script> |
|||
import { FetchBusinessFlowDetails } from '@/api/archivesManage/library' |
|||
import { downloadFile } from '@/utils/index' |
|||
import { mapGetters } from 'vuex' |
|||
export default { |
|||
name: 'Detail', |
|||
components: { }, |
|||
data() { |
|||
return { |
|||
rowCurrent: null, |
|||
detialVisible: false, |
|||
baseInfo: null, |
|||
tableData: [] |
|||
} |
|||
}, |
|||
computed: { |
|||
...mapGetters([ |
|||
'baseApi' |
|||
]) |
|||
}, |
|||
created() { |
|||
}, |
|||
mounted() { |
|||
}, |
|||
methods: { |
|||
opened() { |
|||
this.getBusinessFlowDetails() |
|||
}, |
|||
getBusinessFlowDetails() { |
|||
const params = { |
|||
'businessId': this.rowCurrent.id |
|||
} |
|||
FetchBusinessFlowDetails(params).then((res) => { |
|||
if (res.code !== 500) { |
|||
console.log(res) |
|||
this.baseInfo = res.businessFlow |
|||
this.tableData = res.details |
|||
} else { |
|||
this.$message.error('获取数据失败') |
|||
} |
|||
}).catch(err => { |
|||
console.log(err) |
|||
}) |
|||
}, |
|||
downloadFile() { |
|||
if (this.rowCurrent.zip_path) { |
|||
const url = this.baseApi + '/downloadFile' + this.rowCurrent.zip_path |
|||
fetch(url).then(res => res.blob()).then(blob => { |
|||
downloadFile(blob, this.rowCurrent.title, 'zip') |
|||
}).catch(() => { |
|||
this.$message.error('下载文件失败!') |
|||
}) |
|||
} else { |
|||
this.$message.error('下载文件路径获取失败!') |
|||
} |
|||
} |
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<style lang='scss' scoped> |
|||
@import "~@/assets/styles/collect-reorganizi.scss"; |
|||
.row-state{ |
|||
font-style: normal; |
|||
padding: 0 8px; |
|||
} |
|||
.task-btn{ |
|||
width: 104px; |
|||
height: 32px; |
|||
line-height: 30px; |
|||
padding: 0; |
|||
} |
|||
</style> |
Write
Preview
Loading…
Cancel
Save
Reference in new issue