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