<template>
	<el-dialog
		title="门卡领取通知"
		:close-on-click-modal="false"
		draggable
		width="1100px"
		height="500px"
		@close="close"
		append-to-body
		v-model="visible">
		<div style="height: calc(100% - 80px);">
			门卡办理成功！请及时到办公室黄丽处领取门禁卡，并到物业处开通大楼门禁权限及获取餐补卡号，具体办理方法参考附件。获取餐补卡号后请及时在系统待办中填写！<br>
			另：请到刘芸或崇祝艳处开通打印权限。（9楼10楼南边到刘芸处开通权限，北边到崇祝艳处开通权限，9楼前台位于北边）

			<el-button type="primary" @click="downloadFirstAuditTpl">门禁开通注意事项</el-button>
		</div>
		<template #footer>
			<span class="dialog-footer">
			  <el-button @click="close()" icon="el-icon-circle-close">关闭</el-button>
			</span>
		</template>
	</el-dialog>
</template>

<script>
	import enrollmentRegistrationService from '@/api/human/enrollment/EnrollmentRegistrationService'

    export default {
		data () {
			return {
				visible: false,
				loading: false,
				isAdmin: false,
			}
		},
		methods: {
			init () {
				this.visible = true
			},
			close () {
				this.visible = false
			},
			downloadFirstAuditTpl () {
				// this.$utils.downloadExcel('/sys/project/import/template')
				this.loading = true
				enrollmentRegistrationService.downloadFile().then((res) => {
					// 将二进制流文件写入excel表，以下为重要步骤
					this.$utils.downloadWord(res, '门禁卡开通注意事项')
					this.loading = false
				}).catch(function (err) {
					this.loading = false
					if (err.response) {
						console.log(err.response)
					}
				})
			},

		}
    }
</script>

<style scoped>
</style>
