<template>
  <el-dialog
  v-dialogDrag
  :visible.sync="isShow"
  @close="$emit('update:isShow',false)"
  :modal-append-to-body='false'
  center
  title="未续约说明">
    <el-table
    :data="renewalList"
    border
    max-height="250">
        <el-table-column label="最新情况" prop="RenewalReason" align="center"/>
        <el-table-column label="To Do 事项" prop="RenewalTodo" align="center"/>
        <el-table-column label="添加时间" prop="CreateTime" align="center" />
        <el-table-column label="超出到期时间(天)" prop="ExpirationTimeExceeded" align="center"/>
    </el-table>
    <span slot="footer" class="dialog-footer">
        <el-button @click="$emit('update:isShow',false)" type="primary">知道了</el-button>
    </span>
  </el-dialog>
</template>

<script>
import { dataMainInterface } from '@/api/api.js'
export default {
    props: {
        rowInfo: {
            type: Object,
            default: null
        },
        isShow: {
            type: Boolean,
            require: true
        }
    },
    data() {
        return {
            renewalList: []
        }
    },
    methods: {
        async getrenewalReasonList(){
            try{
				const res = await dataMainInterface.moreRenewReason(this.rowInfo)
				if(res.Ret==200) this.renewalList=res.Data
			}catch(err){
				console.log(err);
			}
        }
    },
    watch: {
        isShow(val) {
            if(val){
                this.getrenewalReasonList()
            }else{
                this.renewalList=[]
            }
        }
    },
}
</script>

<style>

</style>