大屏页面初始化

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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