董国庆
2026-04-24 263cd8a65d89614859b1c273ca8adc6813594bbf
fix(operationWorkbench): 修复点位面板关闭逻辑与表单验证问题

- 在创建模式下隐藏关闭按钮,防止误关闭
- 调整状态显示逻辑,使用 hoverStatusDes 作为停用原因
- 完善点位上下车类型和停车时长表单验证与默认值
- 修复保存时错误消息重复显示问题
4个文件已修改
63 ■■■■■ 已修改文件
src/views/businessOperations/operationWorkbench/components/PointPanel.vue 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/businessOperations/operationWorkbench/list.vue 19 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/businessOperations/operationWorkbench/map.scss 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/businessOperations/operationWorkbench/map.vue 40 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/businessOperations/operationWorkbench/components/PointPanel.vue
@@ -224,7 +224,7 @@
<template>
  <div class="point-detail-shell">
    <button class="collapse-btn" type="button" @click="emit('close-panel')">
    <button v-if="!createMode" class="collapse-btn" type="button" @click="emit('close-panel')">
      <img src="../../../../assets/point/close-point.png" class="collapse-icon">
    </button>
    <template v-if="editMode || createMode">
src/views/businessOperations/operationWorkbench/list.vue
@@ -688,14 +688,7 @@
  const statusText = getPointStatusText(row.operationStatus, row.verificationStatus)
  if (statusText === '已停用') {
    const stopReason = String(
      row?.stopReason
      || row?.disableReason
      || row?.failureReason
      || row?.remark
      || row?.remarks
      || '',
    ).trim()
    const stopReason = String(row?.hoverStatusDes  || '' ).trim()
    return stopReason || ''
  }
@@ -715,11 +708,11 @@
  const stationName = String(row?.stationName || '').trim()
  if (electronicName && stationName)
    return `${electronicName} / ${stationName}`
    return `[区]${electronicName} , [场]${stationName}`
  if (electronicName)
    return electronicName
    return `[区]${electronicName}`
  if (stationName)
    return stationName
    return `[场]${stationName}`
  return '-'
}
@@ -734,6 +727,7 @@
    lineHeight: '16px',
    textAlign: 'center' as const,
    margin: '0 4px',
    cursor: 'pointer',
  }
  switch (getStatusClass(statusText)) {
@@ -1842,7 +1836,7 @@
      ellipsis: true,
      resizable: true,
      render(row) {
        return row.pointOnOffName || '-'
        return row.pointOnOffName ||'上下车均可'|| '-'
      },
    },
    {
@@ -2289,6 +2283,7 @@
  line-height: 16px;
  text-align: center;
  margin: 0 4px;
  cursor: pointer;
  &.wait-test {
    background: #fff6ea;
src/views/businessOperations/operationWorkbench/map.scss
@@ -731,7 +731,7 @@
  justify-content: center;
  cursor: pointer;
  transform: translateY(-50%);
  transition: right 0.3s ease-in-out;
  // transition: right 0.3s ease-in-out;
  &.collapsed {
    right: 0;
src/views/businessOperations/operationWorkbench/map.vue
@@ -1057,6 +1057,15 @@
    : "3";
}
function ensurePointParkingTimeLimitByStatus(statusText?: string) {
  if (
    ["可运营", "待生效", "启用中"].includes(String(statusText || "")) &&
    !String(pointForm.value.parkingTimeLimit || "").trim()
  ) {
    pointForm.value.parkingTimeLimit = "3";
  }
}
const currentStatusOptions = computed(
  () => statusOptionsMap[activeTab.value] || []
);
@@ -3804,6 +3813,21 @@
});
watch(
  () => pointForm.value.pointOnOff,
  (value) => {
    const normalized = normalizePointOnOff(value);
    if (value !== normalized) {
      pointForm.value.pointOnOff = normalized;
    }
  },
  { immediate: true }
);
watch(currentPointStatusText, (status) => {
  ensurePointParkingTimeLimitByStatus(status);
});
watch(
  () => [route.name, route.fullPath, workbenchStore.version],
  () => {
    if (route.name !== "operationWorkbenchMap") return;
@@ -4044,10 +4068,12 @@
  if (isPointFormMode.value && !(await confirmDiscardPointEdit())) return;
  pointPanelClosed.value = true;
  selectedId.value = "";
  if (pointCreateMode.value) {
    exitPointCreateMode();
    return;
  }
  pointDetailData.value = null;
  pointEditMode.value = false;
  pointCreateMode.value = false;
  pointCreateReady.value = false;
  pointEditSnapshot.value = "";
  cleanupPointEditMapState();
}
@@ -5790,7 +5816,9 @@
    fenceId = "0";
    pointType = 2;
  }
  const pointOnOff = normalizePointOnOff(pointForm.value.pointOnOff);
  const pointOnOff = normalizePointOnOff(
    pointForm.value.pointOnOff || pointDetailData.value?.pointOnOff || "3"
  );
  pointForm.value.pointOnOff = pointOnOff;
  pointSaving.value = true;
  try {
@@ -5806,7 +5834,7 @@
      ...administrativeInfo,
      pointName: pointForm.value.pointName.trim(),
      pointAddress: pointForm.value.pointAddress.trim(),
      pointOnOff,
      pointOnOff: Number(pointOnOff),
      parkingTimeLimit: pointForm.value.parkingTimeLimit || undefined,
      remarks: pointForm.value.remarks.trim() || undefined,
      pointLon: pointForm.value.pointLon ?? undefined,
@@ -5878,10 +5906,10 @@
      syncPointDetailFromSelected();
      return;
    }
    window.$message?.error(res.msg || "保存失败");
    // window.$message?.error(res.msg || "保存失败");
  } catch (error) {
    console.error("保存点位失败:", error);
    window.$message?.error("保存失败");
    // window.$message?.error("保存失败");
  } finally {
    pointSaving.value = false;
  }