Compare commits
1 Commits
dev
...
revert-mer
| Author | SHA1 | Date | |
|---|---|---|---|
| 9e44973a5d |
12
.env
@ -23,15 +23,3 @@ VITE_APP_BAIDU_CODE = a1ff8825baa73c3a78eb96aa40325abc
|
||||
VITE_APP_DEFAULT_LOGIN_TENANT = 芋道源码
|
||||
VITE_APP_DEFAULT_LOGIN_USERNAME = admin
|
||||
VITE_APP_DEFAULT_LOGIN_PASSWORD = admin123
|
||||
|
||||
# API 加解密
|
||||
VITE_APP_API_ENCRYPT_ENABLE = true
|
||||
VITE_APP_API_ENCRYPT_HEADER = X-Api-Encrypt
|
||||
VITE_APP_API_ENCRYPT_ALGORITHM = AES
|
||||
VITE_APP_API_ENCRYPT_REQUEST_KEY = 52549111389893486934626385991395
|
||||
VITE_APP_API_ENCRYPT_RESPONSE_KEY = 96103715984234343991809655248883
|
||||
# VITE_APP_API_ENCRYPT_REQUEST_KEY = MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCls2rIpnGdYnLFgz1XU13GbNQ5DloyPpvW00FPGjqn5Z6JpK+kDtVlnkhwR87iRrE5Vf2WNqRX6vzbLSgveIQY8e8oqGCb829myjf1MuI+ZzN4ghf/7tEYhZJGPI9AbfxFqBUzm+kR3/HByAI22GLT96WM26QiMK8n3tIP/yiLswIDAQAB
|
||||
# VITE_APP_API_ENCRYPT_RESPONSE_KEY = MIICdgIBADANBgkqhkiG9w0BAQEFAASCAmAwggJcAgEAAoGBAOH8IfIFxL/MR9XIg1UDv5z1fGXQI93E8wrU4iPFovL/sEt9uSgSkjyidC2O7N+m7EKtoN6b1u7cEwXSkwf3kfK0jdWLSQaNpX5YshqXCBzbDfugDaxuyYrNA4/tIMs7mzZAk0APuRXB35Dmupou7Yw7TFW/7QhQmGfzeEKULQvnAgMBAAECgYAw8LqlQGyQoPv5p3gRxEMOCfgL0JzD3XBJKztiRd35RDh40Nx1ejgjW4dPioFwGiVWd2W8cAGHLzALdcQT2KDJh+T/tsd4SPmI6uSBBK6Ff2DkO+kFFcuYvfclQQKqxma5CaZOSqhgenacmgTMFeg2eKlY3symV6JlFNu/IKU42QJBAOhxAK/Eq3e61aYQV2JSguhMR3b8NXJJRroRs/QHEanksJtl+M+2qhkC9nQVXBmBkndnkU/l2tYcHfSBlAyFySMCQQD445tgm/J2b6qMQmuUGQAYDN8FIkHjeKmha+l/fv0igWm8NDlBAem91lNDIPBUzHL1X1+pcts5bjmq99YdOnhtAkAg2J8dN3B3idpZDiQbC8fd5bGPmdI/pSUudAP27uzLEjr2qrE/QPPGdwm2m7IZFJtK7kK1hKio6u48t/bg0iL7AkEAuUUs94h+v702Fnym+jJ2CHEkXvz2US8UDs52nWrZYiM1o1y4tfSHm8H8bv8JCAa9GHyriEawfBraILOmllFdLQJAQSRZy4wmlaG48MhVXodB85X+VZ9krGXZ2TLhz7kz9iuToy53l9jTkESt6L5BfBDCVdIwcXLYgK+8KFdHN5W7HQ==
|
||||
|
||||
# 百度地图
|
||||
VITE_BAIDU_MAP_KEY = 'efHIw2qmH8RzHPxK0z0rbCgzDVLup9LD'
|
||||
|
Before Width: | Height: | Size: 40 KiB After Width: | Height: | Size: 21 KiB |
|
Before Width: | Height: | Size: 242 KiB |
7
.vscode/settings.json
vendored
@ -62,16 +62,16 @@
|
||||
"editor.defaultFormatter": "esbenp.prettier-vscode"
|
||||
},
|
||||
"[typescript]": {
|
||||
"editor.defaultFormatter": "esbenp.prettier-vscode"
|
||||
"editor.defaultFormatter": "rvest.vs-code-prettier-eslint"
|
||||
},
|
||||
"[typescriptreact]": {
|
||||
"editor.defaultFormatter": "esbenp.prettier-vscode"
|
||||
"editor.defaultFormatter": "rvest.vs-code-prettier-eslint"
|
||||
},
|
||||
"[html]": {
|
||||
"editor.defaultFormatter": "esbenp.prettier-vscode"
|
||||
},
|
||||
"[css]": {
|
||||
"editor.defaultFormatter": "esbenp.prettier-vscode"
|
||||
"editor.defaultFormatter": "rvest.vs-code-prettier-eslint"
|
||||
},
|
||||
"[less]": {
|
||||
"editor.defaultFormatter": "esbenp.prettier-vscode"
|
||||
@ -86,7 +86,6 @@
|
||||
"source.fixAll.eslint": "explicit",
|
||||
"source.fixAll.stylelint": "explicit"
|
||||
},
|
||||
"editor.formatOnSave": true,
|
||||
"[vue]": {
|
||||
"editor.defaultFormatter": "esbenp.prettier-vscode"
|
||||
},
|
||||
|
||||
130
README.md
@ -11,7 +11,7 @@
|
||||
|
||||
* nodejs > 16.18.0 && pnpm > 8.6.0 (强制使用pnpm)
|
||||
* 演示地址【Vue3 + element-plus】:<http://dashboard-vue3.yudao.iocoder.cn>
|
||||
* 演示地址【Vue3 + vben5.0(ant-design-vue)】:<http://dashboard-vben.yudao.iocoder.cn>
|
||||
* 演示地址【Vue3 + vben(ant-design-vue)】:<http://dashboard-vben.yudao.iocoder.cn>
|
||||
* 演示地址【Vue2 + element-ui】:<http://dashboard.yudao.iocoder.cn>
|
||||
* 启动文档:<https://doc.iocoder.cn/quick-start/>
|
||||
* 视频教程:<https://doc.iocoder.cn/video/>
|
||||
@ -24,7 +24,7 @@
|
||||
* 改换 saas,自动引入等功能
|
||||
* 使用 Element Plus 免费开源的中后台模版,具备如下特性:
|
||||
|
||||

|
||||

