<template>
  <div class="app-container">
    <el-form :model="form" :rules="rules" ref="form" label-width="100px">
      <el-form-item label="关联设备：">
        <el-select v-model="deviceIds" multiple placeholder="请选择关联设备">
          <el-option v-for="item in devOptions" :key="item.value" :label="item.label"
            :value="item.value.toString()" />
        </el-select>
      </el-form-item>
      <el-form-item label="套餐名称：">
        <el-input v-model="form.name" placeholder="请输入套餐名称" />
      </el-form-item>
      <el-form-item label="资源平台：">
        <el-select v-model="form.platformId" placeholder="请选择资源平台">
          <el-option v-for="item in platformOptions" :key="item.value" :label="item.label"
            :value="item.value" />
        </el-select>
      </el-form-item>
      <el-form-item label="原价：" prop="price">
        <el-input v-model="form.price" placeholder="请输入原价" />
      </el-form-item>
      <el-form-item label="活动价：" prop="discount">
        <el-input v-model="form.discount" placeholder="请输入活动价" />
      </el-form-item>
      <el-form-item label="服务时长：">
        <el-select v-model="form.indate" placeholder="请选择服务时长">
          <el-option v-for="item in serviceTimeOptions" :key="item.value" :label="item.label"
            :value="item.value" />
        </el-select>
      </el-form-item>
      <el-form-item label="是否推荐：">
        <el-select v-model="form.isRecommend">
          <el-option v-for="item in recommendOptions" :key="item.value" :label="item.label"
            :value="item.value" />
        </el-select>
      </el-form-item>
      <el-form-item>
        <el-button @click="cancel">取消</el-button>
        <el-button type="primary" @click="getSubmit">提交</el-button>
      </el-form-item>
    </el-form>
  </div>
</template>

<script>
import { devMixin, serviceTimeMixin } from '@/mixin/index'
import { mixin, musicPackageMixin, detailMixin } from '../mixin/index'
export default {
  mixins: [devMixin, serviceTimeMixin, mixin, musicPackageMixin, detailMixin],
  data() {
    return {
      // 表单
      form: {
        type: 13
      }
    }
  },
  methods: {
    // 取消
    cancel() {
      this.$tab.closeOpenPage("/service/musicPackage");
    }
  }
}
</script>

<style lang="scss" scoped>
.el-form {
  width: 500px;
}
</style>