Commit 1aba0ffa by yuwei

项目初始化

parent 7d3387cb
...@@ -519,16 +519,11 @@ table { ...@@ -519,16 +519,11 @@ table {
border-collapse: collapse; border-collapse: collapse;
border-spacing: 0; border-spacing: 0;
border: none; border: none;
thead th { thead {
background-color: #CCE8EB; background-color: rgba(255, 255, 255, 0.1);
} }
tbody { tbody {
tr:nth-child(odd) { background-color: rgba(255, 255, 255, 0.1);
background: #fff;
}
tr:nth-child(even) {
background: #F5FAFA;
}
} }
td, th { td, th {
border: 1px solid #ccc; border: 1px solid #ccc;
...@@ -548,7 +543,7 @@ table { ...@@ -548,7 +543,7 @@ table {
min-height: 36px; min-height: 36px;
cursor: default; cursor: default;
&.col-corner-bg { &.col-corner-bg {
background: #f1f7fd; background-color: rgba(255, 255, 255, 0.1);
} }
} }
} }
......
...@@ -99,13 +99,13 @@ export const chartTypes = [ ...@@ -99,13 +99,13 @@ export const chartTypes = [
} }
}, },
{ {
name: '地图', value: 'geo', icon: 'chart_geo', name: '地图', value: 'map', icon: 'chart_geo',
status: true, status: true,
component: 'ChartGeo', component: 'ChartMap',
rule: { rule: {
text: '1个或多个 行维;0个或多个 列维;1个或多个 指标', text: '1 行维;0 列维;1 指标',
check(rows, columns, measures) { check(rows, columns, measures) {
return rows.length >= 1 && columns.length >= 0 && measures.length >= 1 return rows.length === 1 && columns.length === 0 && measures.length === 1
} }
} }
}, },
...@@ -153,39 +153,6 @@ export const chartTypes = [ ...@@ -153,39 +153,6 @@ export const chartTypes = [
} }
} }
} }
// {
// name: '树图', value: 'tree', icon: 'chart_tree',
// status: false,
// component: 'ChartTree',
// rule: {
// text: '0 行维;0 列维;0 指标',
// check(rows, columns, measures) {
// return rows.length === 0 && columns.length === 0 && measures.length === 0
// }
// }
// },
// {
// name: '旭日图', value: 'sunburst', icon: 'chart_sunburst',
// status: false,
// component: 'ChartSunburst',
// rule: {
// text: '0 行维;0 列维;0 指标',
// check(rows, columns, measures) {
// return rows.length === 0 && columns.length === 0 && measures.length === 0
// }
// }
// },
// {
// name: '极区图', value: 'polar', icon: 'chart_polar',
// status: false,
// component: 'ChartPolar',
// rule: {
// text: '0 行维;0 列维;0 指标',
// check(rows, columns, measures) {
// return rows.length === 0 && columns.length === 0 && measures.length === 0
// }
// }
// }
] ]
export const chartOptions = { export const chartOptions = {
...@@ -277,6 +244,10 @@ export const chartSeriesTypes = { ...@@ -277,6 +244,10 @@ export const chartSeriesTypes = {
{ name: '菱形', value: 'diamond' }, { name: '菱形', value: 'diamond' },
{ name: '大头针形', value: 'pin' }, { name: '大头针形', value: 'pin' },
{ name: '箭头形', value: 'arrow' } { name: '箭头形', value: 'arrow' }
],
'map': [
{ name: '基础地图', value: 'map' },
{ name: '视觉映射', value: 'visualMap' }
] ]
} }
......
...@@ -53,10 +53,11 @@ ...@@ -53,10 +53,11 @@
:w="item.w" :w="item.w"
:h="item.h" :h="item.h"
:i="item.i" :i="item.i"
drag-allow-from=".vue-draggable-handle"
@resized="handleResize" @resized="handleResize"
> >
<el-card v-loading="getChartItem(item.i).loading" class="widget-center-card" body-style="padding: 10px;"> <el-card v-loading="getChartItem(item.i).loading" class="widget-center-card" body-style="padding: 10px;">
<div slot="header" class="widget-center-card-header"> <div slot="header" class="widget-center-card-header vue-draggable-handle">
<div> <div>
<span>{{ getChartItem(item.i).chartName }}</span> <span>{{ getChartItem(item.i).chartName }}</span>
</div> </div>
......
...@@ -28,7 +28,7 @@ import ChartTreemap from './widgets/ChartTreemap' ...@@ -28,7 +28,7 @@ import ChartTreemap from './widgets/ChartTreemap'
import ChartWordCloud from './widgets/ChartWordCloud' import ChartWordCloud from './widgets/ChartWordCloud'
import ChartLiquidFill from './widgets/ChartLiquidFill' import ChartLiquidFill from './widgets/ChartLiquidFill'
import ChartSankey from './widgets/ChartSankey' import ChartSankey from './widgets/ChartSankey'
import ChartGeo from './widgets/ChartGeo' import ChartMap from './widgets/ChartMap'
import ChartTree from './widgets/ChartTree' import ChartTree from './widgets/ChartTree'
import ChartSunburst from './widgets/ChartSunburst' import ChartSunburst from './widgets/ChartSunburst'
import ChartPolar from './widgets/ChartPolar' import ChartPolar from './widgets/ChartPolar'
...@@ -39,7 +39,7 @@ export default { ...@@ -39,7 +39,7 @@ export default {
ChartTable, ChartLine, ChartBar, ChartPie, ChartTable, ChartLine, ChartBar, ChartPie,
ChartKpi, ChartRadar, ChartFunnel, ChartScatter, ChartKpi, ChartRadar, ChartFunnel, ChartScatter,
ChartGauge, ChartTreemap, ChartWordCloud, ChartLiquidFill, ChartGauge, ChartTreemap, ChartWordCloud, ChartLiquidFill,
ChartSankey, ChartGeo, ChartTree, ChartSunburst, ChartPolar ChartSankey, ChartMap, ChartTree, ChartSunburst, ChartPolar
}, },
props: { props: {
chartSchema: { chartSchema: {
......
...@@ -68,6 +68,7 @@ export default { ...@@ -68,6 +68,7 @@ export default {
connector: '-', connector: '-',
chart: null, chart: null,
calcOption: { calcOption: {
backgroundColor: 'rgba(255, 255, 255, 0.1)',
xAxis: { type: 'category' }, xAxis: { type: 'category' },
yAxis: { type: 'value' }, yAxis: { type: 'value' },
tooltip: { trigger: 'axis' } tooltip: { trigger: 'axis' }
......
...@@ -68,6 +68,7 @@ export default { ...@@ -68,6 +68,7 @@ export default {
connector: '-', connector: '-',
chart: null, chart: null,
calcOption: { calcOption: {
backgroundColor: 'rgba(255, 255, 255, 0.1)',
tooltip: { trigger: 'item' } tooltip: { trigger: 'item' }
}, },
calcData: { calcData: {
......
...@@ -62,6 +62,7 @@ export default { ...@@ -62,6 +62,7 @@ export default {
connector: '-', connector: '-',
chart: null, chart: null,
calcOption: { calcOption: {
backgroundColor: 'rgba(255, 255, 255, 0.1)',
tooltip: { trigger: 'item' } tooltip: { trigger: 'item' }
}, },
calcData: { calcData: {
......
<template>
<div ref="chart" :style="chartStyle">ChartGeo</div>
</template>
<script>
export default {
name: 'ChartGeo',
props: {
data: {
type: Array,
required: true,
default: () => []
},
rows: {
type: Array,
required: true,
default: () => []
},
columns: {
type: Array,
required: true,
default: () => []
},
values: {
type: Array,
required: true,
default: () => []
},
chartType: {
type: String,
required: true
},
chartTheme: {
type: String,
require: true
},
chartOption: {
type: Object,
require: false,
default: () => ({})
},
chartStyle: {
type: Object,
require: false,
default: () => {
return {
height: '200px'
}
}
}
},
created() {
console.log(this.data)
}
}
</script>
<style lang="scss" scoped>
</style>
...@@ -68,6 +68,7 @@ export default { ...@@ -68,6 +68,7 @@ export default {
connector: '-', connector: '-',
chart: null, chart: null,
calcOption: { calcOption: {
backgroundColor: 'rgba(255, 255, 255, 0.1)',
xAxis: { type: 'category' }, xAxis: { type: 'category' },
yAxis: { type: 'value' }, yAxis: { type: 'value' },
tooltip: { trigger: 'axis' } tooltip: { trigger: 'axis' }
......
...@@ -69,6 +69,7 @@ export default { ...@@ -69,6 +69,7 @@ export default {
connector: '-', connector: '-',
chart: null, chart: null,
calcOption: { calcOption: {
backgroundColor: 'rgba(255, 255, 255, 0.1)',
tooltip: { trigger: 'item' } tooltip: { trigger: 'item' }
}, },
calcData: { calcData: {
......
...@@ -68,6 +68,7 @@ export default { ...@@ -68,6 +68,7 @@ export default {
connector: '-', connector: '-',
chart: null, chart: null,
calcOption: { calcOption: {
backgroundColor: 'rgba(255, 255, 255, 0.1)',
tooltip: { trigger: 'item' } tooltip: { trigger: 'item' }
}, },
calcData: { calcData: {
......
...@@ -68,6 +68,7 @@ export default { ...@@ -68,6 +68,7 @@ export default {
connector: '-', connector: '-',
chart: null, chart: null,
calcOption: { calcOption: {
backgroundColor: 'rgba(255, 255, 255, 0.1)',
radar: { indicator: [] }, radar: { indicator: [] },
tooltip: { trigger: 'item' } tooltip: { trigger: 'item' }
}, },
......
...@@ -63,6 +63,7 @@ export default { ...@@ -63,6 +63,7 @@ export default {
connector: '-', connector: '-',
chart: null, chart: null,
calcOption: { calcOption: {
backgroundColor: 'rgba(255, 255, 255, 0.1)',
tooltip: { trigger: 'item' } tooltip: { trigger: 'item' }
}, },
calcData: { calcData: {
......
...@@ -63,6 +63,7 @@ export default { ...@@ -63,6 +63,7 @@ export default {
connector: '-', connector: '-',
chart: null, chart: null,
calcOption: { calcOption: {
backgroundColor: 'rgba(255, 255, 255, 0.1)',
xAxis: {}, xAxis: {},
yAxis: {}, yAxis: {},
tooltip: { trigger: 'item' } tooltip: { trigger: 'item' }
......
...@@ -63,6 +63,7 @@ export default { ...@@ -63,6 +63,7 @@ export default {
connector: '-', connector: '-',
chart: null, chart: null,
calcOption: { calcOption: {
backgroundColor: 'rgba(255, 255, 255, 0.1)',
tooltip: { tooltip: {
trigger: 'item', trigger: 'item',
formatter: '{b} : {c}' formatter: '{b} : {c}'
......
...@@ -64,6 +64,7 @@ export default { ...@@ -64,6 +64,7 @@ export default {
connector: '-', connector: '-',
chart: null, chart: null,
calcOption: { calcOption: {
backgroundColor: 'rgba(255, 255, 255, 0.1)',
tooltip: { trigger: 'item' } tooltip: { trigger: 'item' }
}, },
calcData: { calcData: {
......
This source diff could not be displayed because it is too large. You can view the blob instead.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment