From 9808a3d03c3a1918d3de8cd00bc2df963e5f2174 Mon Sep 17 00:00:00 2001 From: BianLzhaoMin <11485688+bianliangzhaomin123@user.noreply.gitee.com> Date: Fri, 9 Aug 2024 10:09:29 +0800 Subject: [PATCH 1/8] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E5=90=88=E5=B9=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../machinery/coding/component/BindIOT.vue | 40 +++++++++++++++---- 1 file changed, 32 insertions(+), 8 deletions(-) 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 fcfd1ca5..ff81bfe5 100644 --- a/sgzb-ui/src/views/warehouseManage/machinery/coding/component/BindIOT.vue +++ b/sgzb-ui/src/views/warehouseManage/machinery/coding/component/BindIOT.vue @@ -107,7 +107,12 @@ style="width: 280px" @change="changeIotType" > - + @@ -139,7 +144,12 @@ @@ -380,6 +531,7 @@ export default { margin: 0; list-style: none; display: flex; + align-items: center; li { flex: 1; text-align: center; From 060912bc19b3e367dcac505887b9afe81982f5c5 Mon Sep 17 00:00:00 2001 From: BianLzhaoMin <11485688+bianliangzhaomin123@user.noreply.gitee.com> Date: Fri, 9 Aug 2024 10:12:50 +0800 Subject: [PATCH 3/8] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E5=90=88=E5=B9=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sgzb-ui/src/api/iotDevice/index.js | 18 ++++++++++++++++++ .../machinery/coding/component/BindIOT.vue | 2 +- .../machinery/coding/component/MapDIalog.vue | 2 +- 3 files changed, 20 insertions(+), 2 deletions(-) diff --git a/sgzb-ui/src/api/iotDevice/index.js b/sgzb-ui/src/api/iotDevice/index.js index 96d88c02..c6620325 100644 --- a/sgzb-ui/src/api/iotDevice/index.js +++ b/sgzb-ui/src/api/iotDevice/index.js @@ -49,6 +49,24 @@ export function deleteDeviceApi(id) { }) } +/** 获取机具设备的位置信息 */ +export const getIotDeviceLocationApi = (data) => { + return request.post('/material/iotMachine/getLocation', data) +} +/** 获取机具设备的行程信息 */ +export const getIotDeviceTripApi = (data) => { + return request.post('/material/iotMachine/searchItinerary', data) +} +/** 获取机具设备的停留点信息 */ +export const getIotDeviceParkDetailApi = (data) => { + return request.post('/material/iotMachine/reportParkDetailByTime', data) +} +/** 获取机具设备的报警信息 */ +export const getIotDeviceAlarmApi = (data) => { + return request.post('/material/iotMachine/reportAlarm', data) +} + + /** * ***** */ 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 ff81bfe5..f0f9595c 100644 --- a/sgzb-ui/src/views/warehouseManage/machinery/coding/component/BindIOT.vue +++ b/sgzb-ui/src/views/warehouseManage/machinery/coding/component/BindIOT.vue @@ -149,7 +149,7 @@ import { bindIot, getTypeList, unbindIot, -} from '@/api/store/iotManagement' +} from '@/api/iotDevice/index.js' export default { name: 'BindIOT', 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 c6e4873d..e3881a01 100644 --- a/sgzb-ui/src/views/warehouseManage/machinery/coding/component/MapDIalog.vue +++ b/sgzb-ui/src/views/warehouseManage/machinery/coding/component/MapDIalog.vue @@ -145,7 +145,7 @@ import { getIotDeviceTripApi, getIotDeviceParkDetailApi, getIotDeviceAlarmApi, -} from '@/api/store/iotManagement.js' +} from '@/api/iotDevice/index.js' export default { name: 'MapDialog', props: { From 147fa95a7e898f354ded98a011c42eb6b78be624 Mon Sep 17 00:00:00 2001 From: BianLzhaoMin <11485688+bianliangzhaomin123@user.noreply.gitee.com> Date: Fri, 9 Aug 2024 10:15:58 +0800 Subject: [PATCH 4/8] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E5=90=88=E5=B9=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/views/warehouseManage/machinery/coding/index.vue | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/sgzb-ui/src/views/warehouseManage/machinery/coding/index.vue b/sgzb-ui/src/views/warehouseManage/machinery/coding/index.vue index e664ca0d..c1c72bd5 100644 --- a/sgzb-ui/src/views/warehouseManage/machinery/coding/index.vue +++ b/sgzb-ui/src/views/warehouseManage/machinery/coding/index.vue @@ -534,6 +534,7 @@ v-if="mapDialogVisible" :deviceName="deviceName" :deviceType="deviceType" + :iotCode="iotCode" @handelCloseDialog="handelCloseDialog" /> @@ -643,6 +644,7 @@ export default { mapDialogVisible: false, deviceName: '', deviceType: '', + iotCode: '', } }, created() { @@ -838,9 +840,11 @@ export default { } }, // 查看设备地图 - handleMap(row) { + async handleMap(row) { this.deviceName = row.specificationType this.deviceType = row.maStatusName + this.iotCode = row.iotCode + this.mapDialogVisible = true }, From bbce3dc6d976b111122b8be172e3bf65ddfd2ab6 Mon Sep 17 00:00:00 2001 From: BianLzhaoMin <11485688+bianliangzhaomin123@user.noreply.gitee.com> Date: Fri, 9 Aug 2024 11:12:59 +0800 Subject: [PATCH 5/8] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E6=97=B6=E9=97=B4?= =?UTF-8?q?=E6=A0=BC=E5=BC=8F=E5=8C=96=E6=8F=92=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sgzb-ui/package.json | 1 + 1 file changed, 1 insertion(+) diff --git a/sgzb-ui/package.json b/sgzb-ui/package.json index 764a77ce..2ab89879 100644 --- a/sgzb-ui/package.json +++ b/sgzb-ui/package.json @@ -51,6 +51,7 @@ "js-cookie": "3.0.1", "jsencrypt": "3.0.0-rc.1", "jszip": "^3.10.1", + "moment": "^2.30.1", "nprogress": "0.2.0", "qrcodejs2": "0.0.2", "quill": "1.3.7", From 70c87e41b1a23d1e2cf49a100482c99eee147a74 Mon Sep 17 00:00:00 2001 From: BianLzhaoMin <11485688+bianliangzhaomin123@user.noreply.gitee.com> Date: Fri, 9 Aug 2024 15:07:10 +0800 Subject: [PATCH 6/8] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E5=90=88=E5=B9=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sgzb-ui/src/views/iotDevice/index.vue | 6 ++++-- sgzb-ui/vue.config.js | 4 ++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/sgzb-ui/src/views/iotDevice/index.vue b/sgzb-ui/src/views/iotDevice/index.vue index 0e139124..e5ebc14a 100644 --- a/sgzb-ui/src/views/iotDevice/index.vue +++ b/sgzb-ui/src/views/iotDevice/index.vue @@ -56,13 +56,13 @@ > - + @@ -534,12 +561,22 @@ import Treeselect from '@riophae/vue-treeselect' import '@riophae/vue-treeselect/dist/vue-treeselect.css' import QRCode from 'qrcodejs2' +import BindIOT from './component/BindIOT' +import MapDialog from './component/MapDIalog' + export default { name: 'Devices', dicts: ['sys_normal_disable'], - components: { Treeselect }, + components: { Treeselect, BindIOT, MapDialog }, data() { return { + openMap: false, + isShow: false, + props: { + isShow: false, + typeId: '', + maCode: '', + }, // 遮罩层 loading: true, // 选中数组 @@ -604,6 +641,10 @@ export default { }, ], }, + mapDialogVisible: false, + deviceName: '', + deviceType: '', + iotCode: '', } }, created() { @@ -788,6 +829,29 @@ export default { // ...this.queryParams // }, `type_${new Date().getTime()}.xlsx`) }, + + // iot设备绑定 + handleBindIOT(row) { + console.log('🚀 ~ handleBindIOT ~ row:', row) + this.props = { + isShow: true, + typeId: row.typeId, + maCode: row.maCode, + } + }, + // 查看设备地图 + async handleMap(row) { + this.deviceName = row.specificationType + this.deviceType = row.maStatusName + this.iotCode = row.iotCode + + this.mapDialogVisible = true + }, + + /** 关闭地图弹框 */ + handelCloseDialog() { + this.mapDialogVisible = false + }, }, } @@ -801,8 +865,10 @@ export default { margin-top: 15px; font-size: 18px; } -::v-deep.el-table .fixed-width .el-button--mini { - width: 60px !important; - margin-bottom: 10px; + +.location-icon { + font-size: 20px; + cursor: pointer; + color: #409eff; } From 98d25536815bd62157431bfe9460ac408e8a2ffc Mon Sep 17 00:00:00 2001 From: BianLzhaoMin <11485688+bianliangzhaomin123@user.noreply.gitee.com> Date: Fri, 9 Aug 2024 15:29:09 +0800 Subject: [PATCH 8/8] =?UTF-8?q?=E4=BB=A3=E7=A0=81=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sgzb-ui/src/views/iotDevice/index.vue | 28 +++++++++++++++++++++++---- 1 file changed, 24 insertions(+), 4 deletions(-) diff --git a/sgzb-ui/src/views/iotDevice/index.vue b/sgzb-ui/src/views/iotDevice/index.vue index b12b5782..08308db8 100644 --- a/sgzb-ui/src/views/iotDevice/index.vue +++ b/sgzb-ui/src/views/iotDevice/index.vue @@ -92,6 +92,7 @@ icon="el-icon-delete" style="color: #f56c6c" @click="handleDeleteAndUnbind(row.iotId, 1)" + v-if="row.bindStatus === 1" >删除 - - - + @@ -158,7 +162,7 @@