|
@@ -116,6 +116,14 @@
|
|
|
<a-button style="margin-left: 8px" v-if="($auth('check-spot-jobs-export') || $auth('check-polling-jobs-export'))" type="primary" icon="download" @click="doExport">导出</a-button>
|
|
|
<a-button style="margin-left: 8px" v-if="($auth('check-spot-jobs-export') || $auth('check-polling-jobs-export'))" type="success" @click="handleSeven">本周</a-button>
|
|
|
<a-button style="margin-left: 8px" v-if="($auth('check-spot-jobs-export') || $auth('check-polling-jobs-export'))" type="success" @click="handleMonth">本月</a-button>
|
|
|
+ <a-button style="margin-left: 8px" type="primary" @click="handleExecuteBatch" v-if="selectedRowKeys.length > 0">
|
|
|
+ <a-icon style="margin-left: 8px" type="plus"/>
|
|
|
+ 批量接收
|
|
|
+ </a-button>
|
|
|
+ <a-button style="margin-left: 8px" type="primary" v-if="selectedRowKeys.length > 0" @click="handleFinishBatch">
|
|
|
+ <a-icon type="plus"/>
|
|
|
+ 批量完成
|
|
|
+ </a-button>
|
|
|
<a-dropdown v-action:edit v-if="selectedRowKeys.length > 0 && ($auth('check-spot-jobs-edit') || $auth('check-polling-jobs-edit'))">
|
|
|
<a-menu slot="overlay">
|
|
|
<a-popconfirm title="是否要删除所选数据?" @confirm="batchDelete()">
|
|
@@ -141,11 +149,15 @@
|
|
|
<span slot="action" slot-scope="record">
|
|
|
<template>
|
|
|
<a @click="handleView(record)">查看</a>
|
|
|
- <template v-if="record.status === DictCache.VALUE.CHECK_JOB_STATUS.NOT_EXECUTE">
|
|
|
+ <template v-if="record.status == DictCache.VALUE.CHECK_JOB_STATUS.NOT_EXECUTE">
|
|
|
+ <a-divider type="vertical" />
|
|
|
+ <a @click="handleExecute(record)">接收</a>
|
|
|
+ </template>
|
|
|
+ <template v-if="record.status === DictCache.VALUE.CHECK_JOB_STATUS.EXECUTING">
|
|
|
<a-divider type="vertical" />
|
|
|
<a @click="handleFinish(record)">完成</a>
|
|
|
</template>
|
|
|
- <template v-if="record.status != DictCache.VALUE.CHECK_JOB_STATUS.NOT_EXECUTE">
|
|
|
+ <template v-if="record.status == DictCache.VALUE.CHECK_JOB_STATUS.NOT_EXECUTE || record.status === DictCache.VALUE.CHECK_JOB_STATUS.EXECUTING">
|
|
|
<a-divider type="vertical" />
|
|
|
<a @click="handleEdit(record)">修改</a>
|
|
|
</template>
|
|
@@ -176,7 +188,7 @@
|
|
|
import { STable, Ellipsis } from '@/components'
|
|
|
import BaseForm from './modules/BaseForm'
|
|
|
import Detail from './modules/Detail'
|
|
|
-import { getCheckJobPage, deleteCheckJobs, fetchCheckJob, exportCheckJob, executeJob } from '@/api/check/checkjob'
|
|
|
+import { getCheckJobPage, deleteCheckJobs, fetchCheckJob, exportCheckJob, executeJob, executeJobBatch, finishJobBatch } from '@/api/check/checkjob'
|
|
|
import { fetchSbTypeTree } from '@/api/sb/type'
|
|
|
import DictCache from '@/utils/dict'
|
|
|
|
|
@@ -206,7 +218,9 @@ export default {
|
|
|
},
|
|
|
statusList: {
|
|
|
type: Array,
|
|
|
- default: [DictCache.VALUE.CHECK_JOB_STATUS.NOT_EXECUTE, DictCache.VALUE.CHECK_JOB_STATUS.EXECUTING, DictCache.VALUE.CHECK_JOB_STATUS.OUT_OF_DATE].join(',')
|
|
|
+ default: () => {
|
|
|
+ return [DictCache.VALUE.CHECK_JOB_STATUS.NOT_EXECUTE, DictCache.VALUE.CHECK_JOB_STATUS.EXECUTING, DictCache.VALUE.CHECK_JOB_STATUS.OUT_OF_DATE]
|
|
|
+ }
|
|
|
}
|
|
|
},
|
|
|
data () {
|
|
@@ -311,12 +325,6 @@ export default {
|
|
|
checked: true,
|
|
|
width: '200px'
|
|
|
},
|
|
|
- {
|
|
|
- title: '实际开始时间',
|
|
|
- dataIndex: 'actualStartTime',
|
|
|
- checked: true,
|
|
|
- width: '200px'
|
|
|
- },
|
|
|
{
|
|
|
title: '实际结束时间',
|
|
|
dataIndex: 'actualEndTime',
|
|
@@ -330,6 +338,16 @@ export default {
|
|
|
fixed: 'right',
|
|
|
width: '200px'
|
|
|
},
|
|
|
+ {
|
|
|
+ title: '实际执行日期',
|
|
|
+ dataIndex: 'actualStartTime',
|
|
|
+ checked: true,
|
|
|
+ fixed: 'right',
|
|
|
+ width: '200px',
|
|
|
+ customRender: (text, record, index) => {
|
|
|
+ return (text == null ? '暂无' : this.BaseTool.Date.formatter(text, this.BaseTool.Date.PICKER_NORM_DATE_PATTERN))
|
|
|
+ }
|
|
|
+ },
|
|
|
{
|
|
|
title: '任务状态',
|
|
|
dataIndex: 'status',
|
|
@@ -534,6 +552,34 @@ export default {
|
|
|
const s = year + '-' + (mon < 10 ? ('0' + mon) : mon) + '-' + (day < 10 ? ('0' + day) : day)
|
|
|
return s
|
|
|
},
|
|
|
+
|
|
|
+ handleExecuteBatch () {
|
|
|
+ let ids = []
|
|
|
+ const length = this.selectedRowKeys.length
|
|
|
+ if (length === 0) {
|
|
|
+ this.$message.info('请选择记录')
|
|
|
+ return
|
|
|
+ }
|
|
|
+ console.log(this.selectedRowKeys)
|
|
|
+ ids = this.selectedRowKeys
|
|
|
+ executeJobBatch(ids).then(res => {
|
|
|
+ this.$message.info('接收成功')
|
|
|
+ this.handleOk()
|
|
|
+ })
|
|
|
+ },
|
|
|
+ handleFinishBatch () {
|
|
|
+ let ids = []
|
|
|
+ const length = this.selectedRowKeys.length
|
|
|
+ if (length === 0) {
|
|
|
+ this.$message.info('请选择记录')
|
|
|
+ return
|
|
|
+ }
|
|
|
+ ids = this.selectedRowKeys
|
|
|
+ finishJobBatch(ids).then(res => {
|
|
|
+ this.$message.info('完成成功')
|
|
|
+ this.handleOk()
|
|
|
+ })
|
|
|
+ },
|
|
|
doExport () {
|
|
|
const parameter = {
|
|
|
...this.queryParam,
|