Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 5344602346 |
5
.env.dev
@ -8,6 +8,8 @@ VITE_BASE_URL='http://api-dashboard.yudao.iocoder.cn'
|
||||
|
||||
# 文件上传类型:server - 后端上传, client - 前端直连上传,仅支持S3服务
|
||||
VITE_UPLOAD_TYPE=server
|
||||
# 上传路径
|
||||
VITE_UPLOAD_URL='http://api-dashboard.yudao.iocoder.cn/admin-api/infra/file/upload'
|
||||
|
||||
# 接口地址
|
||||
VITE_API_URL=/admin-api
|
||||
@ -32,6 +34,3 @@ VITE_MALL_H5_DOMAIN='http://mall.yudao.iocoder.cn'
|
||||
|
||||
# 验证码的开关
|
||||
VITE_APP_CAPTCHA_ENABLE=true
|
||||
|
||||
# GoView域名
|
||||
VITE_GOVIEW_URL='http://127.0.0.1:3000'
|
||||
@ -8,6 +8,8 @@ VITE_BASE_URL='http://localhost:48080'
|
||||
|
||||
# 文件上传类型:server - 后端上传, client - 前端直连上传,仅支持 S3 服务
|
||||
VITE_UPLOAD_TYPE=server
|
||||
# 上传路径
|
||||
VITE_UPLOAD_URL='http://localhost:48080/admin-api/infra/file/upload'
|
||||
|
||||
# 接口地址
|
||||
VITE_API_URL=/admin-api
|
||||
@ -29,6 +31,3 @@ VITE_MALL_H5_DOMAIN='http://localhost:3000'
|
||||
|
||||
# 验证码的开关
|
||||
VITE_APP_CAPTCHA_ENABLE=false
|
||||
|
||||
# GoView域名
|
||||
VITE_GOVIEW_URL='http://127.0.0.1:3000'
|
||||
@ -8,6 +8,8 @@ VITE_BASE_URL='http://localhost:48080'
|
||||
|
||||
# 文件上传类型:server - 后端上传, client - 前端直连上传,仅支持S3服务
|
||||
VITE_UPLOAD_TYPE=server
|
||||
# 上传路径
|
||||
VITE_UPLOAD_URL='http://localhost:48080/admin-api/infra/file/upload'
|
||||
|
||||
# 接口地址
|
||||
VITE_API_URL=/admin-api
|
||||
@ -29,6 +31,3 @@ VITE_OUT_DIR=dist-prod
|
||||
|
||||
# 商城H5会员端域名
|
||||
VITE_MALL_H5_DOMAIN='http://mall.yudao.iocoder.cn'
|
||||
|
||||
# GoView域名
|
||||
VITE_GOVIEW_URL='http://127.0.0.1:3000'
|
||||
@ -8,6 +8,8 @@ VITE_BASE_URL='http://api-dashboard.yudao.iocoder.cn'
|
||||
|
||||
# 文件上传类型:server - 后端上传, client - 前端直连上传,仅支持S3服务
|
||||
VITE_UPLOAD_TYPE=server
|
||||
# 上传路径
|
||||
VITE_UPLOAD_URL='http://api-dashboard.yudao.iocoder.cn/admin-api/infra/file/upload'
|
||||
|
||||
# 接口地址
|
||||
VITE_API_URL=/admin-api
|
||||
@ -29,6 +31,3 @@ VITE_OUT_DIR=dist-stage
|
||||
|
||||
# 商城H5会员端域名
|
||||
VITE_MALL_H5_DOMAIN='http://mall.yudao.iocoder.cn'
|
||||
|
||||
# GoView域名
|
||||
VITE_GOVIEW_URL='http://127.0.0.1:3000'
|
||||
@ -8,6 +8,8 @@ VITE_BASE_URL='http://localhost:48080'
|
||||
|
||||
# 文件上传类型:server - 后端上传, client - 前端直连上传,仅支持S3服务
|
||||
VITE_UPLOAD_TYPE=server
|
||||
# 上传路径
|
||||
VITE_UPLOAD_URL='http://localhost:48080/admin-api/infra/file/upload'
|
||||
|
||||
# 接口地址
|
||||
VITE_API_URL=/admin-api
|
||||
@ -29,6 +31,3 @@ VITE_OUT_DIR=dist-test
|
||||
|
||||
# 商城H5会员端域名
|
||||
VITE_MALL_H5_DOMAIN='http://mall.yudao.iocoder.cn'
|
||||
|
||||
# GoView域名
|
||||
VITE_GOVIEW_URL='http://127.0.0.1:3000'
|
||||
|
Before Width: | Height: | Size: 25 KiB After Width: | Height: | Size: 21 KiB |
|
Before Width: | Height: | Size: 177 KiB |
|
Before Width: | Height: | Size: 126 KiB |
2
.vscode/settings.json
vendored
@ -87,7 +87,7 @@
|
||||
"source.fixAll.stylelint": "explicit"
|
||||
},
|
||||
"[vue]": {
|
||||
"editor.defaultFormatter": "octref.vetur"
|
||||
"editor.defaultFormatter": "rvest.vs-code-prettier-eslint"
|
||||
},
|
||||
"i18n-ally.localesPaths": ["src/locales"],
|
||||
"i18n-ally.keystyle": "nested",
|
||||
|
||||
120
README.md
@ -69,11 +69,11 @@
|
||||
|
||||
支持 Spring Boot、Spring Cloud 两种架构:
|
||||
|
||||
① Spring Boot 单体架构:<https://doc.iocoder.cn>
|
||||
① Spring Boot 单体架构:<https://github.com/YunaiV/ruoyi-vue-pro>
|
||||
|
||||

|
||||
|
||||
② Spring Cloud 微服务架构:<https://cloud.iocoder.cn>
|
||||
② Spring Cloud 微服务架构:<https://github.com/YunaiV/yudao-cloud>
|
||||
|
||||

|
||||
|
||||
@ -81,13 +81,16 @@
|
||||
|
||||
系统内置多种多种业务功能,可以用于快速你的业务系统:
|
||||
|
||||
系统内置多种多种业务功能,可以用于快速你的业务系统:
|
||||
|
||||

