<template>
  <section class="dm-wrap" v-loading="loading" element-loading-text="数据保存中">
    <el-alert type="info" :closable="false" show-icon>
      <p slot="title" class="fz16 info-color line-height1_5">使用录音功能需开启录音服务，未开启则录音不作保存。开启后，仅支持保存从开启当天起的录音数据，未开启录音服务之前的历史录音数据不做同步。选择不同保存时长收费标准不同，当前收费标准如下：1、三个月 0.04元/分钟 2、六个月 0.06元/分钟 3、十二个月 0.1元/分钟</p>
    </el-alert>
    <section class="mt20">
      <div class="mb20">
        <span class="dm-input_label mr10">开启录音服务</span>
        <el-switch v-model="swithKey"></el-switch>
      </div>
      <div>
        <span class="dm-input_label mr10">录音保存时长</span>
        <el-radio-group v-model="saveTime">
          <el-radio :label="3">三个月</el-radio>
          <el-radio :label="6">六个月</el-radio>
          <el-radio :label="9">十二个月</el-radio>
        </el-radio-group>
      </div>
      <div class="mt30"><el-button type="primary" class="save" @click="submit">保存</el-button></div>
    </section>
  </section>
</template>

<script>
export default {
  name: 'record',
  data() {
    return {
      swithKey: false,
      saveTime: 3,
      loading: false
    };
  },
  methods: {
    // getRecordDetail() {}
    submit() {
      this.loading = true;
      setTimeout(() => {
        this.loading = false;
        this.$tips({ type: 'success', message: '保存成功!' });
        // this.$tips({ type: 'error', message: '删除失败!' });
      }, 2000);
    }
  },
  created() {
    this.$store.commit('aside_handler', false);
    this.$store.commit('mutations_breadcrumb', [{ name: '会员管理', path: '' }, { name: '通话记录', path: '/calllog/index' }, { name: '录音存储设置', path: '' }]);
  }
};
</script>

<style scoped>
.save {
  margin-left: 98px;
}
</style>
