任务列表都加上同步按钮

This commit is contained in:
weibl
2026-03-03 15:02:43 +08:00
parent 5c7b4054e9
commit 77212bd2c7
4 changed files with 129 additions and 34 deletions

View File

@@ -1,17 +1,30 @@
<template>
<!-- 所有任务 -->
<div class="gl-page-content-full">
<taskTable
showIndex
ref="tableRef"
:tableName="currentTableName"
:params="taskParams"
:searchLimitNum="searchLimitNum"
exportFileName="所有任务列表"
:actionList="canOperate ? actionList : []"
@show="showTaskDetailFun"
>
</taskTable>
<div class="sync-box">
<el-button
class="sync-btn"
v-if="enableConfigByTenant([TENANT_ENUM.LYRIC])"
icon="Refresh"
type="primary"
@click="syncDemandList"
title="同步EP系统最近三个月的待办"
>同步</el-button
>
</div>
<div class="table-box">
<taskTable
showIndex
ref="tableRef"
:tableName="currentTableName"
:params="taskParams"
:searchLimitNum="searchLimitNum"
exportFileName="所有任务列表"
:actionList="canOperate ? actionList : []"
@show="showTaskDetailFun"
>
</taskTable>
</div>
<Dialog
v-model="dialogVisible"
diaTitle="编辑"
@@ -57,7 +70,7 @@ import { ElMessage } from 'element-plus';
import taskTable from '../components/taskTable.vue';
import { TASK_ATTENTION_STATUS, TASK_PROCESS_STATUS } from '@/utils/enum/task';
import { ref } from 'vue';
import { disposeAttentionParams } from '../taskPage';
import { disposeAttentionParams, syncDemandList } from '../taskPage';
import taskDetail from '@/views/task/projectDetail/components/taskDetail.vue';
import { isNumber } from 'lodash-es';
import { getMemberListIds } from '@/utils/task';
@@ -65,6 +78,7 @@ import dayjs from 'dayjs';
import { hasPermission } from '@/utils/permission';
import Dialog from '@/components/common/dialog/index.vue';
import TableForm from '@/components/common/table/tableForm.vue';
import { enableConfigByTenant, TENANT_ENUM } from '@/tenants/tenant';
// enum TaskType {
// /** 待确认任务 */
@@ -242,3 +256,15 @@ const confirmFun = async () => {
}
};
</script>
<style lang="scss" scoped>
.sync-box {
display: flex;
justify-content: flex-end;
.sync-btn {
margin-bottom: var(--margin-medium);
}
}
.table-box {
height: calc(100% - 44px);
}
</style>

View File

@@ -1,16 +1,29 @@
<template>
<!-- 我关注的 -->
<div class="gl-page-content-full">
<taskTable
showIndex
ref="tableRef"
tableName="SIMULATION_TASK_EXECUTE_LIST"
:params="taskParams"
exportFileName="我关注的任务列表"
:actionList="actionList"
@show="showTaskDetailFun"
>
</taskTable>
<div class="sync-box">
<el-button
class="sync-btn"
v-if="enableConfigByTenant([TENANT_ENUM.LYRIC])"
icon="Refresh"
type="primary"
@click="syncDemandList"
title="同步EP系统最近三个月的待办"
>同步</el-button
>
</div>
<div class="table-box">
<taskTable
showIndex
ref="tableRef"
tableName="SIMULATION_TASK_EXECUTE_LIST"
:params="taskParams"
exportFileName="我关注的任务列表"
:actionList="actionList"
@show="showTaskDetailFun"
>
</taskTable>
</div>
<taskDetail
v-if="showTaskDetailDialog"
:taskId="currentTaskInfo.id"
@@ -31,12 +44,13 @@ import { attentionTaskApi, updateTaskStatusApi } from '@/api/project/task';
import { ElMessage } from 'element-plus';
import taskTable from '../components/taskTable.vue';
import { onMounted, ref } from 'vue';
import { disposeAttentionParams } from '../taskPage';
import { disposeAttentionParams, syncDemandList } from '../taskPage';
import taskDetail from '@/views/task/projectDetail/components/taskDetail.vue';
import { TASK_PROCESS_STATUS } from '@/utils/enum/task';
import { isNumber } from 'lodash-es';
import { getMemberListIds } from '@/utils/task';
import dayjs from 'dayjs';
import { enableConfigByTenant, TENANT_ENUM } from '@/tenants/tenant';
// enum TaskType {
// /** 待确认任务 */
@@ -136,3 +150,15 @@ const attentionTaskFun = async (row: any, isAttention: boolean) => {
};
onMounted(() => {});
</script>
<style lang="scss" scoped>
.sync-box {
display: flex;
justify-content: flex-end;
.sync-btn {
margin-bottom: var(--margin-medium);
}
}
.table-box {
height: calc(100% - 44px);
}
</style>

