<template>
  <components 
    :is="putLayoutCurrent"
    :data="data"
    :edataItem="edataItem"
    :loading="loading"
    :configType="configType"
    @submit="btnSubmit"
    @selectItem="item => $emit('selectItem', item)"
    v-if="putLayoutCurrent != 'van-empty' && !loading.empty">
    <div class="tel-message" slot="tel">
      <span>· 感谢您的支持与关注！任何问题，请您联系</span>
      <a href="tel:400-690-5366" class="tel">400-690-5366</a>
      <span>，我们将竭诚为您服务！</span>
    </div>
    <div>
      <van-dialog
        v-model="show.submit"
        :show-confirm-button="false">
        <div class="success-container">
          <h3>提交成功</h3>
          <van-icon name="checked" class="icon" />
          <p v-if="data.topic.submessage">{{ data.topic.submessage }}</p>
          <div>{{ codeMess.message }}</div>
          <van-button round plain type="info" @click="btnLinkBack" style="width: 80%;">点击返回</van-button>
          <span>无法返回时，请手动关闭页面</span>
        </div>
      </van-dialog>
    </div>
  </components>
  <div style="height: 100%; width: 100%;" v-else>
    <van-empty v-if="!isEdit"
      style="height: 100%;"
      description="登录失效">
      <van-button round type="default" @click="$router.go(-1)" style="width: 220px; max-width: 350px;">返回</van-button>
    </van-empty>
    <van-empty v-else
      style="height: 100%;"
      description="暂无数据，请添加问卷">
    </van-empty>
  </div>
</template>

<script>
import mixins from './mixins';

// 102 为定制版本，> 100 为定制，02 为 2 的定制
export default {
  mixins: [mixins]
}
</script>
<style lang="scss" scoped>
@import './style.scss';
</style>