<script setup lang="ts">
import XForm from '@af-mobile-client-vue3/components/data/XForm/index.vue'
import NormalDataLayout from '@af-mobile-client-vue3/components/layout/NormalDataLayout/index.vue'

import { ref } from 'vue'

const configName = ref('AddConstructionForm')
const serviceName = ref('af-linepatrol')

const formGroupAddConstruction = ref(null)

// 地图预览相关
const previewMapRef = ref(null)
function onSubmit(data: any) {
  console.warn('提交表单', data)
}
function onAddressChange(data: any) {
  console.warn('表单新增数据变化', data)
}

function onRegionChange(data: any) {
  console.warn('表单新增数据变化', data)
}
</script>

<template>
  <NormalDataLayout id="XFormGroupView" title="纯表单">
    <template #layout_content>
      <XForm
        ref="formGroupAddConstruction"
        mode="新增"
        :config-name="configName"
        :service-name="serviceName"
        @address-change="onAddressChange"
        @region-change="onRegionChange"
        @on-submit="onSubmit"
      />
    </template>
  </NormalDataLayout>
</template>

<style scoped lang="less">

</style>
