fix(数据集): 修复计算字段表达式语法提示

This commit is contained in:
junjun 2024-05-27 13:37:23 +08:00
parent ea59e8ee0d
commit 656feb2d4a
3 changed files with 12 additions and 4 deletions

View File

@ -1405,6 +1405,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: '请勿修改引用内容否则将引用失败',

View File

@ -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>

View File

@ -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>