forked from github/dataease
commit
474c7cc2af
@ -34,7 +34,7 @@ public class DataSetTableFieldsService {
|
|||||||
datasetTableField.setId(UUID.randomUUID().toString());
|
datasetTableField.setId(UUID.randomUUID().toString());
|
||||||
// 若dataeasename为空,则用MD5(id)作为dataeasename
|
// 若dataeasename为空,则用MD5(id)作为dataeasename
|
||||||
if (StringUtils.isEmpty(datasetTableField.getDataeaseName())) {
|
if (StringUtils.isEmpty(datasetTableField.getDataeaseName())) {
|
||||||
datasetTableField.setDataeaseName(DorisTableUtils.dorisFieldName(datasetTableField.getId()));
|
datasetTableField.setDataeaseName(DorisTableUtils.columnName(datasetTableField.getId()));
|
||||||
}
|
}
|
||||||
if (ObjectUtils.isEmpty(datasetTableField.getLastSyncTime())) {
|
if (ObjectUtils.isEmpty(datasetTableField.getLastSyncTime())) {
|
||||||
datasetTableField.setLastSyncTime(System.currentTimeMillis());
|
datasetTableField.setLastSyncTime(System.currentTimeMillis());
|
||||||
|
@ -1183,7 +1183,7 @@ public class DataSetTableService {
|
|||||||
|
|
||||||
if (StringUtils.isNotEmpty(tableId) && editType == 1 ) {
|
if (StringUtils.isNotEmpty(tableId) && editType == 1 ) {
|
||||||
List<DatasetTableField> datasetTableFields = dataSetTableFieldsService.getFieldsByTableId(tableId);
|
List<DatasetTableField> datasetTableFields = dataSetTableFieldsService.getFieldsByTableId(tableId);
|
||||||
datasetTableFields.stream().filter(datasetTableField -> datasetTableField.getName().startsWith("C_")).collect(Collectors.toList());
|
datasetTableFields.stream().filter(datasetTableField -> datasetTableField.getExtField() == 0).collect(Collectors.toList());
|
||||||
datasetTableFields.sort((o1, o2) -> {
|
datasetTableFields.sort((o1, o2) -> {
|
||||||
if (o1.getColumnIndex() == null) {
|
if (o1.getColumnIndex() == null) {
|
||||||
return -1;
|
return -1;
|
||||||
|
@ -33,6 +33,7 @@ public class DatasetFunctionService {
|
|||||||
if (StringUtils.isNotEmpty(datasetTableFunction.getDbType())) {
|
if (StringUtils.isNotEmpty(datasetTableFunction.getDbType())) {
|
||||||
criteria.andDbTypeEqualTo(datasetTableFunction.getDbType());
|
criteria.andDbTypeEqualTo(datasetTableFunction.getDbType());
|
||||||
}
|
}
|
||||||
|
datasetTableFunctionExample.setOrderByClause("name asc");
|
||||||
return datasetTableFunctionMapper.selectByExampleWithBLOBs(datasetTableFunctionExample);
|
return datasetTableFunctionMapper.selectByExampleWithBLOBs(datasetTableFunctionExample);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -164,7 +164,7 @@ public class ExtractDataService {
|
|||||||
if(datasetTableFields == null){
|
if(datasetTableFields == null){
|
||||||
datasetTableFields = dataSetTableFieldsService.list(DatasetTableField.builder().tableId(datasetTable.getId()).build());
|
datasetTableFields = dataSetTableFieldsService.list(DatasetTableField.builder().tableId(datasetTable.getId()).build());
|
||||||
}
|
}
|
||||||
datasetTableFields = datasetTableFields.stream().filter(datasetTableField -> datasetTableField.getName().startsWith("C_")).collect(Collectors.toList());
|
datasetTableFields = datasetTableFields.stream().filter(datasetTableField -> datasetTableField.getExtField() == 0).collect(Collectors.toList());
|
||||||
datasetTableFields.sort((o1, o2) -> {
|
datasetTableFields.sort((o1, o2) -> {
|
||||||
if (o1.getColumnIndex() == null) {
|
if (o1.getColumnIndex() == null) {
|
||||||
return -1;
|
return -1;
|
||||||
@ -274,7 +274,7 @@ public class ExtractDataService {
|
|||||||
datasource.setType(datasetTable.getType());
|
datasource.setType(datasetTable.getType());
|
||||||
}
|
}
|
||||||
List<DatasetTableField> datasetTableFields = dataSetTableFieldsService.list(DatasetTableField.builder().tableId(datasetTable.getId()).build());
|
List<DatasetTableField> datasetTableFields = dataSetTableFieldsService.list(DatasetTableField.builder().tableId(datasetTable.getId()).build());
|
||||||
datasetTableFields = datasetTableFields.stream().filter(datasetTableField -> datasetTableField.getName().startsWith("C_")).collect(Collectors.toList());
|
datasetTableFields = datasetTableFields.stream().filter(datasetTableField -> datasetTableField.getExtField() == 0).collect(Collectors.toList());
|
||||||
datasetTableFields.sort((o1, o2) -> {
|
datasetTableFields.sort((o1, o2) -> {
|
||||||
if (o1.getColumnIndex() == null) {
|
if (o1.getColumnIndex() == null) {
|
||||||
return -1;
|
return -1;
|
||||||
|
@ -6,6 +6,7 @@
|
|||||||
<div class="fu-operator-component__operator">
|
<div class="fu-operator-component__operator">
|
||||||
<el-select
|
<el-select
|
||||||
v-model="value"
|
v-model="value"
|
||||||
|
:disabled="disabled"
|
||||||
class="search-operator"
|
class="search-operator"
|
||||||
:placeholder="$t('fu.search_bar.please_select')"
|
:placeholder="$t('fu.search_bar.please_select')"
|
||||||
:size="configSize"
|
:size="configSize"
|
||||||
@ -35,7 +36,11 @@ export default {
|
|||||||
// eslint-disable-next-line vue/require-default-prop
|
// eslint-disable-next-line vue/require-default-prop
|
||||||
operator: String,
|
operator: String,
|
||||||
// eslint-disable-next-line vue/require-default-prop
|
// eslint-disable-next-line vue/require-default-prop
|
||||||
operators: Array
|
operators: Array,
|
||||||
|
disabled: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false
|
||||||
|
}
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
@ -0,0 +1,101 @@
|
|||||||
|
<template>
|
||||||
|
<de-complex-operator v-model="operator" :label="label" :operators="operators" :size="configSize" disabled>
|
||||||
|
<el-select
|
||||||
|
v-model="value"
|
||||||
|
class="fu-complex-select"
|
||||||
|
:placeholder="$t('fu.search_bar.please_select')"
|
||||||
|
:size="configSize"
|
||||||
|
clearable
|
||||||
|
v-bind="$attrs"
|
||||||
|
>
|
||||||
|
<el-option v-for="o in options" :key="o.value" :label="o.label" :value="o.value" />
|
||||||
|
</el-select>
|
||||||
|
</de-complex-operator>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { ComplexCondition } from 'fit2cloud-ui/src/components/search-bar/model'
|
||||||
|
import DeComplexOperator from './DeComplexOperator.vue'
|
||||||
|
import Cookies from 'js-cookie'
|
||||||
|
|
||||||
|
const MULTIPLE_OPERATORS = [
|
||||||
|
{
|
||||||
|
label: 'fu.search_bar.in',
|
||||||
|
value: 'in'
|
||||||
|
}, {
|
||||||
|
label: 'fu.search_bar.not_in',
|
||||||
|
value: 'not in'
|
||||||
|
}
|
||||||
|
]
|
||||||
|
const OPERATORS = [
|
||||||
|
{
|
||||||
|
label: 'fu.search_bar.eq',
|
||||||
|
value: 'eq'
|
||||||
|
}, {
|
||||||
|
label: 'fu.search_bar.ne',
|
||||||
|
value: 'ne'
|
||||||
|
}
|
||||||
|
]
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'DeComplexSelect',
|
||||||
|
components: { DeComplexOperator },
|
||||||
|
props: {
|
||||||
|
// eslint-disable-next-line vue/require-default-prop
|
||||||
|
field: String,
|
||||||
|
// eslint-disable-next-line vue/require-default-prop
|
||||||
|
label: String,
|
||||||
|
// eslint-disable-next-line vue/require-default-prop
|
||||||
|
defaultOperator: String,
|
||||||
|
// eslint-disable-next-line vue/require-default-prop
|
||||||
|
options: Array
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
operator: '',
|
||||||
|
value: ''
|
||||||
|
}
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
isMultiple() {
|
||||||
|
const { multiple } = this.$attrs
|
||||||
|
return multiple !== undefined && multiple !== false
|
||||||
|
},
|
||||||
|
operators() {
|
||||||
|
return this.isMultiple ? MULTIPLE_OPERATORS : OPERATORS
|
||||||
|
},
|
||||||
|
valueLabel() {
|
||||||
|
if (this.isMultiple) {
|
||||||
|
const values = []
|
||||||
|
this.value.forEach(v => {
|
||||||
|
values.push(this.getValueLabel(v))
|
||||||
|
})
|
||||||
|
return values.join(', ')
|
||||||
|
}
|
||||||
|
return this.getValueLabel(this.value)
|
||||||
|
},
|
||||||
|
configSize() {
|
||||||
|
return Cookies.get('size') || 'medium'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
getValueLabel(value) {
|
||||||
|
for (const o of this.options) {
|
||||||
|
if (o.value === value) {
|
||||||
|
return o.label
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return value
|
||||||
|
},
|
||||||
|
getCondition() {
|
||||||
|
if (!this.value) return
|
||||||
|
const { field, label, operator, operatorLabel, value, valueLabel } = this
|
||||||
|
return new ComplexCondition({ field, label, operator, operatorLabel, value, valueLabel })
|
||||||
|
},
|
||||||
|
init() {
|
||||||
|
this.operator = this.defaultOperator || this.operators[0].value
|
||||||
|
this.value = ''
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
@ -7,11 +7,19 @@
|
|||||||
</div>
|
</div>
|
||||||
<div v-else-if="!linkageSettingStatus">
|
<div v-else-if="!linkageSettingStatus">
|
||||||
<setting-menu v-if="activeModel==='edit'" style="float: right;height: 24px!important;">
|
<setting-menu v-if="activeModel==='edit'" style="float: right;height: 24px!important;">
|
||||||
<i slot="icon" class="icon iconfont icon-shezhi" />
|
<span slot="icon" :title="$t('panel.setting')">
|
||||||
|
<i class="icon iconfont icon-shezhi" style="margin-top:2px" />
|
||||||
|
</span>
|
||||||
</setting-menu>
|
</setting-menu>
|
||||||
<i v-if="activeModel==='edit'&&curComponent&&editFilter.includes(curComponent.type)" class="icon iconfont icon-edit" @click.stop="edit" />
|
<span :title="$t('panel.edit')">
|
||||||
<i v-if="curComponent.type==='view'" class="icon iconfont icon-fangda" @click.stop="showViewDetails" />
|
<i v-if="activeModel==='edit'&&curComponent&&editFilter.includes(curComponent.type)" class="icon iconfont icon-edit" @click.stop="edit" />
|
||||||
<i v-if="curComponent.type==='view'&&existLinkage" class="icon iconfont icon-quxiaoliandong" @click.stop="clearLinkage" />
|
</span>
|
||||||
|
<span :title="$t('panel.details')">
|
||||||
|
<i v-if="curComponent.type==='view'" class="icon iconfont icon-fangda" @click.stop="showViewDetails" />
|
||||||
|
</span>
|
||||||
|
<span :title="$t('panel.cancel_linkage')">
|
||||||
|
<i v-if="curComponent.type==='view'&&existLinkage" class="icon iconfont icon-quxiaoliandong" @click.stop="clearLinkage" />
|
||||||
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
@ -3,6 +3,7 @@
|
|||||||
<el-popover
|
<el-popover
|
||||||
width="400"
|
width="400"
|
||||||
trigger="click"
|
trigger="click"
|
||||||
|
style="max-height: 400px;overflow-y: auto"
|
||||||
>
|
>
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="11">
|
<el-col :span="11">
|
||||||
@ -13,52 +14,55 @@
|
|||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
|
||||||
<el-row v-for="(item, index) in linkageInfo.linkageFields" :key="index">
|
<el-row style="height: 120px;overflow-y: auto">
|
||||||
<el-col :span="11">
|
|
||||||
<div class="select-filed">
|
<el-row v-for="(item, index) in linkageInfo.linkageFields" :key="index">
|
||||||
<el-select v-model="item.sourceField" size="mini" placeholder="请选择">
|
<el-col :span="11">
|
||||||
<el-option
|
<div class="select-filed">
|
||||||
v-for="item in sourceLinkageInfo.targetViewFields"
|
<el-select v-model="item.sourceField" size="mini" placeholder="请选择">
|
||||||
:key="item.id"
|
<el-option
|
||||||
:label="item.name"
|
v-for="item in sourceLinkageInfo.targetViewFields"
|
||||||
:value="item.id"
|
:key="item.id"
|
||||||
>
|
:label="item.name"
|
||||||
<span style="float: left">
|
:value="item.id"
|
||||||
<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" />
|
<span style="float: left">
|
||||||
<svg-icon v-if="item.deType === 2 || item.value === 3" icon-class="field_value" class="field-icon-value" />
|
<svg-icon v-if="item.deType === 0" icon-class="field_text" class="field-icon-text" />
|
||||||
<svg-icon v-if="item.deType === 5" icon-class="field_location" class="field-icon-location" />
|
<svg-icon v-if="item.deType === 1" icon-class="field_time" class="field-icon-time" />
|
||||||
</span>
|
<svg-icon v-if="item.deType === 2 || item.value === 3" icon-class="field_value" class="field-icon-value" />
|
||||||
<span style="float: left; color: #8492a6; font-size: 12px">{{ item.name }}</span>
|
<svg-icon v-if="item.deType === 5" icon-class="field_location" class="field-icon-location" />
|
||||||
</el-option>
|
</span>
|
||||||
</el-select>
|
<span style="float: left; color: #8492a6; font-size: 12px">{{ item.name }}</span>
|
||||||
</div>
|
</el-option>
|
||||||
</el-col>
|
</el-select>
|
||||||
<el-col :span="11">
|
</div>
|
||||||
<div class="select-filed">
|
</el-col>
|
||||||
<el-select v-model="item.targetField" size="mini" placeholder="请选择">
|
<el-col :span="11">
|
||||||
<el-option
|
<div class="select-filed">
|
||||||
v-for="item in linkageInfo.targetViewFields"
|
<el-select v-model="item.targetField" size="mini" placeholder="请选择">
|
||||||
:key="item.id"
|
<el-option
|
||||||
:label="item.name"
|
v-for="item in linkageInfo.targetViewFields"
|
||||||
:value="item.id"
|
:key="item.id"
|
||||||
>
|
:label="item.name"
|
||||||
<span style="float: left">
|
:value="item.id"
|
||||||
<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" />
|
<span style="float: left">
|
||||||
<svg-icon v-if="item.deType === 2 || item.value === 3" icon-class="field_value" class="field-icon-value" />
|
<svg-icon v-if="item.deType === 0" icon-class="field_text" class="field-icon-text" />
|
||||||
<svg-icon v-if="item.deType === 5" icon-class="field_location" class="field-icon-location" />
|
<svg-icon v-if="item.deType === 1" icon-class="field_time" class="field-icon-time" />
|
||||||
</span>
|
<svg-icon v-if="item.deType === 2 || item.value === 3" icon-class="field_value" class="field-icon-value" />
|
||||||
<span style="float: left; color: #8492a6; font-size: 12px">{{ item.name }}</span>
|
<svg-icon v-if="item.deType === 5" icon-class="field_location" class="field-icon-location" />
|
||||||
</el-option>
|
</span>
|
||||||
</el-select>
|
<span style="float: left; color: #8492a6; font-size: 12px">{{ item.name }}</span>
|
||||||
</div>
|
</el-option>
|
||||||
</el-col>
|
</el-select>
|
||||||
<el-col :span="2">
|
</div>
|
||||||
<div>
|
</el-col>
|
||||||
<el-button icon="el-icon-delete" type="text" size="small" style="float: left" @click="deleteLinkageField(index)" />
|
<el-col :span="2">
|
||||||
</div>
|
<div>
|
||||||
</el-col>
|
<el-button icon="el-icon-delete" type="text" size="small" style="float: left" @click="deleteLinkageField(index)" />
|
||||||
|
</div>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
|
||||||
<el-row class="bottom">
|
<el-row class="bottom">
|
||||||
@ -67,7 +71,6 @@
|
|||||||
|
|
||||||
<!-- <el-button slot="reference">T</el-button>-->
|
<!-- <el-button slot="reference">T</el-button>-->
|
||||||
<i slot="reference" class="icon iconfont icon-edit slot-class" />
|
<i slot="reference" class="icon iconfont icon-edit slot-class" />
|
||||||
|
|
||||||
</el-popover>
|
</el-popover>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -183,5 +186,9 @@ export default {
|
|||||||
height: 35px;
|
height: 35px;
|
||||||
border-radius: 3px;
|
border-radius: 3px;
|
||||||
}
|
}
|
||||||
|
>>>.el-popover{
|
||||||
|
height: 200px;
|
||||||
|
overflow: auto;
|
||||||
|
}
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
|
@ -320,6 +320,38 @@ export default {
|
|||||||
this.close()
|
this.close()
|
||||||
},
|
},
|
||||||
saveLinkage() {
|
saveLinkage() {
|
||||||
|
// 字段检查
|
||||||
|
// let checkCount = 0
|
||||||
|
for (const key in this.targetLinkageInfo) {
|
||||||
|
let subCheckCount = 0
|
||||||
|
const linkageInfo = this.targetLinkageInfo[key]
|
||||||
|
const linkageFields = linkageInfo['linkageFields']
|
||||||
|
if (linkageFields) {
|
||||||
|
linkageFields.forEach(function(linkage) {
|
||||||
|
if (!(linkage.sourceField && linkage.targetField)) {
|
||||||
|
subCheckCount++
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
if (subCheckCount > 0) {
|
||||||
|
this.$message({
|
||||||
|
message: this.$t('chart.datalist') + '【' + linkageInfo.targetViewName + '】' + this.$t('panel.exit_un_march_linkage_field'),
|
||||||
|
type: 'error',
|
||||||
|
showClose: true
|
||||||
|
})
|
||||||
|
return
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// if (checkCount > 0) {
|
||||||
|
// this.$message({
|
||||||
|
// message: this.$t('panel.exit_un_march_linkage_field'),
|
||||||
|
// type: 'error',
|
||||||
|
// showClose: true
|
||||||
|
// })
|
||||||
|
// return
|
||||||
|
// }
|
||||||
|
|
||||||
const request = {
|
const request = {
|
||||||
panelId: this.$store.state.panel.panelInfo.id,
|
panelId: this.$store.state.panel.panelInfo.id,
|
||||||
sourceViewId: this.curLinkageView.propValue.viewId,
|
sourceViewId: this.curLinkageView.propValue.viewId,
|
||||||
|
@ -113,7 +113,7 @@ export default {
|
|||||||
linkageFilters() {
|
linkageFilters() {
|
||||||
// 必要 勿删勿该 watch数组,哪怕发生变化 oldValue等于newValue ,深拷贝解决
|
// 必要 勿删勿该 watch数组,哪怕发生变化 oldValue等于newValue ,深拷贝解决
|
||||||
if (!this.element.linkageFilters) return []
|
if (!this.element.linkageFilters) return []
|
||||||
console.log('linkageFilters:' + JSON.stringify(this.element.linkageFilters))
|
// console.log('linkageFilters:' + JSON.stringify(this.element.linkageFilters))
|
||||||
return JSON.parse(JSON.stringify(this.element.linkageFilters))
|
return JSON.parse(JSON.stringify(this.element.linkageFilters))
|
||||||
},
|
},
|
||||||
trackMenu() {
|
trackMenu() {
|
||||||
@ -127,7 +127,7 @@ export default {
|
|||||||
})
|
})
|
||||||
linkageCount && trackMenuInfo.push('linkage')
|
linkageCount && trackMenuInfo.push('linkage')
|
||||||
this.drillFields.length && trackMenuInfo.push('drill')
|
this.drillFields.length && trackMenuInfo.push('drill')
|
||||||
console.log('trackMenuInfo' + JSON.stringify(trackMenuInfo))
|
// console.log('trackMenuInfo' + JSON.stringify(trackMenuInfo))
|
||||||
return trackMenuInfo
|
return trackMenuInfo
|
||||||
},
|
},
|
||||||
chartType() {
|
chartType() {
|
||||||
|
@ -77,7 +77,11 @@ export default {
|
|||||||
const titleWidth = this.$refs.deTitle.offsetWidth
|
const titleWidth = this.$refs.deTitle.offsetWidth
|
||||||
const deContentContainer = this.$refs.deContentContainer
|
const deContentContainer = this.$refs.deContentContainer
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
if (height < 75) {
|
let min = 75
|
||||||
|
if (this.element.component === 'de-number-range') {
|
||||||
|
min = 105
|
||||||
|
}
|
||||||
|
if (height < min) {
|
||||||
// console.log(titleWidth)
|
// console.log(titleWidth)
|
||||||
this.mainClass = 'condition-main-line'
|
this.mainClass = 'condition-main-line'
|
||||||
deContentContainer && (deContentContainer.style.inset = '0 0 0 ' + (titleWidth + 15) + 'px')
|
deContentContainer && (deContentContainer.style.inset = '0 0 0 ' + (titleWidth + 15) + 'px')
|
||||||
@ -121,6 +125,8 @@ export default {
|
|||||||
.condition-title-absolute {
|
.condition-title-absolute {
|
||||||
inset: 0px 0px;
|
inset: 0px 0px;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
|
top: 15px;
|
||||||
|
left: 4px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.span-container {
|
.span-container {
|
||||||
|
@ -1212,7 +1212,10 @@ export default {
|
|||||||
drill: 'drill',
|
drill: 'drill',
|
||||||
linkage: 'linkage',
|
linkage: 'linkage',
|
||||||
cancel_linkage: 'Cancel Linkage',
|
cancel_linkage: 'Cancel Linkage',
|
||||||
remove_all_linkage: 'Remove All Linkage'
|
remove_all_linkage: 'Remove All Linkage',
|
||||||
|
exit_un_march_linkage_field: 'Exit Un March Linkage Field',
|
||||||
|
details: 'Details',
|
||||||
|
setting: 'Setting'
|
||||||
},
|
},
|
||||||
plugin: {
|
plugin: {
|
||||||
local_install: 'Local installation',
|
local_install: 'Local installation',
|
||||||
|
@ -1211,7 +1211,10 @@ export default {
|
|||||||
drill: '下钻',
|
drill: '下钻',
|
||||||
linkage: '联动',
|
linkage: '联动',
|
||||||
cancel_linkage: '取消联动',
|
cancel_linkage: '取消联动',
|
||||||
remove_all_linkage: '清除所有联动'
|
remove_all_linkage: '清除所有联动',
|
||||||
|
exit_un_march_linkage_field: '存在未匹配联动关系的字段',
|
||||||
|
details: '详情',
|
||||||
|
setting: '设置'
|
||||||
},
|
},
|
||||||
plugin: {
|
plugin: {
|
||||||
local_install: '本地安裝',
|
local_install: '本地安裝',
|
||||||
|
@ -1213,7 +1213,10 @@ export default {
|
|||||||
drill: '下钻',
|
drill: '下钻',
|
||||||
linkage: '联动',
|
linkage: '联动',
|
||||||
cancel_linkage: '取消联动',
|
cancel_linkage: '取消联动',
|
||||||
remove_all_linkage: '清除所有联动'
|
remove_all_linkage: '清除所有联动',
|
||||||
|
exit_un_march_linkage_field: '存在未匹配联动关系的字段',
|
||||||
|
details: '详情',
|
||||||
|
setting: '设置'
|
||||||
},
|
},
|
||||||
plugin: {
|
plugin: {
|
||||||
local_install: '本地安装',
|
local_install: '本地安装',
|
||||||
|
@ -21,7 +21,7 @@ import Treeselect from '@riophae/vue-treeselect'
|
|||||||
import '@riophae/vue-treeselect/dist/vue-treeselect.css'
|
import '@riophae/vue-treeselect/dist/vue-treeselect.css'
|
||||||
import './utils/dialog'
|
import './utils/dialog'
|
||||||
import DeComplexInput from '@/components/business/condition-table/DeComplexInput'
|
import DeComplexInput from '@/components/business/condition-table/DeComplexInput'
|
||||||
|
import DeComplexSelect from '@/components/business/condition-table/DeComplexSelect'
|
||||||
import '@/components/canvas/custom-component' // 注册自定义组件
|
import '@/components/canvas/custom-component' // 注册自定义组件
|
||||||
Vue.config.productionTip = false
|
Vue.config.productionTip = false
|
||||||
Vue.use(VueClipboard)
|
Vue.use(VueClipboard)
|
||||||
@ -74,6 +74,7 @@ Vue.use(directives)
|
|||||||
Vue.use(message)
|
Vue.use(message)
|
||||||
Vue.component('Treeselect', Treeselect)
|
Vue.component('Treeselect', Treeselect)
|
||||||
Vue.component('DeComplexInput', DeComplexInput)
|
Vue.component('DeComplexInput', DeComplexInput)
|
||||||
|
Vue.component('DeComplexSelect', DeComplexSelect)
|
||||||
Vue.config.productionTip = false
|
Vue.config.productionTip = false
|
||||||
|
|
||||||
Vue.prototype.hasDataPermission = function(pTarget, pSource) {
|
Vue.prototype.hasDataPermission = function(pTarget, pSource) {
|
||||||
|
@ -656,7 +656,8 @@ export const BASE_SCATTER = {
|
|||||||
data: []
|
data: []
|
||||||
},
|
},
|
||||||
xAxis: {
|
xAxis: {
|
||||||
data: []
|
data: [],
|
||||||
|
boundaryGap: false
|
||||||
},
|
},
|
||||||
yAxis: {
|
yAxis: {
|
||||||
type: 'value'
|
type: 'value'
|
||||||
@ -715,6 +716,12 @@ export const BASE_TREEMAP = {
|
|||||||
{
|
{
|
||||||
// name: '',
|
// name: '',
|
||||||
type: 'treemap',
|
type: 'treemap',
|
||||||
|
itemStyle: {
|
||||||
|
gapWidth: 2
|
||||||
|
},
|
||||||
|
breadcrumb: {
|
||||||
|
show: false
|
||||||
|
},
|
||||||
// radius: ['0%', '60%'],
|
// radius: ['0%', '60%'],
|
||||||
// avoidLabelOverlap: false,
|
// avoidLabelOverlap: false,
|
||||||
// emphasis: {
|
// emphasis: {
|
||||||
|
@ -58,6 +58,9 @@ export function componentStyle(chart_option, chart) {
|
|||||||
chart_option.xAxis.axisLabel = customStyle.xAxis.axisLabel
|
chart_option.xAxis.axisLabel = customStyle.xAxis.axisLabel
|
||||||
chart_option.xAxis.splitLine = customStyle.xAxis.splitLine
|
chart_option.xAxis.splitLine = customStyle.xAxis.splitLine
|
||||||
chart_option.xAxis.nameTextStyle = customStyle.xAxis.nameTextStyle
|
chart_option.xAxis.nameTextStyle = customStyle.xAxis.nameTextStyle
|
||||||
|
|
||||||
|
chart_option.xAxis.axisLabel.showMaxLabel = true
|
||||||
|
chart_option.xAxis.axisLabel.showMinLabel = true
|
||||||
}
|
}
|
||||||
if (customStyle.yAxis && (chart.type.includes('bar') || chart.type.includes('line') || chart.type.includes('scatter'))) {
|
if (customStyle.yAxis && (chart.type.includes('bar') || chart.type.includes('line') || chart.type.includes('scatter'))) {
|
||||||
chart_option.yAxis.show = customStyle.yAxis.show
|
chart_option.yAxis.show = customStyle.yAxis.show
|
||||||
@ -66,6 +69,9 @@ export function componentStyle(chart_option, chart) {
|
|||||||
chart_option.yAxis.axisLabel = customStyle.yAxis.axisLabel
|
chart_option.yAxis.axisLabel = customStyle.yAxis.axisLabel
|
||||||
chart_option.yAxis.splitLine = customStyle.yAxis.splitLine
|
chart_option.yAxis.splitLine = customStyle.yAxis.splitLine
|
||||||
chart_option.yAxis.nameTextStyle = customStyle.yAxis.nameTextStyle
|
chart_option.yAxis.nameTextStyle = customStyle.yAxis.nameTextStyle
|
||||||
|
|
||||||
|
chart_option.xAxis.axisLabel.showMaxLabel = true
|
||||||
|
chart_option.xAxis.axisLabel.showMinLabel = true
|
||||||
}
|
}
|
||||||
if (customStyle.split && chart.type.includes('radar')) {
|
if (customStyle.split && chart.type.includes('radar')) {
|
||||||
chart_option.radar.name = customStyle.split.name
|
chart_option.radar.name = customStyle.split.name
|
||||||
|
@ -1,6 +1,8 @@
|
|||||||
import { hexColorToRGBA } from '@/views/chart/chart/util'
|
import { hexColorToRGBA } from '@/views/chart/chart/util'
|
||||||
import { componentStyle } from '../common/common'
|
import { componentStyle } from '../common/common'
|
||||||
|
|
||||||
|
let bubbleArray = []
|
||||||
|
|
||||||
export function baseScatterOption(chart_option, chart) {
|
export function baseScatterOption(chart_option, chart) {
|
||||||
// 处理shape attr
|
// 处理shape attr
|
||||||
let customAttr = {}
|
let customAttr = {}
|
||||||
@ -21,6 +23,7 @@ export function baseScatterOption(chart_option, chart) {
|
|||||||
if (chart.data) {
|
if (chart.data) {
|
||||||
chart_option.title.text = chart.title
|
chart_option.title.text = chart.title
|
||||||
chart_option.xAxis.data = chart.data.x
|
chart_option.xAxis.data = chart.data.x
|
||||||
|
bubbleArray = []
|
||||||
for (let i = 0; i < chart.data.series.length; i++) {
|
for (let i = 0; i < chart.data.series.length; i++) {
|
||||||
const y = chart.data.series[i]
|
const y = chart.data.series[i]
|
||||||
// color
|
// color
|
||||||
@ -33,6 +36,9 @@ export function baseScatterOption(chart_option, chart) {
|
|||||||
|
|
||||||
const extBubble = JSON.parse(chart.extBubble)
|
const extBubble = JSON.parse(chart.extBubble)
|
||||||
if (extBubble && extBubble.length > 0) {
|
if (extBubble && extBubble.length > 0) {
|
||||||
|
y.data.forEach(ele => {
|
||||||
|
bubbleArray.push(ele.value[2])
|
||||||
|
})
|
||||||
y.symbolSize = funcSize
|
y.symbolSize = funcSize
|
||||||
} else {
|
} else {
|
||||||
y.symbolSize = customAttr.size.scatterSymbolSize ? customAttr.size.scatterSymbolSize : 20
|
y.symbolSize = customAttr.size.scatterSymbolSize ? customAttr.size.scatterSymbolSize : 20
|
||||||
@ -53,5 +59,7 @@ export function baseScatterOption(chart_option, chart) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const funcSize = function(data) {
|
const funcSize = function(data) {
|
||||||
return data[2]
|
const k = 80
|
||||||
|
const max = Math.max(...bubbleArray)
|
||||||
|
return (data[2] / max) * k
|
||||||
}
|
}
|
||||||
|
@ -28,9 +28,17 @@ export function baseTreemapOption(chart_option, chart) {
|
|||||||
chart_option.series[0].height = (customAttr.size.treemapHeight ? customAttr.size.treemapHeight : 80) + '%'
|
chart_option.series[0].height = (customAttr.size.treemapHeight ? customAttr.size.treemapHeight : 80) + '%'
|
||||||
}
|
}
|
||||||
// label
|
// label
|
||||||
// if (customAttr.label) {
|
if (customAttr.label) {
|
||||||
// chart_option.series[0].label = customAttr.label
|
// chart_option.series[0].label = customAttr.label
|
||||||
// }
|
const l = {
|
||||||
|
show: true,
|
||||||
|
position: customAttr.label.position,
|
||||||
|
color: customAttr.label.color,
|
||||||
|
fontSize: customAttr.label.fontSize,
|
||||||
|
formatter: customAttr.label.show ? customAttr.label.formatter : ''
|
||||||
|
}
|
||||||
|
chart_option.series[0].label = l
|
||||||
|
}
|
||||||
const valueArr = chart.data.series[0].data
|
const valueArr = chart.data.series[0].data
|
||||||
for (let i = 0; i < valueArr.length; i++) {
|
for (let i = 0; i < valueArr.length; i++) {
|
||||||
// const y = {
|
// const y = {
|
||||||
|
@ -338,6 +338,12 @@
|
|||||||
<span>{{ $t('chart.bubble_size') }}</span>
|
<span>{{ $t('chart.bubble_size') }}</span>
|
||||||
/
|
/
|
||||||
<span>{{ $t('chart.quota') }}</span>
|
<span>{{ $t('chart.quota') }}</span>
|
||||||
|
<el-tooltip class="item" effect="dark" placement="bottom">
|
||||||
|
<div slot="content">
|
||||||
|
该指标生效时,样式大小中的气泡大小属性将失效
|
||||||
|
</div>
|
||||||
|
<i class="el-icon-info" style="cursor: pointer;color: #606266;" />
|
||||||
|
</el-tooltip>
|
||||||
</span>
|
</span>
|
||||||
<draggable
|
<draggable
|
||||||
v-model="view.extBubble"
|
v-model="view.extBubble"
|
||||||
@ -430,7 +436,7 @@
|
|||||||
<el-collapse-item v-show="chart.type !== 'map'" name="size" :title="$t('chart.size')">
|
<el-collapse-item v-show="chart.type !== 'map'" name="size" :title="$t('chart.size')">
|
||||||
<size-selector :param="param" class="attr-selector" :chart="chart" @onSizeChange="onSizeChange" />
|
<size-selector :param="param" class="attr-selector" :chart="chart" @onSizeChange="onSizeChange" />
|
||||||
</el-collapse-item>
|
</el-collapse-item>
|
||||||
<el-collapse-item v-show="!view.type.includes('table') && !view.type.includes('text') && view.type !== 'treemap'" name="label" :title="$t('chart.label')">
|
<el-collapse-item v-show="!view.type.includes('table') && !view.type.includes('text')" name="label" :title="$t('chart.label')">
|
||||||
<label-selector :param="param" class="attr-selector" :chart="chart" @onLabelChange="onLabelChange" />
|
<label-selector :param="param" class="attr-selector" :chart="chart" @onLabelChange="onLabelChange" />
|
||||||
</el-collapse-item>
|
</el-collapse-item>
|
||||||
<el-collapse-item v-show="!view.type.includes('table') && !view.type.includes('text')" name="tooltip" :title="$t('chart.tooltip')">
|
<el-collapse-item v-show="!view.type.includes('table') && !view.type.includes('text')" name="tooltip" :title="$t('chart.tooltip')">
|
||||||
|
@ -56,7 +56,19 @@
|
|||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="10" style="height: 100%;border-left: 1px solid #E6E6E6;">
|
<el-col :span="10" style="height: 100%;border-left: 1px solid #E6E6E6;">
|
||||||
<el-col :span="12" style="height: 100%" class="padding-lr">
|
<el-col :span="12" style="height: 100%" class="padding-lr">
|
||||||
<span>{{ $t('dataset.click_ref_field') }}</span>
|
<span>
|
||||||
|
{{ $t('dataset.click_ref_field') }}
|
||||||
|
<el-tooltip class="item" effect="dark" placement="bottom">
|
||||||
|
<div slot="content">
|
||||||
|
引用字段以 "[" 开始, "]" 结束
|
||||||
|
<br>
|
||||||
|
请勿修改引用内容,否则将引用失败
|
||||||
|
<br>
|
||||||
|
若输入与引用字段相同格式的内容,将被当作引用字段处理
|
||||||
|
</div>
|
||||||
|
<i class="el-icon-info" style="cursor: pointer;" />
|
||||||
|
</el-tooltip>
|
||||||
|
</span>
|
||||||
<el-input
|
<el-input
|
||||||
v-model="searchField"
|
v-model="searchField"
|
||||||
size="mini"
|
size="mini"
|
||||||
@ -106,7 +118,19 @@
|
|||||||
</div>
|
</div>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12" style="height: 100%" class="padding-lr">
|
<el-col :span="12" style="height: 100%" class="padding-lr">
|
||||||
<span>{{ $t('dataset.click_ref_function') }}</span>
|
<span>
|
||||||
|
{{ $t('dataset.click_ref_function') }}
|
||||||
|
<el-tooltip class="item" effect="dark" placement="bottom">
|
||||||
|
<div slot="content">
|
||||||
|
使用数据集对应数据库类型所支持的函数,语法同对应数据库
|
||||||
|
<br>
|
||||||
|
如日期格式化:MySQL使用DATE_FORMAT(date,format);Oracle使用TO_DATE(X,[,fmt])
|
||||||
|
<br>
|
||||||
|
非直连模式数据集,使用Doris数据库函数,可参考Doris官网 http://doris.apache.org/master/zh-CN/
|
||||||
|
</div>
|
||||||
|
<i class="el-icon-info" style="cursor: pointer;" />
|
||||||
|
</el-tooltip>
|
||||||
|
</span>
|
||||||
<el-input
|
<el-input
|
||||||
v-model="searchFunction"
|
v-model="searchFunction"
|
||||||
size="mini"
|
size="mini"
|
||||||
@ -127,7 +151,7 @@
|
|||||||
<p class="pop-title">{{ item.name }}</p>
|
<p class="pop-title">{{ item.name }}</p>
|
||||||
<p class="pop-info">{{ item.func }}</p>
|
<p class="pop-info">{{ item.func }}</p>
|
||||||
<p class="pop-info">{{ item.desc }}</p>
|
<p class="pop-info">{{ item.desc }}</p>
|
||||||
<span slot="reference" class="function-style" :title="item.func" @click="insertParamToCodeMirror(item.func)">{{ item.func }}</span>
|
<span slot="reference" class="function-style" @click="insertParamToCodeMirror(item.func)">{{ item.func }}</span>
|
||||||
</el-popover>
|
</el-popover>
|
||||||
</el-row>
|
</el-row>
|
||||||
</el-col>
|
</el-col>
|
||||||
@ -444,9 +468,13 @@ export default {
|
|||||||
padding: 2px 4px;
|
padding: 2px 4px;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
margin: 4px 0;
|
margin: 4px 0;
|
||||||
overflow-x: hidden;
|
word-break: break-word;
|
||||||
white-space: nowrap;
|
border: solid 1px #eee;
|
||||||
text-overflow: ellipsis;
|
}
|
||||||
|
.function-style:hover {
|
||||||
|
background: #e8f4ff;
|
||||||
|
border-color: #a3d3ff;
|
||||||
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
.function-height{
|
.function-height{
|
||||||
height: calc(100% - 50px);
|
height: calc(100% - 50px);
|
||||||
|
@ -191,10 +191,11 @@ export default {
|
|||||||
}, {
|
}, {
|
||||||
label: this.$t('member.edit_password'), icon: 'el-icon-s-tools', type: 'success', click: this.editPassword,
|
label: this.$t('member.edit_password'), icon: 'el-icon-s-tools', type: 'success', click: this.editPassword,
|
||||||
show: this.checkPermission(['user:editPwd'])
|
show: this.checkPermission(['user:editPwd'])
|
||||||
}, {
|
|
||||||
label: '权限查看', icon: 'el-icon-lock', type: 'warning', click: this.showAuth,
|
|
||||||
show: this.checkPermission(['user:editPwd'])
|
|
||||||
}
|
}
|
||||||
|
// , {
|
||||||
|
// label: '权限查看', icon: 'el-icon-lock', type: 'warning', click: this.showAuth,
|
||||||
|
// show: this.checkPermission(['user:editPwd'])
|
||||||
|
// }
|
||||||
],
|
],
|
||||||
searchConfig: {
|
searchConfig: {
|
||||||
useQuickSearch: true,
|
useQuickSearch: true,
|
||||||
@ -205,7 +206,7 @@ export default {
|
|||||||
{
|
{
|
||||||
field: 'u.enabled',
|
field: 'u.enabled',
|
||||||
label: this.$t('commons.status'),
|
label: this.$t('commons.status'),
|
||||||
component: 'FuComplexSelect',
|
component: 'DeComplexSelect',
|
||||||
options: [
|
options: [
|
||||||
{ label: this.$t('commons.enable'), value: '1' },
|
{ label: this.$t('commons.enable'), value: '1' },
|
||||||
{ label: this.$t('commons.disable'), value: '0' }
|
{ label: this.$t('commons.disable'), value: '0' }
|
||||||
|
Loading…
Reference in New Issue
Block a user