|
||||
|
||||
* 通用模块(必选):系统功能、基础设施
|
||||
* 通用模块(可选):工作流程、支付系统、数据报表、会员中心
|
||||
* 业务系统(按需):ERP 系统、CRM 系统、商城系统、微信公众号、AI 大模型
|
||||
* 系统功能
|
||||
* 基础设施
|
||||
* 工作流程
|
||||
* 支付系统
|
||||
* 会员中心
|
||||
* 数据报表
|
||||
* 商城系统
|
||||
* 微信公众号
|
||||
* ERP 系统
|
||||
* CRM 系统
|
||||
|
||||
### 系统功能
|
||||
|
||||
@ -117,77 +120,50 @@
|
||||
|
||||
### 工作流程
|
||||
|
||||
| | 功能 | 描述 |
|
||||
|-----|-------|----------------------------------------|
|
||||
| 🚀 | 流程模型 | 配置工作流的流程模型,支持文件导入与在线设计流程图,提供 7 种任务分配规则 |
|
||||
| 🚀 | 流程表单 | 拖动表单元素生成相应的工作流表单,覆盖 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 回调、更新数据、删除数据等 | ✅ |
|
||||
| 延迟节点 | 执行到该节点,审批等待一段时间再执行,支持固定时长、固定日期等 | ✅ |
|
||||
| 拓展设置 | 流程前置/后置通知,节点(任务)前置、后置通知,流程报表,自动审批去重,自定流程编号、标题、摘要,流程报表等 | ✅ |
|
||||
|
||||
### 支付系统
|
||||
|
||||
| | 功能 | 描述 |
|
||||
|-----|------|---------------------------|
|
||||
| 🚀 | 商户信息 | 管理商户信息,支持 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 +209,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, // 是否在控制台输出压缩结果
|
||||
|
||||
@ -114,8 +114,7 @@ const include = [
|
||||
'element-plus/es/components/segmented/style/css',
|
||||
'@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/empty/style/css'
|
||||
]
|
||||
|
||||
const exclude = ['@iconify/json']
|
||||
|
||||
37
package.json
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "yudao-ui-admin-vue3",
|
||||
"version": "2.4.2-snapshot",
|
||||
"version": "2.2.0-snapshot",
|
||||
"description": "基于vue3、vite4、element-plus、typesScript",
|
||||
"author": "xingyu",
|
||||
"private": false,
|
||||
@ -9,11 +9,11 @@
|
||||
"dev": "vite --mode env.local",
|
||||
"dev-server": "vite --mode dev",
|
||||
"ts:check": "vue-tsc --noEmit",
|
||||
"build:local": "node --max_old_space_size=4096 ./node_modules/vite/bin/vite.js build",
|
||||
"build:dev": "node --max_old_space_size=4096 ./node_modules/vite/bin/vite.js build --mode dev",
|
||||
"build:test": "node --max_old_space_size=4096 ./node_modules/vite/bin/vite.js build --mode test",
|
||||
"build:stage": "node --max_old_space_size=4096 ./node_modules/vite/bin/vite.js build --mode stage",
|
||||
"build:prod": "node --max_old_space_size=4096 ./node_modules/vite/bin/vite.js build --mode prod",
|
||||
"build:local": "node --max_old_space_size=8192 ./node_modules/vite/bin/vite.js build",
|
||||
"build:dev": "node --max_old_space_size=8192 ./node_modules/vite/bin/vite.js build --mode dev",
|
||||
"build:test": "node --max_old_space_size=8192 ./node_modules/vite/bin/vite.js build --mode test",
|
||||
"build:stage": "node --max_old_space_size=8192 ./node_modules/vite/bin/vite.js build --mode stage",
|
||||
"build:prod": "node --max_old_space_size=8192 ./node_modules/vite/bin/vite.js build --mode prod",
|
||||
"serve:dev": "vite preview --mode dev",
|
||||
"serve:prod": "vite preview --mode prod",
|
||||
"preview": "pnpm build:local && vite preview",
|
||||
@ -26,8 +26,8 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"@element-plus/icons-vue": "^2.1.0",
|
||||
"@form-create/designer": "^3.2.6",
|
||||
"@form-create/element-ui": "^3.2.11",
|
||||
"@form-create/designer": "^3.1.3",
|
||||
"@form-create/element-ui": "^3.1.24",
|
||||
"@iconify/iconify": "^3.1.1",
|
||||
"@microsoft/fetch-event-source": "^2.0.1",
|
||||
"@videojs-player/vue": "^1.0.0",
|
||||
@ -38,7 +38,7 @@
|
||||
"animate.css": "^4.1.1",
|
||||
"axios": "^1.6.8",
|
||||
"benz-amr-recorder": "^1.1.5",
|
||||
"bpmn-js-token-simulation": "^0.36.0",
|
||||
"bpmn-js-token-simulation": "^0.10.0",
|
||||
"camunda-bpmn-moddle": "^7.0.1",
|
||||
"cropperjs": "^1.6.1",
|
||||
"crypto-js": "^4.2.0",
|
||||
@ -47,7 +47,7 @@
|
||||
"driver.js": "^1.3.1",
|
||||
"echarts": "^5.5.0",
|
||||
"echarts-wordcloud": "^2.1.0",
|
||||
"element-plus": "2.9.1",
|
||||
"element-plus": "2.8.0",
|
||||
"fast-xml-parser": "^4.3.2",
|
||||
"highlight.js": "^11.9.0",
|
||||
"jsencrypt": "^3.3.2",
|
||||
@ -64,17 +64,14 @@
|
||||
"pinia-plugin-persistedstate": "^3.2.1",
|
||||
"qrcode": "^1.5.3",
|
||||
"qs": "^6.12.0",
|
||||
"sortablejs": "^1.15.3",
|
||||
"steady-xml": "^0.1.0",
|
||||
"url": "^0.11.3",
|
||||
"v3-jsoneditor": "^0.0.6",
|
||||
"video.js": "^7.21.5",
|
||||
"vue": "3.5.12",
|
||||
"vue": "3.4.21",
|
||||
"vue-dompurify-html": "^4.1.4",
|
||||
"vue-i18n": "9.10.2",
|
||||
"vue-router": "4.4.5",
|
||||
"vue-router": "^4.3.0",
|
||||
"vue-types": "^5.1.1",
|
||||
"vue3-signature": "^0.2.4",
|
||||
"vuedraggable": "^4.1.0",
|
||||
"web-storage-cache": "^1.1.1",
|
||||
"xml-js": "^1.6.11"
|
||||
@ -93,14 +90,13 @@
|
||||
"@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",
|
||||
"@vitejs/plugin-vue-jsx": "^3.1.0",
|
||||
"autoprefixer": "^10.4.17",
|
||||
"bpmn-js": "^17.9.2",
|
||||
"bpmn-js-properties-panel": "5.23.0",
|
||||
"bpmn-js": "8.9.0",
|
||||
"bpmn-js-properties-panel": "0.46.0",
|
||||
"consola": "^3.2.3",
|
||||
"eslint": "^8.57.0",
|
||||
"eslint-config-prettier": "^9.1.0",
|
||||
@ -133,8 +129,8 @@
|
||||
"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-top-level-await": "^1.4.4",
|
||||
"vite-plugin-svg-icons": "^2.0.1",
|
||||
"vite-plugin-top-level-await": "^1.3.1",
|
||||
"vue-eslint-parser": "^9.3.2",
|
||||
"vue-tsc": "^1.8.27"
|
||||
},
|
||||
@ -147,7 +143,6 @@
|
||||
"url": "https://gitee.com/yudaocode/yudao-ui-admin-vue3/issues"
|
||||
},
|
||||
"homepage": "https://gitee.com/yudaocode/yudao-ui-admin-vue3",
|
||||
"web-types": "./web-types.json",
|
||||
"engines": {
|
||||
"node": ">= 16.0.0",
|
||||
"pnpm": ">=8.6.0"
|
||||
|
||||
8980
pnpm-lock.yaml
generated
@ -14,16 +14,9 @@ export interface ChatMessageVO {
|
||||
modelId: number // 模型编号
|
||||
content: string // 聊天内容
|
||||
tokens: number // 消耗 Token 数量
|
||||
segmentIds?: number[] // 段落编号
|
||||
segments?: {
|
||||
id: number // 段落编号
|
||||
content: string // 段落内容
|
||||
documentId: number // 文档编号
|
||||
documentName: string // 文档名称
|
||||
}[]
|
||||
createTime: Date // 创建时间
|
||||
roleAvatar: string // 角色头像
|
||||
userAvatar: string // 用户头像
|
||||
userAvatar: string // 创建时间
|
||||
}
|
||||
|
||||
// AI chat 聊天
|
||||
|
||||
@ -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,8 +13,6 @@ export interface ChatRoleVO {
|
||||
welcomeMessage: string // 角色设定
|
||||
publicStatus: boolean // 是否公开
|
||||
status: number // 状态
|
||||
knowledgeIds?: number[] // 引用的知识库 ID 列表
|
||||
toolIds?: number[] // 引用的工具 ID 列表
|
||||
}
|
||||
|
||||
// AI 聊天角色 分页请求 vo
|
||||
|
||||
@ -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 updateWorkflowModel = async (data) => {
|
||||
return await request.put({ url: '/ai/workflow/updateWorkflowModel', data })
|
||||
}
|
||||
8
src/api/bpm/activity/index.ts
Normal file
@ -0,0 +1,8 @@
|
||||
import request from '@/config/axios'
|
||||
|
||||
export const getActivityList = async (params) => {
|
||||
return await request.get({
|
||||
url: '/bpm/activity/list',
|
||||
params
|
||||
})
|
||||
}
|
||||
@ -36,16 +36,6 @@ export const CategoryApi = {
|
||||
return await request.put({ url: `/bpm/category/update`, data })
|
||||
},
|
||||
|
||||
// 批量修改流程分类的排序
|
||||
updateCategorySortBatch: async (ids: number[]) => {
|
||||
return await request.put({
|
||||
url: `/bpm/category/update-sort-batch`,
|
||||
params: {
|
||||
ids: ids.join(',')
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
// 删除流程分类
|
||||
deleteCategory: async (id: number) => {
|
||||
return await request.delete({ url: `/bpm/category/delete?id=` + id })
|
||||
|
||||
@ -20,9 +20,3 @@ export const getProcessDefinitionList = async (params) => {
|
||||
params
|
||||
})
|
||||
}
|
||||
|
||||
export const getSimpleProcessDefinitionList = async () => {
|
||||
return await request.get({
|
||||
url: '/bpm/process-definition/simple-list'
|
||||
})
|
||||
}
|
||||
|
||||
@ -26,11 +26,11 @@ export type ModelVO = {
|
||||
bpmnXml: string
|
||||
}
|
||||
|
||||
export const getModelList = async (name: string | undefined) => {
|
||||
return await request.get({ url: '/bpm/model/list', params: { name } })
|
||||
export const getModelPage = async (params) => {
|
||||
return await request.get({ url: '/bpm/model/page', params })
|
||||
}
|
||||
|
||||
export const getModel = async (id: string) => {
|
||||
export const getModel = async (id: number) => {
|
||||
return await request.get({ url: '/bpm/model/get?id=' + id })
|
||||
}
|
||||
|
||||
@ -38,20 +38,6 @@ export const updateModel = async (data: ModelVO) => {
|
||||
return await request.put({ url: '/bpm/model/update', data: data })
|
||||
}
|
||||
|
||||
// 批量修改流程分类的排序
|
||||
export const updateModelSortBatch = async (ids: number[]) => {
|
||||
return await request.put({
|
||||
url: `/bpm/model/update-sort-batch`,
|
||||
params: {
|
||||
ids: ids.join(',')
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
export const updateModelBpmn = async (data: ModelVO) => {
|
||||
return await request.put({ url: '/bpm/model/update-bpmn', data: data })
|
||||
}
|
||||
|
||||
// 任务状态修改
|
||||
export const updateModelState = async (id: number, state: number) => {
|
||||
const data = {
|
||||
@ -72,7 +58,3 @@ export const deleteModel = async (id: number) => {
|
||||
export const deployModel = async (id: number) => {
|
||||
return await request.post({ url: '/bpm/model/deploy?id=' + id })
|
||||
}
|
||||
|
||||
export const cleanModel = async (id: number) => {
|
||||
return await request.delete({ url: '/bpm/model/clean?id=' + id })
|
||||
}
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
import request from '@/config/axios'
|
||||
import { ProcessDefinitionVO } from '@/api/bpm/model'
|
||||
import { NodeType, CandidateStrategy } from '@/components/SimpleProcessDesignerV2/src/consts'
|
||||
|
||||
export type Task = {
|
||||
id: string
|
||||
name: string
|
||||
@ -22,36 +22,6 @@ export type ProcessInstanceVO = {
|
||||
processDefinition?: ProcessDefinitionVO
|
||||
}
|
||||
|
||||
// 用户信息
|
||||
export type User = {
|
||||
id: number
|
||||
nickname: string
|
||||
avatar: string
|
||||
}
|
||||
|
||||
// 审批任务信息
|
||||
export type ApprovalTaskInfo = {
|
||||
id: number
|
||||
ownerUser: User
|
||||
assigneeUser: User
|
||||
status: number
|
||||
reason: string
|
||||
signPicUrl: string
|
||||
}
|
||||
|
||||
// 审批节点信息
|
||||
export type ApprovalNodeInfo = {
|
||||
id: number
|
||||
name: string
|
||||
nodeType: NodeType
|
||||
candidateStrategy?: CandidateStrategy
|
||||
status: number
|
||||
startTime?: Date
|
||||
endTime?: Date
|
||||
candidateUsers?: User[]
|
||||
tasks: ApprovalTaskInfo[]
|
||||
}
|
||||
|
||||
export const getProcessInstanceMyPage = async (params: any) => {
|
||||
return await request.get({ url: '/bpm/process-instance/my-page', params })
|
||||
}
|
||||
@ -87,23 +57,3 @@ export const getProcessInstance = async (id: string) => {
|
||||
export const getProcessInstanceCopyPage = async (params: any) => {
|
||||
return await request.get({ url: '/bpm/process-instance/copy/page', params })
|
||||
}
|
||||
|
||||
// 获取审批详情
|
||||
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 })
|
||||
}
|
||||
|
||||
// 获取表单字段权限
|
||||
export const getFormFieldsPermission = async (params: any) => {
|
||||
return await request.get({ url: '/bpm/process-instance/get-form-fields-permission', params })
|
||||
}
|
||||
|
||||
// 获取流程实例的 BPMN 模型视图
|
||||
export const getProcessInstanceBpmnModelView = async (id: string) => {
|
||||
return await request.get({ url: '/bpm/process-instance/get-bpmn-model-view?id=' + id })
|
||||
}
|
||||
|
||||
@ -1,15 +0,0 @@
|
||||
import request from '@/config/axios'
|
||||
|
||||
|
||||
export const updateBpmSimpleModel = async (data) => {
|
||||
return await request.post({
|
||||
url: '/bpm/model/simple/update',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
export const getBpmSimpleModel = async (id) => {
|
||||
return await request.get({
|
||||
url: '/bpm/model/simple/get?id=' + id
|
||||
})
|
||||
}
|
||||
@ -1,44 +1,7 @@
|
||||
import request from '@/config/axios'
|
||||
|
||||
/**
|
||||
* 任务状态枚举
|
||||
*/
|
||||
export enum TaskStatusEnum {
|
||||
/**
|
||||
* 未开始
|
||||
*/
|
||||
NOT_START = -1,
|
||||
|
||||
/**
|
||||
* 待审批
|
||||
*/
|
||||
WAIT = 0,
|
||||
/**
|
||||
* 审批中
|
||||
*/
|
||||
RUNNING = 1,
|
||||
/**
|
||||
* 审批通过
|
||||
*/
|
||||
APPROVE = 2,
|
||||
|
||||
/**
|
||||
* 审批不通过
|
||||
*/
|
||||
REJECT = 3,
|
||||
|
||||
/**
|
||||
* 已取消
|
||||
*/
|
||||
CANCEL = 4,
|
||||
/**
|
||||
* 已退回
|
||||
*/
|
||||
RETURN = 5,
|
||||
/**
|
||||
* 审批通过中
|
||||
*/
|
||||
APPROVING = 7
|
||||
export type TaskVO = {
|
||||
id: number
|
||||
}
|
||||
|
||||
export const getTaskTodoPage = async (params: any) => {
|
||||
@ -67,12 +30,12 @@ export const getTaskListByProcessInstanceId = async (processInstanceId: string)
|
||||
})
|
||||
}
|
||||
|
||||
// 获取所有可退回的节点
|
||||
// 获取所有可回退的节点
|
||||
export const getTaskListByReturn = async (id: string) => {
|
||||
return await request.get({ url: '/bpm/task/list-by-return', params: { id } })
|
||||
}
|
||||
|
||||
// 退回
|
||||
// 回退
|
||||
export const returnTask = async (data: any) => {
|
||||
return await request.put({ url: '/bpm/task/return', data })
|
||||
}
|
||||
@ -97,16 +60,6 @@ export const signDeleteTask = async (data: any) => {
|
||||
return await request.delete({ url: '/bpm/task/delete-sign', data })
|
||||
}
|
||||
|
||||
// 抄送
|
||||
export const copyTask = async (data: any) => {
|
||||
return await request.put({ url: '/bpm/task/copy', data })
|
||||
}
|
||||
|
||||
// 获取我的待办任务
|
||||
export const myTodoTask = async (processInstanceId: string) => {
|
||||
return await request.get({ url: '/bpm/task/my-todo?processInstanceId=' + processInstanceId })
|
||||
}
|
||||
|
||||
// 获取减签任务列表
|
||||
export const getChildrenTaskList = async (id: string) => {
|
||||
return await request.get({ url: '/bpm/task/list-by-parent-task-id?parentTaskId=' + id })
|
||||
|
||||
@ -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 })
|
||||
|
||||
@ -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 {
|
||||
// 文件配置编号
|
||||
@ -11,7 +17,7 @@ export interface FilePresignedUrlRespVO {
|
||||
}
|
||||
|
||||
// 查询文件列表
|
||||
export const getFilePage = (params: PageParam) => {
|
||||
export const getFilePage = (params: FilePageReqVO) => {
|
||||
return request.get({ url: '/infra/file/page', params })
|
||||
}
|
||||
|
||||
|
||||
@ -1,169 +0,0 @@
|
||||
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
|
||||
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 // 认证类型
|
||||
latitude: number // 设备位置的纬度
|
||||
longitude: number // 设备位置的经度
|
||||
areaId: number // 地区编码
|
||||
address: string // 设备详细地址
|
||||
serialNumber: string // 设备序列号
|
||||
config: string // 设备配置
|
||||
groupIds?: number[] // 添加分组 ID
|
||||
}
|
||||
|
||||
// IoT 设备数据 VO
|
||||
export interface DeviceDataVO {
|
||||
deviceId: number // 设备编号
|
||||
thinkModelFunctionId: number // 物模型编号
|
||||
productKey: string // 产品标识
|
||||
deviceName: string // 设备名称
|
||||
identifier: string // 属性标识符
|
||||
name: string // 属性名称
|
||||
dataType: string // 数据类型
|
||||
updateTime: Date // 更新时间
|
||||
value: string // 最新值
|
||||
}
|
||||
|
||||
// IoT 设备数据 VO
|
||||
export interface DeviceHistoryDataVO {
|
||||
time: number // 时间
|
||||
data: string // 数据
|
||||
}
|
||||
|
||||
// IoT 设备状态枚举
|
||||
export enum DeviceStateEnum {
|
||||
INACTIVE = 0, // 未激活
|
||||
ONLINE = 1, // 在线
|
||||
OFFLINE = 2 // 离线
|
||||
}
|
||||
|
||||
// IoT 设备上行 Request VO
|
||||
export interface IotDeviceUpstreamReqVO {
|
||||
id: number // 设备编号
|
||||
type: string // 消息类型
|
||||
identifier: string // 标识符
|
||||
data: any // 请求参数
|
||||
}
|
||||
|
||||
// IoT 设备下行 Request VO
|
||||
export interface IotDeviceDownstreamReqVO {
|
||||
id: number // 设备编号
|
||||
type: string // 消息类型
|
||||
identifier: string // 标识符
|
||||
data: any // 请求参数
|
||||
}
|
||||
|
||||
// MQTT 连接参数 VO
|
||||
export interface MqttConnectionParamsVO {
|
||||
mqttClientId: string // MQTT 客户端 ID
|
||||
mqttUsername: string // MQTT 用户名
|
||||
mqttPassword: string // MQTT 密码
|
||||
}
|
||||
|
||||
// 设备 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) => {
|
||||
return await request.get({ url: `/iot/device/simple-list?`, params: { deviceType } })
|
||||
},
|
||||
|
||||
// 获取导入模板
|
||||
importDeviceTemplate: async () => {
|
||||
return await request.download({ url: `/iot/device/get-import-template` })
|
||||
},
|
||||
|
||||
// 设备上行
|
||||
upstreamDevice: async (data: IotDeviceUpstreamReqVO) => {
|
||||
return await request.post({ url: `/iot/device/upstream`, data })
|
||||
},
|
||||
|
||||
// 设备下行
|
||||
downstreamDevice: async (data: IotDeviceDownstreamReqVO) => {
|
||||
return await request.post({ url: `/iot/device/downstream`, data })
|
||||
},
|
||||
|
||||
// 获取设备属性最新数据
|
||||
getLatestDeviceProperties: async (params: any) => {
|
||||
return await request.get({ url: `/iot/device/property/latest`, params })
|
||||
},
|
||||
|
||||
// 获取设备属性历史数据
|
||||
getHistoryDevicePropertyPage: async (params: any) => {
|
||||
return await request.get({ url: `/iot/device/property/history-page`, params })
|
||||
},
|
||||
|
||||
// 查询设备日志分页
|
||||
getDeviceLogPage: async (params: any) => {
|
||||
return await request.get({ url: `/iot/device/log/page`, params })
|
||||
},
|
||||
|
||||
// 获取设备MQTT连接参数
|
||||
getMqttConnectionParams: async (deviceId: number) => {
|
||||
return await request.get({ url: `/iot/device/mqtt-connection-params`, params: { deviceId } })
|
||||
}
|
||||
}
|
||||
@ -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` })
|
||||
}
|
||||
}
|
||||
@ -1,51 +0,0 @@
|
||||
import request from '@/config/axios'
|
||||
|
||||
// IoT 插件配置 VO
|
||||
export interface PluginConfigVO {
|
||||
id: number // 主键ID
|
||||
pluginKey: string // 插件标识
|
||||
name: string // 插件名称
|
||||
description: string // 描述
|
||||
deployType: number // 部署方式
|
||||
fileName: string // 插件包文件名
|
||||
version: string // 插件版本
|
||||
type: number // 插件类型
|
||||
protocol: string // 设备插件协议类型
|
||||
status: number // 状态
|
||||
configSchema: string // 插件配置项描述信息
|
||||
config: string // 插件配置信息
|
||||
script: string // 插件脚本
|
||||
}
|
||||
|
||||
// IoT 插件配置 API
|
||||
export const PluginConfigApi = {
|
||||
// 查询插件配置分页
|
||||
getPluginConfigPage: async (params: any) => {
|
||||
return await request.get({ url: `/iot/plugin-config/page`, params })
|
||||
},
|
||||
|
||||
// 查询插件配置详情
|
||||
getPluginConfig: async (id: number) => {
|
||||
return await request.get({ url: `/iot/plugin-config/get?id=` + id })
|
||||
},
|
||||
|
||||
// 新增插件配置
|
||||
createPluginConfig: async (data: PluginConfigVO) => {
|
||||
return await request.post({ url: `/iot/plugin-config/create`, data })
|
||||
},
|
||||
|
||||
// 修改插件配置
|
||||
updatePluginConfig: async (data: PluginConfigVO) => {
|
||||
return await request.put({ url: `/iot/plugin-config/update`, data })
|
||||
},
|
||||
|
||||
// 删除插件配置
|
||||
deletePluginConfig: async (id: number) => {
|
||||
return await request.delete({ url: `/iot/plugin-config/delete?id=` + id })
|
||||
},
|
||||
|
||||
// 修改插件状态
|
||||
updatePluginStatus: async (data: any) => {
|
||||
return await request.put({ url: `/iot/plugin-config/update-status`, data })
|
||||
}
|
||||
}
|
||||
@ -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' })
|
||||
}
|
||||
}
|
||||
@ -1,82 +0,0 @@
|
||||
import request from '@/config/axios'
|
||||
|
||||
// IoT 产品 VO
|
||||
export interface ProductVO {
|
||||
id: number // 产品编号
|
||||
name: string // 产品名称
|
||||
productKey: string // 产品标识
|
||||
protocolId: number // 协议编号
|
||||
categoryId: number // 产品所属品类标识符
|
||||
categoryName?: string // 产品所属品类名称
|
||||
icon: string // 产品图标
|
||||
picUrl: string // 产品图片
|
||||
description: string // 产品描述
|
||||
validateType: number // 数据校验级别
|
||||
status: number // 产品状态
|
||||
deviceType: number // 设备类型
|
||||
netType: number // 联网方式
|
||||
protocolType: number // 接入网关协议
|
||||
dataFormat: number // 数据格式
|
||||
deviceCount: number // 设备数量
|
||||
createTime: Date // 创建时间
|
||||
}
|
||||
|
||||
// IOT 数据校验级别枚举类
|
||||
export enum ValidateTypeEnum {
|
||||
WEAK = 0, // 弱校验
|
||||
NONE = 1 // 免校验
|
||||
}
|
||||
// IOT 产品设备类型枚举类 0: 直连设备, 1: 网关子设备, 2: 网关设备
|
||||
export enum DeviceTypeEnum {
|
||||
DEVICE = 0, // 直连设备
|
||||
GATEWAY_SUB = 1, // 网关子设备
|
||||
GATEWAY = 2 // 网关设备
|
||||
}
|
||||
// IOT 数据格式枚举类
|
||||
export enum DataFormatEnum {
|
||||
JSON = 0, // 标准数据格式(JSON)
|
||||
CUSTOMIZE = 1 // 透传/自定义
|
||||
}
|
||||
|
||||
// IoT 产品 API
|
||||
export const ProductApi = {
|
||||
// 查询产品分页
|
||||
getProductPage: async (params: any) => {
|
||||
return await request.get({ url: `/iot/product/page`, params })
|
||||
},
|
||||
|
||||
// 查询产品详情
|
||||
getProduct: async (id: number) => {
|
||||
return await request.get({ url: `/iot/product/get?id=` + id })
|
||||
},
|
||||
|
||||
// 新增产品
|
||||
createProduct: async (data: ProductVO) => {
|
||||
return await request.post({ url: `/iot/product/create`, data })
|
||||
},
|
||||
|
||||
// 修改产品
|
||||
updateProduct: async (data: ProductVO) => {
|
||||
return await request.put({ url: `/iot/product/update`, data })
|
||||
},
|
||||
|
||||
// 删除产品
|
||||
deleteProduct: async (id: number) => {
|
||||
return await request.delete({ url: `/iot/product/delete?id=` + id })
|
||||
},
|
||||
|
||||
// 导出产品 Excel
|
||||
exportProduct: async (params) => {
|
||||
return await request.download({ url: `/iot/product/export-excel`, params })
|
||||
},
|
||||
|
||||
// 更新产品状态
|
||||
updateProductStatus: async (id: number, status: number) => {
|
||||
return await request.put({ url: `/iot/product/update-status?id=` + id + `&status=` + status })
|
||||
},
|
||||
|
||||
// 查询产品(精简)列表
|
||||
getSimpleProductList() {
|
||||
return request.get({ url: '/iot/product/simple-list' })
|
||||
}
|
||||
}
|
||||
@ -1,127 +0,0 @@
|
||||
import request from '@/config/axios'
|
||||
|
||||
// IoT 数据桥梁 VO
|
||||
export interface DataBridgeVO {
|
||||
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
|
||||
}
|
||||
|
||||
/** 数据桥梁类型 */
|
||||
// TODO @puhui999:枚举用 number 可以么?
|
||||
export const IoTDataBridgeConfigType = {
|
||||
HTTP: '1',
|
||||
TCP: '2',
|
||||
WEBSOCKET: '3',
|
||||
MQTT: '10',
|
||||
DATABASE: '20',
|
||||
REDIS_STREAM: '21',
|
||||
ROCKETMQ: '30',
|
||||
RABBITMQ: '31',
|
||||
KAFKA: '32'
|
||||
} as const
|
||||
|
||||
// 数据桥梁 API
|
||||
export const DataBridgeApi = {
|
||||
// 查询数据桥梁分页
|
||||
getDataBridgePage: async (params: any) => {
|
||||
return await request.get({ url: `/iot/data-bridge/page`, params })
|
||||
},
|
||||
|
||||
// 查询数据桥梁详情
|
||||
getDataBridge: async (id: number) => {
|
||||
return await request.get({ url: `/iot/data-bridge/get?id=` + id })
|
||||
},
|
||||
|
||||
// 新增数据桥梁
|
||||
createDataBridge: async (data: DataBridgeVO) => {
|
||||
return await request.post({ url: `/iot/data-bridge/create`, data })
|
||||
},
|
||||
|
||||
// 修改数据桥梁
|
||||
updateDataBridge: async (data: DataBridgeVO) => {
|
||||
return await request.put({ url: `/iot/data-bridge/update`, data })
|
||||
},
|
||||
|
||||
// 删除数据桥梁
|
||||
deleteDataBridge: async (id: number) => {
|
||||
return await request.delete({ url: `/iot/data-bridge/delete?id=` + id })
|
||||
},
|
||||
|
||||
// 导出数据桥梁 Excel
|
||||
exportDataBridge: async (params) => {
|
||||
return await request.download({ url: `/iot/data-bridge/export-excel`, params })
|
||||
}
|
||||
}
|
||||
@ -1,41 +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>
|
||||
}
|
||||
|
||||
/** IoT 消息统计数据类型 */
|
||||
export interface IotStatisticsDeviceMessageSummaryRespVO {
|
||||
upstreamCounts: Record<number, number>
|
||||
downstreamCounts: Record<number, number>
|
||||
}
|
||||
|
||||
// IoT 数据统计 API
|
||||
export const ProductCategoryApi = {
|
||||
// 查询基础的数据统计
|
||||
getIotStatisticsSummary: async () => {
|
||||
return await request.get<IotStatisticsSummaryRespVO>({
|
||||
url: `/iot/statistics/get-summary`
|
||||
})
|
||||
},
|
||||
|
||||
// 查询设备上下行消息的数据统计
|
||||
getIotStatisticsDeviceMessageSummary: async (params: { startTime: number; endTime: number }) => {
|
||||
return await request.get<IotStatisticsDeviceMessageSummaryRespVO>({
|
||||
url: `/iot/statistics/get-log-summary`,
|
||||
params
|
||||
})
|
||||
}
|
||||
}
|
||||
@ -1,88 +0,0 @@
|
||||
import request from '@/config/axios'
|
||||
|
||||
/**
|
||||
* 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 // 服务
|
||||
}
|
||||
|
||||
/**
|
||||
* IoT 模拟设备
|
||||
*/
|
||||
// TODO @super:和 ThingModelSimulatorData 会不会好点
|
||||
export interface SimulatorData extends ThingModelData {
|
||||
simulateValue?: string | number // 用于存储模拟值 TODO @super:字段使用 value 会不会好点
|
||||
}
|
||||
|
||||
/**
|
||||
* ThingModelProperty 类型
|
||||
*/
|
||||
export interface ThingModelProperty {
|
||||
[key: string]: any
|
||||
}
|
||||
|
||||
/**
|
||||
* ThingModelEvent 类型
|
||||
*/
|
||||
export interface ThingModelEvent {
|
||||
[key: string]: any
|
||||
}
|
||||
|
||||
/**
|
||||
* ThingModelService 类型
|
||||
*/
|
||||
export interface ThingModelService {
|
||||
[key: string]: any
|
||||
}
|
||||
|
||||
// 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 })
|
||||
},
|
||||
|
||||
// 获得产品物模型
|
||||
getThingModelListByProductId: async (params: any) => {
|
||||
return await request.get({
|
||||
url: `/iot/thing-model/list-by-product-id`,
|
||||
params
|
||||
})
|
||||
},
|
||||
|
||||
// 查询产品物模型详情
|
||||
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 })
|
||||
}
|
||||
}
|
||||
@ -1,5 +1,6 @@
|
||||
import request from '@/config/axios'
|
||||
import type { RegisterVO, UserLoginVO } from './types'
|
||||
import { getRefreshToken } from '@/utils/auth'
|
||||
import type { UserLoginVO } from './types'
|
||||
|
||||
export interface SmsCodeVO {
|
||||
mobile: string
|
||||
@ -16,9 +17,9 @@ export const login = (data: UserLoginVO) => {
|
||||
return request.post({ url: '/system/auth/login', data })
|
||||
}
|
||||
|
||||
// 注册
|
||||
export const register = (data: RegisterVO) => {
|
||||
return request.post({ url: '/system/auth/register', data })
|
||||
// 刷新访问令牌
|
||||
export const refreshToken = () => {
|
||||
return request.post({ url: '/system/auth/refresh-token?refreshToken=' + getRefreshToken() })
|
||||
}
|
||||
|
||||
// 使用租户名,获得租户编号
|
||||
@ -70,16 +71,11 @@ export const socialAuthRedirect = (type: number, redirectUri: string) => {
|
||||
})
|
||||
}
|
||||
// 获取验证图片以及 token
|
||||
export const getCode = (data: any) => {
|
||||
export const getCode = (data) => {
|
||||
return request.postOriginal({ url: 'system/captcha/get', data })
|
||||
}
|
||||
|
||||
// 滑动或者点选验证
|
||||
export const reqCheck = (data: any) => {
|
||||
export const reqCheck = (data) => {
|
||||
return request.postOriginal({ url: 'system/captcha/check', data })
|
||||
}
|
||||
|
||||
// 通过短信重置密码
|
||||
export const smsResetPassword = (data: any) => {
|
||||
return request.post({ url: '/system/auth/reset-password', data })
|
||||
}
|
||||
|
||||
@ -27,7 +27,7 @@ export const authorize = (
|
||||
return request.post({
|
||||
url: '/system/oauth2/authorize',
|
||||
headers: {
|
||||
'Content-Type': 'application/x-www-form-urlencoded'
|
||||
'Content-type': 'application/x-www-form-urlencoded'
|
||||
},
|
||||
params: {
|
||||
response_type: responseType,
|
||||
|
||||
@ -29,10 +29,3 @@ export type UserVO = {
|
||||
loginIp: string
|
||||
loginDate: string
|
||||
}
|
||||
|
||||
export type RegisterVO = {
|
||||
tenantName: string
|
||||
username: string
|
||||
password: string
|
||||
captchaVerification: string
|
||||
}
|
||||
|
||||
@ -101,7 +101,7 @@ export const deleteSpu = (id: number) => {
|
||||
}
|
||||
|
||||
// 导出商品 Spu Excel
|
||||
export const exportSpu = async (params: any) => {
|
||||
export const exportSpu = async (params) => {
|
||||
return await request.download({ url: '/product/spu/export', params })
|
||||
}
|
||||
|
||||
|
||||
@ -21,10 +21,6 @@ export const KeFuConversationApi = {
|
||||
getConversationList: async () => {
|
||||
return await request.get({ url: '/promotion/kefu-conversation/list' })
|
||||
},
|
||||
// 获得客服会话
|
||||
getConversation: async (id: number) => {
|
||||
return await request.get({ url: `/promotion/kefu-conversation/get?id=` + id })
|
||||
},
|
||||
// 客服会话置顶
|
||||
updateConversationPinned: async (data: any) => {
|
||||
return await request.put({
|
||||
@ -34,6 +30,6 @@ export const KeFuConversationApi = {
|
||||
},
|
||||
// 删除客服会话
|
||||
deleteConversation: async (id: number) => {
|
||||
return await request.delete({ url: `/promotion/kefu-conversation/delete?id=${id}` })
|
||||
return await request.delete({ url: `/promotion/kefu-conversation/delete?id=${id}`})
|
||||
}
|
||||
}
|
||||
|
||||
@ -29,8 +29,8 @@ export const KeFuMessageApi = {
|
||||
url: '/promotion/kefu-message/update-read-status?conversationId=' + conversationId
|
||||
})
|
||||
},
|
||||
// 获得消息列表(流式加载)
|
||||
getKeFuMessageList: async (params: any) => {
|
||||
return await request.get({ url: '/promotion/kefu-message/list', params })
|
||||
// 获得消息分页数据
|
||||
getKeFuMessagePage: async (params: any) => {
|
||||
return await request.get({ url: '/promotion/kefu-message/page', params })
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,91 +0,0 @@
|
||||
import request from '@/config/axios'
|
||||
import { Sku, Spu } from '@/api/mall/product/spu' // 积分商城活动 VO
|
||||
|
||||
// 积分商城活动 VO
|
||||
export interface PointActivityVO {
|
||||
id: number // 积分商城活动编号
|
||||
spuId: number // 积分商城活动商品
|
||||
status: number // 活动状态
|
||||
stock: number // 积分商城活动库存
|
||||
totalStock: number // 积分商城活动总库存
|
||||
remark?: string // 备注
|
||||
sort: number // 排序
|
||||
createTime: string // 创建时间
|
||||
products: PointProductVO[] // 积分商城商品
|
||||
|
||||
// ========== 商品字段 ==========
|
||||
spuName: string // 商品名称
|
||||
picUrl: string // 商品主图
|
||||
marketPrice: number // 商品市场价,单位:分
|
||||
|
||||
//======================= 显示所需兑换积分最少的 sku 信息 =======================
|
||||
point: number // 兑换积分
|
||||
price: number // 兑换金额,单位:分
|
||||
}
|
||||
|
||||
// 秒杀活动所需属性
|
||||
export interface PointProductVO {
|
||||
id?: number // 积分商城商品编号
|
||||
activityId?: number // 积分商城活动 id
|
||||
spuId?: number // 商品 SPU 编号
|
||||
skuId: number // 商品 SKU 编号
|
||||
count: number // 可兑换数量
|
||||
point: number // 兑换积分
|
||||
price: number // 兑换金额,单位:分
|
||||
stock: number // 积分商城商品库存
|
||||
activityStatus?: number // 积分商城商品状态
|
||||
}
|
||||
|
||||
// 扩展 Sku 配置
|
||||
export type SkuExtension = Sku & {
|
||||
productConfig: PointProductVO
|
||||
}
|
||||
|
||||
export interface SpuExtension extends Spu {
|
||||
skus: SkuExtension[] // 重写类型
|
||||
}
|
||||
|
||||
export interface SpuExtension0 extends Spu {
|
||||
pointStock: number // 积分商城活动库存
|
||||
pointTotalStock: number // 积分商城活动总库存
|
||||
point: number // 兑换积分
|
||||
pointPrice: number // 兑换金额,单位:分
|
||||
}
|
||||
|
||||
// 积分商城活动 API
|
||||
export const PointActivityApi = {
|
||||
// 查询积分商城活动分页
|
||||
getPointActivityPage: async (params: any) => {
|
||||
return await request.get({ url: `/promotion/point-activity/page`, params })
|
||||
},
|
||||
|
||||
// 查询积分商城活动详情
|
||||
getPointActivity: async (id: number) => {
|
||||
return await request.get({ url: `/promotion/point-activity/get?id=` + id })
|
||||
},
|
||||
|
||||
// 查询积分商城活动列表,基于活动编号数组
|
||||
getPointActivityListByIds: async (ids: number[]) => {
|
||||
return request.get({ url: `/promotion/point-activity/list-by-ids?ids=${ids}` })
|
||||
},
|
||||
|
||||
// 新增积分商城活动
|
||||
createPointActivity: async (data: PointActivityVO) => {
|
||||
return await request.post({ url: `/promotion/point-activity/create`, data })
|
||||
},
|
||||
|
||||
// 修改积分商城活动
|
||||
updatePointActivity: async (data: PointActivityVO) => {
|
||||
return await request.put({ url: `/promotion/point-activity/update`, data })
|
||||
},
|
||||
|
||||
// 删除积分商城活动
|
||||
deletePointActivity: async (id: number) => {
|
||||
return await request.delete({ url: `/promotion/point-activity/delete?id=` + id })
|
||||
},
|
||||
|
||||
// 关闭秒杀活动
|
||||
closePointActivity: async (id: number) => {
|
||||
return await request.put({ url: '/promotion/point-activity/close?id=' + id })
|
||||
}
|
||||
}
|
||||
@ -47,12 +47,7 @@ export const getReward = async (id: number) => {
|
||||
return await request.get({ url: '/promotion/reward-activity/get?id=' + id })
|
||||
}
|
||||
|
||||
// 删除满减送活动
|
||||
// 删除限时折扣活动
|
||||
export const deleteRewardActivity = async (id: number) => {
|
||||
return await request.delete({ url: '/promotion/reward-activity/delete?id=' + id })
|
||||
}
|
||||
|
||||
// 关闭满减送活动
|
||||
export const closeRewardActivity = async (id: number) => {
|
||||
return await request.put({ url: '/promotion/reward-activity/close?id=' + id })
|
||||
}
|
||||
|
||||
@ -18,7 +18,6 @@ export interface SeckillActivityVO {
|
||||
singleLimitCount?: number
|
||||
stock?: number
|
||||
totalStock?: number
|
||||
seckillPrice?: number
|
||||
products?: SeckillProductVO[]
|
||||
}
|
||||
|
||||
@ -44,11 +43,6 @@ export const getSeckillActivityPage = async (params) => {
|
||||
return await request.get({ url: '/promotion/seckill-activity/page', params })
|
||||
}
|
||||
|
||||
// 查询秒杀活动列表,基于活动编号数组
|
||||
export const getSeckillActivityListByIds = (ids: number[]) => {
|
||||
return request.get({ url: `/promotion/seckill-activity/list-by-ids?ids=${ids}` })
|
||||
}
|
||||
|
||||
// 查询秒杀活动详情
|
||||
export const getSeckillActivity = async (id: number) => {
|
||||
return await request.get({ url: '/promotion/seckill-activity/get?id=' + id })
|
||||
|
||||
@ -13,11 +13,6 @@ export interface BrokerageUserVO {
|
||||
avatar: string
|
||||
}
|
||||
|
||||
// 创建分销用户
|
||||
export const createBrokerageUser = (data: any) => {
|
||||
return request.post({ url: '/trade/brokerage-user/create', data })
|
||||
}
|
||||
|
||||
// 查询分销用户列表
|
||||
export const getBrokerageUserPage = async (params: any) => {
|
||||
return await request.get({ url: `/trade/brokerage-user/page`, params })
|
||||
|
||||
@ -13,11 +13,10 @@ export interface DeliveryPickUpStoreVO {
|
||||
latitude: number
|
||||
longitude: number
|
||||
status: number
|
||||
verifyUserIds: number[] // 绑定用户编号组数
|
||||
}
|
||||
|
||||
// 查询自提门店列表
|
||||
export const getDeliveryPickUpStorePage = async (params: any) => {
|
||||
export const getDeliveryPickUpStorePage = async (params) => {
|
||||
return await request.get({ url: '/trade/delivery/pick-up-store/page', params })
|
||||
}
|
||||
|
||||
@ -27,8 +26,8 @@ export const getDeliveryPickUpStore = async (id: number) => {
|
||||
}
|
||||
|
||||
// 查询自提门店精简列表
|
||||
export const getSimpleDeliveryPickUpStoreList = async (): Promise<DeliveryPickUpStoreVO[]> => {
|
||||
return await request.get({ url: '/trade/delivery/pick-up-store/simple-list' })
|
||||
export const getListAllSimple = async (): Promise<DeliveryPickUpStoreVO[]> => {
|
||||
return await request.get({ url: '/trade/delivery/pick-up-store/list-all-simple' })
|
||||
}
|
||||
|
||||
// 新增自提门店
|
||||
@ -45,8 +44,3 @@ export const updateDeliveryPickUpStore = async (data: DeliveryPickUpStoreVO) =>
|
||||
export const deleteDeliveryPickUpStore = async (id: number) => {
|
||||
return await request.delete({ url: '/trade/delivery/pick-up-store/delete?id=' + id })
|
||||
}
|
||||
|
||||
// 绑定自提店员
|
||||
export const bindStoreStaffId = async (data: any) => {
|
||||
return await request.post({ url: '/trade/delivery/pick-up-store/bind', data })
|
||||
}
|
||||
|
||||
@ -8,7 +8,6 @@ export interface AppVO {
|
||||
remark: string
|
||||
payNotifyUrl: string
|
||||
refundNotifyUrl: string
|
||||
transferNotifyUrl: string
|
||||
merchantId: number
|
||||
merchantName: string
|
||||
createTime: Date
|
||||
@ -20,7 +19,6 @@ export interface AppPageReqVO extends PageParam {
|
||||
remark?: string
|
||||
payNotifyUrl?: string
|
||||
refundNotifyUrl?: string
|
||||
transferNotifyUrl?: string
|
||||
merchantName?: string
|
||||
createTime?: Date[]
|
||||
}
|
||||
|
||||
@ -84,14 +84,8 @@ export const getOrderPage = async (params: OrderPageReqVO) => {
|
||||
}
|
||||
|
||||
// 查询详情支付订单
|
||||
export const getOrder = async (id: number, sync?: boolean) => {
|
||||
return await request.get({
|
||||
url: '/pay/order/get',
|
||||
params: {
|
||||
id,
|
||||
sync
|
||||
}
|
||||
})
|
||||
export const getOrder = async (id: number) => {
|
||||
return await request.get({ url: '/pay/order/get?id=' + id })
|
||||
}
|
||||
|
||||
// 获得支付订单的明细
|
||||
|
||||
@ -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 })
|
||||
@ -43,7 +48,7 @@ export const deleteUser = (id: number) => {
|
||||
}
|
||||
|
||||
// 导出用户
|
||||
export const exportUser = (params: any) => {
|
||||
export const exportUser = (params) => {
|
||||
return request.download({ url: '/system/user/export', params })
|
||||
}
|
||||
|
||||
@ -53,7 +58,7 @@ export const importUserTemplate = () => {
|
||||
}
|
||||
|
||||
// 用户密码重置
|
||||
export const resetUserPassword = (id: number, password: string) => {
|
||||
export const resetUserPwd = (id: number, password: string) => {
|
||||
const data = {
|
||||
id,
|
||||
password
|
||||
|
||||
|
Before Width: | Height: | Size: 9.8 KiB |
@ -1 +0,0 @@
|
||||
<svg t="1731390087280" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="4297" width="200" height="200"><path d="M639.9 541.7c76.4-44.2 127.9-126.8 127.9-221.5C767.7 179 653.2 64.5 512 64.5S256.3 179 256.3 320.2c0 89.6 46.1 168.4 115.8 214.1C193.5 593 64.5 761.2 64.5 959.5h63.9c0-211.5 172.1-383.6 383.6-383.6 44.9 0 87.8 8.1 127.9 22.4v-56.6zM320.2 320.2c0-105.8 86-191.8 191.8-191.8s191.8 86 191.8 191.8S617.7 512 512 512s-191.8-86-191.8-191.8zM831.6 767.7V639.9h-63.9v127.8H639.9v63.9h127.8v127.9h63.9V831.6h127.9v-63.9z" fill="#5f6266" p-id="4298"></path></svg>
|
||||
|
Before Width: | Height: | Size: 608 B |
|
Before Width: | Height: | Size: 7.4 KiB After Width: | Height: | Size: 7.4 KiB |
|
Before Width: | Height: | Size: 10 KiB After Width: | Height: | Size: 10 KiB |
|
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 11 KiB |
@ -1 +0,0 @@
|
||||
<svg t="1729561718271" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="8640" width="200" height="200"><path d="M908.5952 920.4224H164.7616a31.0784 31.0784 0 0 1-30.976-30.976c0-17.0496 13.9264-30.976 30.976-30.976h743.8336c17.0496 0 31.0272 13.9264 31.0272 30.976a31.0784 31.0784 0 0 1-31.0272 30.976z m0-123.9552H164.7616a31.0784 31.0784 0 0 1-30.976-30.976v-154.9824c0-51.1488 41.8304-92.9792 92.9792-92.9792h198.3488c-6.1952-37.1712-24.7808-72.8064-51.1488-103.8336a216.576 216.576 0 0 1-54.2208-144.128c0-58.88 23.2448-114.688 66.6112-156.4672C429.7728 71.168 485.5296 51.0976 545.9968 52.6848c111.5648 4.608 206.08 100.6592 207.616 212.2752 1.536 55.808-20.1216 110.0288-57.344 151.8592-26.3168 27.904-41.8304 61.952-48.0256 100.7104h198.3488c51.2 0 93.0304 41.8304 93.0304 92.9792v154.9824a31.0784 31.0784 0 0 1-31.0272 30.976z m-712.8064-61.952H877.568v-124.0064a31.0784 31.0784 0 0 0-31.0272-30.976h-232.448a31.0784 31.0784 0 0 1-30.976-31.0272c0-65.024 23.2448-127.0784 66.6624-173.568 27.8528-29.3888 41.8304-68.1472 41.8304-108.4416-1.536-80.5888-68.1984-148.7872-148.7872-151.8592a150.528 150.528 0 0 0-113.152 43.3664 153.6 153.6 0 0 0-48.0256 111.616c0 37.1712 13.9776 74.3424 38.7584 102.2464 44.9536 51.1488 69.7344 113.152 69.7344 176.64a31.0784 31.0784 0 0 1-30.976 31.0272h-232.448a31.0784 31.0784 0 0 0-30.976 30.976v123.9552z" fill="#fff" p-id="8641"></path></svg>
|
||||
|
Before Width: | Height: | Size: 1.4 KiB |
|
Before Width: | Height: | Size: 7.4 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 t="1729585232424" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1602" width="200" height="200"><path d="M925.5 898.9H804.9c-19 0-34.5-15.4-34.5-34.4V761.3c0-19 15.4-34.4 34.5-34.4h34.5V572.2c0-19-15.4-34.4-34.5-34.4H529.2V727h34.5c19 0 34.5 15.4 34.5 34.4v103.2c0 19-15.4 34.4-34.5 34.4H443.1c-19 0-34.5-15.4-34.5-34.4V761.3c0-19 15.4-34.4 34.5-34.4h34.5V537.8H219.1c-19 0-34.5 15.4-34.5 34.4V727h34.5c19 0 34.5 15.4 34.5 34.4v103.2c0 19-15.4 34.4-34.5 34.4H98.5c-19 0-34.5-15.4-34.5-34.4V761.3c0-19 15.4-34.4 34.5-34.4H133V555c0-38 30.9-68.8 68.9-68.8h275.7V297.1h-34.5c-19 0-34.5-15.4-34.5-34.4V159.5c0-19 15.4-34.4 34.5-34.4h120.6c19 0 34.5 15.4 34.5 34.4v103.2c0 19-15.4 34.4-34.5 34.4h-34.5v189.2h292.9c38.1 0 68.9 30.8 68.9 68.8v172h34.5c19 0 34.5 15.4 34.5 34.4v103.2c0 18.8-15.4 34.2-34.5 34.2z m0 0" p-id="1603" fill="#fff"></path></svg>
|
||||
|
Before Width: | Height: | Size: 897 B |
@ -1 +0,0 @@
|
||||
<svg t="1729649333541" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1644" width="200" height="200"><path d="M647.888 893.84L491.904 571.52l393.888-393.888-237.904 716.208zM872.32 123.232L459.872 535.68 134.96 380.88 872.32 123.232z m90.72-68.32a23.968 23.968 0 0 0-24.784-5.568L64.08 354.816a23.984 23.984 0 0 0-2.4 44.32l381.392 181.728 187.36 387.088a24.048 24.048 0 0 0 23.152 13.504 24.032 24.032 0 0 0 21.232-16.4L968.96 79.552c2.88-8.672 0.592-18.24-5.92-24.64z" fill="#fff" p-id="1645"></path></svg>
|
||||
|
Before Width: | Height: | Size: 553 B |
@ -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="1735905505218" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="4277" width="200" height="200" xmlns:xlink="http://www.w3.org/1999/xlink"><path d="M561.778 454.929h198.117c0.549 0 0.994 0.444 0.994 1.001v97.553a0.998 0.998 0 0 1-0.994 1.001H463.224a1.005 1.005 0 0 1-1.002-1V207.04c0-0.552 0.444-1 1.002-1h97.552c0.553 0 1.002 0.455 1.002 1v247.89zM512 952.706c-247.424 0-448-200.576-448-448 0-247.423 200.576-448 448-448s448 200.577 448 448c0 247.424-200.576 448-448 448z m0-99.555c192.44 0 348.444-156.004 348.444-348.445 0-192.44-156.003-348.444-348.444-348.444-192.44 0-348.444 156.004-348.444 348.444 0 192.441 156.003 348.445 348.444 348.445z" fill="#3296FA" p-id="4278"></path></svg>
|
||||
|
Before Width: | Height: | Size: 876 B |
@ -1 +0,0 @@
|
||||
<svg t="1730189225011" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2651" id="mx_n_1730189225011" width="200" height="200"><path d="M793.889347 200.380242c27.648573 20.615681 42.196018 32.710677 63.781037 56.119312 25.313864 27.453234 43.242957 48.52047 64.502857 86.507991 44.537416 79.580127 53.527718 136.949077 53.517684 212.063821 0 64.933675-15.452562 130.459388-40.138263 187.311893-22.076044 50.841799-61.545336 104.359483-101.886297 138.933914-45.506755 39.001681-81.214423 60.462941-137.605337 81.826531-55.699867 21.102023-114.070267 28.641326-181.379458 27.791064-68.274516-0.862973-129.364283-11.040029-180.533878-31.80489-46.159002-18.731189-98.338744-46.827973-141.596418-87.541551-43.946046-41.361142-70.369064-75.958317-93.88139-127.198155-26.157437-57.004361-40.094111-129.065922-39.680686-191.781288 0-36.980719 4.033895-70.902234 12.252873-105.241856 8.532726-35.651474 20.069131-69.572989 38.13135-102.35257 18.856956-34.221214 36.754607-62.067803 58.869452-88.973149 23.248751-28.285434 39.2104-46.417894 64.295476-63.475987 18.297696-12.442861 36.879036-9.295353 47.199252-2.306612 4.403836 2.982273 8.919391 6.577992 12.933218 12.933217 9.572307 15.156208-0.334486 29.769212-6.69038 38.465836-7.148625 9.781026-23.130343 26.023643-38.738775 43.218205-38.192895 42.075603-55.133918 65.965228-74.986303 106.965794-30.772668 63.552249-37.495827 115.718611-38.131349 166.573791-0.668971 53.517684 9.995096 99.647251 27.427813 140.483919 33.916163 80.572211 94.807915 144.44289 175.270414 178.615938 41.108271 17.845472 113.812713 37.319888 181.960793 38.13135 56.193568 0.668971 125.919751-11.321666 166.574459-28.096784 45.935566-18.954626 97.223569-56.862539 127.10383-94.324918 23.013273-28.852721 52.179742-70.910931 64.413884-105.694749 14.863868-42.260239 24.806784-87.661297 24.559934-132.458943 0-54.414105-11.53373-108.417461-36.918505-156.856317-20.16747-38.483228-46.480777-74.607665-84.66899-108.048189-13.377414-11.714352-23.822728-20.067124-38.808348-31.619586-10.191774-7.857065-36.059546-25.027545-28.923632-47.326356 4.970455-15.53217 18.303717-25.294464 31.887843-27.205046 19.456354-2.736092 28.565733 2.427027 43.705885 12.041479l6.179955 4.322891zM510.755379 531.65738c-8.696624-0.668971-10.034566-0.446204-20.738102-6.689711-11.031333-6.434832-17.839451-21.183637-16.514219-35.175166V92.220334c0-18.178619 0.386665-22.815926 8.988295-31.685813 5.351768-5.519011 10.963097-11.381873 26.08987-11.539751 16.055305-0.167243 21.407073 3.846584 27.929542 9.700081 9.70677 8.711341 10.703537 17.56049 10.377078 33.525483v397.5715c-0.509756 15.273947 0.326458 22.967114-11.380535 33.502739-3.884046 3.495374-8.027653 7.693167-20.96087 8.362138l-3.791059 0.000669z m4.453341 0.573308" p-id="2652" fill="#ffffff"></path></svg>
|
||||
|
Before Width: | Height: | Size: 2.7 KiB |
@ -1 +0,0 @@
|
||||
<svg t="1729585239190" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1755" width="200" height="200"><path d="M901.489435 536.822664v-0.931601l-1.001722-198.240726c-0.100172-19.162936-9.21584-37.474409-25.043042-50.246361-14.024104-11.349507-32.265456-17.60025-51.348255-17.610268l-618.062295-0.18031c-19.142902 0-37.424323 6.280795-51.478478 17.690405-15.827203 12.842072-24.902802 31.2437-24.892785 50.486775v196.798247A114.987635 114.987635 0 1 0 195.295664 536.922836V338.782282c1.15198-1.252152 4.808264-3.596181 10.768509-3.596181l276.725622 0.090155v199.753326a114.987635 114.987635 0 1 0 65.612772 1.412428V335.326342l275.693849 0.080138c6.01033 0 9.626546 2.344029 10.768508 3.596181l1.001722 195.70637a114.987635 114.987635 0 1 0 65.592737 2.113633zM214.979496 645.910158a56.437001 56.437001 0 1 1-56.437001-56.437001 56.507122 56.507122 0 0 1 56.437001 56.437001z m354.689623 0a56.437001 56.437001 0 1 1-56.437001-56.437001 56.507122 56.507122 0 0 1 56.437001 56.437001z m295.507904 56.437001a56.437001 56.437001 0 1 1 56.437001-56.437001 56.507122 56.507122 0 0 1-56.457035 56.437001z" p-id="1756" fill='#fff'></path></svg>
|
||||
|
Before Width: | Height: | Size: 1.2 KiB |
@ -1 +0,0 @@
|
||||
<svg width="22" height="22" xmlns="http://www.w3.org/2000/svg"><g fill="none" fill-rule="evenodd"><path fill="#FAFAFA" d="M0 0h22v22H0z"/><circle fill="#919BAE" cx="1" cy="1" r="1"/></g></svg>
|
||||
|
Before Width: | Height: | Size: 192 B |
@ -1 +0,0 @@
|
||||
<svg t="1729561814171" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1359" width="200" height="200"><path d="M674.496 603.456c120.256 0 218.176 90.752 221.44 203.84l0.064 5.888v125.888c0 11.52-9.92 20.928-22.144 20.928h-44.352a21.568 21.568 0 0 1-22.144-20.928v-125.888c0-67.712-56.512-123.264-128-125.76l-4.928-0.064H349.568c-71.488 0-130.176 53.504-132.864 121.152l-0.064 4.672v125.888c0 11.52-9.92 20.928-22.144 20.928h-44.352A21.568 21.568 0 0 1 128 939.072v-125.888c0-113.92 95.872-206.528 215.36-209.664l6.208-0.064h324.928zM497.216 128c122.368 0 221.568 93.888 221.568 209.728s-99.2 209.792-221.568 209.792c-122.304 0-221.44-93.952-221.44-209.728C275.712 221.952 374.848 128 497.152 128z m0 83.904c-73.408 0-132.864 56.32-132.864 125.888 0 69.504 59.52 125.824 132.864 125.824 73.408 0 132.928-56.32 132.928-125.824 0-69.504-59.52-125.888-132.928-125.888z" fill="#fff" p-id="1360"></path></svg>
|
||||
|
Before Width: | Height: | Size: 947 B |
@ -1 +0,0 @@
|
||||
<svg t="1739406626368" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1300" width="200" height="200"><path d="M803.221 925.573H224.356c-68.568 0-124.352-55.784-124.352-124.353V222.356c0-68.568 55.784-124.352 124.352-124.352h355.311v64H224.356c-33.278 0-60.352 27.074-60.352 60.352V801.22c0 33.278 27.074 60.353 60.352 60.353H803.22c33.278 0 60.353-27.074 60.353-60.353V448.208h64V801.22c0 68.569-55.784 124.353-124.352 124.353z" fill="#ffffff" p-id="1301"></path><path d="M300.357 756.916l35.024-195.867L770.117 84.404c10.05-11.02 25.015-18.052 41.058-19.293 16.017-1.247 31.987 3.379 43.841 12.667l83.662 65.549c21.643 16.956 24.254 45.964 5.942 66.038l-437.613 479.8-206.65 67.751z m104.994-170.751l-13.14 73.487 69.671-22.842 415.465-455.517-59.909-46.939-412.087 451.811z" fill="#ffffff" p-id="1302"></path><path d="M732.25 220.897l41.144-49.023 81.151 68.11-41.145 49.023z" fill="#ffffff" p-id="1303"></path></svg>
|
||||
|
Before Width: | Height: | Size: 964 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 |
@ -5,7 +5,6 @@ export interface AppLinkGroup {
|
||||
// 链接列表
|
||||
links: AppLink[]
|
||||
}
|
||||
|
||||
// APP 链接
|
||||
export interface AppLink {
|
||||
// 链接名称
|
||||
@ -22,8 +21,6 @@ export const enum APP_LINK_TYPE_ENUM {
|
||||
ACTIVITY_COMBINATION,
|
||||
// 秒杀活动
|
||||
ACTIVITY_SECKILL,
|
||||
// 积分商城活动
|
||||
ACTIVITY_POINT,
|
||||
// 文章详情
|
||||
ARTICLE_DETAIL,
|
||||
// 优惠券详情
|
||||
@ -133,11 +130,6 @@ export const APP_LINK_GROUP_LIST = [
|
||||
path: '/pages/activity/seckill/list',
|
||||
type: APP_LINK_TYPE_ENUM.ACTIVITY_SECKILL
|
||||
},
|
||||
{
|
||||
name: '积分商城活动',
|
||||
path: '/pages/activity/point/list',
|
||||
type: APP_LINK_TYPE_ENUM.ACTIVITY_POINT
|
||||
},
|
||||
{
|
||||
name: '签到中心',
|
||||
path: '/pages/app/sign'
|
||||
|
||||
@ -11,7 +11,7 @@ const prefixCls = getPrefixCls('content-wrap')
|
||||
defineProps({
|
||||
title: propTypes.string.def(''),
|
||||
message: propTypes.string.def(''),
|
||||
bodyStyle: propTypes.object.def({ padding: '10px' })
|
||||
bodyStyle: propTypes.object.def({ padding: '20px' })
|
||||
})
|
||||
</script>
|
||||
|
||||
|
||||
@ -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>
|
||||
@ -68,7 +68,6 @@ const dialogStyle = computed(() => {
|
||||
draggable
|
||||
class="com-dialog"
|
||||
:show-close="false"
|
||||
@close="$emit('update:modelValue', false)"
|
||||
>
|
||||
<template #header="{ close }">
|
||||
<div class="relative h-54px flex items-center justify-between pl-15px pr-15px">
|
||||
|
||||
@ -51,8 +51,7 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { ComponentStyle } from '@/components/DiyEditor/util'
|
||||
import { useVModel } from '@vueuse/core'
|
||||
import { ComponentStyle, usePropertyForm } from '@/components/DiyEditor/util'
|
||||
|
||||
/**
|
||||
* 组件容器属性:目前右边部分
|
||||
@ -62,7 +61,7 @@ defineOptions({ name: 'ComponentContainer' })
|
||||
|
||||
const props = defineProps<{ modelValue: ComponentStyle }>()
|
||||
const emit = defineEmits(['update:modelValue'])
|
||||
const formData = useVModel(props, 'modelValue', emit)
|
||||
const { formData } = usePropertyForm(props.modelValue, emit)
|
||||
|
||||
const treeData = [
|
||||
{
|
||||
|
||||
@ -93,14 +93,14 @@
|
||||
|
||||
<script setup lang="ts">
|
||||
import { CarouselProperty } from './config'
|
||||
import { useVModel } from '@vueuse/core'
|
||||
import { usePropertyForm } from '@/components/DiyEditor/util'
|
||||
|
||||
// 轮播图属性面板
|
||||
defineOptions({ name: 'CarouselProperty' })
|
||||
|
||||
const props = defineProps<{ modelValue: CarouselProperty }>()
|
||||
const emit = defineEmits(['update:modelValue'])
|
||||
const formData = useVModel(props, 'modelValue', emit)
|
||||
const { formData } = usePropertyForm(props.modelValue, emit)
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss"></style>
|
||||
|
||||
@ -68,20 +68,15 @@
|
||||
</el-form>
|
||||
</ComponentContainerProperty>
|
||||
<!-- 优惠券选择 -->
|
||||
<CouponSelect
|
||||
ref="couponSelectDialog"
|
||||
v-model:multiple-selection="couponList"
|
||||
:take-type="CouponTemplateTakeTypeEnum.USER.type"
|
||||
@change="handleCouponSelect"
|
||||
/>
|
||||
<CouponSelect ref="couponSelectDialog" v-model:multiple-selection="couponList" />
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { CouponCardProperty } from './config'
|
||||
import { useVModel } from '@vueuse/core'
|
||||
import { usePropertyForm } from '@/components/DiyEditor/util'
|
||||
import * as CouponTemplateApi from '@/api/mall/promotion/coupon/couponTemplate'
|
||||
import { floatToFixed2 } from '@/utils'
|
||||
import { CouponTemplateTakeTypeEnum, PromotionDiscountTypeEnum } from '@/utils/constants'
|
||||
import { PromotionDiscountTypeEnum } from '@/utils/constants'
|
||||
import CouponSelect from '@/views/mall/promotion/coupon/components/CouponSelect.vue'
|
||||
|
||||
// 优惠券卡片属性面板
|
||||
@ -89,7 +84,7 @@ defineOptions({ name: 'CouponCardProperty' })
|
||||
|
||||
const props = defineProps<{ modelValue: CouponCardProperty }>()
|
||||
const emit = defineEmits(['update:modelValue'])
|
||||
const formData = useVModel(props, 'modelValue', emit)
|
||||
const { formData } = usePropertyForm(props.modelValue, emit)
|
||||
|
||||
// 优惠券列表
|
||||
const couponList = ref<CouponTemplateApi.CouponTemplateVO[]>([])
|
||||
@ -98,20 +93,10 @@ const couponSelectDialog = ref()
|
||||
const handleAddCoupon = () => {
|
||||
couponSelectDialog.value.open()
|
||||
}
|
||||
const handleCouponSelect = () => {
|
||||
formData.value.couponIds = couponList.value.map((coupon) => coupon.id)
|
||||
}
|
||||
|
||||
watch(
|
||||
() => formData.value.couponIds,
|
||||
async () => {
|
||||
if (formData.value.couponIds?.length > 0) {
|
||||
couponList.value = await CouponTemplateApi.getCouponTemplateList(formData.value.couponIds)
|
||||
}
|
||||
},
|
||||
{
|
||||
immediate: true,
|
||||
deep: true
|
||||
() => couponList.value,
|
||||
() => {
|
||||
formData.value.couponIds = couponList.value.map((coupon) => coupon.id)
|
||||
}
|
||||
)
|
||||
</script>
|
||||
|
||||
@ -45,12 +45,12 @@
|
||||
|
||||
<script setup lang="ts">
|
||||
import { DividerProperty } from './config'
|
||||
import { useVModel } from '@vueuse/core'
|
||||
import { usePropertyForm } from '@/components/DiyEditor/util'
|
||||
// 导航栏属性面板
|
||||
defineOptions({ name: 'DividerProperty' })
|
||||
const props = defineProps<{ modelValue: DividerProperty }>()
|
||||
const emit = defineEmits(['update:modelValue'])
|
||||
const formData = useVModel(props, 'modelValue', emit)
|
||||
const { formData } = usePropertyForm(props.modelValue, emit)
|
||||
|
||||
//线类型
|
||||
const BORDER_TYPES = [
|
||||
|
||||
@ -44,7 +44,7 @@ defineOptions({ name: 'FloatingActionButton' })
|
||||
defineProps<{ property: FloatingActionButtonProperty }>()
|
||||
|
||||
// 是否展开
|
||||
const expanded = ref(false)
|
||||
const expanded = ref(true)
|
||||
// 处理展开/折叠
|
||||
const handleToggleFab = () => {
|
||||
expanded.value = !expanded.value
|
||||
|
||||
@ -31,14 +31,14 @@
|
||||
|
||||
<script setup lang="ts">
|
||||
import { FloatingActionButtonProperty } from './config'
|
||||
import { useVModel } from '@vueuse/core'
|
||||
import { usePropertyForm } from '@/components/DiyEditor/util'
|
||||
|
||||
// 悬浮按钮属性面板
|
||||
defineOptions({ name: 'FloatingActionButtonProperty' })
|
||||
|
||||
const props = defineProps<{ modelValue: FloatingActionButtonProperty }>()
|
||||
const emit = defineEmits(['update:modelValue'])
|
||||
const formData = useVModel(props, 'modelValue', emit)
|
||||
const { formData } = usePropertyForm(props.modelValue, emit)
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss"></style>
|
||||
|
||||
@ -20,7 +20,7 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { useVModel } from '@vueuse/core'
|
||||
import { usePropertyForm } from '@/components/DiyEditor/util'
|
||||
import { HotZoneProperty } from '@/components/DiyEditor/components/mobile/HotZone/config'
|
||||
import HotZoneEditDialog from './components/HotZoneEditDialog/index.vue'
|
||||
|
||||
@ -29,7 +29,7 @@ defineOptions({ name: 'HotZoneProperty' })
|
||||
|
||||
const props = defineProps<{ modelValue: HotZoneProperty }>()
|
||||
const emit = defineEmits(['update:modelValue'])
|
||||
const formData = useVModel(props, 'modelValue', emit)
|
||||
const { formData } = usePropertyForm(props.modelValue, emit)
|
||||
|
||||
// 热区编辑对话框
|
||||
const editDialogRef = ref()
|
||||
|
||||
@ -21,14 +21,14 @@
|
||||
|
||||
<script setup lang="ts">
|
||||
import { ImageBarProperty } from './config'
|
||||
import { useVModel } from '@vueuse/core'
|
||||
import { usePropertyForm } from '@/components/DiyEditor/util'
|
||||
|
||||
// 图片展示属性面板
|
||||
defineOptions({ name: 'ImageBarProperty' })
|
||||
|
||||
const props = defineProps<{ modelValue: ImageBarProperty }>()
|
||||
const emit = defineEmits(['update:modelValue'])
|
||||
const formData = useVModel(props, 'modelValue', emit)
|
||||
const { formData } = usePropertyForm(props.modelValue, emit)
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss"></style>
|
||||
|
||||
@ -56,7 +56,7 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { useVModel } from '@vueuse/core'
|
||||
import { usePropertyForm } from '@/components/DiyEditor/util'
|
||||
import { MagicCubeProperty } from '@/components/DiyEditor/components/mobile/MagicCube/config'
|
||||
|
||||
/** 广告魔方属性面板 */
|
||||
@ -64,7 +64,7 @@ defineOptions({ name: 'MagicCubeProperty' })
|
||||
|
||||
const props = defineProps<{ modelValue: MagicCubeProperty }>()
|
||||
const emit = defineEmits(['update:modelValue'])
|
||||
const formData = useVModel(props, 'modelValue', emit)
|
||||
const { formData } = usePropertyForm(props.modelValue, emit)
|
||||
|
||||
// 选中的热区
|
||||
const selectedHotAreaIndex = ref(-1)
|
||||
|
||||
@ -48,7 +48,7 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { useVModel } from '@vueuse/core'
|
||||
import { usePropertyForm } from '@/components/DiyEditor/util'
|
||||
import {
|
||||
EMPTY_MENU_GRID_ITEM_PROPERTY,
|
||||
MenuGridProperty
|
||||
@ -59,7 +59,7 @@ defineOptions({ name: 'MenuGridProperty' })
|
||||
|
||||
const props = defineProps<{ modelValue: MenuGridProperty }>()
|
||||
const emit = defineEmits(['update:modelValue'])
|
||||
const formData = useVModel(props, 'modelValue', emit)
|
||||
const { formData } = usePropertyForm(props.modelValue, emit)
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss"></style>
|
||||
|
||||
@ -28,7 +28,7 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { useVModel } from '@vueuse/core'
|
||||
import { usePropertyForm } from '@/components/DiyEditor/util'
|
||||
import {
|
||||
EMPTY_MENU_LIST_ITEM_PROPERTY,
|
||||
MenuListProperty
|
||||
@ -39,7 +39,7 @@ defineOptions({ name: 'MenuListProperty' })
|
||||
|
||||
const props = defineProps<{ modelValue: MenuListProperty }>()
|
||||
const emit = defineEmits(['update:modelValue'])
|
||||
const formData = useVModel(props, 'modelValue', emit)
|
||||
const { formData } = usePropertyForm(props.modelValue, emit)
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss"></style>
|
||||
|
||||
@ -58,7 +58,7 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { useVModel } from '@vueuse/core'
|
||||
import { usePropertyForm } from '@/components/DiyEditor/util'
|
||||
import {
|
||||
EMPTY_MENU_SWIPER_ITEM_PROPERTY,
|
||||
MenuSwiperProperty
|
||||
@ -70,7 +70,7 @@ defineOptions({ name: 'MenuSwiperProperty' })
|
||||
|
||||
const props = defineProps<{ modelValue: MenuSwiperProperty }>()
|
||||
const emit = defineEmits(['update:modelValue'])
|
||||
const formData = useVModel(props, 'modelValue', emit)
|
||||
const { formData } = usePropertyForm(props.modelValue, emit)
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss"></style>
|
||||
|
||||
@ -2,17 +2,17 @@
|
||||
<div class="h-40px flex items-center justify-center">
|
||||
<MagicCubeEditor
|
||||
v-model="cellList"
|
||||
class="m-b-16px"
|
||||
:rows="1"
|
||||
:cols="cellCount"
|
||||
:cube-size="38"
|
||||
:rows="1"
|
||||
class="m-b-16px"
|
||||
@hot-area-selected="handleHotAreaSelected"
|
||||
/>
|
||||
<img v-if="isMp" alt="" class="h-30px w-76px" src="@/assets/imgs/diy/app-nav-bar-mp.png" />
|
||||
<img src="@/assets/imgs/diy/app-nav-bar-mp.png" alt="" class="h-30px w-76px" v-if="isMp" />
|
||||
</div>
|
||||
<template v-for="(cell, cellIndex) in cellList" :key="cellIndex">
|
||||
<template v-if="selectedHotAreaIndex === cellIndex">
|
||||
<el-form-item :prop="`cell[${cellIndex}].type`" label="类型">
|
||||
<el-form-item label="类型" :prop="`cell[${cellIndex}].type`">
|
||||
<el-radio-group v-model="cell.type">
|
||||
<el-radio value="text">文字</el-radio>
|
||||
<el-radio value="image">图片</el-radio>
|
||||
@ -21,40 +21,37 @@
|
||||
</el-form-item>
|
||||
<!-- 1. 文字 -->
|
||||
<template v-if="cell.type === 'text'">
|
||||
<el-form-item :prop="`cell[${cellIndex}].text`" label="内容">
|
||||
<el-form-item label="内容" :prop="`cell[${cellIndex}].text`">
|
||||
<el-input v-model="cell!.text" maxlength="10" show-word-limit />
|
||||
</el-form-item>
|
||||
<el-form-item :prop="`cell[${cellIndex}].text`" label="颜色">
|
||||
<el-form-item label="颜色" :prop="`cell[${cellIndex}].text`">
|
||||
<ColorInput v-model="cell!.textColor" />
|
||||
</el-form-item>
|
||||
<el-form-item :prop="`cell[${cellIndex}].url`" label="链接">
|
||||
<AppLinkInput v-model="cell.url" />
|
||||
</el-form-item>
|
||||
</template>
|
||||
<!-- 2. 图片 -->
|
||||
<template v-else-if="cell.type === 'image'">
|
||||
<el-form-item :prop="`cell[${cellIndex}].imgUrl`" label="图片">
|
||||
<el-form-item label="图片" :prop="`cell[${cellIndex}].imgUrl`">
|
||||
<UploadImg v-model="cell.imgUrl" :limit="1" height="56px" width="56px">
|
||||
<template #tip>建议尺寸 56*56</template>
|
||||
</UploadImg>
|
||||
</el-form-item>
|
||||
<el-form-item :prop="`cell[${cellIndex}].url`" label="链接">
|
||||
<el-form-item label="链接" :prop="`cell[${cellIndex}].url`">
|
||||
<AppLinkInput v-model="cell.url" />
|
||||
</el-form-item>
|
||||
</template>
|
||||
<!-- 3. 搜索框 -->
|
||||
<template v-else>
|
||||
<el-form-item :prop="`cell[${cellIndex}].placeholder`" label="提示文字">
|
||||
<el-form-item label="提示文字" :prop="`cell[${cellIndex}].placeholder`">
|
||||
<el-input v-model="cell.placeholder" maxlength="10" show-word-limit />
|
||||
</el-form-item>
|
||||
<el-form-item :prop="`cell[${cellIndex}].borderRadius`" label="圆角">
|
||||
<el-form-item label="圆角" :prop="`cell[${cellIndex}].borderRadius`">
|
||||
<el-slider
|
||||
v-model="cell.borderRadius"
|
||||
:max="100"
|
||||
:min="0"
|
||||
:show-input-controls="false"
|
||||
input-size="small"
|
||||
show-input
|
||||
input-size="small"
|
||||
:show-input-controls="false"
|
||||
/>
|
||||
</el-form-item>
|
||||
</template>
|
||||
@ -62,24 +59,19 @@
|
||||
</template>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
<script setup lang="ts">
|
||||
import { NavigationBarCellProperty } from '../config'
|
||||
import { useVModel } from '@vueuse/core'
|
||||
import { usePropertyForm } from '@/components/DiyEditor/util'
|
||||
// 导航栏属性面板
|
||||
defineOptions({ name: 'NavigationBarCellProperty' })
|
||||
|
||||
const props = withDefaults(
|
||||
defineProps<{
|
||||
modelValue: NavigationBarCellProperty[]
|
||||
isMp: boolean
|
||||
}>(),
|
||||
{
|
||||
modelValue: () => [],
|
||||
isMp: true
|
||||
}
|
||||
)
|
||||
const props = defineProps<{
|
||||
modelValue: NavigationBarCellProperty[]
|
||||
isMp: boolean
|
||||
}>()
|
||||
const emit = defineEmits(['update:modelValue'])
|
||||
const cellList = useVModel(props, 'modelValue', emit)
|
||||
const { formData: cellList } = usePropertyForm(props.modelValue, emit)
|
||||
if (!cellList.value) cellList.value = []
|
||||
|
||||
// 单元格数量:小程序6个(右侧胶囊按钮占了2个),其它平台8个
|
||||
const cellCount = computed(() => (props.isMp ? 6 : 8))
|
||||
@ -95,4 +87,4 @@ const handleHotAreaSelected = (cellValue: NavigationBarCellProperty, index: numb
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped></style>
|
||||
<style scoped lang="scss"></style>
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
<div v-for="(cell, cellIndex) in cellList" :key="cellIndex" :style="getCellStyle(cell)">
|
||||
<span v-if="cell.type === 'text'">{{ cell.text }}</span>
|
||||
<img v-else-if="cell.type === 'image'" :src="cell.imgUrl" alt="" class="h-full w-full" />
|
||||
<SearchBar v-else :property="getSearchProp(cell)" />
|
||||
<SearchBar v-else :property="getSearchProp" />
|
||||
</div>
|
||||
</div>
|
||||
<img
|
||||
@ -51,14 +51,14 @@ const getCellStyle = (cell: NavigationBarCellProperty) => {
|
||||
} as StyleValue
|
||||
}
|
||||
// 获得搜索框属性
|
||||
const getSearchProp = computed(() => (cell: NavigationBarCellProperty) => {
|
||||
const getSearchProp = (cell: NavigationBarCellProperty) => {
|
||||
return {
|
||||
height: 30,
|
||||
showScan: false,
|
||||
placeholder: cell.placeholder,
|
||||
borderRadius: cell.borderRadius
|
||||
} as SearchProperty
|
||||
})
|
||||
}
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.navigation-bar {
|
||||
|
||||
@ -66,7 +66,7 @@
|
||||
|
||||
<script setup lang="ts">
|
||||
import { NavigationBarProperty } from './config'
|
||||
import { useVModel } from '@vueuse/core'
|
||||
import { usePropertyForm } from '@/components/DiyEditor/util'
|
||||
import NavigationBarCellProperty from '@/components/DiyEditor/components/mobile/NavigationBar/components/CellProperty.vue'
|
||||
// 导航栏属性面板
|
||||
defineOptions({ name: 'NavigationBarProperty' })
|
||||
@ -77,7 +77,7 @@ const rules = {
|
||||
|
||||
const props = defineProps<{ modelValue: NavigationBarProperty }>()
|
||||
const emit = defineEmits(['update:modelValue'])
|
||||
const formData = useVModel(props, 'modelValue', emit)
|
||||
const { formData } = usePropertyForm(props.modelValue, emit)
|
||||
if (!formData.value._local) {
|
||||
formData.value._local = { previewMp: true, previewOther: false }
|
||||
}
|
||||
|
||||
@ -30,7 +30,7 @@
|
||||
|
||||
<script setup lang="ts">
|
||||
import { NoticeBarProperty } from './config'
|
||||
import { useVModel } from '@vueuse/core'
|
||||
import { usePropertyForm } from '@/components/DiyEditor/util'
|
||||
// 通知栏属性面板
|
||||
defineOptions({ name: 'NoticeBarProperty' })
|
||||
// 表单校验
|
||||
@ -40,7 +40,7 @@ const rules = {
|
||||
|
||||
const props = defineProps<{ modelValue: NoticeBarProperty }>()
|
||||
const emit = defineEmits(['update:modelValue'])
|
||||
const formData = useVModel(props, 'modelValue', emit)
|
||||
const { formData } = usePropertyForm(props.modelValue, emit)
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss"></style>
|
||||
|
||||
@ -20,7 +20,7 @@
|
||||
|
||||
<script setup lang="ts">
|
||||
import { PageConfigProperty } from './config'
|
||||
import { useVModel } from '@vueuse/core'
|
||||
import { usePropertyForm } from '@/components/DiyEditor/util'
|
||||
// 导航栏属性面板
|
||||
defineOptions({ name: 'PageConfigProperty' })
|
||||
// 表单校验
|
||||
@ -28,7 +28,7 @@ const rules = {}
|
||||
|
||||
const props = defineProps<{ modelValue: PageConfigProperty }>()
|
||||
const emit = defineEmits(['update:modelValue'])
|
||||
const formData = useVModel(props, 'modelValue', emit)
|
||||
const { formData } = usePropertyForm(props.modelValue, emit)
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss"></style>
|
||||
|
||||
@ -25,14 +25,14 @@
|
||||
|
||||
<script setup lang="ts">
|
||||
import { PopoverProperty } from './config'
|
||||
import { useVModel } from '@vueuse/core'
|
||||
import { usePropertyForm } from '@/components/DiyEditor/util'
|
||||
|
||||
// 弹窗广告属性面板
|
||||
defineOptions({ name: 'PopoverProperty' })
|
||||
|
||||
const props = defineProps<{ modelValue: PopoverProperty }>()
|
||||
const emit = defineEmits(['update:modelValue'])
|
||||
const formData = useVModel(props, 'modelValue', emit)
|
||||
const { formData } = usePropertyForm(props.modelValue, emit)
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss"></style>
|
||||
|
||||
@ -67,7 +67,7 @@
|
||||
class="text-16px"
|
||||
:style="{ color: property.fields.price.color }"
|
||||
>
|
||||
¥{{ fenToYuan(spu.price as any) }}
|
||||
¥{{ fenToYuan(spu.price) }}
|
||||
</span>
|
||||
<!-- 市场价 -->
|
||||
<span
|
||||
|
||||
@ -135,7 +135,7 @@
|
||||
|
||||
<script setup lang="ts">
|
||||
import { ProductCardProperty } from './config'
|
||||
import { useVModel } from '@vueuse/core'
|
||||
import { usePropertyForm } from '@/components/DiyEditor/util'
|
||||
import SpuShowcase from '@/views/mall/product/spu/components/SpuShowcase.vue'
|
||||
|
||||
// 商品卡片属性面板
|
||||
@ -143,7 +143,7 @@ defineOptions({ name: 'ProductCardProperty' })
|
||||
|
||||
const props = defineProps<{ modelValue: ProductCardProperty }>()
|
||||
const emit = defineEmits(['update:modelValue'])
|
||||
const formData = useVModel(props, 'modelValue', emit)
|
||||
const { formData } = usePropertyForm(props.modelValue, emit)
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss"></style>
|
||||
|
||||
@ -65,7 +65,7 @@
|
||||
<script setup lang="ts">
|
||||
import { ProductListProperty } from './config'
|
||||
import * as ProductSpuApi from '@/api/mall/product/spu'
|
||||
import { fenToYuan } from '@/utils'
|
||||
import { fenToYuan } from './index'
|
||||
|
||||
/** 商品栏 */
|
||||
defineOptions({ name: 'ProductList' })
|
||||
|
||||
@ -85,7 +85,7 @@
|
||||
|
||||
<script setup lang="ts">
|
||||
import { ProductListProperty } from './config'
|
||||
import { useVModel } from '@vueuse/core'
|
||||
import { usePropertyForm } from '@/components/DiyEditor/util'
|
||||
import SpuShowcase from '@/views/mall/product/spu/components/SpuShowcase.vue'
|
||||
|
||||
// 商品栏属性面板
|
||||
@ -93,7 +93,7 @@ defineOptions({ name: 'ProductListProperty' })
|
||||
|
||||
const props = defineProps<{ modelValue: ProductListProperty }>()
|
||||
const emit = defineEmits(['update:modelValue'])
|
||||
const formData = useVModel(props, 'modelValue', emit)
|
||||
const { formData } = usePropertyForm(props.modelValue, emit)
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss"></style>
|
||||
|
||||
@ -25,7 +25,7 @@
|
||||
|
||||
<script setup lang="ts">
|
||||
import { PromotionArticleProperty } from './config'
|
||||
import { useVModel } from '@vueuse/core'
|
||||
import { usePropertyForm } from '@/components/DiyEditor/util'
|
||||
import * as ArticleApi from '@/api/mall/promotion/article/index'
|
||||
|
||||
// 营销文章属性面板
|
||||
@ -33,7 +33,7 @@ defineOptions({ name: 'PromotionArticleProperty' })
|
||||
|
||||
const props = defineProps<{ modelValue: PromotionArticleProperty }>()
|
||||
const emit = defineEmits(['update:modelValue'])
|
||||
const formData = useVModel(props, 'modelValue', emit)
|
||||
const { formData } = usePropertyForm(props.modelValue, emit)
|
||||
// 文章列表
|
||||
const articles = ref<ArticleApi.ArticleVO>([])
|
||||
|
||||
|
||||