|
|
|
@ -1,14 +1,14 @@
|
|
|
|
|
<template> |
|
|
|
|
<ContentWrap style="align-items: center; display: flex; padding: 25px 0;"> |
|
|
|
|
<ContentWrap style="padding: 10px;"> |
|
|
|
|
<!-- 搜索工作栏 --> |
|
|
|
|
<el-form |
|
|
|
|
class="formClass" |
|
|
|
|
:model="queryParams" |
|
|
|
|
ref="queryFormRef" |
|
|
|
|
:inline="true" |
|
|
|
|
label-width="108px" |
|
|
|
|
size="large" |
|
|
|
|
> |
|
|
|
|
<el-form-item label="任务标题" prop="title"> |
|
|
|
|
<el-form-item label="" prop="title"> |
|
|
|
|
<el-input |
|
|
|
|
v-model="queryParams.title" |
|
|
|
|
placeholder="请输入任务标题" |
|
|
|
@ -17,7 +17,22 @@
|
|
|
|
|
class="!w-240px" |
|
|
|
|
/> |
|
|
|
|
</el-form-item> |
|
|
|
|
<!-- <el-form-item label="任务状态" prop="taskType"> |
|
|
|
|
<el-form-item label="" prop="taskType"> |
|
|
|
|
<el-select |
|
|
|
|
v-model="queryParams.taskType" |
|
|
|
|
placeholder="请选择任务类型" |
|
|
|
|
clearable |
|
|
|
|
class="!w-240px" |
|
|
|
|
> |
|
|
|
|
<el-option |
|
|
|
|
v-for="dict in taskTypeList" |
|
|
|
|
:key="dict.id" |
|
|
|
|
:label="dict.tagName" |
|
|
|
|
:value="dict.id" |
|
|
|
|
/> |
|
|
|
|
</el-select> |
|
|
|
|
</el-form-item> |
|
|
|
|
<el-form-item label="" prop="taskType"> |
|
|
|
|
<el-select |
|
|
|
|
v-model="queryParams.status" |
|
|
|
|
placeholder="请选择任务状态" |
|
|
|
@ -31,8 +46,9 @@
|
|
|
|
|
:value="dict.value" |
|
|
|
|
/> |
|
|
|
|
</el-select> |
|
|
|
|
</el-form-item> --> |
|
|
|
|
<el-form-item label="任务类型" prop="taskType"> |
|
|
|
|
</el-form-item> |
|
|
|
|
|
|
|
|
|
<el-form-item label="" prop="taskType"> |
|
|
|
|
<el-select |
|
|
|
|
v-model="queryParams.taskType" |
|
|
|
|
placeholder="请选择任务类型" |
|
|
|
@ -47,29 +63,36 @@
|
|
|
|
|
/> |
|
|
|
|
</el-select> |
|
|
|
|
</el-form-item> |
|
|
|
|
<el-form-item label="任务时间" prop="startDate"> |
|
|
|
|
<el-date-picker |
|
|
|
|
v-model="queryParams.startDate" |
|
|
|
|
value-format="YYYY-MM-DD HH:mm:ss" |
|
|
|
|
type="daterange" |
|
|
|
|
start-placeholder="开始日期" |
|
|
|
|
end-placeholder="结束日期" |
|
|
|
|
:default-time="[new Date('1 00:00:00'), new Date('1 23:59:59')]" |
|
|
|
|
class="!w-220px" |
|
|
|
|
/> |
|
|
|
|
<el-form-item label="" prop="startDate" style="width: 100%;"> |
|
|
|
|
<el-select |
|
|
|
|
v-model="queryParams.selectWeek" |
|
|
|
|
placeholder="请选择日期范围" |
|
|
|
|
clearable |
|
|
|
|
class="!w-240px" |
|
|
|
|
> |
|
|
|
|
<el-option |
|
|
|
|
v-for="dict in getIntDictOptions(DICT_TYPE.SELECT_WEEK)" |
|
|
|
|
:key="dict.value" |
|
|
|
|
:label="dict.label" |
|
|
|
|
:value="dict.value" |
|
|
|
|
/> |
|
|
|
|
</el-select> |
|
|
|
|
</el-form-item> |
|
|
|
|
<el-form-item> |
|
|
|
|
<el-button @click="handleQuery"><Icon icon="ep:search" class="mr-5px" /> 搜索</el-button> |
|
|
|
|
<el-button @click="resetQuery"><Icon icon="ep:refresh" class="mr-5px" /> 重置</el-button> |
|
|
|
|
|
|
|
|
|
</el-form-item> |
|
|
|
|
<el-form-item class="mergeClass" > |
|
|
|
|
<el-button |
|
|
|
|
type="primary" |
|
|
|
|
plain |
|
|
|
|
v-hasPermi="['system:task-info:create']" |
|
|
|
|
@click="push({ path: '/task/create' })" |
|
|
|
|
> |
|
|
|
|
<Icon icon="ep:plus" class="mr-5px" /> 创建任务 |
|
|
|
|
<Icon icon="ep:plus" class="mr-5px" /> 新增 |
|
|
|
|
</el-button> |
|
|
|
|
<el-button |
|
|
|
|
<!-- <el-button |
|
|
|
|
type="success" |
|
|
|
|
plain |
|
|
|
|
@click="handleExport" |
|
|
|
@ -77,7 +100,7 @@
|
|
|
|
|
v-hasPermi="['system:task-info:export']" |
|
|
|
|
> |
|
|
|
|
<Icon icon="ep:download" class="mr-5px" /> 导出 |
|
|
|
|
</el-button> |
|
|
|
|
</el-button> --> |
|
|
|
|
</el-form-item> |
|
|
|
|
</el-form> |
|
|
|
|
</ContentWrap> |
|
|
|
@ -97,67 +120,28 @@
|
|
|
|
|
<dict-tag :type="DICT_TYPE.TASK_STATE" :value="scope.row.status" /> |
|
|
|
|
</template> |
|
|
|
|
</el-table-column> |
|
|
|
|
|
|
|
|
|
<!-- <el-table-column label="执行周期" align="center" prop="execCycle"> |
|
|
|
|
<el-table-column label="执法对象" align="left" min-width="100px"> |
|
|
|
|
<template #default="scope"> |
|
|
|
|
<dict-tag :type="DICT_TYPE.TASK_EXEC_TIME" :value="scope.row.execCycle" /> |
|
|
|
|
</template> |
|
|
|
|
</el-table-column> --> |
|
|
|
|
|
|
|
|
|
<!-- <el-table-column label="任务优先级" align="center" prop="priority"> |
|
|
|
|
<template #default="scope"> |
|
|
|
|
<dict-tag :type="DICT_TYPE.TASK_PRIORITY" :value="scope.row.priority" /> |
|
|
|
|
</template> |
|
|
|
|
</el-table-column> --> |
|
|
|
|
{{new Set(scope.row.enterpriseIdes?.map(e => e.type)).size }}个区域 , |
|
|
|
|
{{scope.row.enterpriseIdes.length}}家企业 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</template> |
|
|
|
|
</el-table-column> |
|
|
|
|
<el-table-column |
|
|
|
|
label="开始时间" |
|
|
|
|
align="center" |
|
|
|
|
label="执行时间" |
|
|
|
|
align="left" |
|
|
|
|
prop="startDate" |
|
|
|
|
:formatter="dateFormatter3" |
|
|
|
|
/> |
|
|
|
|
<el-table-column |
|
|
|
|
label="结束时间" |
|
|
|
|
align="center" |
|
|
|
|
prop="endDate" |
|
|
|
|
:formatter="dateFormatter3" |
|
|
|
|
/> |
|
|
|
|
<!-- <el-table-column |
|
|
|
|
label="任务创建时间" |
|
|
|
|
align="center" |
|
|
|
|
prop="createTime" |
|
|
|
|
:formatter="dateFormatter" |
|
|
|
|
width="180px" |
|
|
|
|
/> --> |
|
|
|
|
<el-table-column label="创建人" align="left" prop="createName" /> |
|
|
|
|
<!-- <el-table-column label="父任务id" align="center" prop="parentId" /> |
|
|
|
|
<el-table-column label="父子任务类型" align="center" prop="parentType"> |
|
|
|
|
<template #default="scope"> |
|
|
|
|
<dict-tag :type="DICT_TYPE.TASK_TYPE_PARENT" :value="scope.row.parentType" /> |
|
|
|
|
</template> |
|
|
|
|
</el-table-column> --> |
|
|
|
|
<!-- <el-table-column label="执行到第几" align="center" prop="taskStep" /> --> |
|
|
|
|
|
|
|
|
|
<el-table-column label="执法对象" align="left" min-width="50px"> |
|
|
|
|
> |
|
|
|
|
|
|
|
|
|
<template #default="scope"> |
|
|
|
|
|
|
|
|
|
<el-button link type="primary" @click=" |
|
|
|
|
push({ |
|
|
|
|
path: 'create', |
|
|
|
|
query: { |
|
|
|
|
id: scope.row.id |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
"> |
|
|
|
|
<el-Tag type="success">{{scope.row.enterpriseIdes.length}}</el-Tag> |
|
|
|
|
</el-button> |
|
|
|
|
|
|
|
|
|
{{scope.row.startDate}} |
|
|
|
|
{{ getDictLabel(DICT_TYPE.TASK_NOTICE_TIME, scope.row.execCycle) }} |
|
|
|
|
|
|
|
|
|
</template> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</el-table-column> |
|
|
|
|
|
|
|
|
|
<el-table-column label="" align="center" min-width="120px"> |
|
|
|
|
<el-table-column label="操作选项" align="left" min-width="50px"> |
|
|
|
|
<template #default="scope"> |
|
|
|
|
<el-button |
|
|
|
|
link |
|
|
|
@ -175,36 +159,6 @@
|
|
|
|
|
> |
|
|
|
|
详情 |
|
|
|
|
</el-button> |
|
|
|
|
<el-button |
|
|
|
|
link |
|
|
|
|
type="primary" |
|
|
|
|
@click="taskExec(scope.row)" |
|
|
|
|
v-if="scope.row.status == 1" |
|
|
|
|
v-hasPermi="['system:task-info:update']" |
|
|
|
|
|
|
|
|
|
> |
|
|
|
|
立即执行 |
|
|
|
|
</el-button> |
|
|
|
|
<el-button |
|
|
|
|
link |
|
|
|
|
type="danger" |
|
|
|
|
@click="handleDelete(scope.row.id)" |
|
|
|
|
v-hasPermi="['system:task-info:delete']" |
|
|
|
|
v-if="scope.row.status == 1" |
|
|
|
|
> |
|
|
|
|
删除 |
|
|
|
|
</el-button> |
|
|
|
|
|
|
|
|
|
<el-button |
|
|
|
|
link |
|
|
|
|
type="danger" |
|
|
|
|
@click="handleDelete(scope.row.id)" |
|
|
|
|
v-hasPermi="['system:task-info:audit']" |
|
|
|
|
v-if="scope.row.status == 0" |
|
|
|
|
> |
|
|
|
|
审核 |
|
|
|
|
</el-button> |
|
|
|
|
|
|
|
|
|
<!-- <el-button link type="primary" @click="openForm(scope.row.id)"> 详情 </el-button> --> |
|
|
|
|
</template> |
|
|
|
|
</el-table-column> |
|
|
|
@ -226,9 +180,8 @@
|
|
|
|
|
</template> |
|
|
|
|
|
|
|
|
|
<script setup lang="ts"> |
|
|
|
|
import { getIntDictOptions, DICT_TYPE } from '@/utils/dict' |
|
|
|
|
import { dateFormatter3 } from '@/utils/formatTime' |
|
|
|
|
import { dateFormatter } from '@/utils/formatTime' |
|
|
|
|
import { getDictLabel, DICT_TYPE, getIntDictOptions } from '@/utils/dict' |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import download from '@/utils/download' |
|
|
|
|
import { TaskInfoApi, TaskInfoVO } from '@/api/system/taskinfo' |
|
|
|
@ -263,13 +216,18 @@ const queryParams = reactive({
|
|
|
|
|
parentId: undefined, |
|
|
|
|
parentType: undefined, |
|
|
|
|
taskStep: undefined, |
|
|
|
|
taskTotal: undefined |
|
|
|
|
taskTotal: undefined, |
|
|
|
|
selectWeek: undefined |
|
|
|
|
}) |
|
|
|
|
const queryFormRef = ref() // 搜索的表单 |
|
|
|
|
const exportLoading = ref(false) // 导出的加载中 |
|
|
|
|
|
|
|
|
|
const taskTypeList:any = ref([]) |
|
|
|
|
|
|
|
|
|
const mydateFormatter3 = ()=> { |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** 查询列表 */ |
|
|
|
|
const getList = async () => { |
|
|
|
|
loading.value = true |
|
|
|
@ -278,13 +236,16 @@ const getList = async () => {
|
|
|
|
|
list.value = data.list |
|
|
|
|
total.value = data.total |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//任务标签 |
|
|
|
|
const params = { |
|
|
|
|
tagType: 2 |
|
|
|
|
tagType: 2, |
|
|
|
|
pageSize: -1 |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
const tag = await TagLibraryApi.getTagLibraryPage(params) |
|
|
|
|
taskTypeList.value = tag[0].children |
|
|
|
|
taskTypeList.value = tag.list |
|
|
|
|
|
|
|
|
|
} finally { |
|
|
|
|
loading.value = false |
|
|
|
@ -363,9 +324,22 @@ onMounted(() => {
|
|
|
|
|
<style scoped lang="scss"> |
|
|
|
|
.formClass { |
|
|
|
|
display: grid; |
|
|
|
|
grid-template-columns: 1fr 1fr 1fr 2fr; |
|
|
|
|
grid-template-rows: 1fr; |
|
|
|
|
grid-template-columns: 1fr 1fr 1fr 1fr; |
|
|
|
|
grid-template-rows: 2fr; |
|
|
|
|
align-items: center; |
|
|
|
|
row-gap: 20px; |
|
|
|
|
column-gap: 40px; |
|
|
|
|
|
|
|
|
|
.mergeClass { |
|
|
|
|
grid-column: 2 span; |
|
|
|
|
|
|
|
|
|
:deep(.el-form-item__content) { |
|
|
|
|
display: flex !important; |
|
|
|
|
justify-content:flex-end !important; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
:deep(.el-form-item) { |
|
|
|
|
margin: 0 !important; |
|
|
|
|