forked from github/dataease
refactor(图表): 图片组默认展示优化
This commit is contained in:
parent
fbdf6d1dd8
commit
e4aaf0ddd0
@ -177,11 +177,10 @@ onBeforeUnmount(() => {
|
||||
<el-row class="pic-adaptor">
|
||||
<el-form-item
|
||||
v-if="curComponent.style.adaptation"
|
||||
class="form-item"
|
||||
class="form-item form-item-custom"
|
||||
label="图片适应方式"
|
||||
size="small"
|
||||
:effect="themes"
|
||||
:class="'form-item-' + themes"
|
||||
>
|
||||
<el-radio-group
|
||||
size="small"
|
||||
@ -309,7 +308,7 @@ onBeforeUnmount(() => {
|
||||
}
|
||||
}
|
||||
|
||||
.form-item-dark {
|
||||
.form-item-custom {
|
||||
.ed-radio {
|
||||
margin-right: 4px !important;
|
||||
}
|
||||
|
@ -107,6 +107,7 @@ const initCurFields = chartDetails => {
|
||||
}
|
||||
|
||||
const conditionAdaptor = (chart: Chart) => {
|
||||
state.showUrl = null
|
||||
if (!chart || !chart.senior) {
|
||||
return
|
||||
}
|
||||
@ -118,7 +119,7 @@ const conditionAdaptor = (chart: Chart) => {
|
||||
if (conditions?.length > 0) {
|
||||
for (let i = 0; i < conditions.length; i++) {
|
||||
const field = conditions[i]
|
||||
let defaultValueColor = 'none'
|
||||
let defaultValueColor = null
|
||||
const checkResult = mappingColor(
|
||||
dataRowNameSelect.value[field.field.name],
|
||||
defaultValueColor,
|
||||
@ -139,8 +140,13 @@ const withInit = () => {
|
||||
}
|
||||
|
||||
const calcData = (view: Chart, callback) => {
|
||||
console.log('===calcData1')
|
||||
isError.value = false
|
||||
const { threshold } = parseJson(view.senior)
|
||||
if (!threshold.enable) {
|
||||
withInit()
|
||||
callback?.()
|
||||
return
|
||||
}
|
||||
if (view.tableId || view['dataFrom'] === 'template') {
|
||||
const v = JSON.parse(JSON.stringify(view))
|
||||
getData(v)
|
||||
|
@ -575,11 +575,13 @@ init()
|
||||
<span v-else-if="item.term === 'not_empty'" :title="t('chart.filter_not_empty')">
|
||||
{{ t('chart.filter_not_empty') }}
|
||||
</span>
|
||||
<span v-else-if="item.term === 'default'" title="默认"> 默认 </span>
|
||||
</div>
|
||||
<div style="flex: 1; margin: 0 8px">
|
||||
<span
|
||||
v-if="
|
||||
!item.term.includes('null') &&
|
||||
!item.term.includes('default') &&
|
||||
!item.term.includes('empty') &&
|
||||
item.term !== 'between'
|
||||
"
|
||||
|
@ -366,7 +366,8 @@ init()
|
||||
v-if="
|
||||
!item.term.includes('null') &&
|
||||
!item.term.includes('empty') &&
|
||||
item.term !== 'between'
|
||||
item.term !== 'between' &&
|
||||
!item.term.includes('default')
|
||||
"
|
||||
:span="10"
|
||||
style="text-align: center"
|
||||
|
@ -6,17 +6,11 @@ const { t } = useI18n()
|
||||
* 图片组图表
|
||||
*/
|
||||
export class PictureGroupView extends AbstractChartView {
|
||||
properties: EditorProperty[] = [
|
||||
'background-overall-component',
|
||||
'border-style',
|
||||
'threshold',
|
||||
'function-cfg'
|
||||
]
|
||||
properties: EditorProperty[] = ['background-overall-component', 'border-style', 'threshold']
|
||||
propertyInner: EditorPropertyInner = {
|
||||
'background-overall-component': ['all'],
|
||||
'border-style': ['all'],
|
||||
threshold: ['tableThreshold'],
|
||||
'function-cfg': ['emptyDataStrategy']
|
||||
threshold: ['tableThreshold']
|
||||
}
|
||||
axis: AxisType[] = ['xAxis', 'yAxis', 'filter']
|
||||
axisConfig: AxisConfig = {
|
||||
|
Loading…
Reference in New Issue
Block a user