diff --git a/src/axios/stacker.js b/src/axios/stacker.js new file mode 100644 index 0000000..5823428 --- /dev/null +++ b/src/axios/stacker.js @@ -0,0 +1,8 @@ +import axios from '@/axios/base/base.axios'; + +export default { + // 获取所有堆垛机数据 + getStacker() { + return axios.get('/api/wcs/stacker/getStackerStatus') + }, +} \ No newline at end of file diff --git a/src/enum/base/on.off.enum.js b/src/enum/base/on.off.enum.js new file mode 100644 index 0000000..1b32508 --- /dev/null +++ b/src/enum/base/on.off.enum.js @@ -0,0 +1,24 @@ +// 开启和关闭枚举 +export const onOrOffEnum = { + on: { + value: 0, + label: '关闭', + type: 'warning' + }, + off: { + value: 1, + label: '开启', + type: 'success' + } +} + +export function formatterOnOrOffEnum(value) { + switch (parseInt(value)){ + case onOrOffEnum.on.value: + return {label: onOrOffEnum.on.label, type: onOrOffEnum.on.type}; + case onOrOffEnum.off.value: + return {label: onOrOffEnum.off.label, type: onOrOffEnum.off.type}; + default: + return {label: `未知类型:${value}`, type: 'danger'}; + } +} \ No newline at end of file diff --git a/src/enum/location/locationStatusEnum.js b/src/enum/location/locationStatusEnum.js new file mode 100644 index 0000000..ec5e241 --- /dev/null +++ b/src/enum/location/locationStatusEnum.js @@ -0,0 +1,46 @@ + +// 库位状态 +export const locationStatusEnum = { + creat: { + value: 0, + label: '空闲', + type: 'success' + }, + queue: { + value: 1, + label: '锁定', + type: 'warning' + }, + running: { + value: 2, + label: '占用', + type: 'primary' + }, + finish: { + value: 9, + label: '禁用', + type: 'danger' + }, + error: { + value: 999, + label: '特殊点位', + type: 'info' + } +} + +export function formatterLocationStatusEnum(value) { + switch (parseInt(value)){ + case locationStatusEnum.creat.value: + return {label: locationStatusEnum.creat.label, type: locationStatusEnum.creat.type}; + case locationStatusEnum.queue.value: + return {label: locationStatusEnum.queue.label, type: locationStatusEnum.queue.type}; + case locationStatusEnum.running.value: + return {label: locationStatusEnum.running.label, type: locationStatusEnum.running.type}; + case locationStatusEnum.finish.value: + return {label: locationStatusEnum.finish.label, type: locationStatusEnum.finish.type}; + case locationStatusEnum.error.value: + return {label: locationStatusEnum.error.label, type: locationStatusEnum.error.type}; + default: + return {label: `未知类型:${value}`, type: 'danger'}; + } +} \ No newline at end of file diff --git a/src/enum/location/locationTypeEnum.js b/src/enum/location/locationTypeEnum.js new file mode 100644 index 0000000..d54fc3f --- /dev/null +++ b/src/enum/location/locationTypeEnum.js @@ -0,0 +1,46 @@ + +// 库位类型 +export const locationTypeEnum = { + creat: { + value: 0, + label: '库位', + type: 'info' + }, + queue: { + value: 1, + label: '入库站台', + type: 'success' + }, + running: { + value: 2, + label: '出库站台', + type: 'warning' + }, + finish: { + value: 12, + label: '出入库站台', + type: 'danger' + }, + error: { + value: 9, + label: '移库暂存点', + type: 'primary' + } +} + +export function formatterLocationTypeEnum(value) { + switch (parseInt(value)){ + case locationTypeEnum.creat.value: + return {label: locationTypeEnum.creat.label, type: locationTypeEnum.creat.type}; + case locationTypeEnum.queue.value: + return {label: locationTypeEnum.queue.label, type: locationTypeEnum.queue.type}; + case locationTypeEnum.running.value: + return {label: locationTypeEnum.running.label, type: locationTypeEnum.running.type}; + case locationTypeEnum.finish.value: + return {label: locationTypeEnum.finish.label, type: locationTypeEnum.finish.type}; + case locationTypeEnum.error.value: + return {label: locationTypeEnum.error.label, type: locationTypeEnum.error.type}; + default: + return {label: `未知类型:${value}`, type: 'danger'}; + } +} \ No newline at end of file diff --git a/src/enum/stacker/stackerControlModelEnum.js b/src/enum/stacker/stackerControlModelEnum.js new file mode 100644 index 0000000..b5d678e --- /dev/null +++ b/src/enum/stacker/stackerControlModelEnum.js @@ -0,0 +1,52 @@ + +// 堆垛机控制方式 +export const stackerControlModel = { + offline: { + value: 0, + label: '离线', + type: 'warning' + }, + selfLearning: { + value: 1, + label: '自学习', + type: 'primary' + }, + debug: { + value: 2, + label: '调试', + type: 'primary' + }, + manual: { + value: 3, + label: '手动', + type: 'primary' + }, + standAlone: { + value: 4, + label: '单机', + type: 'primary' + }, + online: { + value: 5, + label: '联机', + type: 'success' + } +} +export function formatterStackerControlModel(value) { + switch (parseInt(value)){ + case stackerControlModel.offline.value: + return {label: stackerControlModel.offline.label, type: stackerControlModel.offline.type}; + case stackerControlModel.selfLearning.value: + return {label: stackerControlModel.selfLearning.label, type: stackerControlModel.selfLearning.type}; + case stackerControlModel.debug.value: + return {label: stackerControlModel.debug.label, type: stackerControlModel.debug.type}; + case stackerControlModel.manual.value: + return {label: stackerControlModel.manual.label, type: stackerControlModel.manual.type}; + case stackerControlModel.standAlone.value: + return {label: stackerControlModel.standAlone.label, type: stackerControlModel.standAlone.type}; + case stackerControlModel.online.value: + return {label: stackerControlModel.online.label, type: stackerControlModel.online.type}; + default: + return {label: `未知类型:${value}`, type: 'danger'}; + } +} \ No newline at end of file diff --git a/src/enum/stacker/stackerStatusEnum.js b/src/enum/stacker/stackerStatusEnum.js new file mode 100644 index 0000000..ad2d25e --- /dev/null +++ b/src/enum/stacker/stackerStatusEnum.js @@ -0,0 +1,101 @@ + +// 堆垛机状态 ---- 设备 +export const stackerControlModel = { + offline: { + value: 0, + label: '离线', + type: 'warning' + }, + free: { + value: 1, + label: '空闲', + type: 'success' + }, + acceptTask: { + value: 2, + label: '任务接收', + type: 'Info' + }, + getMove: { + value: 3, + label: '取货移动', + type: 'Info' + }, + getting: { + value: 4, + label: '取货中', + type: 'Info' + }, + getComplete: { + value: 5, + label: '取货完成', + type: 'Info' + }, + setMove: { + value: 6, + label: '卸货移动', + type: 'Info' + }, + setting: { + value: 7, + label: '卸货中', + type: 'Info' + }, + setComplete: { + value: 8, + label: '卸货完成', + type: 'Info' + }, + taskComplete: { + value: 9, + label: '任务完成', + type: 'Info' + }, + deleteTask: { + value: 10, + label: '删除任务', + type: 'Info' + }, + checking: { + value: 11, + label: '盘点中', + type: 'Info' + }, + applyTask: { + value: 12, + label: '二次预约申请', + type: 'primary' + } +} +export function formatterStackerStatus(value) { + switch (parseInt(value)){ + case stackerControlModel.offline.value: + return {label: stackerControlModel.offline.label, type: stackerControlModel.offline.type}; + case stackerControlModel.free.value: + return {label: stackerControlModel.free.label, type: stackerControlModel.free.type}; + case stackerControlModel.acceptTask.value: + return {label: stackerControlModel.acceptTask.label, type: stackerControlModel.acceptTask.type}; + case stackerControlModel.getMove.value: + return {label: stackerControlModel.getMove.label, type: stackerControlModel.getMove.type}; + case stackerControlModel.getting.value: + return {label: stackerControlModel.getting.label, type: stackerControlModel.getting.type}; + case stackerControlModel.getComplete.value: + return {label: stackerControlModel.getComplete.label, type: stackerControlModel.getComplete.type}; + case stackerControlModel.setMove.value: + return {label: stackerControlModel.setMove.label, type: stackerControlModel.setMove.type}; + case stackerControlModel.setting.value: + return {label: stackerControlModel.setting.label, type: stackerControlModel.setting.type}; + case stackerControlModel.setComplete.value: + return {label: stackerControlModel.setComplete.label, type: stackerControlModel.setComplete.type}; + case stackerControlModel.taskComplete.value: + return {label: stackerControlModel.taskComplete.label, type: stackerControlModel.taskComplete.type}; + case stackerControlModel.deleteTask.value: + return {label: stackerControlModel.deleteTask.label, type: stackerControlModel.deleteTask.type}; + case stackerControlModel.checking.value: + return {label: stackerControlModel.checking.label, type: stackerControlModel.checking.type}; + case stackerControlModel.applyTask.value: + return {label: stackerControlModel.applyTask.label, type: stackerControlModel.applyTask.type}; + default: + return {label: `未知类型:${value}`, type: 'danger'}; + } +} \ No newline at end of file diff --git a/src/enum/taskEnum/wms.taskStatus.enum.js b/src/enum/taskEnum/wms.taskStatus.enum.js index 726f12f..8f7f33a 100644 --- a/src/enum/taskEnum/wms.taskStatus.enum.js +++ b/src/enum/taskEnum/wms.taskStatus.enum.js @@ -5,27 +5,27 @@ export const wmsTaskStatusEnum = { creat: { value: 0, label: '新创建', - color: 'Info' + color: 'info' }, queue: { value: 1, label: '排队中', - color: 'Info' + color: 'warning' }, running: { value: 2, label: '执行中', - color: 'Primary' + color: 'primary' }, finish: { value: 3, label: '执行完成', - color: 'Success' + color: 'success' }, error: { value: 9, label: '执行异常', - color: 'Warning' + color: 'danger' } } diff --git a/src/enum/taskEnum/wms.taskType.enum.js b/src/enum/taskEnum/wms.taskType.enum.js index 2bacc24..c19cb7d 100644 --- a/src/enum/taskEnum/wms.taskType.enum.js +++ b/src/enum/taskEnum/wms.taskType.enum.js @@ -5,27 +5,27 @@ export const wmsTaskTypeEnum = { inTask:{ value:1, label:'入库任务', - color: 'Success' + color: 'success' }, outTask:{ value:2, label:'出库任务', - color: 'Warning' + color: 'warning' }, pickTask:{ value:4, label:'拣货任务', - color: 'Info' + color: 'info' }, checkTask:{ value:10, label:'盘点任务', - color: 'Danger' + color: 'danger' }, moveTask:{ value:9, label:'移库任务', - color: 'Primary' + color: 'primary' } } diff --git a/src/view/component/locationData/LocationList.vue b/src/view/component/locationData/LocationList.vue index 695a325..03e51c3 100644 --- a/src/view/component/locationData/LocationList.vue +++ b/src/view/component/locationData/LocationList.vue @@ -11,15 +11,21 @@ - + - + - + + + + @@ -27,7 +33,8 @@ - + + @@ -66,6 +73,8 @@ // import 《组件名称》 from '《组件路径》 '; import formatterLocation from "@/plugins/formatter/formatter.location"; import CheckDetail from "@/view/component/locationData/CheckDetail.vue"; +import {formatterLocationTypeEnum} from "@/enum/location/locationTypeEnum"; +import {formatterLocationStatusEnum} from "@/enum/location/locationStatusEnum"; export default { // import 引入的组件需要注入到对象中才能使用 @@ -90,6 +99,8 @@ export default { watch: {}, // 方法集合 methods: { + formatterLocationStatusEnum, + formatterLocationTypeEnum, searchData() { this.$emit('pageChange', this.searchParams) }, diff --git a/src/view/component/locationData/SearchForm.vue b/src/view/component/locationData/SearchForm.vue index 29abc11..198b697 100644 --- a/src/view/component/locationData/SearchForm.vue +++ b/src/view/component/locationData/SearchForm.vue @@ -6,13 +6,14 @@ - - - - - - - + + + + + + + + @@ -26,6 +27,8 @@ // import 《组件名称》 from '《组件路径》 '; import locationApi from '@/axios/location' import {ElLoading, ElMessage, ElMessageBox} from "element-plus"; +import {locationStatusEnum} from "@/enum/location/locationStatusEnum"; +import {locationTypeEnum} from "@/enum/location/locationTypeEnum"; export default { // import 引入的组件需要注入到对象中才能使用 @@ -37,7 +40,14 @@ export default { return {} }, // 计算属性 类似于 data 概念 - computed: {}, + computed: { + locationTypeEnum() { + return locationTypeEnum + }, + locationStatusEnum() { + return locationStatusEnum + } + }, // 监控 data 中的数据变化 watch: {}, // 方法集合 diff --git a/src/view/component/wmsTask/AddWmsTask.vue b/src/view/component/wmsTask/AddWmsTask.vue index ea05cb8..3c2ebe0 100644 --- a/src/view/component/wmsTask/AddWmsTask.vue +++ b/src/view/component/wmsTask/AddWmsTask.vue @@ -7,7 +7,7 @@ label-width="100px" :model="wmsTask" require-asterisk-position="right" - style="width: 600px" + inline >
请输入准确位置,否则可能不能正常运行任务(不建议使用此处操作,请前往WMS操作) @@ -22,7 +22,7 @@ - + - + { const responseData = response.data if (responseData.code === 0) { diff --git a/src/view/component/wmsTask/SearchForm.vue b/src/view/component/wmsTask/SearchForm.vue index 9b86f35..4a34194 100644 --- a/src/view/component/wmsTask/SearchForm.vue +++ b/src/view/component/wmsTask/SearchForm.vue @@ -7,7 +7,7 @@ - + diff --git a/src/view/component/wmsTask/WmsTaskList.vue b/src/view/component/wmsTask/WmsTaskList.vue index 4effb79..c5d08c7 100644 --- a/src/view/component/wmsTask/WmsTaskList.vue +++ b/src/view/component/wmsTask/WmsTaskList.vue @@ -12,7 +12,7 @@ diff --git a/src/view/tab/equipmentManage/LocationData.vue b/src/view/tab/equipmentManage/LocationData.vue index e6c7534..b4039a1 100644 --- a/src/view/tab/equipmentManage/LocationData.vue +++ b/src/view/tab/equipmentManage/LocationData.vue @@ -30,8 +30,10 @@ export default { searchParams: { // 查询关键字 searchStr: '', + // 点位状态 + locationStatus: [0,1,2,9,999], // 点位类型 - locationStatus: [], + locationType: [0,1,2,9,12], // 分页控件信息 page: { // 每页显示的行数 diff --git a/src/view/tab/systemStatus/StackerStatus.vue b/src/view/tab/systemStatus/StackerStatus.vue index 771cb67..b58dcc7 100644 --- a/src/view/tab/systemStatus/StackerStatus.vue +++ b/src/view/tab/systemStatus/StackerStatus.vue @@ -1,11 +1,63 @@