Merge remote-tracking branch 'origin/dev' into dev

# Conflicts:
#	src/components/charts/panel.scss
This commit is contained in:
admin
2021-07-05 10:00:21 +08:00
39 changed files with 305 additions and 6117 deletions

View File

@@ -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>

View 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>

View File

@@ -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',

View File

@@ -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 {