<template>
        <!-- 名医介绍详情 -->
       <div class="scroll"  id="targetthree" style="padding:15px 4%">
           <div class="docone" v-for="item in this.editdocfrom" :key="item.id" @click="singleDoctorInfo(item.id,item.user_org_id)">
             <div class="doctwo">
              <img :src="item.dochead" style="width:80px;height:80px">
             </div>
             <div class="docthree">
               <span class="docfour">{{item.doc_name}}</span>
            </div>
            <div class="docfive">
                 <span class="docsix" v-html="item.docintroduction"></span>
            </div>
         </div>
        </div>
</template>

<script>
      import { docmore } from "@/api/micro/micro"
    export default {
        name: "doctor",
        data(){
             return{
                 editdocfrom:[],
             }
        },
        methods:{
            docmore(id,orgid){
                docmore(id,orgid).then(response=>{
                     if(response.data.state == 1){
                       var editdoctor =  response.data.data.editdoctor;
                       this.editdocfrom  =  response.data.data.editdoctor;
                       console.log("编辑医生返回数据",editdoctor)
                    }
                 })
            },
            singleDoctorInfo(id,orgid){
                this.$router.push({
                       path:'docdetail',
                       query:{
                           id:id,
                           orgid:orgid,
                       }
                    }
                )
            }
        },
        created(){
           const id = this.$route.query.id;
           const orgid = this.$route.query.orgid;
           console.log("id是多少",id)
           console.log("orgid是多少",orgid)
            this.docmore(id,orgid)
        },
    }
</script>

<style scoped>
    .docone{
       width:310px;
       height:100px;
       /* border: solid red 1px; */
       margin-left: 5px;
      overflow: hidden;
     }

     .doctwo{
       width:80px;
       height: 80px;
       /* border:  solid red 1px; */
       margin-top: 10px;
       margin-left: 5px;
     }

     .docthree{
       width: 50px;
       height: 20px;
      /* border:solid red 1px; */
       margin-left: 100px;
       margin-top: -75px;

     }
     .docfour{
       font-size: 14px;
     }

     .docfive{
       width:200px;
       height: 50px;
       /* border:solid 1px red; */
       margin-left: 100px;
       margin-top: 5px;
     }
     .docsix{
       font-size: 14px;
       overflow: hidden;
       text-overflow: ellipsis;
       display: -webkit-box;
      -webkit-line-clamp: 3;
      -webkit-box-orient: vertical
     }
</style>
