Merge branch 'dev-v2' into pr@dev-v2_export_data
This commit is contained in:
commit
8a706bd560
@ -1,4 +1,4 @@
|
|||||||
FROM registry.cn-qingdao.aliyuncs.com/dataease/alpine-openjdk17-jre
|
FROM registry.cn-qingdao.aliyuncs.com/dataease/alpine-openjdk21-jre
|
||||||
|
|
||||||
RUN mkdir -p /opt/apps/config /opt/dataease2.0/drivers/ /opt/dataease2.0/cache/ /opt/dataease2.0/data/map /opt/dataease2.0/data/static-resource/ /opt/dataease2.0/data/appearance/ /opt/dataease2.0/data/exportData/
|
RUN mkdir -p /opt/apps/config /opt/dataease2.0/drivers/ /opt/dataease2.0/cache/ /opt/dataease2.0/data/map /opt/dataease2.0/data/static-resource/ /opt/dataease2.0/data/appearance/ /opt/dataease2.0/data/exportData/
|
||||||
|
|
||||||
@ -11,8 +11,9 @@ WORKDIR /opt/apps
|
|||||||
ADD core/core-backend/target/CoreApplication.jar /opt/apps/app.jar
|
ADD core/core-backend/target/CoreApplication.jar /opt/apps/app.jar
|
||||||
|
|
||||||
ENV JAVA_APP_JAR=/opt/apps/app.jar
|
ENV JAVA_APP_JAR=/opt/apps/app.jar
|
||||||
|
ENV RUNNING_PORT=8100
|
||||||
ENV JAVA_OPTIONS="-Dfile.encoding=utf-8 -Dloader.path=/opt/apps -Dspring.config.additional-location=/opt/apps/config/"
|
ENV JAVA_OPTIONS="-Dfile.encoding=utf-8 -Dloader.path=/opt/apps -Dspring.config.additional-location=/opt/apps/config/"
|
||||||
|
|
||||||
HEALTHCHECK --interval=15s --timeout=5s --retries=20 --start-period=30s CMD nc -zv 127.0.0.1 8100
|
HEALTHCHECK --interval=15s --timeout=5s --retries=20 --start-period=30s CMD nc -zv 127.0.0.1 $RUNNING_PORT
|
||||||
|
|
||||||
CMD ["/deployments/run-java.sh"]
|
CMD ["/deployments/run-java.sh"]
|
||||||
|
|||||||
@ -68,7 +68,8 @@ public class Utils {
|
|||||||
String.format(SQLConstants.FIELD_NAME, tableObj.getTableAlias(), ele.getDataeaseName()));
|
String.format(SQLConstants.FIELD_NAME, tableObj.getTableAlias(), ele.getDataeaseName()));
|
||||||
} else {
|
} else {
|
||||||
originField = originField.replaceAll("\\[" + ele.getId() + "]",
|
originField = originField.replaceAll("\\[" + ele.getId() + "]",
|
||||||
tableObj.getTableAlias() + "." + datasourceType.getPrefix() + ele.getDataeaseName() + datasourceType.getSuffix());
|
datasourceType.getPrefix() + tableObj.getTableAlias() + datasourceType.getSuffix() +
|
||||||
|
"." + datasourceType.getPrefix() + ele.getDataeaseName() + datasourceType.getSuffix());
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
originField = originField.replaceAll("\\[" + ele.getId() + "]", "(" + ele.getOriginName() + ")");
|
originField = originField.replaceAll("\\[" + ele.getId() + "]", "(" + ele.getOriginName() + ")");
|
||||||
|
|||||||
@ -36,7 +36,10 @@ export interface DatasetDetail {
|
|||||||
fields: {
|
fields: {
|
||||||
dimensionList: Array<Field>
|
dimensionList: Array<Field>
|
||||||
quotaList: Array<Field>
|
quotaList: Array<Field>
|
||||||
|
parameterList?: Array<Field>
|
||||||
}
|
}
|
||||||
|
activelist?: string
|
||||||
|
hasParameter?: boolean
|
||||||
checkList: string[]
|
checkList: string[]
|
||||||
list: Array<Field>
|
list: Array<Field>
|
||||||
}
|
}
|
||||||
|
|||||||
@ -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="1716798774711" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="3450" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M474.3168 450.56H369.3568l66.4576-73.3184 13.7216-6.144h40.96L549.4784 79.1552c-57.6512 3.584-104.448 20.992-141.312 52.224-40.6528 34.5088-60.8256 79.1552-60.8256 134.2464l1.024 24.1664-143.9744 67.9936 2.8672-32.768c9.6256-111.7184 54.6816-194.9696 134.8608-247.808C420.7616 25.6 537.3952 0 692.224 0H1024l-60.0064 184.832h-73.4208l8.192-25.088c4.096-11.8784 6.0416-23.552 6.0416-34.816C904.8064 96.256 840.3968 76.1856 706.56 76.1856h-7.5776l-59.6992 294.8096H892.928l-84.5824 85.2992-15.6672 5.4272a1191.424 1191.424 0 0 0-158.72-11.264h-10.6496l-27.648 136.9088c-26.624 131.3792-78.1312 236.9536-154.8288 316.2112C363.52 983.6544 272.4864 1024 169.1648 1024 111.3088 1024 59.392 1002.5984 14.336 960.3072L0 946.7904l110.1824-110.08 11.4688 23.3472c24.7808 50.3808 63.1808 74.6496 117.9648 74.6496 50.176 0 88.7808-21.7088 117.76-66.4576 30.72-47.5136 59.0848-134.144 84.48-258.8672L474.3168 450.56z" p-id="3451"></path></svg>
|
||||||
|
After Width: | Height: | Size: 1.2 KiB |
@ -285,6 +285,14 @@ const batchOptStatusChange = value => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const openOuterParamsSet = () => {
|
const openOuterParamsSet = () => {
|
||||||
|
if (componentData.value.length === 0) {
|
||||||
|
ElMessage.warning('当前仪表板为空,请先添加组件')
|
||||||
|
return
|
||||||
|
}
|
||||||
|
if (!dvInfo.value.id) {
|
||||||
|
ElMessage.warning('请先保存当前页面')
|
||||||
|
return
|
||||||
|
}
|
||||||
outerParamsSetRef.value.optInit()
|
outerParamsSetRef.value.optInit()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -90,7 +90,7 @@ const paste = () => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const deleteComponent = () => {
|
const deleteComponent = () => {
|
||||||
if (curComponent.value) {
|
if (curComponent.value && !isGroupArea.value) {
|
||||||
const curInfo = getCurInfo()
|
const curInfo = getCurInfo()
|
||||||
dvMainStore.deleteComponentById(curComponent.value?.id, curInfo.componentData)
|
dvMainStore.deleteComponentById(curComponent.value?.id, curInfo.componentData)
|
||||||
} else if (areaData.value.components.length) {
|
} else if (areaData.value.components.length) {
|
||||||
@ -153,6 +153,10 @@ const handleComposeMouseDown = e => {
|
|||||||
const composeDivider = computed(() => {
|
const composeDivider = computed(() => {
|
||||||
return !(!curComponent || curComponent['isLock'] || curComponent['component'] != 'Group')
|
return !(!curComponent || curComponent['isLock'] || curComponent['component'] != 'Group')
|
||||||
})
|
})
|
||||||
|
|
||||||
|
const isGroupArea = computed(() => {
|
||||||
|
return curComponent.value?.component === 'GroupArea'
|
||||||
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
@ -201,7 +205,7 @@ const composeDivider = computed(() => {
|
|||||||
取消组合
|
取消组合
|
||||||
</li>
|
</li>
|
||||||
<el-divider class="custom-divider" v-show="composeDivider" />
|
<el-divider class="custom-divider" v-show="composeDivider" />
|
||||||
<template v-if="curComponent">
|
<template v-if="curComponent && !isGroupArea">
|
||||||
<template v-if="!curComponent['isLock']">
|
<template v-if="!curComponent['isLock']">
|
||||||
<li @click="upComponent">上移一层</li>
|
<li @click="upComponent">上移一层</li>
|
||||||
<li @click="downComponent">下移一层</li>
|
<li @click="downComponent">下移一层</li>
|
||||||
|
|||||||
@ -322,11 +322,6 @@ defineExpose({
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<style lang="less" scoped>
|
<style lang="less" scoped>
|
||||||
::-webkit-scrollbar {
|
|
||||||
width: 0px !important;
|
|
||||||
height: 0px !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
.canvas-container {
|
.canvas-container {
|
||||||
background-size: 100% 100% !important;
|
background-size: 100% 100% !important;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
@ -334,6 +329,10 @@ defineExpose({
|
|||||||
overflow-x: hidden;
|
overflow-x: hidden;
|
||||||
overflow-y: auto;
|
overflow-y: auto;
|
||||||
position: relative;
|
position: relative;
|
||||||
|
::-webkit-scrollbar {
|
||||||
|
width: 0px !important;
|
||||||
|
height: 0px !important;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.fix-button {
|
.fix-button {
|
||||||
|
|||||||
@ -2,6 +2,39 @@
|
|||||||
<el-row class="custom-row">
|
<el-row class="custom-row">
|
||||||
<el-row class="custom-row-inner">
|
<el-row class="custom-row-inner">
|
||||||
<el-space wrap>
|
<el-space wrap>
|
||||||
|
<template v-for="styleOptionKey in styleOptionKeyArrayPre">
|
||||||
|
<el-tooltip
|
||||||
|
:key="styleOptionKey.value"
|
||||||
|
v-if="styleForm[styleOptionKey.value] !== undefined"
|
||||||
|
:effect="themes"
|
||||||
|
placement="bottom"
|
||||||
|
>
|
||||||
|
<template #content> {{ styleOptionKey.label }} </template>
|
||||||
|
<el-form-item class="form-item no-margin-bottom" :class="'form-item-' + themes">
|
||||||
|
<el-select
|
||||||
|
:style="{ width: styleOptionKey.width }"
|
||||||
|
:effect="themes"
|
||||||
|
v-model="styleForm[styleOptionKey.value]"
|
||||||
|
size="small"
|
||||||
|
@change="changeStyle"
|
||||||
|
>
|
||||||
|
<template #prefix>
|
||||||
|
<el-icon :class="{ 'dark-icon': themes === 'dark' }">
|
||||||
|
<Icon :name="styleOptionKey.icon" />
|
||||||
|
</el-icon>
|
||||||
|
</template>
|
||||||
|
<el-option
|
||||||
|
class="custom-style-option"
|
||||||
|
v-for="option in styleOptionKey.customOption"
|
||||||
|
:key="option.value"
|
||||||
|
:label="option.name"
|
||||||
|
:value="option.value"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-tooltip>
|
||||||
|
</template>
|
||||||
|
|
||||||
<template v-for="styleColorKey in styleColorKeyArray">
|
<template v-for="styleColorKey in styleColorKeyArray">
|
||||||
<el-tooltip
|
<el-tooltip
|
||||||
:key="styleColorKey.value"
|
:key="styleColorKey.value"
|
||||||
@ -274,18 +307,25 @@ const styleMounted = ref({
|
|||||||
color: '#000000'
|
color: '#000000'
|
||||||
})
|
})
|
||||||
|
|
||||||
|
const fontFamilyList = [
|
||||||
|
{ name: '微软雅黑', value: 'Microsoft YaHei' },
|
||||||
|
{ name: '宋体', value: 'SimSun, "Songti SC", STSong' },
|
||||||
|
{ name: '黑体', value: 'SimHei, Helvetica' },
|
||||||
|
{ name: '楷体', value: 'KaiTi, "Kaiti SC", STKaiti' }
|
||||||
|
]
|
||||||
|
|
||||||
const scrollSpeedList = [
|
const scrollSpeedList = [
|
||||||
{ name: '停止', value: 0 },
|
{ name: '停止', value: 0 },
|
||||||
{ name: '1', value: 20 },
|
{ name: '1', value: 80 },
|
||||||
{ name: '2', value: 18 },
|
{ name: '2', value: 60 },
|
||||||
{ name: '3', value: 16 },
|
{ name: '3', value: 40 },
|
||||||
{ name: '4', value: 14 },
|
{ name: '4', value: 20 },
|
||||||
{ name: '5', value: 12 },
|
{ name: '5', value: 10 },
|
||||||
{ name: '6', value: 10 },
|
{ name: '6', value: 8 },
|
||||||
{ name: '7', value: 8 },
|
{ name: '7', value: 6 },
|
||||||
{ name: '8', value: 6 },
|
{ name: '8', value: 4 },
|
||||||
{ name: '9', value: 4 },
|
{ name: '9', value: 2 },
|
||||||
{ name: '10', value: 2 }
|
{ name: '10', value: 1 }
|
||||||
]
|
]
|
||||||
|
|
||||||
const opacitySizeList = [
|
const opacitySizeList = [
|
||||||
@ -376,6 +416,16 @@ const borderStyleList = [
|
|||||||
{ name: '点线', value: 'dotted' }
|
{ name: '点线', value: 'dotted' }
|
||||||
]
|
]
|
||||||
|
|
||||||
|
const styleOptionKeyArrayPre = [
|
||||||
|
{
|
||||||
|
value: 'fontFamily',
|
||||||
|
label: '字体',
|
||||||
|
customOption: fontFamilyList,
|
||||||
|
width: '188px',
|
||||||
|
icon: 'dv-style-fontFamily'
|
||||||
|
}
|
||||||
|
]
|
||||||
|
|
||||||
//大小随画布缩放动态变化
|
//大小随画布缩放动态变化
|
||||||
const styleOptionMountedKeyArray = [
|
const styleOptionMountedKeyArray = [
|
||||||
{
|
{
|
||||||
|
|||||||
@ -498,7 +498,8 @@ const list = [
|
|||||||
color: '',
|
color: '',
|
||||||
padding: 4,
|
padding: 4,
|
||||||
verticalAlign: 'middle',
|
verticalAlign: 'middle',
|
||||||
scrollSpeed: 0
|
scrollSpeed: 0,
|
||||||
|
fontFamily: 'Microsoft YaHei'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|||||||
@ -117,7 +117,6 @@ const destroyPlayer = () => {
|
|||||||
justify-content: center;
|
justify-content: center;
|
||||||
background-color: rgba(245, 245, 220, 0.1);
|
background-color: rgba(245, 245, 220, 0.1);
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
color: #000000;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.move-bg {
|
.move-bg {
|
||||||
|
|||||||
@ -88,7 +88,6 @@ watch(
|
|||||||
justify-content: center;
|
justify-content: center;
|
||||||
background-color: rgba(255, 255, 255, 0.1);
|
background-color: rgba(255, 255, 255, 0.1);
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
color: #9ea6b2;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.player {
|
.player {
|
||||||
|
|||||||
@ -467,11 +467,10 @@ defineExpose({
|
|||||||
height: 100%;
|
height: 100%;
|
||||||
overflow-y: auto !important;
|
overflow-y: auto !important;
|
||||||
position: relative;
|
position: relative;
|
||||||
}
|
::-webkit-scrollbar {
|
||||||
|
width: 0px !important;
|
||||||
::-webkit-scrollbar {
|
height: 0px !important;
|
||||||
width: 0px !important;
|
}
|
||||||
height: 0px !important;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
:deep(.ol) {
|
:deep(.ol) {
|
||||||
|
|||||||
@ -107,7 +107,6 @@ const activeCondition = ref('')
|
|||||||
const isIndeterminate = ref(false)
|
const isIndeterminate = ref(false)
|
||||||
const datasetTree = shallowRef([])
|
const datasetTree = shallowRef([])
|
||||||
const fields = ref<DatasetDetail[]>()
|
const fields = ref<DatasetDetail[]>()
|
||||||
const parameters = ref([])
|
|
||||||
|
|
||||||
const { queryElement } = toRefs(props)
|
const { queryElement } = toRefs(props)
|
||||||
|
|
||||||
@ -191,6 +190,9 @@ const setParameters = () => {
|
|||||||
|
|
||||||
if (!!curComponent.value.parameters.length) {
|
if (!!curComponent.value.parameters.length) {
|
||||||
curComponent.value.conditionType = 0
|
curComponent.value.conditionType = 0
|
||||||
|
if (curComponent.value.optionValueSource === 0) {
|
||||||
|
curComponent.value.optionValueSource = 1
|
||||||
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
setType()
|
setType()
|
||||||
@ -1386,7 +1388,9 @@ defineExpose({
|
|||||||
@change="handleValueSourceChange"
|
@change="handleValueSourceChange"
|
||||||
v-model="curComponent.optionValueSource"
|
v-model="curComponent.optionValueSource"
|
||||||
>
|
>
|
||||||
<el-radio :label="0">{{ t('chart.margin_model_auto') }}</el-radio>
|
<el-radio :disabled="!!curComponent.parameters.length" :label="0">{{
|
||||||
|
t('chart.margin_model_auto')
|
||||||
|
}}</el-radio>
|
||||||
<el-radio :label="1">{{ t('chart.select_dataset') }}</el-radio>
|
<el-radio :label="1">{{ t('chart.select_dataset') }}</el-radio>
|
||||||
<el-radio :label="2">手动输入</el-radio>
|
<el-radio :label="2">手动输入</el-radio>
|
||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
|
|||||||
@ -710,11 +710,11 @@ export default {
|
|||||||
chart_bar: '基础柱状图',
|
chart_bar: '基础柱状图',
|
||||||
chart_bar_stack: '堆叠柱状图',
|
chart_bar_stack: '堆叠柱状图',
|
||||||
chart_percentage_bar_stack: '百分比柱状图',
|
chart_percentage_bar_stack: '百分比柱状图',
|
||||||
chart_bar_horizontal: '横向柱状图',
|
chart_bar_horizontal: '基础条形图',
|
||||||
chart_bar_stack_horizontal: '横向堆叠柱状图',
|
chart_bar_stack_horizontal: '堆叠条形图',
|
||||||
chart_percentage_bar_stack_horizontal: '横向百分比柱状图',
|
chart_percentage_bar_stack_horizontal: '百分比条形图',
|
||||||
chart_bar_range: '区间条形图',
|
chart_bar_range: '区间条形图',
|
||||||
chart_bidirectional_bar: '对称柱状图',
|
chart_bidirectional_bar: '对称条形图',
|
||||||
chart_progress_bar: '进度条',
|
chart_progress_bar: '进度条',
|
||||||
chart_line: '基础折线图',
|
chart_line: '基础折线图',
|
||||||
chart_area_stack: '堆叠折线图',
|
chart_area_stack: '堆叠折线图',
|
||||||
@ -881,7 +881,7 @@ export default {
|
|||||||
chart_type_table: '表格',
|
chart_type_table: '表格',
|
||||||
chart_type_quota: '指标',
|
chart_type_quota: '指标',
|
||||||
chart_type_trend: '线/面图',
|
chart_type_trend: '线/面图',
|
||||||
chart_type_compare: '柱状图',
|
chart_type_compare: '柱/条图',
|
||||||
chart_type_distribute: '分布图',
|
chart_type_distribute: '分布图',
|
||||||
chart_type_relation: '关系图',
|
chart_type_relation: '关系图',
|
||||||
chart_type_dual_axes: '双轴图',
|
chart_type_dual_axes: '双轴图',
|
||||||
@ -1436,6 +1436,7 @@ export default {
|
|||||||
pls_input_filename: '请输入文件名称',
|
pls_input_filename: '请输入文件名称',
|
||||||
calc_tips: {
|
calc_tips: {
|
||||||
tip1: '表达式语法请遵循calcite语法。',
|
tip1: '表达式语法请遵循calcite语法。',
|
||||||
|
tip1_1: '表达式语法请遵循该数据源对应的数据库语法。',
|
||||||
tip2: '聚合运算仅能在图表中生效。',
|
tip2: '聚合运算仅能在图表中生效。',
|
||||||
tip3: '引用字段以 "[" 开始, "]" 结束',
|
tip3: '引用字段以 "[" 开始, "]" 结束',
|
||||||
tip4: '请勿修改引用内容,否则将引用失败',
|
tip4: '请勿修改引用内容,否则将引用失败',
|
||||||
@ -1928,7 +1929,7 @@ export default {
|
|||||||
yes: '是',
|
yes: '是',
|
||||||
no: '否',
|
no: '否',
|
||||||
live_tips: '优先HTTPS链接',
|
live_tips: '优先HTTPS链接',
|
||||||
stream_media_add_tips: '请在右侧添加流媒体信息...',
|
stream_media_add_tips: '请添加流媒体信息...',
|
||||||
stream_mobile_tips: 'IOS终端可能无法显示',
|
stream_mobile_tips: 'IOS终端可能无法显示',
|
||||||
json_params_error: '第三方参数解析失败,请检查参数格式是否正确',
|
json_params_error: '第三方参数解析失败,请检查参数格式是否正确',
|
||||||
inner_padding: '内边距',
|
inner_padding: '内边距',
|
||||||
@ -2166,8 +2167,8 @@ export default {
|
|||||||
play_circle: '循环播放',
|
play_circle: '循环播放',
|
||||||
video_links: '视频链接',
|
video_links: '视频链接',
|
||||||
web_url: '网页地址',
|
web_url: '网页地址',
|
||||||
video_add_tips: '请在右侧添加视频信息...',
|
video_add_tips: '请配置视频信息...',
|
||||||
link_add_tips_pre: '请在右侧配置网页信息..',
|
link_add_tips_pre: '请配置网页信息..',
|
||||||
web_add_tips_suf: '添加网页信息...',
|
web_add_tips_suf: '添加网页信息...',
|
||||||
panel_view_result_show: '图表结果',
|
panel_view_result_show: '图表结果',
|
||||||
panel_view_result_tips: '选择{0}会覆盖图表的结果展示数量,取值范围1~10000',
|
panel_view_result_tips: '选择{0}会覆盖图表的结果展示数量,取值范围1~10000',
|
||||||
|
|||||||
@ -138,7 +138,7 @@ const canvasInit = (isFistLoad = true) => {
|
|||||||
}
|
}
|
||||||
// afterInit
|
// afterInit
|
||||||
dvMainStore.setDataPrepareState(true)
|
dvMainStore.setDataPrepareState(true)
|
||||||
if (isMainCanvas(canvasId.value.id) && isFistLoad) {
|
if (isMainCanvas(canvasId.value) && isFistLoad) {
|
||||||
snapshotStore.recordSnapshotCache('renderChart')
|
snapshotStore.recordSnapshotCache('renderChart')
|
||||||
}
|
}
|
||||||
}, 500)
|
}, 500)
|
||||||
@ -289,10 +289,9 @@ defineExpose({
|
|||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
}
|
}
|
||||||
}
|
::-webkit-scrollbar {
|
||||||
|
display: none;
|
||||||
&::-webkit-scrollbar {
|
}
|
||||||
display: none;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.render-active {
|
.render-active {
|
||||||
|
|||||||
@ -184,7 +184,7 @@ const state = reactive({
|
|||||||
})
|
})
|
||||||
|
|
||||||
const filedList = computed(() => {
|
const filedList = computed(() => {
|
||||||
return [...state.dimension, ...state.quota].filter(ele => ele.id !== 'count')
|
return [...state.dimension, ...state.quota].filter(ele => ele.id !== 'count' && !!ele.summary)
|
||||||
})
|
})
|
||||||
|
|
||||||
provide('filedList', () => filedList.value)
|
provide('filedList', () => filedList.value)
|
||||||
|
|||||||
@ -16,6 +16,7 @@ import {
|
|||||||
import { flow, hexColorToRGBA, parseJson } from '@/views/chart/components/js/util'
|
import { flow, hexColorToRGBA, parseJson } from '@/views/chart/components/js/util'
|
||||||
import { useI18n } from '@/hooks/web/useI18n'
|
import { useI18n } from '@/hooks/web/useI18n'
|
||||||
import { valueFormatter } from '@/views/chart/components/js/formatter'
|
import { valueFormatter } from '@/views/chart/components/js/formatter'
|
||||||
|
import { Options } from '@antv/g2plot/esm'
|
||||||
const { t } = useI18n()
|
const { t } = useI18n()
|
||||||
/**
|
/**
|
||||||
* 对称柱状图
|
* 对称柱状图
|
||||||
@ -118,11 +119,27 @@ export class BidirectionalHorizontalBar extends G2PlotChartView<
|
|||||||
},
|
},
|
||||||
interactions: [{ type: 'active-region' }],
|
interactions: [{ type: 'active-region' }],
|
||||||
yField: ['value', 'valueExt'],
|
yField: ['value', 'valueExt'],
|
||||||
appendPadding: getPadding(chart)
|
appendPadding: getPadding(chart),
|
||||||
|
meta: {
|
||||||
|
field: {
|
||||||
|
type: 'cat'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
const customOptions = this.setupOptions(chart, initOptions)
|
||||||
|
const options = {
|
||||||
|
...customOptions
|
||||||
|
}
|
||||||
|
const xAxis = chart.xAxis
|
||||||
|
if (xAxis?.length === 1 && xAxis[0].deType === 1) {
|
||||||
|
const values = data2.map(item => item.field)
|
||||||
|
options.meta = {
|
||||||
|
field: {
|
||||||
|
type: 'cat',
|
||||||
|
values: values.reverse()
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const options = this.setupOptions(chart, initOptions)
|
|
||||||
|
|
||||||
// 开始渲染
|
// 开始渲染
|
||||||
const newChart = new G2BidirectionalBar(container, options)
|
const newChart = new G2BidirectionalBar(container, options)
|
||||||
|
|
||||||
@ -418,6 +435,45 @@ export class BidirectionalHorizontalBar extends G2PlotChartView<
|
|||||||
return { ...options, label }
|
return { ...options, label }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected configEmptyDataStrategy(
|
||||||
|
chart: Chart,
|
||||||
|
options: BidirectionalBarOptions
|
||||||
|
): BidirectionalBarOptions {
|
||||||
|
const { data } = options as unknown as Options
|
||||||
|
if (!data?.length) {
|
||||||
|
return options
|
||||||
|
}
|
||||||
|
const strategy = parseJson(chart.senior).functionCfg.emptyDataStrategy
|
||||||
|
if (strategy === 'ignoreData') {
|
||||||
|
const emptyFields = data
|
||||||
|
.filter(obj => obj['value'] === null || obj['valueExt'] === null)
|
||||||
|
.map(obj => obj['field'])
|
||||||
|
return {
|
||||||
|
...options,
|
||||||
|
data: data.filter(obj => {
|
||||||
|
if (emptyFields.includes(obj['field'])) {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
return true
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
const updateValues = (strategy: 'breakLine' | 'setZero', data: any[]) => {
|
||||||
|
data.forEach(obj => {
|
||||||
|
if (obj['value'] === null) {
|
||||||
|
obj['value'] = strategy === 'breakLine' ? null : 0
|
||||||
|
}
|
||||||
|
if (obj['valueExt'] === null) {
|
||||||
|
obj['valueExt'] = strategy === 'breakLine' ? null : 0
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
if (strategy === 'breakLine' || strategy === 'setZero') {
|
||||||
|
updateValues(strategy, data)
|
||||||
|
}
|
||||||
|
return options
|
||||||
|
}
|
||||||
|
|
||||||
protected setupOptions(chart: Chart, options: BidirectionalBarOptions) {
|
protected setupOptions(chart: Chart, options: BidirectionalBarOptions) {
|
||||||
return flow(
|
return flow(
|
||||||
this.configTheme,
|
this.configTheme,
|
||||||
|
|||||||
@ -187,7 +187,7 @@ export class Waterfall extends G2PlotChartView<WaterfallOptions, G2Waterfall> {
|
|||||||
let tmpValue = totalMap[id]
|
let tmpValue = totalMap[id]
|
||||||
let color = 'grey'
|
let color = 'grey'
|
||||||
if (id === yAxis[0].id) {
|
if (id === yAxis[0].id) {
|
||||||
tmpValue = parseFloat(head.value as unknown as string)
|
tmpValue = head.data.value
|
||||||
color = head.color
|
color = head.color
|
||||||
}
|
}
|
||||||
const value = valueFormatter(tmpValue, formatter.formatterCfg)
|
const value = valueFormatter(tmpValue, formatter.formatterCfg)
|
||||||
|
|||||||
@ -137,13 +137,6 @@ const initLocalCanvasData = () => {
|
|||||||
dvInfo.value.pid = sourcePid
|
dvInfo.value.pid = sourcePid
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
snapshotStore.recordSnapshotCache()
|
snapshotStore.recordSnapshotCache()
|
||||||
// 复制时,初始化的保存按钮为激活状态
|
|
||||||
if (opt === 'copy') {
|
|
||||||
// 使用缓存时,初始化的保存按钮为激活状态
|
|
||||||
setTimeout(() => {
|
|
||||||
snapshotStore.recordSnapshotCache('renderChart')
|
|
||||||
}, 1000)
|
|
||||||
}
|
|
||||||
}, 1500)
|
}, 1500)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|||||||
@ -140,11 +140,6 @@ defineExpose({
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<style lang="less">
|
<style lang="less">
|
||||||
::-webkit-scrollbar {
|
|
||||||
width: 0px !important;
|
|
||||||
height: 0px !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
.content {
|
.content {
|
||||||
background-color: #ffffff;
|
background-color: #ffffff;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
@ -152,5 +147,9 @@ defineExpose({
|
|||||||
align-items: center;
|
align-items: center;
|
||||||
overflow-x: hidden;
|
overflow-x: hidden;
|
||||||
overflow-y: auto;
|
overflow-y: auto;
|
||||||
|
::-webkit-scrollbar {
|
||||||
|
width: 0px !important;
|
||||||
|
height: 0px !important;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@ -29,6 +29,13 @@ const searchFunction = ref('')
|
|||||||
|
|
||||||
const mirror = ref()
|
const mirror = ref()
|
||||||
|
|
||||||
|
const props = defineProps({
|
||||||
|
crossDs: {
|
||||||
|
type: Boolean,
|
||||||
|
default: () => false
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
const fields = [
|
const fields = [
|
||||||
{ label: t('dataset.text'), value: 0 },
|
{ label: t('dataset.text'), value: 0 },
|
||||||
{ label: t('dataset.time'), value: 1 },
|
{ label: t('dataset.time'), value: 1 },
|
||||||
@ -287,9 +294,9 @@ initFunction()
|
|||||||
<span>*</span>
|
<span>*</span>
|
||||||
<el-tooltip class="item" effect="dark" placement="top">
|
<el-tooltip class="item" effect="dark" placement="top">
|
||||||
<template #content>
|
<template #content>
|
||||||
{{ t('dataset.calc_tips.tip1') }}
|
<div v-if="props.crossDs">{{ t('dataset.calc_tips.tip1') }}</div>
|
||||||
<br />
|
<div v-else>{{ t('dataset.calc_tips.tip1_1') }}</div>
|
||||||
{{ t('dataset.calc_tips.tip2') }}
|
<div>{{ t('dataset.calc_tips.tip2') }}</div>
|
||||||
</template>
|
</template>
|
||||||
<el-icon size="16px">
|
<el-icon size="16px">
|
||||||
<Icon name="icon_info_outlined"></Icon>
|
<Icon name="icon_info_outlined"></Icon>
|
||||||
|
|||||||
@ -1894,7 +1894,7 @@ const getDsIconName = data => {
|
|||||||
width="1000px"
|
width="1000px"
|
||||||
:title="calcTitle"
|
:title="calcTitle"
|
||||||
>
|
>
|
||||||
<calc-field-edit ref="calcEdit" />
|
<calc-field-edit ref="calcEdit" :crossDs="crossDatasources" />
|
||||||
<template #footer>
|
<template #footer>
|
||||||
<el-button secondary @click="closeEditCalc()">{{ t('dataset.cancel') }} </el-button>
|
<el-button secondary @click="closeEditCalc()">{{ t('dataset.cancel') }} </el-button>
|
||||||
<el-button type="primary" @click="confirmEditCalc()">{{ t('dataset.confirm') }} </el-button>
|
<el-button type="primary" @click="confirmEditCalc()">{{ t('dataset.confirm') }} </el-button>
|
||||||
|
|||||||
2
de-xpack
2
de-xpack
@ -1 +1 @@
|
|||||||
Subproject commit 690faa2e32bf71f23fdda04a83c3b7a1ed0d368c
|
Subproject commit 7a8f793d47c5c2f63ef852f9f6595e9b876defce
|
||||||
6
pom.xml
6
pom.xml
@ -20,13 +20,13 @@
|
|||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
<dataease.version>2.6.1</dataease.version>
|
<dataease.version>2.6.1</dataease.version>
|
||||||
<java.version>17</java.version>
|
<java.version>21</java.version>
|
||||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||||
<spring-cloud-alibaba.version>2023.0.1.0</spring-cloud-alibaba.version>
|
<spring-cloud-alibaba.version>2023.0.1.0</spring-cloud-alibaba.version>
|
||||||
<spring-cloud.version>2023.0.1</spring-cloud.version>
|
<spring-cloud.version>2023.0.1</spring-cloud.version>
|
||||||
<spring-boot.version>3.3.0</spring-boot.version>
|
<spring-boot.version>3.3.0</spring-boot.version>
|
||||||
<maven.compiler.source>17</maven.compiler.source>
|
<maven.compiler.source>21</maven.compiler.source>
|
||||||
<maven.compiler.target>17</maven.compiler.target>
|
<maven.compiler.target>21</maven.compiler.target>
|
||||||
<mybatis-plus.version>3.5.6</mybatis-plus.version>
|
<mybatis-plus.version>3.5.6</mybatis-plus.version>
|
||||||
<h2.version>2.2.220</h2.version>
|
<h2.version>2.2.220</h2.version>
|
||||||
<knife4j.version>4.4.0</knife4j.version>
|
<knife4j.version>4.4.0</knife4j.version>
|
||||||
|
|||||||
@ -11,9 +11,4 @@
|
|||||||
|
|
||||||
<artifactId>api-base</artifactId>
|
<artifactId>api-base</artifactId>
|
||||||
|
|
||||||
<properties>
|
|
||||||
<maven.compiler.source>17</maven.compiler.source>
|
|
||||||
<maven.compiler.target>17</maven.compiler.target>
|
|
||||||
</properties>
|
|
||||||
|
|
||||||
</project>
|
</project>
|
||||||
@ -11,9 +11,4 @@
|
|||||||
|
|
||||||
<artifactId>api-permissions</artifactId>
|
<artifactId>api-permissions</artifactId>
|
||||||
|
|
||||||
<properties>
|
|
||||||
<maven.compiler.source>17</maven.compiler.source>
|
|
||||||
<maven.compiler.target>17</maven.compiler.target>
|
|
||||||
</properties>
|
|
||||||
|
|
||||||
</project>
|
</project>
|
||||||
@ -11,10 +11,4 @@
|
|||||||
|
|
||||||
<artifactId>api-sync</artifactId>
|
<artifactId>api-sync</artifactId>
|
||||||
|
|
||||||
<properties>
|
|
||||||
<maven.compiler.source>17</maven.compiler.source>
|
|
||||||
<maven.compiler.target>17</maven.compiler.target>
|
|
||||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
|
||||||
</properties>
|
|
||||||
|
|
||||||
</project>
|
</project>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user