This commit is contained in:
磷叶 2025-05-15 15:38:04 +08:00
parent b3143c1b18
commit 468516f68e
5 changed files with 16 additions and 24 deletions

View File

@ -219,7 +219,7 @@ export default {
<style lang="scss" scoped> <style lang="scss" scoped>
.location-log-list { .location-log-list {
margin-top: 10px; margin-top: 10px;
height: calc(700px - 40px); height: calc(700px - 90px);
overflow-y: auto; overflow-y: auto;
border: 1px solid #EBEEF5; border: 1px solid #EBEEF5;
border-radius: 4px; border-radius: 4px;

View File

@ -24,6 +24,7 @@
<div class="left"> <div class="left">
<span class="log-time">{{ log.operTime }}</span> <span class="log-time">{{ log.operTime }}</span>
<dict-tag :options="dict.type.sys_common_status" :value="log.status" size="mini" style="margin-left: 4px;"/> <dict-tag :options="dict.type.sys_common_status" :value="log.status" size="mini" style="margin-left: 4px;"/>
<dict-tag :options="dict.type.oper_log_iot_status" :value="log.iotStatus" size="mini" style="margin-left: 4px;"/>
</div> </div>
<div class="right"> <div class="right">
<el-link <el-link
@ -44,6 +45,7 @@
</div> </div>
<el-empty v-if="!operLogList || operLogList.length === 0" description="暂无数据" /> <el-empty v-if="!operLogList || operLogList.length === 0" description="暂无数据" />
</div> </div>
<location-map-dialog <location-map-dialog
:visible.sync="mapVisible" :visible.sync="mapVisible"
:area="area" :area="area"
@ -65,7 +67,7 @@ import LocationMapDialog from './LocationMapDialog.vue';
export default { export default {
name: 'DeviceOperLogList', name: 'DeviceOperLogList',
dicts: ['sys_common_status'], dicts: ['sys_common_status', 'oper_log_iot_status'],
components: { components: {
UserLink, UserLink,
LocationMapDialog LocationMapDialog
@ -166,7 +168,7 @@ export default {
<style lang="scss" scoped> <style lang="scss" scoped>
.oper-log-list { .oper-log-list {
margin-top: 10px; margin-top: 10px;
height: calc(700px - 40px); height: calc(700px - 90px);
overflow-y: auto; overflow-y: auto;
.log-item { .log-item {

View File

@ -160,7 +160,7 @@ export default {
this.deviceMarker = new this.AMap.Marker({ this.deviceMarker = new this.AMap.Marker({
position: [deviceLon, deviceLat], position: [deviceLon, deviceLat],
content: `<div class="marker-content"><i class="el-icon-bicycle" style="color: #67C23A; font-size: 25px;"></i></div>`, content: `<div class="marker-content"><i class="el-icon-bicycle" style="color: #67C23A; font-size: 25px;"></i></div>`,
offset: new this.AMap.Pixel(-12, -12), offset: new this.AMap.Pixel(-16, -16),
title: '设备位置' title: '设备位置'
}); });
this.markers.push(this.deviceMarker); this.markers.push(this.deviceMarker);
@ -179,7 +179,7 @@ export default {
this.phoneMarker = new this.AMap.Marker({ this.phoneMarker = new this.AMap.Marker({
position: [phoneLon, phoneLat], position: [phoneLon, phoneLat],
content: `<div class="marker-content"><i class="el-icon-mobile-phone" style="color: #409EFF; font-size: 25px;"></i></div>`, content: `<div class="marker-content"><i class="el-icon-mobile-phone" style="color: #409EFF; font-size: 25px;"></i></div>`,
offset: new this.AMap.Pixel(-12, -12), offset: new this.AMap.Pixel(-16, -16),
title: '手机位置' title: '手机位置'
}); });
this.markers.push(this.phoneMarker); this.markers.push(this.phoneMarker);
@ -235,12 +235,6 @@ export default {
this.deviceMarker = null; this.deviceMarker = null;
} }
}, },
beforeDestroy() {
if (this.map) {
this.map.destroy();
this.map = null;
}
}
} }
</script> </script>

View File

@ -223,7 +223,7 @@
<el-tab-pane label="车辆轨迹" v-if="checkPermi(['bst:locationLog:list'])"> <el-tab-pane label="车辆轨迹" v-if="checkPermi(['bst:locationLog:list'])">
<device-location <device-location
:query="{orderId: detail.id, timeRange: orderTimeRange}" :query="{orderId: detail.id, timeRange: orderTimeRange}"
:operQuery="{bizId: detail.id, bizType: LogBizType.ORDER, operTimeRange: orderTimeRange}" :operQuery="{bizId: detail.id, bizType: LogBizType.ORDER, operTimeRange: []}"
:area-id="detail.areaId" :area-id="detail.areaId"
/> />
</el-tab-pane> </el-tab-pane>

View File

@ -129,6 +129,7 @@
<span>{{ scope.row.title | dv}}</span> <span>{{ scope.row.title | dv}}</span>
<dict-tag :options="dict.type.log_biz_type" :value="scope.row.bizType" size="mini" style="margin-left: 4px;"/> <dict-tag :options="dict.type.log_biz_type" :value="scope.row.bizType" size="mini" style="margin-left: 4px;"/>
<dict-tag :options="dict.type.sys_common_status" :value="scope.row.status" size="mini" style="margin-left: 4px;"/> <dict-tag :options="dict.type.sys_common_status" :value="scope.row.status" size="mini" style="margin-left: 4px;"/>
<dict-tag :options="dict.type.oper_log_iot_status" :value="scope.row.iotStatus" size="mini" style="margin-left: 4px;"/>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="请求地址" align="center" prop="operUrl" :show-overflow-tooltip="true" sortable="custom" :sort-orders="['descending', 'ascending']" /> <el-table-column label="请求地址" align="center" prop="operUrl" :show-overflow-tooltip="true" sortable="custom" :sort-orders="['descending', 'ascending']" />
@ -141,17 +142,6 @@
<el-table-column label="异常信息" align="center" prop="errorMsg" :show-overflow-tooltip="true" /> <el-table-column label="异常信息" align="center" prop="errorMsg" :show-overflow-tooltip="true" />
<el-table-column label="请求IP" align="center" prop="operIp" :show-overflow-tooltip="true" /> <el-table-column label="请求IP" align="center" prop="operIp" :show-overflow-tooltip="true" />
<el-table-column label="操作时间" align="center" prop="operTime" width="160" sortable="custom" :sort-orders="['descending', 'ascending']"/> <el-table-column label="操作时间" align="center" prop="operTime" width="160" sortable="custom" :sort-orders="['descending', 'ascending']"/>
<el-table-column label="设备ID" align="center" prop="deviceId" width="160" sortable="custom" :sort-orders="['descending', 'ascending']"/>
<el-table-column label="设备定位" align="center" prop="deviceLocation" width="160" sortable="custom" show-overflow-tooltip :sort-orders="['descending', 'ascending']">
<template slot-scope="scope">
<span>{{ scope.row.deviceLon }},{{ scope.row.deviceLat }}</span>
</template>
</el-table-column>
<el-table-column label="手机定位" align="center" prop="paramLon" width="160" sortable="custom" show-overflow-tooltip :sort-orders="['descending', 'ascending']">
<template slot-scope="scope">
<span>{{ scope.row.paramLon }},{{ scope.row.paramLat }}</span>
</template>
</el-table-column>
<el-table-column label="消耗时间" align="center" prop="costTime" width="110" :show-overflow-tooltip="true" sortable="custom" :sort-orders="['descending', 'ascending']"> <el-table-column label="消耗时间" align="center" prop="costTime" width="110" :show-overflow-tooltip="true" sortable="custom" :sort-orders="['descending', 'ascending']">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ scope.row.costTime }}毫秒</span> <span>{{ scope.row.costTime }}毫秒</span>
@ -216,6 +206,12 @@
<el-col :span="24"> <el-col :span="24">
<el-form-item label="异常信息:" v-if="form.status === 1">{{ form.errorMsg }}</el-form-item> <el-form-item label="异常信息:" v-if="form.status === 1">{{ form.errorMsg }}</el-form-item>
</el-col> </el-col>
<el-col :span="12">
<el-form-item label="设备定位:">{{ form.deviceLon | dv}},{{ form.deviceLat | dv}}</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="手机定位:">{{ form.paramLon | dv}},{{ form.paramLat | dv}}</el-form-item>
</el-col>
</el-row> </el-row>
</el-form> </el-form>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
@ -231,7 +227,7 @@ import UserLink from '@/components/Business/User/UserLink';
export default { export default {
name: "Operlog", name: "Operlog",
dicts: ['sys_oper_type', 'sys_common_status', 'log_biz_type'], dicts: ['sys_oper_type', 'sys_common_status', 'log_biz_type', 'oper_log_iot_status'],
components: { components: {
UserLink UserLink
}, },