Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
datax-cloud
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
黄营
datax-cloud
Commits
ddca17e6
Commit
ddca17e6
authored
Nov 17, 2020
by
yuwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
项目初始化
parent
ea4049f4
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
77 additions
and
54 deletions
+77
-54
index.vue
datax-ui/src/components/PivotTable/index.vue
+0
-0
constants.js
datax-ui/src/components/PivotTable/utils/constants.js
+3
-0
convert_path_to_map.js
...ui/src/components/PivotTable/utils/convert_path_to_map.js
+17
-0
get_height_by_count.js
...ui/src/components/PivotTable/utils/get_height_by_count.js
+3
-0
index.js
datax-ui/src/components/PivotTable/utils/index.js
+9
-0
merge_base_info.js
datax-ui/src/components/PivotTable/utils/merge_base_info.js
+11
-0
DataChartBuild.vue
datax-ui/src/views/visual/datachart/DataChartBuild.vue
+1
-1
ChartTable.vue
.../views/visual/datachart/components/widgets/ChartTable.vue
+33
-53
No files found.
datax-ui/src/components/PivotTable/index.vue
0 → 100644
View file @
ddca17e6
This diff is collapsed.
Click to expand it.
datax-ui/src/components/PivotTable/utils/constants.js
0 → 100644
View file @
ddca17e6
export
const
CELL_MIN_HEIGHT
=
38
export
const
SEPARATOR
=
':'
datax-ui/src/components/PivotTable/utils/convert_path_to_map.js
0 → 100644
View file @
ddca17e6
import
{
SEPARATOR
}
from
'./constants'
// Convert path to object
export
default
(
paths
,
keys
)
=>
{
return
paths
.
map
(
path
=>
{
const
pathArr
=
path
.
split
(
SEPARATOR
)
const
obj
=
{}
keys
.
forEach
((
key
,
index
)
=>
{
if
(
pathArr
[
index
])
{
obj
[
key
]
=
pathArr
[
index
]
}
})
return
obj
})
}
datax-ui/src/components/PivotTable/utils/get_height_by_count.js
0 → 100644
View file @
ddca17e6
import
{
CELL_MIN_HEIGHT
}
from
'./constants'
export
default
count
=>
count
*
CELL_MIN_HEIGHT
+
'px'
datax-ui/src/components/PivotTable/utils/index.js
0 → 100644
View file @
ddca17e6
import
mergeBaseInfo
from
'./merge_base_info'
import
convertPathToMap
from
'./convert_path_to_map'
import
getHeightByCount
from
'./get_height_by_count'
export
{
mergeBaseInfo
,
convertPathToMap
,
getHeightByCount
}
datax-ui/src/components/PivotTable/utils/merge_base_info.js
0 → 100644
View file @
ddca17e6
// merge base info
export
default
function
mergeBaseInfo
(
info
=
{})
{
const
_baseCellInfo
=
{
value
:
''
,
x
:
0
,
y
:
0
,
colspan
:
1
,
rowspan
:
1
}
return
Object
.
assign
({},
_baseCellInfo
,
info
)
}
datax-ui/src/views/visual/datachart/DataChartBuild.vue
View file @
ddca17e6
...
@@ -89,7 +89,7 @@
...
@@ -89,7 +89,7 @@
<el-tabs
type=
"card"
>
<el-tabs
type=
"card"
>
<el-tab-pane
label=
"图表预览"
>
<el-tab-pane
label=
"图表预览"
>
<div
class=
"widget-center-pane-chart"
>
<div
class=
"widget-center-pane-chart"
>
<chart-panel
v-if=
"visible"
id=
"chartPanel"
ref=
"chartPanel"
:chart-schema=
"widget"
:chart-data=
"
[]
"
/>
<chart-panel
v-if=
"visible"
id=
"chartPanel"
ref=
"chartPanel"
:chart-schema=
"widget"
:chart-data=
"
chartData.data
"
/>
</div>
</div>
</el-tab-pane>
</el-tab-pane>
<el-tab-pane
label=
"查询脚本"
>
<el-tab-pane
label=
"查询脚本"
>
...
...
datax-ui/src/views/visual/datachart/components/widgets/ChartTable.vue
View file @
ddca17e6
<
template
>
<
template
>
<div
ref=
"chart"
:style=
"chartStyle"
>
<div
ref=
"chart"
:style=
"chartStyle"
style=
"overflow: auto;"
>
<my-chart-table
:col=
"tableCol"
:data=
"tableData"
/>
<pivot-table
ref=
"pivottable"
:data=
"data"
:rows=
"rows"
:columns=
"columns"
:values=
"values"
/>
</div>
</div>
</
template
>
</
template
>
<
script
>
<
script
>
import
MyChartTable
from
'./charttable/MyChar
tTable'
import
PivotTable
from
'@/components/Pivo
tTable'
export
default
{
export
default
{
name
:
'ChartTable'
,
name
:
'ChartTable'
,
components
:
{
components
:
{
MyChar
tTable
Pivo
tTable
},
},
props
:
{
props
:
{
data
:
{
data
:
{
...
@@ -38,60 +44,34 @@ export default {
...
@@ -38,60 +44,34 @@ export default {
}
}
},
},
computed
:
{
computed
:
{
tableCol
()
{
rows
()
{
return
[
return
this
.
chartSchema
.
rows
.
map
((
row
,
index
,
arr
)
=>
{
{
return
{
prop
:
'date'
,
key
:
`
${
row
.
col
}
`
,
label
:
'日期'
label
:
`
${
row
.
col
}
`
},
{
label
:
'配送信息'
,
children
:
[
{
prop
:
'name'
,
label
:
'姓名'
},
{
label
:
'地址'
,
children
:
[
{
prop
:
'province'
,
label
:
'省份'
},
{
prop
:
'city'
,
label
:
'市区'
},
{
prop
:
'address'
,
label
:
'地址'
}
]
}
]
}
}
]
})
},
},
tableData
()
{
columns
()
{
return
[
return
this
.
chartSchema
.
columns
.
map
((
column
,
index
,
arr
)
=>
{
{
return
{
date
:
'2016-05-03'
,
key
:
`
${
column
.
col
}
`
,
name
:
'王小虎'
,
label
:
`
${
column
.
col
}
`
province
:
'上海'
,
}
city
:
'普陀区'
,
})
address
:
'上海市普陀区金沙江路 1518 弄'
,
zip
:
200333
},
},
{
values
()
{
date
:
'2016-05-02'
,
return
this
.
chartSchema
.
measures
.
map
((
measure
,
index
,
arr
)
=>
{
name
:
'王小虎'
,
return
{
province
:
'上海'
,
key
:
`
${
measure
.
col
}
`
,
city
:
'普陀区'
,
label
:
`
${
measure
.
col
}
`
address
:
'上海市普陀区金沙江路 1518 弄'
,
zip
:
200333
}
}
]
})
}
}
},
created
()
{
console
.
log
(
this
.
data
)
console
.
log
(
this
.
chartSchema
)
}
}
}
}
</
script
>
</
script
>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment