<template>
  <q-dialog
    v-model="persistent"
    full-height
    maximized
    position="right"
    persistent
    @hide="closeCutomer"
    transition-show="slide-left"
  >
    <div class="customMain">
      <div class="custom_Top">
        <div class="custom_HLeft">
          <div class="nameplate_avatar">
            <img
              v-if="baseObj.StuIcon"
              style="width:100%;height:100%;"
              :src="baseObj.StuIcon"
              alt
            />
            <div class="student_Name" v-else>
              <span v-if="baseObj.StuName">{{
                baseObj.StuName.substring(0, 1)
              }}</span>
            </div>
          </div>
          <div class="Name_List">
            <div class="F_16">{{ baseObj.StuName }}</div>
          </div>
        </div>
      
      </div>
      <div class="custom_Bottom">
       
        <div class="detail-travel">
          <div class="detail_first">
           
            <div class="operate_Content" style="flex:1;">
              <div class="detail_Main">
                
               
                <!-- 操作 -->
                <template >
                  <div class="operate_Content" style="margin-top:20px;">
                    <q-input filled stack-label  :dense="false" v-model="addMsg.PlanPrice" 
                    class="col-12 q-pb-lg" label="规划课程及报价"  />
                    <q-input filled stack-label  :dense="false" v-model="addMsg.BaseCondition"  type="textarea" autogrow
                    class="col-12 q-pb-lg" label="基本情况"  />
                    <q-input filled stack-label  :dense="false" v-model="addMsg.DemandPoint" type="textarea" autogrow
                    class="col-12 q-pb-lg" label="需求点"  />
                    <q-input filled stack-label  :dense="false" v-model="addMsg.ResistPoint" type="textarea" autogrow
                    class="col-12 q-pb-lg" label="抗拒点"  />
                    <q-input filled stack-label  :dense="false" v-model="addMsg.ConsultingResults" type="textarea" autogrow
                    class="col-12 q-pb-lg" label="咨询结果"  />
                  </div>
                   <div class="process_Btn_List">
                         <q-btn outline style="color: #111;height: 37px;" label="取消"   @click="closeCutomer" />
                         <q-btn
                            style="margin-left: 10px;"
                            label="保存"
                            color="accent q-mb-lg"
                            @click="baocun"
                        />
                    </div>
                </template>
              </div>
            </div>
          </div>
        </div>
      </div>
      <div class="dialog-out-close" @click="closeCutomer">
        <i class="iconfont icon-close" style="font-size:26px;" />
      </div>
    </div>
  </q-dialog>
</template>
<script>
import { queryEmployee } from "../../../api/users/user";
import { ForwardStudent ,setStudentConsultResults} from "../../../api/customerstudent/customerstudent";

import { SetStudentAssistBatch } from "../../../api/sale/sale";
export default {

  components: {
  },
  props: {
    saveObj: {
      type: Object,
      default: null
    },
  
   
  },
  data() {
    return {
      persistent: true,
      addMsg: {},
      baseObj: {},
     
     

    };
  },
  created() {
       
        this.userInfo = this.getLocalStorage();
  },
  mounted() {
    this.baseObj = this.saveObj;
    this.addMsg={
        StuId : this.baseObj.StuId,
        PlanPrice : this.baseObj.PlanPrice?this.baseObj.PlanPrice:'',
        BaseCondition : this.baseObj.BaseCondition?this.baseObj.BaseCondition:'',
        DemandPoint : this.baseObj.DemandPoint?this.baseObj.DemandPoint:'',
        ResistPoint : this.baseObj.ResistPoint?this.baseObj.ResistPoint:'',
        ConsultingResults : this.baseObj.ConsultingResults?this.baseObj.ConsultingResults:'',
    }
    
  },
  methods: {
   
  

    closeCutomer() {
      this.$emit("close");
    },
    baocun(){        
        setStudentConsultResults(this.addMsg).then(res => {
            if (res.Code == 1) {
                this.$q.notify({
                    icon: "iconfont icon-chenggong",
                    color: "accent",
                    timeout: 2000,
                    message: "保存成功",
                    position: "top"
                });
            }
            this.$emit("consultsuccess",this.addMsg);
      });
    }
    
   
  }
};
</script>
<style scoped>
.custom_RModel {
  width: 500px;
  height: 100%;
}

.customMain {
  width: 450px !important;
  display: flex;
  flex-direction: column;
  height: 100 vh;
  padding: 15px 17px 0 17px;
  background-color: #f4f4f6;
}

.custom_Top {
  width: 100%;
  padding: 22px;
  background: #fff;
  border-radius: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.custom_HLeft {
  display: flex;
}
.process_Btn_List {
    display: flex;
    justify-content: flex-end;
    padding: 20px;
}
.nameplate_avatar {
  width: 60px;
  height: 60px;
  flex-shrink: 0;
  margin-right: 14px;
  border-radius: 5px;
  overflow: hidden;
}

.F_16 {
  font-size: 16px;
}

.Name_List {
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  overflow: hidden;
}


.custom_Bottom {
  margin-top: 17px;
  flex: 1;
  display: flex;
  margin-top: 17px;
  overflow: hidden;
}





.Time_TopList {
  display: flex;
  justify-content: space-between;
}

.visit_Cont {
  font-size: 14px;
}

.visit_delete {
  font-size: 14px;
  cursor: pointer;
  width: 30px;
}

.operate_Content {
  overflow: auto;
  /* padding-right: 20px; */
}

.operate_Content::-webkit-scrollbar {
  width: 6px;
  height: 8px;
}

.operate_Content::-webkit-scrollbar-thumb {
  border-radius: 4px;
  -webkit-box-shadow: inset 0 0 2px rgba(0, 0, 0, 0.2);
  background: #c9c9c9;
}

.operate_Content::-webkit-scrollbar-thumb {
  -webkit-box-shadow: inset 0 0 2px rgba(0, 0, 0, 0.2);
  border-radius: 4px;
  background: #ededed;
}

.Log_Content {
  padding: 10px;
  border-radius: 5px;
  background-color: #f4f4f6;
  color: #818194;
  line-height: 2;
  margin-top: 10px;
  word-break: break-all;
}

</style>
