merge
This commit is contained in:
@@ -11,6 +11,7 @@
|
||||
rowField: 'vModel',
|
||||
childrenField: 'children',
|
||||
}"
|
||||
:full-height="true"
|
||||
>
|
||||
<template #leftOptions v-if="!hideButtons">
|
||||
<el-button type="primary" @click="paramToLibFun">参数入库</el-button>
|
||||
|
||||
@@ -33,7 +33,7 @@ const props = defineProps({
|
||||
},
|
||||
tableName: {
|
||||
type: String,
|
||||
default: 'PROJECT_TASK_DETAIL',
|
||||
default: 'SIMULATION_TASK_SEND_LIST',
|
||||
},
|
||||
});
|
||||
const tableFormRef = ref();
|
||||
|
||||
@@ -27,6 +27,7 @@
|
||||
placeholder="申请日期"
|
||||
format="YYYY-MM-DD hh:mm:ss"
|
||||
value-format="YYYY-MM-DD hh:mm:ss"
|
||||
:clearable="false"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="项目编号:">
|
||||
@@ -39,7 +40,7 @@
|
||||
<el-input class="w180" v-model="reportFormData.workspace"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="分析类型:">
|
||||
<el-select class="w180" v-model="reportFormData.taskType" @change="taskTypeChangeFun">
|
||||
<el-select class="w185" v-model="reportFormData.taskType" @change="taskTypeChangeFun">
|
||||
<el-option
|
||||
v-for="item in taskTypeList"
|
||||
:key="item.value"
|
||||
@@ -72,6 +73,7 @@
|
||||
placeholder="拟定时间"
|
||||
format="YYYY-MM-DD hh:mm:ss"
|
||||
value-format="YYYY-MM-DD hh:mm:ss"
|
||||
:clearable="false"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="检查时间:">
|
||||
@@ -82,6 +84,7 @@
|
||||
placeholder="检查时间"
|
||||
format="YYYY-MM-DD hh:mm:ss"
|
||||
value-format="YYYY-MM-DD hh:mm:ss"
|
||||
:clearable="false"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="审批时间:">
|
||||
@@ -92,6 +95,7 @@
|
||||
placeholder="审批时间"
|
||||
format="YYYY-MM-DD hh:mm:ss"
|
||||
value-format="YYYY-MM-DD hh:mm:ss"
|
||||
:clearable="false"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="任务名称:">
|
||||
@@ -367,12 +371,15 @@ onMounted(async () => {
|
||||
}
|
||||
}
|
||||
|
||||
.ml5{
|
||||
.ml5 {
|
||||
margin-left: 5px;
|
||||
}
|
||||
|
||||
.w180 {
|
||||
width: 230px !important;
|
||||
}
|
||||
.w185 {
|
||||
width: 235px !important;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
<InfoFilled />
|
||||
</el-icon>
|
||||
<span class="status-title">{{
|
||||
currentRunNodeInfo?.status ? statusList[currentRunNodeInfo?.status] : '未开始'
|
||||
runFlowPocesInfo?.status ? statusList[runFlowPocesInfo?.status] : '未开始'
|
||||
}}</span>
|
||||
</div>
|
||||
</div>
|
||||
@@ -74,7 +74,10 @@
|
||||
</div>
|
||||
|
||||
<div :class="leftFullScreen || rightFullScreen ? 'run-info-box is-all-page' : 'run-info-box'">
|
||||
<div v-if="!rightFullScreen" :class="leftFullScreen ? 'info-box-left allpage ' : 'info-box-left'">
|
||||
<div
|
||||
v-if="!rightFullScreen"
|
||||
:class="leftFullScreen ? 'info-box-left allpage ' : 'info-box-left'"
|
||||
>
|
||||
<div class="bottom-title">
|
||||
<div class="title-name">节点详情</div>
|
||||
<div class="title-operate">
|
||||
@@ -118,7 +121,10 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div v-if="!leftFullScreen" :class="rightFullScreen ? 'info-box-right allpage ' : 'info-box-right'">
|
||||
<div
|
||||
v-if="!leftFullScreen"
|
||||
:class="rightFullScreen ? 'info-box-right allpage ' : 'info-box-right'"
|
||||
>
|
||||
<div class="bottom-title">
|
||||
<div class="title-name">作业相关</div>
|
||||
<div class="title-operate">
|
||||
@@ -195,7 +201,12 @@ const props = defineProps({
|
||||
},
|
||||
});
|
||||
|
||||
const statusList = ref(['未开始', '进行中', '已完成', '回传中', '异常']);
|
||||
const statusList = ref<any>({
|
||||
running: '运行中',
|
||||
completed: '已完成',
|
||||
suspended: '挂起中',
|
||||
error: '异常',
|
||||
});
|
||||
const visible = ref(false);
|
||||
const nodeActiveName = ref('param');
|
||||
const taskActiveName = ref('job-list');
|
||||
|
||||
@@ -17,7 +17,7 @@ import { listSimulationFlowNodeApi } from '@/api/project/run';
|
||||
const props = defineProps({
|
||||
runInfo: {
|
||||
type: Object,
|
||||
default: () => { },
|
||||
default: () => {},
|
||||
},
|
||||
});
|
||||
|
||||
@@ -103,7 +103,6 @@ const getFlowDetail = async (uuid: string) => {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
setTimeout(() => {
|
||||
graph.value.fromJSON(dataJson);
|
||||
graph.value.centerContent();
|
||||
|
||||
@@ -53,5 +53,6 @@ watch(
|
||||
.param-set-page {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
overflow: auto;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -106,7 +106,7 @@ const props = defineProps({
|
||||
},
|
||||
tableName: {
|
||||
type: String,
|
||||
default: 'PROJECT_TASK_DETAIL',
|
||||
default: 'SIMULATION_TASK_SEND_LIST',
|
||||
},
|
||||
showTaskInfo: {
|
||||
type: Boolean,
|
||||
|
||||
@@ -66,15 +66,18 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { attentionTaskApi, queryTaskListApi } from '@/api/project/task';
|
||||
import { attentionTaskApi, queryTaskListApi, updateTaskStatusApi } from '@/api/project/task';
|
||||
// import BaseTable from '@/components/common/table/baseTable.vue';
|
||||
import { ElMessage } from 'element-plus';
|
||||
import taskTable from '../components/taskTable.vue';
|
||||
import { tableActionsLength } from '@/utils/common';
|
||||
import { TASK_ATTENTION_STATUS } from '@/utils/enum/task';
|
||||
import { TASK_ATTENTION_STATUS, TASK_PROCESS_STATUS } from '@/utils/enum/task';
|
||||
import { onMounted, ref } from 'vue';
|
||||
import { disposeAttentionParams } from '../taskPage';
|
||||
import taskDetail from '@/views/task/projectDetail/components/taskDetail.vue';
|
||||
import { isNumber } from 'lodash-es';
|
||||
import { getMemberListIds } from '@/utils/task';
|
||||
import dayjs from 'dayjs';
|
||||
|
||||
// enum TaskType {
|
||||
// /** 待确认任务 */
|
||||
@@ -164,8 +167,44 @@ const showTaskDetailFun = (row: any) => {
|
||||
const updateTaskInfoFun = async (info: any) => {
|
||||
const { flag, data }: any = info;
|
||||
|
||||
console.log(flag, 'flag');
|
||||
console.log(data, 'data');
|
||||
if (flag === 'info') {
|
||||
if (data.exeStatus === TASK_PROCESS_STATUS.COMPLETED && !isNumber(data.difficult)) {
|
||||
ElMessage({
|
||||
message: '关闭任务时需要填写难度系数!',
|
||||
type: 'warning',
|
||||
});
|
||||
return false;
|
||||
}
|
||||
|
||||
const params: any = {
|
||||
taskIds: [data.uuid],
|
||||
req: {
|
||||
...data,
|
||||
exeStatus: data.exeStatus,
|
||||
achieveStatus: data.achieveStatus,
|
||||
process: data.progress,
|
||||
pMemberList: getMemberListIds(data.pMemberList),
|
||||
nodeName: data.taskName,
|
||||
},
|
||||
};
|
||||
if (data.exeStatus === TASK_PROCESS_STATUS.COMPLETED) {
|
||||
params.req.finishTime = dayjs().format('YYYY-MM-DD HH:mm:ss');
|
||||
}
|
||||
const res: any = await updateTaskStatusApi(params);
|
||||
|
||||
if (res.code === 200) {
|
||||
// row.exeStatus = status;
|
||||
ElMessage({
|
||||
message: '操作成功',
|
||||
type: 'success',
|
||||
});
|
||||
} else {
|
||||
ElMessage({
|
||||
message: '任务数据更新失败!',
|
||||
type: 'error',
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
showTaskDetailDialog.value = false;
|
||||
};
|
||||
|
||||
@@ -53,7 +53,7 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { attentionTaskApi, queryTaskListApi } from '@/api/project/task';
|
||||
import { attentionTaskApi, queryTaskListApi, updateTaskStatusApi } from '@/api/project/task';
|
||||
// import BaseTable from '@/components/common/table/baseTable.vue';
|
||||
import { ElMessage } from 'element-plus';
|
||||
import taskTable from '../components/taskTable.vue';
|
||||
@@ -61,6 +61,10 @@ import { tableActionsLength } from '@/utils/common';
|
||||
import { onMounted, ref } from 'vue';
|
||||
import { disposeAttentionParams } 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';
|
||||
|
||||
// enum TaskType {
|
||||
// /** 待确认任务 */
|
||||
@@ -107,8 +111,44 @@ const showTaskDetailFun = (row: any) => {
|
||||
const updateTaskInfoFun = async (info: any) => {
|
||||
const { flag, data }: any = info;
|
||||
|
||||
console.log(flag, 'flag');
|
||||
console.log(data, 'data');
|
||||
if (flag === 'info') {
|
||||
if (data.exeStatus === TASK_PROCESS_STATUS.COMPLETED && !isNumber(data.difficult)) {
|
||||
ElMessage({
|
||||
message: '关闭任务时需要填写难度系数!',
|
||||
type: 'warning',
|
||||
});
|
||||
return false;
|
||||
}
|
||||
|
||||
const params: any = {
|
||||
taskIds: [data.uuid],
|
||||
req: {
|
||||
...data,
|
||||
exeStatus: data.exeStatus,
|
||||
achieveStatus: data.achieveStatus,
|
||||
process: data.progress,
|
||||
pMemberList: getMemberListIds(data.pMemberList),
|
||||
nodeName: data.taskName,
|
||||
},
|
||||
};
|
||||
if (data.exeStatus === TASK_PROCESS_STATUS.COMPLETED) {
|
||||
params.req.finishTime = dayjs().format('YYYY-MM-DD HH:mm:ss');
|
||||
}
|
||||
const res: any = await updateTaskStatusApi(params);
|
||||
|
||||
if (res.code === 200) {
|
||||
// row.exeStatus = status;
|
||||
ElMessage({
|
||||
message: '操作成功',
|
||||
type: 'success',
|
||||
});
|
||||
} else {
|
||||
ElMessage({
|
||||
message: '任务数据更新失败!',
|
||||
type: 'error',
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
showTaskDetailDialog.value = false;
|
||||
};
|
||||
|
||||
@@ -110,6 +110,8 @@ import TableForm from '@/components/common/table/tableForm.vue';
|
||||
import dayjs from 'dayjs';
|
||||
import { useRouter } from 'vue-router';
|
||||
import TaskDetail from '@/views/task/projectDetail/components/taskDetail.vue';
|
||||
import { isNumber } from 'lodash-es';
|
||||
import { getMemberListIds } from '@/utils/task';
|
||||
|
||||
const exeTableRef = ref();
|
||||
const router = useRouter();
|
||||
@@ -355,7 +357,49 @@ const getHideKeys = (key: string) => {
|
||||
}
|
||||
};
|
||||
|
||||
const updateTaskInfoFun = () => {
|
||||
const updateTaskInfoFun = async (info: any) => {
|
||||
const { flag, data }: any = info;
|
||||
|
||||
if (flag === 'info') {
|
||||
if (data.exeStatus === TASK_PROCESS_STATUS.COMPLETED && !isNumber(data.difficult)) {
|
||||
ElMessage({
|
||||
message: '关闭任务时需要填写难度系数!',
|
||||
type: 'warning',
|
||||
});
|
||||
return false;
|
||||
}
|
||||
|
||||
const params: any = {
|
||||
taskIds: [data.uuid],
|
||||
req: {
|
||||
...data,
|
||||
exeStatus: data.exeStatus,
|
||||
achieveStatus: data.achieveStatus,
|
||||
process: data.progress,
|
||||
pMemberList: getMemberListIds(data.pMemberList),
|
||||
nodeName: data.taskName,
|
||||
},
|
||||
};
|
||||
if (data.exeStatus === TASK_PROCESS_STATUS.COMPLETED) {
|
||||
params.req.finishTime = dayjs().format('YYYY-MM-DD HH:mm:ss');
|
||||
}
|
||||
const res: any = await updateTaskStatusApi(params);
|
||||
|
||||
if (res.code === 200) {
|
||||
// row.exeStatus = status;
|
||||
ElMessage({
|
||||
message: '操作成功',
|
||||
type: 'success',
|
||||
});
|
||||
} else {
|
||||
ElMessage({
|
||||
message: '任务数据更新失败!',
|
||||
type: 'error',
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
showTaskDetailDialog.value = false;
|
||||
exeTableRef.value.tableRef.resetFun();
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user