<template src="./leftOperateComp.html">

</template>
<script>
	// import AMapLoader from '@amap/amap-jsapi-loader';
	export default {
		name: 'leftOperateComp',
		data() {
			return {
				status: 'add',
				showLeftArea: true,
				
				activeId:'',	//当前活动中的操作id
				dataList: [
					{
						id:1,
						text:'添加空间'
					},
					{
						id:2,
						text:'移动空间'
					}
				],
			}
		},
		computed: {},
		mounted() {
			
		},
		methods: {
			init() {
				
			},

			/**
			 * 关闭页面
			 */
			closePage() {
				this.addCompeteVisible = false;
				window.$bus.$emit('addProjectVisible', true, false); //显示新建地块的视图,但不初始化数据
			},
			//操作
			operateHandle(item){
				if(!item || !item.id){
					return false;
				}
				this.activeId = item.id;
				// this.$emit("toImportCuemanage", item, this.landIdList, screenDateIn)
				this.$emit('operateHandle',item)
			},
			/**
			 * 预览项目
			 */
			async previewDK() {
				// this.isActive = 2;
				console.log("---previewDK1---")

				let that = this;
				let result = this.addCompete();
				if (result) { //校验通过
					console.log("---previewDK2---", that.form)
					let data = Object.assign({}, that.form, {
						sv: this.sv,
						isJinPin: true
					});
					if (!this.fullscreenLoading) {
						this.addProjectVisible = false; //隐藏新增图层
						window.$bus.$emit('openPreviewComp', data); // 通知预览-且开始精调经纬度过程
						window.$bus.$emit('closeOrOpenFootComponetView', false); //隐藏页面页脚
					} else {
						await this.getAddress();
						this.addProjectVisible = false; //隐藏新增图层
						window.$bus.$emit('openPreviewComp', data); // 通知预览-且开始精调经纬度过程
						window.$bus.$emit('closeOrOpenFootComponetView', false); //隐藏页面页脚
					}
				} else {
					return false;
				}
			},
		}
	}
</script>
<style lang="css" scoped>
	@import "./leftOperateComp.css";
	@import "@/assets/common.css";
</style>