From bd2f696397496ff4ecc30cc8060996dd6ccf5282 Mon Sep 17 00:00:00 2001
From: luxiaotao1123 <t1341870251@163.com>
Date: 星期三, 18 九月 2024 16:03:21 +0800
Subject: [PATCH] #
---
zy-acs-flow/src/page/loc/LocList.jsx | 2 +
zy-acs-flow/src/page/loc/rowSx.jsx | 63 +++++++++++++++++++++++++++++++
zy-acs-flow/src/page/operationRecord/OperationRecordList.jsx | 6 +++
3 files changed, 71 insertions(+), 0 deletions(-)
diff --git a/zy-acs-flow/src/page/loc/LocList.jsx b/zy-acs-flow/src/page/loc/LocList.jsx
index eaf3fcd..be7a61b 100644
--- a/zy-acs-flow/src/page/loc/LocList.jsx
+++ b/zy-acs-flow/src/page/loc/LocList.jsx
@@ -45,6 +45,7 @@
import * as Common from '@/utils/common';
import RepartitionIcon from '@mui/icons-material/Repartition';
import LocInit from "./LocInit";
+import rowSx from "./rowSx";
const StyledDatagrid = styled(DatagridConfigurable)(({ theme }) => ({
'& .css-1vooibu-MuiSvgIcon-root': {
@@ -141,6 +142,7 @@
expand={() => <LocPanel />}
expandSingle={true}
omit={['id', 'locType', 'uuid', 'statusBool', 'updateBy', 'createTime', 'createBy', 'memo']}
+ rowSx={rowSx(drawerVal || null)}
>
<NumberField source="id" />
<TextField source="locNo" label="table.field.loc.locNo" />
diff --git a/zy-acs-flow/src/page/loc/rowSx.jsx b/zy-acs-flow/src/page/loc/rowSx.jsx
new file mode 100644
index 0000000..ac23e4c
--- /dev/null
+++ b/zy-acs-flow/src/page/loc/rowSx.jsx
@@ -0,0 +1,63 @@
+import green from '@mui/material/colors/green';
+import orange from '@mui/material/colors/orange';
+import red from '@mui/material/colors/red';
+import blue from '@mui/material/colors/blue';
+import grey from '@mui/material/colors/grey';
+
+const rowSx = (selectedRow) => (record) => {
+ let style = {};
+ if (!record) {
+ return style;
+ }
+ if (selectedRow && selectedRow.id === record.id) {
+ style = {
+ ...style,
+ backgroundColor: 'action.selected',
+ };
+ }
+ if (record.locSts$ === '绌洪棽')
+ return {
+ ...style,
+ borderLeftColor: green[500],
+ borderLeftWidth: 5,
+ borderLeftStyle: 'solid',
+ };
+ if (record.locSts$ === '鍦ㄥ簱')
+ return {
+ ...style,
+ borderLeftColor: blue[500],
+ borderLeftWidth: 5,
+ borderLeftStyle: 'solid',
+ };
+ if (record.locSts$ === '绂佺敤')
+ return {
+ ...style,
+ borderLeftColor: red[500],
+ borderLeftWidth: 5,
+ borderLeftStyle: 'solid',
+ };
+ if (record.locSts$ === '鍏ュ簱棰勭害')
+ return {
+ ...style,
+ borderLeftColor: orange[500],
+ borderLeftWidth: 5,
+ borderLeftStyle: 'solid',
+ };
+ if (record.locSts$ === '鍑哄簱棰勭害')
+ return {
+ ...style,
+ borderLeftColor: orange[500],
+ borderLeftWidth: 5,
+ borderLeftStyle: 'solid',
+ };
+ if (record.locSts$ === '鍏朵粬')
+ return {
+ ...style,
+ borderLeftColor: grey[500],
+ borderLeftWidth: 5,
+ borderLeftStyle: 'solid',
+ };
+ return style;
+};
+
+export default rowSx;
diff --git a/zy-acs-flow/src/page/operationRecord/OperationRecordList.jsx b/zy-acs-flow/src/page/operationRecord/OperationRecordList.jsx
index fd9fb80..404ce17 100644
--- a/zy-acs-flow/src/page/operationRecord/OperationRecordList.jsx
+++ b/zy-acs-flow/src/page/operationRecord/OperationRecordList.jsx
@@ -51,6 +51,12 @@
'& .RaDatagrid-row': {
cursor: 'auto'
},
+ '& .column-url': {
+ maxWidth: '16em',
+ overflow: 'hidden',
+ textOverflow: 'ellipsis',
+ whiteSpace: 'nowrap',
+ },
'& .column-request': {
maxWidth: '18em',
overflow: 'hidden',
--
Gitblit v1.9.1