<template>
	<el-dialog
	v-dialogDrag 
	:visible.sync="isShowDia"
	:close-on-click-modal="false"
	:modal-append-to-body='false'
	:show-close="false"
	@close="cancelHandle"
	custom-class="interview_dialog"
	center
	class="interview-dialog"
	:width="title=='detail'?'600px':'450px'">
		<div slot="title" style="position:relative">
			<span style="fontSize:16px;">标记处理</span>
			<i class="el-icon-close" style="fontSize:24px;cursor:pointer;position:absolute;right:20px;top:50%;transform:translateY(-50%);" @click="cancelHandle"></i>
		</div>
		<!-- 申请弹窗 -->
		<div class="dialog_cont">
			<!-- 处理申请 -->
			<span>是否确认已处理该用户申请？</span>
		</div>
		<div style="display:flex;justify-content:center;margin:40px 0;">
			<template>
				<el-button type="primary" style="width:80px;marginRight:24px;" @click="dealApply">确定</el-button>
				<el-button type="primary" plain style="width:80px;" @click="cancelHandle">取消</el-button>
			</template>
		</div>
	</el-dialog>
</template>

<script>
import { ficcManageInterface,customInterence } from '@/api/api.js'
export default {
	name:'',
	props: {
		isShowDia: {
			type:Boolean,
			require:true
		},
		item: {
			type:Object,
			require:true
		},
		activeName:{
			type:Number,
		}
	},
	methods: {
		/* 取消 */
		cancelHandle() {
			this.$emit('update:isShowDia',false);
		},
		/* 处理申请 */
		async dealApply() {
			let res
			try{
				if(this.activeName>1){
					res = await customInterence.trialStatus({
						Id: this.item.Id,
					})
				}else{
					res = await ficcManageInterface.applyRecordDeal({
						ApplyRecordId:this.item.ApplyRecordId,
						UserId:this.item.UserId
					})
				}
				
				if(res.Ret===200){
					this.$message.success('标记处理完成')
					this.cancelHandle()
					this.$parent.getTableData()
				}
			}catch(err){
				console.dir(err);
			}
		}
	}
}
</script>
<style lang='scss'>
.interview-dialog{
.dialog_cont {
	padding: 0 10px;
	.node_name {
		font-size: 15px;
		margin-bottom: 20px;
	}
	.node_ipt{
		display:block;
		width: 100%;
		margin: 20px 0;
	}
}
.el-dialog__body{
	flex-direction: column;
}
}
</style>