!87 czh-20260707-增加完成状态行显示颜色
* czh-20260707-增加完成状态行显示颜色 * czh-20260707-所务、党委、把把脉反馈信息增加具体类别个数
This commit is contained in:
@@ -46,7 +46,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="content">
|
<div class="content">
|
||||||
<!--引用表格-->
|
<!--引用表格-->
|
||||||
<BasicTable @register="registerTable" :rowSelection="rowSelection" :expandedRowKeys="expandedRowKeys" @expand="handleExpand">
|
<BasicTable @register="registerTable" :rowSelection="rowSelection" :expandedRowKeys="expandedRowKeys" @expand="handleExpand" :rowClassName="(r) => r.bpmStatus ? 'status-row-' + r.bpmStatus : ''">
|
||||||
<!--插槽:table标题-->
|
<!--插槽:table标题-->
|
||||||
<template #tableTitle>
|
<template #tableTitle>
|
||||||
<a-button type="primary" v-auth="actionAuth.add" @click="handleAdd" preIcon="ant-design:plus-outlined"> 新增</a-button>
|
<a-button type="primary" v-auth="actionAuth.add" @click="handleAdd" preIcon="ant-design:plus-outlined"> 新增</a-button>
|
||||||
@@ -92,9 +92,15 @@
|
|||||||
<Icon icon="ant-design:message-outlined" />
|
<Icon icon="ant-design:message-outlined" />
|
||||||
</span>
|
</span>
|
||||||
<span>办理情况</span>
|
<span>办理情况</span>
|
||||||
<a-tag class="feedback-expand-count" color="processing">
|
<template v-if="getFeedbackTableLoading(record)">
|
||||||
{{ getFeedbackTableLoading(record) ? '加载中' : `${getFeedbackCount(record)} 条` }}
|
<a-tag class="feedback-expand-count" color="processing">加载中</a-tag>
|
||||||
</a-tag>
|
</template>
|
||||||
|
<template v-else>
|
||||||
|
<a-tag class="feedback-expand-count" color="warning">未开始 {{ getFeedbackStatusCount(record).notStarted }}</a-tag>
|
||||||
|
<a-tag class="feedback-expand-count" color="error">进行中 {{ getFeedbackStatusCount(record).inProgress }}</a-tag>
|
||||||
|
<a-tag class="feedback-expand-count" color="success">已完成 {{ getFeedbackStatusCount(record).completed }}</a-tag>
|
||||||
|
<a-tag class="feedback-expand-count">(共 {{ getFeedbackStatusCount(record).total }} 条)</a-tag>
|
||||||
|
</template>
|
||||||
</div>
|
</div>
|
||||||
<div class="feedback-expand-desc">当前事项的责任部门办理情况记录</div>
|
<div class="feedback-expand-desc">当前事项的责任部门办理情况记录</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -158,6 +164,7 @@
|
|||||||
import { defHttp } from '/@/utils/http/axios';
|
import { defHttp } from '/@/utils/http/axios';
|
||||||
import { showImportValidationErrors } from '/@/utils/helper/importError';
|
import { showImportValidationErrors } from '/@/utils/helper/importError';
|
||||||
import { useMessage } from '/@/hooks/web/useMessage';
|
import { useMessage } from '/@/hooks/web/useMessage';
|
||||||
|
import { countFeedbackStatus } from '/@/views/bg/utils/feedbackStatusCount';
|
||||||
|
|
||||||
const props = withDefaults(
|
const props = withDefaults(
|
||||||
defineProps<{
|
defineProps<{
|
||||||
@@ -319,6 +326,10 @@
|
|||||||
return !!feedbackTableLoading[getFeedbackKey(record)];
|
return !!feedbackTableLoading[getFeedbackKey(record)];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function getFeedbackStatusCount(record: Recordable) {
|
||||||
|
return countFeedbackStatus(getFeedbackTableData(record), 'bpmStatus');
|
||||||
|
}
|
||||||
|
|
||||||
function clearFeedbackTableData() {
|
function clearFeedbackTableData() {
|
||||||
Object.keys(feedbackTableData).forEach((key) => {
|
Object.keys(feedbackTableData).forEach((key) => {
|
||||||
delete feedbackTableData[key];
|
delete feedbackTableData[key];
|
||||||
@@ -863,3 +874,15 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
|
<style lang="less">
|
||||||
|
.status-row-1 td {
|
||||||
|
background: #fffbe6 !important;
|
||||||
|
}
|
||||||
|
.status-row-2 td {
|
||||||
|
background: #fff1f0 !important;
|
||||||
|
}
|
||||||
|
.status-row-3 td {
|
||||||
|
background: #f6ffed !important;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|||||||
@@ -52,7 +52,7 @@
|
|||||||
</a-form>
|
</a-form>
|
||||||
</div>
|
</div>
|
||||||
<!--引用表格-->
|
<!--引用表格-->
|
||||||
<BasicTable @register="registerTable" :rowSelection="rowSelection" :expandedRowKeys="expandedRowKeys" @expand="handleExpand">
|
<BasicTable @register="registerTable" :rowSelection="rowSelection" :expandedRowKeys="expandedRowKeys" @expand="handleExpand" :rowClassName="(r) => r.bpmStatus ? 'status-row-' + r.bpmStatus : ''">
|
||||||
<!--插槽:table标题-->
|
<!--插槽:table标题-->
|
||||||
<template #tableTitle>
|
<template #tableTitle>
|
||||||
<a-button type="primary" v-auth="'bqtakepulse:bg_takepulse:add'" @click="handleAdd" preIcon="ant-design:plus-outlined"> 新增</a-button>
|
<a-button type="primary" v-auth="'bqtakepulse:bg_takepulse:add'" @click="handleAdd" preIcon="ant-design:plus-outlined"> 新增</a-button>
|
||||||
@@ -92,9 +92,15 @@
|
|||||||
<Icon icon="ant-design:message-outlined" />
|
<Icon icon="ant-design:message-outlined" />
|
||||||
</span>
|
</span>
|
||||||
<span>办理情况</span>
|
<span>办理情况</span>
|
||||||
<a-tag class="feedback-expand-count" color="processing">
|
<template v-if="getFeedbackTableLoading(record)">
|
||||||
{{ getFeedbackTableLoading(record) ? '加载中' : `${getFeedbackCount(record)} 条` }}
|
<a-tag class="feedback-expand-count" color="processing">加载中</a-tag>
|
||||||
</a-tag>
|
</template>
|
||||||
|
<template v-else>
|
||||||
|
<a-tag class="feedback-expand-count" color="warning">未开始 {{ getFeedbackStatusCount(record).notStarted }}</a-tag>
|
||||||
|
<a-tag class="feedback-expand-count" color="error">进行中 {{ getFeedbackStatusCount(record).inProgress }}</a-tag>
|
||||||
|
<a-tag class="feedback-expand-count" color="success">已完成 {{ getFeedbackStatusCount(record).completed }}</a-tag>
|
||||||
|
<a-tag class="feedback-expand-count">(共 {{ getFeedbackStatusCount(record).total }} 条)</a-tag>
|
||||||
|
</template>
|
||||||
</div>
|
</div>
|
||||||
<div class="feedback-expand-desc">当前事项的执行情况办理情况记录</div>
|
<div class="feedback-expand-desc">当前事项的执行情况办理情况记录</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -149,6 +155,7 @@
|
|||||||
import { defHttp } from '/@/utils/http/axios';
|
import { defHttp } from '/@/utils/http/axios';
|
||||||
import { showImportValidationErrors } from '/@/utils/helper/importError';
|
import { showImportValidationErrors } from '/@/utils/helper/importError';
|
||||||
import { useMessage } from '/@/hooks/web/useMessage';
|
import { useMessage } from '/@/hooks/web/useMessage';
|
||||||
|
import { countFeedbackStatus } from '/@/views/bg/utils/feedbackStatusCount';
|
||||||
import JSelectMultiple from '/@/components/Form/src/jeecg/components/JSelectMultiple.vue';
|
import JSelectMultiple from '/@/components/Form/src/jeecg/components/JSelectMultiple.vue';
|
||||||
import SzSelectDept from '/@/components/Form/src/jeecg/components/SzSelectDept.vue';
|
import SzSelectDept from '/@/components/Form/src/jeecg/components/SzSelectDept.vue';
|
||||||
import Icon from '/@/components/Icon/index';
|
import Icon from '/@/components/Icon/index';
|
||||||
@@ -267,6 +274,10 @@
|
|||||||
return !!feedbackTableLoading[getFeedbackKey(record)];
|
return !!feedbackTableLoading[getFeedbackKey(record)];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function getFeedbackStatusCount(record: Recordable) {
|
||||||
|
return countFeedbackStatus(getFeedbackTableData(record), 'bpmStatus');
|
||||||
|
}
|
||||||
|
|
||||||
function clearFeedbackTableData() {
|
function clearFeedbackTableData() {
|
||||||
Object.keys(feedbackTableData).forEach((key) => {
|
Object.keys(feedbackTableData).forEach((key) => {
|
||||||
delete feedbackTableData[key];
|
delete feedbackTableData[key];
|
||||||
@@ -796,3 +807,15 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
|
<style lang="less">
|
||||||
|
.status-row-1 td {
|
||||||
|
background: #fffbe6 !important;
|
||||||
|
}
|
||||||
|
.status-row-2 td {
|
||||||
|
background: #fff1f0 !important;
|
||||||
|
}
|
||||||
|
.status-row-3 td {
|
||||||
|
background: #f6ffed !important;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|||||||
@@ -0,0 +1,22 @@
|
|||||||
|
export interface FeedbackStatusCount {
|
||||||
|
notStarted: number;
|
||||||
|
inProgress: number;
|
||||||
|
completed: number;
|
||||||
|
total: number;
|
||||||
|
}
|
||||||
|
|
||||||
|
export function countFeedbackStatus(
|
||||||
|
list: Recordable[] | undefined | null,
|
||||||
|
statusField: string,
|
||||||
|
): FeedbackStatusCount {
|
||||||
|
const result: FeedbackStatusCount = { notStarted: 0, inProgress: 0, completed: 0, total: 0 };
|
||||||
|
if (!Array.isArray(list)) return result;
|
||||||
|
result.total = list.length;
|
||||||
|
for (const item of list) {
|
||||||
|
const v = String(item?.[statusField] ?? '');
|
||||||
|
if (v === '1') result.notStarted++;
|
||||||
|
else if (v === '2') result.inProgress++;
|
||||||
|
else if (v === '3') result.completed++;
|
||||||
|
}
|
||||||
|
return result;
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user