feat: panel初始化,api提取
This commit is contained in:
@@ -5,14 +5,16 @@
|
|||||||
*/
|
*/
|
||||||
import { get } from '@/utils/http'
|
import { get } from '@/utils/http'
|
||||||
|
|
||||||
export const panel = '/visual/panel'
|
export const api = {
|
||||||
export const chart = '/visual/chart'
|
panel: '/visual/panel',
|
||||||
|
chart: '/visual/chart'
|
||||||
|
}
|
||||||
|
|
||||||
export async function getPanelList (params) {
|
export async function getPanelList (params) {
|
||||||
return await getData(panel, params, true)
|
return await getData(api.panel, params, true)
|
||||||
}
|
}
|
||||||
export async function getPanel (url, params) {
|
export async function getPanel (url, params) {
|
||||||
return await getData(panel, params)
|
return await getData(api.panel, params)
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function getData (url, params, isQueryList) {
|
export async function getData (url, params, isQueryList) {
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
<script>
|
<script>
|
||||||
import { useRoute } from 'vue-router'
|
import { useRoute } from 'vue-router'
|
||||||
import { panelTypeAndRouteMapping } from '@/utils/constants'
|
import { panelTypeAndRouteMapping } from '@/utils/constants'
|
||||||
import { panel as api, getPanelList } from '@/utils/api'
|
import { api, getPanelList } from '@/utils/api'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'Panel',
|
name: 'Panel',
|
||||||
|
|||||||
Reference in New Issue
Block a user