董国庆
2026-06-04 b02ff3d011f877d2967e04c1e2eaa7f532d446eb
修改点位新建
1个文件已修改
39 ■■■■■ 已修改文件
src/views/businessOperations/operationWorkbench/map.vue 39 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/businessOperations/operationWorkbench/map.vue
@@ -436,6 +436,13 @@
  );
});
const createToolTriggerLabel = computed(() => {
  if (pointCreateMode.value) return "取消新建点位";
  if (fenceCreateMode.value) return "取消新建围栏";
  if (stationCreateMode.value) return "取消新建场站";
  return selectedCreateToolOption.value?.label || "创建工具";
});
// 统一收口各个下拉弹层的展开状态,避免在模板中散落过多单独事件处理。
function handleSelectShowUpdate(key: string, show: boolean) {
  selectShowState[key] = show;
@@ -6566,8 +6573,11 @@
  ) {
    fencePolygons.value = fenceRenderAreaData.value
      .filter((item: any) => {
        if (!item.fencePoints)
          return false;
        const isDisabledFenceArea = Number(item.areaStatus || 1) === 2;
        if (
          !item.fencePoints ||
          !isDisabledFenceArea &&
          !visibleFenceIdSet.value.has(String(item.electronicId))
        )
          return false;
@@ -6585,6 +6595,7 @@
      })
      .map((item) => {
        const areaType = Number(item.areaType);
        const isDisabledFenceArea = Number(item.areaStatus || 1) === 2;
        const points = String(item.fencePoints)
          .split(",")
          .map((pointStr: string) => {
@@ -6607,13 +6618,19 @@
          !isFenceFormMode.value &&
          isActive &&
          readonlyRestrictedAreaId.value === String(item.id);
        const isFenceReadonlyDimmed = areaType === 1 && !isActive;
        const isFenceReadonlyDimmed =
          areaType === 1 && !isActive && !isDisabledFenceArea;
        const isFenceDetailActive =
          areaType === 1 && isActive && !isFenceFormMode.value;
          areaType === 1 &&
          isActive &&
          !isFenceFormMode.value &&
          !isDisabledFenceArea;
        const polygon = new (window as any).AMap.Polygon({
          path: points,
          fillColor:
            areaType === 2
            isDisabledFenceArea
              ? "#000000"
              : areaType === 2
              ? isReadonlyRestrictedActive
                ? "#F14637"
                : "#EF938B"
@@ -6623,7 +6640,9 @@
              ? "#171F26"
              : "#171F26",
          strokeColor:
            areaType === 2
            isDisabledFenceArea
              ? "#000000"
              : areaType === 2
              ? isReadonlyRestrictedActive
                ? "#F14637"
                : "#EF938B"
@@ -6639,9 +6658,11 @@
            : isActive
            ? 3
            : 2,
          strokeOpacity: areaType === 2 ? 0 : 1,
          strokeOpacity: isDisabledFenceArea ? 0 : areaType === 2 ? 0 : 1,
          fillOpacity:
            areaType === 2
            isDisabledFenceArea
              ? 0
              : areaType === 2
              ? isReadonlyRestrictedActive
                ? 1
                : 1
@@ -6658,6 +6679,7 @@
              ? "dashed"
              : "solid",
          clickable:
            !isDisabledFenceArea &&
            !isPointMapPickActive.value &&
            !isFenceFormMode.value &&
            !isStationFormMode.value,
@@ -6665,6 +6687,7 @@
        });
        polygon.on("click", () => {
          if (
            isDisabledFenceArea ||
            isPointMapPickActive.value ||
            isFenceFormMode.value ||
            isStationFormMode.value
@@ -7293,7 +7316,7 @@
                          class="operate-icon operate-main-icon"
                        />
                        <div class="selected-create-tool-text">
                          {{ selectedCreateToolOption.label }}
                          {{ createToolTriggerLabel }}
                        </div>
                      </div>
                    </template>