Browse Source

更改工单列表展示字段

dev
巴林闲侠 2 years ago
parent
commit
6a248a5a43
  1. 6
      api/app/lib/controllers/organization/index.js
  2. 2
      api/app/lib/routes/organization/index.js
  3. 162
      web/client/src/sections/service/actions/emPush.js
  4. 87
      web/client/src/sections/workOrder/containers/aboutMe.jsx
  5. 86
      web/client/src/sections/workOrder/containers/initiated.jsx
  6. 86
      web/client/src/sections/workOrder/containers/preserve.jsx
  7. 85
      web/client/src/sections/workOrder/containers/receipt.jsx
  8. 86
      web/client/src/sections/workOrder/containers/stayDoWorkOrder.jsx
  9. 17
      web/client/src/utils/parseProcessData.js
  10. 2
      web/client/src/utils/webapi.js

6
api/app/lib/controllers/organization/index.js

@ -26,10 +26,10 @@ async function allUsers (ctx) {
try { try {
const { models } = ctx.fs.dc; const { models } = ctx.fs.dc;
const { clickHouse } = ctx.app.fs const { clickHouse } = ctx.app.fs
const { includeDel } = ctx.query
const userRes = await clickHouse.pepEmis.query(` const userRes = await clickHouse.pepEmis.query(`
SELECT id, name FROM user SELECT id, name FROM user ${includeDel ? '' : `WHERE delete = '0'`}
WHERE delete = '0'
`).toPromise() `).toPromise()
ctx.status = 200; ctx.status = 200;
@ -90,7 +90,7 @@ async function editUser (ctx) {
storageData.disabled = true storageData.disabled = true
storageData.deleted = false storageData.deleted = false
storageData.role = [...role, 'admin'] storageData.role = [...role, 'admin']
}else{ } else {
storageData.deleted = false storageData.deleted = false
} }
await models.User.update(storageData, { await models.User.update(storageData, {

2
api/app/lib/routes/organization/index.js

@ -5,7 +5,7 @@ module.exports = function (app, router, opts) {
app.fs.api.logAttr['GET/organization/deps'] = { content: '获取全部部门及其下用户', visible: true }; app.fs.api.logAttr['GET/organization/deps'] = { content: '获取全部部门及其下用户', visible: true };
router.get('/organization/deps', organization.allDeps); router.get('/organization/deps', organization.allDeps);
app.fs.api.logAttr['GET/organization/users'] = { content: '获取全部未删除用户', visible: true }; app.fs.api.logAttr['GET/organization/users'] = { content: '获取全部用户', visible: true };
router.get('/organization/users', organization.allUsers); router.get('/organization/users', organization.allUsers);
app.fs.api.logAttr['POST/organization/user'] = { content: '编辑成员', visible: true }; app.fs.api.logAttr['POST/organization/user'] = { content: '编辑成员', visible: true };

162
web/client/src/sections/service/actions/emPush.js

@ -3,91 +3,105 @@
import { ApiTable, basicAction } from '$utils' import { ApiTable, basicAction } from '$utils'
export function getPush (query) { //获取推送配置列表 export function getPush (query) { //获取推送配置列表
return dispatch => basicAction({ return dispatch => basicAction({
type: 'get', type: 'get',
dispatch: dispatch, dispatch: dispatch,
query: query, query: query,
actionType: 'GET_PUSH', actionType: 'GET_PUSH',
url: `${ApiTable.getPush}`, url: `${ApiTable.getPush}`,
msg: { error: '获取推送配置列表失败' }, msg: { error: '获取推送配置列表失败' },
reducer: { name: "getPush", params: { noClear: true } }, reducer: { name: "getPush", params: { noClear: true } },
}); });
} }
export function postPush (data) {//添加/编辑成员 export function postPush (data) {//添加/编辑成员
let msg = '' let msg = ''
if (data) { if (data) {
msg = data.msg msg = data.msg
} }
return (dispatch) => return (dispatch) =>
basicAction({ basicAction({
type: "post", type: "post",
dispatch: dispatch, dispatch: dispatch,
data, data,
actionType: "POST_PUSH", actionType: "POST_PUSH",
url: `${ApiTable.postPush}`, url: `${ApiTable.postPush}`,
msg: { option: msg }, //添加/编辑成员 msg: { option: msg }, //添加/编辑成员
reducer: { name: "" }, reducer: { name: "" },
}); });
} }
export function getOrganizationUsers () { //获取全部未删除用户 export function getOrganizationUsers () { //获取全部未删除用户
return dispatch => basicAction({ return dispatch => basicAction({
type: 'get', type: 'get',
dispatch: dispatch, dispatch: dispatch,
actionType: 'GET_ORGANIZATION_USERS', actionType: 'GET_ORGANIZATION_USERS',
url: `${ApiTable.getOrganizationUsers}`, url: `${ApiTable.getOrganizationUsers}`,
msg: { error: '获取全部未删除用户' }, msg: { error: '获取全部未删除用户' },
reducer: { name: '' } reducer: { name: 'allPepUsers' }
}); });
}
export function getOrganizationUsersIncludeDeleted () {
return dispatch => basicAction({
type: 'get',
dispatch: dispatch,
query: {
includeDel: true
},
actionType: 'GET_ORGANIZATION_USERS_INCLUDE_DELETED',
url: `${ApiTable.getOrganizationUsers}`,
msg: { error: '获取全部用户' },
reducer: { name: 'allPepUsersIncludeDel' }
});
} }
export function getProjectPoms (query) {//获取已绑定项目 export function getProjectPoms (query) {//获取已绑定项目
return (dispatch) => basicAction({ return (dispatch) => basicAction({
type: "get", type: "get",
dispatch: dispatch, dispatch: dispatch,
actionType: "GET_PROJECT_POMS", actionType: "GET_PROJECT_POMS",
query: query, query: query,
url: `${ApiTable.getProjectPoms}`, url: `${ApiTable.getProjectPoms}`,
msg: { option: "获取已绑定项目" }, msg: { option: "获取已绑定项目" },
reducer: { name: "ProjectPoms", params: { noClear: true } }, reducer: { name: "ProjectPoms", params: { noClear: true } },
}); });
} }
export function getProjectStructure (query) {//获取绑定项目下结构物 export function getProjectStructure (query) {//获取绑定项目下结构物
return (dispatch) => basicAction({ return (dispatch) => basicAction({
type: "get", type: "get",
dispatch: dispatch, dispatch: dispatch,
actionType: "GET_PROJECT_STRUCTURE", actionType: "GET_PROJECT_STRUCTURE",
query: query, query: query,
url: `${ApiTable.getProjectStructure}`, url: `${ApiTable.getProjectStructure}`,
msg: { option: "获取绑定项目下结构物" }, msg: { option: "获取绑定项目下结构物" },
reducer: { name: "ProjectStructure", params: { noClear: true } }, reducer: { name: "ProjectStructure", params: { noClear: true } },
}); });
} }
export function getProjectStatus (query) {//获取项目状态列表 export function getProjectStatus (query) {//获取项目状态列表
return (dispatch) => basicAction({ return (dispatch) => basicAction({
type: "get", type: "get",
dispatch: dispatch, dispatch: dispatch,
actionType: "GET_PROJECT_STATUS", actionType: "GET_PROJECT_STATUS",
query: query, query: query,
url: `${ApiTable.getProjectStatus}`, url: `${ApiTable.getProjectStatus}`,
msg: { option: "获取项目状态列表" }, msg: { option: "获取项目状态列表" },
reducer: { name: "ProjectStatus", params: { noClear: true } }, reducer: { name: "ProjectStatus", params: { noClear: true } },
}); });
} }
export function putPushPushId (data) {//更改推送配置状态(禁用或删除) export function putPushPushId (data) {//更改推送配置状态(禁用或删除)
let pushId = '' let pushId = ''
let msg = '' let msg = ''
if (data) { if (data) {
pushId = data.pushId pushId = data.pushId
msg = data.msg msg = data.msg
} }
return (dispatch) => return (dispatch) =>
basicAction({ basicAction({
type: "put", type: "put",
dispatch: dispatch, dispatch: dispatch,
data, data,
actionType: "PUT_PUSH_PUSHID", actionType: "PUT_PUSH_PUSHID",
url: `${ApiTable.putPushPushId.replace("{pushId}", pushId)}`, url: `${ApiTable.putPushPushId.replace("{pushId}", pushId)}`,
msg: { option: msg }, //更改推送配置状态(禁用或删除) msg: { option: msg }, //更改推送配置状态(禁用或删除)
reducer: {}, reducer: {},
}); });
} }

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

