forked from github/dataease
Merge branch 'dev' into pr@dev_memory_component
This commit is contained in:
commit
198872f3e2
@ -167,7 +167,7 @@ public class EmailTaskHandler extends TaskHandler implements Job {
|
||||
try {
|
||||
XpackEmailTemplateDTO emailTemplateDTO = emailXpackService.emailTemplate(taskInstance.getTaskId());
|
||||
XpackEmailTaskRequest taskForm = emailXpackService.taskForm(taskInstance.getTaskId());
|
||||
if (ObjectUtils.isEmpty(taskForm) || (!isTempTask && (CronUtils.taskExpire(taskForm.getEndTime()) || !taskForm.getStatus()))) {
|
||||
if (ObjectUtils.isEmpty(taskForm) || (!isTempTask && (CronUtils.taskExpire(taskForm.getEndTime()) || !emailXpackService.status(taskInstance.getTaskId())))) {
|
||||
removeInstance(taskInstance);
|
||||
return;
|
||||
}
|
||||
|
@ -20,6 +20,7 @@ import io.dataease.plugins.common.request.permission.DatasetRowPermissionsTreeIt
|
||||
import io.dataease.plugins.datasource.entity.Dateformat;
|
||||
import io.dataease.plugins.datasource.entity.PageInfo;
|
||||
import io.dataease.plugins.datasource.query.QueryProvider;
|
||||
import io.dataease.plugins.datasource.query.Utils;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.apache.commons.lang3.ObjectUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
@ -27,7 +28,6 @@ import org.springframework.stereotype.Service;
|
||||
import org.stringtemplate.v4.ST;
|
||||
import org.stringtemplate.v4.STGroup;
|
||||
import org.stringtemplate.v4.STGroupFile;
|
||||
import io.dataease.plugins.datasource.query.Utils;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.text.MessageFormat;
|
||||
@ -1141,8 +1141,12 @@ public class MysqlQueryProvider extends QueryProvider {
|
||||
switch (dateStyle) {
|
||||
case "y":
|
||||
return "%Y";
|
||||
case "y_Q":
|
||||
return "CONCAT(%s,'" + split + "',%s)";
|
||||
case "y_M":
|
||||
return "%Y" + split + "%m";
|
||||
case "y_W":
|
||||
return "%Y" + split + "%u";
|
||||
case "y_M_d":
|
||||
return "%Y" + split + "%m" + split + "%d";
|
||||
case "H_m_s":
|
||||
@ -1163,7 +1167,13 @@ public class MysqlQueryProvider extends QueryProvider {
|
||||
fieldName = String.format(MysqlConstants.UNIX_TIMESTAMP, originField) + "*1000";
|
||||
} else if (x.getDeType() == 1) {
|
||||
String format = transDateFormat(x.getDateStyle(), x.getDatePattern());
|
||||
fieldName = String.format(MysqlConstants.DATE_FORMAT, originField, format);
|
||||
if (StringUtils.equalsIgnoreCase(x.getDateStyle(), "y_Q")) {
|
||||
fieldName = String.format(format,
|
||||
String.format(MysqlConstants.DATE_FORMAT, originField, "%Y"),
|
||||
String.format(MysqlConstants.QUARTER, originField));
|
||||
} else {
|
||||
fieldName = String.format(MysqlConstants.DATE_FORMAT, originField, format);
|
||||
}
|
||||
} else {
|
||||
fieldName = originField;
|
||||
}
|
||||
@ -1171,11 +1181,23 @@ public class MysqlQueryProvider extends QueryProvider {
|
||||
if (x.getDeType() == 1) {
|
||||
String format = transDateFormat(x.getDateStyle(), x.getDatePattern());
|
||||
if (x.getDeExtractType() == 0) {
|
||||
fieldName = String.format(MysqlConstants.DATE_FORMAT, originField, format);
|
||||
if (StringUtils.equalsIgnoreCase(x.getDateStyle(), "y_Q")) {
|
||||
fieldName = String.format(format,
|
||||
String.format(MysqlConstants.DATE_FORMAT, String.format(MysqlConstants.STR_TO_DATE, originField, MysqlConstants.DEFAULT_DATE_FORMAT), "%Y"),
|
||||
String.format(MysqlConstants.QUARTER, String.format(MysqlConstants.STR_TO_DATE, originField, MysqlConstants.DEFAULT_DATE_FORMAT)));
|
||||
} else {
|
||||
fieldName = String.format(MysqlConstants.DATE_FORMAT, originField, format);
|
||||
}
|
||||
} else {
|
||||
String cast = String.format(MysqlConstants.CAST, originField, MysqlConstants.DEFAULT_INT_FORMAT) + "/1000";
|
||||
String from_unixtime = String.format(MysqlConstants.FROM_UNIXTIME, cast, MysqlConstants.DEFAULT_DATE_FORMAT);
|
||||
fieldName = String.format(MysqlConstants.DATE_FORMAT, from_unixtime, format);
|
||||
if (StringUtils.equalsIgnoreCase(x.getDateStyle(), "y_Q")) {
|
||||
fieldName = String.format(format,
|
||||
String.format(MysqlConstants.DATE_FORMAT, from_unixtime, "%Y"),
|
||||
String.format(MysqlConstants.QUARTER, from_unixtime));
|
||||
} else {
|
||||
fieldName = String.format(MysqlConstants.DATE_FORMAT, from_unixtime, format);
|
||||
}
|
||||
}
|
||||
} else if (x.getDeType() == 0 && x.getDeExtractType() == 0) {
|
||||
fieldName = String.format(MysqlConstants.CAST, originField, MysqlConstants.CHAR);
|
||||
|
@ -18,8 +18,8 @@ import io.dataease.plugins.common.dto.sqlObj.SQLObj;
|
||||
import io.dataease.plugins.common.request.chart.ChartExtFilterRequest;
|
||||
import io.dataease.plugins.common.request.permission.DataSetRowPermissionsTreeDTO;
|
||||
import io.dataease.plugins.common.request.permission.DatasetRowPermissionsTreeItem;
|
||||
import io.dataease.plugins.datasource.entity.PageInfo;
|
||||
import io.dataease.plugins.datasource.entity.Dateformat;
|
||||
import io.dataease.plugins.datasource.entity.PageInfo;
|
||||
import io.dataease.plugins.datasource.query.QueryProvider;
|
||||
import io.dataease.plugins.datasource.query.Utils;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
@ -1138,8 +1138,12 @@ public class MysqlQueryProvider extends QueryProvider {
|
||||
switch (dateStyle) {
|
||||
case "y":
|
||||
return "%Y";
|
||||
case "y_Q":
|
||||
return "CONCAT(%s,'" + split + "',%s)";
|
||||
case "y_M":
|
||||
return "%Y" + split + "%m";
|
||||
case "y_W":
|
||||
return "%Y" + split + "%u";
|
||||
case "y_M_d":
|
||||
return "%Y" + split + "%m" + split + "%d";
|
||||
case "H_m_s":
|
||||
@ -1159,13 +1163,25 @@ public class MysqlQueryProvider extends QueryProvider {
|
||||
if (x.getDeType() == 2 || x.getDeType() == 3) {
|
||||
fieldName = String.format(MySQLConstants.UNIX_TIMESTAMP, originField) + "*1000";
|
||||
} else if (x.getDeType() == 1) {
|
||||
String format = transDateFormat(x.getDateStyle(), x.getDatePattern());
|
||||
if (x.getType().equalsIgnoreCase("YEAR")) {
|
||||
fieldName = String.format(MySQLConstants.DATE_FORMAT, "CONCAT(" + originField + ",'-01-01')", transDateFormat(x.getDateStyle(), x.getDatePattern()));
|
||||
if (StringUtils.equalsIgnoreCase(x.getDateStyle(), "y_Q")) {
|
||||
fieldName = String.format(format,
|
||||
String.format(MySQLConstants.DATE_FORMAT, "CONCAT(" + originField + ",'-01-01')", "%Y"),
|
||||
String.format(MySQLConstants.QUARTER, "CONCAT(" + originField + ",'-01-01')"));
|
||||
} else {
|
||||
fieldName = String.format(MySQLConstants.DATE_FORMAT, "CONCAT(" + originField + ",'-01-01')", format);
|
||||
}
|
||||
} else if (x.getType().equalsIgnoreCase("TIME")) {
|
||||
fieldName = String.format(MySQLConstants.DATE_FORMAT, "CONCAT('1970-01-01', " + originField + ")", MySQLConstants.DEFAULT_DATE_FORMAT);
|
||||
} else {
|
||||
String format = transDateFormat(x.getDateStyle(), x.getDatePattern());
|
||||
fieldName = String.format(MySQLConstants.DATE_FORMAT, originField, format);
|
||||
if (StringUtils.equalsIgnoreCase(x.getDateStyle(), "y_Q")) {
|
||||
fieldName = String.format(format,
|
||||
String.format(MySQLConstants.DATE_FORMAT, originField, "%Y"),
|
||||
String.format(MySQLConstants.QUARTER, originField));
|
||||
} else {
|
||||
fieldName = String.format(MySQLConstants.DATE_FORMAT, originField, format);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
fieldName = originField;
|
||||
@ -1174,11 +1190,23 @@ public class MysqlQueryProvider extends QueryProvider {
|
||||
if (x.getDeType() == 1) {
|
||||
String format = transDateFormat(x.getDateStyle(), x.getDatePattern());
|
||||
if (x.getDeExtractType() == 0) {
|
||||
fieldName = String.format(MySQLConstants.DATE_FORMAT, String.format(MySQLConstants.STR_TO_DATE, originField, StringUtils.isNotEmpty(x.getDateFormat()) ? x.getDateFormat() : MysqlConstants.DEFAULT_DATE_FORMAT), format);
|
||||
if (StringUtils.equalsIgnoreCase(x.getDateStyle(), "y_Q")) {
|
||||
fieldName = String.format(format,
|
||||
String.format(MysqlConstants.DATE_FORMAT, String.format(MySQLConstants.STR_TO_DATE, originField, StringUtils.isNotEmpty(x.getDateFormat()) ? x.getDateFormat() : MysqlConstants.DEFAULT_DATE_FORMAT), "%Y"),
|
||||
String.format(MysqlConstants.QUARTER, String.format(MySQLConstants.STR_TO_DATE, originField, StringUtils.isNotEmpty(x.getDateFormat()) ? x.getDateFormat() : MysqlConstants.DEFAULT_DATE_FORMAT)));
|
||||
} else {
|
||||
fieldName = String.format(MySQLConstants.DATE_FORMAT, String.format(MySQLConstants.STR_TO_DATE, originField, StringUtils.isNotEmpty(x.getDateFormat()) ? x.getDateFormat() : MysqlConstants.DEFAULT_DATE_FORMAT), format);
|
||||
}
|
||||
} else {
|
||||
String cast = String.format(MySQLConstants.CAST, originField, MySQLConstants.DEFAULT_INT_FORMAT) + "/1000";
|
||||
String from_unixtime = String.format(MySQLConstants.FROM_UNIXTIME, cast, MySQLConstants.DEFAULT_DATE_FORMAT);
|
||||
fieldName = String.format(MySQLConstants.DATE_FORMAT, from_unixtime, format);
|
||||
if (StringUtils.equalsIgnoreCase(x.getDateStyle(), "y_Q")) {
|
||||
fieldName = String.format(format,
|
||||
String.format(MySQLConstants.DATE_FORMAT, from_unixtime, "%Y"),
|
||||
String.format(MySQLConstants.QUARTER, from_unixtime));
|
||||
} else {
|
||||
fieldName = String.format(MySQLConstants.DATE_FORMAT, from_unixtime, format);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (x.getDeType() == DeTypeConstants.DE_INT) {
|
||||
|
@ -44,11 +44,8 @@
|
||||
v-else
|
||||
class="info-class"
|
||||
>
|
||||
<span>{{ $t('panel.web_add_tips_pre') }}</span>
|
||||
<i
|
||||
slot="reference"
|
||||
class="icon iconfont icon-chaolianjie"
|
||||
/>
|
||||
<span>{{ $t('panel.link_add_tips_pre') }}</span>
|
||||
<i class="icon iconfont icon-chaolianjie"/>
|
||||
<span>{{ $t('panel.web_add_tips_suf') }}</span>
|
||||
</div>
|
||||
</el-row>
|
||||
|
@ -32,7 +32,9 @@
|
||||
v-else
|
||||
class="info-stream-class"
|
||||
>
|
||||
{{ $t('panel.stream_media_add_tips') }}
|
||||
<span>{{ $t('panel.link_add_tips_pre') }}</span>
|
||||
<i class="icon iconfont icon-chaolianjie"/>
|
||||
<span>{{ $t('panel.stream_media_add_tips') }}</span>
|
||||
</div>
|
||||
</el-row>
|
||||
</template>
|
||||
@ -145,7 +147,7 @@ export default {
|
||||
}
|
||||
},
|
||||
destroyPlayer() {
|
||||
// Destroy
|
||||
// Destroy
|
||||
if (this.flvPlayer) {
|
||||
this.flvPlayer.pause()
|
||||
this.flvPlayer.destroy()
|
||||
@ -157,53 +159,53 @@ export default {
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.info-stream-class {
|
||||
text-align: center;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
background-color: rgba(245, 245, 220, 0.3);
|
||||
font-size: 12px;
|
||||
color: #000000;
|
||||
}
|
||||
.info-stream-class {
|
||||
text-align: center;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
background-color: rgba(245, 245, 220, 0.3);
|
||||
font-size: 12px;
|
||||
color: #000000;
|
||||
}
|
||||
|
||||
.move-bg {
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
background-color: #000000;
|
||||
}
|
||||
.move-bg {
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
background-color: #000000;
|
||||
}
|
||||
|
||||
.video-container {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background-color: #000000;
|
||||
}
|
||||
.video-container {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background-color: #000000;
|
||||
}
|
||||
|
||||
.centered-video {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
margin-bottom: auto;
|
||||
}
|
||||
.centered-video {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
margin-bottom: auto;
|
||||
}
|
||||
|
||||
.stream-mask {
|
||||
display: flex;
|
||||
height: calc(100% - 60px) !important;
|
||||
width: 100% !important;
|
||||
position: absolute;
|
||||
top: 0px;
|
||||
left: 0px;
|
||||
z-index: 2;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
.stream-mask {
|
||||
display: flex;
|
||||
height: calc(100% - 60px) !important;
|
||||
width: 100% !important;
|
||||
position: absolute;
|
||||
top: 0px;
|
||||
left: 0px;
|
||||
z-index: 2;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.edit-mask-stream{
|
||||
opacity: 0;
|
||||
}
|
||||
.edit-mask-stream {
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
|
@ -26,7 +26,9 @@
|
||||
v-else
|
||||
class="info-class"
|
||||
>
|
||||
{{ $t('panel.video_add_tips') }}
|
||||
<span>{{ $t('panel.link_add_tips_pre') }}</span>
|
||||
<i class="icon iconfont icon-chaolianjie"/>
|
||||
<span>{{ $t('panel.video_add_tips') }}</span>
|
||||
</div>
|
||||
</el-row>
|
||||
</template>
|
||||
@ -139,20 +141,21 @@ export default {
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.info-class{
|
||||
text-align: center;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
background-color: rgba(255,255,255,0.3);
|
||||
font-size: 12px;
|
||||
color: #9ea6b2;
|
||||
}
|
||||
.move-bg {
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
background-color: #000000;
|
||||
}
|
||||
.info-class {
|
||||
text-align: center;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
background-color: rgba(255, 255, 255, 0.3);
|
||||
font-size: 12px;
|
||||
color: #9ea6b2;
|
||||
}
|
||||
|
||||
.move-bg {
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
background-color: #000000;
|
||||
}
|
||||
</style>
|
||||
|
||||
|
@ -53,11 +53,12 @@ export function listenGlobalKeyDown() {
|
||||
window.onkeydown = (e) => {
|
||||
if (!store.state.isInEditor) return
|
||||
const { keyCode } = e
|
||||
e.preventDefault()
|
||||
e.stopPropagation()
|
||||
if (keyCode === ctrlKey || keyCode === commandKey) {
|
||||
isCtrlOrCommandDown = true
|
||||
} else if (isCtrlOrCommandDown) {
|
||||
if (keyCode === zKey || keyCode === yKey || keyCode === dKey || keyCode === sKey || keyCode === enlargeKey) {
|
||||
e.preventDefault()
|
||||
unlockMap[keyCode]()
|
||||
}
|
||||
}
|
||||
|
@ -1180,6 +1180,8 @@ export default {
|
||||
datePattern: 'Date Format',
|
||||
y: 'Year',
|
||||
y_M: 'Year Month',
|
||||
y_Q: 'Year Quarter',
|
||||
y_W: 'Year Week',
|
||||
y_M_d: 'Year Month Day',
|
||||
H_m_s: 'Hour Minute Second',
|
||||
y_M_d_H_m: 'Year Month Day Hour Minute',
|
||||
@ -2038,7 +2040,7 @@ export default {
|
||||
yes: 'Yes',
|
||||
no: 'No',
|
||||
live_tips: 'User Https First',
|
||||
stream_media_add_tips: 'Please Add Stream Media Info...',
|
||||
stream_media_add_tips: 'And Add Stream Media Info...',
|
||||
stream_mobile_tips: 'IOS terminal may not display',
|
||||
json_params_error: 'Third Party Parameters Parsing Failed. Please Check Whether The Parameters Format Is Correct',
|
||||
inner_padding: 'Inner Padding',
|
||||
@ -2271,8 +2273,8 @@ export default {
|
||||
play_circle: 'Circle',
|
||||
video_links: 'Video Links',
|
||||
web_url: 'Web URL',
|
||||
video_add_tips: 'Please Add Video Info...',
|
||||
web_add_tips_pre: 'Please click',
|
||||
video_add_tips: 'And Video Info...',
|
||||
link_add_tips_pre: 'Please click',
|
||||
web_add_tips_suf: 'Add Web Url Info...',
|
||||
panel_view_result_show: 'View Result',
|
||||
panel_view_result_tips: 'Chose "Panel" Will Overwrite View`s Result,Range 1~10000',
|
||||
|
@ -1179,6 +1179,8 @@ export default {
|
||||
datePattern: '日期格式',
|
||||
y: '年',
|
||||
y_M: '年月',
|
||||
y_Q: '年季度',
|
||||
y_W: '年周',
|
||||
y_M_d: '年月日',
|
||||
H_m_s: '時分秒',
|
||||
y_M_d_H_m: '年月日時分',
|
||||
@ -2032,7 +2034,7 @@ export default {
|
||||
yes: '是',
|
||||
no: '否',
|
||||
live_tips: '優先HTTPS鏈接',
|
||||
stream_media_add_tips: '請點擊添加配置流媒體信息...',
|
||||
stream_media_add_tips: '添加流媒體信息...',
|
||||
stream_mobile_tips: 'IOS終端可能無法顯示',
|
||||
json_params_error: '第三方參數解析失敗,請檢查參數格式是否正確',
|
||||
inner_padding: '內邊距',
|
||||
@ -2265,8 +2267,8 @@ export default {
|
||||
play_circle: '循環播放',
|
||||
video_links: '視頻鏈接',
|
||||
web_url: '網頁地址',
|
||||
video_add_tips: '請點擊添加配置視頻信息...',
|
||||
web_add_tips_pre: '請點擊上方',
|
||||
video_add_tips: '添加視頻信息...',
|
||||
link_add_tips_pre: '請點擊上方',
|
||||
web_add_tips_suf: '添加網頁信息...',
|
||||
panel_view_result_show: '視圖結果',
|
||||
panel_view_result_tips: '選擇儀表闆會覆蓋視圖的結果展示數量,取值範圍1~10000',
|
||||
|
@ -1178,6 +1178,8 @@ export default {
|
||||
datePattern: '日期格式',
|
||||
y: '年',
|
||||
y_M: '年月',
|
||||
y_Q: '年季度',
|
||||
y_W: '年周',
|
||||
y_M_d: '年月日',
|
||||
H_m_s: '时分秒',
|
||||
y_M_d_H_m: '年月日时分',
|
||||
@ -2032,7 +2034,7 @@ export default {
|
||||
yes: '是',
|
||||
no: '否',
|
||||
live_tips: '优先HTTPS链接',
|
||||
stream_media_add_tips: '请点击添加配置流媒体信息...',
|
||||
stream_media_add_tips: '添加流媒体信息...',
|
||||
stream_mobile_tips: 'IOS终端可能无法显示',
|
||||
json_params_error: '第三方参数解析失败,请检查参数格式是否正确',
|
||||
inner_padding: '内边距',
|
||||
@ -2265,8 +2267,8 @@ export default {
|
||||
play_circle: '循环播放',
|
||||
video_links: '视频链接',
|
||||
web_url: '网页地址',
|
||||
video_add_tips: '请点击添加配置视频信息...',
|
||||
web_add_tips_pre: '请点击上方',
|
||||
video_add_tips: '添加视频信息...',
|
||||
link_add_tips_pre: '请点击上方',
|
||||
web_add_tips_suf: '添加网页信息...',
|
||||
panel_view_result_show: '视图结果',
|
||||
panel_view_result_tips: '选择仪表板会覆盖视图的结果展示数量,取值范围1~10000',
|
||||
|
@ -1133,3 +1133,5 @@ export const CHART_FONT_LETTER_SPACE = [
|
||||
]
|
||||
|
||||
export const NOT_SUPPORT_PAGE_DATASET = ['kylin', 'sqlServer', 'es', 'presto', 'ds_doris', 'StarRocks']
|
||||
|
||||
export const SUPPORT_Y_M = ['y', 'y_M', 'y_M_d']
|
||||
|
@ -51,7 +51,7 @@ export function baseMapOption(chart_option, chart, themeStyle, curAreaCode, seri
|
||||
currentSeriesId = yAxis?.length ? yAxis[0].id : null
|
||||
}
|
||||
chart.data?.series.forEach((item, index) => {
|
||||
if (item.data[0].quotaList[0].id === currentSeriesId) {
|
||||
if (item.data?.length && item.data[0].quotaList[0].id === currentSeriesId) {
|
||||
seriesIndex = index
|
||||
return false
|
||||
}
|
||||
|
@ -108,7 +108,15 @@
|
||||
</span>
|
||||
<el-dropdown-menu slot="dropdown">
|
||||
<el-dropdown-item :command="beforeDateStyle('y')">{{ $t('chart.y') }}</el-dropdown-item>
|
||||
<el-dropdown-item
|
||||
v-if="showDateExt"
|
||||
:command="beforeDateStyle('y_Q')"
|
||||
>{{ $t('chart.y_Q') }}</el-dropdown-item>
|
||||
<el-dropdown-item :command="beforeDateStyle('y_M')">{{ $t('chart.y_M') }}</el-dropdown-item>
|
||||
<el-dropdown-item
|
||||
v-if="showDateExt"
|
||||
:command="beforeDateStyle('y_W')"
|
||||
>{{ $t('chart.y_W') }}</el-dropdown-item>
|
||||
<el-dropdown-item :command="beforeDateStyle('y_M_d')">{{ $t('chart.y_M_d') }}</el-dropdown-item>
|
||||
<el-dropdown-item
|
||||
:command="beforeDateStyle('H_m_s')"
|
||||
@ -182,6 +190,10 @@ export default {
|
||||
type: Number,
|
||||
required: true
|
||||
},
|
||||
chart: {
|
||||
type: Object,
|
||||
required: true
|
||||
},
|
||||
dimensionData: {
|
||||
type: Array,
|
||||
required: true
|
||||
@ -193,7 +205,8 @@ export default {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
tagType: getItemType(this.dimensionData, this.quotaData, this.item)
|
||||
tagType: getItemType(this.dimensionData, this.quotaData, this.item),
|
||||
showDateExt: false
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
@ -202,6 +215,9 @@ export default {
|
||||
},
|
||||
item: function() {
|
||||
this.getItemTagType()
|
||||
},
|
||||
chart: function() {
|
||||
this.getDateExtStatus()
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
@ -278,6 +294,13 @@ export default {
|
||||
},
|
||||
getItemTagType() {
|
||||
this.tagType = getItemType(this.dimensionData, this.quotaData, this.item)
|
||||
},
|
||||
getDateExtStatus() {
|
||||
if (this.chart) {
|
||||
this.showDateExt = this.chart.datasourceType === 'mysql' && this.chart.datasetMode === 0
|
||||
} else {
|
||||
this.showDateExt = false
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -116,7 +116,15 @@
|
||||
</span>
|
||||
<el-dropdown-menu slot="dropdown">
|
||||
<el-dropdown-item :command="beforeDateStyle('y')">{{ $t('chart.y') }}</el-dropdown-item>
|
||||
<el-dropdown-item
|
||||
v-if="showDateExt"
|
||||
:command="beforeDateStyle('y_Q')"
|
||||
>{{ $t('chart.y_Q') }}</el-dropdown-item>
|
||||
<el-dropdown-item :command="beforeDateStyle('y_M')">{{ $t('chart.y_M') }}</el-dropdown-item>
|
||||
<el-dropdown-item
|
||||
v-if="showDateExt"
|
||||
:command="beforeDateStyle('y_W')"
|
||||
>{{ $t('chart.y_W') }}</el-dropdown-item>
|
||||
<el-dropdown-item :command="beforeDateStyle('y_M_d')">{{ $t('chart.y_M_d') }}</el-dropdown-item>
|
||||
<el-dropdown-item
|
||||
:command="beforeDateStyle('H_m_s')"
|
||||
@ -215,7 +223,8 @@ export default {
|
||||
data() {
|
||||
return {
|
||||
tagType: 'success',
|
||||
formatterItem: formatterItem
|
||||
formatterItem: formatterItem,
|
||||
showDateExt: false
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
@ -224,6 +233,9 @@ export default {
|
||||
},
|
||||
item: function() {
|
||||
this.getItemTagType()
|
||||
},
|
||||
chart: function() {
|
||||
this.getDateExtStatus()
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
@ -325,6 +337,14 @@ export default {
|
||||
this.item.index = this.index
|
||||
this.item.formatterType = 'dimension'
|
||||
this.$emit('valueFormatter', this.item)
|
||||
},
|
||||
|
||||
getDateExtStatus() {
|
||||
if (this.chart) {
|
||||
this.showDateExt = this.chart.datasourceType === 'mysql' && this.chart.datasetMode === 0
|
||||
} else {
|
||||
this.showDateExt = false
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -246,6 +246,7 @@ import FieldErrorTips from '@/views/chart/components/dragItem/components/FieldEr
|
||||
import bus from '@/utils/bus'
|
||||
import { formatterItem } from '@/views/chart/chart/formatter'
|
||||
import { quotaViews } from '@/views/chart/chart/util'
|
||||
import { SUPPORT_Y_M } from '@/views/chart/chart/chart'
|
||||
|
||||
export default {
|
||||
name: 'QuotaExtItem',
|
||||
@ -318,13 +319,13 @@ export default {
|
||||
},
|
||||
isEnableCompare() {
|
||||
let xAxis = null
|
||||
if (Object.prototype.toString.call(this.chart.xaxis) === '[object Array]') {
|
||||
xAxis = JSON.parse(JSON.stringify(this.chart.xaxis))
|
||||
if (Object.prototype.toString.call(this.chart.xaxisExt) === '[object Array]') {
|
||||
xAxis = JSON.parse(JSON.stringify(this.chart.xaxisExt))
|
||||
} else {
|
||||
xAxis = JSON.parse(this.chart.xaxis)
|
||||
xAxis = JSON.parse(this.chart.xaxisExt)
|
||||
}
|
||||
const t1 = xAxis.filter(ele => {
|
||||
return ele.deType === 1
|
||||
return ele.deType === 1 && SUPPORT_Y_M.includes(ele.dateStyle)
|
||||
})
|
||||
// 暂时只支持类别轴/维度的时间类型字段
|
||||
if (t1.length > 0 && this.chart.type !== 'text' && this.chart.type !== 'label' && this.chart.type !== 'gauge' && this.chart.type !== 'liquid') {
|
||||
|
@ -246,6 +246,7 @@ import FieldErrorTips from '@/views/chart/components/dragItem/components/FieldEr
|
||||
import bus from '@/utils/bus'
|
||||
import { formatterItem } from '@/views/chart/chart/formatter'
|
||||
import { quotaViews } from '@/views/chart/chart/util'
|
||||
import { SUPPORT_Y_M } from '@/views/chart/chart/chart'
|
||||
|
||||
export default {
|
||||
name: 'QuotaItem',
|
||||
@ -321,7 +322,7 @@ export default {
|
||||
xAxis = JSON.parse(this.chart.xaxis)
|
||||
}
|
||||
const t1 = xAxis.filter(ele => {
|
||||
return ele.deType === 1
|
||||
return ele.deType === 1 && SUPPORT_Y_M.includes(ele.dateStyle)
|
||||
})
|
||||
// 暂时只支持类别轴/维度的时间类型字段
|
||||
if (t1.length > 0 && this.chart.type !== 'text' && this.chart.type !== 'label' && this.chart.type !== 'gauge' && this.chart.type !== 'liquid') {
|
||||
|
@ -143,6 +143,8 @@
|
||||
import { DEFAULT_MARK } from '../../chart/chart'
|
||||
import DeIconGroupPicker from '@/components/deIconPicker/deIconGroupPicker'
|
||||
import deSvgIcons from '@/deicons'
|
||||
import { getItemType } from '@/views/chart/components/dragItem/utils'
|
||||
import bus from '@/utils/bus'
|
||||
export default {
|
||||
name: 'MapMarkSelector',
|
||||
components: { DeIconGroupPicker },
|
||||
@ -275,7 +277,12 @@ export default {
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
beforeDestroy() {
|
||||
bus.$off('reset-change-table', this.getItemTagType)
|
||||
},
|
||||
mounted() {
|
||||
bus.$on('reset-change-table', this.getItemTagType)
|
||||
this.initData()
|
||||
this.loadSvg()
|
||||
},
|
||||
@ -309,6 +316,12 @@ export default {
|
||||
}
|
||||
if (customAttr.mark) {
|
||||
this.markForm = customAttr.mark
|
||||
if (this.markForm.fieldId) {
|
||||
const valid = this.fieldOptions.some(group => group.options.some(item => item.id === this.markForm.fieldId))
|
||||
if (!valid) {
|
||||
this.markForm.fieldId = null
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
@ -360,8 +373,25 @@ export default {
|
||||
}
|
||||
|
||||
this.changeMarkAttr('fieldId')
|
||||
},
|
||||
getItemTagType() {
|
||||
if (this.markForm.fieldId) {
|
||||
const field = this.getField(this.markForm.fieldId)
|
||||
if (!field) {
|
||||
this.changeFields()
|
||||
this.markForm.fieldId = null
|
||||
return
|
||||
}
|
||||
const tagType = getItemType(this.dimensionData, this.quotaData, field)
|
||||
if (tagType === 'danger') {
|
||||
this.changeFields()
|
||||
this.markForm.fieldId = null
|
||||
}
|
||||
} else {
|
||||
this.changeFields()
|
||||
this.markForm.fieldId = null
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
@ -29,8 +29,8 @@
|
||||
:param="param"
|
||||
:index="index"
|
||||
:item="item"
|
||||
:dimension-data="dimension"
|
||||
:quota-data="quota"
|
||||
:dimension-data="dimensionData"
|
||||
:quota-data="quotaData"
|
||||
@onDetailItemRemove="locationXItemRemove"
|
||||
/>
|
||||
</transition-group>
|
||||
@ -69,8 +69,8 @@
|
||||
:param="param"
|
||||
:index="index"
|
||||
:item="item"
|
||||
:dimension-data="dimension"
|
||||
:quota-data="quota"
|
||||
:dimension-data="dimensionData"
|
||||
:quota-data="quotaData"
|
||||
@onDetailItemRemove="locationYItemRemove"
|
||||
/>
|
||||
</transition-group>
|
||||
|
@ -239,7 +239,7 @@
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
v-if="chart.type === 'table-pivot' && totalForm.col.totalSort !== 'none'"
|
||||
v-show="false && chart.type === 'table-pivot' && totalForm.col.totalSort !== 'none'"
|
||||
:label="$t('chart.total_sort_field')"
|
||||
class="form-item"
|
||||
>
|
||||
@ -425,9 +425,7 @@ export default {
|
||||
if (this.resetTotalSort(this.totalForm.row.totalSortField)) {
|
||||
this.totalForm.row.totalSortField = this.totalSortFields[0].dataeaseName
|
||||
}
|
||||
if (this.resetTotalSort(this.totalForm.col.totalSortField)) {
|
||||
this.totalForm.col.totalSortField = this.totalSortFields[0].dataeaseName
|
||||
}
|
||||
this.totalForm.col.totalSortField = this.totalSortFields[0].dataeaseName
|
||||
} else {
|
||||
this.totalForm.row.totalSortField = ''
|
||||
this.totalForm.col.totalSortField = ''
|
||||
|
@ -435,7 +435,7 @@
|
||||
v-model="view.refreshViewEnable"
|
||||
class="el-input-refresh-loading"
|
||||
@change="refreshAttrChange"
|
||||
></el-checkbox>
|
||||
/>
|
||||
{{ $t('panel.enable_refresh_view') }}
|
||||
</span>
|
||||
<el-row>
|
||||
@ -531,6 +531,7 @@
|
||||
:item="item"
|
||||
:dimension-data="dimension"
|
||||
:quota-data="quota"
|
||||
:chart="chart"
|
||||
@onDimensionItemChange="dimensionItemChange"
|
||||
@onDimensionItemRemove="dimensionItemRemove"
|
||||
@editItemFilter="showDimensionEditFilter"
|
||||
@ -673,6 +674,7 @@
|
||||
:item="item"
|
||||
:dimension-data="dimension"
|
||||
:quota-data="quota"
|
||||
:chart="chart"
|
||||
@onDimensionItemChange="dimensionItemChange"
|
||||
@onDimensionItemRemove="dimensionItemRemove"
|
||||
@editItemFilter="showDimensionEditFilter"
|
||||
@ -2357,9 +2359,14 @@ export default {
|
||||
delete view.data
|
||||
return view
|
||||
},
|
||||
refreshAttrChange(switchType = false, switchRender = false) {
|
||||
refreshAttrChange() {
|
||||
if (this.view.refreshTime > 3600) {
|
||||
this.view.refreshTime = 3600
|
||||
} else if (this.view.refreshTime < 1) {
|
||||
this.view.refreshTime = 1
|
||||
}
|
||||
this.changeEditStatus(true)
|
||||
const view = this.buildParam(true, 'chart', false, switchType, switchRender)
|
||||
const view = this.buildParam(true, 'chart', false)
|
||||
if (!view) return
|
||||
viewEditSave(this.panelInfo.id, view)
|
||||
},
|
||||
@ -2369,6 +2376,7 @@ export default {
|
||||
if (!view) return
|
||||
viewEditSave(this.panelInfo.id, view).then(() => {
|
||||
// this.getData(this.param.id)
|
||||
this.getChart(this.param.id)
|
||||
bus.$emit('view-in-cache', {
|
||||
type: 'propChange',
|
||||
viewId: this.param.id,
|
||||
@ -3907,7 +3915,6 @@ span {
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
|
||||
.el-input-refresh-time {
|
||||
width: calc(50% - 4px) !important;
|
||||
}
|
||||
|
@ -410,7 +410,6 @@ export default {
|
||||
width: 131px;
|
||||
height: 78px;
|
||||
margin: 0 auto;
|
||||
box-shadow: 0 0 2px 0 rgba(31, 31, 31, 0.15), 0 1px 2px 0 rgba(31, 31, 31, 0.15);
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user