Browse Source

工单系列文件夹

dev
巴林闲侠 2 years ago
parent
commit
8b6f8b8f95
  1. 16
      api/app/lib/controllers/workOrder/index.js
  2. 14
      web/client/src/sections/workOrder/actions/jobOrder.js
  3. 15
      web/client/src/sections/workOrder/containers/jobOrder.jsx
  4. 3
      web/client/src/utils/webapi.js

16
api/app/lib/controllers/workOrder/index.js

@ -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
}
}
}

14
web/client/src/sections/workOrder/actions/jobOrder.js

@ -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' }
});
}

15
web/client/src/sections/workOrder/containers/jobOrder.jsx

@ -1,34 +1,25 @@
import React, { useEffect } from 'react';
import { connect } from 'react-redux';
const Rest = (props) => {
const JobOrder = (props) => {
const { dispatch, actions, user, loading, socket } = props
useEffect(() => {
}, [])
return (
<>
<div>
<img src="/assets/images/install/watting.png" alt="" style={{ width: 'calc(100% + 16px)', position: "relative", top: -12, left: -8, }} />
</div>
</>
)
}
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);
export default connect(mapStateToProps)(JobOrder);

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

@ -75,6 +75,9 @@ export const ApiTable = {
delFile: 'file/del/{id}', //删除文件夹
file: 'file',
delfolderFile: 'file/{id}', //删除文件
//工单
getEnabledWorkflowProcess: 'workflow/process/enabled',//获取工作流可用表单
};
export const RouteTable = {
apiRoot: "/api/root",

Loading…
Cancel
Save