<template>
    <div>
    <div style="display: flex;white-space: nowrap;  padding: 30px;" >
        <el-form  style="padding-left: 50px;" :label-position="labelPosition" :model="tableData">
            <el-form-item label="组织名称">
              <div> {{ tableData.orgName }}</div>
            </el-form-item> 
            <el-form-item label="服务类型">
                {{ tableData.serviceTypeName }}
            </el-form-item>
            <el-form-item label="组织类型">
               {{ tableData.Organizationaltype}}
            </el-form-item>
            <el-form-item label="管理员姓名">
               {{ tableData.operator}}
            </el-form-item>
            <el-form-item label="身份证号">
               {{ tableData.idCard }}
              
            </el-form-item>
            <el-form-item label="手机号">
               {{ tableData.mobile }}
              
            </el-form-item>
            <el-form-item label="所属组织">
               {{ tableData.agencyName }}
              
            </el-form-item>
            <el-form-item label="详细地址">
               {{ tableData.address }}
              
            </el-form-item>
            <el-form-item label="组织介绍">
               {{ tableData.introduction}}
            </el-form-item>
            <el-form-item label="附件">
               {{ tableData.address}}
            </el-form-item>
            <el-form-item label="申请时间">
               {{tableData.updatedTime}}
            </el-form-item>
 
        </el-form>
       
       </div>
       <div class="div_btn">
        <div style="display: flex;  margin-bottom: 20px;     margin-left: 75px;"> 
            <h4>审核结果：</h4>   
            <div style="display: flex; justify-items:center; align-items: center;">
                <el-radio v-model="status" label="pass" style="margin-right:20px">通过</el-radio>
               <div class="flex flex-x  flex-center2">
                  <el-radio v-model="status" label="notPass" style="margin-right: 10px;">不通过</el-radio>
                  <el-input v-if="status == 'notPass'" type="number" v-model="reason" style="width: 200px;"
                     placeholder="请说明原因"></el-input>
               </div>
         
              </div>
        </div>
          <el-button size="small" @click="handleCancle">取 消</el-button>
          <el-button size="small" v-if="formType != 'detail'" type="primary" :disabled="btnDisable"
             @click="handleComfirm">确 定</el-button>
 
    </div>
</div>
</template>
<script>
import { requestPost,requestGet } from "@/js/dai/request";
export default {
   name: "see",
    data() {
    return {
      status:'pass',
      reason:"",
        // labelPosition: 'right',
        // tableData: [],
        // awardId:""
    };
  },
  props:{
    VolunteerList:{
      type: Object,
      default: () => {}
    }
  },
  created() {
    console.log(this.VolunteerList,"list");
    this.tableData=this.VolunteerList
    // this.awardId=this.list.id
    this.getTableData()
  },
  methods: {
    //取消审查
    handleCancle(){
      this.$emit('handleprocesslClose')
    },
    //确认审查
    handleComfirm(){
      console.log(this.formData);
        const url = "/voluntary/volunteerOrg/checkup";
        let params = {
          id:this.awardId,
          status:this.status,
          reason:this.reason
      }
      requestGet(url, params).then((res) =>{
        console.log(res,"res");
        if(res.code===0){
          // this.
          // this.tableData = res.data
          // console.log(this.tableData, "this.tableData");
          this.$message({
                       type: 'success',
                       message: '操作成功'
                   })
        }
        else{
          this.$message({
                       type: 'error',
                       message: '操作失败'
                   }
          )
        }
      })
      this.$emit('handleprocesslClose')
    },
     getTableData() {
        console.log(this.formData);
        const url = "/voluntary/volunteerOrg/editDetail";
        let params = {
          id:this.VolunteerList.id
      }
      requestPost(url, params).then((res) =>{
        console.log(res,"res");
        if(res.code===0){
          console.log("列表请求成功！！！！！！！！！！！！！！");
          this.tableData = res.data
          console.log(this.tableData, "this.tableData");
        }
      })
        // const { data, code, msg } =  requestGet(url, params)
        // console.log(data,"data");
        // if (code === 0) {
        //   console.log("列表请求成功！！！！！！！！！！！！！！");
        //   console.log(data,"data");
        //   this.tableData = data
        //   console.log(this.tableData,"this.tableData");
          
    
        // } else {
        // }
      },

  },


}

</script>
<style lang="scss" scoped>
 @import "@/assets/scss/modules/visual/communityManageForm.scss";
</style>