<template>
  <div>
    <h1>Canvas Editor 示例</h1>
    <x-add-native-form ref="nativeForm" />
  </div>
</template>

<script>
import XAddNativeForm from '@vue2-client/base-client/components/common/XAddNativeForm/XAddNativeForm.vue'
import { getConfigByName } from '../../../../services/api/common'

export default {
  components: {
    XAddNativeForm
  },
  mounted () {
    this.$nextTick(() => {
      getConfigByName('表单测试Form', 'af-his', (res) => {
        const modifyModelData = {
          data: {
            t_f_file_id: 1,
            t_f_path: '/usr/local/tomcat/files/af-his/txt/f7c758f6d5f14c53bb5246f82a25c0c4.txt'
          },
          images: [],
          files: []
        }
        this.$refs.nativeForm.init({
          serviceName: 'af-his',
          formItems: res.formJson,
          title: '收费',
          businessType: '新增',
          layout: 'inline',
          modifyModelData: modifyModelData
        })
      })
    })
  },
  methods: {
    submit () {

    }
  }
}
</script>

<style>
/* 在这里添加您的样式 */
</style>