|
||||
|
||||
* **最新技术栈**:使用 Vue3、Vite4 等前端前沿技术开发
|
||||
* **TypeScript**: 应用程序级 JavaScript 的语言
|
||||
@ -38,15 +38,15 @@
|
||||
|
||||
| 框架 | 说明 | 版本 |
|
||||
|----------------------------------------------------------------------|------------------|--------|
|
||||
| [Vue](https://staging-cn.vuejs.org/) | Vue 框架 | 3.3.8 |
|
||||
| [Vue](https://staging-cn.vuejs.org/) | Vue 框架 | 3.3.8 |
|
||||
| [Vite](https://cn.vitejs.dev//) | 开发与构建工具 | 4.5.0 |
|
||||
| [Element Plus](https://element-plus.org/zh-CN/) | Element Plus | 2.4.2 |
|
||||
| [Element Plus](https://element-plus.org/zh-CN/) | Element Plus | 2.4.2 |
|
||||
| [TypeScript](https://www.typescriptlang.org/docs/) | JavaScript 的超集 | 5.2.2 |
|
||||
| [pinia](https://pinia.vuejs.org/) | Vue 存储库 替代 vuex5 | 2.1.7 |
|
||||
| [pinia](https://pinia.vuejs.org/) | Vue 存储库 替代 vuex5 | 2.1.7 |
|
||||
| [vueuse](https://vueuse.org/) | 常用工具集 | 10.6.1 |
|
||||
| [vue-i18n](https://kazupon.github.io/vue-i18n/zh/introduction.html/) | 国际化 | 9.6.5 |
|
||||
| [vue-router](https://router.vuejs.org/) | Vue 路由 | 4.2.5 |
|
||||
| [unocss](https://uno.antfu.me/) | 原子 css | 0.57.4 |
|
||||
| [unocss](https://uno.antfu.me/) | 原子 css | 0.57.4 |
|
||||
| [iconify](https://icon-sets.iconify.design/) | 在线图标库 | 3.1.1 |
|
||||
| [wangeditor](https://www.wangeditor.com/) | 富文本编辑器 | 5.1.23 |
|
||||
|
||||
@ -81,13 +81,16 @@
|
||||
|
||||
系统内置多种多种业务功能,可以用于快速你的业务系统:
|
||||
|
||||
系统内置多种多种业务功能,可以用于快速你的业务系统:
|
||||
|
||||

|
||||
|
||||
* 通用模块(必选):系统功能、基础设施
|
||||
* 通用模块(可选):工作流程、支付系统、数据报表、会员中心
|
||||
* 业务系统(按需):ERP 系统、CRM 系统、商城系统、微信公众号、AI 大模型
|
||||
* 系统功能
|
||||
* 基础设施
|
||||
* 工作流程
|
||||
* 支付系统
|
||||
* 会员中心
|
||||
* 数据报表
|
||||
* 商城系统
|
||||
* 微信公众号
|
||||
* ERP 系统
|
||||
* CRM 系统
|
||||
|
||||
### 系统功能
|
||||
|
||||
@ -117,77 +120,54 @@
|
||||
|
||||
### 工作流程
|
||||
|
||||
| | 功能 | 描述 |
|
||||
|----|-------|-----------------------------------------|
|
||||
| 🚀 | 流程模型 | 配置工作流的流程模型,支持 BPMN 和仿钉钉/飞书设计器 |
|
||||
| 🚀 | 流程表单 | 拖动表单元素生成相应的工作流表单,覆盖 Element UI 所有的表单组件 |
|
||||
| 🚀 | 用户分组 | 自定义用户分组,可用于工作流的审批分组 |
|
||||
| 🚀 | 我的流程 | 查看我发起的工作流程,支持新建、取消流程等操作,高亮流程图、审批时间线 |
|
||||
| 🚀 | 待办任务 | 查看自己【未】审批的工作任务,支持通过、不通过、转派、委派、退回、加减签等操作 |
|
||||
| 🚀 | 已办任务 | 查看自己【已】审批的工作任务,支持流程预测,展示未来审批人信息 |
|
||||
| 🚀 | OA 请假 | 作为业务自定义接入工作流的使用示例,只需创建请求对应的工作流程,即可进行审批 |
|
||||
|
||||

|
||||
|
||||
基于 Flowable 构建,可支持信创(国产)数据库,满足中国特色流程操作:
|
||||
|
||||
| BPMN 设计器 | 钉钉/飞书设计器 |
|
||||
|-----------------------------|-------------------------------|
|
||||
|  |  |
|
||||
|
||||
> 历经头部企业生产验证,工作流引擎须标配仿钉钉/飞书 + BPMN 双设计器!!!
|
||||
>
|
||||
> 前者支持轻量配置简单流程,后者实现复杂场景深度编排
|
||||
|
||||
| 功能列表 | 功能描述 | 是否完成 |
|
||||
|------------|-------------------------------------------------------------------------------------|------|
|
||||
| SIMPLE 设计器 | 仿钉钉/飞书设计器,支持拖拽搭建表单流程,10 分钟快速完成审批流程配置 | ✅ |
|
||||
| BPMN 设计器 | 基于 BPMN 标准开发,适配复杂业务场景,满足多层级审批及流程自动化需求 | ✅ |
|
||||
| 会签 | 同一个审批节点设置多个人(如 A、B、C 三人,三人会同时收到待办任务),需全部同意之后,审批才可到下一审批节点 | ✅ |
|
||||
| 或签 | 同一个审批节点设置多个人,任意一个人处理后,就能进入下一个节点 | ✅ |
|
||||
| 依次审批 | (顺序会签)同一个审批节点设置多个人(如 A、B、C 三人),三人按顺序依次收到待办,即 A 先审批,A 提交后 B 才能审批,需全部同意之后,审批才可到下一审批节点 | ✅ |
|
||||
| 抄送 | 将审批结果通知给抄送人,同一个审批默认排重,不重复抄送给同一人 | ✅ |
|
||||
| 驳回 | (退回)将审批重置发送给某节点,重新审批。可驳回至发起人、上一节点、任意节点 | ✅ |
|
||||
| 转办 | A 转给其 B 审批,B 审批后,进入下一节点 | ✅ |
|
||||
| 委派 | A 转给其 B 审批,B 审批后,转给 A,A 继续审批后进入下一节点 | ✅ |
|
||||
| 加签 | 允许当前审批人根据需要,自行增加当前节点的审批人,支持向前、向后加签 | ✅ |
|
||||
| 减签 | (取消加签)在当前审批人操作之前,减少审批人 | ✅ |
|
||||
| 撤销 | (取消流程)流程发起人,可以对流程进行撤销处理 | ✅ |
|
||||
| 终止 | 系统管理员,在任意节点终止流程实例 | ✅ |
|
||||
| 表单权限 | 支持拖拉拽配置表单,每个审批节点可配置只读、编辑、隐藏权限 | ✅ |
|
||||
| 超时审批 | 配置超时审批时间,超时后自动触发审批通过、不通过、驳回等操作 | ✅ |
|
||||
| 自动提醒 | 配置提醒时间,到达时间后自动触发短信、邮箱、站内信等通知提醒,支持自定义重复提醒频次 | ✅ |
|
||||
| 父子流程 | 主流程设置子流程节点,子流程节点会自动触发子流程。子流程结束后,主流程才会执行(继续往下下执行),支持同步子流程、异步子流程 | ✅ |
|
||||
| 条件分支 | (排它分支)用于在流程中实现决策,即根据条件选择一个分支执行 | ✅ |
|
||||
| 并行分支 | 允许将流程分成多条分支,不进行条件判断,所有分支都会执行 | ✅ |
|
||||
| 包容分支 | (条件分支 + 并行分支的结合体)允许基于条件选择多条分支执行,但如果没有任何一个分支满足条件,则可以选择默认分支 | ✅ |
|
||||
| 路由分支 | 根据条件选择一个分支执行(重定向到指定配置节点),也可以选择默认分支执行(继续往下执行) | ✅ |
|
||||
| 触发节点 | 执行到该节点,触发 HTTP 请求、HTTP 回调、更新数据、删除数据等 | ✅ |
|
||||
| 延迟节点 | 执行到该节点,审批等待一段时间再执行,支持固定时长、固定日期等 | ✅ |
|
||||
| 拓展设置 | 流程前置/后置通知,节点(任务)前置、后置通知,流程报表,自动审批去重,自定流程编号、标题、摘要,流程报表等 | ✅ |
|
||||
| BPMN 设计器 | 钉钉/飞书设计器 |
|
||||
|------------------------------|--------------------------------|
|
||||
|  |  |
|
||||
|
||||
### 支付系统
|
||||
|
||||
| | 功能 | 描述 |
|
||||
|-----|------|---------------------------|
|
||||
| 🚀 | 商户信息 | 管理商户信息,支持 Saas 场景下的多商户功能 |
|
||||
| 🚀 | 应用信息 | 配置商户的应用信息,对接支付宝、微信等多个支付渠道 |
|
||||
| 🚀 | 支付订单 | 查看用户发起的支付宝、微信等的【支付】订单 |
|
||||
| 🚀 | 退款订单 | 查看用户发起的支付宝、微信等的【退款】订单 |
|
||||
| 🚀 | 回调通知 | 查看支付回调业务的【支付】【退款】的通知结果 |
|
||||
| 🚀 | 接入示例 | 提供接入支付系统的【支付】【退款】的功能实战 |
|
||||
|
||||
ps:核心功能已经实现,正在对接微信小程序中...
|
||||
|
||||
### 基础设施
|
||||
|
||||
| | 功能 | 描述 |
|
||||
|-----|-----------|----------------------------------------------|
|
||||
| 🚀 | 代码生成 | 前后端代码的生成(Java、Vue、SQL、单元测试),支持 CRUD 下载 |
|
||||
| 🚀 | 系统接口 | 基于 Swagger 自动生成相关的 RESTful API 接口文档 |
|
||||
| 🚀 | 数据库文档 | 基于 Screw 自动生成数据库文档,支持导出 Word、HTML、MD 格式 |
|
||||
| | 表单构建 | 拖动表单元素生成相应的 HTML 代码,支持导出 JSON、Vue 文件 |
|
||||
| 🚀 | 配置管理 | 对系统动态配置常用参数,支持 SpringBoot 加载 |
|
||||
| ⭐️ | 定时任务 | 在线(添加、修改、删除)任务调度包含执行结果日志 |
|
||||
| 🚀 | 文件服务 | 支持将文件存储到 S3(MinIO、阿里云、腾讯云、七牛云)、本地、FTP、数据库等 |
|
||||
| 🚀 | WebSocket | 提供 WebSocket 接入示例,支持一对一、一对多发送方式 |
|
||||
| 🚀 | API 日志 | 包括 RESTful API 访问日志、异常日志两部分,方便排查 API 相关的问题 |
|
||||
| | MySQL 监控 | 监视当前系统数据库连接池状态,可进行分析SQL找出系统性能瓶颈 |
|
||||
| | Redis 监控 | 监控 Redis 数据库的使用情况,使用的 Redis Key 管理 |
|
||||
| 🚀 | 消息队列 | 基于 Redis 实现消息队列,Stream 提供集群消费,Pub/Sub 提供广播消费 |
|
||||
| 🚀 | Java 监控 | 基于 Spring Boot Admin 实现 Java 应用的监控 |
|
||||
| 🚀 | 链路追踪 | 接入 SkyWalking 组件,实现链路追踪 |
|
||||
| 🚀 | 日志中心 | 接入 SkyWalking 组件,实现日志中心 |
|
||||
| 🚀 | 服务保障 | 基于 Redis 实现分布式锁、幂等、限流功能,满足高并发场景 |
|
||||
| 🚀 | 日志服务 | 轻量级日志中心,查看远程服务器的日志 |
|
||||
| 🚀 | 单元测试 | 基于 JUnit + Mockito 实现单元测试,保证功能的正确性、代码的质量等 |
|
||||
| | 功能 | 描述 |
|
||||
|----|----------|----------------------------------------------|
|
||||
| 🚀 | 代码生成 | 前后端代码的生成(Java、Vue、SQL、单元测试),支持 CRUD 下载 |
|
||||
| 🚀 | 系统接口 | 基于 Swagger 自动生成相关的 RESTful API 接口文档 |
|
||||
| 🚀 | 数据库文档 | 基于 Screw 自动生成数据库文档,支持导出 Word、HTML、MD 格式 |
|
||||
| | 表单构建 | 拖动表单元素生成相应的 HTML 代码,支持导出 JSON、Vue 文件 |
|
||||
| 🚀 | 配置管理 | 对系统动态配置常用参数,支持 SpringBoot 加载 |
|
||||
| ⭐️ | 定时任务 | 在线(添加、修改、删除)任务调度包含执行结果日志 |
|
||||
| 🚀 | 文件服务 | 支持将文件存储到 S3(MinIO、阿里云、腾讯云、七牛云)、本地、FTP、数据库等 |
|
||||
| 🚀 | API 日志 | 包括 RESTful API 访问日志、异常日志两部分,方便排查 API 相关的问题 |
|
||||
| | MySQL 监控 | 监视当前系统数据库连接池状态,可进行分析SQL找出系统性能瓶颈 |
|
||||
| | Redis 监控 | 监控 Redis 数据库的使用情况,使用的 Redis Key 管理 |
|
||||
| 🚀 | 消息队列 | 基于 Redis 实现消息队列,Stream 提供集群消费,Pub/Sub 提供广播消费 |
|
||||
| 🚀 | Java 监控 | 基于 Spring Boot Admin 实现 Java 应用的监控 |
|
||||
| 🚀 | 链路追踪 | 接入 SkyWalking 组件,实现链路追踪 |
|
||||
| 🚀 | 日志中心 | 接入 SkyWalking 组件,实现日志中心 |
|
||||
| 🚀 | 服务保障 | 基于 Redis 实现分布式锁、幂等、限流功能,满足高并发场景 |
|
||||
| 🚀 | 日志服务 | 轻量级日志中心,查看远程服务器的日志 |
|
||||
| 🚀 | 单元测试 | 基于 JUnit + Mockito 实现单元测试,保证功能的正确性、代码的质量等 |
|
||||
|
||||

|
||||
|
||||
@ -233,14 +213,6 @@
|
||||
|
||||

|
||||
|
||||
### AI 大模型
|
||||
|
||||
演示地址:<https://doc.iocoder.cn/ai-preview/>
|
||||
|
||||

|
||||
|
||||

|
||||
|
||||
## 🐷 演示图
|
||||
|
||||
### 系统功能
|
||||
|
||||
@ -13,7 +13,7 @@ import { ElementPlusResolver } from 'unplugin-vue-components/resolvers'
|
||||
import viteCompression from 'vite-plugin-compression'
|
||||
import topLevelAwait from 'vite-plugin-top-level-await'
|
||||
import VueI18nPlugin from '@intlify/unplugin-vue-i18n/vite'
|
||||
import { createSvgIconsPlugin } from 'vite-plugin-svg-icons-ng'
|
||||
import { createSvgIconsPlugin } from 'vite-plugin-svg-icons'
|
||||
import UnoCSS from 'unocss/vite'
|
||||
|
||||
export function createVitePlugins() {
|
||||
@ -78,6 +78,7 @@ export function createVitePlugins() {
|
||||
createSvgIconsPlugin({
|
||||
iconDirs: [pathResolve('src/assets/svgs')],
|
||||
symbolId: 'icon-[dir]-[name]',
|
||||
svgoOptions: true
|
||||
}),
|
||||
viteCompression({
|
||||
verbose: true, // 是否在控制台输出压缩结果
|
||||
|
||||
@ -115,8 +115,7 @@ const include = [
|
||||
'@element-plus/icons-vue',
|
||||
'element-plus/es/components/footer/style/css',
|
||||
'element-plus/es/components/empty/style/css',
|
||||
'element-plus/es/components/mention/style/css',
|
||||
'element-plus/es/components/progress/style/css'
|
||||
'element-plus/es/components/mention/style/css'
|
||||
]
|
||||
|
||||
const exclude = ['@iconify/json']
|
||||
|
||||
17486
package-lock.json
generated
16
package.json
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "yudao-ui-admin-vue3",
|
||||
"version": "2025.09-snapshot",
|
||||
"version": "2.4.1-snapshot",
|
||||
"description": "基于vue3、vite4、element-plus、typesScript",
|
||||
"author": "xingyu",
|
||||
"private": false,
|
||||
@ -25,7 +25,7 @@
|
||||
"lint:lint-staged": "lint-staged -c "
|
||||
},
|
||||
"dependencies": {
|
||||
"@element-plus/icons-vue": "2.3.2",
|
||||
"@element-plus/icons-vue": "^2.1.0",
|
||||
"@form-create/designer": "^3.2.6",
|
||||
"@form-create/element-ui": "^3.2.11",
|
||||
"@iconify/iconify": "^3.1.1",
|
||||
@ -34,10 +34,9 @@
|
||||
"@vueuse/core": "^10.9.0",
|
||||
"@wangeditor/editor": "^5.1.23",
|
||||
"@wangeditor/editor-for-vue": "^5.1.10",
|
||||
"@wangeditor/plugin-mention": "^1.0.0",
|
||||
"@zxcvbn-ts/core": "^3.0.4",
|
||||
"animate.css": "^4.1.1",
|
||||
"axios": "1.9.0",
|
||||
"axios": "^1.6.8",
|
||||
"benz-amr-recorder": "^1.1.5",
|
||||
"bpmn-js-token-simulation": "^0.36.0",
|
||||
"camunda-bpmn-moddle": "^7.0.1",
|
||||
@ -48,11 +47,10 @@
|
||||
"driver.js": "^1.3.1",
|
||||
"echarts": "^5.5.0",
|
||||
"echarts-wordcloud": "^2.1.0",
|
||||
"element-plus": "2.11.1",
|
||||
"element-plus": "2.9.1",
|
||||
"fast-xml-parser": "^4.3.2",
|
||||
"highlight.js": "^11.9.0",
|
||||
"jsencrypt": "^3.3.2",
|
||||
"jsoneditor": "^10.1.3",
|
||||
"lodash-es": "^4.17.21",
|
||||
"markdown-it": "^14.1.0",
|
||||
"markmap-common": "^0.16.0",
|
||||
@ -66,7 +64,6 @@
|
||||
"pinia-plugin-persistedstate": "^3.2.1",
|
||||
"qrcode": "^1.5.3",
|
||||
"qs": "^6.12.0",
|
||||
"snabbdom": "^3.6.2",
|
||||
"sortablejs": "^1.15.3",
|
||||
"steady-xml": "^0.1.0",
|
||||
"url": "^0.11.3",
|
||||
@ -76,7 +73,6 @@
|
||||
"vue-i18n": "9.10.2",
|
||||
"vue-router": "4.4.5",
|
||||
"vue-types": "^5.1.1",
|
||||
"vue3-print-nb": "^0.1.4",
|
||||
"vue3-signature": "^0.2.4",
|
||||
"vuedraggable": "^4.1.0",
|
||||
"web-storage-cache": "^1.1.1",
|
||||
@ -88,7 +84,6 @@
|
||||
"@iconify/json": "^2.2.187",
|
||||
"@intlify/unplugin-vue-i18n": "^2.0.0",
|
||||
"@purge-icons/generated": "^0.9.0",
|
||||
"@types/jsoneditor": "^9.9.5",
|
||||
"@types/lodash-es": "^4.17.12",
|
||||
"@types/node": "^20.11.21",
|
||||
"@types/nprogress": "^0.2.3",
|
||||
@ -97,7 +92,6 @@
|
||||
"@typescript-eslint/eslint-plugin": "^7.1.0",
|
||||
"@typescript-eslint/parser": "^7.1.0",
|
||||
"@unocss/eslint-config": "^0.57.4",
|
||||
"@unocss/eslint-plugin": "66.1.0-beta.5",
|
||||
"@unocss/transformer-variant-group": "^0.58.5",
|
||||
"@vitejs/plugin-legacy": "^5.3.1",
|
||||
"@vitejs/plugin-vue": "^5.0.4",
|
||||
@ -137,7 +131,7 @@
|
||||
"vite-plugin-eslint": "^1.8.1",
|
||||
"vite-plugin-progress": "^0.0.7",
|
||||
"vite-plugin-purge-icons": "^0.10.0",
|
||||
"vite-plugin-svg-icons-ng": "^1.3.1",
|
||||
"vite-plugin-svg-icons": "^2.0.1",
|
||||
"vite-plugin-top-level-await": "^1.4.4",
|
||||
"vue-eslint-parser": "^9.3.2",
|
||||
"vue-tsc": "^1.8.27"
|
||||
|
||||
2222
pnpm-lock.yaml
generated
BIN
public/home.png
Normal file
|
After Width: | Height: | Size: 73 KiB |
@ -13,27 +13,10 @@ export interface ChatMessageVO {
|
||||
model: number // 模型标志
|
||||
modelId: number // 模型编号
|
||||
content: string // 聊天内容
|
||||
reasoningContent?: string // 推理内容
|
||||
attachmentUrls?: string[] // 附件 URL 数组
|
||||
tokens: number // 消耗 Token 数量
|
||||
segmentIds?: number[] // 段落编号
|
||||
segments?: {
|
||||
id: number // 段落编号
|
||||
content: string // 段落内容
|
||||
documentId: number // 文档编号
|
||||
documentName: string // 文档名称
|
||||
}[]
|
||||
webSearchPages?: {
|
||||
name: string // 名称
|
||||
icon: string // 图标
|
||||
title: string // 标题
|
||||
url: string // URL
|
||||
snippet: string // 内容的简短描述
|
||||
summary: string // 内容的文本摘要
|
||||
}[]
|
||||
createTime: Date // 创建时间
|
||||
roleAvatar: string // 角色头像
|
||||
userAvatar: string // 用户头像
|
||||
userAvatar: string // 创建时间
|
||||
}
|
||||
|
||||
// AI chat 聊天
|
||||
@ -52,11 +35,9 @@ export const ChatMessageApi = {
|
||||
content: string,
|
||||
ctrl,
|
||||
enableContext: boolean,
|
||||
enableWebSearch: boolean,
|
||||
onMessage,
|
||||
onError,
|
||||
onClose,
|
||||
attachmentUrls?: string[]
|
||||
onClose
|
||||
) => {
|
||||
const token = getAccessToken()
|
||||
return fetchEventSource(`${config.base_url}/ai/chat/message/send-stream`, {
|
||||
@ -69,9 +50,7 @@ export const ChatMessageApi = {
|
||||
body: JSON.stringify({
|
||||
conversationId,
|
||||
content,
|
||||
useContext: enableContext,
|
||||
useSearch: enableWebSearch,
|
||||
attachmentUrls: attachmentUrls || []
|
||||
useContext: enableContext
|
||||
}),
|
||||
onmessage: onMessage,
|
||||
onerror: onError,
|
||||
|
||||
@ -20,8 +20,9 @@ export interface ImageVO {
|
||||
}
|
||||
|
||||
export interface ImageDrawReqVO {
|
||||
platform: string // 平台
|
||||
prompt: string // 提示词
|
||||
modelId: number // 模型
|
||||
model: string // 模型
|
||||
style: string // 图像生成的风格
|
||||
width: string // 图片宽度
|
||||
height: string // 图片高度
|
||||
@ -30,7 +31,7 @@ export interface ImageDrawReqVO {
|
||||
|
||||
export interface ImageMidjourneyImagineReqVO {
|
||||
prompt: string // 提示词
|
||||
modelId: number // 模型
|
||||
model: string // 模型 mj nijj
|
||||
base64Array: string[] // size不能为空
|
||||
width: string // 图片宽度
|
||||
height: string // 图片高度
|
||||
|
||||
@ -1,54 +0,0 @@
|
||||
import request from '@/config/axios'
|
||||
|
||||
// AI 知识库文档 VO
|
||||
export interface KnowledgeDocumentVO {
|
||||
id: number // 编号
|
||||
knowledgeId: number // 知识库编号
|
||||
name: string // 文档名称
|
||||
contentLength: number // 字符数
|
||||
tokens: number // token 数
|
||||
segmentMaxTokens: number // 分片最大 token 数
|
||||
retrievalCount: number // 召回次数
|
||||
status: number // 是否启用
|
||||
}
|
||||
|
||||
// AI 知识库文档 API
|
||||
export const KnowledgeDocumentApi = {
|
||||
// 查询知识库文档分页
|
||||
getKnowledgeDocumentPage: async (params: any) => {
|
||||
return await request.get({ url: `/ai/knowledge/document/page`, params })
|
||||
},
|
||||
|
||||
// 查询知识库文档详情
|
||||
getKnowledgeDocument: async (id: number) => {
|
||||
return await request.get({ url: `/ai/knowledge/document/get?id=` + id })
|
||||
},
|
||||
|
||||
// 新增知识库文档(单个)
|
||||
createKnowledgeDocument: async (data: any) => {
|
||||
return await request.post({ url: `/ai/knowledge/document/create`, data })
|
||||
},
|
||||
|
||||
// 新增知识库文档(多个)
|
||||
createKnowledgeDocumentList: async (data: any) => {
|
||||
return await request.post({ url: `/ai/knowledge/document/create-list`, data })
|
||||
},
|
||||
|
||||
// 修改知识库文档
|
||||
updateKnowledgeDocument: async (data: any) => {
|
||||
return await request.put({ url: `/ai/knowledge/document/update`, data })
|
||||
},
|
||||
|
||||
// 修改知识库文档状态
|
||||
updateKnowledgeDocumentStatus: async (data: any) => {
|
||||
return await request.put({
|
||||
url: `/ai/knowledge/document/update-status`,
|
||||
data
|
||||
})
|
||||
},
|
||||
|
||||
// 删除知识库文档
|
||||
deleteKnowledgeDocument: async (id: number) => {
|
||||
return await request.delete({ url: `/ai/knowledge/document/delete?id=` + id })
|
||||
}
|
||||
}
|
||||
@ -1,44 +0,0 @@
|
||||
import request from '@/config/axios'
|
||||
|
||||
// AI 知识库 VO
|
||||
export interface KnowledgeVO {
|
||||
id: number // 编号
|
||||
name: string // 知识库名称
|
||||
description: string // 知识库描述
|
||||
embeddingModelId: number // 嵌入模型编号,高质量模式时维护
|
||||
topK: number // topK
|
||||
similarityThreshold: number // 相似度阈值
|
||||
}
|
||||
|
||||
// AI 知识库 API
|
||||
export const KnowledgeApi = {
|
||||
// 查询知识库分页
|
||||
getKnowledgePage: async (params: any) => {
|
||||
return await request.get({ url: `/ai/knowledge/page`, params })
|
||||
},
|
||||
|
||||
// 查询知识库详情
|
||||
getKnowledge: async (id: number) => {
|
||||
return await request.get({ url: `/ai/knowledge/get?id=` + id })
|
||||
},
|
||||
|
||||
// 新增知识库
|
||||
createKnowledge: async (data: KnowledgeVO) => {
|
||||
return await request.post({ url: `/ai/knowledge/create`, data })
|
||||
},
|
||||
|
||||
// 修改知识库
|
||||
updateKnowledge: async (data: KnowledgeVO) => {
|
||||
return await request.put({ url: `/ai/knowledge/update`, data })
|
||||
},
|
||||
|
||||
// 删除知识库
|
||||
deleteKnowledge: async (id: number) => {
|
||||
return await request.delete({ url: `/ai/knowledge/delete?id=` + id })
|
||||
},
|
||||
|
||||
// 获取知识库简单列表
|
||||
getSimpleKnowledgeList: async () => {
|
||||
return await request.get({ url: `/ai/knowledge/simple-list` })
|
||||
}
|
||||
}
|
||||
@ -1,75 +0,0 @@
|
||||
import request from '@/config/axios'
|
||||
|
||||
// AI 知识库分段 VO
|
||||
export interface KnowledgeSegmentVO {
|
||||
id: number // 编号
|
||||
documentId: number // 文档编号
|
||||
knowledgeId: number // 知识库编号
|
||||
vectorId: string // 向量库编号
|
||||
content: string // 切片内容
|
||||
contentLength: number // 切片内容长度
|
||||
tokens: number // token 数量
|
||||
retrievalCount: number // 召回次数
|
||||
status: number // 文档状态
|
||||
createTime: number // 创建时间
|
||||
}
|
||||
|
||||
// AI 知识库分段 API
|
||||
export const KnowledgeSegmentApi = {
|
||||
// 查询知识库分段分页
|
||||
getKnowledgeSegmentPage: async (params: any) => {
|
||||
return await request.get({ url: `/ai/knowledge/segment/page`, params })
|
||||
},
|
||||
|
||||
// 查询知识库分段详情
|
||||
getKnowledgeSegment: async (id: number) => {
|
||||
return await request.get({ url: `/ai/knowledge/segment/get?id=` + id })
|
||||
},
|
||||
|
||||
// 删除知识库分段
|
||||
deleteKnowledgeSegment: async (id: number) => {
|
||||
return await request.delete({ url: `/ai/knowledge/segment/delete?id=` + id })
|
||||
},
|
||||
|
||||
// 新增知识库分段
|
||||
createKnowledgeSegment: async (data: KnowledgeSegmentVO) => {
|
||||
return await request.post({ url: `/ai/knowledge/segment/create`, data })
|
||||
},
|
||||
|
||||
// 修改知识库分段
|
||||
updateKnowledgeSegment: async (data: KnowledgeSegmentVO) => {
|
||||
return await request.put({ url: `/ai/knowledge/segment/update`, data })
|
||||
},
|
||||
|
||||
// 修改知识库分段状态
|
||||
updateKnowledgeSegmentStatus: async (data: any) => {
|
||||
return await request.put({
|
||||
url: `/ai/knowledge/segment/update-status`,
|
||||
data
|
||||
})
|
||||
},
|
||||
|
||||
// 切片内容
|
||||
splitContent: async (url: string, segmentMaxTokens: number) => {
|
||||
return await request.get({
|
||||
url: `/ai/knowledge/segment/split`,
|
||||
params: { url, segmentMaxTokens }
|
||||
})
|
||||
},
|
||||
|
||||
// 获取文档处理列表
|
||||
getKnowledgeSegmentProcessList: async (documentIds: number[]) => {
|
||||
return await request.get({
|
||||
url: `/ai/knowledge/segment/get-process-list`,
|
||||
params: { documentIds: documentIds.join(',') }
|
||||
})
|
||||
},
|
||||
|
||||
// 搜索知识库分段
|
||||
searchKnowledgeSegment: async (params: any) => {
|
||||
return await request.get({
|
||||
url: `/ai/knowledge/segment/search`,
|
||||
params
|
||||
})
|
||||
}
|
||||
}
|
||||
53
src/api/ai/model/chatModel/index.ts
Normal file
@ -0,0 +1,53 @@
|
||||
import request from '@/config/axios'
|
||||
|
||||
// AI 聊天模型 VO
|
||||
export interface ChatModelVO {
|
||||
id: number // 编号
|
||||
keyId: number // API 秘钥编号
|
||||
name: string // 模型名字
|
||||
model: string // 模型标识
|
||||
platform: string // 模型平台
|
||||
sort: number // 排序
|
||||
status: number // 状态
|
||||
temperature: number // 温度参数
|
||||
maxTokens: number // 单条回复的最大 Token 数量
|
||||
maxContexts: number // 上下文的最大 Message 数量
|
||||
}
|
||||
|
||||
// AI 聊天模型 API
|
||||
export const ChatModelApi = {
|
||||
// 查询聊天模型分页
|
||||
getChatModelPage: async (params: any) => {
|
||||
return await request.get({ url: `/ai/chat-model/page`, params })
|
||||
},
|
||||
|
||||
// 获得聊天模型列表
|
||||
getChatModelSimpleList: async (status?: number) => {
|
||||
return await request.get({
|
||||
url: `/ai/chat-model/simple-list`,
|
||||
params: {
|
||||
status
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
// 查询聊天模型详情
|
||||
getChatModel: async (id: number) => {
|
||||
return await request.get({ url: `/ai/chat-model/get?id=` + id })
|
||||
},
|
||||
|
||||
// 新增聊天模型
|
||||
createChatModel: async (data: ChatModelVO) => {
|
||||
return await request.post({ url: `/ai/chat-model/create`, data })
|
||||
},
|
||||
|
||||
// 修改聊天模型
|
||||
updateChatModel: async (data: ChatModelVO) => {
|
||||
return await request.put({ url: `/ai/chat-model/update`, data })
|
||||
},
|
||||
|
||||
// 删除聊天模型
|
||||
deleteChatModel: async (id: number) => {
|
||||
return await request.delete({ url: `/ai/chat-model/delete?id=` + id })
|
||||
}
|
||||
}
|
||||
@ -13,9 +13,6 @@ export interface ChatRoleVO {
|
||||
welcomeMessage: string // 角色设定
|
||||
publicStatus: boolean // 是否公开
|
||||
status: number // 状态
|
||||
knowledgeIds?: number[] // 引用的知识库 ID 列表
|
||||
toolIds?: number[] // 引用的工具 ID 列表
|
||||
mcpClientNames?: string[] // 引用的 MCP Client 名字列表
|
||||
}
|
||||
|
||||
// AI 聊天角色 分页请求 vo
|
||||
@ -58,26 +55,26 @@ export const ChatRoleApi = {
|
||||
|
||||
// 获取 my role
|
||||
getMyPage: async (params: ChatRolePageReqVO) => {
|
||||
return await request.get({ url: `/ai/chat-role/my-page`, params })
|
||||
return await request.get({ url: `/ai/chat-role/my-page`, params})
|
||||
},
|
||||
|
||||
// 获取角色分类
|
||||
getCategoryList: async () => {
|
||||
return await request.get({ url: `/ai/chat-role/category-list` })
|
||||
return await request.get({ url: `/ai/chat-role/category-list`})
|
||||
},
|
||||
|
||||
// 创建角色
|
||||
createMy: async (data: ChatRoleVO) => {
|
||||
return await request.post({ url: `/ai/chat-role/create-my`, data })
|
||||
return await request.post({ url: `/ai/chat-role/create-my`, data})
|
||||
},
|
||||
|
||||
// 更新角色
|
||||
updateMy: async (data: ChatRoleVO) => {
|
||||
return await request.put({ url: `/ai/chat-role/update-my`, data })
|
||||
return await request.put({ url: `/ai/chat-role/update-my`, data})
|
||||
},
|
||||
|
||||
// 删除角色 my
|
||||
deleteMy: async (id: number) => {
|
||||
return await request.delete({ url: `/ai/chat-role/delete-my?id=` + id })
|
||||
}
|
||||
},
|
||||
}
|
||||
|
||||
@ -1,54 +0,0 @@
|
||||
import request from '@/config/axios'
|
||||
|
||||
// AI 模型 VO
|
||||
export interface ModelVO {
|
||||
id: number // 编号
|
||||
keyId: number // API 秘钥编号
|
||||
name: string // 模型名字
|
||||
model: string // 模型标识
|
||||
platform: string // 模型平台
|
||||
type: number // 模型类型
|
||||
sort: number // 排序
|
||||
status: number // 状态
|
||||
temperature?: number // 温度参数
|
||||
maxTokens?: number // 单条回复的最大 Token 数量
|
||||
maxContexts?: number // 上下文的最大 Message 数量
|
||||
}
|
||||
|
||||
// AI 模型 API
|
||||
export const ModelApi = {
|
||||
// 查询模型分页
|
||||
getModelPage: async (params: any) => {
|
||||
return await request.get({ url: `/ai/model/page`, params })
|
||||
},
|
||||
|
||||
// 获得模型列表
|
||||
getModelSimpleList: async (type?: number) => {
|
||||
return await request.get({
|
||||
url: `/ai/model/simple-list`,
|
||||
params: {
|
||||
type
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
// 查询模型详情
|
||||
getModel: async (id: number) => {
|
||||
return await request.get({ url: `/ai/model/get?id=` + id })
|
||||
},
|
||||
|
||||
// 新增模型
|
||||
createModel: async (data: ModelVO) => {
|
||||
return await request.post({ url: `/ai/model/create`, data })
|
||||
},
|
||||
|
||||
// 修改模型
|
||||
updateModel: async (data: ModelVO) => {
|
||||
return await request.put({ url: `/ai/model/update`, data })
|
||||
},
|
||||
|
||||
// 删除模型
|
||||
deleteModel: async (id: number) => {
|
||||
return await request.delete({ url: `/ai/model/delete?id=` + id })
|
||||
}
|
||||
}
|
||||
@ -1,42 +0,0 @@
|
||||
import request from '@/config/axios'
|
||||
|
||||
// AI 工具 VO
|
||||
export interface ToolVO {
|
||||
id: number // 工具编号
|
||||
name: string // 工具名称
|
||||
description: string // 工具描述
|
||||
status: number // 状态
|
||||
}
|
||||
|
||||
// AI 工具 API
|
||||
export const ToolApi = {
|
||||
// 查询工具分页
|
||||
getToolPage: async (params: any) => {
|
||||
return await request.get({ url: `/ai/tool/page`, params })
|
||||
},
|
||||
|
||||
// 查询工具详情
|
||||
getTool: async (id: number) => {
|
||||
return await request.get({ url: `/ai/tool/get?id=` + id })
|
||||
},
|
||||
|
||||
// 新增工具
|
||||
createTool: async (data: ToolVO) => {
|
||||
return await request.post({ url: `/ai/tool/create`, data })
|
||||
},
|
||||
|
||||
// 修改工具
|
||||
updateTool: async (data: ToolVO) => {
|
||||
return await request.put({ url: `/ai/tool/update`, data })
|
||||
},
|
||||
|
||||
// 删除工具
|
||||
deleteTool: async (id: number) => {
|
||||
return await request.delete({ url: `/ai/tool/delete?id=` + id })
|
||||
},
|
||||
|
||||
// 获取工具简单列表
|
||||
getToolSimpleList: async () => {
|
||||
return await request.get({ url: `/ai/tool/simple-list` })
|
||||
}
|
||||
}
|
||||
@ -1,25 +0,0 @@
|
||||
import request from '@/config/axios'
|
||||
|
||||
export const getWorkflowPage = async (params) => {
|
||||
return await request.get({ url: '/ai/workflow/page', params })
|
||||
}
|
||||
|
||||
export const getWorkflow = async (id) => {
|
||||
return await request.get({ url: '/ai/workflow/get?id=' + id })
|
||||
}
|
||||
|
||||
export const createWorkflow = async (data) => {
|
||||
return await request.post({ url: '/ai/workflow/create', data })
|
||||
}
|
||||
|
||||
export const updateWorkflow = async (data) => {
|
||||
return await request.put({ url: '/ai/workflow/update', data })
|
||||
}
|
||||
|
||||
export const deleteWorkflow = async (id) => {
|
||||
return await request.delete({ url: '/ai/workflow/delete?id=' + id })
|
||||
}
|
||||
|
||||
export const testWorkflow = async (data) => {
|
||||
return await request.post({ url: '/ai/workflow/test', data })
|
||||
}
|
||||
@ -20,9 +20,3 @@ export const getProcessDefinitionList = async (params) => {
|
||||
params
|
||||
})
|
||||
}
|
||||
|
||||
export const getSimpleProcessDefinitionList = async () => {
|
||||
return await request.get({
|
||||
url: '/bpm/process-definition/simple-list'
|
||||
})
|
||||
}
|
||||
|
||||
@ -48,7 +48,6 @@ export type ApprovalNodeInfo = {
|
||||
status: number
|
||||
startTime?: Date
|
||||
endTime?: Date
|
||||
processInstanceId?: string
|
||||
candidateUsers?: User[]
|
||||
tasks: ApprovalTaskInfo[]
|
||||
}
|
||||
@ -91,12 +90,7 @@ export const getProcessInstanceCopyPage = async (params: any) => {
|
||||
|
||||
// 获取审批详情
|
||||
export const getApprovalDetail = async (params: any) => {
|
||||
return await request.get({ url: '/bpm/process-instance/get-approval-detail', params })
|
||||
}
|
||||
|
||||
// 获取下一个执行的流程节点
|
||||
export const getNextApprovalNodes = async (params: any) => {
|
||||
return await request.get({ url: '/bpm/process-instance/get-next-approval-nodes', params })
|
||||
return await request.get({ url: 'bpm/process-instance/get-approval-detail', params })
|
||||
}
|
||||
|
||||
// 获取表单字段权限
|
||||
@ -108,8 +102,3 @@ export const getFormFieldsPermission = async (params: any) => {
|
||||
export const getProcessInstanceBpmnModelView = async (id: string) => {
|
||||
return await request.get({ url: '/bpm/process-instance/get-bpmn-model-view?id=' + id })
|
||||
}
|
||||
|
||||
// 获取流程实例打印数据
|
||||
export const getProcessInstancePrintData = async (id: string) => {
|
||||
return await request.get({ url: '/bpm/process-instance/get-print-data?processInstanceId=' + id })
|
||||
}
|
||||
|
||||
@ -4,10 +4,6 @@ import request from '@/config/axios'
|
||||
* 任务状态枚举
|
||||
*/
|
||||
export enum TaskStatusEnum {
|
||||
/**
|
||||
* 跳过
|
||||
*/
|
||||
SKIP = -2,
|
||||
/**
|
||||
* 未开始
|
||||
*/
|
||||
@ -106,11 +102,6 @@ export const copyTask = async (data: any) => {
|
||||
return await request.put({ url: '/bpm/task/copy', data })
|
||||
}
|
||||
|
||||
// 撤回
|
||||
export const withdrawTask = async (taskId: string) => {
|
||||
return await request.put({ url: '/bpm/task/withdraw', params: { taskId } })
|
||||
}
|
||||
|
||||
// 获取我的待办任务
|
||||
export const myTodoTask = async (processInstanceId: string) => {
|
||||
return await request.get({ url: '/bpm/task/my-todo?processInstanceId=' + processInstanceId })
|
||||
|
||||
@ -46,6 +46,11 @@ export type DatabaseTableVO = {
|
||||
comment: string
|
||||
}
|
||||
|
||||
export type CodegenDetailVO = {
|
||||
table: CodegenTableVO
|
||||
columns: CodegenColumnVO[]
|
||||
}
|
||||
|
||||
export type CodegenPreviewVO = {
|
||||
filePath: string
|
||||
code: string
|
||||
@ -56,6 +61,11 @@ export type CodegenUpdateReqVO = {
|
||||
columns: CodegenColumnVO[]
|
||||
}
|
||||
|
||||
export type CodegenCreateListReqVO = {
|
||||
dataSourceConfigId: number
|
||||
tableNames: string[]
|
||||
}
|
||||
|
||||
// 查询列表代码生成表定义
|
||||
export const getCodegenTableList = (dataSourceConfigId: number) => {
|
||||
return request.get({ url: '/infra/codegen/table/list?dataSourceConfigId=' + dataSourceConfigId })
|
||||
@ -71,6 +81,11 @@ export const getCodegenTable = (id: number) => {
|
||||
return request.get({ url: '/infra/codegen/detail?tableId=' + id })
|
||||
}
|
||||
|
||||
// 新增代码生成表定义
|
||||
export const createCodegenTable = (data: CodegenCreateListReqVO) => {
|
||||
return request.post({ url: '/infra/codegen/create', data })
|
||||
}
|
||||
|
||||
// 修改代码生成表定义
|
||||
export const updateCodegenTable = (data: CodegenUpdateReqVO) => {
|
||||
return request.put({ url: '/infra/codegen/update', data })
|
||||
@ -105,8 +120,3 @@ export const createCodegenList = (data) => {
|
||||
export const deleteCodegenTable = (id: number) => {
|
||||
return request.delete({ url: '/infra/codegen/delete?tableId=' + id })
|
||||
}
|
||||
|
||||
// 批量删除代码生成表定义
|
||||
export const deleteCodegenTableList = (ids: number[]) => {
|
||||
return request.delete({ url: '/infra/codegen/delete-list', params: { tableIds: ids.join(',') } })
|
||||
}
|
||||
|
||||
@ -42,12 +42,7 @@ export const deleteConfig = (id: number) => {
|
||||
return request.delete({ url: '/infra/config/delete?id=' + id })
|
||||
}
|
||||
|
||||
// 批量删除参数
|
||||
export const deleteConfigList = (ids: number[]) => {
|
||||
return request.delete({ url: '/infra/config/delete-list', params: { ids: ids.join(',') } })
|
||||
}
|
||||
|
||||
// 导出参数
|
||||
export const exportConfig = (params) => {
|
||||
return request.download({ url: '/infra/config/export-excel', params })
|
||||
return request.download({ url: '/infra/config/export', params })
|
||||
}
|
||||
|
||||
@ -24,11 +24,6 @@ export const deleteDataSourceConfig = (id: number) => {
|
||||
return request.delete({ url: '/infra/data-source-config/delete?id=' + id })
|
||||
}
|
||||
|
||||
// 批量删除数据源配置
|
||||
export const deleteDataSourceConfigList = (ids: number[]) => {
|
||||
return request.delete({ url: '/infra/data-source-config/delete-list', params: { ids: ids.join(',') } })
|
||||
}
|
||||
|
||||
// 查询数据源配置详情
|
||||
export const getDataSourceConfig = (id: number) => {
|
||||
return request.get({ url: '/infra/data-source-config/get?id=' + id })
|
||||
|
||||
@ -1,50 +1,40 @@
|
||||
import request from '@/config/axios'
|
||||
import type { Dayjs } from 'dayjs'
|
||||
|
||||
/** 示例联系人信息 */
|
||||
export interface Demo01Contact {
|
||||
id: number // 编号
|
||||
name?: string // 名字
|
||||
sex?: number // 性别
|
||||
birthday?: string | Dayjs // 出生年
|
||||
description?: string // 简介
|
||||
avatar: string // 头像
|
||||
export interface Demo01ContactVO {
|
||||
id: number
|
||||
name: string
|
||||
sex: number
|
||||
birthday: Date
|
||||
description: string
|
||||
avatar: string
|
||||
}
|
||||
|
||||
// 示例联系人 API
|
||||
export const Demo01ContactApi = {
|
||||
// 查询示例联系人分页
|
||||
getDemo01ContactPage: async (params: any) => {
|
||||
return await request.get({ url: `/infra/demo01-contact/page`, params })
|
||||
},
|
||||
|
||||
// 查询示例联系人详情
|
||||
getDemo01Contact: async (id: number) => {
|
||||
return await request.get({ url: `/infra/demo01-contact/get?id=` + id })
|
||||
},
|
||||
|
||||
// 新增示例联系人
|
||||
createDemo01Contact: async (data: Demo01Contact) => {
|
||||
return await request.post({ url: `/infra/demo01-contact/create`, data })
|
||||
},
|
||||
|
||||
// 修改示例联系人
|
||||
updateDemo01Contact: async (data: Demo01Contact) => {
|
||||
return await request.put({ url: `/infra/demo01-contact/update`, data })
|
||||
},
|
||||
|
||||
// 删除示例联系人
|
||||
deleteDemo01Contact: async (id: number) => {
|
||||
return await request.delete({ url: `/infra/demo01-contact/delete?id=` + id })
|
||||
},
|
||||
|
||||
/** 批量删除示例联系人 */
|
||||
deleteDemo01ContactList: async (ids: number[]) => {
|
||||
return await request.delete({ url: `/infra/demo01-contact/delete-list?ids=${ids.join(',')}` })
|
||||
},
|
||||
|
||||
// 导出示例联系人 Excel
|
||||
exportDemo01Contact: async (params) => {
|
||||
return await request.download({ url: `/infra/demo01-contact/export-excel`, params })
|
||||
}
|
||||
// 查询示例联系人分页
|
||||
export const getDemo01ContactPage = async (params) => {
|
||||
return await request.get({ url: `/infra/demo01-contact/page`, params })
|
||||
}
|
||||
|
||||
// 查询示例联系人详情
|
||||
export const getDemo01Contact = async (id: number) => {
|
||||
return await request.get({ url: `/infra/demo01-contact/get?id=` + id })
|
||||
}
|
||||
|
||||
// 新增示例联系人
|
||||
export const createDemo01Contact = async (data: Demo01ContactVO) => {
|
||||
return await request.post({ url: `/infra/demo01-contact/create`, data })
|
||||
}
|
||||
|
||||
// 修改示例联系人
|
||||
export const updateDemo01Contact = async (data: Demo01ContactVO) => {
|
||||
return await request.put({ url: `/infra/demo01-contact/update`, data })
|
||||
}
|
||||
|
||||
// 删除示例联系人
|
||||
export const deleteDemo01Contact = async (id: number) => {
|
||||
return await request.delete({ url: `/infra/demo01-contact/delete?id=` + id })
|
||||
}
|
||||
|
||||
// 导出示例联系人 Excel
|
||||
export const exportDemo01Contact = async (params) => {
|
||||
return await request.download({ url: `/infra/demo01-contact/export-excel`, params })
|
||||
}
|
||||
|
||||
@ -1,127 +1,91 @@
|
||||
import request from '@/config/axios'
|
||||
import type { Dayjs } from 'dayjs';
|
||||
|
||||
/** 学生课程信息 */
|
||||
export interface Demo03Course {
|
||||
id: number; // 编号
|
||||
studentId?: number; // 学生编号
|
||||
name?: string; // 名字
|
||||
score?: number; // 分数
|
||||
export interface Demo03StudentVO {
|
||||
id: number
|
||||
name: string
|
||||
sex: number
|
||||
birthday: Date
|
||||
description: string
|
||||
}
|
||||
|
||||
/** 学生班级信息 */
|
||||
export interface Demo03Grade {
|
||||
id: number; // 编号
|
||||
studentId?: number; // 学生编号
|
||||
name?: string; // 名字
|
||||
teacher?: string; // 班主任
|
||||
// 查询学生分页
|
||||
export const getDemo03StudentPage = async (params) => {
|
||||
return await request.get({ url: `/infra/demo03-student/page`, params })
|
||||
}
|
||||
|
||||
/** 学生信息 */
|
||||
export interface Demo03Student {
|
||||
id: number; // 编号
|
||||
name?: string; // 名字
|
||||
sex?: number; // 性别
|
||||
birthday?: string | Dayjs; // 出生日期
|
||||
description?: string; // 简介
|
||||
// 查询学生详情
|
||||
export const getDemo03Student = async (id: number) => {
|
||||
return await request.get({ url: `/infra/demo03-student/get?id=` + id })
|
||||
}
|
||||
|
||||
// 学生 API
|
||||
export const Demo03StudentApi = {
|
||||
// 查询学生分页
|
||||
getDemo03StudentPage: async (params: any) => {
|
||||
return await request.get({ url: `/infra/demo03-student-erp/page`, params })
|
||||
},
|
||||
// 新增学生
|
||||
export const createDemo03Student = async (data: Demo03StudentVO) => {
|
||||
return await request.post({ url: `/infra/demo03-student/create`, data })
|
||||
}
|
||||
|
||||
// 查询学生详情
|
||||
getDemo03Student: async (id: number) => {
|
||||
return await request.get({ url: `/infra/demo03-student-erp/get?id=` + id })
|
||||
},
|
||||
// 修改学生
|
||||
export const updateDemo03Student = async (data: Demo03StudentVO) => {
|
||||
return await request.put({ url: `/infra/demo03-student/update`, data })
|
||||
}
|
||||
|
||||
// 新增学生
|
||||
createDemo03Student: async (data: Demo03Student) => {
|
||||
return await request.post({ url: `/infra/demo03-student-erp/create`, data })
|
||||
},
|
||||
// 删除学生
|
||||
export const deleteDemo03Student = async (id: number) => {
|
||||
return await request.delete({ url: `/infra/demo03-student/delete?id=` + id })
|
||||
}
|
||||
|
||||
// 修改学生
|
||||
updateDemo03Student: async (data: Demo03Student) => {
|
||||
return await request.put({ url: `/infra/demo03-student-erp/update`, data })
|
||||
},
|
||||
|
||||
// 删除学生
|
||||
deleteDemo03Student: async (id: number) => {
|
||||
return await request.delete({ url: `/infra/demo03-student-erp/delete?id=` + id })
|
||||
},
|
||||
|
||||
/** 批量删除学生 */
|
||||
deleteDemo03StudentList: async (ids: number[]) => {
|
||||
return await request.delete({ url: `/infra/demo03-student-erp/delete-list?ids=${ids.join(',')}` })
|
||||
},
|
||||
|
||||
// 导出学生 Excel
|
||||
exportDemo03Student: async (params) => {
|
||||
return await request.download({ url: `/infra/demo03-student-erp/export-excel`, params })
|
||||
},
|
||||
// 导出学生 Excel
|
||||
export const exportDemo03Student = async (params) => {
|
||||
return await request.download({ url: `/infra/demo03-student/export-excel`, params })
|
||||
}
|
||||
|
||||
// ==================== 子表(学生课程) ====================
|
||||
|
||||
// 获得学生课程分页
|
||||
getDemo03CoursePage: async (params) => {
|
||||
return await request.get({ url: `/infra/demo03-student-erp/demo03-course/page`, params })
|
||||
},
|
||||
// 新增学生课程
|
||||
createDemo03Course: async (data: Demo03Course) => {
|
||||
return await request.post({ url: `/infra/demo03-student-erp/demo03-course/create`, data })
|
||||
},
|
||||
// 获得学生课程分页
|
||||
export const getDemo03CoursePage = async (params) => {
|
||||
return await request.get({ url: `/infra/demo03-student/demo03-course/page`, params })
|
||||
}
|
||||
// 新增学生课程
|
||||
export const createDemo03Course = async (data) => {
|
||||
return await request.post({ url: `/infra/demo03-student/demo03-course/create`, data })
|
||||
}
|
||||
|
||||
// 修改学生课程
|
||||
updateDemo03Course: async (data: Demo03Course) => {
|
||||
return await request.put({ url: `/infra/demo03-student-erp/demo03-course/update`, data })
|
||||
},
|
||||
// 修改学生课程
|
||||
export const updateDemo03Course = async (data) => {
|
||||
return await request.put({ url: `/infra/demo03-student/demo03-course/update`, data })
|
||||
}
|
||||
|
||||
// 删除学生课程
|
||||
deleteDemo03Course: async (id: number) => {
|
||||
return await request.delete({ url: `/infra/demo03-student-erp/demo03-course/delete?id=` + id })
|
||||
},
|
||||
// 删除学生课程
|
||||
export const deleteDemo03Course = async (id: number) => {
|
||||
return await request.delete({ url: `/infra/demo03-student/demo03-course/delete?id=` + id })
|
||||
}
|
||||
|
||||
/** 批量删除学生课程 */
|
||||
deleteDemo03CourseList: async (ids: number[]) => {
|
||||
return await request.delete({ url: `/infra/demo03-student-erp/demo03-course/delete-list?ids=${ids.join(',')}` })
|
||||
},
|
||||
|
||||
// 获得学生课程
|
||||
getDemo03Course: async (id: number) => {
|
||||
return await request.get({ url: `/infra/demo03-student-erp/demo03-course/get?id=` + id })
|
||||
},
|
||||
// 获得学生课程
|
||||
export const getDemo03Course = async (id: number) => {
|
||||
return await request.get({ url: `/infra/demo03-student/demo03-course/get?id=` + id })
|
||||
}
|
||||
|
||||
// ==================== 子表(学生班级) ====================
|
||||
|
||||
// 获得学生班级分页
|
||||
getDemo03GradePage: async (params) => {
|
||||
return await request.get({ url: `/infra/demo03-student-erp/demo03-grade/page`, params })
|
||||
},
|
||||
// 新增学生班级
|
||||
createDemo03Grade: async (data: Demo03Grade) => {
|
||||
return await request.post({ url: `/infra/demo03-student-erp/demo03-grade/create`, data })
|
||||
},
|
||||
|
||||
// 修改学生班级
|
||||
updateDemo03Grade: async (data: Demo03Grade) => {
|
||||
return await request.put({ url: `/infra/demo03-student-erp/demo03-grade/update`, data })
|
||||
},
|
||||
|
||||
// 删除学生班级
|
||||
deleteDemo03Grade: async (id: number) => {
|
||||
return await request.delete({ url: `/infra/demo03-student-erp/demo03-grade/delete?id=` + id })
|
||||
},
|
||||
|
||||
/** 批量删除学生班级 */
|
||||
deleteDemo03GradeList: async (ids: number[]) => {
|
||||
return await request.delete({ url: `/infra/demo03-student-erp/demo03-grade/delete-list?ids=${ids.join(',')}` })
|
||||
},
|
||||
|
||||
// 获得学生班级
|
||||
getDemo03Grade: async (id: number) => {
|
||||
return await request.get({ url: `/infra/demo03-student-erp/demo03-grade/get?id=` + id })
|
||||
},
|
||||
// 获得学生班级分页
|
||||
export const getDemo03GradePage = async (params) => {
|
||||
return await request.get({ url: `/infra/demo03-student/demo03-grade/page`, params })
|
||||
}
|
||||
// 新增学生班级
|
||||
export const createDemo03Grade = async (data) => {
|
||||
return await request.post({ url: `/infra/demo03-student/demo03-grade/create`, data })
|
||||
}
|
||||
|
||||
// 修改学生班级
|
||||
export const updateDemo03Grade = async (data) => {
|
||||
return await request.put({ url: `/infra/demo03-student/demo03-grade/update`, data })
|
||||
}
|
||||
|
||||
// 删除学生班级
|
||||
export const deleteDemo03Grade = async (id: number) => {
|
||||
return await request.delete({ url: `/infra/demo03-student/demo03-grade/delete?id=` + id })
|
||||
}
|
||||
|
||||
// 获得学生班级
|
||||
export const getDemo03Grade = async (id: number) => {
|
||||
return await request.get({ url: `/infra/demo03-student/demo03-grade/get?id=` + id })
|
||||
}
|
||||
|
||||
@ -1,81 +1,57 @@
|
||||
import request from '@/config/axios'
|
||||
import type { Dayjs } from 'dayjs';
|
||||
|
||||
/** 学生课程信息 */
|
||||
export interface Demo03Course {
|
||||
id: number; // 编号
|
||||
studentId?: number; // 学生编号
|
||||
name?: string; // 名字
|
||||
score?: number; // 分数
|
||||
export interface Demo03StudentVO {
|
||||
id: number
|
||||
name: string
|
||||
sex: number
|
||||
birthday: Date
|
||||
description: string
|
||||
}
|
||||
|
||||
/** 学生班级信息 */
|
||||
export interface Demo03Grade {
|
||||
id: number; // 编号
|
||||
studentId?: number; // 学生编号
|
||||
name?: string; // 名字
|
||||
teacher?: string; // 班主任
|
||||
// 查询学生分页
|
||||
export const getDemo03StudentPage = async (params) => {
|
||||
return await request.get({ url: `/infra/demo03-student/page`, params })
|
||||
}
|
||||
|
||||
/** 学生信息 */
|
||||
export interface Demo03Student {
|
||||
id: number; // 编号
|
||||
name?: string; // 名字
|
||||
sex?: number; // 性别
|
||||
birthday?: string | Dayjs; // 出生日期
|
||||
description?: string; // 简介
|
||||
demo03courses?: Demo03Course[]
|
||||
demo03grade?: Demo03Grade
|
||||
// 查询学生详情
|
||||
export const getDemo03Student = async (id: number) => {
|
||||
return await request.get({ url: `/infra/demo03-student/get?id=` + id })
|
||||
}
|
||||
|
||||
// 学生 API
|
||||
export const Demo03StudentApi = {
|
||||
// 查询学生分页
|
||||
getDemo03StudentPage: async (params: any) => {
|
||||
return await request.get({ url: `/infra/demo03-student-inner/page`, params })
|
||||
},
|
||||
// 新增学生
|
||||
export const createDemo03Student = async (data: Demo03StudentVO) => {
|
||||
return await request.post({ url: `/infra/demo03-student/create`, data })
|
||||
}
|
||||
|
||||
// 查询学生详情
|
||||
getDemo03Student: async (id: number) => {
|
||||
return await request.get({ url: `/infra/demo03-student-inner/get?id=` + id })
|
||||
},
|
||||
// 修改学生
|
||||
export const updateDemo03Student = async (data: Demo03StudentVO) => {
|
||||
return await request.put({ url: `/infra/demo03-student/update`, data })
|
||||
}
|
||||
|
||||
// 新增学生
|
||||
createDemo03Student: async (data: Demo03Student) => {
|
||||
return await request.post({ url: `/infra/demo03-student-inner/create`, data })
|
||||
},
|
||||
// 删除学生
|
||||
export const deleteDemo03Student = async (id: number) => {
|
||||
return await request.delete({ url: `/infra/demo03-student/delete?id=` + id })
|
||||
}
|
||||
|
||||
// 修改学生
|
||||
updateDemo03Student: async (data: Demo03Student) => {
|
||||
return await request.put({ url: `/infra/demo03-student-inner/update`, data })
|
||||
},
|
||||
|
||||
// 删除学生
|
||||
deleteDemo03Student: async (id: number) => {
|
||||
return await request.delete({ url: `/infra/demo03-student-inner/delete?id=` + id })
|
||||
},
|
||||
|
||||
/** 批量删除学生 */
|
||||
deleteDemo03StudentList: async (ids: number[]) => {
|
||||
return await request.delete({ url: `/infra/demo03-student-inner/delete-list?ids=${ids.join(',')}` })
|
||||
},
|
||||
|
||||
// 导出学生 Excel
|
||||
exportDemo03Student: async (params) => {
|
||||
return await request.download({ url: `/infra/demo03-student-inner/export-excel`, params })
|
||||
},
|
||||
// 导出学生 Excel
|
||||
export const exportDemo03Student = async (params) => {
|
||||
return await request.download({ url: `/infra/demo03-student/export-excel`, params })
|
||||
}
|
||||
|
||||
// ==================== 子表(学生课程) ====================
|
||||
|
||||
// 获得学生课程列表
|
||||
getDemo03CourseListByStudentId: async (studentId) => {
|
||||
return await request.get({ url: `/infra/demo03-student-inner/demo03-course/list-by-student-id?studentId=` + studentId })
|
||||
},
|
||||
// 获得学生课程列表
|
||||
export const getDemo03CourseListByStudentId = async (studentId) => {
|
||||
return await request.get({
|
||||
url: `/infra/demo03-student/demo03-course/list-by-student-id?studentId=` + studentId
|
||||
})
|
||||
}
|
||||
|
||||
// ==================== 子表(学生班级) ====================
|
||||
|
||||
// 获得学生班级
|
||||
getDemo03GradeByStudentId: async (studentId) => {
|
||||
return await request.get({ url: `/infra/demo03-student-inner/demo03-grade/get-by-student-id?studentId=` + studentId })
|
||||
},
|
||||
// 获得学生班级
|
||||
export const getDemo03GradeByStudentId = async (studentId) => {
|
||||
return await request.get({
|
||||
url: `/infra/demo03-student/demo03-grade/get-by-student-id?studentId=` + studentId
|
||||
})
|
||||
}
|
||||
|
||||
@ -1,81 +1,57 @@
|
||||
import request from '@/config/axios'
|
||||
import type { Dayjs } from 'dayjs';
|
||||
|
||||
/** 学生课程信息 */
|
||||
export interface Demo03Course {
|
||||
id: number; // 编号
|
||||
studentId?: number; // 学生编号
|
||||
name?: string; // 名字
|
||||
score?: number; // 分数
|
||||
export interface Demo03StudentVO {
|
||||
id: number
|
||||
name: string
|
||||
sex: number
|
||||
birthday: Date
|
||||
description: string
|
||||
}
|
||||
|
||||
/** 学生班级信息 */
|
||||
export interface Demo03Grade {
|
||||
id: number; // 编号
|
||||
studentId?: number; // 学生编号
|
||||
name?: string; // 名字
|
||||
teacher?: string; // 班主任
|
||||
// 查询学生分页
|
||||
export const getDemo03StudentPage = async (params) => {
|
||||
return await request.get({ url: `/infra/demo03-student/page`, params })
|
||||
}
|
||||
|
||||
/** 学生信息 */
|
||||
export interface Demo03Student {
|
||||
id: number; // 编号
|
||||
name?: string; // 名字
|
||||
sex?: number; // 性别
|
||||
birthday?: string | Dayjs; // 出生日期
|
||||
description?: string; // 简介
|
||||
demo03courses?: Demo03Course[]
|
||||
demo03grade?: Demo03Grade
|
||||
// 查询学生详情
|
||||
export const getDemo03Student = async (id: number) => {
|
||||
return await request.get({ url: `/infra/demo03-student/get?id=` + id })
|
||||
}
|
||||
|
||||
// 学生 API
|
||||
export const Demo03StudentApi = {
|
||||
// 查询学生分页
|
||||
getDemo03StudentPage: async (params: any) => {
|
||||
return await request.get({ url: `/infra/demo03-student-normal/page`, params })
|
||||
},
|
||||
// 新增学生
|
||||
export const createDemo03Student = async (data: Demo03StudentVO) => {
|
||||
return await request.post({ url: `/infra/demo03-student/create`, data })
|
||||
}
|
||||
|
||||
// 查询学生详情
|
||||
getDemo03Student: async (id: number) => {
|
||||
return await request.get({ url: `/infra/demo03-student-normal/get?id=` + id })
|
||||
},
|
||||
// 修改学生
|
||||
export const updateDemo03Student = async (data: Demo03StudentVO) => {
|
||||
return await request.put({ url: `/infra/demo03-student/update`, data })
|
||||
}
|
||||
|
||||
// 新增学生
|
||||
createDemo03Student: async (data: Demo03Student) => {
|
||||
return await request.post({ url: `/infra/demo03-student-normal/create`, data })
|
||||
},
|
||||
// 删除学生
|
||||
export const deleteDemo03Student = async (id: number) => {
|
||||
return await request.delete({ url: `/infra/demo03-student/delete?id=` + id })
|
||||
}
|
||||
|
||||
// 修改学生
|
||||
updateDemo03Student: async (data: Demo03Student) => {
|
||||
return await request.put({ url: `/infra/demo03-student-normal/update`, data })
|
||||
},
|
||||
|
||||
// 删除学生
|
||||
deleteDemo03Student: async (id: number) => {
|
||||
return await request.delete({ url: `/infra/demo03-student-normal/delete?id=` + id })
|
||||
},
|
||||
|
||||
/** 批量删除学生 */
|
||||
deleteDemo03StudentList: async (ids: number[]) => {
|
||||
return await request.delete({ url: `/infra/demo03-student-normal/delete-list?ids=${ids.join(',')}` })
|
||||
},
|
||||
|
||||
// 导出学生 Excel
|
||||
exportDemo03Student: async (params) => {
|
||||
return await request.download({ url: `/infra/demo03-student-normal/export-excel`, params })
|
||||
},
|
||||
// 导出学生 Excel
|
||||
export const exportDemo03Student = async (params) => {
|
||||
return await request.download({ url: `/infra/demo03-student/export-excel`, params })
|
||||
}
|
||||
|
||||
// ==================== 子表(学生课程) ====================
|
||||
|
||||
// 获得学生课程列表
|
||||
getDemo03CourseListByStudentId: async (studentId) => {
|
||||
return await request.get({ url: `/infra/demo03-student-normal/demo03-course/list-by-student-id?studentId=` + studentId })
|
||||
},
|
||||
// 获得学生课程列表
|
||||
export const getDemo03CourseListByStudentId = async (studentId) => {
|
||||
return await request.get({
|
||||
url: `/infra/demo03-student/demo03-course/list-by-student-id?studentId=` + studentId
|
||||
})
|
||||
}
|
||||
|
||||
// ==================== 子表(学生班级) ====================
|
||||
|
||||
// 获得学生班级
|
||||
getDemo03GradeByStudentId: async (studentId) => {
|
||||
return await request.get({ url: `/infra/demo03-student-normal/demo03-grade/get-by-student-id?studentId=` + studentId })
|
||||
},
|
||||
// 获得学生班级
|
||||
export const getDemo03GradeByStudentId = async (studentId) => {
|
||||
return await request.get({
|
||||
url: `/infra/demo03-student/demo03-grade/get-by-student-id?studentId=` + studentId
|
||||
})
|
||||
}
|
||||
|
||||
@ -1,5 +1,11 @@
|
||||
import request from '@/config/axios'
|
||||
|
||||
export interface FilePageReqVO extends PageParam {
|
||||
path?: string
|
||||
type?: string
|
||||
createTime?: Date[]
|
||||
}
|
||||
|
||||
// 文件预签名地址 Response VO
|
||||
export interface FilePresignedUrlRespVO {
|
||||
// 文件配置编号
|
||||
@ -8,12 +14,10 @@ export interface FilePresignedUrlRespVO {
|
||||
uploadUrl: string
|
||||
// 文件 URL
|
||||
url: string
|
||||
// 文件路径
|
||||
path: string
|
||||
}
|
||||
|
||||
// 查询文件列表
|
||||
export const getFilePage = (params: PageParam) => {
|
||||
export const getFilePage = (params: FilePageReqVO) => {
|
||||
return request.get({ url: '/infra/file/page', params })
|
||||
}
|
||||
|
||||
@ -22,16 +26,11 @@ export const deleteFile = (id: number) => {
|
||||
return request.delete({ url: '/infra/file/delete?id=' + id })
|
||||
}
|
||||
|
||||
// 批量删除文件
|
||||
export const deleteFileList = (ids: number[]) => {
|
||||
return request.delete({ url: '/infra/file/delete-list', params: { ids: ids.join(',') } })
|
||||
}
|
||||
|
||||
// 获取文件预签名地址
|
||||
export const getFilePresignedUrl = (name: string, directory?: string) => {
|
||||
export const getFilePresignedUrl = (path: string) => {
|
||||
return request.get<FilePresignedUrlRespVO>({
|
||||
url: '/infra/file/presigned-url',
|
||||
params: { name, directory }
|
||||
params: { path }
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
@ -11,8 +11,6 @@ export interface FileClientConfig {
|
||||
bucket?: string
|
||||
accessKey?: string
|
||||
accessSecret?: string
|
||||
enablePathStyleAccess?: boolean
|
||||
enablePublicAccess?: boolean
|
||||
domain: string
|
||||
}
|
||||
|
||||
@ -57,11 +55,6 @@ export const deleteFileConfig = (id: number) => {
|
||||
return request.delete({ url: '/infra/file-config/delete?id=' + id })
|
||||
}
|
||||
|
||||
// 批量删除文件配置
|
||||
export const deleteFileConfigList = (ids: number[]) => {
|
||||
return request.delete({ url: '/infra/file-config/delete-list', params: { ids: ids.join(',') } })
|
||||
}
|
||||
|
||||
// 测试文件配置
|
||||
export const testFileConfig = (id: number) => {
|
||||
return request.get({ url: '/infra/file-config/test?id=' + id })
|
||||
|
||||
@ -38,11 +38,6 @@ export const deleteJob = (id: number) => {
|
||||
return request.delete({ url: '/infra/job/delete?id=' + id })
|
||||
}
|
||||
|
||||
// 批量删除定时任务调度
|
||||
export const deleteJobList = (ids: number[]) => {
|
||||
return request.delete({ url: '/infra/job/delete-list', params: { ids: ids.join(',') } })
|
||||
}
|
||||
|
||||
// 导出定时任务调度
|
||||
export const exportJob = (params) => {
|
||||
return request.download({ url: '/infra/job/export-excel', params })
|
||||
|
||||
@ -1,46 +0,0 @@
|
||||
import request from '@/config/axios'
|
||||
|
||||
/** IoT 告警配置信息 */
|
||||
export interface AlertConfig {
|
||||
id: number // 配置编号
|
||||
name?: string // 配置名称
|
||||
description: string // 配置描述
|
||||
level?: number // 告警级别
|
||||
status?: number // 配置状态
|
||||
sceneRuleIds: string // 关联的场景联动规则编号数组
|
||||
receiveUserIds: string // 接收的用户编号数组
|
||||
receiveTypes: string // 接收的类型数组
|
||||
}
|
||||
|
||||
// IoT 告警配置 API
|
||||
export const AlertConfigApi = {
|
||||
// 查询告警配置分页
|
||||
getAlertConfigPage: async (params: any) => {
|
||||
return await request.get({ url: `/iot/alert-config/page`, params })
|
||||
},
|
||||
|
||||
// 查询告警配置详情
|
||||
getAlertConfig: async (id: number) => {
|
||||
return await request.get({ url: `/iot/alert-config/get?id=` + id })
|
||||
},
|
||||
|
||||
// 新增告警配置
|
||||
createAlertConfig: async (data: AlertConfig) => {
|
||||
return await request.post({ url: `/iot/alert-config/create`, data })
|
||||
},
|
||||
|
||||
// 修改告警配置
|
||||
updateAlertConfig: async (data: AlertConfig) => {
|
||||
return await request.put({ url: `/iot/alert-config/update`, data })
|
||||
},
|
||||
|
||||
// 删除告警配置
|
||||
deleteAlertConfig: async (id: number) => {
|
||||
return await request.delete({ url: `/iot/alert-config/delete?id=` + id })
|
||||
},
|
||||
|
||||
// 获取告警配置简单列表
|
||||
getSimpleAlertConfigList: async () => {
|
||||
return await request.get({ url: `/iot/alert-config/simple-list` })
|
||||
}
|
||||
}
|
||||
@ -1,35 +0,0 @@
|
||||
import request from '@/config/axios'
|
||||
|
||||
/** IoT 告警记录信息 */
|
||||
export interface AlertRecord {
|
||||
id: number // 记录编号
|
||||
configId: number // 告警配置编号
|
||||
configName: string // 告警名称
|
||||
configLevel: number // 告警级别
|
||||
productId: number // 产品编号
|
||||
deviceId: number // 设备编号
|
||||
deviceMessage: any // 触发的设备消息
|
||||
processStatus?: boolean // 是否处理
|
||||
processRemark: string // 处理结果(备注)
|
||||
}
|
||||
|
||||
// IoT 告警记录 API
|
||||
export const AlertRecordApi = {
|
||||
// 查询告警记录分页
|
||||
getAlertRecordPage: async (params: any) => {
|
||||
return await request.get({ url: `/iot/alert-record/page`, params })
|
||||
},
|
||||
|
||||
// 查询告警记录详情
|
||||
getAlertRecord: async (id: number) => {
|
||||
return await request.get({ url: `/iot/alert-record/get?id=` + id })
|
||||
},
|
||||
|
||||
// 处理告警记录
|
||||
processAlertRecord: async (id: number, processRemark: string) => {
|
||||
return await request.put({
|
||||
url: `/iot/alert-record/process`,
|
||||
data: { id, processRemark }
|
||||
})
|
||||
}
|
||||
}
|
||||
@ -1,165 +0,0 @@
|
||||
import request from '@/config/axios'
|
||||
|
||||
// IoT 设备 VO
|
||||
export interface DeviceVO {
|
||||
id: number // 设备 ID,主键,自增
|
||||
deviceName: string // 设备名称
|
||||
productId: number // 产品编号
|
||||
productKey: string // 产品标识
|
||||
deviceType: number // 设备类型
|
||||
nickname: string // 设备备注名称
|
||||
gatewayId: number // 网关设备 ID
|
||||
state: number // 设备状态
|
||||
onlineTime: Date // 最后上线时间
|
||||
offlineTime: Date // 最后离线时间
|
||||
activeTime: Date // 设备激活时间
|
||||
createTime: Date // 创建时间
|
||||
ip: string // 设备的 IP 地址
|
||||
firmwareVersion: string // 设备的固件版本
|
||||
deviceSecret: string // 设备密钥,用于设备认证,需安全存储
|
||||
mqttClientId: string // MQTT 客户端 ID
|
||||
mqttUsername: string // MQTT 用户名
|
||||
mqttPassword: string // MQTT 密码
|
||||
authType: string // 认证类型
|
||||
locationType: number // 定位类型
|
||||
latitude?: number // 设备位置的纬度
|
||||
longitude?: number // 设备位置的经度
|
||||
areaId: number // 地区编码
|
||||
address: string // 设备详细地址
|
||||
serialNumber: string // 设备序列号
|
||||
config: string // 设备配置
|
||||
groupIds?: number[] // 添加分组 ID
|
||||
}
|
||||
|
||||
// IoT 设备属性详细 VO
|
||||
export interface IotDevicePropertyDetailRespVO {
|
||||
identifier: string // 属性标识符
|
||||
value: string // 最新值
|
||||
updateTime: Date // 更新时间
|
||||
name: string // 属性名称
|
||||
dataType: string // 数据类型
|
||||
dataSpecs: any // 数据定义
|
||||
dataSpecsList: any[] // 数据定义列表
|
||||
}
|
||||
|
||||
// IoT 设备属性 VO
|
||||
export interface IotDevicePropertyRespVO {
|
||||
identifier: string // 属性标识符
|
||||
value: string // 最新值
|
||||
updateTime: Date // 更新时间
|
||||
}
|
||||
|
||||
// TODO @芋艿:调整到 constants
|
||||
// IoT 设备状态枚举
|
||||
export enum DeviceStateEnum {
|
||||
INACTIVE = 0, // 未激活
|
||||
ONLINE = 1, // 在线
|
||||
OFFLINE = 2 // 离线
|
||||
}
|
||||
|
||||
// 设备认证参数 VO
|
||||
export interface IotDeviceAuthInfoVO {
|
||||
clientId: string // 客户端 ID
|
||||
username: string // 用户名
|
||||
password: string // 密码
|
||||
}
|
||||
|
||||
// IoT 设备发送消息 Request VO
|
||||
export interface IotDeviceMessageSendReqVO {
|
||||
deviceId: number // 设备编号
|
||||
method: string // 请求方法
|
||||
params?: any // 请求参数
|
||||
}
|
||||
|
||||
// 设备 API
|
||||
export const DeviceApi = {
|
||||
// 查询设备分页
|
||||
getDevicePage: async (params: any) => {
|
||||
return await request.get({ url: `/iot/device/page`, params })
|
||||
},
|
||||
|
||||
// 查询设备详情
|
||||
getDevice: async (id: number) => {
|
||||
return await request.get({ url: `/iot/device/get?id=` + id })
|
||||
},
|
||||
|
||||
// 新增设备
|
||||
createDevice: async (data: DeviceVO) => {
|
||||
return await request.post({ url: `/iot/device/create`, data })
|
||||
},
|
||||
|
||||
// 修改设备
|
||||
updateDevice: async (data: DeviceVO) => {
|
||||
return await request.put({ url: `/iot/device/update`, data })
|
||||
},
|
||||
|
||||
// 修改设备分组
|
||||
updateDeviceGroup: async (data: { ids: number[]; groupIds: number[] }) => {
|
||||
return await request.put({ url: `/iot/device/update-group`, data })
|
||||
},
|
||||
|
||||
// 删除单个设备
|
||||
deleteDevice: async (id: number) => {
|
||||
return await request.delete({ url: `/iot/device/delete?id=` + id })
|
||||
},
|
||||
|
||||
// 删除多个设备
|
||||
deleteDeviceList: async (ids: number[]) => {
|
||||
return await request.delete({ url: `/iot/device/delete-list`, params: { ids: ids.join(',') } })
|
||||
},
|
||||
|
||||
// 导出设备
|
||||
exportDeviceExcel: async (params: any) => {
|
||||
return await request.download({ url: `/iot/device/export-excel`, params })
|
||||
},
|
||||
|
||||
// 获取设备数量
|
||||
getDeviceCount: async (productId: number) => {
|
||||
return await request.get({ url: `/iot/device/count?productId=` + productId })
|
||||
},
|
||||
|
||||
// 获取设备的精简信息列表
|
||||
getSimpleDeviceList: async (deviceType?: number, productId?: number) => {
|
||||
return await request.get({ url: `/iot/device/simple-list?`, params: { deviceType, productId } })
|
||||
},
|
||||
|
||||
// 根据产品编号,获取设备的精简信息列表
|
||||
getDeviceListByProductId: async (productId: number) => {
|
||||
return await request.get({ url: `/iot/device/simple-list?`, params: { productId } })
|
||||
},
|
||||
|
||||
// 获取导入模板
|
||||
importDeviceTemplate: async () => {
|
||||
return await request.download({ url: `/iot/device/get-import-template` })
|
||||
},
|
||||
|
||||
// 获取设备属性最新数据
|
||||
getLatestDeviceProperties: async (params: any) => {
|
||||
return await request.get({ url: `/iot/device/property/get-latest`, params })
|
||||
},
|
||||
|
||||
// 获取设备属性历史数据
|
||||
getHistoryDevicePropertyList: async (params: any) => {
|
||||
return await request.get({ url: `/iot/device/property/history-list`, params })
|
||||
},
|
||||
|
||||
// 获取设备认证信息
|
||||
getDeviceAuthInfo: async (id: number) => {
|
||||
return await request.get({ url: `/iot/device/get-auth-info`, params: { id } })
|
||||
},
|
||||
|
||||
// 查询设备消息分页
|
||||
getDeviceMessagePage: async (params: any) => {
|
||||
return await request.get({ url: `/iot/device/message/page`, params })
|
||||
},
|
||||
|
||||
// 查询设备消息配对分页
|
||||
getDeviceMessagePairPage: async (params: any) => {
|
||||
return await request.get({ url: `/iot/device/message/pair-page`, params })
|
||||
},
|
||||
|
||||
// 发送设备消息
|
||||
sendDeviceMessage: async (params: IotDeviceMessageSendReqVO) => {
|
||||
return await request.post({ url: `/iot/device/message/send`, data: params })
|
||||
}
|
||||
}
|
||||
@ -1,43 +0,0 @@
|
||||
import request from '@/config/axios'
|
||||
|
||||
// IoT 设备分组 VO
|
||||
export interface DeviceGroupVO {
|
||||
id: number // 分组 ID
|
||||
name: string // 分组名字
|
||||
status: number // 分组状态
|
||||
description: string // 分组描述
|
||||
deviceCount?: number // 设备数量
|
||||
}
|
||||
|
||||
// IoT 设备分组 API
|
||||
export const DeviceGroupApi = {
|
||||
// 查询设备分组分页
|
||||
getDeviceGroupPage: async (params: any) => {
|
||||
return await request.get({ url: `/iot/device-group/page`, params })
|
||||
},
|
||||
|
||||
// 查询设备分组详情
|
||||
getDeviceGroup: async (id: number) => {
|
||||
return await request.get({ url: `/iot/device-group/get?id=` + id })
|
||||
},
|
||||
|
||||
// 新增设备分组
|
||||
createDeviceGroup: async (data: DeviceGroupVO) => {
|
||||
return await request.post({ url: `/iot/device-group/create`, data })
|
||||
},
|
||||
|
||||
// 修改设备分组
|
||||
updateDeviceGroup: async (data: DeviceGroupVO) => {
|
||||
return await request.put({ url: `/iot/device-group/update`, data })
|
||||
},
|
||||
|
||||
// 删除设备分组
|
||||
deleteDeviceGroup: async (id: number) => {
|
||||
return await request.delete({ url: `/iot/device-group/delete?id=` + id })
|
||||
},
|
||||
|
||||
// 获取设备分组的精简信息列表
|
||||
getSimpleDeviceGroupList: async () => {
|
||||
return await request.get({ url: `/iot/device-group/simple-list` })
|
||||
}
|
||||
}
|
||||
74
src/api/iot/device/index.ts
Normal file
@ -0,0 +1,74 @@
|
||||
import request from '@/config/axios'
|
||||
|
||||
// IoT 设备 VO
|
||||
export interface DeviceVO {
|
||||
id: number // 设备 ID,主键,自增
|
||||
deviceKey: string // 设备唯一标识符
|
||||
deviceName: string // 设备名称
|
||||
productId: number // 产品编号
|
||||
productKey: string // 产品标识
|
||||
deviceType: number // 设备类型
|
||||
nickname: string // 设备备注名称
|
||||
gatewayId: number // 网关设备 ID
|
||||
status: number // 设备状态
|
||||
statusLastUpdateTime: Date // 设备状态最后更新时间
|
||||
lastOnlineTime: Date // 最后上线时间
|
||||
lastOfflineTime: Date // 最后离线时间
|
||||
activeTime: Date // 设备激活时间
|
||||
createTime: Date // 创建时间
|
||||
ip: string // 设备的 IP 地址
|
||||
firmwareVersion: string // 设备的固件版本
|
||||
deviceSecret: string // 设备密钥,用于设备认证,需安全存储
|
||||
mqttClientId: string // MQTT 客户端 ID
|
||||
mqttUsername: string // MQTT 用户名
|
||||
mqttPassword: string // MQTT 密码
|
||||
authType: string // 认证类型
|
||||
latitude: number // 设备位置的纬度
|
||||
longitude: number // 设备位置的经度
|
||||
areaId: number // 地区编码
|
||||
address: string // 设备详细地址
|
||||
serialNumber: string // 设备序列号
|
||||
}
|
||||
|
||||
export interface DeviceUpdateStatusVO {
|
||||
id: number // 设备 ID,主键,自增
|
||||
status: number // 设备状态
|
||||
}
|
||||
|
||||
// 设备 API
|
||||
export const DeviceApi = {
|
||||
// 查询设备分页
|
||||
getDevicePage: async (params: any) => {
|
||||
return await request.get({ url: `/iot/device/page`, params })
|
||||
},
|
||||
|
||||
// 查询设备详情
|
||||
getDevice: async (id: number) => {
|
||||
return await request.get({ url: `/iot/device/get?id=` + id })
|
||||
},
|
||||
|
||||
// 新增设备
|
||||
createDevice: async (data: DeviceVO) => {
|
||||
return await request.post({ url: `/iot/device/create`, data })
|
||||
},
|
||||
|
||||
// 修改设备
|
||||
updateDevice: async (data: DeviceVO) => {
|
||||
return await request.put({ url: `/iot/device/update`, data })
|
||||
},
|
||||
|
||||
// 修改设备状态
|
||||
updateDeviceStatus: async (data: DeviceUpdateStatusVO) => {
|
||||
return await request.put({ url: `/iot/device/update-status`, data })
|
||||
},
|
||||
|
||||
// 删除设备
|
||||
deleteDevice: async (id: number) => {
|
||||
return await request.delete({ url: `/iot/device/delete?id=` + id })
|
||||
},
|
||||
|
||||
// 获取设备数量
|
||||
getDeviceCount: async (productId: number) => {
|
||||
return await request.get({ url: `/iot/device/count?productId=` + productId })
|
||||
}
|
||||
}
|
||||
@ -1,44 +0,0 @@
|
||||
import request from '@/config/axios'
|
||||
|
||||
/** IoT OTA 固件信息 */
|
||||
export interface IoTOtaFirmware {
|
||||
id?: number // 固件编号
|
||||
name?: string // 固件名称
|
||||
description?: string // 固件描述
|
||||
version?: string // 版本号
|
||||
productId?: number // 产品编号
|
||||
productName?: string // 产品名称
|
||||
fileUrl?: string // 固件文件 URL
|
||||
fileSize?: number // 固件文件大小
|
||||
fileDigestAlgorithm?: string // 固件文件签名算法
|
||||
fileDigestValue?: string // 固件文件签名结果
|
||||
createTime?: Date // 创建时间
|
||||
}
|
||||
|
||||
// IoT OTA 固件 API
|
||||
export const IoTOtaFirmwareApi = {
|
||||
// 查询 OTA 固件分页
|
||||
getOtaFirmwarePage: async (params: any) => {
|
||||
return await request.get({ url: `/iot/ota/firmware/page`, params })
|
||||
},
|
||||
|
||||
// 查询 OTA 固件详情
|
||||
getOtaFirmware: async (id: number) => {
|
||||
return await request.get({ url: `/iot/ota/firmware/get?id=` + id })
|
||||
},
|
||||
|
||||
// 新增 OTA 固件
|
||||
createOtaFirmware: async (data: IoTOtaFirmware) => {
|
||||
return await request.post({ url: `/iot/ota/firmware/create`, data })
|
||||
},
|
||||
|
||||
// 修改 OTA 固件
|
||||
updateOtaFirmware: async (data: IoTOtaFirmware) => {
|
||||
return await request.put({ url: `/iot/ota/firmware/update`, data })
|
||||
},
|
||||
|
||||
// 删除 OTA 固件
|
||||
deleteOtaFirmware: async (id: number) => {
|
||||
return await request.delete({ url: `/iot/ota/firmware/delete?id=` + id })
|
||||
}
|
||||
}
|
||||
@ -1,38 +0,0 @@
|
||||
import request from '@/config/axios'
|
||||
|
||||
/** IoT OTA 任务信息 */
|
||||
export interface OtaTask {
|
||||
id?: number // 任务编号
|
||||
name: string // 任务名称
|
||||
description?: string // 任务描述
|
||||
firmwareId?: number // 固件编号
|
||||
status: number // 任务状态
|
||||
deviceScope?: number // 升级范围
|
||||
deviceIds?: number[] // 指定设备ID列表(当升级范围为指定设备时使用)
|
||||
deviceTotalCount?: number // 设备总共数量
|
||||
deviceSuccessCount?: number // 设备成功数量
|
||||
createTime?: Date // 创建时间
|
||||
}
|
||||
|
||||
// IoT OTA 任务 API
|
||||
export const IoTOtaTaskApi = {
|
||||
// 查询 OTA 升级任务分页
|
||||
getOtaTaskPage: async (params: any) => {
|
||||
return await request.get({ url: `/iot/ota/task/page`, params })
|
||||
},
|
||||
|
||||
// 查询 OTA 升级任务详情
|
||||
getOtaTask: async (id: number) => {
|
||||
return await request.get({ url: `/iot/ota/task/get?id=` + id })
|
||||
},
|
||||
|
||||
// 创建 OTA 升级任务
|
||||
createOtaTask: async (data: OtaTask) => {
|
||||
return await request.post({ url: `/iot/ota/task/create`, data })
|
||||
},
|
||||
|
||||
// 取消 OTA 升级任务
|
||||
cancelOtaTask: async (id: number) => {
|
||||
return await request.post({ url: `/iot/ota/task/cancel?id=` + id })
|
||||
}
|
||||
}
|
||||
@ -1,38 +0,0 @@
|
||||
import request from '@/config/axios'
|
||||
|
||||
/** IoT OTA 任务记录信息 */
|
||||
export interface OtaTaskRecord {
|
||||
id?: number // 升级记录编号
|
||||
firmwareId?: number // 固件编号
|
||||
firmwareVersion?: string // 固件版本
|
||||
taskId?: number // 任务编号
|
||||
deviceId?: string // 设备编号
|
||||
deviceName?: string // 设备名称
|
||||
currentVersion?: string // 当前版本
|
||||
fromFirmwareId?: number // 来源的固件编号
|
||||
fromFirmwareVersion?: string // 来源的固件版本
|
||||
status?: number // 升级状态
|
||||
progress?: number // 升级进度,百分比
|
||||
description?: string // 升级进度描述
|
||||
updateTime?: Date // 更新时间
|
||||
}
|
||||
|
||||
// IoT OTA 任务记录 API
|
||||
export const IoTOtaTaskRecordApi = {
|
||||
getOtaTaskRecordStatusStatistics: async (firmwareId?: number, taskId?: number) => {
|
||||
const params: any = {}
|
||||
if (firmwareId) params.firmwareId = firmwareId
|
||||
if (taskId) params.taskId = taskId
|
||||
return await request.get({ url: `/iot/ota/task/record/get-status-statistics`, params })
|
||||
},
|
||||
|
||||
// 查询 OTA 任务记录分页
|
||||
getOtaTaskRecordPage: async (params: any) => {
|
||||
return await request.get({ url: `/iot/ota/task/record/page`, params })
|
||||
},
|
||||
|
||||
// 取消 OTA 任务记录
|
||||
cancelOtaTaskRecord: async (id: number) => {
|
||||
return await request.put({ url: `/iot/ota/task/record/cancel?id=` + id })
|
||||
}
|
||||
}
|
||||
@ -1,43 +0,0 @@
|
||||
import request from '@/config/axios'
|
||||
|
||||
// IoT 产品分类 VO
|
||||
export interface ProductCategoryVO {
|
||||
id: number // 分类 ID
|
||||
name: string // 分类名字
|
||||
sort: number // 分类排序
|
||||
status: number // 分类状态
|
||||
description: string // 分类描述
|
||||
}
|
||||
|
||||
// IoT 产品分类 API
|
||||
export const ProductCategoryApi = {
|
||||
// 查询产品分类分页
|
||||
getProductCategoryPage: async (params: any) => {
|
||||
return await request.get({ url: `/iot/product-category/page`, params })
|
||||
},
|
||||
|
||||
// 查询产品分类详情
|
||||
getProductCategory: async (id: number) => {
|
||||
return await request.get({ url: `/iot/product-category/get?id=` + id })
|
||||
},
|
||||
|
||||
// 新增产品分类
|
||||
createProductCategory: async (data: ProductCategoryVO) => {
|
||||
return await request.post({ url: `/iot/product-category/create`, data })
|
||||
},
|
||||
|
||||
// 修改产品分类
|
||||
updateProductCategory: async (data: ProductCategoryVO) => {
|
||||
return await request.put({ url: `/iot/product-category/update`, data })
|
||||
},
|
||||
|
||||
// 删除产品分类
|
||||
deleteProductCategory: async (id: number) => {
|
||||
return await request.delete({ url: `/iot/product-category/delete?id=` + id })
|
||||
},
|
||||
|
||||
/** 获取产品分类精简列表 */
|
||||
getSimpleProductCategoryList: () => {
|
||||
return request.get({ url: '/iot/product-category/simple-list' })
|
||||
}
|
||||
}
|
||||
@ -7,36 +7,17 @@ export interface ProductVO {
|
||||
productKey: string // 产品标识
|
||||
protocolId: number // 协议编号
|
||||
categoryId: number // 产品所属品类标识符
|
||||
categoryName?: string // 产品所属品类名称
|
||||
icon: string // 产品图标
|
||||
picUrl: string // 产品图片
|
||||
description: string // 产品描述
|
||||
validateType: number // 数据校验级别
|
||||
status: number // 产品状态
|
||||
deviceType: number // 设备类型
|
||||
locationType: number // 设备类型
|
||||
netType: number // 联网方式
|
||||
codecType: string // 数据格式(编解码器类型)
|
||||
protocolType: number // 接入网关协议
|
||||
dataFormat: number // 数据格式
|
||||
deviceCount: number // 设备数量
|
||||
createTime: Date // 创建时间
|
||||
}
|
||||
|
||||
// IOT 产品设备类型枚举类 0: 直连设备, 1: 网关子设备, 2: 网关设备
|
||||
export enum DeviceTypeEnum {
|
||||
DEVICE = 0, // 直连设备
|
||||
GATEWAY_SUB = 1, // 网关子设备
|
||||
GATEWAY = 2 // 网关设备
|
||||
}
|
||||
// IOT 产品定位类型枚举类 0: 手动定位, 1: IP 定位, 2: 定位模块定位
|
||||
export enum LocationTypeEnum {
|
||||
IP = 1, // IP 定位
|
||||
MODULE = 2, // 设备定位
|
||||
MANUAL = 3 // 手动定位
|
||||
}
|
||||
// IOT 数据格式(编解码器类型)枚举类
|
||||
export enum CodecTypeEnum {
|
||||
ALINK = 'Alink' // 阿里云 Alink 协议
|
||||
}
|
||||
|
||||
// IoT 产品 API
|
||||
export const ProductApi = {
|
||||
// 查询产品分页
|
||||
@ -76,11 +57,6 @@ export const ProductApi = {
|
||||
|
||||
// 查询产品(精简)列表
|
||||
getSimpleProductList() {
|
||||
return request.get({ url: '/iot/product/simple-list' })
|
||||
},
|
||||
|
||||
// 根据 ProductKey 获取产品信息
|
||||
getProductByKey: async (productKey: string) => {
|
||||
return await request.get({ url: `/iot/product/get-by-key`, params: { productKey } })
|
||||
return request.get({ url: '/iot/product/list-all-simple' })
|
||||
}
|
||||
}
|
||||
@ -1,39 +0,0 @@
|
||||
import request from '@/config/axios'
|
||||
|
||||
/** IoT 数据流转规则信息 */
|
||||
export interface DataRule {
|
||||
id: number // 场景编号
|
||||
name?: string // 场景名称
|
||||
description: string // 场景描述
|
||||
status?: number // 场景状态
|
||||
sourceConfigs?: any[] // 数据源配置数组
|
||||
sinkIds?: number[] // 数据目的编号数组
|
||||
}
|
||||
|
||||
// IoT 数据流转规则 API
|
||||
export const DataRuleApi = {
|
||||
// 查询数据流转规则分页
|
||||
getDataRulePage: async (params: any) => {
|
||||
return await request.get({ url: `/iot/data-rule/page`, params })
|
||||
},
|
||||
|
||||
// 查询数据流转规则详情
|
||||
getDataRule: async (id: number) => {
|
||||
return await request.get({ url: `/iot/data-rule/get?id=` + id })
|
||||
},
|
||||
|
||||
// 新增数据流转规则
|
||||
createDataRule: async (data: DataRule) => {
|
||||
return await request.post({ url: `/iot/data-rule/create`, data })
|
||||
},
|
||||
|
||||
// 修改数据流转规则
|
||||
updateDataRule: async (data: DataRule) => {
|
||||
return await request.put({ url: `/iot/data-rule/update`, data })
|
||||
},
|
||||
|
||||
// 删除数据流转规则
|
||||
deleteDataRule: async (id: number) => {
|
||||
return await request.delete({ url: `/iot/data-rule/delete?id=` + id })
|
||||
}
|
||||
}
|
||||
@ -1,126 +0,0 @@
|
||||
import request from '@/config/axios'
|
||||
|
||||
// IoT 数据流转目的 VO
|
||||
export interface DataSinkVO {
|
||||
id?: number // 桥梁编号
|
||||
name?: string // 桥梁名称
|
||||
description?: string // 桥梁描述
|
||||
status?: number // 桥梁状态
|
||||
direction?: number // 桥梁方向
|
||||
type?: number // 桥梁类型
|
||||
config?:
|
||||
| HttpConfig
|
||||
| MqttConfig
|
||||
| RocketMQConfig
|
||||
| KafkaMQConfig
|
||||
| RabbitMQConfig
|
||||
| RedisStreamMQConfig // 桥梁配置
|
||||
}
|
||||
|
||||
interface Config {
|
||||
type: string
|
||||
}
|
||||
|
||||
/** HTTP 配置 */
|
||||
export interface HttpConfig extends Config {
|
||||
url: string
|
||||
method: string
|
||||
headers: Record<string, string>
|
||||
query: Record<string, string>
|
||||
body: string
|
||||
}
|
||||
|
||||
/** MQTT 配置 */
|
||||
export interface MqttConfig extends Config {
|
||||
url: string
|
||||
username: string
|
||||
password: string
|
||||
clientId: string
|
||||
topic: string
|
||||
}
|
||||
|
||||
/** RocketMQ 配置 */
|
||||
export interface RocketMQConfig extends Config {
|
||||
nameServer: string
|
||||
accessKey: string
|
||||
secretKey: string
|
||||
group: string
|
||||
topic: string
|
||||
tags: string
|
||||
}
|
||||
|
||||
/** Kafka 配置 */
|
||||
export interface KafkaMQConfig extends Config {
|
||||
bootstrapServers: string
|
||||
username: string
|
||||
password: string
|
||||
ssl: boolean
|
||||
topic: string
|
||||
}
|
||||
|
||||
/** RabbitMQ 配置 */
|
||||
export interface RabbitMQConfig extends Config {
|
||||
host: string
|
||||
port: number
|
||||
virtualHost: string
|
||||
username: string
|
||||
password: string
|
||||
exchange: string
|
||||
routingKey: string
|
||||
queue: string
|
||||
}
|
||||
|
||||
/** Redis Stream MQ 配置 */
|
||||
export interface RedisStreamMQConfig extends Config {
|
||||
host: string
|
||||
port: number
|
||||
password: string
|
||||
database: number
|
||||
topic: string
|
||||
}
|
||||
|
||||
/** 数据流转目的类型 */
|
||||
export const IotDataSinkTypeEnum = {
|
||||
HTTP: 1,
|
||||
TCP: 2,
|
||||
WEBSOCKET: 3,
|
||||
MQTT: 10,
|
||||
DATABASE: 20,
|
||||
REDIS_STREAM: 21,
|
||||
ROCKETMQ: 30,
|
||||
RABBITMQ: 31,
|
||||
KAFKA: 32
|
||||
} as const
|
||||
|
||||
// 数据流转目的 API
|
||||
export const DataSinkApi = {
|
||||
// 查询数据流转目的分页
|
||||
getDataSinkPage: async (params: any) => {
|
||||
return await request.get({ url: `/iot/data-sink/page`, params })
|
||||
},
|
||||
|
||||
// 查询数据流转目的详情
|
||||
getDataSink: async (id: number) => {
|
||||
return await request.get({ url: `/iot/data-sink/get?id=` + id })
|
||||
},
|
||||
|
||||
// 新增数据流转目的
|
||||
createDataSink: async (data: DataSinkVO) => {
|
||||
return await request.post({ url: `/iot/data-sink/create`, data })
|
||||
},
|
||||
|
||||
// 修改数据流转目的
|
||||
updateDataSink: async (data: DataSinkVO) => {
|
||||
return await request.put({ url: `/iot/data-sink/update`, data })
|
||||
},
|
||||
|
||||
// 删除数据流转目的
|
||||
deleteDataSink: async (id: number) => {
|
||||
return await request.delete({ url: `/iot/data-sink/delete?id=` + id })
|
||||
},
|
||||
|
||||
// 查询数据流转目的(精简)列表
|
||||
getDataSinkSimpleList() {
|
||||
return request.get({ url: '/iot/data-sink/simple-list' })
|
||||
}
|
||||
}
|
||||
@ -1,87 +0,0 @@
|
||||
import request from '@/config/axios'
|
||||
|
||||
// 场景联动
|
||||
export interface IotSceneRule {
|
||||
id?: number // 场景编号
|
||||
name: string // 场景名称
|
||||
description?: string // 场景描述
|
||||
status: number // 场景状态:0-开启,1-关闭
|
||||
triggers: Trigger[] // 触发器数组
|
||||
actions: Action[] // 执行器数组
|
||||
}
|
||||
|
||||
// 触发器结构
|
||||
export interface Trigger {
|
||||
type: number // 触发类型
|
||||
productId?: number // 产品编号
|
||||
deviceId?: number // 设备编号
|
||||
identifier?: string // 物模型标识符
|
||||
operator?: string // 操作符
|
||||
value?: string // 参数值
|
||||
cronExpression?: string // CRON 表达式
|
||||
conditionGroups?: TriggerCondition[][] // 条件组(二维数组)
|
||||
}
|
||||
|
||||
// 触发条件结构
|
||||
export interface TriggerCondition {
|
||||
type: number // 条件类型:1-设备状态,2-设备属性,3-当前时间
|
||||
productId?: number // 产品编号
|
||||
deviceId?: number // 设备编号
|
||||
identifier?: string // 标识符
|
||||
operator: string // 操作符
|
||||
param: string // 参数
|
||||
}
|
||||
|
||||
// 执行器结构
|
||||
export interface Action {
|
||||
type: number // 执行类型
|
||||
productId?: number // 产品编号
|
||||
deviceId?: number // 设备编号
|
||||
identifier?: string // 物模型标识符(服务调用时使用)
|
||||
params?: string // 请求参数
|
||||
alertConfigId?: number // 告警配置编号
|
||||
}
|
||||
|
||||
// IoT 场景联动 API
|
||||
export const RuleSceneApi = {
|
||||
// 查询场景联动分页
|
||||
getRuleScenePage: async (params: any) => {
|
||||
return await request.get({ url: `/iot/scene-rule/page`, params })
|
||||
},
|
||||
|
||||
// 查询场景联动详情
|
||||
getRuleScene: async (id: number) => {
|
||||
return await request.get({ url: `/iot/scene-rule/get?id=` + id })
|
||||
},
|
||||
|
||||
// 新增场景联动
|
||||
createRuleScene: async (data: IotSceneRule) => {
|
||||
return await request.post({ url: `/iot/scene-rule/create`, data })
|
||||
},
|
||||
|
||||
// 修改场景联动
|
||||
updateRuleScene: async (data: IotSceneRule) => {
|
||||
return await request.put({ url: `/iot/scene-rule/update`, data })
|
||||
},
|
||||
|
||||
// 修改场景联动
|
||||
updateRuleSceneStatus: async (id: number, status: number) => {
|
||||
return await request.put({
|
||||
url: `/iot/scene-rule/update-status`,
|
||||
data: {
|
||||
id,
|
||||
status
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
// 删除场景联动
|
||||
deleteRuleScene: async (id: number) => {
|
||||
return await request.delete({ url: `/iot/scene-rule/delete?id=` + id })
|
||||
},
|
||||
|
||||
// 获取场景联动简单列表
|
||||
getSimpleRuleSceneList: async () => {
|
||||
return await request.get({ url: `/iot/scene-rule/simple-list` })
|
||||
}
|
||||
}
|
||||
@ -1,60 +0,0 @@
|
||||
import request from '@/config/axios'
|
||||
|
||||
/** IoT 统计数据类型 */
|
||||
export interface IotStatisticsSummaryRespVO {
|
||||
productCategoryCount: number
|
||||
productCount: number
|
||||
deviceCount: number
|
||||
deviceMessageCount: number
|
||||
productCategoryTodayCount: number
|
||||
productTodayCount: number
|
||||
deviceTodayCount: number
|
||||
deviceMessageTodayCount: number
|
||||
deviceOnlineCount: number
|
||||
deviceOfflineCount: number
|
||||
deviceInactiveCount: number
|
||||
productCategoryDeviceCounts: Record<string, number>
|
||||
}
|
||||
|
||||
/** 时间戳-数值的键值对类型 */
|
||||
interface TimeValueItem {
|
||||
[key: string]: number
|
||||
}
|
||||
|
||||
/** IoT 消息统计数据类型 */
|
||||
export interface IotStatisticsDeviceMessageSummaryRespVO {
|
||||
statType: number
|
||||
upstreamCounts: TimeValueItem[]
|
||||
downstreamCounts: TimeValueItem[]
|
||||
}
|
||||
|
||||
/** 新的消息统计数据项 */
|
||||
export interface IotStatisticsDeviceMessageSummaryByDateRespVO {
|
||||
time: string
|
||||
upstreamCount: number
|
||||
downstreamCount: number
|
||||
}
|
||||
|
||||
/** 新的消息统计接口参数 */
|
||||
export interface IotStatisticsDeviceMessageReqVO {
|
||||
interval: number
|
||||
times?: string[]
|
||||
}
|
||||
|
||||
// IoT 数据统计 API
|
||||
export const StatisticsApi = {
|
||||
// 查询全局的数据统计
|
||||
getStatisticsSummary: async () => {
|
||||
return await request.get<IotStatisticsSummaryRespVO>({
|
||||
url: `/iot/statistics/get-summary`
|
||||
})
|
||||
},
|
||||
|
||||
// 获取设备消息的数据统计
|
||||
getDeviceMessageSummaryByDate: async (params: IotStatisticsDeviceMessageReqVO) => {
|
||||
return await request.get<IotStatisticsDeviceMessageSummaryByDateRespVO[]>({
|
||||
url: `/iot/statistics/get-device-message-summary-by-date`,
|
||||
params
|
||||
})
|
||||
}
|
||||
}
|
||||
@ -1,301 +0,0 @@
|
||||
import request from '@/config/axios'
|
||||
import { isEmpty } from '@/utils/is'
|
||||
|
||||
/**
|
||||
* IoT 产品物模型
|
||||
*/
|
||||
export interface ThingModelData {
|
||||
id?: number // 物模型功能编号
|
||||
identifier?: string // 功能标识
|
||||
name?: string // 功能名称
|
||||
description?: string // 功能描述
|
||||
productId?: number // 产品编号
|
||||
productKey?: string // 产品标识
|
||||
dataType: string // 数据类型,与 dataSpecs 的 dataType 保持一致
|
||||
type: number // 功能类型
|
||||
property: ThingModelProperty // 属性
|
||||
event?: ThingModelEvent // 事件
|
||||
service?: ThingModelService // 服务
|
||||
}
|
||||
|
||||
/**
|
||||
* ThingModelProperty 类型
|
||||
*/
|
||||
export interface ThingModelProperty {
|
||||
[key: string]: any
|
||||
}
|
||||
|
||||
/**
|
||||
* ThingModelEvent 类型
|
||||
*/
|
||||
export interface ThingModelEvent {
|
||||
[key: string]: any
|
||||
}
|
||||
|
||||
/**
|
||||
* ThingModelService 类型
|
||||
*/
|
||||
export interface ThingModelService {
|
||||
[key: string]: any
|
||||
}
|
||||
|
||||
/** dataSpecs 数值型数据结构 */
|
||||
export interface DataSpecsNumberData {
|
||||
dataType: 'int' | 'float' | 'double' // 数据类型,取值为 INT、FLOAT 或 DOUBLE
|
||||
max: string // 最大值,必须与 dataType 设置一致,且为 STRING 类型
|
||||
min: string // 最小值,必须与 dataType 设置一致,且为 STRING 类型
|
||||
step: string // 步长,必须与 dataType 设置一致,且为 STRING 类型
|
||||
precise?: string // 精度,当 dataType 为 FLOAT 或 DOUBLE 时可选
|
||||
defaultValue?: string // 默认值,可选
|
||||
unit: string // 单位的符号
|
||||
unitName: string // 单位的名称
|
||||
}
|
||||
|
||||
/** dataSpecs 枚举型数据结构 */
|
||||
export interface DataSpecsEnumOrBoolData {
|
||||
dataType: 'enum' | 'bool'
|
||||
defaultValue?: string // 默认值,可选
|
||||
name: string // 枚举项的名称
|
||||
value: number | undefined // 枚举值
|
||||
}
|
||||
|
||||
/** 物模型TSL响应数据结构 */
|
||||
export interface IotThingModelTSLResp {
|
||||
productId: number
|
||||
productKey: string
|
||||
properties: ThingModelProperty[]
|
||||
events: ThingModelEvent[]
|
||||
services: ThingModelService[]
|
||||
}
|
||||
|
||||
/** 物模型属性 */
|
||||
export interface ThingModelProperty {
|
||||
identifier: string
|
||||
name: string
|
||||
accessMode: string
|
||||
required?: boolean
|
||||
dataType: string
|
||||
description?: string
|
||||
dataSpecs?: ThingModelProperty
|
||||
dataSpecsList?: ThingModelProperty[]
|
||||
}
|
||||
|
||||
/** 物模型事件 */
|
||||
export interface ThingModelEvent {
|
||||
identifier: string
|
||||
name: string
|
||||
required?: boolean
|
||||
type: string
|
||||
description?: string
|
||||
outputParams?: ThingModelParam[]
|
||||
method?: string
|
||||
}
|
||||
|
||||
/** 物模型服务 */
|
||||
export interface ThingModelService {
|
||||
identifier: string
|
||||
name: string
|
||||
required?: boolean
|
||||
callType: string
|
||||
description?: string
|
||||
inputParams?: ThingModelParam[]
|
||||
outputParams?: ThingModelParam[]
|
||||
method?: string
|
||||
}
|
||||
|
||||
/** 物模型参数 */
|
||||
export interface ThingModelParam {
|
||||
identifier: string
|
||||
name: string
|
||||
direction: string
|
||||
paraOrder?: number
|
||||
dataType: string
|
||||
dataSpecs?: ThingModelProperty
|
||||
dataSpecsList?: ThingModelProperty[]
|
||||
}
|
||||
|
||||
/** 数值型数据规范 */
|
||||
export interface ThingModelNumericDataSpec {
|
||||
dataType: 'int' | 'float' | 'double'
|
||||
max: string
|
||||
min: string
|
||||
step: string
|
||||
precise?: string
|
||||
defaultValue?: string
|
||||
unit?: string
|
||||
unitName?: string
|
||||
}
|
||||
|
||||
/** 布尔/枚举型数据规范 */
|
||||
export interface ThingModelBoolOrEnumDataSpecs {
|
||||
dataType: 'bool' | 'enum'
|
||||
name: string
|
||||
value: number
|
||||
}
|
||||
|
||||
/** 文本/时间型数据规范 */
|
||||
export interface ThingModelDateOrTextDataSpecs {
|
||||
dataType: 'text' | 'date'
|
||||
length?: number
|
||||
defaultValue?: string
|
||||
}
|
||||
|
||||
/** 数组型数据规范 */
|
||||
export interface ThingModelArrayDataSpecs {
|
||||
dataType: 'array'
|
||||
size: number
|
||||
childDataType: string
|
||||
dataSpecsList?: ThingModelProperty[]
|
||||
}
|
||||
|
||||
/** 结构体型数据规范 */
|
||||
export interface ThingModelStructDataSpecs {
|
||||
dataType: 'struct'
|
||||
identifier: string
|
||||
name: string
|
||||
accessMode: string
|
||||
required?: boolean
|
||||
childDataType: string
|
||||
dataSpecs?: ThingModelProperty
|
||||
dataSpecsList?: ThingModelProperty[]
|
||||
}
|
||||
|
||||
// IoT 产品物模型 API
|
||||
export const ThingModelApi = {
|
||||
// 查询产品物模型分页
|
||||
getThingModelPage: async (params: any) => {
|
||||
return await request.get({ url: `/iot/thing-model/page`, params })
|
||||
},
|
||||
|
||||
// 获得产品物模型列表
|
||||
getThingModelList: async (params: any) => {
|
||||
return await request.get({ url: `/iot/thing-model/list`, params })
|
||||
},
|
||||
|
||||
// 获得产品物模型 TSL
|
||||
getThingModelTSLByProductId: async (productId: number) => {
|
||||
return await request.get({
|
||||
url: `/iot/thing-model/get-tsl?productId=${productId}`
|
||||
})
|
||||
},
|
||||
|
||||
// 查询产品物模型详情
|
||||
getThingModel: async (id: number) => {
|
||||
return await request.get({ url: `/iot/thing-model/get?id=` + id })
|
||||
},
|
||||
|
||||
// 新增产品物模型
|
||||
createThingModel: async (data: ThingModelData) => {
|
||||
return await request.post({ url: `/iot/thing-model/create`, data })
|
||||
},
|
||||
|
||||
// 修改产品物模型
|
||||
updateThingModel: async (data: ThingModelData) => {
|
||||
return await request.put({ url: `/iot/thing-model/update`, data })
|
||||
},
|
||||
|
||||
// 删除产品物模型
|
||||
deleteThingModel: async (id: number) => {
|
||||
return await request.delete({ url: `/iot/thing-model/delete?id=` + id })
|
||||
}
|
||||
}
|
||||
|
||||
/** 公共校验规则 */
|
||||
export const ThingModelFormRules = {
|
||||
name: [
|
||||
{ required: true, message: '功能名称不能为空', trigger: 'blur' },
|
||||
{
|
||||
pattern: /^[\u4e00-\u9fa5a-zA-Z0-9][\u4e00-\u9fa5a-zA-Z0-9\-_/\.]{0,29}$/,
|
||||
message:
|
||||
'支持中文、大小写字母、日文、数字、短划线、下划线、斜杠和小数点,必须以中文、英文或数字开头,不超过 30 个字符',
|
||||
trigger: 'blur'
|
||||
}
|
||||
],
|
||||
type: [{ required: true, message: '功能类型不能为空', trigger: 'blur' }],
|
||||
identifier: [
|
||||
{ required: true, message: '标识符不能为空', trigger: 'blur' },
|
||||
{
|
||||
pattern: /^[a-zA-Z0-9_]{1,50}$/,
|
||||
message: '支持大小写字母、数字和下划线,不超过 50 个字符',
|
||||
trigger: 'blur'
|
||||
},
|
||||
{
|
||||
validator: (_: any, value: string, callback: any) => {
|
||||
const reservedKeywords = ['set', 'get', 'post', 'property', 'event', 'time', 'value']
|
||||
if (reservedKeywords.includes(value)) {
|
||||
callback(
|
||||
new Error(
|
||||
'set, get, post, property, event, time, value 是系统保留字段,不能用于标识符定义'
|
||||
)
|
||||
)
|
||||
} else if (/^\d+$/.test(value)) {
|
||||
callback(new Error('标识符不能是纯数字'))
|
||||
} else {
|
||||
callback()
|
||||
}
|
||||
},
|
||||
trigger: 'blur'
|
||||
}
|
||||
],
|
||||
'property.dataSpecs.childDataType': [{ required: true, message: '元素类型不能为空' }],
|
||||
'property.dataSpecs.size': [
|
||||
{ required: true, message: '元素个数不能为空' },
|
||||
{
|
||||
validator: (_: any, value: any, callback: any) => {
|
||||
if (isEmpty(value)) {
|
||||
callback(new Error('元素个数不能为空'))
|
||||
return
|
||||
}
|
||||
if (isNaN(Number(value))) {
|
||||
callback(new Error('元素个数必须是数字'))
|
||||
return
|
||||
}
|
||||
callback()
|
||||
},
|
||||
trigger: 'blur'
|
||||
}
|
||||
],
|
||||
'property.dataSpecs.length': [
|
||||
{ required: true, message: '请输入文本字节长度', trigger: 'blur' },
|
||||
{
|
||||
validator: (_: any, value: any, callback: any) => {
|
||||
if (isEmpty(value)) {
|
||||
callback(new Error('文本长度不能为空'))
|
||||
return
|
||||
}
|
||||
if (isNaN(Number(value))) {
|
||||
callback(new Error('文本长度必须是数字'))
|
||||
return
|
||||
}
|
||||
callback()
|
||||
},
|
||||
trigger: 'blur'
|
||||
}
|
||||
],
|
||||
'property.accessMode': [{ required: true, message: '请选择读写类型', trigger: 'change' }]
|
||||
}
|
||||
|
||||
/** 校验布尔值名称 */
|
||||
export const validateBoolName = (_: any, value: string, callback: any) => {
|
||||
if (isEmpty(value)) {
|
||||
callback(new Error('布尔值名称不能为空'))
|
||||
return
|
||||
}
|
||||
// 检查开头字符
|
||||
if (!/^[\u4e00-\u9fa5a-zA-Z0-9]/.test(value)) {
|
||||
callback(new Error('布尔值名称必须以中文、英文字母或数字开头'))
|
||||
return
|
||||
}
|
||||
// 检查整体格式
|
||||
if (!/^[\u4e00-\u9fa5a-zA-Z0-9][a-zA-Z0-9\u4e00-\u9fa5_-]*$/.test(value)) {
|
||||
callback(new Error('布尔值名称只能包含中文、英文字母、数字、下划线和短划线'))
|
||||
return
|
||||
}
|
||||
// 检查长度(一个中文算一个字符)
|
||||
if (value.length > 20) {
|
||||
callback(new Error('布尔值名称长度不能超过 20 个字符'))
|
||||
return
|
||||
}
|
||||
|
||||
callback()
|
||||
}
|
||||
55
src/api/iot/thinkmodelfunction/index.ts
Normal file
@ -0,0 +1,55 @@
|
||||
import request from '@/config/axios'
|
||||
|
||||
// IoT 产品物模型 VO
|
||||
export interface ThinkModelFunctionVO {
|
||||
id: number // 物模型功能编号
|
||||
identifier: string // 功能标识
|
||||
name: string // 功能名称
|
||||
description: string // 功能描述
|
||||
productId: number // 产品编号
|
||||
productKey: string // 产品标识
|
||||
type: number // 功能类型
|
||||
property: string // 属性
|
||||
event: string // 事件
|
||||
service: string // 服务
|
||||
}
|
||||
|
||||
// IoT 产品物模型 API
|
||||
export const ThinkModelFunctionApi = {
|
||||
// 查询产品物模型分页
|
||||
getThinkModelFunctionPage: async (params: any) => {
|
||||
return await request.get({ url: `/iot/think-model-function/page`, params })
|
||||
},
|
||||
// 获得产品物模型
|
||||
getThinkModelFunctionListByProductId: async (params: any) => {
|
||||
return await request.get({
|
||||
url: `/iot/think-model-function/list-by-product-id`,
|
||||
params
|
||||
})
|
||||
},
|
||||
|
||||
// 查询产品物模型详情
|
||||
getThinkModelFunction: async (id: number) => {
|
||||
return await request.get({ url: `/iot/think-model-function/get?id=` + id })
|
||||
},
|
||||
|
||||
// 新增产品物模型
|
||||
createThinkModelFunction: async (data: ThinkModelFunctionVO) => {
|
||||
return await request.post({ url: `/iot/think-model-function/create`, data })
|
||||
},
|
||||
|
||||
// 修改产品物模型
|
||||
updateThinkModelFunction: async (data: ThinkModelFunctionVO) => {
|
||||
return await request.put({ url: `/iot/think-model-function/update`, data })
|
||||
},
|
||||
|
||||
// 删除产品物模型
|
||||
deleteThinkModelFunction: async (id: number) => {
|
||||
return await request.delete({ url: `/iot/think-model-function/delete?id=` + id })
|
||||
},
|
||||
|
||||
// 导出产品物模型 Excel
|
||||
exportThinkModelFunction: async (params) => {
|
||||
return await request.download({ url: `/iot/think-model-function/export-excel`, params })
|
||||
}
|
||||
}
|
||||
@ -1,4 +1,5 @@
|
||||
import request from '@/config/axios'
|
||||
import { getRefreshToken } from '@/utils/auth'
|
||||
import type { RegisterVO, UserLoginVO } from './types'
|
||||
|
||||
export interface SmsCodeVO {
|
||||
@ -13,13 +14,7 @@ export interface SmsLoginVO {
|
||||
|
||||
// 登录
|
||||
export const login = (data: UserLoginVO) => {
|
||||
return request.post({
|
||||
url: '/system/auth/login',
|
||||
data,
|
||||
headers: {
|
||||
isEncrypt: false
|
||||
}
|
||||
})
|
||||
return request.post({ url: '/system/auth/login', data })
|
||||
}
|
||||
|
||||
// 注册
|
||||
@ -77,6 +72,7 @@ export const socialAuthRedirect = (type: number, redirectUri: string) => {
|
||||
}
|
||||
// 获取验证图片以及 token
|
||||
export const getCode = (data: any) => {
|
||||
debugger
|
||||
return request.postOriginal({ url: 'system/captcha/get', data })
|
||||
}
|
||||
|
||||
|
||||
@ -101,8 +101,8 @@ export const deleteSpu = (id: number) => {
|
||||
}
|
||||
|
||||
// 导出商品 Spu Excel
|
||||
export const exportSpu = async (params: any) => {
|
||||
return await request.download({ url: '/product/spu/export-excel', params })
|
||||
export const exportSpu = async (params) => {
|
||||
return await request.download({ url: '/product/spu/export', params })
|
||||
}
|
||||
|
||||
// 获得商品 SPU 精简列表
|
||||
|
||||
@ -7,19 +7,15 @@ export interface BrokerageWithdrawVO {
|
||||
feePrice: number
|
||||
totalPrice: number
|
||||
type: number
|
||||
userName: string
|
||||
userAccount: string
|
||||
name: string
|
||||
accountNo: string
|
||||
bankName: string
|
||||
bankAddress: string
|
||||
qrCodeUrl: string
|
||||
accountQrCodeUrl: string
|
||||
status: number
|
||||
auditReason: string
|
||||
auditTime: Date
|
||||
remark: string
|
||||
payTransferId?: number
|
||||
transferChannelCode?: string
|
||||
transferTime?: Date
|
||||
transferErrorMsg?: string
|
||||
}
|
||||
|
||||
// 查询佣金提现列表
|
||||
|
||||
@ -13,6 +13,13 @@ export function createDemoOrder(data: DemoOrderVO) {
|
||||
})
|
||||
}
|
||||
|
||||
// 获得示例订单
|
||||
export function getDemoOrder(id: number) {
|
||||
return request.get({
|
||||
url: '/pay/demo-order/get?id=' + id
|
||||
})
|
||||
}
|
||||
|
||||
// 获得示例订单分页
|
||||
export function getDemoOrderPage(query: PageParam) {
|
||||
return request.get({
|
||||
@ -22,7 +29,7 @@ export function getDemoOrderPage(query: PageParam) {
|
||||
}
|
||||
|
||||
// 退款示例订单
|
||||
export function refundDemoOrder(id: number) {
|
||||
export function refundDemoOrder(id) {
|
||||
return request.put({
|
||||
url: '/pay/demo-order/refund?id=' + id
|
||||
})
|
||||
25
src/api/pay/demo/transfer/index.ts
Normal file
@ -0,0 +1,25 @@
|
||||
import request from '@/config/axios'
|
||||
|
||||
export interface DemoTransferVO {
|
||||
price: number
|
||||
type: number
|
||||
userName: string
|
||||
alipayLogonId: string
|
||||
openid: string
|
||||
}
|
||||
|
||||
// 创建示例转账单
|
||||
export function createDemoTransfer(data: DemoTransferVO) {
|
||||
return request.post({
|
||||
url: '/pay/demo-transfer/create',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 获得示例订单分页
|
||||
export function getDemoTransferPage(query: PageParam) {
|
||||
return request.get({
|
||||
url: '/pay/demo-transfer/page',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
@ -1,30 +0,0 @@
|
||||
import request from '@/config/axios'
|
||||
|
||||
export interface PayDemoWithdrawVO {
|
||||
id?: number
|
||||
subject: string
|
||||
price: number
|
||||
userName: string
|
||||
userAccount: string
|
||||
type: number
|
||||
status?: number
|
||||
payTransferId?: number
|
||||
transferChannelCode?: string
|
||||
transferTime?: Date
|
||||
transferErrorMsg?: string
|
||||
}
|
||||
|
||||
// 查询示例提现单列表
|
||||
export const getDemoWithdrawPage = (params: PageParam) => {
|
||||
return request.get({ url: '/pay/demo-withdraw/page', params })
|
||||
}
|
||||
|
||||
// 创建示例提现单
|
||||
export const createDemoWithdraw = (data: PayDemoWithdrawVO) => {
|
||||
return request.post({ url: '/pay/demo-withdraw/create', data })
|
||||
}
|
||||
|
||||
// 发起提现单转账
|
||||
export const transferDemoWithdraw = (id: number) => {
|
||||
return request.post({ url: '/pay/demo-withdraw/transfer', params: { id } })
|
||||
}
|
||||
@ -1,16 +1,27 @@
|
||||
import request from '@/config/axios'
|
||||
|
||||
export interface TransferVO {
|
||||
appId: number
|
||||
channelCode: string
|
||||
merchantTransferId: string
|
||||
type: number
|
||||
price: number
|
||||
subject: string
|
||||
userName: string
|
||||
alipayLogonId: string
|
||||
openid: string
|
||||
}
|
||||
|
||||
// 新增转账单
|
||||
export const createTransfer = async (data: TransferVO) => {
|
||||
return await request.post({ url: `/pay/transfer/create`, data })
|
||||
}
|
||||
|
||||
// 查询转账单列表
|
||||
export const getTransferPage = async (params: PageParam) => {
|
||||
export const getTransferPage = async (params) => {
|
||||
return await request.get({ url: `/pay/transfer/page`, params })
|
||||
}
|
||||
|
||||
// 查询转账单详情
|
||||
export const getTransfer = async (id: number) => {
|
||||
return await request.get({ url: '/pay/transfer/get?id=' + id })
|
||||
}
|
||||
|
||||
// 导出转账单
|
||||
export const exportTransfer = async (params: PageParam) => {
|
||||
return await request.download({ url: '/pay/transfer/export-excel', params })
|
||||
}
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
import request from '@/config/axios'
|
||||
|
||||
export interface DeptVO {
|
||||
id: number
|
||||
id?: number
|
||||
name: string
|
||||
parentId: number
|
||||
status: number
|
||||
@ -13,41 +13,31 @@ export interface DeptVO {
|
||||
}
|
||||
|
||||
// 查询部门(精简)列表
|
||||
export const getSimpleDeptList = (): Promise<DeptVO[]> => {
|
||||
return request.get({ url: '/system/dept/simple-list' })
|
||||
export const getSimpleDeptList = async (): Promise<DeptVO[]> => {
|
||||
return await request.get({ url: '/system/dept/simple-list' })
|
||||
}
|
||||
|
||||
// 查询部门列表
|
||||
export const getDeptList = (params: any) => {
|
||||
return request.get({ url: '/system/dept/list', params })
|
||||
}
|
||||
|
||||
// 查询部门分页
|
||||
export const getDeptPage = async (params: PageParam) => {
|
||||
return await request.get({ url: '/system/dept/list', params })
|
||||
}
|
||||
|
||||
// 查询部门详情
|
||||
export const getDept = (id: number) => {
|
||||
return request.get({ url: '/system/dept/get?id=' + id })
|
||||
export const getDept = async (id: number) => {
|
||||
return await request.get({ url: '/system/dept/get?id=' + id })
|
||||
}
|
||||
|
||||
// 新增部门
|
||||
export const createDept = (data: DeptVO) => {
|
||||
return request.post({ url: '/system/dept/create', data })
|
||||
export const createDept = async (data: DeptVO) => {
|
||||
return await request.post({ url: '/system/dept/create', data: data })
|
||||
}
|
||||
|
||||
// 修改部门
|
||||
export const updateDept = (data: DeptVO) => {
|
||||
return request.put({ url: '/system/dept/update', data })
|
||||
export const updateDept = async (params: DeptVO) => {
|
||||
return await request.put({ url: '/system/dept/update', data: params })
|
||||
}
|
||||
|
||||
// 删除部门
|
||||
export const deleteDept = async (id: number) => {
|
||||
return await request.delete({ url: '/system/dept/delete?id=' + id })
|
||||
}
|
||||
|
||||
// 批量删除部门
|
||||
export const deleteDeptList = async (ids: number[]) => {
|
||||
return await request.delete({ url: '/system/dept/delete-list', params: { ids: ids.join(',') } })
|
||||
}
|
||||
|
||||
@ -1,8 +1,8 @@
|
||||
import request from '@/config/axios'
|
||||
|
||||
export interface DictDataVO {
|
||||
id: number
|
||||
sort: number
|
||||
export type DictDataVO = {
|
||||
id: number | undefined
|
||||
sort: number | undefined
|
||||
label: string
|
||||
value: string
|
||||
dictType: string
|
||||
@ -28,11 +28,6 @@ export const getDictData = (id: number) => {
|
||||
return request.get({ url: '/system/dict-data/get?id=' + id })
|
||||
}
|
||||
|
||||
// 根据字典类型查询字典数据
|
||||
export const getDictDataByType = (dictType: string) => {
|
||||
return request.get({ url: '/system/dict-data/type?type=' + dictType })
|
||||
}
|
||||
|
||||
// 新增字典数据
|
||||
export const createDictData = (data: DictDataVO) => {
|
||||
return request.post({ url: '/system/dict-data/create', data })
|
||||
@ -48,12 +43,7 @@ export const deleteDictData = (id: number) => {
|
||||
return request.delete({ url: '/system/dict-data/delete?id=' + id })
|
||||
}
|
||||
|
||||
// 批量删除字典数据
|
||||
export const deleteDictDataList = (ids: number[]) => {
|
||||
return request.delete({ url: '/system/dict-data/delete-list', params: { ids: ids.join(',') } })
|
||||
}
|
||||
|
||||
// 导出字典数据
|
||||
export const exportDictData = (params: any) => {
|
||||
return request.download({ url: '/system/dict-data/export-excel', params })
|
||||
// 导出字典类型数据
|
||||
export const exportDictData = (params) => {
|
||||
return request.download({ url: '/system/dict-data/export', params })
|
||||
}
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
import request from '@/config/axios'
|
||||
|
||||
export interface DictTypeVO {
|
||||
id: number
|
||||
export type DictTypeVO = {
|
||||
id: number | undefined
|
||||
name: string
|
||||
type: string
|
||||
status: number
|
||||
@ -10,8 +10,8 @@ export interface DictTypeVO {
|
||||
}
|
||||
|
||||
// 查询字典(精简)列表
|
||||
export const getSimpleDictTypeList = (): Promise<DictTypeVO[]> => {
|
||||
return request.get({ url: '/system/dict-type/simple-list' })
|
||||
export const getSimpleDictTypeList = () => {
|
||||
return request.get({ url: '/system/dict-type/list-all-simple' })
|
||||
}
|
||||
|
||||
// 查询字典列表
|
||||
@ -38,16 +38,7 @@ export const updateDictType = (data: DictTypeVO) => {
|
||||
export const deleteDictType = (id: number) => {
|
||||
return request.delete({ url: '/system/dict-type/delete?id=' + id })
|
||||
}
|
||||
|
||||
// 批量删除字典类型
|
||||
export const deleteDictTypeList = (ids: number[]) => {
|
||||
return request.delete({ url: '/system/dict-type/delete-list', params: { ids: ids.join(',') } })
|
||||
}
|
||||
|
||||
// 导出字典
|
||||
// 导出字典类型
|
||||
export const exportDictType = (params) => {
|
||||
return request.download({
|
||||
url: '/system/dict-type/export-excel',
|
||||
params
|
||||
})
|
||||
return request.download({ url: '/system/dict-type/export', params })
|
||||
}
|
||||
|
||||
@ -21,5 +21,5 @@ export const getLoginLogPage = (params: PageParam) => {
|
||||
|
||||
// 导出登录日志
|
||||
export const exportLoginLog = (params) => {
|
||||
return request.download({ url: '/system/login-log/export-excel', params })
|
||||
return request.download({ url: '/system/login-log/export', params })
|
||||
}
|
||||
|
||||
@ -36,11 +36,6 @@ export const deleteMailAccount = async (id: number) => {
|
||||
return await request.delete({ url: '/system/mail-account/delete?id=' + id })
|
||||
}
|
||||
|
||||
// 批量删除邮箱账号
|
||||
export const deleteMailAccountList = async (ids: number[]) => {
|
||||
return await request.delete({ url: '/system/mail-account/delete-list', params: { ids: ids.join(',') } })
|
||||
}
|
||||
|
||||
// 获得邮箱账号精简列表
|
||||
export const getSimpleMailAccountList = async () => {
|
||||
return request.get({ url: '/system/mail-account/simple-list' })
|
||||
|
||||
@ -4,9 +4,7 @@ export interface MailLogVO {
|
||||
id: number
|
||||
userId: number
|
||||
userType: number
|
||||
toMails: string[]
|
||||
ccMails?: string[]
|
||||
bccMails?: string[]
|
||||
toMail: string
|
||||
accountId: number
|
||||
fromMail: string
|
||||
templateId: number
|
||||
@ -30,8 +28,3 @@ export const getMailLogPage = async (params: PageParam) => {
|
||||
export const getMailLog = async (id: number) => {
|
||||
return await request.get({ url: '/system/mail-log/get?id=' + id })
|
||||
}
|
||||
|
||||
// 导出邮件日志
|
||||
export const exportMailLog = (params) => {
|
||||
return request.download({ url: '/system/mail-log/export-excel', params })
|
||||
}
|
||||
|
||||
@ -14,9 +14,7 @@ export interface MailTemplateVO {
|
||||
}
|
||||
|
||||
export interface MailSendReqVO {
|
||||
toMails: string[]
|
||||
ccMails?: string[]
|
||||
bccMails?: string[]
|
||||
mail: string
|
||||
templateCode: string
|
||||
templateParams: Map<String, Object>
|
||||
}
|
||||
@ -46,14 +44,6 @@ export const deleteMailTemplate = async (id: number) => {
|
||||
return await request.delete({ url: '/system/mail-template/delete?id=' + id })
|
||||
}
|
||||
|
||||
// 批量删除邮件模版
|
||||
export const deleteMailTemplateList = async (ids: number[]) => {
|
||||
return await request.delete({
|
||||
url: '/system/mail-template/delete-list',
|
||||
params: { ids: ids.join(',') }
|
||||
})
|
||||
}
|
||||
|
||||
// 发送邮件
|
||||
export const sendMail = (data: MailSendReqVO) => {
|
||||
return request.post({ url: '/system/mail-template/send-mail', data })
|
||||
|
||||
@ -36,11 +36,6 @@ export const deleteNotice = (id: number) => {
|
||||
return request.delete({ url: '/system/notice/delete?id=' + id })
|
||||
}
|
||||
|
||||
// 批量删除公告
|
||||
export const deleteNoticeList = (ids: number[]) => {
|
||||
return request.delete({ url: '/system/notice/delete-list', params: { ids: ids.join(',') } })
|
||||
}
|
||||
|
||||
// 推送公告
|
||||
export const pushNotice = (id: number) => {
|
||||
return request.post({ url: '/system/notice/push?id=' + id })
|
||||
|
||||
@ -43,11 +43,6 @@ export const deleteNotifyTemplate = async (id: number) => {
|
||||
return await request.delete({ url: '/system/notify-template/delete?id=' + id })
|
||||
}
|
||||
|
||||
// 批量删除站内信模板
|
||||
export const deleteNotifyTemplateList = async (ids: number[]) => {
|
||||
return await request.delete({ url: '/system/notify-template/delete-list', params: { ids: ids.join(',') } })
|
||||
}
|
||||
|
||||
// 发送站内信
|
||||
export const sendNotify = (data: NotifySendReqVO) => {
|
||||
return request.post({ url: '/system/notify-template/send-notify', data })
|
||||
|
||||
@ -45,8 +45,3 @@ export const updateOAuth2Client = (data: OAuth2ClientVO) => {
|
||||
export const deleteOAuth2Client = (id: number) => {
|
||||
return request.delete({ url: '/system/oauth2-client/delete?id=' + id })
|
||||
}
|
||||
|
||||
// 批量删除 OAuth2 客户端
|
||||
export const deleteOAuth2ClientList = (ids: number[]) => {
|
||||
return request.delete({ url: '/system/oauth2-client/delete-list', params: { ids: ids.join(',') } })
|
||||
}
|
||||
|
||||
@ -26,5 +26,5 @@ export const getOperateLogPage = (params: PageParam) => {
|
||||
}
|
||||
// 导出操作日志
|
||||
export const exportOperateLog = (params: any) => {
|
||||
return request.download({ url: '/system/operate-log/export-excel', params })
|
||||
return request.download({ url: '/system/operate-log/export', params })
|
||||
}
|
||||
|
||||
@ -40,12 +40,7 @@ export const deletePost = async (id: number) => {
|
||||
return await request.delete({ url: '/system/post/delete?id=' + id })
|
||||
}
|
||||
|
||||
// 批量删除岗位
|
||||
export const deletePostList = async (ids: number[]) => {
|
||||
return await request.delete({ url: '/system/post/delete-list', params: { ids: ids.join(',') } })
|
||||
}
|
||||
|
||||
// 导出岗位
|
||||
export const exportPost = async (params) => {
|
||||
return await request.download({ url: '/system/post/export-excel', params })
|
||||
return await request.download({ url: '/system/post/export', params })
|
||||
}
|
||||
|
||||
@ -12,6 +12,11 @@ export interface RoleVO {
|
||||
createTime: Date
|
||||
}
|
||||
|
||||
export interface UpdateStatusReqVO {
|
||||
id: number
|
||||
status: number
|
||||
}
|
||||
|
||||
// 查询角色列表
|
||||
export const getRolePage = async (params: PageParam) => {
|
||||
return await request.get({ url: '/system/role/page', params })
|
||||
@ -37,18 +42,18 @@ export const updateRole = async (data: RoleVO) => {
|
||||
return await request.put({ url: '/system/role/update', data })
|
||||
}
|
||||
|
||||
// 修改角色状态
|
||||
export const updateRoleStatus = async (data: UpdateStatusReqVO) => {
|
||||
return await request.put({ url: '/system/role/update-status', data })
|
||||
}
|
||||
|
||||
// 删除角色
|
||||
export const deleteRole = async (id: number) => {
|
||||
return await request.delete({ url: '/system/role/delete?id=' + id })
|
||||
}
|
||||
|
||||
// 批量删除角色
|
||||
export const deleteRoleList = async (ids: number[]) => {
|
||||
return await request.delete({ url: '/system/role/delete-list', params: { ids: ids.join(',') } })
|
||||
}
|
||||
|
||||
// 导出角色
|
||||
export const exportRole = (params: any) => {
|
||||
export const exportRole = (params) => {
|
||||
return request.download({
|
||||
url: '/system/role/export-excel',
|
||||
params
|
||||
|
||||
@ -41,8 +41,3 @@ export const updateSmsChannel = (data: SmsChannelVO) => {
|
||||
export const deleteSmsChannel = (id: number) => {
|
||||
return request.delete({ url: '/system/sms-channel/delete?id=' + id })
|
||||
}
|
||||
|
||||
// 批量删除短信渠道
|
||||
export const deleteSmsChannelList = (ids: number[]) => {
|
||||
return request.delete({ url: '/system/sms-channel/delete-list', params: { ids: ids.join(',') } })
|
||||
}
|
||||
|
||||
@ -46,11 +46,6 @@ export const deleteSmsTemplate = (id: number) => {
|
||||
return request.delete({ url: '/system/sms-template/delete?id=' + id })
|
||||
}
|
||||
|
||||
// 批量删除短信模板
|
||||
export const deleteSmsTemplateList = (ids: number[]) => {
|
||||
return request.delete({ url: '/system/sms-template/delete-list', params: { ids: ids.join(',') } })
|
||||
}
|
||||
|
||||
// 导出短信模板
|
||||
export const exportSmsTemplate = (params) => {
|
||||
return request.download({
|
||||
|
||||
@ -14,7 +14,7 @@ export interface SocialUserVO {
|
||||
}
|
||||
|
||||
// 查询社交用户列表
|
||||
export const getSocialUserPage = async (params: any) => {
|
||||
export const getSocialUserPage = async (params) => {
|
||||
return await request.get({ url: `/system/social-user/page`, params })
|
||||
}
|
||||
|
||||
@ -22,8 +22,3 @@ export const getSocialUserPage = async (params: any) => {
|
||||
export const getSocialUser = async (id: number) => {
|
||||
return await request.get({ url: `/system/social-user/get?id=` + id })
|
||||
}
|
||||
|
||||
// 获得绑定社交用户列表
|
||||
export const getBindSocialUserList = async () => {
|
||||
return await request.get({ url: '/system/social-user/get-bind-list' })
|
||||
}
|
||||
|
||||
@ -12,7 +12,6 @@ export interface TenantVO {
|
||||
password: string
|
||||
expireTime: Date
|
||||
accountCount: number
|
||||
websites: string[]
|
||||
createTime: Date
|
||||
}
|
||||
|
||||
@ -42,11 +41,6 @@ export const getTenant = (id: number) => {
|
||||
return request.get({ url: '/system/tenant/get?id=' + id })
|
||||
}
|
||||
|
||||
// 获取租户精简信息列表
|
||||
export const getTenantList = () => {
|
||||
return request.get({ url: '/system/tenant/simple-list' })
|
||||
}
|
||||
|
||||
// 新增租户
|
||||
export const createTenant = (data: TenantVO) => {
|
||||
return request.post({ url: '/system/tenant/create', data })
|
||||
@ -62,11 +56,6 @@ export const deleteTenant = (id: number) => {
|
||||
return request.delete({ url: '/system/tenant/delete?id=' + id })
|
||||
}
|
||||
|
||||
// 批量删除租户
|
||||
export const deleteTenantList = (ids: number[]) => {
|
||||
return request.delete({ url: '/system/tenant/delete-list', params: { ids: ids.join(',') } })
|
||||
}
|
||||
|
||||
// 导出租户
|
||||
export const exportTenant = (params: TenantExportReqVO) => {
|
||||
return request.download({ url: '/system/tenant/export-excel', params })
|
||||
|
||||
@ -36,12 +36,6 @@ export const updateTenantPackage = (data: TenantPackageVO) => {
|
||||
export const deleteTenantPackage = (id: number) => {
|
||||
return request.delete({ url: '/system/tenant-package/delete?id=' + id })
|
||||
}
|
||||
|
||||
// 批量删除租户套餐
|
||||
export const deleteTenantPackageList = (ids: number[]) => {
|
||||
return request.delete({ url: '/system/tenant-package/delete-list', params: { ids: ids.join(',') } })
|
||||
}
|
||||
|
||||
// 获取租户套餐精简信息列表
|
||||
export const getTenantPackageList = () => {
|
||||
return request.get({ url: '/system/tenant-package/simple-list' })
|
||||
|
||||
@ -22,6 +22,11 @@ export const getUserPage = (params: PageParam) => {
|
||||
return request.get({ url: '/system/user/page', params })
|
||||
}
|
||||
|
||||
// 查询所有用户列表
|
||||
export const getAllUser = () => {
|
||||
return request.get({ url: '/system/user/all' })
|
||||
}
|
||||
|
||||
// 查询用户详情
|
||||
export const getUser = (id: number) => {
|
||||
return request.get({ url: '/system/user/get?id=' + id })
|
||||
@ -42,14 +47,9 @@ export const deleteUser = (id: number) => {
|
||||
return request.delete({ url: '/system/user/delete?id=' + id })
|
||||
}
|
||||
|
||||
// 批量删除用户
|
||||
export const deleteUserList = (ids: number[]) => {
|
||||
return request.delete({ url: '/system/user/delete-list', params: { ids: ids.join(',') } })
|
||||
}
|
||||
|
||||
// 导出用户
|
||||
export const exportUser = (params: any) => {
|
||||
return request.download({ url: '/system/user/export-excel', params })
|
||||
export const exportUser = (params) => {
|
||||
return request.download({ url: '/system/user/export', params })
|
||||
}
|
||||
|
||||
// 下载用户导入模板
|
||||
@ -58,7 +58,7 @@ export const importUserTemplate = () => {
|
||||
}
|
||||
|
||||
// 用户密码重置
|
||||
export const resetUserPassword = (id: number, password: string) => {
|
||||
export const resetUserPwd = (id: number, password: string) => {
|
||||
const data = {
|
||||
id,
|
||||
password
|
||||
|
||||
@ -16,6 +16,10 @@ export interface ProfileVO {
|
||||
id: number
|
||||
name: string
|
||||
}[]
|
||||
socialUsers: {
|
||||
type: number
|
||||
openid: string
|
||||
}[]
|
||||
email: string
|
||||
mobile: string
|
||||
sex: number
|
||||
@ -28,11 +32,10 @@ export interface ProfileVO {
|
||||
}
|
||||
|
||||
export interface UserProfileUpdateReqVO {
|
||||
nickname?: string
|
||||
email?: string
|
||||
mobile?: string
|
||||
sex?: number
|
||||
avatar?: string
|
||||
nickname: string
|
||||
email: string
|
||||
mobile: string
|
||||
sex: number
|
||||
}
|
||||
|
||||
// 查询用户个人信息
|
||||
@ -55,3 +58,8 @@ export const updateUserPassword = (oldPassword: string, newPassword: string) =>
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
// 用户头像上传
|
||||
export const uploadAvatar = (data) => {
|
||||
return request.upload({ url: '/system/user/profile/update-avatar', data: data })
|
||||
}
|
||||
|
||||
|
Before Width: | Height: | Size: 9.8 KiB |
@ -1 +0,0 @@
|
||||
<svg t="1740116949537" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1153" width="200" height="200"><path d="M440.32 296.96h283.30496v145.92h66.56V230.4H440.32V17.92H17.92v424.96H440.32V296.96zM373.76 376.32H84.48v-291.84H373.76v291.84zM586.24 588.8v143.36512H298.66496V586.24h-66.56v212.48512H586.24V1013.76H1008.64v-424.96h-422.4z m355.84 358.4h-289.28v-291.84H942.08v291.84z" p-id="1154" fill="#ffffff"></path></svg>
|
||||
|
Before Width: | Height: | Size: 465 B |
@ -1 +0,0 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" fill="none" class="design-iconfont" viewBox="0 0 12 12"><path fill="url(#a)" fill-rule="evenodd" d="M1 0a1 1 0 0 0-1 1v3.538a1 1 0 0 0 1 1h3.538a1 1 0 0 0 1-1V1a1 1 0 0 0-1-1H1Zm0 6.462a1 1 0 0 0-1 1V11a1 1 0 0 0 1 1h3.538a1 1 0 0 0 1-1V7.462a1 1 0 0 0-1-1H1ZM6.462 1a1 1 0 0 1 1-1H11a1 1 0 0 1 1 1v3.538a1 1 0 0 1-1 1H7.462a1 1 0 0 1-1-1V1Zm1 5.462a1 1 0 0 0-1 1V11a1 1 0 0 0 1 1H11a1 1 0 0 0 1-1V7.462a1 1 0 0 0-1-1H7.462Z" clip-rule="evenodd"/><defs><linearGradient id="a" x1="0" x2="12" y1="0" y2="12" gradientUnits="userSpaceOnUse"><stop stop-color="#1B3149"/><stop offset="1" stop-color="#717D8A"/></linearGradient></defs></svg>
|
||||
|
Before Width: | Height: | Size: 697 B |
@ -1 +0,0 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" fill="none" viewBox="0 0 12 12"><g clip-path="url(#a)"><path fill="url(#b)" fill-rule="evenodd" d="M6.958.42C6.444.216 5.61.216 5.098.42L1.15 1.975c-.77.304-.77.797 0 1.1l3.947 1.558c.514.202 1.347.202 1.86 0l3.948-1.557c.77-.304.77-.797 0-1.1L6.958.418ZM4.715 11.788a.857.857 0 0 0 .3.056c.383 0 .671-.295.671-.7V6.404c0-.49-.364-1.007-.817-1.177L1.09 3.805a.808.808 0 0 0-.284-.056c-.353 0-.581.275-.581.7V9.19c0 .508.33 1.014.763 1.177l3.726 1.422Zm2.229-.024h-.02l.073.003c.074.004.154.009.227-.019L11 10.367c.45-.168.83-.686.83-1.177V4.45c0-.413-.29-.7-.673-.7a.965.965 0 0 0-.317.055l-3.72 1.422c-.44.165-.75.67-.75 1.177v4.74c0 .42.218.621.575.621Z" clip-rule="evenodd"/></g><defs><linearGradient id="b" x1=".226" x2="11.803" y1=".267" y2="11.871" gradientUnits="userSpaceOnUse"><stop stop-color="#1B3149"/><stop offset="1" stop-color="#717D8A"/></linearGradient><clipPath id="a"><path fill="#fff" d="M0 0h12v12H0z"/></clipPath></defs></svg>
|
||||
|
Before Width: | Height: | Size: 1011 B |
@ -1 +1 @@
|
||||
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1747409043186" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="4834" width="128" height="128" xmlns:xlink="http://www.w3.org/1999/xlink"><path d="M44.416 853.333333v-85.205333a170.666667 170.666667 0 0 1 170.666667-170.666667h170.837333a37637.589333 37637.589333 0 0 1 0-206.165333C324.309333 352.170667 281.6 285.141333 281.6 211.968c0-116.906667 90.197333-211.072 231.168-211.072 140.970667 0 230.741333 94.208 230.741333 211.072 0 73.216-40.96 140.245333-102.528 179.328 0.256 0.170667 0.256 68.906667 0 206.165333h171.989334a170.666667 170.666667 0 0 1 170.666666 170.666667V853.333333a170.666667 170.666667 0 0 1-170.666666 170.666667H215.082667a170.666667 170.666667 0 0 1-170.666667-170.666667z m84.266667-84.650666v104.277333a85.333333 85.333333 0 0 0 85.333333 85.333333H811.52a85.333333 85.333333 0 0 0 85.333333-85.333333v-104.277333a85.333333 85.333333 0 0 0-85.333333-85.333334h-256.64l8.96-342.698666c66.944-21.333333 100.394667-64.256 100.394667-128.682667 0-61.952-57.344-129.322667-151.466667-129.322667-94.122667 0-146.645333 61.610667-146.645333 129.322667 0 71.466667 34.816 114.346667 104.362666 128.682667v342.698666H214.016a85.333333 85.333333 0 0 0-85.333333 85.333334z m167.125333 138.368c-50.432 0-91.434667-41.557333-91.434667-92.586667s41.002667-92.586667 91.434667-92.586667c50.389333 0 91.434667 41.557333 91.434667 92.586667 0 24.832-9.6 48.170667-27.008 65.706667-17.237333 17.322667-40.106667 26.88-64.426667 26.88z m0-119.466667a27.093333 27.093333 0 0 0-27.306667 26.88c0 14.805333 12.245333 26.88 27.306667 26.88a27.306667 27.306667 0 0 0 19.498667-8.106667 26.453333 26.453333 0 0 0 7.808-18.773333 27.093333 27.093333 0 0 0-27.306667-26.88z" fill="#1296db" p-id="4835"></path></svg>
|
||||
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1676209854312" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="3033" xmlns:xlink="http://www.w3.org/1999/xlink" width="128" height="128"><path d="M173.077333 362.666667l91.114667-214.677334a65.6 65.6 0 0 1 86.016-34.773333c11.584 4.906667 24.96 10.282667 40.896 16.448 8.277333 3.2 16.789333 6.464 27.904 10.666667 28.202667 10.709333 39.296 14.933333 46.144 17.642666l51.477333-51.669333c28.181333-28.16 74.112-27.946667 102.570667 0.533333l195.925333 195.925334c16.426667 16.426667 23.445333 38.634667 21.056 59.904H896a42.666667 42.666667 0 0 1 42.666667 42.666666v490.666667a42.666667 42.666667 0 0 1-42.666667 42.666667H128a42.666667 42.666667 0 0 1-42.666667-42.666667V405.333333a42.666667 42.666667 0 0 1 42.666667-42.666666h45.077333z m48.96 0h39.104l169.194667-169.770667-27.328-10.389333c-11.2-4.245333-19.818667-7.530667-28.224-10.794667a1459.2 1459.2 0 0 1-42.197333-17.002667 20.522667 20.522667 0 0 0-26.901334 10.88L222.037333 362.666667z m108.842667 0h454.954667a23.509333 23.509333 0 0 0-5.290667-25.322667l-195.925333-195.925333a23.36 23.36 0 0 0-33.024-0.213334L330.88 362.666667zM128 405.333333v490.666667h768V405.333333H128z m597.333333 320a85.333333 85.333333 0 1 1 0-170.666666 85.333333 85.333333 0 0 1 0 170.666666z m0-42.666666a42.666667 42.666667 0 1 0 0-85.333334 42.666667 42.666667 0 0 0 0 85.333334z" fill="#4296d5" p-id="3034"></path></svg>
|
||||
|
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 1.5 KiB |
@ -1 +0,0 @@
|
||||
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1676209854312" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="3033" xmlns:xlink="http://www.w3.org/1999/xlink" width="128" height="128"><path d="M173.077333 362.666667l91.114667-214.677334a65.6 65.6 0 0 1 86.016-34.773333c11.584 4.906667 24.96 10.282667 40.896 16.448 8.277333 3.2 16.789333 6.464 27.904 10.666667 28.202667 10.709333 39.296 14.933333 46.144 17.642666l51.477333-51.669333c28.181333-28.16 74.112-27.946667 102.570667 0.533333l195.925333 195.925334c16.426667 16.426667 23.445333 38.634667 21.056 59.904H896a42.666667 42.666667 0 0 1 42.666667 42.666666v490.666667a42.666667 42.666667 0 0 1-42.666667 42.666667H128a42.666667 42.666667 0 0 1-42.666667-42.666667V405.333333a42.666667 42.666667 0 0 1 42.666667-42.666666h45.077333z m48.96 0h39.104l169.194667-169.770667-27.328-10.389333c-11.2-4.245333-19.818667-7.530667-28.224-10.794667a1459.2 1459.2 0 0 1-42.197333-17.002667 20.522667 20.522667 0 0 0-26.901334 10.88L222.037333 362.666667z m108.842667 0h454.954667a23.509333 23.509333 0 0 0-5.290667-25.322667l-195.925333-195.925333a23.36 23.36 0 0 0-33.024-0.213334L330.88 362.666667zM128 405.333333v490.666667h768V405.333333H128z m597.333333 320a85.333333 85.333333 0 1 1 0-170.666666 85.333333 85.333333 0 0 1 0 170.666666z m0-42.666666a42.666667 42.666667 0 1 0 0-85.333334 42.666667 42.666667 0 0 0 0 85.333334z" fill="#4296d5" p-id="3034"></path></svg>
|
||||
|
Before Width: | Height: | Size: 1.5 KiB |
@ -80,8 +80,7 @@ const activeAppLink = ref({} as AppLink)
|
||||
/** 打开弹窗 */
|
||||
const dialogVisible = ref(false)
|
||||
const open = (link: string) => {
|
||||
// 进入页面时先重置 activeAppLink
|
||||
activeAppLink.value = { name: '', path: '' }
|
||||
activeAppLink.value.path = link
|
||||
dialogVisible.value = true
|
||||
|
||||
// 滚动到当前的链接
|
||||
@ -103,11 +102,8 @@ defineExpose({ open })
|
||||
|
||||
// 处理 APP 链接选中
|
||||
const handleAppLinkSelected = (appLink: AppLink) => {
|
||||
// 只有不同链接时才更新(避免重复触发)
|
||||
if (!isSameLink(appLink.path, activeAppLink.value.path)) {
|
||||
// 如果新链接的 path 为空,则沿用当前 activeAppLink 的 path
|
||||
const path = appLink.path || activeAppLink.value.path
|
||||
activeAppLink.value = { ...appLink, path: path }
|
||||
activeAppLink.value = appLink
|
||||
}
|
||||
switch (appLink.type) {
|
||||
case APP_LINK_TYPE_ENUM.PRODUCT_CATEGORY_LIST:
|
||||
@ -174,7 +170,7 @@ const groupBtnRefs = ref<ButtonInstance[]>([])
|
||||
const scrollToGroupBtn = (group: string) => {
|
||||
const groupBtn = groupBtnRefs.value
|
||||
.map((btn: ButtonInstance) => btn['ref'])
|
||||
.find((ref: HTMLButtonElement) => ref.textContent === group)
|
||||
.find((ref: Node) => ref.textContent === group)
|
||||
if (groupBtn) {
|
||||
groupScrollbar.value?.setScrollTop(groupBtn.offsetTop)
|
||||
}
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<div @click.stop>
|
||||
<div>
|
||||
<Dialog
|
||||
v-model="dialogVisible"
|
||||
:canFullscreen="false"
|
||||
|
||||
@ -1,122 +0,0 @@
|
||||
<template>
|
||||
<Dialog v-model="dialogVisible" title="部门选择" width="600">
|
||||
<el-row v-loading="formLoading">
|
||||
<el-col :span="24">
|
||||
<ContentWrap class="h-1/1">
|
||||
<el-tree
|
||||
ref="treeRef"
|
||||
:data="deptTree"
|
||||
:props="defaultProps"
|
||||
show-checkbox
|
||||
:check-strictly="checkStrictly"
|
||||
check-on-click-node
|
||||
default-expand-all
|
||||
highlight-current
|
||||
node-key="id"
|
||||
@check="handleCheck"
|
||||
/>
|
||||
</ContentWrap>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<template #footer>
|
||||
<el-button
|
||||
:disabled="formLoading || !selectedDeptIds?.length"
|
||||
type="primary"
|
||||
@click="submitForm"
|
||||
>
|
||||
确 定
|
||||
</el-button>
|
||||
<el-button @click="dialogVisible = false">取 消</el-button>
|
||||
</template>
|
||||
</Dialog>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { defaultProps, handleTree } from '@/utils/tree'
|
||||
import * as DeptApi from '@/api/system/dept'
|
||||
|
||||
defineOptions({ name: 'DeptSelectForm' })
|
||||
|
||||
const emit = defineEmits<{
|
||||
confirm: [deptList: any[]]
|
||||
}>()
|
||||
|
||||
const { t } = useI18n() // 国际化
|
||||
const message = useMessage() // 消息弹窗
|
||||
|
||||
const props = defineProps({
|
||||
// 是否严格的遵循父子不互相关联
|
||||
checkStrictly: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
// 是否支持多选
|
||||
multiple: {
|
||||
type: Boolean,
|
||||
default: true
|
||||
}
|
||||
})
|
||||
|
||||
const treeRef = ref()
|
||||
const deptTree = ref<Tree[]>([]) // 部门树形结构
|
||||
const selectedDeptIds = ref<number[]>([]) // 选中的部门 ID 列表
|
||||
const dialogVisible = ref(false) // 弹窗的是否展示
|
||||
const formLoading = ref(false) // 表单的加载中
|
||||
|
||||
/** 打开弹窗 */
|
||||
const open = async (selectedList?: DeptApi.DeptVO[]) => {
|
||||
resetForm()
|
||||
formLoading.value = true
|
||||
try {
|
||||
// 加载部门列表
|
||||
const deptData = await DeptApi.getSimpleDeptList()
|
||||
deptTree.value = handleTree(deptData)
|
||||
} finally {
|
||||
formLoading.value = false
|
||||
}
|
||||
dialogVisible.value = true
|
||||
// 设置已选择的部门
|
||||
if (selectedList?.length) {
|
||||
await nextTick()
|
||||
const selectedIds = selectedList
|
||||
.map((dept) => dept.id)
|
||||
.filter((id): id is number => id !== undefined)
|
||||
selectedDeptIds.value = selectedIds
|
||||
treeRef.value?.setCheckedKeys(selectedIds)
|
||||
}
|
||||
}
|
||||
|
||||
/** 处理选中状态变化 */
|
||||
const handleCheck = (data: any, checked: any) => {
|
||||
selectedDeptIds.value = treeRef.value.getCheckedKeys()
|
||||
if (!props.multiple && selectedDeptIds.value.length > 1) {
|
||||
// 单选模式下,只保留最后选择的节点
|
||||
const lastSelectedId = selectedDeptIds.value[selectedDeptIds.value.length - 1]
|
||||
selectedDeptIds.value = [lastSelectedId]
|
||||
treeRef.value.setCheckedKeys([lastSelectedId])
|
||||
}
|
||||
}
|
||||
|
||||
/** 提交选择 */
|
||||
const submitForm = async () => {
|
||||
try {
|
||||
// 获取选中的完整部门数据
|
||||
const checkedNodes = treeRef.value.getCheckedNodes()
|
||||
message.success(t('common.updateSuccess'))
|
||||
dialogVisible.value = false
|
||||
emit('confirm', checkedNodes)
|
||||
} finally {
|
||||
}
|
||||
}
|
||||
|
||||
/** 重置表单 */
|
||||
const resetForm = () => {
|
||||
deptTree.value = []
|
||||
selectedDeptIds.value = []
|
||||
if (treeRef.value) {
|
||||
treeRef.value.setCheckedKeys([])
|
||||
}
|
||||
}
|
||||
|
||||
defineExpose({ open }) // 提供 open 方法,用于打开弹窗
|
||||
</script>
|
||||
@ -1,11 +1,9 @@
|
||||
<script lang="ts" setup>
|
||||
import { propTypes } from '@/utils/propTypes'
|
||||
import { isNumber } from '@/utils/is'
|
||||
|
||||
defineOptions({ name: 'Dialog' })
|
||||
|
||||
const slots = useSlots()
|
||||
const emits = defineEmits(['update:modelValue'])
|
||||
|
||||
const props = defineProps({
|
||||
modelValue: propTypes.bool.def(false),
|
||||
@ -57,17 +55,6 @@ const dialogStyle = computed(() => {
|
||||
height: unref(dialogHeight)
|
||||
}
|
||||
})
|
||||
|
||||
const closing = ref(false)
|
||||
|
||||
function closeHandler() {
|
||||
emits('update:modelValue', false)
|
||||
closing.value = true
|
||||
}
|
||||
|
||||
function closedHandler() {
|
||||
closing.value = false
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
@ -81,8 +68,6 @@ function closedHandler() {
|
||||
draggable
|
||||
class="com-dialog"
|
||||
:show-close="false"
|
||||
@close="closeHandler"
|
||||
@closed="closedHandler"
|
||||
>
|
||||
<template #header="{ close }">
|
||||
<div class="relative h-54px flex items-center justify-between pl-15px pr-15px">
|
||||
@ -105,7 +90,7 @@ function closedHandler() {
|
||||
icon="ep:close"
|
||||
hover-color="var(--el-color-primary)"
|
||||
color="var(--el-color-info)"
|
||||
@click.stop="close"
|
||||
@click="close"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
@ -116,9 +101,7 @@ function closedHandler() {
|
||||
</ElScrollbar>
|
||||
<slot v-else></slot>
|
||||
<template v-if="slots.footer" #footer>
|
||||
<div :style="{ 'pointer-events': closing ? 'none' : 'auto' }">
|
||||
<slot name="footer"></slot>
|
||||
</div>
|
||||
<slot name="footer"></slot>
|
||||
</template>
|
||||
</ElDialog>
|
||||
</template>
|
||||
|
||||
@ -17,7 +17,7 @@
|
||||
:group="{ name: 'component', pull: 'clone', put: false }"
|
||||
:clone="handleCloneComponent"
|
||||
:animation="200"
|
||||
:force-fallback="false"
|
||||
:force-fallback="true"
|
||||
>
|
||||
<template #item="{ element }">
|
||||
<div>
|
||||
|
||||
@ -10,8 +10,6 @@ export interface CarouselProperty {
|
||||
autoplay: boolean
|
||||
// 播放间隔
|
||||
interval: number
|
||||
// 轮播高度
|
||||
height: number
|
||||
// 轮播内容
|
||||
items: CarouselItemProperty[]
|
||||
// 组件样式
|
||||
@ -39,7 +37,6 @@ export const component = {
|
||||
indicator: 'dot',
|
||||
autoplay: false,
|
||||
interval: 3,
|
||||
height: 174,
|
||||
items: [
|
||||
{ type: 'img', imgUrl: 'https://static.iocoder.cn/mall/banner-01.jpg', videoUrl: '' },
|
||||
{ type: 'img', imgUrl: 'https://static.iocoder.cn/mall/banner-02.jpg', videoUrl: '' }
|
||||
|
||||
@ -8,7 +8,7 @@
|
||||
</div>
|
||||
<div v-else class="relative">
|
||||
<el-carousel
|
||||
:height="property.height + 'px'"
|
||||
height="174px"
|
||||
:type="property.type === 'card' ? 'card' : ''"
|
||||
:autoplay="property.autoplay"
|
||||
:interval="property.interval * 1000"
|
||||
|
||||
@ -16,9 +16,6 @@
|
||||
</el-tooltip>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item label="高度" prop="height">
|
||||
<el-input-number class="!w-50% mr-10px" controls-position="right" v-model="formData.height" /> px
|
||||
</el-form-item>
|
||||
<el-form-item label="指示器" prop="indicator">
|
||||
<el-radio-group v-model="formData.indicator">
|
||||
<el-radio value="dot">小圆点</el-radio>
|
||||
|
||||
@ -13,7 +13,7 @@ export const CouponDiscount = defineComponent({
|
||||
setup(props) {
|
||||
const coupon = props.coupon as CouponTemplateApi.CouponTemplateVO
|
||||
// 折扣
|
||||
let value = coupon.discountPercent / 10 + ''
|
||||
let value = coupon.discountPercent + ''
|
||||
let suffix = ' 折'
|
||||
// 满减
|
||||
if (coupon.discountType === PromotionDiscountTypeEnum.PRICE.type) {
|
||||
@ -43,7 +43,7 @@ export const CouponDiscountDesc = defineComponent({
|
||||
const discountDesc =
|
||||
coupon.discountType === PromotionDiscountTypeEnum.PRICE.type
|
||||
? `减${floatToFixed2(coupon.discountPrice)}元`
|
||||
: `打${coupon.discountPercent / 10.0}折`
|
||||
: `打${coupon.discountPercent}折`
|
||||
return () => (
|
||||
<div>
|
||||
<span>{useCondition}</span>
|
||||
|
||||
@ -49,13 +49,7 @@
|
||||
<div class="flex flex-col justify-evenly gap-4px">
|
||||
<!-- 优惠值 -->
|
||||
<CouponDiscount :coupon="coupon" />
|
||||
<!-- 优惠描述 -->
|
||||
<CouponDiscountDesc :coupon="coupon" />
|
||||
<!-- 领取说明 -->
|
||||
<div v-if="coupon.totalCount >= 0">
|
||||
仅剩:{{ coupon.totalCount - coupon.takeCount }}张
|
||||
</div>
|
||||
<div v-else-if="coupon.totalCount === -1">仅剩:不限制</div>
|
||||
<div>{{ coupon.name }}</div>
|
||||
</div>
|
||||
<div class="flex flex-col">
|
||||
<div
|
||||
@ -73,8 +67,7 @@
|
||||
<div v-else class="flex flex-col items-center justify-around gap-4px p-4px">
|
||||
<!-- 优惠值 -->
|
||||
<CouponDiscount :coupon="coupon" />
|
||||
<!-- 优惠描述 -->
|
||||
<CouponDiscountDesc :coupon="coupon" />
|
||||
<div>{{ coupon.name }}</div>
|
||||
<div
|
||||
class="rounded-20px p-x-8px p-y-2px"
|
||||
:style="{
|
||||
@ -131,7 +124,7 @@ watch(
|
||||
() => {
|
||||
// 每列的宽度为:(总宽度 - 间距 * (列数 - 1))/ 列数
|
||||
couponWidth.value =
|
||||
(phoneWidth.value - props.property.space * (props.property.columns - 1)) /
|
||||
(phoneWidth.value * 0.95 - props.property.space * (props.property.columns - 1)) /
|
||||
props.property.columns
|
||||
// 显示滚动条
|
||||
scrollbarWidth.value = `${
|
||||
|
||||
@ -1,19 +1,16 @@
|
||||
<template>
|
||||
<div
|
||||
class="relative"
|
||||
:style="{
|
||||
height: `${rowCount * CUBE_SIZE}px`,
|
||||
width: `${4 * CUBE_SIZE}px`,
|
||||
padding: `${property.space}px`
|
||||
}"
|
||||
:style="{ height: `${rowCount * CUBE_SIZE}px`, width: `${4 * CUBE_SIZE}px` }"
|
||||
>
|
||||
<div
|
||||
v-for="(item, index) in property.list"
|
||||
:key="index"
|
||||
class="absolute"
|
||||
:style="{
|
||||
width: `${item.width * CUBE_SIZE - property.space}px`,
|
||||
height: `${item.height * CUBE_SIZE - property.space}px`,
|
||||
width: `${item.width * CUBE_SIZE - property.space * 2}px`,
|
||||
height: `${item.height * CUBE_SIZE - property.space * 2}px`,
|
||||
margin: `${property.space}px`,
|
||||
top: `${item.top * CUBE_SIZE}px`,
|
||||
left: `${item.left * CUBE_SIZE}px`
|
||||
}"
|
||||
@ -66,10 +63,10 @@ const rowCount = computed(() => {
|
||||
let count = 0
|
||||
if (props.property.list.length > 0) {
|
||||
// 最大行号
|
||||
count = Math.max(...props.property.list.map((item) => item.top + item.height))
|
||||
count = Math.max(...props.property.list.map((item) => item.bottom))
|
||||
}
|
||||
// 保证至少有一行
|
||||
return count == 0 ? 1 : count
|
||||
// 行号从 0 开始,所以加 1
|
||||
return count + 1
|
||||
})
|
||||
</script>
|
||||
|
||||
|
||||
@ -39,7 +39,7 @@
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</el-carousel-item>
|
||||
</el-carousel-item>
|
||||
</el-carousel>
|
||||
</template>
|
||||
|
||||
@ -51,7 +51,7 @@ const props = defineProps<{ property: MenuSwiperProperty }>()
|
||||
// 标题的高度
|
||||
const TITLE_HEIGHT = 20
|
||||
// 图标的高度
|
||||
const ICON_SIZE = 32
|
||||
const ICON_SIZE = 42
|
||||
// 垂直间距:一行上下的间距
|
||||
const SPACE_Y = 16
|
||||
|
||||
|
||||
@ -13,7 +13,7 @@
|
||||
<template v-for="(cell, cellIndex) in cellList" :key="cellIndex">
|
||||
<template v-if="selectedHotAreaIndex === cellIndex">
|
||||
<el-form-item :prop="`cell[${cellIndex}].type`" label="类型">
|
||||
<el-radio-group v-model="cell.type" @change="handleHotAreaSelected(cell, cellIndex)">
|
||||
<el-radio-group v-model="cell.type">
|
||||
<el-radio value="text">文字</el-radio>
|
||||
<el-radio value="image">图片</el-radio>
|
||||
<el-radio value="search">搜索框</el-radio>
|
||||
@ -44,32 +44,9 @@
|
||||
</template>
|
||||
<!-- 3. 搜索框 -->
|
||||
<template v-else>
|
||||
<el-form-item label="框体颜色" prop="backgroundColor">
|
||||
<ColorInput v-model="cell.backgroundColor" />
|
||||
</el-form-item>
|
||||
<el-form-item class="lef" label="文本颜色" prop="textColor">
|
||||
<ColorInput v-model="cell.textColor" />
|
||||
</el-form-item>
|
||||
<el-form-item :prop="`cell[${cellIndex}].placeholder`" label="提示文字">
|
||||
<el-input v-model="cell.placeholder" maxlength="10" show-word-limit />
|
||||
</el-form-item>
|
||||
<el-form-item label="文本位置" prop="placeholderPosition">
|
||||
<el-radio-group v-model="cell!.placeholderPosition">
|
||||
<el-tooltip content="居左" placement="top">
|
||||
<el-radio-button value="left">
|
||||
<Icon icon="ant-design:align-left-outlined" />
|
||||
</el-radio-button>
|
||||
</el-tooltip>
|
||||
<el-tooltip content="居中" placement="top">
|
||||
<el-radio-button value="center">
|
||||
<Icon icon="ant-design:align-center-outlined" />
|
||||
</el-radio-button>
|
||||
</el-tooltip>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item label="扫一扫" prop="showScan">
|
||||
<el-switch v-model="cell!.showScan" />
|
||||
</el-form-item>
|
||||
<el-form-item :prop="`cell[${cellIndex}].borderRadius`" label="圆角">
|
||||
<el-slider
|
||||
v-model="cell.borderRadius"
|
||||
@ -111,17 +88,10 @@ const cellCount = computed(() => (props.isMp ? 6 : 8))
|
||||
const selectedHotAreaIndex = ref(0)
|
||||
const handleHotAreaSelected = (cellValue: NavigationBarCellProperty, index: number) => {
|
||||
selectedHotAreaIndex.value = index
|
||||
// 默认设置为选中文字,并设置属性
|
||||
if (!cellValue.type) {
|
||||
cellValue.type = 'text'
|
||||
cellValue.textColor = '#111111'
|
||||
}
|
||||
// 如果点击的是搜索框,则初始化搜索框的属性
|
||||
if (cellValue.type === 'search') {
|
||||
cellValue.placeholderPosition = 'left'
|
||||
cellValue.backgroundColor = '#EEEEEE'
|
||||
cellValue.textColor = '#969799'
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
@ -45,14 +45,8 @@ export interface NavigationBarCellProperty {
|
||||
imgUrl: string
|
||||
// 图片链接
|
||||
url: string
|
||||
// 搜索框:框体颜色
|
||||
backgroundColor: string
|
||||
// 搜索框:提示文字
|
||||
placeholder: string
|
||||
// 搜索框:提示文字位置
|
||||
placeholderPosition: string
|
||||
// 搜索框:是否显示扫一扫
|
||||
showScan: boolean
|
||||
// 搜索框:边框圆角半径
|
||||
borderRadius: number
|
||||
}
|
||||
|
||||
@ -54,12 +54,9 @@ const getCellStyle = (cell: NavigationBarCellProperty) => {
|
||||
const getSearchProp = computed(() => (cell: NavigationBarCellProperty) => {
|
||||
return {
|
||||
height: 30,
|
||||
backgroundColor: cell.backgroundColor,
|
||||
showScan: cell.showScan,
|
||||
showScan: false,
|
||||
placeholder: cell.placeholder,
|
||||
borderRadius: cell.borderRadius,
|
||||
textColor: cell.textColor,
|
||||
placeholderPosition: cell.placeholderPosition
|
||||
borderRadius: cell.borderRadius
|
||||
} as SearchProperty
|
||||
})
|
||||
</script>
|
||||
|
||||
@ -29,10 +29,7 @@
|
||||
<ColorInput v-model="formData.bgColor" />
|
||||
</el-form-item>
|
||||
<el-form-item label="背景图片" prop="bgImg" v-else>
|
||||
<div class="flex items-center">
|
||||
<UploadImg v-model="formData.bgImg" :limit="1" width="56px" height="56px" />
|
||||
<span class="text-xs text-gray-400 ml-2 mb-2">建议宽度:750</span>
|
||||
</div>
|
||||
<UploadImg v-model="formData.bgImg" :limit="1" width="56px" height="56px" />
|
||||
</el-form-item>
|
||||
<el-card class="property-group" shadow="never">
|
||||
<template #header>
|
||||
@ -42,9 +39,8 @@
|
||||
<el-checkbox
|
||||
v-model="formData._local.previewMp"
|
||||
@change="formData._local.previewOther = !formData._local.previewMp"
|
||||
>预览</el-checkbox
|
||||
>
|
||||
预览
|
||||
</el-checkbox>
|
||||
</el-form-item>
|
||||
</div>
|
||||
</template>
|
||||
@ -58,9 +54,8 @@
|
||||
<el-checkbox
|
||||
v-model="formData._local.previewOther"
|
||||
@change="formData._local.previewMp = !formData._local.previewOther"
|
||||
>预览</el-checkbox
|
||||
>
|
||||
预览
|
||||
</el-checkbox>
|
||||
</el-form-item>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -82,8 +82,8 @@ export const component = {
|
||||
bgEndColor: '#FE832A',
|
||||
imgUrl: ''
|
||||
},
|
||||
borderRadiusTop: 6,
|
||||
borderRadiusBottom: 6,
|
||||
borderRadiusTop: 8,
|
||||
borderRadiusBottom: 8,
|
||||
space: 8,
|
||||
spuIds: [],
|
||||
style: {
|
||||
|
||||