@ -7,8 +7,8 @@ import { SkeletonScreen, WorkflowApprovalModal } from "$components";
import moment from "moment"; import moment from "moment";
const Rest = (props) => { const Rest = (props) => {
const { dispatch, actions, user, socket, pomsProjectBasicAll } = props const { dispatch, actions, user, socket, pomsProjectBasicAll, allPepUsersIncludeDel } = props
const { workOrder } = actions const { workOrder, service } = actions
const [query, setQuery] = useState({ limit: 10, offset: 0 }); // const [query, setQuery] = useState({ limit: 10, offset: 0 }); //
const [limits, setLimits] = useState(0)// const [limits, setLimits] = useState(0)//
const [tableData, setTableData] = useState([]); const [tableData, setTableData] = useState([]);
@ -23,6 +23,9 @@ const Rest = (props) => {
if (!pomsProjectBasicAll.length) { if (!pomsProjectBasicAll.length) {
dispatch(workOrder.getPomsProjectBasicAll()) dispatch(workOrder.getPomsProjectBasicAll())
} }
if (!allPepUsersIncludeDel.length) {
dispatch(service.getOrganizationUsersIncludeDeleted())
}
}, []) }, [])
let backlogData = (obj = { limit: 10, offset: 0 }) => { let backlogData = (obj = { limit: 10, offset: 0 }) => {
@ -68,11 +71,18 @@ const Rest = (props) => {
title: '序号', title: '序号',
dataIndex: 'index', dataIndex: 'index',
render: (text, record, index) => index + 1 render: (text, record, index) => index + 1
},
{
title: '项目名称',
dataIndex: 'pomsProject',
render: (text, record, index) => {
return record?.pomsNeedData?.projectName?.value || ''
}
}, { }, {
title: '标题', title: '申请内容描述',
dataIndex: 'title', dataIndex: 'applyContent',
render: (text, record, index) => { render: (text, record, index) => {
return record?.pomsNeedData?.title?.value || '' return record?.pomsNeedData?.applyContent?.value || ''
} }
}, },
// { // {
@ -88,13 +98,7 @@ const Rest = (props) => {
// } // }
// } // }
// }, // },
{
title: '项目名称',
dataIndex: 'pomsProject',
render: (text, record, index) => {
return record?.pomsNeedData?.projectName?.value || ''
}
},
{ {
title: '申请人', title: '申请人',
dataIndex: 'applyerName', dataIndex: 'applyerName',
@ -107,17 +111,51 @@ const Rest = (props) => {
render: (text, record) => { render: (text, record) => {
return judgmentProcessState(record, 'copy') return judgmentProcessState(record, 'copy')
}, },
}, { },
title: '提交时间',
dataIndex: 'startTime', {
render: (text, record, index) => text && moment(text).add(8, 'hours').format('YYYY-MM-DD HH:mm:ss') || '--' title: '处理人员',
}, { dataIndex: 'handlingPerson',
title: '期望完成时间',
dataIndex: 'expectTime',
render: (text, record, index) => { render: (text, record, index) => {
return record?.pomsNeedData?.expectTime?.value || '' // users
return record?.pomsNeedData?.handlingPerson?.value ? allPepUsersIncludeDel.find(u => u.id == record?.pomsNeedData?.handlingPerson?.value)?.name : ''
} }
}, { },
{
title: '处理结果',
dataIndex: 'handlingResult',
render: (text, record, index) => {
return record?.pomsNeedData?.handlingResult?.value || ''
}
},
{
title: '问题类型',
dataIndex: 'issueType',
render: (text, record, index) => {
return record?.pomsNeedData?.issueType?.value || ''
}
},
{
title: '处理完成时间',
dataIndex: 'completionTime',
render: (text, record, index) => {
return record?.pomsNeedData?.completionTime?.value || ''
}
},
// {
// title: '',
// dataIndex: 'startTime',
// render: (text, record, index) => text && moment(text).add(8, 'hours').format('YYYY-MM-DD HH:mm:ss') || '--'
// },
// {
// title: '',
// dataIndex: 'expectTime',
// render: (text, record, index) => {
// return record?.pomsNeedData?.expectTime?.value || ''
// }
// },
{
title: '操作', title: '操作',
dataIndex: 'hadle', dataIndex: 'hadle',
render: (text, record, index) => <div style={{ width: 60, color: "#1890ff", cursor: "pointer" }} onClick={() => { render: (text, record, index) => <div style={{ width: 60, color: "#1890ff", cursor: "pointer" }} onClick={() => {
@ -184,7 +222,7 @@ const Rest = (props) => {
columns={columns} columns={columns}
dataSource={tableData} dataSource={tableData}
bordered={false} bordered={false}
hideExpandedColumn={false} hideExpandedColumn={true}
empty="暂无数据" empty="暂无数据"
pagination={false} pagination={false}
/> />
@ -234,11 +272,12 @@ const Rest = (props) => {
} }
function mapStateToProps (state) { function mapStateToProps (state) {
const { auth, global, pomsProjectBasicAll } = state; const { auth, global, pomsProjectBasicAll, allPepUsersIncludeDel } = state;
return { return {
user: auth.user, user: auth.user,
actions: global.actions, actions: global.actions,
pomsProjectBasicAll: pomsProjectBasicAll.data || [] pomsProjectBasicAll: pomsProjectBasicAll.data || [],
allPepUsersIncludeDel: allPepUsersIncludeDel.data || [],
}; };
} }

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

@ -6,8 +6,8 @@ import { SkeletonScreen, WorkflowApprovalModal, } from "$components";
import moment from "moment"; import moment from "moment";
const Rest = (props) => { const Rest = (props) => {
const { dispatch, actions, user, socket, pomsProjectBasicAll } = props const { dispatch, actions, user, socket, pomsProjectBasicAll, allPepUsersIncludeDel } = props
const { workOrder } = actions const { workOrder, service } = actions
const [query, setQuery] = useState({ limit: 10, offset: 0 }); // const [query, setQuery] = useState({ limit: 10, offset: 0 }); //
const [limits, setLimits] = useState(0)// const [limits, setLimits] = useState(0)//
const [tableData, setTableData] = useState([]); const [tableData, setTableData] = useState([]);
@ -22,6 +22,9 @@ const Rest = (props) => {
if (!pomsProjectBasicAll.length) { if (!pomsProjectBasicAll.length) {
dispatch(workOrder.getPomsProjectBasicAll()) dispatch(workOrder.getPomsProjectBasicAll())
} }
if (!allPepUsersIncludeDel.length) {
dispatch(service.getOrganizationUsersIncludeDeleted())
}
}, []) }, [])
let backlogData = (obj = { limit: 10, offset: 0 }) => { let backlogData = (obj = { limit: 10, offset: 0 }) => {
@ -61,10 +64,16 @@ const Rest = (props) => {
dataIndex: 'index', dataIndex: 'index',
render: (text, record, index) => index + 1 render: (text, record, index) => index + 1
}, { }, {
title: '标题', title: '项目名称',
dataIndex: 'title', dataIndex: 'pomsProject',
render: (text, record, index) => {
return record?.pomsNeedData?.projectName?.value || ''
}
}, {
title: '申请内容描述',
dataIndex: 'applyContent',
render: (text, record, index) => { render: (text, record, index) => {
return record?.pomsNeedData?.title?.value || '' return record?.pomsNeedData?.applyContent?.value || ''
} }
}, },
// { // {
@ -80,13 +89,7 @@ const Rest = (props) => {
// } // }
// } // }
// }, // },
{
title: '项目名称',
dataIndex: 'pomsProject',
render: (text, record, index) => {
return record?.pomsNeedData?.projectName?.value || ''
}
},
{ {
title: '申请人', title: '申请人',
dataIndex: 'applyerName', dataIndex: 'applyerName',
@ -99,17 +102,50 @@ const Rest = (props) => {
render: (text, record) => { render: (text, record) => {
return judgmentProcessState(record, 'initiate') return judgmentProcessState(record, 'initiate')
}, },
}, { },
title: '提交时间',
dataIndex: 'submissionTime', {
render: (text, record, index) => text && moment(text).add(8, 'hours').format('YYYY-MM-DD HH:mm:ss') || '--' title: '处理人员',
}, { dataIndex: 'handlingPerson',
title: '期望完成时间',
dataIndex: 'expectTime',
render: (text, record, index) => { render: (text, record, index) => {
return record?.pomsNeedData?.expectTime?.value || '' // users
return record?.pomsNeedData?.handlingPerson?.value ? allPepUsersIncludeDel.find(u => u.id == record?.pomsNeedData?.handlingPerson?.value)?.name : ''
} }
}, { },
{
title: '处理结果',
dataIndex: 'handlingResult',
render: (text, record, index) => {
return record?.pomsNeedData?.handlingResult?.value || ''
}
},
{
title: '问题类型',
dataIndex: 'issueType',
render: (text, record, index) => {
return record?.pomsNeedData?.issueType?.value || ''
}
},
{
title: '处理完成时间',
dataIndex: 'completionTime',
render: (text, record, index) => {
return record?.pomsNeedData?.completionTime?.value || ''
}
},
// {
// title: '',
// dataIndex: 'submissionTime',
// render: (text, record, index) => text && moment(text).add(8, 'hours').format('YYYY-MM-DD HH:mm:ss') || '--'
// }, {
// title: '',
// dataIndex: 'expectTime',
// render: (text, record, index) => {
// return record?.pomsNeedData?.expectTime?.value || ''
// }
// },
{
title: '操作', title: '操作',
dataIndex: 'hadle', dataIndex: 'hadle',
render: (text, record, index) => { render: (text, record, index) => {
@ -119,7 +155,6 @@ const Rest = (props) => {
record.variables.find(t => t.name == 'fsLastActionTime') ? record.variables.find(t => t.name == 'fsLastActionTime') ?
moment.unix(record.variables.find(t => t.name == 'fsLastActionTime').value).format('YYYY-MM-DD HH:mm:ss') moment.unix(record.variables.find(t => t.name == 'fsLastActionTime').value).format('YYYY-MM-DD HH:mm:ss')
: ''; : '';
console.log(reviewTime);
let tooltipTitle = ''; let tooltipTitle = '';
if (record.processDeleted) { if (record.processDeleted) {
tooltipTitle = '该表单流程已删除,不支持重新发起'; tooltipTitle = '该表单流程已删除,不支持重新发起';
@ -239,7 +274,7 @@ const Rest = (props) => {
columns={columns} columns={columns}
dataSource={tableData} dataSource={tableData}
bordered={false} bordered={false}
hideExpandedColumn={false} hideExpandedColumn={true}
empty="暂无数据" empty="暂无数据"
pagination={false} pagination={false}
/> />
@ -289,11 +324,12 @@ const Rest = (props) => {
} }
function mapStateToProps (state) { function mapStateToProps (state) {
const { auth, global, pomsProjectBasicAll } = state; const { auth, global, pomsProjectBasicAll , allPepUsersIncludeDel} = state;
return { return {
user: auth.user, user: auth.user,
actions: global.actions, actions: global.actions,
pomsProjectBasicAll: pomsProjectBasicAll.data || [] pomsProjectBasicAll: pomsProjectBasicAll.data || [],
allPepUsersIncludeDel: allPepUsersIncludeDel.data || [],
}; };
} }

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

@ -7,8 +7,8 @@ import { SkeletonScreen, WorkflowApprovalModal } from "$components";
import moment from "moment"; import moment from "moment";
const Rest = (props) => { const Rest = (props) => {
const { dispatch, actions, user, socket, pomsProjectBasicAll } = props const { dispatch, actions, user, socket, pomsProjectBasicAll, allPepUsersIncludeDel } = props
const { workOrder } = actions const { workOrder, service } = actions
const [query, setQuery] = useState({ limit: 10, offset: 0 }); // const [query, setQuery] = useState({ limit: 10, offset: 0 }); //
const [limits, setLimits] = useState(0)// const [limits, setLimits] = useState(0)//
const [tableData, setTableData] = useState([]); const [tableData, setTableData] = useState([]);
@ -22,6 +22,9 @@ const Rest = (props) => {
if (!pomsProjectBasicAll.length) { if (!pomsProjectBasicAll.length) {
dispatch(workOrder.getPomsProjectBasicAll()) dispatch(workOrder.getPomsProjectBasicAll())
} }
if (!allPepUsersIncludeDel.length) {
dispatch(service.getOrganizationUsersIncludeDeleted())
}
}, []) }, [])
let backlogData = (obj = { limit: 10, offset: 0 }) => { let backlogData = (obj = { limit: 10, offset: 0 }) => {
@ -60,10 +63,16 @@ const Rest = (props) => {
dataIndex: 'index', dataIndex: 'index',
render: (text, record, index) => index + 1 render: (text, record, index) => index + 1
}, { }, {
title: '标题', title: '项目名称',
dataIndex: 'title', dataIndex: 'pomsProject',
render: (text, record, index) => { render: (text, record, index) => {
return record?.pomsNeedData?.title?.value || '' return record?.pomsNeedData?.projectName?.value || ''
}
}, {
title: '申请内容描述',
dataIndex: 'applyContent',
render: (text, record, index) => {
return record?.pomsNeedData?.applyContent?.value || ''
} }
}, },
// { // {
@ -79,13 +88,7 @@ const Rest = (props) => {
// } // }
// } // }
// }, // },
{
title: '项目名称',
dataIndex: 'pomsProject',
render: (text, record, index) => {
return record?.pomsNeedData?.projectName?.value || ''
}
},
{ {
title: '申请人', title: '申请人',
dataIndex: 'applyerName', dataIndex: 'applyerName',
@ -100,17 +103,51 @@ const Rest = (props) => {
render: (text, record) => { render: (text, record) => {
return judgmentProcessState({ state: processState.wait }, 'save') return judgmentProcessState({ state: processState.wait }, 'save')
}, },
}, { },
title: '提交时间',
dataIndex: 'createAt', {
render: (text, record, index) => text && moment(text).format('YYYY-MM-DD HH:mm:ss') || '--' title: '处理人员',
}, { dataIndex: 'handlingPerson',
title: '期望完成时间',
dataIndex: 'expectTime',
render: (text, record, index) => { render: (text, record, index) => {
return record?.pomsNeedData?.expectTime?.value || '' // users
return record?.pomsNeedData?.handlingPerson?.value ? allPepUsersIncludeDel.find(u => u.id == record?.pomsNeedData?.handlingPerson?.value)?.name : ''
} }
}, { },
{
title: '处理结果',
dataIndex: 'handlingResult',
render: (text, record, index) => {
return record?.pomsNeedData?.handlingResult?.value || ''
}
},
{
title: '问题类型',
dataIndex: 'issueType',
render: (text, record, index) => {
return record?.pomsNeedData?.issueType?.value || ''
}
},
{
title: '处理完成时间',
dataIndex: 'completionTime',
render: (text, record, index) => {
return record?.pomsNeedData?.completionTime?.value || ''
}
},
// {
// title: '',
// dataIndex: 'createAt',
// render: (text, record, index) => text && moment(text).format('YYYY-MM-DD HH:mm:ss') || '--'
// },
// {
// title: '',
// dataIndex: 'expectTime',
// render: (text, record, index) => {
// return record?.pomsNeedData?.expectTime?.value || ''
// }
// },
{
title: '操作', title: '操作',
dataIndex: 'hadle', dataIndex: 'hadle',
render: (text, record, index) => { render: (text, record, index) => {
@ -196,7 +233,7 @@ const Rest = (props) => {
columns={columns} columns={columns}
dataSource={tableData} dataSource={tableData}
bordered={false} bordered={false}
hideExpandedColumn={false} hideExpandedColumn={true}
empty="暂无数据" empty="暂无数据"
pagination={false} pagination={false}
/> />
@ -246,11 +283,12 @@ const Rest = (props) => {
} }
function mapStateToProps (state) { function mapStateToProps (state) {
const { auth, global, pomsProjectBasicAll } = state; const { auth, global, pomsProjectBasicAll, allPepUsersIncludeDel } = state;
return { return {
user: auth.user, user: auth.user,
actions: global.actions, actions: global.actions,
pomsProjectBasicAll: pomsProjectBasicAll.data || [] pomsProjectBasicAll: pomsProjectBasicAll.data || [],
allPepUsersIncludeDel: allPepUsersIncludeDel.data || [],
}; };
} }

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

@ -7,8 +7,8 @@ import { SkeletonScreen, WorkflowApprovalModal } from "$components";
import moment from "moment"; import moment from "moment";
const Rest = (props) => { const Rest = (props) => {
const { dispatch, actions, user, socket, pomsProjectBasicAll } = props const { dispatch, actions, user, socket, pomsProjectBasicAll, allPepUsersIncludeDel } = props
const { workOrder } = actions const { workOrder, service } = actions
const [query, setQuery] = useState({ limit: 10, offset: 0 }); // const [query, setQuery] = useState({ limit: 10, offset: 0 }); //
const [limits, setLimits] = useState(0)// const [limits, setLimits] = useState(0)//
const [tableData, setTableData] = useState([]); const [tableData, setTableData] = useState([]);
@ -22,6 +22,9 @@ const Rest = (props) => {
if (!pomsProjectBasicAll.length) { if (!pomsProjectBasicAll.length) {
dispatch(workOrder.getPomsProjectBasicAll()) dispatch(workOrder.getPomsProjectBasicAll())
} }
if (!allPepUsersIncludeDel.length) {
dispatch(service.getOrganizationUsersIncludeDeleted())
}
}, []) }, [])
let backlogData = (obj = { limit: 10, offset: 0 }) => { let backlogData = (obj = { limit: 10, offset: 0 }) => {
@ -72,10 +75,16 @@ const Rest = (props) => {
dataIndex: 'index', dataIndex: 'index',
render: (text, record, index) => index + 1 render: (text, record, index) => index + 1
}, { }, {
title: '标题', title: '项目名称',
dataIndex: 'title', dataIndex: 'pomsProject',
render: (text, record, index) => {
return record?.pomsNeedData?.projectName?.value || ''
}
}, {
title: '申请内容描述',
dataIndex: 'applyContent',
render: (text, record, index) => { render: (text, record, index) => {
return record?.pomsNeedData?.title?.value || '' return record?.pomsNeedData?.applyContent?.value || ''
} }
}, },
// { // {
@ -91,13 +100,7 @@ const Rest = (props) => {
// } // }
// } // }
// }, // },
{
title: '项目名称',
dataIndex: 'pomsProject',
render: (text, record, index) => {
return record?.pomsNeedData?.projectName?.value || ''
}
},
{ {
title: '申请人', title: '申请人',
dataIndex: 'application', dataIndex: 'application',
@ -110,17 +113,50 @@ const Rest = (props) => {
render: (text, record) => { render: (text, record) => {
return judgmentProcessState(record, 'done') return judgmentProcessState(record, 'done')
}, },
}, { },
title: '提交时间',
dataIndex: 'submissionTime', {
render: (text, record, index) => text && moment(text).add(8, 'hours').format('YYYY-MM-DD HH:mm:ss') || '--' title: '处理人员',
}, { dataIndex: 'handlingPerson',
title: '期望完成时间',
dataIndex: 'expectTime',
render: (text, record, index) => { render: (text, record, index) => {
return record?.pomsNeedData?.expectTime?.value || '' // users
return record?.pomsNeedData?.handlingPerson?.value ? allPepUsersIncludeDel.find(u => u.id == record?.pomsNeedData?.handlingPerson?.value)?.name : ''
} }
}, { },
{
title: '处理结果',
dataIndex: 'handlingResult',
render: (text, record, index) => {
return record?.pomsNeedData?.handlingResult?.value || ''
}
},
{
title: '问题类型',
dataIndex: 'issueType',
render: (text, record, index) => {
return record?.pomsNeedData?.issueType?.value || ''
}
},
{
title: '处理完成时间',
dataIndex: 'completionTime',
render: (text, record, index) => {
return record?.pomsNeedData?.completionTime?.value || ''
}
},
// {
// title: '',
// dataIndex: 'submissionTime',
// render: (text, record, index) => text && moment(text).add(8, 'hours').format('YYYY-MM-DD HH:mm:ss') || '--'
// }, {
// title: '',
// dataIndex: 'expectTime',
// render: (text, record, index) => {
// return record?.pomsNeedData?.expectTime?.value || ''
// }
// },
{
title: '操作', title: '操作',
dataIndex: 'hadle', dataIndex: 'hadle',
render: (text, record, index) => <div style={{ width: 60, color: "#1890ff", cursor: "pointer" }} onClick={() => { render: (text, record, index) => <div style={{ width: 60, color: "#1890ff", cursor: "pointer" }} onClick={() => {
@ -187,7 +223,7 @@ const Rest = (props) => {
columns={columns} columns={columns}
dataSource={tableData} dataSource={tableData}
bordered={false} bordered={false}
hideExpandedColumn={false} hideExpandedColumn={true}
empty="暂无数据" empty="暂无数据"
pagination={false} pagination={false}
/> />
@ -237,11 +273,12 @@ const Rest = (props) => {
} }
function mapStateToProps (state) { function mapStateToProps (state) {
const { auth, global, pomsProjectBasicAll } = state; const { auth, global, pomsProjectBasicAll, allPepUsersIncludeDel } = state;
return { return {
user: auth.user, user: auth.user,
actions: global.actions, actions: global.actions,
pomsProjectBasicAll: pomsProjectBasicAll.data || [] pomsProjectBasicAll: pomsProjectBasicAll.data || [],
allPepUsersIncludeDel: allPepUsersIncludeDel.data || [],
}; };
} }

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

@ -6,9 +6,10 @@ import { IconSearch } from '@douyinfe/semi-icons';
import { SkeletonScreen, WorkflowModal, WorkflowApprovalModal } from "$components"; import { SkeletonScreen, WorkflowModal, WorkflowApprovalModal } from "$components";
import moment from "moment"; import moment from "moment";
const Rest = (props) => { const Rest = (props) => {
const { dispatch, actions, user, socket, pomsProjectBasicAll } = props const { dispatch, actions, user, socket, pomsProjectBasicAll, allPepUsersIncludeDel } = props
const { workOrder } = actions const { workOrder, service } = actions
const [query, setQuery] = useState({ limit: 10, page: 0 }); // const [query, setQuery] = useState({ limit: 10, page: 0 }); //
const [limits, setLimits] = useState(0)// const [limits, setLimits] = useState(0)//
const [tableData, setTableData] = useState([]); // const [tableData, setTableData] = useState([]); //
@ -21,6 +22,9 @@ const Rest = (props) => {
if (!pomsProjectBasicAll.length) { if (!pomsProjectBasicAll.length) {
dispatch(workOrder.getPomsProjectBasicAll()) dispatch(workOrder.getPomsProjectBasicAll())
} }
if (!allPepUsersIncludeDel.length) {
dispatch(service.getOrganizationUsersIncludeDeleted())
}
}, []) }, [])
let backlogData = (obj = {}) => { let backlogData = (obj = {}) => {
@ -60,10 +64,16 @@ const Rest = (props) => {
dataIndex: 'index', dataIndex: 'index',
render: (text, record, index) => index + 1 render: (text, record, index) => index + 1
}, { }, {
title: '标题', title: '项目名称',
dataIndex: 'title', dataIndex: 'pomsProject',
render: (text, record, index) => { render: (text, record, index) => {
return record?.pomsNeedData?.title?.value || '' return record?.pomsNeedData?.projectName?.value || ''
}
}, {
title: '申请内容描述',
dataIndex: 'applyContent',
render: (text, record, index) => {
return record?.pomsNeedData?.applyContent?.value || ''
} }
}, },
// { // {
@ -79,30 +89,57 @@ const Rest = (props) => {
// } // }
// } // }
// }, // },
{
title: '项目名称',
dataIndex: 'pomsProject',
render: (text, record, index) => {
return record?.pomsNeedData?.projectName?.value || ''
}
},
{ {
title: '申请人', title: '申请人',
dataIndex: 'applyerName', dataIndex: 'applyerName',
}, { }, {
title: '申请部门', title: '申请部门',
dataIndex: 'applyDepartmentName', dataIndex: 'applyDepartmentName',
}, { },
title: '提交时间',
dataIndex: 'startTime', {
render: (text, record, index) => text && moment(text).format('YYYY-MM-DD HH:mm:ss') || '--' title: '处理人员',
}, { dataIndex: 'handlingPerson',
title: '期望完成时间',
dataIndex: 'expectTime',
render: (text, record, index) => { render: (text, record, index) => {
return record?.pomsNeedData?.expectTime?.value || '' // users
return record?.pomsNeedData?.handlingPerson?.value ? allPepUsersIncludeDel.find(u => u.id == record?.pomsNeedData?.handlingPerson?.value)?.name : ''
} }
}, { },
{
title: '处理结果',
dataIndex: 'handlingResult',
render: (text, record, index) => {
return record?.pomsNeedData?.handlingResult?.value || ''
}
},
{
title: '问题类型',
dataIndex: 'issueType',
render: (text, record, index) => {
return record?.pomsNeedData?.issueType?.value || ''
}
},
{
title: '处理完成时间',
dataIndex: 'completionTime',
render: (text, record, index) => {
return record?.pomsNeedData?.completionTime?.value || ''
}
},
// {
// title: '',
// dataIndex: 'startTime',
// render: (text, record, index) => text && moment(text).format('YYYY-MM-DD HH:mm:ss') || '--'
// }, {
// title: '',
// dataIndex: 'expectTime',
// render: (text, record, index) => {
// return record?.pomsNeedData?.expectTime?.value || ''
// }
// },
{
title: '操作', title: '操作',
dataIndex: 'hadle', dataIndex: 'hadle',
render: (text, record, index) => <div style={{ width: 60, color: "#1890ff", cursor: "pointer" }} onClick={() => { render: (text, record, index) => <div style={{ width: 60, color: "#1890ff", cursor: "pointer" }} onClick={() => {
@ -166,7 +203,7 @@ const Rest = (props) => {
columns={columns} columns={columns}
dataSource={tableData?.slice(query.limit * query.page, (query.page + 1) * query.limit)} dataSource={tableData?.slice(query.limit * query.page, (query.page + 1) * query.limit)}
bordered={false} bordered={false}
hideExpandedColumn={false} hideExpandedColumn={true}
empty="暂无数据" empty="暂无数据"
pagination={false} pagination={false}
/> />
@ -217,11 +254,12 @@ const Rest = (props) => {
} }
function mapStateToProps (state) { function mapStateToProps (state) {
const { auth, global, pomsProjectBasicAll } = state; const { auth, global, pomsProjectBasicAll, allPepUsersIncludeDel } = state;
return { return {
user: auth.user, user: auth.user,
actions: global.actions, actions: global.actions,
pomsProjectBasicAll: pomsProjectBasicAll.data || [] pomsProjectBasicAll: pomsProjectBasicAll.data || [],
allPepUsersIncludeDel: allPepUsersIncludeDel.data || [],
}; };
} }

17
web/client/src/utils/parseProcessData.js

@ -51,6 +51,7 @@ const dataRecursionObj = (dataObj, index, needData, lastKeyObj, nd) => {
return gotValue return gotValue
} else { } else {
if (keyObj.isGroup) { if (keyObj.isGroup) {
debugger
for (let item of dataObj[keyObj.prKey]) { for (let item of dataObj[keyObj.prKey]) {
const gotValue = dataRecursionObj(item, index + 1, needData, lastKeyObj, nd) const gotValue = dataRecursionObj(item, index + 1, needData, lastKeyObj, nd)
if (gotValue) { if (gotValue) {
@ -94,6 +95,22 @@ export const parseProcessData = (applyDetail, pomsNeedData = {
}, },
expectTime: { expectTime: {
keyWord: '期望完成时间' keyWord: '期望完成时间'
},
applyContent: {
keyWord: '申请内容描述'
},
handlingPerson: {
keyWord: '指派处理人员',
fromDataSource: true
},
handlingResult: {
keyWord: '处理结果',
},
issueType: {
keyWord: '问题类型',
},
completionTime: {
keyWord: '处理完成时间',
} }
}) => { }) => {
let needData = JSON.parse(JSON.stringify(pomsNeedData)) let needData = JSON.parse(JSON.stringify(pomsNeedData))

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

@ -59,7 +59,7 @@ export const ApiTable = {
//服务-信鸽服务 //服务-信鸽服务
getPush: "push", //获取推送配置列表 getPush: "push", //获取推送配置列表
postPush: "push", //新增/编辑推送配置 postPush: "push", //新增/编辑推送配置
getOrganizationUsers: "organization/users", //获取全部未删除用户 getOrganizationUsers: "organization/users", //获取全部用户
getProjectStructure: "project/structure", //获取绑定项目下结构物 getProjectStructure: "project/structure", //获取绑定项目下结构物
getProjectStatus: "project/status", //获取项目状态列表 getProjectStatus: "project/status", //获取项目状态列表
putPushPushId: "push/{pushId}", //更改推送配置状态(禁用或删除) putPushPushId: "push/{pushId}", //更改推送配置状态(禁用或删除)

Loading…
Cancel
Save