diff --git a/web/client/src/sections/workOrder/containers/stayDoWorkOrder.jsx b/web/client/src/sections/workOrder/containers/stayDoWorkOrder.jsx index f3bccd2..c3249ad 100644 --- a/web/client/src/sections/workOrder/containers/stayDoWorkOrder.jsx +++ b/web/client/src/sections/workOrder/containers/stayDoWorkOrder.jsx @@ -1,37 +1,187 @@ -import React, { useEffect } from 'react'; +import React, { useEffect, useRef, useState } from 'react'; import { connect } from 'react-redux'; -import { ApiTable, AxyRequest, EmisRequest } from '$utils' +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 moment from "moment"; + + const Rest = (props) => { - const { dispatch, actions, user, loading, socket } = 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); //获取项目状态列表 useEffect(() => { - EmisRequest.get('process-instance/my-apply-list', - { userId: 1, offset: 0, limit: 10,businessType:'假勤管理' }) - .then(user => { - // sessionStorage.setItem('pomsUser', JSON.stringify(user)); - // return dispatch({ - // type: LOGIN_SUCCESS, - // payload: { user: user }, - // }); - }, error => { - // let { body } = error.response; - // return dispatch({ - // type: LOGIN_ERROR, - // payload: { - // error: body && body.message ? body.message : '登录失败' - // } - // }) - }); + backlogData() }, []) + let backlogData = () => { + setLoading(true) + EmisRequest.get(EmisApiTable.processInstancemMyAuditList, + { userId: 1, offset: 0, limit: 10, 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) + + }); + } + + 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: 'startTime', + render: (text, record, index) => text && moment(text).format('YYYY-MM-DD HH:mm:ss') || '--' + }, { + title: '期望完成时间', + dataIndex: 'nae', + }, { + title: '操作', + dataIndex: 'hadle', + }] return ( <> -