Merge pull request #8318 from dataease/pr@dev@refactor_drill_date
refactor(视图): 日期字段下钻支持设置格式
This commit is contained in:
commit
ad46a547e3
@ -2689,6 +2689,14 @@ export default {
|
|||||||
view.type === 'table-pivot') {
|
view.type === 'table-pivot') {
|
||||||
view.drillFields = []
|
view.drillFields = []
|
||||||
}
|
}
|
||||||
|
view.drillFields.forEach(ele => {
|
||||||
|
if (!ele.dateStyle || ele.dateStyle === '') {
|
||||||
|
ele.dateStyle = 'y_M_d'
|
||||||
|
}
|
||||||
|
if (!ele.datePattern || ele.datePattern === '') {
|
||||||
|
ele.datePattern = 'date_sub'
|
||||||
|
}
|
||||||
|
})
|
||||||
this.chart = JSON.parse(JSON.stringify(view))
|
this.chart = JSON.parse(JSON.stringify(view))
|
||||||
this.view = JSON.parse(JSON.stringify(view))
|
this.view = JSON.parse(JSON.stringify(view))
|
||||||
// stringify json param
|
// stringify json param
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user