<template>
  <div>
    <el-form ref="form" :model="form" label-width="100px">
      <el-form-item label="新建推送名称">
        <span><span class="star-red">*</span> 推送名称仅供数据中心操作记录查询，您推送的会员将不会看到此信息。</span>
      </el-form-item>
      <el-form-item label="推送名称">
        <!-- <el-input v-model="form.name" placeholder="请输入推送名称，10字以内"></el-input> -->
      </el-form-item>
      <el-form-item label="选择推送素材">
        <span><span class="star-red">*</span> 推送素材需前往<a href="#">微信公众平台</a>-管理-素材管理维护。</span>
        <el-upload class="upload-demo" drag action="https://jsonplaceholder.typicode.com/posts/" multiple>
          <i class="el-icon-plus" style="font-size:50px;margin-top:30px"></i>
          <div class="el-upload__text">添加微信素材</div>
          <div class="el-upload__tip" slot="tip">只能上传jpg/png文件，且不超过500kb</div>
        </el-upload>
      </el-form-item>
      <el-form-item label="选择推送范围">
        <el-radio-group v-model="form.resource">
          <el-radio label="全体推送"></el-radio>
          <el-radio label="精准推送"></el-radio>
          <div>
            <el-tag>标签一454545454545454545454545</el-tag>
          </div>
        </el-radio-group>
      </el-form-item>
      <el-form-item label="预览推送数量">
        <span><span class="star-red">*</span>实际推送成功数量将略有偏差，选中多个标签为同时满足选中标签群体的会员。推送人数必须大于1人。</span>
        <div>
          <el-button>选中标签，预览</el-button>
          <span>统计中，请稍候</span>
        </div>
        <div>
          <el-button>重新预览</el-button>
          <span>188 人</span>
          <span>标签会员数： 188 人</span>
          <span>其中，关注公众号： 188 人</span>
          <span>已推送4次会员： 188 人</span>
        </div>
      </el-form-item>
      <el-form-item label="执行推送任务">
        <span><span class="star-red">*</span>填写邮箱后，勾选免责说明，确认进行推送，推送完成后将发送邮件通知至指定邮箱。</span>
        <el-checkbox v-model="checked">本次推送为t测试组商户123自发行为，发放内容请遵守国家相关法律规定..</el-checkbox>
      </el-form-item>
      <el-form-item label="指定接收邮箱">
        <el-input v-model="input" type="email" placeholder="请输入您要接收任务信息的邮箱"></el-input>
      </el-form-item>
      <el-form-item>
        <el-button type="primary" @click="onSubmit">确认推送</el-button>
      </el-form-item>
    </el-form>
  </div>
</template>
<script>
export default {
  data () {
    return {
      form: {
        name: '',
        region: '',
        date1: '',
        date2: '',
        delivery: false,
        type: [],
        resource: '',
        desc: ''
      },
      input: '',
      checked: true,
      dialogImageUrl: '',
      dialogVisible: false
    }
  },
  methods: {
    onSubmit () {
      console.log('submit!')
    },
    handleRemove (file, fileList) {
      console.log(file, fileList)
    },
    handlePictureCardPreview (file) {
      this.dialogImageUrl = file.url
      this.dialogVisible = true
    }
  }
}
</script>
