mirror of
https://github.com/PanJiaChen/vue-element-admin.git
synced 2025-08-10 20:39:48 +08:00
Add support to dashboard as chart (#938)
This commit is contained in:
parent
587e8cb9c1
commit
c027493ca9
@ -41,8 +41,8 @@ export function requestLisDashboards({
|
|||||||
|
|
||||||
return {
|
return {
|
||||||
recordCount: dashboardsListResponse.record_count,
|
recordCount: dashboardsListResponse.record_count,
|
||||||
dashboardsList: dashboardsListResponse.records.map(favorite => {
|
dashboardsList: dashboardsListResponse.records.map(dashboard => {
|
||||||
return convertDashboard(favorite)
|
return convertDashboard(dashboard)
|
||||||
}),
|
}),
|
||||||
nextPageToken: dashboardsListResponse.next_page_token
|
nextPageToken: dashboardsListResponse.next_page_token
|
||||||
}
|
}
|
||||||
|
@ -22,7 +22,7 @@
|
|||||||
accordion
|
accordion
|
||||||
>
|
>
|
||||||
<el-collapse-item
|
<el-collapse-item
|
||||||
:name="dashboard.dashboardName"
|
:name="dashboard.name"
|
||||||
:disabled="!dashboard.isCollapsible"
|
:disabled="!dashboard.isCollapsible"
|
||||||
class="custom-collapse-item"
|
class="custom-collapse-item"
|
||||||
>
|
>
|
||||||
@ -33,7 +33,7 @@
|
|||||||
</template>
|
</template>
|
||||||
<component
|
<component
|
||||||
:is="renderDashboard"
|
:is="renderDashboard"
|
||||||
:ref="dashboard.dashboardName"
|
:ref="dashboard.name"
|
||||||
:metadata="dashboard"
|
:metadata="dashboard"
|
||||||
/>
|
/>
|
||||||
</el-collapse-item>
|
</el-collapse-item>
|
||||||
@ -53,7 +53,7 @@ export default {
|
|||||||
return {
|
return {
|
||||||
dashboard: this.metadata,
|
dashboard: this.metadata,
|
||||||
unsupportedDashboards: ['activities', 'views', 'performance'],
|
unsupportedDashboards: ['activities', 'views', 'performance'],
|
||||||
activeDashboard: this.metadata.isOpenByDefault ? this.metadata.dashboardName : undefined
|
activeDashboard: this.metadata.isOpenByDefault ? this.metadata.name : undefined
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
|
@ -1,13 +1,15 @@
|
|||||||
{
|
{
|
||||||
"windowUuid": "953269ba-a67b-11eb-bcbc-0242ac130002",
|
"windowUuid": "953269ba-a67b-11eb-bcbc-0242ac130002",
|
||||||
"browserUuid": "95326a6e-a67b-11eb-bcbc-0242ac130002",
|
"browserUuid": "95326a6e-a67b-11eb-bcbc-0242ac130002",
|
||||||
"dashboardName": "dashboard name",
|
"name": "dashboard name",
|
||||||
"dashboardDescription": "dashboard description",
|
"description": "dashboard description",
|
||||||
"dashboardHtml": "dashboard html",
|
"html": "dashboard html",
|
||||||
"columnNo": 0,
|
"columnNo": 0,
|
||||||
"lineNo": 1,
|
"lineNo": 1,
|
||||||
"isCollapsible": true,
|
"isCollapsible": true,
|
||||||
"isOpenByDefault": true,
|
"isOpenByDefault": true,
|
||||||
"isEventRequired": false,
|
"isEventRequired": false,
|
||||||
"fileName": "dashboard file name"
|
"fileName": "dashboard file name",
|
||||||
|
"dashboardType": "dashboard",
|
||||||
|
"chartType": ""
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user