diff --git a/.env.development b/.env.development index 8dbca7fd015a87bc6b5ddaabd104c48a0a6fe60c..fbd0a553d3a515675443965602790a7f8f38d738 100644 --- a/.env.development +++ b/.env.development @@ -3,10 +3,11 @@ VITE_APP_PORT=3000 # 项目名称 VITE_APP_TITLE=vue3-element-admin # 代理前缀 -VITE_APP_BASE_API=/dev-api +VITE_APP_BASE_API=/api + # 接口地址 -VITE_APP_API_URL=https://api.youlai.tech # 线上 +VITE_APP_API_URL=https://zg.tuxingzhe.cn # 线上 # VITE_APP_API_URL=http://localhost:8989 # 本地 # WebSocket 端点(不配置则关闭),线上 ws://api.youlai.tech/ws ,本地 ws://localhost:8989/ws diff --git a/.env.production b/.env.production index cf3bf9a2fd4387130f60ed371d6ff96c74cdb345..527f67156d75408b831f1cfee0de10415255a711 100644 --- a/.env.production +++ b/.env.production @@ -1,5 +1,5 @@ # 代理前缀 -VITE_APP_BASE_API = '/prod-api' +VITE_APP_BASE_API = '/api' # 项目名称 VITE_APP_TITLE=vue3-element-admin # WebSocket端点(可选) diff --git a/.vscode/settings.json b/.vscode/settings.json index 302ead28d7db3f966aacdc014eb4f8774e2b7aa2..d05ee60efb53939ba8a579987d93d1a2041c2f4b 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -2,14 +2,14 @@ "typescript.tsdk": "./node_modules/typescript/lib", "npm.packageManager": "pnpm", "editor.tabSize": 2, - "editor.formatOnSave": true, - "editor.defaultFormatter": "esbenp.prettier-vscode", + "editor.formatOnSave": true, + "editor.defaultFormatter": "esbenp.prettier-vscode", "editor.quickSuggestions": { "other": true, "comments": true, "strings": true }, - "editor.codeActionsOnSave": { + "editor.codeActionsOnSave": { "source.fixAll": "explicit", "source.fixAll.eslint": "explicit", "source.fixAll.stylelint": "explicit" @@ -67,5 +67,11 @@ "src/lang/package" ], "scss.lint.unknownAtRules": "ignore", - "i18n-ally.keystyle": "nested" -} + "i18n-ally.keystyle": "nested", + "[vue]": { + "editor.defaultFormatter": "esbenp.prettier-vscode" + }, + "[markdown]": { + "editor.defaultFormatter": "DavidAnson.vscode-markdownlint" + } +} \ No newline at end of file diff --git a/LICENSE b/LICENSE index 9825cba022275577efd936680b4598b9fa8f44e5..53fbcfa00a4d98157aa1ff1de00bfd75e9866fd8 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2021-present 有来开源组织 +Copyright (c) 2021-present Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/README.en-US.md b/README.en-US.md index a534f0d4ff606037ec0acc98c7b825c6970bcc6d..aae9d0216cf0839cf2861402ee42d60bb52ead76 100644 --- a/README.en-US.md +++ b/README.en-US.md @@ -7,7 +7,7 @@ - + @@ -24,17 +24,14 @@ ![](https://foruda.gitee.com/images/1708618984641188532/a7cca095_716974.png "rainbow.png") -
🖥️ Live Preview | 📲 Mobile Preview | 📑 Documentation| 🌐 Official Website | 💬 中文
- ## Introduction [vue3-element-admin](https://gitcode.com/youlai/vue3-element-admin) is a minimalist enterprise-level backend management frontend template built with Vue3, Vite7, TypeScript, and Element-Plus. It comes with complementary Java backend [youlai-boot](https://gitee.com/youlaiorg/youlai-boot) and Node backend [youlai-nest](https://gitee.com/youlaiorg/youlai-nest). A simplified version [vue3-element-template](https://gitee.com/youlaiorg/vue3-element-template) and a JavaScript version [vue3-element-admin-js](https://gitee.com/youlaiorg/vue3-element-admin) are also available for developers to quickly start development. - ## Project Features - **Simple and Easy-to-use**: Upgraded version of [vue-element-admin](https://gitee.com/panjiachen/vue-element-admin) for Vue3, with minimal encapsulation and easy to get started. @@ -46,7 +43,6 @@ - **Infrastructure**: Provides internationalization, multiple layouts, dark mode, full screen, watermark, API documentation, and code generator functionality. - **Continuous Updates**: Project is continuously updated with real-time updates of tools and dependencies. - ## Project Screenshots 🖥️ **Dashboard** @@ -72,8 +68,6 @@ | Java Backend | [youlai-boot](https://gitee.com/youlaiorg/youlai-boot) | [youlai-boot](https://github.com/haoxianrui/youlai-boot.git) |[youlai-boot](https://gitcode.com/youlai/youlai-boot.git)| | Node Backend | [youlai-nest](https://gitee.com/youlaiorg/youlai-nest) | [youlai-nest](https://github.com/haoxianrui/youlai-nest.git) |[youlai-nest](https://gitcode.com/youlai/youlai-nest.git)| - - ## Development Guide | Name | Link | @@ -85,11 +79,8 @@ | Commit Standards | [Husky + Lint-staged + Commitlint + Commitizen + cz-git for Git Commit Standards](https://youlai.blog.csdn.net/article/details/145615236) | | API Documentation | [https://www.apifox.cn/apidoc/shared-195e783f-4d85-4235-a038-eec696de4ea5](https://www.apifox.cn/apidoc/shared-195e783f-4d85-4235-a038-eec696de4ea5) | - - ## Project Setup - - **Environment Preparation** | Environment Type | Name | @@ -97,8 +88,6 @@ | **Development Tool** | [Visual Studio Code](https://code.visualstudio.com/Download) | | **Runtime Environment** | ^20.19.0 || >=22.12.0 | - - - **Quick Start** ```bash @@ -121,7 +110,6 @@ pnpm install pnpm run dev ``` - ## Project Deployment After executing the `pnpm run build` command, the project will be bundled and a `dist` directory will be generated. Next, upload the files from the `dist` directory to the `/usr/share/nginx/html` directory on your server and configure Nginx for reverse proxy. @@ -162,8 +150,7 @@ The project supports both online and local Mock interfaces. By default, it uses 1. Get the backend source code based on `Java` and `SpringBoot` from [youlai-boot](https://gitee.com/youlaiorg/youlai-boot.git). 2. Follow the instructions in the backend project's README.md to [set up and run locally](https://gitee.com/youlaiorg/youlai-boot#%E9%A1%B9%E7%9B%AE%E8%BF%90%E8%A1%8C). -3. Modify the value of `VITE_APP_API_URL` in the `.env.development` file, changing it from https://api.youlai.tech to http://localhost:8989. - +3. Modify the value of `VITE_APP_API_URL` in the `.env.development` file, changing it from to . ## Notes @@ -189,24 +176,20 @@ The project supports both online and local Mock interfaces. By default, it uses If you have any other issues or suggestions, please open an [ISSUE](https://gitee.com/youlaiorg/vue3-element-admin/issues/new). - ## Commit Conventions Execute `pnpm run commit` to invoke interactive git commit and complete the information input and selection according to the prompts. ![](https://foruda.gitee.com/images/1687755823165218215/c1705416_716974.png) - ## Project Statistics ![](https://repobeats.axiom.co/api/embed/aa7cca3d6fa9c308fc659fa6e09af9a1910506c3.svg "Repobeats analytics image") - Thanks to all the contributors! [![contributors](https://contrib.rocks/image?repo=youlaitech/vue3-element-admin)](https://github.com/youlaitech/vue3-element-admin/graphs/contributors) - ## Special Thanks - Thanks to the [GitCode](https://gitcode.com/) official [G-Star](https://gitcode.com/g-star) certification @@ -219,4 +202,3 @@ Thanks to all the contributors! ② Directly add WeChat **`haoxianrui`** with a note indicating "Frontend/Backend/Full Stack". ![Youlai Tech WeChat Official Account](https://foruda.gitee.com/images/1737108820762592766/3390ed0d_716974.png) - diff --git a/README.md b/README.md index a203d33a5c6d98454916b83a1d2a3c6b8334e3ac..6b7995f3936d985b6dadd733a9073453dd64cbc5 100644 --- a/README.md +++ b/README.md @@ -7,7 +7,7 @@ - + @@ -44,7 +44,7 @@ - **权限管理:** 支持动态路由、按钮权限、角色权限和数据权限等多种权限管理方式。 - **基础设施:** 提供国际化、多布局、暗黑模式、全屏、水印、接口文档和代码生成器等功能。 -- **持续更新**:项目持续开源更新,实时更新工具和依赖。 +- **持续更新**:项目持续更新,实时更新工具和依赖。 ## 项目截图 diff --git a/licenses/vue3-element-admin/LICENSE b/licenses/vue3-element-admin/LICENSE index 9825cba022275577efd936680b4598b9fa8f44e5..53fbcfa00a4d98157aa1ff1de00bfd75e9866fd8 100644 --- a/licenses/vue3-element-admin/LICENSE +++ b/licenses/vue3-element-admin/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2021-present 有来开源组织 +Copyright (c) 2021-present Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/package.json b/package.json index e02246ab927ef2cf9f021766590de830ce4cd195..3fcb9563a1d3aa51a36f4acad6c6f111706215bb 100644 --- a/package.json +++ b/package.json @@ -124,6 +124,6 @@ "node": "^20.19.0 || >=22.12.0" }, "repository": "https://gitee.com/youlaiorg/vue3-element-admin.git", - "author": "有来开源组织", + "author": "", "license": "MIT" } diff --git a/src/api/system/access-api.ts b/src/api/system/access-api.ts new file mode 100644 index 0000000000000000000000000000000000000000..64de2a3586badcc5adaf881de7df26466d90ffbb --- /dev/null +++ b/src/api/system/access-api.ts @@ -0,0 +1,134 @@ +import request from "@/utils/request"; + +const ACCESS_BASE_URL = "/api/v1/access"; + +const AccessAPI = { + /** 获取apijson权限配置分页数据 */ + getPage(queryParams?: AccessPageQuery) { + return request>({ + url: `${ACCESS_BASE_URL}/page`, + method: "get", + params: queryParams, + }); + }, + /** + * 获取apijson权限配置表单数据 + * + * @param id apijson权限配置ID + * @returns apijson权限配置表单数据 + */ + getFormData(id: number) { + return request({ + url: `${ACCESS_BASE_URL}/${id}/form`, + method: "get", + }); + }, + + /** + * 添加apijson权限配置 + * + * @param data apijson权限配置表单数据 + */ + create(data: AccessForm) { + return request({ + url: `${ACCESS_BASE_URL}`, + method: "post", + data, + }); + }, + + /** + * 更新apijson权限配置 + * + * @param id apijson权限配置ID + * @param data apijson权限配置表单数据 + */ + update(id: string, data: AccessForm) { + return request({ + url: `${ACCESS_BASE_URL}/${id}`, + method: "put", + data, + }); + }, + + /** + * 批量删除apijson权限配置,多个以英文逗号(,)分割 + * + * @param ids apijson权限配置ID字符串,多个以英文逗号(,)分割 + */ + deleteByIds(ids: string) { + return request({ + url: `${ACCESS_BASE_URL}/${ids}`, + method: "delete", + }); + }, +}; + +export default AccessAPI; + +/** apijson权限配置分页查询参数 */ +export interface AccessPageQuery extends PageQuery { + /** 实际表名 */ + name?: string; + /** 表别名 */ + alias?: string; +} + +/** apijson权限配置表单对象 */ +export interface AccessForm { + /** 调试 */ + debug?: number; + /** 数据库名/模式 */ + schema?: string; + /** 实际表名 */ + name?: string; + /** 表别名 */ + alias?: string; + /** 允许 get 的角色列表 */ + get?: string; + /** 允许 head 的角色列表 */ + head?: string; + /** 允许 gets 的角色列表 */ + gets?: string; + /** 允许 heads 的角色列表 */ + heads?: string; + /** 允许 post 的角色列表 */ + post?: string; + /** 允许 put 的角色列表 */ + put?: string; + /** 允许 delete 的角色列表 */ + delete?: string; + /** 创建时间 */ + date?: Date; + detail?: string; +} + +/** apijson权限配置分页对象 */ +export interface AccessPageVO { + id?: number; + /** 调试 */ + debug?: number; + /** 数据库名/模式 */ + schema?: string; + /** 实际表名 */ + name?: string; + /** 表别名 */ + alias?: string; + /** 允许 get 的角色列表 */ + get?: string; + /** 允许 head 的角色列表 */ + head?: string; + /** 允许 gets 的角色列表 */ + gets?: string; + /** 允许 heads 的角色列表 */ + heads?: string; + /** 允许 post 的角色列表 */ + post?: string; + /** 允许 put 的角色列表 */ + put?: string; + /** 允许 delete 的角色列表 */ + delete?: string; + /** 创建时间 */ + date?: Date; + detail?: string; +} diff --git a/src/api/system/request-api.ts b/src/api/system/request-api.ts new file mode 100644 index 0000000000000000000000000000000000000000..5c3c6213e3db2996e606e5145ca19636cdfdb441 --- /dev/null +++ b/src/api/system/request-api.ts @@ -0,0 +1,117 @@ +import request from "@/utils/request"; + +const REQUEST_BASE_URL = "/api/v1/request"; + +const RequestAPI = { + /** 获取apijson校验配置分页数据 */ + getPage(queryParams?: RequestPageQuery) { + return request>({ + url: `${REQUEST_BASE_URL}/page`, + method: "get", + params: queryParams, + }); + }, + /** + * 获取apijson校验配置表单数据 + * + * @param id apijson校验配置ID + * @returns apijson校验配置表单数据 + */ + getFormData(id: number) { + return request({ + url: `${REQUEST_BASE_URL}/${id}/form`, + method: "get", + }); + }, + + /** + * 添加apijson校验配置 + * + * @param data apijson校验配置表单数据 + */ + create(data: RequestForm) { + return request({ + url: `${REQUEST_BASE_URL}`, + method: "post", + data, + }); + }, + + /** + * 更新apijson校验配置 + * + * @param id apijson校验配置ID + * @param data apijson校验配置表单数据 + */ + update(id: string, data: RequestForm) { + return request({ + url: `${REQUEST_BASE_URL}/${id}`, + method: "put", + data, + }); + }, + + /** + * 批量删除apijson校验配置,多个以英文逗号(,)分割 + * + * @param ids apijson校验配置ID字符串,多个以英文逗号(,)分割 + */ + deleteByIds(ids: string) { + return request({ + url: `${REQUEST_BASE_URL}/${ids}`, + method: "delete", + }); + }, +}; + +export default RequestAPI; + +/** apijson校验配置分页查询参数 */ +export interface RequestPageQuery extends PageQuery { + /** 唯一标识 */ + id?: number; + /** 调试 */ + debug?: number; + /** 请求方式 */ + method?: string; + /** 标签 */ + tag?: string; +} + +/** apijson校验配置表单对象 */ +export interface RequestForm { + /** 调试 */ + debug?: number; + /** 版本 */ + version?: number; + /** 请求方式 */ + method?: string; + /** 标签 */ + tag?: string; + /** 校验结构JSON */ + structure?: string; + /** 详细说明 */ + detail?: string; + /** 创建日期 */ + date?: Date; +} + +/** apijson校验配置分页对象 */ +export interface RequestPageVO { + /** 唯一标识 */ + id?: number; + /** 调试 */ + debug?: number; + /** 版本 */ + version?: number; + /** 请求方式 */ + method?: string; + /** 标签 */ + tag?: string; + /** 校验结构JSON */ + structure?: string; + /** 详细说明 */ + detail?: string; + /** 创建日期 */ + date?: Date; +} diff --git a/src/api/vehicle/vehicle-info-api.ts b/src/api/vehicle/vehicle-info-api.ts new file mode 100644 index 0000000000000000000000000000000000000000..73bd7df13f0a1f2b3ffdbebaeca80bcbc189b931 --- /dev/null +++ b/src/api/vehicle/vehicle-info-api.ts @@ -0,0 +1,197 @@ +import request from "@/utils/request"; + +const VEHICLEINFO_BASE_URL = "/api/v1/vehicle-info"; + +const VehicleInfoAPI = { + /** 获取车辆基本信息分页数据 */ + getPage(queryParams?: VehicleInfoPageQuery) { + return request>({ + url: `${VEHICLEINFO_BASE_URL}/page`, + method: "get", + params: queryParams, + }); + }, + /** + * 获取车辆基本信息表单数据 + * + * @param id 车辆基本信息ID + * @returns 车辆基本信息表单数据 + */ + getFormData(id: number) { + return request({ + url: `${VEHICLEINFO_BASE_URL}/${id}/form`, + method: "get", + }); + }, + + /** + * 添加车辆基本信息 + * + * @param data 车辆基本信息表单数据 + */ + create(data: VehicleInfoForm) { + return request({ + url: `${VEHICLEINFO_BASE_URL}`, + method: "post", + data, + }); + }, + + /** + * 更新车辆基本信息 + * + * @param id 车辆基本信息ID + * @param data 车辆基本信息表单数据 + */ + update(id: string, data: VehicleInfoForm) { + return request({ + url: `${VEHICLEINFO_BASE_URL}/${id}`, + method: "put", + data, + }); + }, + + /** + * 批量删除车辆基本信息,多个以英文逗号(,)分割 + * + * @param ids 车辆基本信息ID字符串,多个以英文逗号(,)分割 + */ + deleteByIds(ids: string) { + return request({ + url: `${VEHICLEINFO_BASE_URL}/${ids}`, + method: "delete", + }); + }, +}; + +export default VehicleInfoAPI; + +/** 车辆基本信息分页查询参数 */ +export interface VehicleInfoPageQuery extends PageQuery { + /** 车辆唯一编号(内部系统编号) */ + vehicleId?: string; + /** 车牌号 */ + licensePlate?: string; +} + +/** 车辆基本信息表单对象 */ +export interface VehicleInfoForm { + /** 车辆唯一编号(内部系统编号) */ + vehicleId?: string; + /** 车牌号 */ + licensePlate?: string; + /** 车辆识别代号(VIN) */ + vin?: string; + /** 品牌 */ + brand?: string; + /** 车型 */ + model?: string; + /** 车系 */ + series?: string; + /** 发动机型号 */ + engineModel?: string; + /** 发动机号 */ + engineNumber?: string; + /** 购置日期 */ + purchaseDate?: Date; + /** 购置价格 */ + purchasePrice?: number; + /** 购自单位/个人 */ + purchaseFrom?: string; + /** 注册日期 */ + registrationDate?: Date; + /** 首次上牌日期 */ + firstRegistrationDate?: Date; + /** 燃料类型 */ + fuelType?: string; + /** 排量(L) */ + displacement?: number; + /** 功率(kW) */ + power?: number; + /** 核定载客数 */ + seats?: number; + /** 核定载质量(吨) */ + tonnage?: number; + /** 颜色 */ + color?: string; + /** 变速箱类型 */ + gearboxType?: string; + /** 车辆状态 */ + status?: string; + /** 所属部门ID(无外键约束) */ + ownerDeptId?: number; + /** 当前驾驶人ID(无外键约束) */ + currentDriverId?: number; + /** 创建时间 */ + createdAt?: Date; + /** 更新时间 */ + updatedAt?: Date; + /** 扩展字段1 */ + extendedField1?: string; + /** 扩展字段2 */ + extendedField2?: string; + /** 扩展字段3 */ + extendedField3?: string; +} + +/** 车辆基本信息分页对象 */ +export interface VehicleInfoPageVO { + /** 主键ID */ + id?: number; + /** 车辆唯一编号(内部系统编号) */ + vehicleId?: string; + /** 车牌号 */ + licensePlate?: string; + /** 车辆识别代号(VIN) */ + vin?: string; + /** 品牌 */ + brand?: string; + /** 车型 */ + model?: string; + /** 车系 */ + series?: string; + /** 发动机型号 */ + engineModel?: string; + /** 发动机号 */ + engineNumber?: string; + /** 购置日期 */ + purchaseDate?: Date; + /** 购置价格 */ + purchasePrice?: number; + /** 购自单位/个人 */ + purchaseFrom?: string; + /** 注册日期 */ + registrationDate?: Date; + /** 首次上牌日期 */ + firstRegistrationDate?: Date; + /** 燃料类型 */ + fuelType?: string; + /** 排量(L) */ + displacement?: number; + /** 功率(kW) */ + power?: number; + /** 核定载客数 */ + seats?: number; + /** 核定载质量(吨) */ + tonnage?: number; + /** 颜色 */ + color?: string; + /** 变速箱类型 */ + gearboxType?: string; + /** 车辆状态 */ + status?: string; + /** 所属部门ID(无外键约束) */ + ownerDeptId?: number; + /** 当前驾驶人ID(无外键约束) */ + currentDriverId?: number; + /** 创建时间 */ + createdAt?: Date; + /** 更新时间 */ + updatedAt?: Date; + /** 扩展字段1 */ + extendedField1?: string; + /** 扩展字段2 */ + extendedField2?: string; + /** 扩展字段3 */ + extendedField3?: string; +} diff --git a/src/apiJson3/system/AccessAPIJSON.ts b/src/apiJson3/system/AccessAPIJSON.ts new file mode 100644 index 0000000000000000000000000000000000000000..6e0b31eabce3565e104c95b70c27228b9eca5565 --- /dev/null +++ b/src/apiJson3/system/AccessAPIJSON.ts @@ -0,0 +1,161 @@ +import request from "@/utils/request"; +import { + apiJsonGetOneTableParams, + apiJsonOmit, + apiJsonPageQuery, + apiJsonPostTableParams, +} from "@/utils/apijson"; + +const APIJSON_BASE_URL = "/api"; +const TABLE_NAME = "Access"; + +const AccessAPI = { + /** 获取apijson权限配置分页数据 */ + getPage(queryParams?: AccessPageQuery) { + return request>({ + url: `${APIJSON_BASE_URL}/json/get`, + method: "post", + data: apiJsonGetOneTableParams( + TABLE_NAME, + apiJsonOmit(queryParams, "pageNum", "pageSize"), + apiJsonPageQuery(queryParams?.pageNum, queryParams?.pageSize) + ), + }); + }, + /** + * 获取apijson权限配置表单数据 + * + * @param id apijson权限配置ID + * @returns apijson权限配置表单数据 + */ + getFormData(id: number) { + return request>({ + url: `${APIJSON_BASE_URL}/json/get`, + method: "post", + data: apiJsonGetOneTableParams(TABLE_NAME, { id }, apiJsonPageQuery(1, 1)), + }); + }, + + /** + * 添加apijson权限配置 + * + * @param data apijson权限配置表单数据 + */ + create(data: AccessForm) { + return request({ + url: `${APIJSON_BASE_URL}/json/post`, + method: "post", + data: apiJsonPostTableParams( + TABLE_NAME, + { + ...(data as ApiJsonTableParams), + }, + TABLE_NAME + ), + }); + }, + + /** + * 更新apijson权限配置 + * + * @param id apijson权限配置ID + * @param data apijson权限配置表单数据 + */ + update(id: string, data: AccessForm) { + return request({ + url: `${APIJSON_BASE_URL}/json/put`, + method: "post", + data: apiJsonPostTableParams( + TABLE_NAME, + { + id, + ...(data as ApiJsonTableParams), + }, + TABLE_NAME + ), + }); + }, + + /** + * 批量删除apijson权限配置,多个以英文逗号(,)分割 + * + * @param ids apijson权限配置ID字符串,多个以英文逗号(,)分割 + */ + deleteByIds(ids: string) { + return request({ + url: `${APIJSON_BASE_URL}/json/delete`, + method: "post", + data: apiJsonPostTableParams( + TABLE_NAME, + { + "id{}": ids.split(","), + }, + TABLE_NAME + ), + }); + }, +}; + +export default AccessAPI; + +/** apijson权限配置分页查询参数 */ +export interface AccessPageQuery extends PageQuery {} + +/** apijson权限配置表单对象 */ +export interface AccessForm { + /** 调试 */ + debug?: number; + /** 数据库名/模式 */ + schema?: string; + /** 实际表名 */ + name?: string; + /** 表别名 */ + alias?: string; + /** 允许 get 的角色列表 */ + get?: string; + /** 允许 head 的角色列表 */ + head?: string; + /** 允许 gets 的角色列表 */ + gets?: string; + /** 允许 heads 的角色列表 */ + heads?: string; + /** 允许 post 的角色列表 */ + post?: string; + /** 允许 put 的角色列表 */ + put?: string; + /** 允许 delete 的角色列表 */ + delete?: string; + /** 创建时间 */ + date?: Date; + detail?: string; +} + +/** apijson权限配置分页对象 */ +export interface AccessPageVO { + id?: number; + /** 调试 */ + debug?: number; + /** 数据库名/模式 */ + schema?: string; + /** 实际表名 */ + name?: string; + /** 表别名 */ + alias?: string; + /** 允许 get 的角色列表 */ + get?: string; + /** 允许 head 的角色列表 */ + head?: string; + /** 允许 gets 的角色列表 */ + gets?: string; + /** 允许 heads 的角色列表 */ + heads?: string; + /** 允许 post 的角色列表 */ + post?: string; + /** 允许 put 的角色列表 */ + put?: string; + /** 允许 delete 的角色列表 */ + delete?: string; + /** 创建时间 */ + date?: Date; + detail?: string; +} diff --git a/src/apiJson3/system/RequestAPIJSON.ts b/src/apiJson3/system/RequestAPIJSON.ts new file mode 100644 index 0000000000000000000000000000000000000000..97d844daca774573e1069d8cbd302880db48854e --- /dev/null +++ b/src/apiJson3/system/RequestAPIJSON.ts @@ -0,0 +1,151 @@ +import { + apiJsonGetOneTableParams, + apiJsonOmit, + apiJsonPageQuery, + apiJsonPostTableParams, +} from "@/utils/apijson"; +import request from "@/utils/request"; + +const REQUEST_BASE_URL = "/api/v1/request"; +const APIJSON_BASE_URL = "/api"; +const TABLE_NAME = "Request"; +const RequestAPI = { + /** 获取apijson校验配置分页数据 */ + getPage(queryParams?: RequestPageQuery) { + return request>({ + url: `${APIJSON_BASE_URL}/json/get`, + method: "post", + data: apiJsonGetOneTableParams( + TABLE_NAME, + apiJsonOmit(queryParams, "pageNum", "pageSize"), + apiJsonPageQuery(queryParams?.pageNum, queryParams?.pageSize) + ), + }); + }, + /** + * 获取apijson校验配置表单数据 + * + * @param id apijson校验配置ID + * @returns apijson校验配置表单数据 + */ + getFormData(id: number) { + return request>({ + url: `${APIJSON_BASE_URL}/json/get`, + method: "post", + data: apiJsonGetOneTableParams(TABLE_NAME, { id }, apiJsonPageQuery(1, 1)), + }); + }, + + /** + * 添加apijson校验配置 + * + * @param data apijson校验配置表单数据 + */ + create(data: RequestForm) { + return request({ + url: `${APIJSON_BASE_URL}/json/post`, + method: "post", + data: apiJsonPostTableParams( + TABLE_NAME, + { + ...(data as ApiJsonTableParams), + }, + TABLE_NAME + ), + }); + }, + + /** + * 更新apijson校验配置 + * + * @param id apijson校验配置ID + * @param data apijson校验配置表单数据 + */ + update(id: string, data: RequestForm) { + return request({ + url: `${APIJSON_BASE_URL}/json/put`, + method: "post", + data: apiJsonPostTableParams( + TABLE_NAME, + { + id, + ...(data as ApiJsonTableParams), + }, + TABLE_NAME + ), + }); + }, + + /** + * 批量删除apijson校验配置,多个以英文逗号(,)分割 + * + * @param ids apijson校验配置ID字符串,多个以英文逗号(,)分割 + */ + deleteByIds(ids: string) { + return request({ + url: `${APIJSON_BASE_URL}/json/delete`, + method: "post", + data: apiJsonPostTableParams( + TABLE_NAME, + { + "id{}": ids.split(","), + }, + TABLE_NAME + ), + }); + }, +}; + +export default RequestAPI; + +/** apijson校验配置分页查询参数 */ +export interface RequestPageQuery extends PageQuery { + /** 唯一标识 */ + id?: number; + /** 调试 */ + debug?: number; + /** 请求方式 */ + method?: string; + /** 标签 */ + tag?: string; +} + +/** apijson校验配置表单对象 */ +export interface RequestForm { + /** 唯一标识 */ + id?: number; + /** 调试 */ + debug?: number; + /** 版本 */ + version?: number; + /** 请求方式 */ + method?: string; + /** 标签 */ + tag?: string; + /** 校验结构JSON */ + structure?: object; + /** 详细说明 */ + detail?: string; + /** 创建日期 */ + date?: Date; +} + +/** apijson校验配置分页对象 */ +export interface RequestPageVO { + /** 唯一标识 */ + id?: number; + /** 调试 */ + debug?: number; + /** 版本 */ + version?: number; + /** 请求方式 */ + method?: string; + /** 标签 */ + tag?: string; + /** 校验结构JSON */ + structure?: object; + /** 详细说明 */ + detail?: string; + /** 创建日期 */ + date?: Date; +} diff --git a/src/apiJson3/system/vehicle-info-apijson.ts b/src/apiJson3/system/vehicle-info-apijson.ts new file mode 100644 index 0000000000000000000000000000000000000000..046ea7e1ee21ef973f256ed0d5b92107d6fab094 --- /dev/null +++ b/src/apiJson3/system/vehicle-info-apijson.ts @@ -0,0 +1,224 @@ +import request from "@/utils/request"; +import { + apiJsonGetOneTableParams, + apiJsonOmit, + apiJsonPageQuery, + apiJsonPostTableParams, +} from "@/utils/apijson"; + +const APIJSON_BASE_URL = "/api"; +const TABLE_NAME = "VehicleInfo"; + +const VehicleInfoAPI = { + /** 获取车辆基本信息分页数据 */ + getPage(queryParams?: VehicleInfoPageQuery) { + return request>({ + url: `${APIJSON_BASE_URL}/json/get`, + method: "post", + data: apiJsonGetOneTableParams( + TABLE_NAME, + apiJsonOmit(queryParams, "pageNum", "pageSize"), + apiJsonPageQuery(queryParams?.pageNum, queryParams?.pageSize) + ), + }); + }, + /** + * 获取车辆基本信息表单数据 + * + * @param id 车辆基本信息ID + * @returns 车辆基本信息表单数据 + */ + getFormData(id: number) { + return request>({ + url: `${APIJSON_BASE_URL}/json/get`, + method: "post", + data: apiJsonGetOneTableParams(TABLE_NAME, { id }, apiJsonPageQuery(1, 1)), + }); + }, + + /** + * 添加车辆基本信息 + * + * @param data 车辆基本信息表单数据 + */ + create(data: VehicleInfoForm) { + return request({ + url: `${APIJSON_BASE_URL}/json/post`, + method: "post", + data: apiJsonPostTableParams( + TABLE_NAME, + { + ...(data as ApiJsonTableParams), + }, + TABLE_NAME + ), + }); + }, + + /** + * 更新车辆基本信息 + * + * @param id 车辆基本信息ID + * @param data 车辆基本信息表单数据 + */ + update(id: string, data: VehicleInfoForm) { + return request({ + url: `${APIJSON_BASE_URL}/json/put`, + method: "post", + data: apiJsonPostTableParams( + TABLE_NAME, + { + id, + ...(data as ApiJsonTableParams), + }, + TABLE_NAME + ), + }); + }, + + /** + * 批量删除车辆基本信息,多个以英文逗号(,)分割 + * + * @param ids 车辆基本信息ID字符串,多个以英文逗号(,)分割 + */ + deleteByIds(ids: string) { + return request({ + url: `${APIJSON_BASE_URL}/json/delete`, + method: "post", + data: apiJsonPostTableParams( + TABLE_NAME, + { + "id{}": ids.split(","), + }, + TABLE_NAME + ), + }); + }, +}; + +export default VehicleInfoAPI; + +/** 车辆基本信息分页查询参数 */ +export interface VehicleInfoPageQuery extends PageQuery {} + +/** 车辆基本信息表单对象 */ +export interface VehicleInfoForm { + /** 车辆唯一编号 */ + vehicleId?: string; + /** 车牌号 */ + licensePlate?: string; + /** 车辆识别代号(VIN) */ + vin?: string; + /** 品牌 */ + brand?: string; + /** 车型 */ + model?: string; + /** 车系 */ + series?: string; + /** 发动机型号 */ + engineModel?: string; + /** 发动机号 */ + engineNumber?: string; + /** 购置日期 */ + purchaseDate?: Date; + /** 购置价格 */ + purchasePrice?: number; + /** 购自单位/个人 */ + purchaseFrom?: string; + /** 注册日期 */ + registrationDate?: Date; + /** 首次上牌日期 */ + firstRegistrationDate?: Date; + /** 燃料类型 */ + fuelType?: string; + /** 排量(L) */ + displacement?: number; + /** 功率(kW) */ + power?: number; + /** 核定载客数 */ + seats?: number; + /** 核定载质量(吨) */ + tonnage?: number; + /** 颜色 */ + color?: string; + /** 变速箱类型 */ + gearboxType?: string; + /** 车辆状态 */ + status?: string; + /** 所属部门ID */ + ownerDeptId?: number; + /** 当前驾驶人ID */ + currentDriverId?: number; + /** 创建时间 */ + createdAt?: Date; + /** 更新时间 */ + updatedAt?: Date; + /** 扩展字段1 */ + extendedField1?: string; + /** 扩展字段2 */ + extendedField2?: string; + /** 扩展字段3 */ + extendedField3?: string; +} + +/** 车辆基本信息分页对象 */ +export interface VehicleInfoPageVO { + /** 主键ID */ + id?: number; + /** 车辆唯一编号 */ + vehicleId?: string; + /** 车牌号 */ + licensePlate?: string; + /** 车辆识别代号(VIN) */ + vin?: string; + /** 品牌 */ + brand?: string; + /** 车型 */ + model?: string; + /** 车系 */ + series?: string; + /** 发动机型号 */ + engineModel?: string; + /** 发动机号 */ + engineNumber?: string; + /** 购置日期 */ + purchaseDate?: Date; + /** 购置价格 */ + purchasePrice?: number; + /** 购自单位/个人 */ + purchaseFrom?: string; + /** 注册日期 */ + registrationDate?: Date; + /** 首次上牌日期 */ + firstRegistrationDate?: Date; + /** 燃料类型 */ + fuelType?: string; + /** 排量(L) */ + displacement?: number; + /** 功率(kW) */ + power?: number; + /** 核定载客数 */ + seats?: number; + /** 核定载质量(吨) */ + tonnage?: number; + /** 颜色 */ + color?: string; + /** 变速箱类型 */ + gearboxType?: string; + /** 车辆状态 */ + status?: string; + /** 所属部门ID */ + ownerDeptId?: number; + /** 当前驾驶人ID */ + currentDriverId?: number; + /** 创建时间 */ + createdAt?: Date; + /** 更新时间 */ + updatedAt?: Date; + /** 扩展字段1 */ + extendedField1?: string; + /** 扩展字段2 */ + extendedField2?: string; + /** 扩展字段3 */ + extendedField3?: string; +} diff --git a/src/apiJson3/vehicle/vehicle-info-apijson.ts b/src/apiJson3/vehicle/vehicle-info-apijson.ts new file mode 100644 index 0000000000000000000000000000000000000000..004ed332c3f63f808fdbcae2afd672d4f8841543 --- /dev/null +++ b/src/apiJson3/vehicle/vehicle-info-apijson.ts @@ -0,0 +1,239 @@ +import request from "@/utils/request"; +import { + apiJsonGetOneTableParams, + apiJsonOmit, + apiJsonPageQuery, + apiJsonPostTableParams, +} from "@/utils/apijson"; + +const APIJSON_BASE_URL = "/api"; +const TABLE_NAME = "VehicleInfo"; + +const VehicleInfoAPI = { + /** 获取车辆基本信息分页数据 */ + getPage(queryParams?: VehicleInfoPageQuery) { + return request>({ + url: `${APIJSON_BASE_URL}/json/get`, + method: "post", + data: apiJsonGetOneTableParams( + TABLE_NAME, + apiJsonOmit(queryParams, "pageNum", "pageSize"), + apiJsonPageQuery(queryParams?.pageNum, queryParams?.pageSize) + ), + }); + }, + /** + * 获取车辆基本信息表单数据 + * + * @param id 车辆基本信息ID + * @returns 车辆基本信息表单数据 + */ + getFormData(id: number) { + return request>({ + url: `${APIJSON_BASE_URL}/json/get`, + method: "post", + data: apiJsonGetOneTableParams(TABLE_NAME, { id }, apiJsonPageQuery(1, 1)), + }); + }, + + /** + * 添加车辆基本信息 + * + * @param data 车辆基本信息表单数据 + */ + create(data: VehicleInfoForm) { + return request({ + url: `${APIJSON_BASE_URL}/json/post`, + method: "post", + data: apiJsonPostTableParams( + TABLE_NAME, + { + ...(data as ApiJsonTableParams), + }, + TABLE_NAME + ), + }); + }, + + /** + * 更新车辆基本信息 + * + * @param id 车辆基本信息ID + * @param data 车辆基本信息表单数据 + */ + update(id: string, data: VehicleInfoForm) { + return request({ + url: `${APIJSON_BASE_URL}/json/put`, + method: "post", + data: apiJsonPostTableParams( + TABLE_NAME, + { + id, + ...(data as ApiJsonTableParams), + }, + TABLE_NAME + ), + }); + }, + + /** + * 批量删除车辆基本信息,多个以英文逗号(,)分割 + * + * @param ids 车辆基本信息ID字符串,多个以英文逗号(,)分割 + */ + deleteByIds(ids: string) { + return request({ + url: `${APIJSON_BASE_URL}/json/delete`, + method: "post", + data: apiJsonPostTableParams( + TABLE_NAME, + { + "id{}": ids.split(","), + }, + TABLE_NAME + ), + }); + }, +}; + +export default VehicleInfoAPI; + +/** 车辆基本信息分页查询参数 */ +export interface VehicleInfoPageQuery extends PageQuery { + /** 车辆唯一编号 */ + vehicleId?: string; + /** 车牌号 */ + licensePlate?: string; + /** 车辆识别代号(VIN) */ + vin?: string; + /** 核定载客数 */ + seats?: number; + /** 颜色 */ + color?: string; + /** 变速箱类型 */ + gearboxType?: string; + /** 车辆状态 */ + status?: string; +} + +/** 车辆基本信息表单对象 */ +export interface VehicleInfoForm { + /** 车辆唯一编号 */ + vehicleId?: string; + /** 车牌号 */ + licensePlate?: string; + /** 车辆识别代号(VIN) */ + vin?: string; + /** 品牌 */ + brand?: string; + /** 车型 */ + model?: string; + /** 车系 */ + series?: string; + /** 发动机型号 */ + engineModel?: string; + /** 发动机号 */ + engineNumber?: string; + /** 购置日期 */ + purchaseDate?: Date; + /** 购置价格 */ + purchasePrice?: number; + /** 购自单位/个人 */ + purchaseFrom?: string; + /** 注册日期 */ + registrationDate?: Date; + /** 首次上牌日期 */ + firstRegistrationDate?: Date; + /** 燃料类型 */ + fuelType?: string; + /** 排量(L) */ + displacement?: number; + /** 功率(kW) */ + power?: number; + /** 核定载客数 */ + seats?: number; + /** 核定载质量(吨) */ + tonnage?: number; + /** 颜色 */ + color?: string; + /** 变速箱类型 */ + gearboxType?: string; + /** 车辆状态 */ + status?: string; + /** 所属部门ID */ + ownerDeptId?: number; + /** 当前驾驶人ID */ + currentDriverId?: number; + /** 创建时间 */ + createdAt?: Date; + /** 更新时间 */ + updatedAt?: Date; + /** 扩展字段1 */ + extendedField1?: string; + /** 扩展字段2 */ + extendedField2?: string; + /** 扩展字段3 */ + extendedField3?: string; +} + +/** 车辆基本信息分页对象 */ +export interface VehicleInfoPageVO { + /** 主键ID */ + id?: number; + /** 车辆唯一编号 */ + vehicleId?: string; + /** 车牌号 */ + licensePlate?: string; + /** 车辆识别代号(VIN) */ + vin?: string; + /** 品牌 */ + brand?: string; + /** 车型 */ + model?: string; + /** 车系 */ + series?: string; + /** 发动机型号 */ + engineModel?: string; + /** 发动机号 */ + engineNumber?: string; + /** 购置日期 */ + purchaseDate?: Date; + /** 购置价格 */ + purchasePrice?: number; + /** 购自单位/个人 */ + purchaseFrom?: string; + /** 注册日期 */ + registrationDate?: Date; + /** 首次上牌日期 */ + firstRegistrationDate?: Date; + /** 燃料类型 */ + fuelType?: string; + /** 排量(L) */ + displacement?: number; + /** 功率(kW) */ + power?: number; + /** 核定载客数 */ + seats?: number; + /** 核定载质量(吨) */ + tonnage?: number; + /** 颜色 */ + color?: string; + /** 变速箱类型 */ + gearboxType?: string; + /** 车辆状态 */ + status?: string; + /** 所属部门ID */ + ownerDeptId?: number; + /** 当前驾驶人ID */ + currentDriverId?: number; + /** 创建时间 */ + createdAt?: Date; + /** 更新时间 */ + updatedAt?: Date; + /** 扩展字段1 */ + extendedField1?: string; + /** 扩展字段2 */ + extendedField2?: string; + /** 扩展字段3 */ + extendedField3?: string; +} diff --git a/src/apijson/system/access-apijson.ts b/src/apijson/system/access-apijson.ts new file mode 100644 index 0000000000000000000000000000000000000000..29ed920104c96317483f4355c19cce6fd186c4e0 --- /dev/null +++ b/src/apijson/system/access-apijson.ts @@ -0,0 +1,166 @@ +import request from "@/utils/request"; +import { + apiJsonGetOneTableParams, + apiJsonOmit, + apiJsonPageQuery, + apiJsonPostTableParams, +} from "@/utils/apijson"; + +const APIJSON_BASE_URL = "/api"; +const TABLE_NAME = "Access"; + +const AccessAPI = { + /** 获取apijson权限配置分页数据 */ + getPage(queryParams?: AccessPageQuery) { + return request>({ + url: `${APIJSON_BASE_URL}/json/get`, + method: "post", + data: apiJsonGetOneTableParams( + TABLE_NAME, + apiJsonOmit(queryParams, "pageNum", "pageSize"), + apiJsonPageQuery(queryParams?.pageNum, queryParams?.pageSize) + ), + }); + }, + /** + * 获取apijson权限配置表单数据 + * + * @param id apijson权限配置ID + * @returns apijson权限配置表单数据 + */ + getFormData(id: number) { + return request>({ + url: `${APIJSON_BASE_URL}/json/get`, + method: "post", + data: apiJsonGetOneTableParams(TABLE_NAME, { id }, apiJsonPageQuery(1, 1)), + }); + }, + + /** + * 添加apijson权限配置 + * + * @param data apijson权限配置表单数据 + */ + create(data: AccessForm) { + return request({ + url: `${APIJSON_BASE_URL}/json/post`, + method: "post", + data: apiJsonPostTableParams( + TABLE_NAME, + { + ...(data as ApiJsonTableParams), + }, + TABLE_NAME + ), + }); + }, + + /** + * 更新apijson权限配置 + * + * @param id apijson权限配置ID + * @param data apijson权限配置表单数据 + */ + update(id: string, data: AccessForm) { + return request({ + url: `${APIJSON_BASE_URL}/json/put`, + method: "post", + data: apiJsonPostTableParams( + TABLE_NAME, + { + id, + ...(data as ApiJsonTableParams), + }, + TABLE_NAME + ), + }); + }, + + /** + * 批量删除apijson权限配置,多个以英文逗号(,)分割 + * + * @param ids apijson权限配置ID字符串,多个以英文逗号(,)分割 + */ + deleteByIds(ids: string) { + return request({ + url: `${APIJSON_BASE_URL}/json/delete`, + method: "post", + data: apiJsonPostTableParams( + TABLE_NAME, + { + "id{}": ids.split(","), + }, + TABLE_NAME + ), + }); + }, +}; + +export default AccessAPI; + +/** apijson权限配置分页查询参数 */ +export interface AccessPageQuery extends PageQuery { + /** 实际表名 */ + name?: string; + /** 表别名 */ + alias?: string; +} + +/** apijson权限配置表单对象 */ +export interface AccessForm { + /** 调试 */ + debug?: number; + /** 数据库名/模式 */ + schema?: string; + /** 实际表名 */ + name?: string; + /** 表别名 */ + alias?: string; + /** 允许 get 的角色列表 */ + get?: string; + /** 允许 head 的角色列表 */ + head?: string; + /** 允许 gets 的角色列表 */ + gets?: string; + /** 允许 heads 的角色列表 */ + heads?: string; + /** 允许 post 的角色列表 */ + post?: string; + /** 允许 put 的角色列表 */ + put?: string; + /** 允许 delete 的角色列表 */ + delete?: string; + /** 创建时间 */ + date?: Date; + detail?: string; +} + +/** apijson权限配置分页对象 */ +export interface AccessPageVO { + id?: number; + /** 调试 */ + debug?: number; + /** 数据库名/模式 */ + schema?: string; + /** 实际表名 */ + name?: string; + /** 表别名 */ + alias?: string; + /** 允许 get 的角色列表 */ + get?: string; + /** 允许 head 的角色列表 */ + head?: string; + /** 允许 gets 的角色列表 */ + gets?: string; + /** 允许 heads 的角色列表 */ + heads?: string; + /** 允许 post 的角色列表 */ + post?: string; + /** 允许 put 的角色列表 */ + put?: string; + /** 允许 delete 的角色列表 */ + delete?: string; + /** 创建时间 */ + date?: Date; + detail?: string; +} diff --git a/src/apijson/system/request-apijson.ts b/src/apijson/system/request-apijson.ts new file mode 100644 index 0000000000000000000000000000000000000000..62a0d48ce169dc779a38804d42b88ed5adb99851 --- /dev/null +++ b/src/apijson/system/request-apijson.ts @@ -0,0 +1,149 @@ +import request from "@/utils/request"; +import { + apiJsonGetOneTableParams, + apiJsonOmit, + apiJsonPageQuery, + apiJsonPostTableParams, +} from "@/utils/apijson"; + +const APIJSON_BASE_URL = "/api"; +const TABLE_NAME = "Request"; + +const RequestAPI = { + /** 获取apijson校验配置分页数据 */ + getPage(queryParams?: RequestPageQuery) { + return request>({ + url: `${APIJSON_BASE_URL}/json/get`, + method: "post", + data: apiJsonGetOneTableParams( + TABLE_NAME, + apiJsonOmit(queryParams, "pageNum", "pageSize"), + apiJsonPageQuery(queryParams?.pageNum, queryParams?.pageSize) + ), + }); + }, + /** + * 获取apijson校验配置表单数据 + * + * @param id apijson校验配置ID + * @returns apijson校验配置表单数据 + */ + getFormData(id: number) { + return request>({ + url: `${APIJSON_BASE_URL}/json/get`, + method: "post", + data: apiJsonGetOneTableParams(TABLE_NAME, { id }, apiJsonPageQuery(1, 1)), + }); + }, + + /** + * 添加apijson校验配置 + * + * @param data apijson校验配置表单数据 + */ + create(data: RequestForm) { + return request({ + url: `${APIJSON_BASE_URL}/json/post`, + method: "post", + data: apiJsonPostTableParams( + TABLE_NAME, + { + ...(data as ApiJsonTableParams), + }, + TABLE_NAME + ), + }); + }, + + /** + * 更新apijson校验配置 + * + * @param id apijson校验配置ID + * @param data apijson校验配置表单数据 + */ + update(id: string, data: RequestForm) { + return request({ + url: `${APIJSON_BASE_URL}/json/put`, + method: "post", + data: apiJsonPostTableParams( + TABLE_NAME, + { + id, + ...(data as ApiJsonTableParams), + }, + TABLE_NAME + ), + }); + }, + + /** + * 批量删除apijson校验配置,多个以英文逗号(,)分割 + * + * @param ids apijson校验配置ID字符串,多个以英文逗号(,)分割 + */ + deleteByIds(ids: string) { + return request({ + url: `${APIJSON_BASE_URL}/json/delete`, + method: "post", + data: apiJsonPostTableParams( + TABLE_NAME, + { + "id{}": ids.split(","), + }, + TABLE_NAME + ), + }); + }, +}; + +export default RequestAPI; + +/** apijson校验配置分页查询参数 */ +export interface RequestPageQuery extends PageQuery { + /** 唯一标识 */ + id?: number; + /** 调试 */ + debug?: number; + /** 请求方式 */ + method?: string; + /** 标签 */ + tag?: string; +} + +/** apijson校验配置表单对象 */ +export interface RequestForm { + /** 调试 */ + debug?: number; + /** 版本 */ + version?: number; + /** 请求方式 */ + method?: string; + /** 标签 */ + tag?: string; + /** 校验结构JSON */ + structure?: string; + /** 详细说明 */ + detail?: string; + /** 创建日期 */ + date?: Date; +} + +/** apijson校验配置分页对象 */ +export interface RequestPageVO { + /** 唯一标识 */ + id?: number; + /** 调试 */ + debug?: number; + /** 版本 */ + version?: number; + /** 请求方式 */ + method?: string; + /** 标签 */ + tag?: string; + /** 校验结构JSON */ + structure?: string; + /** 详细说明 */ + detail?: string; + /** 创建日期 */ + date?: Date; +} diff --git a/src/apijson/vehicle/vehicle-info-apijson.ts b/src/apijson/vehicle/vehicle-info-apijson.ts new file mode 100644 index 0000000000000000000000000000000000000000..151ef99a8b1716c51432275c72a01818fc91adcb --- /dev/null +++ b/src/apijson/vehicle/vehicle-info-apijson.ts @@ -0,0 +1,229 @@ +import request from "@/utils/request"; +import { + apiJsonGetOneTableParams, + apiJsonOmit, + apiJsonPageQuery, + apiJsonPostTableParams, +} from "@/utils/apijson"; + +const APIJSON_BASE_URL = "/api"; +const TABLE_NAME = "VehicleInfo"; + +const VehicleInfoAPI = { + /** 获取车辆基本信息分页数据 */ + getPage(queryParams?: VehicleInfoPageQuery) { + return request>({ + url: `${APIJSON_BASE_URL}/json/get`, + method: "post", + data: apiJsonGetOneTableParams( + TABLE_NAME, + apiJsonOmit(queryParams, "pageNum", "pageSize"), + apiJsonPageQuery(queryParams?.pageNum, queryParams?.pageSize) + ), + }); + }, + /** + * 获取车辆基本信息表单数据 + * + * @param id 车辆基本信息ID + * @returns 车辆基本信息表单数据 + */ + getFormData(id: number) { + return request>({ + url: `${APIJSON_BASE_URL}/json/get`, + method: "post", + data: apiJsonGetOneTableParams(TABLE_NAME, { id }, apiJsonPageQuery(1, 1)), + }); + }, + + /** + * 添加车辆基本信息 + * + * @param data 车辆基本信息表单数据 + */ + create(data: VehicleInfoForm) { + return request({ + url: `${APIJSON_BASE_URL}/json/post`, + method: "post", + data: apiJsonPostTableParams( + TABLE_NAME, + { + ...(data as ApiJsonTableParams), + }, + TABLE_NAME + ), + }); + }, + + /** + * 更新车辆基本信息 + * + * @param id 车辆基本信息ID + * @param data 车辆基本信息表单数据 + */ + update(id: string, data: VehicleInfoForm) { + return request({ + url: `${APIJSON_BASE_URL}/json/put`, + method: "post", + data: apiJsonPostTableParams( + TABLE_NAME, + { + id, + ...(data as ApiJsonTableParams), + }, + TABLE_NAME + ), + }); + }, + + /** + * 批量删除车辆基本信息,多个以英文逗号(,)分割 + * + * @param ids 车辆基本信息ID字符串,多个以英文逗号(,)分割 + */ + deleteByIds(ids: string) { + return request({ + url: `${APIJSON_BASE_URL}/json/delete`, + method: "post", + data: apiJsonPostTableParams( + TABLE_NAME, + { + "id{}": ids.split(","), + }, + TABLE_NAME + ), + }); + }, +}; + +export default VehicleInfoAPI; + +/** 车辆基本信息分页查询参数 */ +export interface VehicleInfoPageQuery extends PageQuery { + /** 车辆唯一编号(内部系统编号) */ + vehicleId?: string; + /** 车牌号 */ + licensePlate?: string; +} + +/** 车辆基本信息表单对象 */ +export interface VehicleInfoForm { + /** 车辆唯一编号(内部系统编号) */ + vehicleId?: string; + /** 车牌号 */ + licensePlate?: string; + /** 车辆识别代号(VIN) */ + vin?: string; + /** 品牌 */ + brand?: string; + /** 车型 */ + model?: string; + /** 车系 */ + series?: string; + /** 发动机型号 */ + engineModel?: string; + /** 发动机号 */ + engineNumber?: string; + /** 购置日期 */ + purchaseDate?: Date; + /** 购置价格 */ + purchasePrice?: number; + /** 购自单位/个人 */ + purchaseFrom?: string; + /** 注册日期 */ + registrationDate?: Date; + /** 首次上牌日期 */ + firstRegistrationDate?: Date; + /** 燃料类型 */ + fuelType?: string; + /** 排量(L) */ + displacement?: number; + /** 功率(kW) */ + power?: number; + /** 核定载客数 */ + seats?: number; + /** 核定载质量(吨) */ + tonnage?: number; + /** 颜色 */ + color?: string; + /** 变速箱类型 */ + gearboxType?: string; + /** 车辆状态 */ + status?: string; + /** 所属部门ID(无外键约束) */ + ownerDeptId?: number; + /** 当前驾驶人ID(无外键约束) */ + currentDriverId?: number; + /** 创建时间 */ + createdAt?: Date; + /** 更新时间 */ + updatedAt?: Date; + /** 扩展字段1 */ + extendedField1?: string; + /** 扩展字段2 */ + extendedField2?: string; + /** 扩展字段3 */ + extendedField3?: string; +} + +/** 车辆基本信息分页对象 */ +export interface VehicleInfoPageVO { + /** 主键ID */ + id?: number; + /** 车辆唯一编号(内部系统编号) */ + vehicleId?: string; + /** 车牌号 */ + licensePlate?: string; + /** 车辆识别代号(VIN) */ + vin?: string; + /** 品牌 */ + brand?: string; + /** 车型 */ + model?: string; + /** 车系 */ + series?: string; + /** 发动机型号 */ + engineModel?: string; + /** 发动机号 */ + engineNumber?: string; + /** 购置日期 */ + purchaseDate?: Date; + /** 购置价格 */ + purchasePrice?: number; + /** 购自单位/个人 */ + purchaseFrom?: string; + /** 注册日期 */ + registrationDate?: Date; + /** 首次上牌日期 */ + firstRegistrationDate?: Date; + /** 燃料类型 */ + fuelType?: string; + /** 排量(L) */ + displacement?: number; + /** 功率(kW) */ + power?: number; + /** 核定载客数 */ + seats?: number; + /** 核定载质量(吨) */ + tonnage?: number; + /** 颜色 */ + color?: string; + /** 变速箱类型 */ + gearboxType?: string; + /** 车辆状态 */ + status?: string; + /** 所属部门ID(无外键约束) */ + ownerDeptId?: number; + /** 当前驾驶人ID(无外键约束) */ + currentDriverId?: number; + /** 创建时间 */ + createdAt?: Date; + /** 更新时间 */ + updatedAt?: Date; + /** 扩展字段1 */ + extendedField1?: string; + /** 扩展字段2 */ + extendedField2?: string; + /** 扩展字段3 */ + extendedField3?: string; +} diff --git a/src/assets/icons/cheliangdangan.svg b/src/assets/icons/cheliangdangan.svg new file mode 100644 index 0000000000000000000000000000000000000000..c30cc6df6732225a45776bbcfde911d38d1f08db --- /dev/null +++ b/src/assets/icons/cheliangdangan.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/icons/cheliangdiaodu.svg b/src/assets/icons/cheliangdiaodu.svg new file mode 100644 index 0000000000000000000000000000000000000000..97c43465a834d29fe75519b6cda2c5581c5420ff --- /dev/null +++ b/src/assets/icons/cheliangdiaodu.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/icons/jiaoguan.svg b/src/assets/icons/jiaoguan.svg new file mode 100644 index 0000000000000000000000000000000000000000..872102d6af1d3301db219bdb77fb0b87a0c9f34a --- /dev/null +++ b/src/assets/icons/jiaoguan.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/icons/jidi.svg b/src/assets/icons/jidi.svg new file mode 100644 index 0000000000000000000000000000000000000000..98a45fba984616d79ef83bee2a1fddd544613597 --- /dev/null +++ b/src/assets/icons/jidi.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/icons/kaohe.svg b/src/assets/icons/kaohe.svg new file mode 100644 index 0000000000000000000000000000000000000000..a052d28d405a965c2cb0f7704bc34e085aee1aa4 --- /dev/null +++ b/src/assets/icons/kaohe.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/icons/kecheng.svg b/src/assets/icons/kecheng.svg new file mode 100644 index 0000000000000000000000000000000000000000..f7feefa60edac2d0e0001f8406e754978ffee784 --- /dev/null +++ b/src/assets/icons/kecheng.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/icons/peixun.svg b/src/assets/icons/peixun.svg new file mode 100644 index 0000000000000000000000000000000000000000..ba97223ddad80b10ff33d163ffa8bd5fd874a6b5 --- /dev/null +++ b/src/assets/icons/peixun.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/icons/qian.svg b/src/assets/icons/qian.svg new file mode 100644 index 0000000000000000000000000000000000000000..25fd56e29b34fc7ae98d6f6c7722f0cf5c392d8e --- /dev/null +++ b/src/assets/icons/qian.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/icons/vehicle.svg b/src/assets/icons/vehicle.svg new file mode 100644 index 0000000000000000000000000000000000000000..305edb99ad9654f2a89179d997ddae660306b71c --- /dev/null +++ b/src/assets/icons/vehicle.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/icons/weihu.svg b/src/assets/icons/weihu.svg new file mode 100644 index 0000000000000000000000000000000000000000..78605dba116640ed516e4e256cb5d993bddcc16f --- /dev/null +++ b/src/assets/icons/weihu.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/icons/wenti.svg b/src/assets/icons/wenti.svg new file mode 100644 index 0000000000000000000000000000000000000000..41065bda0f582c66741b1e705b49df20e4e993b5 --- /dev/null +++ b/src/assets/icons/wenti.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/icons/xunlian.svg b/src/assets/icons/xunlian.svg new file mode 100644 index 0000000000000000000000000000000000000000..12643e5a55a7ddb4f86ebf53975cf65f1fb8853b --- /dev/null +++ b/src/assets/icons/xunlian.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/assets/icons/xunlianjihua.svg b/src/assets/icons/xunlianjihua.svg new file mode 100644 index 0000000000000000000000000000000000000000..c58b8d174c836bb4c5e469b6ef527ef085217992 --- /dev/null +++ b/src/assets/icons/xunlianjihua.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/src/components/ECharts/index.vue b/src/components/ECharts/index.vue index 03b8b983d992eca45b8cf65b9e322c673fd65080..0d987a73f4bf7f30678b6902266ba826dd159e79 100644 --- a/src/components/ECharts/index.vue +++ b/src/components/ECharts/index.vue @@ -1,14 +1,3 @@ - - diff --git a/src/components/WangEditor/index.vue b/src/components/WangEditor/index.vue index 53ca563f3aab3ea5859e0529d16bb6d7db330151..3e68be1fc4c1ebae5095429a64876ff8b4f7b6e5 100644 --- a/src/components/WangEditor/index.vue +++ b/src/components/WangEditor/index.vue @@ -1,13 +1,3 @@ - -