update:指标归档功能更新
This commit is contained in:
@@ -14,6 +14,12 @@
|
|||||||
>
|
>
|
||||||
<template v-if="showLeftOptions" #leftOptions>
|
<template v-if="showLeftOptions" #leftOptions>
|
||||||
<div class="operate-box">
|
<div class="operate-box">
|
||||||
|
<el-button
|
||||||
|
v-if="paramType === 'run' && canUpdate"
|
||||||
|
type="primary"
|
||||||
|
@click="ArchiveRunDataFun"
|
||||||
|
>归档</el-button
|
||||||
|
>
|
||||||
<el-button v-if="canUpdate" type="primary" @click="openAddPerformanceWindFun"
|
<el-button v-if="canUpdate" type="primary" @click="openAddPerformanceWindFun"
|
||||||
>新增</el-button
|
>新增</el-button
|
||||||
>
|
>
|
||||||
@@ -73,17 +79,25 @@
|
|||||||
:export-api="exportPerformanceByScriptApi"
|
:export-api="exportPerformanceByScriptApi"
|
||||||
showCheckbox
|
showCheckbox
|
||||||
hidePagination
|
hidePagination
|
||||||
:actionList="showLeftOptions ? actionList : []"
|
:actionList="showLeftOptions && canUpdate ? actionList : []"
|
||||||
:export-params="excelParams"
|
:export-params="excelParams"
|
||||||
:full-height="fullHeight"
|
:full-height="fullHeight"
|
||||||
:show-setting="false"
|
:show-setting="false"
|
||||||
>
|
>
|
||||||
<template v-if="showLeftOptions" #leftOptions>
|
<template v-if="showLeftOptions" #leftOptions>
|
||||||
<div class="operate-box">
|
<div class="operate-box">
|
||||||
<el-button type="primary" @click="ArchiveRunDataFun">归档</el-button>
|
|
||||||
<el-button type="primary" @click="openAddPerformanceWindFun">新增</el-button>
|
|
||||||
<el-button type="danger" @click="deleteFun">删除</el-button>
|
|
||||||
<el-button
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
v-if="paramType === 'run' && canUpdate"
|
||||||
|
@click="ArchiveRunDataFun"
|
||||||
|
>归档</el-button
|
||||||
|
>
|
||||||
|
<el-button v-if="canUpdate" type="primary" @click="openAddPerformanceWindFun"
|
||||||
|
>新增</el-button
|
||||||
|
>
|
||||||
|
<el-button v-if="canUpdate" type="danger" @click="deleteFun">删除</el-button>
|
||||||
|
<el-button
|
||||||
|
v-if="canUpdate"
|
||||||
icon="Upload"
|
icon="Upload"
|
||||||
title="导入Excel"
|
title="导入Excel"
|
||||||
link
|
link
|
||||||
@@ -104,9 +118,9 @@
|
|||||||
{{ PERFORMANCE_UNIT.O[row.unit] }}
|
{{ PERFORMANCE_UNIT.O[row.unit] }}
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<template #operate="{ row }">
|
<!-- <template #operate="{ row }">
|
||||||
<el-button type="danger" link @click="delPerformance(row)">删除</el-button>
|
<el-button type="danger" link @click="delPerformance(row)">删除</el-button>
|
||||||
</template>
|
</template> -->
|
||||||
</BaseTable>
|
</BaseTable>
|
||||||
</div>
|
</div>
|
||||||
<!-- <div class="operate-box">
|
<!-- <div class="operate-box">
|
||||||
@@ -486,18 +500,28 @@ const updatePerformanceFun = async (data: any) => {
|
|||||||
|
|
||||||
// 归档
|
// 归档
|
||||||
const ArchiveRunDataFun = async () => {
|
const ArchiveRunDataFun = async () => {
|
||||||
const param = {
|
const checkData = baseTableRef.value.tableRef.getCheckboxRecords()
|
||||||
runId: props.runInfo.uuid,
|
|
||||||
};
|
if (checkData?.length) {
|
||||||
try {
|
const ids = checkData.map((item: any) => {
|
||||||
const res: any = await syncKeyResultToTaskApi(param);
|
return item.id;
|
||||||
if (res && res.code === 200) {
|
});
|
||||||
ElMessage.success('归档成功');
|
const param = {
|
||||||
} else {
|
runId: props.runInfo.uuid,
|
||||||
ElMessage.warning('归档未成功');
|
performanceIdList: ids,
|
||||||
|
};
|
||||||
|
try {
|
||||||
|
const res: any = await syncKeyResultToTaskApi(param);
|
||||||
|
if (res && res.code === 200) {
|
||||||
|
ElMessage.success('归档成功');
|
||||||
|
} else {
|
||||||
|
ElMessage.warning('归档未成功');
|
||||||
|
}
|
||||||
|
} catch (error) {
|
||||||
|
console.error(error);
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} else {
|
||||||
console.error(error);
|
ElMessage.warning('请勾选算例后进行归档');
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user