|
@@ -5,23 +5,11 @@
|
|
|
<div class="main-title">{{ mainTitle }}</div>
|
|
|
</div>
|
|
|
<a-row class="company-content" :gutter="10">
|
|
|
- <!-- <Transition name="fade-in"> -->
|
|
|
- <a-col v-for="(item, i) in cards" :key="i" :span="6">
|
|
|
+ <a-col v-for="(item, i) in shownBillboards" :key="`svvhbi-${i}`" :span="6">
|
|
|
<BaseCard :title="item.title">
|
|
|
- <!-- <CommonTitle class="mb-10px" label="测试" value="是我啊" />
|
|
|
- <CommonTable :columns="COLUMN_A" :data="[{ a: 1, b: 2, c: 3 }]" /> -->
|
|
|
- <!-- <ListItemA icon="warning-CO-2" label="LIA" value="233" type="blue" />
|
|
|
- <ListItemA icon="warning-smoke-2" label="LIA" value="233" type="green" />
|
|
|
- <ListItemB label="LIB" value="244" type="green-to-right" />
|
|
|
- <ListItemB label="LIB" value="244" type="green-to-left" />
|
|
|
- <ListItemB label="LIB" value="244" type="blue-to-right" />
|
|
|
- <ListItemB label="LIB" value="244" type="blue-to-left" /> -->
|
|
|
- <!-- <ListItemC label="LIC" value="244" type="to-top-right" />
|
|
|
- <ListItemC label="LIC" value="244" type="to-bottom-right" /> -->
|
|
|
- <GasStatus />
|
|
|
+ <component :is="COMPONENTS_MAP.get(item.type)" />
|
|
|
</BaseCard>
|
|
|
</a-col>
|
|
|
- <!-- </Transition> -->
|
|
|
</a-row>
|
|
|
<ArrowButton point-to="left" class="company__arrow_left" @click="changeCurrentPage(-1)" />
|
|
|
<ArrowButton point-to="right" class="company__arrow_right" @click="changeCurrentPage(1)" />
|
|
@@ -31,19 +19,20 @@
|
|
|
import { computed, ref } from 'vue';
|
|
|
import BaseCard from './components/BaseCard.vue';
|
|
|
import ArrowButton from './components/ArrowButton.vue';
|
|
|
- import { BILLBOARDS } from './billboard.data';
|
|
|
- import GasStatus from './components/GasStatus.vue';
|
|
|
+ import { BILLBOARDS, COMPONENTS_MAP } from './billboard.data';
|
|
|
// import mapComponent from './components/3Dmap/index.vue';
|
|
|
|
|
|
const mainTitle = computed(() => '国家能源神东煤炭集团');
|
|
|
|
|
|
// 一页最多支持几个看板项
|
|
|
+ const billboards = ref(BILLBOARDS); // for test
|
|
|
const pageSize = 8;
|
|
|
// 当前页
|
|
|
const currentPage = ref(1);
|
|
|
- const totalPage = Math.ceil(BILLBOARDS.length / pageSize) + 1;
|
|
|
- const cards = computed<{ title: string }[]>(() => {
|
|
|
- return BILLBOARDS.slice((currentPage.value - 1) * pageSize, currentPage.value * pageSize);
|
|
|
+ const totalPage = Math.ceil(billboards.value.length / pageSize) + 1;
|
|
|
+ // 能真正在页面上展示的看板
|
|
|
+ const shownBillboards = computed(() => {
|
|
|
+ return billboards.value.slice((currentPage.value - 1) * pageSize, currentPage.value * pageSize);
|
|
|
});
|
|
|
function changeCurrentPage(pagecount: number) {
|
|
|
currentPage.value = Math.max((currentPage.value + pagecount) % totalPage, 1);
|
|
@@ -60,6 +49,8 @@
|
|
|
height: 100%;
|
|
|
color: #fff;
|
|
|
position: relative;
|
|
|
+ background: url('@/assets/images/company/content-bg.png') no-repeat;
|
|
|
+ background-size: 100% 100%;
|
|
|
// background: url('../../../../assets/images/company/home-pageBg.png') no-repeat center;
|
|
|
// background-size: 100% 100%;
|
|
|
|
|
@@ -67,8 +58,6 @@
|
|
|
width: 100%;
|
|
|
height: 97px;
|
|
|
background: url('@/assets/images/company/top-bg.png') no-repeat center;
|
|
|
- position: absolute;
|
|
|
- z-index: 1;
|
|
|
.main-title {
|
|
|
height: 96px;
|
|
|
font-family: 'douyuFont';
|
|
@@ -82,11 +71,8 @@
|
|
|
|
|
|
.company-content {
|
|
|
width: 100%;
|
|
|
- height: 100%;
|
|
|
- background: url('@/assets/images/company/content-bg.png') no-repeat;
|
|
|
- background-size: 100% 100%;
|
|
|
- pointer-events: none;
|
|
|
- padding: 100px 100px 0 100px;
|
|
|
+ height: calc(100% - 97px);
|
|
|
+ padding: 50px 100px 0 100px;
|
|
|
}
|
|
|
.company__arrow_left {
|
|
|
position: absolute;
|