Merge branch 'master' into feature/2.9.42310.01-薪资项目拓扑图

release/2.19.1.2503.01-业务线个税
黎永顺 9 months ago
commit 004bba38a8

@ -13,6 +13,7 @@ import UserLayout from "./UserLayout";
import { IRouterProps, RouterContext } from "./RouterContext"; import { IRouterProps, RouterContext } from "./RouterContext";
import { layoutConfig } from "@/layouts/config"; import { layoutConfig } from "@/layouts/config";
import stores from "@/store"; import stores from "@/store";
import { Storage } from "@/utils";
import "moment/locale/zh-cn"; import "moment/locale/zh-cn";
import "antd/dist/antd.variable.min.css"; import "antd/dist/antd.variable.min.css";
@ -38,6 +39,16 @@ const Layout = ({ children, location, route, history, match }: IRouteComponentPr
useEffect(() => { useEffect(() => {
// API.SettingService.initSystemParam(); // API.SettingService.initSystemParam();
const { themeFontSize } = Storage.local.get("theme-themeInfo") || { themeFontSize: "12" };
document.documentElement.style.setProperty("--data-size", themeFontSize + "px");
const checkData = () => {
const { themeFontSize } = Storage.local.get("theme-themeInfo") || { themeFontSize: "12" };
document.documentElement.style.setProperty("--data-size", themeFontSize + "px");
};
window.addEventListener("storage", checkData);
return () => {
window.removeEventListener("storage", checkData);
};
}, []); }, []);
let layout; let layout;

@ -97,7 +97,7 @@
} }
.danger { .danger {
font-size: 12px; font-size: var(--data-size);
color: rgb(217, 0, 27) color: rgb(217, 0, 27)
} }
@ -157,11 +157,11 @@
align-items: center; align-items: center;
margin-right: 12px; margin-right: 12px;
color: #5d9cec; color: #5d9cec;
font-size: 12px; font-size: var(--data-size);
:global { :global {
.anticon { .anticon {
font-size: 12px; font-size: var(--data-size);
margin-right: 4px; margin-right: 4px;
} }
} }
@ -193,7 +193,7 @@
.ant-btn-link, .ant-dropdown-trigger { .ant-btn-link, .ant-dropdown-trigger {
padding: 0; padding: 0;
font-size: 12px; font-size: var(--data-size);
color: #333; color: #333;
} }
@ -216,7 +216,7 @@
.ant-spin-container { .ant-spin-container {
.ant-pagination { .ant-pagination {
font-size: 12px; font-size: var(--data-size);
align-items: center; align-items: center;
margin-right: 8px; margin-right: 8px;
@ -242,7 +242,7 @@
.ant-pagination-options { .ant-pagination-options {
.ant-select { .ant-select {
font-size: 12px; font-size: var(--data-size);
.ant-select-selector { .ant-select-selector {
height: 28px; height: 28px;
@ -259,7 +259,7 @@
} }
.ant-select-item { .ant-select-item {
font-size: 12px; font-size: var(--data-size);
} }
} }
@ -281,7 +281,7 @@
} }
th, td { th, td {
font-size: 12px; font-size: var(--data-size);
.ant-form-item { .ant-form-item {
margin-bottom: 0; margin-bottom: 0;
@ -294,7 +294,29 @@
.ant-typography { .ant-typography {
margin-bottom: 0 !important; margin-bottom: 0 !important;
font-size: 12px !important; font-size: var(--data-size) !important;
}
.ant-checkbox-inner {
width: 14px;
height: 14px;
}
.ant-table-header {
.ant-checkbox-checked {
.ant-checkbox-inner:after {
width: 5px !important;
}
}
.ant-checkbox-inner:after {
width: 8px !important;
}
}
.ant-checkbox-inner:after {
width: 5px;
height: 8px;
} }
} }
} }
@ -302,7 +324,7 @@
.moreIconWrapper { .moreIconWrapper {
:global { :global {
.ant-btn-link { .ant-btn-link {
font-size: 12px; font-size: var(--data-size);
color: #333; color: #333;
} }
@ -316,7 +338,7 @@
.ant-dropdown-menu-title-content { .ant-dropdown-menu-title-content {
a { a {
font-size: 12px; font-size: var(--data-size);
color: #333; color: #333;
} }
@ -345,7 +367,7 @@
} }
.ant-dropdown-menu-item { .ant-dropdown-menu-item {
font-size: 12px; font-size: var(--data-size);
color: #333; color: #333;
} }

@ -49,7 +49,7 @@ const index: FunctionComponent<Props> = (props) => {
const data: any = exceptStr(event.data); const data: any = exceptStr(event.data);
if (!_.isEmpty(data)) { if (!_.isEmpty(data)) {
const { const {
columns, dataSource, pageInfo, selectedRowKeys, i18n: i18nRes = {}, columns, dataSource, pageInfo, selectedRowKeys: rowKeys, i18n: i18nRes = {},
showTotalCell = false, sumRowlistUrl = "", payload = {}, calcDetail, showTotalCell = false, sumRowlistUrl = "", payload = {}, calcDetail,
fixed = true, tableScrollHeight, sumRow, optWidth fixed = true, tableScrollHeight, sumRow, optWidth
} = data; } = data;
@ -62,7 +62,7 @@ const index: FunctionComponent<Props> = (props) => {
setSumRow(sumRow); setSumRow(sumRow);
setPageInfo(pageInfo); setPageInfo(pageInfo);
setDataSource(dataSource); setDataSource(dataSource);
setSelectedRowKeys(selectedRowKeys); setSelectedRowKeys([...selectedRowKeys, ...rowKeys]);
setTableScrollHeight(tableScrollHeight); setTableScrollHeight(tableScrollHeight);
setColumns([...convertColumns(_.map(columns, o => ({ ...o, i18n: i18nRes }))), { setColumns([...convertColumns(_.map(columns, o => ({ ...o, i18n: i18nRes }))), {
title: i18nRes["操作"], dataIndex: "operate", fixed: "right", width: optWidth || 120, title: i18nRes["操作"], dataIndex: "operate", fixed: "right", width: optWidth || 120,
@ -156,14 +156,11 @@ const index: FunctionComponent<Props> = (props) => {
columnWidth: 60, columnTitle: (isDetailTable && !showTotalCell) ? "序号" : "", columnWidth: 60, columnTitle: (isDetailTable && !showTotalCell) ? "序号" : "",
renderCell: (value: boolean, record: any, index: number, originNode: React.ReactNode) => ((isDetailTable && !showTotalCell) ? renderCell: (value: boolean, record: any, index: number, originNode: React.ReactNode) => ((isDetailTable && !showTotalCell) ?
<span>{index + 1}</span> : originNode), <span>{index + 1}</span> : originNode),
selectedRowKeys: selectedRowKeys, selectedRowKeys, preserveSelectedRowKeys: true,
onChange: (selectedRowKeys: React.Key[]) => { onChange: (rowKeys: React.Key[]) => {
setSelectedRowKeys(selectedRowKeys); setSelectedRowKeys(rowKeys);
window.parent.postMessage( window.parent.postMessage(
{ { type: "turn", payload: { id: "CHECKBOX", params: { selectedRowKeys: rowKeys } } },
type: "turn",
payload: { id: "CHECKBOX", params: { selectedRowKeys } }
},
"*" "*"
); );
} }

@ -14,7 +14,7 @@
.ant-spin-container { .ant-spin-container {
.ant-pagination { .ant-pagination {
font-size: 12px; font-size: var(--data-size);
align-items: center; align-items: center;
margin-right: 8px; margin-right: 8px;
@ -40,7 +40,7 @@
.ant-pagination-options { .ant-pagination-options {
.ant-select { .ant-select {
font-size: 12px; font-size: var(--data-size);
.ant-select-selector { .ant-select-selector {
height: 28px; height: 28px;
@ -57,7 +57,7 @@
} }
.ant-select-item { .ant-select-item {
font-size: 12px; font-size: var(--data-size);
} }
} }
@ -79,7 +79,7 @@
} }
th, td { th, td {
font-size: 12px; font-size: var(--data-size);
.ant-form-item { .ant-form-item {
margin-bottom: 0; margin-bottom: 0;

@ -18,7 +18,7 @@
color: rgb(204, 204, 204); color: rgb(204, 204, 204);
text-align: center; text-align: center;
margin-top: 16px; margin-top: 16px;
font-size: 12px; font-size: var(--data-size);
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
} }

@ -40,7 +40,7 @@ const Index: FunctionComponent<Props> = (props) => {
const data: any = exceptStr(event.data); const data: any = exceptStr(event.data);
if (!_.isEmpty(data)) { if (!_.isEmpty(data)) {
const { const {
columns, dataSource, pageInfo, selectedRowKeys, i18n: i18nRes = {}, columns, dataSource, pageInfo, selectedRowKeys: rowKeys, i18n: i18nRes = {},
selectedKey, showOperateBtn, showDelSalaryFileBtn, DCChiefPermission selectedKey, showOperateBtn, showDelSalaryFileBtn, DCChiefPermission
} = data; } = data;
setShowOperateBtn(showOperateBtn); setShowOperateBtn(showOperateBtn);
@ -48,7 +48,7 @@ const Index: FunctionComponent<Props> = (props) => {
setI18n(i18nRes); setI18n(i18nRes);
setPageInfo(pageInfo); setPageInfo(pageInfo);
setDataSource(dataSource); setDataSource(dataSource);
setSelectedRowKeys(selectedRowKeys); setSelectedRowKeys([...rowKeys, ...selectedRowKeys]);
setColumns(columns); setColumns(columns);
setShowDelSalaryFileBtn(showDelSalaryFileBtn); setShowDelSalaryFileBtn(showDelSalaryFileBtn);
setDCChiefPermission(DCChiefPermission); setDCChiefPermission(DCChiefPermission);
@ -68,15 +68,12 @@ const Index: FunctionComponent<Props> = (props) => {
}); });
}; };
const rowSelection = { const rowSelection = {
columnWidth: 60, columnWidth: 60, selectedRowKeys,
selectedRowKeys: selectedRowKeys, preserveSelectedRowKeys: true,
onChange: (selectedRowKeys: React.Key[]) => { onChange: (rowKeys: React.Key[]) => {
setSelectedRowKeys(selectedRowKeys); setSelectedRowKeys(rowKeys);
window.parent.postMessage( window.parent.postMessage(
{ { type: "turn", payload: { id: "ROWSELECTION", params: { selectedRowKeys: rowKeys } } },
type: "turn",
payload: { id: "ROWSELECTION", params: { selectedRowKeys } }
},
"*" "*"
); );
} }

@ -8,7 +8,7 @@
.ant-btn-link, .ant-dropdown-trigger { .ant-btn-link, .ant-dropdown-trigger {
padding: 0; padding: 0;
font-size: 12px; font-size: var(--data-size);
color: #333; color: #333;
} }
@ -31,7 +31,7 @@
.ant-spin-container { .ant-spin-container {
.ant-pagination { .ant-pagination {
font-size: 12px; font-size: var(--data-size);
align-items: center; align-items: center;
margin-right: 8px; margin-right: 8px;
@ -57,7 +57,7 @@
.ant-pagination-options { .ant-pagination-options {
.ant-select { .ant-select {
font-size: 12px; font-size: var(--data-size);
.ant-select-selector { .ant-select-selector {
height: 28px; height: 28px;
@ -74,7 +74,7 @@
} }
.ant-select-item { .ant-select-item {
font-size: 12px; font-size: var(--data-size);
} }
} }
@ -96,7 +96,7 @@
} }
th, td { th, td {
font-size: 12px; font-size: var(--data-size);
.ant-form-item { .ant-form-item {
margin-bottom: 0; margin-bottom: 0;
@ -117,7 +117,7 @@
} }
.ant-dropdown-menu-item { .ant-dropdown-menu-item {
font-size: 12px; font-size: var(--data-size);
color: #333; color: #333;
} }
} }

@ -36,7 +36,7 @@ const UnitTable: FC = (props) => {
if (!_.isEmpty(data)) { if (!_.isEmpty(data)) {
const { const {
columns, dataSource, pageInfo, scrollHeight, i18n, showOperateBtn: permission, unitTableType = "welfareRecord", columns, dataSource, pageInfo, scrollHeight, i18n, showOperateBtn: permission, unitTableType = "welfareRecord",
selectedRowKeys, selectedKey, rowKey, showTotalCell = false, sumDataSource = {} selectedRowKeys: rowKeys = [], selectedKey, rowKey, showTotalCell = false, sumDataSource = {}
} = data; } = data;
setI18n(i18n); setI18n(i18n);
setColumns(columns); setColumns(columns);
@ -44,7 +44,10 @@ const UnitTable: FC = (props) => {
setPageInfo(pageInfo); setPageInfo(pageInfo);
setUnitTableType(unitTableType); setUnitTableType(unitTableType);
setSumRow(sumDataSource); setSumRow(sumDataSource);
setExtraParams({ selectedKey, selectedRowKeys, scrollHeight, permission, rowKey, showTotalCell }); setExtraParams({
selectedKey, scrollHeight, permission, rowKey, showTotalCell,
selectedRowKeys: [extraParams.selectedRowKeys, ...rowKeys]
});
} }
}; };
const onChange = (current: number, pageSize: number) => { const onChange = (current: number, pageSize: number) => {
@ -61,8 +64,8 @@ const UnitTable: FC = (props) => {
}); });
}; };
const rowSelection = { const rowSelection = {
columnWidth: 60, columnWidth: 60, selectedRowKeys: extraParams.selectedRowKeys,
selectedRowKeys: extraParams.selectedRowKeys, preserveSelectedRowKeys: true,
onChange: (selectedRowKeys: React.Key[]) => { onChange: (selectedRowKeys: React.Key[]) => {
// @ts-ignore // @ts-ignore
setExtraParams({ ...extraParams, selectedRowKeys: selectedRowKeys }); setExtraParams({ ...extraParams, selectedRowKeys: selectedRowKeys });

@ -39,7 +39,7 @@ const Index: FunctionComponent<Props> = (props) => {
const data: any = exceptStr(event.data); const data: any = exceptStr(event.data);
if (!_.isEmpty(data)) { if (!_.isEmpty(data)) {
const { const {
columns, dataSource, pageInfo, selectedRowKeys, i18n: i18nRes = {}, columns, dataSource, pageInfo, selectedRowKeys: rowKeys, i18n: i18nRes = {},
runStatuses, showOperateBtn runStatuses, showOperateBtn
} = data; } = data;
setShowOperateBtn(showOperateBtn); setShowOperateBtn(showOperateBtn);
@ -47,7 +47,7 @@ const Index: FunctionComponent<Props> = (props) => {
setI18n(i18nRes); setI18n(i18nRes);
setPageInfo(pageInfo); setPageInfo(pageInfo);
setDataSource(dataSource); setDataSource(dataSource);
setSelectedRowKeys(selectedRowKeys); setSelectedRowKeys([...rowKeys, ...selectedRowKeys]);
setColumns(columns); setColumns(columns);
} }
}; };
@ -64,16 +64,14 @@ const Index: FunctionComponent<Props> = (props) => {
return { ...pageInfo, current: size === pageSize ? current : 1, pageSize }; return { ...pageInfo, current: size === pageSize ? current : 1, pageSize };
}); });
}; };
const rowSelection = { const rowSelection = {
columnWidth: 60, columnWidth: 60, selectedRowKeys,
selectedRowKeys: selectedRowKeys, preserveSelectedRowKeys: true,
onChange: (selectedRowKeys: React.Key[]) => { onChange: (rowKeys: React.Key[]) => {
setSelectedRowKeys(selectedRowKeys); setSelectedRowKeys(rowKeys);
window.parent.postMessage( window.parent.postMessage(
{ { type: "turn", payload: { id: "CHECKBOX", params: { selectedRowKeys: rowKeys } } },
type: "turn",
payload: { id: "CHECKBOX", params: { selectedRowKeys } }
},
"*" "*"
); );
} }

Loading…
Cancel
Save