feat: 修改logo

main
cc 2025-05-13 22:16:11 +08:00
parent 52fee4fbea
commit 51feb99017
16 changed files with 67 additions and 199 deletions

View File

@ -1,7 +1,7 @@
VITE_BASE=/ VITE_BASE=/
# 接口地址 # 接口地址
VITE_GLOB_API_URL=https://mock-napi.vben.pro/api VITE_GLOB_API_URL=http://localhost/api
# 是否开启压缩,可以设置为 none, brotli, gzip # 是否开启压缩,可以设置为 none, brotli, gzip
VITE_COMPRESS=none VITE_COMPRESS=none

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.3 KiB

After

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 106 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 MiB

View File

@ -1,21 +1,19 @@
<script lang="ts" setup> <script lang="ts" setup>
import { computed } from 'vue';
import { AuthPageLayout } from '@vben/layouts'; import { AuthPageLayout } from '@vben/layouts';
import { preferences } from '@vben/preferences';
const logo = computed(() => preferences.logo.source); import coso from '#/assets/coso.png';
</script> </script>
<template> <template>
<AuthPageLayout <AuthPageLayout
app-name="口哨智控" app-name="口哨智控"
:logo="logo" :logo="coso"
page-description="数据采集网关" page-description="数据采集网关"
page-title="CDCM" page-title="CDCM"
:copyright="false" :copyright="false"
:toolbar="false" :toolbar="false"
> >
<!-- :slogan-image="bg" -->
<!-- 自定义工具栏 --> <!-- 自定义工具栏 -->
<!-- <template #toolbar></template> --> <!-- <template #toolbar></template> -->
</AuthPageLayout> </AuthPageLayout>

View File

