<template>
	<view @click="close()">
			<uni-popup ref="popup" type="dialog" :maskClass="maskClass">
				<uni-popup-dialog type="info" mode="base" content="立即下发新的全面巡检任务？" :duration="2000" :before-close="true" @close="close"
					@confirm="confirm"></uni-popup-dialog>
			</uni-popup>
	</view>
</template>

<script>
	export default {
		data(){
			return {
				maskClass:{
					position: 'fixed',
					bottom: 0,
					top: 0,
					left: 0,
					right: 0,
				}
			}
		},
		onReady() {
			this.$refs.popup.open()
		},
		methods: {
			confirm() {
				uni.$emit('DpopLog1', {
				    content: 'comfirm'
				});
			},
			close() {
				uni.navigateBack()
			}
		}
	}
</script>

<style>
	page {
		background: transparent;
	}
	.mask {
		position: fixed;
		left: 0;
		top: 0;
		right: 0;
		bottom: 0;
		/* #ifndef APP-NVUE */
		display: flex;
		/* #endif */
		justify-content: center;
		align-items: center;
		background-color: rgba(0, 0, 0, 0.4);
	}

	.content {
		width: 200px;
		height: 200px;
		background-color: #007AFF;
	}

	.text {
		/* #ifndef APP-NVUE */
		display: block;
		/* #endif */
		line-height: 200px;
		text-align: center;
		color: #FFFFFF;
	}
</style>
