This commit is contained in:
2026-03-25 13:57:27 +08:00
5 changed files with 46 additions and 15 deletions

View File

@@ -33,8 +33,20 @@
<template #footer>
<div>
<el-button @click="closeFun">关闭</el-button>
<el-button type="primary" @click="saveFun(false)" :disabled="!reportFileId">保存</el-button>
<el-button type="primary" @click="saveFun(true)" :disabled="!reportFileId">
<el-button
type="primary"
@click="saveFun(false)"
:disabled="!reportFileId"
:loading="loading"
>
保存
</el-button>
<el-button
type="primary"
@click="saveFun(true)"
:disabled="!reportFileId"
:loading="loading"
>
保存并下载
</el-button>
</div>
@@ -81,6 +93,7 @@ const reportDataId = ref<any>('');
const reportDataContent = ref<any>({});
const reportFileId = ref<any>('');
const diaVisible = ref(false);
const loading = ref(false);
const initFun = () => {
getReportListFun();
@@ -178,10 +191,15 @@ const saveFun = (download: boolean) => {
if (download) {
api = editReportAndDownloadApi;
}
api(params).then(() => {
ElMessage.success('操作成功');
closeFun();
});
loading.value = true;
api(params)
.then(() => {
ElMessage.success('操作成功');
closeFun();
})
.finally(() => {
loading.value = false;
});
};
const resetFun = () => {

View File

@@ -1,5 +1,9 @@
<template>
<ResourceLibraryPage :dirType="DIR_TYPE.EXCEPTION_CASE" />
<ResourceLibraryPage
:dirType="DIR_TYPE.EXCEPTION_CASE"
needApproval
moduleCode="EXCEPTION_CASE_APPROVAL"
/>
</template>
<script lang="ts" setup>

View File

@@ -19,11 +19,11 @@
进度
<span v-if="project.taskTotalCount">
{{
(
Math.floor(
((project.taskCompletedCount + project.taskClosedLoopCount) /
project.taskTotalCount) *
100
).toFixed(0)
100
)
}}%
</span>
<span v-else>0%</span>

View File

@@ -14,7 +14,11 @@
<div class="top-options">
<div class="text">显示维度</div>
<div class="select">
<el-select placeholder="请选择" v-model="currentDimension">
<el-select
placeholder="请选择"
v-model="currentDimension"
@change="dimensionChangeFun"
>
<el-option
v-for="item in templateList"
:key="item.id"
@@ -327,6 +331,7 @@ import DragUploader from '@/components/common/dragUploader/index.vue';
import { TASK_CALCULATE_STATUS_OBJ } from '@/utils/enum/task';
import { getTaskAchieveStyleClass } from '@/components/common/statusDot/statusMap';
import { debounce } from 'lodash-es';
import { getPageStorage, setPageStorage } from '@/utils/common';
interface Props {
hideAddBtn?: boolean;
@@ -473,7 +478,7 @@ const getAllTemplateFun = () => {
if (res.code === 200) {
const listData = res.data.allDimensionTemplates || [];
templateList.value = listData;
currentDimension.value = listData[0]?.id || '';
currentDimension.value = getPageStorage('currentDimension') || listData[0]?.id || '';
}
});
};
@@ -831,6 +836,10 @@ const AddFileRef = ref<any>();
const beforeUploadFun = (file: any) => {
AddFileRef.value.addFileFun(file);
};
const dimensionChangeFun = () => {
setPageStorage('currentDimension', currentDimension.value);
};
</script>
<style lang="scss" scoped>

View File

@@ -34,11 +34,11 @@
{{ PROJECT_EXE_STATUS.O[project.exeStatus] || '未开始' }}
<span v-if="project.taskTotalCount">
{{
(
Math.floor(
((project.taskCompletedCount + project.taskClosedLoopCount) /
project.taskTotalCount) *
100
).toFixed(0)
100
)
}}%
</span>
<span v-else>0%</span>