forked from github/dataease
Merge remote-tracking branch 'origin/main' into main
This commit is contained in:
commit
8786ff095b
@ -6,8 +6,6 @@ import io.dataease.base.mapper.ext.AuthMapper;
|
||||
import io.dataease.auth.service.AuthUserService;
|
||||
import io.dataease.commons.constants.AuthConstants;
|
||||
import io.dataease.plugins.common.dto.PluginSysMenu;
|
||||
import io.dataease.plugins.common.service.PluginMenuService;
|
||||
import io.dataease.plugins.config.SpringContextUtil;
|
||||
import io.dataease.plugins.util.PluginUtils;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
@ -15,10 +13,8 @@ import org.springframework.cache.annotation.CacheEvict;
|
||||
import org.springframework.cache.annotation.Cacheable;
|
||||
import org.springframework.cache.annotation.Caching;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
@Service
|
||||
|
@ -31,6 +31,7 @@ public class DynamicMenuServiceImpl implements DynamicMenuService {
|
||||
//增加插件中的菜单
|
||||
List<PluginSysMenu> pluginSysMenus = PluginUtils.pluginMenus();
|
||||
if (CollectionUtils.isNotEmpty(pluginSysMenus) ) {
|
||||
pluginSysMenus = pluginSysMenus.stream().filter(menu -> menu.getType() <= 1).collect(Collectors.toList());
|
||||
List<DynamicMenuDto> pluginDtos = pluginSysMenus.stream().map(this::convert).collect(Collectors.toList());
|
||||
dynamicMenuDtos.addAll(pluginDtos);
|
||||
}
|
||||
|
@ -0,0 +1,7 @@
|
||||
package io.dataease.base.mapper.ext;
|
||||
|
||||
|
||||
public interface UtilMapper {
|
||||
|
||||
Long currentTimestamp();
|
||||
}
|
@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
|
||||
<mapper namespace="io.dataease.base.mapper.ext.UtilMapper">
|
||||
|
||||
<select id="currentTimestamp" resultType="java.lang.Long">
|
||||
select unix_timestamp(current_timestamp()) * 1000 as c_timestamp
|
||||
</select>
|
||||
|
||||
</mapper>
|
@ -41,18 +41,6 @@ public class DefaultLicenseService {
|
||||
f2CLicenseResponse.setMessage("The license is unavailable for this product.");
|
||||
return f2CLicenseResponse;
|
||||
}
|
||||
|
||||
// 检查每个模块的PLU限制
|
||||
// if(!Arrays.asList(NO_PLU_LIMIT_MODULES).contains(moduleId)){
|
||||
// AuthorizationUnit authorizationUnit= CommonBeanFactory.getBean(AuthorizationUnit.class);
|
||||
// try{
|
||||
// authorizationUnit.calculateAssets(f2CLicenseResponse.getLicense().getCount());
|
||||
// return f2CLicenseResponse;
|
||||
// }catch (Exception e){
|
||||
// f2CLicenseResponse.setStatus(F2CLicenseResponse.Status.invalid);
|
||||
// f2CLicenseResponse.setMessage(e.getMessage());
|
||||
// }
|
||||
// }
|
||||
return f2CLicenseResponse;
|
||||
}catch (Exception e){
|
||||
return F2CLicenseResponse.invalid(e.getMessage());
|
||||
@ -79,16 +67,10 @@ public class DefaultLicenseService {
|
||||
License license = readLicense();
|
||||
return validateLicense(product, license.getLicense());
|
||||
} catch (Exception e) {
|
||||
return F2CLicenseResponse.invalid(e.getMessage());
|
||||
return F2CLicenseResponse.noRecord();
|
||||
}
|
||||
}
|
||||
|
||||
public void validateF2cLicense(){
|
||||
License license = readLicense();
|
||||
F2CLicenseResponse f2CLicenseResponse = validateLicense(product, license.getLicense());
|
||||
writeLicense(license.getLicense(), f2CLicenseResponse);
|
||||
}
|
||||
|
||||
public F2CLicenseResponse updateLicense(String product, String licenseKey) {
|
||||
// 验证license
|
||||
F2CLicenseResponse response = validateLicense(product, licenseKey);
|
||||
@ -104,12 +86,10 @@ public class DefaultLicenseService {
|
||||
public License readLicense() {
|
||||
License license = innerLicenseService.getLicense(LICENSE_ID);
|
||||
if (license == null) {
|
||||
/*DEException.throwException(Translator.get("i18n_no_license_record"));*/
|
||||
DEException.throwException("i18n_no_license_record");
|
||||
}
|
||||
if (StringUtils.isBlank(license.getLicense())) {
|
||||
DEException.throwException("i18n_license_is_empty");
|
||||
//F2CException.throwException(Translator.get("i18n_license_is_empty"));
|
||||
}
|
||||
return license;
|
||||
}
|
||||
@ -117,9 +97,7 @@ public class DefaultLicenseService {
|
||||
// 创建或更新License
|
||||
private void writeLicense(String licenseKey, F2CLicenseResponse response) {
|
||||
if (StringUtils.isBlank(licenseKey)) {
|
||||
|
||||
DEException.throwException("i18n_license_is_empty");
|
||||
|
||||
}
|
||||
License license = new License();
|
||||
license.setId(LICENSE_ID);
|
||||
|
@ -31,6 +31,7 @@ public class F2CLicenseResponse {
|
||||
}
|
||||
|
||||
public static enum Status {
|
||||
no_record,
|
||||
valid,
|
||||
invalid,
|
||||
expired;
|
||||
@ -43,4 +44,12 @@ public class F2CLicenseResponse {
|
||||
f2CLicenseResponse.setMessage(a);
|
||||
return f2CLicenseResponse;
|
||||
}
|
||||
|
||||
public static F2CLicenseResponse noRecord() {
|
||||
F2CLicenseResponse f2CLicenseResponse = new F2CLicenseResponse();
|
||||
f2CLicenseResponse.setStatus(Status.no_record);
|
||||
f2CLicenseResponse.setLicense(null);
|
||||
f2CLicenseResponse.setMessage("No license record");
|
||||
return f2CLicenseResponse;
|
||||
}
|
||||
}
|
||||
|
@ -2,6 +2,7 @@ package io.dataease.controller;
|
||||
|
||||
|
||||
|
||||
import com.google.gson.Gson;
|
||||
import io.dataease.commons.license.DefaultLicenseService;
|
||||
import io.dataease.commons.license.F2CLicenseResponse;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
@ -22,16 +23,14 @@ public class LicenseController {
|
||||
|
||||
@GetMapping(value = "anonymous/license/validate")
|
||||
public ResultHolder validateLicense() throws Exception {
|
||||
if (!need_validate_lic) {
|
||||
return ResultHolder.success(null);
|
||||
}
|
||||
/* License license = defaultLicenseService.readLicense();
|
||||
if(StringUtils.isEmpty(license.getF2cLicense())){
|
||||
throw new Exception("Invalid License.");
|
||||
}
|
||||
F2CLicenseResponse f2CLicenseResponse = new Gson().fromJson(license.getF2cLicense(), F2CLicenseResponse.class);*/
|
||||
// if (!need_validate_lic) {
|
||||
// return ResultHolder.success(null);
|
||||
// }
|
||||
F2CLicenseResponse f2CLicenseResponse = defaultLicenseService.validateLicense();
|
||||
System.out.println(new Gson().toJson(f2CLicenseResponse));
|
||||
switch (f2CLicenseResponse.getStatus()) {
|
||||
case no_record:
|
||||
return ResultHolder.success(f2CLicenseResponse);
|
||||
case valid:
|
||||
return ResultHolder.success(null);
|
||||
case expired:
|
||||
|
@ -6,6 +6,7 @@ import com.google.gson.Gson;
|
||||
import io.dataease.base.domain.*;
|
||||
import io.dataease.base.mapper.*;
|
||||
import io.dataease.base.mapper.ext.ExtDataSetTableMapper;
|
||||
import io.dataease.base.mapper.ext.UtilMapper;
|
||||
import io.dataease.commons.constants.JobStatus;
|
||||
import io.dataease.commons.utils.*;
|
||||
import io.dataease.controller.request.dataset.DataSetTableRequest;
|
||||
@ -880,12 +881,14 @@ public class DataSetTableService {
|
||||
return CollectionUtils.isNotEmpty(data);
|
||||
}
|
||||
|
||||
@Resource
|
||||
private UtilMapper utilMapper;
|
||||
|
||||
@QuartzScheduled(cron = "0 0/3 * * * ?")
|
||||
public void updateDatasetTableStatus(){
|
||||
List<QrtzSchedulerState> qrtzSchedulerStates = qrtzSchedulerStateMapper.selectByExample(null);
|
||||
List<String> activeQrtzInstances = qrtzSchedulerStates.stream().filter(qrtzSchedulerState -> qrtzSchedulerState.getLastCheckinTime() + qrtzSchedulerState.getCheckinInterval() + 1000 > System.currentTimeMillis()).map(QrtzSchedulerStateKey::getInstanceName).collect(Collectors.toList());
|
||||
List<String> activeQrtzInstances = qrtzSchedulerStates.stream().filter(qrtzSchedulerState -> qrtzSchedulerState.getLastCheckinTime() + qrtzSchedulerState.getCheckinInterval() + 1000 > utilMapper.currentTimestamp()).map(QrtzSchedulerStateKey::getInstanceName).collect(Collectors.toList());
|
||||
List<DatasetTable> jobStoppeddDatasetTables = new ArrayList<>();
|
||||
|
||||
DatasetTableExample example = new DatasetTableExample();
|
||||
example.createCriteria().andSyncStatusEqualTo(JobStatus.Underway.name());
|
||||
|
||||
|
@ -679,7 +679,20 @@ export default {
|
||||
title_limit: 'Title cannot be greater than 50 characters',
|
||||
filter_condition: 'Filter Condition',
|
||||
filter_field_can_null: 'Filter field must choose',
|
||||
preview_100_data: 'Preview 100 rows'
|
||||
preview_100_data: 'Preview 100 rows',
|
||||
chart_table_normal: 'Detail Table',
|
||||
chart_card: 'KPI Card',
|
||||
chart_bar: 'Base Bar',
|
||||
chart_bar_stack: 'Stack Bar',
|
||||
chart_bar_horizontal: 'Horizontal Bar',
|
||||
chart_bar_stack_horizontal: 'Stack Horizontal Bar',
|
||||
chart_line: 'Base Line',
|
||||
chart_line_stack: 'Stack Line',
|
||||
chart_pie: 'Pie',
|
||||
chart_pie_rose: 'Rose Pie',
|
||||
chart_funnel: 'Funnel',
|
||||
chart_radar: 'Radar',
|
||||
chart_gauge: 'Gauge'
|
||||
},
|
||||
dataset: {
|
||||
sheet_warn: 'There are multiple sheet pages, and the first one is extracted by default',
|
||||
|
@ -679,7 +679,20 @@ export default {
|
||||
title_limit: '標題不能大於50個字符',
|
||||
filter_condition: '過濾條件',
|
||||
filter_field_can_null: '過濾字段必填',
|
||||
preview_100_data: '預覽前100條記錄'
|
||||
preview_100_data: '預覽前100條記錄',
|
||||
chart_table_normal: '明細表',
|
||||
chart_card: '指標卡',
|
||||
chart_bar: '基礎柱狀圖',
|
||||
chart_bar_stack: '堆疊柱狀圖',
|
||||
chart_bar_horizontal: '橫向柱狀圖',
|
||||
chart_bar_stack_horizontal: '橫向堆疊柱狀圖',
|
||||
chart_line: '基礎折線圖',
|
||||
chart_line_stack: '堆疊折線圖',
|
||||
chart_pie: '餅圖',
|
||||
chart_pie_rose: '南丁格爾玫瑰圖',
|
||||
chart_funnel: '漏鬥圖',
|
||||
chart_radar: '雷達圖',
|
||||
chart_gauge: '儀表盤'
|
||||
},
|
||||
dataset: {
|
||||
sheet_warn: '有多個sheet頁面,默認抽取第一個',
|
||||
|
@ -679,7 +679,20 @@ export default {
|
||||
title_limit: '标题不能大于50个字符',
|
||||
filter_condition: '过滤条件',
|
||||
filter_field_can_null: '过滤字段必填',
|
||||
preview_100_data: '预览前100条记录'
|
||||
preview_100_data: '预览前100条记录',
|
||||
chart_table_normal: '明细表',
|
||||
chart_card: '指标卡',
|
||||
chart_bar: '基础柱状图',
|
||||
chart_bar_stack: '堆叠柱状图',
|
||||
chart_bar_horizontal: '横向柱状图',
|
||||
chart_bar_stack_horizontal: '横向堆叠柱状图',
|
||||
chart_line: '基础折线图',
|
||||
chart_line_stack: '堆叠折线图',
|
||||
chart_pie: '饼图',
|
||||
chart_pie_rose: '南丁格尔玫瑰图',
|
||||
chart_funnel: '漏斗图',
|
||||
chart_radar: '雷达图',
|
||||
chart_gauge: '仪表盘'
|
||||
},
|
||||
dataset: {
|
||||
sheet_warn: '有多个Sheet页,默认抽取第一个',
|
||||
|
@ -49,7 +49,7 @@
|
||||
<router-link to="/person-pwd/index">
|
||||
<el-dropdown-item>{{ $t('user.change_password') }}</el-dropdown-item>
|
||||
</router-link>
|
||||
<a href="/swagger-ui.html" target="_blank">
|
||||
<a href="https://de-docs.fit2cloud.com/" target="_blank">
|
||||
<el-dropdown-item>{{ $t('commons.help_documentation') }} </el-dropdown-item>
|
||||
</a>
|
||||
<router-link to="/about/index">
|
||||
|
@ -32,7 +32,6 @@ const actions = {
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
export default {
|
||||
|
@ -2,15 +2,16 @@
|
||||
<div>
|
||||
<div style="width: 100%">
|
||||
<el-popover
|
||||
v-model="isSetting"
|
||||
placement="right"
|
||||
width="400"
|
||||
trigger="click"
|
||||
>
|
||||
<el-col>
|
||||
<el-form ref="legendForm" :model="legendForm" label-width="80px" size="mini">
|
||||
<el-form-item :label="$t('chart.show')" class="form-item">
|
||||
<el-checkbox v-model="legendForm.show" @change="changeLegendStyle">{{ $t('chart.show') }}</el-checkbox>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item :label="$t('chart.show')" class="form-item">-->
|
||||
<!-- <el-checkbox v-model="legendForm.show" @change="changeLegendStyle">{{ $t('chart.show') }}</el-checkbox>-->
|
||||
<!-- </el-form-item>-->
|
||||
<el-form-item :label="$t('chart.icon')" class="form-item">
|
||||
<el-select v-model="legendForm.icon" :placeholder="$t('chart.icon')" @change="changeLegendStyle">
|
||||
<el-option
|
||||
@ -52,7 +53,15 @@
|
||||
</el-form>
|
||||
</el-col>
|
||||
|
||||
<el-button slot="reference" size="mini" class="shape-item">{{ $t('chart.legend') }}<i class="el-icon-setting el-icon--right" /></el-button>
|
||||
<el-button slot="reference" size="mini" class="shape-item" :disabled="!legendForm.show">
|
||||
{{ $t('chart.legend') }}<i class="el-icon-setting el-icon--right" />
|
||||
<el-switch
|
||||
v-model="legendForm.show"
|
||||
class="switch-style"
|
||||
@click.stop.native
|
||||
@change="changeLegendStyle"
|
||||
/>
|
||||
</el-button>
|
||||
</el-popover>
|
||||
</div>
|
||||
</div>
|
||||
@ -80,7 +89,8 @@ export default {
|
||||
{ name: this.$t('chart.line_symbol_roundRect'), value: 'roundRect' },
|
||||
{ name: this.$t('chart.line_symbol_triangle'), value: 'triangle' },
|
||||
{ name: this.$t('chart.line_symbol_diamond'), value: 'diamond' }
|
||||
]
|
||||
],
|
||||
isSetting: false
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
@ -116,6 +126,9 @@ export default {
|
||||
this.fontSize = arr
|
||||
},
|
||||
changeLegendStyle() {
|
||||
if (!this.legendForm.show) {
|
||||
this.isSetting = false
|
||||
}
|
||||
this.$emit('onLegendChange', this.legendForm)
|
||||
}
|
||||
}
|
||||
@ -147,4 +160,10 @@ export default {
|
||||
.el-form-item{
|
||||
margin-bottom: 6px;
|
||||
}
|
||||
|
||||
.switch-style{
|
||||
position: absolute;
|
||||
right: 10px;
|
||||
margin-top: -4px;
|
||||
}
|
||||
</style>
|
||||
|
@ -2,14 +2,24 @@
|
||||
<div>
|
||||
<div style="width: 100%">
|
||||
<el-popover
|
||||
v-model="isSetting"
|
||||
placement="right"
|
||||
width="400"
|
||||
trigger="click"
|
||||
>
|
||||
<el-col>
|
||||
<el-form ref="titleForm" :model="titleForm" label-width="80px" size="mini">
|
||||
<el-form-item :label="$t('chart.show')" class="form-item">
|
||||
<el-checkbox v-model="titleForm.show" @change="changeTitleStyle">{{ $t('chart.show') }}</el-checkbox>
|
||||
<!-- <el-form-item :label="$t('chart.show')" class="form-item">-->
|
||||
<!-- <el-checkbox v-model="titleForm.show" @change="changeTitleStyle">{{ $t('chart.show') }}</el-checkbox>-->
|
||||
<!-- </el-form-item>-->
|
||||
<el-form-item :label="$t('chart.title')" class="form-item">
|
||||
<el-input
|
||||
v-model="titleForm.title"
|
||||
size="mini"
|
||||
:placeholder="$t('chart.title')"
|
||||
clearable
|
||||
@blur="changeTitleStyle"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item :label="$t('chart.text_fontsize')" class="form-item">
|
||||
<el-select v-model="titleForm.fontSize" :placeholder="$t('chart.text_fontsize')" size="mini" @change="changeTitleStyle">
|
||||
@ -39,7 +49,15 @@
|
||||
</el-form>
|
||||
</el-col>
|
||||
|
||||
<el-button slot="reference" size="mini" class="shape-item">{{ $t('chart.title') }}<i class="el-icon-setting el-icon--right" /></el-button>
|
||||
<el-button slot="reference" size="mini" class="shape-item" :disabled="!titleForm.show">
|
||||
{{ $t('chart.title') }}<i class="el-icon-setting el-icon--right" />
|
||||
<el-switch
|
||||
v-model="titleForm.show"
|
||||
class="switch-style"
|
||||
@click.stop.native
|
||||
@change="changeTitleStyle"
|
||||
/>
|
||||
</el-button>
|
||||
</el-popover>
|
||||
</div>
|
||||
</div>
|
||||
@ -59,7 +77,8 @@ export default {
|
||||
data() {
|
||||
return {
|
||||
titleForm: JSON.parse(JSON.stringify(DEFAULT_TITLE_STYLE)),
|
||||
fontSize: []
|
||||
fontSize: [],
|
||||
isSetting: false
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
@ -76,13 +95,11 @@ export default {
|
||||
if (customStyle.text) {
|
||||
this.titleForm = customStyle.text
|
||||
}
|
||||
this.titleForm.title = this.chart.title
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
created() {
|
||||
console.log(JSON.stringify(this.chart))
|
||||
},
|
||||
mounted() {
|
||||
this.init()
|
||||
},
|
||||
@ -98,6 +115,9 @@ export default {
|
||||
this.fontSize = arr
|
||||
},
|
||||
changeTitleStyle() {
|
||||
if (!this.titleForm.show) {
|
||||
this.isSetting = false
|
||||
}
|
||||
this.$emit('onTextChange', this.titleForm)
|
||||
}
|
||||
}
|
||||
@ -129,4 +149,10 @@ export default {
|
||||
.el-form-item{
|
||||
margin-bottom: 6px;
|
||||
}
|
||||
|
||||
.switch-style{
|
||||
position: absolute;
|
||||
right: 10px;
|
||||
margin-top: -4px;
|
||||
}
|
||||
</style>
|
||||
|
@ -2,15 +2,16 @@
|
||||
<div>
|
||||
<div style="width: 100%">
|
||||
<el-popover
|
||||
v-model="isSetting"
|
||||
placement="right"
|
||||
width="400"
|
||||
trigger="click"
|
||||
>
|
||||
<el-col>
|
||||
<el-form ref="axisForm" :model="axisForm" label-width="80px" size="mini">
|
||||
<el-form-item :label="$t('chart.show')" class="form-item">
|
||||
<el-checkbox v-model="axisForm.show" @change="changeXAxisStyle">{{ $t('chart.show') }}</el-checkbox>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item :label="$t('chart.show')" class="form-item">-->
|
||||
<!-- <el-checkbox v-model="axisForm.show" @change="changeXAxisStyle">{{ $t('chart.show') }}</el-checkbox>-->
|
||||
<!-- </el-form-item>-->
|
||||
<el-form-item :label="$t('chart.position')" class="form-item">
|
||||
<el-radio-group v-model="axisForm.position" size="mini" @change="changeXAxisStyle">
|
||||
<el-radio-button label="top">{{ $t('chart.text_pos_top') }}</el-radio-button>
|
||||
@ -29,7 +30,15 @@
|
||||
</el-form>
|
||||
</el-col>
|
||||
|
||||
<el-button slot="reference" size="mini" class="shape-item">{{ $t('chart.xAxis') }}<i class="el-icon-setting el-icon--right" /></el-button>
|
||||
<el-button slot="reference" size="mini" class="shape-item" :disabled="!axisForm.show">
|
||||
{{ $t('chart.xAxis') }}<i class="el-icon-setting el-icon--right" />
|
||||
<el-switch
|
||||
v-model="axisForm.show"
|
||||
class="switch-style"
|
||||
@click.stop.native
|
||||
@change="changeXAxisStyle"
|
||||
/>
|
||||
</el-button>
|
||||
</el-popover>
|
||||
</div>
|
||||
</div>
|
||||
@ -48,7 +57,8 @@ export default {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
axisForm: JSON.parse(JSON.stringify(DEFAULT_XAXIS_STYLE))
|
||||
axisForm: JSON.parse(JSON.stringify(DEFAULT_XAXIS_STYLE)),
|
||||
isSetting: false
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
@ -73,6 +83,9 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
changeXAxisStyle() {
|
||||
if (!this.axisForm.show) {
|
||||
this.isSetting = false
|
||||
}
|
||||
this.$emit('onChangeXAxisForm', this.axisForm)
|
||||
}
|
||||
}
|
||||
@ -104,4 +117,10 @@ export default {
|
||||
.el-form-item{
|
||||
margin-bottom: 6px;
|
||||
}
|
||||
|
||||
.switch-style{
|
||||
position: absolute;
|
||||
right: 10px;
|
||||
margin-top: -4px;
|
||||
}
|
||||
</style>
|
||||
|
@ -2,15 +2,16 @@
|
||||
<div>
|
||||
<div style="width: 100%">
|
||||
<el-popover
|
||||
v-model="isSetting"
|
||||
placement="right"
|
||||
width="400"
|
||||
trigger="click"
|
||||
>
|
||||
<el-col>
|
||||
<el-form ref="axisForm" :model="axisForm" label-width="80px" size="mini">
|
||||
<el-form-item :label="$t('chart.show')" class="form-item">
|
||||
<el-checkbox v-model="axisForm.show" @change="changeYAxisStyle">{{ $t('chart.show') }}</el-checkbox>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item :label="$t('chart.show')" class="form-item">-->
|
||||
<!-- <el-checkbox v-model="axisForm.show" @change="changeYAxisStyle">{{ $t('chart.show') }}</el-checkbox>-->
|
||||
<!-- </el-form-item>-->
|
||||
<el-form-item :label="$t('chart.position')" class="form-item">
|
||||
<el-radio-group v-model="axisForm.position" size="mini" @change="changeYAxisStyle">
|
||||
<el-radio-button label="left">{{ $t('chart.text_pos_left') }}</el-radio-button>
|
||||
@ -29,7 +30,15 @@
|
||||
</el-form>
|
||||
</el-col>
|
||||
|
||||
<el-button slot="reference" size="mini" class="shape-item">{{ $t('chart.yAxis') }}<i class="el-icon-setting el-icon--right" /></el-button>
|
||||
<el-button slot="reference" size="mini" class="shape-item" :disabled="!axisForm.show">
|
||||
{{ $t('chart.yAxis') }}<i class="el-icon-setting el-icon--right" />
|
||||
<el-switch
|
||||
v-model="axisForm.show"
|
||||
class="switch-style"
|
||||
@click.stop.native
|
||||
@change="changeYAxisStyle"
|
||||
/>
|
||||
</el-button>
|
||||
</el-popover>
|
||||
</div>
|
||||
</div>
|
||||
@ -48,7 +57,8 @@ export default {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
axisForm: JSON.parse(JSON.stringify(DEFAULT_YAXIS_STYLE))
|
||||
axisForm: JSON.parse(JSON.stringify(DEFAULT_YAXIS_STYLE)),
|
||||
isSetting: false
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
@ -73,6 +83,9 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
changeYAxisStyle() {
|
||||
if (!this.axisForm.show) {
|
||||
this.isSetting = false
|
||||
}
|
||||
this.$emit('onChangeYAxisForm', this.axisForm)
|
||||
}
|
||||
}
|
||||
@ -104,4 +117,10 @@ export default {
|
||||
.el-form-item{
|
||||
margin-bottom: 6px;
|
||||
}
|
||||
|
||||
.switch-style{
|
||||
position: absolute;
|
||||
right: 10px;
|
||||
margin-top: -4px;
|
||||
}
|
||||
</style>
|
||||
|
@ -2,15 +2,16 @@
|
||||
<div>
|
||||
<div style="width: 100%">
|
||||
<el-popover
|
||||
v-model="isSetting"
|
||||
placement="right"
|
||||
width="400"
|
||||
trigger="click"
|
||||
>
|
||||
<el-col>
|
||||
<el-form v-show="chart.type && !chart.type.includes('gauge')" ref="labelForm" :model="labelForm" label-width="80px" size="mini">
|
||||
<el-form-item :label="$t('chart.show')" class="form-item">
|
||||
<el-checkbox v-model="labelForm.show" @change="changeLabelAttr">{{ $t('chart.show') }}</el-checkbox>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item :label="$t('chart.show')" class="form-item">-->
|
||||
<!-- <el-checkbox v-model="labelForm.show" @change="changeLabelAttr">{{ $t('chart.show') }}</el-checkbox>-->
|
||||
<!-- </el-form-item>-->
|
||||
<el-form-item :label="$t('chart.text_fontsize')" class="form-item">
|
||||
<el-select v-model="labelForm.fontSize" :placeholder="$t('chart.text_fontsize')" size="mini" @change="changeLabelAttr">
|
||||
<el-option v-for="option in fontSize" :key="option.value" :label="option.name" :value="option.value" />
|
||||
@ -67,7 +68,15 @@
|
||||
</el-form>
|
||||
</el-col>
|
||||
|
||||
<el-button slot="reference" size="mini" class="shape-item">{{ $t('chart.label') }}<i class="el-icon-setting el-icon--right" /></el-button>
|
||||
<el-button slot="reference" size="mini" class="shape-item" :disabled="!labelForm.show">
|
||||
{{ $t('chart.label') }}<i class="el-icon-setting el-icon--right" />
|
||||
<el-switch
|
||||
v-model="labelForm.show"
|
||||
class="switch-style"
|
||||
@click.stop.native
|
||||
@change="changeLabelAttr"
|
||||
/>
|
||||
</el-button>
|
||||
</el-popover>
|
||||
</div>
|
||||
</div>
|
||||
@ -87,7 +96,8 @@ export default {
|
||||
data() {
|
||||
return {
|
||||
labelForm: JSON.parse(JSON.stringify(DEFAULT_LABEL)),
|
||||
fontSize: []
|
||||
fontSize: [],
|
||||
isSetting: false
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
@ -123,6 +133,9 @@ export default {
|
||||
this.fontSize = arr
|
||||
},
|
||||
changeLabelAttr() {
|
||||
if (!this.labelForm.show) {
|
||||
this.isSetting = false
|
||||
}
|
||||
this.$emit('onLabelChange', this.labelForm)
|
||||
}
|
||||
}
|
||||
@ -154,4 +167,10 @@ export default {
|
||||
.el-form-item{
|
||||
margin-bottom: 6px;
|
||||
}
|
||||
|
||||
.switch-style{
|
||||
position: absolute;
|
||||
right: 10px;
|
||||
margin-top: -4px;
|
||||
}
|
||||
</style>
|
||||
|
@ -2,15 +2,16 @@
|
||||
<div>
|
||||
<div style="width: 100%">
|
||||
<el-popover
|
||||
v-model="isSetting"
|
||||
placement="right"
|
||||
width="400"
|
||||
trigger="click"
|
||||
>
|
||||
<el-col>
|
||||
<el-form ref="tooltipForm" :model="tooltipForm" label-width="80px" size="mini">
|
||||
<el-form-item :label="$t('chart.show')" class="form-item">
|
||||
<el-checkbox v-model="tooltipForm.show" @change="changeTooltipAttr">{{ $t('chart.show') }}</el-checkbox>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item :label="$t('chart.show')" class="form-item">-->
|
||||
<!-- <el-checkbox v-model="tooltipForm.show" @change="changeTooltipAttr">{{ $t('chart.show') }}</el-checkbox>-->
|
||||
<!-- </el-form-item>-->
|
||||
<el-form-item :label="$t('chart.trigger_position')" class="form-item">
|
||||
<el-radio-group v-model="tooltipForm.trigger" size="mini" @change="changeTooltipAttr">
|
||||
<el-radio-button label="item">{{ $t('chart.tooltip_item') }}</el-radio-button>
|
||||
@ -54,7 +55,15 @@
|
||||
</el-form>
|
||||
</el-col>
|
||||
|
||||
<el-button slot="reference" size="mini" class="shape-item">{{ $t('chart.tooltip') }}<i class="el-icon-setting el-icon--right" /></el-button>
|
||||
<el-button slot="reference" size="mini" class="shape-item" :disabled="!tooltipForm.show">
|
||||
{{ $t('chart.tooltip') }}<i class="el-icon-setting el-icon--right" />
|
||||
<el-switch
|
||||
v-model="tooltipForm.show"
|
||||
class="switch-style"
|
||||
@click.stop.native
|
||||
@change="changeTooltipAttr"
|
||||
/>
|
||||
</el-button>
|
||||
</el-popover>
|
||||
</div>
|
||||
</div>
|
||||
@ -74,7 +83,8 @@ export default {
|
||||
data() {
|
||||
return {
|
||||
tooltipForm: JSON.parse(JSON.stringify(DEFAULT_TOOLTIP)),
|
||||
fontSize: []
|
||||
fontSize: [],
|
||||
isSetting: false
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
@ -110,6 +120,9 @@ export default {
|
||||
this.fontSize = arr
|
||||
},
|
||||
changeTooltipAttr() {
|
||||
if (!this.tooltipForm.show) {
|
||||
this.isSetting = false
|
||||
}
|
||||
this.$emit('onTooltipChange', this.tooltipForm)
|
||||
}
|
||||
}
|
||||
@ -141,4 +154,10 @@ export default {
|
||||
.el-form-item{
|
||||
margin-bottom: 6px;
|
||||
}
|
||||
|
||||
.switch-style{
|
||||
position: absolute;
|
||||
right: 10px;
|
||||
margin-top: -4px;
|
||||
}
|
||||
</style>
|
||||
|
@ -73,23 +73,23 @@
|
||||
<el-col
|
||||
style="height: 100%;width: 30%;min-width: 200px;max-width:220px;border: 1px solid #E6E6E6;border-left: 0 solid;"
|
||||
>
|
||||
<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>
|
||||
<!-- <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>-->
|
||||
<div style="height: 25vh;overflow:auto" class="padding-lr">
|
||||
<span>{{ $t('chart.chart_type') }}</span>
|
||||
<el-row>
|
||||
@ -101,24 +101,49 @@
|
||||
@change="save(true,'chart')"
|
||||
>
|
||||
<div style="width: 100%;display: flex;display: -webkit-flex;justify-content: space-between;flex-direction: row;flex-wrap: wrap;">
|
||||
<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>
|
||||
</div>
|
||||
<div style="width: 100%;display: flex;display: -webkit-flex;justify-content: space-between;flex-direction: row;flex-wrap: wrap;">
|
||||
<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>
|
||||
</div>
|
||||
<div style="width: 100%;display: flex;display: -webkit-flex;justify-content: space-between;flex-direction: row;flex-wrap: wrap;">
|
||||
<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-radio value="scatter" label="scatter"><svg-icon icon-class="scatter" class="chart-icon" /></el-radio>-->
|
||||
</el-tooltip>
|
||||
<el-radio value="" label="" disabled class="disabled-none-cursor"><svg-icon icon-class="" class="chart-icon" /></el-radio>
|
||||
<el-radio value="" label="" disabled class="disabled-none-cursor"><svg-icon icon-class="" class="chart-icon" /></el-radio>
|
||||
</div>
|
||||
@ -736,6 +761,7 @@ export default {
|
||||
|
||||
onTextChange(val) {
|
||||
this.view.customStyle.text = val
|
||||
this.view.title = val.title
|
||||
this.save()
|
||||
},
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user