From f21da8f3373d19045b05fe51a6eab3695dbe30f5 Mon Sep 17 00:00:00 2001
From: zhou zhou <3272660260@qq.com>
Date: 星期六, 07 三月 2026 14:13:42 +0800
Subject: [PATCH] #任务步骤

---
 rsf-admin/src/page/taskPathTemplate/TaskPathTemplateList.jsx                                      |   25 ++------
 rsf-admin/src/page/task/TaskList.jsx                                                              |   37 +++++++++++
 rsf-admin/src/page/taskPathTemplate/TaskTemplateFlowViewer.jsx                                    |   10 ---
 rsf-admin/src/i18n/zh.js                                                                          |   26 ++++++++
 rsf-server/src/main/java/com/vincent/rsf/server/system/controller/FlowStepInstanceController.java |   18 +++---
 rsf-admin/src/i18n/en.js                                                                          |   24 ++++++++
 rsf-admin/src/page/taskPathTemplateMerge/TaskPathTemplateMergeList.jsx                            |   13 ----
 7 files changed, 102 insertions(+), 51 deletions(-)

diff --git a/rsf-admin/src/i18n/en.js b/rsf-admin/src/i18n/en.js
index 7db3a65..f4a1014 100644
--- a/rsf-admin/src/i18n/en.js
+++ b/rsf-admin/src/i18n/en.js
@@ -226,6 +226,7 @@
         subsystemFlowTemplate: 'SubsystemFlowTemplate',
         flowStepTemplate: 'FlowStepTemplate',
         taskPathTemplateMerge: 'TaskPathTemplateMerge',
