Unverified 提交 7b0a6183 authored 作者: XiaJunjie2020's avatar XiaJunjie2020 提交者: GitHub

Merge pull request #182 from dataease/pr@dev@feat_数据集编辑字段,增加维度_指标选项,而非老版本中通过字段类型判定

feat: 数据集编辑字段,增加维度指标选项,而非老版本中通过字段类型判定
......@@ -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;
......
......@@ -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;
......
......@@ -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}
......
......@@ -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);
}
}
......
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;
\ No newline at end of file
......@@ -74,7 +74,7 @@
<!-- </table>-->
<!-- <table tableName="v_dataset"/>-->
<!-- <table tableName="sys_auth_detail"/>-->
<table tableName="panel_view"/>
<table tableName="dataset_table_field"/>
</context>
......
<?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>
......@@ -920,7 +920,9 @@ export default {
m2: ' To',
char_can_not_more_50: 'Dataset name can not more 50',
task_add_title: 'Add Task',
task_edit_title: 'Edit Task'
task_edit_title: 'Edit Task',
field_group_type: 'Type',
location: 'Location'
},
datasource: {
datasource: 'Data Source',
......
......@@ -920,7 +920,9 @@ export default {
m2: ' 移動到',
char_can_not_more_50: '數據集名稱不能超過50個字符',
task_add_title: '添加任務',
task_edit_title: '編輯任務'
task_edit_title: '編輯任務',
field_group_type: '分類',
location: '地理位置'
},
datasource: {
datasource: '數據源',
......
......@@ -920,7 +920,9 @@ export default {
m2: ' 移动到',
char_can_not_more_50: '数据集名称不能超过50个字符',
task_add_title: '添加任务',
task_edit_title: '编辑任务'
task_edit_title: '编辑任务',
field_group_type: '分类',
location: '地理位置'
},
datasource: {
datasource: '数据源',
......
......@@ -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;
......
<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">
......
<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>
......
......@@ -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>
......
......@@ -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'
......
......@@ -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>
......
......@@ -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>
......
......@@ -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>
......@@ -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>
......
......@@ -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 }}
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论