feature/业务线管理

This commit is contained in:
lys 2025-06-19 09:10:07 +08:00
parent 0f9d4e833c
commit e2eb2f97a9
1 changed files with 27 additions and 5 deletions

View File

@ -5,8 +5,7 @@
* Date: 2023/9/14
*/
import React, { FunctionComponent, useEffect, useState } from "react";
import type { MenuProps } from "antd";
import { Button, Dropdown, Space, Table, Tooltip, Typography } from "antd";
import { Button, Checkbox, Dropdown, MenuProps, Space, Table, Tooltip, Typography } from "antd";
import { DeleteOutlined, LockOutlined, QuestionCircleOutlined, SettingOutlined, UnlockOutlined } from "@ant-design/icons";
import CustomTableTitle from "@/pages/calcTable/customTableTitle";
import CalcExplainFooter from "@/pages/calcTable/calcExplainFooter";
@ -124,7 +123,17 @@ const index: FunctionComponent<Props> = (props) => {
const convertColumns: any = (cols: any[]) => {
return _.map(cols, (item) => {
if (_.isNaN(parseInt(item.dataIndex))) {
return { ...item };
// 医博肛肠二开
if (item.dataIndex === "ybgc-custom") {
return {
...item,
render: (text: string, record: any) => {
return <Checkbox checked={record?.calculateStatus === "1"} onChange={(e) => handlePassed(record, e.target.checked)} />;
}
};
} else {
return { ...item };
}
} else {
return {
...item,
@ -231,6 +240,19 @@ const index: FunctionComponent<Props> = (props) => {
const handleSetFeedback = (params: any) => {
window.parent.postMessage({ type: "turn", payload: { id: "SETFEEDBACK", params } }, "*");
};
// 医博二开
const handlePassed = (params: any, calculateStatus: boolean) => {
setDataSource((pre) => {
pre = _.map(pre, (o) => {
if (o.id === params.id) {
return { ...o, calculateStatus: calculateStatus ? "1" : "0" };
}
return o;
});
return pre;
});
window.parent.postMessage({ type: "turn", payload: { id: "CUSTPASSED", params: { ...params, calculateStatus: calculateStatus ? "1" : "0" } } }, "*");
};
const sizeChange = (pageobj: IPage) => {};
const onChange = (pageobj: IPage) => {
setPageInfo(() => {
@ -240,8 +262,8 @@ const index: FunctionComponent<Props> = (props) => {
};
const rowSelection = {
columnWidth: 50,
columnTitle: isDetailTable && _.isNil(showSee) ? "序号" : "",
renderCell: (value: boolean, record: any, index: number, originNode: React.ReactNode) => (isDetailTable && _.isNil(showSee) ? <span>{index + 1}</span> : originNode),
columnTitle: isDetailTable && !showSee ? "序号" : "",
renderCell: (value: boolean, record: any, index: number, originNode: React.ReactNode) => (isDetailTable && !showSee ? <span>{index + 1}</span> : originNode),
selectedRowKeys,
preserveSelectedRowKeys: true,
onChange: (rowKeys: React.Key[]) => {