diff --git a/sgzb-ui/src/views/iotDevice/index.vue b/sgzb-ui/src/views/iotDevice/index.vue index e5ebc14a..b12b5782 100644 --- a/sgzb-ui/src/views/iotDevice/index.vue +++ b/sgzb-ui/src/views/iotDevice/index.vue @@ -15,9 +15,9 @@ 添加设备 - 下载二维码 + > --> @@ -154,6 +154,20 @@ v-model="addDeviceParams.iotCode" /> + + + + @@ -237,6 +251,7 @@ export default { addDeviceParams: { iotType: '', iotCode: '', + iotStatus: 0, }, // 新增设备表单校验 addDeviceRules: { @@ -296,6 +311,7 @@ export default { this.dialogConfig.outerTitle = '修改设备' this.addDeviceParams.iotId = row.iotId this.addDeviceParams.iotCode = row.iotCode + this.addDeviceParams.iotStatus = row.iotStatus this.addDeviceParams.iotType = parseInt(row.iotType) } this.dialogConfig.outerWidth = '40%' 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 e3881a01..d977fbaf 100644 --- a/sgzb-ui/src/views/warehouseManage/machinery/coding/component/MapDIalog.vue +++ b/sgzb-ui/src/views/warehouseManage/machinery/coding/component/MapDIalog.vue @@ -13,9 +13,7 @@ ({{ deviceType }}) - - 定位设备编号: {{ equipmentNumber }} - + 定位设备编号: {{ iotCode }} {{ engineering }}工程 @@ -195,7 +193,6 @@ export default { trackAni: null, // 轨迹实例 calLon: '', calLat: '', - // 查询设备行程信息的参数 tripParams: { beginTime: moment() diff --git a/sgzb-ui/src/views/warehouseManage/machinery/coding/debug.vue b/sgzb-ui/src/views/warehouseManage/machinery/coding/debug.vue index 8fc6ec58..450377ec 100644 --- a/sgzb-ui/src/views/warehouseManage/machinery/coding/debug.vue +++ b/sgzb-ui/src/views/warehouseManage/machinery/coding/debug.vue @@ -1,6 +1,6 @@ - + 导出 @@ -135,6 +135,7 @@ @@ -151,13 +152,13 @@ label="设备类型" align="center" prop="deviceType" - :show-overflow-tooltip="true" + show-overflow-tooltip /> + + + 未绑定 + + + + + + + - + 编辑 删除 @@ -513,6 +530,16 @@ + + + + @@ -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; }