Browse Source

导出任务统一module

master
xuhuajiao 1 year ago
parent
commit
bb15684e49
  1. 18
      src/views/archiveKeeping/caseManage/caseLog/index.vue
  2. 180
      src/views/archivesManage/exportTask/index.vue
  3. 114
      src/views/archivesManage/exportTask/module/detail.vue
  4. 63
      src/views/archivesManage/openInventory/index.vue
  5. 39
      src/views/archivesManage/openInventory/module/detail.vue

18
src/views/archiveKeeping/caseManage/caseLog/index.vue

@ -35,7 +35,9 @@
/> />
</el-select> </el-select>
</el-input> </el-input>
<date-range-picker v-model="blurryTime" class="date-item" />
<rrOperation /> <rrOperation />
<el-button class="filter-item filter-refresh" size="mini" type="warning" icon="el-icon-refresh-left" @click="resetQuery">重置</el-button>
</div> </div>
<div class="handle-container"> <div class="handle-container">
<el-button slot="reference" size="mini" :disabled="!crud.selections.length" @click="downloadApi(crud.selections)"> <el-button slot="reference" size="mini" :disabled="!crud.selections.length" @click="downloadApi(crud.selections)">
@ -81,6 +83,7 @@ import CRUD, { presenter, crud } from '@crud/crud'
import caseCurd from '@/api/archivesKeeping/caseManage' import caseCurd from '@/api/archivesKeeping/caseManage'
import rrOperation from '@crud/RR.operation' import rrOperation from '@crud/RR.operation'
import pagination from '@crud/Pagination' import pagination from '@crud/Pagination'
import DateRangePicker from '@/components/DateRangePicker'
import qs from 'qs' import qs from 'qs'
import { exportFile } from '@/utils/index' import { exportFile } from '@/utils/index'
import { mapGetters } from 'vuex' import { mapGetters } from 'vuex'
@ -101,7 +104,7 @@ export default {
} }
} }
}, },
components: { pagination, rrOperation },
components: { pagination, rrOperation, DateRangePicker },
mixins: [presenter(), crud()], mixins: [presenter(), crud()],
cruds() { cruds() {
return CRUD({ return CRUD({
@ -126,6 +129,7 @@ export default {
}, },
data() { data() {
return { return {
blurryTime: [],
selectStatus: null, selectStatus: null,
stateOptions: [ stateOptions: [
{ {
@ -166,6 +170,14 @@ export default {
mounted() { mounted() {
}, },
methods: { methods: {
resetQuery() {
this.blurryTime = []
this.typeValue = ''
this.selectStatus = null
this.crud.query.operationType = null
this.crud.query[this.typeInputkey] = null
this.crud.toQuery()
},
typeInput(e) { typeInput(e) {
this.typeInputkey = this.getDescByValue( this.typeInputkey = this.getDescByValue(
this.inputSelect, this.inputSelect,
@ -199,6 +211,10 @@ export default {
}, },
[CRUD.HOOK.beforeRefresh]() { [CRUD.HOOK.beforeRefresh]() {
this.crud.query.operationType = this.selectStatus this.crud.query.operationType = this.selectStatus
if (this.blurryTime) {
this.crud.query.startTime = this.blurryTime[0]
this.crud.query.endTime = this.blurryTime[1]
}
}, },
getRowKey(row) { getRowKey(row) {
return row.id return row.id

180
src/views/archivesManage/exportTask/index.vue

@ -1,197 +1,27 @@
<template> <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> </div>
</template> </template>
<script> <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 { export default {
name: 'ExportTask', name: 'ExportTask',
components: { Detail },
components: { InventoryModule },
data() { data() {
return { 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: { computed: {
...mapGetters([
'baseApi'
])
}, },
created() { created() {
}, },
mounted() {
this.getBusinessFlowHistory()
},
methods: { 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> </script>
<style lang="scss" scoped>
@import "~@/assets/styles/collect-reorganizi.scss";
.connection-header{
padding: 0 !important;
}
<style lang='scss' scoped>
</style> </style>

114
src/views/archivesManage/exportTask/module/detail.vue

@ -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>

63
src/views/archivesManage/openInventory/index.vue

@ -4,6 +4,7 @@
<div class="connection-header collect-header" style="margin-bottom: 20px;"> <div class="connection-header collect-header" style="margin-bottom: 20px;">
<div class="head-search" style="margin-bottom: 0;"> <div class="head-search" style="margin-bottom: 0;">
<el-select <el-select
v-if="inventType!==7"
v-model="status" v-model="status"
style="margin-right: 10px; width: 110px;" style="margin-right: 10px; width: 110px;"
placeholder="请选择" placeholder="请选择"
@ -16,6 +17,19 @@
:value="item.value" :value="item.value"
/> />
</el-select> </el-select>
<el-select
v-else
v-model="status"
style="margin-right: 10px; width: 100px;"
placeholder="请选择"
>
<el-option
v-for="item in exportOptions"
: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-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-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> <el-button class="filter-item filter-refresh" size="mini" type="warning" icon="el-icon-refresh-left" @click="resetQuery">重置</el-button>
@ -26,7 +40,7 @@
</el-button> </el-button>
</div> </div>
<div style="height: calc(100vh - 232px);"> <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 v-if="inventType!==7" 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 type="selection" align="center" width="55" />
<el-table-column v-if="inventType===6" prop="business_type" label="类型"> <el-table-column v-if="inventType===6" prop="business_type" label="类型">
<template> <template>
@ -56,6 +70,35 @@
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<el-table v-else 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 <el-pagination
v-if="tableData.length !== 0" v-if="tableData.length !== 0"
@ -110,6 +153,24 @@ export default {
label: '不通过' label: '不通过'
} }
], ],
exportOptions: [
{
label: '全部',
value: 0
},
{
label: '导出中',
value: 1
},
{
label: '导出成功',
value: 2
},
{
label: '导出失败',
value: 3
}
],
businessType: this.inventType, businessType: this.inventType,
search: '', search: '',
tableData: [], tableData: [],

39
src/views/archivesManage/openInventory/module/detail.vue

@ -2,7 +2,7 @@
<!-- 详情 --> <!-- 详情 -->
<el-dialog :title="detialTitle" :close-on-click-modal="false" :modal-append-to-body="false" append-to-body :visible.sync="detialVisible" @opened="opened"> <el-dialog :title="detialTitle" :close-on-click-modal="false" :modal-append-to-body="false" append-to-body :visible.sync="detialVisible" @opened="opened">
<div class="setting-dialog"> <div class="setting-dialog">
<ul class="hitch-info">
<ul v-if="inventType!==7" class="hitch-info">
<li><span>标题</span>{{ rowCurrent && rowCurrent.title }}</li> <li><span>标题</span>{{ rowCurrent && rowCurrent.title }}</li>
<li><span>申请时间</span>{{ rowCurrent && rowCurrent.createTime }}</li> <li><span>申请时间</span>{{ rowCurrent && rowCurrent.createTime }}</li>
<li><span>申请人</span>{{ rowCurrent && rowCurrent.applicant }}</li> <li><span>申请人</span>{{ rowCurrent && rowCurrent.applicant }}</li>
@ -18,6 +18,20 @@
<span v-if="rowCurrent && rowCurrent.status === 4" class="row-state cancel-state">不通过</span> <span v-if="rowCurrent && rowCurrent.status === 4" class="row-state cancel-state">不通过</span>
</li> </li>
</ul> </ul>
<ul v-else 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>{{ 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 v-if="inventType===7" 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 ref="table" :data="tableData" style="width: 100%;">
<el-table-column type="index" align="center" width="55" label="序号" /> <el-table-column type="index" align="center" width="55" label="序号" />
<el-table-column prop="fondsName" label="所属全宗" /> <el-table-column prop="fondsName" label="所属全宗" />
@ -27,7 +41,7 @@
<span>{{ scope.row.categoryLevel === 2 ? '案卷整理' : '按件整理' }}</span> <span>{{ scope.row.categoryLevel === 2 ? '案卷整理' : '按件整理' }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="archiveNo" label="项目号/档号" />
<el-table-column prop="archiveNo" label="项目号/档号" min-width="160" />
<el-table-column prop="maintitle" label="题名" /> <el-table-column prop="maintitle" label="题名" />
<el-table-column v-if="inventType===4" prop="reason2" label="成文日期" /> <el-table-column v-if="inventType===4" prop="reason2" label="成文日期" />
<el-table-column v-if="inventType===4" prop="reason2" label="保管期限" /> <el-table-column v-if="inventType===4" prop="reason2" label="保管期限" />
@ -38,6 +52,8 @@
<script> <script>
import { FetchBusinessFlowDetails } from '@/api/archivesManage/library' import { FetchBusinessFlowDetails } from '@/api/archivesManage/library'
import { downloadFile } from '@/utils/index'
import { mapGetters } from 'vuex'
export default { export default {
name: 'Detail', name: 'Detail',
components: { }, components: { },
@ -56,6 +72,9 @@ export default {
} }
}, },
computed: { computed: {
...mapGetters([
'baseApi'
]),
detialTitle() { detialTitle() {
if (this.inventType === 3) { if (this.inventType === 3) {
return '开放清册详情' return '开放清册详情'
@ -63,8 +82,10 @@ export default {
return '销毁清册详情' return '销毁清册详情'
} else if (this.inventType === 6) { } else if (this.inventType === 6) {
return '移交清册详情' return '移交清册详情'
} else if (this.inventType === 7) {
return '导出任务详情'
} }
return ''
return '开放清册详情'
} }
}, },
created() { created() {
@ -90,6 +111,18 @@ export default {
}).catch(err => { }).catch(err => {
console.log(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('下载文件路径获取失败!')
}
} }
} }
} }

Loading…
Cancel
Save