View File

@@ -1,14 +1,27 @@
<template>
<div class="gl-page-content-full">
<taskTable
showIndex
ref="exeTableRef"
tableName="SIMULATION_TASK_EXECUTE_LIST"
:params="taskParams"
:actionList="actionList"
@show="showTaskDetailFun"
>
</taskTable>
<div class="sync-box">
<el-button
class="sync-btn"
v-if="enableConfigByTenant([TENANT_ENUM.LYRIC])"
icon="Refresh"
type="primary"
@click="syncDemandList"
title="同步EP系统最近三个月的待办"
>同步</el-button
>
</div>
<div class="table-box">
<taskTable
showIndex
ref="exeTableRef"
tableName="SIMULATION_TASK_EXECUTE_LIST"
:params="taskParams"
:actionList="actionList"
@show="showTaskDetailFun"
>
</taskTable>
</div>
<Dialog
v-model="formVisible"
:loading="loadingInterface"
@@ -70,7 +83,8 @@ import TaskDetail from '@/views/task/projectDetail/components/taskDetail.vue';
import { isNumber } from 'lodash-es';
import { getMemberListIds } from '@/utils/task';
import { jumpPage } from '@/utils/common';
import { changeTaskStatusCommon } from '../taskPage';
import { changeTaskStatusCommon, syncDemandList } from '../taskPage';
import { enableConfigByTenant, TENANT_ENUM } from '@/tenants/tenant';
const props = defineProps({
actionList: {
@@ -372,3 +386,15 @@ const updateTaskInfoFun = async (info: any) => {
onMounted(() => {});
</script>
<style lang="scss" scoped>
.sync-box {
display: flex;
justify-content: flex-end;
.sync-btn {
margin-bottom: var(--margin-medium);
}
}
.table-box {
height: calc(100% - 44px);
}
</style>

View File

@@ -5,6 +5,15 @@
<el-tab-pane label="未分发任务" :name="false" />
<el-tab-pane label="已分发任务" :name="true" />
</el-tabs>
<el-button
class="sync-btn"
v-if="enableConfigByTenant([TENANT_ENUM.LYRIC])"
icon="Refresh"
type="primary"
@click="syncDemandList"
title="同步EP系统最近三个月的待办"
>同步</el-button
>
</div>
<div class="task-table-list">
<taskTable
@@ -85,7 +94,7 @@ import { isNumber } from 'lodash-es';
import taskDetail from '@/views/task/projectDetail/components/taskDetail.vue';
import { enableConfigByTenant, TENANT_ENUM } from '@/tenants/tenant';
import SendTask from './sendTask.vue';
import { changeTaskStatusCommon } from '../taskPage';
import { changeTaskStatusCommon, syncDemandList } from '../taskPage';
const props = defineProps({
actionList: {
@@ -379,4 +388,12 @@ onMounted(() => {});
.task-table-list {
height: calc(100% - 55px) !important;
}
.tabs {
position: relative;
.sync-btn {
position: absolute;
right: 0;
top: 0;
}
}
</style>