Compare commits

..

317 Commits

Author SHA1 Message Date
lwj e17f0bfc1e 构建冲突 2025-03-12 21:07:32 +08:00
lwj b7515de919 提交 2025-03-12 21:00:30 +08:00
陈思豪 762e5ae831 Merge remote-tracking branch 'origin/master' 2024-09-10 20:09:17 +08:00
陈思豪 d5c227e7d4 前台流程设计页面初版完毕 2024-09-10 20:09:08 +08:00
wxy 0c71d9828b 重定位天气小部件以增强用户界面一致性
将天气小部件从独立位置移动到右菜单内,以提高可读性和美观性。此更改通过整合天气小部件与用户界面的其余部分,创造了更和谐的视觉体验。
2024-09-10 12:21:29 +08:00
wxy 445522ade0 Merge remote-tracking branch 'origin/master' 2024-09-10 12:18:47 +08:00
wxy b153b1ed70 在Navbar组件中添加了一个iframe,用于展示天气代码。这个iframe的宽度被设置为500像素,高度为40像素,并且边框被移除,滚动被禁用,水平间距设置为0。这个更改使得天气代码可以在Navbar组件的一个固定位置上被正确展示。 2024-09-10 12:18:34 +08:00
陈思豪 dd0bb476ea 前台流程设计页面初版完毕 2024-09-10 09:28:26 +08:00
陈思豪 9c11fd4d1e 前台流程设计页面初版完毕 2024-09-10 02:34:57 +08:00
陈思豪 800a55ffa9 Merge remote-tracking branch 'origin/master' 2024-09-10 00:06:54 +08:00
陈思豪 6533e6276d 前台流程设计页面初版完毕 2024-09-10 00:06:37 +08:00
wxy 7615738ac0 将`el-image`组件替换为自定义`image-preview`组件以优化图片展示。调整旨在增强图片查看体验,同时保持布局和功能性不变。 2024-09-09 22:48:12 +08:00
wxy 025a1d2aa6 更新数据统计视图布局,增加优雅的卡片样式展示“什么也没有”信息 2024-09-09 22:38:28 +08:00
wxy bc62c2f8e5 格式化ImageUpload组件中的对象字面量 2024-09-09 16:35:28 +08:00
chaiyapeng a16f39473d Merge remote-tracking branch 'origin/master' 2024-09-09 16:01:11 +08:00
chaiyapeng 3ab93fbe55 fix:测试次数 2024-09-09 16:01:01 +08:00
Qin Dong Ming 85637bdd63 版本测试功能 2024-09-09 15:37:05 +08:00
Qin Dong Ming 924bcea508 Merge branch 'master' of https://gitea.qinmian.online/TreeData/cloud-web 2024-09-09 15:06:03 +08:00
Qin Dong Ming fa6dbf0515 版本测试功能 2024-09-09 15:05:55 +08:00
chaiyapeng d0598cf0c5 fix:测试次数 2024-09-09 14:44:09 +08:00
陈思豪 5b84b43aac Merge remote-tracking branch 'origin/master' 2024-09-09 09:01:05 +08:00
陈思豪 992ed88671 前台流程设计页面初版完毕 2024-09-09 09:00:57 +08:00
wxy 8cc82acbea 文档添加关于字符串、字节和void数据类型的说明
在NumPy文档中,常规介绍部分现在包含了关于字符串、字节和void数据类型的信息,以及现有的数值类型。
2024-09-08 20:28:39 +08:00
wxy ab605ad2fa 文档添加关于字符串、字节和void数据类型的说明
在NumPy文档中,常规介绍部分现在包含了关于字符串、字节和void数据类型的信息,以及现有的数值类型。
2024-09-08 20:18:26 +08:00
wxy ed21cf43d1 界面更新和功能优化
-移除了`接口图片`上传组件的旧实现,并改用了新的`image-upload`组件。
- 注释掉了表单中的某些字段,这些字段可能稍后会重新启用。- 调整了API调用,以符合后端服务的最新要求。
- 修正了用户界面的布局问题,以提升视觉效果和用户体验。

此更改集对用户界面进行了现代化更新,优化了功能流程,并为系统的稳定性和性能提供了改进。
2024-09-08 16:44:28 +08:00
wxy 0ed55a87e9 Merge remote-tracking branch 'origin/master' 2024-09-08 14:31:36 +08:00
wxy cab71819eb 文档格式更新:优化按钮的条件渲染及错误码展示
- 使用严格等于比较增强按钮的条件渲染逻辑。
- 重构错误码参照表的样式,提升可读性和美观性。
- 扩展系统级和数据模块错误码的文档,包括服务级错误码的详细说明。
- 修复邮编查询功能,确保在展示错误信息时使用精确的条件判断。
-样式调整,使表格边框更加紧凑,表格单元格内文本对齐左。
2024-09-08 14:31:23 +08:00
Qin Dong Ming aec010b7bc 版本测试功能 2024-09-07 21:13:45 +08:00
Qin Dong Ming 54b9fe4a78 版本测试功能 2024-09-07 21:12:04 +08:00
wxy 14d1e7b36a 移除测试API按钮并更新为接口文档按钮
测试API功能已禁用,相关代码行被注释掉。接口文档按钮已被重新命名为“测试”按钮,用以导航至相应的接口文档页面。
2024-09-06 19:20:07 +08:00
wxy 79f6e44185 功能开发:添加API测试按钮和相关对话框
在系统接口页面添加了六个API测试按钮,对应不同的接口测试功能。每个按钮触发相应的测试函数,弹出相关对话框,展示请求结果。实现了手机号码、IP地址、天气预报等信息的查询功能。

- 新增了IP查询归属地、天气预报、新闻头条、气象预警、生辰助手、邮编查询的API测试按钮和对话框。
- 对话框中包含输入字段和请求结果展示区域,用户可以输入参数并发起请求。
- 实现了API测试功能,便于用户在页面上直接测试各个接口的响应数据。
2024-09-06 19:03:32 +08:00
Qin Dong Ming 6241f0f6b1 版本测试功能 2024-09-06 17:56:33 +08:00
Qin Dong Ming 7a05e6d0cb 版本测试功能 2024-09-06 17:00:28 +08:00
Qin Dong Ming e9c81b3d7c 版本测试功能 2024-09-06 16:55:03 +08:00
wxy e2e7f1e06d ```添加测试API按钮和对话框以支持手机号查询归属地在系统端口视图中,为'手机号查询归属地'功能添加了一个测试API按钮。该按钮触发一个对话框,用户可以在其中输入手机号码进行查询。对话框展示了省份、城市、区号、邮编和运营商信息。此外,对phonePlace方法进行了整合,以发起请求并处理响应。
```
2024-09-06 16:46:40 +08:00
Qin Dong Ming d0582c7d51 版本测试功能 2024-09-06 16:42:25 +08:00
Qin Dong Ming ef4d7ab18c 版本测试功能 2024-09-06 16:38:00 +08:00
wxy 39b2524c7c ```重构接口文档组件并更新显示内容
- 调整接口文档组件的展示格式,包括接口描述、价格、请求示例以及返回示例。
-增加对接口返回格式(json)的标注,提升请求示例的清晰度。
- 移除未使用的请求方法和apiDescription数据属性。
- 优化返回示例卡片的样式,增强可读性。
- 代码沙箱id: 39eeacaf78
```
2024-09-06 15:54:27 +08:00
Qin Dong Ming 57558a73f5 版本测试功能 2024-09-06 14:47:56 +08:00
Qin Dong Ming 2b442542a6 版本测试功能 2024-09-06 14:43:06 +08:00
wxy 39eeacaf78 文档添加关于字符串、字节和void数据类型的说明
在NumPy文档中,常规介绍部分现在包含了关于字符串、字节和void数据类型的信息,以及现有的数值类型。
2024-09-06 12:03:12 +08:00
wxy b2acb0e809 文档视图增强:新增API文档、错误码参照和数据统计选项卡
在文档视图中实现新的功能选项卡,包括“API文档”、“错误码参照”和“数据统计”。这改进了文档的结构,使用户能更方便地访问和理解API接口的使用、可能的错误及其统计信息。
2024-09-05 22:21:47 +08:00
wxy 6c114703b2 新增接口文档功能和系统介绍页面
在'employee.vue'中添加了导航至接口文档的按钮,并实现了navigateToDocumentation方法,该方法会根据当前connector的信息跳转到相应的系统介绍页面。

在'b/src/views/port/sys/index.vue'中创建了一个新的Vue组件,用于展示接口文档内容,包括接口的名称、描述、价格和图片。

此功能增强了系统接口的易用性和可访问性,用户现在可以直接从'employee.vue'页面访问详细的接口文档。
2024-09-05 21:06:17 +08:00
wxy 7513ecfe6d 新增接口文档功能和系统介绍页面
在'employee.vue'中添加了导航至接口文档的按钮,并实现了navigateToDocumentation方法,该方法会根据当前connector的信息跳转到相应的系统介绍页面。

在'b/src/views/port/sys/index.vue'中创建了一个新的Vue组件,用于展示接口文档内容,包括接口的名称、描述、价格和图片。

此功能增强了系统接口的易用性和可访问性,用户现在可以直接从'employee.vue'页面访问详细的接口文档。
2024-09-05 20:58:55 +08:00
wxy d3601b0932 新增接口文档功能和系统介绍页面
在'employee.vue'中添加了导航至接口文档的按钮,并实现了navigateToDocumentation方法,该方法会根据当前connector的信息跳转到相应的系统介绍页面。

在'b/src/views/port/sys/index.vue'中创建了一个新的Vue组件,用于展示接口文档内容,包括接口的名称、描述、价格和图片。

此功能增强了系统接口的易用性和可访问性,用户现在可以直接从'employee.vue'页面访问详细的接口文档。
2024-09-05 20:53:15 +08:00
Qin Dong Ming 3acd5ebd74 .class工具类测试 2024-09-05 19:37:12 +08:00
陈思豪 3bd35b2d60 前台流程设计页面初版完毕 2024-09-05 15:55:44 +08:00
陈思豪 c481b1c87b Merge remote-tracking branch 'origin/master' 2024-09-05 15:40:19 +08:00
陈思豪 c41a6cb8bf 前台流程设计页面初版完毕 2024-09-05 15:39:37 +08:00
chaiyapeng 5930d34c6b Merge remote-tracking branch 'origin/master' 2024-09-05 10:36:22 +08:00
chaiyapeng 7db493876f fit:上架时间 2024-09-05 10:36:07 +08:00
陈思豪 967c82c997 Merge remote-tracking branch 'origin/master' 2024-09-05 01:11:18 +08:00
陈思豪 9ddcbb51bd 前台流程设计页面初版完毕 2024-09-05 01:10:59 +08:00
chaiyapeng 3b19c4a2fd 天气预报 2024-09-04 22:35:09 +08:00
chaiyapeng 205e64892a Merge remote-tracking branch 'origin/master' 2024-09-04 20:15:12 +08:00
chaiyapeng 6cc0130bd7 天气预报 2024-09-04 20:14:59 +08:00
wxy 6dee7e0e78 Merge remote-tracking branch 'origin/master' 2024-09-04 19:59:20 +08:00
wxy 3337d79d38 新增用户余额和月度消费图表展示功能
添加了一个图表,以直观展示用户余额和过去12个月的总消费金额。优化了数据获取逻辑,确保组件在`index.vue`中能够正确拉取和显示数据。同时,修复了与用户余额相关的API路径问题。
2024-09-04 19:59:07 +08:00
Qin Dong Ming ed74e2a886 .class工具类测试 2024-09-04 19:02:40 +08:00
chaiyapeng 07dbfd2b53 API布局格式 2024-09-04 17:40:03 +08:00
chaiyapeng d23266c878 Merge remote-tracking branch 'origin/master' 2024-09-04 17:30:53 +08:00
chaiyapeng 3000f74b2d API布局格式 2024-09-04 17:30:43 +08:00
Qin Dong Ming 2d811e1fca .class工具类测试 2024-09-04 14:53:47 +08:00
Qin Dong Ming 002685ad90 .class工具类测试 2024-09-04 11:45:06 +08:00
Qin Dong Ming a74a2f42af Merge branch 'master' of https://gitea.qinmian.online/TreeData/cloud-web 2024-09-04 10:16:16 +08:00
Qin Dong Ming 9d601095e9 .class工具类测试 2024-09-04 10:16:03 +08:00
chaiyapeng 46d8b2f6e5 API布局格式 2024-09-04 09:27:37 +08:00
chaiyapeng 267d30ac0f API布局格式 2024-09-04 00:29:01 +08:00
chaiyapeng 9ca3055f7f API布局格式 2024-09-03 22:37:31 +08:00
chaiyapeng 332a019f59 Merge remote-tracking branch 'origin/master' 2024-09-03 22:00:02 +08:00
chaiyapeng 93c142f8b1 API布局格式 2024-09-03 21:59:54 +08:00
Qin Dong Ming 66afe0fb92 Merge branch 'master' of https://gitea.qinmian.online/TreeData/cloud-web 2024-09-03 21:22:51 +08:00
Qin Dong Ming b59ae25d7b 上传Oss对象存储 2024-09-03 21:22:41 +08:00
wxy 0329717d76 修改图表标题文案,更新为“消费趋势”以清晰传达信息。此次更新调整了图表标题的表述,从“各个产品消费的总金额”修改为“消费趋势”,旨在提供更直观的数据可视化描述,提升用户理解度。 2024-09-03 21:13:39 +08:00
chaiyapeng 65b5614ea6 Merge remote-tracking branch 'origin/master' 2024-09-03 20:54:06 +08:00
chaiyapeng 326a190c1c API布局格式 2024-09-03 20:53:50 +08:00
wxy ccd13ce16e ```在`src/views/money/buy/index.vue`页面中,新增加了一个ECharts图表,用于展示各个产品的消费总金额。通过`echarts`库创建并配置了图表,包括设置标题、刻度轴、数据序列及样式。图表的数据显示将随着`listDate`数据源的更新而动态更新。
```
2024-09-03 20:29:11 +08:00
chaiyapeng 463bbd70d5 Merge remote-tracking branch 'origin/master' 2024-09-03 20:18:01 +08:00
chaiyapeng 3661954b1a API布局格式 2024-09-03 20:17:55 +08:00
Qin Dong Ming 0f6b12d188 上传Oss对象存储 2024-09-03 18:58:53 +08:00
Qin Dong Ming 9f35997fdb 上传Oss对象存储 2024-09-03 18:53:29 +08:00
chaiyapeng 6b230b7ca6 用户资产 2024-09-03 17:26:54 +08:00
Qin Dong Ming c6ce1a6a14 生成引擎类 2024-09-03 16:21:13 +08:00
wxy 0b58ec1167 添加消费明细页面展示及导出功能
实现了一个新的消费明细页面,包括搜索消费记录和导出功能。页面包含日期选择器,支持定制时间范围查询,以及导出按钮,允许用户将消费记录导出为Excel文件。

后台API `userloginfo` 被添加用于处理购买记录的获取请求。该请求携带分页参数及可选的时间范围,返回消费记录列表及其总数量。
2024-09-03 15:51:10 +08:00
chaiyapeng 3f31f66d7f Merge remote-tracking branch 'origin/master' 2024-09-03 15:26:17 +08:00
chaiyapeng fcbbcade8b 用户资产 2024-09-03 15:26:05 +08:00
Qin Dong Ming e99340608a 生成引擎类 2024-09-03 15:08:15 +08:00
wxy 332c3ab95f 修正支付页面URL中的协议拼写错误
在支付页面的同步跳转地址中,协议部分从"http://"错误地写为了"http//"。此提交已修正该错误,确保跳转地址正确格式化为"http://172.13.1.1/money/money"。
2024-09-03 10:36:10 +08:00
chaiyapeng 071048dd0a Merge remote-tracking branch 'origin/master' 2024-09-02 21:23:10 +08:00
chaiyapeng 7f8f55ea6d 购买 2024-09-02 21:22:59 +08:00
Qin Dong Ming 8bfb40147c 生成引擎类 2024-09-02 21:13:43 +08:00
lwj 00167769d7 Merge remote-tracking branch 'origin/master' 2024-09-02 21:12:43 +08:00
lwj f9cc0e4d04 完善前台 2024-09-02 21:12:33 +08:00
wxy c067f52c48 新增手机号校验功能和图片展示区域
在'index.vue'文件中,添加了手机号格式的校验功能,确保输入的新手机号有效。同时,为输入框添加了错误提示,以实时反馈给用户。此外,页面上增加了一个图片展示区域,用于展示指定图片。
2024-09-02 21:05:30 +08:00
chaiyapeng 13c1905b57 Merge remote-tracking branch 'origin/master' 2024-09-02 20:23:15 +08:00
chaiyapeng ffe2db7832 购买 2024-09-02 20:22:56 +08:00
wxy 119f9b3529 Merge remote-tracking branch 'origin/master' 2024-09-02 20:09:53 +08:00
wxy 598442aaf8 安全设置页面已进行如下更新:- 添加了修改手机号码的功能,包括发送验证码、验证验证码和提交新手机号码的流程。
-引入了相应的API调用,如发送验证码、验证验证码和更新手机号码。
- 优化了页面布局,使用卡片式设计区分登录密码和手机号码修改区域。
- 引入了新的状态管理手机号码修改流程的可见性。
- 样式调整,以匹配新增的布局和功能。

BREAKING CHANGE: 页面组件和相关API的结构已进行重大调整,可能影响依赖于先前页面结构的客户端代码。请确保在更新前备份并测试相关功能。
2024-09-02 20:09:39 +08:00
Qin Dong Ming d11b539d1d 维护列表 开启引擎 关闭引擎 2024-09-02 19:11:09 +08:00
chaiyapeng c8ca1bf0c1 购买 2024-09-02 14:44:29 +08:00
chaiyapeng 5c01f9ba83 购买 2024-09-02 14:33:24 +08:00
陈思豪 55cbd8ffb5 Merge remote-tracking branch 'origin/master' 2024-09-02 11:12:58 +08:00
陈思豪 48abacbb12 测试:前台任务设计雏形 2024-09-02 11:12:49 +08:00
wxy 666cab6509 ### commit message
1. 新增安全设置页面,支持修改密码功能
在管理界面新增安全设置视图,允许用户更新登录密码。实现包括表单验证、验证码发送与验证、旧密码检查及新密码设置的密码修改流程。

2. 实现用户信息展示及编辑功能
新增用户信息管理页面,展示用户的详细信息包括用户名、手机号、邮箱、所属部门、职位及创建日期。支持个人信息的查看及编辑功能,增强用户管理的便捷性。
2024-09-02 10:06:49 +08:00
wxy 3079fc161e ### commit message
1. 新增安全设置页面,支持修改密码功能
在管理界面新增安全设置视图,允许用户更新登录密码。实现包括表单验证、验证码发送与验证、旧密码检查及新密码设置的密码修改流程。

2. 实现用户信息展示及编辑功能
新增用户信息管理页面,展示用户的详细信息包括用户名、手机号、邮箱、所属部门、职位及创建日期。支持个人信息的查看及编辑功能,增强用户管理的便捷性。
2024-09-02 10:03:58 +08:00
Qin Dong Ming 4352df5f1e 维护列表 开启引擎 关闭引擎 2024-09-01 20:57:10 +08:00
chaiyapeng ddce1c8599 Merge remote-tracking branch 'origin/master' 2024-09-01 20:06:42 +08:00
chaiyapeng 4f2e0a2486 购买 2024-09-01 20:06:15 +08:00
Qin Dong Ming f9f73c02d1 维护列表 开启引擎 关闭引擎 2024-09-01 18:53:54 +08:00
chaiyapeng 1a24075329 购买 2024-09-01 16:29:00 +08:00
chaiyapeng 1ab469fa88 购买 2024-09-01 16:20:46 +08:00
chaiyapeng 660fc0b739 购买 2024-09-01 10:53:49 +08:00
chaiyapeng 74645b31fe Merge remote-tracking branch 'origin/master' 2024-08-31 19:43:26 +08:00
chaiyapeng 936816316b 前台分离 2024-08-31 19:43:16 +08:00
陈思豪 eef98ad1c2 Merge remote-tracking branch 'origin/master' 2024-08-31 19:31:30 +08:00
陈思豪 44decb5d80 测试:前台任务设计雏形 2024-08-31 19:31:20 +08:00
Qin Dong Ming 8c8cbde692 Merge branch 'master' of https://gitea.qinmian.online/TreeData/cloud-web 2024-08-31 19:07:03 +08:00
Qin Dong Ming 5f7372c062 维护列表路径 2024-08-31 19:06:53 +08:00
wxy 51cc9087ca 实名认证检查更新
在实名认证检查中,条件判断从使用`isAuthenticated`改为使用`desc`。这与更新的认证响应格式保持一致。
2024-08-31 01:13:14 +08:00
chaiyapeng a704fa4bb1 气象预警 2024-08-31 00:59:14 +08:00
chaiyapeng 2594b30b27 Merge remote-tracking branch 'origin/master' 2024-08-30 22:34:56 +08:00
chaiyapeng e4a178d878 气象预警 2024-08-30 22:34:05 +08:00
wxy e609d05e5b 实名认证表单添加验证和提交修复
实名认证功能已进行以下改进:
- 表单字段添加了验证规则,以确保用户输入有效的姓名和身份证号。- 修复了表单提交逻辑,确保只有在通过验证后才会进行实名认证提交。
-调整了实名认证弹窗关闭时的处理逻辑。
- 修正了实名认证成功后的导航路径。
2024-08-30 22:20:11 +08:00
wxy 70eb109eb6 ###代码修改说明
####1. 增加实名认证功能
在用户余额页面增加实名认证对话框,包括姓名和身份证号输入,取消和确认按钮。实名认证逻辑在`navigateToRecharge`方法中实现,如果用户已实名,则直接跳转至充值页面,否则显示实名认证对话框。

####2. 重构充值按钮逻辑充值按钮现在会根据用户实名认证状态跳转至相应页面。如果用户未实名,将显示实名认证对话框。

####3. 更新用户余额获取逻辑优化`fetchUserBalance`方法,处理用户未登录和用户余额获取失败的情况。

#### 4.暂时注释接口列表代码
在`index.vue`文件中,接口列表的表格代码被注释掉,可能是因为接口列表功能尚未实现或暂时禁用。

#### 5. 新增实名认证API调用
增加新的API调用`checkRealNameAuth`,用于实名认证校验。此方法通过POST请求调用第三方服务,传入用户实名和身份证号数据。

以上修改涉及用户余额页面的增强和实名认证流程的引入,同时对现有API进行扩展以支持新的功能需求。
2024-08-30 22:02:13 +08:00
Qin Dong Ming 40d7e928cc 维护列表功能 2024-08-30 20:37:15 +08:00
Qin Dong Ming 8d98edab71 Merge branch 'master' of https://gitea.qinmian.online/TreeData/cloud-web 2024-08-30 19:34:31 +08:00
Qin Dong Ming 4aeb5a8876 维护列表功能 2024-08-30 19:34:20 +08:00
chaiyapeng 6121834f85 生辰助手 2024-08-30 10:06:38 +08:00
chaiyapeng f9b8d7b482 Merge remote-tracking branch 'origin/master' 2024-08-29 21:55:54 +08:00
chaiyapeng 5f5cce6236 新闻头条 2024-08-29 21:55:46 +08:00
Qin Dong Ming 9ea4bd8c24 Merge branch 'master' of https://gitea.qinmian.online/TreeData/cloud-web 2024-08-29 21:50:39 +08:00
Qin Dong Ming 556ca108aa 维护列表功能 2024-08-29 21:50:26 +08:00
wxy 4f722fb288 ```plaintextfeat(workbench): 实现rate页面的初始布局和功能
包括余额展示和接口列表的展示。页面使用Element UI的卡片和表格组件,通过调用API获取用户余额和接口列表数据。在创建页面时自动获取数据以显示。布局通过flexbox实现,分为左右两部分。
```
2024-08-29 18:36:25 +08:00
wxy b4d5777881 ```plaintextfeat(workbench): 实现rate页面的初始布局和功能
包括余额展示和接口列表的展示。页面使用Element UI的卡片和表格组件,通过调用API获取用户余额和接口列表数据。在创建页面时自动获取数据以显示。布局通过flexbox实现,分为左右两部分。
```
2024-08-29 17:24:11 +08:00
wxy aa10c64af7 ```plaintextfeat(workbench): 实现rate页面的初始布局和功能
包括余额展示和接口列表的展示。页面使用Element UI的卡片和表格组件,通过调用API获取用户余额和接口列表数据。在创建页面时自动获取数据以显示。布局通过flexbox实现,分为左右两部分。
```
2024-08-29 17:17:21 +08:00
wxy 071a09a40a ```feat(money): 添加新视图组件并更新支付返回URL
- 创建index.vue文件以支持货币购买功能,包括基础结构设置。
- 更新pay的index.vue中的返回URL,从本地主机到指定的IP地址,以确保在金钱操作后正确重定向用户。
```
2024-08-29 15:40:28 +08:00
Qin Dong Ming f2f3c85b94 测试1 2024-08-28 20:38:57 +08:00
Qin Dong Ming b0abc7bcb3 测试1 2024-08-28 20:34:38 +08:00
wxy b515b8e8bf ```feat(money-detail): 添加按时间范围查询的表单和导出按钮
添加了一个新的功能,允许用户通过指定的日期范围搜索充值明细。此外,导出按钮已被重新设计,并放置在新的位置以提高可用性。该改进增强了用户与系统交互的效率和体验。
```
2024-08-28 19:36:01 +08:00
chaiyapeng 735c97d716 Merge remote-tracking branch 'origin/master' 2024-08-28 18:44:16 +08:00
chaiyapeng 3328439c07 接口列表 2024-08-28 18:44:03 +08:00
wxy c888a51e5b refactor(money-detail):调整导出按钮布局并居中
调整充值明细页面的导出按钮布局,使其在中心对齐,改善页面布局效果。此调整涉及使用`el-row`和`el-col`组件对导出按钮进行重新排布,并确保其在页面上水平居中。
2024-08-28 13:59:07 +08:00
陈思豪 5d9df94177 Merge remote-tracking branch 'origin/master' 2024-08-28 00:12:27 +08:00
陈思豪 06579fd1a8 测试:前台任务设计雏形 2024-08-28 00:12:10 +08:00
wxy 804ad882d4 refactor(money-detail):调整导出按钮布局并居中
调整充值明细页面的导出按钮布局,使其在中心对齐,改善页面布局效果。此调整涉及使用`el-row`和`el-col`组件对导出按钮进行重新排布,并确保其在页面上水平居中。
2024-08-27 22:33:24 +08:00
wxy 2fdf565679 Merge remote-tracking branch 'origin/master' 2024-08-27 22:27:33 +08:00
wxy b2b481f4d1 feat(money-detail): 添加导出按钮和调整充值时间列的边框颜色
在充值明细页面添加了一个导出按钮,允许用户导出数据。
此外,调整了“充值时间”列的边框颜色,以区分不同的列并提高可读性。
2024-08-27 22:27:20 +08:00
Qin Dong Ming a73e9d2bee 测试1 2024-08-27 22:22:39 +08:00
wxy 43209419f5 ```修改支付页面文本内容以进行测试
将充值说明中的文本从“你敢充钱,我就敢让你没钱”和“子龙说你得有个小目标”更改为“请输入支付宝沙箱账号”和“西伯利亚龙”。此次更改旨在提供更具体的测试说明,以评估支付流程中的用户体验。
```
2024-08-27 21:53:58 +08:00
chaiyapeng 26bd851656 Merge remote-tracking branch 'origin/master' 2024-08-27 20:41:45 +08:00
chaiyapeng 6db0f6c962 接口列表 2024-08-27 20:41:34 +08:00
wxy c8c05ee785 ```refactor(money-detail): 优化表格布局并添加分页功能
调整表格样式,以提升视觉效果和可读性。添加分页组件以支持大量数据的管理。
```
2024-08-27 20:10:21 +08:00
wxy 6a6cd790cf Merge remote-tracking branch 'origin/master' 2024-08-27 19:30:03 +08:00
wxy 10b98b6738 ```refactor(money-detail): 重新设计充值明细表格视图
- 重新命名数据属性从tableData到listDate以避免歧义。
- 调整表格列标签以明确显示充值相关信息:序号、充值编号、充值金额、充值类型、充值时间。
- 删除了未使用的操作列,可能是之前用于编辑和删除条目的。- 创造性地引入了新的用户Payinfo获取函数以支持新的表格视图。
- 在created生命周期钩子中调用新列表获取方法以初始化数据。
-通过调整表格宽度属性来提升UI布局。
```
2024-08-27 19:29:51 +08:00
chaiyapeng 57470589d6 Merge remote-tracking branch 'origin/master' 2024-08-27 19:28:03 +08:00
chaiyapeng f5ebb0104d 接口列表 2024-08-27 19:27:51 +08:00
Qin Dong Ming c7f45aa36a 测试1 2024-08-27 19:14:12 +08:00
wxy 62843ef35c ```feat(money): 添加详情表格和充值说明更新
- 在money/detail组件中添加表格显示功能,含日期、姓名和操作列。
- 调整pay组件中充值说明,增加支付金额显示。
- 更新user组件以开启余额预警功能,修改输入字段标签。- 新增userPayinfo API支持用户充值记录查询。
```
2024-08-27 15:35:24 +08:00
Qin Dong Ming c14e2e9709 测试1 2024-08-27 15:25:48 +08:00
chaiyapeng 1d5e6f8fd8 Merge remote-tracking branch 'origin/master' 2024-08-27 14:28:01 +08:00
chaiyapeng a51e18e28c 接口列表 2024-08-27 14:27:54 +08:00
wxy 19e9a7bd87 ```feat(money-detail): 创建页面结构模板
添加了新的Vue组件模板,为金钱详情页面奠定了基础。
目前该页面包含一个script部分,其中有一个默认导出的对象{name: "index"},以及空的template和style部分。
```
2024-08-27 14:16:53 +08:00
Qin Dong Ming 8dbc2216d5 Merge branch 'master' of https://gitea.qinmian.online/TreeData/cloud-web 2024-08-27 11:51:07 +08:00
Qin Dong Ming 7905d9c4f2 测试1 2024-08-27 11:50:51 +08:00
lwj f016aaf86b Merge remote-tracking branch 'origin/master' 2024-08-27 11:36:18 +08:00
lwj 9e3fb286cd 修改字典值 2024-08-27 11:36:11 +08:00
Qin Dong Ming 459d1639eb 测试1 2024-08-27 11:34:53 +08:00
chaiyapeng 29577af7d5 接口列表 2024-08-27 10:35:56 +08:00
chaiyapeng c3277f94dc 接口列表 2024-08-27 10:10:52 +08:00
chaiyapeng e2abe44c49 接口列表 2024-08-27 10:07:59 +08:00
chaiyapeng 08a2d11df0 接口列表 2024-08-27 09:56:14 +08:00
chaiyapeng eac3e79c1c Merge remote-tracking branch 'origin/master' 2024-08-27 09:33:37 +08:00
chaiyapeng 5c8a2c08ec 接口列表 2024-08-27 09:33:23 +08:00
陈思豪 e4a181a544 测试:前台任务设计雏形 2024-08-27 08:32:52 +08:00
陈思豪 cc4feb05e7 测试:前台任务设计雏形 2024-08-27 01:15:05 +08:00
陈思豪 d9e548e490 Merge remote-tracking branch 'origin/master' 2024-08-26 23:37:35 +08:00
陈思豪 c647485482 测试:前台任务设计雏形 2024-08-26 23:37:11 +08:00
TreeData 42e6ac889d revert 2a97d9713c
revert 规则维护列表
2024-08-26 22:28:55 +08:00
陈思豪 334c504a6e Merge remote-tracking branch 'origin/master' 2024-08-26 22:22:40 +08:00
陈思豪 3d91e39aa8 测试:前台任务设计雏形 2024-08-26 22:22:27 +08:00
Qin Dong Ming 2a97d9713c 规则维护列表 2024-08-26 22:22:10 +08:00
chaiyapeng de3374747c 接口列表 2024-08-26 22:12:08 +08:00
chaiyapeng 9d4127d937 接口列表 2024-08-26 21:59:11 +08:00
chaiyapeng fa5a503ccc Merge remote-tracking branch 'origin/master' 2024-08-26 20:48:04 +08:00
chaiyapeng 403b91b715 接口列表 2024-08-26 20:47:56 +08:00
wxy cedddf065c ```feat(money-user): 添加余额预警功能 TODO 待优化
在用户资金页面新增余额预警机制,允许用户设置当账户可用余额低于指定阈值时,系统每日通过短信通知,最多连续通知五天。界面包括输入预警阈值和联系号码的表单,以及相关的对话框组件。```
2024-08-26 20:41:40 +08:00
Qin Dong Ming d71a20afa8 规则维护列表 2024-08-26 18:46:59 +08:00
chaiyapeng de5604b91f Merge remote-tracking branch 'origin/master' 2024-08-26 15:33:57 +08:00
chaiyapeng 6d8efa9799 接口列表 2024-08-26 15:33:50 +08:00
wxy 78064468c1 feat(user-view): 新增近12月消费趋势图表
在用户余额页面下方添加了一个图表,展示用户近12个月的消费趋势。使用ECharts库初始化图表并设置选项,包括标题、工具提示、图例、网格、工具箱等。消费金额数据和月份标签已硬编码,需根据实际后端数据进行动态更新。

引入了echarts库并更新了相关代码,确保图表能在页面加载时正确显示。此更新旨在提供给用户更直观的消费反馈,帮助用户更好地了解自己的消费模式。

BREAKING CHANGE: 引入了ECharts库的新版本5.5.1,可能会与现有的样式或依赖产生冲突。需要在项目中进行详细的测试,确保没有引入新的问题。
2024-08-26 15:01:12 +08:00
chaiyapeng 1a79b2005e Merge remote-tracking branch 'origin/master' 2024-08-26 14:58:24 +08:00
chaiyapeng b07804e551 接口列表 2024-08-26 14:58:15 +08:00
Qin Dong Ming 924fcae1df 规则维护列表 2024-08-26 14:22:21 +08:00
Qin Dong Ming 1f8578d1e5 规则维护列表 2024-08-26 14:18:04 +08:00
chaiyapeng 7db2d62539 Merge remote-tracking branch 'origin/master' 2024-08-26 10:58:34 +08:00
chaiyapeng 6f0b2c7489 接口列表 2024-08-26 10:58:27 +08:00
Qin Dong Ming f8e956d987 规则维护列表 2024-08-26 10:26:14 +08:00
wxy 8144b3a57b fix(pay): 将支付金额的subject改为'充值金额'以明确用途
在支付功能中,将'支付金额'的subject改为'充值金额',以更准确地描述其用途,增强用户理解。

fix(user): 修正userBalance API引入路径错误

修正了userBalance API的引入路径,确保用户余额查询功能的正确调用。
2024-08-26 09:37:00 +08:00
wxy 6d5d4c841a fix(pay): 修正用户余额更新失败的问题
解决用户充值时余额未正确更新的问题,调整了相关API的调用顺序并修复了用户ID获取逻辑,确保充值后用户余额能够及时更新。

更改包括:
- 修正了`userRecharge`方法中用户余额更新的触发逻辑。
- 重构代码以正确获取并分配用户ID。- 添加错误处理机制以确保用户余额更新失败时能够给出提示。余额更新流程现在如下:
1. 用户提交充值请求。
2.服务器验证并处理充值请求。
3. 充值成功后,系统通过`addUserMoney`方法更新用户余额。

此修复确保了用户在充值后能看到准确的余额变化,避免了之前由于系统错误导致的余额未更新问题。
2024-08-26 09:26:04 +08:00
Qin Dong Ming 4a011c2f8f 分页 2024-08-26 09:22:35 +08:00
Qin Dong Ming cb224e5fec 分页 2024-08-26 08:41:01 +08:00
wxy b9c2a4065d fix(pay): 修正用户余额更新失败的问题
解决用户充值时余额未正确更新的问题,调整了相关API的调用顺序并修复了用户ID获取逻辑,确保充值后用户余额能够及时更新。

更改包括:
- 修正了`userRecharge`方法中用户余额更新的触发逻辑。
- 重构代码以正确获取并分配用户ID。- 添加错误处理机制以确保用户余额更新失败时能够给出提示。余额更新流程现在如下:
1. 用户提交充值请求。
2.服务器验证并处理充值请求。
3. 充值成功后,系统通过`addUserMoney`方法更新用户余额。

此修复确保了用户在充值后能看到准确的余额变化,避免了之前由于系统错误导致的余额未更新问题。
2024-08-25 22:38:08 +08:00
wxy 63dc913f77 fix(pay): 修正用户余额更新失败的问题
解决用户充值时余额未正确更新的问题,调整了相关API的调用顺序并修复了用户ID获取逻辑,确保充值后用户余额能够及时更新。

更改包括:
- 修正了`userRecharge`方法中用户余额更新的触发逻辑。
- 重构代码以正确获取并分配用户ID。- 添加错误处理机制以确保用户余额更新失败时能够给出提示。余额更新流程现在如下:
1. 用户提交充值请求。
2.服务器验证并处理充值请求。
3. 充值成功后,系统通过`addUserMoney`方法更新用户余额。

此修复确保了用户在充值后能看到准确的余额变化,避免了之前由于系统错误导致的余额未更新问题。
2024-08-25 22:34:45 +08:00
wxy 4b264fb4f2 fix(pay): 修正用户余额更新失败的问题
解决用户充值时余额未正确更新的问题,调整了相关API的调用顺序并修复了用户ID获取逻辑,确保充值后用户余额能够及时更新。

更改包括:
- 修正了`userRecharge`方法中用户余额更新的触发逻辑。
- 重构代码以正确获取并分配用户ID。- 添加错误处理机制以确保用户余额更新失败时能够给出提示。余额更新流程现在如下:
1. 用户提交充值请求。
2.服务器验证并处理充值请求。
3. 充值成功后,系统通过`addUserMoney`方法更新用户余额。

此修复确保了用户在充值后能看到准确的余额变化,避免了之前由于系统错误导致的余额未更新问题。
2024-08-25 22:18:07 +08:00
wxy 21f4edd5b9 fix(pay): 修正用户余额更新失败的问题
解决用户充值时余额未正确更新的问题,调整了相关API的调用顺序并修复了用户ID获取逻辑,确保充值后用户余额能够及时更新。

更改包括:
- 修正了`userRecharge`方法中用户余额更新的触发逻辑。
- 重构代码以正确获取并分配用户ID。- 添加错误处理机制以确保用户余额更新失败时能够给出提示。余额更新流程现在如下:
1. 用户提交充值请求。
2.服务器验证并处理充值请求。
3. 充值成功后,系统通过`addUserMoney`方法更新用户余额。

此修复确保了用户在充值后能看到准确的余额变化,避免了之前由于系统错误导致的余额未更新问题。
2024-08-25 22:17:37 +08:00
chaiyapeng ef8aed4036 小卡片 2024-08-25 20:45:26 +08:00
chaiyapeng 0cdd205e5b 小卡片 2024-08-25 20:44:36 +08:00
chaiyapeng 1e245033d3 小卡片 2024-08-25 20:37:48 +08:00
chaiyapeng db371ca2b4 小卡片 2024-08-25 20:34:36 +08:00
chaiyapeng 91ab95c118 小卡片 2024-08-25 20:32:12 +08:00
chaiyapeng d70ed6b761 小卡片 2024-08-25 20:31:48 +08:00
chaiyapeng 4e33923200 Merge remote-tracking branch 'origin/master' 2024-08-25 20:31:02 +08:00
chaiyapeng f1f39540d5 小卡片 2024-08-25 20:30:54 +08:00
Qin Dong Ming cc25d3692a 分页 2024-08-25 19:56:40 +08:00
chaiyapeng 8fef9fc9ce 小卡片 2024-08-25 18:40:46 +08:00
chaiyapeng 293be35b73 Merge remote-tracking branch 'origin/master' 2024-08-25 18:31:29 +08:00
chaiyapeng 2646082e17 小卡片 2024-08-25 18:31:21 +08:00
陈思豪 f9784e07df Merge remote-tracking branch 'origin/master' 2024-08-25 18:29:59 +08:00
陈思豪 2ff2cec734 测试:前台任务设计雏形 2024-08-25 18:29:51 +08:00
wxy 9e4d3bce18 fix(api): 修正用户充值接口的数据提交方式
修复了用户充值接口`userRecharge`在提交数据时使用了错误的HTTP方法和URL。现在使用正确的POST方法和支付接口URL,以确保用户充值功能正常工作。
2024-08-25 18:24:29 +08:00
wxy fb04ce4cad fix(api): 修正用户充值接口的数据提交方式
修复了用户充值接口`userRecharge`在提交数据时使用了错误的HTTP方法和URL。现在使用正确的POST方法和支付接口URL,以确保用户充值功能正常工作。
2024-08-25 18:18:47 +08:00
wxy a2baf98908 ```feat(user): 添加导航至充值页面的按钮
用户余额页面现在包含一个“充值”按钮,点击后将导向充值页面,以提升用户交互体验。
```
2024-08-25 16:48:09 +08:00
chaiyapeng fddc80e039 小卡片 2024-08-25 15:09:16 +08:00
chaiyapeng 8fd123e14d 小卡片 2024-08-25 15:07:14 +08:00
chaiyapeng dbcf837a54 小卡片 2024-08-25 15:02:24 +08:00
chaiyapeng 24704084af Merge remote-tracking branch 'origin/master' 2024-08-25 14:58:36 +08:00
chaiyapeng 1db5dee534 小卡片 2024-08-25 14:58:16 +08:00
Qin Dong Ming 2c4c88dec3 Merge branch 'master' of https://gitea.qinmian.online/TreeData/cloud-web 2024-08-25 14:45:16 +08:00
Qin Dong Ming f14c7f1ea2 分页 2024-08-25 14:45:06 +08:00
chaiyapeng 080c353c8b Merge remote-tracking branch 'origin/master' 2024-08-25 14:44:04 +08:00
chaiyapeng 971b9042d9 小卡片 2024-08-25 14:43:57 +08:00
lwj 4e78da8a1e 修改字典值 2024-08-25 14:43:55 +08:00
lwj 20b0321a2f Merge remote-tracking branch 'origin/master' 2024-08-25 14:40:53 +08:00
lwj ba537954ae 修改字典值 2024-08-25 14:40:43 +08:00
chaiyapeng 06a9e899cd Merge remote-tracking branch 'origin/master' 2024-08-25 14:35:43 +08:00
chaiyapeng d9b2390993 小卡片 2024-08-25 14:35:32 +08:00
lwj b4a6b50190 Merge remote-tracking branch 'origin/master' 2024-08-25 14:29:29 +08:00
lwj 377878c61f 修改字典值 2024-08-25 14:29:22 +08:00
chaiyapeng 102cfd3fe9 小卡片 2024-08-25 14:23:17 +08:00
chaiyapeng 37c11bbb24 Merge remote-tracking branch 'origin/master' 2024-08-25 14:18:48 +08:00
chaiyapeng 2b91407347 小卡片 2024-08-25 14:18:40 +08:00
lwj 10ef5733e8 修改字典值 2024-08-25 14:15:49 +08:00
lwj a09a269ac9 修改字典值 2024-08-25 14:12:21 +08:00
lwj c810e2f67f 修改字典值 2024-08-25 14:08:05 +08:00
lwj aeb048037a Merge remote-tracking branch 'origin/master' 2024-08-25 14:04:09 +08:00
lwj 02e9172427 修改数据源字典值 2024-08-25 14:04:03 +08:00
陈思豪 ff2817ea7c Merge remote-tracking branch 'origin/master' 2024-08-25 11:56:33 +08:00
陈思豪 febfefef98 测试:前台任务设计雏形 2024-08-25 11:56:25 +08:00
chaiyapeng 92384e4947 Merge remote-tracking branch 'origin/master' 2024-08-25 11:54:57 +08:00
chaiyapeng d8a652ab28 小卡片 2024-08-25 11:54:50 +08:00
lwj ad83fe546a Merge remote-tracking branch 'origin/master' 2024-08-25 11:54:23 +08:00
lwj 9c8c26c663 修改数据源字典值 2024-08-25 11:54:18 +08:00
wxy b603b06f05 Merge remote-tracking branch 'origin/master' 2024-08-25 11:52:25 +08:00
wxy 95b3db2f10 ```feat(user): 添加导航至充值页面的按钮
用户余额页面现在包含一个“充值”按钮,点击后将导向充值页面,以提升用户交互体验。
```
2024-08-25 11:52:08 +08:00
chaiyapeng 27d8cbadba Merge remote-tracking branch 'origin/master' 2024-08-25 11:50:12 +08:00
chaiyapeng 905a67d1b8 小卡片 2024-08-25 11:50:03 +08:00
lwj 8f18a71a79 Merge remote-tracking branch 'origin/master' 2024-08-25 11:48:58 +08:00
lwj f4d9897c2d 修改数据源列表的状态 2024-08-25 11:48:51 +08:00
陈思豪 d3659e5468 测试:前台任务设计雏形 2024-08-25 11:47:30 +08:00
陈思豪 badc198cde 测试:前台任务设计雏形 2024-08-25 11:45:16 +08:00
陈思豪 20a4fdf0fa Merge remote-tracking branch 'origin/master' 2024-08-25 11:41:46 +08:00
陈思豪 bd9e302e52 测试:前台任务设计雏形 2024-08-25 11:41:39 +08:00
wxy 2cbe023108 ```feat(payment): 实现初始支付页面功能
新增支付页面,包含支付金额和支付方式的选择。支持自定义金额及支付宝、微信支付方式。点击“确认支付”按钮后,根据支付方式执行相应的操作,目前仅模拟支付宝支付成功的结果。
```
2024-08-25 11:31:03 +08:00
陈思豪 fa95ea5f1f Merge remote-tracking branch 'origin/master' 2024-08-25 11:17:24 +08:00
陈思豪 81689fc776 测试:前台任务设计雏形 2024-08-25 11:17:18 +08:00
Qin Dong Ming 8ef82898c7 分页 2024-08-25 11:00:06 +08:00
chaiyapeng 35ed74df5a Merge remote-tracking branch 'origin/master' 2024-08-25 10:57:31 +08:00
chaiyapeng 5a12f4a8b6 小卡片 2024-08-25 10:57:21 +08:00
Qin Dong Ming 1d5e5896a5 分页 2024-08-25 10:28:09 +08:00
陈思豪 63412c9540 Merge remote-tracking branch 'origin/master' 2024-08-25 10:21:29 +08:00
陈思豪 1cc30e461a 测试:前台任务设计雏形 2024-08-25 10:21:23 +08:00
Qin Dong Ming 73d6eafbcb 分页 2024-08-25 10:04:02 +08:00
chaiyapeng e70b263bc5 Merge remote-tracking branch 'origin/master' 2024-08-25 10:01:30 +08:00
chaiyapeng 80c8ec2b1c 小卡片 2024-08-25 10:01:03 +08:00
陈思豪 ba898beeb2 Merge remote-tracking branch 'origin/master' 2024-08-25 09:59:42 +08:00
陈思豪 9bb63f9987 测试:前台任务设计雏形 2024-08-25 09:59:33 +08:00
chaiyapeng 254d338004 Merge remote-tracking branch 'origin/master' 2024-08-25 09:43:20 +08:00
chaiyapeng f7052cf827 IP小卡片 2024-08-25 09:42:55 +08:00
wxy aa5edcd52d ```在用户余额界面添加卡片视图,增强布局的视觉吸引力
```
2024-08-25 09:36:18 +08:00
chaiyapeng fe4de82d23 IP小卡片 2024-08-25 09:30:33 +08:00
chaiyapeng 34f1c4406e IP小卡片 2024-08-25 09:26:14 +08:00
chaiyapeng 8f8c589679 IP小卡片 2024-08-25 09:17:00 +08:00
chaiyapeng 1efe47c331 Merge remote-tracking branch 'origin/master' 2024-08-25 09:09:16 +08:00
chaiyapeng 280d8cb968 IP小卡片 2024-08-25 09:08:56 +08:00
wxy f45213ea68 Merge remote-tracking branch 'origin/master' 2024-08-25 09:08:04 +08:00
wxy 1ed86b7362 ```feat(user): 查询并显示当前用户余额
在用户页面展示当前用户的余额信息,通过调用用户余额接口获取数据。优化界面布局,确保余额信息
清晰呈现给用户。同时,修复了潜在的token解析问题,保证用户数据准确无误。

修复了用户余额展示的bug,优化了用户界面体验。
```
2024-08-25 09:07:26 +08:00
lwj b179bf511a Merge remote-tracking branch 'origin/master' 2024-08-24 22:31:48 +08:00
lwj c97d580d1f 修改前台添加和删除和表单校验 2024-08-24 22:31:36 +08:00
wxy 9ab5c50980 Merge remote-tracking branch 'origin/master' 2024-08-24 20:55:14 +08:00
wxy 44c7e479fa ```feat(user): 查询并显示当前用户余额
在用户页面展示当前用户的余额信息,通过调用用户余额接口获取数据。优化界面布局,确保余额信息
清晰呈现给用户。同时,修复了潜在的token解析问题,保证用户数据准确无误。

修复了用户余额展示的bug,优化了用户界面体验。
```
2024-08-24 20:54:55 +08:00
lwj 678dc9420c 修改前台添加和删除和表单校验 2024-08-24 19:58:08 +08:00
陈思豪 3312b972b2 测试:前台任务设计雏形 2024-08-24 19:11:18 +08:00
陈思豪 df052fe59c Merge remote-tracking branch 'origin/master' 2024-08-24 19:08:39 +08:00
陈思豪 242afa5176 测试:前台任务设计雏形 2024-08-24 19:08:30 +08:00
lwj 7133b45b56 Merge remote-tracking branch 'origin/master' 2024-08-24 01:51:25 +08:00
lwj c7317121ad 同步资产提交 2024-08-24 01:51:12 +08:00
chaiyapeng 5342392e5d Merge remote-tracking branch 'origin/master' 2024-08-23 22:41:46 +08:00
chaiyapeng d4a9573246 IP小卡片 2024-08-23 22:41:38 +08:00
lwj cf72448453 Merge remote-tracking branch 'origin/master' 2024-08-23 22:40:28 +08:00
lwj bfd7cadeb8 修改前台导出报错 2024-08-23 22:40:22 +08:00
chaiyapeng a1f4b76e73 Merge remote-tracking branch 'origin/master' 2024-08-23 22:36:37 +08:00
chaiyapeng 87dca44aa9 IP小卡片 2024-08-23 22:36:23 +08:00
lwj 62236798c3 修改前台导出报错 2024-08-23 22:36:20 +08:00
lwj 9bd349be5e Merge remote-tracking branch 'origin/master' 2024-08-23 22:30:31 +08:00
lwj d1d204f1e5 修改前台导出报错 2024-08-23 22:30:26 +08:00
chaiyapeng f6a22b33b8 Merge remote-tracking branch 'origin/master' 2024-08-23 22:12:34 +08:00
chaiyapeng 7383c8be9a IP小卡片 2024-08-23 22:12:19 +08:00
wxy deb02a2ae2 ```feat(user): 查询并显示当前用户余额
在用户页面展示当前用户的余额信息,通过调用用户余额接口获取数据。优化界面布局,确保余额信息
清晰呈现给用户。同时,修复了潜在的token解析问题,保证用户数据准确无误。

修复了用户余额展示的bug,优化了用户界面体验。
```
2024-08-23 21:56:52 +08:00
chaiyapeng 23dd212295 Merge remote-tracking branch 'origin/master' 2024-08-23 21:56:10 +08:00
chaiyapeng db0e9dfd1e IP小卡片 2024-08-23 21:56:03 +08:00
Qin Dong Ming 5f84e302ea 分页 2024-08-23 21:53:19 +08:00
wxy 30d913991e Merge remote-tracking branch 'origin/master' 2024-08-23 21:48:32 +08:00
wxy 4254f92820 ```feat(user): 查询并显示当前用户余额
在用户页面展示当前用户的余额信息,通过调用用户余额接口获取数据。优化界面布局,确保余额信息
清晰呈现给用户。同时,修复了潜在的token解析问题,保证用户数据准确无误。

修复了用户余额展示的bug,优化了用户界面体验。
```
2024-08-23 21:48:07 +08:00
chaiyapeng 10c996c036 IP小卡片 2024-08-23 21:46:28 +08:00
chaiyapeng 45117891de IP小卡片 2024-08-23 21:42:34 +08:00
chaiyapeng 09a04703e9 Merge remote-tracking branch 'origin/master' 2024-08-23 21:38:34 +08:00
chaiyapeng 6d37054cfc IP小卡片 2024-08-23 21:38:26 +08:00
89 changed files with 26242 additions and 613 deletions

View File

@ -36,28 +36,43 @@
"url": "https://gitee.com/y_project/MuYu-Cloud.git" "url": "https://gitee.com/y_project/MuYu-Cloud.git"
}, },
"dependencies": { "dependencies": {
"@antv/x6": "^2.18.1",
"@antv/x6-plugin-clipboard": "^2.1.6",
"@antv/x6-plugin-history": "^2.2.4",
"@antv/x6-plugin-keyboard": "^2.2.3",
"@antv/x6-plugin-selection": "^2.2.2",
"@antv/x6-plugin-snapline": "^2.1.7",
"@antv/x6-plugin-stencil": "^2.1.5",
"@antv/x6-plugin-transform": "^2.1.8",
"@antv/x6-vue-shape": "^2.1.2",
"@riophae/vue-treeselect": "0.4.0", "@riophae/vue-treeselect": "0.4.0",
"@vue/composition-api": "^1.7.2",
"axios": "0.24.0", "axios": "0.24.0",
"clipboard": "2.0.8", "clipboard": "2.0.8",
"codemirror": "^5.65.12",
"core-js": "3.25.3", "core-js": "3.25.3",
"echarts": "5.4.0", "echarts": "5.4.0",
"element-ui": "2.15.14", "element-ui": "^2.15.14",
"file-saver": "2.0.5", "file-saver": "2.0.5",
"fuse.js": "6.4.3", "fuse.js": "6.4.3",
"highlight.js": "9.18.5", "highlight.js": "9.18.5",
"insert-css": "^2.0.0",
"js-beautify": "1.13.0", "js-beautify": "1.13.0",
"js-cookie": "3.0.1", "js-cookie": "3.0.1",
"jsencrypt": "3.0.0-rc.1", "jsencrypt": "3.0.0-rc.1",
"lodash": "4.17.15",
"nprogress": "0.2.0", "nprogress": "0.2.0",
"quill": "1.3.7", "quill": "1.3.7",
"screenfull": "5.0.2", "screenfull": "5.0.2",
"sortablejs": "1.10.2", "sortablejs": "1.10.2",
"vue": "2.6.12", "vue": "2.6.12",
"vue-click-outside": "^1.1.0",
"vue-codemirror": "^4.0.6",
"vue-count-to": "1.0.13", "vue-count-to": "1.0.13",
"vue-cropper": "0.5.5", "vue-cropper": "0.5.5",
"vue-meta": "2.4.0", "vue-meta": "2.4.0",
"vue-router": "3.4.9", "vue-router": "3.4.9",
"vuedraggable": "2.24.3", "vuedraggable": "2.23.0",
"vuex": "3.6.0" "vuex": "3.6.0"
}, },
"devDependencies": { "devDependencies": {
@ -71,6 +86,8 @@
"connect": "3.6.6", "connect": "3.6.6",
"eslint": "7.15.0", "eslint": "7.15.0",
"eslint-plugin-vue": "7.2.0", "eslint-plugin-vue": "7.2.0",
"less": "^4.2.0",
"less-loader": "^12.2.0",
"lint-staged": "10.5.3", "lint-staged": "10.5.3",
"runjs": "4.4.2", "runjs": "4.4.2",
"sass": "1.32.13", "sass": "1.32.13",

Binary file not shown.

After

Width:  |  Height:  |  Size: 33 KiB

View File

@ -10,7 +10,7 @@ import ThemePicker from "@/components/ThemePicker";
export default { export default {
name: "App", name: "App",
components: {ThemePicker}, components: { ThemePicker },
metaInfo() { metaInfo() {
return { return {
title: this.$store.state.settings.dynamicTitle && this.$store.state.settings.title, title: this.$store.state.settings.dynamicTitle && this.$store.state.settings.title,
@ -25,4 +25,13 @@ export default {
#app .theme-picker { #app .theme-picker {
display: none; display: none;
} }
#app {
font-family: Avenir, Helvetica, Arial, sans-serif;
width: 100%;
height: 100%;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
color: #2c3e50;
}
</style> </style>

View File

@ -1,43 +1,262 @@
import request from '@/utils/request' import request from '@/utils/request'
//查询规则引擎列表 //查询规则引擎列表
export function selectEngineList(data){
export function selectEngineList(data) {
return request({ return request({
url: "/engine/engine/getMaintenanceList", url: "/engine/engine/getMaintenanceList",
method: "post", method: "post",
data:data
data: data
}) })
} }
//添加规则数据
export function insert(data) {
export function insert(data){
return request({ return request({
url: "/engine/engine/insert", url: "/engine/engine/insert",
method: "post", method: "post",
data:data
data: data
}) })
} }
export function update(data){ //修改规则数据
export function update(data) {
return request({ return request({
url: "/engine/engine/update", url: "/engine/engine/update",
method: "post", method: "post",
data:data
data: data
}) })
} }
//通过id删除数据
export function del(id) {
export function del(id){
return request({ return request({
url: "/engine/engine/delete/" + id, url: "/engine/engine/delete/" + id,
method: "post", method: "post",
data:id
data: id
}) })
}
//开启
export function onEngine(id) {
return request({
url: "/engine/version/open/" + id,
method: "post"
})
}
//禁用
export function forbiddenEngine(id) {
return request({
url: "/engine/version/close/" + id,
method: "post"
})
}
//查看等级列表信息
export function selectLevel() {
return request({
url: "/engine/level/selectLevelList",
method: "post"
})
}
// 查询规则引擎版本列表
// 通过id查询
export function findById(id) {
return request({
url: '/engine/engine/findByIdsfindByIds/' + id,
method: 'get'
})
}
//通过id删除数据
export function dels(id) {
return request({
url: '/engine/version/delete/' + id,
method: 'post',
data: id
})
}
//添加规则数据
export function add(data) {
return request({
url: "/engine/version/insertVersion",
method: "post",
data: data
})
}
export function selectEngineById(id) {
return request({
url: "/engine/engine/selectEngineById/" + id,
method: "post",
data: id
})
}
//根据版本id查询版本信息
export function sel(id) {
return request({
url: "/engine/version/selectListById/" + id,
method: "post"
})
}
//根据版本id查询版本信息
export function generate(data) {
return request({
url: "/engine/engine/generate",
method: "post",
data: data
})
}
export function getVersionData(id) {
return request({
url: "/engine/version/getVersionById/" + id,
method: "get",
data: id
})
}
//数据库查询
export function selectDataBase() {
return request({
url: "/engine/version/selectDataBase",
method: "post",
})
}
//数据字段查询
export function selectData() {
return request({
url: "/engine/version/selectData",
method: "post",
})
}
//测试
export function testData(data) {
return request({
url: "/engine/engine/testData",
method: "post",
data: data
})
} }

View File

@ -0,0 +1,13 @@
import request from "@/utils/request";
export function getRuleEngineInfo(master) {
return request({
url: '/engine/engine/getRuleEngineInfo/' + master,
method: 'put'
})
}

View File

@ -38,6 +38,15 @@ export function getInfo(id){
//测试连接 //测试连接
export function structure(data){
return request({
url: "/source/source/structure",
method: "post",
data:data
})
}
//同步资产结构
export function connectionTest(data){ export function connectionTest(data){
return request({ return request({
url: "/source/source/connectionTest", url: "/source/source/connectionTest",
@ -52,8 +61,98 @@ export function deleteSource(ids){
return request({ return request({
url: "/source/source/"+ids, url: "/source/source/"+ids,
method: "delete", method: "delete",
}) })
} }
//修改
export function update(data){
return request({
url: "/source/source/update",
method: "post",
data:data
})
}
//查询数据库名称 表名称 字段名称 类型等
export function findTableInfo(){
return request({
url: "/source/tableInfo/findTableInfo",
method: "get",
})
}
export function findTableInfoList(){
return request({
url: "/source/tableInfo/findTableInfoList",
method: "get",
})
}
export function findTableInfoListAccredit(){
return request({
url: "/source/tableInfo/findTableInfoListAccredit",
method: "get",
})
}
export function findStructureByTableId(id){
return request({
url: "/source/tableInfo/findStruceure/"+id,
method: "get",
})
}
export function findTableValueList(basicId,tableName){
return request({
url: "/source/DataValue/findTableValueList?basicId="+basicId+"&tableName="+tableName,
method: "post",
})
}
export function findAccredit(id){
return request({
url: "/source/accredit/findAccredit?tableId="+id,
method: "get",
})
}
export function findDeptListStatus(tableId,basicId){
return request({
url: "/source/accredit/findDeptListStatus?tableId="+tableId+"&basicId="+basicId,
method: "get",
})
}
export function findUserListStatus(tableId,basicId){
return request({
url: "/source/accredit/findUserListStatus?tableId="+tableId+"&basicId="+basicId,
method: "get",
})
}
export function addMiddle(data){
return request({
url: "/source/accredit/addMiddle",
method: "post",
data :data
})
}
export function remove(data){
return request({
url: "/source/accredit/remove",
method: "post",
data :data
})
}

View File

@ -1,8 +1,120 @@
import request from '@/utils/request' import request from '@/utils/request'
export function getPhonePlace() { export function findConnectorList(data) {
return request({ return request({
url: '/mart/list/getPhonePlace', url: '/mart/connector/findConnectorList',
method: 'post',
data:data
})
}
export function findApiList(data) {
return request({
url: '/mart/connector/findApiList',
method: 'post',
data:data
})
}
//TODO 根据ID查
export function findApiById(id) {
return request({
url: '/mart/connector/findApiById/' + id,
method: 'get',
})
}
export function addConnector(data) {
return request({
url: '/mart/connector/addConnector',
method: 'post',
data:data
})
}
export function getDeleteConnector(connectorId) {
return request({
url: '/mart/connector/getDeleteConnector?connectorId='+connectorId,
method: 'get'
})
}
export function updateConnector(data) {
return request({
url: '/mart/connector/updateConnector',
method: 'post',
data:data
})
};
export function phonePlace(tel) {
return request({
url: '/port/list/phonePlace?tel='+tel,
method: 'GET'
})
}
export function getIpPlace(ip) {
return request({
url: '/port/list/getIpPlace?ip='+ip,
method: 'GET'
})
}
export function getHeadlines() {
return request({
url: '/port/list/getHeadlines',
method: 'GET'
})
}
export function getBirthday(data) {
return request({
url: '/port/list/getBirthday',
method: 'post',
data:data
})
}
export function getPostcode(code) {
return request({
url: '/port/list/getPostcode?code='+code,
method: 'GET'
})
}
export function getWeather() {
return request({
url: '/port/list/getWeather',
method: 'GET'
})
}
//天气预报
export function getWeatherForecast(cityName) {
return request({
url: '/port/list/getWeatherForecast?cityName='+cityName,
method: 'GET'
})
}
//购买
export function doBuyInterface(data) {
return request({
url: '/system/buy/doBuyInterface',
method: 'post',
data:data
})
}
//资产列表
export function findConnectorUserList(data) {
return request({
url: '/mart/connector/findConnectorUserList',
method: 'post',
data:data
})
}
//API页面类型分类
export function findConnectSort() {
return request({
url: '/mart/connector/findConnectSort',
method: 'get' method: 'get'
}) })
} }

View File

@ -11,19 +11,83 @@ export function listUser(query) {
} }
// 用户余额
//购买用户记录
export function userloginfo(query) {
return request({
url: '/system/user/purchaseRecord',
method: 'get',
params: query
})
}
//查询12个月的总消费
export function months() {
return request({
url: '/system/user/months',
method: 'get',
})
}
//充值用户记录
export function userPayinfo(query) {
return request({
url: '/system/user/userPayinfo',
method: 'get',
params: query
})
}
// 充值用户余额
export function userRecharge(data) { export function userRecharge(data) {
return request({ return request({
url: '/user/alipay/recharge', url: '/system/aliyun/pay/payZFB',
method: 'post', method: 'post',
params: data data: data
})
}
// 调用第三方实名认证
export function checkRealNameAuth(data) {
return request({
url: '/system/aliyun/pay/doPost',
method: 'post',
data: data
})
}
// 发送验证码
export function sendCode(phonenumber) {
return request({
url: '/system/aliyun/pay/sendCode/' + phonenumber,
method: 'post',
})
}
//检查验证码
export function checkCode(phonenumber,code) {
return request({
url: '/system/aliyun/pay/checkCode/'+ phonenumber +"/" + code,
method: 'post',
})
}
// 充值用户余额记录
export function createRechargeRecord(data) {
return request({
url: '/system/aliyun/pay/records',
method: 'post',
data: data
}) })
} }
// 查询用户余额 // 查询用户余额
export function userBalance(userId) { export function userBalance(userId) {
return request({ return request({
url: '/user/balance/' + userId, url: '/system/user/balance/' + userId,
method: 'get', method: 'get',
}) })
} }
@ -62,6 +126,15 @@ export function delUser(userId) {
}) })
} }
//修改手机号
export function updatePhone(data) {
return request({
url: '/system/user/profile/updatePhonenumber/'+data,
method: 'POST'
})
}
// 用户密码重置 // 用户密码重置
export function resetUserPwd(userId, password) { export function resetUserPwd(userId, password) {
const data = { const data = {
@ -88,6 +161,15 @@ export function changeUserStatus(userId, status) {
}) })
} }
//对用户余额进行添加
export function addUserMoney(data) {
return request({
url: '/system/user/addUserMoney',
method: 'post',
data:data
})
}
// 查询用户个人信息 // 查询用户个人信息
export function getUserProfile() { export function getUserProfile() {
return request({ return request({

View File

@ -35,4 +35,85 @@ export function deleteByTaskId(id) {
}) })
} }
//获得所有数据结构信息
// export function tableInfoList() {
// return request({
// url: "/task/tableInfo/list",
// method: "GET",
// })
// }
//获得所有数据结构信息
export function findByTableId(id) {
return request({
url: "/task/tableInfo/findByTableId?id="+id,
method: "POST",
params:id
})
}
//获得所有数据结构信息
export function findStructureList(tableId) {
return request({
url: "/task/structure/findStructureList?tableId="+tableId,
method: "GET"
})
}
//添加节点任务记录
export function addTaskInput(data) {
return request({
url: "/task/taskInput/addTaskInput",
method: "POST",
data:data
})
}
//根据节点id查询信息
export function findByNodeId(nodeId) {
return request({
url: "/task/taskInput/findByNodeId/"+nodeId,
method: "get",
})
}
//联查记录添加
export function addTaskJoin(data) {
return request({
url: "/task/taskJoin/addTaskJoin",
method: "POST",
data:data
})
}
//添加数据输出节点
export function addTaskOutPut(data) {
return request({
url: "/task/taskOutPut/addTaskOutput",
method: "POST",
data:data
})
}
//执行任务
export function executeTask(id) {
return request({
url: "/task/task/executeTask/"+id,
method: "POST"
})
}
export function addNodeRule(data) {
return request({
url: "/task/nodeRule/addNodeRule/",
method: "POST",
data:data
})
}

View File

@ -0,0 +1,81 @@
import request from '@/utils/request'
//查询规则引擎列表
export function list() {
return request({
url: "/engine/type/list",
method: "post"
})
}
//添加类型数据
export function insert(data) {
return request({
url: "/engine/type/add",
method: "post",
data: data
})
}
//修改类型数据
export function update(data) {
return request({
url: "/engine/type/update",
method: "post",
data: data
})
}
//删除类型数据
export function del(id) {
return request({
url: "/engine/type/delete/" + id,
method: "post",
data: id
})
}
//导出类型数据
export function exports(data) {
return request({
url: "/engine/type/export",
method: "post",
data: data
})
}

View File

@ -0,0 +1,46 @@
import request from '@/utils/request'
//查询规则引擎列表
export function list(data){
return request({
url: "/engine/version/list",
method: "get",
data:data
})
}
//添加规则引擎版本数据
export function insert(data){
return request({
url: "/engine/version/insert",
method: "post",
data:data
})
}
//删除规则引擎版本信息
export function del(id){
return request({
url: "/engine/version/delete/" + id,
method: "post",
data:id
})
}
//查看等级列表
export function selectLevel(){
return request({
url: "/engine/level/selectLevelList",
method: "post"
})
}
// 查询规则引擎版本列表
export function getRuleEngineInfo(id) {
return request({
url: '/engine/engine/getRuleEngineInfo/' + id,
method: 'put'
})
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 117 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 170 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 41 KiB

View File

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 201 201"><defs><style>.cls-1{opacity:0;}.cls-2,.cls-3{fill:none;stroke:#092370;stroke-miterlimit:10;}.cls-3{stroke-width:0.83px;}.cls-4{fill:#c5a9f1;}.cls-5{fill:#a375e9;}</style></defs><title>10大数据服务</title><g id="图层_2" data-name="图层 2"><g id="图层_1-2" data-name="图层 1"><g class="cls-1"><path class="cls-2" d="M100.5.5h0a100,100,0,0,1,100,100h0a100,100,0,0,1-100,100h0a100,100,0,0,1-100-100h0A100,100,0,0,1,100.5.5Z"/><rect class="cls-2" x="33.83" y="33.83" width="133.33" height="133.33"/><rect class="cls-3" x="44.93" y="44.93" width="111.13" height="111.13"/></g><path class="cls-4" d="M149.93,44.94H67.61a4.41,4.41,0,0,0,0,8.81h78v78.78a4.36,4.36,0,1,0,8.72,0V49.34A4.34,4.34,0,0,0,149.93,44.94Z"/><path class="cls-5" d="M133.57,64.06H51.07a4.34,4.34,0,0,0-4.36,4.41v83.19a4.34,4.34,0,0,0,4.36,4.41h82.32a4.34,4.34,0,0,0,4.36-4.41V68.47A4.1,4.1,0,0,0,133.57,64.06Z"/></g></g></svg>

After

Width:  |  Height:  |  Size: 965 B

View File

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 201 201"><defs><style>.cls-1{opacity:0;}.cls-2,.cls-3{fill:none;stroke:#092370;stroke-miterlimit:10;}.cls-3{stroke-width:0.83px;}.cls-4{fill:#a375e9;}.cls-5{fill:#c5a9f1;}</style></defs><title>11个人源服务</title><g id="图层_2" data-name="图层 2"><g id="图层_1-2" data-name="图层 1"><g class="cls-1"><path class="cls-2" d="M100.5.5h0a100,100,0,0,1,100,100h0a100,100,0,0,1-100,100h0a100,100,0,0,1-100-100h0A100,100,0,0,1,100.5.5Z"/><rect class="cls-2" x="33.83" y="33.83" width="133.33" height="133.33"/><rect class="cls-3" x="44.93" y="44.93" width="111.13" height="111.13"/></g><rect class="cls-4" x="45.47" y="54.12" width="43.86" height="44.33"/><rect class="cls-4" x="45.47" y="111.74" width="43.86" height="44.33"/><polygon class="cls-5" points="124.52 44.94 93.5 76.28 124.52 107.62 155.53 76.28 124.52 44.94"/><rect class="cls-4" x="102.59" y="111.74" width="43.86" height="44.33"/></g></g></svg>

After

Width:  |  Height:  |  Size: 970 B

View File

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 201 201"><defs><style>.cls-1{opacity:0;}.cls-2,.cls-3{fill:none;stroke:#092370;stroke-miterlimit:10;}.cls-3{stroke-width:0.83px;}.cls-4{fill:#dce6fe;}.cls-5{fill:#4f80f9;}</style></defs><title>12Python</title><g id="图层_2" data-name="图层 2"><g id="图层_1-2" data-name="图层 1"><g class="cls-1"><path class="cls-2" d="M100.5.5h0a100,100,0,0,1,100,100h0a100,100,0,0,1-100,100h0a100,100,0,0,1-100-100h0A100,100,0,0,1,100.5.5Z"/><rect class="cls-2" x="33.83" y="33.83" width="133.33" height="133.33"/><rect class="cls-3" x="44.93" y="44.93" width="111.13" height="111.13"/></g><rect class="cls-4" x="44.93" y="54.56" width="111.13" height="91.88" rx="0.87" ry="0.87"/><path class="cls-5" d="M121,81.2l6,.73c0,.52.1,1,.1,1.44q0,11.59,0,23.18c0,4.07-.91,7.82-3.81,10.86a16.52,16.52,0,0,1-12.59,4.65l-1.94-5.83c9.78-1.48,13.11-4,12.39-9.38-2.53.57-5,1.27-7.59,1.68-4.42.7-8.28-.88-10-4.1a8.84,8.84,0,0,1-1-3.78c-.11-5.33,0-10.66-.07-16a2.14,2.14,0,0,1,1.06-2.11c1.63-1,3.19-2.12,5-3.31,0,.52.08.9.08,1.28,0,5.49-.14,11,.12,16.45.21,4.58,2.73,6.14,7.16,4.94l.3-.11c4.79-1.54,4.79-1.54,4.78-6.56C121,90.64,121,86,121,81.2Z"/><path class="cls-5" d="M80.09,122.26c-2.14-1.41-4-2.57-5.74-3.83a1.71,1.71,0,0,1-.45-1.24q0-16.46,0-32.93a1.8,1.8,0,0,1,.57-1.33,23.79,23.79,0,0,1,9.46-4c4.73-.69,8.53.93,10.93,4.94,3.81,6.38,5.41,13.11,1.51,20.11-1.91,3.42-4.68,5.87-8.77,6.12a15.06,15.06,0,0,1-4.51-.66,18,18,0,0,1-3-1.39Zm-.34-27.38q0,1.6,0,3.19c0,4.54.56,5.24,5.07,6.36,3.57.89,6.14-.45,7.16-4a18.72,18.72,0,0,0-.36-11.91c-1-2.78-2.94-4-5.84-3.46a22.12,22.12,0,0,0-5.46,2.39c-.36.18-.53,1-.55,1.51C79.71,90.94,79.75,92.91,79.75,94.88Z"/></g></g></svg>

After

Width:  |  Height:  |  Size: 1.7 KiB

View File

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 201 201"><defs><style>.cls-1{opacity:0;}.cls-2,.cls-3{fill:none;stroke:#092370;stroke-miterlimit:10;}.cls-3{stroke-width:0.83px;}.cls-4{fill:#dce6fe;}.cls-5{fill:#4f80f9;}</style></defs><title>13测试报告</title><g id="图层_2" data-name="图层 2"><g id="图层_1-2" data-name="图层 1"><g class="cls-1"><path class="cls-2" d="M100.5.5h0a100,100,0,0,1,100,100h0a100,100,0,0,1-100,100h0a100,100,0,0,1-100-100h0A100,100,0,0,1,100.5.5Z"/><rect class="cls-2" x="33.83" y="33.83" width="133.33" height="133.33"/><rect class="cls-3" x="44.93" y="44.93" width="111.13" height="111.13"/></g><rect class="cls-4" x="44.93" y="54.56" width="111.13" height="91.88" rx="2" ry="2"/><path class="cls-5" d="M82.54,115.79,69.84,100.5a2,2,0,0,1,0-2.56L82.52,82.68a2,2,0,0,0-.25-2.81L81.22,79a2,2,0,0,0-2.83.25l-16.6,20,0,0,16.6,20a2,2,0,0,0,2.83.25l1-.89A2,2,0,0,0,82.54,115.79Z"/><path class="cls-5" d="M122.61,79.24a2,2,0,0,0-2.83-.25l-1,.89a2,2,0,0,0-.25,2.8l12.68,15.26a2,2,0,0,1,0,2.56l-12.7,15.29a2,2,0,0,0,.25,2.8l1,.89a2,2,0,0,0,2.83-.25l16.6-20,0,0Z"/><path class="cls-5" d="M109.12,79l-1.27-.47a2,2,0,0,0-2.58,1.19L90.69,119.58a2,2,0,0,0,1.18,2.56l1.27.47a2,2,0,0,0,2.58-1.19L110.3,81.55A2,2,0,0,0,109.12,79Z"/></g></g></svg>

After

Width:  |  Height:  |  Size: 1.2 KiB

View File

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 201 201"><defs><style>.cls-1{opacity:0;}.cls-2,.cls-3{fill:none;stroke:#092370;stroke-miterlimit:10;}.cls-3{stroke-width:0.83px;}.cls-4{fill:#dce6fe;}.cls-5{fill:#4f80f9;}</style></defs><title>14描述统计</title><g id="图层_2" data-name="图层 2"><g id="图层_1-2" data-name="图层 1"><g class="cls-1"><path class="cls-2" d="M100.5.5h0a100,100,0,0,1,100,100h0a100,100,0,0,1-100,100h0a100,100,0,0,1-100-100h0A100,100,0,0,1,100.5.5Z"/><rect class="cls-2" x="33.83" y="33.83" width="133.33" height="133.33"/><rect class="cls-3" x="44.93" y="44.93" width="111.13" height="111.13"/></g><rect class="cls-4" x="44.93" y="54.56" width="111.13" height="91.88" rx="0.87" ry="0.87"/><rect class="cls-5" x="74.4" y="82.72" width="5.65" height="41.01" rx="2" ry="2"/><rect class="cls-5" x="121.45" y="86.31" width="5.15" height="37.42" rx="2" ry="2"/><rect class="cls-5" x="97.8" y="77.27" width="5.65" height="46.47" rx="2" ry="2"/></g></g></svg>

After

Width:  |  Height:  |  Size: 996 B

View File

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 201 201"><defs><style>.cls-1{opacity:0;}.cls-2,.cls-3{fill:none;stroke:#092370;stroke-miterlimit:10;}.cls-3{stroke-width:0.83px;}.cls-4{fill:#facd51;}</style></defs><title>15清洗</title><g id="图层_2" data-name="图层 2"><g id="图层_1-2" data-name="图层 1"><g class="cls-1"><path class="cls-2" d="M100.5.5h0a100,100,0,0,1,100,100h0a100,100,0,0,1-100,100h0a100,100,0,0,1-100-100h0A100,100,0,0,1,100.5.5Z"/><rect class="cls-2" x="33.83" y="33.83" width="133.33" height="133.33"/><rect class="cls-3" x="44.93" y="44.93" width="111.13" height="111.13"/></g><path class="cls-4" d="M112.41,81.61V48a3,3,0,0,0-3-3H91.61a3,3,0,0,0-3,3V81.61a3,3,0,0,1-3,3H51.92a3,3,0,0,0-3,3v9.84a3,3,0,0,0,3,3h1.91a3,3,0,0,1,3,3V153a3,3,0,0,0,3,3H69.7a3,3,0,0,0,3-3V127.33a3,3,0,0,1,3-3h1.91a3,3,0,0,1,3,3V153a3,3,0,0,0,3,3h9.84a3,3,0,0,0,3-3V127.33a3,3,0,0,1,3-3h1.91a3,3,0,0,1,3,3V153a3,3,0,0,0,3,3h9.84a3,3,0,0,0,3-3V127.33a3,3,0,0,1,3-3h1.91a3,3,0,0,1,3,3V153a3,3,0,0,0,3,3h9.84a3,3,0,0,0,3-3V103.52a3,3,0,0,1,3-3h1.91a3,3,0,0,0,3-3V87.64a3,3,0,0,0-3-3H115.42A3,3,0,0,1,112.41,81.61Z"/></g></g></svg>

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 201 201"><defs><style>.cls-1{opacity:0;}.cls-2,.cls-3,.cls-6{fill:none;}.cls-2,.cls-3{stroke:#092370;stroke-miterlimit:10;}.cls-3{stroke-width:0.83px;}.cls-4{fill:#facd51;}.cls-5{fill:#fce5a7;}.cls-6{stroke:#facd51;stroke-linecap:round;stroke-linejoin:round;stroke-width:10.96px;}</style></defs><title>16连接</title><g id="图层_2" data-name="图层 2"><g id="图层_1-2" data-name="图层 1"><g class="cls-1"><path class="cls-2" d="M100.5.5h0a100,100,0,0,1,100,100h0a100,100,0,0,1-100,100h0a100,100,0,0,1-100-100h0A100,100,0,0,1,100.5.5Z"/><rect class="cls-2" x="33.83" y="33.83" width="133.33" height="133.33"/><rect class="cls-3" x="44.93" y="44.93" width="111.13" height="111.13"/></g><circle class="cls-4" cx="102.42" cy="61.04" r="15.33"/><circle class="cls-5" cx="60.26" cy="130.01" r="15.33"/><circle class="cls-5" cx="140.74" cy="130.01" r="15.33"/><path class="cls-6" d="M51.91,103.62A48.44,48.44,0,0,1,74.41,65.84"/><path class="cls-6" d="M126,147.92a48.51,48.51,0,0,1-50.56.53"/><path class="cls-6" d="M130,68.61a48.38,48.38,0,0,1,18.61,35.83"/></g></g></svg>

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 201 201"><defs><style>.cls-1{opacity:0;}.cls-2,.cls-3{fill:none;stroke:#092370;stroke-miterlimit:10;}.cls-3{stroke-width:0.83px;}.cls-4{fill:#fce5a7;}.cls-5{fill:#facd51;}</style></defs><title>17工作包</title><g id="图层_2" data-name="图层 2"><g id="图层_1-2" data-name="图层 1"><g class="cls-1"><path class="cls-2" d="M100.5.5h0a100,100,0,0,1,100,100h0a100,100,0,0,1-100,100h0a100,100,0,0,1-100-100h0A100,100,0,0,1,100.5.5Z"/><rect class="cls-2" x="33.83" y="33.83" width="133.33" height="133.33"/><rect class="cls-3" x="44.93" y="44.93" width="111.13" height="111.13"/></g><path class="cls-4" d="M156.07,73.41c0-10.19-4.54-17.36-13.43-17.36H59.75c-8.88,0-14.82,7.18-14.82,17.36v16H156.07Z"/><path class="cls-5" d="M44.94,89.39v41.52c0,10.19,5,14,13.89,14h82.88c8.88,0,14.35-3.86,14.35-14V89.39Z"/></g></g></svg>

After

Width:  |  Height:  |  Size: 878 B

View File

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 201 201"><defs><style>.cls-1{opacity:0;}.cls-2,.cls-3{fill:none;stroke:#092370;stroke-miterlimit:10;}.cls-3{stroke-width:0.83px;}.cls-4{fill:#9198b3;}</style></defs><title>18存储</title><g id="图层_2" data-name="图层 2"><g id="图层_1-2" data-name="图层 1"><g class="cls-1"><path class="cls-2" d="M100.5.5h0a100,100,0,0,1,100,100h0a100,100,0,0,1-100,100h0a100,100,0,0,1-100-100h0A100,100,0,0,1,100.5.5Z"/><rect class="cls-2" x="33.83" y="33.83" width="133.33" height="133.33"/><rect class="cls-3" x="44.93" y="44.93" width="111.13" height="111.13"/></g><path class="cls-4" d="M119.72,76.67a3.48,3.48,0,0,0,3.47-3.47v-7a3.47,3.47,0,1,0-6.95,0v7A3.48,3.48,0,0,0,119.72,76.67Z"/><path class="cls-4" d="M140.61,44.94H60.39A15.47,15.47,0,0,0,44.94,60.39v80.23a15.47,15.47,0,0,0,15.45,15.45h80.23a15.47,15.47,0,0,0,15.45-15.45V60.39A15.47,15.47,0,0,0,140.61,44.94Zm-11.9,7.75V80a3.32,3.32,0,0,1-3.31,3.31H75.6A3.32,3.32,0,0,1,72.29,80V52.69Zm19.6,87.92a7.71,7.71,0,0,1-7.7,7.7H60.39a7.71,7.71,0,0,1-7.7-7.7V60.39a7.71,7.71,0,0,1,7.7-7.7h4.15V80A11.08,11.08,0,0,0,75.6,91H125.4A11.08,11.08,0,0,0,136.47,80V52.69h4.15a7.71,7.71,0,0,1,7.7,7.7Z"/></g></g></svg>

After

Width:  |  Height:  |  Size: 1.2 KiB

View File

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 201 201"><defs><style>.cls-1{opacity:0;}.cls-2,.cls-3{fill:none;stroke:#092370;stroke-miterlimit:10;}.cls-3{stroke-width:0.83px;}.cls-4{fill:#9198b3;}</style></defs><title>19导出</title><g id="图层_2" data-name="图层 2"><g id="图层_1-2" data-name="图层 1"><g class="cls-1"><path class="cls-2" d="M100.5.5h0a100,100,0,0,1,100,100h0a100,100,0,0,1-100,100h0a100,100,0,0,1-100-100h0A100,100,0,0,1,100.5.5Z"/><rect class="cls-2" x="33.83" y="33.83" width="133.33" height="133.33"/><rect class="cls-3" x="44.93" y="44.93" width="111.13" height="111.13"/></g><path class="cls-4" d="M138.79,69.74c-.11-7-4.94-10.87-12.88-11-2.6,0-5.21,0-8,0,0-1.41.06-2.27,0-3.14-.54-6.67-5-10.5-12.45-10.53q-24.13-.1-48.26,0C49.71,45.1,45,49.17,45,55.72q-.12,35.46,0,70.92c0,6.28,4.67,10.47,11.68,11,1.22.08,2.44.15,4.13.25,0,2.9-.13,5.62,0,8.32a10.09,10.09,0,0,0,9.85,9.56c8.58.25,17.16.3,25.75.25h13.35a3.62,3.62,0,0,0,3.8-3.38v-.19a3.62,3.62,0,0,0-3.8-3.38H96.48q-10.74,0-21.47,0c-5.66,0-6.53-.81-6.53-5.87q0-35.83,0-71.66c0-5.15.74-5.82,6.51-5.83q24.54,0,49.09,0c6.25,0,6.89.58,6.9,6.26q0,17.92,0,35.83c0,2.38.92,4.43,3.88,4.4s4-1.94,4-4.37C138.85,95.12,139,82.43,138.79,69.74Zm-29-11h-4.37c-10.49,0-21,0-31.48,0q-13.11.08-13.13,11.8c0,18.54,0,37.08,0,55.62v3.94c-6.23,1.07-8-.14-8-5.17q0-33.78,0-67.57c0-4.58,1-5.48,6.09-5.48q22.46,0,44.91,0C109.37,51.88,110.4,52.95,109.75,58.72Z"/><path class="cls-4" d="M118.33,100.39c-6.14.05-12.28,0-18.41,0s-12.56,0-18.83,0c-2.65,0-4.52.91-4.71,3.23-.2,2.59,1.82,3.82,4.54,3.83q18.83.08,37.66,0c2.66,0,4.68-1.15,4.45-3.87C122.82,101.1,120.91,100.37,118.33,100.39Z"/><path class="cls-4" d="M91.4,121c-4,0-8,0-12,0-1.69,0-2.89.91-3,3.23-.13,2.59,1.16,3.82,2.9,3.83,8,.06,16,.07,24,0,1.7,0,3-1.15,2.84-3.87-.14-2.47-1.35-3.21-3-3.18C99.24,121.05,95.32,121,91.4,121Z"/><path class="cls-4" d="M81.36,86.57q18.41,0,36.83,0c2.59,0,4.89-.81,4.82-3.55s-2.24-3.41-4.93-3.4c-6.14,0-12.28,0-18.41,0s-12,0-18,0c-2.86,0-5.25.66-5.27,3.49C76.39,85.72,78.73,86.57,81.36,86.57Z"/><path class="cls-4" d="M137.31,128.39v3.7c-5.05,0-9.56,0-14.31,0-2.78,0-5.5.37-5.53,3.82s2.74,3.82,5.5,3.8c5.23,0,10.46,0,14.3,0l0,.15v4.39c0,2.64,2.44,4.3,4.39,3l13.4-9.09a2.19,2.19,0,0,0,0-3.62l-13.4-9.09C139.75,124.09,137.31,125.74,137.31,128.39Z"/></g></g></svg>

After

Width:  |  Height:  |  Size: 2.3 KiB

View File

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 201 201"><defs><style>.cls-1{opacity:0;}.cls-2,.cls-3{fill:none;stroke:#092370;stroke-miterlimit:10;}.cls-3{stroke-width:0.83px;}.cls-4{fill:#9198b3;}</style></defs><title>20执行</title><g id="图层_2" data-name="图层 2"><g id="图层_1-2" data-name="图层 1"><g class="cls-1"><path class="cls-2" d="M100.5.5h0a100,100,0,0,1,100,100h0a100,100,0,0,1-100,100h0a100,100,0,0,1-100-100h0A100,100,0,0,1,100.5.5Z"/><rect class="cls-2" x="33.83" y="33.83" width="133.33" height="133.33"/><rect class="cls-3" x="44.93" y="44.93" width="111.13" height="111.13"/></g><path class="cls-4" d="M49.12,97.56q0-19.34,0-38.69C49.13,50.62,54.65,45,62.89,45Q91.45,44.9,120,45c8.07,0,13.73,5.57,13.83,13.64.12,9.07,0,18.13,0,27.2,0,3.1-1.42,4.78-3.83,4.76s-3.72-1.67-3.73-4.86c0-8.46,0-16.93,0-25.39,0-6.07-1.72-7.8-7.69-7.8H64.19c-5.75,0-7.6,1.85-7.6,7.61q0,37.78,0,75.56c0,5.81,1.74,7.53,7.57,7.53H83.5c.71,0,1.41,0,2.11,0,2.39.15,3.8,1.47,3.8,3.83a3.37,3.37,0,0,1-3.65,3.61c-8.56,0-17.14.28-25.68-.15-6.21-.31-10.88-6.09-10.92-12.77-.09-13.4,0-26.8,0-40.2Z"/><path class="cls-4" d="M151.88,129.77a26.42,26.42,0,1,1-26.34-26.61A26.44,26.44,0,0,1,151.88,129.77Zm-26.56,18.74a18.89,18.89,0,1,0,.13-37.78,18.89,18.89,0,0,0-.13,37.78Z"/><path class="cls-4" d="M91.26,63.9c6.84,0,13.68,0,20.53,0,3.23,0,4.78,1.24,4.75,3.7s-1.63,3.73-4.8,3.74q-20.22,0-40.45,0c-3.18,0-5.11-1.6-5-3.95s1.82-3.48,5-3.49Q81.3,63.89,91.26,63.9Z"/><path class="cls-4" d="M85.51,92.32c-4.84,0-9.67,0-14.51,0-2.57,0-4.35-1-4.66-3.68-.27-2.25,1.74-4,4.67-4q14.66-.07,29.32,0c2.47,0,4.41.86,4.6,3.69.16,2.46-1.52,3.91-4.61,3.94C95.38,92.36,90.44,92.32,85.51,92.32Z"/><path class="cls-4" d="M75.31,113.37c-1.91-.09-3.83-.09-5.72-.29a3.4,3.4,0,0,1-3.24-3.7A3.46,3.46,0,0,1,70,105.75c3.62-.08,7.24-.07,10.86,0a3.4,3.4,0,0,1,3.64,3.6,3.32,3.32,0,0,1-3.17,3.72C79.34,113.28,77.32,113.28,75.31,113.37Z"/><path class="cls-4" d="M121.35,129.65c0-1.91-.09-3.82,0-5.72.16-2.67,1.88-3.58,4.06-2.08,2.56,1.76,5,3.68,7.47,5.57,1.85,1.42,1.94,3,.05,4.44-2.46,1.9-4.94,3.79-7.51,5.54-2.22,1.52-3.84.65-4.1-2,0-.2,0-.4,0-.6q0-2.56,0-5.12Z"/></g></g></svg>

After

Width:  |  Height:  |  Size: 2.1 KiB

View File

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 201 201"><defs><style>.cls-1{opacity:0;}.cls-2,.cls-3{fill:none;stroke:#092370;stroke-miterlimit:10;}.cls-3{stroke-width:0.83px;}.cls-4{fill:#9198b3;}</style></defs><title>21封装包</title><g id="图层_2" data-name="图层 2"><g id="图层_1-2" data-name="图层 1"><g class="cls-1"><path class="cls-2" d="M100.5.5h0a100,100,0,0,1,100,100h0a100,100,0,0,1-100,100h0a100,100,0,0,1-100-100h0A100,100,0,0,1,100.5.5Z"/><rect class="cls-2" x="33.83" y="33.83" width="133.33" height="133.33"/><rect class="cls-3" x="44.93" y="44.93" width="111.13" height="111.13"/></g><path class="cls-4" d="M140.61,65H127.67c-1.18-11.15-10.37-19.86-21.51-19.86H95.7c-11.13,0-20.32,8.71-21.51,19.86H60.39A15.71,15.71,0,0,0,44.94,80.89V140a15.71,15.71,0,0,0,15.45,15.92h80.23A15.71,15.71,0,0,0,156.07,140V80.89A15.71,15.71,0,0,0,140.61,65ZM95.7,53.1h10.46A14,14,0,0,1,119.81,65H82A14,14,0,0,1,95.7,53.1ZM72.29,73h56.43V90.4a3.37,3.37,0,0,1-3.31,3.41H75.6a3.37,3.37,0,0,1-3.31-3.41Zm76,67a7.83,7.83,0,0,1-7.7,7.93H60.39a7.83,7.83,0,0,1-7.7-7.93V80.89A7.83,7.83,0,0,1,60.39,73h4.15V90.4A11.25,11.25,0,0,0,75.6,101.8H125.4a11.25,11.25,0,0,0,11.06-11.4V73h4.15a7.83,7.83,0,0,1,7.7,7.93Z"/></g></g></svg>

After

Width:  |  Height:  |  Size: 1.2 KiB

View File

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 201 201"><defs><style>.cls-1{opacity:0;}.cls-2,.cls-3{fill:none;stroke:#092370;stroke-miterlimit:10;}.cls-3{stroke-width:0.83px;}.cls-4{fill:#ffdce0;}.cls-5{fill:#ff4f63;}</style></defs><title>2.结束</title><g id="图层_2" data-name="图层 2"><g id="图层_1-2" data-name="图层 1"><g class="cls-1"><path class="cls-2" d="M100.5.5h0a100,100,0,0,1,100,100h0a100,100,0,0,1-100,100h0a100,100,0,0,1-100-100h0A100,100,0,0,1,100.5.5Z"/><rect class="cls-2" x="33.83" y="33.83" width="133.33" height="133.33"/><rect class="cls-3" x="44.93" y="44.93" width="111.13" height="111.13"/></g><rect class="cls-4" x="44.93" y="54.56" width="111.13" height="91.88" rx="0.87" ry="0.87"/><ellipse class="cls-5" cx="100.5" cy="100.5" rx="23.15" ry="23.4"/></g></g></svg>

After

Width:  |  Height:  |  Size: 809 B

View File

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 201 201"><defs><style>.cls-1{opacity:0;}.cls-2,.cls-3{fill:none;stroke:#092370;stroke-miterlimit:10;}.cls-3{stroke-width:0.83px;}.cls-4{fill:#4f80f9;}.cls-5{fill:#95b3fb;}</style></defs><title>3.横向分割</title><g id="图层_2" data-name="图层 2"><g id="图层_1-2" data-name="图层 1"><g class="cls-1"><path class="cls-2" d="M100.5.5h0a100,100,0,0,1,100,100h0a100,100,0,0,1-100,100h0a100,100,0,0,1-100-100h0A100,100,0,0,1,100.5.5Z"/><rect class="cls-2" x="33.83" y="33.83" width="133.33" height="133.33"/><rect class="cls-3" x="44.93" y="44.93" width="111.13" height="111.13"/></g><path class="cls-4" d="M44.93,54.2h65c.09,1.11.23,2,.23,2.91,0,28.84,0,57.68.06,86.53,0,2.2-.57,3-3.42,3-12.91,0-25.82.13-38.74.19-7.6,0-15.2,0-23.09,0Zm25.79,5.24v81.78H83.9V59.44ZM51,59.45v81.78H64V59.45Zm39.4,81.76h13.19V59.55H90.38Z"/><path class="cls-5" d="M117.34,72.61h29l.46-.67-9.16-9.34,4.65-3.87c4,4,8.8,8,12.58,12.8,1.38,1.75,1.63,6.27.34,7.91-3.89,4.94-8.79,9.08-13.33,13.57l-5-4.69,10.2-8.5-.63-1H117.34Z"/><path class="cls-5" d="M146.35,128.81h-29v-6h29l.5-.78-9.16-9.4,4.22-4.43c4.56,4.56,9.36,8.66,13.16,13.54,1.34,1.72,1.37,6.22,0,7.93-3.81,4.88-8.63,9-13.28,13.61L138,139.06l-.84-.78,10.22-8Z"/><rect class="cls-4" x="47.82" y="58.72" width="60.6" height="82.49"/></g></g></svg>

After

Width:  |  Height:  |  Size: 1.3 KiB

View File

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 201 201"><defs><style>.cls-1{opacity:0;}.cls-2,.cls-3{fill:none;stroke:#092370;stroke-miterlimit:10;}.cls-3{stroke-width:0.83px;}.cls-4{fill:#4f80f9;}.cls-5{fill:#95b3fb;}</style></defs><title>4.纵向分割</title><g id="图层_2" data-name="图层 2"><g id="图层_1-2" data-name="图层 1"><g class="cls-1"><path class="cls-2" d="M100.5.5h0a100,100,0,0,1,100,100h0a100,100,0,0,1-100,100h0a100,100,0,0,1-100-100h0A100,100,0,0,1,100.5.5Z"/><rect class="cls-2" x="33.83" y="33.83" width="133.33" height="133.33"/><rect class="cls-3" x="44.93" y="44.93" width="111.13" height="111.13"/></g><path class="cls-4" d="M146.8,44.94v65c-1.11.09-2,.23-2.91.23-28.84,0-57.68,0-86.53.06-2.2,0-3-.57-3-3.42,0-12.91-.13-25.82-.19-38.74,0-7.6,0-15.2,0-23.09Zm-5.24,25.79H59.78V83.91h81.78Zm0-19.74H59.77V64.05h81.78ZM59.79,90.38v13.19h81.66V90.38Z"/><path class="cls-5" d="M128.39,117.34v29l.67.46,9.34-9.16,3.87,4.65c-4,4-8,8.8-12.8,12.58-1.75,1.38-6.27,1.63-7.91.34-4.94-3.89-9.08-8.79-13.57-13.33l4.69-5,8.5,10.2,1-.63V117.34Z"/><path class="cls-5" d="M72.19,146.35v-29h6v29l.78.5,9.4-9.16,4.43,4.22c-4.56,4.56-8.66,9.36-13.54,13.16-1.72,1.34-6.22,1.37-7.93,0-4.88-3.81-9-8.63-13.61-13.28L61.94,138l.78-.84,8,10.22Z"/><rect class="cls-4" x="70.53" y="33.32" width="60.6" height="86.49" transform="translate(177.4 -24.26) rotate(90)"/></g></g></svg>

After

Width:  |  Height:  |  Size: 1.4 KiB

View File

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 201 201"><defs><style>.cls-1{opacity:0;}.cls-2,.cls-3{fill:none;stroke:#092370;stroke-miterlimit:10;}.cls-3{stroke-width:0.83px;}.cls-4{fill:#c5a9f1;}.cls-5{fill:#a375e9;}</style></defs><title>5文件数据</title><g id="图层_2" data-name="图层 2"><g id="图层_1-2" data-name="图层 1"><g class="cls-1"><path class="cls-2" d="M100.5.5h0a100,100,0,0,1,100,100h0a100,100,0,0,1-100,100h0a100,100,0,0,1-100-100h0A100,100,0,0,1,100.5.5Z"/><rect class="cls-2" x="33.83" y="33.83" width="133.33" height="133.33"/><rect class="cls-3" x="44.93" y="44.93" width="111.13" height="111.13"/></g><polygon class="cls-4" points="109.15 44.94 50.33 44.94 50.33 117.63 88.76 117.63 88.76 82.77 109.16 82.77 109.16 44.94 109.15 44.94"/><polygon class="cls-5" points="150.66 88.1 115.07 88.1 94.69 88.1 94.67 122.95 94.67 156.06 150.67 156.06 150.67 88.1 150.66 88.1"/></g></g></svg>

After

Width:  |  Height:  |  Size: 923 B

View File

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 201 201"><defs><style>.cls-1{opacity:0;}.cls-2,.cls-3{fill:none;stroke:#092370;stroke-miterlimit:10;}.cls-3{stroke-width:0.83px;}.cls-4{fill:#a375e9;}.cls-5{fill:#fff;}</style></defs><title>6数据校验</title><g id="图层_2" data-name="图层 2"><g id="图层_1-2" data-name="图层 1"><g class="cls-1"><path class="cls-2" d="M100.5.5h0a100,100,0,0,1,100,100h0a100,100,0,0,1-100,100h0a100,100,0,0,1-100-100h0A100,100,0,0,1,100.5.5Z"/><rect class="cls-2" x="33.83" y="33.83" width="133.33" height="133.33"/><rect class="cls-3" x="44.93" y="44.93" width="111.13" height="111.13"/></g><path class="cls-4" d="M150.42,44.93H50.77a5.24,5.24,0,0,0-5.27,5.32V150.74a5.24,5.24,0,0,0,5.27,5.32h99.44a5.24,5.24,0,0,0,5.27-5.32V50.26A5,5,0,0,0,150.42,44.93Z"/><path class="cls-5" d="M136.29,77.79a5.36,5.36,0,0,0-7.54.44L99,111.73l-16.9-15a5.36,5.36,0,0,0-7.54.44h0a5.36,5.36,0,0,0,.44,7.54l20.83,18.53a5.36,5.36,0,0,0,6.75.28,5.29,5.29,0,0,0,1.05-.9l33.13-37.25A5.36,5.36,0,0,0,136.29,77.79Z"/></g></g></svg>

After

Width:  |  Height:  |  Size: 1.0 KiB

View File

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 201 201"><defs><style>.cls-1{opacity:0;}.cls-2,.cls-3{fill:none;stroke:#092370;stroke-miterlimit:10;}.cls-3{stroke-width:0.83px;}.cls-4{fill:#a375e9;}.cls-5{fill:#c5a9f1;}</style></defs><title>7单键查询</title><g id="图层_2" data-name="图层 2"><g id="图层_1-2" data-name="图层 1"><g class="cls-1"><path class="cls-2" d="M100.5.5h0a100,100,0,0,1,100,100h0a100,100,0,0,1-100,100h0a100,100,0,0,1-100-100h0A100,100,0,0,1,100.5.5Z"/><rect class="cls-2" x="33.83" y="33.83" width="133.33" height="133.33"/><rect class="cls-3" x="44.93" y="44.93" width="111.13" height="111.13"/></g><path class="cls-4" d="M105.32,125.61,85.67,145.47,56,115.49,75.66,95.63a5.34,5.34,0,0,0,0-7.49,5.21,5.21,0,0,0-7.42,0L48.59,108a10.68,10.68,0,0,0,0,15l29.66,30a10.41,10.41,0,0,0,14.83,0l19.65-19.86a5.34,5.34,0,0,0,0-7.49A5.21,5.21,0,0,0,105.32,125.61ZM152.41,78,122.75,48a10.41,10.41,0,0,0-14.83,0L88.26,67.9A5.34,5.34,0,0,0,86.91,73a5.27,5.27,0,0,0,3.71,3.75,5.21,5.21,0,0,0,5.07-1.37l19.65-19.86,29.66,30-19.65,19.86a5.34,5.34,0,0,0,0,7.49,5.21,5.21,0,0,0,7.42,0L152.41,93a10.68,10.68,0,0,0,0-15Z"/><path class="cls-5" d="M111.62,89.26a5.2,5.2,0,0,0-7.42,0l-14.83,15a5.34,5.34,0,0,0,0,7.49,5.21,5.21,0,0,0,7.42,0l14.83-15A5.34,5.34,0,0,0,111.62,89.26Z"/></g></g></svg>

After

Width:  |  Height:  |  Size: 1.3 KiB

View File

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 201 201"><defs><style>.cls-1{opacity:0;}.cls-2,.cls-3{fill:none;stroke:#092370;stroke-miterlimit:10;}.cls-3{stroke-width:0.83px;}.cls-4{fill:#c5a9f1;}.cls-5{fill:#a375e9;}</style></defs><title>8个人服务</title><g id="图层_2" data-name="图层 2"><g id="图层_1-2" data-name="图层 1"><g class="cls-1"><path class="cls-2" d="M100.5.5h0a100,100,0,0,1,100,100h0a100,100,0,0,1-100,100h0a100,100,0,0,1-100-100h0A100,100,0,0,1,100.5.5Z"/><rect class="cls-2" x="33.83" y="33.83" width="133.33" height="133.33"/><rect class="cls-3" x="44.93" y="44.93" width="111.13" height="111.13"/></g><circle class="cls-4" cx="100.5" cy="78.54" r="28.71"/><path class="cls-5" d="M100.5,106.1c-27.34,0-50.16,13.23-55.56,45.06H156.07C150.66,119.33,127.84,106.1,100.5,106.1Z"/></g></g></svg>

After

Width:  |  Height:  |  Size: 829 B

View File

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 201 201"><defs><style>.cls-1{opacity:0;}.cls-2,.cls-3{fill:none;stroke:#092370;stroke-miterlimit:10;}.cls-3{stroke-width:0.83px;}.cls-4{fill:#c5a9f1;}.cls-5{fill:#a375e9;}</style></defs><title>9外部服务</title><g id="图层_2" data-name="图层 2"><g id="图层_1-2" data-name="图层 1"><g class="cls-1"><path class="cls-2" d="M100.5.5h0a100,100,0,0,1,100,100h0a100,100,0,0,1-100,100h0a100,100,0,0,1-100-100h0A100,100,0,0,1,100.5.5Z"/><rect class="cls-2" x="33.83" y="33.83" width="133.33" height="133.33"/><rect class="cls-3" x="44.93" y="44.93" width="111.13" height="111.13"/></g><path class="cls-4" d="M100.5,61C78.76,45.72,58.13,40.34,49.23,49.24S45.72,78.77,61,100.5A168.25,168.25,0,0,1,100.5,61Z"/><path class="cls-4" d="M121.9,121.9A163.41,163.41,0,0,1,100.5,140c21.74,15.28,42.37,20.66,51.27,11.76s3.51-29.53-11.77-51.26A163.45,163.45,0,0,1,121.9,121.9Z"/><path class="cls-5" d="M140,100.5c15.28-21.73,20.66-42.37,11.77-51.27S122.24,45.72,100.5,61a163.41,163.41,0,0,1,21.4,18.1A163.45,163.45,0,0,1,140,100.5Z"/><path class="cls-5" d="M61,100.5c-15.28,21.73-20.66,42.37-11.77,51.26S78.76,155.28,100.5,140a163.49,163.49,0,0,1-21.4-18.1A163.45,163.45,0,0,1,61,100.5Z"/><path class="cls-5" d="M140,100.5a163.45,163.45,0,0,0-18.1-21.4A163.41,163.41,0,0,0,100.5,61,168.25,168.25,0,0,0,61,100.5a163.45,163.45,0,0,0,18.1,21.4A163.49,163.49,0,0,0,100.5,140a163.41,163.41,0,0,0,21.4-18.1A163.45,163.45,0,0,0,140,100.5Zm-40.28,8a8,8,0,1,1,8-8A8,8,0,0,1,99.72,108.46Z"/></g></g></svg>

After

Width:  |  Height:  |  Size: 1.5 KiB

View File

@ -1,38 +1,38 @@
<template> <template>
<div class="component-upload-image"> <div class="component-upload-image">
<el-upload <el-upload
ref="imageUpload" multiple
:action="uploadImgUrl" :action="uploadImgUrl"
list-type="picture-card"
:on-success="handleUploadSuccess"
:before-upload="handleBeforeUpload" :before-upload="handleBeforeUpload"
:class="{hide: this.fileList.length >= this.limit}"
:file-list="fileList"
:headers="headers"
:limit="limit" :limit="limit"
:on-error="handleUploadError" :on-error="handleUploadError"
:on-exceed="handleExceed" :on-exceed="handleExceed"
:on-preview="handlePictureCardPreview" ref="imageUpload"
:on-remove="handleDelete" :on-remove="handleDelete"
:on-success="handleUploadSuccess"
:show-file-list="true" :show-file-list="true"
list-type="picture-card" :headers="headers"
multiple :file-list="fileList"
:on-preview="handlePictureCardPreview"
:class="{hide: this.fileList.length >= this.limit}"
> >
<i class="el-icon-plus"></i> <i class="el-icon-plus"></i>
</el-upload> </el-upload>
<!-- 上传提示 --> <!-- 上传提示 -->
<div v-if="showTip" slot="tip" class="el-upload__tip"> <div class="el-upload__tip" slot="tip" v-if="showTip">
请上传 请上传
<template v-if="fileSize"> <b style="color: #f56c6c">{{ fileSize }}MB</b></template> <template v-if="fileSize"> <b style="color: #f56c6c">{{ fileSize }}MB</b> </template>
<template v-if="fileType"> <b style="color: #f56c6c">{{ fileType.join("/") }}</b></template> <template v-if="fileType"> <b style="color: #f56c6c">{{ fileType.join("/") }}</b> </template>
的文件 的文件
</div> </div>
<el-dialog <el-dialog
:visible.sync="dialogVisible" :visible.sync="dialogVisible"
append-to-body
title="预览" title="预览"
width="800" width="800"
append-to-body
> >
<img <img
:src="dialogImageUrl" :src="dialogImageUrl"
@ -43,7 +43,7 @@
</template> </template>
<script> <script>
import {getToken} from "@/utils/auth"; import { getToken } from "@/utils/auth";
export default { export default {
props: { props: {
@ -149,13 +149,13 @@ export default {
}, },
// //
handleUploadSuccess(res, file) { handleUploadSuccess(res, file) {
if (res.data.code === 200) { if (res.code === 200) {
this.uploadList.push({name: res.data.url, url: res.data.url}); this.uploadList.push({name: res.data.url, url: res.data.url});
this.uploadedSuccessfully(); this.uploadedSuccessfully();
} else { } else {
this.number--; this.number--;
this.$modal.closeLoading(); this.$modal.closeLoading();
this.$modal.msgError(res.data.msg); this.$modal.msgError(res.msg);
this.$refs.imageUpload.handleRemove(file); this.$refs.imageUpload.handleRemove(file);
this.uploadedSuccessfully(); this.uploadedSuccessfully();
} }
@ -202,7 +202,7 @@ export default {
} }
}; };
</script> </script>
<style lang="scss" scoped> <style scoped lang="scss"> //123
// .el-upload--picture-card // .el-upload--picture-card
::v-deep.hide .el-upload--picture-card { ::v-deep.hide .el-upload--picture-card {
display: none; display: none;

View File

@ -0,0 +1,57 @@
<template>
<codemirror ref="mycode" :value="curCode" :options="cmOptions" class="code" v-show="aaa">
</codemirror>
</template>
<script>
import { codemirror } from 'vue-codemirror'
import "codemirror/theme/ambiance.css"; // theme
require("codemirror/mode/javascript/javascript"); // jsmode
export default {
name: 'ExecuteAction',
data() {
return {
curCode: '测试',
cmOptions: {
// autorefresh: true,
// tabSize: 4,
// mode: 'text/x-properties',
// theme: 'ayu-mirage',
// line: true,
// viewportMargin: Infinity, //使
// highlightDifferences: true,
// autofocus: false,
// indentUnit: 2,
// smartIndent: true,
// readOnly: true, //
// showCursorWhenSelecting: true,
// firstLineNumber: 1
lineNumbers: true, //
mode: 'text/x-yaml', // model
gutters: ['CodeMirror-lint-markers'], //
theme: "ambiance",
lint: true, //
}
}
},
components: {
codemirror
},
}
</script>
<style scoped>
.information-box>>>.CodeMirror {
font-family: monospace;
height: 71vh;
direction: ltr;
}
</style>

View File

@ -0,0 +1,40 @@
let dataA = {
name: '流程A',
nodeList: [
{
id: 'nodeA',
name: '流程A-节点A',
type: 'task',
left: '26px',
top: '161px',
ico: 'el-icon-user-solid'
},
{
id: 'nodeB',
name: '流程A-节点B',
type: 'task',
left: '340px',
top: '161px',
ico: 'el-icon-goods'
},
{
id: 'nodeC',
name: '流程A-节点C',
type: 'task',
left: '739px',
top: '161px',
ico: 'el-icon-present'
}
],
lineList: [{
from: 'nodeA',
to: 'nodeB'
}, {
from: 'nodeB',
to: 'nodeC'
}]
}
export function getDataA () {
return dataA
}

View File

@ -0,0 +1,61 @@
let dataB = {
name: '流程B',
nodeList: [
{
id: 'nodeA',
name: '节点A-不可拖拽',
type: 'task',
left: '18px',
top: '223px',
ico: 'el-icon-user-solid',
state: 'success',
viewOnly: true
},
{
id: 'nodeB',
type: 'task',
name: '流程B-节点B',
left: '351px',
top: '96px',
ico: 'el-icon-goods',
state: 'error'
},
{
id: 'nodeC',
name: '流程B-节点C',
type: 'task',
left: '354px',
top: '351px',
ico: 'el-icon-present',
state: 'warning'
}, {
id: 'nodeD',
name: '流程B-节点D',
type: 'task',
left: '723px',
top: '215px',
ico: 'el-icon-present',
state: 'running'
}
],
lineList: [{
from: 'nodeA',
to: 'nodeB',
label: '条件A'
}, {
from: 'nodeA',
to: 'nodeC',
label: '条件B'
}, {
from: 'nodeB',
to: 'nodeD'
}, {
from: 'nodeC',
to: 'nodeD'
}
]
}
export function getDataB () {
return dataB
}

View File

@ -0,0 +1,42 @@
let dataC = {
name: '流程C',
nodeList: [
{
id: 'nodeA',
name: '流程C-节点A',
type: 'task',
left: '400px',
top: '15px',
ico: 'el-icon-user-solid'
},
{
id: 'nodeB',
name: '流程C-节点B',
type: 'task',
left: '400px',
top: '200px',
ico: 'el-icon-goods'
},
{
id: 'nodeC',
name: '流程C-节点C',
type: 'task',
left: '400px',
top: '378px',
ico: 'el-icon-present'
}
],
lineList: [
{
from: 'nodeA',
to: 'nodeB'
}, {
from: 'nodeB',
to: 'nodeC'
}
]
}
export function getDataC () {
return dataC
}

View File

@ -0,0 +1,71 @@
var dataD = {
name: '流程D',
nodeList: [
{
id: 'nodeA',
name: '流程D-节点A',
type: 'task',
left: '18px',
top: '223px',
ico: 'el-icon-user-solid',
state: 'success'
},
{
id: 'nodeB',
type: 'task',
name: '流程D-节点B',
left: '351px',
top: '96px',
ico: 'el-icon-goods',
state: 'error'
},
{
id: 'nodeC',
name: '流程D-节点C',
type: 'task',
left: '354px',
top: '351px',
ico: 'el-icon-present',
state: 'warning'
}, {
id: 'nodeD',
name: '流程D-节点D',
type: 'task',
left: '723px',
top: '215px',
ico: 'el-icon-present',
state: 'running'
}
],
lineList: [{
from: 'nodeA',
to: 'nodeB',
label: '直线,自定义线样式,固定锚点',
connector: 'Straight',
anchors: ['Top', 'Bottom'],
paintStyle: {strokeWidth: 2, stroke: '#1879FF'}
}, {
from: 'nodeA',
to: 'nodeC',
label: '贝塞尔曲线,固定锚点',
connector: 'Bezier',
anchors: ['Bottom', 'Left']
}, {
from: 'nodeB',
to: 'nodeD',
label: '默认连线样式,动态锚点'
}, {
from: 'nodeC',
to: 'nodeD',
label: '默认连线样式,动态锚点'
}, {
from: 'nodeC',
to: 'nodeC',
label: '自连接'
}
]
}
export function getDataD() {
return dataD
}

View File

@ -0,0 +1,54 @@
var dataE = {
name: '流程E力导图',
nodeList: [
{
id: 'nodeA',
name: '流程D-节点A',
type: 'task',
ico: 'el-icon-user-solid',
state: 'success'
},
{
id: 'nodeB',
type: 'task',
name: '流程D-节点B',
ico: 'el-icon-goods',
state: 'error'
},
{
id: 'nodeC',
name: '流程D-节点C',
type: 'task',
ico: 'el-icon-present',
state: 'warning'
}, {
id: 'nodeD',
name: '流程D-节点D',
type: 'task',
ico: 'el-icon-present',
state: 'running'
}
],
lineList: [{
from: 'nodeA',
to: 'nodeB'
}, {
from: 'nodeA',
to: 'nodeC',
label: 'hello'
}, {
from: 'nodeB',
to: 'nodeD'
}, {
from: 'nodeC',
to: 'nodeD'
}, {
from: 'nodeC',
to: 'nodeC'
}
]
}
export function getDataE() {
return dataE
}

View File

@ -0,0 +1,182 @@
/**
* 感谢 https://github.com/chaangliu/ForceDirectedLayout/blob/master/javascript/force-directed.js
* A force directed graph layout implementation by liuchang on 2018/05/10.
*/
const CANVAS_WIDTH = 1000
const CANVAS_HEIGHT = 1000
let k
let mNodeList = []
let mEdgeList = []
let mDxMap = {}
let mDyMap = {}
let mNodeMap = {}
export function ForceDirected(data = {}) {
// generate nodes and edges
// for (let i = 0; i < 20; i++) {
// mNodeList.push(new Node(i))
// }
k = 0
mNodeList = []
mEdgeList = []
mDxMap = {}
mDyMap = {}
mNodeMap = {}
let nodeList = data.nodeList
for (let i = 0; i < nodeList.length; i++) {
let node = nodeList[i]
mNodeList.push(node)
}
// for (let i = 0; i < 20; i++) {
// let edgeCount = Math.random() * 8 + 1
// for (let j = 0; j < edgeCount; j++) {
// let targetId = Math.floor(Math.random() * 20)
// let edge = new Edge(i, targetId)
// mEdgeList.push(edge)
// }
// }
// line 转 edge
let lineList = data.lineList
for (let i = 0; i < lineList.length; i++) {
let line = lineList[i]
let edge = new Edge(line.from, line.to)
mEdgeList.push(edge)
}
if (mNodeList && mEdgeList) {
k = Math.sqrt(CANVAS_WIDTH * CANVAS_HEIGHT / mNodeList.length)
}
for (let i = 0; i < mNodeList.length; i++) {
let node = mNodeList[i]
if (node) {
mNodeMap[node.id] = node
}
}
// 随机生成坐标. Generate coordinates randomly.
let initialX, initialY, initialSize = 40.0
for (let i in mNodeList) {
initialX = CANVAS_WIDTH * 0.5
initialY = CANVAS_HEIGHT * 0.5
mNodeList[i].x = initialX + initialSize * (Math.random() - 0.5)
mNodeList[i].y = initialY + initialSize * (Math.random() - 0.5)
}
// 迭代200次. Iterate 200 times.
for (let i = 0; i < 200; i++) {
calculateRepulsive()
calculateTraction()
updateCoordinates()
}
// console.log(JSON.stringify(new Result(mNodeList, mEdgeList)))
// 坐标添加px
for (let i = 0; i < mNodeList.length; i++) {
let node = mNodeList[i]
node.left = node.x + 'px'
node.top = node.y + 'px'
node.x = undefined
node.y = undefined
}
data.nodeList = mNodeList
// console.log(data)
return data
}
function Node(id = null) {
this.id = id
this.x = 22
this.y = null
}
function Edge(source = null, target = null) {
this.source = source
this.target = target
}
/**
* 计算两个Node的斥力产生的单位位移
* Calculate the displacement generated by the repulsive force between two nodes.*
*/
function calculateRepulsive() {
let ejectFactor = 6
let distX, distY, dist
for (let i = 0; i < mNodeList.length; i++) {
mDxMap[mNodeList[i].id] = 0.0
mDyMap[mNodeList[i].id] = 0.0
for (let j = 0; j < mNodeList.length; j++) {
if (i !== j) {
distX = mNodeList[i].x - mNodeList[j].x
distY = mNodeList[i].y - mNodeList[j].y
dist = Math.sqrt(distX * distX + distY * distY)
}
if (dist < 30) {
ejectFactor = 5
}
if (dist > 0 && dist < 250) {
let id = mNodeList[i].id
mDxMap[id] = mDxMap[id] + distX / dist * k * k / dist * ejectFactor
mDyMap[id] = mDyMap[id] + distY / dist * k * k / dist * ejectFactor
}
}
}
}
/**
* 计算Edge的引力对两端Node产生的引力
* Calculate the traction force generated by the edge acted on the two nodes of its two ends.
*/
function calculateTraction() {
let condenseFactor = 3
let startNode, endNode
for (let e = 0; e < mEdgeList.length; e++) {
let eStartID = mEdgeList[e].source
let eEndID = mEdgeList[e].target
startNode = mNodeMap[eStartID]
endNode = mNodeMap[eEndID]
if (!startNode) {
console.log('Cannot find start node id: ' + eStartID + ', please check it out.')
return
}
if (!endNode) {
console.log('Cannot find end node id: ' + eEndID + ', please check it out.')
return
}
let distX, distY, dist
distX = startNode.x - endNode.x
distY = startNode.y - endNode.y
dist = Math.sqrt(distX * distX + distY * distY)
mDxMap[eStartID] = mDxMap[eStartID] - distX * dist / k * condenseFactor
mDyMap[eStartID] = mDyMap[eStartID] - distY * dist / k * condenseFactor
mDxMap[eEndID] = mDxMap[eEndID] + distX * dist / k * condenseFactor
mDyMap[eEndID] = mDyMap[eEndID] + distY * dist / k * condenseFactor
}
}
/**
* 更新坐标
* update the coordinates.
*/
function updateCoordinates() {
let maxt = 4, maxty = 3 // Additional coefficients.
for (let v = 0; v < mNodeList.length; v++) {
let node = mNodeList[v]
let dx = Math.floor(mDxMap[node.id])
let dy = Math.floor(mDyMap[node.id])
if (dx < -maxt) dx = -maxt
if (dx > maxt) dx = maxt
if (dy < -maxty) dy = -maxty
if (dy > maxty) dy = maxty
node.x = node.x + dx >= CANVAS_WIDTH || node.x + dx <= 0 ? node.x - dx : node.x + dx
node.y = node.y + dy >= CANVAS_HEIGHT || node.y + dy <= 0 ? node.y - dy : node.y + dy
}
}
function Result(nodes = null, links = null) {
this.nodes = nodes
this.links = links
}

View File

@ -0,0 +1,61 @@
<template>
<el-dialog
title="帮助"
:visible.sync="dialogVisible"
width="70%"
customClass="flowHelp"
>
<el-tabs tab-position="left">
<el-tab-pane label="如何新增">
<el-divider content-position="left">如何新增</el-divider>
<div>按住鼠标拖拽左侧组件到中间画布中松开鼠标即可</div>
</el-tab-pane>
<el-tab-pane label="如何删除">
<el-divider content-position="left">页面删除</el-divider>
<div>
鼠标点中需要删除的节点点击左上角的删除图标
</div>
<el-divider content-position="left">通过代码删除</el-divider>
<pre>this.deleteNode(nodeId)</pre>
</el-tab-pane>
<el-tab-pane label="如何移动">
<el-divider content-position="left">如何移动</el-divider>
<div>鼠标移动到节点中当鼠标变为可拖拽的图标时按下鼠标移动到新的位置松开鼠标</div>
</el-tab-pane>
<el-tab-pane label="如何连线">
<el-divider content-position="left">如何连线</el-divider>
<div>鼠标移动到节点中左侧的图标上当鼠标变为+时按下鼠标移动到另一个节点中松开鼠标</div>
</el-tab-pane>
<el-tab-pane label="如何添加条件">
<el-divider content-position="left">如何添加条件</el-divider>
<div>点击画布中的连线在页面右侧会出现一个表单输入新的条件点击保存</div>
</el-tab-pane>
<el-tab-pane label="如何进行后端交互存储">
<el-divider content-position="left">如何进行后端交互存储</el-divider>
<div>参考: https://gitee.com/xiaoka2017/easy-flow-sdk</div>
</el-tab-pane>
</el-tabs>
</el-dialog>
</template>
<script>
export default {
data() {
return {
dialogVisible: false
}
},
components: {},
methods: {
init() {
this.dialogVisible = true
}
}
}
</script>
<style>
.flowHelp {
height: 80%;
}
</style>

View File

@ -0,0 +1,225 @@
/*画布容器*/
#efContainer {
position: relative;
overflow: scroll;
flex: 1;
}
/*顶部工具栏*/
.ef-tooltar {
padding-left: 10px;
box-sizing: border-box;
height: 42px;
line-height: 42px;
z-index: 3;
border-bottom: 1px solid #DADCE0;
}
.jtk-overlay {
cursor: pointer;
color: #4A4A4A;
}
/*节点菜单*/
.ef-node-pmenu {
cursor: pointer;
height: 32px;
line-height: 32px;
width: 225px;
display: block;
font-weight: bold;
color: #4A4A4A;
padding-left: 5px;
}
.ef-node-pmenu:hover {
background-color: #E0E0E0;
}
.ef-node-menu-li {
color: #565758;
width: 150px;
border: 1px dashed #E0E3E7;
margin: 5px 0 5px 0;
padding: 5px;
border-radius: 5px;
padding-left: 8px;
}
.ef-node-menu-li:hover {
/* 设置移动样式*/
cursor: move;
background-color: #F0F7FF;
border: 1px dashed #1879FF;
border-left: 4px solid #1879FF;
padding-left: 5px;
}
.ef-node-menu-ul {
list-style: none;
padding-left: 20px
}
/*节点的最外层容器*/
.ef-node-container {
position: absolute;
display: flex;
width: 170px;
height: 32px;
border: 1px solid #E0E3E7;
border-radius: 5px;
background-color: #fff;
}
.ef-node-container:hover {
/* 设置移动样式*/
cursor: move;
background-color: #F0F7FF;
/*box-shadow: #1879FF 0px 0px 12px 0px;*/
background-color: #F0F7FF;
border: 1px dashed #1879FF;
}
/*节点激活样式*/
.ef-node-active {
background-color: #F0F7FF;
/*box-shadow: #1879FF 0px 0px 12px 0px;*/
background-color: #F0F7FF;
border: 1px solid #1879FF;
}
/*节点左侧的竖线*/
.ef-node-left {
width: 4px;
background-color: #1879FF;
border-radius: 4px 0 0 4px;
}
/*节点左侧的图标*/
.ef-node-left-ico {
line-height: 32px;
margin-left: 8px;
}
.ef-node-left-ico:hover {
/* 设置拖拽的样式 */
cursor: crosshair;
}
/*节点显示的文字*/
.ef-node-text {
color: #565758;
font-size: 12px;
line-height: 32px;
margin-left: 8px;
width: 100px;
/* 设置超出宽度文本显示方式*/
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
text-align: center;
}
/*节点右侧的图标*/
.ef-node-right-ico {
line-height: 32px;
position: absolute;
right: 5px;
color: #84CF65;
cursor: default;
}
/*节点的几种状态样式*/
.el-node-state-success {
line-height: 32px;
position: absolute;
right: 5px;
color: #84CF65;
cursor: default;
}
.el-node-state-error {
line-height: 32px;
position: absolute;
right: 5px;
color: #F56C6C;
cursor: default;
}
.el-node-state-warning {
line-height: 32px;
position: absolute;
right: 5px;
color: #E6A23C;
cursor: default;
}
.el-node-state-running {
line-height: 32px;
position: absolute;
right: 5px;
color: #84CF65;
cursor: default;
}
/*node-form*/
.ef-node-form-header {
height: 32px;
border-top: 1px solid #dce3e8;
border-bottom: 1px solid #dce3e8;
background: #F1F3F4;
color: #000;
line-height: 32px;
padding-left: 12px;
font-size: 14px;
}
.ef-node-form-body {
margin-top: 10px;
padding-right: 10px;
padding-bottom: 20px;
}
/* 连线中的label 样式*/
.jtk-overlay.flowLabel:not(.aLabel) {
padding: 4px 10px;
background-color: white;
color: #565758 !important;
border: 1px solid #E0E3E7;
border-radius: 5px;
}
/* label 为空的样式 */
.emptyFlowLabel {
}
.ef-dot {
background-color: #1879FF;
border-radius: 10px;
}
.ef-dot-hover {
background-color: red;
}
.ef-rectangle {
background-color: #1879FF;
}
.ef-rectangle-hover {
background-color: red;
}
.ef-img {
}
.ef-img-hover {
}
.ef-drop-hover{
border: 1px dashed #1879FF;
}

View File

@ -0,0 +1,55 @@
<template>
<el-dialog
title="流程数据信息"
:visible.sync="dialogVisible"
width="70%"
>
<el-alert
title="使用说明"
type="warning"
description="以下流程信息可以被存储起来,方便下一次流程加载"
show-icon
close-text="知道了"
>
</el-alert>
<br/>
<!--一个高亮显示的插件-->
<codemirror
:value="flowJsonData"
:options="options"
class="code"
></codemirror>
</el-dialog>
</template>
<script>
import 'codemirror/lib/codemirror.css';
import { codemirror } from 'vue-codemirror';
//codemirror/mode/javascript/javascript.js
require("codemirror/mode/javascript/javascript.js")
export default {
props: {
data: Object,
},
data() {
return {
dialogVisible: false,
flowJsonData: {},
options: {
mode: {name: "javascript", json: true},
lineNumbers: true
}
}
},
components: {
codemirror
},
methods: {
init() {
this.dialogVisible = true
this.flowJsonData = JSON.stringify(this.data, null, 4).toString()
}
}
}
</script>

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,157 @@
export const easyFlowMixin = {
data() {
return {
jsplumbSetting: {
// 动态锚点、位置自适应
Anchors: ['Top', 'TopCenter', 'TopRight', 'TopLeft', 'Right', 'RightMiddle', 'Bottom', 'BottomCenter', 'BottomRight', 'BottomLeft', 'Left', 'LeftMiddle'],
// 容器ID
Container: 'efContainer',
// 连线的样式,直线或者曲线等,可选值: StateMachine、FlowchartBezier、Straight
Connector: ['Bezier', {curviness: 100}],
// Connector: ['Straight', {stub: 20, gap: 1}],
// Connector: ['Flowchart', {stub: 30, gap: 1, alwaysRespectStubs: false, midpoint: 0.5, cornerRadius: 10}],
// Connector: ['StateMachine', {margin: 5, curviness: 10, proximityLimit: 80}],
// 鼠标不能拖动删除线
ConnectionsDetachable: false,
// 删除线的时候节点不删除
DeleteEndpointsOnDetach: false,
/**
* 连线的两端端点类型圆形
* radius: 圆的半径越大圆越大
*/
// Endpoint: ['Dot', {radius: 5, cssClass: 'ef-dot', hoverClass: 'ef-dot-hover'}],
/**
* 连线的两端端点类型矩形
* height: 矩形的高
* width: 矩形的宽
*/
// Endpoint: ['Rectangle', {height: 20, width: 20, cssClass: 'ef-rectangle', hoverClass: 'ef-rectangle-hover'}],
/**
* 图像端点
*/
// Endpoint: ['Image', {src: 'https://www.easyicon.net/api/resizeApi.php?id=1181776&size=32', cssClass: 'ef-img', hoverClass: 'ef-img-hover'}],
/**
* 空白端点
*/
Endpoint: ['Blank', {Overlays: ''}],
// Endpoints: [['Dot', {radius: 5, cssClass: 'ef-dot', hoverClass: 'ef-dot-hover'}], ['Rectangle', {height: 20, width: 20, cssClass: 'ef-rectangle', hoverClass: 'ef-rectangle-hover'}]],
/**
* 连线的两端端点样式
* fill: 颜色值#12aabb为空不显示
* outlineWidth: 外边线宽度
*/
EndpointStyle: {fill: '#1879ffa1', outlineWidth: 1},
// 是否打开jsPlumb的内部日志记录
LogEnabled: true,
/**
* 连线的样式
*/
PaintStyle: {
// 线的颜色
stroke: '#E0E3E7',
// 线的粗细,值越大线越粗
strokeWidth: 1,
// 设置外边线的颜色,默认设置透明,这样别人就看不见了,点击线的时候可以不用精确点击,参考 https://blog.csdn.net/roymno2/article/details/72717101
outlineStroke: 'transparent',
// 线外边的宽,值越大,线的点击范围越大
outlineWidth: 10
},
DragOptions: {cursor: 'pointer', zIndex: 2000},
/**
* 叠加 参考 https://www.jianshu.com/p/d9e9918fd928
*/
Overlays: [
// 箭头叠加
['Arrow', {
width: 10, // 箭头尾部的宽度
length: 8, // 从箭头的尾部到头部的距离
location: 1, // 位置建议使用01之间
direction: 1, // 方向默认值为1表示向前可选-1表示向后
foldback: 0.623 // 折回也就是尾翼的角度默认0.623当为1时为正三角
}],
// ['Diamond', {
// events: {
// dblclick: function (diamondOverlay, originalEvent) {
// console.log('double click on diamond overlay for : ' + diamondOverlay.component)
// }
// }
// }],
['Label', {
label: '',
location: 0.1,
cssClass: 'aLabel'
}]
],
// 绘制图的模式 svg、canvas
RenderMode: 'svg',
// 鼠标滑过线的样式
HoverPaintStyle: {stroke: '#b0b2b5', strokeWidth: 1},
// 滑过锚点效果
// EndpointHoverStyle: {fill: 'red'}
Scope: 'jsPlumb_DefaultScope' // 范围具有相同scope的点才可连接
},
/**
* 连线参数
*/
jsplumbConnectOptions: {
isSource: true,
isTarget: true,
// 动态锚点、提供了4个方向 Continuous、AutoDefault
anchor: 'Continuous',
// 设置连线上面的label样式
labelStyle: {
cssClass: 'flowLabel'
},
// 修改了jsplumb 源码支持label 为空传入自定义style
emptyLabelStyle: {
cssClass: 'emptyFlowLabel'
}
},
/**
* 源点配置参数
*/
jsplumbSourceOptions: {
// 设置可以拖拽的类名只要鼠标移动到该类名上的DOM就可以拖拽连线
filter: '.flow-node-drag',
filterExclude: false,
anchor: 'Continuous',
// 是否允许自己连接自己
allowLoopback: true,
maxConnections: -1,
onMaxConnections: function (info, e) {
console.log(`超过了最大值连线: ${info.maxConnections}`)
}
},
// 参考 https://www.cnblogs.com/mq0036/p/7942139.html
jsplumbSourceOptions2: {
// 设置可以拖拽的类名只要鼠标移动到该类名上的DOM就可以拖拽连线
filter: '.flow-node-drag',
filterExclude: false,
// anchor: 'Continuous',
// 是否允许自己连接自己
allowLoopback: true,
connector: ['Flowchart', {curviness: 50}],
connectorStyle: {
// 线的颜色
stroke: 'red',
// 线的粗细,值越大线越粗
strokeWidth: 1,
// 设置外边线的颜色,默认设置透明,这样别人就看不见了,点击线的时候可以不用精确点击,参考 https://blog.csdn.net/roymno2/article/details/72717101
outlineStroke: 'transparent',
// 线外边的宽,值越大,线的点击范围越大
outlineWidth: 10
},
connectorHoverStyle: {stroke: 'red', strokeWidth: 2}
},
jsplumbTargetOptions: {
// 设置可以拖拽的类名只要鼠标移动到该类名上的DOM就可以拖拽连线
filter: '.flow-node-drag',
filterExclude: false,
// 是否允许自己连接自己
anchor: 'Continuous',
allowLoopback: true,
dropOptions: {hoverClass: 'ef-drop-hover'}
}
}
}
}

View File

@ -0,0 +1,79 @@
<template>
<div
ref="node"
:style="nodeContainerStyle"
@click="clickNode"
@mouseup="changeNodeSite"
:class="nodeContainerClass"
>
<!-- 最左侧的那条竖线 -->
<div class="ef-node-left"></div>
<!-- 节点类型的图标 -->
<div class="ef-node-left-ico flow-node-drag">
<i :class="nodeIcoClass"></i>
</div>
<!-- 节点名称 -->
<div class="ef-node-text" :show-overflow-tooltip="true">
{{node.name}}
</div>
<!-- 节点状态图标 -->
<div class="ef-node-right-ico">
<i class="el-icon-circle-check el-node-state-success" v-show="node.state === 'success'"></i>
<i class="el-icon-circle-close el-node-state-error" v-show="node.state === 'error'"></i>
<i class="el-icon-warning-outline el-node-state-warning" v-show="node.state === 'warning'"></i>
<i class="el-icon-loading el-node-state-running" v-show="node.state === 'running'"></i>
</div>
</div>
</template>
<script>
export default {
props: {
node: Object,
activeElement: Object
},
data() {
return {}
},
computed: {
nodeContainerClass() {
return {
'ef-node-container': true,
'ef-node-active': this.activeElement.type == 'node' ? this.activeElement.nodeId === this.node.id : false
}
},
//
nodeContainerStyle() {
return {
top: this.node.top,
left: this.node.left
}
},
nodeIcoClass() {
var nodeIcoClass = {}
nodeIcoClass[this.node.ico] = true
// class线viewOnly
nodeIcoClass['flow-node-drag'] = this.node.viewOnly ? false : true
return nodeIcoClass
}
},
methods: {
//
clickNode() {
this.$emit('clickNode', this.node.id)
},
//
changeNodeSite() {
//
if (this.node.left == this.$refs.node.style.left && this.node.top == this.$refs.node.style.top) {
return;
}
this.$emit('changeNodeSite', {
nodeId: this.node.id,
left: this.$refs.node.style.left,
top: this.$refs.node.style.top,
})
}
}
}
</script>

View File

@ -0,0 +1,134 @@
<template>
<div>
<div class="ef-node-form">
<div class="ef-node-form-header">
编辑
</div>
<div class="ef-node-form-body">
<el-form :model="node" ref="dataForm" label-width="80px" v-show="type === 'node'">
<el-form-item label="类型">
<el-input v-model="node.type" :disabled="true"></el-input>
</el-form-item>
<el-form-item label="名称">
<el-input v-model="node.name"></el-input>
</el-form-item>
<el-form-item label="left坐标">
<el-input v-model="node.left" :disabled="true"></el-input>
</el-form-item>
<el-form-item label="top坐标">
<el-input v-model="node.top" :disabled="true"></el-input>
</el-form-item>
<el-form-item label="ico图标">
<el-input v-model="node.ico"></el-input>
</el-form-item>
<el-form-item label="状态">
<el-select v-model="node.state" placeholder="请选择">
<el-option
v-for="item in stateList"
:key="item.state"
:label="item.label"
:value="item.state">
</el-option>
</el-select>
</el-form-item>
<el-form-item>
<el-button icon="el-icon-close">重置</el-button>
<el-button type="primary" icon="el-icon-check" @click="save"></el-button>
</el-form-item>
</el-form>
<el-form :model="line" ref="dataForm" label-width="80px" v-show="type === 'line'">
<el-form-item label="条件">
<el-input v-model="line.label"></el-input>
</el-form-item>
<el-form-item>
<el-button icon="el-icon-close">重置</el-button>
<el-button type="primary" icon="el-icon-check" @click="saveLine"></el-button>
</el-form-item>
</el-form>
</div>
<!-- <div class="el-node-form-tag"></div>-->
</div>
</div>
</template>
<script>
import { cloneDeep } from 'lodash'
export default {
data() {
return {
visible: true,
// node line
type: 'node',
node: {},
line: {},
data: {},
stateList: [{
state: 'success',
label: '成功'
}, {
state: 'warning',
label: '警告'
}, {
state: 'error',
label: '错误'
}, {
state: 'running',
label: '运行中'
}]
}
},
methods: {
/**
* 表单修改这里可以根据传入的ID进行业务信息获取
* @param data
* @param id
*/
nodeInit(data, id) {
this.type = 'node'
this.data = data
data.nodeList.filter((node) => {
if (node.id === id) {
this.node = cloneDeep(node)
}
})
},
lineInit(line) {
this.type = 'line'
this.line = line
},
// 线
saveLine() {
this.$emit('setLineLabel', this.line.from, this.line.to, this.line.label)
},
save() {
this.data.nodeList.filter((node) => {
if (node.id === this.node.id) {
node.name = this.node.name
node.left = this.node.left
node.top = this.node.top
node.ico = this.node.ico
node.state = this.node.state
this.$emit('repaintEverything')
}
})
}
}
}
</script>
<style>
.el-node-form-tag {
position: absolute;
top: 50%;
margin-left: -15px;
height: 40px;
width: 15px;
background-color: #fbfbfb;
border: 1px solid rgb(220, 227, 232);
border-right: none;
z-index: 0;
}
</style>

View File

@ -0,0 +1,142 @@
<template>
<div class="flow-menu" ref="tool">
<div v-for="menu in menuList" :key="menu.id">
<span class="ef-node-pmenu" @click="menu.open = !menu.open"><i :class="{'el-icon-caret-bottom': menu.open,'el-icon-caret-right': !menu.open}"></i>&nbsp;{{menu.name}}</span>
<ul v-show="menu.open" class="ef-node-menu-ul">
<draggable @end="end" @start="move" v-model="menu.children" :options="draggableOptions">
<li v-for="subMenu in menu.children" class="ef-node-menu-li" :key="subMenu.id" :type="subMenu.type">
<i :class="subMenu.ico"></i> {{subMenu.name}}
</li>
</draggable>
</ul>
</div>
</div>
</template>
<script>
import draggable from 'vuedraggable'
var mousePosition = {
left: -1,
top: -1
}
export default {
data() {
return {
activeNames: '1',
// draggable https://www.cnblogs.com/weixin186/p/10108679.html
draggableOptions: {
preventOnFilter: false,
sort: false,
disabled: false,
ghostClass: 'tt',
// 使H5
forceFallback: true,
//
// fallbackClass: 'flow-node-draggable'
},
// id
defaultOpeneds: ['1', '2'],
menuList: [
{
id: '1',
type: 'group',
name: '开始节点',
ico: 'el-icon-video-play',
open: true,
children: [
{
id: '11',
type: 'timer',
name: '数据接入',
ico: 'el-icon-time',
//
style: {}
}, {
id: '12',
type: 'task',
name: '接口调用',
ico: 'el-icon-odometer',
//
style: {}
}
]
},
{
id: '2',
type: 'group',
name: '结束节点',
ico: 'el-icon-video-pause',
open: true,
children: [
{
id: '21',
type: 'end',
name: '流程结束',
ico: 'el-icon-caret-right',
//
style: {}
}, {
id: '22',
type: 'over',
name: '数据清理',
ico: 'el-icon-shopping-cart-full',
//
style: {}
}
]
}
],
nodeMenu: {}
}
},
components: {
draggable
},
created() {
/**
* 以下是为了解决在火狐浏览器上推拽时弹出tab页到搜索问题
* @param event
*/
if (this.isFirefox()) {
document.body.ondrop = function (event) {
//
mousePosition.left = event.layerX
mousePosition.top = event.clientY - 50
event.preventDefault();
event.stopPropagation();
}
}
},
methods: {
//
getMenuByType(type) {
for (let i = 0; i < this.menuList.length; i++) {
let children = this.menuList[i].children;
for (let j = 0; j < children.length; j++) {
if (children[j].type === type) {
return children[j]
}
}
}
},
//
move(evt, a, b, c) {
var type = evt.item.attributes.type.nodeValue
this.nodeMenu = this.getMenuByType(type)
},
//
end(evt, e) {
this.$emit('addNode', evt, this.nodeMenu, mousePosition)
},
//
isFirefox() {
var userAgent = navigator.userAgent
if (userAgent.indexOf("Firefox") > -1) {
return true
}
return false
}
}
}
</script>

View File

@ -0,0 +1,546 @@
<template>
<div v-if="easyFlowVisible" style="height: calc(100vh);">
<el-row>
<!--顶部工具菜单-->
<el-col :span="24">
<div class="ef-tooltar">
<el-link type="primary" :underline="false">{{data.name}}</el-link>
<el-divider direction="vertical"></el-divider>
<el-button type="text" icon="el-icon-delete" size="large" @click="deleteElement" :disabled="!this.activeElement.type"></el-button>
<el-divider direction="vertical"></el-divider>
<el-button type="text" icon="el-icon-download" size="large" @click="downloadData"></el-button>
<el-divider direction="vertical"></el-divider>
<el-button type="text" icon="el-icon-plus" size="large" @click="zoomAdd"></el-button>
<el-divider direction="vertical"></el-divider>
<el-button type="text" icon="el-icon-minus" size="large" @click="zoomSub"></el-button>
<div style="float: right;margin-right: 5px">
<el-button type="info" plain round icon="el-icon-document" @click="dataInfo" size="mini">流程信息</el-button>
<el-button type="primary" plain round @click="dataReloadA" icon="el-icon-refresh" size="mini">切换流程A</el-button>
<el-button type="primary" plain round @click="dataReloadB" icon="el-icon-refresh" size="mini">切换流程B</el-button>
<el-button type="primary" plain round @click="dataReloadC" icon="el-icon-refresh" size="mini">切换流程C</el-button>
<el-button type="primary" plain round @click="dataReloadD" icon="el-icon-refresh" size="mini">自定义样式</el-button>
<el-button type="primary" plain round @click="dataReloadE" icon="el-icon-refresh" size="mini">力导图</el-button>
<el-button type="info" plain round icon="el-icon-document" @click="openHelp" size="mini">帮助</el-button>
</div>
</div>
</el-col>
</el-row>
<div style="display: flex;height: calc(100% - 47px);">
<div style="width: 230px;border-right: 1px solid #dce3e8;">
<node-menu @addNode="addNode" ref="nodeMenu"></node-menu>
</div>
<div id="efContainer" ref="efContainer" class="container" v-flowDrag>
<template v-for="node in data.nodeList">
<flow-node
:id="node.id"
:key="node.id"
:node="node"
:activeElement="activeElement"
@changeNodeSite="changeNodeSite"
@nodeRightMenu="nodeRightMenu"
@clickNode="clickNode"
>
</flow-node>
</template>
<!-- 给画布一个默认的宽度和高度 -->
<div style="position:absolute;top: 2000px;left: 2000px;">&nbsp;</div>
</div>
<!-- 右侧表单 -->
<div style="width: 300px;border-left: 1px solid #dce3e8;background-color: #FBFBFB">
<flow-node-form ref="nodeForm" @setLineLabel="setLineLabel" @repaintEverything="repaintEverything"></flow-node-form>
</div>
</div>
<!-- 流程数据详情 -->
<flow-info v-if="flowInfoVisible" ref="flowInfo" :data="data"></flow-info>
<flow-help v-if="flowHelpVisible" ref="flowHelp"></flow-help>
</div>
</template>
<script>
import draggable from 'vuedraggable'
// import { jsPlumb } from 'jsplumb'
// 使jsplumb
import './jsplumb'
import { easyFlowMixin } from '@/components/ef/mixins'
import flowNode from '@/components/ef/node'
import nodeMenu from '@/components/ef/node_menu'
import FlowInfo from '@/components/ef/info'
import FlowHelp from '@/components/ef/help'
import FlowNodeForm from '@/components/ef/node_form'
import lodash from 'lodash'
import { getDataA } from './data_A'
import { getDataB } from './data_B'
import { getDataC } from './data_C'
import { getDataD } from './data_D'
import { getDataE } from './data_E'
import { ForceDirected } from './force-directed'
export default {
data() {
return {
// jsPlumb
jsPlumb: null,
//
easyFlowVisible: true,
//
flowInfoVisible: false,
//
loadEasyFlowFinish: false,
flowHelpVisible: false,
//
data: {},
// 线
activeElement: {
// node line
type: undefined,
// ID
nodeId: undefined,
// 线ID
sourceId: undefined,
targetId: undefined
},
zoom: 0.5
}
},
//
mixins: [easyFlowMixin],
components: {
draggable, flowNode, nodeMenu, FlowInfo, FlowNodeForm, FlowHelp
},
directives: {
'flowDrag': {
bind(el, binding, vnode, oldNode) {
if (!binding) {
return
}
el.onmousedown = (e) => {
if (e.button == 2) {
//
return
}
//
let disX = e.clientX
let disY = e.clientY
el.style.cursor = 'move'
document.onmousemove = function (e) {
//
e.preventDefault()
const left = e.clientX - disX
disX = e.clientX
el.scrollLeft += -left
const top = e.clientY - disY
disY = e.clientY
el.scrollTop += -top
}
document.onmouseup = function (e) {
el.style.cursor = 'auto'
document.onmousemove = null
document.onmouseup = null
}
}
}
}
},
mounted() {
this.jsPlumb = jsPlumb.getInstance()
this.$nextTick(() => {
// A
this.dataReload(getDataB())
})
},
methods: {
//
getUUID() {
return Math.random().toString(36).substr(3, 10)
},
jsPlumbInit() {
this.jsPlumb.ready(() => {
//
this.jsPlumb.importDefaults(this.jsplumbSetting)
// 使jsPlumb
this.jsPlumb.setSuspendDrawing(false, true);
//
this.loadEasyFlow()
// 线, https://www.cnblogs.com/ysx215/p/7615677.html
this.jsPlumb.bind('click', (conn, originalEvent) => {
this.activeElement.type = 'line'
this.activeElement.sourceId = conn.sourceId
this.activeElement.targetId = conn.targetId
this.$refs.nodeForm.lineInit({
from: conn.sourceId,
to: conn.targetId,
label: conn.getLabel()
})
})
// 线
this.jsPlumb.bind("connection", (evt) => {
let from = evt.source.id
let to = evt.target.id
if (this.loadEasyFlowFinish) {
this.data.lineList.push({from: from, to: to})
}
})
// 线
this.jsPlumb.bind("connectionDetached", (evt) => {
this.deleteLine(evt.sourceId, evt.targetId)
})
// 线
this.jsPlumb.bind("connectionMoved", (evt) => {
this.changeLine(evt.originalSourceId, evt.originalTargetId)
})
// 线
this.jsPlumb.bind("contextmenu", (evt) => {
console.log('contextmenu', evt)
})
// 线
this.jsPlumb.bind("beforeDrop", (evt) => {
let from = evt.sourceId
let to = evt.targetId
if (from === to) {
this.$message.error('节点不支持连接自己')
return false
}
if (this.hasLine(from, to)) {
this.$message.error('该关系已存在,不允许重复创建')
return false
}
if (this.hashOppositeLine(from, to)) {
this.$message.error('不支持两个节点之间连线回环');
return false
}
this.$message.success('连接成功')
return true
})
// beforeDetach
this.jsPlumb.bind("beforeDetach", (evt) => {
console.log('beforeDetach', evt)
})
this.jsPlumb.setContainer(this.$refs.efContainer)
})
},
//
loadEasyFlow() {
//
for (var i = 0; i < this.data.nodeList.length; i++) {
let node = this.data.nodeList[i]
// 线
this.jsPlumb.makeSource(node.id, lodash.merge(this.jsplumbSourceOptions, {}))
// // 线
this.jsPlumb.makeTarget(node.id, this.jsplumbTargetOptions)
if (!node.viewOnly) {
this.jsPlumb.draggable(node.id, {
containment: 'parent',
stop: function (el) {
//
console.log('拖拽结束: ', el)
}
})
}
}
// 线
for (var i = 0; i < this.data.lineList.length; i++) {
let line = this.data.lineList[i]
var connParam = {
source: line.from,
target: line.to,
label: line.label ? line.label : '',
connector: line.connector ? line.connector : '',
anchors: line.anchors ? line.anchors : undefined,
paintStyle: line.paintStyle ? line.paintStyle : undefined,
}
this.jsPlumb.connect(connParam, this.jsplumbConnectOptions)
}
this.$nextTick(function () {
this.loadEasyFlowFinish = true
})
},
// 线
setLineLabel(from, to, label) {
var conn = this.jsPlumb.getConnections({
source: from,
target: to
})[0]
if (!label || label === '') {
conn.removeClass('flowLabel')
conn.addClass('emptyFlowLabel')
} else {
conn.addClass('flowLabel')
}
conn.setLabel({
label: label,
})
this.data.lineList.forEach(function (line) {
if (line.from == from && line.to == to) {
line.label = label
}
})
},
//
deleteElement() {
if (this.activeElement.type === 'node') {
this.deleteNode(this.activeElement.nodeId)
} else if (this.activeElement.type === 'line') {
this.$confirm('确定删除所点击的线吗?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
var conn = this.jsPlumb.getConnections({
source: this.activeElement.sourceId,
target: this.activeElement.targetId
})[0]
this.jsPlumb.deleteConnection(conn)
}).catch(() => {
})
}
},
// 线
deleteLine(from, to) {
this.data.lineList = this.data.lineList.filter(function (line) {
if (line.from == from && line.to == to) {
return false
}
return true
})
},
// 线
changeLine(oldFrom, oldTo) {
this.deleteLine(oldFrom, oldTo)
},
//
changeNodeSite(data) {
for (var i = 0; i < this.data.nodeList.length; i++) {
let node = this.data.nodeList[i]
if (node.id === data.nodeId) {
node.left = data.left
node.top = data.top
}
}
},
/**
* 拖拽结束后添加新的节点
* @param evt
* @param nodeMenu 被添加的节点对象
* @param mousePosition 鼠标拖拽结束的坐标
*/
addNode(evt, nodeMenu, mousePosition) {
var screenX = evt.originalEvent.clientX, screenY = evt.originalEvent.clientY
let efContainer = this.$refs.efContainer
var containerRect = efContainer.getBoundingClientRect()
var left = screenX, top = screenY
//
if (left < containerRect.x || left > containerRect.width + containerRect.x || top < containerRect.y || containerRect.y > containerRect.y + containerRect.height) {
this.$message.error("请把节点拖入到画布中")
return
}
left = left - containerRect.x + efContainer.scrollLeft
top = top - containerRect.y + efContainer.scrollTop
//
left -= 85
top -= 16
var nodeId = this.getUUID()
//
var origName = nodeMenu.name
var nodeName = origName
var index = 1
while (index < 10000) {
var repeat = false
for (var i = 0; i < this.data.nodeList.length; i++) {
let node = this.data.nodeList[i]
if (node.name === nodeName) {
nodeName = origName + index
repeat = true
}
}
if (repeat) {
index++
continue
}
break
}
var node = {
id: nodeId,
name: nodeName,
type: nodeMenu.type,
left: left + 'px',
top: top + 'px',
ico: nodeMenu.ico,
state: 'success'
}
/**
* 这里可以进行业务判断是否能够添加该节点
*/
this.data.nodeList.push(node)
this.$nextTick(function () {
this.jsPlumb.makeSource(nodeId, this.jsplumbSourceOptions)
this.jsPlumb.makeTarget(nodeId, this.jsplumbTargetOptions)
this.jsPlumb.draggable(nodeId, {
containment: 'parent',
stop: function (el) {
//
console.log('拖拽结束: ', el)
}
})
})
},
/**
* 删除节点
* @param nodeId 被删除节点的ID
*/
deleteNode(nodeId) {
this.$confirm('确定要删除节点' + nodeId + '?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
closeOnClickModal: false
}).then(() => {
/**
* 这里需要进行业务判断是否可以删除
*/
this.data.nodeList = this.data.nodeList.filter(function (node) {
if (node.id === nodeId) {
//
// node.show = false
return false
}
return true
})
this.$nextTick(function () {
this.jsPlumb.removeAllEndpoints(nodeId);
})
}).catch(() => {
})
return true
},
clickNode(nodeId) {
this.activeElement.type = 'node'
this.activeElement.nodeId = nodeId
this.$refs.nodeForm.nodeInit(this.data, nodeId)
},
// 线
hasLine(from, to) {
for (var i = 0; i < this.data.lineList.length; i++) {
var line = this.data.lineList[i]
if (line.from === from && line.to === to) {
return true
}
}
return false
},
// 线
hashOppositeLine(from, to) {
return this.hasLine(to, from)
},
nodeRightMenu(nodeId, evt) {
this.menu.show = true
this.menu.curNodeId = nodeId
this.menu.left = evt.x + 'px'
this.menu.top = evt.y + 'px'
},
repaintEverything() {
this.jsPlumb.repaint()
},
//
dataInfo() {
this.flowInfoVisible = true
this.$nextTick(function () {
this.$refs.flowInfo.init()
})
},
//
dataReload(data) {
this.easyFlowVisible = false
this.data.nodeList = []
this.data.lineList = []
this.$nextTick(() => {
data = lodash.cloneDeep(data)
this.easyFlowVisible = true
this.data = data
this.$nextTick(() => {
this.jsPlumb = jsPlumb.getInstance()
this.$nextTick(() => {
this.jsPlumbInit()
})
})
})
},
// dataA
dataReloadA() {
this.dataReload(getDataA())
},
// dataB
dataReloadB() {
this.dataReload(getDataB())
},
// dataC
dataReloadC() {
this.dataReload(getDataC())
},
// dataD
dataReloadD() {
this.dataReload(getDataD())
},
// dataE
dataReloadE() {
let dataE = getDataE()
let tempData = lodash.cloneDeep(dataE)
let data = ForceDirected(tempData)
this.dataReload(data)
this.$message({
message: '力导图每次产生的布局是不一样的',
type: 'warning'
});
},
zoomAdd() {
if (this.zoom >= 1) {
return
}
this.zoom = this.zoom + 0.1
this.$refs.efContainer.style.transform = `scale(${this.zoom})`
this.jsPlumb.setZoom(this.zoom)
},
zoomSub() {
if (this.zoom <= 0) {
return
}
this.zoom = this.zoom - 0.1
this.$refs.efContainer.style.transform = `scale(${this.zoom})`
this.jsPlumb.setZoom(this.zoom)
},
//
downloadData() {
this.$confirm('确定要下载该流程数据吗?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
closeOnClickModal: false
}).then(() => {
var datastr = "data:text/json;charset=utf-8," + encodeURIComponent(JSON.stringify(this.data, null, '\t'));
var downloadAnchorNode = document.createElement('a')
downloadAnchorNode.setAttribute("href", datastr);
downloadAnchorNode.setAttribute("download", 'data.json')
downloadAnchorNode.click();
downloadAnchorNode.remove();
this.$message.success("正在下载中,请稍后...")
}).catch(() => {
})
},
openHelp() {
this.flowHelpVisible = true
this.$nextTick(function () {
this.$refs.flowHelp.init()
})
}
}
}
</script>

View File

@ -0,0 +1,29 @@
// 是否具有该线
export function hasLine(data, from, to) {
for (let i = 0; i < data.lineList.length; i++) {
let line = data.lineList[i]
if (line.from === from && line.to === to) {
return true
}
}
return false
}
// 是否含有相反的线
export function hashOppositeLine(data, from, to) {
return hasLine(data, to, from)
}
// 获取连线
export function getConnector(jsp, from, to) {
let connection = jsp.getConnections({
source: from,
target: to
})[0]
return connection
}
// 获取唯一标识
export function uuid() {
return Math.random().toString(36).substr(3, 10)
}

View File

@ -6,7 +6,14 @@
<breadcrumb v-if="!topNav" id="breadcrumb-container" class="breadcrumb-container"/> <breadcrumb v-if="!topNav" id="breadcrumb-container" class="breadcrumb-container"/>
<top-nav v-if="topNav" id="topmenu-container" class="topmenu-container"/> <top-nav v-if="topNav" id="topmenu-container" class="topmenu-container"/>
<div class="right-menu"> <div class="right-menu">
<iframe width="500" height="40" frameborder="0" scrolling="no" hspace="0" src="https://i.tianqi.com/?c=code&a=getcode&id=40&icon=1"></iframe>
<el-button @click="drawerTru" type="primary" style="margin: 10px 0;">
<i class="el-icon-s-comment"></i>
</el-button>
<template v-if="device!=='mobile'"> <template v-if="device!=='mobile'">
<search id="header-search" class="right-menu-item"/> <search id="header-search" class="right-menu-item"/>
<screenfull id="screenfull" class="right-menu-item hover-effect"/> <screenfull id="screenfull" class="right-menu-item hover-effect"/>
@ -34,7 +41,119 @@
</el-dropdown-item> </el-dropdown-item>
</el-dropdown-menu> </el-dropdown-menu>
</el-dropdown> </el-dropdown>
</div> </div>
<div>
<!-- <el-drawer-->
<!-- title="我是标题"-->
<!-- :visible.sync="drawer"-->
<!-- size="50%"-->
<!-- :with-header="false">-->
<!-- <el-radio-group v-model="type" @change="selectNotice">-->
<!-- <el-radio-button label="0" >全部</el-radio-button>-->
<!-- <el-radio-button label="1" >通知</el-radio-button>-->
<!-- <el-radio-button label="2" >公告</el-radio-button>-->
<!-- </el-radio-group>-->
<!-- <br>-->
<!-- <el-radio-group v-model="state" @change="selectNotice">-->
<!-- <el-radio-button label="0" >全部</el-radio-button>-->
<!-- <el-radio-button label="2">已读</el-radio-button>-->
<!-- <el-radio-button label="1">未读</el-radio-button>-->
<!-- </el-radio-group>-->
<!-- <el-descriptions class="margin-top" v-for="notice in notices" :column="2" border>-->
<!-- <template slot="extra">-->
<!-- <el-button type="primary" size="small" @click="lookNotice(notice)"></el-button>-->
<!-- </template>-->
<!-- <el-descriptions-item>-->
<!-- <template slot="label">-->
<!-- <i class="el-icon-user"></i>-->
<!-- 消息发布时间-->
<!-- </template>-->
<!-- {{ notice.noticeTitle }}-->
<!-- </el-descriptions-item>-->
<!-- <el-descriptions-item>-->
<!-- <template slot="label">-->
<!-- <i class="el-icon-mobile-phone"></i>-->
<!-- 消息发布人-->
<!-- </template>-->
<!-- {{notice.createBy}}-->
<!-- </el-descriptions-item>-->
<!-- <el-descriptions-item>-->
<!-- <template slot="label">-->
<!-- <i class="el-icon-location-outline"></i>-->
<!-- 消息类型-->
<!-- </template>-->
<!-- <el-tag size="small" v-if=" notice.noticeType == 1"></el-tag>-->
<!-- <el-tag size="warning" v-if=" notice.noticeType == 2"></el-tag>-->
<!-- </el-descriptions-item>-->
<!-- <el-descriptions-item>-->
<!-- <template slot="label">-->
<!-- <i class="el-icon-tickets"></i>-->
<!-- 当前状态-->
<!-- </template>-->
<!-- <el-tag size="small" v-if=" notice.state == 1"></el-tag>-->
<!-- <el-tag size="success" v-if=" notice.state == 2"></el-tag>-->
<!-- </el-descriptions-item>-->
<!-- </el-descriptions>-->
<!-- </el-drawer>-->
<el-dialog
:visible.sync="dialogVisible"
width="30%">
<el-descriptions class="margin-top" :column="2" border>
<el-descriptions-item>
<template slot="label">
<i class="el-icon-user"></i>
消息发布时间
</template>
{{ notice.noticeTitle }}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">
<i class="el-icon-mobile-phone"></i>
消息发布人
</template>
{{notice.createBy}}
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">
<i class="el-icon-location-outline"></i>
消息类型
</template>
<el-tag size="small" v-if=" notice.noticeType == 1"></el-tag>
<el-tag size="warning" v-if=" notice.noticeType == 2"></el-tag>
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">
<i class="el-icon-tickets"></i>
当前状态
</template>
<el-tag size="small" v-if=" notice.state == 1"></el-tag>
<el-tag size="success" v-if=" notice.state == 2"></el-tag>
</el-descriptions-item>
<el-descriptions-item>
<template slot="label">
<i class="el-icon-tickets"></i>
内容
</template>
<span v-html="notice.noticeContent"></span>
</el-descriptions-item>
</el-descriptions>
</el-dialog>
</div>
</div> </div>
</template> </template>
@ -46,8 +165,19 @@ import Hamburger from '@/components/Hamburger'
import Screenfull from '@/components/Screenfull' import Screenfull from '@/components/Screenfull'
import SizeSelect from '@/components/SizeSelect' import SizeSelect from '@/components/SizeSelect'
import Search from '@/components/HeaderSearch' import Search from '@/components/HeaderSearch'
import {findList, lookNotice} from "@/api/system/notice";
export default { export default {
data(){
return{
drawer:false,
type:0,
state:0,
notices:[],
dialogVisible:false,
notice:{}
}
},
components: { components: {
Breadcrumb, Breadcrumb,
TopNav, TopNav,
@ -63,6 +193,7 @@ export default {
'device' 'device'
]), ]),
setting: { setting: {
get() { get() {
return this.$store.state.settings.showSettings return this.$store.state.settings.showSettings
}, },
@ -79,7 +210,28 @@ export default {
} }
} }
}, },
created() {
},
methods: { methods: {
lookNotice(notice) {
this.dialogVisible = true
lookNotice(notice.id, notice.state).then(res => {
this.notice = res.data
})
this.findAll();
},
drawerTru() {
this.drawer = true
this.findAll()
},
findAll() {
findList({ state: this.state, noticeType: this.type }).then(res => {
this.notices = res.data;
})
},
selectNotice() {
this.findAll();
},
toggleSideBar() { toggleSideBar() {
this.$store.dispatch('app/toggleSideBar') this.$store.dispatch('app/toggleSideBar')
}, },
@ -136,7 +288,7 @@ export default {
.right-menu { .right-menu {
float: right; float: right;
height: 100%; height: 70%;
line-height: 50px; line-height: 50px;
&:focus { &:focus {

View File

@ -1,6 +1,23 @@
import Vue from 'vue' import Vue from 'vue'
import Cookies from 'js-cookie' import Cookies from 'js-cookie'
//引入文件、、
import VueCodeMirror from 'vue-codemirror'
import 'codemirror/lib/codemirror.css'
Vue.use(VueCodeMirror)
//
//codemirror
import VueCodemirror from 'vue-codemirror'
import 'codemirror/lib/codemirror.css'
Vue.use(VueCodemirror)
import 'codemirror/lib/codemirror.css'
import Element from 'element-ui' import Element from 'element-ui'
import './assets/styles/element-variables.scss' import './assets/styles/element-variables.scss'
@ -37,6 +54,9 @@ import DictTag from '@/components/DictTag'
import VueMeta from 'vue-meta' import VueMeta from 'vue-meta'
// 字典数据组件 // 字典数据组件
import DictData from '@/components/DictData' import DictData from '@/components/DictData'
import 'element-ui/lib/theme-chalk/index.css'
import '@/components/ef/index.css'
// 全局方法挂载 // 全局方法挂载
Vue.prototype.getDicts = getDicts Vue.prototype.getDicts = getDicts
@ -57,7 +77,6 @@ Vue.component('Editor', Editor)
Vue.component('FileUpload', FileUpload) Vue.component('FileUpload', FileUpload)
Vue.component('ImageUpload', ImageUpload) Vue.component('ImageUpload', ImageUpload)
Vue.component('ImagePreview', ImagePreview) Vue.component('ImagePreview', ImagePreview)
Vue.use(directive) Vue.use(directive)
Vue.use(plugins) Vue.use(plugins)
Vue.use(VueMeta) Vue.use(VueMeta)

View File

@ -40,6 +40,19 @@ export const constantRoutes = [
} }
] ]
}, },
{
path: '/easyFlow',// 这里的/serviceUse就是父级路由
component: Layout,
hidden: true,
children: [// 父级路由下面还有子路由
{
path: 'index/:id',// 这个index可以自己定义
component: () => import('@/views/task/task/antvX6.vue'),
name: "easyFlow",
meta: { title: '设计', icon: 'dashboard', activeMenu: '/task/task' }
}
]
},
{ {
path: '/login', path: '/login',
component: () => import('@/views/login'), component: () => import('@/views/login'),
@ -86,7 +99,7 @@ export const constantRoutes = [
meta: {title: '个人中心', icon: 'user'} meta: {title: '个人中心', icon: 'user'}
} }
] ]
} },
] ]
// 动态路由,基于用户权限动态去加载 // 动态路由,基于用户权限动态去加载

View File

@ -7,12 +7,12 @@ module.exports = {
/** /**
* 是否系统布局配置 * 是否系统布局配置
*/ */
showSettings: false, showSettings: true,
/** /**
* 是否显示顶部导航 * 是否显示顶部导航
*/ */
topNav: false, topNav: true,
/** /**
* 是否显示 tagsView * 是否显示 tagsView
@ -22,7 +22,7 @@ module.exports = {
/** /**
* 是否固定头部 * 是否固定头部
*/ */
fixedHeader: false, fixedHeader: true,
/** /**
* 是否显示logo * 是否显示logo
@ -32,7 +32,7 @@ module.exports = {
/** /**
* 是否显示动态标题 * 是否显示动态标题
*/ */
dynamicTitle: false, dynamicTitle: true,
/** /**
* @type {string | array} 'production' | ['production', 'development'] * @type {string | array} 'production' | ['production', 'development']

View File

@ -69,6 +69,7 @@ const user = {
commit('SET_ROLES', ['ROLE_DEFAULT']) commit('SET_ROLES', ['ROLE_DEFAULT'])
} }
commit('SET_ID', user.userId) commit('SET_ID', user.userId)
localStorage.setItem('userId', user.userId)
commit('SET_NAME', user.userName) commit('SET_NAME', user.userName)
commit('SET_AVATAR', avatar) commit('SET_AVATAR', avatar)
resolve(res) resolve(res)

View File

@ -0,0 +1,300 @@
<template>
<div>
<!-- 添加任务详情设计-->
<span v-if="taskInputForm">
<el-form label-width="80px" :model="tableInfo" ref="queryForm" :inline="true" class="demo-form-inline" size="small">
<el-form-item label="任务id">
<el-input v-model="tableInfo.taskId" readonly></el-input>
</el-form-item>
<el-form-item label="数据库id">
<el-input v-model="tableInfo.databaseId" readonly></el-input>
</el-form-item>
<el-form-item>
<el-select v-model="tableInfo.tableName" placeholder="请选择数据库">
<el-option style="height: 100%" :value="tableInfo.tableName">
<el-aside width="100%">
<el-tree :data="data" :props="defaultProps" @node-click="handleNodeClick"></el-tree>
</el-aside>
</el-option>
</el-select>
</el-form-item>
<el-form-item label="表别名">
<el-input v-model="tableInfo.tableAsName"></el-input>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="taskInputAdd = false"> </el-button>
<el-button type="primary" @click="addTaskInput()"></el-button>
<el-button @click="nb()"></el-button>
</div>
</span>
<!-- 所选表内的字段信息-->
<span v-if="taskInputTable">
<el-table
ref="multipleTable"
:data="tableInfo.structureList"
style="width: 100%"
@selection-change="handleSelectionChange">
<el-table-column type="selection" width="100%"></el-table-column>
<el-table-column label="字段" width="100">
<template slot-scope="scope">
<span style="margin-left: 10px">{{ scope.row.columnName }}</span>
</template>
</el-table-column>
<el-table-column label="注释" width="100">
<template slot-scope="scope">
<span style="margin-left: 10px">{{ scope.row.columnRemark }}</span>
</template>
</el-table-column>
<el-table-column label="是否主键" width="100">
<template slot-scope="scope">
<span style="margin-left: 10px">{{ scope.row.isPrimary }}</span>
</template>
</el-table-column>
<el-table-column label="字段类型" width="100">
<template slot-scope="scope">
<span style="margin-left: 10px">{{ scope.row.columnType }}</span>
</template>
</el-table-column>
<el-table-column label="字段长度" width="100">
<template slot-scope="scope">
<span style="margin-left: 10px">{{ scope.row.columnLength }}</span>
</template>
</el-table-column>
<el-table-column label="小数" width="100">
<template slot-scope="scope">
<span style="margin-left: 10px">{{ scope.row.columnDecimals }}</span>
</template>
</el-table-column>
<el-table-column label="非空" width="100">
<template slot-scope="scope">
<span style="margin-left: 10px">{{ scope.row.isNull }}</span>
</template>
</el-table-column>
<el-table-column label="默认值" width="100">
<template slot-scope="scope">
<span style="margin-left: 10px">{{ scope.row.defaultValue }}</span>
</template>
</el-table-column>
<el-table-column label="是否字典" width="100">
<template slot-scope="scope">
<span style="margin-left: 10px">{{ scope.row.isDictionary }}</span>
</template>
</el-table-column>
<el-table-column label="处理规则" width="200">
<template slot-scope="scope">
<el-select v-model="taskInputReq.fieldAsEngineId" multiple placeholder="请选择">
<el-option value="">请选择</el-option>
<el-option
v-for="engine in engineList"
:key="engine.id"
:label="engine.name"
:value="engine.id">
</el-option>
</el-select>
</template>
</el-table-column>
<el-table-column
label="字段别名"
width="200">
<template slot-scope="scope">
<el-input v-model="scope.row.tableAsField = tableInfo.tableAsName+'_'+scope.row.columnName"></el-input>
</template>
</el-table-column>
</el-table>
<div slot="footer" class="dialog-footer">
<el-button @click="cancelColumn()"></el-button>
<el-button type="primary" @click="columnAddGood()"> </el-button>
<el-button @click="nb()"></el-button>
</div>
</span>
</div>
</template>
<script>
import { addTaskInput} from '@/api/task/task'
import { findStructureByTableId, findTableInfoList } from '@/api/etl/switch'
import { selectEngineList } from '@/api/engine/engine'
//jsjsjson,
//import from ',
export default {
//import使"
components: {},
props:['graph','nodeId','taskInputForm','tableInfo','nodeName','columnList'],
data() {
//"
return {
taskInputJoin:false,
dialogFormVisible:true,
//
taskInputAdd:false,
//
taskInputFieldAdd:false,
taskInputTable:false,
taskReq:{
},
joinSelect:{},
taskAddReq:{},
taskInputReq:{},
nbList:[],
engineReq:{
pageNum: 1,
pageSize: 100
},
taskList:[],
//
value:[],
engineList:[],
columnList:[],
//
data:[],
defaultProps:{
children:"children",
label:'tableName'
},
tableList:[],
itemId:0,
};
},
// data",
computed: {},
//data",
watch: {},
//",
methods: {
//
selectEngineList(){
selectEngineList(this.engineReq).then(res=>{
this.engineList = res.data.list;
console.log(this.engineList);
})
},
//
cancelColumn(){
this.taskInputTable = false;
this.taskInputForm = true;
},
//
columnAddGood(){
this.taskInputTable = false;
this.tableInfo.fieldAsEngineId = "[{1,3,4},{1,2,3}]";
this.$emit('taskInputForm', false);
addTaskInput({
"nodeId":this.nodeId,
"nodeName":this.nodeName,
"taskId":this.tableInfo.taskId,
"databaseId":this.tableInfo.basicId,
"tableName":this.tableInfo.tableName,
"tableAsName":this.tableInfo.tableAsName,
"tableField": this.tableInfo.tableField.substring(1),
"tableAsField":this.tableInfo.tableAsField.substring(1),
"fieldAsEngineId":this.tableInfo.fieldAsEngineId
}).then(res=>{
alert(res.msg);
})
//
},
//
addTaskInput(){
this.taskInputForm = false;
this.selectEngineList();
this.taskInputTable = true;
},
//tableInfo
handleSelectionChange(val) {
if(val.length<=0){
val = this.tableInfo.columnList;
return;
}
this.columnList = val;
this.tableInfo.tableField = "";
this.tableInfo.tableAsField = "";
val.forEach(item=>{
this.tableInfo.tableField +=','+ item.columnName;
this.tableInfo.tableAsField +=','+ item.tableAsField;
})
console.log(this.tableInfo.tableField);
},
//
handleNodeClick(data) {
this.tableInfo = data;
console.log(data)
this.tableInfo.structureList = [];
findStructureByTableId(data.id).then(res=>{
this.tableInfo.structureList=res.data;
})
this.tableInfo.taskId = this.$route.params.id;
},
nb(){
console.log(this.tableInfo.structureList)
},
//
findTAbleInfoList(){
findTableInfoList().then(res=>{
this.data=res.data;
})
},
},
// - 访this",
created() {
this.findTAbleInfoList();
this.tableInfo.taskId = this.$route.params.id;
},
// - 访DOM",
mounted() {
},
beforeCreate() {
}, // - ",
beforeMount() {
}, // - ",
beforeUpdate() {
}, // - ",
updated() {
}, // - ",
beforeDestroy() {
}, // - ",
destroyed() {
}, // - ",
activated() {
} //keep-alive",
};
</script>
<style scoped>
</style>

View File

@ -0,0 +1,210 @@
<template>
<div>
<!-- 数据输出表单-->
<span v-if="taskDataOutPut">
<el-button @click="nb"></el-button><br>
<span v-for="(outPut,index) in dataOutPut.tableAsField.split(',')">
<el-checkbox :label=outPut :value=outPut v-model="twoInputList"> {{ outPut }} {{dataOutPut.tableField.split(',')[index]}}</el-checkbox><br>
</span>
<el-select v-model="dataOutPut.tableName" placeholder="请选择数据库">
<el-aside width="100%">
<el-option style="height: 100%" :value="dataOutPut.tableName">
<el-tree :data="data" :props="defaultProps" @node-click="handleNodeClick"></el-tree>
</el-option>
</el-aside>
</el-select>
<div slot="footer" class="dialog-footer">
<el-button @click="taskDataOutPut = false">取消</el-button>
<el-button type="primary" @click="toSelectField()"> </el-button>
</div>
</span>
<!-- 选择目标字段-->
<span v-if="selectField">
<span v-for="(two,index) in twoInputList">
{{two}}
<el-select v-model="target[index]" placeholder="请选择">
<el-option v-for="item in columnList" :label="item.columnName" :value="item.columnName"></el-option>
</el-select>
<br>
</span>
<!-- <el-table-->
<!-- :data="twoInputList" style="width: 100%" max-height="250">-->
<!-- <el-table-column label="输入字段" width="100">-->
<!-- <template slot-scope="scope">-->
<!-- <span style="margin-left: 10px">{{ scope.row}}</span>-->
<!-- </template>-->
<!-- </el-table-column>-->
<!-- <el-table-column label="目标字段" width="100">-->
<!-- </el-table-column>-->
<!-- </el-table>-->
<div slot="footer" class="dialog-footer">
<el-button @click="back()"></el-button>
<el-button type="primary" @click="addOutput()"> </el-button>
</div>
</span>
</div>
</template>
<script>
//jsjsjson,
//import from ',
import { findStructureByTableId, findTableInfoList } from '@/api/etl/switch'
import { addTaskOutPut, findByNodeId } from '@/api/task/task'
import item from '@/layout/components/Sidebar/Item.vue'
import fa from 'element-ui/src/locale/lang/fa'
export default {
//import使"
components: {},
props:['graph','nodeId','nodeName','taskId','taskDataOutPut','columnList','neighbors'],
data() {
//"
return {
//
data:[],
selectField:false,
defaultProps:{
children:"children",
label:'tableName'
},
dataOutPut:{},
oneInputList:{},
tableAsField:'',
tableField:'',
basicId:'',
tableId:'',
twoInputList:[],
target:[],
columnList:[],
oneNode:{},
twoNode:{},
};
},
// data",
computed: {
fa() {
return fa
}
},
//data",
watch: {},
//",
methods: {
//
addOutput(){
addTaskOutPut({
"taskId":this.taskId,
"newFileName":this.target.toString(),
"lastFileName":this.twoInputList.toString(),
"tableId":this.tableId,
"basicId":this.basicId,
}).then(res=>{
alert(res.msg)
});
},
//
toSelectField(){
this.taskDataOutPut = false;
this.selectField = true;
},
nb(){
this.findTAbleInfoList();
},
//
findTAbleInfoList(){
findTableInfoList().then(res=>{
this.data=res.data;
})
this.tableAsField="";
findByNodeId(this.neighbors[0]).then(res=>{
this.oneNode = res.data;
console.log(this.oneNode)
})
if(this.neighbors[0] !=null){
}
findByNodeId(this.neighbors[1]).then(res=>{
if(res.data == null){
this.dataOutPut.tableField = this.oneNode.tableField
return;
}
this.twoNode = res.data;
})
this.dataOutPut.tableField = this.oneNode.tableField + ',' + this.twoNode.tableField
this.dataOutPut.tableAsField = this.oneNode.tableAsField + ',' + this.twoNode.tableAsField
},
//
back(){
this.taskDataOutPut = true;
this.selectField = false;
},
//
handleNodeClick(data) {
console.log('amanaman')
console.log(data)
this.tableId = data.id
this.basicId = data.basicId
findStructureByTableId(data.id).then((res)=>{
this.columnList=res.data;
})
},
},
// - 访this",
created() {
this.findTAbleInfoList();
},
// - 访DOM",
mounted() {
},
beforeCreate() {
}, // - ",
beforeMount() {
}, // - ",
beforeUpdate() {
}, // - ",
updated() {
}, // - ",
beforeDestroy() {
}, // - ",
destroyed() {
}, // - ",
activated() {
} //keep-alive",
};
</script>
<style scoped>
</style>

View File

@ -0,0 +1,140 @@
<template>
<div>
<!-- 联查模块表单-->
<span v-if="taskInputJoin">
<el-form label-width="80px" :model="formJoin" ref="queryForm" :inline="true" class="demo-form-inline" size="small">
<el-form-item label="联查方式">
<el-select v-model="formJoin.joinType" placeholder="请选择">
<el-option style="height: 100%" label="左联查" value="left join"/>
<el-option style="height: 100%" label="右联查" value="right join"/>
<el-option style="height: 100%" label="内联查" value="inner join"/>
</el-select>
</el-form-item>
<br>
<el-form-item label="关联字段">
<el-select v-model="formJoin.leftJoinField" placeholder="请选择">
<span v-for="item in oneFieldList.split(',')">
<el-option style="height: 100%"
:label="item"
:value="item"
:key="item"/>
</span>
</el-select>
<el-select v-model="formJoin.rightJoinField" placeholder="请选择">
<span v-for="item in twoFieldList.split(',')">
<el-option style="height: 100%"
:label="item"
:value="item"
:key="item"/>
</span>
</el-select>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="taskInputJoin == false">取消</el-button>
<el-button type="primary" @click="saveTaskJoin()"> </el-button>
</div>
<!-- <div slot="footer" class="dialog-footer">-->
<!-- <el-button @click="taskInputAdd = false"> </el-button>-->
<!-- <el-button type="primary" @click="addTaskInput()"></el-button>-->
<!-- </div>-->
</span>
</div>
</template>
<script>
import { addTaskJoin, findByNodeId } from '@/api/task/task'
//jsjsjson,
//import from ',
export default {
//import使"
components: {},
props:['graph','nodeId','nodeName','taskId','taskInputJoin','neighbors'],
data() {
//"
return {
taskInputJoin: true,
formJoin: {},
leftId:null,
rightId:null,
oneFieldList:'',
twoFieldList:'',
};
},
// data",
computed: {},
//data",
watch: {},
//",
methods: {
//
saveTaskJoin(){
this.taskInputJoin = false;
this.$emit('saveTaskJoin', false);
addTaskJoin(
{
"nodeId":this.nodeId,
"nodeName":this.nodeName,
"taskId":this.taskId,
"leftId":this.leftId,
"joinType":this.formJoin.joinType,
"rightId":this.rightId,
"leftJoinField":this.formJoin.leftJoinField,
"rightJoinField":this.formJoin.rightJoinField
}
).then(res=>{
alert(res.msg);
})
},
//线
findAllTable(){
findByNodeId(this.neighbors[0]).then(res=>{
this.oneFieldList = res.data.tableAsField;
this.leftId = res.data.nodeId;
console.log(this.oneFieldList)
})
findByNodeId(this.neighbors[1]).then(res=>{
this.twoFieldList = res.data.tableAsField;
this.rightId = res.data.nodeId;
console.log(this.twoFieldList)
})
},
},
// - 访this",
created() {
this.findAllTable();
},
// - 访DOM",
mounted() {
},
beforeCreate() {
}, // - ",
beforeMount() {
}, // - ",
beforeUpdate() {
}, // - ",
updated() {
}, // - ",
beforeDestroy() {
}, // - ",
destroyed() {
}, // - ",
activated() {
} //keep-alive",
};
</script>
<style scoped>
</style>

View File

@ -0,0 +1,151 @@
<template>
<div>
<el-form ref="form" label-width="80px">
<el-form-item label="选择规则级别">
<el-select v-model="ruleRank" @change="selectVersionById" placeholder="请选择规则级别">
<el-option label="数据集" value="3"></el-option>
<el-option label="行" value="2"></el-option>
<el-option label="字段" value="1"></el-option>
</el-select>
</el-form-item>
<el-form-item label="选择规则级别">
<el-select v-model="ruleId" placeholder="请选择规则级别">
<el-option
v-for="item in ruleList"
:key="item.id"
:label="item.versionName"
:value="item.id">
</el-option>
</el-select>
</el-form-item>
<el-form-item>
<el-button @click="findByTableId"></el-button>
<el-button @click="cancel"></el-button>
</el-form-item>
</el-form>
<el-dialog
title="选择字段"
:visible.sync="ruleOpen"
width="70%">
<el-select v-model="tableFieAsId" @change="configAdd" placeholder="请选择规则级别">
<el-option
v-for="item in fieList"
:key="item.tableFieId"
:label="item.tableFieAsId"
:value="item.tableFieId">
</el-option>
</el-select>
<el-button @click="addNodeRule"></el-button>
<el-button @click="cancel"></el-button>
</el-dialog>
</div>
</template>
<script>
//jsjsjson,
//import from ',
import { addNodeRule } from '@/api/task/task'
import { selectEngineList } from '@/api/engine/engine'
import { getVersionById } from '@/api/version/version'
export default {
//import使"
components: {},
props: ["nodeId"],
data() {
//"
return {
ruleOpen: false,
fieList: [],
ruleList: [],
ruleRank: null,
ruleId: null,
tableFieAsId: null,
config: null,
tableFieId : null,
taskId:this.$route.params.id,
};
},
// data",
computed: {},
//data",
watch: {},
//",
methods: {
configAdd(val){
let obj ={"key":this.tableFieAsId};
this.config = JSON.stringify(obj);
},
addNodeRule(){
addNodeRule({"nodeId":this.nodeId,"taskId":this.taskId,"ruleId":this.ruleId,"config":this.config}).then(res => {
this.$emit('ruleDestroy', false)
})
},
cancel() {
this.$emit('ruleDestroy', false)
},
findByTableId() {
console.log(this.taskId)
// findByTableFieName(this.taskId).then(res => {
//
// let list = res.data;
// console.log(list)
// let newList = [];
//
// list.forEach(item => {
// let tableFieIdList = item.tableFieId.split(',');
// let tableAsFieIdList = item.tableAsFieId.split(',');
//
// tableFieIdList.forEach((tableFieId, index) => {
// newList.push({
// tableFieId: tableFieId,
// tableAsFieId: tableAsFieIdList[index]
// });
// });
// });
//
// //console.log(newList);
// this.fieList = newList;
// this.ruleOpen = true;
// })
},
selectVersionById(id){
console.log(id)
getVersionById(id).then(res => {
//.log(res.data)
this.ruleList = res.data;
console.log(this.ruleList)
console.log('aa')
})
}
},
// - 访this",
created() {
},
// - 访DOM",
mounted() {
},
beforeCreate() {
}, // - ",
beforeMount() {
}, // - ",
beforeUpdate() {
}, // - ",
updated() {
}, // - ",
beforeDestroy() {
}, // - ",
destroyed() {
}, // - ",
activated() {
} //keep-alive",
};
</script>
<style scoped>
</style>

View File

@ -1,148 +1,359 @@
<template> <template>
<div> <div>
<el-form label-width="80px" :model="engine" :inline="true" class="demo-form-inline" size="small"> <el-form label-width="80px" :model="engineReq" :inline="true" class="demo-form-inline" size="small">
<el-form-item label="规则名称"> <el-form-item label="规则名称">
<el-input v-model="engine.name"></el-input>
<el-input v-model="engineReq.name"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="规则类型"> <el-form-item label="规则类型">
<el-input v-model="engine.type"></el-input>
<el-select v-model="engineReq.type" placeholder="请选择类型">
<el-option label="字段类型" value="1"></el-option>
<el-option label="基本类型" value="2"></el-option>
<el-option label="引用类型" value="3"></el-option>
<el-option label="时间类型" value="4"></el-option>
<el-option label="转换类型" value="5"></el-option>
</el-select>
</el-form-item> </el-form-item>
<el-form-item label="是否激活"> <el-form-item label="是否激活">
<el-input v-model="engine.isActivate"></el-input>
<el-select v-model="engineReq.isActivate" placeholder="是否激活">
<el-option label="已激活" value="1"></el-option>
<el-option label="未激活" value="2"></el-option>
</el-select>
</el-form-item> </el-form-item>
<el-form-item label="规则状态"> <el-form-item label="规则状态">
<el-input v-model="engine.status"></el-input>
<el-select v-model="engineReq.status" placeholder="规则状态">
<el-option label="开启" value="1"></el-option>
<el-option label="关闭" value="2"></el-option>
</el-select>
</el-form-item> </el-form-item>
<el-button @click="findSelectSourceList()">
<el-button @click="select()">
查询 查询
</el-button> </el-button>
</el-form>
<el-button @click="clears()">
重置
<el-button
type="warning"
plain
icon="el-icon-download"
size="mini"
@click="findSelectSourceExport"
v-hasPermi="['source:data:export']"
>导出
</el-button> </el-button>
<el-button
icon="el-icon-delete"
plain
size="mini"
type="danger"
@click="insert()"
>新增
</el-button>
<el-dialog title="添加数据源接入" :visible.sync="dialogFormVisible" >
<el-form :model="engine">
<el-form-item label="接入源名称">
<el-input v-model="engine.id"></el-input>
</el-form-item>
<el-form-item label="数据来源系统名称">
<el-input v-model="engine.name"></el-input>
</el-form-item>
<el-form-item label="主机地址">
<el-input v-model="engine.type"></el-input>
</el-form-item>
<el-form-item label="主机端口">
<el-input v-model="engine.scope"></el-input>
</el-form-item>
<el-form-item label="数据接入类型">
<el-input v-model="engine.engineCode"></el-input>
</el-form-item>
<el-form-item label="数据库名称">
<el-input v-model="engine.isActivate"></el-input>
</el-form-item>
<el-form-item label="数据库用户">
<el-input v-model="engine.status"></el-input>
</el-form-item>
<el-form-item label="数据库密码">
<el-input v-model="engine.description"></el-input>
</el-form-item>
</el-form> </el-form>
<el-button type="warning" plain icon="el-icon-download" size="mini" @click="findSelectSourceExport"
v-hasPermi="['source:data:export']">导出
</el-button>
<!-- 添加按钮 /-->
<el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd" v-hasPermi="['source:data:add']">
新增
</el-button>
<!-- 添加或修改规则引擎对话框 -->
<el-dialog :title="title" :visible.sync="open" width="80%" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
<el-row>
<el-col :span="12">
<el-form-item label="规则名称" prop="name">
<el-input v-model="form.name" placeholder="请输入规则名称"/>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="规则编码" prop="engineCode">
<el-input v-model="form.engineCode" placeholder="请输入规则编码"/>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item label="规则类型" prop="type">
<el-select v-model="form.type" placeholder="请选择规则类型" style="width: 100%">
<el-option
v-for="dict in dict.type.rule_engine_type"
:key="dict.value"
:label="dict.label"
:value="Number(dict.value)"
></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="规则级别" prop="scope">
<el-select v-model="form.scope" placeholder="请选择规则级别" style="width: 100%">
<el-option
v-for="dict in dict.type.rule_engine_level"
:key="dict.value"
:label="dict.label"
:value="Number(dict.value)"
></el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="12">
<el-form-item label="是否激活" prop="isActivate">
<el-radio-group v-model="form.isActivate">
<el-radio
v-for="dict in dict.type.rule_engine_activate_status"
:key="dict.value"
:label="dict.value"
>{{ dict.label }}
</el-radio>
</el-radio-group>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="规则状态" prop="status">
<el-radio-group v-model="form.status">
<el-radio
v-for="dict in dict.type.sys_normal_disable"
:key="dict.value"
:label="dict.value"
>{{ dict.label }}
</el-radio>
</el-radio-group>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<el-form-item label="规则描述">
<editor v-model="form.description" :min-height="192"/>
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="备注" prop="remark">
<el-input v-model="form.remark" type="textarea" placeholder="请输入内容"/>
</el-form-item>
</el-col>
</el-row>
</el-form>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
<el-button @click="dialogFormVisible = false"> </el-button>
<el-button type="primary" @click="dialogFormVisible = false"> </el-button> <el-button type="primary" @click="submitForm"> </el-button>
</div> </div>
</el-dialog> </el-dialog>
<el-table :data="arr" style="width: 100%"> <el-table :data="arr" style="width: 100%">
<el-table-column label="编号" prop="id"></el-table-column> <el-table-column label="编号" prop="id"></el-table-column>
<el-table-column label="名称" prop="name"></el-table-column> <el-table-column label="名称" prop="name"></el-table-column>
<el-table-column label="类型" style="color: #13ce66" prop="type"> <el-table-column label="类型" style="color: #13ce66" prop="type">
<template v-slot="scope"> <template v-slot="scope">
<span v-if="scope.row.type==1"></span> <span v-if="scope.row.type==1"></span>
<span v-if="scope.row.type==2"></span> <span v-if="scope.row.type==2"></span>
<span v-if="scope.row.type==3"></span> <span v-if="scope.row.type==3"></span>
<span v-if="scope.row.type==4"></span> <span v-if="scope.row.type==4"></span>
<span v-if="scope.row.type==4"></span> <span v-if="scope.row.type==4"></span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="作用域" style="color: blue" prop="scope"> <el-table-column label="作用域" style="color: blue" prop="scope">
<template v-slot="scope"> <template v-slot="scope">
<span v-if="scope.row.scope==1"></span> <span v-if="scope.row.scope==1"></span>
<span v-if="scope.row.scope==2"></span> <span v-if="scope.row.scope==2"></span>
<span v-if="scope.row.scope==3"></span> <span v-if="scope.row.scope==3"></span>
<span v-if="scope.row.scope==4"></span> <span v-if="scope.row.scope==4"></span>
<span v-if="scope.row.scope==5"></span> <span v-if="scope.row.scope==5"></span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="引擎编码" prop="engineCode"></el-table-column> <el-table-column label="引擎编码" prop="engineCode"></el-table-column>
<el-table-column label="是否激活" style="color: red" prop="isActivate"> <el-table-column label="是否激活" style="color: red" prop="isActivate">
<template v-slot="scope"> <template v-slot="scope">
<span v-if="scope.row.isActivate==1"></span> <span v-if="scope.row.isActivate==1"></span>
<span v-if="scope.row.isActivate==2"></span> <span v-if="scope.row.isActivate==2"></span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="状态" style="color: #787be8" prop="status"> <el-table-column label="状态" style="color: #787be8" prop="status">
<template v-slot="scope"> <template v-slot="scope">
<span v-if="scope.row.status==1"></span> <span v-if="scope.row.status==1"></span>
<span v-if="scope.row.status==2"></span> <span v-if="scope.row.status==2"></span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="描述" prop="description"></el-table-column> <el-table-column label="描述" prop="description"></el-table-column>
<el-table-column align="right">
<el-table-column
align="right">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button <el-button
icon="el-icon-delete" icon="el-icon-delete"
size="mini" size="mini"
type="text" type="text"
@click="handleDelete(scope.row.id)">删除</el-button>
@click="handleDelete(scope.row.id)">删除
</el-button>
<el-button <el-button
icon="el-icon-service"
size="mini"
type="text"
@click="handUpdate(scope.row.id)">规则维护</el-button>
icon="el-icon-service"
size="mini"
type="text"
@click="handleUpdate(scope.row)">修改规则配置
</el-button>
<el-button
icon="el-icon-service"
size="mini"
type="text"
@click="engineRuleMaintenance(scope.row)">规则维护
</el-button>
</template> </template>
@ -150,144 +361,344 @@
</el-table> </el-table>
<!-- 分页-->
<!-- 分页-->
<el-pagination <el-pagination
@size-change="handleSizeChange" @size-change="handleSizeChange"
@current-change="handleCurrentChange" @current-change="handleCurrentChange"
:current-page="engineReq.pageNum" :current-page="engineReq.pageNum"
:page-sizes="[1, 2, 3, 4, 5]" :page-sizes="[1, 2, 3, 4, 5]"
:page-size="engineReq.pageSize" :page-size="engineReq.pageSize"
layout="total, sizes, prev, pager, next, jumper" layout="total, sizes, prev, pager, next, jumper"
:total="total"> :total="total">
</el-pagination> </el-pagination>
</div> </div>
</template> </template>
<script> <script>
//jsjsjson, //jsjsjson,
//import from ',
import {insertAdd} from "@/api/etl/switch";
import {del, insert, selectEngineList, update} from "@/api/engine/engine"; import {del, insert, selectEngineList, update} from "@/api/engine/engine";
export default { export default {
name: "maintenance",
dicts: ['rule_engine_activate_status', 'rule_engine_type', 'sys_normal_disable', 'rule_engine_level'],
//import使" //import使"
components: {}, components: {},
props: {}, props: {},
data() { data() {
//" //"
return { return {
engineReq:{
pageNum:1, engineReq: {
pageSize:5
}, pageNum: 1,
engine:{
pageSize: 5
}, },
arr:[], engine: {},
dialogFormVisible:false,
total:0 title: "",
};
}, arr: [],
// data",
computed: {}, dialogFormVisible: false,
//data",
watch: {}, total: 0,
//",
methods: { form: {},
handleSizeChange(val) {
console.log(`每页 ${val}`); open: false,
this.engineReq.pageSize = val;
this.findSelectSourceList(); //
},
handleCurrentChange(val) { rules: {
console.log(`当前页: ${val}`);
this.engineReq.pageNum = val; name: [
this.findSelectSourceList();
}, {required: true, message: "规则名称不能为空", trigger: "blur"}
insert(){
this.dialogFormVisible = true ],
insert(this.engine).then(res =>{
this.$message.success(res.msg || "添加成功") type: [
})
this.engine = {} {required: true, message: "规则类型不能为空", trigger: "change"}
},
findSelectSourceList(){ ],
selectEngineList(this.engineReq).then(res=>{
this.arr=res.data.list; engineCode: [
this.total=res.data.total;
}) {required: true, message: "规则编码不能为空", trigger: "blur"}
},
handleDelete(id){ ],
del(id).then(res =>{
this.$message.success(res.msg || "删除成功") isActivate: [
})
}, {required: true, message: "是否激活不能为空", trigger: "change"}
handUpdate(){
update(this.engine).then(res =>{ ],
this.$message.success(res.msg || "修改成功")
}) status: [
},
findSelectSourceExport(){ {required: true, message: "规则状态不能为空", trigger: "change"}
this.download('engine/engine/export', {
...this.engineReq ],
}, `source_${new Date().getTime()}.xlsx`)
createBy: [
{required: true, message: "创建者不能为空", trigger: "blur"}
],
createTime: [
{required: true, message: "创建时间不能为空", trigger: "blur"}
],
} }
};
}, },
// - 访this",
created() { // data",
computed: {},
//data",
watch: {},
//",
methods: {
handleSizeChange(val) {
console.log(`每页 ${val}`);
this.engineReq.pageSize = val;
this.findSelectSourceList(); this.findSelectSourceList();
}, },
handleCurrentChange(val) {
console.log(`当前页: ${val}`);
this.engineReq.pageNum = val;
this.findSelectSourceList();
},
findSelectSourceList() {
selectEngineList(this.engineReq).then(res => {
this.arr = res.data.list;
this.total = res.data.total;
})
},
handleDelete(id) {
if (confirm("是否删除这条数据?")) {
del(id).then(res => {
//
this.$message.success(res.msg || "删除成功")
})
}
},
findSelectSourceExport() {
this.download('engine/engine/export', {
...this.engineReq
},
`source_${new Date().getTime()}.xlsx`)
},
select() {
this.findSelectSourceList();
},
/** 新增按钮操作 */
handleAdd() {
this.open = true;
this.title = "添加规则引擎";
},
/** 修改按钮操作 */
handleUpdate(row) {
this.form = row;
this.open = true;
this.title = "修改规则引擎";
},
/** 提交按钮 */
submitForm() {
this.$refs["form"].validate(valid => {
if (valid) {
if (this.form.id != null) {
update(this.form).then(response => {
this.$modal.msgSuccess("修改成功");
this.findSelectSourceList();
this.open = false;
})
} else {
insert(this.form).then(response => {
this.$modal.msgSuccess("新增成功");
this.findSelectSourceList();
this.open = false;
})
}
}
});
},
engineRuleMaintenance(row) {
this.$router.push({
path: 'list',
query: {"id": row.id}
})
},
clears() {
this.engineReq = {
name: '',
type: '',
isActivate: '',
status: ''
};
}
},
// - 访this",
created() {
this.findSelectSourceList();
},
// - 访DOM", // - 访DOM",
mounted() { mounted() {
}, },
beforeCreate() { beforeCreate() {
}, // - ", }, // - ",
beforeMount() { beforeMount() {
}, // - ", }, // - ",
beforeUpdate() { beforeUpdate() {
}, // - ", }, // - ",
updated() { updated() {
}, // - ", }, // - ",
beforeDestroy() { beforeDestroy() {
}, // - ", }, // - ",
destroyed() { destroyed() {
}, // - ", }, // - ",
activated() { activated() {
} //keep-alive", } //keep-alive",
}; };
</script> </script>
<style scoped> <style scoped>
</style> </style>

View File

@ -0,0 +1,556 @@
<template>
<div>
<el-button type="text" @click="addVersion()"></el-button>
<el-dialog title="添加版本信息" :visible.sync="dialogFormVisible">
<el-form :model="versions">
<el-form-item label="版本类名" :label-width="formLabelWidth">
<el-input v-model="versions.versionClass" autocomplete="off"></el-input>
</el-form-item>
<el-form-item label="版本名称" :label-width="formLabelWidth">
<el-input v-model="versions.name" autocomplete="off"></el-input>
</el-form-item>
<el-form-item label="版本编码" :label-width="formLabelWidth">
<el-input v-model="versions.versionCode" autocomplete="off"></el-input>
</el-form-item>
<el-form-item label="是否激活" :label-width="formLabelWidth">
<el-input v-model="versions.isActivate" disabled autocomplete="off"></el-input>
</el-form-item>
<el-form-item label="版本状态" :label-width="formLabelWidth">
<el-input v-model="versions.status" disabled autocomplete="off"></el-input>
</el-form-item>
<el-form-item label="是否测试" :label-width="formLabelWidth">
<el-input v-model="versions.testStatus" disabled autocomplete="off"></el-input>
</el-form-item>
<el-form-item label="版本描述" :label-width="formLabelWidth">
<el-input v-model="versions.description" autocomplete="off"></el-input>
</el-form-item>
<div v-show="opens">
<codemirror v-model="versions.ruleContent" :value="this.versions.ruleContent" :options="cmOptions">
</codemirror>
</div>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click=closes()> </el-button>
<el-button type="primary" @click=handleInsert()> </el-button>
<el-button type="primary" @click=showCode(versions)>生成引擎类</el-button>
</div>
</el-dialog>
<el-table :data="maintenance.engineMaintenanceList" style="width: 100%">
<el-table-column prop="versionClass" label="版本类名"></el-table-column>
<el-table-column prop="name" label="版本名称"></el-table-column>
<el-table-column prop="versionCode" label="版本编码"></el-table-column>
<el-table-column prop="isActivate" label="是否激活">
<template v-slot="scope">
<span v-if="scope.row.isActivate==1"></span>
<span v-if="scope.row.isActivate==2"></span>
</template>
</el-table-column>
<el-table-column prop="status" label="版本状态">
<template v-slot="scope">
<span v-if="scope.row.status===1"></span>
<span v-if="scope.row.status===2"></span>
</template>
</el-table-column>
<el-table-column prop="testStatus" label="版本测试状态">
<template v-slot="scope">
<span v-if="scope.row.testStatus===1"></span>
<span v-if="scope.row.testStatus===2"></span>
<span v-if="scope.row.testStatus===3"></span>
</template>
</el-table-column>
<el-table-column fixed="right" label="操作" width="120">
<template slot-scope="scope">
<el-button v-show="scope.row.isActivate==1" @click="forbiddenEngines(scope.row.id)" type="text" size="small">
关闭引擎
</el-button>
<el-button v-show="scope.row.isActivate==2" @click="onEngines(scope.row.id)" type="text" size="small">
开启引擎
</el-button>
</template>
</el-table-column>
<el-table-column fixed="right" label="操作" width="120">
<template slot-scope="scope">
<el-button @click.native.prevent="selectEngineById(scope.row.id)" type="text" size="small">
规则详情
</el-button>
</template>
</el-table-column>
</el-table>
<!--回显-->
<el-dialog title="测试" :visible.sync="versionFormVisible">
<el-form :model="versions">
<el-form-item label="版本类名" :label-width="formLabelWidth">
<el-input v-model="versions.versionClass" disabled autocomplete="off"></el-input>
</el-form-item>
<el-form-item label="版本名称" :label-width="formLabelWidth">
<el-input v-model="versions.name" disabled autocomplete="off"></el-input>
</el-form-item>
<el-form-item label="版本编码" :label-width="formLabelWidth">
<el-input v-model="versions.versionCode" disabled autocomplete="off"></el-input>
</el-form-item>
<el-form-item label="是否激活" :label-width="formLabelWidth">
<el-input v-model="versions.isActivate" disabled autocomplete="off"></el-input>
</el-form-item>
<el-form-item label="版本状态" :label-width="formLabelWidth">
<el-input v-model="versions.status" disabled autocomplete="off"></el-input>
</el-form-item>
<el-form-item label="版本测试" :label-width="formLabelWidth">
<el-input v-model="versions.testStatus" disabled autocomplete="off"></el-input>
</el-form-item>
<div v-show="opens">
<codemirror v-model="versions.ruleContent" :value="this.versions.ruleContent" :options="cmOptions">
</codemirror>
</div>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="back()"> </el-button>
<el-button type="primary" @click="testEngine()"></el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import {
add,
dels,
findById,
forbiddenEngine,
generate,
onEngine,
sel,
selectEngineById,
testData
} from "@/api/engine/engine";
import Java from "@/components/JavaIDE.vue/java.vue";
import {codemirror} from 'vue-codemirror'
import "codemirror/theme/ambiance.css";
import source from "@/views/assets/source/index.vue";
import {selectSourceList} from "@/api/etl/switch"; // theme
require("codemirror/mode/javascript/javascript"); // jsmode
export default {
computed: {
source() {
return source
}
},
dicts: ['rule_engine_activate_status', 'rule_engine_type', 'sys_normal_disable', 'rule_engine_level'],
//import使"
components: {
codemirror,
Java
},
props: {},
data() {
//"
return {
engines: [],
versionFormVisibles: false,
datas: {
source: []
},
dialogTableVisible: false,
direction: 'rtl',
versionFormVisible: false,
maintenance: {
engineMaintenanceList: [],
},
opens: false,
title: "",
open: false,
handleClose: false,
versions: {
isActivate: '未激活',
testStatus: '未测试',
status: '初始化',
ruleContent: ''
},
cmOptions: {
lineNumbers: true, //
mode: 'text/x-yaml', // model
gutters: ['CodeMirror-lint-markers'], //
theme: "ambiance",
lint: true, //
},
size: '',
dialogFormVisible: false,
formLabelWidth: '120px',
arr: []
}
},
methods: {
testEngine() {
testData(this.versions).then(res => {
this.$message.success(res.msg || "成功")
})
},
closes() {
this.dialogFormVisible = false;
},
showCode() {
this.opens = true
this.versions.isActivate = 1
this.versions.testStatus = 1
this.versions.status = 1
this.versions.id = this.$route.query.id
generate(this.versions).then(res => {
this.versions.ruleContent = res.ruleContent;
this.$message.success(res.msg || "成功");
})
},
//
addVersion() {
this.versions = {},
this.versions.isActivate = '未激活',
this.versions.testStatus = '未测试',
this.versions.status = '初始化';
this.dialogFormVisible = true
},
back() {
this.versionFormVisible = false;
},
//id
selectEngineById(id) {
this.versionFormVisible = true;
sel(id).then(res => {
this.versions = res.data;
})
},
handleInsert() {
this.dialogFormVisible = false;
this.versions.isActivate = 1
this.versions.testStatus = 1
this.versions.status = 1
add(this.versions).then(res => {
this.$message.success(res.msg || "新增成功")
})
this.List();
},
onEngines(id) {
onEngine(id).then(res => {
this.$message.success(res.msg || "开启成功")
})
this.List();
},
forbiddenEngines(id) {
forbiddenEngine(id).then(res => {
this.$message.success(res.msg || "关闭成功")
})
this.List();
},
selectSourceList() {
selectSourceList({}).then(res => {
this.engines = res.data;
})
},
List() {
findById(this.maintenance.id).then(res => {
this.maintenance.engineMaintenanceList = res.data
})
},
selectEngine() {
selectEngineById(this.maintenance.id).then(res => {
this.arr = res.data
})
},
del(id) {
if (confirm("你确定删除吗?")) {
dels(id).then(res => {
this.$message.success(res.msg || "删除成功");
})
}
}
},
// - 访this",
created() {
this.maintenance.id = this.$route.query.id
this.List();
this.selectEngine();
this.selectSourceList();
}
}
</script>
<style scoped>
.information-box >>> .CodeMirror {
font-family: monospace;
height: 71vh;
direction: ltr;
}
</style>

View File

@ -0,0 +1,168 @@
<template>
<div>
<el-container>
<el-aside width="30%">
<el-tree :data="data" :props="defaultProps" @node-click="handleNodeClick"></el-tree>
</el-aside>
<el-main>
<el-card class="box-card">
<div slot="header" class="clearfix">
<span>资产详情</span>
</div>
<table>
<tr><td>表名称:</td><td>{{ tableBasic.tableName }}</td></tr>
<tr><td>表备注:</td><td>{{ tableBasic.tableRemark }}</td></tr>
<tr><td>数据量:</td><td>{{ tableBasic.dataNum }}</td></tr>
<tr><td>是否核心:</td><td><dict-tag :options="dict.type.yes_no" :value="tableBasic.isCenter"/></td></tr>
</table>
<!-- <el-descriptions class="margin-top" title="带边框列表" :column="2" border>-->
<!-- <el-descriptions-item>-->
<!-- <template slot="label">表名称</template>-->
<!-- {{ tableBasic.tableName }}-->
<!-- </el-descriptions-item>-->
<!-- <el-descriptions-item>-->
<!-- <template slot="label">表备注</template>-->
<!-- {{ tableBasic.tableRemark }}-->
<!-- </el-descriptions-item>-->
<!-- <el-descriptions-item>-->
<!-- <template slot="label">数据量</template>-->
<!-- {{ tableBasic.dataNum }}-->
<!-- </el-descriptions-item>-->
<!-- <el-descriptions-item>-->
<!-- <template slot="label">是否核心</template>-->
<!-- <dict-tag :options="dict.type.yes_no" :value="tableBasic.isCenter"/>-->
<!-- </el-descriptions-item>-->
<!-- </el-descriptions>-->
</el-card>
<el-card>
<el-table
:data="DataValue"
style="width: 100%">
<el-table-column
prop="key"
label="key"
width="180">
</el-table-column>
<el-table-column
prop="label"
label="label"
width="180">
</el-table-column>
<el-table-column
prop="type"
label="type">
</el-table-column>
<el-table-column
prop="value"
label="value">
</el-table-column>
</el-table>
<!-- <div v-for="data in DataValue">-->
<!-- {{data.key}}-->
<!-- <el-descriptions title="数据" direction="vertical" :column="4" border>-->
<!-- <el-descriptions-item label="用户名">{{data.type}}</el-descriptions-item>-->
<!-- <el-descriptions-item label="手机号">{{data.value}}</el-descriptions-item>-->
<!-- </el-descriptions>-->
<!-- </div>-->
</el-card>
</el-main>
</el-container>
</div>
</template>
<script>
//jsjsjson,
//import from ',
import {findTableValueList} from "@/api/etl/switch";
import {findTableInfoListAccredit} from "@/api/etl/switch";
import {findStructureByTableId} from "@/api/etl/switch";
export default {
dicts: ['yes_no'],
//import使"
components: {},
props: {},
data() {
//"
return {
DataValue:[],
data:{
},
defaultProps:{
children:"children",
label:'tableName'
},
tableBasic:{
},
};
},
// data",
computed: {},
//data",
watch: {},
//",
methods: {
findTAbleInfoList(){
findTableInfoListAccredit().then(res=>{
this.data=res.data;
})
},
handleNodeClick(data) {
this.tableBasic=data
if (data.children==null){
findTableValueList(data.basicId,data.tableName).then(res=>{
this.DataValue=res.data;
})
}
console.log(data);
},
},
// - 访this",
created() {
this.findTAbleInfoList();
},
// - 访DOM",
mounted() {
},
beforeCreate() {
}, // - ",
beforeMount() {
}, // - ",
beforeUpdate() {
}, // - ",
updated() {
}, // - ",
beforeDestroy() {
}, // - ",
destroyed() {
}, // - ",
activated() {
} //keep-alive",
};
</script>

View File

@ -0,0 +1,157 @@
<template>
<div>
<el-container>
<el-aside width="30%">
<el-tree :data="data" :props="defaultProps" @node-click="handleNodeClick"></el-tree>
</el-aside>
<el-main>
<el-card class="box-card">
<div slot="header" class="clearfix">
<span>资产模型基本信息</span>
</div>
<table>
<tr><td>表名称:</td><td>{{ tableBasic.tableName }}</td></tr>
<tr><td>表备注:</td><td>{{ tableBasic.tableRemark }}</td></tr>
<tr><td>数据量:</td><td>{{ tableBasic.dataNum }}</td></tr>
<tr><td>是否核心:</td><td><dict-tag :options="dict.type.yes_no" :value="tableBasic.isCenter"/></td></tr>
</table>
<!-- <el-descriptions class="margin-top" title="带边框列表" :column="2" border>-->
<!-- <el-descriptions-item>-->
<!-- <template slot="label">表名称</template>-->
<!-- {{ tableBasic.tableName }}-->
<!-- </el-descriptions-item>-->
<!-- <el-descriptions-item>-->
<!-- <template slot="label">表备注</template>-->
<!-- {{ tableBasic.tableRemark }}-->
<!-- </el-descriptions-item>-->
<!-- <el-descriptions-item>-->
<!-- <template slot="label">数据量</template>-->
<!-- {{ tableBasic.dataNum }}-->
<!-- </el-descriptions-item>-->
<!-- <el-descriptions-item>-->
<!-- <template slot="label">是否核心</template>-->
<!-- <dict-tag :options="dict.type.yes_no" :value="tableBasic.isCenter"/>-->
<!-- </el-descriptions-item>-->
<!-- </el-descriptions>-->
</el-card>
<el-card class="box-card">
<div slot="header" class="clearfix">
<span>资产模型详细信息</span>
</div>
<el-table
:data="tableData" style="width: 100%">
<el-table-column label="名称" prop="columnName"></el-table-column>
<el-table-column label="注释" prop="columnRemark"></el-table-column>
<el-table-column label="是否主键" prop="isPrimary">
<template slot-scope="scope">
<dict-tag :options="dict.type.yes_no" :value="scope.row.isPrimary"/>
</template>
</el-table-column>
<el-table-column label="类型" prop="columnType"></el-table-column>
<el-table-column label="映射类型" prop="javaType"></el-table-column>
<el-table-column label="长度" prop="columnLength"></el-table-column>
<el-table-column label="小数位" prop="columnDecimals"></el-table-column>
<el-table-column label="是否为空" prop="isNull">
<template slot-scope="scope">
<dict-tag :options="dict.type.yes_no" :value="scope.row.isNull"/>
</template>
</el-table-column>
</el-table>
</el-card>
</el-main>
</el-container>
</div>
</template>
<script>
//jsjsjson,
//import from ',
import {findTableInfoList} from "@/api/etl/switch";
import {findStructureByTableId} from "@/api/etl/switch";
export default {
dicts: ['yes_no'],
//import使"
components: {},
props: {},
data() {
//"
return {
tableData:[],
tableBasic:{
},
form:{
},
data:[],
defaultProps:{
children:"children",
label:'tableName'
},
};
},
// data",
computed: {},
//data",
watch: {},
//",
methods: {
findTAbleInfoList(){
findTableInfoList().then(res=>{
this.data=res.data;
})
},
handleNodeClick(data) {
this.tableBasic=data
findStructureByTableId(data.id).then((res)=>{
this.tableData=res.data;
})
console.log(data);
},
},
// - 访this",
created() {
this.findTAbleInfoList();
},
// - 访DOM",
mounted() {
},
beforeCreate() {
}, // - ",
beforeMount() {
}, // - ",
beforeUpdate() {
}, // - ",
updated() {
}, // - ",
beforeDestroy() {
}, // - ",
destroyed() {
}, // - ",
activated() {
} //keep-alive",
};
</script>

View File

@ -0,0 +1,306 @@
<template>
<div>
<el-container>
<el-aside width="30%">
<el-tree :data="data" :props="defaultProps" @node-click="handleNodeClick"></el-tree>
</el-aside>
<!-- {-->
<!-- "dataResourceName": "黑鬼",-->
<!-- "dataBaseName": "text",-->
<!-- "tableNameB": "engine_version",-->
<!-- "dataNum": 4,-->
<!-- "tableRemark": "",-->
<!-- "dataSourceSystemName": null-->
<!-- }-->
<el-main>
<el-card class="box-card">
<el-descriptions title="基本信息">
<el-descriptions-item label="数据接入名称">{{tableBasic.dataResourceName}}</el-descriptions-item>
<el-descriptions-item label="系统名称">{{tableBasic.dataSourceSystemName}}</el-descriptions-item>
<el-descriptions-item label="数据库名称">{{tableBasic.dataBaseName}}</el-descriptions-item>
<el-descriptions-item label="表名称">{{tableBasic.tableNameB}}</el-descriptions-item>
<el-descriptions-item label="表中文名称">{{tableBasic.tableRemark}}</el-descriptions-item>
<el-descriptions-item label="数据量">{{tableBasic.dataNum}}</el-descriptions-item>
</el-descriptions>
</el-card>
<el-card>
<el-tabs v-model="activeName" @tab-click="handleClick">
<el-tab-pane label="部门授权" name="first">
<el-table
v-if="refreshTable"
v-loading="loading"
:data="deptList"
:default-expand-all="isExpandAll"
:tree-props="{children: 'children', hasChildren: 'hasChildren'}"
row-key="deptId"
>
<el-table-column label="部门名称" prop="deptName" width="260"></el-table-column>
<el-table-column label="部门负责人" prop="leader" width="200"></el-table-column>
<el-table-column label="邮箱" prop="email" width="200"></el-table-column>
<el-table-column align="center" label="创建时间" prop="createTime" width="200">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.createTime) }}</span>
</template>
</el-table-column>
<el-table-column label="状态" prop="status" width="200"></el-table-column>
<el-table-column label="状态" width="200">
<template slot-scope="scope">
<el-switch
v-model="scope.row.status"
active-color="#13ce66"
inactive-color="#ff4949"
:active-value='0'
:inactive-value='1'
active-text="已授权"
inactive-text="未授权"
@change="updateDeptStatus(scope.row)"
>
</el-switch>
</template>
</el-table-column>-->
</el-table>
</el-tab-pane>
<el-tab-pane label="用户授权" name="second">
<el-table
:data="userList"
>
<el-table-column label="用户名称" prop="userName" width="260"></el-table-column>
<el-table-column label="用户昵称" prop="nickName" width="200"></el-table-column>
<el-table-column label="用户部门" prop="deptName" width="200"></el-table-column>
<el-table-column label="用户邮箱" prop="email" width="200"></el-table-column>
<el-table-column label="用户手机号" prop="phoneNumber" width="200"></el-table-column>
<el-table-column align="center" label="创建时间" prop="createTime" width="200">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.createTime) }}</span>
</template>
</el-table-column>
<el-table-column label="状态" width="200">
<template slot-scope="scope">
<el-switch
v-model="scope.row.status"
active-color="#13ce66"
inactive-color="#ff4949"
:active-value='0'
:inactive-value='1'
@change="updateDeptStatus(scope.row)"
>
</el-switch>
</template>
</el-table-column>-->
</el-table>
</el-tab-pane>
<!-- <el-tab-pane label="用户授权" name="second">-->
<!-- <el-table-->
<!-- v-if="refreshTable"-->
<!-- v-loading="loading"-->
<!-- :data="deptList"-->
<!-- :default-expand-all="isExpandAll"-->
<!-- :tree-props="{children: 'children', hasChildren: 'hasChildren'}"-->
<!-- row-key="deptId"-->
<!-- >-->
<!-- <el-table-column label="用户名称" prop="deptName" width="260"></el-table-column>-->
<!-- <el-table-column label="用户昵称" prop="orderNum" width="200"></el-table-column>-->
<!-- <el-table-column label="用户名称" prop="orderNum" width="200"></el-table-column>-->
<!-- <el-table-column label="用户部门" prop="orderNum" width="200"></el-table-column>-->
<!-- <el-table-column label="用户邮箱" prop="orderNum" width="200"></el-table-column>-->
<!-- <el-table-column label="用户手机号" prop="orderNum" width="200"></el-table-column>-->
<!-- <el-table-column label="创建时间" prop="orderNum" width="200"></el-table-column>-->
<!-- <template slot-scope="scope">-->
<!-- <el-switch-->
<!-- v-model="scope.row.status"-->
<!-- active-color="#13ce66"-->
<!-- inactive-color="#ff4949"-->
<!-- active-value="0"-->
<!-- inactive-value="1">-->
<!-- </el-switch>-->
<!-- </template>-->
<!-- </el-table>-->
<!-- </el-tab-pane>-->
</el-tabs>
</el-card>
</el-main>
</el-container>
</div>
</template>
<script>
//jsjsjson,
//import from ',
import {findDeptListStatus, findTableValueList, findUserListStatus} from "@/api/etl/switch";
import {findTableInfoList} from "@/api/etl/switch";
import {findAccredit} from "@/api/etl/switch";
import {addMiddle} from "@/api/etl/switch";
import {remove} from "@/api/etl/switch";
import {shouldAdd} from "script-ext-html-webpack-plugin/lib/custom-attributes";
// import {findStructureByTableId} from "@/api/etl/switch";
export default {
dicts: ['yes_no'],
//import使"
components: {},
props: {},
data() {
//"
return {
accredit:{
deptId:'',
basicId:'',
tableId:'',
userId:'',
},
userList:[
],
activeName: 'first',
//
refreshTable: true,
//
isExpandAll: true,
//
loading: true,
//
deptList:[
],
DataValue:[],
data:{
},
defaultProps:{
children:"children",
label:'tableName'
},
tableBasic:{
},
};
},
// data",
computed: {},
//data",
watch: {},
//",
methods: {
updateDeptStatus(row){
this.accredit.deptId=row.deptId
this.accredit.userId=row.userId
if (row.status===0){
addMiddle(this.accredit).then(res=>{
if (res.code===200){
alert("授权成功")
}
})
}
if (row.status===1){
remove(this.accredit).then(res=>{
if (res.code===200){
alert("取消授权成功")
}
})
}
console.log(row);
},
toggleExpandAll() {
this.refreshTable = false;
this.isExpandAll = !this.isExpandAll;
this.$nextTick(() => {
this.refreshTable = true;
});
},
handleClick(tab, event) {
console.log(tab, event);
},
findTAbleInfoList(){
findTableInfoList().then(res=>{
this.data=res.data;
})
},
handleNodeClick(data) {
this.accredit.tableId = data.id;
this.accredit.basicId = data.basicId;
this.loading = true;
// if (data.children==null){
findDeptListStatus(data.id, data.basicId).then(res => {
this.deptList = this.handleTree(res.data, "deptId");
this.loading = false;
})
findUserListStatus(data.id, data.basicId).then(res => {
this.userList = res.data;
})
findAccredit(data.id).then(res => {
this.tableBasic = res;
})
// }
console.log(data);
},
},
// - 访this",
created() {
this.findTAbleInfoList();
},
// - 访DOM",
mounted() {
},
beforeCreate() {
}, // - ",
beforeMount() {
}, // - ",
beforeUpdate() {
}, // - ",
updated() {
}, // - ",
beforeDestroy() {
}, // - ",
destroyed() {
}, // - ",
activated() {
} //keep-alive",
};
</script>

View File

@ -1,334 +1,394 @@
<template> <template>
<div> <div class="app-container">
<el-form v-show="showSearch" ref="queryForm" :inline="true" :model="queryParams" label-width="68px" size="small">
<el-form label-width="80px" :model="SourceReq" ref="queryForm" :inline="true" class="demo-form-inline" size="small"> <el-form-item label="数据来源名称" prop="name">
<el-form-item label="数据源名称"> <el-input
<el-input v-model="SourceReq.dataResourceName"></el-input> v-model="queryParams.dataSourcesSystemName"
clearable
placeholder="请输入数据来源名称"
@keyup.enter.native="handleQuery"
/>
</el-form-item> </el-form-item>
<el-form-item label="数据来源系统名称"> <el-form-item label="存放数据库名称" prop="databaseName">
<el-input v-model="SourceReq.dataSourcesSystemName"></el-input> <el-input
v-model="queryParams.databaseName"
clearable
placeholder="请输入存放数据库名称"
@keyup.enter.native="handleQuery"
/>
</el-form-item> </el-form-item>
<el-form-item label="数据库名称"> <el-form-item>
<el-input v-model="SourceReq.databaseName"></el-input> <el-button icon="el-icon-search" size="mini" type="primary" @click="handleQuery"></el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery"></el-button>
</el-form-item> </el-form-item>
<el-button @click="findSelectSourceList()">
查询
</el-button>
</el-form> </el-form>
<el-row :gutter="10" class="mb8">
<!-- <el-button--> <el-col :span="1.5">
<!-- v-hasPermi="['system:user:remove']"-->
<!-- icon="el-icon-delete"-->
<!-- size="mini"-->
<!-- type="text"-->
<!-- @click="handleDelete(scope.row)"-->
<!-- >删除-->
<!-- </el-button>-->
<el-button <el-button
v-hasPermi="['tool:gen:import']" v-hasPermi="['system:post:add']"
icon="el-icon-plus"
plain
size="mini"
type="primary"
@click="handleAdd"
>新增
</el-button>
</el-col>
<!-- <el-col :span="1.5">-->
<!-- <el-button-->
<!-- v-hasPermi="['system:post:remove']"-->
<!-- :disabled="multiple"-->
<!-- icon="el-icon-delete"-->
<!-- plain-->
<!-- size="mini"-->
<!-- type="danger"-->
<!-- @click="handleDelete"-->
<!-- >删除-->
<!-- </el-button>-->
<!-- </el-col>-->
<el-col :span="1.5">
<el-button
v-hasPermi="['system:post:export']"
icon="el-icon-download" icon="el-icon-download"
plain plain
size="mini" size="mini"
type="warning" type="warning"
@click="findSelectSourceExport" @click="handleExport"
>导出 >导出
</el-button> </el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="dataList" @selection-change="handleSelectionChange">
<el-table-column align="center" type="selection" width="55"/>
<el-table-column align="name" label="数据来源名称" prop="dataSourcesSystemName"/>
<el-table-column align="ip" label="数据来源地址" prop="host"/>
<el-table-column align="port" label="来源地址端口号" prop="port"/>
<el-table-column align="type" label="数据接入类型" prop="databaseType"/>
<el-table-column align="databaseName" label="存放数据库名称" prop="databaseName"/>
<el-table-column align="center" label="是否初始化" prop="status">
<template slot-scope="scope">
<dict-tag :options="dict.type.yes_no" :value="scope.row.status"/>
</template>
</el-table-column>
<el-table-column align="center" class-name="small-padding fixed-width" label="操作">
<template slot-scope="scope">
<el-button <el-button
v-hasPermi="['system:post:remove']"
icon="el-icon-delete" icon="el-icon-delete"
plain
size="mini" size="mini"
type="danger" type="text"
@click="insertAdd()" @click="handleDelete(scope.row)"
>新增
</el-button>
<el-button
icon="el-icon-delete"
plain
size="mini"
type="danger"
@click="deleteSourceByIds()"
>删除 >删除
</el-button> </el-button>
<el-button
icon="el-icon-caret-right"
size="mini"
type="text"
@click="connectDataSources(scope.row)"
>测试
</el-button>
<el-dialog title="添加数据源接入" :visible.sync="dialogFormVisible"> <el-button
v-hasPermi="['system:post:remove']"
icon="el-icon-edit"
size="mini"
type="text"
@click="handleUpdate(scope.row)"
>修改
</el-button>
<el-form :model="sourceAddReq"> <el-button
<el-form-item label="接入源名称"> v-hasPermi="['system:post:remove']"
<el-input v-model="sourceAddReq.dataResourceName"></el-input> icon="el-icon-paperclip"
size="mini"
type="text"
@click="syncAssetStructure(scope.row)"
>同步资产结构
</el-button>
</template>
</el-table-column>
</el-table>
<pagination
v-show="total>0"
:limit.sync="queryParams.pageSize"
:page.sync="queryParams.pageNum"
:total="total"
@pagination="getList"
/>
<!-- 添加或修改岗位对话框 -->
<el-dialog :title="title" :visible.sync="open" append-to-body width="60%">
<el-form ref="form" :model="form" :rules="rules" label-width="80px" :inline="true" class="demo-form-inline">
<el-form-item label="接入来源系统名称" prop="dataSourcesSystemName">
<el-input v-model="form.dataSourcesSystemName" placeholder="请输入数据来源系统名称"/>
</el-form-item> </el-form-item>
<el-form-item label="数据来源系统名称"> <el-form-item label="ip" prop="host">
<el-input v-model="sourceAddReq.dataSourcesSystemName"></el-input> <el-input v-model="form.host" placeholder="请输入ip"/>
</el-form-item> </el-form-item>
<el-form-item label="主机地址"> <el-form-item label="port" prop="port">
<el-input v-model="sourceAddReq.host"></el-input> <el-input v-model="form.port" placeholder="请输入port"/>
</el-form-item> </el-form-item>
<el-form-item label="主机端口"> <el-form-item label="type" prop="databaseType">
<el-input v-model="sourceAddReq.port"></el-input> <el-select v-model="form.databaseType" placeholder="请选择类型">
<el-option label="mysql" value="mysql"></el-option>
<el-option label="redis" value="redis"></el-option>
<el-option label="oracle" value="oracle"></el-option>
</el-select>
</el-form-item> </el-form-item>
<el-form-item label="数据接入类型"> <el-form-item label="数据库名称" prop="databaseName">
<el-input v-model="sourceAddReq.databaseType"></el-input> <el-input v-model="form.databaseName" placeholder="请输入数据库名称"/>
</el-form-item> </el-form-item>
<el-form-item label="数据库名称"> <el-form-item label="userName" prop="username">
<el-input v-model="sourceAddReq.databaseName"></el-input> <el-input v-model="form.username" placeholder="请输入数据库用户"/>
</el-form-item> </el-form-item>
<el-form-item label="数据库用户"> <el-form-item label="userPwd" prop="password">
<el-input v-model="sourceAddReq.username"></el-input> <el-input v-model="form.password" placeholder="请输入数据库密码"/>
</el-form-item> </el-form-item>
<el-form-item label="数据库密码"> </el-form>
<el-input v-model="sourceAddReq.password"></el-input>
<el-card class="box-card">
<div slot="header" class="clearfix">
<span>数据连接参数</span>
</div>
<el-form ref="form" :model="form" :rules="rules" label-width="80px" >
<el-form-item label="数据连接参数" prop="name">
<el-input v-model="form.connectionParams" placeholder="请输入数据连接参数"/>
</el-form-item> </el-form-item>
<el-form-item label="数据连接参数"> </el-form>
<el-input v-model="sourceAddReq.connectionParams"></el-input> </el-card>
<el-card class="box-card">
<div slot="header" class="clearfix">
<span>连接池配置</span>
</div>
<el-form ref="form" :model="form" :rules="rules" label-width="80px" :inline="true" class="demo-form-inline">
<el-form-item label="初始连接数量" prop="initCount">
<el-input v-model="form.initLinkNum" placeholder="初始连接数量"/>
</el-form-item> </el-form-item>
<el-form-item label="初始化连接数量"> <el-form-item label="最大连接数量" prop="maxCount">
<el-input v-model="sourceAddReq.initLinkNum"></el-input> <el-input v-model="form.maxLinkNum" placeholder="最大连接数量"/>
</el-form-item> </el-form-item>
<el-form-item label="最大连接数量"> <el-form-item label="最大等待时间" prop="maxTime">
<el-input v-model="sourceAddReq.maxLinkNum"></el-input> <el-input v-model="form.maxWaitTime" placeholder="最大等待时间"/>
</el-form-item> </el-form-item>
<el-form-item label="最大等待时间"> <el-form-item label="最大等待次数" prop="initCount">
<el-input v-model="sourceAddReq.maxWaitTime"></el-input> <el-input v-model="form.maxWaitTimes" placeholder="最大等待次数"/>
</el-form-item> </el-form-item>
<el-form-item label="最大等待次数">
<el-input v-model="sourceAddReq.maxWaitTimes"></el-input>
</el-form>
</el-card>
<el-card class="box-card">
<div slot="header" class="clearfix">
<span>其他信息</span>
</div>
<el-form ref="form" :model="form" :rules="rules" label-width="80px" :inline="true" class="demo-form-inline">
<el-form-item label="是否初始化" prop="status">
<el-radio-group v-model="form.status">
<el-radio
v-for="dict in dict.type.yes_no"
:key="dict.value"
:label="dict.value"
>{{ dict.label }}
</el-radio>
</el-radio-group>
</el-form-item> </el-form-item>
<el-form-item label="备注"> <el-form-item label="备注">
<el-input v-model="sourceAddReq.remark"></el-input> <el-input type="textarea" v-model="form.remark"></el-input>
</el-form-item> </el-form-item>
</el-form> </el-form>
</el-card>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
<el-button @click="textP()"></el-button> <el-button type="primary" @click="submitForm"> </el-button>
<el-button @click="dialogFormVisible = false"> </el-button> <el-button @click="cancel"> </el-button>
<el-button type="primary" @click="addSource()"> </el-button>
</div> </div>
</el-dialog> </el-dialog>
<el-table
:data="source"
style="width: 100%"
@selection-change="handleSelectionChange">
<el-table-column
type="selection"
width="55">
</el-table-column>
<el-table-column
label="接入源名称"
prop="dataResourceName">
</el-table-column>
<el-table-column
label="数据来源系统名称"
prop="dataSourcesSystemName">
</el-table-column>
<el-table-column
label="主机地址"
prop="host">
</el-table-column>
<el-table-column
label="端口号"
prop="port">
</el-table-column>
<el-table-column
label="数据接入类型"
prop="databaseType">
</el-table-column>
<el-table-column
label="数据库名称"
prop="databaseName">
</el-table-column>
<el-table-column
label="是否初始化"
prop="name">
</el-table-column>
<el-table-column
label="备注"
prop="remark">
</el-table-column>
<el-table-column
align="right">
<template slot-scope="scope">
<el-button
icon="el-icon-pear"
size="mini"
type="text"
@click="update(scope.row)">修改</el-button>
<el-button
icon="el-icon-delete"
size="mini"
type="text"
@click="handleDelete(scope.row)">删除</el-button>
<el-button
icon="el-icon-service"
size="mini"
type="text"
@click="struceure(scope.row)">同步资产结构</el-button>
<el-button
icon="el-icon-aim"
size="mini"
type="text"
@click="textConnect(scope.row)">测试连接</el-button>
</template>
</el-table-column>
</el-table>
</div> </div>
</template> </template>
<script> <script>
//jsjsjson, import {
//import from ', selectSourceList,
import {selectSourceList} from "@/api/etl/switch"; insertAdd,
import {selectSourceExport} from "@/api/etl/switch"; connectDataSources,
import {connectionTest} from "@/api/etl/switch"; deleteDataSourcesById,
import {insertAdd} from "@/api/etl/switch"; syncAssetStructure, update, getInfo, connectionTest, structure, deleteSource
import {deleteSource} from "@/api/etl/switch"; } from "@/api/etl/switch";
import {getInfo} from "@/api/etl/switch";
export default { export default {
//import使" name: "switch",
components: {}, dicts: ['sys_normal_disable','yes_no'],
props: {},
data() { data() {
//"
return { return {
ids:[], //
dialogFormVisible:false, loading: true,
SourceReq:{ //
ids: [],
//
single: true,
//
multiple: true,
//
showSearch: true,
//
total: 0,
//
dataList: [],
//
title: "",
//
open: false,
//
queryParams: {
pageNum: 1,
pageSize: 10,
name: undefined,
databaseName: undefined
}, },
sourceAddReq:{ //
form: {},
}, //
source:[], rules: {
dataSourcesSystemName: [{required: true, message: "数据来源名称不能为空", trigger: "blur"}],
host: [{required: true, message: "数据来源ip不能为空", trigger: "blur"}],
port: [{required: true, message: "来源地址端口号不能为空", trigger: "blur"}],
databaseType: [{required: true, message: "类型不能为空", trigger: "change"}],
initLinkNum: [{required: true, message: "初始连接数量不能为空", trigger: "blur"}],
maxLinkNum: [{required: true, message: "最大连接数量不能为空", trigger: "blur"}],
maxWaitTime: [{required: true, message: "最大等待时间不能为空", trigger: "blur"}],
maxWaitTimes: [{required: true, message: "最大等待次数不能为空", trigger: "blur"}],
status: [{required: true, message: "是否初始化不能为空", trigger: "change"}],
}
}; };
}, },
// data",
computed: {},
//data",
watch: {},
//",
methods: {
deleteSourceByIds(){
deleteSource(this.ids).then(res=>{
if(res.code===200){
alert("删除成功");
}
})
},
handleDelete(row){
deleteSource(row.id).then(res=>{
if(res.code===200){
alert("删除成功");
}
})
},
textP(){
connectionTest(this.sourceAddReq).then(res=>{
if (res.code===200){
alert("测试连接成功")
}else{
alert("连接失败")
}
})
},
addSource(){
insertAdd(this.sourceAddReq).then(res=>{
if(res.code===200){
location.reload();
}
})
},
//
textConnect(row){
connectionTest(row).then(res=>{
if (res.code===200){
alert("测试连接成功");
}else {
alert("测试连接失败");
}
})
},
insertAdd(){
this.dialogFormVisible=true
},
findSelectSourceList(){
selectSourceList(this.SourceReq).then(res=>{
this.source=res.data.rows;
})
},
findSelectSourceExport(){
this.download('source/source/export', {
...this.SourceReq
}, `source_${new Date().getTime()}.xlsx`)
},
handleSelectionChange(row){
this.ids=[];
for (let rowKey in row) {
this.ids.push(row[rowKey].id)
}
},
},
// - 访this",
created() { created() {
this.findSelectSourceList(); this.getList();
}, },
// - 访DOM", methods: {
mounted() { syncAssetStructure(row){
connectionTest(row).then((res)=>{
console.log(res)
if (res.code===200){
this.$modal.msgSuccess("同步成功");
}else {
this.$modal.msgError("同步失败");
}
})
}, },
beforeCreate() {
}, // - ", /** 连接数据源 */
beforeMount() { connectDataSources(row){
}, // - ", structure(row).then(res=>{
beforeUpdate() { if (res.code===200){
}, // - ", this.$modal.msgSuccess("连接成功");
updated() { }else {
}, // - ", this.$modal.msgError("连接失败");
beforeDestroy() { }
}, // - ", })
destroyed() { },
}, // - ",
activated() { /** 查询列表 */
} //keep-alive", getList() {
this.loading = true;
selectSourceList(this.queryParams).then(response => {
this.dataList = response.data.rows;
this.total = response.data.total;
this.loading = false;
console.log(response)
});
},
//
cancel() {
this.open = false;
this.reset();
},
//
reset() {
this.form = {
};
this.resetForm("form");
},
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
},
/** 重置按钮操作 */
resetQuery() {
this.resetForm("queryForm");
this.handleQuery();
},
//
handleSelectionChange(selection) {
this.ids = selection.map(item => item.id)
this.single = selection.length != 1
this.multiple = !selection.length
},
/** 新增按钮操作 */
handleAdd() {
this.reset();
this.open = true;
this.title = "添加岗位";
},
/** 修改按钮操作 */
handleUpdate(row) {
this.reset();
const id = row.id || this.ids
getInfo(id).then(response => {
this.form = response.data;
this.open = true;
this.title = "修改岗位";
});
},
/** 提交按钮 */
submitForm: function () {
this.$refs["form"].validate(valid => {
if (valid) {
alert(this.form.id)
if (this.form.id != undefined) {
update(this.form).then(response => {
this.$modal.msgSuccess("修改成功");
this.open = false;
this.getList();
});
} else {
insertAdd(this.form).then(response => {
this.$modal.msgSuccess("新增成功");
this.open = false;
this.getList();
});
}
}
});
},
/** 删除按钮操作 */
handleDelete(row) {
const id = row.id || this.ids;
this.$modal.confirm('是否确认删除该数据项?').then(function () {
return deleteSource(id);
}).then(() => {
this.getList();
this.$modal.msgSuccess("删除成功");
}).catch(() => {
});
},
/** 导出按钮操作 */
handleExport() {
this.download('source/source/export', {
...this.queryParams
}, `post_${new Date().getTime()}.xlsx`)
}
}
}; };
</script> </script>
<style scoped>
</style>

View File

@ -71,7 +71,7 @@ export default {
codeUrl: "", codeUrl: "",
loginForm: { loginForm: {
username: "admin", username: "admin",
password: "admin123", password: "123456",
rememberMe: false, rememberMe: false,
code: "", code: "",
uuid: "" uuid: ""
@ -87,7 +87,7 @@ export default {
}, },
loading: false, loading: false,
// //
captchaEnabled: true, captchaEnabled: false,
// //
register: true, register: true,
redirect: undefined redirect: undefined

View File

@ -0,0 +1,385 @@
<template>
<div>
<h1 style="text-align: center; margin-bottom: 30px;">安全设置</h1>
<el-divider></el-divider>
<div class="container">
<div class="card left-card">
<el-card style="margin-top: 50px;">
<h2>登录密码</h2>
<div class="container">
<label>安全性高的密码可以使帐号更安全.建议你定期更换密码,设置6-20位登录密码</label>
<div class="button-wrapper">
<button @click="openModal"></button>
</div>
</div>
</el-card>
</div>
<div class="card right-card">
<el-card style="margin-top: 50px;">
<h2>手机号码</h2>
<label>安全手机可以用于登录帐号重置密码或其他安全验证</label>
<button @click="openCurrentPhoneModal"></button>
<!-- 输入当前手机号的弹出框 -->
<div v-if="isCurrentPhoneModalVisible" class="modal-overlay">
<div class="modal-content">
<h3>当前手机号</h3>
<div>旧手机号({{ user.phonenumber }})</div>
<button @click="sendVerificationCode"></button>
<button @click="closeCurrentPhoneModal"></button>
</div>
</div>
<!-- 输入验证码的弹出框 -->
<div v-if="isVerificationModalVisible" class="modal-overlay">
<div class="modal-content">
<h3>输入验证码</h3>
<input v-model="code" placeholder="验证码" />
<button @click="verCode"></button>
<button @click="closeVerificationModal"></button>
</div>
</div>
<!-- 输入新手机号的弹出框 -->
<div v-if="isNewPhoneModalVisible" class="modal-overlay">
<div class="modal-content">
<h3>输入新手机号</h3>
<input v-model="newPhone" placeholder="新手机号" @input="validatePhone" />
<p v-if="phoneError" style="color: red" class="error">{{ phoneError }}</p>
<button @click="updatePhoneNumber"></button>
<button @click="closeNewPhoneModal"></button>
</div>
</div>
</el-card>
</div>
</div>
<div>
<el-card>
<img src="/123456789.jpg" style="width: 40%; height: auto;" alt="Big Image">
</el-card>
</div>
<!-- 弹出框 -->
<div v-if="showModal" class="modal">
<div class="modal-content">
<h2>身份验证</h2>
<el-divider></el-divider>
<!-- 手机号和验证码 -->
<div v-if="!verificationSent">
<label for="phonenumber">身份验证方式:</label>
<div><h3>通过手机({{ user.phonenumber }})获取验证</h3></div>
<button @click="sendCode"></button>
</div>
<div v-if="verificationSent && !codeVerified">
<label for="code">验证码:</label>
<input v-model="code" id="code" type="text" placeholder="请输入验证码" />
<button @click="verifyCode"></button>
</div>
<div v-if="codeVerified">
<el-form ref="form" :model="user" :rules="rules" label-width="80px">
<el-form-item label="旧密码" prop="oldPassword">
<el-input v-model="user.oldPassword" placeholder="请输入旧密码" show-password type="password"/>
</el-form-item>
<el-form-item label="新密码" prop="newPassword">
<el-input v-model="user.newPassword" placeholder="请输入新密码" show-password type="password"/>
</el-form-item>
<el-form-item label="确认密码" prop="confirmPassword">
<el-input v-model="user.confirmPassword" placeholder="请确认新密码" show-password type="password"/>
</el-form-item>
</el-form>
<button @click="submit" :disabled="!user.newPassword">提交修改</button>
</div>
<button @click="closeModal" class="close-button">关闭</button>
</div>
</div>
</div>
</template>
<script>
import axios from 'axios';
import {getUserProfile,sendCode,checkCode,updatePhone} from "@/api/system/user";
import {updateUserPwd} from "@/api/system/user";
export default {
data() {
const equalToPassword = (rule, value, callback) => {
if (this.user.newPassword !== value) {
callback(new Error("两次输入的密码不一致"));
} else {
callback();
}
};
return {
isVisible: false,
currentPhone: '',
newPhone: '',
phoneError: '',
verificationCode: '',
isCurrentPhoneModalVisible: false,
isVerificationModalVisible: false,
isNewPhoneModalVisible: false,
//
rules: {
oldPassword: [
{required: true, message: "旧密码不能为空", trigger: "blur"}
],
newPassword: [
{required: true, message: "新密码不能为空", trigger: "blur"},
{min: 6, max: 20, message: "长度在 6 到 20 个字符", trigger: "blur"}
],
confirmPassword: [
{required: true, message: "确认密码不能为空", trigger: "blur"},
{required: true, validator: equalToPassword, trigger: "blur"}
]
},
user: {
oldPassword: undefined,
newPassword: undefined,
confirmPassword: undefined
},
showModal: false,
aModel: false,
phonenumber: '',
code: '',
oldPassword: '',
newPassword: '',
verificationSent: false,
codeVerified: false,
};
},
created() {
this.getUser();
},
methods: {
validatePhone() {
const phonePattern = /^[0-9]{11}$/; // 11
if (!this.newPhone) {
this.phoneError = '手机号不能为空';
} else if (!phonePattern.test(this.newPhone)) {
this.phoneError = '请输入有效的11位手机号';
} else {
this.phoneError = '';
}
},
updatePhoneNumber() {
updatePhone(this.newPhone).then(response => {
this.closeNewPhoneModal();
this.$message({
message: '修改成功',
type: 'success'
});
});
},
closeNewPhoneModal() {
this.isNewPhoneModalVisible = false;
},
closeVerificationModal() {
this.isVerificationModalVisible = false;
},
sendVerificationCode() {
try {
sendCode(this.user.phonenumber)
this.closeCurrentPhoneModal();
this.isVerificationModalVisible = true;
alert('验证码已发送');
} catch (error) {
console.error('发送验证码失败', error);
alert('发送验证码失败');
}
},
openCurrentPhoneModal() {
this.isCurrentPhoneModalVisible = true;
},
closeCurrentPhoneModal() {
this.isCurrentPhoneModalVisible = false;
},
getUser() {
getUserProfile().then(response => {
this.user = response.data.sysUser;
});
},
openModal() {
this.showModal = true;
},
closeModal() {
this.showModal = false;
this.resetForm();
},
async sendCode() {
try {
sendCode(this.user.phonenumber)
this.verificationSent = true;
alert('验证码已发送');
} catch (error) {
console.error('发送验证码失败', error);
alert('发送验证码失败');
}
},
submit() {
this.$refs["form"].validate(valid => {
if (valid) {
updateUserPwd(this.user.oldPassword, this.user.newPassword).then(response => {
this.$modal.msgSuccess("修改成功");
});
}
});
},
async verCode() {
checkCode(this.user.phonenumber, this.code).then(response => {
if (response.code === 200) {
this.closeVerificationModal();
this.isNewPhoneModalVisible = true; //
alert('验证码验证成功');
} else {
alert('验证码验证失败');
}
})
},
async verifyCode() {
checkCode(this.user.phonenumber, this.code).then(response => {
if (response.code === 200) {
this.codeVerified = true;
alert('验证码验证成功');
} else {
alert('验证码验证失败');
}
})
}
},
resetForm() {
this.phonenumber = '';
this.code = '';
this.oldPassword = '';
this.newPassword = '';
this.verificationSent = false;
this.codeVerified = false;
}
};
</script>
<style>
/* 简单样式,仅供参考 */
.modal {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: rgba(0, 0, 0, 0.5);
display: flex;
align-items: center;
justify-content: center;
}
.container {
display: flex;
justify-content: space-between;
}
.button-wrapper {
margin-left: auto; /* 将按钮移动到右侧 */
}
.modal-content {
background: #fff;
padding: 20px;
border-radius: 8px;
width: 400px;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
}
h2 {
margin-top: 0;
}
label {
display: block;
margin-top: 10px;
font-weight: bold;
}
input {
width: 100%;
padding: 10px;
margin-top: 5px;
border: 1px solid #ddd;
border-radius: 4px;
}
.card {
width: 50%;
padding: 20px;
box-sizing: border-box;
}
.modal {
/* 样式设置 */
}
.modal-content {
/* 样式设置 */
}
.left-card {
background-color: #f1f1f1;
}
.right-card {
background-color: #e1e1e1;
}
.modal-overlay {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: rgba(0, 0, 0, 0.5);
display: flex;
align-items: center;
justify-content: center;
}
.modal-content {
background: white;
padding: 20px;
border-radius: 8px;
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}
button {
margin-top: 20px;
padding: 10px 15px;
border: none;
border-radius: 4px;
background-color: #007bff;
color: #fff;
cursor: pointer;
}
button:disabled {
background-color: #6c757d;
cursor: not-allowed;
}
.close-button {
background-color: #dc3545;
}
.close-button:hover {
background-color: #c82333;
}
</style>

View File

@ -0,0 +1,110 @@
<template>
<div class="app-container">
<el-row class="center-row" :gutter="20">
<el-col :span="12" :xs="24">
<el-card style="margin-top: 50px;">
<div slot="header" class="clearfix">
<span>个人信息</span>
</div>
<div>
<div class="text-center">
<userAvatar/>
</div>
<ul class="list-group list-group-striped">
<li class="list-group-item">
<svg-icon icon-class="user"/>
用户名称
<div class="pull-right">{{ user.userName }}</div>
</li>
<li class="list-group-item">
<svg-icon icon-class="phone"/>
手机号码
<div class="pull-right">{{ user.phonenumber }}</div>
</li>
<li class="list-group-item">
<svg-icon icon-class="email"/>
用户邮箱
<div class="pull-right">{{ user.email }}</div>
</li>
<li class="list-group-item">
<svg-icon icon-class="tree"/>
所属部门
<div v-if="user.dept" class="pull-right">{{ user.dept.deptName }} / {{ postGroup }}</div>
</li>
<li class="list-group-item">
<svg-icon icon-class="peoples"/>
职位
<div class="pull-right">{{ roleGroup }}</div>
</li>
<li class="list-group-item">
<svg-icon icon-class="date"/>
创建日期
<div class="pull-right">{{ user.createTime }}</div>
</li>
</ul>
</div>
</el-card>
</el-col>
</el-row>
</div>
</template>
<script>
import {getUserProfile} from "@/api/system/user";
import userAvatar from "/src/views/system/user/profile/userAvatar";
import userInfo from "/src/views/system/user/profile/userInfo";
import resetPwd from "/src/views/system/user/profile/resetPwd";
export default {
name: "Profile",
components: {userAvatar, userInfo, resetPwd},
data() {
return {
user: {},
roleGroup: {},
postGroup: {},
activeTab: "userinfo"
};
},
created() {
this.getUser();
},
methods: {
getUser() {
getUserProfile().then(response => {
this.user = response.data.sysUser;
this.roleGroup = response.data.roleGroup;
this.postGroup = response.data.postGroup;
});
}
}
};
</script>
<style scoped>
.app-container {
padding: 20px;
display: flex;
justify-content: center;
}
.center-row {
width: 100%;
display: flex;
justify-content: center;
}
.box-card {
border: 1px solid #dcdfe6;
}
.text-center {
text-align: center;
}
.list-group-item {
display: flex;
justify-content: space-between;
align-items: center;
}
</style>

View File

@ -0,0 +1,234 @@
<template>
<div style="padding: 20px;">
<h1 style="text-align: center; margin-bottom: 30px;">消費明細</h1>
<el-divider></el-divider>
<el-form ref="queryForm" :inline="true" :model="queryParams" size="small">
<el-form-item label="创建时间">
<el-date-picker
v-model="dateRange"
end-placeholder="结束日期"
range-separator="-"
start-placeholder="开始日期"
style="width: 240px"
type="daterange"
value-format="yyyy-MM-dd"
></el-date-picker>
</el-form-item>
<el-form-item>
<el-button icon="el-icon-search" size="mini" type="primary" @click="handleQuery"></el-button>
</el-form-item>
</el-form>
<el-row>
<el-button
v-hasPermi="['system:purchaseRecord:export']"
icon="el-icon-download"
plain
size="mini"
type="warning"
@click="handleExport"
>导出
</el-button>
</el-row>
<el-table
:data="listDate"
style="width: 100%; border-collapse: collapse;">
<el-table-column
label="序号"
width="300"
style="border: 1px solid #ccc; padding: 10px; text-align: center;">
<template slot-scope="scope">
{{ scope.row.id }}
</template>
</el-table-column>
<el-table-column
label="數據名稱"
width="300"
style="border: 1px solid #ccc; padding: 10px; text-align: center;">
<template slot-scope="scope">
{{ scope.row.dataName }}
</template>
</el-table-column>
<el-table-column
label="消費金额"
width="300"
style="border: 1px solid #ccc; padding: 10px; text-align: center;">
<template slot-scope="scope">
{{ scope.row.amount }}
</template>
</el-table-column>
<el-table-column
label="消費時間"
width="300"
style="border: 1px solid #ca8a8a; padding: 10px; text-align: center;">
<template slot-scope="scope">
{{ scope.row.createTime }}
</template>
</el-table-column>
</el-table>
<pagination
v-show="total > 0"
:limit.sync="queryParams.pageSize"
:page.sync="queryParams.pageNum"
:total="total"
@pagination="getList"
/>
<el-card style="margin-top: 50px">
<div>
<!-- 装ECharts的容器 -->
<div id="main" style="width: 100%; height: 520px; background: #fff">
</div>
</div>
</el-card>
</div>
</template>
<script>
import * as echarts from 'echarts' //echarts
import { userloginfo } from "@/api/system/user";
import PanelGroup from "@/views/dashboard/PanelGroup.vue";
export default {
components: {PanelGroup},
data() {
return {
charts: "",
opinionData: [], //
b: [],
dateRange: [],
listDate: [],
total: 0,
queryParams: {
pageNum: 1,
pageSize: 10,
}
}
},
created() {
this.getList();
},
mounted() {
this.drawLine();
},
methods: {
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
},
/** 导出按钮操作 */
handleExport() {
this.download('system/user/purchaseRecord/export', {
...this.queryParams
}, `pay_${new Date().getTime()}.xlsx`)
},
getList() {
userloginfo(this.addDateRange(this.queryParams,this.dateRange)).then(response => {
this.listDate = response.data.rows;
this.total = response.data.total;
this.drawLine();
}
);},
drawLine() {
// 线
this.charts = echarts.init(document.getElementById('main'));
this.b = this.listDate.map(item => item.dataName);
this.opinionData = this.listDate.map(item => item.amount);
// 线
this.charts.setOption({
title: {
left: "3%",
top: "5%",
text: "消费趋势", //
},
tooltip: {
trigger: "axis",
},
legend: {
align: "right",
left: "3%",
top: "15%",
data: ["消费金额"], //
},
grid: {
top: "30%",
left: "5%",
right: "5%",
bottom: "5%",
containLabel: true,
},
toolbox: {
feature: {
saveAsImage: {},
},
},
// x
xAxis: {
type: "category",
boundaryGap: true,
axisTick: {
alignWithLabel: true,
},
//
data:this.b
// data: ["1", "2", "3", "4", "5", "6", "7", "8", "9", "10", "11", "12"],
},
// y
yAxis: {
type: "value",
boundaryGap: true,
splitNumber: 4,
interval: 250,
},
//
series: [
{
name: "消费金额", //
type: "line",
stack: "总量", //
data: this.opinionData, //
areaStyle: {
color: {
type: "linear",
x: 0,
y: 0,
x2: 0,
y2: 1,
colorStops: [
{
offset: 0,
color: "rgb(255,200,213)",
},
{
offset: 1,
color: "#ffffff",
},
],
global: false,
},
},
itemStyle: {
color: "rgb(255,96,64)",
lineStyle: {
color: "rgb(255,96,64)",
},
},
},
],
});
},
},
}
</script>

View File

@ -0,0 +1,128 @@
<template>
<div style="padding: 20px;">
<h1 style="text-align: center; margin-bottom: 30px;">充值明细</h1>
<el-divider></el-divider>
<el-form ref="queryForm" :inline="true" :model="queryParams" size="small">
<el-form-item label="创建时间">
<el-date-picker
v-model="dateRange"
end-placeholder="结束日期"
range-separator="-"
start-placeholder="开始日期"
style="width: 240px"
type="daterange"
value-format="yyyy-MM-dd"
></el-date-picker>
</el-form-item>
<el-form-item>
<el-button icon="el-icon-search" size="mini" type="primary" @click="handleQuery"></el-button>
</el-form-item>
</el-form>
<el-row>
<el-button
v-hasPermi="['system:pay:export']"
icon="el-icon-download"
plain
size="mini"
type="warning"
@click="handleExport"
>导出
</el-button>
</el-row>
<el-table
:data="listDate"
style="width: 100%; border-collapse: collapse;">
<el-table-column
label="序号"
width="300"
style="border: 1px solid #ccc; padding: 10px; text-align: center;">
<template slot-scope="scope">
{{ scope.row.id }}
</template>
</el-table-column>
<el-table-column
label="充值编号"
width="300"
style="border: 1px solid #ccc; padding: 10px; text-align: center;">
<template slot-scope="scope">
{{ scope.row.outTradeNo }}
</template>
</el-table-column>
<el-table-column
label="充值金额"
width="300"
style="border: 1px solid #ccc; padding: 10px; text-align: center;">
<template slot-scope="scope">
{{ scope.row.totalAmount }}
</template>
</el-table-column>
<el-table-column
label="充值类型"
width="300"
style="border: 1px solid #ccc; padding: 10px; text-align: center;">
<template slot-scope="scope">
{{ scope.row.productCode }}
</template>
</el-table-column>
<el-table-column
label="充值时间"
width="300"
style="border: 1px solid #ca8a8a; padding: 10px; text-align: center;">
<template slot-scope="scope">
{{ scope.row.createTime }}
</template>
</el-table-column>
</el-table>
<pagination
v-show="total > 0"
:limit.sync="queryParams.pageSize"
:page.sync="queryParams.pageNum"
:total="total"
@pagination="getList"
/>
</div>
</template>
<script>
import { userPayinfo } from "@/api/system/user";
import PanelGroup from "@/views/dashboard/PanelGroup.vue";
export default {
components: {PanelGroup},
data() {
return {
dateRange: [],
listDate: [],
total: 0,
queryParams: {
pageNum: 1,
pageSize: 10,
}
}
},
created() {
this.getList();
},
methods: {
/** 搜索按钮操作 */
handleQuery() {
this.queryParams.pageNum = 1;
this.getList();
},
/** 导出按钮操作 */
handleExport() {
this.download('system/user/export', {
...this.queryParams
}, `pay_${new Date().getTime()}.xlsx`)
},
getList() {
userPayinfo(this.addDateRange(this.queryParams, this.dateRange)).then(response => {
this.listDate = response.data.rows;
this.total = response.data.total;
}
);
}
}
}
</script>

View File

@ -0,0 +1,146 @@
<template>
<el-card class="box-card">
<ul class="msg-box">
<li>
<h1 style="margin-bottom: 15px;">充值说明</h1>
<h4>请输入支付宝沙箱账号</h4>
<h4>西伯利亚龙</h4>
</li>
<li>
<h4 style="margin-bottom: 15px;">支付金额</h4>
<el-radio-group v-model="amountVal" @change="amountChange">
<el-radio border :label="''+ 100">充值100</el-radio>
<el-radio border :label="''+ 500">充值500</el-radio>
<el-radio border :label="''+ 1000">充值1000</el-radio>
<el-radio border :label="''+ 2000">充值2000</el-radio>
<el-radio border :label="''+ 5000">充值5000</el-radio>
<el-radio border :label="''">自定义</el-radio>
</el-radio-group>
</li>
<li>
<h4 style="margin-bottom: 15px;">支付方式</h4>
<el-radio-group v-model="rechargeParams.paymentType" @change="paymentTypeChange">
<el-radio border :label="''+ 1">支付宝</el-radio>
<el-radio border :label="''+ 0">微信</el-radio>
</el-radio-group>
</li>
<li>
<h4 style="margin-bottom: 15px;">支付金额</h4>
<el-input :disabled="disabled" clearable v-model="rechargeParams.totalAmt" placeholder="请输入金额" style="width: 150px;"></el-input>
</li>
</ul>
<div style="text-align: center; margin-top: 30px;">
<el-button type="primary" @click="surePay"></el-button>
</div>
</el-card>
</template>
<script>
import { addUserMoney, userRecharge ,createRechargeRecord} from "@/api/system/user";
export default {
data() {
return {
amountVal: '',
addSysUser: {},
disabled: false,
//
returnUrl:'http://172.13.1.1/money/money',
//
rechargeParams: {
"totalAmt": '', //
"paymentType": "0", //[0:,1:,2:,3:]
"transType": "0" //[0:,1:]
}
}
},
methods: {
//
amountChange(val) {
this.rechargeParams.totalAmt = val;
if (val === '') {
this.disabled = false
} else {
this.disabled = true
}
},
//
paymentTypeChange(val) {
this.rechargeParams.paymentType = val
},
//
async surePay() {
if (this.rechargeParams.totalAmt === '') {
this.$message.warning('请输入金额');
return;
}
if (this.rechargeParams.paymentType === '0') {
} else if (this.rechargeParams.paymentType === '1') {
let praem = {
// 便
outTradeNo: this.getProjectNum() + Math.floor(Math.random() * 10000),
//
totalAmount: this.rechargeParams.totalAmt,
//
returnUrl: this.returnUrl,
//
subject: '支付金额',
//
productCode: 'FAST_INSTANT_TRADE_PAY'
}
userRecharge(praem).then(code => {
if (code.code === 200) {
//
this.$message.success('支付宝支付跳转')
const payDiv = document.getElementById('payDiv');
if (payDiv) {
document.body.removeChild(payDiv);
}
const div = document.createElement('div');
div.id = 'payDiv';
div.innerHTML = code.data;
document.body.appendChild(div);
document.getElementById('payDiv').getElementsByTagName('form')[0].submit();
}
})
this.addSysUser.userBalance = this.rechargeParams.totalAmt;
let userId = localStorage.getItem('userId');
this.addSysUser.userId = userId;
addUserMoney(this.addSysUser).then(res => {
createRechargeRecord(praem);
}).catch(error => {
console.error('Error updating user balance:', error);
});
}
},
//
getProjectNum() {
const projectTime = new Date() //
const Year = projectTime.getFullYear() // IE.
const Month = projectTime.getMonth() + 1 //
const Day = projectTime.getDate() //
var CurrentDate = Year
if (Month >= 10) { // 1010
CurrentDate += Month
} else {
CurrentDate += '0' + Month
}
if (Day >= 10) {
CurrentDate += Day
} else {
CurrentDate += '0' + Day
}
return CurrentDate
}
}
}
</script>
<style scoped>
/* 信息列表样式 */
.msg-box > li {
list-style: none;
border-bottom: 1px solid #c5c5c5;
padding: 20px 10px;
}
</style>

View File

@ -1,50 +1,288 @@
<template> <template>
<div> <div>
<el-table <el-card style="margin-top: 50px;">
:data="listDate" <h1>用户余额</h1>
style="width: 100%"> <p>余额{{ userBalanceData.userBalance || '加载中...' }}</p>
<el-table-column <el-button type="primary" @click="navigateToRecharge"></el-button>
label="用户余额" <el-dialog
width="180"> title="实名认证"
<template slot-scope="scope"> :visible.sync="dialogVisible"
<span style="margin-left: 10px">{{ scope.row.paymentAmount }}</span> width="30%"
</template> @close="handleDialogClose"
</el-table-column> >
</el-table> <el-form :model="authForm" :rules="rules" ref="authFormRef">
<el-form-item label="姓名" :label-width="formLabelWidth">
<el-input v-model="authForm.name"></el-input>
</el-form-item>
<el-form-item label="身份证号" :label-width="formLabelWidth">
<el-input v-model="authForm.idCard"></el-input>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="handleCancel"></el-button>
<el-button type="primary" @click="handleConfirm"></el-button>
</div>
</el-dialog>
</el-card>
<el-card style="margin-top: 50px">
<!-- Form -->
<h1>余额预警</h1>
<el-button type="text" @click="dialogFormVisible = true">开启</el-button>
<el-dialog title="添加预警号码" :visible.sync="dialogFormVisible">
<el-divider style="border-color: #00afff;">
<el-tag content-position="right" type="warning">
账户可用余额小于该值时,每天短信通知一次(最多连续提醒5天)
</el-tag>
</el-divider>
<el-form :model="form">
<el-form-item label="预警阈值:" :label-width="formLabelWidth">
<el-input v-model="form.userBalance" autocomplete="off"></el-input>
</el-form-item>
<el-form-item label="预警号码:" :label-width="formLabelWidth">
<el-input v-model="form.phonenumber" autocomplete="off"></el-input>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="dialogFormVisible = false"> </el-button>
<el-button type="primary" @click="dialogFormVisible = false"> </el-button>
</div>
</el-dialog>
</el-card>
<el-card style="margin-top: 50px">
<div>
<!-- 装ECharts的容器 -->
<div id="main" style="width: 100%; height: 520px; background: #fff">
</div>
</div>
</el-card>
</div> </div>
</template> </template>
<script> <script>
import { userBalance } from "@/api/system/user"; // API import {userBalance,months} from "@/api/system/user"; //
import { getToken } from "@/utils/auth"; // Token import * as echarts from 'echarts' //echarts
import {checkRealNameAuth} from "@/api/system/user";
import item from "@/layout/components/Sidebar/Item.vue";
export default { export default {
data() { data() {
return { return {
listDate: [], charts: "",
userId: null dialogVisible: false,
listDate:[],
a:[],
b:[],
dialogFormVisible: false,
formLabelWidth: '120px',
opinionData: [],
userBalanceData: {
userBalance: '加载中...'
},
authForm: {
name: '',
idCard: ''
},
rules: {
name: [
{required: true, message: '请输入姓名', trigger: 'blur'},
{min: 2, max: 10, message: '姓名长度在 2 到 10 个字符', trigger: 'blur'}
],
idCard: [
{required: true, message: '请输入身份证号', trigger: 'blur'},
{pattern: /^\d{17}[\dXx]$/, message: '身份证号格式不正确', trigger: 'blur'}
],
},
form: {}
}; };
}, },
created() { created() {
this.userId = getToken(); // Token ID this.fetchUserBalance();
if (this.userId) { this.getList()
this.fetchUserBalance(this.userId); // },
} mounted() {
this.drawLine();
}, },
methods: { methods: {
async fetchUserBalance(userId) { getList(){
months().then(response => {
const responseDate = response;
responseDate.forEach(item => {
console.log('月',item.month, '总金额:', item.totalAmount)
});
this.listDate = responseDate;
this.drawLine();
this.$nextTick( () => {
console.log(JSON.stringify(this.listDate))
});
});
},
handleCancel() {
this.dialogVisible = false;
},
handleDialogClose() {
this.authForm.name = '';
this.authForm.idCard = '';
},
async navigateToRecharge() {
try { try {
const response = await userBalance(userId); const response = await checkRealNameAuth(this.authForm);
this.listDate = [{ paymentAmount: response.data.userBalance }]; if (response.data && response.data.desc) {
//
this.$router.push('/money/zfb');
} else {
//
this.dialogVisible = true;
}
} catch (error) { } catch (error) {
this.$message.error('实名认证检查失败,请稍后再试');
console.error('实名认证检查失败:', error);
}
},
async handleConfirm() {
this.$refs.authFormRef.validate(async (valid) => {
if (valid) {
try {
const {name, idCard} = this.authForm;
const authResponse = await checkRealNameAuth(this.authForm);
if (authResponse.data && authResponse.data.desc) {
this.$message.success('实名认证成功');
this.dialogVisible = false;
this.$router.push('/money/zfb');
} else {
this.$message.error('实名认证失败,请检查您的信息');
}
} catch (error) {
this.$message.error('实名认证验证失败,请稍后再试');
console.error('实名认证验证失败:', error);
}
} else {
console.log('error submit!!');
return false;
}
});
},
async fetchUserBalance() {
try {
const userId = localStorage.getItem('userId');
console.log(userId)// userIdlocalStorage
if (!userId) {
this.userBalanceData = {userBalance: '未登录'};
return;
}
const response = await userBalance(userId);
if (response.data) {
console.log(response.data)
this.userBalanceData.userBalance = response.data;
} else {
this.userBalanceData.userBalance = {userBalance: '获取失败'};
}
} catch (error) {
this.userBalanceData = {userBalance: '获取失败'};
console.error('Error fetching user balance:', error); console.error('Error fetching user balance:', error);
} }
}, },
drawLine() {
// 线
this.charts = echarts.init(document.getElementById('main'));
}
this.a = this.listDate.map(item => item.month)
this.b = this.listDate.map(item => item.totalAmount)
// 线
this.charts.setOption({
title: {
left: "3%",
top: "5%",
text: "近12月消费趋势", //
},
tooltip: {
trigger: "axis",
},
legend: {
align: "right",
left: "3%",
top: "15%",
data: ["消费金额"], //
},
grid: {
top: "30%",
left: "5%",
right: "5%",
bottom: "5%",
containLabel: true,
},
toolbox: {
feature: {
saveAsImage: {},
},
},
// x
xAxis: {
type: "category",
boundaryGap: true,
axisTick: {
alignWithLabel: true,
},
//
data: this.a,
},
// y
yAxis: {
type: "value",
boundaryGap: true,
splitNumber: 4,
interval: 250,
},
//
series: [
{
name: "消费金额", //
type: "line",
stack: "总量", //
data: this.b,
areaStyle: {
color: {
type: "linear",
x: 0,
y: 0,
x2: 0,
y2: 1,
colorStops: [
{
offset: 0,
color: "rgb(255,200,213)",
},
{
offset: 1,
color: "#ffffff",
},
],
global: false,
},
},
itemStyle: {
color: "rgb(255,96,64)",
lineStyle: {
color: "rgb(255,96,64)",
},
},
},
],
});
},
},
}; };
</script> </script>
<style scoped>
/* 添加样式 */
</style>

View File

@ -0,0 +1,156 @@
<template>
<div>
<el-form :model="form" label-width="80px">
<el-form-item>
<input v-model="form.userName" style="padding: 10px 10px;float: initial;" placeholder=>
<input v-model="form.connectorName" style="padding: 10px 10px;float: initial;margin-left: 20px" placeholder=>
<el-button @click="findConnectorUserList()" style="padding: 10px 20px;margin-left: 40px">查询</el-button>
</el-form-item>
</el-form>
<p style="font-weight: bold;font-size: 20px">余额{{ userBalanceData.userBalance || '加载中...' }}</p>
<el-table
:data="tableData"
style="width: 100%">
<el-table-column
label="编号"
width="180">
<template slot-scope="scope">
<span style="margin-left: 10px">{{ scope.row.connectorUserId }}</span>
</template>
</el-table-column>
<el-table-column
label="用户"
width="180">
<template slot-scope="scope">
<span style="margin-left: 10px">{{ scope.row.userName }}</span>
</template>
</el-table-column>
<el-table-column
label="接口"
width="180">
<template slot-scope="scope">
<span style="margin-left: 10px">{{ scope.row.connectorName }}</span>
</template>
</el-table-column>
<el-table-column
label="剩余次数"
width="180">
<template slot-scope="scope">
<span style="margin-left: 10px">{{ scope.row.connectorResidueDegree }}</span>
</template>
</el-table-column>
<el-table-column
label="购买次数"
width="180">
<template slot-scope="scope">
<span style="margin-left: 10px">{{ scope.row.connectorFrequency }}</span>
</template>
</el-table-column>
<el-table-column
label="测试次数"
width="180">
<template slot-scope="scope">
<span style="margin-left: 10px">{{ scope.row.textNumber }}</span>
</template>
</el-table-column>
<!-- <el-table-column label="操作">-->
<!-- <template slot-scope="scope">-->
<!-- <el-button-->
<!-- size="mini"-->
<!-- @click="handleEdit(scope.$index, scope.row)">编辑</el-button>-->
<!-- <el-button-->
<!-- size="mini"-->
<!-- type="danger"-->
<!-- @click="handleDelete(scope.$index, scope.row)">删除</el-button>-->
<!-- </template>-->
<!-- </el-table-column>-->
</el-table>
</div>
</template>
<script>
//jsjsjson,
//import from ',
import {findConnectorUserList} from "@/api/port/port";
import {userBalance} from "@/api/system/user";
export default {
//import使"
components: {},
props: {},
data() {
//"
return {
userBalanceData: {
userBalance: '加载中...'
},
tableData:[],
form:{},
};
},
// data",
computed: {},
//data",
watch: {},
//",
methods: {
findConnectorUserList(){
findConnectorUserList(this.form).then((res)=>{
console.log(res.data);
this.tableData=res.data;
})
},
async fetchUserBalance() {
try {
const userId = localStorage.getItem('userId');
console.log(userId)// userIdlocalStorage
if (!userId) {
this.userBalanceData = {userBalance: '未登录'};
return;
}
const response = await userBalance(userId);
if (response.data) {
console.log(response.data)
this.userBalanceData.userBalance = response.data;
} else {
this.userBalanceData.userBalance = {userBalance: '获取失败'};
}
} catch (error) {
this.userBalanceData = {userBalance: '获取失败'};
console.error('Error fetching user balance:', error);
}
},
},
// - 访this",
created() {
this.fetchUserBalance();
this.findConnectorUserList();
},
// - 访DOM",
mounted() {
},
beforeCreate() {
}, // - ",
beforeMount() {
}, // - ",
beforeUpdate() {
}, // - ",
updated() {
}, // - ",
beforeDestroy() {
}, // - ",
destroyed() {
}, // - ",
activated() {
} //keep-alive",
};
</script>
<style scoped>
</style>

View File

@ -0,0 +1,597 @@
<template>
<div>
<el-container style="height: 1000px; border: 1px solid #eee">
<el-aside width="180px">
<el-menu :default-openeds="['1', '3']">
<el-menu-item-group>
<span style="font-weight: bold;font-size: 25px;">全部类型</span>
</el-menu-item-group>
<el-menu-item-group >
<el-link type="primary" style="font-weight: bold;font-size: 20px;" v-for="(connectSort, index) in connectSort"
:key="index"
@click="findApiList(connectSort.connectorSort)">
{{ connectSort.connectorSort }}
</el-link>
</el-menu-item-group>
</el-menu>
</el-aside>
<el-container>
<el-main>
<el-form label-width="40px" :model="form">
<el-form-item>
<input v-model="form.connectorName" style="padding: 10px 10px;float: initial;" placeholder=>
<el-button @click="findApiList()" style="padding: 10px 20px;margin-left: 40px">查询</el-button>
</el-form-item>
</el-form>
<el-row :gutter="50">
<el-col :span="7" v-for="connector in connectorList" :key="connector.connectorId" v-if="connectorList.length !== 0">
<el-card class="box-card" style="margin-top: 15px;width: 400px; height: 600px;" shadow="hover">
<div slot="header" class="clearfix">
<span style="font-weight: bold;font-size: 30px">{{connector.connectorName}}</span>
<el-button type="primary" style="float: right; padding: 10px 10px" @click="buy(connector)"></el-button>
</div>
<span style="font-weight: bold;font-size: 20px">产品图片:</span><br>
<el-image style="width: 300px; height: 300px" :src="connector.connectorPicture" :fit="fit"></el-image><br>
<span style="font-weight: bold;font-size: 20px">产品介绍</span>
{{connector.connectorDescribe}}<br>
<span style="font-weight: bold;font-size: 20px">价格</span>
{{connector.connectorPrice}}/<br>
<!-- <el-button type="primary" style="float: right; padding: 10px 10px" @click="testPhone()" v-if="connector.connectorName=='手机号查询归属地'">API</el-button>-->
<!-- <el-button type="primary" style="float: right; padding: 10px 10px" @click="testIP()" v-if="connector.connectorName=='IP查询归属地'">API</el-button>-->
<!-- <el-button type="primary" style="float: right; padding: 10px 10px" @click="testNews()" v-if="connector.connectorName=='新闻头条'">API</el-button>-->
<!-- <el-button type="primary" style="float: right; padding: 10px 10px" @click="testWeather()" v-if="connector.connectorName=='气象预警'">API</el-button>-->
<!-- <el-button type="primary" style="float: right; padding: 10px 10px" @click="testBirthdate()" v-if="connector.connectorName=='生辰助手'">API</el-button>-->
<!-- <el-button type="primary" style="float: right; padding: 10px 10px" @click="testMailbox()" v-if="connector.connectorName=='邮编查询'">API</el-button>-->
<!-- <el-button type="primary" style="float: right; padding: 10px 10px" @click="testWeatherForecast()" v-if="connector.connectorName=='天气预报'">API</el-button>-->
<el-button type="primary" style="float: right; padding: 10px 10px" @click="navigateToDocumentation(connector.connectorId)"></el-button>
<!-- <el-button-->
<!-- type="primary"-->
<!-- style="float: right; padding: 10px 10px"-->
<!-- @click="navigateToDocumentation(connector)"-->
<!-- >-->
<!-- 接口文档-->
<!-- </el-button>-->
</el-card>
</el-col>
</el-row>
<!-- 手机号查询归属地-->
<el-dialog title="手机查询归属地" :visible.sync="dialogFormVisible">
<el-form :model="formInline">
<el-form-item label="手机号" :label-width="formLabelWidth">
<el-input v-model="formInline.tel" autocomplete="off" placeholder="请输入手机号"></el-input>
</el-form-item>
<span style="font-weight: bold;font-size: 20px" v-if="formInline.reason==true">
省份{{this.formInline.province}}<br>
城市{{this.formInline.city}}<br>
区号{{this.formInline.areacode}}<br>
邮编{{this.formInline.zip}}<br>
运营商{{this.formInline.company}}<br>
</span>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="phonePlace()"></el-button>
</div>
</el-dialog>
<!--IP查询归属地-->
<el-dialog title="IP查询归属地" :visible.sync="dialogFormVisible1">
<el-form :model="formIp">
<el-form-item label="IP" >
<el-input v-model="formIp.ip" autocomplete="off" placeholder="请输入ip"></el-input>
</el-form-item>
<span style="font-weight: bold;font-size: 20px" v-if="formIp.reason==true">
国家{{this.formIp.country}}<br>
省份{{this.formIp.province}}<br>
城市{{this.formIp.city}}<br>
运营商{{this.formIp.isp}}<br>
</span>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="getIpPlace()"></el-button>
</div>
</el-dialog>
<!-- 新闻头条-->
<el-dialog title="新闻头条" :visible.sync="dialogTableVisible">
<el-table :data="gridData">
<el-table-column property="title" label="新闻标题" width="150"></el-table-column>
<el-table-column property="date" label="新闻时间" width="200"></el-table-column>
<el-table-column property="category" label="新闻分类"></el-table-column>
<el-table-column property="authorName" label="新闻来源"></el-table-column>
</el-table>
</el-dialog>
<!--生辰助手-->
<el-dialog title="生辰助手" :visible.sync="dialogFormVisible2">
<el-form :model="formBirthday">
<el-form-item label="年" >
<el-input v-model="formBirthday.year" autocomplete="off" placeholder="请输入年份"></el-input>
</el-form-item>
<el-form-item label="月" >
<el-input v-model="formBirthday.month" autocomplete="off" placeholder="请输入月份"></el-input>
</el-form-item>
<el-form-item label="日" >
<el-input v-model="formBirthday.day" autocomplete="off" placeholder="请输入几号"></el-input>
</el-form-item>
<el-form-item label="时" >
<el-input v-model="formBirthday.hour" autocomplete="off" placeholder="请输入几点"></el-input>
</el-form-item>
<span style="font-weight: bold;font-size: 20px" v-if="formBirthday.reason==true">
years {{this.formBirthday.years}}<br>
months {{this.formBirthday.months}}<br>
days {{this.formBirthday.days}}<br>
animal {{this.formBirthday.animal}}<br>
imonthcn {{this.formBirthday.imonthcn}}<br>
idaycn {{this.formBirthday.idaycn}}<br>
cyear {{this.formBirthday.cyear}}<br>
cmonth {{this.formBirthday.cmonth}}<br>
cday {{this.formBirthday.cday}}<br>
gzyear {{this.formBirthday.gzyear}}<br>
gzmonth {{this.formBirthday.gzmonth}}<br>
gzday {{this.formBirthday.gzday}}<br>
isleap {{this.formBirthday.isleap}}<br>
ncweek {{this.formBirthday.ncweek}}<br>
isterm {{this.formBirthday.isterm}}<br>
term {{this.formBirthday.term}}<br>
astro {{this.formBirthday.astro}}<br>
eightall {{this.formBirthday.eightall}}<br>
fiveall {{this.formBirthday.fiveall}}
</span>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="getBirthday()"></el-button>
</div>
</el-dialog>
<!--邮编查询-->
<el-dialog title="邮编查询" :visible.sync="dialogFormVisible3">
<el-form :model="formPostCode">
<el-form-item label="邮编" >
<el-input v-model="formPostCode.code" autocomplete="off" placeholder="请输入邮编"></el-input>
</el-form-item>
<el-table :data="gridData2" v-if="formPostCode.reason==true">
<el-table-column property="postNumber" label="邮编" width="150"></el-table-column>
<el-table-column property="province" label="省" width="200"></el-table-column>
<el-table-column property="city" label="市"></el-table-column>
<el-table-column property="district" label="区"></el-table-column>
<el-table-column property="address" label="县"></el-table-column>
</el-table>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="getPostcode()"></el-button>
</div>
</el-dialog>
<!-- 气象预警-->
<el-dialog title="气象预警" :visible.sync="dialogFormVisible4">
<el-aside width="100%">
<el-tree :data="data" :props="defaultProps">
<template slot-scope="{data,node}">
<span>{{data.provinceName}}{{data.cityName}}--{{data.cityCode}}</span>
</template>
</el-tree>
</el-aside>
</el-dialog>
<!--天气预报-->
<el-dialog title="天气预报" :visible.sync="dialogFormVisible6">
<el-form :model="formWeatherForecast">
<el-form-item label="城市名" >
<el-input v-model="formWeatherForecast.cityName" autocomplete="off" placeholder="请输入城市名"></el-input>
</el-form-item>
<span style="font-weight: bold;font-size: 20px" v-if="formWeatherForecast.reason==true">
城市{{this.formWeatherForecast.city}}<br>
天气{{this.formWeatherForecast.info}}<br>
温度{{this.formWeatherForecast.temperature}}<br>
湿度{{this.formWeatherForecast.humidity}}<br>
风向{{this.formWeatherForecast.direct}}<br>
风力{{this.formWeatherForecast.power}}<br>
空气质量{{this.formWeatherForecast.aqi}}<br>
</span>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="getWeatherForecast(cityName)"></el-button>
</div>
</el-dialog>
<!-- 购买-->
<el-dialog title="购买API" :visible.sync="dialogFormVisible5">
<el-form :model="buyForm">
<el-form-item label="产品编号" :label-width="formLabelWidth">
<el-input v-model="buyForm.connectorId" disabled autocomplete="off" readonly></el-input>
</el-form-item>
<el-form-item label="产品名称" :label-width="formLabelWidth">
<el-input v-model="buyForm.connectorName" disabled autocomplete="off" readonly></el-input>
</el-form-item>
<el-form-item label="产品介绍" :label-width="formLabelWidth">
<el-input v-model="buyForm.connectorDescribe" disabled autocomplete="off" readonly></el-input>
</el-form-item>
<el-form-item label="产品价格" :label-width="formLabelWidth">
<el-input v-model="buyForm.connectorPrice" disabled autocomplete="off" readonly></el-input>
</el-form-item>
<el-form-item label="产品公司" :label-width="formLabelWidth">
<el-input v-model="buyForm.connectorCompany" disabled autocomplete="off" readonly></el-input>
</el-form-item>
<el-form-item label="API_URL" :label-width="formLabelWidth">
<el-input v-model="buyForm.connectorApiurl" disabled autocomplete="off" readonly></el-input>
</el-form-item>
<el-form-item label="API_EYE" :label-width="formLabelWidth">
<el-input v-model="buyForm.connectorApikey" disabled autocomplete="off" readonly></el-input>
</el-form-item>
<el-form-item label="请求方式" :label-width="formLabelWidth">
<el-input v-model="buyForm.connectorRequest" disabled autocomplete="off" readonly></el-input>
</el-form-item>
<el-form-item label="购买次数" :label-width="formLabelWidth">
<el-input-number v-model="buyForm.connectorFrequency" controls-position="right" @change="handleChange" :min="1"></el-input-number>
</el-form-item>
<p style="font-weight: bold;font-size: 20px">余额{{ userBalanceData.userBalance || '加载中...' }}</p>
<span style="font-weight: bold;font-size: 20px">共计{{buyForm.connectorPrice*buyForm.connectorFrequency}}</span>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="buyInterface()"> </el-button>
</div>
</el-dialog>
</el-main>
</el-container>
</el-container>
<!-- <el-button type="primary">+申请新数据</el-button>-->
</div>
</template>
<script>
//jsjsjson,
//import from ',
import {findApiList} from "@/api/port/port";
import index from "vuex";
import {phonePlace} from "@/api/port/port";
import {getIpPlace} from "@/api/port/port";
import {getHeadlines} from "@/api/port/port";
import {getBirthday} from "@/api/port/port";
import {getPostcode} from "@/api/port/port";
import {getWeather} from "@/api/port/port";
import {doBuyInterface} from "@/api/port/port";
import {userBalance} from "@/api/system/user";
import {findConnectSort} from "@/api/port/port";
import {getWeatherForecast} from "@/api/port/port";
export default {
//import使"
components: {},
props: {},
data() {
//"
return {
userBalanceData: {
userBalance: '加载中...'
},
formWeatherForecast:{
cityName:"",
city:"",
info:"",
temperature:"",
humidity:"",
direct:"",
power:"",
aqi:"",
reason:"",
},
formWeather:{},
data:[],
defaultProps: {
children:"citys",
label:'provinceName',
},
connectSort:[],
connectorList:[],
gridData:[],
gridData2:[],
form:{
connectorSort:"",
},
//
formPostCode:{
code:"",
// postNumber:"",
// province:"",
// city:"",
// district:"",
// address:"",
reason:"",
},
// formInline
formInline:{
tel:"",
province:"",
city:"",
areacode:"",
zip:"",
company:"",
reason:"",
},
formIp:{
ip:"",
country:"",
province:"",
city:"",
isp:"",
reason:"",
},
formBirthday:{
year:"",
month:"",
day:"",
hour:"",
years:"",
months:"",
days:"",
animal:"",
imonthcn:"",
idaycn:"",
cyear:"",
cmonth:"",
cday:"",
gzyear:"",
gzmonth:"",
gzday:"",
isleap:"",
ncweek:"",
isterm:"",
term:"",
astro:"",
eightall:"",
fiveall:"",
reason:"",
},
formNews:{
news:"",
reason:"",
},
buyForm:{},
// IP
dialogFormVisible:false,
dialogFormVisible1:false,
dialogFormVisible2:false,
dialogFormVisible3:false,
dialogFormVisible4:false,
dialogFormVisible5:false,
dialogFormVisible6:false,
dialogTableVisible:false,
};
},
// data",
computed: {
index() {
return index
},
node() {
return node
}
},
//data",
watch: {},
//",
methods: {
navigateToDocumentation(id) {
this.$router.push({
path: `/port/sys`,
query: { id }
});
},
async fetchUserBalance() {
try {
const userId = localStorage.getItem('userId');
console.log(userId)// userIdlocalStorage
if (!userId) {
this.userBalanceData = {userBalance: '未登录'};
return;
}
const response = await userBalance(userId);
if (response.data) {
console.log(response.data)
this.userBalanceData.userBalance = response.data;
} else {
this.userBalanceData.userBalance = {userBalance: '获取失败'};
}
} catch (error) {
this.userBalanceData = {userBalance: '获取失败'};
console.error('Error fetching user balance:', error);
}
},
buyInterface(){
this.$prompt('请输入支付密码', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
inputPattern: /\d{6}?/,
inputErrorMessage: '密码格式不正确'
}).then(({ value }) => {
this.$message({
type: 'success',
message: '你的密码是: ' + value
});
doBuyInterface(this.buyForm).then((res)=>{
console.log(res);
alert(res.msg);
this.dialogFormVisible5=false;
})
}).catch(() => {
this.$message({
type: 'info',
message: '取消输入'
});
});
},
//
buy(connector){
this.buyForm=connector;
this.dialogFormVisible5=true;
},
//
testWeather(){
getWeather().then((res)=>{
this.data=res.data;
this.dialogFormVisible4=true;
})
},
//
getPostcode(){
getPostcode(this.formPostCode.code).then((res)=>{
console.log(res.data);
this.gridData2=res.data;
this.formPostCode.reason=true;
})
},
//
getWeatherForecast(){
getWeatherForecast(this.formWeatherForecast.cityName).then((res)=>{
console.log(res.data);
this.formWeatherForecast.city=res.data.city;
this.formWeatherForecast.info=res.data.info;
this.formWeatherForecast.temperature=res.data.temperature;
this.formWeatherForecast.humidity=res.data.humidity;
this.formWeatherForecast.direct=res.data.direct;
this.formWeatherForecast.power=res.data.power;
this.formWeatherForecast.aqi=res.data.aqi;
this.formWeatherForecast.reason=true;
})
},
//
testWeatherForecast(){
this.dialogFormVisible6=true;
},
testMailbox(){
this.dialogFormVisible3=true;
},
getBirthday(){
getBirthday(this.formBirthday).then((res)=>{
console.log(res.data);
this.formBirthday.reason=true;
this.formBirthday.years=res.data.years;
this.formBirthday.months=res.data.months;
this.formBirthday.days=res.data.days;
this.formBirthday.animal=res.data.animal;
this.formBirthday.imonthcn=res.data.imonthcn;
this.formBirthday.idaycn=res.data.idaycn;
this.formBirthday.cyear=res.data.cyear;
this.formBirthday.cmonth=res.data.cmonth;
this.formBirthday.cday=res.data.cday;
this.formBirthday.gzyear=res.data.gzyear;
this.formBirthday.gzmonth=res.data.gzmonth;
this.formBirthday.gzday=res.data.gzday;
this.formBirthday.isleap=res.data.isleap;
this.formBirthday.ncweek=res.data.ncweek;
this.formBirthday.isterm=res.data.isterm;
this.formBirthday.term=res.data.term;
this.formBirthday.astro=res.data.astro;
this.formBirthday.eightall=res.data.eightall;
this.formBirthday.fiveall=res.data.fiveall;
})
},
testBirthdate(){
this.dialogFormVisible2=true;
},
testNews(){
getHeadlines().then((res)=>{
this.gridData=res.data;
this.dialogTableVisible=true;
})
},
getIpPlace(){
getIpPlace(this.formIp.ip).then((res)=>{
console.log(res.data);
if (200==res.code){
this.formIp.country=res.data.country;
this.formIp.province=res.data.province;
this.formIp.city=res.data.city;
this.formIp.isp=res.data.isp;
this.formIp.reason=true;
}
})
},
testIP(){
this.dialogFormVisible1=true;
},
testPhone(){
this.dialogFormVisible=true;
},
phonePlace(){
phonePlace(this.formInline.tel).then((res)=>{
console.log(res.data);
if (200==res.code){
this.formInline.province=res.data.province;
this.formInline.city=res.data.city;
this.formInline.areacode=res.data.areacode;
this.formInline.zip=res.data.zip;
this.formInline.company=res.data.company;
this.formInline.reason=true;
}
})
},
findApiList(connectorSort){
this.form.connectorSort=connectorSort;
findApiList(this.form).then((res)=>{
this.connectorList=res.data;
console.log(res.data);
})
},
findConnectSort(){
findConnectSort().then((res)=>{
this.connectSort=res.data;
console.log(this.connectSort);
})
}
},
// - 访this",
created() {
this.fetchUserBalance();
this.findApiList();
this.findConnectSort()
},
// - 访DOM",
mounted() {
},
beforeCreate() {
}, // - ",
beforeMount() {
}, // - ",
beforeUpdate() {
}, // - ",
updated() {
}, // - ",
beforeDestroy() {
}, // - ",
destroyed() {
}, // - ",
activated() {
} //keep-alive",
};
</script>
<style scoped>
</style>

View File

@ -1,48 +1,291 @@
<template> <template>
<div> <div>
<el-card class="box-card"> <el-button icon="el-icon-plus" type="primary" size="mini" @click="dialogFormVisible=true"></el-button>
<div slot="header" class="clearfix"> <el-table
<span>手机号查询归属地</span> :data="tableData"
<el-button style="float: right; padding: 3px 0" type="text">购买</el-button> style="width: 100%">
<el-table-column
label="id"
width="100">
<template slot-scope="scope">
<span style="margin-left: 10px">{{ scope.row.connectorId }}</span>
</template>
</el-table-column>
<el-table-column
label="接口名称"
width="150">
<template slot-scope="scope">
<span style="margin-left: 10px">{{ scope.row.connectorName }}</span>
</template>
</el-table-column>
<el-table-column
label="接口分类"
width="180">
<template slot-scope="scope">
<span style="margin-left: 10px">{{ scope.row.connectorSort }}</span>
</template>
</el-table-column>
<el-table-column
label="接口描述"
width="180">
<template slot-scope="scope">
<span style="margin-left: 10px">{{ scope.row.connectorDescribe }}</span>
</template>
</el-table-column>
<el-table-column
label="接口图片"
width="180">
<template slot-scope="scope">
<!-- <image-preview :src="scope.row.connectorPicture" width="50" height="50"/>-->
<el-image style="width: 100px; height: 100px" :src="scope.row.connectorPicture"></el-image>
</template>
</el-table-column>
<el-table-column
label="公司"
width="150">
<template slot-scope="scope">
<span style="margin-left: 10px">{{ scope.row.connectorCompany }}</span>
</template>
</el-table-column>
<el-table-column
label="更新时间"
width="180">
<template slot-scope="scope">
<span style="margin-left: 10px">{{ scope.row.connectorTime }}</span>
</template>
</el-table-column>
<el-table-column
label="状态"
width="150">
<template slot-scope="scope">
<span style="margin-left: 10px" v-if="scope.row.connectorStatus==0"></span>
<span style="margin-left: 10px" v-if="scope.row.connectorStatus==1"></span>
<span style="margin-left: 10px" v-if="scope.row.connectorStatus==2"></span>
</template>
</el-table-column>
<el-table-column label="操作">
<template slot-scope="scope">
<el-button
icon="el-icon-pear"
size="mini"
@click="handleEdit(scope.row)">编辑</el-button>
<el-button
icon="el-icon-delete"
size="mini"
type="danger"
@click="handleDelete(scope.row)">删除</el-button>
</template>
</el-table-column>
</el-table>
<!-- 新增接口-->
<el-dialog title="新增接口" :visible.sync="dialogFormVisible">
<el-form ref="form" :model="form">
<el-form-item label="接口名称" :label-width="formLabelWidth">
<el-input v-model="form.connectorName" autocomplete="off"></el-input>
</el-form-item>
<el-form-item label="接口分类">
<el-select v-model="form.connectorSort" placeholder="请选择活动区域">
<el-option label="生活服务" value="生活服务">生活服务</el-option>
<el-option label="金融科技" value="金融科技">金融科技</el-option>
<el-option label="数据智能" value="数据智能">数据智能</el-option>
<el-option label="企业工商" value="企业工商">企业工商</el-option>
<el-option label="交通地理" value="交通地理">交通地理</el-option>
<el-option label="应用开发" value="应用开发">应用开发</el-option>
<el-option label="电子商务" value="电子商务">电子商务</el-option>
<el-option label="充值缴费" value="充值缴费">充值缴费</el-option>
</el-select>
</el-form-item>
<el-form-item label="接口描述" :label-width="formLabelWidth">
<el-input v-model="form.connectorDescribe" autocomplete="off"></el-input>
</el-form-item>
<el-form-item label="接口图片" :label-width="formLabelWidth">
<image-upload v-model="form.connectorPicture" autocomplete="off"/>
</el-form-item>
<!-- <el-form-item label="接口图片" :label-width="formLabelWidth">-->
<!-- <el-upload-->
<!-- action="https://jsonplaceholder.typicode.com/posts/"-->
<!-- list-type="picture-card"-->
<!-- :on-preview="handlePictureCardPreview"-->
<!-- :on-remove="handleRemove">-->
<!-- <i class="el-icon-plus"></i>-->
<!-- </el-upload>-->
<!-- </el-form-item>-->
<el-form-item label="公司" :label-width="formLabelWidth">
<el-input v-model="form.connectorCompany" autocomplete="off"></el-input>
</el-form-item>
<el-form-item label="价格" :label-width="formLabelWidth">
<el-input v-model="form.connectorPrice" autocomplete="off"></el-input>
</el-form-item>
<el-form-item label="API_URL" :label-width="formLabelWidth">
<el-input v-model="form.connectorApiurl" autocomplete="off"></el-input>
</el-form-item>
<el-form-item label="API_EYE" :label-width="formLabelWidth">
<el-input v-model="form.connectorApikey" autocomplete="off"></el-input>
</el-form-item>
<el-form-item label="请求方式" :label-width="formLabelWidth">
<el-input v-model="form.connectorRequest" autocomplete="off"></el-input>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="addConnector"> </el-button>
</div> </div>
<span>{{'列表内容 ' }}</span> </el-dialog>
<span>{{'列表内容 ' }}</span>
<span>{{'列表内容 ' }}</span> <!-- 编辑接口-->
<span>{{'列表内容 ' }}</span> <el-dialog title="编辑接口" :visible.sync="dialogFormVisible1">
</el-card> <el-form :model="formInline">
<el-card class="box-card"> <el-form-item label="id" :label-width="formLabelWidth">
<div slot="header" class="clearfix"> <el-input v-model="formInline.connectorId" autocomplete="off" readonly></el-input>
<span>IP查询归属地</span> </el-form-item>
<el-button style="float: right; padding: 3px 0" type="text">购买</el-button>
<el-form-item label="接口名称" :label-width="formLabelWidth">
<el-input v-model="formInline.connectorName" autocomplete="off"></el-input>
</el-form-item>
<el-form-item label="接口分类" :label-width="formLabelWidth">
<el-input v-model="formInline.connectorSort" autocomplete="off"></el-input>
</el-form-item>
<el-form-item label="接口描述" :label-width="formLabelWidth">
<el-input v-model="formInline.connectorDescribe" autocomplete="off"></el-input>
</el-form-item>
<el-form-item label="接口图片" :label-width="formLabelWidth">
<image-upload v-model="formInline.connectorPicture" autocomplete="off"></image-upload>
</el-form-item>
<el-form-item label="公司" :label-width="formLabelWidth">
<el-input v-model="formInline.connectorCompany" autocomplete="off"></el-input>
</el-form-item>
<!-- <el-form-item label="剩余次数" :label-width="formLabelWidth">-->
<!-- <el-input v-model="formInline.connectorResidueDegree" autocomplete="off"></el-input>-->
<!-- </el-form-item>-->
<!-- <el-form-item label="购买次数" :label-width="formLabelWidth">-->
<!-- <el-input v-model="formInline.connectorFrequency" autocomplete="off"></el-input>-->
<!-- </el-form-item>-->
<el-form-item label="API_URL" :label-width="formLabelWidth">
<el-input v-model="formInline.connectorApiurl" autocomplete="off"></el-input>
</el-form-item>
<el-form-item label="API_EYE" :label-width="formLabelWidth">
<el-input v-model="formInline.connectorApikey" autocomplete="off"></el-input>
</el-form-item>
<el-form-item label="请求方式" :label-width="formLabelWidth">
<el-input v-model="formInline.connectorRequest" autocomplete="off"></el-input>
</el-form-item>
<el-form-item label="状态" :label-width="formLabelWidth">
<el-select v-model="formInline.connectorStatus" placeholder="请审核">
<el-option label="审核中" value="0">审核中</el-option>
<el-option label="审核成功" value="1">审核成功</el-option>
<el-option label="审核失败" value="2">审核失败</el-option>
</el-select>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="updateConnector"> </el-button>
</div> </div>
<div v-for="o in 4" :key="o" class="text item"> </el-dialog>
{{'列表内容 ' + o }}
</div>
</el-card>
</div> </div>
</template> </template>
<script> <script>
//jsjsjson, //jsjsjson,
//import from ', //import from ',
import {getPhonePlace} from "@/api/port/port"; import {findConnectorList} from "@/api/port/port";
import {addConnector} from "@/api/port/port";
import {getDeleteConnector} from "@/api/port/port";
import {updateConnector} from "@/api/port/port";
export default { export default {
//import使" //import使"
components: {}, components: {},
props: {}, props: {},
data() { data() {
//" //"
return {
return {}; formInline: {},
form: {},
tableData: [],
formLabelAlign: {},
formLabelWidth: "120px",
dialogFormVisible: false,
dialogFormVisible1: false,
};
}, },
// data", // data",
computed: {}, computed: {},
//data", //data",
watch: {}, watch: {},
//", //",
methods: {}, methods: {
updateConnector() {
updateConnector(this.formInline).then((res) => {
alert(res.msg);
if (200 == res.code) {
this.findConnectorList();
this.dialogFormVisible1 = false;
}
})
},
handleEdit(row) {
this.formInline = row;
this.dialogFormVisible1 = true;
},
handleDelete(row) {
getDeleteConnector(row.connectorId).then((res) => {
alert(res.msg);
if (200 == res.code) {
this.findConnectorList();
}
})
},
addConnector() {
addConnector(this.form).then((res) => {
alert(res.msg);
if (200 == res.code) {
this.findConnectorList();
this.dialogFormVisible = false;
}
})
},
findConnectorList() {
findConnectorList(this.form).then((res) => {
this.tableData = res.data;
})
}
},
// - 访this", // - 访this",
created() { created() {
this.findConnectorList();
}, },
// - 访DOM", // - 访DOM",
mounted() { mounted() {
@ -64,24 +307,5 @@ export default {
}; };
</script> </script>
<style scoped> <style scoped>
.text {
font-size: 14px;
}
.item {
margin-bottom: 18px;
}
.clearfix:before,
.clearfix:after {
display: table;
content: "";
}
.clearfix:after {
clear: both
}
.box-card {
width: 480px;
}
</style> </style>

View File

@ -0,0 +1,544 @@
<!-- src/views/Documentation.vue -->
<template>
<el-container>
<el-aside width="400px" style="background-color: #f5f5f5; padding: 20px;">
<div>
<image-preview :src="picture" style="width: 80%; max-width: 300px; height: auto;" fit="contain"></image-preview>
<h2>{{ name }}</h2>
<p>{{remark}}</p>
<p><strong></strong> <span class="price">{{ price }}/</span></p>
<el-button type="primary" style="float: right; padding: 10px 10px" @click="testPhone()" v-if="this.name ==='手机号查询归属地'">API</el-button>
<el-button type="primary" style="float: right; padding: 10px 10px" @click="testIP()" v-if="this.name==='IP查询归属地'">API</el-button>
<el-button type="primary" style="float: right; padding: 10px 10px" @click="testNews()" v-if="this.name==='新闻头条'">API</el-button>
<el-button type="primary" style="float: right; padding: 10px 10px" @click="testWeather()" v-if="this.name==='气象预警'">API</el-button>
<el-button type="primary" style="float: right; padding: 10px 10px" @click="testBirthdate()" v-if="this.name==='生辰助手'">API</el-button>
<el-button type="primary" style="float: right; padding: 10px 10px" @click="testMailbox()" v-if="this.name==='邮编查询'">API</el-button>
<el-button type="primary" style="float: right; padding: 10px 10px" @click="testWeatherForecast()" v-if="this.name==='天气预报'">API</el-button>
<!-- 手机号查询归属地-->
<el-dialog title="手机查询归属地" :visible.sync="dialogFormVisible">
<el-form :model="formInline">
<el-form-item label="手机号" :label-width="formLabelWidth">
<el-input v-model="formInline.tel" autocomplete="off" placeholder="请输入手机号"></el-input>
</el-form-item>
<span style="font-weight: bold;font-size: 20px" v-if="formInline.reason==true">
省份{{this.formInline.province}}<br>
城市{{this.formInline.city}}<br>
区号{{this.formInline.areacode}}<br>
邮编{{this.formInline.zip}}<br>
运营商{{this.formInline.company}}<br>
</span>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="phonePlace()"></el-button>
</div>
</el-dialog>
<!--IP查询归属地-->
<el-dialog title="IP查询归属地" :visible.sync="dialogFormVisible1">
<el-form :model="formIp">
<el-form-item label="IP" >
<el-input v-model="formIp.ip" autocomplete="off" placeholder="请输入ip"></el-input>
</el-form-item>
<span style="font-weight: bold;font-size: 20px" v-if="formIp.reason==true">
国家{{this.formIp.country}}<br>
省份{{this.formIp.province}}<br>
城市{{this.formIp.city}}<br>
运营商{{this.formIp.isp}}<br>
</span>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="getIpPlace()"></el-button>
</div>
</el-dialog>
<!--天气预报-->
<el-dialog title="天气预报" :visible.sync="dialogFormVisible6">
<el-form :model="formWeatherForecast">
<el-form-item label="城市名" >
<el-input v-model="formWeatherForecast.cityName" autocomplete="off" placeholder="请输入城市名"></el-input>
</el-form-item>
<span style="font-weight: bold;font-size: 20px" v-if="formWeatherForecast.reason==true">
城市{{this.formWeatherForecast.city}}<br>
天气{{this.formWeatherForecast.info}}<br>
温度{{this.formWeatherForecast.temperature}}<br>
湿度{{this.formWeatherForecast.humidity}}<br>
风向{{this.formWeatherForecast.direct}}<br>
风力{{this.formWeatherForecast.power}}<br>
空气质量{{this.formWeatherForecast.aqi}}<br>
</span>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="getWeatherForecast(cityName)"></el-button>
</div>
</el-dialog>
<!-- 新闻头条-->
<el-dialog title="新闻头条" :visible.sync="dialogTableVisible">
<el-table :data="gridData">
<el-table-column property="title" label="新闻标题" width="150"></el-table-column>
<el-table-column property="date" label="新闻时间" width="200"></el-table-column>
<el-table-column property="category" label="新闻分类"></el-table-column>
<el-table-column property="authorName" label="新闻来源"></el-table-column>
</el-table>
</el-dialog>
<!-- 气象预警-->
<el-dialog title="气象预警" :visible.sync="dialogFormVisible4">
<el-aside width="100%">
<el-tree :data="data" :props="defaultProps">
<template slot-scope="{data,node}">
<span>{{data.provinceName}}{{data.cityName}}--{{data.cityCode}}</span>
</template>
</el-tree>
</el-aside>
</el-dialog>
<!--生辰助手-->
<el-dialog title="生辰助手" :visible.sync="dialogFormVisible2">
<el-form :model="formBirthday">
<el-form-item label="年" >
<el-input v-model="formBirthday.year" autocomplete="off" placeholder="请输入年份"></el-input>
</el-form-item>
<el-form-item label="月" >
<el-input v-model="formBirthday.month" autocomplete="off" placeholder="请输入月份"></el-input>
</el-form-item>
<el-form-item label="日" >
<el-input v-model="formBirthday.day" autocomplete="off" placeholder="请输入几号"></el-input>
</el-form-item>
<el-form-item label="时" >
<el-input v-model="formBirthday.hour" autocomplete="off" placeholder="请输入几点"></el-input>
</el-form-item>
<span style="font-weight: bold;font-size: 20px" v-if="formBirthday.reason===true">
years {{this.formBirthday.years}}<br>
months {{this.formBirthday.months}}<br>
days {{this.formBirthday.days}}<br>
animal {{this.formBirthday.animal}}<br>
imonthcn {{this.formBirthday.imonthcn}}<br>
idaycn {{this.formBirthday.idaycn}}<br>
cyear {{this.formBirthday.cyear}}<br>
cmonth {{this.formBirthday.cmonth}}<br>
cday {{this.formBirthday.cday}}<br>
gzyear {{this.formBirthday.gzyear}}<br>
gzmonth {{this.formBirthday.gzmonth}}<br>
gzday {{this.formBirthday.gzday}}<br>
isleap {{this.formBirthday.isleap}}<br>
ncweek {{this.formBirthday.ncweek}}<br>
isterm {{this.formBirthday.isterm}}<br>
term {{this.formBirthday.term}}<br>
astro {{this.formBirthday.astro}}<br>
eightall {{this.formBirthday.eightall}}<br>
fiveall {{this.formBirthday.fiveall}}
</span>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="getBirthday()"></el-button>
</div>
</el-dialog>
<!--邮编查询-->
<el-dialog title="邮编查询" :visible.sync="dialogFormVisible3">
<el-form :model="formPostCode">
<el-form-item label="邮编" >
<el-input v-model="formPostCode.code" autocomplete="off" placeholder="请输入邮编"></el-input>
</el-form-item>
<el-table :data="gridData2" v-if="formPostCode.reason===true">
<el-table-column property="postNumber" label="邮编" width="150"></el-table-column>
<el-table-column property="province" label="省" width="200"></el-table-column>
<el-table-column property="city" label="市"></el-table-column>
<el-table-column property="district" label="区"></el-table-column>
<el-table-column property="address" label="县"></el-table-column>
</el-table>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="getPostcode()"></el-button>
</div>
</el-dialog>
</div>
</el-aside>
<div>
<el-tabs v-model="activeTab" @click="handleTabClick">
<el-tab-pane label="api 文档" name="api-docs"></el-tab-pane>
<el-tab-pane label="错误码参照" name="error-codes"></el-tab-pane>
<el-tab-pane label="数据统计" name="data-stats"></el-tab-pane>
</el-tabs>
<div v-if="activeTab === 'api-docs'">
<el-main style="padding: 20px;">
<div class="api-docs" style="margin-top: 20px;">
<el-card>
<div slot="header" class="clearfix">
<p>接口地址: {{apiEndpoint}}</p>
<p>返回格式: json</p>
<p>请求方式: {{connectorRequest}}</p>
<p>请求示例: {{apiEndpoint}}?=你申请的KEY&{{apiKey}}</p>
<p>简介: {{describe}}</p>
<h2>json返回示例:</h2>
<el-card class="return-example-card">
<pre>{{ returnExample }}</pre>
</el-card>
<h2>xml返回示例:</h2>
<el-card class="return-example-card">
<pre>{{ returnXml }}</pre>
</el-card>
</div>
</el-card>
</div>
</el-main>
</div>
<div v-if="activeTab === 'error-codes'">
<el-card style="width: 80%; margin: 20px auto; box-shadow: 0 2px 12px rgba(0,0,0,0.1);">
<h3 style="text-align: center; margin-bottom: 20px;">服务级错误码参照(error_code)</h3>
<table border="1" style="width: 100%; margin-bottom: 20px;">
<tr>
<td>错误码</td>
<td>说明</td>
</tr>
<tr v-for="errorCode in errorCodes" :key="errorCode.code">
<td>{{ errorCode.code }}</td>
<td>{{ errorCode.description }}</td>
</tr>
</table>
<h3 style="text-align: center; margin-bottom: 20px;">系统级错误码参照</h3>
<table border="1" style="width: 100%;">
<tr>
<td>错误码</td>
<td>说明</td>
</tr>
<tr v-for="errorCode in Codes" :key="errorCode.code">
<td>{{ errorCode.code }}</td>
<td>{{ errorCode.description }}</td>
</tr>
</table>
<h3 style="text-align: center; margin-bottom: 20px;">错误格式说明示例200201</h3>
<table border="1" style="width: 100%;">
<tr>
<td>2</td>
<td>002</td>
</tr>
<tr v-for="errorCode in Cods" :key="errorCode.code">
<td>{{ errorCode.code }}</td>
<td>{{ errorCode.description }}</td>
</tr>
</table>
</el-card>
</div>
<div v-if="activeTab === 'data-stats'">
<el-card class="return-example-card" style="width: 80%; margin: 20px auto; box-shadow: 0 2px 12px rgba(0,0,0,0.1);">
<div slot="header" class="clearfix" style="padding: 20px;">
<pre>什么也没有</pre>
</div>
</el-card>
</div>
</div>
</el-container>
</template>
<script>
import { findApiById } from "@/api/port/port";
import {phonePlace ,getIpPlace,getWeatherForecast,getHeadlines,getWeather,getBirthday,getPostcode} from "@/api/port/port";
export default {
data() {
return {
Cods: [
{ code: '服务级错误1为系统级错误', description: '服务模块代码(即数据ID)' },
],
Codes: [
{ code: '10001', description: '错误的请求KEY' },
{ code: '10002', description: '该KEY无请求权限' },
{ code: '10003', description: 'KEY过期' },
{ code: '10004', description: '系统内部异常' },
],
errorCodes: [
{ code: '203201', description: '错误的经纬度' },
],
//
formPostCode:{
code:"",
// postNumber:"",
// province:"",
// city:"",
// district:"",
// address:"",
reason:"",
},
formBirthday:{
year:"",
month:"",
day:"",
hour:"",
years:"",
months:"",
days:"",
animal:"",
imonthcn:"",
idaycn:"",
cyear:"",
cmonth:"",
cday:"",
gzyear:"",
gzmonth:"",
gzday:"",
isleap:"",
ncweek:"",
isterm:"",
term:"",
astro:"",
eightall:"",
fiveall:"",
reason:"",
},
data:[],
defaultProps: {
children:"citys",
label:'provinceName',
},
gridData:[],
gridData2:[],
formWeatherForecast:{
cityName:"",
city:"",
info:"",
temperature:"",
humidity:"",
direct:"",
power:"",
aqi:"",
reason:"",
},
// formInline
formInline:{
tel:"",
province:"",
city:"",
areacode:"",
zip:"",
company:"",
reason:"",
},
formLabelWidth: '80px',
formIp:{
ip:"",
country:"",
province:"",
city:"",
isp:"",
reason:"",
},
activeTab: 'api-docs',
name: '',
describe: '',
price: '',
picture: '',
returnExample:'',
remark: '',
returnXml: '',
apiKey:'N/A',
apiEndpoint: 'N/A',
connectorRequest: 'N/A',
responseFormat: 'N/A',
requestMethod: 'N/A',
requestExample: 'N/A',
apiDescription: 'N/A',
dialogFormVisible:false,
dialogFormVisible1:false,
dialogFormVisible2:false,
dialogFormVisible3:false,
dialogFormVisible4:false,
dialogFormVisible5:false,
dialogFormVisible6:false,
dialogTableVisible:false,
};
},
methods: {
//
getPostcode(){
getPostcode(this.formPostCode.code).then((res)=>{
console.log(res.data);
this.gridData2=res.data;
this.formPostCode.reason=true;
})
},
getBirthday(){
getBirthday(this.formBirthday).then((res)=>{
console.log(res.data);
this.formBirthday.reason=true;
this.formBirthday.years=res.data.years;
this.formBirthday.months=res.data.months;
this.formBirthday.days=res.data.days;
this.formBirthday.animal=res.data.animal;
this.formBirthday.imonthcn=res.data.imonthcn;
this.formBirthday.idaycn=res.data.idaycn;
this.formBirthday.cyear=res.data.cyear;
this.formBirthday.cmonth=res.data.cmonth;
this.formBirthday.cday=res.data.cday;
this.formBirthday.gzyear=res.data.gzyear;
this.formBirthday.gzmonth=res.data.gzmonth;
this.formBirthday.gzday=res.data.gzday;
this.formBirthday.isleap=res.data.isleap;
this.formBirthday.ncweek=res.data.ncweek;
this.formBirthday.isterm=res.data.isterm;
this.formBirthday.term=res.data.term;
this.formBirthday.astro=res.data.astro;
this.formBirthday.eightall=res.data.eightall;
this.formBirthday.fiveall=res.data.fiveall;
})
},
//
testWeather(){
getWeather().then((res)=>{
this.data=res.data;
this.dialogFormVisible4=true;
})
},
testNews(){
getHeadlines().then((res)=>{
this.gridData=res.data;
this.dialogTableVisible=true;
})
},
getWeatherForecast(){
getWeatherForecast(this.formWeatherForecast.cityName).then((res)=>{
console.log(res.data);
this.formWeatherForecast.city=res.data.city;
this.formWeatherForecast.info=res.data.info;
this.formWeatherForecast.temperature=res.data.temperature;
this.formWeatherForecast.humidity=res.data.humidity;
this.formWeatherForecast.direct=res.data.direct;
this.formWeatherForecast.power=res.data.power;
this.formWeatherForecast.aqi=res.data.aqi;
this.formWeatherForecast.reason=true;
})
},
getIpPlace(){
getIpPlace(this.formIp.ip).then((res)=>{
console.log(res.data);
if (200==res.code){
this.formIp.country=res.data.country;
this.formIp.province=res.data.province;
this.formIp.city=res.data.city;
this.formIp.isp=res.data.isp;
this.formIp.reason=true;
}
})
},
phonePlace(){
phonePlace(this.formInline.tel).then((res)=>{
console.log(res.data);
if (200==res.code){
this.formInline.province=res.data.province;
this.formInline.city=res.data.city;
this.formInline.areacode=res.data.areacode;
this.formInline.zip=res.data.zip;
this.formInline.company=res.data.company;
this.formInline.reason=true;
}
})
},
testWeatherForecast(){
this.dialogFormVisible6=true;
},
testMailbox(){
this.dialogFormVisible3=true;
},
testBirthdate(){
this.dialogFormVisible2=true;
},
testIP(){
this.dialogFormVisible1=true;
},
testPhone(){
this.dialogFormVisible=true;
},
handleTabClick(tab) {
this.activeTab = tab.name;
},
async loadData(id) {
try {
const response = await findApiById(id);
const data = response.data;
this.name = data.connectorName;
this.describe = data.connectorDescribe;
this.price = data.connectorPrice;
this.picture = data.connectorPicture;
this.apiEndpoint = data.connectorApiurl;
this.apiKey = data.connectorApikey;
this.remark = data.remark
this.connectorRequest = data.connectorRequest;
this.returnExample = data.returnExample;
this.returnXml = data.returnXml;
} catch (error) {
console.error("Failed to fetch API data:", error);
}
}
},
created() {
const id = this.$route.query.id;
if (id) {
this.loadData(id);
}
}
};
</script>
<style scoped>
.price {
font-size: 24px; /* 调整字体大小 */
color: red;
}
.api-docs {
margin-top: 20px;
}
.return-example-card {
margin-top: 20px;
padding: 20px;
background-color: #f9f9f9;
border: 1px solid #dcdfe6;
}
.return-example-card pre {
margin: 0;
white-space: pre-wrap;
word-wrap: break-word;
}
table {
border-collapse: collapse;
}
th, td {
border: 1px solid black;
padding: 10px;
text-align: left;
}
th {
background-color: #f2f2f2;
}
</style>

View File

@ -10,7 +10,7 @@
@keyup.enter.native="handleQuery" @keyup.enter.native="handleQuery"
/> />
</el-form-item> </el-form-item>
<el-form-item label="用户名称" prop="userName"> <el-form-item label="" prop="userName">
<el-input <el-input
v-model="queryParams.userName" v-model="queryParams.userName"
clearable clearable

View File

@ -429,6 +429,7 @@ export default {
/** 提交按钮 */ /** 提交按钮 */
submitForm: function () { submitForm: function () {
this.$refs["form"].validate(valid => { this.$refs["form"].validate(valid => {
if (valid) { if (valid) {
if (this.form.menuId != undefined) { if (this.form.menuId != undefined) {
updateMenu(this.form).then(response => { updateMenu(this.form).then(response => {
@ -444,6 +445,7 @@ export default {
}); });
} }
} }
}); });
}, },
/** 删除按钮操作 */ /** 删除按钮操作 */

View File

@ -0,0 +1,524 @@
<template>
<div class="dashboard-container">
<p>选择节点</p>
<div class="antvBox">
<div class="menu-list">
<div v-for="item in moduleList"
:key="item.id"
draggable="true"
@dragend="handleDragEnd($event, item)">
<img :src="item.image" alt="" />
<p>{{ item.name }}</p>
</div>
</div>
<div class="canvas-card">
<div id="container" />
</div>
</div>
<el-button @click="save()"></el-button>
<!-- 添加任务详情设计-->
<el-dialog title="添加表" :visible.sync="taskInputForm" width="70%">
<formData v-if="formData" :group="graph" :node-id="nodeId" :taskInputForm="taskInputForm"
:nodeName="nodeName" :tableInfo="tableInfo" @taskInputForm="findFormValue"></formData>
</el-dialog>
<!-- 联查弹窗-->
<el-dialog title="联查" :visible.sync="taskInputJoin" width="70%">
<formJoin v-if="formJoin" :group="graph" :node-id="nodeId"
:nodeName="nodeName" :neighbors="neighbors"
:taskId="taskId" :taskInputJoin="taskInputJoin" @saveTaskJoin="findFormValue"></formJoin>
</el-dialog>
<!-- 数据输出弹窗-->
<el-dialog title="数据输出" :visible.sync="taskDataOutPut" width="70%">
<dataOutInput v-if="formOut" :taskDataOutPut="taskDataOutPut" :neighbors="neighbors"
:taskId="taskId"></dataOutInput>
</el-dialog>
<el-dialog
:visible.sync="ruleOpen"
width="70%">
<ruleForm v-if="this.ruleDestroy" :node-id="nodeId" @ruleDestroy="ruleDestroyValue"/>
<!-- <ruleForm ></ruleForm>-->
</el-dialog>
</div>
</template>
<script>
import { Graph } from "@antv/x6";
import { findByNodeId } from '@/api/task/task'
import formData from '/src/views/components/task/formData.vue'
import formJoin from '/src/views/components/task/formJoin.vue'
import dataOutInput from '/src/views/components/task/formDataOut.vue'
import ruleForm from "@/views/components/task/rule/index";
export default {
name: "antvX6",
components:{
formData,
formJoin,
dataOutInput,
ruleForm,
},
data() {
return {
//
taskDataOutPut:false,
ruleOpen: false,
//
taskInputAdd:false,
//
taskInputJoin:false,
//
taskInputFieldAdd:false,
//id
neighbors:[],
columnList:[],
//
tableInfo:{},
//
moduleList: [
{
id: 1,
name: "开始",
image: require("@/assets/img/1.png"),
data:{}
},
{
id: 2,
name: "表",
image: require("@/assets/img/2.png"),
data:{
databaseId:null,
tableName:null,
zd:null,
}
},
{
id: 3,
name: "联查",
image: require("@/assets/img/3.png"),
data:{}
},
{
id: 4,
name: "数据输出",
image: require("@/assets/img/4.png"),
data:{}
},
{
id: 5,
name: "规则",
image: require("@/assets/img/5.png"),
data:{}
},
],
//
graph:null,
//id
nodeId:null,
nodeName:null,
//
taskInputForm:false,
formData:false,
formJoin:false,
ruleDestroy:false,
formOut:false,
taskId:this.$route.params.id,
};
},
//
mounted() {
this.initGraph();
},
methods: {
ruleDestroyValue(data) {
this.ruleDestroy = data;
this.ruleOpen = data;
},
findFormValue(){
this.formData=false;
this.taskInputForm=false;
this.taskInputJoin=false;
},
//
save() {
console.log(this.graph.toJSON(), "graph");
console.log(this.graph.getNodes(), "node");
},
nodeAddEvent() {
const { graph } = this;
const container = document.getElementById("container");
const changePortsVisible = (visible) => {
const ports = container.querySelectorAll(".x6-port-body");
for (let i = 0, len = ports.length; i < len; i = i + 1) {
ports[i].style.visibility = visible ? "visible" : "hidden";
}
};
//
this.graph.on("node:click",(evt)=>{
const data = evt.node.store.data;
const thisData = data.attrs.label.textWrap.text;
this.nodeId = data.id;
this.nodeName = thisData;
if(thisData == "表"){
findByNodeId(this.nodeId).then(res=>{
this.tableInfo={};
this.tableInfo.taskId = this.taskId;
if(res.code == 200 && res.data!=null){
this.tableInfo = res.data;
}
})
//TODO man
this.taskInputForm = true;
this.formData = true;
}
if(thisData == "联查"){
//
const edges = this.graph.getEdges().filter(edge => {
return edge.getSourceNode().id === data.id || edge.getTargetNode().id === data.id;
});
//
const neighbors = [];
edges.forEach(edge => {
const otherNodeId = edge.getSourceNode().id === data.id ? edge.getTargetNode().id : edge.getSourceNode().id;
if (!neighbors.includes(otherNodeId)) {
neighbors.push(otherNodeId); // ID
}
});
// neighborsID
console.log('相连节点的ID:', neighbors);
this.neighbors = neighbors;
this.taskInputJoin = true;
this.formJoin = true;
}
if(thisData == "数据输出"){
this.taskDataOutPut = true;
this.formOut = true;
}
if (thisData == "规则") {
this.ruleOpen = true;
this.ruleDestroy = true;
}
});
this.graph.on("node:mouseenter", () => {
changePortsVisible(true);
});
this.graph.on("node:mouseleave", () => {
changePortsVisible(false);
});
//
this.graph.on("node:contextmenu", ({ e, x, y, node, view }) => {
console.log("点击!!!", node);
//
if (this.curSelectNode) {
//
this.curSelectNode.removeTools();
//
if (this.curSelectNode !== node) {
node.addTools([
{
name: "boundary",
args: {
attrs: {
fill: "#16B8AA",
stroke: "#2F80EB",
strokeWidth: 1,
fillOpacity: 0.1,
},
},
},
{
name: "button-remove",
args: {
x: "100%",
y: 0,
offset: {
x: 0,
y: 0,
},
},
},
]);
this.curSelectNode = node;
} else {
this.curSelectNode = null;
}
} else {
this.curSelectNode = node;
node.addTools([
{
name: "boundary",
args: {
attrs: {
fill: "#16B8AA",
stroke: "#2F80EB",
strokeWidth: 1,
fillOpacity: 0.1,
},
},
},
{
name: "button-remove",
args: {
x: "100%",
y: 0,
offset: {
x: 0,
y: 0,
},
},
},
]);
}
});
//
this.graph.on('node:dblclick', (evt) => {
const data = evt.node.store.data;
console.log(data);
// this.showNodeForm(data);
});
// 线
this.graph.on("cell:mouseenter", ({ cell }) => {
if (cell.shape == "edge") {
cell.addTools([
{
name: "button-remove",
args: {
x: "100%",
y: 0,
offset: {
x: 0,
y: 0,
},
},
},
]);
cell.setAttrs({
line: {
stroke: "#409EFF",
},
});
cell.zIndex = 99; // 线
}
});
this.graph.on("cell:mouseleave", ({ cell }) => {
if (cell.shape === "edge") {
cell.removeTools();
cell.setAttrs({
line: {
stroke: "black",
},
});
cell.zIndex = 1; // 线线
}
});
},
//
handleDragEnd(e, item) {
// console.log(e); //
this.addHandleNode(
e.pageX - 500,
e.pageY - 200,
new Date().getTime(),
item.image,
item.name,
item.data
);
},
//
addHandleNode(x, y, id, image, name ,data) {
this.graph.addNode({
id: id,
shape: "image", // 使 'rect'
x: x,
y: y,
width: 60,
height: 60,
imageUrl: image,
attrs: {
body: {
stroke: "#ffa940",
fill: "#ffd591",
},
label: {
textWrap: {
width: 90,
text: name,
},
fill: "black",
fontSize: 12,
refX: 0.5,
refY: "100%",
refY2: 4,
textAnchor: "middle",
textVerticalAnchor: "top",
},
},
ports: {
groups: {
group1: {
position: [30, 30],
},
},
items: [
{
group: "group1",
id: "port1",
attrs: {
circle: {
r: 6,
magnet: true,
stroke: "#ffffff",
strokeWidth: 2,
fill: "#5F95FF",
},
},
},
],
},
zIndex: 10,
data:data,
});
},
//
initGraph() {
const container = document.getElementById("container");
this.graph = new Graph({
container: container, //
width: container.offsetWidth, //
height: container.offsetHeight, //
background: false, //
snapline: true, // 线
// 线
connecting: {
snap: true, //
allowBlank: false, //
allowMulti: true, //
allowLoop: true, // 线
highlight: true, //
highlighting: {
magnetAdsorbed: {
name: "stroke",
args: {
attrs: {
fill: "#5F95FF",
stroke: "#5F95FF",
},
},
},
},
router: {
//
name: "orth",
},
connector: {
//
name: "rounded",
args: {
radius: 8,
},
},
},
panning: {
enabled: false,
},
mousewheel: {
enabled: true, //
zoomAtMousePosition: true,
modifiers: "ctrl",
minScale: 0.5,
maxScale: 3,
},
grid: {
type: "dot",
size: 20, // 10px
visible: true, //
args: {
color: "#a0a0a0", // 线/
thickness: 2, // 线/
},
},
});
this.nodeAddEvent();
},
},
};
</script>
<style lang="scss" scoped>
.dashboard-container {
.antvBox {
display: flex;
width: 100%;
height: 100%;
color: black;
padding-top: 20px;
.menu-list {
height: 100%;
width: 300px;
padding: 0 10px;
box-sizing: border-box;
display: flex;
justify-content: space-between;
align-content: flex-start;
flex-wrap: wrap;
> div {
margin-bottom: 10px;
border-radius: 5px;
padding: 0 10px;
box-sizing: border-box;
cursor: pointer;
color: black;
width: 105px;
display: flex;
flex-wrap: wrap;
justify-content: center;
img {
height: 50px;
width: 50px;
}
P {
width: 90px;
text-align: center;
}
}
}
.canvas-card {
width: 1700px;
height: 750px;
box-sizing: border-box;
> div {
width: 1400px;
height: 750px;
border: 2px dashed #2149ce;
}
}
}
}
</style>

View File

@ -0,0 +1,733 @@
<template>
<div class="dashboard-container">
<p>选择节点</p>
<div class="antvBox">
<div class="menu-list">
<div v-for="item in moduleList"
:key="item.id"
draggable="true"
@dragend="handleDragEnd($event, item)">
<img :src="item.image" alt="" />
<p>{{ item.name }}</p>
</div>
</div>
<div class="canvas-card">
<div id="container" />
</div>
</div>
<el-button @click="save()"></el-button>
<!-- 添加任务详情设计-->
<el-dialog title="添加表" :visible.sync="taskInputForm" width="70%">
<formData v-if="this.formData" :group="graph" :node-id="nodeId" :formData="taskInputForm" @taskInputAdd="taskInputAdd"></formData>
</el-dialog>
<!-- <el-form label-width="80px" :model="tableInfo" ref="queryForm" :inline="true" class="demo-form-inline" size="small">-->
<!-- <el-form-item label="任务id">-->
<!-- <el-input v-model="tableInfo.taskId"></el-input>-->
<!-- </el-form-item>-->
<!-- <el-form-item label="数据库id">-->
<!-- <el-input v-model="tableInfo.basicId"></el-input>-->
<!-- </el-form-item>-->
<!--&lt;!&ndash; <el-form-item label="数据表">&ndash;&gt;-->
<!--&lt;!&ndash; <div class="block">&ndash;&gt;-->
<!--&lt;!&ndash; <span class="demonstration">选择数据表</span>&ndash;&gt;-->
<!--&lt;!&ndash; <el-cascader&ndash;&gt;-->
<!--&lt;!&ndash; v-model="value"&ndash;&gt;-->
<!--&lt;!&ndash; :options="tableList"&ndash;&gt;-->
<!--&lt;!&ndash; @change="handleChange(value)"></el-cascader>&ndash;&gt;-->
<!--&lt;!&ndash; </div>&ndash;&gt;-->
<!--&lt;!&ndash; <el-aside width="30%">-->
<!-- <el-tree :data="data" :props="defaultProps" @node-click="handleNodeClick"></el-tree>-->
<!-- </el-aside>&ndash;&gt;-->
<!-- <el-form-item>-->
<!-- <el-select v-model="tableInfo.tableName" placeholder="请选择等级">-->
<!-- <el-option style="height: 100%" :value="tableInfo.tableName">-->
<!-- <el-aside width="100%">-->
<!-- <el-tree :data="data" :props="defaultProps" @node-click="handleNodeClick"></el-tree>-->
<!-- </el-aside>-->
<!-- </el-option>-->
<!--&lt;!&ndash; <el-option label="请选择" value="0"></el-option>&ndash;&gt;-->
<!--&lt;!&ndash; <span v-for="table in tableList">&ndash;&gt;-->
<!--&lt;!&ndash; <el-option :label=table.tableName :value=table.id :key=table.id></el-option>&ndash;&gt;-->
<!--&lt;!&ndash; </span>&ndash;&gt;-->
<!-- </el-select>-->
<!-- </el-form-item>-->
<!-- <el-form-item label="表别名">-->
<!-- <el-input v-model="tableInfo.tableAsName"></el-input>-->
<!-- </el-form-item>-->
<!-- </el-form>-->
<!-- <div slot="footer" class="dialog-footer">-->
<!-- <el-button @click="taskInputAdd = false"> </el-button>-->
<!-- <el-button type="primary" @click="addTaskInput()"></el-button>-->
<!-- </div>-->
<!-- </el-dialog>-->
<!-- &lt;!&ndash; 字段选择列表&ndash;&gt;-->
<!-- <el-dialog title="添加表" :visible.sync="taskInputFieldAdd">-->
<!-- <el-table-->
<!-- :data="tableInfo.structureList"-->
<!-- style="width: 100%"-->
<!-- @selection-change="handleSelectionChange">-->
<!-- <el-table-column-->
<!-- type="selection"-->
<!-- width="100%">-->
<!-- </el-table-column>-->
<!-- <el-table-column-->
<!-- label="字段"-->
<!-- width="100">-->
<!-- <template slot-scope="scope">-->
<!-- <i class="el-icon-time"></i>-->
<!-- <span style="margin-left: 10px">{{ scope.row.columnName }}</span>-->
<!-- </template>-->
<!-- </el-table-column>-->
<!-- <el-table-column-->
<!-- label="注释"-->
<!-- width="100">-->
<!-- <template slot-scope="scope">-->
<!-- <i class="el-icon-time"></i>-->
<!-- <span style="margin-left: 10px">{{ scope.row.columnRemark }}</span>-->
<!-- </template>-->
<!-- </el-table-column>-->
<!-- <el-table-column-->
<!-- label="是否主键"-->
<!-- width="100">-->
<!-- <template slot-scope="scope">-->
<!-- <i class="el-icon-time"></i>-->
<!-- <span style="margin-left: 10px">{{ scope.row.isPrimary }}</span>-->
<!-- </template>-->
<!-- </el-table-column>-->
<!-- <el-table-column-->
<!-- label="字段类型"-->
<!-- width="100">-->
<!-- <template slot-scope="scope">-->
<!-- <i class="el-icon-time"></i>-->
<!-- <span style="margin-left: 10px">{{ scope.row.columnType }}</span>-->
<!-- </template>-->
<!-- </el-table-column>-->
<!-- <el-table-column-->
<!-- label="字段长度"-->
<!-- width="100">-->
<!-- <template slot-scope="scope">-->
<!-- <i class="el-icon-time"></i>-->
<!-- <span style="margin-left: 10px">{{ scope.row.columnLength }}</span>-->
<!-- </template>-->
<!-- </el-table-column>-->
<!-- <el-table-column-->
<!-- label="小数"-->
<!-- width="100">-->
<!-- <template slot-scope="scope">-->
<!-- <i class="el-icon-time"></i>-->
<!-- <span style="margin-left: 10px">{{ scope.row.columnDecimals }}</span>-->
<!-- </template>-->
<!-- </el-table-column>-->
<!-- <el-table-column-->
<!-- label="非空"-->
<!-- width="100">-->
<!-- <template slot-scope="scope">-->
<!-- <i class="el-icon-time"></i>-->
<!-- <span style="margin-left: 10px">{{ scope.row.isNull }}</span>-->
<!-- </template>-->
<!-- </el-table-column>-->
<!-- <el-table-column-->
<!-- label="默认值"-->
<!-- width="100">-->
<!-- <template slot-scope="scope">-->
<!-- <i class="el-icon-time"></i>-->
<!-- <span style="margin-left: 10px">{{ scope.row.defaultValue }}</span>-->
<!-- </template>-->
<!-- </el-table-column>-->
<!-- <el-table-column-->
<!-- label="是否字典"-->
<!-- width="100">-->
<!-- <template slot-scope="scope">-->
<!-- <i class="el-icon-time"></i>-->
<!-- <span style="margin-left: 10px">{{ scope.row.isDictionary }}</span>-->
<!-- </template>-->
<!-- </el-table-column>-->
<!-- <el-table-column-->
<!-- label="处理规则"-->
<!-- width="100">-->
<!-- <template slot-scope="scope">-->
<!-- <el-select v-model="tableInfo.fieldAsEngineId" multiple placeholder="请选择">-->
<!-- <el-option value="">请选择</el-option>-->
<!-- <el-option-->
<!-- v-for="engine in engineList"-->
<!-- :key="engine.id"-->
<!-- :label="engine.name"-->
<!-- :value="engine.id">-->
<!-- </el-option>-->
<!-- </el-select>-->
<!--&lt;!&ndash; <span style="margin-left: 10px" v-if="scope.row.weigh ==1 "></span>&ndash;&gt;-->
<!--&lt;!&ndash; <span style="margin-left: 10px" v-if="scope.row.weigh ==2 ">aa</span>&ndash;&gt;-->
<!--&lt;!&ndash; <span style="margin-left: 10px" v-if="scope.row.weigh ==3 "></span>&ndash;&gt;-->
<!--&lt;!&ndash; <span style="margin-left: 10px" v-if="scope.row.weigh ==4 "></span>&ndash;&gt;-->
<!-- </template>-->
<!-- </el-table-column>-->
<!-- <el-table-column-->
<!-- label="表别名"-->
<!-- width="100">-->
<!-- <template slot-scope="scope">-->
<!-- <el-input v-model="scope.row.fieldAsEngineId"></el-input>-->
<!-- </template>-->
<!-- </el-table-column>-->
<!-- </el-table>-->
<!-- <div slot="footer" class="dialog-footer">-->
<!-- <el-button @click="cancelColumn()"> </el-button>-->
<!-- <el-button type="primary" @click="columnAddGood()"> </el-button>-->
<!-- </div>-->
<!-- </el-dialog>-->
<!-- <formData>-->
<!-- </formData>-->
</div>
</template>
<script>
import { Graph } from "@antv/x6";
import { addTaskInput, findByTableId, findStructureList, tableInfoList } from '@/api/task/task'
import { findStructureByTableId, findTableInfoList } from '@/api/etl/switch'
import { selectEngineList } from '@/api/engine/engine'
import formData from '/src/views/components/task/formData.vue'
export default {
name: "antvX6",
components:{
formData
},
data() {
return {
dialogFormVisible:false,
//
taskInputAdd:false,
formData:null,
//
taskInputFieldAdd:false,
taskReq:{
},
taskAddReq:{},
taskInputReq:{},
engineReq:{
pageNum: 1,
pageSize: 100
},
taskList:[],
//
value:[],
engineList:[],
//
data:[],
defaultProps:{
children:"children",
label:'tableName'
},
tableList:[],
columnList:[],
structureList:[],
tableInfo:{
taskId:this.$route.params.taskId,
},
itemId:0,
moduleList: [
{
id: 1,
name: "开始",
image: require("@/assets/img/1.png"),
data:{}
},
{
id: 2,
name: "表",
image: require("@/assets/img/2.png"),
data:{
databaseId:null,
tableName:null,
zd:null,
}
},
{
id: 3,
name: "联查",
image: require("@/assets/img/3.png"),
data:{}
},
{
id: 4,
name: "结束",
image: require("@/assets/img/4.png"),
data:{}
},
],
graph:null,
nodeId:null,
nodeName:null,
taskInputForm:false,
};
},
//
created() {
alert(this.$route.params.taskId);
},
mounted() {
this.initGraph();
},
methods: {
taskInputForm(data){
this.formData=data;
this.taskInputForm=data;
},
// //
// selectEngineList(){
// selectEngineList(this.engineReq).then(res=>{
// this.engineList = res.data.list;
// console.log(this.engineList);
// })
// },
//
// //
// handleNodeClick(data) {
// this.tableInfo = data;
// findStructureByTableId(data.id).then((res)=>{
// this.tableInfo.structureList=res.data;
// })
// const cellById = this.graph.getCellById(this.nodeId)
// cellById.setData(this.tableInfo);
// },
//
// //
// findTAbleInfoList(){
// findTableInfoList().then(res=>{
// this.data=res.data;
// })
// },
//
// //
// columnAddGood(){
// this.taskInputFieldAdd = false;
// const cellById = this.graph.getCellById(this.nodeId);
// this.tableInfo.tableField = JSON.stringify(this.tableInfo.columnList);
// console.log(this.tableInfo.tableField);
// this.tableInfo.fieldAsEngineId = "1,2,3";
// this.tableInfo.nodeId = this.nodeId;
// cellById.setData(this.tableInfo);
// addTaskInput(this.tableInfo).then(res=>{
// alert("11")
// alert(res.msg);
// // console.log(this.tableInfo.fieldAsEngineId)
// });
// },
//
// //
// cancelColumn(){
// this.taskInputFieldAdd = false;
// },
//
// //
// handleSelectionChange(val) {
// if(val.length<=0){
// val = this.tableInfo.columnList;
// return;
// }
// this.tableInfo.columnList = val;
// console.log(this.tableInfo.columnList );
// },
//
// //
// toDesign(row){
// this.$router.push({path:'/easyFlow'});
// },
//
//
// //
// executeTask(){
// this.findTAbleInfoList();
// this.taskInputAdd = true;
// },
//
// //
// addTaskInput(){
// this.taskInputAdd = false;
// this.selectEngineList();
// this.taskInputFieldAdd = true;
// },
//
save() {
console.log(this.graph.toJSON(), "graph");
console.log(this.graph.getNodes(), "node");
},
//
handleDragEnd(e, item) {
// console.log(e); //
this.addHandleNode(
e.pageX - 500,
e.pageY - 200,
new Date().getTime(),
item.image,
item.name,
item.data
);
},
nodeAddEvent() {
const { graph } = this;
const container = document.getElementById("container");
const changePortsVisible = (visible) => {
const ports = container.querySelectorAll(".x6-port-body");
for (let i = 0, len = ports.length; i < len; i = i + 1) {
ports[i].style.visibility = visible ? "visible" : "hidden";
}
};
this.graph.on("node:mouseenter", () => {
changePortsVisible(true);
});
this.graph.on("node:mouseleave", () => {
changePortsVisible(false);
});
//
this.graph.on("node:contextmenu", ({ e, x, y, node, view }) => {
console.log("点击!!!", node);
//
if (this.curSelectNode) {
//
this.curSelectNode.removeTools();
//
if (this.curSelectNode !== node) {
node.addTools([
{
name: "boundary",
args: {
attrs: {
fill: "#16B8AA",
stroke: "#2F80EB",
strokeWidth: 1,
fillOpacity: 0.1,
},
},
},
{
name: "button-remove",
args: {
x: "100%",
y: 0,
offset: {
x: 0,
y: 0,
},
},
},
]);
this.curSelectNode = node;
} else {
this.curSelectNode = null;
}
} else {
this.curSelectNode = node;
node.addTools([
{
name: "boundary",
args: {
attrs: {
fill: "#16B8AA",
stroke: "#2F80EB",
strokeWidth: 1,
fillOpacity: 0.1,
},
},
},
{
name: "button-remove",
args: {
x: "100%",
y: 0,
offset: {
x: 0,
y: 0,
},
},
},
]);
}
});
//
this.graph.on("node:click",(evt)=>{
const data = evt.node.store.data;
const thisData = data.attrs.label.textWrap.text;
if(thisData == "表"){
this.nodeId = data.id;
const node = this.graph.getCellById(this.nodeId);
var data1 = node.getData();
this.tableInfo = data1;
console.log(this.tableInfo);
this.taskInputForm = true;
this.executeTask();
}
});
//
this.graph.on('node:dblclick', (evt) => {
const data = evt.node.store.data;
console.log(data);
// this.showNodeForm(data);
});
// 线
this.graph.on("cell:mouseenter", ({ cell }) => {
if (cell.shape == "edge") {
cell.addTools([
{
name: "button-remove",
args: {
x: "100%",
y: 0,
offset: {
x: 0,
y: 0,
},
},
},
]);
cell.setAttrs({
line: {
stroke: "#409EFF",
},
});
cell.zIndex = 99; // 线
}
});
this.graph.on("cell:mouseleave", ({ cell }) => {
if (cell.shape === "edge") {
cell.removeTools();
cell.setAttrs({
line: {
stroke: "black",
},
});
cell.zIndex = 1; // 线线
}
});
},
//
addHandleNode(x, y, id, image, name ,data) {
this.graph.addNode({
id: id,
shape: "image", // 使 'rect'
x: x,
y: y,
width: 60,
height: 60,
imageUrl: image,
attrs: {
body: {
stroke: "#ffa940",
fill: "#ffd591",
},
label: {
textWrap: {
width: 90,
text: name,
},
fill: "black",
fontSize: 12,
refX: 0.5,
refY: "100%",
refY2: 4,
textAnchor: "middle",
textVerticalAnchor: "top",
},
},
ports: {
groups: {
group1: {
position: [30, 30],
},
},
items: [
{
group: "group1",
id: "port1",
attrs: {
circle: {
r: 6,
magnet: true,
stroke: "#ffffff",
strokeWidth: 2,
fill: "#5F95FF",
},
},
},
],
},
zIndex: 10,
data:data,
});
},
//
initGraph() {
const container = document.getElementById("container");
this.graph = new Graph({
container: container, //
width: container.offsetWidth, //
height: container.offsetHeight, //
background: false, //
snapline: true, // 线
// 线
connecting: {
snap: true, //
allowBlank: false, //
allowMulti: true, //
allowLoop: true, // 线
highlight: true, //
highlighting: {
magnetAdsorbed: {
name: "stroke",
args: {
attrs: {
fill: "#5F95FF",
stroke: "#5F95FF",
},
},
},
},
router: {
//
name: "orth",
},
connector: {
//
name: "rounded",
args: {
radius: 8,
},
},
},
panning: {
enabled: false,
},
mousewheel: {
enabled: true, //
zoomAtMousePosition: true,
modifiers: "ctrl",
minScale: 0.5,
maxScale: 3,
},
grid: {
type: "dot",
size: 20, // 10px
visible: true, //
args: {
color: "#a0a0a0", // 线/
thickness: 2, // 线/
},
},
});
this.nodeAddEvent();
},
},
};
</script>
<style lang="scss" scoped>
.dashboard-container {
.antvBox {
display: flex;
width: 100%;
height: 100%;
color: black;
padding-top: 20px;
.menu-list {
height: 100%;
width: 300px;
padding: 0 10px;
box-sizing: border-box;
display: flex;
justify-content: space-between;
align-content: flex-start;
flex-wrap: wrap;
> div {
margin-bottom: 10px;
border-radius: 5px;
padding: 0 10px;
box-sizing: border-box;
cursor: pointer;
color: black;
width: 105px;
display: flex;
flex-wrap: wrap;
justify-content: center;
img {
height: 50px;
width: 50px;
}
P {
width: 90px;
text-align: center;
}
}
}
.canvas-card {
width: 1700px;
height: 750px;
box-sizing: border-box;
> div {
width: 1400px;
height: 750px;
border: 2px dashed #2149ce;
}
}
}
}
</style>

View File

@ -0,0 +1,57 @@
<template>
<div>
<ef>
</ef>
</div>
</template>
<script>
//jsjsjson,
//import from ',
import ef from "@/components/ef/panel.vue"
export default {
name: "easyFlow",
//import使"
components: {
ef
},
props: {},
data() {
//"
return {
};
},
// data",
computed: {},
//data",
watch: {},
//",
methods: {},
// - 访this",
created() {
},
// - 访DOM",
mounted() {
},
beforeCreate() {
}, // - ",
beforeMount() {
}, // - ",
beforeUpdate() {
}, // - ",
updated() {
}, // - ",
beforeDestroy() {
}, // - ",
destroyed() {
}, // - ",
activated() {
} //keep-alive",
};
</script>
<style scoped>
</style>

View File

@ -41,39 +41,12 @@
</el-button> </el-button>
</el-col> </el-col>
<!-- <el-dialog title="添加数据源接入" :visible.sync="dialogFormVisible">-->
<!-- <el-form :model="sourceAddReq">-->
<!-- <el-form-item label="id">-->
<!-- <el-input v-model="sourceAddReq.id"></el-input>-->
<!-- </el-form-item>-->
<!-- <el-form-item label="任务名称">-->
<!-- <el-input v-model="sourceAddReq.name"></el-input>-->
<!-- </el-form-item>-->
<!-- <el-form-item label="任务执行状态">-->
<!-- <el-input v-model="sourceAddReq.weigh"></el-input>-->
<!-- </el-form-item>-->
<!-- <el-form-item label="任务完成度">-->
<!-- <el-input v-model="sourceAddReq.status"></el-input>-->
<!-- </el-form-item>-->
<!-- </el-form>-->
<!-- </el-dialog>-->
<el-table <el-table
:data="taskList" :data="taskList"
style="width: 100%" style="width: 100%"
@selection-change="handleSelectionChange"> @selection-change="handleSelectionChange">
<el-table-column <el-table-column
type="selection" type="selection"
width="55"> width="55">
@ -139,11 +112,23 @@
type="text" type="text"
@click="executeTask(scope.row)">执行</el-button> @click="executeTask(scope.row)">执行</el-button>
<el-button
icon="el-icon-pear"
size="mini"
type="text"
@click="toDesign(scope.row)">任务设计</el-button>
<el-button <el-button
icon="el-icon-delete" icon="el-icon-delete"
size="mini" size="mini"
type="text" type="text"
@click="handleDelete(scope.row)">删除</el-button> @click="handleDelete(scope.row)">删除</el-button>
<el-button
icon="el-icon-update"
size="mini"
type="text"
@click="updateById(scope.row)">修改</el-button>
</template> </template>
</el-table-column> </el-table-column>
@ -161,10 +146,10 @@
<el-form-item label="优先级选择"> <el-form-item label="优先级选择">
<el-select v-model="taskReq.weigh" placeholder="请选择等级"> <el-select v-model="taskReq.weigh" placeholder="请选择等级">
<el-option label="请选择" value=""></el-option> <el-option label="请选择" value=""></el-option>
<el-option label="紧急" value="1"></el-option> <el-option label="" value="1"></el-option>
<el-option label="" value="2"></el-option> <el-option label="" value="2"></el-option>
<el-option label="" value="3"></el-option> <el-option label="" value="3"></el-option>
<el-option label="" value="4"></el-option> <el-option label="紧急" value="4"></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
@ -181,16 +166,16 @@
<!-- 添加任务详情设计--> <!-- 添加任务详情设计-->
<el-dialog title="添加表" :visible.sync="taskInputAdd"> <el-dialog title="添加表" :visible.sync="taskInputAdd">
<el-form label-width="80px" :model="taskInputReq" ref="queryForm" :inline="true" class="demo-form-inline" size="small"> <el-form label-width="80px" :model="tableInfo" ref="queryForm" :inline="true" class="demo-form-inline" size="small">
<el-form-item label="任务id"> <el-form-item label="任务id">
<el-input v-model="taskInputReq.taskId"></el-input> <el-input v-model="tableInfo.id"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="数据库id"> <!-- <el-form-item label="数据库id">-->
<el-input v-model="taskInputReq.databaseId"></el-input> <!-- <el-input v-model="tableInfo.databaseId"></el-input>-->
</el-form-item> <!-- </el-form-item>-->
<el-form-item label="数据表"> <el-form-item label="数据表">
<el-select v-model="taskReq.tableName" placeholder="请选择等级"> <el-select @change="changeTableName(tableInfo.tableName)" v-model="tableInfo.tableName" placeholder="请选择等级">
<el-option label="请选择" value="0"></el-option> <el-option label="请选择" value="0"></el-option>
<span v-for="table in tableList"> <span v-for="table in tableList">
<el-option :label=table.tableName :value=table.id :key=table.id></el-option> <el-option :label=table.tableName :value=table.id :key=table.id></el-option>
@ -198,13 +183,13 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="表别名"> <el-form-item label="表别名">
<el-input v-model="taskInputReq.tableAsName"></el-input> <el-input v-model="tableInfo.tableRemark"></el-input>
</el-form-item> </el-form-item>
</el-form> </el-form>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
<el-button @click="taskInputAdd = false"> </el-button> <el-button @click="taskInputAdd = false"> </el-button>
<el-button type="primary" @click="addTaskInput()"></el-button> <el-button type="primary" @click="addTaskInput(tableInfo.id)"></el-button>
</div> </div>
@ -214,14 +199,12 @@
<el-dialog title="添加表" :visible.sync="taskInputFieldAdd"> <el-dialog title="添加表" :visible.sync="taskInputFieldAdd">
<el-table <el-table
:data="taskList" :data="structureList"
style="width: 100%" style="width: 100%"
@selection-change="handleSelectionChange"> @selection-change="handleSelectionChange">
<el-table-column <el-table-column
type="selection" type="selection"
width="55"> width="55">
@ -233,25 +216,7 @@
width="180"> width="180">
<template slot-scope="scope"> <template slot-scope="scope">
<i class="el-icon-time"></i> <i class="el-icon-time"></i>
<span style="margin-left: 10px">{{ scope.row.id }}</span> <span style="margin-left: 10px">{{ scope.row.columnName }}</span>
</template>
</el-table-column>
<el-table-column
label="类型/长度"
width="180">
<template slot-scope="scope">
<i class="el-icon-time"></i>
<span style="margin-left: 10px">{{ scope.row.name }}</span>
</template>
</el-table-column>
<el-table-column
label="非空"
width="180">
<template slot-scope="scope">
<i class="el-icon-time"></i>
<span style="margin-left: 10px">{{ scope.row.name }}</span>
</template> </template>
</el-table-column> </el-table-column>
@ -260,28 +225,91 @@
width="180"> width="180">
<template slot-scope="scope"> <template slot-scope="scope">
<i class="el-icon-time"></i> <i class="el-icon-time"></i>
<span style="margin-left: 10px">{{ scope.row.name }}</span> <span style="margin-left: 10px">{{ scope.row.columnRemark }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
label="处理规则" label="是否主键"
width="180"> width="180">
<template slot-scope="scope"> <template slot-scope="scope">
<span style="margin-left: 10px" v-if="scope.row.weigh ==1 "></span> <i class="el-icon-time"></i>
<span style="margin-left: 10px" v-if="scope.row.weigh ==2 "></span> <span style="margin-left: 10px">{{ scope.row.isPrimary }}</span>
<span style="margin-left: 10px" v-if="scope.row.weigh ==3 "></span>
<span style="margin-left: 10px" v-if="scope.row.weigh ==4 "></span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
label="表别名" label="字段类型"
width="180"> width="180">
<template slot-scope="scope"> <template slot-scope="scope">
<input type="text"> <i class="el-icon-time"></i>
<span style="margin-left: 10px">{{ scope.row.columnType }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column
label="字段长度"
width="180">
<template slot-scope="scope">
<i class="el-icon-time"></i>
<span style="margin-left: 10px">{{ scope.row.columnLength }}</span>
</template>
</el-table-column>
<el-table-column
label="小数"
width="180">
<template slot-scope="scope">
<i class="el-icon-time"></i>
<span style="margin-left: 10px">{{ scope.row.columnDecimals }}</span>
</template>
</el-table-column>
<el-table-column
label="非空"
width="180">
<template slot-scope="scope">
<i class="el-icon-time"></i>
<span style="margin-left: 10px">{{ scope.row.isNull }}</span>
</template>
</el-table-column>
<el-table-column
label="默认值"
width="180">
<template slot-scope="scope">
<i class="el-icon-time"></i>
<span style="margin-left: 10px">{{ scope.row.defaultValue }}</span>
</template>
</el-table-column>
<el-table-column
label="是否字典"
width="180">
<template slot-scope="scope">
<i class="el-icon-time"></i>
<span style="margin-left: 10px">{{ scope.row.isDictionary }}</span>
</template>
</el-table-column>
<!-- <el-table-column-->
<!-- label="处理规则"-->
<!-- width="180">-->
<!-- <template slot-scope="scope">-->
<!-- <span style="margin-left: 10px" v-if="scope.row.weigh ==1 "></span>-->
<!-- <span style="margin-left: 10px" v-if="scope.row.weigh ==2 ">aa</span>-->
<!-- <span style="margin-left: 10px" v-if="scope.row.weigh ==3 "></span>-->
<!-- <span style="margin-left: 10px" v-if="scope.row.weigh ==4 "></span>-->
<!-- </template>-->
<!-- </el-table-column>-->
<!-- <el-table-column-->
<!-- label="表别名"-->
<!-- width="180">-->
<!-- <template slot-scope="scope">-->
<!-- <el-input v-model="scope.row.fieldAsEngineId"></el-input>-->
<!-- </template>-->
<!-- </el-table-column>-->
</el-table> </el-table>
@ -301,12 +329,11 @@
<script> <script>
//jsjsjson, //jsjsjson,
//import from ', //import from ',
import {selectSourceList} from "@/api/etl/switch"; import {
import {selectSourceExport} from "@/api/etl/switch"; addTask,
import {connectionTest} from "@/api/etl/switch"; deleteByTaskId, executeTask, findByTableId, findStructureList,
import {insertAdd} from "@/api/etl/switch"; selectTaskList
import {getInfo} from "@/api/etl/switch"; } from '@/api/task/task'
import { addTask, deleteById, deleteByTaskId, selectTaskList, updateById } from '@/api/task/task'
export default { export default {
//import使" //import使"
@ -328,6 +355,8 @@ export default {
taskInputReq:{}, taskInputReq:{},
taskList:[], taskList:[],
tableList:[], tableList:[],
tableInfo:{},
structureList:[],
}; };
}, },
// data", // data",
@ -336,12 +365,37 @@ export default {
watch: {}, watch: {},
//", //",
methods: { methods: {
executeTask(){ //
this.taskInputAdd = true; toDesign(row){
this.$router.push({path:'/easyFlow/index/'+row.id, query:{name:row.name}});
}, },
addTaskInput(){ //
changeTableName(row){
findByTableId(row).then(res=>{
this.tableInfo = res.data;
})
},
//
findStructureList(tableId){
findStructureList(tableId).then(res=>{
this.structureList = res.data;
})
},
executeTask(row){
executeTask(row.id).then(res=>{
alert(res.msg);
});
},
addTaskInput(taskInfo){
this.taskInputAdd = false; this.taskInputAdd = false;
this.findStructureList(taskInfo);
this.taskInputFieldAdd = true; this.taskInputFieldAdd = true;
}, },
@ -350,6 +404,7 @@ export default {
this.dialogFormVisible = true; this.dialogFormVisible = true;
}, },
// //
addTask(){ addTask(){
addTask(this.taskAddReq).then(res=>{ addTask(this.taskAddReq).then(res=>{
@ -374,7 +429,7 @@ export default {
}, },
handleDelete(row){ handleDelete(row){
deleteByTaskId(row.getId).then(res=>{ deleteByTaskId(row.id).then(res=>{
alert(res.msg); alert(res.msg);
if(res.code == 200){ if(res.code == 200){
location.reload(); location.reload();

View File

@ -0,0 +1,329 @@
<template>
<div>
<!--条件查询-->
<el-form :model="version">
<el-form-item label="版本编码" prop="pass">
<el-input type="text" v-model="version.versionCode" autocomplete="off"></el-input>
</el-form-item>
<el-form-item label="规则内容" prop="checkPass">
<el-input type="text" v-model="version.ruleContent" autocomplete="off"></el-input>
</el-form-item>
<el-form-item label="引擎维护编号" prop="checkPass">
<el-input type="text" v-model="version.engineMaintenanceId" autocomplete="off"></el-input>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="submitForm"></el-button>
</el-form-item>
</el-form>
<!-- 添加版本信息-->
<el-button type="text" @click="dialogFormVisible = true">添加版本信息</el-button>
<el-dialog title="添加信息" :visible.sync="dialogFormVisible">
<el-form :model="version">
<el-form-item label="版本类名" :label-width="formLabelWidth">
<el-input v-model="version.versionClass" autocomplete="off"></el-input>
</el-form-item>
<el-form-item label="版本名称" :label-width="formLabelWidth">
<el-input v-model="version.name" autocomplete="off"></el-input>
</el-form-item>
<el-form-item label="版本编码" :label-width="formLabelWidth">
<el-input v-model="version.versionCode" autocomplete="off"></el-input>
</el-form-item>
<el-form-item label="是否激活" :label-width="formLabelWidth">
<el-input v-model="version.isActivate" autocomplete="off"></el-input>
</el-form-item>
<el-form-item label="版本状态" :label-width="formLabelWidth">
<el-input v-model="version.status" autocomplete="off"></el-input>
</el-form-item>
<el-form-item label="版本测试状态" :label-width="formLabelWidth">
<el-input v-model="version.testStatus" autocomplete="off"></el-input>
</el-form-item>
<el-form-item label="规则内容" :label-width="formLabelWidth">
<el-input v-model="version.ruleContent" autocomplete="off"></el-input>
</el-form-item>
<el-form-item label="引擎维护编号" :label-width="formLabelWidth">
<el-input v-model="version.engineMaintenanceId" autocomplete="off"></el-input>
</el-form-item>
<el-form-item label="描述" :label-width="formLabelWidth">
<el-input v-model="version.description" autocomplete="off"></el-input>
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button @click="dialogFormVisible = false"> </el-button>
<el-button type="primary" @click="insert"> </el-button>
</div>
</el-dialog>
<!-- 列表-->
<el-table :data="arr" style="width: 100%">
<el-table-column label="编号" width="180">
<template slot-scope="scope">
<span style="margin-left: 10px">{{ scope.row.id }}</span>
</template>
</el-table-column>
<el-table-column label="版本类名" width="180">
<template slot-scope="scope">
<span style="margin-left: 10px">{{ scope.row.versionClass }}</span>
</template>
</el-table-column>
<el-table-column label="版本名称" width="180">
<template slot-scope="scope">
<span style="margin-left: 10px">{{ scope.row.name }}</span>
</template>
</el-table-column>
<el-table-column label="版本编码" width="180">
<template slot-scope="scope">
<span style="margin-left: 10px">{{ scope.row.versionCode }}</span>
</template>
</el-table-column>
<el-table-column label="是否激活" width="180">
<template slot-scope="scope">
<span style="margin-left: 10px">{{ scope.row.isActivate }}</span>
</template>
</el-table-column>
<el-table-column label="版本状态" width="180">
<template slot-scope="scope">
<span style="margin-left: 10px">{{ scope.row.status }}</span>
</template>
</el-table-column>
<el-table-column label="版本测试状态" width="180">
<template slot-scope="scope">
<span style="margin-left: 10px">{{ scope.row.testStatus }}</span>
</template>
</el-table-column>
<el-table-column label="规则内容" width="180">
<template slot-scope="scope">
<span style="margin-left: 10px">{{ scope.row.ruleContent }}</span>
</template>
</el-table-column>
<el-table-column label="引擎维护编号" width="180">
<template slot-scope="scope">
<span style="margin-left: 10px">{{ scope.row.engineMaintenanceId }}</span>
</template>
</el-table-column>
<el-table-column label="描述" width="180">
<template slot-scope="scope">
<span style="margin-left: 10px">{{ scope.row.description }}</span>
</template>
</el-table-column>
<el-table-column label="操作">
<template slot-scope="scope">
<el-button size="mini" type="danger" @click="handleDelete(scope.row.id)">
</el-button>
</template>
</el-table-column>
</el-table>
</div>
</template>
<script>
import {list} from "@/api/version/version";
import {del, insert} from "@/api/version/version";
export default {
//import使"
components: {},
props: {},
data() {
//"
return {
arr: [],
version: {},
dialogFormVisible: false,
formLabelWidth: '120px'
};
},
methods: {
List() {
list(this.version).then(res => {
this.arr = res.data;
})
},
submitForm() {
this.List();
},
insert() {
insert(this.version).then(res => {
this.$message.success("添加成功");
})
this.dialogFormVisible = false;
},
handleDelete(id) {
if (confirm("你确定删除吗?")) {
del(id).then(res => {
this.$message.success(res.msg || "删除成功")
})
}
}
},
// - 访this",
created() {
this.List();
}
}
</script>
<style scoped>
</style>

View File

@ -0,0 +1,98 @@
<template>
<div>
<div class="container">
<div class="card left-card">
<el-card style="margin-top: 50px;">
</el-card>
</div>
<div class="card right-card">
<el-card style="margin-top: 50px;">
<h3>账户余额</h3>
<h1>:{{ userBalanceData.userBalance || '加载中...' }}</h1>
</el-card>
</div>
</div>
<el-card style="margin-top: 50px;">
<h3>接口列表</h3>
<el-divider></el-divider>
<!-- <el-table :data="tableData">-->
<!-- <el-table-column label="">-->
<!-- <template slot-scope="scope">-->
<!-- <span style="margin-left: 10px">{{ scope.row.connectorName }}</span>-->
<!-- </template>-->
<!-- </el-table-column>-->
<!-- </el-table>-->
</el-card>
</div>
</template>
<script>
import {userBalance} from "@/api/system/user";
import {getInfo} from '@/api/login'
import {findConnectorList} from "@/api/port/port";
export default {
name: 'Cards',
data() {
return {
form:{},
tableData:[],
userBalanceData: {
userBalance: '加载中...',
},
}
},
created() {
this.fetchUserBalance();
this.findConnectorList();
},
methods: {
findConnectorList(){
findConnectorList(this.form).then((res)=>{
this.tableData=res.data;
})
},
async fetchUserBalance() {
try {
const userId = localStorage.getItem('userId');
console.log(userId)// userIdlocalStorage
if (!userId) {
this.userBalanceData = { userBalance: '未登录' };
return;
}
const response = await userBalance(userId);
if (response.data ) {
console.log(response.data)
this.userBalanceData.userBalance = response.data;
} else {
this.userBalanceData.userBalance = { userBalance: '获取失败' };
}
} catch (error) {
this.userBalanceData = { userBalance: '获取失败' };
console.error('Error fetching user balance:', error);
}
},
}
};
</script>
<style scoped>
.container {
display: flex;
}
.card {
width: 50%;
padding: 20px;
box-sizing: border-box;
}
.left-card {
background-color: #f1f1f1;
}
.right-card {
background-color: #e1e1e1;
}
</style>

View File

@ -37,8 +37,8 @@ module.exports = {
proxy: { proxy: {
// detail: https://cli.vuejs.org/config/#devserver-proxy // detail: https://cli.vuejs.org/config/#devserver-proxy
[process.env.VUE_APP_BASE_API]: { [process.env.VUE_APP_BASE_API]: {
target: `http://172.13.1.1/prod-api`, target: `http://172.13.1.1/prod-api/`,
// target: `http://127.0.0.1/8080`, // target: `http://127.0.0.1/8080`, `http://172.13.1.1/prod-api`,
changeOrigin: true, changeOrigin: true,
pathRewrite: { pathRewrite: {
['^' + process.env.VUE_APP_BASE_API]: '' ['^' + process.env.VUE_APP_BASE_API]: ''