Merge remote-tracking branch 'origin/dev' into dev
# Conflicts: # src/components/charts/panel.scss
This commit is contained in:
@@ -4,8 +4,12 @@
|
||||
<div class="single-value__icon"><i class="el-icon-apple"></i></div>
|
||||
</div>
|
||||
<div class="single-value__content" v-if="type === 51">
|
||||
<div class="content__data">11112</div>
|
||||
<div class="content__title">{{$t('common.save')}}</div>
|
||||
<div class="content__data">
|
||||
<slot name="data"></slot>
|
||||
</div>
|
||||
<div class="content__title">
|
||||
<slot name="title"></slot>
|
||||
</div>
|
||||
</div>
|
||||
<div class="single-value__content" v-if="type === 53">
|
||||
<div class="content__title">嘻嘻</div>
|
||||
|
||||
18
src/components/charts/ChartTabs.vue
Normal file
18
src/components/charts/ChartTabs.vue
Normal file
@@ -0,0 +1,18 @@
|
||||
<template>
|
||||
<el-tabs class="cn-chart cn-chart__tabs" v-model="activeName" @tab-click="handleClick">
|
||||
<el-tab-pane label="用户管理" name="first">用户管理</el-tab-pane>
|
||||
<el-tab-pane label="配置管理" name="second">配置管理</el-tab-pane>
|
||||
<el-tab-pane label="角色管理" name="third">角色管理</el-tab-pane>
|
||||
<el-tab-pane label="定时任务补偿" name="fourth">定时任务补偿</el-tab-pane>
|
||||
</el-tabs>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'ChartTabs'
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
|
||||
</style>
|
||||
@@ -145,17 +145,15 @@ const pieWithTable = {
|
||||
const typeOptionMappings = [
|
||||
{ value: 11, option: line }, // 常规折线图
|
||||
{ value: 13, option: lineStack }, // 常规折线图
|
||||
{ value: 31, option: pieWithTable }, // 常规折线图
|
||||
{ value: 91, option: line }, // tab容器
|
||||
{ value: 92, option: line }, // tab页
|
||||
{ value: 93, option: line } // 大标题
|
||||
{ value: 31, option: pieWithTable } // 常规折线图
|
||||
]
|
||||
const typeCategory = {
|
||||
MAP: 'map',
|
||||
TABLE: 'table',
|
||||
ECHARTS: 'echarts',
|
||||
TITLE: 'title',
|
||||
SINGLE: 'singleValue'
|
||||
SINGLE: 'singleValue',
|
||||
TABS: 'tabs'
|
||||
}
|
||||
export function getTypeCategory (type) {
|
||||
if (isMap(type)) {
|
||||
@@ -168,6 +166,8 @@ export function getTypeCategory (type) {
|
||||
return typeCategory.SINGLE
|
||||
} else if (isTitle(type)) {
|
||||
return typeCategory.TITLE
|
||||
} else if (isTabs(type)) {
|
||||
return typeCategory.TABS
|
||||
}
|
||||
}
|
||||
/* 饼图柱状图等 */
|
||||
@@ -202,13 +202,17 @@ export function isEchartsWithTable (type) {
|
||||
export function isTable (type) {
|
||||
return type >= 61 && type <= 70
|
||||
}
|
||||
/* title、tab等 */
|
||||
/* title */
|
||||
export function isTitle (type) {
|
||||
return type >= 91
|
||||
return type === 93
|
||||
}
|
||||
/* tabs */
|
||||
export function isTabs (type) {
|
||||
return type === 91
|
||||
}
|
||||
export function getOption (type) {
|
||||
const mapping = typeOptionMappings.find(m => m.value === type)
|
||||
return mapping && mapping.option ? mapping.option : null
|
||||
return mapping && mapping.option ? JSON.parse(JSON.stringify(mapping.option)) : null
|
||||
}
|
||||
export const layoutConstant = {
|
||||
HEADER: 'header',
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
.cn-panel {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(12, 1fr);
|
||||
grid-template-columns: repeat(30, 1fr);
|
||||
grid-auto-flow: row;
|
||||
grid-auto-rows: #{$--chart-height-unit}px;
|
||||
grid-auto-rows: var(--chart-height-unit);
|
||||
grid-gap: 10px;
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
@@ -17,7 +17,7 @@
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.cn-chart {
|
||||
&>.cn-chart {
|
||||
background-color: #FFFFFF;
|
||||
border: 1px solid #E7EAED;
|
||||
box-shadow: 0 2px 4px 0 rgba(51,51,51,0.02);
|
||||
@@ -25,7 +25,7 @@
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
}
|
||||
.cn-chart__echarts, .cn-chart__table, .cn-chart__map {
|
||||
&>.cn-chart__echarts, &>.cn-chart__table, &>.cn-chart__map {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
.cn-chart__header {
|
||||
@@ -53,38 +53,29 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
.cn-chart__single-value.cn-chart__single-value--icon-left {
|
||||
&>.cn-chart__single-value.cn-chart__single-value--icon-left {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
justify-content: space-evenly;
|
||||
align-items: center;
|
||||
|
||||
.single-value-icon__box{
|
||||
height: 70px;
|
||||
flex: 4;
|
||||
display: flex;
|
||||
justify-content: space-around;
|
||||
align-items: center;
|
||||
|
||||
}
|
||||
.single-value__icon {
|
||||
margin-right: 7.5%;
|
||||
position: relative;
|
||||
width: 72px;
|
||||
height: 72px;
|
||||
background-color: $--chart-single-value-icon-background-color;
|
||||
border-radius: 50%;
|
||||
|
||||
i {
|
||||
display: flex;
|
||||
justify-content: space-around;
|
||||
align-items: center;
|
||||
margin-top: 25px;
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
transform: translate(-50%,-50%);
|
||||
font-size: 28px;
|
||||
color: $--color-primary;
|
||||
}
|
||||
}
|
||||
|
||||
.single-value__content {
|
||||
flex: 6;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
|
||||
@@ -95,22 +86,12 @@
|
||||
font-weight: bold;
|
||||
}
|
||||
.content__title {
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
overflow: hidden;
|
||||
word-break: break-all;
|
||||
width: 40px;
|
||||
font-size: 16px;
|
||||
color: #666666;
|
||||
}
|
||||
.content__title:hover{
|
||||
overflow: visible;
|
||||
white-space: inherit;
|
||||
min-width:100%;
|
||||
}
|
||||
}
|
||||
}
|
||||
.cn-chart__single-value.cn-chart__single-value--icon-right {
|
||||
&>.cn-chart__single-value.cn-chart__single-value--icon-right {
|
||||
display: flex;
|
||||
flex-direction: row-reverse;
|
||||
justify-content: space-around;
|
||||
@@ -158,7 +139,7 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
.cn-chart__title {
|
||||
&>.cn-chart__title {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
font-size: 20px;
|
||||
@@ -168,7 +149,10 @@
|
||||
box-shadow: none;
|
||||
border: none;
|
||||
}
|
||||
.cn-chart__table {
|
||||
&>.cn-chart__tabs {
|
||||
|
||||
}
|
||||
&>.cn-chart__table {
|
||||
.cn-chart__header {
|
||||
border-bottom: 1px solid $--content-right-background-color;
|
||||
.header__operations {
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
text-color="#ffffff">
|
||||
<el-menu-item index="logo">
|
||||
<div id="home-to-overview" class="logo link">
|
||||
<img alt="loading..." height="26" :src="logo?logo:require('../../assets/img/logo1-2.png')"/>
|
||||
<img alt="loading..." height="32" :src="logo?logo:require('../../assets/img/cn-logo-medium.svg')"/>
|
||||
<span class="system-name">{{systemName && systemName !== 'undefined' ? systemName : 'dashboard.overview.contentTitle'}}</span>
|
||||
</div>
|
||||
</el-menu-item>
|
||||
@@ -26,7 +26,7 @@
|
||||
:index="`${index}`">
|
||||
<template #title>
|
||||
<i :class="menu.icon"></i>
|
||||
<span>{{menu.name}}</span>
|
||||
<span>{{menu.i18n ? $t(menu.i18n) : menu.name}}</span>
|
||||
</template>
|
||||
<template v-for="(secondMenu, secondIndex) in menu.children">
|
||||
<template v-if="secondMenu.children && secondMenu.children.length > 0">
|
||||
@@ -34,13 +34,13 @@
|
||||
:key="secondIndex"
|
||||
:index="`${index}-${secondIndex}`">
|
||||
<template #title>
|
||||
<span class="data-column__span">{{secondMenu.name}}</span>
|
||||
<span class="data-column__span">{{secondMenu.i18n ? $t(secondMenu.i18n) : secondMenu.name}}</span>
|
||||
</template>
|
||||
<el-menu-item
|
||||
v-for="(thirdMenu, thirdIndex) in secondMenu.children"
|
||||
:key="`${index}-${secondIndex}-${thirdIndex}`"
|
||||
:index="thirdMenu.route">
|
||||
{{thirdMenu.name}}
|
||||
{{thirdMenu.i18n ? $t(thirdMenu.i18n) : thirdMenu.name}}
|
||||
</el-menu-item>
|
||||
</el-submenu>
|
||||
</template>
|
||||
@@ -48,7 +48,7 @@
|
||||
<el-menu-item
|
||||
:key="secondIndex"
|
||||
:index="secondMenu.route">
|
||||
{{secondMenu.name}}
|
||||
{{secondMenu.i18n ? $t(secondMenu.i18n) : secondMenu.name}}
|
||||
</el-menu-item>
|
||||
</template>
|
||||
</template>
|
||||
@@ -59,7 +59,7 @@
|
||||
:index="menu.route">
|
||||
<i :class="menu.icon"></i>
|
||||
<template #title>
|
||||
<span class="data-column__span">{{menu.name}}</span>
|
||||
<span class="data-column__span">{{menu.i18n ? $t(menu.i18n) : menu.name}}</span>
|
||||
</template>
|
||||
</el-menu-item>
|
||||
</template>
|
||||
@@ -216,12 +216,12 @@ export default {
|
||||
}
|
||||
|
||||
.system-name {
|
||||
padding-left: 5px;
|
||||
padding-left: 8px;
|
||||
color: white;
|
||||
font-size: 12px;
|
||||
font-size: 14px;
|
||||
letter-spacing: 0;
|
||||
line-height: 34px;
|
||||
font-weight: 400;
|
||||
font-weight: bold;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user