<script setup>
|
|
import { useRouter, useRoute } from 'vue-router'
|
let router = useRouter()
|
import { useRouterStore } from 'store/router'
|
const store = useRouterStore()
|
|
|
|
let data = reactive({
|
companyInfo: {}
|
})
|
|
let buttonIndex = defineProps({
|
buttonIndex: Number
|
})
|
|
onMounted(() => {
|
data.companyInfo = JSON.parse(localStorage.getItem('companyInfo'))
|
})
|
// 父级方法
|
const emit = defineEmits(['childEvent']);
|
// 回调父级方法
|
const handleClick = (index) => {
|
console.log(index)
|
emit('childEvent', index)
|
}
|
// 返回首页
|
const goHome = () => {
|
store.setLoadSub(false)
|
router.push('/layout')
|
}
|
|
</script>
|
|
<template>
|
<div class="center-container">
|
<div class="center-container-title">
|
<el-row>
|
<el-col :span="7">
|
<div class="center-name">{{ data.companyInfo.name }}</div>
|
</el-col>
|
<el-col :span="10">
|
<div class="button-group">
|
<button @click="handleClick(1)">基本信息</button>
|
<button @click="handleClick(2)">应急物质</button>
|
<button @click="handleClick(3)">救援队伍</button>
|
</div>
|
</el-col>
|
<el-col :span="7">
|
<div class="center-info">
|
<button @click="goHome()">返回首页</button>
|
</div>
|
</el-col>
|
</el-row>
|
</div>
|
</div>
|
</template>
|
|
<style lang="scss" scoped >
|
.center-container {
|
margin: -35px auto;
|
color: #fff;
|
pointer-events: auto;
|
}
|
|
.center-container-title {}
|
|
.center-name {
|
font-size: 30px;
|
margin: 10px 0;
|
font-family: "华文行楷";
|
}
|
|
.button-group {
|
display: flex;
|
justify-content: space-around;
|
align-items: center;
|
margin: -6px 0;
|
cursor: pointer;
|
|
}
|
|
.button-group button {
|
width: 120px;
|
height: 40px;
|
border: none;
|
border-radius: 20px;
|
background-color: transparent;
|
color: #fff;
|
font-size: 25px;
|
}
|
|
.center-info {
|
text-align: right;
|
}
|
|
.center-info button {
|
width: 120px;
|
height: 40px;
|
border: none;
|
border-radius: 20px;
|
color: #fff;
|
background-color: transparent;
|
font-size: 20px;
|
background-image: url(/images/mode-tab.png);
|
}
|
|
button:hover {
|
background-color: #3c5e8f;
|
}
|
</style>
|