<template>
  <el-form label-width="160px" style="margin-top:180px;">
    <el-form-item label="广告版位：" prop="ADPosition">
      <el-select filterable placeholder="" v-model="ADPosition" class="form-item">
        <el-option v-for="item in ADPositions" :key="item.ID" :label="item.positionName" :value="item.code">
      </el-option>
      </el-select>
    </el-form-item>
  </el-form>
</template>
<script>
export default {
  data() {
    return {
      ADPosition: '',
      ADPositions: []
    }
  },
  computed: {
  },
  methods: {
    getCode() {
      return `<cms:adv code="${this.ADPosition}">{ZCMS:<z:lang id="Contentcore.Adv">广告版位</z:lang>}</cms:adv>`
    },
    async init() {
      let res = await axios.get('/ui/atverdiseposition')
      if (res.data.status === 1) {
        this.ADPositions = res.data.data.filter(val => val.status === 'published')
      }
    }
  }
}
</script>
