From 22ec75cbf2013b4974509e3eba4890db3b234c64 Mon Sep 17 00:00:00 2001 From: binbin_pan Date: Wed, 3 Jul 2024 11:04:35 +0800 Subject: [PATCH 1/5] =?UTF-8?q?=E5=AE=9A=E4=BD=8D=E9=A1=B5=E9=9D=A2?= =?UTF-8?q?=E6=90=AD=E5=BB=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sgzb-ui/src/views/newLogin.vue | 2 +- .../machinery/coding/component/MapDIalog.vue | 52 +++++++++++++++++++ .../machinery/coding/index.vue | 8 ++- 3 files changed, 60 insertions(+), 2 deletions(-) create mode 100644 sgzb-ui/src/views/warehouseManage/machinery/coding/component/MapDIalog.vue diff --git a/sgzb-ui/src/views/newLogin.vue b/sgzb-ui/src/views/newLogin.vue index 0ef9206e..0b307040 100644 --- a/sgzb-ui/src/views/newLogin.vue +++ b/sgzb-ui/src/views/newLogin.vue @@ -32,7 +32,7 @@ - + diff --git a/sgzb-ui/src/views/warehouseManage/machinery/coding/component/MapDIalog.vue b/sgzb-ui/src/views/warehouseManage/machinery/coding/component/MapDIalog.vue new file mode 100644 index 00000000..768df88c --- /dev/null +++ b/sgzb-ui/src/views/warehouseManage/machinery/coding/component/MapDIalog.vue @@ -0,0 +1,52 @@ + + + + + diff --git a/sgzb-ui/src/views/warehouseManage/machinery/coding/index.vue b/sgzb-ui/src/views/warehouseManage/machinery/coding/index.vue index 474d603a..6eb7a8f8 100644 --- a/sgzb-ui/src/views/warehouseManage/machinery/coding/index.vue +++ b/sgzb-ui/src/views/warehouseManage/machinery/coding/index.vue @@ -532,6 +532,8 @@ + +
@@ -556,13 +558,15 @@ import Treeselect from '@riophae/vue-treeselect' import '@riophae/vue-treeselect/dist/vue-treeselect.css' import QRCode from 'qrcodejs2' import BindIOT from './component/BindIOT.vue' +import MapDIalog from './component/MapDIalog.vue' export default { name: 'Devices', dicts: ['sys_normal_disable'], - components: { Treeselect, BindIOT }, + components: { Treeselect, BindIOT, MapDIalog }, data() { return { + openMap: false, isShow: false, // 遮罩层 loading: true, @@ -816,6 +820,8 @@ export default { }, handleMap(row) { console.log('~ handleMap ~ 地图', row) + // 点击打开弹框 + this.openMap = true } }, } From 6adb1dc728931556f8d0639a3cda761c596cae40 Mon Sep 17 00:00:00 2001 From: binbin_pan Date: Wed, 3 Jul 2024 17:10:50 +0800 Subject: [PATCH 2/5] =?UTF-8?q?=E5=AE=9A=E4=BD=8D=E9=A1=B5=E9=9D=A2?= =?UTF-8?q?=E6=90=AD=E5=BB=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sgzb-ui/public/index.html | 3 + sgzb-ui/src/assets/images/endIcon.png | Bin 0 -> 4595 bytes sgzb-ui/src/assets/images/startIcon.png | Bin 0 -> 4084 bytes .../machinery/coding/component/MapDIalog.vue | 176 +++++++++++++++++- .../machinery/coding/index.vue | 15 +- 5 files changed, 179 insertions(+), 15 deletions(-) create mode 100644 sgzb-ui/src/assets/images/endIcon.png create mode 100644 sgzb-ui/src/assets/images/startIcon.png diff --git a/sgzb-ui/public/index.html b/sgzb-ui/public/index.html index 63e9fadc..82b4e090 100644 --- a/sgzb-ui/public/index.html +++ b/sgzb-ui/public/index.html @@ -11,6 +11,9 @@ <%= webpackConfig.name %> + + + + diff --git a/sgzb-ui/src/views/warehouseManage/machinery/coding/index.vue b/sgzb-ui/src/views/warehouseManage/machinery/coding/index.vue index 6eb7a8f8..768b29c1 100644 --- a/sgzb-ui/src/views/warehouseManage/machinery/coding/index.vue +++ b/sgzb-ui/src/views/warehouseManage/machinery/coding/index.vue @@ -533,7 +533,7 @@
- +
@@ -557,13 +557,13 @@ import { listHouseTree } from '@/api/store/shelves' import Treeselect from '@riophae/vue-treeselect' import '@riophae/vue-treeselect/dist/vue-treeselect.css' import QRCode from 'qrcodejs2' -import BindIOT from './component/BindIOT.vue' -import MapDIalog from './component/MapDIalog.vue' +import BindIOT from './component/BindIOT' +import MapDialog from './component/MapDialog' export default { name: 'Devices', dicts: ['sys_normal_disable'], - components: { Treeselect, BindIOT, MapDIalog }, + components: { Treeselect, BindIOT, MapDialog }, data() { return { openMap: false, @@ -820,8 +820,13 @@ export default { }, handleMap(row) { console.log('~ handleMap ~ 地图', row) + const params = { + deviceType: row.deviceType, + } // 点击打开弹框 - this.openMap = true + this.$refs.mapDIalog.openMapDialog(true) + this.$refs.mapDIalog.getEquipmentInfo(params) + this.$refs.mapDIalog.initMap() } }, } From d04f23454b2a331152739fc98d171cdd764714b4 Mon Sep 17 00:00:00 2001 From: binbin_pan Date: Wed, 3 Jul 2024 20:05:33 +0800 Subject: [PATCH 3/5] =?UTF-8?q?=E5=AE=9A=E4=BD=8D=E9=A1=B5=E9=9D=A2?= =?UTF-8?q?=E5=BC=80=E5=8F=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../machinery/coding/component/MapDIalog.vue | 112 ++++++------------ 1 file changed, 33 insertions(+), 79 deletions(-) diff --git a/sgzb-ui/src/views/warehouseManage/machinery/coding/component/MapDIalog.vue b/sgzb-ui/src/views/warehouseManage/machinery/coding/component/MapDIalog.vue index a5ab523e..0bf51ece 100644 --- a/sgzb-ui/src/views/warehouseManage/machinery/coding/component/MapDIalog.vue +++ b/sgzb-ui/src/views/warehouseManage/machinery/coding/component/MapDIalog.vue @@ -45,14 +45,7 @@ export default { equipmentNumber: 'H906L', // 设备编号 engineering: '大禹治水', // 工程 map: null, - centerPoint: [113.271431, 23.135336], // 中心点 - animiationLineList: [], // 动画线 - lineStyle: { - // 线样式 - color: '#0e83ed', - width: 2, - opacity: 0.6, - }, + // 轨迹点 linePointList: [ { lng: 116.297611, @@ -82,24 +75,7 @@ export default { lng: 116.307223, lat: 40.056379, }, - ], // 线点 - // map: { - // center: { lng: 113.763924, lat: 22.938634 }, - // zoom: 18, - // show: true, - // dragging: true, - // }, - // lineList: [ - // { lng: 113.763924, lat: 22.938634 }, - // { lng: 113.759621, lat: 22.933625 }, - // { lng: 113.76654, lat: 22.934174 }, - // { lng: 113.766558, lat: 22.932916 }, - // { lng: 113.766558, lat: 22.932916 }, - // { lng: 113.768745, lat: 22.93173 }, - // { lng: 113.76945, lat: 22.930731 }, - // { lng: 113.772022, lat: 22.93014 }, - // { lng: 108.952789, lat: 34.348938 }, - // ], + ], } }, mounted() {}, @@ -122,78 +98,56 @@ export default { // 初始化地图和轨迹 initMap() { this.$nextTick(() => { - // // 创建地图实例 - // this.map = new BMapGL.Map('map') - // // 创建点坐标 - // this.map.centerAndZoom(new BMapGL.Point(116.297611, 40.047363), 18) - // // 启用滚轮放大缩小 - // this.map.enableScrollWheelZoom(true) - // // setTimeout - // setTimeout(() => { - // // const startIcon = { - // // imgUrl: new URL('/src/assets/images/startIcon', import.meta.url).href, - // // position: [this.linePointList[0].lng, this.linePointList[0].lat], - // // size: [50, 50], - // // } - // // const endIcon = { - // // imgUrl: new URL('/src/assets/images/endIcon', import.meta.url).href, - // // position: [this.linePointList[this.linePointList.length - 1].lng, this.linePointList[linePointList.length - 1].lat], - // // size: [50, 50], - // // } - // this.initIcon(startIcon.imgUrl, startIcon.position, startIcon.size) - // this.initIcon(endIcon.imgUrl, endIcon.position, endIcon.size) - // }, 100) this.map = new BMapGL.Map('container') // 创建地图实例 - let point = new BMapGL.Point(116.297611, 40.047363) // 创建点坐标 + let point = new BMapGL.Point(117.14, 31.87) // 创建点坐标 console.log('🚀 ~ this.$nextTick ~ point:', point) this.map.centerAndZoom(point, 15) // 初始化地图,设置中心点坐标和地图级别 this.map.enableScrollWheelZoom(true) // 启用滚轮放大缩小 - // 设置起点终点图标 - setTimeout(async () => { - const startIcon = { - imgUrl: await import('/src/assets/images/startIcon.png'), - position: [linePointList[0].lng, linePointList[0].lat], - size: [50, 50], - } - const endIcon = { - imgUrl: await import('/src/assets/images/endIcon.png'), - position: [linePointList[linePointList.length - 1].lng, linePointList[linePointList.length - 1].lat], - size: [50, 50], - } - initIcon(startIcon.imgUrl, startIcon.position, startIcon.size) - initIcon(endIcon.imgUrl, endIcon.position, endIcon.size) - // initPolyline() - // initPolylineAnimation() - // setViewPortFn() - }, 200) // 添加轨迹 let pointList = [] for (var i = 0; i < this.linePointList.length; i++) { pointList.push(new BMapGL.Point(this.linePointList[i].lng, this.linePointList[i].lat)) } - let pl = new BMapGL.Polyline(pointList) + let polyline = new BMapGL.Polyline(pointList) + // 修改线的样式 + polyline.setStrokeColor('#EA3323') // 线颜色 #EA3323 + // polyline.setStrokeWeight(2) // 线宽 - let trackAni = new BMapGLLib.TrackAnimation(this.map, pl, { + let trackAni = new BMapGLLib.TrackAnimation(this.map, polyline, { overallView: true, // 动画完成后自动调整视野到总览 tilt: 30, // 轨迹播放的角度,默认为55 duration: 10000, // 动画持续时长,默认为10000,单位ms - delay: 3000, // 动画开始的延迟,默认0,单位ms + delay: 2000, // 动画开始的延迟,默认0,单位ms }) + // 设置起点终点图标 + this.simulateMovement() trackAni.start() }) }, - initIcon(imgUrl, position, size) { - // var myIcon = new BMapGL.Icon("https://api.map.baidu.com/img/markers.png", new BMapGL.Size(50, 50)); - var myIcon = new BMapGL.Icon(imgUrl, new BMapGL.Size(size)) - // 创建Marker标注,使用小车图标 - var pt = new BMapGL.Point(...position) - var marker = new BMapGL.Marker(pt, { - icon: myIcon, - }) - // 将标注添加到地图 - this.map.addOverlay(marker) + // 添加起点和终点的标记 + addStartEndMarkers(startLatLng, endLatLng) { + let startIcon = new BMapGL.Icon(require('/src/assets/images/startIcon.png'), new BMapGL.Size(32, 32)) + let startMarker = new BMapGL.Marker(startLatLng, { icon: startIcon }) + this.map.addOverlay(startMarker) + + let endIcon = new BMapGL.Icon(require('/src/assets/images/endIcon.png'), new BMapGL.Size(32, 32)) + let endMarker = new BMapGL.Marker(endLatLng, { icon: endIcon }) + this.map.addOverlay(endMarker) + }, + + // 模拟轨迹运动结束后的回调 + simulateMovement() { + // 模拟轨迹运动结束后获取起点和终点的经纬度坐标 + let startLatLng = new BMapGL.Point(this.linePointList[0].lng, this.linePointList[0].lat) + let endLatLng = new BMapGL.Point( + this.linePointList[this.linePointList.length - 1].lng, + this.linePointList[this.linePointList.length - 1].lat + ) + + // 添加起点和终点的图标 + this.addStartEndMarkers(startLatLng, endLatLng) }, }, } From 8ae7cd430ff9ddb57a8fa86b687caf046d9ccb0a Mon Sep 17 00:00:00 2001 From: mashuai Date: Thu, 4 Jul 2024 15:22:46 +0800 Subject: [PATCH 4/5] =?UTF-8?q?=E5=A4=A7=E5=B1=8F=E4=BA=8C=E7=BA=A7?= =?UTF-8?q?=E9=A1=B5=E9=9D=A2=E8=B0=83=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/bonus/sgzb/largeScreen/domain/ParamsDto.java | 3 +++ .../sgzb/largeScreen/service/impl/LargeScreenServiceImpl.java | 1 + .../main/resources/mapper/largeScreen/LargeScreenMapper.xml | 4 +++- 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/largeScreen/domain/ParamsDto.java b/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/largeScreen/domain/ParamsDto.java index 21594af7..321b6d0a 100644 --- a/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/largeScreen/domain/ParamsDto.java +++ b/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/largeScreen/domain/ParamsDto.java @@ -19,6 +19,9 @@ public class ParamsDto { /** 结束日期*/ private String endDate; + /** 结束日期*/ + private String date; + /** 类型*/ private String type; diff --git a/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/largeScreen/service/impl/LargeScreenServiceImpl.java b/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/largeScreen/service/impl/LargeScreenServiceImpl.java index e3f4f699..9f577c41 100644 --- a/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/largeScreen/service/impl/LargeScreenServiceImpl.java +++ b/sgzb-modules/sgzb-base/src/main/java/com/bonus/sgzb/largeScreen/service/impl/LargeScreenServiceImpl.java @@ -199,6 +199,7 @@ public class LargeScreenServiceImpl implements ILargeScreenService { String month = date.substring(5, 7); // 验收数量 dto.setType("1"); + dto.setDate(year + "-" + month); dto.setStartDate(DateTimeHelper.getFisrtDayOfMonth(Integer.parseInt(year), Integer.parseInt(month))); dto.setEndDate(DateTimeHelper.getLastDayOfMonth(Integer.parseInt(year), Integer.parseInt(month))); List> checkList = mapper.getAcceptanceStorage(dto); diff --git a/sgzb-modules/sgzb-base/src/main/resources/mapper/largeScreen/LargeScreenMapper.xml b/sgzb-modules/sgzb-base/src/main/resources/mapper/largeScreen/LargeScreenMapper.xml index 565d38e7..f2f16a4f 100644 --- a/sgzb-modules/sgzb-base/src/main/resources/mapper/largeScreen/LargeScreenMapper.xml +++ b/sgzb-modules/sgzb-base/src/main/resources/mapper/largeScreen/LargeScreenMapper.xml @@ -52,7 +52,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" LEFT JOIN purchase_check_details pcd ON pci.task_id = pcd.task_id LEFT JOIN ma_type mt ON pcd.type_id = mt.type_id AND mt.`level` = '4' LEFT JOIN sys_dept sd ON sd.dept_id = mt.company_id - WHERE pci.arrival_time BETWEEN CONCAT(#{startDate}, ' 00:00:00') AND CONCAT(#{endDate}, ' 23:59:59') + WHERE DATE_FORMAT(pci.arrival_time, '%Y-%m') = #{date} + AND mt.del_flag = '0' AND sd.dept_name = #{maTypeName} @@ -68,6 +69,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" LEFT JOIN ma_type mt ON iad.type_id = mt.type_id AND mt.`level` = '4' LEFT JOIN sys_dept sd ON sd.dept_id = mt.company_id WHERE iad.create_time BETWEEN CONCAT(#{startDate}, ' 00:00:00') AND CONCAT(#{endDate}, ' 23:59:59') AND iad.input_type = '1' + AND mt.del_flag = '0' AND sd.dept_name = #{maTypeName} From b551fe34750b501a66540166d14a1b688c090cd4 Mon Sep 17 00:00:00 2001 From: binbin_pan Date: Fri, 5 Jul 2024 11:00:28 +0800 Subject: [PATCH 5/5] =?UTF-8?q?=E9=A2=86=E6=96=99=E5=87=BA=E5=BA=93-?= =?UTF-8?q?=E5=AE=9A=E4=BD=8D=E9=A1=B5=E9=9D=A2+=E6=8E=A8=E9=80=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../picking/outbound/component/DialogPush.vue | 98 +++++++++++++++++++ .../claimAndreturn/picking/outbound/index.vue | 73 +++++++++++++- .../machinery/IOTequipment/index.vue | 7 ++ .../machinery/coding/component/BindIOT.vue | 2 +- .../machinery/coding/component/MapDIalog.vue | 40 +++++--- .../machinery/coding/index.vue | 8 +- 6 files changed, 208 insertions(+), 20 deletions(-) create mode 100644 sgzb-ui/src/views/claimAndreturn/picking/outbound/component/DialogPush.vue diff --git a/sgzb-ui/src/views/claimAndreturn/picking/outbound/component/DialogPush.vue b/sgzb-ui/src/views/claimAndreturn/picking/outbound/component/DialogPush.vue new file mode 100644 index 00000000..9c09ad00 --- /dev/null +++ b/sgzb-ui/src/views/claimAndreturn/picking/outbound/component/DialogPush.vue @@ -0,0 +1,98 @@ + + + + + diff --git a/sgzb-ui/src/views/claimAndreturn/picking/outbound/index.vue b/sgzb-ui/src/views/claimAndreturn/picking/outbound/index.vue index 75088a6a..83c9fbd1 100644 --- a/sgzb-ui/src/views/claimAndreturn/picking/outbound/index.vue +++ b/sgzb-ui/src/views/claimAndreturn/picking/outbound/index.vue @@ -92,6 +92,16 @@ v-hasPermi="['picking:outbound:export']" >导出 + + 推送到智慧工地 - - + + + + + + + + @@ -525,10 +569,12 @@ import { import { getTypeList } from '@/api/store/warehousing' import { equipmentTypeTree } from '@/api/store/tools' import Treeselect from '@riophae/vue-treeselect' +import MapDialog from '@/views/warehouseManage/machinery/coding/component/MapDialog' +import DialogPush from './component/DialogPush' import '@riophae/vue-treeselect/dist/vue-treeselect.css' export default { name: 'receiveOut', - components: { Treeselect }, + components: { Treeselect, MapDialog, DialogPush }, data() { return { // 遮罩层 @@ -602,6 +648,7 @@ export default { outTotal: 0, //编码弹窗分页-总数 outCodeList: [], //编码弹窗表格数据 outNumList: [], //数量弹窗表格数据 + selectList: [], } }, created() { @@ -833,6 +880,26 @@ export default { `领料出库_${new Date().getTime()}.xlsx`, ) }, + // 推送智慧工地 + handlePush() { + console.log('🚀 ~ handlePush ~ :',) + this.$refs.dialogPush.openDialog(true) + }, + handleSelect(val) { + console.log('🚀 ~ handleSelect ~ :', val) + this.selectList = val + console.log('🚀 ~ handleSelect ~ this.selectList:', this.selectList) + }, + handleMap(row) { + console.log('~ handleMap ~ 地图', row) + const params = { + deviceType: row.deviceType, + } + // 点击打开弹框 + this.$refs.mapDIalog.openMapDialog(true) + this.$refs.mapDIalog.getEquipmentInfo(params) + this.$refs.mapDIalog.initMap() + }, }, } diff --git a/sgzb-ui/src/views/warehouseManage/machinery/IOTequipment/index.vue b/sgzb-ui/src/views/warehouseManage/machinery/IOTequipment/index.vue index 21afdb41..e7fcb097 100644 --- a/sgzb-ui/src/views/warehouseManage/machinery/IOTequipment/index.vue +++ b/sgzb-ui/src/views/warehouseManage/machinery/IOTequipment/index.vue @@ -43,6 +43,7 @@ 记录 修改 删除 + 解绑 @@ -267,6 +268,12 @@ export default { // this.getList() // }) }, + handleUnbind(row) { + const params = { + id: row.id, + } + console.log('🚀 ~ handleUnbind ~ 解绑', row) + }, selectionChange(val) { console.log('🚀 ~ selectionChange ~ val:', val) }, diff --git a/sgzb-ui/src/views/warehouseManage/machinery/coding/component/BindIOT.vue b/sgzb-ui/src/views/warehouseManage/machinery/coding/component/BindIOT.vue index 7e2b391f..6e9ced37 100644 --- a/sgzb-ui/src/views/warehouseManage/machinery/coding/component/BindIOT.vue +++ b/sgzb-ui/src/views/warehouseManage/machinery/coding/component/BindIOT.vue @@ -26,7 +26,7 @@ - +