<!--
 * @Descripttion: 当前组件信息
 * @version: 1.0.0
 * @Author: 无尘
 * @Date: 2020-02-05 10:50:57
 * @LastEditors  : 无尘
 * @LastEditTime : 2020-03-02 10:55:50
 -->
<!--
  系统模板设置
  <system-set v-if="setVisible" @closeSet="closeSet"></system-set>
  import systemSet from '@/components/app/cloudDaily/system-set.vue';
  -->
<template>
  <el-dialog width="600px" title="模板设置" :visible.sync="setVisible" append-to-body :before-close="handleClose">
    <div class="m-t-20">
      <el-radio v-model="selectId" label="0">定义在日报自定义上报模板上面</el-radio>
      <el-radio class="m-l-40" v-model="selectId" label="1">定义在日报自定义上报模板下面</el-radio>
    </div>
    <div slot="footer" class="dialog-footer">
      <el-button @click="cancel">取消</el-button>
      <el-button type="primary" @click="submitForm">确定</el-button>
    </div>
  </el-dialog>
</template>
<script>
/* eslint-disable */
  export default {
    props: {
      setting: {
        type: [Number, String],
        default () {
          return '0';
        }
      }
    },
    data() {
      return {
        setVisible: true,
        selectId: '0',
      };
    },
    computed: {},
    watch: {
      setting(val) {
        this.selectId = val;
      }
    },
    methods: {
      
      /**
       * 关闭弹窗
       */
      handleClose(done) {
        const that = this;
        done();
        that.$emit('closeSet','close');
        that.selectId = '';
      },
      cancel() {
        const that = this;
        that.$emit('closeSet','close');
        that.selectId = '';
      },
      /**
       * 确定
       */
      submitForm() {
        const that = this;
        that.$emit('closeSet', that.selectId);
      }
    },
    components: {},
    mounted() {
      this.selectId = this.setting;
    }
  };
</script>
<style scoped>
  .m-t-5 {
    margin-top: 5px;
  }
  .m-l-40 {
    margin-left: 40px;
  }

  .dialog-top {
    margin-bottom: 20px;
  }

  .dialog-top img {
    width: 40px;
    height: 40px;
    border: 1px solid #e4e7ed;
    border-radius: 50%;
    vertical-align: middle;
    margin-right: 10px;
  }

  .dialog-top span {
    font-size: 14px;
    font-weight: 600;
    color: #303133;
  }

  .select-info {
    display: inline-block;
    vertical-align: middle;
  }

  .dialog-operate {
    display: flex;
    align-items: center;
    justify-content: space-between;
  }

  .pagination-content {
    text-align: right;
  }

  .dialog-form {
    width: 430px;
    padding-top: 20px;
  }

  .w-215 {
    width: 215px;
  }

  .w-115 {
    width: 115px;
  }

  .select-tree-wrap {
    height: 445px;
    overflow-y: auto;
    border: 1px solid #e4e7ed;
  }
</style>
