巴林闲侠
2 years ago
6 changed files with 77 additions and 53 deletions
@ -0,0 +1,16 @@ |
|||||
|
'use strict'; |
||||
|
const moment = require('moment') |
||||
|
|
||||
|
async function getEnabledWorkflowProcess (ctx) { |
||||
|
try { |
||||
|
const { models } = ctx.fs.dc; |
||||
|
|
||||
|
ctx.status = 200; |
||||
|
} catch (error) { |
||||
|
ctx.fs.logger.error(`path: ${ctx.path}, error: error`); |
||||
|
ctx.status = 400; |
||||
|
ctx.body = { |
||||
|
message: typeof error == 'string' ? error : undefined |
||||
|
} |
||||
|
} |
||||
|
} |
@ -0,0 +1,14 @@ |
|||||
|
'use strict'; |
||||
|
|
||||
|
import { ApiTable, basicAction } from '$utils' |
||||
|
|
||||
|
export function getEnabledWorkflowProcess () { |
||||
|
return dispatch => basicAction({ |
||||
|
type: 'get', |
||||
|
dispatch: dispatch, |
||||
|
actionType: 'GET_MEMBERS', |
||||
|
url: `${ApiTable.getEnabledWorkflowProcess}`, |
||||
|
msg: { error: '获取可用表单失败' }, |
||||
|
reducer: { name: 'workflowProcess' } |
||||
|
}); |
||||
|
} |
@ -1,34 +1,25 @@ |
|||||
import React, { useEffect } from 'react'; |
import React, { useEffect } from 'react'; |
||||
import { connect } from 'react-redux'; |
import { connect } from 'react-redux'; |
||||
|
|
||||
|
const JobOrder = (props) => { |
||||
|
|
||||
const Rest = (props) => { |
|
||||
const { dispatch, actions, user, loading, socket } = props |
const { dispatch, actions, user, loading, socket } = props |
||||
|
|
||||
useEffect(() => { |
useEffect(() => { |
||||
|
|
||||
}, []) |
}, []) |
||||
|
|
||||
|
|
||||
return ( |
return ( |
||||
<> |
<div> |
||||
<div> |
|
||||
<img src="/assets/images/install/watting.png" alt="" style={{ width: 'calc(100% + 16px)', position: "relative", top: -12, left: -8, }} /> |
</div> |
||||
</div> |
|
||||
</> |
|
||||
) |
) |
||||
} |
} |
||||
|
|
||||
function mapStateToProps (state) { |
function mapStateToProps (state) { |
||||
const { auth, global, members, webSocket } = state; |
const { auth, global, members, webSocket } = state; |
||||
return { |
return { |
||||
// loading: members.isRequesting, |
|
||||
// user: auth.user, |
// user: auth.user, |
||||
// actions: global.actions, |
|
||||
// members: members.data, |
|
||||
// socket: webSocket.socket |
|
||||
}; |
}; |
||||
} |
} |
||||
|
|
||||
export default connect(mapStateToProps)(Rest); |
export default connect(mapStateToProps)(JobOrder); |
@ -1,42 +1,42 @@ |
|||||
import { JobOrder, StayDoWorkOrder, Initiated, Receipt, AboutMe } from './containers'; |
import { JobOrder, StayDoWorkOrder, Initiated, Receipt, AboutMe } from './containers'; |
||||
|
|
||||
export default [{ |
export default [{ |
||||
type: 'inner', |
type: 'inner', |
||||
route: { |
route: { |
||||
path: '/workOrder', |
path: '/workOrder', |
||||
key: 'workOrder', |
key: 'workOrder', |
||||
breadcrumb: '工单', |
breadcrumb: '工单', |
||||
// 不设置 component 则面包屑禁止跳转
|
// 不设置 component 则面包屑禁止跳转
|
||||
childRoutes: [{ |
childRoutes: [{ |
||||
path: '/jobOrder', |
path: '/jobOrder', |
||||
key: 'jobOrder', |
key: 'jobOrder', |
||||
breadcrumb: '创建工单', |
breadcrumb: '创建工单', |
||||
component: JobOrder, |
component: JobOrder, |
||||
}, { |
}, { |
||||
path: '/workOrderList', |
path: '/workOrderList', |
||||
key: 'workOrderList', |
key: 'workOrderList', |
||||
breadcrumb: '工单列表', |
breadcrumb: '工单列表', |
||||
childRoutes: [{ |
childRoutes: [{ |
||||
path: '/stayDoWorkOrder', |
path: '/stayDoWorkOrder', |
||||
key: 'stayDoWorkOrder', |
key: 'stayDoWorkOrder', |
||||
component: StayDoWorkOrder, |
component: StayDoWorkOrder, |
||||
breadcrumb: '代办工单', |
breadcrumb: '代办工单', |
||||
}, { |
}, { |
||||
path: '/initiated', |
path: '/initiated', |
||||
key: 'initiated', |
key: 'initiated', |
||||
component: Initiated, |
component: Initiated, |
||||
breadcrumb: '我发起的', |
breadcrumb: '我发起的', |
||||
}, { |
}, { |
||||
path: '/receipt', |
path: '/receipt', |
||||
key: 'receipt', |
key: 'receipt', |
||||
component: Receipt, |
component: Receipt, |
||||
breadcrumb: '工单回执', |
breadcrumb: '工单回执', |
||||
}, { |
}, { |
||||
path: '/aboutMe', |
path: '/aboutMe', |
||||
key: 'aboutMe', |
key: 'aboutMe', |
||||
component: AboutMe, |
component: AboutMe, |
||||
breadcrumb: '与我有关的', |
breadcrumb: '与我有关的', |
||||
},] |
},] |
||||
}] |
}] |
||||
} |
} |
||||
}]; |
}]; |
Loading…
Reference in new issue