去掉 statusMapFun

This commit is contained in:
weibl
2026-02-24 15:43:01 +08:00
parent 7e1843f794
commit b519f5e42f
3 changed files with 16 additions and 26 deletions

View File

@@ -87,7 +87,7 @@ export const getTaskExeStyleClass = (status: string) => {
* @param status
* @returns
*/
export const getApproveStyleClass = (status: number) => {
export const getApproveStyleClass = (status: number, type?: string) => {
const numberStatus = Number(status);
switch (numberStatus) {
case FLOW_APPROVE_STATUS_ENUM.APPROVED:
@@ -95,6 +95,9 @@ export const getApproveStyleClass = (status: number) => {
case FLOW_APPROVE_STATUS_ENUM.APPROVING:
return 'warning';
case FLOW_APPROVE_STATUS_ENUM.NOT_APPROVED:
if (type === 'reportLib' || type === 'processLib') {
return 'primary';
}
return 'info';
case FLOW_APPROVE_STATUS_ENUM.NOT_APPROVED_REJECT:
return 'error';
@@ -144,19 +147,6 @@ export const statusMapFun3 = (type: any) => {
}
};
export const statusMapFun4 = (type: any) => {
switch (type) {
case FLOW_APPROVE_STATUS_ENUM.NOT_APPROVED:
return 'primary';
case FLOW_APPROVE_STATUS_ENUM.APPROVING:
return 'warning';
case FLOW_APPROVE_STATUS_ENUM.APPROVED:
return 'success';
default:
return 'error';
}
};
export const statusMapFun5 = (status: string) => {
switch (status) {
case '0':

View File

@@ -146,7 +146,7 @@
{{ DISCIPLINE_TYPE.O[row.templateType] }}
</template>
<template #approveType="{ row }">
<StatusDot :status="statusMapFun4(row.approveType)">
<StatusDot :status="getApproveStyleClass(row.approveType, 'reportLib')">
<template #default>
<span
:class="
@@ -201,7 +201,7 @@ import { FLOW_APPROVE_STATUS_ENUM, FLOW_USE_STATUS } from '@/utils/enum/flow';
import ReportViewDialog from '@/components/common/report/reportViewDialog.vue';
import ApprovalProcess from '@/components/common/approvalProcess/index.vue';
import StatusDot from '@/components/common/statusDot/index.vue';
import { statusMapFun4 } from '@/components/common/statusDot/statusMap';
import { getApproveStyleClass } from '@/components/common/statusDot/statusMap';
import PoolTaskSelect from '@/components/pool/poolTaskSelect.vue';
import { deleteReportTemplateApi, queryReportTemplateApi } from '@/api/capability/report';
import { REPORT_OPERATION_TYPE, REPORT_TEMPLATE_PUBLIC_STATUS } from '@/utils/enum/report';

View File

@@ -19,9 +19,9 @@
:searchLimitNum="3"
fullHeight
>
<template #achieveStatus="{ row }">
<!-- <template #achieveStatus="{ row }">
<StatusDot
:status="statusMapFun5(row.achieveStatus)"
:status="getApproveStyleClass(row.achieveStatus)"
:title="RESULT_ACHIEVE_STATUS.O[row.achieveStatus]"
/>
</template>
@@ -30,7 +30,7 @@
:status="statusMapFun6(row.exeStatus)"
:title="TASK_ACHIEVE_STATUS.O[row.exeStatus]"
/>
</template>
</template> -->
</BaseTable>
</div>
<template #footer>
@@ -45,11 +45,11 @@
<script lang="ts" setup>
import { getSimulationTaskFileApi } from '@/api/data/dataAnalysis';
import Dialog from '@/components/common/dialog/index.vue';
import { statusMapFun5, statusMapFun6 } from '@/components/common/statusDot/statusMap';
import { useDict } from '@/utils/useDict';
// import { getApproveStyleClass, statusMapFun5, statusMapFun6 } from '@/components/common/statusDot/statusMap';
// import { useDict } from '@/utils/useDict';
// import { ElMessage } from 'element-plus';
import { computed, onMounted, ref } from 'vue';
import StatusDot from '@/components/common/statusDot/index.vue';
// import StatusDot from '@/components/common/statusDot/index.vue';
import BaseTable from '@/components/common/table/baseTable.vue';
import { pushReportApi } from '@/api/project/node';
import { ElMessage } from 'element-plus';
@@ -62,10 +62,10 @@ const props = defineProps<{
projectCode: string;
}>();
const { RESULT_ACHIEVE_STATUS, TASK_ACHIEVE_STATUS } = useDict(
'RESULT_ACHIEVE_STATUS',
'TASK_ACHIEVE_STATUS'
);
// const { RESULT_ACHIEVE_STATUS, TASK_ACHIEVE_STATUS } = useDict(
// 'RESULT_ACHIEVE_STATUS',
// 'TASK_ACHIEVE_STATUS'
// );
const dialogVisible = computed({
get() {