From b62f972e187c86cbd72f0d7f84784ff9fa2709c1 Mon Sep 17 00:00:00 2001
From: yunkexin <760754045@qq.com>
Date: Tue, 27 Jan 2026 17:04:24 +0800
Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=BE=85=E5=8A=9E=E5=BC=B9?=
=?UTF-8?q?=E7=AA=97?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../CustomPages/BI/BI064FormRunAnalysis.js | 147 +++++++++++++++++-
1 file changed, 145 insertions(+), 2 deletions(-)
diff --git a/src/components/CustomPages/BI/BI064FormRunAnalysis.js b/src/components/CustomPages/BI/BI064FormRunAnalysis.js
index 3a41aa1..d73da14 100644
--- a/src/components/CustomPages/BI/BI064FormRunAnalysis.js
+++ b/src/components/CustomPages/BI/BI064FormRunAnalysis.js
@@ -1,7 +1,7 @@
import React from 'react';
import { connect } from 'dva';
import { initFilter } from '../../../utils/common';
-import { Table, Row, Spin, Card } from 'antd';
+import { Table, Row, Spin, Card, Modal } from 'antd';
class BI064FormRunAnalysis extends React.Component {
constructor(props) {
@@ -12,6 +12,55 @@ class BI064FormRunAnalysis extends React.Component {
loading: true,
tableData: [], // 处理后的表格数据
columns: [], // 动态生成的列
+ scoreVisible: false,
+ scoreTitle: '',
+ standardScoreTemp: [],
+ scoreColumns: [
+ // {
+ // title: '序号',
+ // render: (text, record, index) => `${index + 1}`
+ // },
+ {
+ title: '待办名称',
+ dataIndex: 'NOTICE_TITLE',
+ },
+ {
+ title: '姓名',
+ dataIndex: 'USER_NAME',
+ },
+ {
+ title: '开始时间',
+ dataIndex: 'TASK_STARTDT',
+ },
+ {
+ title: '结束时间',
+ dataIndex: 'TASK_ENDDT',
+ },
+ {
+ title: '实际处理时间',
+ dataIndex: 'TASK_DT',
+ },
+ {
+ title: '处理状态',
+ dataIndex: 'NOTICE_STATUS',
+ render: (text, record) => {
+ const currentTime = new Date();
+ const endTime = new Date(record.TASK_ENDDT);
+
+ if (text == 1) {
+ return '正常完成';
+ } else if (text == 2) {
+ return '超时完成';
+ } else if (text == 0 && endTime >= currentTime) {
+ return '进行中';
+ } else if (text == 0 && endTime < currentTime) {
+ return '超期未完成';
+ } else {
+ return '未知状态';
+ }
+ },
+ },
+ ],
};
}
@@ -123,7 +172,7 @@ class BI064FormRunAnalysis extends React.Component {
// 100
// ).toFixed(0)
// : '0';
-
+ rowData[`${companyDataKey}_details`] = formData.details || []; // 假设返回数据中有details字段
rowData[`${companyDataKey}_total`] = formData.TOTAL_QTY;
rowData[`${companyDataKey}_normal`] = formData.NORMAL_FINISH;
rowData[`${companyDataKey}_overtime`] = formData.OVER_FINISH;
@@ -134,6 +183,8 @@ class BI064FormRunAnalysis extends React.Component {
rowData[`${companyDataKey}_normalRate`] = formData.NORMAL_RATE;
} else {
// 如果没有数据,设置默认值
+ // 如果没有数据,设置默认值
+ rowData[`${companyDataKey}_details`] = [];
rowData[`${companyDataKey}_total`] = 0;
rowData[`${companyDataKey}_normal`] = 0;
rowData[`${companyDataKey}_overtime`] = 0;
@@ -244,6 +295,11 @@ class BI064FormRunAnalysis extends React.Component {
key: `${companyDataKey}_total`,
width: '80px',
align: 'center',
+ render: (text, record) => (
+
+ this.showDetail(record, 1, companyName)}>{record[`${companyDataKey}_total`]}
+
+ ),
},
{
title: '正常完成',
@@ -251,6 +307,11 @@ class BI064FormRunAnalysis extends React.Component {
key: `${companyDataKey}_normal`,
width: '80px',
align: 'center',
+ render: (text, record) => (
+
+ this.showDetail(record, 2, companyName)}>{record[`${companyDataKey}_normal`]}
+
+ ),
},
{
title: '超时完成',
@@ -258,6 +319,11 @@ class BI064FormRunAnalysis extends React.Component {
key: `${companyDataKey}_overtime`,
width: '80px',
align: 'center',
+ render: (text, record) => (
+
+ this.showDetail(record, 3, companyName)}>{record[`${companyDataKey}_overtime`]}
+
+ ),
},
{
title: '进行中',
@@ -265,6 +331,11 @@ class BI064FormRunAnalysis extends React.Component {
key: `${companyDataKey}_doing`,
width: '80px',
align: 'center',
+ render: (text, record) => (
+
+ this.showDetail(record, 4, companyName)}>{record[`${companyDataKey}_doing`]}
+
+ ),
},
{
title: '超期未完成',
@@ -272,6 +343,13 @@ class BI064FormRunAnalysis extends React.Component {
key: `${companyDataKey}_overUnfinish`,
width: '80px',
align: 'center',
+ render: (text, record) => (
+
+ this.showDetail(record, 5, companyName)}>
+ {record[`${companyDataKey}_overUnfinish`]}
+
+
+ ),
},
{
title: '完成率',
@@ -297,6 +375,54 @@ class BI064FormRunAnalysis extends React.Component {
return baseColumns;
};
+ showDetail = (record, type, companyName) => {
+ const currentTime = new Date();
+ const companyDataKey = companyName.replace(/\s+/g, '');
+
+ // 从record中获取该公司的明细数据
+ const details = record[`${companyDataKey}_details`] || [];
+
+ let filteredDetails = [];
+ switch (type) {
+ case 1: // 总任务数
+ filteredDetails = details;
+ break;
+ case 2: // 正常完成
+ filteredDetails = details.filter((item) => item.NOTICE_STATUS == 1);
+ break;
+ case 3: // 超时完成
+ filteredDetails = details.filter((item) => item.NOTICE_STATUS == 2);
+ break;
+ case 4: // 进行中
+ filteredDetails = details.filter((item) => item.NOTICE_STATUS == 0 && new Date(item.TASK_ENDDT) >= currentTime);
+ break;
+ case 5: // 超期未完成
+ filteredDetails = details.filter((item) => item.NOTICE_STATUS == 0 && new Date(item.TASK_ENDDT) < currentTime);
+ break;
+ default:
+ filteredDetails = details;
+ }
+
+ const typeTitles = {
+ 1: '总任务数',
+ 2: '正常完成',
+ 3: '超时完成',
+ 4: '进行中',
+ 5: '超期未完成',
+ };
+
+ this.setState({
+ standardScoreTemp: filteredDetails,
+ scoreVisible: true,
+ scoreTitle: `${companyName} - ${record.module} - ${record.form} 的${typeTitles[type]}明细`,
+ });
+ };
+ clearScoreData = () => {
+ this.setState({
+ scoreVisible: false,
+ // standardScore: [],//newtmpData
+ });
+ };
render() {
const { tableData, columns, loading } = this.state;
@@ -315,6 +441,23 @@ class BI064FormRunAnalysis extends React.Component {
padding: '20px',
}}
>
+
+