@dobot-plus/template 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.dobot/.sftprc +3 -0
- package/.dobot/components/DobotPlusApp.tsx +78 -0
- package/.dobot/http/api.json +11 -0
- package/.dobot/http/api.ts +26 -0
- package/.dobot/http/api.ts.txt +26 -0
- package/.dobot/http/axios.ts +52 -0
- package/.dobot/http/axios.ts.txt +52 -0
- package/.dobot/http/http.ts +22 -0
- package/.dobot/http/http.ts.txt +22 -0
- package/.dobot/index.ts +2 -0
- package/.dobot/index.txt +2 -0
- package/.dobot/protocol/keyBoard.ts +18 -0
- package/.dobot/protocol/keyBoard.ts.txt +18 -0
- package/.dobot/protocol/methodsHandler.ts +15 -0
- package/.dobot/protocol/methodsHandler.ts.txt +15 -0
- package/.dobot/protocol/postMessageCenter.ts +50 -0
- package/.dobot/protocol/postMessageCenter.ts.txt +38 -0
- package/.dobot/protocol/postMessageHandler.ts +289 -0
- package/.dobot/protocol/postMessageHandler.ts.txt +289 -0
- package/.dobot/protocol/websocketHandler.ts +234 -0
- package/.dobot/protocol/websocketHandler.ts.txt +234 -0
- package/.dobot/shim.d.ts +3 -0
- package/.dobot/shim.d.ts.txt +3 -0
- package/.dobot/store/actions/toolActions.ts +69 -0
- package/.dobot/store/actions/toolActions.ts.txt +69 -0
- package/.dobot/store/actions/userMagamentActions.ts +25 -0
- package/.dobot/store/actions/userMagamentActions.ts.txt +25 -0
- package/.dobot/store/index.ts +7 -0
- package/.dobot/store/index.ts.txt +7 -0
- package/.dobot/store/reducers/index.ts +8 -0
- package/.dobot/store/reducers/index.ts.txt +8 -0
- package/.dobot/store/reducers/toolReducer.ts +152 -0
- package/.dobot/store/reducers/toolReducer.ts.txt +149 -0
- package/.dobot/store/reducers/userMagamentReducer.ts +38 -0
- package/.dobot/store/reducers/userMagamentReducer.ts.txt +35 -0
- package/.dobot/store/types.ts +240 -0
- package/.dobot/store/types.ts.txt +237 -0
- package/.dobot/template/default.tsx.mustache +20 -0
- package/.dobot/template/entry.css +26 -0
- package/.dobot/template/entry.tsx +53 -0
- package/.dobot/template/index.html +23 -0
- package/.dobot/template/index.scss +5 -0
- package/.dobot/utils/i18n.ts +31 -0
- package/.dobot/utils/i18n.ts.txt +31 -0
- package/.dobot/utils/mqtt.ts +61 -0
- package/.dobot/utils/mqtt.ts.txt +61 -0
- package/.dobot/utils/rem.js +21 -0
- package/.dobot/utils/rem.js.txt +21 -0
- package/.dobot/utils/tool.ts +15 -0
- package/.dobot/utils/tool.ts.txt +15 -0
- package/.eslintrc.cjs +18 -0
- package/.luarc.json +17 -0
- package/.vscode/Api.schema.json +103 -0
- package/.vscode/Blocks.schema.json +94 -0
- package/.vscode/Main.schema.json +42 -0
- package/.vscode/Script.schema.json +22 -0
- package/.vscode/Toolbar.schema.json +19 -0
- package/.vscode/extensions.json +8 -0
- package/.vscode/settings.json +52 -0
- package/Resources/document/config.json +0 -0
- package/Resources/i18n/client/de.json +11 -0
- package/Resources/i18n/client/en.json +11 -0
- package/Resources/i18n/client/es.json +11 -0
- package/Resources/i18n/client/hk.json +11 -0
- package/Resources/i18n/client/ja.json +11 -0
- package/Resources/i18n/client/ko.json +11 -0
- package/Resources/i18n/client/ru.json +11 -0
- package/Resources/i18n/client/zh.json +11 -0
- package/Resources/i18n/plugin/de.json +3 -0
- package/Resources/i18n/plugin/en.json +3 -0
- package/Resources/i18n/plugin/es.json +3 -0
- package/Resources/i18n/plugin/hk.json +3 -0
- package/Resources/i18n/plugin/ja.json +3 -0
- package/Resources/i18n/plugin/ko.json +3 -0
- package/Resources/i18n/plugin/ru.json +3 -0
- package/Resources/i18n/plugin/zh.json +3 -0
- package/Resources/images/pallet.svg +1 -0
- package/configs/Blocks.json +21 -0
- package/configs/Main.json +5 -0
- package/configs/Scripts.json +7 -0
- package/configs/Toolbar.json +5 -0
- package/dpt.json +4 -0
- package/lua/control.lua +19 -0
- package/lua/daemon.lua +22 -0
- package/lua/httpAPI.lua +65 -0
- package/lua/userAPI.lua +51 -0
- package/lua/utils/await485.lua +55 -0
- package/lua/utils/mqtt.lua +17 -0
- package/lua/utils/num_convert.lua +41 -0
- package/lua/utils/tcp.lua +31 -0
- package/lua/utils/util.lua +31 -0
- package/lua/utils/variables.lua +0 -0
- package/package.json +51 -0
- package/project.json +3 -0
- package/tsconfig.json +27 -0
- package/ui/Blocks.tsx +5 -0
- package/ui/Main.tsx +31 -0
- package/ui/Toolbar.tsx +5 -0
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
import { TOOL_ACTIONS_TYPE } from '../actions/toolActions'
|
|
2
|
+
|
|
3
|
+
const initialStore = {
|
|
4
|
+
portData: {
|
|
5
|
+
ip: '192.168.5.1',
|
|
6
|
+
port: '22000',
|
|
7
|
+
isSync: false
|
|
8
|
+
},
|
|
9
|
+
tcpStatus: false,
|
|
10
|
+
tcpInfo: [],
|
|
11
|
+
extendIoData: [],
|
|
12
|
+
onRobotTool: [],
|
|
13
|
+
pluginPort: undefined,
|
|
14
|
+
dobotplusHost: 'http://localhost:9889',
|
|
15
|
+
deviceStateData: {
|
|
16
|
+
prjState: 'stopped'
|
|
17
|
+
},
|
|
18
|
+
ioData: {
|
|
19
|
+
ioList: {
|
|
20
|
+
input: [...Array(1)].map((item, index) => ({
|
|
21
|
+
address: index + 1,
|
|
22
|
+
init: `DI_${index + 1}`,
|
|
23
|
+
name: `DI_${index + 1}`,
|
|
24
|
+
editName: '',
|
|
25
|
+
value: 1,
|
|
26
|
+
isShow: true,
|
|
27
|
+
diValue: 0,
|
|
28
|
+
isDI: false,
|
|
29
|
+
type: 'Common',
|
|
30
|
+
configurationStr: '',
|
|
31
|
+
safeIOKey: 0
|
|
32
|
+
})),
|
|
33
|
+
inputSimulation: [...Array(1)].map((item, index) => ({
|
|
34
|
+
address: index + 1,
|
|
35
|
+
init: `AD_${index + 1}`,
|
|
36
|
+
name: `AD_${index + 1}`,
|
|
37
|
+
editName: '',
|
|
38
|
+
isShow: true,
|
|
39
|
+
value: 3.3
|
|
40
|
+
})),
|
|
41
|
+
output: [...Array(1)].map((item, index) => ({
|
|
42
|
+
address: index + 1,
|
|
43
|
+
init: `DO_${index + 1}`,
|
|
44
|
+
name: `DO_${index + 1}`,
|
|
45
|
+
editName: '',
|
|
46
|
+
value: 0,
|
|
47
|
+
isShow: true,
|
|
48
|
+
type: 'Common',
|
|
49
|
+
configurationStr: '',
|
|
50
|
+
safeIOKey: 0
|
|
51
|
+
}))
|
|
52
|
+
},
|
|
53
|
+
endEffectorIo: {
|
|
54
|
+
input: [...Array(1)].map((item, index) => ({
|
|
55
|
+
address: index + 17,
|
|
56
|
+
init: `DI_${index + 1}`,
|
|
57
|
+
name: `DI_${index + 1}`,
|
|
58
|
+
editName: '',
|
|
59
|
+
value: 1,
|
|
60
|
+
isShow: true,
|
|
61
|
+
diValue: 0,
|
|
62
|
+
isDI: false
|
|
63
|
+
})),
|
|
64
|
+
output: [...Array(1)].map((item, index) => ({
|
|
65
|
+
address: index + 17,
|
|
66
|
+
init: `DO_${index + 1}`,
|
|
67
|
+
name: `DO_${index + 1}`,
|
|
68
|
+
editName: '',
|
|
69
|
+
value: 1,
|
|
70
|
+
isShow: true
|
|
71
|
+
}))
|
|
72
|
+
},
|
|
73
|
+
isShowInputAll: true,
|
|
74
|
+
isShowOutputAll: true,
|
|
75
|
+
ioAO: [0, 0],
|
|
76
|
+
ioAI: [0, 0],
|
|
77
|
+
ioAIUnit: { mode1: 0, mode2: 0 },
|
|
78
|
+
ioAOUnit: { mode1: 0, mode2: 0 },
|
|
79
|
+
endAIUnit: { mode1: 0, mode2: 0, mode3: 0, mode4: 0 },
|
|
80
|
+
endAI: [0, 0, 0, 0],
|
|
81
|
+
toolMode: { mode1: 1, mode2: 1 },
|
|
82
|
+
ioData: {}
|
|
83
|
+
},
|
|
84
|
+
pointData: [],
|
|
85
|
+
jogInPaused: false
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
const toolReducer = (
|
|
89
|
+
state = initialStore,
|
|
90
|
+
action: { type: string; params: any }
|
|
91
|
+
) => {
|
|
92
|
+
switch (action.type) {
|
|
93
|
+
case TOOL_ACTIONS_TYPE.SET_PORT_IP: {
|
|
94
|
+
return Object.assign({}, state, {
|
|
95
|
+
portData: {
|
|
96
|
+
ip: action.params,
|
|
97
|
+
port: state.portData.port,
|
|
98
|
+
isSync: true
|
|
99
|
+
}
|
|
100
|
+
})
|
|
101
|
+
}
|
|
102
|
+
case TOOL_ACTIONS_TYPE.SET_PORT: {
|
|
103
|
+
return Object.assign({}, state, {
|
|
104
|
+
portData: {
|
|
105
|
+
ip: state.portData.ip,
|
|
106
|
+
port: action.params,
|
|
107
|
+
isSync: true
|
|
108
|
+
}
|
|
109
|
+
})
|
|
110
|
+
}
|
|
111
|
+
case TOOL_ACTIONS_TYPE.SET_TCP_STATUS: {
|
|
112
|
+
return Object.assign({}, state, { tcpStatus: action.params })
|
|
113
|
+
}
|
|
114
|
+
case TOOL_ACTIONS_TYPE.SET_TCP_INFO: {
|
|
115
|
+
return Object.assign({}, state, { tcpInfo: action.params })
|
|
116
|
+
}
|
|
117
|
+
case TOOL_ACTIONS_TYPE.SET_EXTEND_IO_INDEX: {
|
|
118
|
+
const newData = action.params.map((item: any) => {
|
|
119
|
+
return {
|
|
120
|
+
name: item.name,
|
|
121
|
+
DONumber: item.doNumber,
|
|
122
|
+
DOStart: item.doStart,
|
|
123
|
+
DINumber: item.diNumber,
|
|
124
|
+
DIStart: item.diStart
|
|
125
|
+
}
|
|
126
|
+
})
|
|
127
|
+
return Object.assign({}, state, { extendIoData: newData })
|
|
128
|
+
}
|
|
129
|
+
case TOOL_ACTIONS_TYPE.SET_ONROBOT_TOOL: {
|
|
130
|
+
return Object.assign({}, state, { onRobotTool: action.params })
|
|
131
|
+
}
|
|
132
|
+
case TOOL_ACTIONS_TYPE.SET_DEVICE_STATE_DATA: {
|
|
133
|
+
return Object.assign({}, state, { deviceStateData: action.params })
|
|
134
|
+
}
|
|
135
|
+
case TOOL_ACTIONS_TYPE.SET_PLUGIN_PORT: {
|
|
136
|
+
return Object.assign({}, state, { pluginPort: action.params })
|
|
137
|
+
}
|
|
138
|
+
case TOOL_ACTIONS_TYPE.SET_DOBOTPLUS_HOST:
|
|
139
|
+
return Object.assign({}, state, { dobotplusHost: action.params })
|
|
140
|
+
case TOOL_ACTIONS_TYPE.SET_IO_DATA: {
|
|
141
|
+
return Object.assign({}, state, { deviceStateData: action.params })
|
|
142
|
+
}
|
|
143
|
+
case TOOL_ACTIONS_TYPE.SET_POINT_DATA:
|
|
144
|
+
return Object.assign({}, state, { pointData: action.params })
|
|
145
|
+
case TOOL_ACTIONS_TYPE.SET_JOG_IN_PAUSED:
|
|
146
|
+
return Object.assign({}, state, { jogInPaused: action.params })
|
|
147
|
+
default:
|
|
148
|
+
return state
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
export default toolReducer
|
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
import { TOOL_ACTIONS_TYPE } from '../actions/toolActions'
|
|
2
|
+
|
|
3
|
+
const initialStore = {
|
|
4
|
+
portData: {
|
|
5
|
+
ip: '192.168.5.1',
|
|
6
|
+
port: '22000',
|
|
7
|
+
isSync: false
|
|
8
|
+
},
|
|
9
|
+
tcpStatus: false,
|
|
10
|
+
tcpInfo: [],
|
|
11
|
+
extendIoData: [],
|
|
12
|
+
onRobotTool: [],
|
|
13
|
+
pluginPort: undefined,
|
|
14
|
+
dobotplusHost: 'http://localhost:9889',
|
|
15
|
+
deviceStateData: {
|
|
16
|
+
prjState: 'stopped'
|
|
17
|
+
},
|
|
18
|
+
ioData: {
|
|
19
|
+
ioList: {
|
|
20
|
+
input: [...Array(1)].map((item, index) => ({
|
|
21
|
+
address: index + 1,
|
|
22
|
+
init: `DI_${index + 1}`,
|
|
23
|
+
name: `DI_${index + 1}`,
|
|
24
|
+
editName: '',
|
|
25
|
+
value: 1,
|
|
26
|
+
isShow: true,
|
|
27
|
+
diValue: 0,
|
|
28
|
+
isDI: false,
|
|
29
|
+
type: 'Common',
|
|
30
|
+
configurationStr: '',
|
|
31
|
+
safeIOKey: 0
|
|
32
|
+
})),
|
|
33
|
+
inputSimulation: [...Array(1)].map((item, index) => ({
|
|
34
|
+
address: index + 1,
|
|
35
|
+
init: `AD_${index + 1}`,
|
|
36
|
+
name: `AD_${index + 1}`,
|
|
37
|
+
editName: '',
|
|
38
|
+
isShow: true,
|
|
39
|
+
value: 3.3
|
|
40
|
+
})),
|
|
41
|
+
output: [...Array(1)].map((item, index) => ({
|
|
42
|
+
address: index + 1,
|
|
43
|
+
init: `DO_${index + 1}`,
|
|
44
|
+
name: `DO_${index + 1}`,
|
|
45
|
+
editName: '',
|
|
46
|
+
value: 0,
|
|
47
|
+
isShow: true,
|
|
48
|
+
type: 'Common',
|
|
49
|
+
configurationStr: '',
|
|
50
|
+
safeIOKey: 0
|
|
51
|
+
}))
|
|
52
|
+
},
|
|
53
|
+
endEffectorIo: {
|
|
54
|
+
input: [...Array(1)].map((item, index) => ({
|
|
55
|
+
address: index + 17,
|
|
56
|
+
init: `DI_${index + 1}`,
|
|
57
|
+
name: `DI_${index + 1}`,
|
|
58
|
+
editName: '',
|
|
59
|
+
value: 1,
|
|
60
|
+
isShow: true,
|
|
61
|
+
diValue: 0,
|
|
62
|
+
isDI: false
|
|
63
|
+
})),
|
|
64
|
+
output: [...Array(1)].map((item, index) => ({
|
|
65
|
+
address: index + 17,
|
|
66
|
+
init: `DO_${index + 1}`,
|
|
67
|
+
name: `DO_${index + 1}`,
|
|
68
|
+
editName: '',
|
|
69
|
+
value: 1,
|
|
70
|
+
isShow: true
|
|
71
|
+
}))
|
|
72
|
+
},
|
|
73
|
+
isShowInputAll: true,
|
|
74
|
+
isShowOutputAll: true,
|
|
75
|
+
ioAO: [0, 0],
|
|
76
|
+
ioAI: [0, 0],
|
|
77
|
+
ioAIUnit: { mode1: 0, mode2: 0 },
|
|
78
|
+
ioAOUnit: { mode1: 0, mode2: 0 },
|
|
79
|
+
endAIUnit: { mode1: 0, mode2: 0, mode3: 0, mode4: 0 },
|
|
80
|
+
endAI: [0, 0, 0, 0],
|
|
81
|
+
toolMode: { mode1: 1, mode2: 1 },
|
|
82
|
+
ioData: {}
|
|
83
|
+
},
|
|
84
|
+
pointData: [],
|
|
85
|
+
jogInPaused: false
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
const toolReducer = (state = initialStore, action: { type: string; params: any }) => {
|
|
89
|
+
switch (action.type) {
|
|
90
|
+
case TOOL_ACTIONS_TYPE.SET_PORT_IP: {
|
|
91
|
+
return Object.assign({}, state, {
|
|
92
|
+
portData: {
|
|
93
|
+
ip: action.params,
|
|
94
|
+
port: state.portData.port,
|
|
95
|
+
isSync: true
|
|
96
|
+
}
|
|
97
|
+
})
|
|
98
|
+
}
|
|
99
|
+
case TOOL_ACTIONS_TYPE.SET_PORT: {
|
|
100
|
+
return Object.assign({}, state, {
|
|
101
|
+
portData: {
|
|
102
|
+
ip: state.portData.ip,
|
|
103
|
+
port: action.params,
|
|
104
|
+
isSync: true
|
|
105
|
+
}
|
|
106
|
+
})
|
|
107
|
+
}
|
|
108
|
+
case TOOL_ACTIONS_TYPE.SET_TCP_STATUS: {
|
|
109
|
+
return Object.assign({}, state, { tcpStatus: action.params })
|
|
110
|
+
}
|
|
111
|
+
case TOOL_ACTIONS_TYPE.SET_TCP_INFO: {
|
|
112
|
+
return Object.assign({}, state, { tcpInfo: action.params })
|
|
113
|
+
}
|
|
114
|
+
case TOOL_ACTIONS_TYPE.SET_EXTEND_IO_INDEX: {
|
|
115
|
+
const newData = action.params.map((item: any) => {
|
|
116
|
+
return {
|
|
117
|
+
name: item.name,
|
|
118
|
+
DONumber: item.doNumber,
|
|
119
|
+
DOStart: item.doStart,
|
|
120
|
+
DINumber: item.diNumber,
|
|
121
|
+
DIStart: item.diStart
|
|
122
|
+
}
|
|
123
|
+
})
|
|
124
|
+
return Object.assign({}, state, { extendIoData: newData })
|
|
125
|
+
}
|
|
126
|
+
case TOOL_ACTIONS_TYPE.SET_ONROBOT_TOOL: {
|
|
127
|
+
return Object.assign({}, state, { onRobotTool: action.params })
|
|
128
|
+
}
|
|
129
|
+
case TOOL_ACTIONS_TYPE.SET_DEVICE_STATE_DATA: {
|
|
130
|
+
return Object.assign({}, state, { deviceStateData: action.params })
|
|
131
|
+
}
|
|
132
|
+
case TOOL_ACTIONS_TYPE.SET_PLUGIN_PORT: {
|
|
133
|
+
return Object.assign({}, state, { pluginPort: action.params })
|
|
134
|
+
}
|
|
135
|
+
case TOOL_ACTIONS_TYPE.SET_DOBOTPLUS_HOST:
|
|
136
|
+
return Object.assign({}, state, { dobotplusHost: action.params })
|
|
137
|
+
case TOOL_ACTIONS_TYPE.SET_IO_DATA: {
|
|
138
|
+
return Object.assign({}, state, { deviceStateData: action.params })
|
|
139
|
+
}
|
|
140
|
+
case TOOL_ACTIONS_TYPE.SET_POINT_DATA:
|
|
141
|
+
return Object.assign({}, state, { pointData: action.params })
|
|
142
|
+
case TOOL_ACTIONS_TYPE.SET_JOG_IN_PAUSED:
|
|
143
|
+
return Object.assign({}, state, { jogInPaused: action.params })
|
|
144
|
+
default:
|
|
145
|
+
return state
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
export default toolReducer
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { userMagamentActionsType } from '../actions/userMagamentActions'
|
|
2
|
+
import { userMagamentState } from '@dobot/store/types'
|
|
3
|
+
|
|
4
|
+
const initialStore: userMagamentState = {
|
|
5
|
+
userModalData: {
|
|
6
|
+
show: false,
|
|
7
|
+
},
|
|
8
|
+
permissionList: [
|
|
9
|
+
[1, 'TR_LEVEL_1'],
|
|
10
|
+
[2, 'TR_LEVEL_2'],
|
|
11
|
+
[3, 'TR_LEVEL_3'],
|
|
12
|
+
],
|
|
13
|
+
currentLevel: 0,
|
|
14
|
+
currentUserInfo: ''
|
|
15
|
+
}
|
|
16
|
+
const userMagamentReducer = (
|
|
17
|
+
state = initialStore,
|
|
18
|
+
action: { type: string; params: any }
|
|
19
|
+
) => {
|
|
20
|
+
switch (action.type) {
|
|
21
|
+
case userMagamentActionsType.SETUSERMODALDATA: {
|
|
22
|
+
return Object.assign({}, state, { userModalData: action.params })
|
|
23
|
+
}
|
|
24
|
+
case userMagamentActionsType.SET_PERMISSIONLIST: {
|
|
25
|
+
return Object.assign({}, state, { permissionList: action.params })
|
|
26
|
+
}
|
|
27
|
+
case userMagamentActionsType.SET_CURRENT_LEVEL: {
|
|
28
|
+
return Object.assign({}, state, { currentLevel: action.params })
|
|
29
|
+
}
|
|
30
|
+
case userMagamentActionsType.SET_CURRENT_USER_INFO: {
|
|
31
|
+
return Object.assign({}, state, { currentUserInfo: action.params })
|
|
32
|
+
}
|
|
33
|
+
default:
|
|
34
|
+
return state
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export default userMagamentReducer
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { userMagamentActionsType } from '../actions/userMagamentActions'
|
|
2
|
+
import { userMagamentState } from '@dobot/store/types'
|
|
3
|
+
|
|
4
|
+
const initialStore: userMagamentState = {
|
|
5
|
+
userModalData: {
|
|
6
|
+
show: false
|
|
7
|
+
},
|
|
8
|
+
permissionList: [
|
|
9
|
+
[1, 'TR_LEVEL_1'],
|
|
10
|
+
[2, 'TR_LEVEL_2'],
|
|
11
|
+
[3, 'TR_LEVEL_3']
|
|
12
|
+
],
|
|
13
|
+
currentLevel: 0,
|
|
14
|
+
currentUserInfo: ''
|
|
15
|
+
}
|
|
16
|
+
const userMagamentReducer = (state = initialStore, action: { type: string; params: any }) => {
|
|
17
|
+
switch (action.type) {
|
|
18
|
+
case userMagamentActionsType.SETUSERMODALDATA: {
|
|
19
|
+
return Object.assign({}, state, { userModalData: action.params })
|
|
20
|
+
}
|
|
21
|
+
case userMagamentActionsType.SET_PERMISSIONLIST: {
|
|
22
|
+
return Object.assign({}, state, { permissionList: action.params })
|
|
23
|
+
}
|
|
24
|
+
case userMagamentActionsType.SET_CURRENT_LEVEL: {
|
|
25
|
+
return Object.assign({}, state, { currentLevel: action.params })
|
|
26
|
+
}
|
|
27
|
+
case userMagamentActionsType.SET_CURRENT_USER_INFO: {
|
|
28
|
+
return Object.assign({}, state, { currentUserInfo: action.params })
|
|
29
|
+
}
|
|
30
|
+
default:
|
|
31
|
+
return state
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
export default userMagamentReducer
|
|
@@ -0,0 +1,240 @@
|
|
|
1
|
+
|
|
2
|
+
|
|
3
|
+
export interface IStoreState {
|
|
4
|
+
toolReducer: ToolState
|
|
5
|
+
userMagamentReducer: userMagamentState
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
export interface ICapacityData {
|
|
9
|
+
totalPallet: number
|
|
10
|
+
totalBox: number
|
|
11
|
+
timeHour: number
|
|
12
|
+
timeMin: number
|
|
13
|
+
timeSec: number
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export interface IPalletRunningData {
|
|
17
|
+
status: number
|
|
18
|
+
layer: number
|
|
19
|
+
box: number
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export interface ParamsStyle {
|
|
23
|
+
x: number
|
|
24
|
+
y: number
|
|
25
|
+
// 0:默认;1:旋转90
|
|
26
|
+
rotate: number
|
|
27
|
+
connection: number // 0:单吸 1:双吸(长边对齐) 2:双吸(短边对齐)
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export interface ItemPreviewParams {
|
|
31
|
+
boxCount: number
|
|
32
|
+
pallet: {
|
|
33
|
+
length: number
|
|
34
|
+
width: number
|
|
35
|
+
height: number
|
|
36
|
+
}
|
|
37
|
+
box: {
|
|
38
|
+
length: number
|
|
39
|
+
width: number
|
|
40
|
+
height: number
|
|
41
|
+
weight: number
|
|
42
|
+
}
|
|
43
|
+
style:
|
|
44
|
+
| {
|
|
45
|
+
typeA: ParamsStyle[]
|
|
46
|
+
typeB: ParamsStyle[]
|
|
47
|
+
}
|
|
48
|
+
| {
|
|
49
|
+
typeC: ParamsStyle[]
|
|
50
|
+
typeD: ParamsStyle[]
|
|
51
|
+
}
|
|
52
|
+
layer: {
|
|
53
|
+
count: number
|
|
54
|
+
order: number[]
|
|
55
|
+
partition: number
|
|
56
|
+
partitionHeight: number
|
|
57
|
+
}
|
|
58
|
+
coordinate: {
|
|
59
|
+
user: Array<number>
|
|
60
|
+
tool: number
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
export interface PreviewParamsData {
|
|
65
|
+
conveyer?: number
|
|
66
|
+
suction?: number
|
|
67
|
+
lift?: number
|
|
68
|
+
left?: ItemPreviewParams
|
|
69
|
+
right?: ItemPreviewParams
|
|
70
|
+
}
|
|
71
|
+
export interface PointType {
|
|
72
|
+
x: number
|
|
73
|
+
y: number
|
|
74
|
+
z: number
|
|
75
|
+
rx: number
|
|
76
|
+
ry: number
|
|
77
|
+
rz: number
|
|
78
|
+
}
|
|
79
|
+
export interface caliPointType {
|
|
80
|
+
imageX: number
|
|
81
|
+
imageY: number
|
|
82
|
+
physicalX: number
|
|
83
|
+
physicalY: number
|
|
84
|
+
angle: number
|
|
85
|
+
}
|
|
86
|
+
export interface ToolState {
|
|
87
|
+
portData: {
|
|
88
|
+
ip: string
|
|
89
|
+
port: string
|
|
90
|
+
isSync: boolean
|
|
91
|
+
}
|
|
92
|
+
tcpStatus: boolean
|
|
93
|
+
tcpInfo: any
|
|
94
|
+
extendIoData: any[]
|
|
95
|
+
onRobotTool: string[]
|
|
96
|
+
deviceStateData: DeviceState
|
|
97
|
+
ioData: any
|
|
98
|
+
pluginPort: string
|
|
99
|
+
dobotplusHost: string
|
|
100
|
+
ioList: {
|
|
101
|
+
input: {
|
|
102
|
+
address: number
|
|
103
|
+
diValue: number
|
|
104
|
+
editName: string
|
|
105
|
+
init: string
|
|
106
|
+
isShow: boolean
|
|
107
|
+
name: string
|
|
108
|
+
value: number
|
|
109
|
+
}[]
|
|
110
|
+
output: {
|
|
111
|
+
address: number
|
|
112
|
+
editName: string
|
|
113
|
+
init: string
|
|
114
|
+
isShow: boolean
|
|
115
|
+
name: string
|
|
116
|
+
value: number
|
|
117
|
+
}[]
|
|
118
|
+
}
|
|
119
|
+
pointData: any[]
|
|
120
|
+
jogInPaused:boolean
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
export type DeviceState = {
|
|
124
|
+
isTimeout?: boolean
|
|
125
|
+
stateL?: boolean
|
|
126
|
+
pose: {
|
|
127
|
+
joints: number[]
|
|
128
|
+
axes: number[]
|
|
129
|
+
auxJoint: number[]
|
|
130
|
+
l: number
|
|
131
|
+
rdnCoordinate?: number[]
|
|
132
|
+
}
|
|
133
|
+
alarm: number[]
|
|
134
|
+
alarmGo: number[]
|
|
135
|
+
hht: {
|
|
136
|
+
isEnabled: boolean
|
|
137
|
+
}
|
|
138
|
+
safeGuardMode?: 0 | 1 | 2
|
|
139
|
+
batteryVoltage?: number
|
|
140
|
+
batteryStatus?: 0 | 1
|
|
141
|
+
moveSpeed?: {
|
|
142
|
+
x: number
|
|
143
|
+
y: number
|
|
144
|
+
r: number
|
|
145
|
+
}
|
|
146
|
+
position?: {
|
|
147
|
+
x: number
|
|
148
|
+
y: number
|
|
149
|
+
yaw: number
|
|
150
|
+
}
|
|
151
|
+
joyState?: boolean
|
|
152
|
+
controlMode: number
|
|
153
|
+
isCollision?: boolean
|
|
154
|
+
skinCollison?: boolean
|
|
155
|
+
|
|
156
|
+
remoteControl?: remoteControlType
|
|
157
|
+
cameraModel?: {
|
|
158
|
+
arm: number
|
|
159
|
+
car: number
|
|
160
|
+
}
|
|
161
|
+
inputs?: number[]
|
|
162
|
+
outputs?: number[]
|
|
163
|
+
endDI?: number[]
|
|
164
|
+
endDO?: number[]
|
|
165
|
+
gpioAO?: number[]
|
|
166
|
+
extendDO?: number[][]
|
|
167
|
+
extendDI?: number[][]
|
|
168
|
+
ioAI?: number[]
|
|
169
|
+
endAI?: number[]
|
|
170
|
+
prjState?: PrjStateType
|
|
171
|
+
powerState?: boolean
|
|
172
|
+
detailsInfo?: {
|
|
173
|
+
controlParams: number[]
|
|
174
|
+
jointCurrent: number[]
|
|
175
|
+
jointVoltage: number[]
|
|
176
|
+
jointTemp: number[]
|
|
177
|
+
}
|
|
178
|
+
dragMode?: boolean // 拖拽状态
|
|
179
|
+
isSafeRun?: number
|
|
180
|
+
isSafeSuspend?: number
|
|
181
|
+
safeDO?: number[]
|
|
182
|
+
safeDI?: number[]
|
|
183
|
+
selectedControlBarCoordinate: {
|
|
184
|
+
user: number
|
|
185
|
+
tool: number
|
|
186
|
+
}
|
|
187
|
+
jogMode: JogMode
|
|
188
|
+
dragPlayback?: boolean // 复现状态
|
|
189
|
+
dragTrack?: boolean // 录制状态
|
|
190
|
+
autoManual?: 'auto' | 'manual'
|
|
191
|
+
emergencyStop?: boolean
|
|
192
|
+
warning?: number
|
|
193
|
+
speedRatio?: number
|
|
194
|
+
remoteRun?: boolean
|
|
195
|
+
jointBrake?: number[]
|
|
196
|
+
coordinate?: CoordinateType
|
|
197
|
+
pointSignal?: number
|
|
198
|
+
ledStatus?: number
|
|
199
|
+
skinValue?: number[]
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
export enum RemoteModeType {
|
|
203
|
+
Online = 'tp',
|
|
204
|
+
TCP = 'tcp',
|
|
205
|
+
}
|
|
206
|
+
export type remoteControlType = {
|
|
207
|
+
mode: RemoteModeType
|
|
208
|
+
name: string
|
|
209
|
+
}
|
|
210
|
+
export enum PrjStateType {
|
|
211
|
+
stopped = 'stopped',
|
|
212
|
+
suspended = 'suspended',
|
|
213
|
+
running = 'running',
|
|
214
|
+
}
|
|
215
|
+
export enum JogMode {
|
|
216
|
+
Jog = 'jog',
|
|
217
|
+
Step = 'step',
|
|
218
|
+
}
|
|
219
|
+
export enum CoordinateType {
|
|
220
|
+
Cartesian = 'cartesian',
|
|
221
|
+
Joint = 'joint',
|
|
222
|
+
Tool = 'tool',
|
|
223
|
+
}
|
|
224
|
+
export interface userMagamentState {
|
|
225
|
+
userModalData: {
|
|
226
|
+
show: boolean
|
|
227
|
+
edit?: boolean
|
|
228
|
+
user?: any
|
|
229
|
+
index?: number
|
|
230
|
+
}
|
|
231
|
+
permissionList: any[]
|
|
232
|
+
currentLevel: number
|
|
233
|
+
currentUserInfo: string
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
export enum ModuleType {
|
|
237
|
+
Module = 'Module',
|
|
238
|
+
Template = 'Template',
|
|
239
|
+
}
|
|
240
|
+
|