<template>
  <sd-webflow ref="webflow" :validate-form="validForm">
    <template v-slot:form="{ model, FlowData }">
      <sd-form-by-builder
        ref="builderform"
        :form-data="initDaF(FlowData.processFormData)"
        :keep-hidden-cell="false"
      />
    </template>
  </sd-webflow>
</template>

<script>
import components from './_import-components/cpm-train-form-import'

export default {
  name: 'CpmTrainForm',
  metaInfo: {
    title: 'CpmTrainForm',
  },
  components,
  data() {
    return {}
  },
  methods: {
    validForm() {
      this.$refs.webflow.setFieldValue('JBXX', 'true')
      return new Promise((resolve, reject) => {
        resolve(true)
      })
    },
    initDaF(array) {
      if (array) {
        array.attrFD.keepHiddenCell = false
      }
      return array
    },
  },
}
</script>

<style module lang="scss">
@use '@/common/design' as *;
</style>
