diff --git a/.env b/.env index 092304b..5a2f46b 100644 --- a/.env +++ b/.env @@ -2,9 +2,9 @@ # if use a sub directory, it must be end with "/", like "/admin/" but not "/admin" VITE_BASE_URL=/ -VITE_APP_TITLE=SoybeanAdmin +VITE_APP_TITLE=Admin -VITE_APP_DESC=SoybeanAdmin is a fresh and elegant admin template +VITE_APP_DESC=Admin is a fresh and elegant admin template # the prefix of the icon name VITE_ICON_PREFIX=icon diff --git a/public/favicon.svg b/public/favicon.svg index 169b2ab..9249c78 100644 --- a/public/favicon.svg +++ b/public/favicon.svg @@ -1 +1,203 @@ - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/locales/langs/zh-cn.ts b/src/locales/langs/zh-cn.ts index 9334932..451fef0 100644 --- a/src/locales/langs/zh-cn.ts +++ b/src/locales/langs/zh-cn.ts @@ -199,7 +199,9 @@ const local: App.I18n.Schema = { plan: "计划管理", department: "部门管理", orders_create: "创建工单", - orders_list: "工单列表" + orders_list: "工单列表", + ai: "AI服务状态", + employee_list: "人员列表" }, page: { login: { diff --git a/src/router/elegant/routes.ts b/src/router/elegant/routes.ts index 9a78c4f..5b7d901 100644 --- a/src/router/elegant/routes.ts +++ b/src/router/elegant/routes.ts @@ -56,7 +56,8 @@ export const generatedRoutes: GeneratedRoute[] = [ component: 'layout.base$view.ai', meta: { title: 'ai', - i18nKey: 'route.ai' + i18nKey: 'route.ai', + order: 25 } }, { diff --git a/src/store/modules/auth/index.ts b/src/store/modules/auth/index.ts index c1c7672..a8b4da3 100644 --- a/src/store/modules/auth/index.ts +++ b/src/store/modules/auth/index.ts @@ -112,6 +112,7 @@ export const useAuthStore = defineStore(SetupStoreId.Auth, () => { //console.log(error?.status == 200) if (error?.status == 200) { + console.log("200") let info: Api.Auth.UserInfo = { userId: data.employeeId.toString(), userName: data.name, diff --git a/src/typings/components.d.ts b/src/typings/components.d.ts index b3e8227..81e99a0 100644 --- a/src/typings/components.d.ts +++ b/src/typings/components.d.ts @@ -18,6 +18,7 @@ declare module 'vue' { ADivider: typeof import('ant-design-vue/es')['Divider'] ADrawer: typeof import('ant-design-vue/es')['Drawer'] ADropdown: typeof import('ant-design-vue/es')['Dropdown'] + AEmpty: typeof import('ant-design-vue/es')['Empty'] AForm: typeof import('ant-design-vue/es')['Form'] AFormItem: typeof import('ant-design-vue/es')['FormItem'] AInput: typeof import('ant-design-vue/es')['Input'] diff --git a/src/utils/api.ts b/src/utils/api.ts new file mode 100644 index 0000000..c67a85e --- /dev/null +++ b/src/utils/api.ts @@ -0,0 +1,19 @@ +// api.ts +import axios from 'axios'; +import { localStg } from '@/utils/storage'; + +// 封装网络请求的接口 +export const apiRequest = async (path: string, data: any) => { + let url = "http://localhost:8080" + path; + const token = localStg.get('token'); // 获取 token + try { + const response = await axios.post(url, data, { + headers: { + Authorization: `Bearer ${token}`, // 添加 Authorization 头 + }, + }); + return response.data; // 返回响应数据 + } catch (error) { + throw new Error('请求失败'); // 抛出错误 + } +}; \ No newline at end of file diff --git a/src/views/ai/index.vue b/src/views/ai/index.vue index 8c16bd2..00034ac 100644 --- a/src/views/ai/index.vue +++ b/src/views/ai/index.vue @@ -1,7 +1,92 @@ - - - + + + \ No newline at end of file diff --git a/src/views/department/index.vue b/src/views/department/index.vue index 138af6f..fabda97 100644 --- a/src/views/department/index.vue +++ b/src/views/department/index.vue @@ -1,7 +1,235 @@ - - - + + + \ No newline at end of file diff --git a/src/views/orders/list/index.vue b/src/views/orders/list/index.vue index d442c03..347a7fb 100644 --- a/src/views/orders/list/index.vue +++ b/src/views/orders/list/index.vue @@ -1,127 +1,178 @@ + \ No newline at end of file