diff --git a/apps/web-ele/.env.production b/apps/web-ele/.env.production
index 5375847..46bf92f 100644
--- a/apps/web-ele/.env.production
+++ b/apps/web-ele/.env.production
@@ -1,7 +1,7 @@
VITE_BASE=/
# 接口地址
-VITE_GLOB_API_URL=https://mock-napi.vben.pro/api
+VITE_GLOB_API_URL=http://localhost/api
# 是否开启压缩,可以设置为 none, brotli, gzip
VITE_COMPRESS=none
diff --git a/apps/web-ele/public/favicon.ico b/apps/web-ele/public/favicon.ico
index fcf9818..f501062 100644
Binary files a/apps/web-ele/public/favicon.ico and b/apps/web-ele/public/favicon.ico differ
diff --git a/apps/web-ele/public/favicon.icobk b/apps/web-ele/public/favicon.icobk
new file mode 100644
index 0000000..fcf9818
Binary files /dev/null and b/apps/web-ele/public/favicon.icobk differ
diff --git a/apps/web-ele/src/assets/bg.png b/apps/web-ele/src/assets/bg.png
new file mode 100644
index 0000000..8c6c8ae
Binary files /dev/null and b/apps/web-ele/src/assets/bg.png differ
diff --git a/apps/web-ele/src/assets/coso.png b/apps/web-ele/src/assets/coso.png
new file mode 100644
index 0000000..3701254
Binary files /dev/null and b/apps/web-ele/src/assets/coso.png differ
diff --git a/apps/web-ele/src/assets/tx.png b/apps/web-ele/src/assets/tx.png
new file mode 100644
index 0000000..c311a3e
Binary files /dev/null and b/apps/web-ele/src/assets/tx.png differ
diff --git a/apps/web-ele/src/layouts/auth.vue b/apps/web-ele/src/layouts/auth.vue
index a01b310..21af645 100644
--- a/apps/web-ele/src/layouts/auth.vue
+++ b/apps/web-ele/src/layouts/auth.vue
@@ -1,21 +1,19 @@
+
diff --git a/apps/web-ele/src/preferences.ts b/apps/web-ele/src/preferences.ts
index c421ca0..4524f96 100644
--- a/apps/web-ele/src/preferences.ts
+++ b/apps/web-ele/src/preferences.ts
@@ -1,5 +1,8 @@
import { defineOverridesPreferences } from '@vben/preferences';
+import coso from '#/assets/coso.png';
+import tx from '#/assets/tx.png';
+
/**
* @description 项目配置文件
* 只需要覆盖项目中的一部分配置,不需要的配置不用覆盖,会自动使用默认配置
@@ -12,6 +15,11 @@ export const overridesPreferences = defineOverridesPreferences({
name: import.meta.env.VITE_APP_TITLE,
enableCheckUpdates: false,
enablePreferences: false,
+ defaultAvatar: tx,
+ },
+ logo: {
+ enable: true,
+ source: coso,
},
copyright: {
companyName: '口哨智控',
diff --git a/apps/web-ele/src/router/routes/modules/cdcm.ts b/apps/web-ele/src/router/routes/modules/cdcm.ts
index b196c91..61b37d8 100644
--- a/apps/web-ele/src/router/routes/modules/cdcm.ts
+++ b/apps/web-ele/src/router/routes/modules/cdcm.ts
@@ -5,7 +5,7 @@ const routes: RouteRecordRaw[] = [
meta: {
badgeType: 'dot',
affixTab: true,
- icon: 'lucide:layout-dashboard',
+ icon: 'lucide:monitor', // 设备监控图标
order: -1,
keepAlive: true,
title: '设备详细',
@@ -16,7 +16,7 @@ const routes: RouteRecordRaw[] = [
},
{
meta: {
- icon: 'lucide:layout-dashboard',
+ icon: 'lucide:network', // 网络图标
order: 100,
keepAlive: true,
title: '网络配置',
@@ -27,7 +27,7 @@ const routes: RouteRecordRaw[] = [
},
{
meta: {
- icon: 'lucide:layout-dashboard',
+ icon: 'lucide:file-json', // JSON文件图标,适合模板
order: 110,
keepAlive: true,
title: '数据模板',
@@ -38,7 +38,7 @@ const routes: RouteRecordRaw[] = [
},
{
meta: {
- icon: 'lucide:layout-dashboard',
+ icon: 'lucide:plug', // 插件/驱动图标
order: 120,
keepAlive: true,
title: '采集驱动',
@@ -49,7 +49,7 @@ const routes: RouteRecordRaw[] = [
},
{
meta: {
- icon: 'lucide:layout-dashboard',
+ icon: 'lucide:activity', // 活动/实时数据图标
order: 130,
keepAlive: true,
title: '实时数据',
@@ -58,20 +58,20 @@ const routes: RouteRecordRaw[] = [
path: '/realtime',
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: {
- icon: 'lucide:layout-dashboard',
- order: 140,
- keepAlive: true,
- title: '上报管理',
- },
- name: 'reporting',
- path: '/reporting',
- component: () => import('#/views/reporting/index.vue'),
- },
- {
- meta: {
- icon: 'lucide:layout-dashboard',
+ icon: 'lucide:code', // 代码图标,适合编程
order: 150,
keepAlive: true,
title: '逻辑编程',
@@ -80,17 +80,17 @@ const routes: RouteRecordRaw[] = [
path: '/logic',
component: () => import('#/views/logic/index.vue'),
},
- {
- meta: {
- icon: 'lucide:layout-dashboard',
- order: 160,
- keepAlive: true,
- title: '历史数据',
- },
- name: 'history',
- path: '/history',
- component: () => import('#/views/history/index.vue'),
- },
+ // {
+ // meta: {
+ // icon: 'lucide:database', // 数据库图标,适合历史数据
+ // order: 160,
+ // keepAlive: true,
+ // title: '历史数据',
+ // },
+ // name: 'history',
+ // path: '/history',
+ // component: () => import('#/views/history/index.vue'),
+ // },
];
export default routes;
diff --git a/apps/web-ele/src/router/routes/modules/dashboard.ts b/apps/web-ele/src/router/routes/modules/dashboard.ts
deleted file mode 100644
index 3706ab0..0000000
--- a/apps/web-ele/src/router/routes/modules/dashboard.ts
+++ /dev/null
@@ -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;
diff --git a/apps/web-ele/src/router/routes/modules/demos.ts b/apps/web-ele/src/router/routes/modules/demos.ts
deleted file mode 100644
index 907ea3f..0000000
--- a/apps/web-ele/src/router/routes/modules/demos.ts
+++ /dev/null
@@ -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;
diff --git a/apps/web-ele/src/router/routes/modules/vben.ts b/apps/web-ele/src/router/routes/modules/vben.ts
deleted file mode 100644
index 40676ae..0000000
--- a/apps/web-ele/src/router/routes/modules/vben.ts
+++ /dev/null
@@ -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;
diff --git a/apps/web-ele/src/store/auth.ts b/apps/web-ele/src/store/auth.ts
index 79bb594..f4bb87a 100644
--- a/apps/web-ele/src/store/auth.ts
+++ b/apps/web-ele/src/store/auth.ts
@@ -11,13 +11,13 @@ import { defineStore } from 'pinia';
import { getUserInfoApi, loginApi, logoutApi } from '#/api';
import { $t } from '#/locales';
-// import { useStaticConfigStore } from '#/store';
+import { useStaticConfigStore } from '#/store';
export const useAuthStore = defineStore('auth', () => {
const accessStore = useAccessStore();
const userStore = useUserStore();
- // const staticConfigStore = useStaticConfigStore();
+ const staticConfigStore = useStaticConfigStore();
const router = useRouter();
const loginLoading = ref(false);
@@ -40,7 +40,25 @@ export const useAuthStore = defineStore('auth', () => {
loginLoading.value = true;
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);
// const { accessToken } = await loginApi(params);
diff --git a/apps/web-ele/src/store/token.ts b/apps/web-ele/src/store/token.ts
index 3815c73..5f28a77 100644
--- a/apps/web-ele/src/store/token.ts
+++ b/apps/web-ele/src/store/token.ts
@@ -25,11 +25,10 @@ export const useStaticConfigStore = defineStore('static_config', {
}),
actions: {
setConfig(data: AuthApi.LoginResult) {
- this.support_template_types = data.data.support_template_types ?? [];
- this.support_driver_types = data.data.support_driver_types ?? [];
- this.support_point_types = data.data.support_point_types ?? [];
- this.support_point_access_types =
- data.data.support_point_access_types ?? [];
+ this.support_template_types = data.support_template_types ?? [];
+ this.support_driver_types = data.support_driver_types ?? [];
+ this.support_point_types = data.support_point_types ?? [];
+ this.support_point_access_types = data.support_point_access_types ?? [];
},
},
});
diff --git a/apps/web-ele/src/views/logic/index.vue b/apps/web-ele/src/views/logic/index.vue
index 5bb5e29..342bd9f 100644
--- a/apps/web-ele/src/views/logic/index.vue
+++ b/apps/web-ele/src/views/logic/index.vue
@@ -83,8 +83,7 @@ const btn_add = () => {
const iframeUrl = ref('');
const btn_open = (row: RowType) => {
modalApi.open();
- let fullUrl = window.location.host;
- fullUrl = 'http://10.10.10.123';
+ const fullUrl = window.location.host;
iframeUrl.value = `${fullUrl}/rule/#flow/${row.id}`;
ElMessage.success(`${fullUrl}/rule/#flow/${row.id}`);
};
diff --git a/cspell.json b/cspell.json
index 19942cb..63dcc12 100644
--- a/cspell.json
+++ b/cspell.json
@@ -14,6 +14,7 @@
"CDCM",
"CDCMAPI",
"clsx",
+ "coso",
"Crule",
"defu",
"demi",