!161 feat(supervision): 反馈表格按状态整行着色与台账统一
Merge pull request !161 from wsm/feature/feedback_info_style
This commit is contained in:
@@ -293,3 +293,14 @@ html[data-theme='dark'] {
|
||||
margin-inline: 0;
|
||||
}
|
||||
// update-end--author:wangshuai---date:20240611---for:【TV360X-1070】一对多内嵌,为什么多这一块,不从头对齐
|
||||
|
||||
/* 反馈表格整行按状态着色(与台账颜色统一:未开始黄/进行中红/已完成绿) */
|
||||
.feedback-status-row-warning td {
|
||||
background: #fffbe6 !important;
|
||||
}
|
||||
.feedback-status-row-error td {
|
||||
background: #fff1f0 !important;
|
||||
}
|
||||
.feedback-status-row-success td {
|
||||
background: #f6ffed !important;
|
||||
}
|
||||
|
||||
@@ -132,6 +132,7 @@
|
||||
:loading="getFeedbackTableLoading(record)"
|
||||
:pagination="false"
|
||||
:scroll="{ x: 1400 }"
|
||||
:rowClassName="feedbackStatusRowClassName"
|
||||
>
|
||||
<template #feedbackAttachments="{ record: feedbackRecord }">
|
||||
<SUploadFile
|
||||
@@ -207,6 +208,7 @@
|
||||
import SUploadFile from '/@/components/semri/fileComponent/SUploadFile.vue';
|
||||
import { columns, superQuerySchema, bgPartymatterFeedbackColumns } from './BgPartymatter.data';
|
||||
import { list, statusStats, deleteOne, batchDelete, getImportUrl, getExportXlsByEasyExcelUrl, getImportExcelByEasyExcelUrl, getCheckExcelByEasyExcelUrl, getExportXlsHeadersUrl, bgPartymatterFeedbackList, saveOrUpdate } from './BgPartymatter.api';
|
||||
import { feedbackStatusRowClassName } from '/@/views/bg/utils/feedbackStatusRender';
|
||||
import { defHttp } from '/@/utils/http/axios';
|
||||
import { showImportValidationErrors } from '/@/utils/helper/importError';
|
||||
import { useMessage } from '/@/hooks/web/useMessage';
|
||||
|
||||
@@ -206,6 +206,7 @@
|
||||
:data-source="feedbackList"
|
||||
:pagination="false"
|
||||
:scroll="{ x: feedbackTableScrollX }"
|
||||
:rowClassName="feedbackStatusRowClassName"
|
||||
>
|
||||
<template #bodyCell="{ column, record }">
|
||||
<template v-if="column.key === 'attachments'">
|
||||
@@ -293,6 +294,7 @@
|
||||
import JSelectDept from '/@/components/Form/src/jeecg/components/JSelectDept.vue';
|
||||
import Icon from '/@/components/Icon/index';
|
||||
import { bgPartymatterFeedbackDelete, bgPartymatterFeedbackList, saveBpmForm, setBpmVariableLocal } from '../BgPartymatter.api';
|
||||
import { feedbackStatusRowClassName } from '/@/views/bg/utils/feedbackStatusRender';
|
||||
import { usePermission } from '/@/hooks/web/usePermission';
|
||||
import TaskHandleInnerContent from '/@/views/super/bpm/process/personalOffice/myHandleTask/content/TaskHandleInnerContent.vue';
|
||||
import JDictSelectTag from '../../../../components/Form/src/jeecg/components/JDictSelectTag.vue';
|
||||
|
||||
@@ -108,6 +108,7 @@
|
||||
:pagination="false"
|
||||
:scroll="{ x: 1600 }"
|
||||
:loading="feedbackLoading"
|
||||
:rowClassName="feedbackStatusRowClassName"
|
||||
>
|
||||
<template #bodyCell="{ column, record: feedbackRecord }">
|
||||
<template v-if="column.key === 'attachments'">
|
||||
@@ -132,6 +133,7 @@
|
||||
import Icon from '/@/components/Icon/index';
|
||||
import SUploadFile from '/@/components/semri/fileComponent/SUploadFile.vue';
|
||||
import { bgPartymatterFeedbackList } from '../BgPartymatter.api';
|
||||
import { feedbackStatusRowClassName } from '/@/views/bg/utils/feedbackStatusRender';
|
||||
import { bgPartymatterFeedbackColumns } from '../BgPartymatter.data';
|
||||
import type { BasicColumn } from '/@/components/Table';
|
||||
import { countFeedbackStatus } from '/@/views/bg/utils/feedbackStatusCount';
|
||||
|
||||
@@ -166,6 +166,7 @@
|
||||
:loading="getFeedbackTableLoading(record)"
|
||||
:pagination="false"
|
||||
:scroll="{ x: 1780 }"
|
||||
:rowClassName="feedbackStatusRowClassName"
|
||||
>
|
||||
<template #feedbackAttachments="{ record: feedbackRecord }">
|
||||
<SUploadFile
|
||||
@@ -244,6 +245,7 @@
|
||||
import { showImportValidationErrors } from '/@/utils/helper/importError';
|
||||
import { useMessage } from '/@/hooks/web/useMessage';
|
||||
import { countFeedbackStatus } from '/@/views/bg/utils/feedbackStatusCount';
|
||||
import { feedbackStatusRowClassName } from '/@/views/bg/utils/feedbackStatusRender';
|
||||
import { useDebounceFn } from '@vueuse/core';
|
||||
import SzSelectDept from '/@/components/Form/src/jeecg/components/SzSelectDept.vue';
|
||||
import JInput from '/@/components/Form/src/jeecg/components/JInput.vue';
|
||||
|
||||
@@ -231,6 +231,7 @@
|
||||
:data-source="feedbackList"
|
||||
:pagination="false"
|
||||
:scroll="{ x: feedbackTableScrollX }"
|
||||
:rowClassName="feedbackStatusRowClassName"
|
||||
>
|
||||
<template #bodyCell="{ column, record }">
|
||||
<template v-if="column.key === 'attachments'">
|
||||
@@ -316,6 +317,7 @@
|
||||
import JSwitch from '/@/components/Form/src/jeecg/components/JSwitch.vue';
|
||||
import Icon from '/@/components/Icon/index';
|
||||
import { bgTakepulseFeedbackDelete, bgTakepulseFeedbackList, saveBpmForm, setBpmVariableLocal } from '../BgTakepulse.api';
|
||||
import { feedbackStatusRowClassName } from '/@/views/bg/utils/feedbackStatusRender';
|
||||
import { usePermission } from '/@/hooks/web/usePermission';
|
||||
import TaskHandleInnerContent from '/@/views/super/bpm/process/personalOffice/myHandleTask/content/TaskHandleInnerContent.vue';
|
||||
import BgTakepulseBPMFeedbackModal from './BgTakepulseBPMFeedbackModal.vue';
|
||||
|
||||
@@ -123,6 +123,7 @@
|
||||
:pagination="false"
|
||||
:scroll="{ x: 1800 }"
|
||||
:loading="feedbackLoading"
|
||||
:rowClassName="feedbackStatusRowClassName"
|
||||
>
|
||||
<template #bodyCell="{ column, record: feedbackRecord }">
|
||||
<template v-if="column.key === 'attachments'">
|
||||
@@ -149,6 +150,7 @@
|
||||
import { bgTakepulseFeedbackList } from '../BgTakepulse.api';
|
||||
import type { BasicColumn } from '/@/components/Table';
|
||||
import { countFeedbackStatus } from '/@/views/bg/utils/feedbackStatusCount';
|
||||
import { feedbackStatusRowClassName } from '/@/views/bg/utils/feedbackStatusRender';
|
||||
|
||||
const visible = ref(false);
|
||||
const title = ref('详情');
|
||||
|
||||
@@ -0,0 +1,37 @@
|
||||
/**
|
||||
* 反馈状态颜色工具:与台账颜色统一
|
||||
* 未开始 -> warning(黄) / 进行中·督办中·整改中 -> error(红) / 已完成 -> success(绿)
|
||||
*
|
||||
* 说明:反馈字典(feedback_status)的码值与台账字典(super_status)不一致
|
||||
* (反馈"已完成"码值为 '2',台账为 '3'),因此按显示的字典文本判定状态,
|
||||
* 不依赖状态码,避免码值差异导致颜色失效。
|
||||
*/
|
||||
|
||||
/** 根据字典文本返回状态颜色(warning/error/success) */
|
||||
export function feedbackStatusColorByText(text: string | number | undefined | null): string | undefined {
|
||||
const t = String(text ?? '');
|
||||
if (t.includes('未开始') || t.includes('未完成')) return 'warning';
|
||||
if (t.includes('进行中') || t.includes('督办中') || t.includes('整改中') || t.includes('处理中')) return 'error';
|
||||
if (t.includes('已完成') || t === '完成') return 'success';
|
||||
return undefined;
|
||||
}
|
||||
|
||||
/**
|
||||
* 反馈表格整行背景色 class(表格 :rowClassName 使用)
|
||||
* 自动兼容 bpmStatus / completionStatus 两套字段名,按字典文本判定状态。
|
||||
* 对应全局样式:feedback-status-row-warning/error/success(定义于 /@/design/index.less)
|
||||
*/
|
||||
export function feedbackStatusRowClassName(record: Recordable | undefined | null): string {
|
||||
const text = String(
|
||||
record?.['bpmStatus_dictText'] ??
|
||||
record?.['completionStatus_dictText'] ??
|
||||
record?.['bpmStatus'] ??
|
||||
record?.['completionStatus'] ??
|
||||
'',
|
||||
);
|
||||
const color = feedbackStatusColorByText(text);
|
||||
if (color === 'warning') return 'feedback-status-row-warning';
|
||||
if (color === 'error') return 'feedback-status-row-error';
|
||||
if (color === 'success') return 'feedback-status-row-success';
|
||||
return '';
|
||||
}
|
||||
@@ -205,6 +205,7 @@
|
||||
:data-source="feedbackList"
|
||||
:pagination="false"
|
||||
:scroll="{ x: 1980 }"
|
||||
:rowClassName="feedbackStatusRowClassName"
|
||||
>
|
||||
<template #bodyCell="{ column, record, index }">
|
||||
<template v-if="column.key === 'seq'">{{ index + 1 }}</template>
|
||||
@@ -286,6 +287,7 @@
|
||||
import JDictSelectTag from '/@/components/Form/src/jeecg/components/JDictSelectTag.vue';
|
||||
import Icon from '/@/components/Icon/index';
|
||||
import { bgXiSpeakFeedbackList, bgXiSpeakFeedbackDelete, saveBpmForm, saveSubApprove, getProcessVariable } from '../BgXiSpeak.api';
|
||||
import { feedbackStatusRowClassName } from '/@/views/bg/utils/feedbackStatusRender';
|
||||
import { useSubApproveUserResolver } from '/@/composables/useSubApproveUserResolver';
|
||||
import { usePermission } from '/@/hooks/web/usePermission';
|
||||
import TaskHandleInnerContent from '/@/views/super/bpm/process/personalOffice/myHandleTask/content/TaskHandleInnerContent.vue';
|
||||
|
||||
@@ -80,6 +80,7 @@
|
||||
:pagination="false"
|
||||
:scroll="{ x: 1500 }"
|
||||
:loading="feedbackLoading"
|
||||
:rowClassName="feedbackStatusRowClassName"
|
||||
>
|
||||
<template #bodyCell="{ column, record: fb }">
|
||||
<template v-if="column.key === 'action'">
|
||||
@@ -109,6 +110,7 @@
|
||||
import SUploadFile from '/@/components/semri/fileComponent/SUploadFile.vue';
|
||||
import BgXiSpeakFeedbackDetailModal from './BgXiSpeakFeedbackDetailModal.vue';
|
||||
import { bgXiSpeakFeedbackList } from '../BgXiSpeak.api';
|
||||
import { feedbackStatusRowClassName } from '/@/views/bg/utils/feedbackStatusRender';
|
||||
import type { BasicColumn } from '/@/components/Table';
|
||||
|
||||
const visible = ref(false);
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
:columns="columns"
|
||||
:dataSource="feedbackTableData"
|
||||
:loading="loading"
|
||||
:rowClassName="feedbackStatusRowClassName"
|
||||
:pagination="false"
|
||||
:bordered="false"
|
||||
>
|
||||
@@ -50,6 +51,7 @@
|
||||
import SUploadFile from '/@/components/semri/fileComponent/SUploadFile.vue';
|
||||
import BgXiSpeakFeedbackDetailModal from './BgXiSpeakFeedbackDetailModal.vue';
|
||||
import { bgXiSpeakFeedbackList } from '../BgXiSpeak.api';
|
||||
import { feedbackStatusRowClassName } from '/@/views/bg/utils/feedbackStatusRender';
|
||||
|
||||
const visible = ref(false);
|
||||
const loading = ref(false);
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
:dataSource="feedbackTableData"
|
||||
:loading="loading"
|
||||
:pagination="false"
|
||||
:rowClassName="feedbackStatusRowClassName"
|
||||
:bordered="false"
|
||||
>
|
||||
<template #bodyCell="{ column, record }">
|
||||
@@ -44,6 +45,7 @@
|
||||
import JModal from '/@/components/Modal/src/JModal/JModal.vue';
|
||||
import SUploadFile from '/@/components/semri/fileComponent/SUploadFile.vue';
|
||||
import { list } from '../DqInspectProgress.api';
|
||||
import { feedbackStatusRowClassName } from '/@/views/bg/utils/feedbackStatusRender';
|
||||
|
||||
const visible = ref(false);
|
||||
const loading = ref(false);
|
||||
|
||||
@@ -175,6 +175,7 @@
|
||||
:data-source="feedbackList"
|
||||
:pagination="false"
|
||||
:scroll="{ x: 1200 }"
|
||||
:rowClassName="feedbackStatusRowClassName"
|
||||
>
|
||||
<template #bodyCell="{ column, record, index }">
|
||||
<template v-if="column.key === 'seq'">{{ index + 1 }}</template>
|
||||
@@ -269,6 +270,7 @@
|
||||
import Icon from '/@/components/Icon/index';
|
||||
import { saveBpmForm, setProcessVariable, specificProblemOptions } from '../DqInspectTask.api';
|
||||
import { list as progressList, deleteOne as progressDelete } from '../../inspectProgress/DqInspectProgress.api';
|
||||
import { feedbackStatusRowClassName } from '/@/views/bg/utils/feedbackStatusRender';
|
||||
import { usePermission } from '/@/hooks/web/usePermission';
|
||||
import { CHARGE_LEADER_ROLE_ID } from '/@/constant/supervision';
|
||||
import { useSelectNameResolver } from '/@/composables/useSelectNameResolver';
|
||||
|
||||
@@ -85,6 +85,7 @@
|
||||
:pagination="false"
|
||||
:scroll="{ x: 1200 }"
|
||||
:loading="feedbackLoading"
|
||||
:rowClassName="feedbackStatusRowClassName"
|
||||
>
|
||||
<template #bodyCell="{ column, record: fb }">
|
||||
<template v-if="column.key === 'attachments'">
|
||||
@@ -109,6 +110,7 @@
|
||||
import Icon from '/@/components/Icon/index';
|
||||
import SUploadFile from '/@/components/semri/fileComponent/SUploadFile.vue';
|
||||
import { list } from '../../inspectProgress/DqInspectProgress.api';
|
||||
import { feedbackStatusRowClassName } from '/@/views/bg/utils/feedbackStatusRender';
|
||||
import type { BasicColumn } from '/@/components/Table';
|
||||
|
||||
const visible = ref(false);
|
||||
|
||||
Reference in New Issue
Block a user