From bdf6e90e38cce533f9b8e65f0320ace1e2328b54 Mon Sep 17 00:00:00 2001 From: wenlele Date: Mon, 5 Jun 2023 16:39:50 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BE=85=E5=8A=9E?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../workOrder/containers/stayDoWorkOrder.jsx | 70 +++++++++++-------- web/client/src/utils/webapi.js | 4 +- 2 files changed, 41 insertions(+), 33 deletions(-) diff --git a/web/client/src/sections/workOrder/containers/stayDoWorkOrder.jsx b/web/client/src/sections/workOrder/containers/stayDoWorkOrder.jsx index c3249ad..ea72334 100644 --- a/web/client/src/sections/workOrder/containers/stayDoWorkOrder.jsx +++ b/web/client/src/sections/workOrder/containers/stayDoWorkOrder.jsx @@ -3,7 +3,7 @@ import { connect } from 'react-redux'; import { ApiTable, EmisApiTable, EmisRequest } from '$utils' import { Skeleton, Button, Pagination, Form, Popconfirm, Table, Toast } from '@douyinfe/semi-ui'; import { IconSearch } from '@douyinfe/semi-icons'; -import { SkeletonScreen, } from "$components"; +import { SkeletonScreen, WorkflowModal } from "$components"; import moment from "moment"; @@ -27,6 +27,10 @@ const Rest = (props) => { const [projectStatus, setProjectStatus] = useState([]); //获取项目状态列表 const [tableData, setTableData] = useState([]); //获取项目状态列表 const [loading, setLoading] = useState(true); //获取项目状态列表 + const [workflowModalVisible, setWorkflowModalVisible] = useState(false) + const [processInstanceId, setProcessInstanceId] = useState(null) + + useEffect(() => { backlogData() @@ -35,17 +39,13 @@ const Rest = (props) => { let backlogData = () => { setLoading(true) EmisRequest.get(EmisApiTable.processInstancemMyAuditList, - { userId: 1, offset: 0, limit: 10, businessType: '' }) + { userId: user?.id, businessType: '运维中台表单', }) .then(res => { console.log(111, res); setTableData(res) setLimits(res.length || 0) setLoading(false) - // sessionStorage.setItem('pomsUser', JSON.stringify(user)); - // return dispatch({ - // type: LOGIN_SUCCESS, - // payload: { user: user }, - // }); + }, error => { Toast.error({ content: '待办工单请求失败', duration: 1, }) setLoading(false) @@ -79,6 +79,11 @@ const Rest = (props) => { }, { title: '操作', dataIndex: 'hadle', + render: (text, record, index) =>
{ + setProcessInstanceId(record.processInstanceId) + setWorkflowModalVisible(true) + + }}>查看详情
}] return ( @@ -92,10 +97,12 @@ const Rest = (props) => {
console.log(values)} - getFormApi={(formApi) => (form.current = formApi)} + // getFormApi={(formApi) => (form.current = formApi)} layout="horizontal" style={{ position: "relative", width: "100%", flex: 1 }} + onSubmit={(values) => { + console.log(values) + }} > { style={{ width: 260, marginLeft: 12, marginRight: 12 }} placeholder="请输入申请人" /> - + - +
@@ -146,7 +149,7 @@ const Rest = (props) => { { pageSizeOpts={[10, 20, 30, 40]} onChange={(currentPage, pageSize) => { setQuery({ limit: pageSize, page: currentPage - 1 }); - page.current = currentPage - 1 - setChange(!change) }} /> + { setWorkflowModalVisible(false) }} + successCallBack={() => { setWorkflowModalVisible(false) }} + /> ) } diff --git a/web/client/src/utils/webapi.js b/web/client/src/utils/webapi.js index e266dd2..732da79 100644 --- a/web/client/src/utils/webapi.js +++ b/web/client/src/utils/webapi.js @@ -86,9 +86,9 @@ export const ApiTable = { export const EmisApiTable = { //通过流程名称查找指定流程 getProcessByName: 'workflow/process/name', - + processInstancemMyApplyList: 'process-instance/my-apply-list', - processInstancemMyAuditList: 'process-instance/my-audit-list?', + processInstancemMyAuditList: 'process-instance/my-audit-list', //删除草稿 delDraftUrl: 'process/drafts/{draftId}', }