<template>
	<div class="padding-sm">
		<el-steps :active="activeTab" align-center>
			<el-step title="网络配置" description=""></el-step>
			<el-step title="摄像头配置" description=""></el-step>
			<el-step title="算法配置" description=""></el-step>
			<el-step title="本地告警一览" description=""></el-step>
			<el-step title="告警上报配置" description=""></el-step>
		</el-steps>
		<div class="padding-tb-sm" v-if="activeTab == 1">
			<img style="height:70vh;" :src="baseUrl+'alarm_folder/html_images/newwork.jpg'" alt="">
		</div>
		<div class="padding-tb-sm" v-if="activeTab == 2">
			<img style="height:70vh;" :src="baseUrl+'alarm_folder/html_images/camera.jpg'" alt="">
		</div>
		<div class="padding-tb-sm" v-if="activeTab == 3">
			<img style="height:70vh;" :src="baseUrl+'alarm_folder/html_images/algorithm.png'" alt="">
		</div>
		<div class="padding-tb-sm" v-if="activeTab == 4">
			<img style="height:70vh;" :src="baseUrl+'alarm_folder/html_images/alramList.jpg'" alt="">
		</div>
		<div class="padding-tb-sm" v-if="activeTab == 5">
			<img style="height:70vh;" :src="baseUrl+'alarm_folder/html_images/escalation.png'" alt="">
		</div>
		<div class="text-right margin-top">
			<el-button type="success" @click="handleRouter">前往配置</el-button>
			<el-button @click="handleNext">下一步</el-button>
		</div>
    </div>
</template>

<script setup name="Role">
// const baseUrl = import.meta.env.VITE_APP_BASE_API;
const baseUrl = location.protocol+"//"+window.location.host+"/";
const router = useRouter();
const { proxy } = getCurrentInstance();
const activeTab = ref(1);

const data = reactive({
});
const {  } = toRefs(data);
const handleNext = function() {
    if (activeTab.value++ > 4) activeTab.value = 1;
}
const handleRouter = function() {
	let _router = "";
	switch(activeTab.value){
		case 1: 
			_router = "/systemConfiguration/networkConfiguration";
			break;
		case 2: 
			_router = "/systemConfiguration/cameraConfiguration";
			break;
		case 3: 
			_router = "/systemConfiguration/algorithmConfiguration";
			break;
		case 4: 
			_router = "/AIMonitoring/alarmPreview";
			break;
		case 5: 
			_router = "/systemConfiguration/settConfiguration";
			break;
	}
	router.push(_router);
}
</script>
<style lang="scss">

</style>