罗广辉
2025-06-19 f27ca082eb0a839449dd50c49007b58e5ed6946f
src/components/waylinetool/event-edit.vue
@@ -12,9 +12,14 @@
        </div>
      </div>
      <div class="event-edit">
        <template v-if="currentPointEvent.aciton.key === 'takePhoto'">
          1
        </template>
        <take-photo
          v-model:serial="serial"
          v-if="['takePhoto', 'startRecord'].includes(currentPointEvent.aciton.key)"
        />
        <interval-shoot
          v-model:serial="serial"
          v-if="['distance'].includes(currentPointEvent.aciton.key)"
          />
      </div>
    </div>
    <div class="map-box"></div>
@@ -22,10 +27,12 @@
</template>
<script lang="ts" setup>
import _ from 'lodash'
import { DeleteOutlined } from '@ant-design/icons-vue'
import { useMyStore } from '/@/store'
import { actionList } from '/@/utils/cesium/use-map-draw'
import { template as xmlTemplate } from '/@/utils/cesium/use-kmz-tsa'
import takePhoto from './component/take-photo.vue'
import intervalShoot from './component/interval-shoot.vue'
const store = useMyStore()
// 事件编辑是否显示
@@ -33,18 +40,28 @@
// 当前点事件
const selectedAction = computed(() => store.state.waylineTool.selectedAction)
// 当前点位
const serial = reactive<{
  placemark: number
  action: number
}>({
  placemark: 0,
  action: 0,
})
const currentPointEvent = computed(() => {
  const placemarks = xmlTemplate.value.Folder.Placemark
  const pointIndex = store.state.waylineTool.selectedPoint
  if (pointIndex === undefined) return null
  const currentPoint = placemarks[pointIndex]
  serial.placemark = pointIndex
  const actions = currentPoint.actionGroup.action
  let actionIndex = 1
  let actionIndex = 0
  if (Array.isArray(actions)) {
    actionIndex = actions.findIndex((item: { actionActuatorFunc: { '#text': string } }) => {
      return item.actionActuatorFunc['#text'] === selectedAction.value.key
    })
  }
  serial.action = actionIndex
  return {
    aciton: selectedAction.value,
    actionIndex: `${pointIndex + 1}-${actionIndex + 1}`,
@@ -104,6 +121,78 @@
      height: calc(100% - 50px);
      padding: 15px;
      overflow: auto;
      // 单拍
      .take-photo {
        .title {
          display: flex;
          justify-content: flex-end;
          span {
            &:first-child {
              margin-right: auto;
            }
            &:last-child {
              cursor: pointer;
              &:hover {
                color: #409eff;
              }
            }
          }
        }
        .title-name-input {
          margin-top: 5px;
          display: flex;
          align-items: center;
          justify-content: center;
          .input {
            flex: 1;
            input {
              background-color: transparent;
              color: #fff;
            }
          }
          .btn {
            width: 50px;
            display: flex;
            gap: 10px;
            justify-content: center;
            align-items: center;
            span {
              cursor: pointer;
            }
            .check {
              color: #67d15a;
            }
            .close {
              color: red;
            }
          }
        }
      }
      .btn-group {
        margin-top: 20px;
        display: flex;
        justify-content: flex-start;
        button {
          margin-left: 10px;
          font-weight: bold;
          background-color: #409eff;
          border-radius: 999px;
          border: 0;
          padding: 0 10px 0 10px;
          &:first-child {
            margin: 0;
          }
          &:nth-child(3) {
            margin-left: auto;
          }
        }
      }
      .cannot-select {
        background-color: #3c3c3c;
        border: 0;
      }
    }
  }
  .map-box {