巴林闲侠 2 years ago
parent
commit
468644c904
  1. 181
      web/client/src/sections/workOrder/containers/aboutMe.jsx
  2. 3
      web/client/src/sections/workOrder/containers/index.js
  3. 171
      web/client/src/sections/workOrder/containers/initiated.jsx
  4. 195
      web/client/src/sections/workOrder/containers/preserve.jsx
  5. 181
      web/client/src/sections/workOrder/containers/receipt.jsx
  6. 45
      web/client/src/sections/workOrder/containers/stayDoWorkOrder.jsx
  7. 6
      web/client/src/sections/workOrder/nav-item.jsx
  8. 11
      web/client/src/sections/workOrder/routes.js
  9. 10
      web/client/src/utils/webapi.js

181
web/client/src/sections/workOrder/containers/aboutMe.jsx

@ -1,21 +1,186 @@
import React, { useEffect } from 'react';
import React, { useEffect, useRef, useState } from 'react';
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, WorkflowModal } from "$components";
import moment from "moment";
const Server = (props) => {
const { dispatch, actions, user, loading, socket } = props
useEffect(() => {
const Rest = (props) => {
const { dispatch, actions, user, socket } = props
const [query, setQuery] = useState({ limit: 10, offset: 0 }); //
const [limits, setLimits] = useState(0)//
const [tableData, setTableData] = useState([]);
const [loading, setLoading] = useState(true);
const [workflowModalVisible, setWorkflowModalVisible] = useState(false)
const [processInstanceId, setProcessInstanceId] = useState(null)
const [params, setParams] = useState({})
useEffect(() => {
backlogData()
}, [])
let backlogData = (obj = { limit: 10, offset: 0 }) => {
setLoading(true)
EmisRequest.get(EmisApiTable.processInstancemMyNoticeList,
{ userId: user?.id, businessType: '', ...obj })
.then(res => {
setTableData(res?.data)
setLoading(false)
}, error => {
Toast.error({ content: '抄送我的工单列表请求失败', duration: 1, })
setLoading(false)
});
EmisRequest.get(EmisApiTable.processInstancemMyNoticeCount,
{ userId: user?.id, businessType: '', ...obj, limit: "", offset: "" })
.then(res => {
setLimits(res.count || 0)
}, error => {
Toast.error({ content: '抄送我的工单数量请求失败', duration: 1, })
});
}
let columns = [{
title: '序号',
dataIndex: 'index',
render: (text, record, index) => index + 1
}, {
title: '标题',
dataIndex: 'nae',
}, {
title: '关联项目',
dataIndex: 'nae',
}, {
title: '申请人',
dataIndex: 'applyerName',
}, {
title: '申请部门',
dataIndex: 'applyDepartmentName',
}, {
title: '审批状态',
dataIndex: 'apName',
}, {
title: '提交时间',
dataIndex: 'startTime',
render: (text, record, index) => text && moment(text).format('YYYY-MM-DD HH:mm:ss') || '--'
}, {
title: '期望完成时间',
dataIndex: 'nae',
}, {
title: '操作',
dataIndex: 'hadle',
render: (text, record, index) => <div style={{ width: 60, color: "#1890ff", cursor: "pointer" }} onClick={() => {
setProcessInstanceId(record.processInstanceId)
setWorkflowModalVisible(true)
}}>查看详情</div>
}]
return (
<>
<div>
<img src="/assets/images/install/watting.png" alt="" style={{ width: 'calc(100% + 16px)', position: "relative", top: -12, left: -8, }} />
<div style={{ background: '#FFFFFF', margin: '8px 12px', padding: '20px 20px 0px 20px' }}>
<div style={{ display: 'flex', alignItems: 'center', justifyContent: 'space-between' }}>
<div style={{ display: 'flex', alignItems: 'center' }}>
<div style={{ width: 0, height: 20, borderLeft: '3px solid #005ABD', borderTop: '3px solid transparent', borderBottom: '3px solid transparent' }}></div>
<div style={{ fontFamily: "YouSheBiaoTiHei", fontSize: 24, color: '#101531', marginLeft: 8 }}>抄送我</div>
<div style={{ marginLeft: 6, fontSize: 12, color: '#969799', fontFamily: "DINExp", }}>COPPGIVE WORKORDER</div>
</div>
<div style={{ marginRight: 20, display: 'flex', alignItems: 'center' }} className='myempush'>
<Form
// getFormApi={(formApi) => (form.current = formApi)}
layout="horizontal"
style={{ position: "relative", width: "100%", flex: 1 }}
onSubmit={(values) => {
if (values?.applyTimes) {
values.applyTimes = [moment(values?.applyTimes[0]).format('YYYY-MM-DD HH:mm:ss'), moment(values?.applyTimes[1]).format('YYYY-MM-DD HH:mm:ss')]
}
backlogData({ ...values, limit: 10, page: 0 })
setQuery({ limit: 10, offset: 0 });
setLimits(0)
setParams({ ...values })
}}
>
<Form.DatePicker
pure
field="applyTimes"
label="提交时间"
style={{ width: 268 }}
type="dateRange" density="compact"
/>
<Form.Input
suffix={<IconSearch />}
field="keywordsUser"
pure
showClear
style={{ width: 260, marginLeft: 12, marginRight: 12 }}
placeholder="请输入申请人"
/>
<Button theme='solid' type="primary" htmlType="submit">查询</Button>
</Form>
</div>
</div>
<div style={{ marginTop: 20 }}>
<Skeleton
loading={loading}
// loading={false}
active={true}
placeholder={SkeletonScreen()}
>
<Table
rowKey="name"
columns={columns}
dataSource={tableData}
bordered={false}
hideExpandedColumn={false}
empty="暂无数据"
pagination={false}
/>
</Skeleton>
<div
style={{
display: "flex",
justifyContent: "flex-end",
padding: "20px 20px",
}}
>
<div style={{ display: 'flex', }}>
<span style={{ lineHeight: "30px", fontSize: 13, color: 'rgba(0,90,189,0.8)' }}>
{limits}条工单
</span>
<Pagination
className="22"
total={limits}
showSizeChanger
currentPage={query.offset + 1}
pageSizeOpts={[10, 20, 30, 40]}
onChange={(currentPage, pageSize) => {
setQuery({ limit: pageSize, offset: currentPage - 1 });
backlogData({ ...params, limit: pageSize, offset: currentPage - 1 })
}}
/>
</div>
</div>
</div>
</div>
<WorkflowModal
visible={workflowModalVisible}
title={''}
processId={processInstanceId}
onCancel={() => { setWorkflowModalVisible(false) }}
successCallBack={() => { setWorkflowModalVisible(false) }}
/>
</>
)
}
@ -24,11 +189,11 @@ function mapStateToProps (state) {
const { auth, global, members, webSocket } = state;
return {
// loading: members.isRequesting,
// user: auth.user,
user: auth.user,
// actions: global.actions,
// members: members.data,
// socket: webSocket.socket
};
}
export default connect(mapStateToProps)(Server);
export default connect(mapStateToProps)(Rest);

3
web/client/src/sections/workOrder/containers/index.js

@ -5,4 +5,5 @@ import StayDoWorkOrder from './stayDoWorkOrder';
import Initiated from './initiated';
import Receipt from './receipt';
import AboutMe from './aboutMe';
export { JobOrder, StayDoWorkOrder, Initiated, Receipt, AboutMe};
import Preserve from './preserve';
export { JobOrder, StayDoWorkOrder, Initiated, Receipt, AboutMe,Preserve};

171
web/client/src/sections/workOrder/containers/initiated.jsx

@ -1,21 +1,180 @@
import React, { useEffect } from 'react';
import React, { useEffect, useRef, useState } from 'react';
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, WorkflowModal } from "$components";
import moment from "moment";
const Rest = (props) => {
const { dispatch, actions, user, loading, socket } = props
const { dispatch, actions, user, socket } = props
const [query, setQuery] = useState({ limit: 10, offset: 0 }); //
const [limits, setLimits] = useState(0)//
const [tableData, setTableData] = useState([]);
const [loading, setLoading] = useState(true);
const [workflowModalVisible, setWorkflowModalVisible] = useState(false)
const [processInstanceId, setProcessInstanceId] = useState(null)
const [params, setParams] = useState({})
useEffect(() => {
useEffect(() => {
backlogData()
}, [])
let backlogData = (obj = { limit: 10, offset: 0 }) => {
setLoading(true)
EmisRequest.get(EmisApiTable.processInstancemMyApplyList,
{ userId: user?.id, businessType: '', ...obj })
.then(res => {
setTableData(res?.data)
setLimits(res.count || 0)
setLoading(false)
}, error => {
Toast.error({ content: '由我发起的工单列表请求失败', duration: 1, })
setLoading(false)
});
}
let columns = [{
title: '序号',
dataIndex: 'index',
render: (text, record, index) => index + 1
}, {
title: '标题',
dataIndex: 'nae',
}, {
title: '关联项目',
dataIndex: 'nae',
}, {
title: '申请人',
dataIndex: 'applyerName',
}, {
title: '申请部门',
dataIndex: 'applyDepartmentName',
}, {
title: '审批状态',
dataIndex: 'apName',
}, {
title: '提交时间',
dataIndex: 'startTime',
render: (text, record, index) => text && moment(text).format('YYYY-MM-DD HH:mm:ss') || '--'
}, {
title: '期望完成时间',
dataIndex: 'nae',
}, {
title: '操作',
dataIndex: 'hadle',
render: (text, record, index) => <div style={{ width: 60, color: "#1890ff", cursor: "pointer" }} onClick={() => {
setProcessInstanceId(record.processInstanceId)
setWorkflowModalVisible(true)
}}>查看详情</div>
}]
return (
<>
<div>
<img src="/assets/images/install/watting.png" alt="" style={{ width: 'calc(100% + 16px)', position: "relative", top: -12, left: -8, }} />
<div style={{ background: '#FFFFFF', margin: '8px 12px', padding: '20px 20px 0px 20px' }}>
<div style={{ display: 'flex', alignItems: 'center', justifyContent: 'space-between' }}>
<div style={{ display: 'flex', alignItems: 'center' }}>
<div style={{ width: 0, height: 20, borderLeft: '3px solid #005ABD', borderTop: '3px solid transparent', borderBottom: '3px solid transparent' }}></div>
<div style={{ fontFamily: "YouSheBiaoTiHei", fontSize: 24, color: '#101531', marginLeft: 8 }}>由我发起</div>
<div style={{ marginLeft: 6, fontSize: 12, color: '#969799', fontFamily: "DINExp", }}>LAUNCH WORKORDER</div>
</div>
<div style={{ marginRight: 20, display: 'flex', alignItems: 'center' }} className='myempush'>
<Form
// getFormApi={(formApi) => (form.current = formApi)}
layout="horizontal"
style={{ position: "relative", width: "100%", flex: 1 }}
onSubmit={(values) => {
if (values?.applyTimes) {
values.applyTimes = [moment(values?.applyTimes[0]).format('YYYY-MM-DD HH:mm:ss'), moment(values?.applyTimes[1]).format('YYYY-MM-DD HH:mm:ss')]
}
backlogData({ ...values, limit: 10, page: 0 })
setQuery({ limit: 10, offset: 0 });
setLimits(0)
setParams({ ...values })
}}
>
<Form.DatePicker
pure
field="applyTimes"
label="提交时间"
style={{ width: 268 }}
type="dateRange" density="compact"
/>
{/* <Form.Input
suffix={<IconSearch />}
field="keywordsUser"
pure
showClear
style={{ width: 260, marginLeft: 12, marginRight: 12 }}
placeholder="请输入申请人"
/> */}
<Button theme='solid' type="primary" htmlType="submit">查询</Button>
</Form>
</div>
</div>
<div style={{ marginTop: 20 }}>
<Skeleton
loading={loading}
// loading={false}
active={true}
placeholder={SkeletonScreen()}
>
<Table
rowKey="name"
columns={columns}
dataSource={tableData}
bordered={false}
hideExpandedColumn={false}
empty="暂无数据"
pagination={false}
/>
</Skeleton>
<div
style={{
display: "flex",
justifyContent: "flex-end",
padding: "20px 20px",
}}
>
<div style={{ display: 'flex', }}>
<span style={{ lineHeight: "30px", fontSize: 13, color: 'rgba(0,90,189,0.8)' }}>
{limits}条工单
</span>
<Pagination
className="22"
total={limits}
showSizeChanger
currentPage={query.offset + 1}
pageSizeOpts={[10, 20, 30, 40]}
onChange={(currentPage, pageSize) => {
setQuery({ limit: pageSize, offset: currentPage - 1 });
backlogData({ ...params, limit: pageSize, offset: currentPage - 1 })
}}
/>
</div>
</div>
</div>
</div>
<WorkflowModal
visible={workflowModalVisible}
title={''}
processId={processInstanceId}
onCancel={() => { setWorkflowModalVisible(false) }}
successCallBack={() => { setWorkflowModalVisible(false) }}
/>
</>
)
}
@ -24,7 +183,7 @@ function mapStateToProps (state) {
const { auth, global, members, webSocket } = state;
return {
// loading: members.isRequesting,
// user: auth.user,
user: auth.user,
// actions: global.actions,
// members: members.data,
// socket: webSocket.socket

195
web/client/src/sections/workOrder/containers/preserve.jsx

@ -0,0 +1,195 @@
import React, { useEffect, useRef, useState } from 'react';
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, WorkflowModal } from "$components";
import moment from "moment";
const Rest = (props) => {
const { dispatch, actions, user, socket } = props
const [query, setQuery] = useState({ limit: 10, offset: 0 }); //
const [limits, setLimits] = useState(0)//
const [tableData, setTableData] = useState([]);
const [loading, setLoading] = useState(true);
const [workflowModalVisible, setWorkflowModalVisible] = useState(false)
const [processInstanceId, setProcessInstanceId] = useState(null)
const [params, setParams] = useState({})
useEffect(() => {
backlogData()
}, [])
let backlogData = (obj = { limit: 10, offset: 0 }) => {
setLoading(true)
EmisRequest.get(EmisApiTable.processInstancemMyDraftList,
{ userId: user?.id, businessType: '', ...obj })
.then(res => {
setTableData(res?.data)
setLimits(res.count || 0)
setLoading(false)
}, error => {
Toast.error({ content: '保存待发列表请求失败', duration: 1, })
setLoading(false)
});
}
let columns = [{
title: '序号',
dataIndex: 'index',
render: (text, record, index) => index + 1
}, {
title: '标题',
dataIndex: 'nae',
}, {
title: '关联项目',
dataIndex: 'nae',
}, {
title: '申请人',
dataIndex: 'applyerName',
render: (text, record, index) =>user?.name
}, {
title: '申请部门',
dataIndex: 'applyDepartmentName',
render: (text, record, index) =>user?.department[0]?.name
}, {
title: '审批状态',
dataIndex: 'apName',
}, {
title: '提交时间',
dataIndex: 'createAt',
render: (text, record, index) => text && moment(text).format('YYYY-MM-DD HH:mm:ss') || '--'
}, {
title: '期望完成时间',
dataIndex: 'nae',
}, {
title: '操作',
dataIndex: 'hadle',
render: (text, record, index) => <div style={{ width: 60, color: "#1890ff", cursor: "pointer" }} onClick={() => {
setProcessInstanceId(record.processInstanceId)
setWorkflowModalVisible(true)
}}>查看详情</div>
}]
return (
<>
<div style={{ background: '#FFFFFF', margin: '8px 12px', padding: '20px 20px 0px 20px' }}>
<div style={{ display: 'flex', alignItems: 'center', justifyContent: 'space-between' }}>
<div style={{ display: 'flex', alignItems: 'center' }}>
<div style={{ width: 0, height: 20, borderLeft: '3px solid #005ABD', borderTop: '3px solid transparent', borderBottom: '3px solid transparent' }}></div>
<div style={{ fontFamily: "YouSheBiaoTiHei", fontSize: 24, color: '#101531', marginLeft: 8 }}>保存待发</div>
<div style={{ marginLeft: 6, fontSize: 12, color: '#969799', fontFamily: "DINExp", }}>PRESERVE WORKORDER</div>
</div>
<div style={{ marginRight: 20, display: 'flex', alignItems: 'center' }} className='myempush'>
<Form
// getFormApi={(formApi) => (form.current = formApi)}
layout="horizontal"
style={{ position: "relative", width: "100%", flex: 1 }}
onSubmit={(values) => {
if (values?.applyTimes) {
values.applyTimes = [moment(values?.applyTimes[0]).format('YYYY-MM-DD HH:mm:ss'), moment(values?.applyTimes[1]).format('YYYY-MM-DD HH:mm:ss')]
}
backlogData({ ...values, limit: 10, page: 0 })
setQuery({ limit: 10, offset: 0 });
setLimits(0)
setParams({ ...values })
}}
>
<Form.DatePicker
pure
field="applyTimes"
label="提交时间"
style={{ width: 268 }}
type="dateRange" density="compact"
/>
{/* <Form.Input
suffix={<IconSearch />}
field="keywordsUser"
pure
showClear
style={{ width: 260, marginLeft: 12, marginRight: 12 }}
placeholder="请输入申请人"
/> */}
<Button theme='solid' type="primary" htmlType="submit">查询</Button>
</Form>
</div>
</div>
<div style={{ marginTop: 20 }}>
<Skeleton
loading={loading}
// loading={false}
active={true}
placeholder={SkeletonScreen()}
>
<Table
rowKey="name"
columns={columns}
dataSource={tableData}
bordered={false}
hideExpandedColumn={false}
empty="暂无数据"
pagination={false}
/>
</Skeleton>
<div
style={{
display: "flex",
justifyContent: "flex-end",
padding: "20px 20px",
}}
>
<div style={{ display: 'flex', }}>
<span style={{ lineHeight: "30px", fontSize: 13, color: 'rgba(0,90,189,0.8)' }}>
{limits}条工单
</span>
<Pagination
className="22"
total={limits}
showSizeChanger
currentPage={query.offset + 1}
pageSizeOpts={[10, 20, 30, 40]}
onChange={(currentPage, pageSize) => {
setQuery({ limit: pageSize, offset: currentPage - 1 });
backlogData({ ...params, limit: pageSize, offset: currentPage - 1 })
}}
/>
</div>
</div>
</div>
</div>
<WorkflowModal
visible={workflowModalVisible}
title={''}
processId={processInstanceId}
onCancel={() => { setWorkflowModalVisible(false) }}
successCallBack={() => { setWorkflowModalVisible(false) }}
/>
</>
)
}
function mapStateToProps (state) {
const { auth, global, members, webSocket } = state;
return {
// loading: members.isRequesting,
user: auth.user,
// actions: global.actions,
// members: members.data,
// socket: webSocket.socket
};
}
export default connect(mapStateToProps)(Rest);

181
web/client/src/sections/workOrder/containers/receipt.jsx

@ -1,21 +1,186 @@
import React, { useEffect } from 'react';
import React, { useEffect, useRef, useState } from 'react';
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, WorkflowModal } from "$components";
import moment from "moment";
const SetControl = (props) => {
const { dispatch, actions, user, loading, socket } = props
useEffect(() => {
const Rest = (props) => {
const { dispatch, actions, user, socket } = props
const [query, setQuery] = useState({ limit: 10, offset: 0 }); //
const [limits, setLimits] = useState(0)//
const [tableData, setTableData] = useState([]);
const [loading, setLoading] = useState(true);
const [workflowModalVisible, setWorkflowModalVisible] = useState(false)
const [processInstanceId, setProcessInstanceId] = useState(null)
const [params, setParams] = useState({})
useEffect(() => {
backlogData()
}, [])
let backlogData = (obj = { limit: 10, offset: 0 }) => {
setLoading(true)
EmisRequest.get(EmisApiTable.processInstancemMyDoneList,
{ userId: user?.id, businessType: '', ...obj })
.then(res => {
setTableData(res?.data)
setLoading(false)
}, error => {
Toast.error({ content: '已办工单列表请求失败', duration: 1, })
setLoading(false)
});
EmisRequest.get(EmisApiTable.processInstancemMyDoneCount,
{ userId: user?.id, businessType: '', ...obj, limit: "", offset: "" })
.then(res => {
setLimits(res.count || 0)
}, error => {
Toast.error({ content: '已办工单数量请求失败', duration: 1, })
});
}
let columns = [{
title: '序号',
dataIndex: 'index',
render: (text, record, index) => index + 1
}, {
title: '标题',
dataIndex: 'nae',
}, {
title: '关联项目',
dataIndex: 'nae',
}, {
title: '申请人',
dataIndex: 'application',
}, {
title: '申请部门',
dataIndex: 'applyDepartmentName',
}, {
title: '审批状态',
dataIndex: 'apName',
}, {
title: '提交时间',
dataIndex: 'submissionTime',
render: (text, record, index) => text && moment(text).format('YYYY-MM-DD HH:mm:ss') || '--'
}, {
title: '期望完成时间',
dataIndex: 'nae',
}, {
title: '操作',
dataIndex: 'hadle',
render: (text, record, index) => <div style={{ width: 60, color: "#1890ff", cursor: "pointer" }} onClick={() => {
setProcessInstanceId(record.processInstanceId)
setWorkflowModalVisible(true)
}}>查看详情</div>
}]
return (
<>
<div>
<img src="/assets/images/install/watting.png" alt="" style={{ width: 'calc(100% + 16px)', position: "relative", top: -12, left: -8, }} />
<div style={{ background: '#FFFFFF', margin: '8px 12px', padding: '20px 20px 0px 20px' }}>
<div style={{ display: 'flex', alignItems: 'center', justifyContent: 'space-between' }}>
<div style={{ display: 'flex', alignItems: 'center' }}>
<div style={{ width: 0, height: 20, borderLeft: '3px solid #005ABD', borderTop: '3px solid transparent', borderBottom: '3px solid transparent' }}></div>
<div style={{ fontFamily: "YouSheBiaoTiHei", fontSize: 24, color: '#101531', marginLeft: 8 }}>已办工单</div>
<div style={{ marginLeft: 6, fontSize: 12, color: '#969799', fontFamily: "DINExp", }}>ALREADY WORKORDER</div>
</div>
<div style={{ marginRight: 20, display: 'flex', alignItems: 'center' }} className='myempush'>
<Form
// getFormApi={(formApi) => (form.current = formApi)}
layout="horizontal"
style={{ position: "relative", width: "100%", flex: 1 }}
onSubmit={(values) => {
if (values?.applyTimes) {
values.applyTimes = [moment(values?.applyTimes[0]).format('YYYY-MM-DD HH:mm:ss'), moment(values?.applyTimes[1]).format('YYYY-MM-DD HH:mm:ss')]
}
backlogData({ ...values, limit: 10, page: 0 })
setQuery({ limit: 10, offset: 0 });
setLimits(0)
setParams({ ...values })
}}
>
<Form.DatePicker
pure
field="applyTimes"
label="提交时间"
style={{ width: 268 }}
type="dateRange" density="compact"
/>
<Form.Input
suffix={<IconSearch />}
field="keywordsUser"
pure
showClear
style={{ width: 260, marginLeft: 12, marginRight: 12 }}
placeholder="请输入申请人"
/>
<Button theme='solid' type="primary" htmlType="submit">查询</Button>
</Form>
</div>
</div>
<div style={{ marginTop: 20 }}>
<Skeleton
loading={loading}
// loading={false}
active={true}
placeholder={SkeletonScreen()}
>
<Table
rowKey="name"
columns={columns}
dataSource={tableData}
bordered={false}
hideExpandedColumn={false}
empty="暂无数据"
pagination={false}
/>
</Skeleton>
<div
style={{
display: "flex",
justifyContent: "flex-end",
padding: "20px 20px",
}}
>
<div style={{ display: 'flex', }}>
<span style={{ lineHeight: "30px", fontSize: 13, color: 'rgba(0,90,189,0.8)' }}>
{limits}条工单
</span>
<Pagination
className="22"
total={limits}
showSizeChanger
currentPage={query.offset + 1}
pageSizeOpts={[10, 20, 30, 40]}
onChange={(currentPage, pageSize) => {
setQuery({ limit: pageSize, offset: currentPage - 1 });
backlogData({ ...params, limit: pageSize, offset: currentPage - 1 })
}}
/>
</div>
</div>
</div>
</div>
<WorkflowModal
visible={workflowModalVisible}
title={''}
processId={processInstanceId}
onCancel={() => { setWorkflowModalVisible(false) }}
successCallBack={() => { setWorkflowModalVisible(false) }}
/>
</>
)
}
@ -24,11 +189,11 @@ function mapStateToProps (state) {
const { auth, global, members, webSocket } = state;
return {
// loading: members.isRequesting,
// user: auth.user,
user: auth.user,
// actions: global.actions,
// members: members.data,
// socket: webSocket.socket
};
}
export default connect(mapStateToProps)(SetControl);
export default connect(mapStateToProps)(Rest);

45
web/client/src/sections/workOrder/containers/stayDoWorkOrder.jsx

@ -13,18 +13,8 @@ import moment from "moment";
const Rest = (props) => {
const { dispatch, actions, user, socket } = props
const form = useRef();//
const [setup, setSetup] = useState(false); //
const [setupp, setSetupp] = useState([]);//
const [query, setQuery] = useState({ limit: 10, page: 0 }); //
const [limits, setLimits] = useState(0)//
const mylimits = useRef(); //
const [pushModal, setPushModal] = useState(false) //
const [pushEdit, setPushEdit] = useState(false) //
const [change, setChange] = useState(false) //
const [allTableData, setAllTableData] = useState([]) //
const [editObj, setEditObj] = useState({});//
const [projectStatus, setProjectStatus] = useState([]); //
const [tableData, setTableData] = useState([]); //
const [loading, setLoading] = useState(true); //
const [workflowModalVisible, setWorkflowModalVisible] = useState(false)
@ -36,16 +26,15 @@ const Rest = (props) => {
backlogData()
}, [])
let backlogData = () => {
let backlogData = (obj = {}) => {
setLoading(true)
EmisRequest.get(EmisApiTable.processInstancemMyAuditList,
{ userId: user?.id, businessType: '运维中台表单', })
{ userId: user?.id, businessType: '', ...obj })
.then(res => {
console.log(111, res);
setTableData(res)
setLimits(res.length || 0)
setLoading(false)
}, error => {
Toast.error({ content: '待办工单请求失败', duration: 1, })
setLoading(false)
@ -100,7 +89,12 @@ const Rest = (props) => {
layout="horizontal"
style={{ position: "relative", width: "100%", flex: 1 }}
onSubmit={(values) => {
console.log(values)
if (values?.applyTimes) {
values.applyTimes = [moment(values?.applyTimes[0]).format('YYYY-MM-DD HH:mm:ss'), moment(values?.applyTimes[1]).format('YYYY-MM-DD HH:mm:ss')]
}
backlogData(values)
setQuery({ limit: 10, page: 0 });
setLimits(0)
}}
>
<Form.DatePicker
@ -112,26 +106,13 @@ const Rest = (props) => {
/>
<Form.Input
suffix={<IconSearch />}
field="keyword"
field="keywordsUser"
pure
showClear
style={{ width: 260, marginLeft: 12, marginRight: 12 }}
placeholder="请输入申请人"
/>
<Button
type="primary" htmlType="submit"
style={{
width: 80,
height: 32,
borderRadius: 2,
marginRight: 32,
background: '#FFFFFF',
color: '#005ABD',
border: '1px solid #005ABD'
}}
>
查询
</Button>
<Button theme='solid' type="primary" htmlType="submit">查询</Button>
</Form>
</div>
</div>
@ -165,7 +146,7 @@ const Rest = (props) => {
</div>
<div style={{ display: 'flex', }}>
<span style={{ lineHeight: "30px", fontSize: 13, color: 'rgba(0,90,189,0.8)' }}>
{limits}信息
{limits}工单
</span>
<Pagination
className="22"
@ -196,7 +177,7 @@ function mapStateToProps (state) {
const { auth, global, members, webSocket } = state;
return {
// loading: members.isRequesting,
// user: auth.user,
user: auth.user,
// actions: global.actions,
// members: members.data,
// socket: webSocket.socket

6
web/client/src/sections/workOrder/nav-item.jsx

@ -22,12 +22,14 @@ export function getNavItem (user, dispatch) {
items: [{
itemKey: 'stayDoWorkOrder', to: '/workOrder/workOrderList/stayDoWorkOrder', text: '待办工单'
},{
itemKey: 'initiated', to: '/workOrder/workOrderList/initiated', text: '由发起'
itemKey: 'initiated', to: '/workOrder/workOrderList/initiated', text: '由发起'
},{
itemKey: 'receipt', to: '/workOrder/workOrderList/already ', text: '已办工单'
},{
itemKey: 'aboutMe', to: '/workOrder/workOrderList/aboutMe', text: '抄送我'
}]
},{
itemKey: 'preserve', to: '/workOrder/workOrderList/preserve', text: '保存待发'
}]
}
]
},

11
web/client/src/sections/workOrder/routes.js

@ -1,4 +1,4 @@
import { JobOrder, StayDoWorkOrder, Initiated, Receipt, AboutMe } from './containers';
import { JobOrder, StayDoWorkOrder, Initiated, Receipt, AboutMe,Preserve } from './containers';
export default [{
type: 'inner',
@ -25,7 +25,7 @@ export default [{
path: '/initiated',
key: 'initiated',
component: Initiated,
breadcrumb: '由发起',
breadcrumb: '由发起',
}, {
path: '/already ',
key: 'already ',
@ -36,7 +36,12 @@ export default [{
key: 'aboutMe',
component: AboutMe,
breadcrumb: '与我有关的',
},]
}, {
path: '/preserve',
key: 'preserve',
component: Preserve,
breadcrumb: '保存待发',
}]
}]
}
}];

10
web/client/src/utils/webapi.js

@ -87,8 +87,14 @@ export const EmisApiTable = {
//通过流程名称查找指定流程
getProcessByName: 'workflow/process/name',
processInstancemMyApplyList: 'process-instance/my-apply-list',
processInstancemMyAuditList: 'process-instance/my-audit-list',
processInstancemMyApplyList: 'process-instance/my-apply-list', //待办工单
processInstancemMyAuditList: 'process-instance/my-audit-list', //由我发起
processInstancemMyDoneList: 'process-instance/my-done-list/optimization', //已办工单
processInstancemMyDoneCount: 'process-instance/my-done-count/optimization', //已办工单数量
processInstancemMyNoticeList: 'process-instance/my-notice-list/optimization', //抄送我
processInstancemMyNoticeCount: 'process-instance/my-notice-count/optimization', //抄送我 数量
processInstancemMyDraftList: 'process-instance/my-draft-list', //保存待发
//删除草稿
delDraftUrl: 'process/drafts/{draftId}',
}

Loading…
Cancel
Save