Merge branch 'dev' into pr@dev@taskmgm

This commit is contained in:
taojinlong 2021-07-08 14:17:00 +08:00 committed by GitHub
commit 83b56beeb4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
23 changed files with 375 additions and 33 deletions

View File

@ -18,14 +18,20 @@ public class DatasetTableField implements Serializable {
private String dataeaseName;
private String groupType;
private String type;
private Integer size;
private Integer deType;
private Integer deTypeFormat;
private Integer deExtractType;
private Integer extField;
private Boolean checked;
private Integer columnIndex;

View File

@ -454,6 +454,76 @@ public class DatasetTableFieldExample {
return (Criteria) this;
}
public Criteria andGroupTypeIsNull() {
addCriterion("group_type is null");
return (Criteria) this;
}
public Criteria andGroupTypeIsNotNull() {
addCriterion("group_type is not null");
return (Criteria) this;
}
public Criteria andGroupTypeEqualTo(String value) {
addCriterion("group_type =", value, "groupType");
return (Criteria) this;
}
public Criteria andGroupTypeNotEqualTo(String value) {
addCriterion("group_type <>", value, "groupType");
return (Criteria) this;
}
public Criteria andGroupTypeGreaterThan(String value) {
addCriterion("group_type >", value, "groupType");
return (Criteria) this;
}
public Criteria andGroupTypeGreaterThanOrEqualTo(String value) {
addCriterion("group_type >=", value, "groupType");
return (Criteria) this;
}
public Criteria andGroupTypeLessThan(String value) {
addCriterion("group_type <", value, "groupType");
return (Criteria) this;
}
public Criteria andGroupTypeLessThanOrEqualTo(String value) {
addCriterion("group_type <=", value, "groupType");
return (Criteria) this;
}
public Criteria andGroupTypeLike(String value) {
addCriterion("group_type like", value, "groupType");
return (Criteria) this;
}
public Criteria andGroupTypeNotLike(String value) {
addCriterion("group_type not like", value, "groupType");
return (Criteria) this;
}
public Criteria andGroupTypeIn(List<String> values) {
addCriterion("group_type in", values, "groupType");
return (Criteria) this;
}
public Criteria andGroupTypeNotIn(List<String> values) {
addCriterion("group_type not in", values, "groupType");
return (Criteria) this;
}
public Criteria andGroupTypeBetween(String value1, String value2) {
addCriterion("group_type between", value1, value2, "groupType");
return (Criteria) this;
}
public Criteria andGroupTypeNotBetween(String value1, String value2) {
addCriterion("group_type not between", value1, value2, "groupType");
return (Criteria) this;
}
public Criteria andTypeIsNull() {
addCriterion("`type` is null");
return (Criteria) this;
@ -644,6 +714,66 @@ public class DatasetTableFieldExample {
return (Criteria) this;
}
public Criteria andDeTypeFormatIsNull() {
addCriterion("de_type_format is null");
return (Criteria) this;
}
public Criteria andDeTypeFormatIsNotNull() {
addCriterion("de_type_format is not null");
return (Criteria) this;
}
public Criteria andDeTypeFormatEqualTo(Integer value) {
addCriterion("de_type_format =", value, "deTypeFormat");
return (Criteria) this;
}
public Criteria andDeTypeFormatNotEqualTo(Integer value) {
addCriterion("de_type_format <>", value, "deTypeFormat");
return (Criteria) this;
}
public Criteria andDeTypeFormatGreaterThan(Integer value) {
addCriterion("de_type_format >", value, "deTypeFormat");
return (Criteria) this;
}
public Criteria andDeTypeFormatGreaterThanOrEqualTo(Integer value) {
addCriterion("de_type_format >=", value, "deTypeFormat");
return (Criteria) this;
}
public Criteria andDeTypeFormatLessThan(Integer value) {
addCriterion("de_type_format <", value, "deTypeFormat");
return (Criteria) this;
}
public Criteria andDeTypeFormatLessThanOrEqualTo(Integer value) {
addCriterion("de_type_format <=", value, "deTypeFormat");
return (Criteria) this;
}
public Criteria andDeTypeFormatIn(List<Integer> values) {
addCriterion("de_type_format in", values, "deTypeFormat");
return (Criteria) this;
}
public Criteria andDeTypeFormatNotIn(List<Integer> values) {
addCriterion("de_type_format not in", values, "deTypeFormat");
return (Criteria) this;
}
public Criteria andDeTypeFormatBetween(Integer value1, Integer value2) {
addCriterion("de_type_format between", value1, value2, "deTypeFormat");
return (Criteria) this;
}
public Criteria andDeTypeFormatNotBetween(Integer value1, Integer value2) {
addCriterion("de_type_format not between", value1, value2, "deTypeFormat");
return (Criteria) this;
}
public Criteria andDeExtractTypeIsNull() {
addCriterion("de_extract_type is null");
return (Criteria) this;
@ -704,6 +834,66 @@ public class DatasetTableFieldExample {
return (Criteria) this;
}
public Criteria andExtFieldIsNull() {
addCriterion("ext_field is null");
return (Criteria) this;
}
public Criteria andExtFieldIsNotNull() {
addCriterion("ext_field is not null");
return (Criteria) this;
}
public Criteria andExtFieldEqualTo(Integer value) {
addCriterion("ext_field =", value, "extField");
return (Criteria) this;
}
public Criteria andExtFieldNotEqualTo(Integer value) {
addCriterion("ext_field <>", value, "extField");
return (Criteria) this;
}
public Criteria andExtFieldGreaterThan(Integer value) {
addCriterion("ext_field >", value, "extField");
return (Criteria) this;
}
public Criteria andExtFieldGreaterThanOrEqualTo(Integer value) {
addCriterion("ext_field >=", value, "extField");
return (Criteria) this;
}
public Criteria andExtFieldLessThan(Integer value) {
addCriterion("ext_field <", value, "extField");
return (Criteria) this;
}
public Criteria andExtFieldLessThanOrEqualTo(Integer value) {
addCriterion("ext_field <=", value, "extField");
return (Criteria) this;
}
public Criteria andExtFieldIn(List<Integer> values) {
addCriterion("ext_field in", values, "extField");
return (Criteria) this;
}
public Criteria andExtFieldNotIn(List<Integer> values) {
addCriterion("ext_field not in", values, "extField");
return (Criteria) this;
}
public Criteria andExtFieldBetween(Integer value1, Integer value2) {
addCriterion("ext_field between", value1, value2, "extField");
return (Criteria) this;
}
public Criteria andExtFieldNotBetween(Integer value1, Integer value2) {
addCriterion("ext_field not between", value1, value2, "extField");
return (Criteria) this;
}
public Criteria andCheckedIsNull() {
addCriterion("`checked` is null");
return (Criteria) this;

View File

@ -7,10 +7,13 @@
<result column="origin_name" jdbcType="VARCHAR" property="originName" />
<result column="name" jdbcType="VARCHAR" property="name" />
<result column="dataease_name" jdbcType="VARCHAR" property="dataeaseName" />
<result column="group_type" jdbcType="VARCHAR" property="groupType" />
<result column="type" jdbcType="VARCHAR" property="type" />
<result column="size" jdbcType="INTEGER" property="size" />
<result column="de_type" jdbcType="INTEGER" property="deType" />
<result column="de_type_format" jdbcType="INTEGER" property="deTypeFormat" />
<result column="de_extract_type" jdbcType="INTEGER" property="deExtractType" />
<result column="ext_field" jdbcType="INTEGER" property="extField" />
<result column="checked" jdbcType="BIT" property="checked" />
<result column="column_index" jdbcType="INTEGER" property="columnIndex" />
<result column="last_sync_time" jdbcType="BIGINT" property="lastSyncTime" />
@ -74,8 +77,8 @@
</where>
</sql>
<sql id="Base_Column_List">
id, table_id, origin_name, `name`, dataease_name, `type`, `size`, de_type, de_extract_type,
`checked`, column_index, last_sync_time
id, table_id, origin_name, `name`, dataease_name, group_type, `type`, `size`, de_type,
de_type_format, de_extract_type, ext_field, `checked`, column_index, last_sync_time
</sql>
<select id="selectByExample" parameterType="io.dataease.base.domain.DatasetTableFieldExample" resultMap="BaseResultMap">
select
@ -109,13 +112,15 @@
</delete>
<insert id="insert" parameterType="io.dataease.base.domain.DatasetTableField">
insert into dataset_table_field (id, table_id, origin_name,
`name`, dataease_name, `type`,
`size`, de_type, de_extract_type,
`name`, dataease_name, group_type,
`type`, `size`, de_type,
de_type_format, de_extract_type, ext_field,
`checked`, column_index, last_sync_time
)
values (#{id,jdbcType=VARCHAR}, #{tableId,jdbcType=VARCHAR}, #{originName,jdbcType=VARCHAR},
#{name,jdbcType=VARCHAR}, #{dataeaseName,jdbcType=VARCHAR}, #{type,jdbcType=VARCHAR},
#{size,jdbcType=INTEGER}, #{deType,jdbcType=INTEGER}, #{deExtractType,jdbcType=INTEGER},
#{name,jdbcType=VARCHAR}, #{dataeaseName,jdbcType=VARCHAR}, #{groupType,jdbcType=VARCHAR},
#{type,jdbcType=VARCHAR}, #{size,jdbcType=INTEGER}, #{deType,jdbcType=INTEGER},
#{deTypeFormat,jdbcType=INTEGER}, #{deExtractType,jdbcType=INTEGER}, #{extField,jdbcType=INTEGER},
#{checked,jdbcType=BIT}, #{columnIndex,jdbcType=INTEGER}, #{lastSyncTime,jdbcType=BIGINT}
)
</insert>
@ -137,6 +142,9 @@
<if test="dataeaseName != null">
dataease_name,
</if>
<if test="groupType != null">
group_type,
</if>
<if test="type != null">
`type`,
</if>
@ -146,9 +154,15 @@
<if test="deType != null">
de_type,
</if>
<if test="deTypeFormat != null">
de_type_format,
</if>
<if test="deExtractType != null">
de_extract_type,
</if>
<if test="extField != null">
ext_field,
</if>
<if test="checked != null">
`checked`,
</if>
@ -175,6 +189,9 @@
<if test="dataeaseName != null">
#{dataeaseName,jdbcType=VARCHAR},
</if>
<if test="groupType != null">
#{groupType,jdbcType=VARCHAR},
</if>
<if test="type != null">
#{type,jdbcType=VARCHAR},
</if>
@ -184,9 +201,15 @@
<if test="deType != null">
#{deType,jdbcType=INTEGER},
</if>
<if test="deTypeFormat != null">
#{deTypeFormat,jdbcType=INTEGER},
</if>
<if test="deExtractType != null">
#{deExtractType,jdbcType=INTEGER},
</if>
<if test="extField != null">
#{extField,jdbcType=INTEGER},
</if>
<if test="checked != null">
#{checked,jdbcType=BIT},
</if>
@ -222,6 +245,9 @@
<if test="record.dataeaseName != null">
dataease_name = #{record.dataeaseName,jdbcType=VARCHAR},
</if>
<if test="record.groupType != null">
group_type = #{record.groupType,jdbcType=VARCHAR},
</if>
<if test="record.type != null">
`type` = #{record.type,jdbcType=VARCHAR},
</if>
@ -231,9 +257,15 @@
<if test="record.deType != null">
de_type = #{record.deType,jdbcType=INTEGER},
</if>
<if test="record.deTypeFormat != null">
de_type_format = #{record.deTypeFormat,jdbcType=INTEGER},
</if>
<if test="record.deExtractType != null">
de_extract_type = #{record.deExtractType,jdbcType=INTEGER},
</if>
<if test="record.extField != null">
ext_field = #{record.extField,jdbcType=INTEGER},
</if>
<if test="record.checked != null">
`checked` = #{record.checked,jdbcType=BIT},
</if>
@ -255,10 +287,13 @@
origin_name = #{record.originName,jdbcType=VARCHAR},
`name` = #{record.name,jdbcType=VARCHAR},
dataease_name = #{record.dataeaseName,jdbcType=VARCHAR},
group_type = #{record.groupType,jdbcType=VARCHAR},
`type` = #{record.type,jdbcType=VARCHAR},
`size` = #{record.size,jdbcType=INTEGER},
de_type = #{record.deType,jdbcType=INTEGER},
de_type_format = #{record.deTypeFormat,jdbcType=INTEGER},
de_extract_type = #{record.deExtractType,jdbcType=INTEGER},
ext_field = #{record.extField,jdbcType=INTEGER},
`checked` = #{record.checked,jdbcType=BIT},
column_index = #{record.columnIndex,jdbcType=INTEGER},
last_sync_time = #{record.lastSyncTime,jdbcType=BIGINT}
@ -281,6 +316,9 @@
<if test="dataeaseName != null">
dataease_name = #{dataeaseName,jdbcType=VARCHAR},
</if>
<if test="groupType != null">
group_type = #{groupType,jdbcType=VARCHAR},
</if>
<if test="type != null">
`type` = #{type,jdbcType=VARCHAR},
</if>
@ -290,9 +328,15 @@
<if test="deType != null">
de_type = #{deType,jdbcType=INTEGER},
</if>
<if test="deTypeFormat != null">
de_type_format = #{deTypeFormat,jdbcType=INTEGER},
</if>
<if test="deExtractType != null">
de_extract_type = #{deExtractType,jdbcType=INTEGER},
</if>
<if test="extField != null">
ext_field = #{extField,jdbcType=INTEGER},
</if>
<if test="checked != null">
`checked` = #{checked,jdbcType=BIT},
</if>
@ -311,10 +355,13 @@
origin_name = #{originName,jdbcType=VARCHAR},
`name` = #{name,jdbcType=VARCHAR},
dataease_name = #{dataeaseName,jdbcType=VARCHAR},
group_type = #{groupType,jdbcType=VARCHAR},
`type` = #{type,jdbcType=VARCHAR},
`size` = #{size,jdbcType=INTEGER},
de_type = #{deType,jdbcType=INTEGER},
de_type_format = #{deTypeFormat,jdbcType=INTEGER},
de_extract_type = #{deExtractType,jdbcType=INTEGER},
ext_field = #{extField,jdbcType=INTEGER},
`checked` = #{checked,jdbcType=BIT},
column_index = #{columnIndex,jdbcType=INTEGER},
last_sync_time = #{lastSyncTime,jdbcType=BIGINT}

View File

@ -242,7 +242,7 @@ public class DataSetTableService {
List<DatasetTableField> quota = new ArrayList<>();
fields.forEach(field -> {
if (field.getDeType() == 2 || field.getDeType() == 3) {
if (StringUtils.equalsIgnoreCase("q", field.getGroupType())) {
quota.add(field);
} else {
dimension.add(field);
@ -259,6 +259,8 @@ public class DataSetTableService {
.checked(true)
.columnIndex(999)
.deType(2)
.extField(1)
.groupType("q")
.build();
quota.add(count);
@ -694,6 +696,8 @@ public class DataSetTableService {
datasetTableField.setChecked(true);
datasetTableField.setColumnIndex(i);
datasetTableField.setLastSyncTime(syncTime);
datasetTableField.setExtField(0);
datasetTableField.setGroupType(datasetTableField.getDeType() < 2 ? "d" : "q");
dataSetTableFieldsService.save(datasetTableField);
}
}

View File

@ -0,0 +1,7 @@
ALTER TABLE `dataset_table_field` ADD COLUMN `group_type` VARCHAR(50) COMMENT '维度/指标标识 d:维度q:指标' AFTER `dataease_name`;
ALTER TABLE `dataset_table_field` ADD COLUMN `de_type_format` int(10) COMMENT '类型格式' AFTER `de_type`;
ALTER TABLE `dataset_table_field` ADD COLUMN `ext_field` int(10) COMMENT '是否扩展字段 0否 1是' AFTER `de_extract_type`;
UPDATE `dataset_table_field` SET group_type='d' where `de_type` IN (0,1);
UPDATE `dataset_table_field` SET group_type='q' where `de_type` IN (2,3);
UPDATE `dataset_table_field` SET ext_field=0;

View File

@ -74,7 +74,7 @@
<!-- </table>-->
<!-- <table tableName="v_dataset"/>-->
<!-- <table tableName="sys_auth_detail"/>-->
<table tableName="dataset_table_task_log"/>
<table tableName="dataset_table_field"/>
</context>

View File

@ -94,6 +94,7 @@ export default {
this.deleteCurCondition()
this.$store.commit('deleteComponent')
this.$store.commit('recordSnapshot')
this.$store.commit('setCurComponent', { component: null, index: null })
},
deleteCurCondition() {

View File

@ -28,7 +28,7 @@
class-name-active="de-drag-active"
:class="{'gap_class':canvasStyleData.panel.gap==='yes'}"
:snap="true"
:snap-tolerance="1"
:snap-tolerance="2"
:change-style="customStyle"
@refLineParams="getRefLineParams"
>
@ -84,6 +84,12 @@
height: item.lineLength,
}"
/>
<span
v-for="(item, index) in hLine"
:key="'h_'+index"
class="ref-line h-line"
:style="{ top: item.position, left: item.origin, width: item.lineLength }"
/>
</div>
</template>
@ -521,7 +527,7 @@ export default {
}
},
getRefLineParams(params) {
// console.log(params)
// console.log(JSON.stringify(params))
const { vLine, hLine } = params
this.vLine = vLine
this.hLine = hLine

View File

@ -0,0 +1 @@
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1625718978594" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2291" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><defs><style type="text/css"></style></defs><path d="M512 1.92c223.850667 0 405.333333 179.072 405.333333 400 0 162.837333-118.058667 355.221333-354.197333 577.130667a74.666667 74.666667 0 0 1-102.272 0l-10.666667-10.069334C221.205333 751.317333 106.666667 562.304 106.666667 401.898667 106.666667 180.992 288.149333 1.92 512 1.92z m0 64c-188.693333 0-341.333333 150.613333-341.333333 336 0 141.034667 109.546667 319.530667 334.037333 530.474667a10.666667 10.666667 0 0 0 14.592 0l10.282667-9.706667C747.136 715.968 853.333333 540.8 853.333333 401.898667c0-185.386667-152.64-336-341.333333-336z m0 170.666667a170.666667 170.666667 0 1 1 0 341.333333 170.666667 170.666667 0 0 1 0-341.333333z m0 64a106.666667 106.666667 0 1 0 0 213.333333 106.666667 106.666667 0 0 0 0-213.333333z" p-id="2292"></path></svg>

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

@ -129,6 +129,7 @@ export default {
password_error: 'The password can not be less than 8 digits'
},
commons: {
success: 'Success',
switch_lang: 'Switch Language Success',
close: 'Close',
icon: 'Icon',
@ -936,7 +937,9 @@ export default {
exec: 'Execute',
confirm_exec: 'Manual trigger execution',
change_success: 'State switch successful'
}
},
field_group_type: 'Type',
location: 'Location'
},
datasource: {
datasource: 'Data Source',

View File

@ -129,6 +129,7 @@ export default {
password_error: '密碼不小於 8 位'
},
commons: {
success: '成功',
switch_lang: '切換語言成功',
close: '關閉',
icon: '圖標',
@ -936,7 +937,9 @@ export default {
exec: '執行',
confirm_exec: '手動觸發執行?',
change_success: '狀態切換成功'
}
},
field_group_type: '分類',
location: '地理位置'
},
datasource: {
datasource: '數據源',

View File

@ -129,6 +129,7 @@ export default {
password_error: '密码不小于 8 位'
},
commons: {
success: '成功',
switch_lang: '切换语言成功',
close: '关闭',
icon: '图标',
@ -936,7 +937,9 @@ export default {
exec: '执行',
confirm_exec: '手动触发执行?',
change_success: '状态切换成功'
}
},
field_group_type: '分类',
location: '地理位置'
},
datasource: {
datasource: '数据源',

View File

@ -195,7 +195,7 @@ div:focus {
.el-table__row {
:hover {
cursor: pointer;
}
}
}
td {
padding: 3px 0 !important;
@ -235,6 +235,10 @@ div:focus {
@extend %field-icon;
color: #37b4aa;
}
.field-icon-location{
@extend %field-icon;
color: #F56C6C;
}
.ds-icon-scene{
width: 13px;
height: 13px;

View File

@ -1,12 +1,23 @@
<template>
<span>
<el-tag v-if="!hasDataPermission('manage',param.privileges)" size="small" class="item-axis">
<span style="float: left">
<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" />
<svg-icon v-if="item.deType === 5" icon-class="field_location" class="field-icon-location" />
</span>
<span>{{ item.name }}</span>
<span v-if="item.summary" class="summary-span">{{ $t('chart.'+item.summary) }}</span>
</el-tag>
<el-dropdown v-else trigger="click" size="mini" @command="clickItem">
<span class="el-dropdown-link">
<el-tag size="small" class="item-axis">
<span style="float: left">
<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" />
<svg-icon v-if="item.deType === 5" icon-class="field_location" class="field-icon-location" />
</span>
{{ item.name }}<i class="el-icon-arrow-down el-icon--right" />
</el-tag>
<el-dropdown-menu slot="dropdown">

View File

@ -1,12 +1,24 @@
<template>
<span>
<el-tag v-if="!hasDataPermission('manage',param.privileges)" size="small" class="item-axis">
<span style="float: left">
<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" />
<svg-icon v-if="item.deType === 5" icon-class="field_location" class="field-icon-location" />
</span>
<span>{{ item.name }}</span>
<span v-if="item.summary" class="summary-span">{{ $t('chart.'+item.summary) }}</span>
</el-tag>
<el-dropdown v-else trigger="click" size="mini" @command="clickItem">
<span class="el-dropdown-link">
<el-tag size="small" class="item-axis">
<span style="float: left">
<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" />
<svg-icon v-if="item.deType === 5" icon-class="field_location" class="field-icon-location" />
</span>
<span>{{ item.name }}</span>
<span v-if="item.summary" class="summary-span">{{ $t('chart.'+item.summary) }}</span>
<i class="el-icon-arrow-down el-icon--right" />
@ -23,13 +35,13 @@
<i class="el-icon-arrow-right el-icon--right" />
</span>
<el-dropdown-menu slot="dropdown">
<el-dropdown-item v-if="item.id === 'count'" :command="beforeSummary('count')">{{ $t('chart.count') }}</el-dropdown-item>
<el-dropdown-item v-if="item.id !== 'count'" :command="beforeSummary('sum')">{{ $t('chart.sum') }}</el-dropdown-item>
<el-dropdown-item v-if="item.id !== 'count'" :command="beforeSummary('avg')">{{ $t('chart.avg') }}</el-dropdown-item>
<el-dropdown-item v-if="item.id !== 'count'" :command="beforeSummary('max')">{{ $t('chart.max') }}</el-dropdown-item>
<el-dropdown-item v-if="item.id !== 'count'" :command="beforeSummary('min')">{{ $t('chart.min') }}</el-dropdown-item>
<el-dropdown-item v-if="item.id !== 'count'" :command="beforeSummary('stddev_pop')">{{ $t('chart.stddev_pop') }}</el-dropdown-item>
<el-dropdown-item v-if="item.id !== 'count'" :command="beforeSummary('var_pop')">{{ $t('chart.var_pop') }}</el-dropdown-item>
<el-dropdown-item v-if="item.id === 'count' || item.deType === 0 || item.deType === 1" :command="beforeSummary('count')">{{ $t('chart.count') }}</el-dropdown-item>
<el-dropdown-item v-if="item.id !== 'count' && item.deType !== 0 && item.deType !== 1" :command="beforeSummary('sum')">{{ $t('chart.sum') }}</el-dropdown-item>
<el-dropdown-item v-if="item.id !== 'count' && item.deType !== 0 && item.deType !== 1" :command="beforeSummary('avg')">{{ $t('chart.avg') }}</el-dropdown-item>
<el-dropdown-item v-if="item.id !== 'count' && item.deType !== 0 && item.deType !== 1" :command="beforeSummary('max')">{{ $t('chart.max') }}</el-dropdown-item>
<el-dropdown-item v-if="item.id !== 'count' && item.deType !== 0 && item.deType !== 1" :command="beforeSummary('min')">{{ $t('chart.min') }}</el-dropdown-item>
<el-dropdown-item v-if="item.id !== 'count' && item.deType !== 0 && item.deType !== 1" :command="beforeSummary('stddev_pop')">{{ $t('chart.stddev_pop') }}</el-dropdown-item>
<el-dropdown-item v-if="item.id !== 'count' && item.deType !== 0 && item.deType !== 1" :command="beforeSummary('var_pop')">{{ $t('chart.var_pop') }}</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
</el-dropdown-item>

View File

@ -15,6 +15,7 @@
<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" />
<svg-icon v-if="item.deType === 5" icon-class="field_location" class="field-icon-location" />
</span>
<span style="float: left; color: #8492a6; font-size: 12px">{{ item.name }}</span>
</el-option>

View File

@ -56,6 +56,7 @@
<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" />
<svg-icon v-if="item.deType === 5" icon-class="field_location" class="field-icon-location" />
{{ item.name }}
</span>
</transition-group>
@ -78,6 +79,7 @@
<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" />
<svg-icon v-if="item.deType === 5" icon-class="field_location" class="field-icon-location" />
<span>{{ item.name }}</span>
</span>
</transition-group>
@ -503,9 +505,9 @@ export default {
},
watch: {
'param': function() {
if(this.param.optType === 'new'){
if (this.param.optType === 'new') {
}else{
} else {
this.getData(this.param.id)
}
},
@ -582,7 +584,7 @@ export default {
})
view.yaxis.forEach(function(ele) {
if (!ele.summary || ele.summary === '') {
if (ele.id === 'count') {
if (ele.id === 'count' || ele.deType === 0 || ele.deType === 1) {
ele.summary = 'count'
} else {
ele.summary = 'sum'

View File

@ -18,6 +18,9 @@
<span v-if="f.deType === 2 || f.deType === 3">
<svg-icon v-if="f.deType === 2 || f.deType === 3" icon-class="field_value" class="field-icon-value" />
</span>
<span v-if="f.deType === 5">
<svg-icon v-if="f.deType === 5" icon-class="field_location" class="field-icon-location" />
</span>
</span>
<span style="display: flex;flex: 1;width: 100%;">
<span style="text-overflow: ellipsis;white-space: nowrap;overflow: hidden;width: 160px;">{{ f.name }}</span>

View File

@ -21,6 +21,7 @@
<svg-icon v-if="field.deType === 0" icon-class="field_text" class="field-icon-text" />
<svg-icon v-if="field.deType === 1" icon-class="field_time" class="field-icon-time" />
<svg-icon v-if="field.deType === 2 || field.deType === 3" icon-class="field_value" class="field-icon-value" />
<svg-icon v-if="field.deType === 5" icon-class="field_location" class="field-icon-location" />
<span>{{ field.name }}</span>
</template>
</ux-table-column>

View File

@ -25,6 +25,7 @@
<svg-icon v-if="item.value === 0" icon-class="field_text" class="field-icon-text" />
<svg-icon v-if="item.value === 1" icon-class="field_time" class="field-icon-time" />
<svg-icon v-if="item.value === 2 || item.value === 3" icon-class="field_value" class="field-icon-value" />
<svg-icon v-if="item.value === 5" icon-class="field_location" class="field-icon-location" />
</span>
<span style="float: left; color: #8492a6; font-size: 12px">{{ item.label }}</span>
</el-option>
@ -43,10 +44,14 @@
<span v-if="scope.row.deType === 2" class="field-class">{{ $t('dataset.value') }}</span>
<span v-if="scope.row.deType === 3" class="field-class">{{ $t('dataset.value') + '(' + $t('dataset.float') + ')' }}</span>
</span>
<span v-if="scope.row.deType === 5">
<svg-icon v-if="scope.row.deType === 5" icon-class="field_location" class="field-icon-location" />
<span class="field-class">{{ $t('dataset.location') }}</span>
</span>
</span>
</template>
</el-table-column>
<el-table-column property="deExtractType" :label="$t('dataset.origin_field_type')" width="140">
<el-table-column property="deExtractType" :label="$t('dataset.origin_field_type')" width="100">
<template slot-scope="scope">
<span>
<span v-if="scope.row.deExtractType === 0">
@ -62,6 +67,10 @@
<span v-if="scope.row.deExtractType === 2 || scope.row.deExtractType === 4" class="field-class">{{ $t('dataset.value') }}</span>
<span v-if="scope.row.deExtractType === 3" class="field-class">{{ $t('dataset.value') + '(' + $t('dataset.float') + ')' }}</span>
</span>
<span v-if="scope.row.deExtractType === 5">
<svg-icon v-if="scope.row.deExtractType === 5" icon-class="field_location" class="field-icon-location" />
<span class="field-class">{{ $t('dataset.location') }}</span>
</span>
</span>
</template>
</el-table-column>
@ -70,7 +79,21 @@
<el-input v-model="scope.row.name" size="mini" />
</template>
</el-table-column>
<el-table-column property="originName" :label="$t('dataset.field_origin_name')" width="180" />
<el-table-column property="originName" :label="$t('dataset.field_origin_name')" width="100">
<template slot-scope="scope">
<span :title="scope.row.originName" class="field-class" style="display: inline-block;width: 100%;white-space: nowrap;overflow: hidden;text-overflow: ellipsis;">
{{ scope.row.originName }}
</span>
</template>
</el-table-column>
<el-table-column property="groupType" :label="$t('dataset.field_group_type')" width="180">
<template slot-scope="scope">
<el-radio-group v-model="scope.row.groupType">
<el-radio label="d">{{ $t('chart.dimension') }}</el-radio>
<el-radio label="q">{{ $t('chart.quota') }}</el-radio>
</el-radio-group>
</template>
</el-table-column>
<el-table-column property="checked" :label="$t('dataset.field_check')" width="80">
<template slot-scope="scope">
<el-checkbox v-model="scope.row.checked" />
@ -100,7 +123,8 @@ export default {
{ label: this.$t('dataset.text'), value: 0 },
{ label: this.$t('dataset.time'), value: 1 },
{ label: this.$t('dataset.value'), value: 2 },
{ label: this.$t('dataset.value') + '(' + this.$t('dataset.float') + ')', value: 3 }
{ label: this.$t('dataset.value') + '(' + this.$t('dataset.float') + ')', value: 3 },
{ label: this.$t('dataset.location'), value: 5 }
]
}
},
@ -135,7 +159,7 @@ export default {
},
closeEdit() {
this.$emit('switchComponent', { name: 'ViewTable', param: this.param.table.id })
this.$emit('switchComponent', { name: 'ViewTable', param: this.param.table })
}
}
}
@ -157,4 +181,7 @@ export default {
.el-select>>>.el-input__suffix{
right: 0;
}
.el-radio{
margin-right: 10px !important;
}
</style>

View File

@ -31,6 +31,7 @@
<svg-icon v-if="field.deType === 0" icon-class="field_text" class="field-icon-text" />
<svg-icon v-if="field.deType === 1" icon-class="field_time" class="field-icon-time" />
<svg-icon v-if="field.deType === 2 || field.deType === 3" icon-class="field_value" class="field-icon-value" />
<svg-icon v-if="field.deType === 5" icon-class="field_location" class="field-icon-location" />
<span>{{ field.name }}</span>
</template>
</ux-table-column>

View File

@ -69,6 +69,9 @@
<span v-if="item.deType === 2 || item.deType === 3">
<svg-icon v-if="item.deType === 2 || item.deType === 3" icon-class="field_value" class="field-icon-value" />
</span>
<span v-if="item.deType === 5">
<svg-icon v-if="item.deType === 5" icon-class="field_location" class="field-icon-location" />
</span>
</span>
<span>
{{ item.name }}
@ -115,6 +118,9 @@
<span v-if="item.deType === 2 || item.deType === 3">
<svg-icon v-if="item.deType === 2 || item.deType === 3" icon-class="field_value" class="field-icon-value" />
</span>
<span v-if="item.deType === 5">
<svg-icon v-if="item.deType === 5" icon-class="field_location" class="field-icon-location" />
</span>
</span>
<span>
{{ item.name }}

View File

@ -101,8 +101,7 @@ export default {
'configuration.username': [{ required: true, message: this.$t('datasource.please_input_user_name'), trigger: 'blur' }],
'configuration.password': [{ required: true, message: this.$t('datasource.please_input_password'), trigger: 'change' }],
'configuration.host': [{ required: true, message: this.$t('datasource.please_input_host'), trigger: 'change' }],
'configuration.port': [{ required: true, message: this.$t('datasource.please_input_port'), trigger: 'change' }],
'configuration.schema': [{ required: true, message: this.$t('datasource.please_choose_schema'), trigger: 'change' }]
'configuration.port': [{ required: true, message: this.$t('datasource.please_input_port'), trigger: 'change' }]
},
allTypes: [{ name: 'mysql', label: 'MySQL', type: 'jdbc' }, { name: 'oracle', label: 'Oracle', type: 'jdbc' }],
schemas: [],
@ -148,7 +147,7 @@ export default {
this.$refs.dsForm.resetFields()
},
save() {
if (!this.form.configuration.schema) {
if (!this.form.configuration.schema && this.form.type === 'oracle') {
this.$message.error(this.$t('datasource.please_choose_schema'))
return
}
@ -174,7 +173,7 @@ export default {
data.configuration = JSON.stringify(data.configuration)
getSchema(data).then(res => {
this.schemas = res.data
this.$success(this.$t('datasource.validate_success'))
this.$success(this.$t('commons.success'))
})
} else {
return false
@ -182,6 +181,10 @@ export default {
})
},
validaDatasource() {
if (!this.form.configuration.schema && this.form.type === 'oracle') {
this.$message.error(this.$t('datasource.please_choose_schema'))
return
}
this.$refs.dsForm.validate(valid => {
if (valid) {
const data = JSON.parse(JSON.stringify(this.form))