From de933d720328b8d3e8df34b772d1e57025b3a3d5 Mon Sep 17 00:00:00 2001 From: yyy <2605810609@qq.com> Date: Fri, 14 Mar 2025 09:53:33 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E7=82=B9=E4=BD=8D=E6=9C=80=E5=A4=A7?= =?UTF-8?q?=E5=80=BC=E9=99=90=E5=88=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/map/logList.ts | 5 +++ src/views/mapPage/logList/index.vue | 44 +++++++++++++------ .../components-tool/editMapRouteDialog.vue | 2 +- 3 files changed, 37 insertions(+), 14 deletions(-) diff --git a/src/api/map/logList.ts b/src/api/map/logList.ts index aa126b00..bee51c12 100644 --- a/src/api/map/logList.ts +++ b/src/api/map/logList.ts @@ -9,3 +9,8 @@ export const getRobotTaskPage = async (data) => { export const getTaskDetailPage = async (params) => { return await request.get({ url: `/system/robot/task-detail-action-log/page`, params }) } + +//用户操作记录 +export const getUserOperationLogPage = async (params) => { + return await request.get({ url: `/system/log/user-operation-log/page`, params }) +} diff --git a/src/views/mapPage/logList/index.vue b/src/views/mapPage/logList/index.vue index 4f02a4bc..3aa70f45 100644 --- a/src/views/mapPage/logList/index.vue +++ b/src/views/mapPage/logList/index.vue @@ -8,18 +8,19 @@ @@ -44,10 +45,10 @@ v-loading="loading" > - - + + @@ -142,7 +143,7 @@ @@ -291,8 +292,15 @@ const operationLogParams = reactive({ }) const operationLogList = ref() const operationLogTotal = ref(0) -const getOperationLogList = () => { - loading.value = false +const getOperationLogList = async () => { + loading.value = true + try { + const data = await LogListAPi.getUserOperationLogPage(operationLogParams) + operationLogList.value = data.list + operationLogTotal.value = data.total + } finally { + loading.value = false + } } //车辆日志 const carLogParams = reactive({ @@ -361,9 +369,19 @@ const handleQuery = () => { } } +const operationLogParamsRef = ref() +const carLogParamsRef = ref() +const taskLogParamsRef = ref() + /** 重置按钮操作 */ const resetQuery = () => { - queryFormRef.value.resetFields() + if (activeName.value == 1) { + operationLogParamsRef.value.resetFields() + } else if (activeName.value == 2) { + carLogParamsRef.value.resetFields() + } else if (activeName.value == 3) { + taskLogParamsRef.value.resetFields() + } handleQuery() } diff --git a/src/views/mapPage/realTimeMap/components-tool/editMapRouteDialog.vue b/src/views/mapPage/realTimeMap/components-tool/editMapRouteDialog.vue index aa3dbc9b..2d13aede 100644 --- a/src/views/mapPage/realTimeMap/components-tool/editMapRouteDialog.vue +++ b/src/views/mapPage/realTimeMap/components-tool/editMapRouteDialog.vue @@ -53,7 +53,7 @@ style="width: 100%" v-model="form.endPointY" :min="0" - :max="imgBgObj.width" + :max="imgBgObj.height" placeholder="请输入结束点位y轴" controls-position="right" /> From 9cb8b56e0b8e4c09dec23a88fb1591e3135c73ef Mon Sep 17 00:00:00 2001 From: yyy <2605810609@qq.com> Date: Fri, 14 Mar 2025 10:18:46 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E7=94=9F=E6=88=90=E7=9B=B4=E7=BA=BF?= =?UTF-8?q?=E6=94=B9=E4=B8=BA=E6=8C=89=E7=85=A7sortNum=E6=9C=80=E5=A4=A7?= =?UTF-8?q?=E6=9C=80=E5=B0=8F=E5=80=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/mapPage/realTimeMap/editMap.vue | 24 +++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) diff --git a/src/views/mapPage/realTimeMap/editMap.vue b/src/views/mapPage/realTimeMap/editMap.vue index 77949a51..620993cb 100644 --- a/src/views/mapPage/realTimeMap/editMap.vue +++ b/src/views/mapPage/realTimeMap/editMap.vue @@ -2029,16 +2029,28 @@ const clickDrawSelectionArea = () => { //将一个数组中的点位 按照第一个和最后一个排成一条直线 const mapPointsToLine = (points) => { // 找出 locationX 最大和最小的项 + // let minXPoint = points[0] + // let maxXPoint = points[0] + // points.forEach((point) => { + // if (point.locationX < minXPoint.locationX) { + // minXPoint = point + // } + // if (point.locationX > maxXPoint.locationX) { + // maxXPoint = point + // } + // }) + + // 找出sortNum最小和最大的点 let minXPoint = points[0] let maxXPoint = points[0] - points.forEach((point) => { - if (point.locationX < minXPoint.locationX) { - minXPoint = point + for (let i = 1; i < points.length; i++) { + if (points[i].sortNum < minXPoint.sortNum) { + minXPoint = points[i] } - if (point.locationX > maxXPoint.locationX) { - maxXPoint = point + if (points[i].sortNum > maxXPoint.sortNum) { + maxXPoint = points[i] } - }) + } const dx = maxXPoint.locationX - minXPoint.locationX const dy = maxXPoint.locationY - minXPoint.locationY