2021-03-03 15:06:52 +08:00
|
|
|
|
<template>
|
2021-05-20 12:01:19 +08:00
|
|
|
|
<el-row v-loading="loading" style="height: 100%;overflow-y: hidden;width: 100%;">
|
2021-04-25 15:10:49 +08:00
|
|
|
|
<!-- <span v-show="false">{{ vId }}</span>-->
|
2021-03-24 12:30:48 +08:00
|
|
|
|
<el-row style="height: 40px;background-color: white" class="padding-lr">
|
2021-04-15 11:55:30 +08:00
|
|
|
|
<el-popover
|
|
|
|
|
placement="right-start"
|
|
|
|
|
width="400"
|
2021-04-15 12:06:16 +08:00
|
|
|
|
trigger="click"
|
2021-04-15 11:55:30 +08:00
|
|
|
|
@show="showTab"
|
|
|
|
|
@hide="hideTab"
|
|
|
|
|
>
|
|
|
|
|
<dataset-chart-detail type="chart" :data="view" :tab-status="tabStatus" />
|
|
|
|
|
<span slot="reference" style="line-height: 40px;cursor: pointer;">{{ view.name }}</span>
|
|
|
|
|
</el-popover>
|
2021-03-03 15:06:52 +08:00
|
|
|
|
<span style="float: right;line-height: 40px;">
|
2021-03-10 18:23:25 +08:00
|
|
|
|
<el-button size="mini" @click="closeEdit">
|
2021-05-20 10:37:43 +08:00
|
|
|
|
{{ $t('commons.save') }}
|
2021-03-03 15:06:52 +08:00
|
|
|
|
</el-button>
|
2021-05-20 12:01:19 +08:00
|
|
|
|
|
2021-03-10 18:23:25 +08:00
|
|
|
|
<!-- <el-button type="primary" size="mini" @click="save">-->
|
|
|
|
|
<!-- {{ $t('chart.confirm') }}-->
|
|
|
|
|
<!-- </el-button>-->
|
2021-03-03 15:06:52 +08:00
|
|
|
|
</span>
|
|
|
|
|
</el-row>
|
2021-03-25 12:43:19 +08:00
|
|
|
|
<el-row class="view-panel">
|
2021-03-03 15:06:52 +08:00
|
|
|
|
<el-col
|
|
|
|
|
style="height: 100%;width: 20%;min-width: 180px;max-width:220px;border: 1px solid #E6E6E6;border-left: 0 solid;"
|
|
|
|
|
>
|
2021-03-25 12:43:19 +08:00
|
|
|
|
<div style="height: 50%;border-bottom: 1px solid #E6E6E6;" class="padding-lr">
|
2021-03-03 15:06:52 +08:00
|
|
|
|
<span>{{ $t('chart.dimension') }}</span>
|
|
|
|
|
<draggable
|
|
|
|
|
v-model="dimension"
|
2021-03-11 14:33:24 +08:00
|
|
|
|
:options="{group:{name: 'dimension',pull:'clone'},sort: true}"
|
2021-03-03 15:06:52 +08:00
|
|
|
|
animation="300"
|
|
|
|
|
:move="onMove"
|
2021-03-25 12:43:19 +08:00
|
|
|
|
class="drag-list"
|
2021-03-03 15:06:52 +08:00
|
|
|
|
@end="end1"
|
2021-03-10 16:01:29 +08:00
|
|
|
|
@start="start1"
|
2021-03-03 15:06:52 +08:00
|
|
|
|
>
|
|
|
|
|
<transition-group>
|
2021-04-12 17:18:07 +08:00
|
|
|
|
<span v-for="item in dimension" :key="item.id" class="item">
|
|
|
|
|
<svg-icon v-if="item.deType === 0" icon-class="field_text" class="field-icon-text" />
|
|
|
|
|
<svg-icon v-if="item.deType === 1" icon-class="field_time" class="field-icon-time" />
|
|
|
|
|
<svg-icon v-if="item.deType === 2 || item.deType === 3" icon-class="field_value" class="field-icon-value" />
|
|
|
|
|
{{ item.name }}
|
|
|
|
|
</span>
|
2021-03-03 15:06:52 +08:00
|
|
|
|
</transition-group>
|
|
|
|
|
</draggable>
|
|
|
|
|
</div>
|
2021-03-25 12:43:19 +08:00
|
|
|
|
<div style="height: 50%;" class="padding-lr">
|
2021-03-03 15:06:52 +08:00
|
|
|
|
<span>{{ $t('chart.quota') }}</span>
|
|
|
|
|
<draggable
|
|
|
|
|
v-model="quota"
|
2021-03-11 14:33:24 +08:00
|
|
|
|
:options="{group:{name: 'quota',pull:'clone'},sort: true}"
|
2021-03-03 15:06:52 +08:00
|
|
|
|
animation="300"
|
|
|
|
|
:move="onMove"
|
2021-03-25 12:43:19 +08:00
|
|
|
|
class="drag-list"
|
2021-03-10 16:01:29 +08:00
|
|
|
|
@end="end1"
|
|
|
|
|
@start="start1"
|
2021-03-03 15:06:52 +08:00
|
|
|
|
>
|
|
|
|
|
<transition-group>
|
2021-04-12 17:18:07 +08:00
|
|
|
|
<span v-for="item in quota" :key="item.id" class="item">
|
|
|
|
|
<svg-icon v-if="item.deType === 0" icon-class="field_text" class="field-icon-text" />
|
|
|
|
|
<svg-icon v-if="item.deType === 1" icon-class="field_time" class="field-icon-time" />
|
|
|
|
|
<svg-icon v-if="item.deType === 2 || item.deType === 3" icon-class="field_value" class="field-icon-value" />
|
2021-04-25 15:10:49 +08:00
|
|
|
|
<span>{{ item.name }}</span>
|
2021-04-12 17:18:07 +08:00
|
|
|
|
</span>
|
2021-03-03 15:06:52 +08:00
|
|
|
|
</transition-group>
|
|
|
|
|
</draggable>
|
|
|
|
|
</div>
|
|
|
|
|
</el-col>
|
|
|
|
|
|
|
|
|
|
<el-col
|
2021-03-25 12:43:19 +08:00
|
|
|
|
style="height: 100%;width: 30%;min-width: 200px;max-width:220px;border: 1px solid #E6E6E6;border-left: 0 solid;"
|
2021-03-03 15:06:52 +08:00
|
|
|
|
>
|
2021-05-31 16:20:28 +08:00
|
|
|
|
<!-- <div style="border-bottom: 1px solid #E6E6E6;overflow-y:hidden;height: 62px;" class="padding-lr">-->
|
|
|
|
|
<!-- <el-row>-->
|
|
|
|
|
<!-- <span>{{ $t('chart.title') }}</span>-->
|
|
|
|
|
<!-- <el-button style="float: right;padding: 0;margin: 8px 0 0 0;font-size: 12px;" type="text" @click="save">{{ $t('chart.confirm') }}</el-button>-->
|
|
|
|
|
<!-- </el-row>-->
|
|
|
|
|
<!-- <el-form>-->
|
|
|
|
|
<!-- <el-form-item class="form-item">-->
|
|
|
|
|
<!-- <el-input-->
|
|
|
|
|
<!-- v-model="view.title"-->
|
|
|
|
|
<!-- size="mini"-->
|
|
|
|
|
<!-- :placeholder="$t('chart.title')"-->
|
|
|
|
|
<!-- prefix-icon="el-icon-search"-->
|
|
|
|
|
<!-- clearable-->
|
|
|
|
|
<!-- />-->
|
|
|
|
|
<!-- </el-form-item>-->
|
|
|
|
|
<!-- </el-form>-->
|
|
|
|
|
<!-- </div>-->
|
2021-05-19 15:20:48 +08:00
|
|
|
|
<div style="height: 25vh;overflow:auto" class="padding-lr">
|
2021-03-03 15:06:52 +08:00
|
|
|
|
<span>{{ $t('chart.chart_type') }}</span>
|
|
|
|
|
<el-row>
|
|
|
|
|
<div class="chart-type">
|
2021-05-14 18:55:53 +08:00
|
|
|
|
<!--这里要替换好看点的图标,UI标签可以重新定义-->
|
2021-03-22 17:17:04 +08:00
|
|
|
|
<el-radio-group
|
|
|
|
|
v-model="view.type"
|
|
|
|
|
style="width: 100%"
|
2021-05-28 15:45:47 +08:00
|
|
|
|
@change="save(true,'chart')"
|
2021-03-22 17:17:04 +08:00
|
|
|
|
>
|
|
|
|
|
<div style="width: 100%;display: flex;display: -webkit-flex;justify-content: space-between;flex-direction: row;flex-wrap: wrap;">
|
2021-05-31 16:46:23 +08:00
|
|
|
|
<el-tooltip effect="dark" :content="$t('chart.chart_table_normal')" placement="bottom">
|
|
|
|
|
<el-radio value="table-normal" label="table-normal"><svg-icon icon-class="table-normal" class="chart-icon" /></el-radio>
|
|
|
|
|
</el-tooltip>
|
|
|
|
|
<el-tooltip effect="dark" :content="$t('chart.chart_card')" placement="bottom">
|
|
|
|
|
<el-radio value="text" label="text"><svg-icon icon-class="text" class="chart-icon" /></el-radio>
|
|
|
|
|
</el-tooltip>
|
|
|
|
|
<el-tooltip effect="dark" :content="$t('chart.chart_bar')" placement="bottom">
|
|
|
|
|
<el-radio value="bar" label="bar"><svg-icon icon-class="bar" class="chart-icon" /></el-radio>
|
|
|
|
|
</el-tooltip>
|
|
|
|
|
<el-tooltip effect="dark" :content="$t('chart.chart_bar_stack')" placement="bottom">
|
|
|
|
|
<el-radio value="bar-stack" label="bar-stack"><svg-icon icon-class="bar-stack" class="chart-icon" /></el-radio>
|
|
|
|
|
</el-tooltip>
|
|
|
|
|
<el-tooltip effect="dark" :content="$t('chart.chart_bar_horizontal')" placement="bottom">
|
|
|
|
|
<el-radio value="bar-horizontal" label="bar-horizontal"><svg-icon icon-class="bar-horizontal" class="chart-icon" /></el-radio>
|
|
|
|
|
</el-tooltip>
|
2021-03-22 17:17:04 +08:00
|
|
|
|
</div>
|
|
|
|
|
<div style="width: 100%;display: flex;display: -webkit-flex;justify-content: space-between;flex-direction: row;flex-wrap: wrap;">
|
2021-05-31 16:46:23 +08:00
|
|
|
|
<el-tooltip effect="dark" :content="$t('chart.chart_bar_stack_horizontal')" placement="bottom">
|
|
|
|
|
<el-radio value="bar-stack-horizontal" label="bar-stack-horizontal"><svg-icon icon-class="bar-stack-horizontal" class="chart-icon" /></el-radio>
|
|
|
|
|
</el-tooltip>
|
|
|
|
|
<el-tooltip effect="dark" :content="$t('chart.chart_line')" placement="bottom">
|
|
|
|
|
<el-radio value="line" label="line"><svg-icon icon-class="line" class="chart-icon" /></el-radio>
|
|
|
|
|
</el-tooltip>
|
|
|
|
|
<el-tooltip effect="dark" :content="$t('chart.chart_line_stack')" placement="bottom">
|
|
|
|
|
<el-radio value="line-stack" label="line-stack"><svg-icon icon-class="line-stack" class="chart-icon" /></el-radio>
|
|
|
|
|
</el-tooltip>
|
|
|
|
|
<el-tooltip effect="dark" :content="$t('chart.chart_pie')" placement="bottom">
|
|
|
|
|
<el-radio value="pie" label="pie"><svg-icon icon-class="pie" class="chart-icon" /></el-radio>
|
|
|
|
|
</el-tooltip>
|
|
|
|
|
<el-tooltip effect="dark" :content="$t('chart.chart_pie_rose')" placement="bottom">
|
|
|
|
|
<el-radio value="pie-rose" label="pie-rose"><svg-icon icon-class="pie-rose" class="chart-icon" /></el-radio>
|
|
|
|
|
</el-tooltip>
|
2021-05-14 18:21:03 +08:00
|
|
|
|
</div>
|
|
|
|
|
<div style="width: 100%;display: flex;display: -webkit-flex;justify-content: space-between;flex-direction: row;flex-wrap: wrap;">
|
2021-05-31 16:46:23 +08:00
|
|
|
|
<el-tooltip effect="dark" :content="$t('chart.chart_funnel')" placement="bottom">
|
|
|
|
|
<el-radio value="funnel" label="funnel"><svg-icon icon-class="funnel" class="chart-icon" /></el-radio>
|
|
|
|
|
</el-tooltip>
|
|
|
|
|
<el-tooltip effect="dark" :content="$t('chart.chart_radar')" placement="bottom">
|
|
|
|
|
<el-radio value="radar" label="radar"><svg-icon icon-class="radar" class="chart-icon" /></el-radio>
|
|
|
|
|
</el-tooltip>
|
|
|
|
|
<el-tooltip effect="dark" :content="$t('chart.chart_gauge')" placement="bottom">
|
|
|
|
|
<el-radio value="gauge" label="gauge"><svg-icon icon-class="gauge" class="chart-icon" /></el-radio>
|
|
|
|
|
</el-tooltip>
|
2021-04-08 13:41:29 +08:00
|
|
|
|
<el-radio value="" label="" disabled class="disabled-none-cursor"><svg-icon icon-class="" class="chart-icon" /></el-radio>
|
2021-03-22 17:17:04 +08:00
|
|
|
|
<el-radio value="" label="" disabled class="disabled-none-cursor"><svg-icon icon-class="" class="chart-icon" /></el-radio>
|
|
|
|
|
</div>
|
2021-03-19 14:28:38 +08:00
|
|
|
|
</el-radio-group>
|
2021-03-03 15:06:52 +08:00
|
|
|
|
</div>
|
|
|
|
|
</el-row>
|
2021-05-24 14:59:41 +08:00
|
|
|
|
<el-row style="color: #909399;">
|
|
|
|
|
<span>
|
|
|
|
|
<span v-show="chart.type && (chart.type.includes('pie') || chart.type.includes('funnel'))">
|
|
|
|
|
Tips: {{ $t('chart.only_one_quota') }}
|
|
|
|
|
</span>
|
|
|
|
|
<span v-show="chart.type && (chart.type.includes('text'))">
|
|
|
|
|
Tips: {{ $t('chart.only_one_result') }}
|
|
|
|
|
</span>
|
|
|
|
|
<span v-show="chart.type && chart.type.includes('gauge')">
|
|
|
|
|
Tips: {{ $t('chart.only_one_quota') }},{{ $t('chart.only_one_result') }}
|
|
|
|
|
</span>
|
2021-05-17 12:14:27 +08:00
|
|
|
|
</span>
|
2021-05-24 14:59:41 +08:00
|
|
|
|
</el-row>
|
|
|
|
|
</div>
|
2021-05-19 15:20:48 +08:00
|
|
|
|
<div style="overflow:auto;border-top: 1px solid #e6e6e6" class="attr-style">
|
2021-05-07 19:20:47 +08:00
|
|
|
|
<el-row class="padding-lr">
|
2021-05-14 18:55:53 +08:00
|
|
|
|
<span>{{ $t('chart.style_priority') }}</span>
|
2021-05-17 17:23:29 +08:00
|
|
|
|
<el-row>
|
|
|
|
|
<el-radio-group v-model="view.stylePriority" size="mini" @change="save">
|
|
|
|
|
<el-radio label="view"><span>{{ $t('chart.chart') }}</span></el-radio>
|
|
|
|
|
<el-radio label="panel"><span>{{ $t('chart.dashboard') }}</span></el-radio>
|
|
|
|
|
</el-radio-group>
|
|
|
|
|
</el-row>
|
2021-05-07 19:20:47 +08:00
|
|
|
|
</el-row>
|
2021-03-16 11:55:22 +08:00
|
|
|
|
<el-tabs type="card" :stretch="true" class="tab-header">
|
2021-03-17 16:12:30 +08:00
|
|
|
|
<el-tab-pane :label="$t('chart.shape_attr')" class="padding-lr">
|
2021-03-19 14:28:38 +08:00
|
|
|
|
<color-selector class="attr-selector" :chart="chart" @onColorChange="onColorChange" />
|
|
|
|
|
<size-selector class="attr-selector" :chart="chart" @onSizeChange="onSizeChange" />
|
2021-05-17 12:14:27 +08:00
|
|
|
|
<label-selector v-show="!view.type.includes('table') && !view.type.includes('text')" class="attr-selector" :chart="chart" @onLabelChange="onLabelChange" />
|
|
|
|
|
<tooltip-selector v-show="!view.type.includes('table') && !view.type.includes('text')" class="attr-selector" :chart="chart" @onTooltipChange="onTooltipChange" />
|
2021-03-17 16:12:30 +08:00
|
|
|
|
</el-tab-pane>
|
2021-03-22 13:44:07 +08:00
|
|
|
|
<el-tab-pane :label="$t('chart.module_style')" class="padding-lr">
|
|
|
|
|
<title-selector class="attr-selector" :chart="chart" @onTextChange="onTextChange" />
|
2021-05-17 12:14:27 +08:00
|
|
|
|
<legend-selector v-show="!view.type.includes('table') && !view.type.includes('text')" class="attr-selector" :chart="chart" @onLegendChange="onLegendChange" />
|
2021-04-27 18:43:15 +08:00
|
|
|
|
<x-axis-selector v-show="view.type.includes('bar') || view.type.includes('line')" class="attr-selector" :chart="chart" @onChangeXAxisForm="onChangeXAxisForm" />
|
|
|
|
|
<y-axis-selector v-show="view.type.includes('bar') || view.type.includes('line')" class="attr-selector" :chart="chart" @onChangeYAxisForm="onChangeYAxisForm" />
|
2021-03-24 13:32:29 +08:00
|
|
|
|
<background-color-selector class="attr-selector" :chart="chart" @onChangeBackgroundForm="onChangeBackgroundForm" />
|
2021-03-22 13:44:07 +08:00
|
|
|
|
</el-tab-pane>
|
2021-03-03 15:06:52 +08:00
|
|
|
|
</el-tabs>
|
|
|
|
|
</div>
|
2021-05-21 16:45:21 +08:00
|
|
|
|
<div style="height:60px;overflow:auto;border-top: 1px solid #e6e6e6" class="padding-lr filter-class">
|
2021-04-14 11:30:04 +08:00
|
|
|
|
<span>{{ $t('chart.result_filter') }}</span>
|
2021-05-21 16:45:21 +08:00
|
|
|
|
<el-button size="mini" class="filter-btn-class" @click="showResultFilter">
|
|
|
|
|
{{ $t('chart.filter_condition') }}<i class="el-icon-setting el-icon--right" />
|
|
|
|
|
</el-button>
|
2021-04-14 11:30:04 +08:00
|
|
|
|
</div>
|
2021-03-03 15:06:52 +08:00
|
|
|
|
</el-col>
|
|
|
|
|
|
|
|
|
|
<el-col style="height: 100%;min-width: 500px;border-top: 1px solid #E6E6E6;">
|
|
|
|
|
<el-row style="width: 100%;height: 100%;" class="padding-lr">
|
|
|
|
|
<el-row style="margin-top: 10px;">
|
2021-03-04 15:38:37 +08:00
|
|
|
|
<el-row style="display:flex;height: 32px;">
|
2021-05-21 16:45:21 +08:00
|
|
|
|
<span style="line-height: 32px;width: 80px;text-align: right;">{{ $t('chart.dimension') }}</span>
|
2021-03-03 15:06:52 +08:00
|
|
|
|
<draggable
|
|
|
|
|
v-model="view.xaxis"
|
2021-03-11 14:33:24 +08:00
|
|
|
|
group="dimension"
|
2021-03-03 15:06:52 +08:00
|
|
|
|
animation="300"
|
|
|
|
|
:move="onMove"
|
2021-03-24 12:30:48 +08:00
|
|
|
|
style="width:100%;height: 100%;margin:0 10px;border-radius: 4px;border: 1px solid #DCDFE6;overflow-x: auto;display: flex;align-items: center;background-color: white;"
|
2021-03-10 16:01:29 +08:00
|
|
|
|
@end="end2"
|
2021-03-03 15:06:52 +08:00
|
|
|
|
>
|
2021-03-10 16:01:29 +08:00
|
|
|
|
<transition-group class="draggable-group">
|
2021-04-27 13:58:25 +08:00
|
|
|
|
<dimension-item v-for="(item,index) in view.xaxis" :key="item.id" :index="index" :item="item" @onDimensionItemChange="dimensionItemChange" @onDimensionItemRemove="dimensionItemRemove" @editItemFilter="showDimensionEditFilter" @onNameEdit="showRename" />
|
2021-03-03 15:06:52 +08:00
|
|
|
|
</transition-group>
|
|
|
|
|
</draggable>
|
|
|
|
|
</el-row>
|
2021-03-04 15:38:37 +08:00
|
|
|
|
<el-row style="display:flex;height: 32px;margin-top: 10px;">
|
2021-05-21 16:45:21 +08:00
|
|
|
|
<span style="line-height: 32px;width: 80px;text-align: right;">{{ $t('chart.quota') }}</span>
|
2021-03-03 15:06:52 +08:00
|
|
|
|
<draggable
|
|
|
|
|
v-model="view.yaxis"
|
2021-03-11 14:33:24 +08:00
|
|
|
|
group="quota"
|
2021-03-03 15:06:52 +08:00
|
|
|
|
animation="300"
|
|
|
|
|
:move="onMove"
|
2021-03-24 12:30:48 +08:00
|
|
|
|
style="width:100%;height: 100%;margin:0 10px;border-radius: 4px;border: 1px solid #DCDFE6;overflow-x: auto;display: flex;align-items: center;background-color: white;"
|
2021-03-10 16:01:29 +08:00
|
|
|
|
@end="end2"
|
2021-03-03 15:06:52 +08:00
|
|
|
|
>
|
2021-03-10 16:01:29 +08:00
|
|
|
|
<transition-group class="draggable-group">
|
2021-04-27 13:58:25 +08:00
|
|
|
|
<quota-item v-for="(item,index) in view.yaxis" :key="item.id" :index="index" :item="item" @onQuotaItemChange="quotaItemChange" @onQuotaItemRemove="quotaItemRemove" @editItemFilter="showQuotaEditFilter" @onNameEdit="showRename" />
|
2021-03-03 15:06:52 +08:00
|
|
|
|
</transition-group>
|
|
|
|
|
</draggable>
|
|
|
|
|
</el-row>
|
|
|
|
|
</el-row>
|
2021-05-07 19:20:47 +08:00
|
|
|
|
<div ref="imageWrapper" style="height: 100%">
|
2021-05-19 18:03:53 +08:00
|
|
|
|
<chart-component v-if="httpRequest.status && chart.type && !chart.type.includes('table') && !chart.type.includes('text')" :chart-id="chart.id" :chart="chart" class="chart-class" />
|
|
|
|
|
<table-normal v-if="httpRequest.status && chart.type && chart.type.includes('table')" :chart="chart" class="table-class" />
|
|
|
|
|
<label-normal v-if="httpRequest.status && chart.type && chart.type.includes('text')" :chart="chart" class="table-class" />
|
|
|
|
|
<div v-if="!httpRequest.status" style=";width: 100%;height: 100%;background-color: #ece7e7; text-align: center">
|
|
|
|
|
<div style="font-size: 12px; color: #9ea6b2;">
|
|
|
|
|
{{ $t('panel.error_data') }}<br>
|
|
|
|
|
{{ httpRequest.msg }}
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
2021-05-07 19:20:47 +08:00
|
|
|
|
</div>
|
2021-03-03 15:06:52 +08:00
|
|
|
|
</el-row>
|
|
|
|
|
</el-col>
|
|
|
|
|
</el-row>
|
2021-03-25 11:34:46 +08:00
|
|
|
|
|
|
|
|
|
<!--显示名修改-->
|
2021-05-07 11:04:50 +08:00
|
|
|
|
<el-dialog v-dialogDrag :title="$t('chart.show_name_set')" :visible="renameItem" :show-close="false" width="30%">
|
2021-03-25 11:34:46 +08:00
|
|
|
|
<el-form ref="itemForm" :model="itemForm" :rules="itemFormRules">
|
|
|
|
|
<el-form-item :label="$t('commons.name')" prop="name">
|
|
|
|
|
<el-input v-model="itemForm.name" size="mini" clearable />
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</el-form>
|
|
|
|
|
<div slot="footer" class="dialog-footer">
|
|
|
|
|
<el-button size="mini" @click="closeRename()">{{ $t('chart.cancel') }}</el-button>
|
|
|
|
|
<el-button type="primary" size="mini" @click="saveRename">{{ $t('chart.confirm') }}</el-button>
|
|
|
|
|
</div>
|
|
|
|
|
</el-dialog>
|
|
|
|
|
|
|
|
|
|
<!--指标过滤器-->
|
|
|
|
|
<el-dialog
|
2021-05-07 11:04:50 +08:00
|
|
|
|
v-dialogDrag
|
2021-03-25 11:34:46 +08:00
|
|
|
|
:title="$t('chart.add_filter')"
|
2021-04-27 13:58:25 +08:00
|
|
|
|
:visible="quotaFilterEdit"
|
2021-03-25 11:34:46 +08:00
|
|
|
|
:show-close="false"
|
|
|
|
|
width="800px"
|
|
|
|
|
class="dialog-css"
|
|
|
|
|
>
|
|
|
|
|
<quota-filter-editor :item="quotaItem" />
|
|
|
|
|
<div slot="footer" class="dialog-footer">
|
|
|
|
|
<el-button size="mini" @click="closeQuotaFilter">{{ $t('chart.cancel') }}</el-button>
|
|
|
|
|
<el-button type="primary" size="mini" @click="saveQuotaFilter">{{ $t('chart.confirm') }}</el-button>
|
|
|
|
|
</div>
|
|
|
|
|
</el-dialog>
|
2021-04-27 13:58:25 +08:00
|
|
|
|
<el-dialog
|
2021-05-07 11:04:50 +08:00
|
|
|
|
v-dialogDrag
|
2021-04-27 13:58:25 +08:00
|
|
|
|
:title="$t('chart.add_filter')"
|
|
|
|
|
:visible="dimensionFilterEdit"
|
|
|
|
|
:show-close="false"
|
|
|
|
|
width="800px"
|
|
|
|
|
class="dialog-css"
|
|
|
|
|
>
|
|
|
|
|
<dimension-filter-editor :item="dimensionItem" />
|
|
|
|
|
<div slot="footer" class="dialog-footer">
|
|
|
|
|
<el-button size="mini" @click="closeDimensionFilter">{{ $t('chart.cancel') }}</el-button>
|
|
|
|
|
<el-button type="primary" size="mini" @click="saveDimensionFilter">{{ $t('chart.confirm') }}</el-button>
|
|
|
|
|
</div>
|
|
|
|
|
</el-dialog>
|
2021-05-21 16:45:21 +08:00
|
|
|
|
<el-dialog
|
|
|
|
|
v-dialogDrag
|
|
|
|
|
:title="$t('chart.add_filter')"
|
|
|
|
|
:visible="resultFilterEdit"
|
|
|
|
|
:show-close="false"
|
|
|
|
|
width="800px"
|
|
|
|
|
class="dialog-css"
|
|
|
|
|
>
|
|
|
|
|
<result-filter-editor :chart="chartForFilter" />
|
|
|
|
|
<div slot="footer" class="dialog-footer">
|
|
|
|
|
<el-button size="mini" @click="closeResultFilter">{{ $t('chart.cancel') }}</el-button>
|
|
|
|
|
<el-button type="primary" size="mini" @click="saveResultFilter">{{ $t('chart.confirm') }}</el-button>
|
|
|
|
|
</div>
|
|
|
|
|
</el-dialog>
|
2021-03-03 15:06:52 +08:00
|
|
|
|
</el-row>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
<script>
|
2021-05-19 18:03:53 +08:00
|
|
|
|
import { post, ajaxGetData } from '@/api/chart/chart'
|
2021-03-03 15:06:52 +08:00
|
|
|
|
import draggable from 'vuedraggable'
|
2021-03-24 12:30:48 +08:00
|
|
|
|
import DimensionItem from '../components/drag-item/DimensionItem'
|
|
|
|
|
import QuotaItem from '../components/drag-item/QuotaItem'
|
2021-05-21 16:45:21 +08:00
|
|
|
|
import ResultFilterEditor from '../components/filter/ResultFilterEditor'
|
2021-03-19 16:57:52 +08:00
|
|
|
|
import ChartComponent from '../components/ChartComponent'
|
2021-04-01 18:36:51 +08:00
|
|
|
|
import bus from '@/utils/bus'
|
2021-04-15 11:55:30 +08:00
|
|
|
|
import DatasetChartDetail from '../../dataset/common/DatasetChartDetail'
|
2021-04-01 18:36:51 +08:00
|
|
|
|
|
2021-03-22 13:44:07 +08:00
|
|
|
|
// shape attr,component style
|
2021-03-23 14:32:39 +08:00
|
|
|
|
import {
|
|
|
|
|
DEFAULT_COLOR_CASE,
|
|
|
|
|
DEFAULT_SIZE,
|
|
|
|
|
DEFAULT_TITLE_STYLE,
|
|
|
|
|
DEFAULT_LEGEND_STYLE,
|
|
|
|
|
DEFAULT_LABEL,
|
2021-03-24 13:32:29 +08:00
|
|
|
|
DEFAULT_TOOLTIP,
|
|
|
|
|
DEFAULT_XAXIS_STYLE,
|
|
|
|
|
DEFAULT_YAXIS_STYLE,
|
|
|
|
|
DEFAULT_BACKGROUND_COLOR
|
2021-03-23 14:32:39 +08:00
|
|
|
|
} from '../chart/chart'
|
2021-03-24 12:30:48 +08:00
|
|
|
|
import ColorSelector from '../components/shape-attr/ColorSelector'
|
|
|
|
|
import SizeSelector from '../components/shape-attr/SizeSelector'
|
|
|
|
|
import LabelSelector from '../components/shape-attr/LabelSelector'
|
|
|
|
|
import TitleSelector from '../components/component-style/TitleSelector'
|
|
|
|
|
import LegendSelector from '../components/component-style/LegendSelector'
|
|
|
|
|
import TooltipSelector from '../components/shape-attr/TooltipSelector'
|
|
|
|
|
import XAxisSelector from '../components/component-style/XAxisSelector'
|
|
|
|
|
import YAxisSelector from '../components/component-style/YAxisSelector'
|
2021-03-24 13:32:29 +08:00
|
|
|
|
import BackgroundColorSelector from '../components/component-style/BackgroundColorSelector'
|
2021-03-25 11:34:46 +08:00
|
|
|
|
import QuotaFilterEditor from '../components/filter/QuotaFilterEditor'
|
2021-04-27 13:58:25 +08:00
|
|
|
|
import DimensionFilterEditor from '../components/filter/DimensionFilterEditor'
|
2021-04-25 18:03:13 +08:00
|
|
|
|
import TableNormal from '../components/table/TableNormal'
|
2021-05-17 12:14:27 +08:00
|
|
|
|
import LabelNormal from '../components/normal/LabelNormal'
|
2021-05-07 19:20:47 +08:00
|
|
|
|
import html2canvas from 'html2canvas'
|
2021-03-03 15:06:52 +08:00
|
|
|
|
|
|
|
|
|
export default {
|
|
|
|
|
name: 'ChartEdit',
|
2021-05-21 16:45:21 +08:00
|
|
|
|
components: { ResultFilterEditor, LabelNormal, DimensionFilterEditor, TableNormal, DatasetChartDetail, QuotaFilterEditor, BackgroundColorSelector, XAxisSelector, YAxisSelector, TooltipSelector, LabelSelector, LegendSelector, TitleSelector, SizeSelector, ColorSelector, ChartComponent, QuotaItem, DimensionItem, draggable },
|
2021-04-23 12:12:37 +08:00
|
|
|
|
props: {
|
|
|
|
|
param: {
|
|
|
|
|
type: Object,
|
|
|
|
|
required: true
|
|
|
|
|
}
|
|
|
|
|
},
|
2021-03-03 15:06:52 +08:00
|
|
|
|
data() {
|
|
|
|
|
return {
|
2021-05-20 12:01:19 +08:00
|
|
|
|
loading: false,
|
2021-03-03 15:06:52 +08:00
|
|
|
|
table: {},
|
|
|
|
|
dimension: [],
|
|
|
|
|
quota: [],
|
|
|
|
|
view: {
|
|
|
|
|
xaxis: [],
|
|
|
|
|
yaxis: [],
|
|
|
|
|
show: true,
|
|
|
|
|
type: 'bar',
|
2021-03-17 16:12:30 +08:00
|
|
|
|
title: '',
|
|
|
|
|
customAttr: {
|
2021-03-19 14:28:38 +08:00
|
|
|
|
color: DEFAULT_COLOR_CASE,
|
2021-03-23 14:32:39 +08:00
|
|
|
|
size: DEFAULT_SIZE,
|
|
|
|
|
label: DEFAULT_LABEL,
|
|
|
|
|
tooltip: DEFAULT_TOOLTIP
|
2021-03-22 13:44:07 +08:00
|
|
|
|
},
|
|
|
|
|
customStyle: {
|
|
|
|
|
text: DEFAULT_TITLE_STYLE,
|
2021-03-24 13:32:29 +08:00
|
|
|
|
legend: DEFAULT_LEGEND_STYLE,
|
|
|
|
|
xAxis: DEFAULT_XAXIS_STYLE,
|
|
|
|
|
yAxis: DEFAULT_YAXIS_STYLE,
|
|
|
|
|
background: DEFAULT_BACKGROUND_COLOR
|
2021-03-24 12:30:48 +08:00
|
|
|
|
},
|
|
|
|
|
customFilter: []
|
2021-03-03 15:06:52 +08:00
|
|
|
|
},
|
2021-03-11 15:06:13 +08:00
|
|
|
|
moveId: -1,
|
2021-03-19 16:57:52 +08:00
|
|
|
|
chart: {
|
|
|
|
|
id: 'echart'
|
2021-03-25 11:34:46 +08:00
|
|
|
|
},
|
2021-04-27 13:58:25 +08:00
|
|
|
|
dimensionFilterEdit: false,
|
|
|
|
|
dimensionItem: {},
|
|
|
|
|
quotaFilterEdit: false,
|
2021-03-25 11:34:46 +08:00
|
|
|
|
quotaItem: {},
|
2021-05-21 16:45:21 +08:00
|
|
|
|
resultFilterEdit: false,
|
|
|
|
|
chartForFilter: {},
|
2021-03-25 11:34:46 +08:00
|
|
|
|
renameItem: false,
|
|
|
|
|
itemForm: {
|
|
|
|
|
name: ''
|
|
|
|
|
},
|
|
|
|
|
itemFormRules: {
|
|
|
|
|
name: [
|
2021-05-19 18:21:07 +08:00
|
|
|
|
{ required: true, message: this.$t('commons.input_content'), trigger: 'change' },
|
|
|
|
|
{ max: 50, message: this.$t('commons.char_can_not_more_50'), trigger: 'change' }
|
2021-03-25 11:34:46 +08:00
|
|
|
|
]
|
2021-04-15 11:55:30 +08:00
|
|
|
|
},
|
2021-05-06 15:34:03 +08:00
|
|
|
|
tabStatus: false,
|
2021-05-19 18:03:53 +08:00
|
|
|
|
data: {},
|
|
|
|
|
httpRequest: {
|
|
|
|
|
status: true,
|
|
|
|
|
msg: ''
|
|
|
|
|
}
|
2021-03-03 15:06:52 +08:00
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
computed: {
|
2021-04-23 12:12:37 +08:00
|
|
|
|
// vId() {
|
|
|
|
|
// // console.log(this.$store.state.chart.viewId);
|
|
|
|
|
// this.getData(this.$store.state.chart.viewId)
|
|
|
|
|
// return this.$store.state.chart.viewId
|
|
|
|
|
// }
|
2021-03-03 15:06:52 +08:00
|
|
|
|
|
|
|
|
|
},
|
2021-03-10 18:23:25 +08:00
|
|
|
|
watch: {
|
2021-04-23 12:12:37 +08:00
|
|
|
|
'param': function() {
|
|
|
|
|
this.getData(this.param.id)
|
|
|
|
|
}
|
2021-03-10 18:23:25 +08:00
|
|
|
|
},
|
2021-03-03 15:06:52 +08:00
|
|
|
|
created() {
|
|
|
|
|
// this.get(this.$store.state.chart.viewId);
|
|
|
|
|
},
|
|
|
|
|
mounted() {
|
|
|
|
|
// this.get(this.$store.state.chart.viewId);
|
2021-04-23 12:12:37 +08:00
|
|
|
|
this.getData(this.param.id)
|
2021-03-03 15:06:52 +08:00
|
|
|
|
// this.myEcharts();
|
|
|
|
|
},
|
|
|
|
|
activated() {
|
|
|
|
|
},
|
|
|
|
|
methods: {
|
2021-03-29 16:50:32 +08:00
|
|
|
|
initTableData(id) {
|
2021-03-03 15:06:52 +08:00
|
|
|
|
if (id != null) {
|
2021-03-29 16:50:32 +08:00
|
|
|
|
post('/dataset/table/get/' + id, null).then(response => {
|
2021-03-03 15:06:52 +08:00
|
|
|
|
this.table = response.data
|
|
|
|
|
this.initTableField(id)
|
2021-05-19 18:03:53 +08:00
|
|
|
|
}).catch(err => {
|
|
|
|
|
this.resetView()
|
|
|
|
|
this.httpRequest.status = false
|
|
|
|
|
this.httpRequest.msg = err
|
|
|
|
|
return true
|
2021-03-03 15:06:52 +08:00
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
},
|
2021-03-29 16:50:32 +08:00
|
|
|
|
initTableField(id) {
|
|
|
|
|
post('/dataset/table/getFieldsFromDE', this.table).then(response => {
|
2021-03-03 15:06:52 +08:00
|
|
|
|
this.dimension = response.data.dimension
|
|
|
|
|
this.quota = response.data.quota
|
2021-05-19 18:03:53 +08:00
|
|
|
|
}).catch(err => {
|
|
|
|
|
this.resetView()
|
|
|
|
|
this.httpRequest.status = false
|
|
|
|
|
this.httpRequest.msg = err
|
|
|
|
|
return true
|
2021-03-03 15:06:52 +08:00
|
|
|
|
})
|
|
|
|
|
},
|
2021-05-28 15:45:47 +08:00
|
|
|
|
save(getData, trigger) {
|
2021-03-03 15:06:52 +08:00
|
|
|
|
const view = JSON.parse(JSON.stringify(this.view))
|
|
|
|
|
view.id = this.view.id
|
2021-03-26 12:41:39 +08:00
|
|
|
|
view.sceneId = this.view.sceneId
|
2021-04-08 13:41:29 +08:00
|
|
|
|
view.name = this.view.name ? this.view.name : this.table.name
|
2021-05-19 15:13:59 +08:00
|
|
|
|
if (view.title.length > 50) {
|
|
|
|
|
this.$warning(this.$t('chart.title_limit'))
|
|
|
|
|
return
|
|
|
|
|
}
|
2021-03-26 12:41:39 +08:00
|
|
|
|
view.tableId = this.view.tableId
|
2021-04-27 13:58:25 +08:00
|
|
|
|
view.xaxis.forEach(function(ele) {
|
|
|
|
|
// if (!ele.summary || ele.summary === '') {
|
|
|
|
|
// ele.summary = 'sum'
|
|
|
|
|
// }
|
2021-06-01 15:44:33 +08:00
|
|
|
|
if (!ele.dateStyle || ele.dateStyle === '') {
|
|
|
|
|
ele.dateStyle = 'y_M_d'
|
|
|
|
|
}
|
|
|
|
|
if (!ele.datePattern || ele.datePattern === '') {
|
|
|
|
|
ele.datePattern = 'date_sub'
|
|
|
|
|
}
|
2021-04-27 13:58:25 +08:00
|
|
|
|
if (!ele.sort || ele.sort === '') {
|
|
|
|
|
ele.sort = 'none'
|
|
|
|
|
}
|
|
|
|
|
if (!ele.filter) {
|
|
|
|
|
ele.filter = []
|
|
|
|
|
}
|
|
|
|
|
})
|
2021-03-11 14:33:24 +08:00
|
|
|
|
view.yaxis.forEach(function(ele) {
|
|
|
|
|
if (!ele.summary || ele.summary === '') {
|
2021-04-25 15:10:49 +08:00
|
|
|
|
if (ele.id === 'count') {
|
|
|
|
|
ele.summary = 'count'
|
|
|
|
|
} else {
|
|
|
|
|
ele.summary = 'sum'
|
|
|
|
|
}
|
2021-03-11 14:33:24 +08:00
|
|
|
|
}
|
2021-03-23 18:08:56 +08:00
|
|
|
|
if (!ele.sort || ele.sort === '') {
|
|
|
|
|
ele.sort = 'none'
|
|
|
|
|
}
|
2021-03-25 11:34:46 +08:00
|
|
|
|
if (!ele.filter) {
|
|
|
|
|
ele.filter = []
|
|
|
|
|
}
|
2021-03-11 14:33:24 +08:00
|
|
|
|
})
|
2021-03-18 17:20:59 +08:00
|
|
|
|
if (view.type.startsWith('pie') || view.type.startsWith('funnel')) {
|
|
|
|
|
if (view.yaxis.length > 1) {
|
|
|
|
|
view.yaxis.splice(1, view.yaxis.length)
|
|
|
|
|
}
|
|
|
|
|
}
|
2021-05-28 15:45:47 +08:00
|
|
|
|
if (view.type === 'line' && trigger === 'chart') {
|
|
|
|
|
view.customAttr.size.lineArea = false
|
|
|
|
|
}
|
|
|
|
|
if (view.type === 'line-stack' && trigger === 'chart') {
|
|
|
|
|
view.customAttr.size.lineArea = true
|
|
|
|
|
}
|
2021-03-03 15:06:52 +08:00
|
|
|
|
view.xaxis = JSON.stringify(view.xaxis)
|
|
|
|
|
view.yaxis = JSON.stringify(view.yaxis)
|
2021-03-17 16:12:30 +08:00
|
|
|
|
view.customAttr = JSON.stringify(view.customAttr)
|
2021-03-22 13:44:07 +08:00
|
|
|
|
view.customStyle = JSON.stringify(view.customStyle)
|
2021-03-24 12:30:48 +08:00
|
|
|
|
view.customFilter = JSON.stringify(view.customFilter)
|
2021-03-03 18:35:51 +08:00
|
|
|
|
post('/chart/view/save', view).then(response => {
|
2021-03-03 15:06:52 +08:00
|
|
|
|
// this.get(response.data.id);
|
2021-05-06 15:34:03 +08:00
|
|
|
|
// this.getData(response.data.id)
|
|
|
|
|
|
|
|
|
|
if (getData) {
|
|
|
|
|
this.getData(response.data.id)
|
|
|
|
|
} else {
|
|
|
|
|
this.getChart(response.data.id)
|
|
|
|
|
}
|
|
|
|
|
|
2021-03-03 21:08:39 +08:00
|
|
|
|
this.$store.dispatch('chart/setChartSceneData', null)
|
2021-04-29 18:00:05 +08:00
|
|
|
|
this.$store.dispatch('chart/setChartSceneData', response.data)
|
2021-03-03 15:06:52 +08:00
|
|
|
|
})
|
|
|
|
|
},
|
2021-05-20 12:01:19 +08:00
|
|
|
|
|
|
|
|
|
saveSnapshot() {
|
2021-05-19 18:10:25 +08:00
|
|
|
|
if (this.view.title && this.view.title.length > 50) {
|
2021-05-19 15:13:59 +08:00
|
|
|
|
this.$warning(this.$t('chart.title_limit'))
|
|
|
|
|
return
|
|
|
|
|
}
|
2021-05-20 12:01:19 +08:00
|
|
|
|
if (this.loading) {
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
this.loading = true
|
2021-05-08 00:04:24 +08:00
|
|
|
|
html2canvas(this.$refs.imageWrapper).then(canvas => {
|
|
|
|
|
const snapshot = canvas.toDataURL('image/jpeg', 0.1) // 0.1是图片质量
|
|
|
|
|
if (snapshot !== '') {
|
|
|
|
|
const view = JSON.parse(JSON.stringify(this.view))
|
|
|
|
|
view.id = this.view.id
|
|
|
|
|
view.sceneId = this.view.sceneId
|
|
|
|
|
view.name = this.view.name ? this.view.name : this.table.name
|
|
|
|
|
view.tableId = this.view.tableId
|
|
|
|
|
view.xaxis.forEach(function(ele) {
|
|
|
|
|
// if (!ele.summary || ele.summary === '') {
|
|
|
|
|
// ele.summary = 'sum'
|
|
|
|
|
// }
|
|
|
|
|
if (!ele.sort || ele.sort === '') {
|
|
|
|
|
ele.sort = 'none'
|
|
|
|
|
}
|
|
|
|
|
if (!ele.filter) {
|
|
|
|
|
ele.filter = []
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
view.yaxis.forEach(function(ele) {
|
|
|
|
|
if (!ele.summary || ele.summary === '') {
|
|
|
|
|
if (ele.id === 'count') {
|
|
|
|
|
ele.summary = 'count'
|
|
|
|
|
} else {
|
|
|
|
|
ele.summary = 'sum'
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if (!ele.sort || ele.sort === '') {
|
|
|
|
|
ele.sort = 'none'
|
|
|
|
|
}
|
|
|
|
|
if (!ele.filter) {
|
|
|
|
|
ele.filter = []
|
|
|
|
|
}
|
|
|
|
|
})
|
2021-05-14 18:55:53 +08:00
|
|
|
|
if (view.type.startsWith('pie') || view.type.startsWith('funnel') || view.type.startsWith('gauge')) {
|
2021-05-08 00:04:24 +08:00
|
|
|
|
if (view.yaxis.length > 1) {
|
|
|
|
|
view.yaxis.splice(1, view.yaxis.length)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
view.xaxis = JSON.stringify(view.xaxis)
|
|
|
|
|
view.yaxis = JSON.stringify(view.yaxis)
|
|
|
|
|
view.customAttr = JSON.stringify(view.customAttr)
|
|
|
|
|
view.customStyle = JSON.stringify(view.customStyle)
|
|
|
|
|
view.customFilter = JSON.stringify(view.customFilter)
|
|
|
|
|
view.snapshot = snapshot
|
2021-05-20 12:01:19 +08:00
|
|
|
|
post('/chart/view/save', view).then(response => {
|
|
|
|
|
this.loading = false
|
|
|
|
|
this.$success(this.$t('commons.save_success'))
|
|
|
|
|
})
|
2021-05-08 00:04:24 +08:00
|
|
|
|
}
|
|
|
|
|
})
|
2021-05-20 12:01:19 +08:00
|
|
|
|
},
|
|
|
|
|
closeEdit() {
|
|
|
|
|
if (this.view.title && this.view.title.length > 50) {
|
|
|
|
|
this.$warning(this.$t('chart.title_limit'))
|
|
|
|
|
return
|
|
|
|
|
}
|
2021-05-28 11:21:54 +08:00
|
|
|
|
// 从仪表板入口关闭
|
2021-04-01 18:36:51 +08:00
|
|
|
|
bus.$emit('PanelSwitchComponent', { name: 'PanelEdit' })
|
2021-03-10 18:23:25 +08:00
|
|
|
|
this.$emit('switchComponent', { name: '' })
|
|
|
|
|
},
|
2021-03-29 16:50:32 +08:00
|
|
|
|
getData(id) {
|
2021-03-03 15:06:52 +08:00
|
|
|
|
if (id) {
|
2021-05-19 18:03:53 +08:00
|
|
|
|
ajaxGetData(id, {
|
2021-04-19 11:44:21 +08:00
|
|
|
|
filter: []
|
|
|
|
|
}).then(response => {
|
2021-03-26 12:41:39 +08:00
|
|
|
|
this.initTableData(response.data.tableId)
|
2021-03-18 10:08:12 +08:00
|
|
|
|
this.view = JSON.parse(JSON.stringify(response.data))
|
2021-03-03 15:06:52 +08:00
|
|
|
|
this.view.xaxis = this.view.xaxis ? JSON.parse(this.view.xaxis) : []
|
|
|
|
|
this.view.yaxis = this.view.yaxis ? JSON.parse(this.view.yaxis) : []
|
2021-03-17 16:12:30 +08:00
|
|
|
|
this.view.customAttr = this.view.customAttr ? JSON.parse(this.view.customAttr) : {}
|
2021-03-22 13:44:07 +08:00
|
|
|
|
this.view.customStyle = this.view.customStyle ? JSON.parse(this.view.customStyle) : {}
|
2021-03-24 12:30:48 +08:00
|
|
|
|
this.view.customFilter = this.view.customFilter ? JSON.parse(this.view.customFilter) : {}
|
2021-03-11 15:06:13 +08:00
|
|
|
|
// 将视图传入echart组件
|
|
|
|
|
this.chart = response.data
|
2021-05-06 15:34:03 +08:00
|
|
|
|
this.data = response.data.data
|
|
|
|
|
// console.log(JSON.stringify(this.chart))
|
2021-05-19 18:03:53 +08:00
|
|
|
|
this.httpRequest.status = true
|
|
|
|
|
}).catch(err => {
|
|
|
|
|
this.resetView()
|
|
|
|
|
this.httpRequest.status = false
|
|
|
|
|
this.httpRequest.msg = err
|
|
|
|
|
return true
|
2021-05-06 15:34:03 +08:00
|
|
|
|
})
|
|
|
|
|
} else {
|
|
|
|
|
this.view = {}
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
getChart(id) {
|
|
|
|
|
if (id) {
|
|
|
|
|
post('/chart/view/get/' + id, {}).then(response => {
|
|
|
|
|
this.initTableData(response.data.tableId)
|
|
|
|
|
this.view = JSON.parse(JSON.stringify(response.data))
|
|
|
|
|
this.view.xaxis = this.view.xaxis ? JSON.parse(this.view.xaxis) : []
|
|
|
|
|
this.view.yaxis = this.view.yaxis ? JSON.parse(this.view.yaxis) : []
|
|
|
|
|
this.view.customAttr = this.view.customAttr ? JSON.parse(this.view.customAttr) : {}
|
|
|
|
|
this.view.customStyle = this.view.customStyle ? JSON.parse(this.view.customStyle) : {}
|
|
|
|
|
this.view.customFilter = this.view.customFilter ? JSON.parse(this.view.customFilter) : {}
|
|
|
|
|
|
|
|
|
|
response.data.data = this.data
|
|
|
|
|
this.chart = response.data
|
2021-05-19 18:03:53 +08:00
|
|
|
|
|
|
|
|
|
this.httpRequest.status = true
|
|
|
|
|
}).catch(err => {
|
|
|
|
|
this.resetView()
|
|
|
|
|
this.httpRequest.status = false
|
|
|
|
|
this.httpRequest.msg = err
|
|
|
|
|
return true
|
2021-03-03 15:06:52 +08:00
|
|
|
|
})
|
|
|
|
|
} else {
|
|
|
|
|
this.view = {}
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
// 左边往右边拖动时的事件
|
2021-03-10 16:01:29 +08:00
|
|
|
|
start1(e) {
|
2021-05-06 15:34:03 +08:00
|
|
|
|
// console.log(e)
|
2021-03-10 16:01:29 +08:00
|
|
|
|
e.clone.className = 'item-on-move'
|
|
|
|
|
e.item.className = 'item-on-move'
|
|
|
|
|
},
|
2021-03-03 15:06:52 +08:00
|
|
|
|
end1(e) {
|
2021-05-06 15:34:03 +08:00
|
|
|
|
// console.log(e)
|
2021-03-10 16:01:29 +08:00
|
|
|
|
e.clone.className = 'item'
|
|
|
|
|
e.item.className = 'item'
|
|
|
|
|
this.refuseMove(e)
|
2021-03-10 18:23:25 +08:00
|
|
|
|
this.removeCheckedKey(e)
|
2021-05-06 15:34:03 +08:00
|
|
|
|
this.save(true)
|
2021-03-10 16:01:29 +08:00
|
|
|
|
},
|
2021-03-12 17:49:41 +08:00
|
|
|
|
// 右边往左边拖动时的事件
|
2021-03-10 16:01:29 +08:00
|
|
|
|
start2(e) {
|
2021-05-06 15:34:03 +08:00
|
|
|
|
// console.log(e)
|
2021-03-03 15:06:52 +08:00
|
|
|
|
},
|
|
|
|
|
end2(e) {
|
2021-05-06 15:34:03 +08:00
|
|
|
|
// console.log(e)
|
2021-03-10 16:01:29 +08:00
|
|
|
|
this.removeDuplicateKey(e)
|
2021-05-06 15:34:03 +08:00
|
|
|
|
this.save(true)
|
2021-03-10 18:23:25 +08:00
|
|
|
|
},
|
|
|
|
|
removeCheckedKey(e) {
|
|
|
|
|
const that = this
|
|
|
|
|
const xItems = this.view.xaxis.filter(function(m) {
|
|
|
|
|
return m.id === that.moveId
|
|
|
|
|
})
|
|
|
|
|
const yItems = this.view.yaxis.filter(function(m) {
|
|
|
|
|
return m.id === that.moveId
|
|
|
|
|
})
|
|
|
|
|
if (xItems && xItems.length > 1) {
|
|
|
|
|
this.view.xaxis.splice(e.newDraggableIndex, 1)
|
|
|
|
|
}
|
|
|
|
|
if (yItems && yItems.length > 1) {
|
|
|
|
|
this.view.yaxis.splice(e.newDraggableIndex, 1)
|
|
|
|
|
}
|
2021-03-03 15:06:52 +08:00
|
|
|
|
},
|
2021-03-10 16:01:29 +08:00
|
|
|
|
refuseMove(e) {
|
|
|
|
|
const that = this
|
|
|
|
|
const xItems = this.dimension.filter(function(m) {
|
|
|
|
|
return m.id === that.moveId
|
|
|
|
|
})
|
|
|
|
|
const yItems = this.quota.filter(function(m) {
|
|
|
|
|
return m.id === that.moveId
|
|
|
|
|
})
|
2021-03-10 18:23:25 +08:00
|
|
|
|
if (xItems && xItems.length > 1) {
|
|
|
|
|
this.dimension.splice(e.newDraggableIndex, 1)
|
2021-03-10 16:01:29 +08:00
|
|
|
|
}
|
2021-03-10 18:23:25 +08:00
|
|
|
|
if (yItems && yItems.length > 1) {
|
|
|
|
|
this.quota.splice(e.newDraggableIndex, 1)
|
2021-03-10 16:01:29 +08:00
|
|
|
|
}
|
2021-03-03 15:06:52 +08:00
|
|
|
|
},
|
2021-03-10 16:01:29 +08:00
|
|
|
|
removeDuplicateKey(e) {
|
|
|
|
|
const that = this
|
|
|
|
|
const xItems = this.dimension.filter(function(m) {
|
|
|
|
|
return m.id === that.moveId
|
|
|
|
|
})
|
|
|
|
|
const yItems = this.quota.filter(function(m) {
|
|
|
|
|
return m.id === that.moveId
|
|
|
|
|
})
|
2021-03-22 18:27:53 +08:00
|
|
|
|
if (xItems && xItems.length > 1) {
|
2021-03-10 16:01:29 +08:00
|
|
|
|
this.dimension.splice(e.newDraggableIndex, 1)
|
|
|
|
|
}
|
2021-03-22 18:27:53 +08:00
|
|
|
|
if (yItems && yItems.length > 1) {
|
2021-03-10 16:01:29 +08:00
|
|
|
|
this.quota.splice(e.newDraggableIndex, 1)
|
|
|
|
|
}
|
2021-03-03 15:06:52 +08:00
|
|
|
|
},
|
|
|
|
|
// move回调方法
|
|
|
|
|
onMove(e, originalEvent) {
|
2021-05-06 15:34:03 +08:00
|
|
|
|
// console.log(e)
|
2021-03-10 16:01:29 +08:00
|
|
|
|
this.moveId = e.draggedContext.element.id
|
2021-03-03 15:06:52 +08:00
|
|
|
|
// //不允许停靠
|
|
|
|
|
// if (e.relatedContext.element.id == 1) return false;
|
|
|
|
|
// //不允许拖拽
|
|
|
|
|
// if (e.draggedContext.element.id == 4) return false;
|
|
|
|
|
// if (e.draggedContext.element.id == 11) return false;
|
|
|
|
|
return true
|
|
|
|
|
},
|
|
|
|
|
|
2021-03-23 15:31:57 +08:00
|
|
|
|
dimensionItemChange(item) {
|
2021-05-06 15:34:03 +08:00
|
|
|
|
this.save(true)
|
2021-03-23 15:31:57 +08:00
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
dimensionItemRemove(item) {
|
|
|
|
|
this.view.xaxis.splice(item.index, 1)
|
2021-05-06 15:34:03 +08:00
|
|
|
|
this.save(true)
|
2021-03-23 15:31:57 +08:00
|
|
|
|
},
|
|
|
|
|
|
2021-03-16 13:32:35 +08:00
|
|
|
|
quotaItemChange(item) {
|
2021-03-11 14:33:24 +08:00
|
|
|
|
// 更新item
|
2021-03-16 13:32:35 +08:00
|
|
|
|
// this.view.yaxis.forEach(function(ele) {
|
|
|
|
|
// if (ele.id === item.id) {
|
|
|
|
|
// ele.summary = item.summary
|
|
|
|
|
// }
|
|
|
|
|
// })
|
2021-05-06 15:34:03 +08:00
|
|
|
|
this.save(true)
|
2021-03-17 16:12:30 +08:00
|
|
|
|
},
|
|
|
|
|
|
2021-03-23 15:31:57 +08:00
|
|
|
|
quotaItemRemove(item) {
|
|
|
|
|
this.view.yaxis.splice(item.index, 1)
|
2021-05-06 15:34:03 +08:00
|
|
|
|
this.save(true)
|
2021-03-23 15:31:57 +08:00
|
|
|
|
},
|
|
|
|
|
|
2021-03-17 16:12:30 +08:00
|
|
|
|
onColorChange(val) {
|
|
|
|
|
this.view.customAttr.color = val
|
|
|
|
|
this.save()
|
2021-03-19 14:28:38 +08:00
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
onSizeChange(val) {
|
|
|
|
|
this.view.customAttr.size = val
|
|
|
|
|
this.save()
|
2021-03-22 13:44:07 +08:00
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
onTextChange(val) {
|
|
|
|
|
this.view.customStyle.text = val
|
2021-05-31 16:20:28 +08:00
|
|
|
|
this.view.title = val.title
|
2021-03-22 13:44:07 +08:00
|
|
|
|
this.save()
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
onLegendChange(val) {
|
|
|
|
|
this.view.customStyle.legend = val
|
|
|
|
|
this.save()
|
2021-03-23 14:32:39 +08:00
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
onLabelChange(val) {
|
|
|
|
|
this.view.customAttr.label = val
|
|
|
|
|
this.save()
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
onTooltipChange(val) {
|
|
|
|
|
this.view.customAttr.tooltip = val
|
|
|
|
|
this.save()
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
onChangeXAxisForm(val) {
|
|
|
|
|
this.view.customStyle.xAxis = val
|
|
|
|
|
this.save()
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
onChangeYAxisForm(val) {
|
|
|
|
|
this.view.customStyle.yAxis = val
|
|
|
|
|
this.save()
|
2021-03-24 13:32:29 +08:00
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
onChangeBackgroundForm(val) {
|
|
|
|
|
this.view.customStyle.background = val
|
|
|
|
|
this.save()
|
2021-03-25 11:34:46 +08:00
|
|
|
|
},
|
|
|
|
|
|
2021-04-27 13:58:25 +08:00
|
|
|
|
showDimensionEditFilter(item) {
|
|
|
|
|
this.dimensionItem = JSON.parse(JSON.stringify(item))
|
|
|
|
|
this.dimensionFilterEdit = true
|
|
|
|
|
},
|
|
|
|
|
closeDimensionFilter() {
|
|
|
|
|
this.dimensionFilterEdit = false
|
|
|
|
|
},
|
|
|
|
|
saveDimensionFilter() {
|
|
|
|
|
this.view.xaxis[this.dimensionItem.index].filter = this.dimensionItem.filter
|
2021-05-06 15:34:03 +08:00
|
|
|
|
this.save(true)
|
2021-04-27 13:58:25 +08:00
|
|
|
|
this.closeDimensionFilter()
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
showQuotaEditFilter(item) {
|
2021-03-25 11:34:46 +08:00
|
|
|
|
this.quotaItem = JSON.parse(JSON.stringify(item))
|
2021-04-27 13:58:25 +08:00
|
|
|
|
this.quotaFilterEdit = true
|
2021-03-25 11:34:46 +08:00
|
|
|
|
},
|
|
|
|
|
closeQuotaFilter() {
|
2021-04-27 13:58:25 +08:00
|
|
|
|
this.quotaFilterEdit = false
|
2021-03-25 11:34:46 +08:00
|
|
|
|
},
|
|
|
|
|
saveQuotaFilter() {
|
|
|
|
|
this.view.yaxis[this.quotaItem.index].filter = this.quotaItem.filter
|
2021-05-06 15:34:03 +08:00
|
|
|
|
this.save(true)
|
2021-03-25 11:34:46 +08:00
|
|
|
|
this.closeQuotaFilter()
|
|
|
|
|
},
|
|
|
|
|
|
2021-05-21 16:45:21 +08:00
|
|
|
|
showResultFilter() {
|
|
|
|
|
this.chartForFilter = JSON.parse(JSON.stringify(this.view))
|
|
|
|
|
this.resultFilterEdit = true
|
|
|
|
|
},
|
|
|
|
|
closeResultFilter() {
|
|
|
|
|
this.resultFilterEdit = false
|
|
|
|
|
},
|
|
|
|
|
saveResultFilter() {
|
2021-05-21 16:58:39 +08:00
|
|
|
|
for (let i = 0; i < this.chartForFilter.customFilter.length; i++) {
|
|
|
|
|
const f = this.chartForFilter.customFilter[i]
|
|
|
|
|
if (!f.fieldId || f.fieldId === '') {
|
|
|
|
|
this.$message({
|
|
|
|
|
message: this.$t('chart.filter_field_can_null'),
|
|
|
|
|
type: 'error',
|
|
|
|
|
showClose: true
|
|
|
|
|
})
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
}
|
2021-05-21 16:45:21 +08:00
|
|
|
|
this.view.customFilter = this.chartForFilter.customFilter
|
|
|
|
|
this.save(true)
|
|
|
|
|
this.closeResultFilter()
|
|
|
|
|
},
|
|
|
|
|
|
2021-03-25 11:34:46 +08:00
|
|
|
|
showRename(val) {
|
|
|
|
|
this.itemForm = JSON.parse(JSON.stringify(val))
|
|
|
|
|
this.renameItem = true
|
|
|
|
|
},
|
|
|
|
|
saveRename() {
|
2021-05-19 18:21:07 +08:00
|
|
|
|
this.$refs['itemForm'].validate((valid) => {
|
|
|
|
|
if (valid) {
|
|
|
|
|
if (this.itemForm.renameType === 'quota') {
|
|
|
|
|
this.view.yaxis[this.itemForm.index].name = this.itemForm.name
|
|
|
|
|
} else if (this.itemForm.renameType === 'dimension') {
|
|
|
|
|
this.view.xaxis[this.itemForm.index].name = this.itemForm.name
|
|
|
|
|
}
|
|
|
|
|
this.save(true)
|
|
|
|
|
this.closeRename()
|
|
|
|
|
} else {
|
|
|
|
|
return false
|
|
|
|
|
}
|
|
|
|
|
})
|
2021-03-25 11:34:46 +08:00
|
|
|
|
},
|
|
|
|
|
closeRename() {
|
|
|
|
|
this.renameItem = false
|
|
|
|
|
this.resetRename()
|
|
|
|
|
},
|
|
|
|
|
resetRename() {
|
2021-03-25 12:43:19 +08:00
|
|
|
|
// this.itemForm = {}
|
2021-04-15 11:55:30 +08:00
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
showTab() {
|
|
|
|
|
this.tabStatus = true
|
|
|
|
|
},
|
|
|
|
|
hideTab() {
|
|
|
|
|
this.tabStatus = false
|
2021-05-19 18:03:53 +08:00
|
|
|
|
},
|
|
|
|
|
resetView() {
|
|
|
|
|
this.dimension = []
|
|
|
|
|
this.quota = []
|
|
|
|
|
this.view = {
|
|
|
|
|
xAxis: [],
|
|
|
|
|
yAxis: [],
|
|
|
|
|
type: ''
|
|
|
|
|
}
|
2021-03-03 15:06:52 +08:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
</script>
|
|
|
|
|
|
2021-03-26 12:14:18 +08:00
|
|
|
|
<style scoped>
|
2021-03-03 15:06:52 +08:00
|
|
|
|
.padding-lr {
|
|
|
|
|
padding: 0 6px;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.itxst {
|
|
|
|
|
margin: 10px;
|
|
|
|
|
text-align: left;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.col {
|
|
|
|
|
width: 40%;
|
|
|
|
|
flex: 1;
|
|
|
|
|
padding: 10px;
|
|
|
|
|
border: solid 1px #eee;
|
|
|
|
|
border-radius: 5px;
|
|
|
|
|
float: left;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.col + .col {
|
|
|
|
|
margin-left: 10px;
|
|
|
|
|
}
|
|
|
|
|
|
2021-03-25 12:43:19 +08:00
|
|
|
|
.view-panel {
|
|
|
|
|
display: flex;
|
|
|
|
|
height: calc(100% - 40px);
|
2021-04-08 17:04:14 +08:00
|
|
|
|
background-color: #f7f8fa;
|
2021-03-25 12:43:19 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.drag-list {
|
|
|
|
|
height: calc(100% - 26px);
|
|
|
|
|
overflow:auto;
|
|
|
|
|
}
|
|
|
|
|
|
2021-03-03 15:06:52 +08:00
|
|
|
|
.item {
|
2021-03-15 12:25:11 +08:00
|
|
|
|
padding: 2px 10px;
|
|
|
|
|
margin: 2px 2px 0 2px;
|
2021-03-03 15:06:52 +08:00
|
|
|
|
border: solid 1px #eee;
|
|
|
|
|
text-align: left;
|
2021-03-10 16:01:29 +08:00
|
|
|
|
color: #606266;
|
2021-03-24 12:30:48 +08:00
|
|
|
|
/*background-color: rgba(35,46,64,.05);*/
|
|
|
|
|
background-color: white;
|
2021-03-08 11:35:28 +08:00
|
|
|
|
display: block;
|
2021-05-24 14:59:41 +08:00
|
|
|
|
word-break: break-all;
|
|
|
|
|
white-space: normal;
|
2021-03-03 15:06:52 +08:00
|
|
|
|
}
|
|
|
|
|
|
2021-03-10 16:01:29 +08:00
|
|
|
|
.item-on-move {
|
2021-03-15 12:25:11 +08:00
|
|
|
|
padding: 2px 10px;
|
|
|
|
|
margin: 2px 2px 0 2px;
|
2021-03-10 16:01:29 +08:00
|
|
|
|
border: solid 1px #eee;
|
|
|
|
|
text-align: left;
|
|
|
|
|
color: #606266;
|
2021-03-24 12:30:48 +08:00
|
|
|
|
/*background-color: rgba(35,46,64,.05);*/
|
|
|
|
|
background-color: white;
|
2021-03-10 16:01:29 +08:00
|
|
|
|
}
|
|
|
|
|
|
2021-03-03 15:06:52 +08:00
|
|
|
|
.item + .item {
|
2021-03-15 12:25:11 +08:00
|
|
|
|
margin-top: 2px;
|
2021-03-03 15:06:52 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.item:hover {
|
2021-05-19 14:58:21 +08:00
|
|
|
|
color: #1890ff;
|
|
|
|
|
background: #e8f4ff;
|
|
|
|
|
border-color: #a3d3ff;
|
2021-03-03 15:06:52 +08:00
|
|
|
|
cursor: pointer;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.el-form-item {
|
|
|
|
|
margin-bottom: 0;
|
|
|
|
|
}
|
2021-03-03 18:35:51 +08:00
|
|
|
|
|
|
|
|
|
span {
|
2021-03-04 18:11:30 +08:00
|
|
|
|
font-size: 12px;
|
2021-03-03 18:35:51 +08:00
|
|
|
|
}
|
2021-03-10 16:01:29 +08:00
|
|
|
|
|
2021-03-16 11:55:22 +08:00
|
|
|
|
.tab-header>>>.el-tabs__item{
|
|
|
|
|
font-size: 12px;
|
2021-03-24 12:30:48 +08:00
|
|
|
|
background-color: #E8EAED;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.tab-header>>>.is-active{
|
|
|
|
|
background-color: #f7f8fa;
|
|
|
|
|
border-bottom-color: #f7f8fa!important;
|
2021-03-16 11:55:22 +08:00
|
|
|
|
}
|
2021-03-26 12:14:18 +08:00
|
|
|
|
.tab-header>>>.el-tabs__nav-scroll{
|
|
|
|
|
padding-left: 0!important;
|
|
|
|
|
}
|
2021-03-16 11:55:22 +08:00
|
|
|
|
|
2021-03-10 16:01:29 +08:00
|
|
|
|
.draggable-group {
|
|
|
|
|
display: inline-block;
|
|
|
|
|
width: 100%;
|
|
|
|
|
height: calc(100% - 6px);
|
|
|
|
|
}
|
2021-03-16 11:55:22 +08:00
|
|
|
|
|
2021-03-18 17:20:59 +08:00
|
|
|
|
.chart-type{
|
|
|
|
|
padding: 4px;
|
|
|
|
|
display: flex;
|
|
|
|
|
flex-wrap: wrap;
|
|
|
|
|
justify-content: flex-start;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.chart-icon{
|
|
|
|
|
width: 20px;
|
|
|
|
|
height: 20px;
|
|
|
|
|
}
|
|
|
|
|
|
2021-03-16 11:55:22 +08:00
|
|
|
|
.chart-type>>>.el-radio__input{
|
|
|
|
|
display: none;
|
|
|
|
|
}
|
2021-03-18 17:20:59 +08:00
|
|
|
|
|
|
|
|
|
.el-radio{
|
|
|
|
|
margin:6px;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.el-radio>>>.el-radio__label{
|
|
|
|
|
padding-left: 0;
|
|
|
|
|
}
|
2021-03-19 14:28:38 +08:00
|
|
|
|
|
2021-05-19 15:20:48 +08:00
|
|
|
|
.attr-style{
|
2021-05-26 18:46:19 +08:00
|
|
|
|
height: calc(100vh - 56px - 25vh - 40px - 62px - 60px - 20px);
|
2021-05-19 15:20:48 +08:00
|
|
|
|
}
|
|
|
|
|
|
2021-03-19 14:28:38 +08:00
|
|
|
|
.attr-selector{
|
2021-03-24 12:30:48 +08:00
|
|
|
|
width:100%;
|
|
|
|
|
height: 32px;
|
|
|
|
|
margin:0 0 6px 0;
|
|
|
|
|
padding:0 4px;
|
|
|
|
|
display: flex;
|
|
|
|
|
align-items: center;
|
|
|
|
|
background-color: white
|
2021-03-19 14:28:38 +08:00
|
|
|
|
}
|
2021-03-22 17:17:04 +08:00
|
|
|
|
|
|
|
|
|
.disabled-none-cursor{
|
|
|
|
|
cursor: not-allowed;
|
|
|
|
|
pointer-events:none;
|
|
|
|
|
}
|
2021-03-24 12:30:48 +08:00
|
|
|
|
|
|
|
|
|
.filter-class{
|
|
|
|
|
height: calc(35% - 102px);
|
2021-03-26 12:14:18 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.filter-class>>>.filter-inner-class{
|
|
|
|
|
height: calc(100% - 40px);
|
2021-03-24 12:30:48 +08:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.chart-class{
|
2021-03-25 12:43:19 +08:00
|
|
|
|
height: calc(100% - 84px);
|
|
|
|
|
padding: 10px;
|
2021-03-24 12:30:48 +08:00
|
|
|
|
}
|
2021-04-26 12:35:47 +08:00
|
|
|
|
.table-class{
|
|
|
|
|
height: calc(100% - 104px);
|
|
|
|
|
margin: 10px;
|
|
|
|
|
}
|
2021-03-25 11:34:46 +08:00
|
|
|
|
|
|
|
|
|
.dialog-css>>>.el-dialog__title {
|
|
|
|
|
font-size: 14px;
|
|
|
|
|
}
|
|
|
|
|
.dialog-css >>> .el-dialog__header {
|
|
|
|
|
padding: 20px 20px 0;
|
|
|
|
|
}
|
|
|
|
|
.dialog-css >>> .el-dialog__body {
|
|
|
|
|
padding: 10px 20px 20px;
|
|
|
|
|
}
|
2021-05-21 16:45:21 +08:00
|
|
|
|
|
|
|
|
|
.filter-btn-class{
|
|
|
|
|
padding: 6px;
|
|
|
|
|
border: none;
|
|
|
|
|
width: 100%;
|
|
|
|
|
display: flex;
|
|
|
|
|
justify-content: space-between;
|
|
|
|
|
align-items: center;
|
|
|
|
|
}
|
2021-03-03 15:06:52 +08:00
|
|
|
|
</style>
|