From 5d804ce9ee041df7389bc3a02e5175257b9098da Mon Sep 17 00:00:00 2001
From: skyouc <creaycat@gmail.com>
Date: 星期日, 04 五月 2025 19:42:29 +0800
Subject: [PATCH] no message
---
rsf-admin/src/page/task/TaskList.jsx | 26 ++++++++++++++------------
1 files changed, 14 insertions(+), 12 deletions(-)
diff --git a/rsf-admin/src/page/task/TaskList.jsx b/rsf-admin/src/page/task/TaskList.jsx
index ecaad61..0904353 100644
--- a/rsf-admin/src/page/task/TaskList.jsx
+++ b/rsf-admin/src/page/task/TaskList.jsx
@@ -23,7 +23,6 @@
DateInput,
SelectInput,
NumberInput,
-
Button,
} from 'react-admin';
import { Box, Typography, Card, Stack, Drawer } from '@mui/material';
@@ -87,7 +86,7 @@
/>,
]
-const TaskList = () => {
+const TaskList = (props) => {
const translate = useTranslate();
const [drawerVal, setDrawerVal] = useState(false);
return (
@@ -104,7 +103,7 @@
title={"menu.task"}
empty={false}
filters={filters}
- sort={{ field: "sort", order: "desc" }}
+ sort={{ field: "create_time", order: "desc" }}
actions={(
<TopToolbar>
<FilterButton />
@@ -122,7 +121,7 @@
<BulkDeleteButton mutationMode={OPERATE_MODE} />
</>
}
- rowClick={false}
+ rowClick={'edit'}
expand={false}
expandSingle={true}
omit={['id', 'createTime', 'createBy', 'memo', 'robotCode', 'exceStatus', 'expDesc', 'expCode', 'status', 'sort']}
@@ -147,7 +146,7 @@
<DateField source="createTime" label="common.field.createTime" showTime />
{/* <BooleanField source="statusBool" label="common.field.status" sortable={false} /> */}
<TextField source="memo" label="common.field.memo" sortable={false} />
- <WrapperField cellClassName="opt" label="common.field.opt">
+ <WrapperField cellClassName="opt" label="common.field.opt" onClick={(e) => e.stopPropagation()} >
<DoneButton sx={{ padding: '1px', fontSize: '.75rem' }} ></DoneButton>
<CancelButton sx={{ padding: '1px', fontSize: '.75rem' }} mutationMode={OPERATE_MODE} />
<SetTopButton sx={{ padding: '1px', fontSize: '.75rem' }} ></SetTopButton>
@@ -171,16 +170,17 @@
* 瀹屾垚鎿嶄綔
* @returns
*/
-const DoneButton = () => {
+const DoneButton = (props) => {
const record = useRecordContext();
const notify = useNotify();
const refresh = useRefresh();
- const clickComplete = () => {
- console.log('------->');
- completeTask([record])
+ const clickComplete = (event) => {
+ event.stopPropagation();
+ completeTask(record)
};
//瀹屾垚浠诲姟
const completeTask = async (row) => {
+ console.log(row.id);
const { data: { code, data, msg } } = await request.post(`task/complete/` + row.id);
if (code === 200) {
notify(msg);
@@ -206,11 +206,12 @@
const record = useRecordContext();
const notify = useNotify();
const refresh = useRefresh();
- const clickCancel = () => {
+ const clickCancel = (event) => {
+ event.stopPropagation();
cancleTask(record)
};
//鍙栨秷浠诲姟
- const cancleTask = async (row) => {
+ const cancleTask = async (row) => {
console.log(row);
const { data: { code, data, msg } } = await request.post(`/task/remove/` + row.id);
if (code === 200) {
@@ -236,7 +237,8 @@
const record = useRecordContext();
const notify = useNotify();
const refresh = useRefresh();
- const clickTop = () => {
+ const clickTop = (event) => {
+ event.stopPropagation();
topTask(record)
};
//缃《浠诲姟
--
Gitblit v1.9.1