feature/业务线管理
This commit is contained in:
parent
0f9d4e833c
commit
e2eb2f97a9
|
|
@ -5,8 +5,7 @@
|
||||||
* Date: 2023/9/14
|
* Date: 2023/9/14
|
||||||
*/
|
*/
|
||||||
import React, { FunctionComponent, useEffect, useState } from "react";
|
import React, { FunctionComponent, useEffect, useState } from "react";
|
||||||
import type { MenuProps } from "antd";
|
import { Button, Checkbox, Dropdown, MenuProps, Space, Table, Tooltip, Typography } from "antd";
|
||||||
import { Button, Dropdown, Space, Table, Tooltip, Typography } from "antd";
|
|
||||||
import { DeleteOutlined, LockOutlined, QuestionCircleOutlined, SettingOutlined, UnlockOutlined } from "@ant-design/icons";
|
import { DeleteOutlined, LockOutlined, QuestionCircleOutlined, SettingOutlined, UnlockOutlined } from "@ant-design/icons";
|
||||||
import CustomTableTitle from "@/pages/calcTable/customTableTitle";
|
import CustomTableTitle from "@/pages/calcTable/customTableTitle";
|
||||||
import CalcExplainFooter from "@/pages/calcTable/calcExplainFooter";
|
import CalcExplainFooter from "@/pages/calcTable/calcExplainFooter";
|
||||||
|
|
@ -124,7 +123,17 @@ const index: FunctionComponent<Props> = (props) => {
|
||||||
const convertColumns: any = (cols: any[]) => {
|
const convertColumns: any = (cols: any[]) => {
|
||||||
return _.map(cols, (item) => {
|
return _.map(cols, (item) => {
|
||||||
if (_.isNaN(parseInt(item.dataIndex))) {
|
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 {
|
} else {
|
||||||
return {
|
return {
|
||||||
...item,
|
...item,
|
||||||
|
|
@ -231,6 +240,19 @@ const index: FunctionComponent<Props> = (props) => {
|
||||||
const handleSetFeedback = (params: any) => {
|
const handleSetFeedback = (params: any) => {
|
||||||
window.parent.postMessage({ type: "turn", payload: { id: "SETFEEDBACK", params } }, "*");
|
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 sizeChange = (pageobj: IPage) => {};
|
||||||
const onChange = (pageobj: IPage) => {
|
const onChange = (pageobj: IPage) => {
|
||||||
setPageInfo(() => {
|
setPageInfo(() => {
|
||||||
|
|
@ -240,8 +262,8 @@ const index: FunctionComponent<Props> = (props) => {
|
||||||
};
|
};
|
||||||
const rowSelection = {
|
const rowSelection = {
|
||||||
columnWidth: 50,
|
columnWidth: 50,
|
||||||
columnTitle: isDetailTable && _.isNil(showSee) ? "序号" : "",
|
columnTitle: isDetailTable && !showSee ? "序号" : "",
|
||||||
renderCell: (value: boolean, record: any, index: number, originNode: React.ReactNode) => (isDetailTable && _.isNil(showSee) ? <span>{index + 1}</span> : originNode),
|
renderCell: (value: boolean, record: any, index: number, originNode: React.ReactNode) => (isDetailTable && !showSee ? <span>{index + 1}</span> : originNode),
|
||||||
selectedRowKeys,
|
selectedRowKeys,
|
||||||
preserveSelectedRowKeys: true,
|
preserveSelectedRowKeys: true,
|
||||||
onChange: (rowKeys: React.Key[]) => {
|
onChange: (rowKeys: React.Key[]) => {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue