<template>
  <el-form label-width="110px">
    <template
      v-if="form.activeStatMethod == 'cpm' || form.activeStatMethod == 'mix'"
    >
      <el-form-item label="activeEcpm">
        <el-input-number
          v-model="form.activeEcpm"
          :precision="2"
          :step="10"
        ></el-input-number>
      </el-form-item>

      <el-form-item label="ecpm所需视频">
        <el-input-number
          v-model="form.activeEcpmVideoNum"
          :precision="0"
          autocomplete="off"
          :step="10"
          :min="0"
          style="width: 200px"
        ></el-input-number>
      </el-form-item>
    </template>

    <template
      v-if="
        form.activeStatMethod == 'accumulate' || form.activeStatMethod == 'mix'
      "
    >
      <el-form-item label="上报触发事件">
        <el-input v-model="form.activeEvent" style="width: 200px"></el-input>
      </el-form-item>

      <el-form-item label="触发次数">
        <el-input-number
          v-model="form.activeTimes"
          :precision="0"
          autocomplete="off"
          :step="10"
          :min="0"
          style="width: 200px"
        ></el-input-number>
      </el-form-item>
    </template>

    <el-form-item label="上报率">
      <el-input-number
        v-model="form.activeRatio"
        :precision="0"
        autocomplete="off"
        :step="10"
        :min="0"
        :max="100"
        style="width: 200px"
      ></el-input-number>
    </el-form-item>
  </el-form>
</template>

<script>
export default {
  props: {
    form: {
      type: Object,
      require: true,
    },
  },
};
</script>

<style>
.el-popover {
  margin-left: 200px;
}
</style>