@ -1,5 +1,8 @@
import { defineOverridesPreferences } from '@vben/preferences'; import { defineOverridesPreferences } from '@vben/preferences';
import coso from '#/assets/coso.png';
import tx from '#/assets/tx.png';
/** /**
* @description * @description
* 使 * 使
@ -12,6 +15,11 @@ export const overridesPreferences = defineOverridesPreferences({
name: import.meta.env.VITE_APP_TITLE, name: import.meta.env.VITE_APP_TITLE,
enableCheckUpdates: false, enableCheckUpdates: false,
enablePreferences: false, enablePreferences: false,
defaultAvatar: tx,
},
logo: {
enable: true,
source: coso,
}, },
copyright: { copyright: {
companyName: '口哨智控', companyName: '口哨智控',

View File

@ -5,7 +5,7 @@ const routes: RouteRecordRaw[] = [
meta: { meta: {
badgeType: 'dot', badgeType: 'dot',
affixTab: true, affixTab: true,
icon: 'lucide:layout-dashboard', icon: 'lucide:monitor', // 设备监控图标
order: -1, order: -1,
keepAlive: true, keepAlive: true,
title: '设备详细', title: '设备详细',
@ -16,7 +16,7 @@ const routes: RouteRecordRaw[] = [
}, },
{ {
meta: { meta: {
icon: 'lucide:layout-dashboard', icon: 'lucide:network', // 网络图标
order: 100, order: 100,
keepAlive: true, keepAlive: true,
title: '网络配置', title: '网络配置',
@ -27,7 +27,7 @@ const routes: RouteRecordRaw[] = [
}, },
{ {
meta: { meta: {
icon: 'lucide:layout-dashboard', icon: 'lucide:file-json', // JSON文件图标适合模板
order: 110, order: 110,
keepAlive: true, keepAlive: true,
title: '数据模板', title: '数据模板',
@ -38,7 +38,7 @@ const routes: RouteRecordRaw[] = [
}, },
{ {
meta: { meta: {
icon: 'lucide:layout-dashboard', icon: 'lucide:plug', // 插件/驱动图标
order: 120, order: 120,
keepAlive: true, keepAlive: true,
title: '采集驱动', title: '采集驱动',
@ -49,7 +49,7 @@ const routes: RouteRecordRaw[] = [
}, },
{ {
meta: { meta: {
icon: 'lucide:layout-dashboard', icon: 'lucide:activity', // 活动/实时数据图标
order: 130, order: 130,
keepAlive: true, keepAlive: true,
title: '实时数据', title: '实时数据',
@ -58,20 +58,20 @@ const routes: RouteRecordRaw[] = [
path: '/realtime', path: '/realtime',
component: () => import('#/views/realtime/index.vue'), component: () => import('#/views/realtime/index.vue'),
}, },
// {
// meta: {
// icon: 'lucide:upload', // 上传图标,适合上报
// order: 140,
// keepAlive: true,
// title: '上报管理',
// },
// name: 'reporting',
// path: '/reporting',
// component: () => import('#/views/reporting/index.vue'),
// },
{ {
meta: { meta: {
icon: 'lucide:layout-dashboard', icon: 'lucide:code', // 代码图标,适合编程
order: 140,
keepAlive: true,
title: '上报管理',
},
name: 'reporting',
path: '/reporting',
component: () => import('#/views/reporting/index.vue'),
},
{
meta: {
icon: 'lucide:layout-dashboard',
order: 150, order: 150,
keepAlive: true, keepAlive: true,
title: '逻辑编程', title: '逻辑编程',
@ -80,17 +80,17 @@ const routes: RouteRecordRaw[] = [
path: '/logic', path: '/logic',
component: () => import('#/views/logic/index.vue'), component: () => import('#/views/logic/index.vue'),
}, },
{ // {
meta: { // meta: {
icon: 'lucide:layout-dashboard', // icon: 'lucide:database', // 数据库图标,适合历史数据
order: 160, // order: 160,
keepAlive: true, // keepAlive: true,
title: '历史数据', // title: '历史数据',
}, // },
name: 'history', // name: 'history',
path: '/history', // path: '/history',
component: () => import('#/views/history/index.vue'), // component: () => import('#/views/history/index.vue'),
}, // },
]; ];
export default routes; export default routes;

View File

@ -1,37 +0,0 @@
import type { RouteRecordRaw } from 'vue-router';
import { $t } from '#/locales';
const routes: RouteRecordRaw[] = [
{
meta: {
icon: 'lucide:layout-dashboard',
order: 500,
title: $t('page.dashboard.title'),
},
name: 'Dashboard',
path: '/dashboard',
children: [
{
name: 'Analytics',
path: '/analytics',
component: () => import('#/views/dashboard/analytics/index.vue'),
meta: {
icon: 'lucide:area-chart',
title: $t('page.dashboard.analytics'),
},
},
{
name: 'Workspace',
path: '/workspace',
component: () => import('#/views/dashboard/workspace/index.vue'),
meta: {
icon: 'carbon:workspace',
title: $t('page.dashboard.workspace'),
},
},
],
},
];
export default routes;

View File

@ -1,36 +0,0 @@
import type { RouteRecordRaw } from 'vue-router';
import { $t } from '#/locales';
const routes: RouteRecordRaw[] = [
{
meta: {
icon: 'ic:baseline-view-in-ar',
keepAlive: true,
order: 1000,
title: $t('demos.title'),
},
name: 'Demos',
path: '/demos',
children: [
{
meta: {
title: $t('demos.elementPlus'),
},
name: 'NaiveDemos',
path: '/demos/element',
component: () => import('#/views/demos/element/index.vue'),
},
{
meta: {
title: $t('demos.form'),
},
name: 'BasicForm',
path: '/demos/form',
component: () => import('#/views/demos/form/basic.vue'),
},
],
},
];
export default routes;

View File

@ -1,82 +0,0 @@
import type { RouteRecordRaw } from 'vue-router';
import {
VBEN_ANT_PREVIEW_URL,
VBEN_DOC_URL,
VBEN_GITHUB_URL,
VBEN_LOGO_URL,
VBEN_NAIVE_PREVIEW_URL,
} from '@vben/constants';
import { SvgAntdvLogoIcon } from '@vben/icons';
import { IFrameView } from '#/layouts';
import { $t } from '#/locales';
const routes: RouteRecordRaw[] = [
{
meta: {
badgeType: 'dot',
icon: VBEN_LOGO_URL,
order: 9998,
title: $t('demos.vben.title'),
},
name: 'VbenProject',
path: '/vben-admin',
children: [
{
name: 'VbenDocument',
path: '/vben-admin/document',
component: IFrameView,
meta: {
icon: 'lucide:book-open-text',
link: VBEN_DOC_URL,
title: $t('demos.vben.document'),
},
},
{
name: 'VbenGithub',
path: '/vben-admin/github',
component: IFrameView,
meta: {
icon: 'mdi:github',
link: VBEN_GITHUB_URL,
title: 'Github',
},
},
{
name: 'VbenNaive',
path: '/vben-admin/naive',
component: IFrameView,
meta: {
badgeType: 'dot',
icon: 'logos:naiveui',
iframeSrc: VBEN_NAIVE_PREVIEW_URL,
title: $t('demos.vben.naive-ui'),
},
},
{
name: 'VbenAntd',
path: '/vben-admin/antd',
component: IFrameView,
meta: {
badgeType: 'dot',
icon: SvgAntdvLogoIcon,
link: VBEN_ANT_PREVIEW_URL,
title: $t('demos.vben.antdv'),
},
},
],
},
{
name: 'VbenAbout',
path: '/vben-admin/about',
component: () => import('#/views/_core/about/index.vue'),
meta: {
icon: 'lucide:copyright',
title: $t('demos.vben.about'),
order: 9999,
},
},
];
export default routes;

View File

@ -11,13 +11,13 @@ import { defineStore } from 'pinia';
import { getUserInfoApi, loginApi, logoutApi } from '#/api'; import { getUserInfoApi, loginApi, logoutApi } from '#/api';
import { $t } from '#/locales'; import { $t } from '#/locales';
// import { useStaticConfigStore } from '#/store'; import { useStaticConfigStore } from '#/store';
export const useAuthStore = defineStore('auth', () => { export const useAuthStore = defineStore('auth', () => {
const accessStore = useAccessStore(); const accessStore = useAccessStore();
const userStore = useUserStore(); const userStore = useUserStore();
// const staticConfigStore = useStaticConfigStore(); const staticConfigStore = useStaticConfigStore();
const router = useRouter(); const router = useRouter();
const loginLoading = ref(false); const loginLoading = ref(false);
@ -40,7 +40,25 @@ export const useAuthStore = defineStore('auth', () => {
loginLoading.value = true; loginLoading.value = true;
await loginApi(params); await loginApi(params);
// 保存静态配置 // 保存静态配置
// staticConfigStore.setConfig(data); staticConfigStore.setConfig({
support_template_types: ['modbus'],
support_driver_types: ['modbus tcp'],
support_point_types: [
'bool(bit)',
'int8(char)',
'int16(short)',
'int32(long)',
'int64(long long)',
'uint8(byte)',
'uint16(word)',
'uint32(double word)',
'uint64(long word)',
'float32(float)',
'float64(double)',
'string',
],
support_point_access_types: ['只读', '可写'],
});
// console.log('staticConfigStore', staticConfigStore.support_driver_types); // console.log('staticConfigStore', staticConfigStore.support_driver_types);
// const { accessToken } = await loginApi(params); // const { accessToken } = await loginApi(params);

View File

@ -25,11 +25,10 @@ export const useStaticConfigStore = defineStore('static_config', {
}), }),
actions: { actions: {
setConfig(data: AuthApi.LoginResult) { setConfig(data: AuthApi.LoginResult) {
this.support_template_types = data.data.support_template_types ?? []; this.support_template_types = data.support_template_types ?? [];
this.support_driver_types = data.data.support_driver_types ?? []; this.support_driver_types = data.support_driver_types ?? [];
this.support_point_types = data.data.support_point_types ?? []; this.support_point_types = data.support_point_types ?? [];
this.support_point_access_types = this.support_point_access_types = data.support_point_access_types ?? [];
data.data.support_point_access_types ?? [];
}, },
}, },
}); });

View File

@ -83,8 +83,7 @@ const btn_add = () => {
const iframeUrl = ref(''); const iframeUrl = ref('');
const btn_open = (row: RowType) => { const btn_open = (row: RowType) => {
modalApi.open(); modalApi.open();
let fullUrl = window.location.host; const fullUrl = window.location.host;
fullUrl = 'http://10.10.10.123';
iframeUrl.value = `${fullUrl}/rule/#flow/${row.id}`; iframeUrl.value = `${fullUrl}/rule/#flow/${row.id}`;
ElMessage.success(`${fullUrl}/rule/#flow/${row.id}`); ElMessage.success(`${fullUrl}/rule/#flow/${row.id}`);
}; };

View File

@ -14,6 +14,7 @@
"CDCM", "CDCM",
"CDCMAPI", "CDCMAPI",
"clsx", "clsx",
"coso",
"Crule", "Crule",
"defu", "defu",
"demi", "demi",