Compare commits
22 Commits
cd2ce78bff
...
dev
| Author | SHA1 | Date | |
|---|---|---|---|
| fd78ecbdac | |||
| 8566e3fd7e | |||
| 93f6f8aa54 | |||
| 5a58c7611e | |||
| e7fbb06041 | |||
| be4f296a35 | |||
| 3a27a4a63d | |||
| fe2f85e788 | |||
| b95c990a5c | |||
| eb45374b95 | |||
| d4f45cf936 | |||
|
|
4fcdf08dc8 | ||
|
|
910dd8bca3 | ||
|
|
f81cae3f25 | ||
| 0e03ce7026 | |||
| d5da6f3167 | |||
| c52d96636b | |||
| 442e22e396 | |||
| a58b2d0291 | |||
| 4fc04e4032 | |||
| a925d2058f | |||
| ed07af95d7 |
@@ -50,3 +50,7 @@ export const getDemandDetailApi = (params: any) => {
|
|||||||
export const queryDemandFilesApi = (params: any) => {
|
export const queryDemandFilesApi = (params: any) => {
|
||||||
return post(`${PREFIX}demand/queryDemandFiles`, params);
|
return post(`${PREFIX}demand/queryDemandFiles`, params);
|
||||||
};
|
};
|
||||||
|
// 撤销需求
|
||||||
|
export const withdrawDemandApi = (params: any) => {
|
||||||
|
return post(`${PREFIX}demand/withdrawDemand`, params);
|
||||||
|
};
|
||||||
|
|||||||
@@ -53,6 +53,7 @@
|
|||||||
:belongProject="belongProject"
|
:belongProject="belongProject"
|
||||||
:parentCategoryPath="parentNodeCategoryPath"
|
:parentCategoryPath="parentNodeCategoryPath"
|
||||||
:existingNodeCodes="existingNodeCodes"
|
:existingNodeCodes="existingNodeCodes"
|
||||||
|
:showNodeExtraInfo="showNodeExtraInfo"
|
||||||
@confirm="onNodeDetailConfirmFun"
|
@confirm="onNodeDetailConfirmFun"
|
||||||
v-bind="$attrs"
|
v-bind="$attrs"
|
||||||
/>
|
/>
|
||||||
@@ -124,6 +125,7 @@ interface Props {
|
|||||||
checkMethod?: any; // 处理勾选逻辑
|
checkMethod?: any; // 处理勾选逻辑
|
||||||
showAddCategoryButton?: boolean; // 是否显示添加分类按钮
|
showAddCategoryButton?: boolean; // 是否显示添加分类按钮
|
||||||
allowRootAddTask?: boolean; // 是否允许在根节点添加任务
|
allowRootAddTask?: boolean; // 是否允许在根节点添加任务
|
||||||
|
showNodeExtraInfo?: boolean; // 显示扩展信息tab(日志/附件/闭环/异常)
|
||||||
hideEditFn?: (row: any) => boolean; // 外部控制编辑按钮隐藏逻辑
|
hideEditFn?: (row: any) => boolean; // 外部控制编辑按钮隐藏逻辑
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -157,6 +159,7 @@ const props = withDefaults(defineProps<Props>(), {
|
|||||||
checkMethod: null,
|
checkMethod: null,
|
||||||
showAddCategoryButton: true,
|
showAddCategoryButton: true,
|
||||||
allowRootAddTask: false,
|
allowRootAddTask: false,
|
||||||
|
showNodeExtraInfo: false,
|
||||||
hideEditFn: undefined,
|
hideEditFn: undefined,
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -428,7 +431,10 @@ const actionList = computed(() => {
|
|||||||
deleteTableRowFun(row);
|
deleteTableRowFun(row);
|
||||||
},
|
},
|
||||||
hide: (row: any) => {
|
hide: (row: any) => {
|
||||||
return props.readonly || (props.belongProject && row.uuid && enableConfigByTenant([TENANT_ENUM.LYRIC]));
|
return (
|
||||||
|
props.readonly ||
|
||||||
|
(props.belongProject && row.uuid && enableConfigByTenant([TENANT_ENUM.LYRIC]))
|
||||||
|
);
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|||||||
@@ -11,7 +11,11 @@
|
|||||||
>
|
>
|
||||||
<template #default>
|
<template #default>
|
||||||
<el-tabs
|
<el-tabs
|
||||||
v-if="enableConfigByTenant([TENANT_ENUM.LYRIC])"
|
v-if="
|
||||||
|
enableConfigByTenant([TENANT_ENUM.LYRIC]) &&
|
||||||
|
showNodeExtraInfo &&
|
||||||
|
formData?.nodeType === NODE_TYPE.TASK
|
||||||
|
"
|
||||||
v-model="tabName"
|
v-model="tabName"
|
||||||
type="card"
|
type="card"
|
||||||
class="node-detail-tab-content"
|
class="node-detail-tab-content"
|
||||||
@@ -139,6 +143,7 @@ interface Props {
|
|||||||
parentCategoryPath?: string[];
|
parentCategoryPath?: string[];
|
||||||
existingNodeCodes?: string[];
|
existingNodeCodes?: string[];
|
||||||
enableSelectCode?: boolean;
|
enableSelectCode?: boolean;
|
||||||
|
showNodeExtraInfo?: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
const props = withDefaults(defineProps<Props>(), {
|
const props = withDefaults(defineProps<Props>(), {
|
||||||
@@ -157,6 +162,7 @@ const props = withDefaults(defineProps<Props>(), {
|
|||||||
parentCategoryPath: () => [],
|
parentCategoryPath: () => [],
|
||||||
existingNodeCodes: () => [],
|
existingNodeCodes: () => [],
|
||||||
enableSelectCode: false,
|
enableSelectCode: false,
|
||||||
|
showNodeExtraInfo: false,
|
||||||
});
|
});
|
||||||
|
|
||||||
const emits = defineEmits(['update:modelValue', 'confirm']);
|
const emits = defineEmits(['update:modelValue', 'confirm']);
|
||||||
|
|||||||
@@ -163,8 +163,17 @@ const sliceFileFun = async (fileIndex: number) => {
|
|||||||
const start = chunkIndex * chunkSize;
|
const start = chunkIndex * chunkSize;
|
||||||
const end = Math.min(start + chunkSize, file.size);
|
const end = Math.min(start + chunkSize, file.size);
|
||||||
const chunkFile = file.slice(start, end);
|
const chunkFile = file.slice(start, end);
|
||||||
const params: any = fileData.isSubmitFile
|
const commonParams = {
|
||||||
? {
|
uploadTaskId: fileData.uploadTaskId,
|
||||||
|
businessId: fileData.businessId,
|
||||||
|
objectKey: fileData.objectKey,
|
||||||
|
sourceFileName: fileData.sourceFileName,
|
||||||
|
chunk: chunkIndex + 1,
|
||||||
|
chunkTotal: totalChunks,
|
||||||
|
file: chunkFile,
|
||||||
|
isSaveLocal: fileData.isSaveLocal,
|
||||||
|
};
|
||||||
|
const submitFileParams = {
|
||||||
uploadTaskId: fileData.uploadTaskId,
|
uploadTaskId: fileData.uploadTaskId,
|
||||||
businessId: fileData.businessId,
|
businessId: fileData.businessId,
|
||||||
jobName: fileData.jobName,
|
jobName: fileData.jobName,
|
||||||
@@ -176,27 +185,12 @@ const sliceFileFun = async (fileIndex: number) => {
|
|||||||
chunk: chunkIndex + 1,
|
chunk: chunkIndex + 1,
|
||||||
chunkTotal: totalChunks,
|
chunkTotal: totalChunks,
|
||||||
file: chunkFile,
|
file: chunkFile,
|
||||||
}
|
|
||||||
: {
|
|
||||||
uploadTaskId: fileData.uploadTaskId,
|
|
||||||
businessId: fileData.businessId,
|
|
||||||
objectKey: fileData.objectKey,
|
|
||||||
sourceFileName: fileData.sourceFileName,
|
|
||||||
chunk: chunkIndex + 1,
|
|
||||||
chunkTotal: totalChunks,
|
|
||||||
file: chunkFile,
|
|
||||||
isSaveLocal: fileData.isSaveLocal,
|
|
||||||
};
|
};
|
||||||
|
const params: any = fileData.isSubmitFile ? submitFileParams : commonParams;
|
||||||
if (fileTempPath) {
|
if (fileTempPath) {
|
||||||
params.fileTempPath = fileTempPath;
|
params.fileTempPath = fileTempPath;
|
||||||
}
|
}
|
||||||
|
const res = await uploadFun(params, fileData.isSubmitFile);
|
||||||
let res: any;
|
|
||||||
if (fileData.isSubmitFile) {
|
|
||||||
res = await uploadSubmitFun(params);
|
|
||||||
} else {
|
|
||||||
res = await uploadFun(params);
|
|
||||||
}
|
|
||||||
if (res.result) {
|
if (res.result) {
|
||||||
fileTempPath = res.fileTempPath;
|
fileTempPath = res.fileTempPath;
|
||||||
fileObj.data.total = totalChunks;
|
fileObj.data.total = totalChunks;
|
||||||
@@ -268,22 +262,23 @@ const callBackFun = (data: any) => {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
const uploadFun = async (params: any) => {
|
const uploadFun = async (params: any, isSubmitFile?: boolean) => {
|
||||||
const starTime = new Date().getTime();
|
const starTime = new Date().getTime();
|
||||||
const res: any = await chunkUploadToMinioApi(params);
|
let apiName: any = chunkUploadToMinioApi;
|
||||||
const data = res.data || {};
|
if (isSubmitFile) {
|
||||||
const endTime = new Date().getTime();
|
apiName = chunkUploadToLocalApi;
|
||||||
data.speed = formatFileSize(chunkSize / ((endTime - starTime) / 1000)); // 根据每次分片上传时间大致算一个速度
|
}
|
||||||
return data;
|
const res: any = await apiName(params);
|
||||||
};
|
|
||||||
|
|
||||||
const uploadSubmitFun = async (params: any) => {
|
|
||||||
const starTime = new Date().getTime();
|
|
||||||
const res: any = await chunkUploadToLocalApi(params);
|
|
||||||
const data = res.data || {};
|
const data = res.data || {};
|
||||||
|
if (isSubmitFile) {
|
||||||
data.result = true;
|
data.result = true;
|
||||||
|
}
|
||||||
const endTime = new Date().getTime();
|
const endTime = new Date().getTime();
|
||||||
data.speed = formatFileSize(chunkSize / ((endTime - starTime) / 1000)); // 根据每次分片上传时间大致算一个速度
|
let duringTime = (endTime - starTime) / 1000;
|
||||||
|
if (duringTime < 1) {
|
||||||
|
duringTime = 1;
|
||||||
|
}
|
||||||
|
data.speed = formatFileSize(chunkSize / duringTime); // 根据每次分片上传时间大致算一个速度
|
||||||
return data;
|
return data;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -127,7 +127,7 @@ export default [
|
|||||||
title: '我提出的',
|
title: '我提出的',
|
||||||
path: '/task/sponsor',
|
path: '/task/sponsor',
|
||||||
name: 'TaskSponsor',
|
name: 'TaskSponsor',
|
||||||
component: () => import('@/tenants/lyric/views/task/demand.vue'),
|
component: () => import('@/views/task/simulationTask/newDemand/index.vue'),
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '我分发的',
|
title: '我分发的',
|
||||||
|
|||||||
@@ -109,6 +109,7 @@
|
|||||||
:showAddCategoryButton="false"
|
:showAddCategoryButton="false"
|
||||||
:allowRootAddTask="true"
|
:allowRootAddTask="true"
|
||||||
:defaultExpandAll="false"
|
:defaultExpandAll="false"
|
||||||
|
:showNodeExtraInfo="true"
|
||||||
>
|
>
|
||||||
<template #otherOptions>
|
<template #otherOptions>
|
||||||
<el-tooltip
|
<el-tooltip
|
||||||
@@ -770,7 +771,7 @@ const createTaskPoolFun = async (formData: any) => {
|
|||||||
const wrappedNodes = wrapWithVirtualNodeFun(nodes);
|
const wrappedNodes = wrapWithVirtualNodeFun(nodes);
|
||||||
const pickedNodes = transformTreeToPoolNodes(wrappedNodes);
|
const pickedNodes = transformTreeToPoolNodes(wrappedNodes);
|
||||||
|
|
||||||
const poolBrief:any = {
|
const poolBrief: any = {
|
||||||
poolName: currentPoolBrief.value.poolName,
|
poolName: currentPoolBrief.value.poolName,
|
||||||
tenantId: currentPoolBrief.value.tenantId,
|
tenantId: currentPoolBrief.value.tenantId,
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -18,6 +18,8 @@ export enum TASK_PROCESS_STATUS {
|
|||||||
POSTPONED = '7',
|
POSTPONED = '7',
|
||||||
/** 已闭环 */
|
/** 已闭环 */
|
||||||
CLOSED_LOOP = '8',
|
CLOSED_LOOP = '8',
|
||||||
|
/** 已撤回 */
|
||||||
|
CANCELED = '9',
|
||||||
}
|
}
|
||||||
|
|
||||||
/** 任务状态颜色映射 */
|
/** 任务状态颜色映射 */
|
||||||
@@ -90,6 +92,7 @@ export const TASK_PROCESS_STATUS_OBJ: any = {
|
|||||||
[TASK_PROCESS_STATUS.CLOSED]: '已关闭',
|
[TASK_PROCESS_STATUS.CLOSED]: '已关闭',
|
||||||
[TASK_PROCESS_STATUS.POSTPONED]: '已延期',
|
[TASK_PROCESS_STATUS.POSTPONED]: '已延期',
|
||||||
[TASK_PROCESS_STATUS.CLOSED_LOOP]: '已闭环',
|
[TASK_PROCESS_STATUS.CLOSED_LOOP]: '已闭环',
|
||||||
|
[TASK_PROCESS_STATUS.CANCELED]: '已撤回',
|
||||||
};
|
};
|
||||||
|
|
||||||
export const TASK_PROCESS_STATUS_OPTIONS = (
|
export const TASK_PROCESS_STATUS_OPTIONS = (
|
||||||
@@ -188,6 +191,7 @@ export const disposeDisabledExeStatus = (
|
|||||||
) {
|
) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
// 上传试验相关文件后,任务状态就会 自动 变成已闭环,已完成就不允许再改了
|
||||||
if (status === TASK_PROCESS_STATUS.COMPLETED) {
|
if (status === TASK_PROCESS_STATUS.COMPLETED) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@@ -201,6 +205,7 @@ export const disposeDisabledExeStatus = (
|
|||||||
TASK_PROCESS_STATUS.NO_STARTED,
|
TASK_PROCESS_STATUS.NO_STARTED,
|
||||||
TASK_PROCESS_STATUS.CLOSED,
|
TASK_PROCESS_STATUS.CLOSED,
|
||||||
TASK_PROCESS_STATUS.COMPLETED,
|
TASK_PROCESS_STATUS.COMPLETED,
|
||||||
|
TASK_PROCESS_STATUS.CANCELED,
|
||||||
].includes(option.value);
|
].includes(option.value);
|
||||||
} else {
|
} else {
|
||||||
return [TASK_PROCESS_STATUS.NO_STARTED, TASK_PROCESS_STATUS.CLOSED].includes(option.value);
|
return [TASK_PROCESS_STATUS.NO_STARTED, TASK_PROCESS_STATUS.CLOSED].includes(option.value);
|
||||||
@@ -211,6 +216,7 @@ export const disposeDisabledExeStatus = (
|
|||||||
TASK_PROCESS_STATUS.PAUSED,
|
TASK_PROCESS_STATUS.PAUSED,
|
||||||
TASK_PROCESS_STATUS.CLOSED,
|
TASK_PROCESS_STATUS.CLOSED,
|
||||||
TASK_PROCESS_STATUS.COMPLETED,
|
TASK_PROCESS_STATUS.COMPLETED,
|
||||||
|
TASK_PROCESS_STATUS.CANCELED,
|
||||||
].includes(option.value);
|
].includes(option.value);
|
||||||
}
|
}
|
||||||
if (status === TASK_PROCESS_STATUS.PAUSED) {
|
if (status === TASK_PROCESS_STATUS.PAUSED) {
|
||||||
@@ -219,4 +225,10 @@ export const disposeDisabledExeStatus = (
|
|||||||
if (status === TASK_PROCESS_STATUS.REJECTED) {
|
if (status === TASK_PROCESS_STATUS.REJECTED) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
if (status === TASK_PROCESS_STATUS.CANCELED) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
if (status === TASK_PROCESS_STATUS.CLOSED_LOOP) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -588,8 +588,8 @@ export const isJSONFun = (str: any) => {
|
|||||||
|
|
||||||
// 删除无用附件文件
|
// 删除无用附件文件
|
||||||
export const removeAttachmentFileIds = (oldIds: string, newIds: any) => {
|
export const removeAttachmentFileIds = (oldIds: string, newIds: any) => {
|
||||||
const oldList = oldIds.split(',');
|
const oldList = oldIds?.split(',') || [];
|
||||||
const newList = newIds.split(',');
|
const newList = newIds?.split(',') || [];
|
||||||
const newSet = new Set(newList);
|
const newSet = new Set(newList);
|
||||||
const delIds: any[] = oldList.filter((id) => !newSet.has(id));
|
const delIds: any[] = oldList.filter((id) => !newSet.has(id));
|
||||||
delIds.forEach((id: any) => {
|
delIds.forEach((id: any) => {
|
||||||
|
|||||||
@@ -10,7 +10,7 @@
|
|||||||
<Dialog
|
<Dialog
|
||||||
v-model="visible"
|
v-model="visible"
|
||||||
:diaTitle="`${currentRow?.id ? '编辑' : '新增'}应用`"
|
:diaTitle="`${currentRow?.id ? '编辑' : '新增'}应用`"
|
||||||
:width="'25%'"
|
:width="'50%'"
|
||||||
:height="'70%'"
|
:height="'70%'"
|
||||||
@close="closeFun"
|
@close="closeFun"
|
||||||
show-footer
|
show-footer
|
||||||
@@ -24,6 +24,7 @@
|
|||||||
limit: 1,
|
limit: 1,
|
||||||
},
|
},
|
||||||
}"
|
}"
|
||||||
|
@change="formChangeFun"
|
||||||
>
|
>
|
||||||
</TableForm>
|
</TableForm>
|
||||||
<!-- <el-form :model="appformData" labelWidth="80">
|
<!-- <el-form :model="appformData" labelWidth="80">
|
||||||
@@ -31,7 +32,41 @@
|
|||||||
<UploadImg v-model="appformData.appImage" :limit-upload="true" :multiple="false" />
|
<UploadImg v-model="appformData.appImage" :limit-upload="true" :multiple="false" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form> -->
|
</el-form> -->
|
||||||
|
<el-form :model="appformData" labelWidth="80">
|
||||||
|
<el-form-item label="命令参数">
|
||||||
|
<BaseTable
|
||||||
|
tableName="COMMAND_PARAM_TABLE"
|
||||||
|
ref="baseTableRef"
|
||||||
|
fullHeight
|
||||||
|
:hide-pagination="true"
|
||||||
|
>
|
||||||
|
<template #keyCnName="{ row }">
|
||||||
|
<el-input v-model="row.keyCnName"></el-input>
|
||||||
|
</template>
|
||||||
|
<template #defaultValue="{ row }">
|
||||||
|
<el-input v-model="row.defaultValue"></el-input>
|
||||||
|
</template>
|
||||||
|
<template #isDisplay="{ row }">
|
||||||
|
<el-switch
|
||||||
|
v-model="row.isDisplay"
|
||||||
|
inline-prompt
|
||||||
|
active-value="Y"
|
||||||
|
inactive-value="N"
|
||||||
|
/>
|
||||||
|
</template>
|
||||||
|
<template #valueType="{ row }">
|
||||||
|
<el-select v-model="row.valueType">
|
||||||
|
<el-option
|
||||||
|
v-for="item in valueTypeList"
|
||||||
|
:key="item.value"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.value"
|
||||||
|
></el-option>
|
||||||
|
</el-select>
|
||||||
|
</template>
|
||||||
|
</BaseTable>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
<div class="pic-content" ref="appNameRef" v-show="appName">
|
<div class="pic-content" ref="appNameRef" v-show="appName">
|
||||||
<appNameBg :app-name="appName"></appNameBg>
|
<appNameBg :app-name="appName"></appNameBg>
|
||||||
</div>
|
</div>
|
||||||
@@ -57,6 +92,7 @@ import { delayTime } from '@/utils/common';
|
|||||||
import { cloneDeep } from 'lodash-es';
|
import { cloneDeep } from 'lodash-es';
|
||||||
import Dialog from '@/components/common/dialog/index.vue';
|
import Dialog from '@/components/common/dialog/index.vue';
|
||||||
// import UploadImg from '@/components/common/uploadImg/index.vue';
|
// import UploadImg from '@/components/common/uploadImg/index.vue';
|
||||||
|
import BaseTable from '@/components/common/table/baseTable.vue';
|
||||||
|
|
||||||
const props = defineProps(['currentAppInfo', 'tableName']);
|
const props = defineProps(['currentAppInfo', 'tableName']);
|
||||||
const emit = defineEmits(['cancel', 'submit']);
|
const emit = defineEmits(['cancel', 'submit']);
|
||||||
@@ -69,9 +105,10 @@ const loading = ref(false);
|
|||||||
const closeFun = () => {
|
const closeFun = () => {
|
||||||
emit('cancel');
|
emit('cancel');
|
||||||
};
|
};
|
||||||
|
const baseTableRef = ref();
|
||||||
const appformData = reactive<any>({
|
const appformData = reactive<any>({
|
||||||
appImage: '',
|
appImage: '',
|
||||||
|
commandConfigs: [],
|
||||||
});
|
});
|
||||||
|
|
||||||
const submitFun = async () => {
|
const submitFun = async () => {
|
||||||
@@ -81,6 +118,7 @@ const submitFun = async () => {
|
|||||||
if (valid) {
|
if (valid) {
|
||||||
const fromData = tableFormRef.value.getFormDataFun();
|
const fromData = tableFormRef.value.getFormDataFun();
|
||||||
const appImage: any = fromData.appImage;
|
const appImage: any = fromData.appImage;
|
||||||
|
fromData.commandConfigs = appformData.commandConfigs;
|
||||||
// 判断是否上传了图片
|
// 判断是否上传了图片
|
||||||
if (!appImage) {
|
if (!appImage) {
|
||||||
appName.value = fromData.appName;
|
appName.value = fromData.appName;
|
||||||
@@ -128,19 +166,75 @@ const updatePngFun = async (name: any) => {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
const getUseformDataFun = () => {
|
// const getUseformDataFun = () => {
|
||||||
nextTick(() => {
|
// nextTick(() => {
|
||||||
const fromData = tableFormRef.value.getFormDataFun();
|
// const fromData = tableFormRef.value.getFormDataFun();
|
||||||
const appImage = fromData.extras.find((item: any) => {
|
// const appImage = fromData.extras.find((item: any) => {
|
||||||
return item.propertyName === 'appImage';
|
// return item.propertyName === 'appImage';
|
||||||
})?.propertyValue;
|
// })?.propertyValue;
|
||||||
|
|
||||||
if (appImage?.length) {
|
// if (appImage?.length) {
|
||||||
return true;
|
// return true;
|
||||||
} else {
|
// } else {
|
||||||
return false;
|
// return false;
|
||||||
|
// }
|
||||||
|
// });
|
||||||
|
// };
|
||||||
|
|
||||||
|
const valueTypeList = ref<any>([
|
||||||
|
{
|
||||||
|
label: '共享云盘文件',
|
||||||
|
value: 'file',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '用户自定义输入',
|
||||||
|
value: 'input',
|
||||||
|
},
|
||||||
|
]);
|
||||||
|
|
||||||
|
const formChangeFun = (data: any) => {
|
||||||
|
console.log(data, 'data');
|
||||||
|
|
||||||
|
if (data?.key === 'hpcCommand') {
|
||||||
|
getCommandConfigsFun(data.val);
|
||||||
}
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
const getCommandConfigsFun = (str: any) => {
|
||||||
|
const params = str
|
||||||
|
? str.split(' ').filter((item: any) => {
|
||||||
|
return item.startsWith('%');
|
||||||
|
})
|
||||||
|
: [];
|
||||||
|
|
||||||
|
const list = params.map((item: any) => {
|
||||||
|
return item.replace('%', '');
|
||||||
});
|
});
|
||||||
|
appformData.commandConfigs = appformData.commandConfigs.filter((item: any) => {
|
||||||
|
return list.includes(item.keyEnName);
|
||||||
|
});
|
||||||
|
|
||||||
|
const appParams = appformData.commandConfigs.map((item: any) => {
|
||||||
|
return item.keyEnName;
|
||||||
|
});
|
||||||
|
|
||||||
|
for (let i = 0; i < list.length; i++) {
|
||||||
|
if (!appParams.includes(list[i])) {
|
||||||
|
appformData.commandConfigs.push({
|
||||||
|
defaultValue: 'default',
|
||||||
|
featchType: 'param',
|
||||||
|
fileRegular: '',
|
||||||
|
keyCnName: '',
|
||||||
|
keyEnName: list[i],
|
||||||
|
valueType: 'input',
|
||||||
|
isDisplay: 'Y',
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
console.log(list);
|
||||||
|
console.log(appformData.commandConfigs);
|
||||||
|
baseTableRef.value.setDataFun(appformData.commandConfigs);
|
||||||
};
|
};
|
||||||
|
|
||||||
watch(
|
watch(
|
||||||
@@ -149,12 +243,14 @@ watch(
|
|||||||
if (newVal) {
|
if (newVal) {
|
||||||
currentRow.value = cloneDeep(newVal);
|
currentRow.value = cloneDeep(newVal);
|
||||||
appformData.appImage = currentRow.value?.appImage;
|
appformData.appImage = currentRow.value?.appImage;
|
||||||
|
appformData.commandConfigs = currentRow.value?.commandConfigs || [];
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
if (currentRow.value?.id) {
|
if (currentRow.value?.id) {
|
||||||
tableFormRef.value.setFormDataFun(currentRow.value);
|
tableFormRef.value.setFormDataFun(currentRow.value);
|
||||||
} else {
|
} else {
|
||||||
tableFormRef.value.resetFun();
|
tableFormRef.value.resetFun();
|
||||||
}
|
}
|
||||||
|
baseTableRef.value.setDataFun(appformData.commandConfigs);
|
||||||
}, 100);
|
}, 100);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
>
|
>
|
||||||
<template #leftOptions>
|
<template #leftOptions>
|
||||||
<div>
|
<div>
|
||||||
<el-button type="primary" @click="editAppInfoFun">新增应用 </el-button>
|
<el-button type="primary" @click="editAppInfoFun">新增应用</el-button>
|
||||||
<el-button type="" @click="showAppUseFun">应用统计 </el-button>
|
<el-button type="" @click="showAppUseFun">应用统计 </el-button>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@@ -283,6 +283,9 @@ const updateAppInfoFun = async (data: any) => {
|
|||||||
machineCode: data.machineCode,
|
machineCode: data.machineCode,
|
||||||
comment: data.comment,
|
comment: data.comment,
|
||||||
uuid: data.uuid,
|
uuid: data.uuid,
|
||||||
|
commandConfigs: data.commandConfigs,
|
||||||
|
hpcCommand: data.hpcCommand,
|
||||||
|
hpcGroup: 'HPC_PACK',
|
||||||
// creator: 'vu0151d',
|
// creator: 'vu0151d',
|
||||||
});
|
});
|
||||||
if (res && res.code === 200) {
|
if (res && res.code === 200) {
|
||||||
@@ -304,6 +307,9 @@ const updateAppInfoFun = async (data: any) => {
|
|||||||
comment: data.comment || '',
|
comment: data.comment || '',
|
||||||
creator: getUserId() || '',
|
creator: getUserId() || '',
|
||||||
creatorName: getUserData()?.nickname || '',
|
creatorName: getUserData()?.nickname || '',
|
||||||
|
commandConfigs: data.commandConfigs,
|
||||||
|
hpcCommand: data.hpcCommand,
|
||||||
|
hpcGroup: 'HPC_PACK',
|
||||||
};
|
};
|
||||||
|
|
||||||
const res: any = await addApplicationApi(param);
|
const res: any = await addApplicationApi(param);
|
||||||
@@ -357,7 +363,7 @@ const timer: any = ref(null);
|
|||||||
const startAppFun = async (data: any) => {
|
const startAppFun = async (data: any) => {
|
||||||
await getdeviceuuidFun();
|
await getdeviceuuidFun();
|
||||||
|
|
||||||
const uuid = localStorage.getItem('USER_UUID') ;
|
const uuid = localStorage.getItem('USER_UUID');
|
||||||
if (uuid) {
|
if (uuid) {
|
||||||
const res: any = await execApi({
|
const res: any = await execApi({
|
||||||
path: data.appPath,
|
path: data.appPath,
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ const getDifficultyLevelColor = (difficulty: number) => {
|
|||||||
if (Number(difficulty) <= 1) {
|
if (Number(difficulty) <= 1) {
|
||||||
return '#67c23a'; // 绿色
|
return '#67c23a'; // 绿色
|
||||||
} else if (Number(difficulty) == 2) {
|
} else if (Number(difficulty) == 2) {
|
||||||
return 'rgb(248, 227, 197)';
|
return 'rgb(243, 209, 158)';
|
||||||
} else {
|
} else {
|
||||||
return '#f56c6c'; // 红色
|
return '#f56c6c'; // 红色
|
||||||
}
|
}
|
||||||
@@ -54,6 +54,7 @@ const initUserDifficultyCoefficientChart = async (formData: any) => {
|
|||||||
let xData: any = [];
|
let xData: any = [];
|
||||||
let titles: any = [];
|
let titles: any = [];
|
||||||
let colors: any = [];
|
let colors: any = [];
|
||||||
|
let legendData: any = [];
|
||||||
const seriesList: any = [];
|
const seriesList: any = [];
|
||||||
const params = {
|
const params = {
|
||||||
...formData,
|
...formData,
|
||||||
@@ -66,14 +67,16 @@ const initUserDifficultyCoefficientChart = async (formData: any) => {
|
|||||||
res.data?.result?.map((item: any) => {
|
res.data?.result?.map((item: any) => {
|
||||||
return item.userName;
|
return item.userName;
|
||||||
}) || [];
|
}) || [];
|
||||||
titles = res.data?.alldifficultyValue || [];
|
// titles = res.data?.alldifficultyValue || [];
|
||||||
colors = titles
|
titles = (res.data?.alldifficultyValue || [])
|
||||||
.sort((a: any, b: any) => Number(a) - Number(b))
|
.filter((key: string) => DIFFICULTY_COEFFICIENT.value.O.hasOwnProperty(key))
|
||||||
.map((key: any) => getDifficultyLevelColor(Number(key)));
|
.sort((a: any, b: any) => Number(a) - Number(b));
|
||||||
|
legendData = titles.map((key: any) => getDifficultyLevel(Number(key)));
|
||||||
|
colors = titles.map((key: any) => getDifficultyLevelColor(Number(key)));
|
||||||
for (let i = 0; i < titles.length; i++) {
|
for (let i = 0; i < titles.length; i++) {
|
||||||
const str = titles[i].toFixed(1);
|
const str = titles[i].toFixed(1);
|
||||||
const obj: any = {
|
const obj: any = {
|
||||||
name: getDifficultyLevel(Number(str)) + str,
|
name: getDifficultyLevel(Number(str)),
|
||||||
coefficient: Number(str),
|
coefficient: Number(str),
|
||||||
type: 'bar',
|
type: 'bar',
|
||||||
emphasis: {
|
emphasis: {
|
||||||
@@ -89,7 +92,7 @@ const initUserDifficultyCoefficientChart = async (formData: any) => {
|
|||||||
const option = {
|
const option = {
|
||||||
color: colors,
|
color: colors,
|
||||||
legend: {
|
legend: {
|
||||||
data: titles,
|
data: legendData,
|
||||||
},
|
},
|
||||||
grid: {
|
grid: {
|
||||||
bottom: '50',
|
bottom: '50',
|
||||||
|
|||||||
@@ -13,7 +13,6 @@
|
|||||||
'createTime',
|
'createTime',
|
||||||
'finishTime',
|
'finishTime',
|
||||||
]"
|
]"
|
||||||
:multipleItems="['user']"
|
|
||||||
:nodata="nodata"
|
:nodata="nodata"
|
||||||
@update="updateStatistics"
|
@update="updateStatistics"
|
||||||
/>
|
/>
|
||||||
@@ -36,7 +35,7 @@ const getDifficultyLevelColor = (difficulty: number) => {
|
|||||||
if (Number(difficulty) <= 1) {
|
if (Number(difficulty) <= 1) {
|
||||||
return '#67c23a'; // 绿色
|
return '#67c23a'; // 绿色
|
||||||
} else if (Number(difficulty) == 2) {
|
} else if (Number(difficulty) == 2) {
|
||||||
return 'rgb(248, 227, 197)';
|
return 'rgb(243, 209, 158)';
|
||||||
} else {
|
} else {
|
||||||
return '#f56c6c'; // 红色
|
return '#f56c6c'; // 红色
|
||||||
}
|
}
|
||||||
@@ -57,7 +56,9 @@ const updateStatistics = async (formData: any) => {
|
|||||||
nodata.value = res.data.result.length === 0;
|
nodata.value = res.data.result.length === 0;
|
||||||
res.data.result.forEach((item: any) => {
|
res.data.result.forEach((item: any) => {
|
||||||
// 遍历item.difficultyCount这个对象,将key和value分别存入difficultyCount对象中,如果key已经存在,则将value累加
|
// 遍历item.difficultyCount这个对象,将key和value分别存入difficultyCount对象中,如果key已经存在,则将value累加
|
||||||
Object.keys(item.difficultyCount).forEach((key: any) => {
|
Object.keys(item.difficultyCount)
|
||||||
|
.filter((key: string) => DIFFICULTY_COEFFICIENT.value.O.hasOwnProperty(Number(key)))
|
||||||
|
.forEach((key: any) => {
|
||||||
if (difficultyCount[key]) {
|
if (difficultyCount[key]) {
|
||||||
difficultyCount[key] += item.difficultyCount[key];
|
difficultyCount[key] += item.difficultyCount[key];
|
||||||
} else {
|
} else {
|
||||||
@@ -65,11 +66,10 @@ const updateStatistics = async (formData: any) => {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
const seriesData = Object.keys(difficultyCount).map((key: any) => {
|
const seriesData = Object.keys(difficultyCount).map((key: any) => {
|
||||||
return {
|
return {
|
||||||
key: Number(key),
|
key: Number(key),
|
||||||
name: getDifficultyLevel(key) + key,
|
name: getDifficultyLevel(key),
|
||||||
value: difficultyCount[key],
|
value: difficultyCount[key],
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -498,7 +498,7 @@ const submitFun = async () => {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
if (props.taskInfo.exeStatus != 8) {
|
if (props.taskInfo.exeStatus != TASK_PROCESS_STATUS.CLOSED_LOOP) {
|
||||||
if (enableConfigByTenant([TENANT_ENUM.LYRIC])) {
|
if (enableConfigByTenant([TENANT_ENUM.LYRIC])) {
|
||||||
await updateTaskExeStatusFun();
|
await updateTaskExeStatusFun();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -145,14 +145,14 @@ const performanceColorList = getAchieveColorList(
|
|||||||
const taskExeStatusLegendData = TASK_ACHIEVE_STATUS.value.A.map((item: any) => {
|
const taskExeStatusLegendData = TASK_ACHIEVE_STATUS.value.A.map((item: any) => {
|
||||||
return { name: item.label };
|
return { name: item.label };
|
||||||
});
|
});
|
||||||
const difficultyCountColorList = [
|
// const difficultyCountColorList = [
|
||||||
'#67c23a',
|
// '#67c23a',
|
||||||
'rgb(179, 225, 157)',
|
// 'rgb(179, 225, 157)',
|
||||||
'rgb(248, 227, 197)',
|
// 'rgb(248, 227, 197)',
|
||||||
'rgb(243, 209, 158)',
|
// 'rgb(243, 209, 158)',
|
||||||
'rgb(248, 152, 152)',
|
// 'rgb(248, 152, 152)',
|
||||||
'#f56c6c',
|
// '#f56c6c',
|
||||||
];
|
// ];
|
||||||
// 封装方法,根据对象的某个属性对对象数组进行排序 升序
|
// 封装方法,根据对象的某个属性对对象数组进行排序 升序
|
||||||
const sortObjectArray = (arr: any, key: any) => {
|
const sortObjectArray = (arr: any, key: any) => {
|
||||||
return arr.sort((a: any, b: any) => {
|
return arr.sort((a: any, b: any) => {
|
||||||
@@ -216,7 +216,7 @@ const getDifficultyLevelColor = (difficulty: number) => {
|
|||||||
if (Number(difficulty) <= 1) {
|
if (Number(difficulty) <= 1) {
|
||||||
return '#67c23a'; // 绿色
|
return '#67c23a'; // 绿色
|
||||||
} else if (Number(difficulty) == 2) {
|
} else if (Number(difficulty) == 2) {
|
||||||
return 'rgb(248, 227, 197)';
|
return 'rgb(243, 209, 158)';
|
||||||
} else {
|
} else {
|
||||||
return '#f56c6c'; // 红色
|
return '#f56c6c'; // 红色
|
||||||
}
|
}
|
||||||
@@ -234,14 +234,17 @@ const queryUserDifficultStatistics = async () => {
|
|||||||
xData = res.data.result.map((item: any) => {
|
xData = res.data.result.map((item: any) => {
|
||||||
return item.userName;
|
return item.userName;
|
||||||
});
|
});
|
||||||
titles = res.data.alldifficultyValue;
|
// titles = res.data.alldifficultyValue;
|
||||||
|
titles = (res.data?.alldifficultyValue || []).filter((key: string) =>
|
||||||
|
DIFFICULTY_COEFFICIENT.value.O.hasOwnProperty(key)
|
||||||
|
);
|
||||||
colors = titles
|
colors = titles
|
||||||
.sort((a: any, b: any) => Number(a) - Number(b))
|
.sort((a: any, b: any) => Number(a) - Number(b))
|
||||||
.map((key: any) => getDifficultyLevelColor(Number(key)));
|
.map((key: any) => getDifficultyLevelColor(Number(key)));
|
||||||
seriesData = titles.map((title: any) => {
|
seriesData = titles.map((title: any) => {
|
||||||
const str = title.toFixed(1);
|
const str = title.toFixed(1);
|
||||||
return {
|
return {
|
||||||
name: getDifficultyLevel(Number(str)) + str,
|
name: getDifficultyLevel(Number(str)),
|
||||||
coefficient: Number(str),
|
coefficient: Number(str),
|
||||||
type: 'bar',
|
type: 'bar',
|
||||||
emphasis: {
|
emphasis: {
|
||||||
|
|||||||
@@ -296,8 +296,9 @@ const actionList = ref<any>([
|
|||||||
},
|
},
|
||||||
hide: (row: any) => {
|
hide: (row: any) => {
|
||||||
return (
|
return (
|
||||||
row.exeStatus === TASK_PROCESS_STATUS.COMPLETED ||
|
row.exeStatus === TASK_PROCESS_STATUS.REJECTED ||
|
||||||
row.exeStatus === TASK_PROCESS_STATUS.REJECTED
|
row.exeStatus === TASK_PROCESS_STATUS.CLOSED_LOOP ||
|
||||||
|
row.exeStatus === TASK_PROCESS_STATUS.CANCELED
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@@ -328,10 +329,15 @@ const actionList = ref<any>([
|
|||||||
{
|
{
|
||||||
title: '驳回',
|
title: '驳回',
|
||||||
type: 'danger',
|
type: 'danger',
|
||||||
needConfirm: true,
|
needConfirm: !enableConfigByTenant([TENANT_ENUM.LYRIC]),
|
||||||
confirmTip: '确认驳回吗?',
|
confirmTip: !enableConfigByTenant([TENANT_ENUM.LYRIC]) ? '确认驳回吗?' : '',
|
||||||
click: (row: any) => {
|
click: (row: any) => {
|
||||||
|
if (!enableConfigByTenant([TENANT_ENUM.LYRIC])) {
|
||||||
changeTaskStatus(row, TASK_PROCESS_STATUS.REJECTED);
|
changeTaskStatus(row, TASK_PROCESS_STATUS.REJECTED);
|
||||||
|
} else {
|
||||||
|
editRow.value = row;
|
||||||
|
rejectVisible.value = true;
|
||||||
|
}
|
||||||
},
|
},
|
||||||
hide: (row: any) => {
|
hide: (row: any) => {
|
||||||
return !(
|
return !(
|
||||||
@@ -340,23 +346,6 @@ const actionList = ref<any>([
|
|||||||
);
|
);
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
// {
|
|
||||||
// title: '驳回',
|
|
||||||
// type: 'danger',
|
|
||||||
// click: (row: any) => {
|
|
||||||
// editRow.value = row;
|
|
||||||
// rejectVisible.value = true;
|
|
||||||
// },
|
|
||||||
// hide: (row: any) => {
|
|
||||||
// return (
|
|
||||||
// enableConfigByTenant([TENANT_ENUM.BASE]) ||
|
|
||||||
// !(
|
|
||||||
// row.exeStatus === TASK_PROCESS_STATUS.NO_STARTED ||
|
|
||||||
// row.exeStatus === TASK_PROCESS_STATUS.IN_PROGRESS
|
|
||||||
// )
|
|
||||||
// );
|
|
||||||
// },
|
|
||||||
// },
|
|
||||||
]);
|
]);
|
||||||
const showTaskDetailFun = (row: any) => {
|
const showTaskDetailFun = (row: any) => {
|
||||||
showTaskDetailDialog.value = true;
|
showTaskDetailDialog.value = true;
|
||||||
|
|||||||
@@ -185,10 +185,15 @@ const actionList = ref([
|
|||||||
{
|
{
|
||||||
title: '驳回',
|
title: '驳回',
|
||||||
type: 'danger',
|
type: 'danger',
|
||||||
needConfirm: true,
|
needConfirm: !enableConfigByTenant([TENANT_ENUM.LYRIC]),
|
||||||
confirmTip: '确认驳回吗?',
|
confirmTip: !enableConfigByTenant([TENANT_ENUM.LYRIC]) ? '确认驳回吗?' : '',
|
||||||
click: (row: any) => {
|
click: (row: any) => {
|
||||||
|
if (!enableConfigByTenant([TENANT_ENUM.LYRIC])) {
|
||||||
changeTaskStatus(row, TASK_PROCESS_STATUS.REJECTED);
|
changeTaskStatus(row, TASK_PROCESS_STATUS.REJECTED);
|
||||||
|
} else {
|
||||||
|
editRow.value = row;
|
||||||
|
rejectVisible.value = true;
|
||||||
|
}
|
||||||
},
|
},
|
||||||
hide: (row: any) => {
|
hide: (row: any) => {
|
||||||
return !(
|
return !(
|
||||||
@@ -198,23 +203,6 @@ const actionList = ref([
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
// {
|
// {
|
||||||
// title: '驳回',
|
|
||||||
// type: 'danger',
|
|
||||||
// click: (row: any) => {
|
|
||||||
// editRow.value = row;
|
|
||||||
// rejectVisible.value = true;
|
|
||||||
// },
|
|
||||||
// hide: (row: any) => {
|
|
||||||
// return (
|
|
||||||
// enableConfigByTenant([TENANT_ENUM.BASE]) ||
|
|
||||||
// !(
|
|
||||||
// row.exeStatus === TASK_PROCESS_STATUS.NO_STARTED ||
|
|
||||||
// row.exeStatus === TASK_PROCESS_STATUS.IN_PROGRESS
|
|
||||||
// )
|
|
||||||
// );
|
|
||||||
// },
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// title: '删除',
|
// title: '删除',
|
||||||
// type: 'danger',
|
// type: 'danger',
|
||||||
// needConfirm: true,
|
// needConfirm: true,
|
||||||
|
|||||||
@@ -30,11 +30,12 @@
|
|||||||
<DemandDetail v-model="formVisible" :demandId="demandId" />
|
<DemandDetail v-model="formVisible" :demandId="demandId" />
|
||||||
</div>
|
</div>
|
||||||
<attachments :demandId="demandInfo.uuid" v-model:visible="attachmentsVisible"></attachments>
|
<attachments :demandId="demandInfo.uuid" v-model:visible="attachmentsVisible"></attachments>
|
||||||
|
<RejectDia v-model="rejectVisible" title="撤回代办" @submit="rejectFun" />
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { reactive, ref } from 'vue';
|
import { reactive, ref } from 'vue';
|
||||||
import { deleteDemandApi, demandListApi } from '@/api/project/demand';
|
import { deleteDemandApi, demandListApi, withdrawDemandApi } from '@/api/project/demand';
|
||||||
// import { upload } from '@/api/request';
|
// import { upload } from '@/api/request';
|
||||||
import { CommonStore } from '@/stores/common';
|
import { CommonStore } from '@/stores/common';
|
||||||
import attachments from '@/views/task/simulationTask/components/attachments.vue';
|
import attachments from '@/views/task/simulationTask/components/attachments.vue';
|
||||||
@@ -45,6 +46,8 @@ import { enableConfigByTenant, TENANT_ENUM } from '@/tenants/tenant';
|
|||||||
import { syncDemandList } from '../taskPage';
|
import { syncDemandList } from '../taskPage';
|
||||||
import { getPageStorage } from '@/utils/common';
|
import { getPageStorage } from '@/utils/common';
|
||||||
import DemandDetail from './components/detail.vue';
|
import DemandDetail from './components/detail.vue';
|
||||||
|
import RejectDia from '../components/rejectDia.vue';
|
||||||
|
import { TASK_PROCESS_STATUS } from '@/utils/enum/task';
|
||||||
|
|
||||||
// import emitter from '@/utils/eventBus';
|
// import emitter from '@/utils/eventBus';
|
||||||
|
|
||||||
@@ -94,6 +97,9 @@ const showTaskDetailFun = (row: any) => {
|
|||||||
// visibleDialog(false, row);
|
// visibleDialog(false, row);
|
||||||
};
|
};
|
||||||
const demandId = ref<any>('');
|
const demandId = ref<any>('');
|
||||||
|
const rejectVisible = ref(false);
|
||||||
|
const rejectData = ref<any>({});
|
||||||
|
|
||||||
const actionList = ref([
|
const actionList = ref([
|
||||||
{
|
{
|
||||||
title: '编辑',
|
title: '编辑',
|
||||||
@@ -112,6 +118,23 @@ const actionList = ref([
|
|||||||
click: (row: any) => {
|
click: (row: any) => {
|
||||||
deleteDemandFun(row.uuid);
|
deleteDemandFun(row.uuid);
|
||||||
},
|
},
|
||||||
|
hide: () => {
|
||||||
|
return enableConfigByTenant([TENANT_ENUM.LYRIC]);
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '撤回',
|
||||||
|
type: 'danger',
|
||||||
|
click: (row: any) => {
|
||||||
|
rejectData.value = row;
|
||||||
|
rejectVisible.value = true;
|
||||||
|
},
|
||||||
|
hide: (row: any) => {
|
||||||
|
return (
|
||||||
|
!enableConfigByTenant([TENANT_ENUM.LYRIC]) ||
|
||||||
|
![TASK_PROCESS_STATUS.NO_STARTED].includes(row.demandStatus)
|
||||||
|
);
|
||||||
|
},
|
||||||
},
|
},
|
||||||
]);
|
]);
|
||||||
|
|
||||||
@@ -138,6 +161,20 @@ const deleteDemandFun = async (uuid: number) => {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const rejectFun = (data: any) => {
|
||||||
|
const params = {
|
||||||
|
uuid: rejectData.value.uuid,
|
||||||
|
...data,
|
||||||
|
};
|
||||||
|
withdrawDemandApi(params).then((res: any) => {
|
||||||
|
if (res.code === 200) {
|
||||||
|
rejectVisible.value = false;
|
||||||
|
ElMessage.success('撤回成功');
|
||||||
|
tableRef.value.tableRef.resetFun();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
const simulationTypeList = ref(commonStore.getDictData('SIMULATION_TYPE').A);
|
const simulationTypeList = ref(commonStore.getDictData('SIMULATION_TYPE').A);
|
||||||
const simulationType = ref(getPageStorage('simulationType') || simulationTypeList.value[0].value);
|
const simulationType = ref(getPageStorage('simulationType') || simulationTypeList.value[0].value);
|
||||||
|
|
||||||
|
|||||||
@@ -68,17 +68,17 @@ export const syncDemandList = async () => {
|
|||||||
export const changeTaskStatusCommon = async (row: any, status: string, formData?: any) => {
|
export const changeTaskStatusCommon = async (row: any, status: string, formData?: any) => {
|
||||||
const data: any = formData || {};
|
const data: any = formData || {};
|
||||||
const params: {
|
const params: {
|
||||||
data: any;
|
|
||||||
taskIds: any[];
|
taskIds: any[];
|
||||||
req: {
|
req: {
|
||||||
exeStatus: string;
|
exeStatus: string;
|
||||||
finishTime?: string;
|
finishTime?: string;
|
||||||
|
data: any;
|
||||||
};
|
};
|
||||||
} = {
|
} = {
|
||||||
...data,
|
|
||||||
taskIds: [row.uuid],
|
taskIds: [row.uuid],
|
||||||
req: {
|
req: {
|
||||||
exeStatus: status,
|
exeStatus: status,
|
||||||
|
...data,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
if (status === TASK_PROCESS_STATUS.COMPLETED) {
|
if (status === TASK_PROCESS_STATUS.COMPLETED) {
|
||||||
|
|||||||
Reference in New Issue
Block a user