<style>
  li {
    list-style-type: none;
  }

  .activeType ul {
    padding: 0px;
  }

  .activeType li {
    background: rgba(221, 222, 224, 0.2);
    border-radius: 4px;
    margin-top: 15px;
  }

  .activeType li .dline {
    display: table;
    width: 100%;
    display: flex;
    flex-direction: row;
  }

  .activeType li .d1,
  .activeType li .d2,
  .activeType li .d3,
  .activeType li .d4,
  .activeType li .d5 {
    width: 18%;
    padding: 20px 20px 10px;
  }

  .activeType li .d7 {
    flex: 1;
    width: 1px;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
  }

  .activeType li .d1 .di-title {
    font-size: 16px;
    color: #111111;
  }

  .activeType li .d1 .di-c {
    font-size: 14px;
    display: flex;
    line-height: 28px;
    color: #111111;
  }

  .activeType li .d6 {
    padding: 10px 20px;
    width: 100%;
    height: inherit;
    position: relative;
    border-top: 1px solid #dddee0;
  }

  .activeType li .d6 .progress {
    width: 100%;
    height: 5px;
    position: absolute;
    left: 0;
    bottom: 0;
  }

  .activeType li .d2 div {
    margin: 2px 0;
    font-size: 14px;
    color: #111111;
  }

  .activeType li .d2-n {
    font-size: 12px;
    color: #999999;
    margin-right: 20px;
  }

  .activeType li .d3 .d3-s {
    color: var(--q-color-negative);
    font-weight: bold;
  }

  .activeType li .d3 div {
    margin: 2px 0;
    font-size: 14px;
  }

  .activeType li .d4 div {
    font-size: 14px;
    color: #111111;
    margin: 2px 0;
  }

  .activeType li .d5 div {
    font-size: 14px;
    color: #111111;
    margin: 2px 0;
  }

  .activeType .myCourseNName {
    width: 25px;
    height: 25px;
    border-radius: 50%;
    color: #fff !important;
    text-align: center;
    line-height: 25px;
    background-color: #004d40;
  }
 .activeType .app-image {
    background-position: center center;
    width: 50px;
    height: 50px;
    border-radius: 0%;
    float: left;
    margin-right: 8px;
  }

</style>
<template>
  <div class="page-body activeType">
    <div class="q-mb-sm" style="display:flex;align-items:center; justify-content:space-between">
         <div style="font-size: 20px;letter-spacing: .005em;">活动总结</div>
         <div>
             <q-btn color="accent" size="sm" class="q-mr-md  q-mr-sm" label="返回" @click="goBack" />
             <q-btn color="accent" size="sm" class="q-mr-md  q-mr-sm" label="提交"  @click="save"/>
         </div>
         
    </div>
    <div class="page-content">
        <Ueditor
                :value="ueditor.value"
                :config="ueditor.config"
                @input="setVal"
                ref="ue"
               no-margin
               :isShowInsertImage="false"
               :isShowAttachment="false"
                :isShowVoice="false"
            ></Ueditor>
    </div>
   
  </div>
</template>
<script>
import Ueditor from "../../components/editor/UeEditor";
  export default {
    meta: {
      title: "活动总结"
    },
    components: {
        Ueditor
    },
    data() {
      return {
        msg:{
            Id:0,
            Summary:''
        },
        //富文本
        ueditor: {
        value: "",
        config: {
          initialFrameWidth: null,
          initialFrameHeight: 800,
          autoHeightEnabled: true,
          enableContextMenu: false
        }
        }
      }
    },

    mounted() {
       
      if(this.$route.query.Id){
          this.msg.Id=parseInt(this.$route.query.Id)
           this.getDetail()
      }
      
    },
    methods: {
       goBack(){
          this.$router.go(-1)
      }  ,
      //   富文本
      setVal(val) {
            this.msg.Summary = val;
            this.ueditor.value = decodeURIComponent(val);
      },
        save(){
            this.apipostDS("/api/Education/UpdateSummaryActivityModule",this.msg,(res)=>{
                if(res.data.resultCode===1){
                    this.Success(res.data.message)
                    this.goBack()
                }
            })
        },
        getDetail(){
            this.apipostDS("/api/Education/GetActivity",{ Id:this.msg.Id},(res)=>{
                if(res.data.resultCode===1){
                    this.msg.Summary=res.data.data.Summary
                    this.setVal(res.data.data.Summary);
                }
            })
        },
    }
  }

</script>
<style lang="sass">
  @import url('~assets/css/table.sass')

</style>