+        missionFlowStepInstance: 'Mission Flow Steps',
     },
     table: {
         field: {
@@ -280,6 +281,28 @@
                 retryEnabled: "retryEnabled",
                 retryConfig: "retryConfig",
                 timeoutSeconds: "timeoutSeconds",
+            },
+            flowStepInstance: {
+                flowInstanceId: "Flow Instance ID",
+                flowInstanceNo: "Flow Instance No",
+                stepTemplateId: "Step Template ID",
+                errorCode: "Error Code",
+                errorMessage: "Error Message",
+                startTime: "Start Time",
+                endTime: "End Time",
+                durationSeconds: "Duration(s)",
+                inputData: "Input Data",
+                outputData: "Output Data",
+                retryTimes: "Retry Times",
+                id: "ID",
+                stepOrder: "Step Order",
+                stepCode: "Step Code",
+                stepName: "Step Name",
+                stepType: "Step Type",
+                status: "Status",
+                executeResult: "Execute Result",
+                taskNo: "Task No",
+                createTime: "Create Time",
             },
             subsystemFlowTemplate: {
                 flowCode: "flowCode",
@@ -1505,6 +1528,7 @@
         order: 'Orders',
         modiftySite: 'Modify SiteNo',
         selectWave: 'Select Wave Rule',
+        flowStep: "Flow Step",
 
     },
     placeholder: {
diff --git a/rsf-admin/src/i18n/zh.js b/rsf-admin/src/i18n/zh.js
index 352ab0a..3fe12dd 100644
--- a/rsf-admin/src/i18n/zh.js
+++ b/rsf-admin/src/i18n/zh.js
@@ -242,9 +242,32 @@
         subsystemFlowTemplate: '瀛愮郴缁熸祦绋嬫ā鏉�',
         flowStepTemplate: '娴佺▼姝ラ妯℃澘',
         taskPathTemplateMerge: '浠诲姟璺緞妯℃澘鍚堝苟',
+        missionFlowStepInstance: '浠诲姟娴佺▼姝ラ',
     },
     table: {
-        field: {
+        field: {            
+            flowStepInstance: { 
+                flowInstanceId: "娴佺▼瀹炰緥ID",
+                flowInstanceNo: "娴佺▼瀹炰緥缂栧彿",
+                stepTemplateId: "姝ラ妯℃澘ID",
+                errorCode: "閿欒缂栫爜",
+                errorMessage: "閿欒娑堟伅",
+                startTime: "寮�濮嬫椂闂�",
+                endTime: "缁撴潫鏃堕棿",
+                durationSeconds: "鎸佺画绉掓暟",
+                inputData: "杈撳叆鏁版嵁",
+                outputData: "杈撳嚭鏁版嵁",
+                retryTimes: "閲嶈瘯娆℃暟",
+                id: "ID",
+                stepOrder: "姝ラ椤哄簭",
+                stepCode: "姝ラ缂栫爜",
+                stepName: "姝ラ鍚嶇О",
+                stepType: "姝ラ绫诲瀷",
+                status: "鐘舵��",
+                executeResult: "鎵ц缁撴灉",
+                taskNo: "浠诲姟鍙�",
+                createTime: "鍒涘缓鏃堕棿",
+            },
             basStationArea: {
                 type: "绫诲瀷",
                 stationAreaName: "绔欑偣鍖哄煙鍚嶇О",
@@ -1573,6 +1596,7 @@
         modiftySite: '淇敼搴撳彛',
         selectWave: '娉㈡瑙勫垯',
         transformation: "杞崲",
+        flowStep: "娴佺▼姝ラ",
     },
     placeholder: {
         warehouseAreasCode: "鐢ㄤ簬搴撲綅缂栫爜鍓嶇紑鍗犱綅绗�",
diff --git a/rsf-admin/src/page/task/TaskList.jsx b/rsf-admin/src/page/task/TaskList.jsx
index eeed97a..445e8cd 100644
--- a/rsf-admin/src/page/task/TaskList.jsx
+++ b/rsf-admin/src/page/task/TaskList.jsx
@@ -46,6 +46,8 @@
 import GradingOutlinedIcon from '@mui/icons-material/GradingOutlined';
 import StickyDataTable from "@/page/components/StickyDataTable";
 import useTableLayout from '@/utils/useTableLayout';
+import AccountTreeOutlinedIcon from '@mui/icons-material/AccountTreeOutlined';
+import FlowStepInstanceModal from './FlowStepInstanceModal';
 
 const TaskList = (props) => {
     const translate = useTranslate();
@@ -53,6 +55,10 @@
     const [drawerVal, setDrawerVal] = useState(false);
     const [autoExce, setAutoExce] = useState(false);
     const dict = JSON.parse(localStorage.getItem('sys_dicts'))?.filter(dict => (dict.dictTypeCode == 'sys_warehouse_type')) || [];
+    
+    // state for FlowStepInstanceModal
+    const [flowStepModalOpen, setFlowStepModalOpen] = useState(false);
+    const [currentTaskRecord, setCurrentTaskRecord] = useState(null);
 
     useEffect(() => {
         getConfig()
@@ -136,7 +142,13 @@
                 )}
                 perPage={DEFAULT_PAGE_SIZE}
             >
-                <TableItems drawerVal={drawerVal} />
+                <TableItems 
+                    drawerVal={drawerVal} 
+                    onOpenFlowStep={(record) => {
+                        setCurrentTaskRecord(record);
+                        setFlowStepModalOpen(true);
+                    }} 
+                />
             </List>
             <PageDrawer
                 title='Task Detail'
@@ -144,6 +156,11 @@
                 setDrawerVal={setDrawerVal}
             >
             </PageDrawer>
+            <FlowStepInstanceModal 
+                open={flowStepModalOpen} 
+                setOpen={setFlowStepModalOpen} 
+                record={currentTaskRecord} 
+            />
         </Box>
     )
 }
@@ -151,7 +168,7 @@
 export default TaskList;
 
 
-const TableItems = ({ drawerVal }) => {
+const TableItems = ({ drawerVal, onOpenFlowStep }) => {
     const omittedFields = ['id', 'createTime', 'createBy$', 'memo', 'robotCode', 'exceStatus', 'expDesc', 'expCode', 'status', 'warehType$', 'orderType', 'order_type', 'orderType$'];
     const { boxMaxWidth, boxMaxHeight } = useTableLayout(drawerVal);
     return (
@@ -201,6 +218,7 @@
                     <CheckButton />
                     <PickButton />
                     <SetTopButton />
+                    <FlowStepButton onClick={onOpenFlowStep} />
                 </WrapperField>
             </StickyDataTable>
         </Box>
@@ -208,6 +226,21 @@
 }
 
 
+const FlowStepButton = ({ onClick }) => {
+    const record = useRecordContext();
+    return (
+        <Button
+            label="toolbar.flowStep"
+            onClick={(e) => {
+                e.stopPropagation();
+                onClick(record);
+            }}
+        >
+            <AccountTreeOutlinedIcon />
+        </Button>
+    )
+}
+
 /**
  * 鐩樼偣
  * @returns te
diff --git a/rsf-admin/src/page/taskPathTemplate/TaskPathTemplateList.jsx b/rsf-admin/src/page/taskPathTemplate/TaskPathTemplateList.jsx
index 7e3d17f..fa01bab 100644
--- a/rsf-admin/src/page/taskPathTemplate/TaskPathTemplateList.jsx
+++ b/rsf-admin/src/page/taskPathTemplate/TaskPathTemplateList.jsx
@@ -225,26 +225,15 @@
                 >
                     {baseColumns
                         .map((column) => (
-                            <DataTable.Col
-                                key={column.key || column.props.source}
-                                source={column.props.source}
-                                label={column.props.label}
-                                sx={column.props.sx}
-                            >
-                                {column}
-                            </DataTable.Col>
+                            column
                         ))
                     }
-                    <DataTable.Col
-                        source="opt"
-                        label="common.field.opt"
-                    >
-                        <WrapperField source="opt" cellClassName="opt" label="common.field.opt">
-                            <ViewFlowButton onClick={onOpenFlow} />
-                            <EditButton sx={{ padding: '1px', fontSize: '.75rem' }} />
-                            <DeleteButton sx={{ padding: '1px', fontSize: '.75rem' }} mutationMode={OPERATE_MODE} />
-                        </WrapperField>
-                    </DataTable.Col>
+
+                    <WrapperField source="opt" cellClassName="opt" label="common.field.opt">
+                        <ViewFlowButton onClick={onOpenFlow} />
+                        <EditButton sx={{ padding: '1px', fontSize: '.75rem' }} />
+                        <DeleteButton sx={{ padding: '1px', fontSize: '.75rem' }} mutationMode={OPERATE_MODE} />
+                    </WrapperField>
                 </StickyDataTable>}
         </Box>
     )
diff --git a/rsf-admin/src/page/taskPathTemplate/TaskTemplateFlowViewer.jsx b/rsf-admin/src/page/taskPathTemplate/TaskTemplateFlowViewer.jsx
index 959a8fe..428c4a3 100644
--- a/rsf-admin/src/page/taskPathTemplate/TaskTemplateFlowViewer.jsx
+++ b/rsf-admin/src/page/taskPathTemplate/TaskTemplateFlowViewer.jsx
@@ -75,15 +75,7 @@
                         }}
                     // Manually handle selection style if needed, or rely on StickyDataTable support
                     >
-                        {columns.map((col, index) => (
-                            <DataTable.Col
-                                key={col.props.source}
-                                source={col.props.source}
-                                label={col.props.label}
-                            >
-                                {col}
-                            </DataTable.Col>
-                        ))}
+                        {columns.map((col, index) => col)}
                     </StickyDataTable>
                 </Box>
                 <Pagination rowsPerPageOptions={[10, 25, 50, 100]} />
diff --git a/rsf-admin/src/page/taskPathTemplateMerge/TaskPathTemplateMergeList.jsx b/rsf-admin/src/page/taskPathTemplateMerge/TaskPathTemplateMergeList.jsx
index 2f25037..c604f50 100644
--- a/rsf-admin/src/page/taskPathTemplateMerge/TaskPathTemplateMergeList.jsx
+++ b/rsf-admin/src/page/taskPathTemplateMerge/TaskPathTemplateMergeList.jsx
@@ -187,18 +187,7 @@
                     rowClick={false}
                     hiddenColumns={['id', 'createTime', 'createBy', 'memo', 'statusBool']}
                 >
-                    {columns
-                        .map((column) => (
-                            <DataTable.Col
-                                key={column.key || column.props.source}
-                                source={column.props.source}
-                                label={column.props.label}
-                                sx={column.props.sx}
-                            >
-                                {column}
-                            </DataTable.Col>
-                        ))
-                    }
+                    {columns}
                 </StickyDataTable>}
         </Box>
     )
diff --git a/rsf-server/src/main/java/com/vincent/rsf/server/system/controller/FlowStepInstanceController.java b/rsf-server/src/main/java/com/vincent/rsf/server/system/controller/FlowStepInstanceController.java
index 8f6324c..a40bb8d 100644
--- a/rsf-server/src/main/java/com/vincent/rsf/server/system/controller/FlowStepInstanceController.java
+++ b/rsf-server/src/main/java/com/vincent/rsf/server/system/controller/FlowStepInstanceController.java
@@ -25,7 +25,7 @@
     @Autowired
     private FlowStepInstanceService flowStepInstanceService;
 
-    @PreAuthorize("hasAuthority('system:flowStepInstance:list')")
+    @PreAuthorize("hasAuthority('manager:task:list')")
     @PostMapping("/flowStepInstance/page")
     public R page(@RequestBody Map<String, Object> map) {
         BaseParam baseParam = buildParam(map, BaseParam.class);
@@ -33,25 +33,25 @@
         return R.ok().add(flowStepInstanceService.page(pageParam, pageParam.buildWrapper(true)));
     }
 
-    @PreAuthorize("hasAuthority('system:flowStepInstance:list')")
+    @PreAuthorize("hasAuthority('manager:task:list')")
     @PostMapping("/flowStepInstance/list")
     public R list(@RequestBody Map<String, Object> map) {
         return R.ok().add(flowStepInstanceService.list());
     }
 
-    @PreAuthorize("hasAuthority('system:flowStepInstance:list')")
+    @PreAuthorize("hasAuthority('manager:task:list')")
     @PostMapping({"/flowStepInstance/many/{ids}", "/flowStepInstances/many/{ids}"})
     public R many(@PathVariable Long[] ids) {
         return R.ok().add(flowStepInstanceService.listByIds(Arrays.asList(ids)));
     }
 
-    @PreAuthorize("hasAuthority('system:flowStepInstance:list')")
+    @PreAuthorize("hasAuthority('manager:task:list')")
     @GetMapping("/flowStepInstance/{id}")
     public R get(@PathVariable("id") Long id) {
         return R.ok().add(flowStepInstanceService.getById(id));
     }
 
-    @PreAuthorize("hasAuthority('system:flowStepInstance:save')")
+    @PreAuthorize("hasAuthority('manager:task:save')")
     @OperationLog("Create 瀛愭祦绋嬫楠ゅ疄渚�")
     @PostMapping("/flowStepInstance/save")
     public R save(@RequestBody FlowStepInstance flowStepInstance) {
@@ -63,7 +63,7 @@
         return R.ok("Save Success").add(flowStepInstance);
     }
 
-    @PreAuthorize("hasAuthority('system:flowStepInstance:update')")
+    @PreAuthorize("hasAuthority('manager:task:update')")
     @OperationLog("Update 瀛愭祦绋嬫楠ゅ疄渚�")
     @PostMapping("/flowStepInstance/update")
     public R update(@RequestBody FlowStepInstance flowStepInstance) {
@@ -74,7 +74,7 @@
         return R.ok("Update Success").add(flowStepInstance);
     }
 
-    @PreAuthorize("hasAuthority('system:flowStepInstance:remove')")
+    @PreAuthorize("hasAuthority('manager:task:remove')")
     @OperationLog("Delete 瀛愭祦绋嬫楠ゅ疄渚�")
     @PostMapping("/flowStepInstance/remove/{ids}")
     public R remove(@PathVariable Long[] ids) {
@@ -84,7 +84,7 @@
         return R.ok("Delete Success").add(ids);
     }
 
-    @PreAuthorize("hasAuthority('system:flowStepInstance:list')")
+    @PreAuthorize("hasAuthority('manager:task:list')")
     @PostMapping("/flowStepInstance/query")
     public R query(@RequestParam(required = false) String condition) {
         List<KeyValVo> vos = new ArrayList<>();
@@ -98,7 +98,7 @@
         return R.ok().add(vos);
     }
 
-    @PreAuthorize("hasAuthority('system:flowStepInstance:list')")
+    @PreAuthorize("hasAuthority('manager:task:list')")
     @PostMapping("/flowStepInstance/export")
     public void export(@RequestBody Map<String, Object> map, HttpServletResponse response) throws Exception {
         ExcelUtil.build(ExcelUtil.create(flowStepInstanceService.list(), FlowStepInstance.class), response);

--
Gitblit v1.9.1