大屏页面初始化

This commit is contained in:
2026-03-11 10:32:51 +08:00
parent a65912bf8b
commit ee7e32e738
14 changed files with 65 additions and 74 deletions

View File

@@ -3,7 +3,7 @@ import request from '@/utils/request';
/** /**
* 获取指标信息列表 * 获取指标信息列表
*/ */
export function getHomeModuleList(params: any) { export function getHomeModuleList(params) {
return request({ return request({
url: '/biz/homeModuleUser/list', url: '/biz/homeModuleUser/list',
method: 'get', method: 'get',
@@ -14,7 +14,7 @@ export function getHomeModuleList(params: any) {
/** /**
* 获取指标信息列表 * 获取指标信息列表
*/ */
export function getItemInfoList(params: any) { export function getItemInfoList(params) {
return request({ return request({
url: '/biz/itemInfo/list', url: '/biz/itemInfo/list',
method: 'get', method: 'get',
@@ -25,7 +25,7 @@ export function getItemInfoList(params: any) {
/** /**
* 获取指标信息列表 * 获取指标信息列表
*/ */
export function getIndexInfoList(params: any) { export function getIndexInfoList(params) {
return request({ return request({
url: '/biz/indexInfo/list', url: '/biz/indexInfo/list',
method: 'get', method: 'get',
@@ -36,7 +36,7 @@ export function getIndexInfoList(params: any) {
/** /**
* 获取账号信息列表 * 获取账号信息列表
*/ */
export function getErpAccountList(params: any) { export function getErpAccountList(params) {
return request({ return request({
url: '/biz/erpAccount/list', url: '/biz/erpAccount/list',
method: 'get', method: 'get',
@@ -47,7 +47,7 @@ export function getErpAccountList(params: any) {
/** /**
* 获取交易分类信息列表 * 获取交易分类信息列表
*/ */
export function getErpCategoryList(params: any) { export function getErpCategoryList(params) {
return request({ return request({
url: '/biz/erpCategory/list', url: '/biz/erpCategory/list',
method: 'get', method: 'get',
@@ -58,7 +58,7 @@ export function getErpCategoryList(params: any) {
/** /**
* 获取明细信息列表 * 获取明细信息列表
*/ */
export function getErpTransactionFlowList(params: any) { export function getErpTransactionFlowList(params) {
return request({ return request({
url: '/biz/erpTransactionFlow/list', url: '/biz/erpTransactionFlow/list',
method: 'get', method: 'get',

View File

@@ -3,7 +3,7 @@ import request from '@/utils/request';
/** /**
* 获取指标信息列表 * 获取指标信息列表
*/ */
export function getChartList(params: any) { export function getChartList(params) {
return request({ return request({
url: '/biz/chartInfo/list', url: '/biz/chartInfo/list',
method: 'get', method: 'get',
@@ -12,7 +12,7 @@ export function getChartList(params: any) {
} }
export function getChartListAll(params: any) { export function getChartListAll(params) {
return request({ return request({
url: '/biz/chartInfo/listAll', url: '/biz/chartInfo/listAll',
method: 'get', method: 'get',

View File

@@ -3,7 +3,7 @@ import request from '@/utils/request';
/** /**
* 导出用户信息 * 导出用户信息
*/ */
export function download(params: any) { export function download(params) {
return request({ return request({
url: '/biz/homeFiles/dwonload', url: '/biz/homeFiles/dwonload',
method: 'get', method: 'get',

View File

@@ -3,7 +3,7 @@ import request from '@/utils/request';
/** /**
* 获取指标信息列表 * 获取指标信息列表
*/ */
export function getAlertList(params: any) { export function getAlertList(params) {
return request({ return request({
url: '/biz/homeDesktop/alertList', url: '/biz/homeDesktop/alertList',
method: 'get', method: 'get',
@@ -15,7 +15,7 @@ export function getAlertList(params: any) {
/** /**
* 获取指标信息列表 * 获取指标信息列表
*/ */
export function getNoteList(params: any) { export function getNoteList(params) {
return request({ return request({
url: '/biz/homeDesktop/noteList', url: '/biz/homeDesktop/noteList',
method: 'get', method: 'get',
@@ -27,7 +27,7 @@ export function getNoteList(params: any) {
/** /**
* 获取指标信息列表 * 获取指标信息列表
*/ */
export function getQuickList(params: any) { export function getQuickList(params) {
return request({ return request({
url: '/biz/homeDesktop/quickList', url: '/biz/homeDesktop/quickList',
method: 'get', method: 'get',

View File

@@ -3,7 +3,7 @@ import request from '@/utils/request';
/** /**
* 获取指标信息列表 * 获取指标信息列表
*/ */
export function getHomeMenuList(params: any) { export function getHomeMenuList(params) {
return request({ return request({
url: '/biz/homeMenu/list', url: '/biz/homeMenu/list',
method: 'get', method: 'get',
@@ -11,7 +11,7 @@ export function getHomeMenuList(params: any) {
}) })
} }
export function getHomeMenuPlist(params: any) { export function getHomeMenuPlist(params) {
return request({ return request({
url: '/biz/homeMenu/pList', url: '/biz/homeMenu/pList',
method: 'get', method: 'get',
@@ -22,7 +22,7 @@ export function getHomeMenuPlist(params: any) {
/** /**
* 获取指标信息列表 * 获取指标信息列表
*/ */
export function getUserMenuList(params: any) { export function getUserMenuList(params) {
return request({ return request({
url: '/biz/homeMenu/userList', url: '/biz/homeMenu/userList',
method: 'get', method: 'get',
@@ -31,7 +31,7 @@ export function getUserMenuList(params: any) {
} }
export function getTreeMenuList(params: any) { export function getTreeMenuList(params) {
return request({ return request({
url: '/biz/homeMenu/treeList', url: '/biz/homeMenu/treeList',
method: 'get', method: 'get',
@@ -54,7 +54,7 @@ export function getHomeMenuSave(data) {
/** /**
* 删除菜单信息 * 删除菜单信息
*/ */
export function getHomeMenuDelete(params: any) { export function getHomeMenuDelete(params) {
return request({ return request({
url: '/biz/homeMenu/delete', url: '/biz/homeMenu/delete',
method: 'post', method: 'post',

View File

@@ -4,7 +4,7 @@ import request from '@/utils/request';
/** /**
* 获取指标信息列表 * 获取指标信息列表
*/ */
export function getHomeModuleList(params: any) { export function getHomeModuleList(params) {
return request({ return request({
url: '/biz/homeModule/list', url: '/biz/homeModule/list',
method: 'get', method: 'get',
@@ -15,7 +15,7 @@ export function getHomeModuleList(params: any) {
/** /**
* 获取指标信息列表 * 获取指标信息列表
*/ */
export function getHomeModuleListAll(params: any) { export function getHomeModuleListAll(params) {
return request({ return request({
url: '/biz/homeModule/listAll', url: '/biz/homeModule/listAll',
method: 'get', method: 'get',
@@ -37,7 +37,7 @@ export function getHomeModuleSave(data) {
/** /**
* 删除信息列表 * 删除信息列表
*/ */
export function getHomeModuleDelete(params: any) { export function getHomeModuleDelete(params) {
return request({ return request({
url: '/biz/homeModule/delete', url: '/biz/homeModule/delete',
method: 'post', method: 'post',

View File

@@ -3,7 +3,7 @@ import request from '@/utils/request';
/** /**
* 获取指标信息列表 * 获取指标信息列表
*/ */
export function getHomeModuleUserList(params: any) { export function getHomeModuleUserList(params) {
return request({ return request({
url: '/biz/homeModuleUser/userList', url: '/biz/homeModuleUser/userList',
method: 'get', method: 'get',
@@ -25,7 +25,7 @@ export function getHomeModuleUserSave(data) {
/** /**
* 删除信息列表 * 删除信息列表
*/ */
export function getHomeModuleUserDelete(params: any) { export function getHomeModuleUserDelete(params) {
return request({ return request({
url: '/biz/homeModuleUser/delete', url: '/biz/homeModuleUser/delete',
method: 'post', method: 'post',

View File

@@ -3,7 +3,7 @@ import request from '@/utils/request';
/** /**
* 获取指标信息列表 * 获取指标信息列表
*/ */
export function getNotesList(params: any) { export function getNotesList(params) {
return request({ return request({
url: '/biz/notes/list', url: '/biz/notes/list',
method: 'get', method: 'get',
@@ -27,7 +27,7 @@ export function getNotesSave(data) {
/** /**
* 删除 * 删除
*/ */
export function getNotesDelete(params: any) { export function getNotesDelete(params) {
return request({ return request({
url: '/biz/notes/delete', url: '/biz/notes/delete',
method: 'post', method: 'post',

View File

@@ -3,7 +3,7 @@ import request from '@/utils/request';
/** /**
* 获取指标信息列表 * 获取指标信息列表
*/ */
export function getHomeRoleList(params: any) { export function getHomeRoleList(params) {
return request({ return request({
url: '/biz/homeRole/list', url: '/biz/homeRole/list',
method: 'get', method: 'get',
@@ -14,7 +14,7 @@ export function getHomeRoleList(params: any) {
/** /**
* 获取指标信息列表 * 获取指标信息列表
*/ */
export function getHomeRoleUserList(params: any) { export function getHomeRoleUserList(params) {
return request({ return request({
url: '/biz/homeRole/userList', url: '/biz/homeRole/userList',
method: 'get', method: 'get',
@@ -59,7 +59,7 @@ export function getHomeRoleSave(data) {
/** /**
* 删除角色信息 * 删除角色信息
*/ */
export function getHomeRoleDelete(params: any) { export function getHomeRoleDelete(params) {
return request({ return request({
url: '/biz/homeRole/delete', url: '/biz/homeRole/delete',
method: 'post', method: 'post',

View File

@@ -3,7 +3,7 @@ import request from '@/utils/request';
/** /**
* 获取用户信息列表 * 获取用户信息列表
*/ */
export function getHomeUserList(params: any) { export function getHomeUserList(params) {
return request({ return request({
url: '/biz/homeUser/list', url: '/biz/homeUser/list',
method: 'get', method: 'get',
@@ -14,7 +14,7 @@ export function getHomeUserList(params: any) {
/** /**
* 获取用户信息列表 * 获取用户信息列表
*/ */
export function getHomeUserListAll(params: any) { export function getHomeUserListAll(params) {
return request({ return request({
url: '/biz/homeUser/listAll', url: '/biz/homeUser/listAll',
method: 'get', method: 'get',
@@ -36,7 +36,7 @@ export function getHomeUserSave(data) {
/** /**
* 删除用户信息 * 删除用户信息
*/ */
export function getHomeUserDelete(params: any) { export function getHomeUserDelete(params) {
return request({ return request({
url: '/biz/homeUser/delete', url: '/biz/homeUser/delete',
method: 'post', method: 'post',

View File

@@ -3,7 +3,7 @@ import request from '@/utils/request';
/** /**
* 获取信息列表 * 获取信息列表
*/ */
export function getWebsiteStorageList(params: any) { export function getWebsiteStorageList(params) {
return request({ return request({
url: '/biz/websiteStorage/list', url: '/biz/websiteStorage/list',
method: 'get', method: 'get',

View File

@@ -35,7 +35,7 @@ export function getUserInfo() {
/** /**
* 修改密码 * 修改密码
*/ */
export function updatePasswd(params: any) { export function updatePasswd(params) {
return request({ return request({
url: '/editPasswd', url: '/editPasswd',
method: 'post', method: 'post',
@@ -47,7 +47,7 @@ export function updatePasswd(params: any) {
/** /**
* 初始化密码 * 初始化密码
*/ */
export function initPasswd(params: any) { export function initPasswd(params) {
return request({ return request({
url: '/initPasswd', url: '/initPasswd',
method: 'post', method: 'post',

View File

@@ -127,31 +127,25 @@ const loadComponent = async (vueName) => {
} }
}; };
const fetchChartData = async () => { async function getChartList(){
return new Promise((resolve) => { try {
setTimeout(() => { const reqParams = {
const apiData = [ chartCode: 'erp'
{ sort: 1, vueName: 'ChartV01' }, }
{ sort: 2, vueName: 'ChartV02' }, const res = await getChartListAll(reqParams)
{ sort: 3, vueName: 'ChartV03' }, chartData.value = res || []
{ sort: 4, vueName: 'ChartV04' }, } catch (error) {
{ sort: 5, vueName: 'ChartV05' }, console.error('获取数据失败:', error)
{ sort: 6, vueName: 'ChartV06' }, chartData.value = []
{ sort: 7, vueName: 'ChartV07' }, }
{ sort: 8, vueName: 'ChartV08' }, }
{ sort: 9, vueName: 'ChartV09' },
];
resolve(apiData);
}, 300);
});
};
onMounted(async () => { onMounted(async () => {
try { try {
const data = await fetchChartData(); await getChartList();
chartData.value = data.sort((a, b) => a.sort - b.sort); chartData.value = chartData.value.sort((a, b) => a.sort - b.sort);
const newComponentMap = {}; const newComponentMap = {};
const uniqueComponents = [...new Set(data.map(item => item.vueName))]; const uniqueComponents = [...new Set(chartData.value.map(item => item.vueName))];
for (const vueName of uniqueComponents) { for (const vueName of uniqueComponents) {
const component = await loadComponent(vueName); const component = await loadComponent(vueName);
if (component) { if (component) {

View File

@@ -65,6 +65,8 @@ import { ref, watch, onMounted } from 'vue';
import { useRoute } from 'vue-router'; import { useRoute } from 'vue-router';
import ChartTop from './components/ChartTop.vue'; import ChartTop from './components/ChartTop.vue';
import { getChartListAll } from '@/api/bizChart'
const route = useRoute(); const route = useRoute();
const FormValues = ref({ const FormValues = ref({
@@ -103,30 +105,25 @@ const loadComponent = async (vueName) => {
} }
}; };
const fetchChartData = async () => { async function getChartList(){
return new Promise((resolve) => { try {
setTimeout(() => { const reqParams = {
const apiData = [ chartCode: 'work'
{ sort: 1, vueName: 'ChartV01' }, }
{ sort: 2, vueName: 'ChartV02' }, const res = await getChartListAll(reqParams)
{ sort: 3, vueName: 'ChartV03' }, chartData.value = res || []
{ sort: 4, vueName: 'ChartV04' }, } catch (error) {
{ sort: 5, vueName: 'ChartV05' }, console.error('获取数据失败:', error)
{ sort: 6, vueName: 'ChartV06' }, chartData.value = []
{ sort: 7, vueName: 'ChartV07' }, }
{ sort: 8, vueName: 'ChartV08' }, }
];
resolve(apiData);
}, 300);
});
};
onMounted(async () => { onMounted(async () => {
try { try {
const data = await fetchChartData(); await getChartList();
chartData.value = data.sort((a, b) => a.sort - b.sort); chartData.value = chartData.value.sort((a, b) => a.sort - b.sort);
const newComponentMap = {}; const newComponentMap = {};
const uniqueComponents = [...new Set(data.map(item => item.vueName))]; const uniqueComponents = [...new Set(chartData.value.map(item => item.vueName))];
for (const vueName of uniqueComponents) { for (const vueName of uniqueComponents) {
const component = await loadComponent(vueName); const component = await loadComponent(vueName);
if (component) { if (component) {