mirror of
https://github.com/jeecgboot/JeecgBoot.git
synced 2025-12-08 17:12:28 +08:00
Compare commits
74 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| efd17cdd60 | |||
| 63505e8f6e | |||
| bd4814581a | |||
| c7840a7382 | |||
| c3e049cbd0 | |||
| a6ae4080cb | |||
| 2e90f73da2 | |||
| 85b26230d1 | |||
| fa70a83391 | |||
| bbf85093d5 | |||
| d712776c46 | |||
| 9710b8bc7d | |||
| 3909eb5610 | |||
| cd5fd2f4d4 | |||
| c8a26d73e3 | |||
| e89423c666 | |||
| 67d8cdbc6c | |||
| c14a793906 | |||
| 7f87042e59 | |||
| 4aac17a5e2 | |||
| 5f1d0dafa4 | |||
| 727b67a50d | |||
| dfbbd1bd1f | |||
| 2d9de317c4 | |||
| 56912b766d | |||
| 8baced93a3 | |||
| 0c545517b6 | |||
| a3d6e0ce08 | |||
| 9dcff93372 | |||
| 948e1668b6 | |||
| b17908b581 | |||
| 3bfe099e21 | |||
| 93e755a09c | |||
| 6196f0a463 | |||
| 1481b86fb3 | |||
| eacaa7ed81 | |||
| bc711932f7 | |||
| 44d6f3228f | |||
| dad784228b | |||
| ce02dbbd30 | |||
| d4c2c02602 | |||
| 7935ce86de | |||
| 1224660d1d | |||
| 1b9fc77ec4 | |||
| 4a21f16ade | |||
| a9e6d2ec0c | |||
| e00ac210fe | |||
| cdc245699e | |||
| 9de7f261bb | |||
| ae434bfce4 | |||
| 0ee985da5a | |||
| dbba190980 | |||
| 07c538a1b2 | |||
| 472bf3f35a | |||
| b66fff6c42 | |||
| 2be616ee49 | |||
| 51c63e8057 | |||
| 758c347eb0 | |||
| 7bdc1b06d3 | |||
| e364b950ca | |||
| 3690a6e014 | |||
| 897dcbca78 | |||
| f8c7ddd223 | |||
| 8c143f35f8 | |||
| a5f30ec51f | |||
| 9226ae0aeb | |||
| baefc1338d | |||
| bb6ec4cc2f | |||
| 94053034b4 | |||
| bdbc714233 | |||
| 84f3ce8340 | |||
| b6219301e1 | |||
| a4603a2963 | |||
| 5bfa15d628 |
5
LICENSE
5
LICENSE
@ -200,7 +200,12 @@
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
|
||||
In any case, you must not make any such use of this software as to develop software which may be considered competitive with this software.
|
||||
|
||||
开源协议补充
|
||||
JeecgBoot 是由 北京国炬信息技术有限公司 发行的软件。 总部位于北京,地址:中国·北京·朝阳区科荟前街1号院奥林佳泰大厦。邮箱:jeecgos@163.com
|
||||
本软件受适用的国家软件著作权法(包括国际条约)和双重保护许可。
|
||||
|
||||
1.允许基于本平台软件开展业务系统开发。
|
||||
2.不得基于该平台软件的基础,修改包装成一个与JeecgBoot平台软件功能类似的产品进行发布、销售,或与JeecgBoot参与同类软件产品市场的竞争。
|
||||
违反此条款属于侵权行为,须赔偿侵权经济损失,同时立即停止著作权侵权行为。
|
||||
|
||||
288
README.md
288
README.md
@ -7,13 +7,13 @@
|
||||
JEECG BOOT 低代码开发平台(前后端分离版本)
|
||||
===============
|
||||
|
||||
当前最新版本: 3.0(发布日期:2021-11-01)
|
||||
当前最新版本: 3.2.0(发布日期:2022-04-25)
|
||||
|
||||
|
||||
[](https://github.com/zhangdaiscott/jeecg-boot/blob/master/LICENSE)
|
||||
[](http://www.jeecg.com)
|
||||
[](https://jeecg.blog.csdn.net)
|
||||
[](https://github.com/zhangdaiscott/jeecg-boot)
|
||||
[](https://github.com/zhangdaiscott/jeecg-boot)
|
||||
[](https://github.com/zhangdaiscott/jeecg-boot)
|
||||
[](https://github.com/zhangdaiscott/jeecg-boot)
|
||||
|
||||
@ -47,30 +47,23 @@ Jeecg-Boot低代码开发平台,可以应用在任何J2EE项目的开发中,
|
||||
|
||||
- 在线演示 : [http://boot.jeecg.com](http://boot.jeecg.com)
|
||||
|
||||
- 在线演示(VUE3beta版):[http://boot3.jeecg.com](http://boot3.jeecg.com)
|
||||
|
||||
- 开发文档: [http://doc.jeecg.com](http://doc.jeecg.com)
|
||||
|
||||
- 视频教程 :[JeecgBoot入门视频](http://www.jeecg.com/doc/video)
|
||||
- 入门视频: [https://space.bilibili.com/454617261/channel/series](https://space.bilibili.com/454617261/channel/series)
|
||||
|
||||
- 微服务启动: [单体升级为微服务启动文档2.4+](http://doc.jeecg.com/2043906)
|
||||
- 新手指南: [快速入门](http://www.jeecg.com/doc/quickstart) | [常见问题 ](http://www.jeecg.com/doc/qa) | [技术支持](http://jeecg.com/doc/help) | [1分钟体验低代码](https://my.oschina.net/jeecg/blog/3083313)
|
||||
|
||||
- 常见问题: [入门常见问题Q&A](http://jeecg.com/doc/qa)
|
||||
- 微服务开发: [单体切换为微服务](http://doc.jeecg.com/2704725)
|
||||
|
||||
- 更新日志: [版本日志](http://www.jeecg.com/doc/log)
|
||||
- QQ交流群 : ⑤860162132、683903138(VUE3版)、~~④774126647(满)、③816531124(满)、②769925425(满)、①284271917(满)~~
|
||||
|
||||
|
||||
|
||||
交流互动
|
||||
Vue3版前端(Beta版)
|
||||
-----------------------------------
|
||||
|
||||
- QQ交流群 : ⑤860162132、④774126647(满)、③816531124(满)、②769925425(满)、①284271917(满)
|
||||
> 采用Vue3.0、Vite、 Ant-Design-Vue、TypeScript 等新技术方案,包括二次封装组件、utils、hooks、动态菜单、权限校验、按钮级别权限控制等功能! 是在 Vben-Admin 基础上研发的,适合于JeecgBoot的新版前端VUE3框架。
|
||||
|
||||
- 反馈问题: [反馈问题,请按格式发Issues](https://github.com/zhangdaiscott/jeecg-boot/issues/new)
|
||||
|
||||
- 参与开源: [欢迎加入JEECG开源团队,共同进步!!](http://www.jeecg.com/doc/join)
|
||||
|
||||
- Online一分钟: [1分钟快速学习](https://my.oschina.net/jeecg/blog/3083313)
|
||||
- 源码下载:https://github.com/jeecgboot/jeecgboot-vue3
|
||||
- 入门指南: [开发文档](http://vue3.jeecg.com/2398845) | [ VUE3版演示 ](http://boot3.jeecg.com) | [入门视频](https://www.bilibili.com/video/BV1V34y187Y9)
|
||||
|
||||
|
||||
为什么选择JEECG-BOOT?
|
||||
@ -124,17 +117,54 @@ Jeecg-Boot低代码开发平台,可以应用在任何J2EE项目的开发中,
|
||||
-----------------------------------
|
||||
#### 开发环境
|
||||
|
||||
- 语言:Java 8
|
||||
- 语言:Java 8+ (小于17)
|
||||
|
||||
- IDE(JAVA): IDEA / Eclipse安装lombok插件
|
||||
- IDE(JAVA): IDEA (必须安装lombok插件 )
|
||||
|
||||
- IDE(前端): WebStorm 或者 IDEA
|
||||
- IDE(前端): IDEA 或者 WebStorm
|
||||
|
||||
- 依赖管理:Maven
|
||||
|
||||
- 缓存:Redis
|
||||
|
||||
- 数据库脚本:MySQL5.7+ & Oracle 11g & Sqlserver2017(默认只提供这三个库脚本,其他库需要自己转)
|
||||
- 数据库脚本:MySQL5.7+ & Oracle 11g & Sqlserver2017(默认只提供三个库脚本,其他库需要自己转)
|
||||
|
||||
|
||||
#### 后端
|
||||
|
||||
- 基础框架:Spring Boot 2.6.6
|
||||
|
||||
- 微服务框架: Spring Cloud Alibaba 2021.1
|
||||
|
||||
- 持久层框架:MybatisPlus 3.5.1
|
||||
|
||||
- 报表工具: JimuReport 1.5.0-beta
|
||||
|
||||
- 安全框架:Apache Shiro 1.8.0,Jwt 3.11.0
|
||||
|
||||
- 微服务技术栈:Spring Cloud Alibaba、Nacos、Gateway、Sentinel、Skywalking
|
||||
|
||||
- 数据库连接池:阿里巴巴Druid 1.1.22
|
||||
|
||||
- 日志打印:logback
|
||||
|
||||
- 其他:autopoi, fastjson,poi,Swagger-ui,quartz, lombok(简化代码)等。
|
||||
|
||||
|
||||
#### 前端
|
||||
|
||||
- [Vue 2.6.10](https://cn.vuejs.org/),[Vuex](https://vuex.vuejs.org/zh/),[Vue Router](https://router.vuejs.org/zh/)
|
||||
- [Axios](https://github.com/axios/axios)
|
||||
- [ant-design-vue](https://vuecomponent.github.io/ant-design-vue/docs/vue/introduce-cn/)
|
||||
- [webpack](https://www.webpackjs.com/),[yarn](https://yarnpkg.com/zh-Hans/)
|
||||
- [vue-cropper](https://github.com/xyxiao001/vue-cropper) - 头像裁剪组件
|
||||
- [@antv/g2](https://antv.alipay.com/zh-cn/index.html) - Alipay AntV 数据可视化图表
|
||||
- [Viser-vue](https://viserjs.github.io/docs.html#/viser/guide/installation) - antv/g2 封装实现
|
||||
- eslint,[@vue/cli 3.2.1](https://cli.vuejs.org/zh/guide)
|
||||
- vue-print-nb-jeecg - 打印
|
||||
|
||||
|
||||
#### 支持库
|
||||
|
||||
| 数据库 | 支持 |
|
||||
| --- | --- |
|
||||
@ -151,40 +181,47 @@ Jeecg-Boot低代码开发平台,可以应用在任何J2EE项目的开发中,
|
||||
| Hive、HBase、CouchBase | √ |
|
||||
|
||||
|
||||
#### 后端
|
||||
- 基础框架:Spring Boot 2.3.5.RELEASE
|
||||
|
||||
- 微服务框架: Spring Cloud Alibaba 2.2.3.RELEASE
|
||||
|
||||
- 持久层框架:Mybatis-plus 3.4.3.1、Minidao
|
||||
|
||||
- 报表工具: jimureport 1.3.78
|
||||
|
||||
- 安全框架:Apache Shiro 1.7.0,Jwt 3.11.0
|
||||
|
||||
- 微服务技术栈:Spring Cloud Alibaba、Nacos、Gateway、Sentinel、Skywalking
|
||||
|
||||
- 数据库连接池:阿里巴巴Druid 1.1.22
|
||||
|
||||
- 缓存框架:redis
|
||||
|
||||
- 日志打印:logback
|
||||
|
||||
- 其他:fastjson,poi,Swagger-ui,quartz, lombok(简化代码)等。
|
||||
## 微服务解决方案
|
||||
|
||||
|
||||
#### 前端
|
||||
|
||||
- [Vue 2.6.10](https://cn.vuejs.org/),[Vuex](https://vuex.vuejs.org/zh/),[Vue Router](https://router.vuejs.org/zh/)
|
||||
- [Axios](https://github.com/axios/axios)
|
||||
- [ant-design-vue](https://vuecomponent.github.io/ant-design-vue/docs/vue/introduce-cn/)
|
||||
- [webpack](https://www.webpackjs.com/),[yarn](https://yarnpkg.com/zh-Hans/)
|
||||
- [vue-cropper](https://github.com/xyxiao001/vue-cropper) - 头像裁剪组件
|
||||
- [@antv/g2](https://antv.alipay.com/zh-cn/index.html) - Alipay AntV 数据可视化图表
|
||||
- [Viser-vue](https://viserjs.github.io/docs.html#/viser/guide/installation) - antv/g2 封装实现
|
||||
- eslint,[@vue/cli 3.2.1](https://cli.vuejs.org/zh/guide)
|
||||
- vue-print-nb - 打印
|
||||
1、服务注册和发现 Nacos √
|
||||
|
||||
2、统一配置中心 Nacos √
|
||||
|
||||
3、路由网关 gateway(三种加载方式) √
|
||||
|
||||
4、分布式 http feign √
|
||||
|
||||
5、熔断降级限流 Sentinel √
|
||||
|
||||
6、分布式文件 Minio、阿里OSS √
|
||||
|
||||
7、统一权限控制 JWT + Shiro √
|
||||
|
||||
8、服务监控 SpringBootAdmin√
|
||||
|
||||
9、链路跟踪 Skywalking [参考文档](https://www.kancloud.cn/zhangdaiscott/jeecgcloud/1771670)
|
||||
|
||||
10、消息中间件 RabbitMQ √
|
||||
|
||||
11、分布式任务 xxl-job √
|
||||
|
||||
12、分布式事务 Seata
|
||||
|
||||
13、分布式日志 elk + kafka
|
||||
|
||||
14、支持 docker-compose、k8s、jenkins
|
||||
|
||||
15、CAS 单点登录 √
|
||||
|
||||
16、路由限流 √
|
||||
|
||||
|
||||
#### 微服务架构图
|
||||

|
||||
|
||||
### Jeecg Boot 产品功能蓝图
|
||||

|
||||
|
||||
|
||||
|
||||
@ -323,105 +360,14 @@ Jeecg-Boot低代码开发平台,可以应用在任何J2EE项目的开发中,
|
||||
│ └─我的抄送
|
||||
│ └─流程委派、抄送、跳转
|
||||
│ └─。。。
|
||||
└─其他模块
|
||||
│─OA办公组件 (暂不开源)
|
||||
│ ├─更多功能
|
||||
│ └─。。。
|
||||
└─其他模块 (暂不开源)
|
||||
└─更多功能开发中。。
|
||||
|
||||
```
|
||||
|
||||
## 微服务整体解决方案(2.4+版本)
|
||||
|
||||
|
||||
1、服务注册和发现 Nacos √
|
||||
|
||||
2、统一配置中心 Nacos √
|
||||
|
||||
3、路由网关 gateway(三种加载方式) √
|
||||
|
||||
4、分布式 http feign √
|
||||
|
||||
5、熔断和降级 Sentinel √
|
||||
|
||||
6、分布式文件 Minio、阿里OSS √
|
||||
|
||||
7、统一权限控制 JWT + Shiro √
|
||||
|
||||
8、服务监控 SpringBootAdmin√
|
||||
|
||||
9、链路跟踪 Skywalking [参考文档](https://www.kancloud.cn/zhangdaiscott/jeecgcloud/1771670)
|
||||
|
||||
10、消息中间件 RabbitMQ √
|
||||
|
||||
11、分布式任务 xxl-job √
|
||||
|
||||
12、分布式事务 Seata
|
||||
|
||||
13、分布式日志 elk + kafka
|
||||
|
||||
14、支持 docker-compose、k8s、jenkins
|
||||
|
||||
15、CAS 单点登录 √
|
||||
|
||||
16、路由限流 √
|
||||
|
||||
|
||||
#### 微服务架构图
|
||||

|
||||
|
||||
### Jeecg Boot 产品功能蓝图
|
||||

|
||||
|
||||
|
||||
后台开发环境和依赖
|
||||
----
|
||||
- java
|
||||
- maven
|
||||
- jdk8
|
||||
- mysql
|
||||
- redis
|
||||
- 数据库脚本:jeecg-boot/db/jeecgboot-mysql-5.7.sql
|
||||
- 默认登录账号: admin/123456
|
||||
|
||||
|
||||
前端开发环境和依赖
|
||||
----
|
||||
- node
|
||||
- yarn
|
||||
- webpack
|
||||
- eslint
|
||||
- @vue/cli 3.2.1
|
||||
- [ant-design-vue](https://github.com/vueComponent/ant-design-vue) - Ant Design Of Vue 实现
|
||||
- [vue-cropper](https://github.com/xyxiao001/vue-cropper) - 头像裁剪组件
|
||||
- [@antv/g2](https://antv.alipay.com/zh-cn/index.html) - Alipay AntV 数据可视化图表
|
||||
- [Viser-vue](https://viserjs.github.io/docs.html#/viser/guide/installation) - antv/g2 封装实现
|
||||
- [jeecg-boot-angular 版本](https://gitee.com/dangzhenghui/jeecg-boot)
|
||||
|
||||
项目下载和运行
|
||||
----
|
||||
|
||||
- 拉取项目代码
|
||||
```bash
|
||||
git clone https://github.com/zhangdaiscott/jeecg-boot.git
|
||||
cd jeecg-boot/ant-design-vue-jeecg
|
||||
```
|
||||
|
||||
1. 安装node.js
|
||||
2. 切换到ant-design-vue-jeecg文件夹下
|
||||
```
|
||||
# 安装yarn
|
||||
npm install -g yarn
|
||||
|
||||
# 下载依赖
|
||||
yarn install
|
||||
|
||||
# 启动
|
||||
yarn run serve
|
||||
|
||||
# 编译项目
|
||||
yarn run build
|
||||
|
||||
# Lints and fixes files
|
||||
yarn run lint
|
||||
```
|
||||
|
||||
|
||||
|
||||
@ -471,54 +417,6 @@ yarn run lint
|
||||

|
||||
|
||||
|
||||
其他说明
|
||||
----
|
||||
|
||||
- 项目使用的 [vue-cli3](https://cli.vuejs.org/guide/), 请更新您的 cli
|
||||
|
||||
- 关闭 Eslint (不推荐) 移除 `package.json` 中 `eslintConfig` 整个节点代码
|
||||
|
||||
- 修改 Ant Design 配色,在文件 `vue.config.js` 中,其他 less 变量覆盖参考 [ant design](https://ant.design/docs/react/customize-theme-cn) 官方说明
|
||||
```ecmascript 6
|
||||
css: {
|
||||
loaderOptions: {
|
||||
less: {
|
||||
modifyVars: {
|
||||
/* less 变量覆盖,用于自定义 ant design 主题 */
|
||||
|
||||
'primary-color': '#F5222D',
|
||||
'link-color': '#F5222D',
|
||||
'border-radius-base': '4px',
|
||||
},
|
||||
javascriptEnabled: true,
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
|
||||
|
||||
附属文档
|
||||
----
|
||||
- [Ant Design Vue](https://www.antdv.com/docs/vue/introduce-cn)
|
||||
|
||||
- [报表 viser-vue](https://viserjs.github.io/demo.html#/viser/line/basic-line)
|
||||
|
||||
- [Vue](https://cn.vuejs.org/v2/guide)
|
||||
|
||||
- [路由/菜单说明](https://gitee.com/jeecg/jeecg-boot/tree/v1.1/ant-design-vue-jeecg/src/router/README.md)
|
||||
|
||||
- [ANTD 默认配置项](https://gitee.com/jeecg/jeecg-boot/blob/v1.1/ant-design-vue-jeecg/src/defaultSettings.js)
|
||||
|
||||
- 其他待补充...
|
||||
|
||||
|
||||
备注
|
||||
----
|
||||
|
||||
> @vue/cli 升级后,eslint 规则更新了。由于影响到全部 .vue 文件,需要逐个验证。既暂时关闭部分原本不验证的规则,后期维护时,在逐步修正这些 rules
|
||||
|
||||
|
||||
## 捐赠
|
||||
|
||||
如果觉得还不错,请作者喝杯咖啡吧 ☺
|
||||
|
||||
@ -1,3 +1,6 @@
|
||||
NODE_ENV=production
|
||||
VUE_APP_PLATFORM_NAME=JeecgBoot 企业级低代码平台
|
||||
VUE_APP_SSO=false
|
||||
# 开启单点登录
|
||||
VUE_APP_SSO=false
|
||||
# 开启微应用模式
|
||||
VUE_APP_QIANKUN=false
|
||||
|
||||
@ -1,4 +1,7 @@
|
||||
NODE_ENV=development
|
||||
VUE_APP_API_BASE_URL=http://localhost:8080/jeecg-boot
|
||||
VUE_APP_CAS_BASE_URL=http://cas.example.org:8443/cas
|
||||
VUE_APP_ONLINE_BASE_URL=http://fileview.jeecg.com/onlinePreview
|
||||
VUE_APP_ONLINE_BASE_URL=http://fileview.jeecg.com/onlinePreview
|
||||
|
||||
# 微应用列表必须VUE_APP_SUB_开头,jeecg-app-1为子应用的项目名称,也是子应用的路由父路径
|
||||
VUE_APP_SUB_jeecg-app-1 = '//localhost:8092'
|
||||
|
||||
@ -1,21 +1,213 @@
|
||||
MIT License
|
||||
Apache License
|
||||
Version 2.0, January 2004
|
||||
http://www.apache.org/licenses/
|
||||
|
||||
Copyright (c) 2019 DaiHao Zhang
|
||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
1. Definitions.
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
"License" shall mean the terms and conditions for use, reproduction,
|
||||
and distribution as defined by Sections 1 through 9 of this document.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
"Licensor" shall mean the copyright owner or entity authorized by
|
||||
the copyright owner that is granting the License.
|
||||
|
||||
"Legal Entity" shall mean the union of the acting entity and all
|
||||
other entities that control, are controlled by, or are under common
|
||||
control with that entity. For the purposes of this definition,
|
||||
"control" means (i) the power, direct or indirect, to cause the
|
||||
direction or management of such entity, whether by contract or
|
||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||
|
||||
"You" (or "Your") shall mean an individual or Legal Entity
|
||||
exercising permissions granted by this License.
|
||||
|
||||
"Source" form shall mean the preferred form for making modifications,
|
||||
including but not limited to software source code, documentation
|
||||
source, and configuration files.
|
||||
|
||||
"Object" form shall mean any form resulting from mechanical
|
||||
transformation or translation of a Source form, including but
|
||||
not limited to compiled object code, generated documentation,
|
||||
and conversions to other media types.
|
||||
|
||||
"Work" shall mean the work of authorship, whether in Source or
|
||||
Object form, made available under the License, as indicated by a
|
||||
copyright notice that is included in or attached to the work
|
||||
(an example is provided in the Appendix below).
|
||||
|
||||
"Derivative Works" shall mean any work, whether in Source or Object
|
||||
form, that is based on (or derived from) the Work and for which the
|
||||
editorial revisions, annotations, elaborations, or other modifications
|
||||
represent, as a whole, an original work of authorship. For the purposes
|
||||
of this License, Derivative Works shall not include works that remain
|
||||
separable from, or merely link (or bind by name) to the interfaces of,
|
||||
the Work and Derivative Works thereof.
|
||||
|
||||
"Contribution" shall mean any work of authorship, including
|
||||
the original version of the Work and any modifications or additions
|
||||
to that Work or Derivative Works thereof, that is intentionally
|
||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||
or by an individual or Legal Entity authorized to submit on behalf of
|
||||
the copyright owner. For the purposes of this definition, "submitted"
|
||||
means any form of electronic, verbal, or written communication sent
|
||||
to the Licensor or its representatives, including but not limited to
|
||||
communication on electronic mailing lists, source code control systems,
|
||||
and issue tracking systems that are managed by, or on behalf of, the
|
||||
Licensor for the purpose of discussing and improving the Work, but
|
||||
excluding communication that is conspicuously marked or otherwise
|
||||
designated in writing by the copyright owner as "Not a Contribution."
|
||||
|
||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||
on behalf of whom a Contribution has been received by Licensor and
|
||||
subsequently incorporated within the Work.
|
||||
|
||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
copyright license to reproduce, prepare Derivative Works of,
|
||||
publicly display, publicly perform, sublicense, and distribute the
|
||||
Work and such Derivative Works in Source or Object form.
|
||||
|
||||
3. Grant of Patent License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
(except as stated in this section) patent license to make, have made,
|
||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||
where such license applies only to those patent claims licensable
|
||||
by such Contributor that are necessarily infringed by their
|
||||
Contribution(s) alone or by combination of their Contribution(s)
|
||||
with the Work to which such Contribution(s) was submitted. If You
|
||||
institute patent litigation against any entity (including a
|
||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||
or a Contribution incorporated within the Work constitutes direct
|
||||
or contributory patent infringement, then any patent licenses
|
||||
granted to You under this License for that Work shall terminate
|
||||
as of the date such litigation is filed.
|
||||
|
||||
4. Redistribution. You may reproduce and distribute copies of the
|
||||
Work or Derivative Works thereof in any medium, with or without
|
||||
modifications, and in Source or Object form, provided that You
|
||||
meet the following conditions:
|
||||
|
||||
(a) You must give any other recipients of the Work or
|
||||
Derivative Works a copy of this License; and
|
||||
|
||||
(b) You must cause any modified files to carry prominent notices
|
||||
stating that You changed the files; and
|
||||
|
||||
(c) You must retain, in the Source form of any Derivative Works
|
||||
that You distribute, all copyright, patent, trademark, and
|
||||
attribution notices from the Source form of the Work,
|
||||
excluding those notices that do not pertain to any part of
|
||||
the Derivative Works; and
|
||||
|
||||
(d) If the Work includes a "NOTICE" text file as part of its
|
||||
distribution, then any Derivative Works that You distribute must
|
||||
include a readable copy of the attribution notices contained
|
||||
within such NOTICE file, excluding those notices that do not
|
||||
pertain to any part of the Derivative Works, in at least one
|
||||
of the following places: within a NOTICE text file distributed
|
||||
as part of the Derivative Works; within the Source form or
|
||||
documentation, if provided along with the Derivative Works; or,
|
||||
within a display generated by the Derivative Works, if and
|
||||
wherever such third-party notices normally appear. The contents
|
||||
of the NOTICE file are for informational purposes only and
|
||||
do not modify the License. You may add Your own attribution
|
||||
notices within Derivative Works that You distribute, alongside
|
||||
or as an addendum to the NOTICE text from the Work, provided
|
||||
that such additional attribution notices cannot be construed
|
||||
as modifying the License.
|
||||
|
||||
You may add Your own copyright statement to Your modifications and
|
||||
may provide additional or different license terms and conditions
|
||||
for use, reproduction, or distribution of Your modifications, or
|
||||
for any such Derivative Works as a whole, provided Your use,
|
||||
reproduction, and distribution of the Work otherwise complies with
|
||||
the conditions stated in this License.
|
||||
|
||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||
any Contribution intentionally submitted for inclusion in the Work
|
||||
by You to the Licensor shall be under the terms and conditions of
|
||||
this License, without any additional terms or conditions.
|
||||
Notwithstanding the above, nothing herein shall supersede or modify
|
||||
the terms of any separate license agreement you may have executed
|
||||
with Licensor regarding such Contributions.
|
||||
|
||||
6. Trademarks. This License does not grant permission to use the trade
|
||||
names, trademarks, service marks, or product names of the Licensor,
|
||||
except as required for reasonable and customary use in describing the
|
||||
origin of the Work and reproducing the content of the NOTICE file.
|
||||
|
||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||
agreed to in writing, Licensor provides the Work (and each
|
||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||
implied, including, without limitation, any warranties or conditions
|
||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||
appropriateness of using or redistributing the Work and assume any
|
||||
risks associated with Your exercise of permissions under this License.
|
||||
|
||||
8. Limitation of Liability. In no event and under no legal theory,
|
||||
whether in tort (including negligence), contract, or otherwise,
|
||||
unless required by applicable law (such as deliberate and grossly
|
||||
negligent acts) or agreed to in writing, shall any Contributor be
|
||||
liable to You for damages, including any direct, indirect, special,
|
||||
incidental, or consequential damages of any character arising as a
|
||||
result of this License or out of the use or inability to use the
|
||||
Work (including but not limited to damages for loss of goodwill,
|
||||
work stoppage, computer failure or malfunction, or any and all
|
||||
other commercial damages or losses), even if such Contributor
|
||||
has been advised of the possibility of such damages.
|
||||
|
||||
9. Accepting Warranty or Additional Liability. While redistributing
|
||||
the Work or Derivative Works thereof, You may choose to offer,
|
||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||
or other liability obligations and/or rights consistent with this
|
||||
License. However, in accepting such obligations, You may act only
|
||||
on Your own behalf and on Your sole responsibility, not on behalf
|
||||
of any other Contributor, and only if You agree to indemnify,
|
||||
defend, and hold each Contributor harmless for any liability
|
||||
incurred by, or claims asserted against, such Contributor by reason
|
||||
of your accepting any such warranty or additional liability.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
APPENDIX: How to apply the Apache License to your work.
|
||||
|
||||
To apply the Apache License to your work, attach the following
|
||||
boilerplate notice, with the fields enclosed by brackets "[]"
|
||||
replaced with your own identifying information. (Don't include
|
||||
the brackets!) The text should be enclosed in the appropriate
|
||||
comment syntax for the file format. We also recommend that a
|
||||
file or class name and description of purpose be included on the
|
||||
same "printed page" as the copyright notice for easier
|
||||
identification within third-party archives.
|
||||
|
||||
Copyright (c) 2019 <a href="http://www.jeecg.com">Jeecg Boot</a> All rights reserved.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
|
||||
In any case, you must not make any such use of this software as to develop software which may be considered competitive with this software.
|
||||
|
||||
开源协议补充
|
||||
JeecgBoot 是由 北京国炬信息技术有限公司 发行的软件。 总部位于北京,地址:中国·北京·朝阳区科荟前街1号院奥林佳泰大厦。邮箱:jeecgos@163.com
|
||||
本软件受适用的国家软件著作权法(包括国际条约)和双重保护许可。
|
||||
|
||||
1.允许基于本平台软件开展业务系统开发。
|
||||
2.不得基于该平台软件的基础,修改包装成一个与JeecgBoot平台软件功能类似的产品进行发布、销售,或与JeecgBoot参与同类软件产品市场的竞争。
|
||||
违反此条款属于侵权行为,须赔偿侵权经济损失,同时立即停止著作权侵权行为。
|
||||
解释权归:http://www.jeecg.com
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
Ant Design Jeecg Vue
|
||||
====
|
||||
|
||||
当前最新版本: 3.0.0(发布日期:2021-11-01)
|
||||
当前最新版本: 3.1.0(发布日期:20220301)
|
||||
|
||||
Overview
|
||||
----
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "vue-antd-jeecg",
|
||||
"version": "3.0.0",
|
||||
"version": "3.1.0",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"pre": "cnpm install || yarn --registry https://registry.npm.taobao.org || npm install --registry https://registry.npm.taobao.org ",
|
||||
@ -11,7 +11,7 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"ant-design-vue": "^1.7.2",
|
||||
"@jeecg/antd-online-mini": "3.0.0-RC",
|
||||
"@jeecg/antd-online-mini": "3.1.0-beta",
|
||||
"@antv/data-set": "^0.11.4",
|
||||
"viser-vue": "^2.4.8",
|
||||
"axios": "^0.18.0",
|
||||
@ -44,7 +44,8 @@
|
||||
"xe-utils": "2.4.8",
|
||||
"vxe-table": "2.9.13",
|
||||
"vxe-table-plugin-antd": "1.8.10",
|
||||
"cron-parser": "^2.10.0"
|
||||
"cron-parser": "^2.10.0",
|
||||
"qiankun": "^2.5.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/polyfill": "^7.2.5",
|
||||
|
||||
4
ant-design-vue-jeecg/public/index.html
vendored
4
ant-design-vue-jeecg/public/index.html
vendored
@ -240,9 +240,7 @@
|
||||
/* 滚动条优化 end */
|
||||
</style>
|
||||
<!-- 全局配置 -->
|
||||
<script>
|
||||
window._CONFIG = {};
|
||||
</script>
|
||||
<script src="<%= BASE_URL %>static/config.js"></script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
11
ant-design-vue-jeecg/public/static/config.js
Normal file
11
ant-design-vue-jeecg/public/static/config.js
Normal file
@ -0,0 +1,11 @@
|
||||
/**
|
||||
* 存放配置常量(当值不为空时会覆盖env配置)
|
||||
*/
|
||||
window._CONFIG = {
|
||||
//接口父路径
|
||||
VUE_APP_API_BASE_URL: '',
|
||||
//单点登录地址
|
||||
VUE_APP_CAS_BASE_URL: '',
|
||||
//文件预览路径
|
||||
VUE_APP_ONLINE_BASE_URL: ''
|
||||
}
|
||||
33
ant-design-vue-jeecg/src/assets/less/AppIcon.less
Normal file
33
ant-design-vue-jeecg/src/assets/less/AppIcon.less
Normal file
@ -0,0 +1,33 @@
|
||||
@active-color: #11da75;
|
||||
ul {
|
||||
max-height: 700px;
|
||||
overflow-y: auto;
|
||||
padding-left: .5rem;
|
||||
img {
|
||||
width:64px;
|
||||
height:64px;
|
||||
padding: .2rem;
|
||||
margin: .3rem;
|
||||
cursor: pointer;
|
||||
&.active, &:hover {
|
||||
border: 1px solid @active-color;
|
||||
border-radius: 2px;
|
||||
color: #fff;
|
||||
transition: all .3s;
|
||||
}
|
||||
}
|
||||
li {
|
||||
list-style: none;
|
||||
float: left;
|
||||
text-align: center;
|
||||
cursor: pointer;
|
||||
color: #555;
|
||||
transition: color .3s ease-in-out,background-color .3s ease-in-out;
|
||||
position: relative;
|
||||
margin: 3px 0;
|
||||
border-radius: 4px;
|
||||
background-color: #fff;
|
||||
overflow: hidden;
|
||||
padding: 10px 0 0;
|
||||
}
|
||||
}
|
||||
@ -123,7 +123,17 @@
|
||||
if(this.async){
|
||||
if(!this.selectedAsyncValue || !this.selectedAsyncValue.key || this.selectedAsyncValue.key!=this.value){
|
||||
console.log("这才请求后台")
|
||||
getAction(`/sys/dict/loadDictItem/${this.dict}`,{key:this.value}).then(res=>{
|
||||
//update-begin-author:taoyan date:20220112 for: 方法initSelectValue 根据下拉框实际值查询下拉框的显示的文本 因后台接口只处理3个参数,所以将过滤条件去掉
|
||||
// TODO 隐患 查询效率问题 还是应该在后台作筛选
|
||||
let itemDictStr = this.dict
|
||||
let arr = itemDictStr.split(',')
|
||||
if(arr && arr.length==4){
|
||||
// 删除最后一个元素
|
||||
arr.pop();
|
||||
itemDictStr = arr.join(',')
|
||||
}
|
||||
//update-end-author:taoyan date:20220112 for: 方法initSelectValue 根据下拉框实际值查询下拉框的显示的文本 因后台接口只处理3个参数,所以将过滤条件去掉
|
||||
getAction(`/sys/dict/loadDictItem/${itemDictStr}`,{key:this.value}).then(res=>{
|
||||
if(res.success){
|
||||
let obj = {
|
||||
key:this.value,
|
||||
|
||||
@ -145,8 +145,8 @@ export default {
|
||||
if (this.hideYear || this.hideSecond) return v
|
||||
const vs = v.split(' ')
|
||||
if (vs.length >= 6) {
|
||||
// 转成 Quartz 的规则
|
||||
vs[5] = this.convertWeekToQuartz(vs[5])
|
||||
// 将 Quartz 星期 的规则转换为 CronParser 的规则
|
||||
vs[5] = this.convertQuartzWeekToCParser(vs[5])
|
||||
}
|
||||
return vs.slice(0, vs.length - 1).join(' ')
|
||||
},
|
||||
@ -230,9 +230,10 @@ export default {
|
||||
if (values.length > i) this.year = values[i]
|
||||
this.assignInput()
|
||||
},
|
||||
// Quartz 的规则:
|
||||
// 1 = 周日,2 = 周一,3 = 周二,4 = 周三,5 = 周四,6 = 周五,7 = 周六
|
||||
convertWeekToQuartz(week) {
|
||||
// 将 Quartz 星期 的规则转换为 CronParser 的规则:
|
||||
// Quartz 的规则:1 = 周日,2 = 周一,3 = 周二,4 = 周三,5 = 周四,6 = 周五,7 = 周六
|
||||
// CronParser 的规则: 0 = 周日,1 = 周一,2 = 周二,3 = 周三,4 = 周四,5 = 周五,6 = 周六,7 = 周日
|
||||
convertQuartzWeekToCParser(week) {
|
||||
let convert = (v) => {
|
||||
if (v === '0') {
|
||||
return '1'
|
||||
|
||||
@ -1,11 +1,11 @@
|
||||
export const WEEK_MAP_EN = {
|
||||
'SUN': '0',
|
||||
'MON': '1',
|
||||
'TUE': '2',
|
||||
'WED': '3',
|
||||
'THU': '4',
|
||||
'FRI': '5',
|
||||
'SAT': '6'
|
||||
'SUN': '1',
|
||||
'MON': '2',
|
||||
'TUE': '3',
|
||||
'WED': '4',
|
||||
'THU': '5',
|
||||
'FRI': '6',
|
||||
'SAT': '7'
|
||||
}
|
||||
|
||||
export const replaceWeekName = (c) => {
|
||||
@ -14,7 +14,7 @@ export const replaceWeekName = (c) => {
|
||||
Object.keys(WEEK_MAP_EN).forEach(k => {
|
||||
c = c.replace(new RegExp(k, 'g'), WEEK_MAP_EN[k])
|
||||
})
|
||||
c = c.replace(new RegExp('7', 'g'), '0')
|
||||
// c = c.replace(new RegExp('7', 'g'), '0')
|
||||
}
|
||||
// console.info('after: ' + c)
|
||||
return c
|
||||
|
||||
@ -29,6 +29,13 @@
|
||||
width: 4em;
|
||||
}
|
||||
|
||||
.week {
|
||||
.list-check-item {
|
||||
width: 5em;
|
||||
text-align: left;
|
||||
}
|
||||
}
|
||||
|
||||
.tip-info {
|
||||
color: #999
|
||||
}
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<div class="config-list">
|
||||
<div class="config-list week">
|
||||
<a-radio-group v-model="type">
|
||||
<div class="item">
|
||||
<a-radio value="TYPE_NOT_SET" class="choice" :disabled="disableChoice">不设置</a-radio>
|
||||
@ -36,8 +36,8 @@
|
||||
<a-radio value="TYPE_SPECIFY" class="choice" :disabled="disableChoice">指定</a-radio>
|
||||
<div class="list">
|
||||
<a-checkbox-group v-model="valueList">
|
||||
<template v-for="i in specifyRange">
|
||||
<a-checkbox class="list-check-item" :key="`key-${i}`" :value="i" :disabled="type!==TYPE_SPECIFY || disabled">{{i}}</a-checkbox>
|
||||
<template v-for="(v,k) in WEEK_MAP">
|
||||
<a-checkbox class="list-check-item" :key="`key-${v}`" :value="v" :disabled="type!==TYPE_SPECIFY || disabled">{{k}}</a-checkbox>
|
||||
</template>
|
||||
</a-checkbox-group>
|
||||
</div>
|
||||
|
||||
@ -666,6 +666,7 @@
|
||||
|
||||
<div v-else-if="col.type === formTypes.slot" :key="i">
|
||||
<a-tooltip v-bind="buildTooltipProps(row, col, id)">
|
||||
<!-- update:sunjianlei date:2022-1-17 for:buildProps新增参数 -->
|
||||
<slot
|
||||
:name="(col.slot || col.slotName) || col.key"
|
||||
:index="rowIndex"
|
||||
@ -679,6 +680,7 @@
|
||||
:target="getVM()"
|
||||
:handleChange="(v)=>handleChangeSlotCommon(v,id,row,col)"
|
||||
:isNotPass="notPassedIds.includes(col.key+row.id)"
|
||||
:buildProps="()=>buildProps(row,col)"
|
||||
/>
|
||||
</a-tooltip>
|
||||
</div>
|
||||
@ -1849,7 +1851,9 @@
|
||||
}
|
||||
}
|
||||
if (edited) {
|
||||
this.elemValueChange(column.type, {[newValueKey]: newValue}, column, newValue)
|
||||
// update-begin-author:sunjianlei date:20211222 for: 修复 setValues 触发的 valueChange 事件没有id的问题
|
||||
this.elemValueChange(column.type, {id: rowKey}, column, newValue)
|
||||
// update-end-author:sunjianlei date:20211222 for: 修复 setValues 触发的 valueChange 事件没有id的问题
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -2012,7 +2016,7 @@
|
||||
{ title: '网址', value: 'url', pattern: /^(?:([A-Za-z]+):)?(\/{0,3})([0-9.\-A-Za-z]+)(?::(\d+))?(?:\/([^?#]*))?(?:\?([^#]*))?(?:#(.*))?$/ },
|
||||
{ title: '电子邮件', value: 'e', pattern: /^([\w]+\.*)([\w]+)@[\w]+\.\w{3}(\.\w{2}|)$/ },
|
||||
{ title: '手机号码', value: 'm', pattern: /^1[3456789]\d{9}$/ },
|
||||
{ title: '邮政编码', value: 'p', pattern: /^[1-9]\d{5}$/ },
|
||||
{ title: '邮政编码', value: 'p', pattern: /^[0-9]{6}$/ },
|
||||
{ title: '字母', value: 's', pattern: /^[A-Z|a-z]+$/ },
|
||||
{ title: '数字', value: 'n', pattern: /^-?\d+(\.?\d+|\d?)$/ },
|
||||
{ title: '整数', value: 'z', pattern: /^-?\d+$/ },
|
||||
|
||||
@ -143,6 +143,10 @@
|
||||
}
|
||||
},
|
||||
handleEmpty() {
|
||||
// 禁用时,不允许清空内容
|
||||
if (this.disabled) {
|
||||
return
|
||||
}
|
||||
this.showText = ''
|
||||
let destFieldsArr = this.destFields.split(',')
|
||||
if (destFieldsArr.length === 0) {
|
||||
|
||||
@ -103,6 +103,8 @@
|
||||
<a-col :md="8" :xs="24" style="margin-bottom: 12px;">
|
||||
<!-- 下拉搜索 -->
|
||||
<j-search-select-tag v-if="item.type==='sel_search'" v-model="item.val" :dict="getDictInfo(item)" placeholder="请选择"/>
|
||||
<!-- 下拉框 -->
|
||||
<j-search-select-tag v-else-if="item.type==='list' && item.dictTable" v-model="item.val" :dict="getDictInfo(item)" placeholder="请选择"/>
|
||||
<!-- 下拉多选 -->
|
||||
<template v-else-if="item.type==='list_multi'">
|
||||
<j-multi-select-tag v-if="item.options" v-model="item.val" :options="item.options" placeholder="请选择"/>
|
||||
@ -136,14 +138,14 @@
|
||||
v-else-if="item.type === 'select-user' || item.type === 'sel_user'"
|
||||
v-model="item.val"
|
||||
:buttons="false"
|
||||
:multiple="false"
|
||||
:multiple="allowMultiple(item)"
|
||||
placeholder="请选择用户"
|
||||
:returnKeys="['id', item.customReturnField || 'username']"
|
||||
/>
|
||||
<j-select-depart
|
||||
v-else-if="item.type === 'select-depart' || item.type === 'sel_depart'"
|
||||
v-model="item.val"
|
||||
:multi="false"
|
||||
:multi="allowMultiple(item)"
|
||||
placeholder="请选择部门"
|
||||
:customReturnField="item.customReturnField || 'id'"
|
||||
/>
|
||||
@ -331,7 +333,12 @@
|
||||
let child = { ...item2 }
|
||||
child.label = child.label || child.text
|
||||
child.label = data.label + '-' + child.label
|
||||
child.value = data.value + ',' + child.value
|
||||
// update--begin--author:sunjianlei-----date:20220121------for:【JTC-1167】【表单设计器】高级查询,一对一字段查询不好使
|
||||
// 是否仅包含字段名,不需要拼接子表表名
|
||||
if (!data.onlyFieldName) {
|
||||
child.value = data.value + ',' + child.value
|
||||
}
|
||||
// update--end--author:sunjianlei-----date:20220121------for:【JTC-1167】【表单设计器】高级查询,一对一字段查询不好使
|
||||
child.val = ''
|
||||
return child
|
||||
})
|
||||
|
||||
@ -1402,7 +1402,7 @@ const fooPatterns = [
|
||||
{title: '网址', value: 'url', pattern: /^(?:([A-Za-z]+):)?(\/{0,3})([0-9.\-A-Za-z]+)(?::(\d+))?(?:\/([^?#]*))?(?:\?([^#]*))?(?:#(.*))?$/},
|
||||
{title: '电子邮件', value: 'e', pattern: /^([\w]+\.*)([\w]+)@[\w]+\.\w{3}(\.\w{2}|)$/},
|
||||
{title: '手机号码', value: 'm', pattern: /^1[3456789]\d{9}$/},
|
||||
{title: '邮政编码', value: 'p', pattern: /^[1-9]\d{5}$/},
|
||||
{title: '邮政编码', value: 'p', pattern: /^[0-9]{6}$/},
|
||||
{title: '字母', value: 's', pattern: /^[A-Z|a-z]+$/},
|
||||
{title: '数字', value: 'n', pattern: /^-?\d+(\.?\d+|\d?)$/},
|
||||
{title: '整数', value: 'z', pattern: /^-?\d+$/},
|
||||
@ -1442,4 +1442,4 @@ function uniqueValidator(event) {
|
||||
}
|
||||
}
|
||||
return Promise.resolve()
|
||||
}
|
||||
}
|
||||
|
||||
@ -10,6 +10,7 @@
|
||||
<a-popconfirm
|
||||
v-if="showRemove"
|
||||
:title="`确定要删除这 ${selectedRowIds.length} 项吗?`"
|
||||
:disabled="disabled"
|
||||
@confirm="trigger('remove')"
|
||||
>
|
||||
<a-button icon="minus" :disabled="disabled">删除</a-button>
|
||||
|
||||
@ -22,7 +22,7 @@
|
||||
@initComp="initComp"/>
|
||||
<span style="display: inline-block;height:100%;padding-left:14px" v-if="departIds" >
|
||||
<span @click="openSelect" style="display: inline-block;vertical-align: middle">{{ departNames }}</span>
|
||||
<a-icon style="margin-left:5px;vertical-align: middle" type="close-circle" @click="handleEmpty" title="清空"/>
|
||||
<a-icon v-if="!componentDisabled" style="margin-left:5px;vertical-align: middle" type="close-circle" @click="handleEmpty" title="清空"/>
|
||||
</span>
|
||||
</div>
|
||||
</template>
|
||||
@ -98,6 +98,10 @@
|
||||
},
|
||||
methods: {
|
||||
openSelect(){
|
||||
// disabled 不弹窗
|
||||
if (this.componentDisabled) {
|
||||
return
|
||||
}
|
||||
this.$refs.innerDepartSelectModal.show()
|
||||
},
|
||||
handleEmpty(){
|
||||
|
||||
@ -21,7 +21,7 @@
|
||||
@initComp="initComp"/>
|
||||
<span style="display: inline-block;height:100%;padding-left:14px" v-if="userIds" >
|
||||
<span @click="openSelect" style="display: inline-block;vertical-align: middle">{{ userNames }}</span>
|
||||
<a-icon style="margin-left:5px;vertical-align: middle" type="close-circle" @click="handleEmpty" title="清空"/>
|
||||
<a-icon v-if="!componentDisabled" style="margin-left:5px;vertical-align: middle" type="close-circle" @click="handleEmpty" title="清空"/>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
@ -119,6 +119,10 @@
|
||||
},
|
||||
methods: {
|
||||
openSelect() {
|
||||
// disabled 不弹窗
|
||||
if (this.componentDisabled) {
|
||||
return
|
||||
}
|
||||
this.$refs.selectModal.showModal()
|
||||
},
|
||||
selectOK(rows, idstr) {
|
||||
|
||||
@ -87,6 +87,10 @@
|
||||
this.$emit('change',this.inputContent)
|
||||
},
|
||||
pop(){
|
||||
// disabled 不弹窗
|
||||
if (this.disabled) {
|
||||
return
|
||||
}
|
||||
this.visible=true
|
||||
this.$nextTick(() => {
|
||||
this.$refs.textarea.focus()
|
||||
|
||||
@ -58,7 +58,7 @@
|
||||
:dataSource="table.dataSource"
|
||||
:pagination="table.pagination"
|
||||
:loading="table.loading"
|
||||
:rowSelection="{fixed:true,selectedRowKeys: table.selectedRowKeys, onChange: handleChangeInTableSelect}"
|
||||
:rowSelection="{type:rowSelectionType,fixed:true,selectedRowKeys: table.selectedRowKeys, onChange: handleChangeInTableSelect}"
|
||||
@change="handleChangeInTable"
|
||||
style="min-height: 300px"
|
||||
:scroll="tableScroll"
|
||||
@ -171,7 +171,11 @@
|
||||
computed:{
|
||||
showSearchFlag(){
|
||||
return this.queryInfo && this.queryInfo.length>0
|
||||
}
|
||||
},
|
||||
// 行选择框类型,根据是否多选来控制显示为单选框还是多选框
|
||||
rowSelectionType() {
|
||||
return this.multi ? 'checkbox' : 'radio'
|
||||
},
|
||||
},
|
||||
methods:{
|
||||
loadColumnsInfo(){
|
||||
@ -201,6 +205,12 @@
|
||||
}
|
||||
this.table.columns = [...currColumns]
|
||||
this.initQueryInfo()
|
||||
} else {
|
||||
this.$error({
|
||||
title: '出错了',
|
||||
content: (<p>Popup初始化失败,请检查你的配置或稍后重试!<br/>错误信息如下:{res.message}</p>),
|
||||
onOk: () => this.close(),
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
@ -421,6 +431,11 @@
|
||||
this.table.selectionRows.splice(rowKey_index,1);
|
||||
}
|
||||
}
|
||||
// 判断是否允许多选,如果不允许多选,就只存储最后一个选中的行
|
||||
if (!this.multi && this.table.selectedRowKeys.length > 1) {
|
||||
this.table.selectionRows = [this.table.selectionRows.pop()]
|
||||
this.table.selectedRowKeys = [this.table.selectedRowKeys.pop()]
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -11,11 +11,13 @@
|
||||
switchFullscreen
|
||||
cancelText="关闭">
|
||||
<a-spin tip="Loading..." :spinning="false">
|
||||
<a-input-search style="margin-bottom: 1px" placeholder="请输入部门名称按回车进行搜索" @search="onSearch" />
|
||||
<a-input-search v-model="searchValue" style="margin-bottom: 1px" placeholder="请输入部门名称按回车进行搜索" />
|
||||
<a-empty v-if="filterTreeData.length===0"></a-empty>
|
||||
<a-tree
|
||||
v-else
|
||||
checkable
|
||||
:class="treeScreenClass"
|
||||
:treeData="treeData"
|
||||
:treeData="filterTreeData"
|
||||
:checkStrictly="checkStrictly"
|
||||
@check="onCheck"
|
||||
@select="onSelect"
|
||||
@ -24,14 +26,6 @@
|
||||
:expandedKeys="expandedKeys"
|
||||
:checkedKeys="checkedKeys">
|
||||
|
||||
<template slot="title" slot-scope="{title}">
|
||||
<span v-if="title.indexOf(searchValue) > -1">
|
||||
{{title.substr(0, title.indexOf(searchValue))}}
|
||||
<span style="color: #f50">{{searchValue}}</span>
|
||||
{{title.substr(title.indexOf(searchValue) + searchValue.length)}}
|
||||
</span>
|
||||
<span v-else>{{title}}</span>
|
||||
</template>
|
||||
</a-tree>
|
||||
</a-spin>
|
||||
<!--底部父子关联操作和确认取消按钮-->
|
||||
@ -93,6 +87,18 @@
|
||||
'fullscreen': this.fullscreen,
|
||||
}
|
||||
},
|
||||
filterTreeData(){
|
||||
if(!this.searchValue){
|
||||
return this.treeData
|
||||
}
|
||||
let filter = []
|
||||
this.dataList.forEach((item) => {
|
||||
if (item.title.includes(this.searchValue)) {
|
||||
filter.push(Object.assign({}, item, {children: null, isLeaf: true}))
|
||||
}
|
||||
})
|
||||
return filter
|
||||
},
|
||||
},
|
||||
methods:{
|
||||
show(){
|
||||
@ -228,22 +234,6 @@
|
||||
}
|
||||
}
|
||||
return parentKey
|
||||
},
|
||||
onSearch(value){
|
||||
const expandedKeys = this.dataList.map((item) => {
|
||||
if (item.title.indexOf(value) > -1) {
|
||||
return this.getParentKey(item.key,this.treeData)
|
||||
}
|
||||
return null
|
||||
}).filter((item, i, self) => item && self.indexOf(item) === i)
|
||||
|
||||
Object.assign(this, {
|
||||
expandedKeys,
|
||||
searchValue: value,
|
||||
autoExpandParent: true,
|
||||
})
|
||||
|
||||
|
||||
},
|
||||
// 根据 checkedKeys 获取 rows
|
||||
getCheckedRows(checkedKeys) {
|
||||
|
||||
@ -28,14 +28,23 @@
|
||||
</a-col>
|
||||
<a-col :md="18" :sm="24">
|
||||
<a-card :bordered="false">
|
||||
用户账号:
|
||||
<a-input-search
|
||||
:style="{width:'150px',marginBottom:'15px'}"
|
||||
placeholder="请输入账号"
|
||||
v-model="queryParam.username"
|
||||
@search="onSearch"
|
||||
></a-input-search>
|
||||
<a-button @click="searchReset(1)" style="margin-left: 20px" icon="redo">重置</a-button>
|
||||
<a-form-model>
|
||||
<a-form-model-item label="用户账号" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||
<a-row type="flex" :gutter="8">
|
||||
<a-col :span="18">
|
||||
<a-input-search
|
||||
:style="{width:'100%'}"
|
||||
placeholder="请输入账号"
|
||||
v-model="queryParam.username"
|
||||
@search="onSearch"
|
||||
></a-input-search>
|
||||
</a-col>
|
||||
<a-col :span="6">
|
||||
<a-button @click="searchReset(1)" icon="redo">重置</a-button>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</a-form-model-item>
|
||||
</a-form-model>
|
||||
<!--用户列表-->
|
||||
<a-table
|
||||
ref="table"
|
||||
@ -133,6 +142,14 @@
|
||||
form: this.$form.createForm(this),
|
||||
loading: false,
|
||||
expandedKeys: [],
|
||||
labelCol: {
|
||||
xs: { span: 24 },
|
||||
sm: { span: 4 },
|
||||
},
|
||||
wrapperCol: {
|
||||
xs: { span: 24 },
|
||||
sm: { span: 10 },
|
||||
},
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
|
||||
@ -28,6 +28,9 @@
|
||||
</template>
|
||||
<!-- update-end-author:taoyan date:20201221 for:此处删掉transition标签 不知道为什么加上后 页面路由切换的时候即1及菜单切到2及菜单的时候 两个菜单页面会同时出现300-500秒左右 -->
|
||||
</div>
|
||||
<!-- update-begin-author:zyf date:20211129 for:qiankun 挂载子应用盒子 -->
|
||||
<div id="content" class="app-view-box"></div>
|
||||
<!-- update-end-author:zyf date:20211129 for: qiankun 挂载子应用盒子-->
|
||||
</global-layout>
|
||||
</template>
|
||||
|
||||
@ -38,6 +41,7 @@
|
||||
import { triggerWindowResizeEvent } from '@/utils/util'
|
||||
import Vue from 'vue'
|
||||
import { CACHE_INCLUDED_ROUTES } from '@/store/mutation-types'
|
||||
import registerApps from "@/qiankun";
|
||||
|
||||
const indexKey = '/dashboard/analysis'
|
||||
|
||||
@ -92,6 +96,14 @@
|
||||
this.activePage = currentRoute.fullPath
|
||||
},
|
||||
mounted() {
|
||||
if (process.env.VUE_APP_QIANKUN == 'true') {
|
||||
//update-begin-author:zyf date:20211129 for:qiankun 注册子应用
|
||||
if (!window.qiankunStarted) {
|
||||
window.qiankunStarted = true;
|
||||
registerApps();
|
||||
}
|
||||
//update-end-author:zyf date:20211129 for:qiankun 注册子应用
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
'$route': function(newRoute) {
|
||||
|
||||
@ -149,7 +149,8 @@
|
||||
|
||||
<!-- update_begin author:sunjianlei date:20190530 for: 选中首页的时候不显示背景颜色 -->
|
||||
<style lang="less">
|
||||
.ant-menu.ant-menu-root {
|
||||
// 选中首页的时候不显示背景颜色,只应用于左侧菜单
|
||||
.sider .ant-menu.ant-menu-root {
|
||||
& > .ant-menu-item:first-child {
|
||||
background-color: transparent;
|
||||
|
||||
|
||||
@ -150,10 +150,10 @@
|
||||
this.topMenuStyle.headerIndexRight = {}
|
||||
this.topMenuStyle.headerIndexLeft = {}
|
||||
} else {
|
||||
let rightWidth = '360px'
|
||||
let rightWidth = '400px'
|
||||
this.topMenuStyle.topNavHeader = { 'min-width': '165px' }
|
||||
this.topMenuStyle.topSmenuStyle = { 'width': 'calc(100% - 165px)' }
|
||||
this.topMenuStyle.headerIndexRight = { 'min-width': rightWidth }
|
||||
this.topMenuStyle.headerIndexRight = { 'min-width': rightWidth, 'white-space': 'nowrap' }
|
||||
this.topMenuStyle.headerIndexLeft = { 'width': `calc(100% - ${rightWidth})` }
|
||||
}
|
||||
}
|
||||
|
||||
@ -220,7 +220,9 @@
|
||||
overflow-y: auto;
|
||||
}
|
||||
.ant-table-body {
|
||||
min-width: 800px;
|
||||
// update-begin---author:sunjianlei Date:20220104 for: 【JTC-480】移动端不支持左右拖动,需要注释掉此段代码 ------------
|
||||
//min-width: 800px;
|
||||
// update-end---author:sunjianlei Date:20220104 for: 【JTC-480】移动端不支持左右拖动,需要注释掉此段代码 ------------
|
||||
}
|
||||
}
|
||||
.sidemenu {
|
||||
|
||||
@ -23,6 +23,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {getUserList} from '@/api/api'
|
||||
export default {
|
||||
name: "SysAnnouncementModal",
|
||||
components: {
|
||||
@ -59,6 +60,15 @@
|
||||
},
|
||||
methods: {
|
||||
detail (record) {
|
||||
//update-begin---author:wangshuai ---date:20220107 for:将其它页面传递过来的用户名改成用户真实姓名
|
||||
if(record.sender){
|
||||
getUserList({"username":record.sender}).then((res) =>{
|
||||
if(res.success && res.result.records.length>0){
|
||||
record.sender = res.result.records[0].realname
|
||||
}
|
||||
})
|
||||
}
|
||||
//update-end---author:wangshuai ---date:20220107 for:将其它页面传递过来的用户名改成用户真实姓名
|
||||
this.visible = true;
|
||||
this.record = record;
|
||||
},
|
||||
|
||||
@ -183,10 +183,10 @@
|
||||
content: '真的要注销登录吗 ?',
|
||||
onOk() {
|
||||
return that.Logout({}).then(() => {
|
||||
// update-begin author:wangshuai date:20200601 for: 退出登录跳转登录页面
|
||||
that.$router.push({ path: '/user/login' });
|
||||
// update-begin author:scott date:20211223 for:【JTC-198】退出登录体验不好
|
||||
//that.$router.push({ path: '/user/login' });
|
||||
window.location.reload()
|
||||
// update-end author:wangshuai date:20200601 for: 退出登录跳转登录页面
|
||||
// update-end author:scott date:20211223 for:【JTC-198】退出登录体验不好
|
||||
}).catch(err => {
|
||||
that.$message.error({
|
||||
title: '错误',
|
||||
@ -225,17 +225,13 @@
|
||||
// update_begin author:sunjianlei date:20191230 for: 解决外部链接打开失败的问题
|
||||
searchMethods(value) {
|
||||
let route = this.searchMenuOptions.filter(item => item.id === value)[0]
|
||||
//update-begin-author:taoyan date:20210528 for: 【菜单问题】配置一个iframe地址的菜单,内部打开,在搜索菜单上打开却新开了一个窗口
|
||||
if (route.meta.internalOrExternal === true) {
|
||||
window.open(route.meta.url, '_blank')
|
||||
} else {
|
||||
if(route.component.includes('layouts/IframePageView')){
|
||||
this.$router.push(route)
|
||||
}else{
|
||||
this.$router.push({ path: route.path })
|
||||
}
|
||||
//update-begin-author:sunjianlei date:20220111 for: 【JTC-702】【菜单搜索】菜单搜索里点击跳转的菜单,无法将Token信息传递过去
|
||||
if(route.component.includes('layouts/IframePageView')){
|
||||
this.$router.push(route)
|
||||
}else{
|
||||
this.$router.push({ path: route.path })
|
||||
}
|
||||
//update-end-author:taoyan date:20210528 for: 【菜单问题】配置一个iframe地址的菜单,内部打开,在搜索菜单上打开却新开了一个窗口
|
||||
//update-end-author:sunjianlei date:20220111 for: 【JTC-702】【菜单搜索】菜单搜索里点击跳转的菜单,无法将Token信息传递过去
|
||||
this.searchMenuVisible = false
|
||||
},
|
||||
// update_end author:sunjianlei date:20191230 for: 解决外部链接打开失败的问题
|
||||
|
||||
@ -1,10 +1,10 @@
|
||||
/** init domain config */
|
||||
import Vue from 'vue'
|
||||
//设置全局API_BASE_URL
|
||||
Vue.prototype.API_BASE_URL = process.env.VUE_APP_API_BASE_URL
|
||||
Vue.prototype.API_BASE_URL = window._CONFIG.VUE_APP_API_BASE_URL?window._CONFIG.VUE_APP_API_BASE_URL:process.env.VUE_APP_API_BASE_URL
|
||||
window._CONFIG['domianURL'] = Vue.prototype.API_BASE_URL
|
||||
//单点登录地址
|
||||
window._CONFIG['casPrefixUrl'] = process.env.VUE_APP_CAS_BASE_URL
|
||||
window._CONFIG['onlinePreviewDomainURL'] = process.env.VUE_APP_ONLINE_BASE_URL
|
||||
window._CONFIG['casPrefixUrl'] = window._CONFIG.VUE_APP_CAS_BASE_URL?window._CONFIG.VUE_APP_CAS_BASE_URL:process.env.VUE_APP_CAS_BASE_URL
|
||||
window._CONFIG['onlinePreviewDomainURL'] = window._CONFIG.VUE_APP_ONLINE_BASE_URL?window._CONFIG.VUE_APP_ONLINE_BASE_URL:process.env.VUE_APP_ONLINE_BASE_URL
|
||||
window._CONFIG['staticDomainURL'] = Vue.prototype.API_BASE_URL + '/sys/common/static'
|
||||
window._CONFIG['pdfDomainURL'] = Vue.prototype.API_BASE_URL+ '/sys/common/pdf/pdfPreviewIframe'
|
||||
@ -356,7 +356,7 @@ export const constantRouterMap = [
|
||||
{
|
||||
// OAuth2 登录路由
|
||||
path: 'login',
|
||||
name: 'login',
|
||||
name: 'oauth2-app-login',
|
||||
component: () => import(/* webpackChunkName: "oauth2-app.login" */ '@/views/user/oauth2/OAuth2Login')
|
||||
},
|
||||
]
|
||||
|
||||
@ -147,6 +147,10 @@ export const JeecgListMixin = {
|
||||
},
|
||||
searchQuery() {
|
||||
this.loadData(1);
|
||||
// 点击查询清空列表选中行
|
||||
// https://gitee.com/jeecg/jeecg-boot/issues/I4KTU1
|
||||
this.selectedRowKeys = []
|
||||
this.selectionRows = []
|
||||
},
|
||||
superQuery() {
|
||||
this.$refs.superQueryModal.show();
|
||||
|
||||
22
ant-design-vue-jeecg/src/qiankun/apps.js
Normal file
22
ant-design-vue-jeecg/src/qiankun/apps.js
Normal file
@ -0,0 +1,22 @@
|
||||
/**
|
||||
*微应用apps
|
||||
* @name: 微应用名称 - 具有唯一性
|
||||
* @entry: 微应用入口.必选 - 通过该地址加载微应用,
|
||||
* @container: 微应用挂载节点 - 微应用加载完成后将挂载在该节点上
|
||||
* @activeRule: 微应用触发的路由规则 - 触发路由规则后将加载该微应用
|
||||
*/
|
||||
//子应用列表
|
||||
const _apps = [];
|
||||
for (const key in process.env) {
|
||||
if (key.includes('VUE_APP_SUB_')) {
|
||||
const name = key.split('VUE_APP_SUB_')[1];
|
||||
const obj = {
|
||||
name,
|
||||
entry: process.env[key],
|
||||
container: '#content',
|
||||
activeRule: name,
|
||||
};
|
||||
_apps.push(obj)
|
||||
}
|
||||
}
|
||||
export const apps = _apps;
|
||||
68
ant-design-vue-jeecg/src/qiankun/index.js
Normal file
68
ant-design-vue-jeecg/src/qiankun/index.js
Normal file
@ -0,0 +1,68 @@
|
||||
/**
|
||||
* qiankun配置
|
||||
*/
|
||||
import {registerMicroApps, setDefaultMountApp, start, runAfterFirstMounted, addGlobalUncaughtErrorHandler} from 'qiankun';
|
||||
import {apps} from './apps';
|
||||
import {getProps, initGlState} from './state';
|
||||
/**
|
||||
* 重构apps
|
||||
*/
|
||||
function filterApps() {
|
||||
apps.forEach((item) => {
|
||||
//主应用需要传递给微应用的数据。
|
||||
item.props = getProps();
|
||||
//微应用触发的路由规则
|
||||
item.activeRule = genActiveRule('/' + item.activeRule);
|
||||
});
|
||||
return apps;
|
||||
}
|
||||
|
||||
/**
|
||||
* 路由监听
|
||||
* @param {*} routerPrefix 前缀
|
||||
*/
|
||||
function genActiveRule(routerPrefix) {
|
||||
return location => location.pathname.startsWith(routerPrefix);
|
||||
}
|
||||
|
||||
/**
|
||||
* 微应用注册
|
||||
*/
|
||||
function registerApps() {
|
||||
const _apps = filterApps();
|
||||
registerMicroApps(_apps,
|
||||
{
|
||||
beforeLoad: [
|
||||
loadApp => {
|
||||
console.log('before load', loadApp);
|
||||
}
|
||||
],
|
||||
beforeMount: [
|
||||
mountApp => {
|
||||
console.log('before mount', mountApp);
|
||||
}
|
||||
],
|
||||
afterMount: [
|
||||
mountApp => {
|
||||
console.log('before mount', mountApp);
|
||||
}
|
||||
],
|
||||
afterUnmount: [
|
||||
unloadApp => {
|
||||
console.log('after unload', unloadApp);
|
||||
}
|
||||
]
|
||||
});
|
||||
// 设置默认子应用,与 genActiveRule中的参数保持一致
|
||||
// setDefaultMountApp();
|
||||
// 第一个微应用 mount 后需要调用的方法,比如开启一些监控或者埋点脚本。
|
||||
runAfterFirstMounted(() => console.log('开启监控'));
|
||||
// 添加全局的未捕获异常处理器。
|
||||
addGlobalUncaughtErrorHandler(event => console.log(event));
|
||||
// 定义全局状态
|
||||
initGlState();
|
||||
//启动qiankun
|
||||
start({});
|
||||
}
|
||||
|
||||
export default registerApps;
|
||||
41
ant-design-vue-jeecg/src/qiankun/state.js
Normal file
41
ant-design-vue-jeecg/src/qiankun/state.js
Normal file
@ -0,0 +1,41 @@
|
||||
/**
|
||||
*公共数据
|
||||
*/
|
||||
import {initGlobalState} from 'qiankun';
|
||||
import store from '@/store';
|
||||
import router from '@/router';
|
||||
import Vue from 'vue';
|
||||
import {ACCESS_TOKEN} from "@/store/mutation-types"
|
||||
|
||||
//定义传入子应用的数据
|
||||
export function getProps() {
|
||||
return {
|
||||
data: {
|
||||
publicPath: process.env.BASE_URL,
|
||||
token: Vue.ls.get(ACCESS_TOKEN),
|
||||
store,
|
||||
router
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 定义全局状态,并返回通信方法,在主应用使用,微应用通过 props 获取通信方法。
|
||||
* @param state 主应用穿的公共数据
|
||||
*/
|
||||
export function initGlState(info = {userName: 'admin'}) {
|
||||
// 初始化state
|
||||
const actions = initGlobalState(info);
|
||||
// 设置新的值
|
||||
actions.setGlobalState(info);
|
||||
// 注册 观察者 函数 - 响应 globalState 变化,在 globalState 发生改变时触发该 观察者 函数。
|
||||
actions.onGlobalStateChange((newState, prev) => {
|
||||
// state: 变更后的状态; prev 变更前的状态
|
||||
console.info("newState", newState)
|
||||
for (const key in newState) {
|
||||
console.info("onGlobalStateChange", key)
|
||||
}
|
||||
});
|
||||
// 将action对象绑到Vue原型上,为了项目中其他地方使用方便
|
||||
Vue.prototype.$actions = actions;
|
||||
}
|
||||
@ -6,8 +6,8 @@ const getters = {
|
||||
color: state => state.app.color,
|
||||
token: state => state.user.token,
|
||||
avatar: state => {state.user.avatar = Vue.ls.get(USER_INFO).avatar; return state.user.avatar},
|
||||
username: state => state.user.username,
|
||||
nickname: state => {state.user.realname = Vue.ls.get(USER_INFO).realname; return state.user.realname},
|
||||
username: state => state.user.info.username,
|
||||
nickname: state => {state.user.info.realname = Vue.ls.get(USER_INFO).realname; return state.user.info.realname},
|
||||
welcome: state => state.user.welcome,
|
||||
permissionList: state => state.user.permissionList,
|
||||
userInfo: state => {state.user.info = Vue.ls.get(USER_INFO); return state.user.info},
|
||||
|
||||
@ -3,9 +3,9 @@ import Vuex from 'vuex'
|
||||
|
||||
import app from './modules/app'
|
||||
import user from './modules/user'
|
||||
import permission from './modules/permission'
|
||||
import enhance from './modules/enhance'
|
||||
import online from './modules/online'
|
||||
import permission from './modules/permission'
|
||||
import getters from './getters'
|
||||
|
||||
Vue.use(Vuex)
|
||||
|
||||
@ -19,4 +19,12 @@ export function demoFieldDefVal_getAddress(arg) {
|
||||
arg = '朝阳区'
|
||||
}
|
||||
return `北京市 ${arg}`
|
||||
}
|
||||
|
||||
/** 自定义JS函数示例 */
|
||||
export function sayHi(name) {
|
||||
if (!name) {
|
||||
name = '张三'
|
||||
}
|
||||
return `您好,我叫: ${name}`
|
||||
}
|
||||
@ -83,19 +83,19 @@ export function formatDate(value, fmt) {
|
||||
|
||||
// 生成首页路由
|
||||
export function generateIndexRouter(data) {
|
||||
let indexRouter = [{
|
||||
path: '/',
|
||||
name: 'dashboard',
|
||||
//component: () => import('@/components/layouts/BasicLayout'),
|
||||
component: resolve => require(['@/components/layouts/TabLayout'], resolve),
|
||||
meta: { title: '首页' },
|
||||
redirect: '/dashboard/analysis',
|
||||
children: [
|
||||
...generateChildRouters(data)
|
||||
]
|
||||
},{
|
||||
"path": "*", "redirect": "/404", "hidden": true
|
||||
}]
|
||||
let indexRouter = [{
|
||||
path: '/',
|
||||
name: 'dashboard',
|
||||
//component: () => import('@/components/layouts/BasicLayout'),
|
||||
component: resolve => require(['@/components/layouts/TabLayout'], resolve),
|
||||
meta: { title: '首页' },
|
||||
redirect: '/dashboard/analysis',
|
||||
children: [
|
||||
...generateChildRouters(data)
|
||||
]
|
||||
},{
|
||||
"path": "*", "redirect": "/404", "hidden": true
|
||||
}]
|
||||
return indexRouter;
|
||||
}
|
||||
|
||||
@ -106,9 +106,9 @@ function generateChildRouters (data) {
|
||||
for (let item of data) {
|
||||
let component = "";
|
||||
if(item.component.indexOf("layouts")>=0){
|
||||
component = "components/"+item.component;
|
||||
component = "components/"+item.component;
|
||||
}else{
|
||||
component = "views/"+item.component;
|
||||
component = "views/"+item.component;
|
||||
}
|
||||
|
||||
// eslint-disable-next-line
|
||||
@ -206,7 +206,7 @@ export function randomNumber() {
|
||||
}
|
||||
if (arguments.length === 1) {
|
||||
let [length] = arguments
|
||||
// 生成指定长度的随机数字,首位一定不是 0
|
||||
// 生成指定长度的随机数字,首位一定不是 0
|
||||
let nums = [...Array(length).keys()].map((i) => (i > 0 ? random(0, 9) : random(1, 9)))
|
||||
return parseInt(nums.join(''))
|
||||
} else if (arguments.length >= 2) {
|
||||
|
||||
@ -32,6 +32,7 @@
|
||||
size="default"
|
||||
:columns="columns"
|
||||
:data="loadData"
|
||||
:scroll="{}"
|
||||
>
|
||||
<div
|
||||
slot="expandedRowRender"
|
||||
|
||||
@ -31,6 +31,7 @@
|
||||
size="default"
|
||||
:columns="columns"
|
||||
:data="loadData"
|
||||
:scroll="{}"
|
||||
>
|
||||
<div
|
||||
slot="expandedRowRender"
|
||||
|
||||
@ -254,7 +254,7 @@
|
||||
<a-row :gutter="24">
|
||||
<a-col :span="12">
|
||||
<a-form-model-item label="树字典" prop="treeDict">
|
||||
<j-tree-dict v-model="formData.treeDict" placeholder="请选择树字典" parentCode="A01" />
|
||||
<j-tree-dict v-model="formData.treeDict" placeholder="请选择树字典" parentCode="B01" />
|
||||
</a-form-model-item>
|
||||
</a-col>
|
||||
<a-col :span="12">选中的值(v-model):{{ formData.treeDict }}</a-col>
|
||||
@ -410,14 +410,11 @@
|
||||
|
||||
<!-- 省市县级联 -->
|
||||
<a-row :gutter="24">
|
||||
<a-col :span="12">
|
||||
<a-form-model-item label="省市县级联" prop="areaLinkage2">
|
||||
<j-area-linkage v-model="formData.areaLinkage2" type="select"/>
|
||||
</a-form-model-item>
|
||||
</a-col>
|
||||
<a-col :span="12">输入的值(v-model):{{ formData.areaLinkage2 }}</a-col>
|
||||
<a-form-model-item label="省市县级联" prop="areaLinkage2">
|
||||
<j-area-linkage v-model="formData.areaLinkage2" type="select" style="float: left"/>
|
||||
<span style="margin-left: 25px">输入的值(v-model):{{ formData.areaLinkage2 }}</span>
|
||||
</a-form-model-item>
|
||||
</a-row>
|
||||
|
||||
<!-- 功能示例:关闭当前页面 -->
|
||||
<a-row :gutter="24">
|
||||
<a-col :span="12">
|
||||
|
||||
231
ant-design-vue-jeecg/src/views/jeecg/TableOrderTotal.vue
Normal file
231
ant-design-vue-jeecg/src/views/jeecg/TableOrderTotal.vue
Normal file
@ -0,0 +1,231 @@
|
||||
<template>
|
||||
<a-card :bordered="false">
|
||||
<a-row>
|
||||
<a-col>
|
||||
<a-switch v-bind="pageSwitchProps" v-model="pageSwitch"/>
|
||||
</a-col>
|
||||
<a-col>
|
||||
<a-table
|
||||
v-bind="tableProps"
|
||||
@change="handleTableChange"
|
||||
style="margin-top: 20px"
|
||||
>
|
||||
</a-table>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</a-card>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'TableTotal',
|
||||
data() {
|
||||
return {
|
||||
columns: [
|
||||
{
|
||||
title: '#',
|
||||
width: '180px',
|
||||
align: 'center',
|
||||
dataIndex: 'rowIndex',
|
||||
customRender: function (text, r, index) {
|
||||
return (text !== '总计') ? (parseInt(index) + 1) : text
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '姓名',
|
||||
dataIndex: 'name',
|
||||
width: 180,
|
||||
},
|
||||
{
|
||||
title: '贡献点',
|
||||
dataIndex: 'point',
|
||||
width: 180,
|
||||
},
|
||||
{
|
||||
title: '等级',
|
||||
dataIndex: 'level',
|
||||
width: 180,
|
||||
},
|
||||
{
|
||||
title: '更新时间',
|
||||
dataIndex: 'updateTime',
|
||||
width: 180,
|
||||
},
|
||||
],
|
||||
/* 分页参数 */
|
||||
ipagination:{
|
||||
current: 1,
|
||||
pageSize: 10,
|
||||
},
|
||||
dataSource: [
|
||||
{ id:"1",name: '张三', point: 23, level: 3, updateTime: '2019-8-14' },
|
||||
{ name: '小王', point: 6, level: 1, updateTime: '2019-8-13' },
|
||||
{ name: '李四', point: 53, level: 8, updateTime: '2019-8-12' },
|
||||
{ name: '小红', point: 44, level: 5, updateTime: '2019-8-11' },
|
||||
{ name: '王五', point: 97, level: 10, updateTime: '2019-8-10' },
|
||||
{ name: '小明', point: 33, level: 2, updateTime: '2019-8-10' },
|
||||
{ name: '小张', point: 33, level: 2, updateTime: '2019-8-10' },
|
||||
{ name: '小六', point: 33, level: 2, updateTime: '2019-8-10' },
|
||||
{ name: '小五', point: 33, level: 2, updateTime: '2019-8-10' },
|
||||
{ name: '小赵', point: 33, level: 2, updateTime: '2019-8-10' },
|
||||
{ name: '李华', point: 33, level: 2, updateTime: '2019-8-10' },
|
||||
{ name: '小康', point: 33, level: 2, updateTime: '2019-8-10' },
|
||||
{ name: '小鹿', point: 33, level: 2, updateTime: '2019-8-10' },
|
||||
],
|
||||
newArr:[],
|
||||
newDataSource:[],
|
||||
footerDataSource: [],
|
||||
pageSwitch:true
|
||||
}
|
||||
},
|
||||
computed:{
|
||||
// 数据表格的固定属性
|
||||
tableProps(){
|
||||
let tableProps = {
|
||||
size: 'middle',
|
||||
rowKey:'rowIndex',
|
||||
columns: this.columns,
|
||||
scroll: {x: true},
|
||||
}
|
||||
let renderFooter = this.footerDataSource.length === 0 ? null : () => this.renderTableFooter(tableProps)
|
||||
return {
|
||||
...tableProps,
|
||||
ref: 'table',
|
||||
class: 'chart-data-list',
|
||||
pagination:this.pageSwitch?this.ipagination:false,
|
||||
columns: this.columns,
|
||||
dataSource: this.dataSource,
|
||||
footer: renderFooter,
|
||||
}
|
||||
},
|
||||
pageSwitchProps() {
|
||||
return {
|
||||
checkedChildren: '分页',
|
||||
unCheckedChildren: '分页',
|
||||
style: {
|
||||
position: 'absolute',
|
||||
right: '0px',
|
||||
top: '-10px'
|
||||
}
|
||||
}
|
||||
},
|
||||
},
|
||||
mounted() {
|
||||
// this.tableAddTotalRow(this.columns, this.dataSource)
|
||||
/*新增分页合计方法*/
|
||||
this.newDataSource=this.dataSource
|
||||
this.dataHandling(1,this.ipagination.pageSize)
|
||||
},
|
||||
watch:{
|
||||
//update-begin---author:wangshuai ---date:20220209 for:[JTC-494]常用示例->表格合计写法改成新的写法------------
|
||||
'pageSwitch':function(val){
|
||||
if(!val){
|
||||
this.dataHandling('-1',0)
|
||||
}else{
|
||||
this.dataHandling(1,this.ipagination.pageSize)
|
||||
}
|
||||
},
|
||||
'ipagination.current':function(val) {
|
||||
this.dataHandling(val,this.ipagination.pageSize)
|
||||
},
|
||||
//当合计行变化时,绑定滚动条
|
||||
'footerDataSource': {
|
||||
async handler(dataSource) {
|
||||
// 当底部合计行有值,并且显示出来时,再同步滚动条
|
||||
if (dataSource && dataSource.length > 0) {
|
||||
await this.$nextTick()
|
||||
// 同步表与footer滚动
|
||||
let dom = this.$refs.table.$el.querySelectorAll('.ant-table-body')[0]
|
||||
let footerDom = this.$refs.footerTable.$el.querySelectorAll('.ant-table-body')[0]
|
||||
dom.addEventListener(
|
||||
'scroll',
|
||||
() => {
|
||||
footerDom.scrollLeft = dom.scrollLeft
|
||||
},
|
||||
true,
|
||||
)
|
||||
}
|
||||
},
|
||||
//update-end---author:wangshuai ---date:20220209 for:[JTC-494]常用示例->表格合计写法改成新的写法------------
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
/** 表格增加合计行 */
|
||||
tableAddTotalRow(columns, dataSource) {
|
||||
let numKey = 'rowIndex'
|
||||
let totalRow = { [numKey]: '合计' }
|
||||
columns.forEach(column => {
|
||||
let { key, dataIndex } = column
|
||||
if (![key, dataIndex].includes(numKey)) {
|
||||
|
||||
let total = 0
|
||||
dataSource.forEach(data => {
|
||||
total += /^\d+\.?\d?$/.test(data[dataIndex]) ? Number.parseInt(data[dataIndex]) : Number.NaN
|
||||
console.log(data[dataIndex], ':', (/^\d+\.?\d?$/.test(data[dataIndex]) ? Number.parseInt(data[dataIndex]) : Number.NaN))
|
||||
})
|
||||
|
||||
if (Number.isNaN(total)) {
|
||||
total = '-'
|
||||
}
|
||||
totalRow[dataIndex] = total
|
||||
}
|
||||
})
|
||||
|
||||
dataSource.push(totalRow)
|
||||
},
|
||||
handleTableChange(pagination, filters, sorter) {
|
||||
this.ipagination = pagination;
|
||||
},
|
||||
//update-begin---author:wangshuai ---date:20220209 for:[JTC-494]常用示例->表格合计写法改成新的写法------------
|
||||
/*如果分页走这个方法*/
|
||||
dataHandling(pageNo,pageSize) {
|
||||
//根据当前页数和每页显示条数分割数组
|
||||
let arrs = [];
|
||||
//如果pageNo不是-1(不分页),那么需要对数据进行分页计算
|
||||
if(pageNo!=-1){
|
||||
arrs = this.newDataSource.slice((pageNo-1)*pageSize,pageNo*pageSize)
|
||||
}else{
|
||||
arrs = this.newDataSource
|
||||
}
|
||||
let newDataSource=[];
|
||||
let newArr= { };
|
||||
newArr.rowIndex="总计"
|
||||
let level=0;
|
||||
let point=0;
|
||||
//每一项的数值相加
|
||||
for (let j=0;j<arrs.length;j++){
|
||||
level+=arrs[j].level;
|
||||
point+=arrs[j].point;
|
||||
}
|
||||
newArr.level=level;
|
||||
newArr.point=point;
|
||||
newDataSource.push(newArr);
|
||||
//给foot底部数组赋值
|
||||
this.footerDataSource = newDataSource;
|
||||
},
|
||||
// 渲染表格底部合计行
|
||||
renderTableFooter(tableProps) {
|
||||
let h = this.$createElement
|
||||
return h('a-table', {
|
||||
ref: 'footerTable',
|
||||
props: {
|
||||
...tableProps,
|
||||
pagination: false,
|
||||
dataSource: this.footerDataSource,
|
||||
showHeader: false,
|
||||
},
|
||||
})
|
||||
//update-end---author:wangshuai ---date:20220209 for:[JTC-494]常用示例->表格合计写法改成新的写法------------
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="less">
|
||||
/deep/ .chart-data-list .ant-table-footer .ant-table-body{
|
||||
overflow: hidden !important;
|
||||
}
|
||||
/deep/ .ant-table-footer{
|
||||
padding:0;
|
||||
}
|
||||
</style>
|
||||
@ -251,8 +251,6 @@
|
||||
},
|
||||
delRowCustom (index) {
|
||||
console.log(index)
|
||||
let all = this.orderMainModel
|
||||
all['jeecgOrderCustomerList'].splice(index,1);
|
||||
this.orderMainModel.jeecgOrderCustomerList.splice(index,1);
|
||||
this.$forceUpdate();
|
||||
},
|
||||
@ -263,8 +261,6 @@
|
||||
},
|
||||
delRowTicket (index) {
|
||||
console.log(index)
|
||||
let all = this.orderMainModel
|
||||
all['jeecgOrderTicketList'].splice(index,1);
|
||||
this.orderMainModel.jeecgOrderTicketList.splice(index,1);
|
||||
this.$forceUpdate();
|
||||
},
|
||||
|
||||
@ -37,7 +37,9 @@
|
||||
visible: false,
|
||||
bodyStyle:{
|
||||
padding: "0",
|
||||
height:(window.innerHeight-150)+"px"
|
||||
//update-begin---author:wangshuai ---date:20220104 for:[JTC-411]火狐 分屏 图片大时,与按钮重叠,样式不好------------
|
||||
height:(window.innerHeight-140)+"px"
|
||||
//update-begin---author:wangshuai ---date:20220104 for:[JTC-411]火狐 分屏 图片大时,与按钮重叠,样式不好------------
|
||||
},
|
||||
modalWidth:800,
|
||||
}
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
<template>
|
||||
<a-card title="磁盘监控">
|
||||
<a-row>
|
||||
<a-skeleton v-if="loading" active/>
|
||||
<a-row v-else>
|
||||
<template v-if="diskInfo && diskInfo.length>0">
|
||||
<a-col :span="8" v-for="(item,index) in diskInfo" :key=" 'diskInfo'+index ">
|
||||
<dash-chart-demo :title="item.name" :datasource="item.restPPT"></dash-chart-demo>
|
||||
@ -23,6 +24,7 @@
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
loading: true,
|
||||
description: '磁盘监控',
|
||||
//数据集
|
||||
diskInfo:[],
|
||||
@ -32,6 +34,7 @@
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.loading = true
|
||||
getAction(this.url.queryDiskInfo).then((res)=>{
|
||||
if(res.success){
|
||||
for(var i=0;i<res.result.length;i++){
|
||||
@ -39,7 +42,7 @@
|
||||
}
|
||||
this.diskInfo = res.result;
|
||||
}
|
||||
})
|
||||
}).finally(() => this.loading = false)
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<a-skeleton active :loading="loading" :paragraph="{rows: 17}">
|
||||
<a-card>
|
||||
<!-- Radis 信息实时监控 -->
|
||||
<!-- Redis 信息实时监控 -->
|
||||
<a-row :gutter="8">
|
||||
<a-col :sm="24" :xl="12">
|
||||
<area-chart-ty v-bind="memory"/>
|
||||
@ -41,7 +41,7 @@
|
||||
millisec: 3000,
|
||||
// Key 实时数量
|
||||
key: {
|
||||
title: 'Radis Key 实时数量(个)',
|
||||
title: 'Redis Key 实时数量(个)',
|
||||
dataSource: [],
|
||||
y: '数量(个)',
|
||||
height: 340,
|
||||
@ -53,7 +53,7 @@
|
||||
},
|
||||
// 内存实时占用情况
|
||||
memory: {
|
||||
title: 'Radis 内存实时占用情况(KB)',
|
||||
title: 'Redis 内存实时占用情况(KB)',
|
||||
dataSource: [],
|
||||
y: '内存(KB)',
|
||||
min: 0,
|
||||
|
||||
@ -23,12 +23,13 @@
|
||||
</a-alert>
|
||||
<a-input-search @search="onSearch" style="width:100%;margin-top: 10px" placeholder="请输入部门名称"/>
|
||||
<!-- 树-->
|
||||
<a-col :md="10" :sm="24">
|
||||
<template>
|
||||
<div>
|
||||
<a-empty v-if="departTree.length===0" description="暂无部门" style="margin-top: 8px;"/>
|
||||
<template v-else>
|
||||
<a-dropdown :trigger="[this.dropTrigger]" @visibleChange="dropStatus">
|
||||
<span style="user-select: none">
|
||||
<a-tree
|
||||
v-if="loading"
|
||||
v-if="treeLoading"
|
||||
checkable
|
||||
multiple
|
||||
@select="onSelect"
|
||||
@ -49,7 +50,7 @@
|
||||
</a-menu>
|
||||
</a-dropdown>
|
||||
</template>
|
||||
</a-col>
|
||||
</div>
|
||||
</div>
|
||||
</a-card>
|
||||
<!---- author:os_chengtgen -- date:20190827 -- for:切换父子勾选模式 =======------>
|
||||
@ -195,7 +196,7 @@
|
||||
data() {
|
||||
return {
|
||||
iExpandedKeys: [],
|
||||
loading: true,
|
||||
treeLoading: true,
|
||||
autoExpandParent: false,
|
||||
currFlowId: '',
|
||||
currFlowName: '',
|
||||
@ -271,8 +272,10 @@
|
||||
that.allIds = []
|
||||
|
||||
that.iExpandedKeys = []
|
||||
|
||||
that.loading = false
|
||||
//update-begin---author:wangshuai ---date:20220105 for:[JTC-364]sqlserver 部门导入导入失败,部门树数据丢失------------
|
||||
//部门树v-if用到了loading,和上传loading冲突了,换一个名称
|
||||
that.treeLoading = false
|
||||
//update-end---author:wangshuai ---date:20220105 for:[JTC-364]sqlserver 部门导入导入失败,部门树数据丢失------------
|
||||
queryDepartTreeSync().then((res) => {
|
||||
if (res.success) {
|
||||
this.allTreeKeys = [];
|
||||
@ -288,7 +291,8 @@
|
||||
}
|
||||
}
|
||||
that.$nextTick(()=>{
|
||||
that.loading = true
|
||||
//部门树v-if用到了loading,和上传loading冲突了,换一个名称
|
||||
that.treeLoading = true
|
||||
})
|
||||
}
|
||||
})
|
||||
@ -320,7 +324,8 @@
|
||||
that.departTreeAll=that.departTree
|
||||
},
|
||||
refresh() {
|
||||
this.loading = true
|
||||
//部门树v-if用到了loading,和上传loading冲突了,换一个名称
|
||||
this.treeLoading = true
|
||||
this.loadTree()
|
||||
},
|
||||
// 右键操作方法
|
||||
|
||||
@ -59,10 +59,13 @@
|
||||
:loading="loading"
|
||||
@change="handleTableChange">
|
||||
|
||||
<div v-show="queryParam.logType==2" slot="expandedRowRender" slot-scope="record" style="margin: 0">
|
||||
<div style="margin-bottom: 5px"><a-badge status="success" style="vertical-align: middle;"/><span style="vertical-align: middle;">请求方法:{{ record.method }}</span></div>
|
||||
<div><a-badge status="processing" style="vertical-align: middle;"/><span style="vertical-align: middle;">请求参数:{{ record.requestParam }}</span></div>
|
||||
</div>
|
||||
<template v-if="queryParam.logType==='2'" #expandedRowRender="record">
|
||||
<div style="margin: 0">
|
||||
<div style="margin-bottom: 5px"><a-badge status="success" style="vertical-align: middle;"/><span style="vertical-align: middle;">请求方法:{{ record.method }}</span></div>
|
||||
<div><a-badge status="processing" style="vertical-align: middle;"/><span style="vertical-align: middle;">请求参数:{{ record.requestParam }}</span></div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<!-- 字符串超长截取省略号显示-->
|
||||
<span slot="logContent" slot-scope="text, record">
|
||||
<j-ellipsis :value="text" :length="40"/>
|
||||
@ -187,6 +190,10 @@
|
||||
param['superQueryParams'] = encodeURI(this.superQueryParams)
|
||||
param['superQueryMatchType'] = this.superQueryMatchType
|
||||
}
|
||||
//登录日志没有操作类型
|
||||
if (this.tabKey === '1') {
|
||||
param.operateType = ''
|
||||
}
|
||||
return filterObj(param);
|
||||
},
|
||||
|
||||
@ -213,7 +220,7 @@
|
||||
|
||||
let that=this;
|
||||
that.queryParam.logType=key;
|
||||
that.loadData();
|
||||
that.loadData(1);
|
||||
},
|
||||
onDateChange: function (value, dateString) {
|
||||
console.log(dateString[0],dateString[1]);
|
||||
|
||||
@ -47,6 +47,9 @@
|
||||
:dataSource="dataSource"
|
||||
:loading="loading"
|
||||
:rowClassName="getRowClassname">
|
||||
<template slot="ruleValueText" slot-scope="text,record">
|
||||
<j-ellipsis :value="text" :length="15"></j-ellipsis>
|
||||
</template>
|
||||
<span slot="action" slot-scope="text, record">
|
||||
<a @click="handleEdit(record)">
|
||||
<a-icon type="edit"/>编辑
|
||||
@ -72,17 +75,21 @@
|
||||
{
|
||||
title: '规则名称',
|
||||
dataIndex: 'ruleName',
|
||||
key: 'ruleName'
|
||||
key: 'ruleName',
|
||||
width:150,
|
||||
},
|
||||
{
|
||||
title: '规则字段',
|
||||
dataIndex: 'ruleColumn',
|
||||
key: 'ruleColumn'
|
||||
key: 'ruleColumn',
|
||||
width:150,
|
||||
},
|
||||
{
|
||||
title: '规则值',
|
||||
dataIndex: 'ruleValue',
|
||||
key: 'ruleValue'
|
||||
key: 'ruleValue',
|
||||
width:150,
|
||||
scopedSlots: {customRender: "ruleValueText"}
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
|
||||
@ -64,6 +64,7 @@
|
||||
:pagination="ipagination"
|
||||
:loading="loading"
|
||||
:rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
|
||||
:scroll="{x:true}"
|
||||
@change="handleTableChange">
|
||||
|
||||
<!-- 字符串超长截取省略号显示-->
|
||||
@ -83,7 +84,7 @@
|
||||
<a-dropdown>
|
||||
<a class="ant-dropdown-link">更多 <a-icon type="down" /></a>
|
||||
<a-menu slot="overlay">
|
||||
<a-menu-item><a @click="executeImmediately(record)">立即执行</a></a-menu-item>
|
||||
<a-menu-item><a @click="executeImmediately(record)">执行一次</a></a-menu-item>
|
||||
<a-menu-item><a @click="handleEdit(record)">编辑</a></a-menu-item>
|
||||
<a-menu-item>
|
||||
<a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
|
||||
|
||||
@ -69,6 +69,7 @@
|
||||
<a @click="handleEdit(record)">编辑</a>
|
||||
<a-divider type="vertical" />
|
||||
|
||||
|
||||
<a-dropdown>
|
||||
<a class="ant-dropdown-link">
|
||||
更多 <a-icon type="down" />
|
||||
|
||||
@ -63,6 +63,7 @@
|
||||
<a @click="handleOpen(record)">用户</a>
|
||||
<a-divider type="vertical"/>
|
||||
|
||||
|
||||
<a-dropdown>
|
||||
<a class="ant-dropdown-link">
|
||||
更多 <a-icon type="down"/>
|
||||
@ -537,6 +538,7 @@
|
||||
}
|
||||
</script>
|
||||
<style scoped>
|
||||
@import '~@assets/less/common.less';
|
||||
/** Button按钮间距 */
|
||||
.ant-btn {
|
||||
margin-left: 8px
|
||||
|
||||
@ -32,9 +32,9 @@
|
||||
<div class="table-operator">
|
||||
<a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
|
||||
<a-button type="primary" icon="download" @click="handleExportXls('系统通告')">导出</a-button>
|
||||
<a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">
|
||||
<a-button type="primary" icon="import">导入</a-button>
|
||||
</a-upload>
|
||||
<!-- <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">-->
|
||||
<!-- <a-button type="primary" icon="import">导入</a-button>-->
|
||||
<!-- </a-upload>-->
|
||||
<a-dropdown v-if="selectedRowKeys.length > 0">
|
||||
<a-menu slot="overlay">
|
||||
<a-menu-item key="1" @click="batchDel">
|
||||
|
||||
@ -69,7 +69,12 @@
|
||||
:loading="loading"
|
||||
:rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
|
||||
@change="handleTableChange">
|
||||
|
||||
<template slot="ruleClassText" slot-scope="text">
|
||||
<j-ellipsis :value="text" :length="30"></j-ellipsis>
|
||||
</template>
|
||||
<template slot="ruleParamsText" slot-scope="text,record">
|
||||
<j-ellipsis :value="text" :length="30"></j-ellipsis>
|
||||
</template>
|
||||
<span slot="action" slot-scope="text, record">
|
||||
<a @click="handleEdit(record)">编辑</a>
|
||||
<a-divider type="vertical"/>
|
||||
@ -131,12 +136,14 @@
|
||||
{
|
||||
title: '规则实现类',
|
||||
align: 'center',
|
||||
dataIndex: 'ruleClass'
|
||||
dataIndex: 'ruleClass',
|
||||
scopedSlots: {customRender: "ruleClassText"}
|
||||
},
|
||||
{
|
||||
title: '规则参数',
|
||||
align: 'center',
|
||||
dataIndex: 'ruleParams'
|
||||
dataIndex: 'ruleParams',
|
||||
scopedSlots: {customRender: "ruleParamsText"}
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
|
||||
@ -68,12 +68,14 @@
|
||||
import {filterDictTextByCache} from '@/components/dict/JDictSelectUtil'
|
||||
|
||||
import {getFileAccessHttpUrl} from '@/api/manage';
|
||||
import {ACCESS_TOKEN} from '@/store/mutation-types'
|
||||
|
||||
export default {
|
||||
name: "SysUserOnlineList",
|
||||
mixins:[JeecgListMixin, mixinDevice],
|
||||
components: {},
|
||||
data () {
|
||||
let currentToken = this.$ls.get(ACCESS_TOKEN)
|
||||
return {
|
||||
description: '在线用户管理页面',
|
||||
queryParam: {
|
||||
@ -84,7 +86,13 @@
|
||||
{
|
||||
title:'用户账号',
|
||||
align:"center",
|
||||
dataIndex: 'username'
|
||||
dataIndex: 'username',
|
||||
customRender: (text,record) => {
|
||||
if(record.token === currentToken) {
|
||||
return text + '(我)'
|
||||
}
|
||||
return text
|
||||
},
|
||||
},{
|
||||
title:'用户姓名',
|
||||
align:"center",
|
||||
|
||||
@ -66,7 +66,7 @@
|
||||
<!-- 操作按钮区域 -->
|
||||
<div class="table-operator" style="border-top: 5px">
|
||||
<a-button @click="handleAdd" type="primary" icon="plus" >添加用户</a-button>
|
||||
<a-button type="primary" icon="download" @click="handleExportXls('用户信息')">导出</a-button>
|
||||
<a-button type="primary" icon="download" @click="handleExportXls('用户信息')">导出</a-button>
|
||||
<a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel">
|
||||
<a-button type="primary" icon="import">导入</a-button>
|
||||
</a-upload>
|
||||
@ -156,6 +156,10 @@
|
||||
</a-popconfirm>
|
||||
</a-menu-item>
|
||||
|
||||
<a-menu-item>
|
||||
<a href="javascript:;" @click="handleAgentSettings(record.username)">代理人</a>
|
||||
</a-menu-item>
|
||||
|
||||
</a-menu>
|
||||
</a-dropdown>
|
||||
</span>
|
||||
@ -374,6 +378,10 @@
|
||||
handleChangePassword(username) {
|
||||
this.$refs.passwordmodal.show(username);
|
||||
},
|
||||
handleAgentSettings(username){
|
||||
this.$refs.sysUserAgentModal.agentSettings(username);
|
||||
this.$refs.sysUserAgentModal.title = "用户代理人设置";
|
||||
},
|
||||
passwordModalOk() {
|
||||
//TODO 密码修改完成 不需要刷新页面,可以把datasource中的数据更新一下
|
||||
},
|
||||
|
||||
@ -51,11 +51,18 @@
|
||||
},
|
||||
|
||||
handleTreeSelect(selectedKeys, event) {
|
||||
if (selectedKeys.length > 0 && this.selectedKeys[0] !== selectedKeys[0]) {
|
||||
this.selectedKeys = [selectedKeys[0]]
|
||||
let orgCode = event.node.dataRef.orgCode
|
||||
this.emitInput(orgCode)
|
||||
//update-begin---author:wangshuai ---date:20220107 for:[JTC-378]通讯录 选中某个部门查询部门人员,想再取消选中查全部,无法取消,只能重新刷新界面------------
|
||||
if (selectedKeys.length > 0) {
|
||||
if(this.selectedKeys[0] !== selectedKeys[0]){
|
||||
this.selectedKeys = [selectedKeys[0]]
|
||||
let orgCode = event.node.dataRef.orgCode
|
||||
this.emitInput(orgCode)
|
||||
}
|
||||
}else{
|
||||
this.selectedKeys = []
|
||||
this.emitInput("")
|
||||
}
|
||||
//update-end---author:wangshuai ---date:20220107 for:[JTC-378]通讯录 选中某个部门查询部门人员,想再取消选中查全部,无法取消,只能重新刷新界面------------
|
||||
},
|
||||
|
||||
emitInput(orgCode) {
|
||||
|
||||
@ -94,7 +94,7 @@
|
||||
title: '手机',
|
||||
width: '15%',
|
||||
align: 'center',
|
||||
dataIndex: 'telephone'
|
||||
dataIndex: 'phone'
|
||||
},
|
||||
// {
|
||||
// title: '手机号',
|
||||
|
||||
@ -1,70 +1,16 @@
|
||||
<template>
|
||||
<a-card :visible="visible">
|
||||
<a-form-model ref="form" :model="model">
|
||||
<a-form-model-item
|
||||
:labelCol="labelCol"
|
||||
:wrapperCol="wrapperCol"
|
||||
label="机构名称">
|
||||
<a-input style="border:0;" placeholder="" v-model="model.departName"/>
|
||||
</a-form-model-item>
|
||||
<a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="上级部门">
|
||||
<a-tree-select
|
||||
disabled
|
||||
style="width:100%;border: 0;border: none;outline:none;"
|
||||
:dropdownStyle="{maxHeight:'200px',overflow:'auto'}"
|
||||
:treeData="treeData"
|
||||
v-model="model.parentId"
|
||||
placeholder="无">
|
||||
</a-tree-select>
|
||||
</a-form-model-item>
|
||||
<a-form-model-item
|
||||
:labelCol="labelCol"
|
||||
:wrapperCol="wrapperCol"
|
||||
label="机构编码">
|
||||
<a-input style="border:0;" placeholder="" v-model="model.orgCode"/>
|
||||
</a-form-model-item>
|
||||
<a-form-model-item
|
||||
:labelCol="labelCol"
|
||||
:wrapperCol="wrapperCol"
|
||||
label="机构类型">
|
||||
<a-radio-group :disabled="true" v-model="model.orgCategory" read-only>
|
||||
<a-radio value="1">
|
||||
公司
|
||||
</a-radio>
|
||||
<a-radio value="2">
|
||||
部门
|
||||
</a-radio>
|
||||
<a-radio value="3">
|
||||
岗位
|
||||
</a-radio>
|
||||
</a-radio-group>
|
||||
</a-form-model-item>
|
||||
<a-form-model-item
|
||||
:labelCol="labelCol"
|
||||
:wrapperCol="wrapperCol"
|
||||
label="排序">
|
||||
<a-input-number style="border:0;" v-model="model.departOrder"/>
|
||||
</a-form-model-item>
|
||||
<a-form-model-item
|
||||
:labelCol="labelCol"
|
||||
:wrapperCol="wrapperCol"
|
||||
label="手机号">
|
||||
<a-input style="border:0;" placeholder="" v-model="model.mobile"/>
|
||||
</a-form-model-item>
|
||||
<a-form-model-item
|
||||
:labelCol="labelCol"
|
||||
:wrapperCol="wrapperCol"
|
||||
label="地址">
|
||||
<a-input style="border:0;" placeholder="" v-model="model.address"/>
|
||||
</a-form-model-item>
|
||||
<a-form-model-item
|
||||
:labelCol="labelCol"
|
||||
:wrapperCol="wrapperCol"
|
||||
label="备注">
|
||||
<a-textarea style="border:0;" placeholder="" v-model="model.memo"/>
|
||||
</a-form-model-item>
|
||||
</a-form-model>
|
||||
</a-card>
|
||||
<div :visible="visible">
|
||||
<a-descriptions size="small" bordered :column="1">
|
||||
<a-descriptions-item label="机构名称">{{model.departName}}</a-descriptions-item>
|
||||
<a-descriptions-item label="上级部门"><span>{{model.parentId}}</span></a-descriptions-item>
|
||||
<a-descriptions-item label="机构编码"><span>{{model.orgCode}}</span></a-descriptions-item>
|
||||
<a-descriptions-item label="机构类型"><span>{{model.orgCategory}}</span></a-descriptions-item>
|
||||
<a-descriptions-item label="排序"><span>{{model.departOrder}}</span></a-descriptions-item>
|
||||
<a-descriptions-item label="手机号"><span>{{model.mobile}}</span></a-descriptions-item>
|
||||
<a-descriptions-item label="地址"><span>{{model.address}}</span></a-descriptions-item>
|
||||
<a-descriptions-item label="备注"><span>{{model.memo}}</span></a-descriptions-item>
|
||||
</a-descriptions>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import { queryIdTree } from '@/api/api'
|
||||
@ -107,18 +53,70 @@
|
||||
},
|
||||
open(record) {
|
||||
this.visible = true;
|
||||
this.$nextTick(() => {
|
||||
this.$refs.form.resetFields()
|
||||
this.model = Object.assign({}, record)
|
||||
})
|
||||
},
|
||||
//update-begin---author:wangshuai ---date:20220211 for:[JTC-174]部门管理界面参考vue3的改改------------
|
||||
this.model = Object.assign({}, record)
|
||||
this.model.parentId = this.findTree(this.treeData,record.parentId);
|
||||
this.model.orgCategory = this.orgCategoryText(record.orgCategory)
|
||||
//update-end---author:wangshuai ---date:20220211 for:[JTC-174]部门管理界面参考vue3的改改------------
|
||||
},
|
||||
clearForm() {
|
||||
this.$refs.form.resetFields();
|
||||
this.treeData = [];
|
||||
},
|
||||
/**
|
||||
* 通过父id查找部门名称
|
||||
* @param treeList 树数组
|
||||
* @param id 父id
|
||||
* @return id对应的部门名称
|
||||
*/
|
||||
findTree(treeList,id){
|
||||
for (let i = 0; i < treeList.length; i++) {
|
||||
let item = treeList[i];
|
||||
//如果当前id和父id相同则返回部门名称
|
||||
if (item.key == id) {
|
||||
return item.title;
|
||||
}
|
||||
let children = item.children
|
||||
//存在子部门进行递归查询
|
||||
if(children){
|
||||
let findResult = this.findTree(children, id);
|
||||
//返回的数据不为空,结束递归,返回结果
|
||||
if (findResult) {
|
||||
return findResult
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
/**
|
||||
* 将机构类型数值翻译成文本
|
||||
* @param orgCategory 部门类别
|
||||
* @return 部门类别对应的文本
|
||||
*/
|
||||
orgCategoryText(orgCategory) {
|
||||
if(orgCategory == 1){
|
||||
return "公司";
|
||||
}else if(orgCategory == 2){
|
||||
return "部门";
|
||||
}else{
|
||||
return "岗位";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style scoped>
|
||||
@import '~@assets/less/common.less'
|
||||
<style scoped lang="less">
|
||||
.ant-descriptions-view{
|
||||
border: 1px solid #f0f0f0;
|
||||
}
|
||||
/deep/ .ant-descriptions-item-label{
|
||||
width:180px
|
||||
}
|
||||
/deep/ .ant-descriptions-item-content span{
|
||||
color:#000000d9;
|
||||
}
|
||||
/deep/ .ant-descriptions-bordered .ant-descriptions-row{
|
||||
border-bottom: 1px solid #f0f0f0 !important;
|
||||
}
|
||||
/deep/ .ant-descriptions-bordered .ant-descriptions-item-label{
|
||||
border-right: 1px solid #f0f0f0;
|
||||
}
|
||||
</style>
|
||||
@ -28,14 +28,15 @@
|
||||
<a-divider>{{item.name}}
|
||||
<a-icon type="delete" size="22" @click="removePredicate(router,index)"/>
|
||||
</a-divider>
|
||||
<div>
|
||||
<template v-for="(tag, index) in item.args">
|
||||
<a-input v-if="index==currentTagIndex" ref="input" type="text" size="small"
|
||||
<!--当name在 genKeyRouter 时不需要指定key,后台自动拼key -->
|
||||
<div v-if="genKeyRouter.includes(item.name)">
|
||||
<template v-for="(tag, tagIndex) in item.args">
|
||||
<a-input v-if="tagIndex==currentTagIndex&&index==currentNameIndex" ref="input" type="text" size="small"
|
||||
:style="{ width: '190px' }"
|
||||
:value="tag"
|
||||
@change="handleInputChange" @blur="handleInputEditConfirm(item,tag,index)"
|
||||
@keyup.enter="handleInputEditConfirm(item,tag,index)"/>
|
||||
<a-tag v-else :key="tag" :closable="true" @close="() => removeTag(item,tag)" @click="editTag(tag,index)">
|
||||
@change="handleInputChange" @blur="handleInputEditConfirm(item,tag,tagIndex)"
|
||||
@keyup.enter="handleInputEditConfirm(item,tag,tagIndex)"/>
|
||||
<a-tag v-else :key="tag" :closable="true" @close="() => removeTag(item,tag)" @click="editTag(tag,tagIndex,index)">
|
||||
{{ tag }}
|
||||
</a-tag>
|
||||
</template>
|
||||
@ -49,11 +50,27 @@
|
||||
新建{{item.name}}
|
||||
</a-tag>
|
||||
</div>
|
||||
<!--当name不在 genKeyRouter 时需要指定key-->
|
||||
<div v-if="!genKeyRouter.includes(item.name)">
|
||||
<template v-for="(value, key) in item.args">
|
||||
<a-row>
|
||||
<a-col :span="5" style="margin-top:2px">
|
||||
<span v-if="key=='header'" >Header名称</span>
|
||||
<span v-if="key=='regexp'">参数值</span>
|
||||
<span v-if="key=='param'">参数名</span>
|
||||
<span v-if="key=='name'">Cookie名称</span>
|
||||
</a-col>
|
||||
<a-col :span="18">
|
||||
<a-input :defaultValue="value" placeholder="参数值" style="width: 70%; margin-right: 8px;margin-top: 3px" @change="(e)=>valueChange(e,item.args,key)"/>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</template>
|
||||
</div>
|
||||
</div>
|
||||
<p class="btn" style="padding-top: 10px">
|
||||
<a-dropdown>
|
||||
<a-menu slot="overlay" @click="predicatesHandleMenuClick">
|
||||
<a-menu-item :key="item" v-for="item in tagArray">{{item}}</a-menu-item>
|
||||
<a-menu slot="overlay">
|
||||
<a-menu-item :key="item.name" v-for="item in tagArray" @click="predicatesHandleMenuClick(item)">{{item.name}}</a-menu-item>
|
||||
</a-menu>
|
||||
<a-button type="dashed" style="margin-left: 8px;width:100%"> 添加路由条件
|
||||
<a-icon type="down"/>
|
||||
@ -113,8 +130,59 @@
|
||||
currentNameIndex: 0,
|
||||
currentTagIndex:-1,
|
||||
predicates: {},
|
||||
filterArray: [{ key: 0, name: '熔断器' }, { key: 1, name: '限流过滤器' }],
|
||||
tagArray: ['Path', 'Host', 'Cookie', 'Header', 'Method', 'Query', 'After', 'Before', 'Between', 'RemoteAddr'],
|
||||
filterArray: [ { key: 1, name: '限流过滤器' }],
|
||||
//gateway对应的规则key
|
||||
tagArray: [
|
||||
{
|
||||
name:'Path',
|
||||
args:[]
|
||||
},
|
||||
{
|
||||
name:'Header',
|
||||
args:{
|
||||
header:'',
|
||||
regexp:''
|
||||
}
|
||||
},
|
||||
{
|
||||
name:'Query',
|
||||
args:{
|
||||
param:'',
|
||||
regexp:''
|
||||
}
|
||||
},
|
||||
{
|
||||
name:'Method',
|
||||
args:[]
|
||||
},
|
||||
{
|
||||
name:'Host',
|
||||
args:[]
|
||||
},
|
||||
{
|
||||
name:'Cookie',
|
||||
args:{
|
||||
name:'',
|
||||
regexp:''
|
||||
}
|
||||
},
|
||||
{
|
||||
name:'After',
|
||||
args:[]
|
||||
},
|
||||
{
|
||||
name:'Before',
|
||||
args:[]
|
||||
},
|
||||
{
|
||||
name:'Between',
|
||||
args:[]
|
||||
},
|
||||
{
|
||||
name:'RemoteAddr',
|
||||
args:[]
|
||||
}
|
||||
],
|
||||
inputVisible: false,
|
||||
inputValue: '',
|
||||
url: {
|
||||
@ -124,7 +192,8 @@
|
||||
router: this.getRouter(),
|
||||
title: '路由编辑',
|
||||
visible: false,
|
||||
loading: false
|
||||
loading: false,
|
||||
genKeyRouter:["Path","Host","Method","After","Before","Between","RemoteAddr"]
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
@ -163,12 +232,22 @@
|
||||
//添加路由选项
|
||||
predicatesHandleMenuClick(e) {
|
||||
this.router.predicates.push({
|
||||
args: [],
|
||||
name: e.key
|
||||
args: e.args,
|
||||
name: e.name,
|
||||
})
|
||||
},
|
||||
editTag(tag,index){
|
||||
this.currentTagIndex=index
|
||||
editTag(tag, tagIndex,index){
|
||||
this.currentNameIndex = index;
|
||||
this.currentTagIndex=tagIndex
|
||||
},
|
||||
/**
|
||||
* 值修改事件
|
||||
* @param e
|
||||
* @param item
|
||||
* @param key
|
||||
*/
|
||||
valueChange(e,item,key){
|
||||
item[key]=e.target.value
|
||||
},
|
||||
//显示输入框
|
||||
showInput(item, index) {
|
||||
@ -226,7 +305,7 @@
|
||||
value: 20
|
||||
}],
|
||||
name:"RequestRateLimiter",
|
||||
title: this.filterArray[1].name
|
||||
title: this.filterArray[0].name
|
||||
})
|
||||
}
|
||||
},
|
||||
|
||||
@ -38,7 +38,7 @@
|
||||
:wrapperCol="wrapperCol"
|
||||
prop="ruleValue"
|
||||
label="规则值">
|
||||
<a-input placeholder="请输入规则值" v-model.trim="model.ruleValue"/>
|
||||
<a-input placeholder="请输入规则值" v-model="model.ruleValue"/>
|
||||
</a-form-model-item>
|
||||
|
||||
<a-form-model-item
|
||||
|
||||
@ -73,7 +73,7 @@
|
||||
:columns="columns"
|
||||
:dataSource="dataSource"
|
||||
:pagination="ipagination"
|
||||
:rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange,onSelect:onSelect}"
|
||||
:rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
|
||||
@change="handleTableChange"
|
||||
>
|
||||
<!-- update-end author:kangxiaolin date:20190921 for:系统发送通知 用户多选失败 #513 -->
|
||||
@ -219,22 +219,12 @@
|
||||
return str;
|
||||
},
|
||||
//--update-begin----author:kangxiaolin---date:20190921------for:系统发送通知 用户多选失败 #513----
|
||||
onSelectChange (selectedRowKeys) {
|
||||
onSelectChange (selectedRowKeys,selectionRows) {
|
||||
this.selectedRowKeys = selectedRowKeys;
|
||||
//update-begin---author:wangshuai ---date:20211227 for:全选不好用------------
|
||||
this.selectionRows = selectionRows;
|
||||
//update-end---author:wangshuai ---date:20211227 for:全选不好用------------
|
||||
},
|
||||
onSelect(record, selected){
|
||||
if(selected == true ){
|
||||
this.selectionRows.push(record);
|
||||
}else {
|
||||
this.selectionRows.forEach(function(item,index,arr){
|
||||
if(item.id == record.id) {
|
||||
arr.splice(index, 1);
|
||||
}
|
||||
})
|
||||
}
|
||||
//--update-end----author:kangxiaolin---date:20190921------for:系统发送通知 用户多选失败 #513----
|
||||
},
|
||||
|
||||
searchReset(){
|
||||
let that = this;
|
||||
Object.keys(that.queryParam).forEach(function(key){
|
||||
|
||||
@ -11,131 +11,42 @@
|
||||
|
||||
<a-spin :spinning="confirmLoading">
|
||||
<a-form-model ref="form" :model="model" :rules="validatorRules">
|
||||
<a-row style="width: 100%;">
|
||||
<a-col :span="24/2">
|
||||
<a-form-model-item
|
||||
:labelCol="labelCol"
|
||||
:wrapperCol="wrapperCol"
|
||||
prop="titile"
|
||||
label="标题">
|
||||
<a-input placeholder="请输入标题" v-model="model.titile" :readOnly="disableSubmit"/>
|
||||
</a-form-model-item>
|
||||
</a-col>
|
||||
<a-col :span="24/2">
|
||||
<a-form-model-item
|
||||
:labelCol="labelCol"
|
||||
:wrapperCol="wrapperCol"
|
||||
prop="msgCategory"
|
||||
label="消息类型">
|
||||
<a-select
|
||||
v-model="model.msgCategory"
|
||||
placeholder="请选择消息类型"
|
||||
:disabled="disableSubmit"
|
||||
:getPopupContainer = "(target) => target.parentNode">
|
||||
<a-select-option value="1">通知公告</a-select-option>
|
||||
<a-select-option value="2">系统消息</a-select-option>
|
||||
</a-select>
|
||||
</a-form-model-item>
|
||||
</a-col>
|
||||
</a-row>
|
||||
<a-row style="width: 100%;">
|
||||
<a-col :span="24/2">
|
||||
<a-form-model-item
|
||||
:labelCol="labelCol"
|
||||
:wrapperCol="wrapperCol"
|
||||
prop="startTime"
|
||||
label="开始时间:">
|
||||
<j-date style="width: 100%" :getCalendarContainer="node => node.parentNode" v-model="model.startTime" placeholder="请选择开始时间" showTime dateFormat="YYYY-MM-DD HH:mm:ss" ></j-date>
|
||||
</a-form-model-item>
|
||||
</a-col>
|
||||
<a-col :span="24/2">
|
||||
<a-form-model-item
|
||||
:labelCol="labelCol"
|
||||
:wrapperCol="wrapperCol"
|
||||
prop="endTime"
|
||||
label="结束时间"
|
||||
class="endTime">
|
||||
<j-date style="width: 100%" :getCalendarContainer="node => node.parentNode" v-model="model.endTime" placeholder="请选择结束时间" showTime dateFormat="YYYY-MM-DD HH:mm:ss"></j-date>
|
||||
</a-form-model-item>
|
||||
</a-col>
|
||||
</a-row>
|
||||
<a-row style="width: 100%;">
|
||||
<a-col :span="24/2">
|
||||
<a-form-model-item
|
||||
:labelCol="labelCol"
|
||||
:wrapperCol="wrapperCol"
|
||||
label="优先级">
|
||||
<a-select
|
||||
v-model="model.priority"
|
||||
placeholder="请选择优先级"
|
||||
:disabled="disableSubmit"
|
||||
:getPopupContainer = "(target) => target.parentNode">
|
||||
<a-select-option value="L">低</a-select-option>
|
||||
<a-select-option value="M">中</a-select-option>
|
||||
<a-select-option value="H">高</a-select-option>
|
||||
</a-select>
|
||||
</a-form-model-item>
|
||||
</a-col>
|
||||
<a-col :span="24/2">
|
||||
<a-form-model-item
|
||||
:labelCol="labelCol"
|
||||
:wrapperCol="wrapperCol"
|
||||
prop="msgType"
|
||||
label="通告类型">
|
||||
<a-select
|
||||
v-model="model.msgType"
|
||||
placeholder="请选择通告类型"
|
||||
:disabled="disableSubmit"
|
||||
@change="chooseMsgType"
|
||||
:getPopupContainer = "(target) => target.parentNode">
|
||||
<a-select-option value="USER">指定用户</a-select-option>
|
||||
<a-select-option value="ALL">全体用户</a-select-option>
|
||||
</a-select>
|
||||
</a-form-model-item>
|
||||
</a-col>
|
||||
</a-row>
|
||||
<a-row style="width: 100%;">
|
||||
<a-col :span="24/2">
|
||||
<a-form-model-item
|
||||
:labelCol="labelCol"
|
||||
:wrapperCol="wrapperCol"
|
||||
prop="msgAbstract"
|
||||
label="摘要">
|
||||
<a-textarea placeholder="请输入摘要" v-model="model.msgAbstract" />
|
||||
</a-form-model-item>
|
||||
</a-col>
|
||||
<a-col :span="24/2">
|
||||
<a-form-model-item
|
||||
:labelCol="labelCol"
|
||||
:wrapperCol="wrapperCol"
|
||||
label="指定用户"
|
||||
v-if="userType">
|
||||
<a-select
|
||||
mode="multiple"
|
||||
placeholder="请选择用户"
|
||||
:labelInValue=true
|
||||
v-model="selectedUser"
|
||||
@dropdownVisibleChange="selectUserIds"
|
||||
@change="handleChange"
|
||||
>
|
||||
</a-select>
|
||||
</a-form-model-item>
|
||||
</a-col>
|
||||
</a-row>
|
||||
<a-row style="width: 100%;">
|
||||
<a-col :span="24">
|
||||
<a-form-model-item
|
||||
:labelCol="labelColX1"
|
||||
:wrapperCol="wrapperColX1"
|
||||
label="内容"
|
||||
class="j-field-content">
|
||||
<j-editor v-model="model.msgContent"></j-editor>
|
||||
</a-form-model-item>
|
||||
</a-col>
|
||||
</a-row>
|
||||
<a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="msgCategory" label="消息类型">
|
||||
<a-radio-group v-model="model.msgCategory" :disabled="disableSubmit">
|
||||
<a-radio value="1">通知公告</a-radio>
|
||||
<a-radio value="2">系统消息</a-radio>
|
||||
</a-radio-group>
|
||||
</a-form-model-item>
|
||||
<a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="titile" label="标题">
|
||||
<a-input placeholder="请输入标题" v-model="model.titile" :readOnly="disableSubmit"/>
|
||||
</a-form-model-item>
|
||||
<a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="msgAbstract" label="摘要">
|
||||
<a-textarea placeholder="请输入摘要" v-model="model.msgAbstract" />
|
||||
</a-form-model-item>
|
||||
<a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="endTime" label="截至日期" class="endTime">
|
||||
<j-date style="width: 100%" :getCalendarContainer="node => node.parentNode" v-model="model.endTime" placeholder="请选择结束时间" showTime dateFormat="YYYY-MM-DD HH:mm:ss" />
|
||||
</a-form-model-item>
|
||||
<a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" prop="msgType" label="接收用户">
|
||||
<a-radio-group v-model="model.msgType" :disabled="disableSubmit" @change="chooseMsgType">
|
||||
<a-radio value="USER">指定用户</a-radio>
|
||||
<a-radio value="ALL">全体用户</a-radio>
|
||||
</a-radio-group>
|
||||
</a-form-model-item>
|
||||
<a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="指定用户" v-if="userType">
|
||||
<j-select-multi-user :returnKeys="returnKeys" placeholder="请选择指定用户" v-model="userIds" :trigger-change="true"></j-select-multi-user>
|
||||
</a-form-model-item>
|
||||
<a-form-model-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="优先级" >
|
||||
<a-radio-group v-model="model.priority" placeholder="请选择优先级" :disabled="disableSubmit">
|
||||
<a-radio value="L">低</a-radio>
|
||||
<a-radio value="M">中</a-radio>
|
||||
<a-radio value="H">高</a-radio>
|
||||
</a-radio-group>
|
||||
</a-form-model-item>
|
||||
<a-form-model-item :labelCol="labelColX1" :wrapperCol="wrapperColX1" label="内容" class="j-field-content">
|
||||
<j-editor v-model="model.msgContent" />
|
||||
</a-form-model-item>
|
||||
</a-form-model>
|
||||
</a-spin>
|
||||
<select-user-list-modal ref="UserListModal" @choseUser="choseUser"></select-user-list-modal>
|
||||
</a-modal>
|
||||
</template>
|
||||
|
||||
@ -159,7 +70,7 @@
|
||||
model: {},
|
||||
labelCol: {
|
||||
xs: { span: 24 },
|
||||
sm: { span: 6 },
|
||||
sm: { span: 4 },
|
||||
},
|
||||
wrapperCol: {
|
||||
xs: { span: 24 },
|
||||
@ -167,11 +78,11 @@
|
||||
},
|
||||
labelColX1: {
|
||||
xs: { span: 24 },
|
||||
sm: { span: 3 },
|
||||
sm: { span: 4 },
|
||||
},
|
||||
wrapperColX1: {
|
||||
xs: { span: 24 },
|
||||
sm: { span: 21 },
|
||||
sm: { span: 18 },
|
||||
},
|
||||
confirmLoading: false,
|
||||
validatorRules:{
|
||||
@ -192,7 +103,8 @@
|
||||
selectedUser:[],
|
||||
disabled:false,
|
||||
msgContent:"",
|
||||
userList:[]
|
||||
userList:[],
|
||||
returnKeys:['id', 'id'] //用户选择返回字段
|
||||
}
|
||||
},
|
||||
created () {
|
||||
@ -208,26 +120,18 @@
|
||||
this.getUser(record);
|
||||
},
|
||||
getUser(record){
|
||||
//update-begin---author:wangshuai ---date:20211227 for:[JTC-191]系统通告参考vue3的来改,为单选按钮附默认值------------
|
||||
record.msgCategory = record.msgCategory?record.msgCategory:"1"
|
||||
record.msgType = record.msgType?record.msgType:"ALL"
|
||||
record.priority = record.priority?record.priority:"H"
|
||||
//update-begin---author:wangshuai ---date:20211227 for:[JTC-191]系统通告参考vue3的来改,为单选按钮附默认值------------
|
||||
this.model = Object.assign({}, record);
|
||||
// 指定用户
|
||||
if(record&&record.msgType === "USER"){
|
||||
this.userType = true;
|
||||
this.userIds = record.userIds;
|
||||
getAction(this.url.queryByIds,{userIds:this.userIds}).then((res)=>{
|
||||
if(res.success){
|
||||
//update--begin--autor:wangshuai-----date:20200601------for:系统公告选人后,不能删除------
|
||||
var userList=[];
|
||||
for(var i=0;i<res.result.length;i++){
|
||||
var user={};
|
||||
user.label =res.result[i].realname;
|
||||
user.key=res.result[i].id;
|
||||
userList.push(user);
|
||||
}
|
||||
this.selectedUser=userList;
|
||||
//update--begin--autor:wangshuai-----date:20200601------for:系统公告选人后,不能删除------
|
||||
this.$refs.UserListModal.edit(res.result,this.userIds);
|
||||
}
|
||||
});
|
||||
//update-begin---author:wangshuai ---date:20220104 for:[JTC-304]指定人员不支持分页勾选,换通用的用户组件------------
|
||||
this.userIds = record.userIds.substr(0,record.userIds.length-1);
|
||||
//update-end---author:wangshuai ---date:20220104 for:[JTC-304]指定人员不支持分页勾选,换通用的用户组件------------
|
||||
}
|
||||
},
|
||||
close () {
|
||||
@ -257,7 +161,9 @@
|
||||
method = 'put';
|
||||
}
|
||||
if(this.userType){
|
||||
this.model.userIds = this.userIds;
|
||||
//update-begin---author:wangshuai ---date:20220104 for:[JTC-304]指定人员不支持分页勾选,换通用的用户组件------------
|
||||
this.model.userIds = this.userIds+",";
|
||||
//update-end---author:wangshuai ---date:20220104 for:[JTC-304]指定人员不支持分页勾选,换通用的用户组件------------
|
||||
}
|
||||
httpAction(httpurl,this.model,method).then((res)=>{
|
||||
if(res.success){
|
||||
@ -271,7 +177,7 @@
|
||||
that.confirmLoading = false;
|
||||
that.close();
|
||||
})
|
||||
|
||||
|
||||
}else{
|
||||
return false;
|
||||
}
|
||||
@ -286,36 +192,17 @@
|
||||
resetUser (){
|
||||
this.userType = false;
|
||||
this.userIds = [];
|
||||
this.selectedUser = [];
|
||||
this.disabled = false;
|
||||
this.$refs.UserListModal.edit(null,null);
|
||||
},
|
||||
selectUserIds() {
|
||||
this.$refs.UserListModal.add(this.selectedUser,this.userIds);
|
||||
},
|
||||
chooseMsgType(value) {
|
||||
if("USER" == value) {
|
||||
chooseMsgType(e) {
|
||||
if("USER" == e.target.value) {
|
||||
this.userType = true;
|
||||
} else {
|
||||
this.userType = false;
|
||||
this.selectedUser = [];
|
||||
this.userIds = [];
|
||||
}
|
||||
},
|
||||
// 子modal回调
|
||||
choseUser:function(userList){
|
||||
this.selectedUser = [];
|
||||
this.userIds = [];
|
||||
for(var i=0;i<userList.length;i++){
|
||||
//update--begin--autor:wangshuai-----date:20200601------for:系统公告选人后,不能删除------
|
||||
var user={};
|
||||
user.label =userList[i].realname;
|
||||
user.key=userList[i].id;
|
||||
this.selectedUser.push(user);
|
||||
//update--end--autor:wangshuai-----date:20200601------for:系统公告选人后,不能删除------
|
||||
this.userIds += userList[i].id+","
|
||||
}
|
||||
},
|
||||
startTimeValidate(rule,value,callback){
|
||||
let endTime = this.model.endTime
|
||||
if(!value || !endTime){
|
||||
@ -336,20 +223,6 @@
|
||||
callback("结束时间需大于开始时间")
|
||||
}
|
||||
},
|
||||
handleChange(userList) {
|
||||
if (userList) {
|
||||
this.userIds = [];
|
||||
var users=[];
|
||||
for (var i = 0; i < userList.length; i++) {
|
||||
var user={};
|
||||
user.id=userList[i].key;
|
||||
user.realname=userList[i].label;
|
||||
this.userIds += userList[i].key + ',';
|
||||
users.push(user);
|
||||
}
|
||||
}
|
||||
this.$refs.UserListModal.edit(users,this.userIds);
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
@ -23,7 +23,7 @@
|
||||
:wrapperCol="wrapperCol"
|
||||
prop="roleCode"
|
||||
label="部门角色编码">
|
||||
<a-input placeholder="请输入部门角色编码" v-model="model.roleCode"/>
|
||||
<a-input placeholder="请输入部门角色编码" v-model="model.roleCode" :read-only="roleCodeRead"/>
|
||||
</a-form-model-item>
|
||||
<a-form-model-item
|
||||
:labelCol="labelCol"
|
||||
@ -76,6 +76,7 @@
|
||||
add: "/sys/sysDepartRole/add",
|
||||
edit: "/sys/sysDepartRole/edit",
|
||||
},
|
||||
roleCodeRead:false //编码时候可以编写
|
||||
}
|
||||
},
|
||||
created () {
|
||||
@ -87,6 +88,9 @@
|
||||
edit (record,departId) {
|
||||
this.departId = departId;
|
||||
this.model = Object.assign({}, record);
|
||||
//update-begin---author:wangshuai ---date:20220104 for:[JTC-367]我的部门->部门角色 角色编码应该不可修改------------
|
||||
this.roleCodeRead = !!this.model.roleCode
|
||||
//update-end---author:wangshuai ---date:20220104 for:[JTC-367]我的部门->部门角色 角色编码应该不可修改------------
|
||||
this.visible = true;
|
||||
},
|
||||
close () {
|
||||
|
||||
@ -21,7 +21,7 @@
|
||||
:labelCol="labelCol"
|
||||
:wrapperCol="wrapperCol"
|
||||
label="代理人用户名">
|
||||
<j-select-user-by-dep placeholder="请输入代理人用户名" v-decorator="['agentUserName', validatorRules.agentUserName]" :trigger-change="true"></j-select-user-by-dep>
|
||||
<j-select-user-by-dep :multi="false" placeholder="请输入代理人用户名" v-decorator="['agentUserName', validatorRules.agentUserName]" :trigger-change="true"></j-select-user-by-dep>
|
||||
</a-form-item>
|
||||
<a-form-item
|
||||
:labelCol="labelCol"
|
||||
|
||||
@ -7,7 +7,7 @@
|
||||
:closable="true"
|
||||
@close="handleCancel"
|
||||
:visible="visible"
|
||||
style="height: 100%;overflow: auto;padding-bottom: 53px;">
|
||||
style="height: 100%;">
|
||||
|
||||
<template slot="title">
|
||||
<div style="width: 100%;">
|
||||
@ -30,7 +30,7 @@
|
||||
<a-form-model-item label="登录密码" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="password" >
|
||||
<a-input type="password" placeholder="请输入登录密码" v-model="model.password" />
|
||||
</a-form-model-item>
|
||||
|
||||
|
||||
<a-form-model-item label="确认密码" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="confirmpassword" >
|
||||
<a-input type="password" @blur="handleConfirmBlur" placeholder="请重新输入登录密码" v-model="model.confirmpassword"/>
|
||||
</a-form-model-item>
|
||||
@ -44,6 +44,10 @@
|
||||
<a-input placeholder="请输入工号" v-model="model.workNo" />
|
||||
</a-form-model-item>
|
||||
|
||||
<a-form-model-item label="手机号码" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="phone">
|
||||
<a-input placeholder="请输入手机号码" v-model="model.phone" />
|
||||
</a-form-model-item>
|
||||
|
||||
<a-form-model-item label="职务" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||
<j-select-position placeholder="请选择职务" :multiple="false" v-model="model.post"/>
|
||||
</a-form-model-item>
|
||||
@ -99,7 +103,7 @@
|
||||
:format="dateFormat"
|
||||
:getCalendarContainer="node => node.parentNode"/>
|
||||
</a-form-model-item>
|
||||
|
||||
|
||||
<a-form-model-item label="性别" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||
<a-select v-model="model.sex" placeholder="请选择性别" :getPopupContainer= "(target) => target.parentNode">
|
||||
<a-select-option :value="1">男</a-select-option>
|
||||
@ -111,10 +115,6 @@
|
||||
<a-input placeholder="请输入邮箱" v-model="model.email" />
|
||||
</a-form-model-item>
|
||||
|
||||
<a-form-model-item label="手机号码" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="phone">
|
||||
<a-input placeholder="请输入手机号码" v-model="model.phone" />
|
||||
</a-form-model-item>
|
||||
|
||||
<a-form-model-item label="座机" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="telephone">
|
||||
<a-input placeholder="请输入座机" v-model="model.telephone" />
|
||||
</a-form-model-item>
|
||||
@ -507,7 +507,7 @@
|
||||
|
||||
.drawer-bootom-button {
|
||||
position: absolute;
|
||||
bottom: -8px;
|
||||
bottom: 0;
|
||||
width: 100%;
|
||||
border-top: 1px solid #e8e8e8;
|
||||
padding: 10px 16px;
|
||||
@ -516,4 +516,10 @@
|
||||
background: #fff;
|
||||
border-radius: 0 0 2px 2px;
|
||||
}
|
||||
</style>
|
||||
|
||||
/*【JTC-502】 添加用户两个滚动条*/
|
||||
/deep/ .ant-drawer-body {
|
||||
padding-bottom: 53px;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
||||
@ -2,18 +2,14 @@
|
||||
<div>
|
||||
<a-form-model ref="form" :model="model" :rules="validatorRules" class="password-retrieval-form" @keyup.enter.native="nextStep">
|
||||
<a-form-model-item label="手机" required prop="phone" :labelCol="{span: 5}" :wrapperCol="{span: 19}">
|
||||
<a-row :gutter="16">
|
||||
<a-col class="gutter-row" :span="20">
|
||||
<a-input v-model="model.phone" type="text" autocomplete="false" placeholder="请输入手机号">
|
||||
<a-icon slot="prefix" type="phone" :style="{ color: 'rgba(0,0,0,.25)'}"/>
|
||||
</a-input>
|
||||
</a-col>
|
||||
</a-row>
|
||||
<a-input v-model="model.phone" type="text" autocomplete="false" placeholder="请输入手机号">
|
||||
<a-icon slot="prefix" type="phone" :style="{ color: 'rgba(0,0,0,.25)'}"/>
|
||||
</a-input>
|
||||
</a-form-model-item>
|
||||
<a-form-model-item v-if="show" required prop="captcha" label="验证码" :labelCol="{span: 5}" :wrapperCol="{span: 19}">
|
||||
<a-row :gutter="16">
|
||||
<a-col class="gutter-row" :span="12">
|
||||
<a-input v-model="model.captcha" type="text" placeholder="手机短信验证码">
|
||||
<a-input @change="captchaChange" v-model="model.captcha" type="text" placeholder="手机短信验证码">
|
||||
<a-icon slot="prefix" type="code" :style="{ color: 'rgba(0,0,0,.25)'}"/>
|
||||
</a-input>
|
||||
</a-col>
|
||||
@ -158,6 +154,10 @@
|
||||
}else{
|
||||
callback()
|
||||
}
|
||||
},
|
||||
//手机号改变事件
|
||||
captchaChange(val){
|
||||
this.$refs['form'].validateField("captcha")
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -14,6 +14,8 @@ module.exports = {
|
||||
*/
|
||||
// 如果你不需要生产环境的 source map,可以将其设置为 false 以加速生产环境构建。
|
||||
productionSourceMap: false,
|
||||
//qiankuan打包时放开
|
||||
//outputDir: "../dist/main",
|
||||
// 多入口配置
|
||||
// pages: {
|
||||
// index: {
|
||||
@ -23,7 +25,7 @@ module.exports = {
|
||||
// }
|
||||
// },
|
||||
//打包app时放开该配置
|
||||
//publicPath:'./',
|
||||
//publicPath:'/',
|
||||
configureWebpack: config => {
|
||||
//生产环境取消 console.log
|
||||
if (process.env.NODE_ENV === 'production') {
|
||||
@ -85,6 +87,15 @@ module.exports = {
|
||||
|
||||
devServer: {
|
||||
port: 3000,
|
||||
// hot: true,
|
||||
// disableHostCheck: true,
|
||||
// overlay: {
|
||||
// warnings: false,
|
||||
// errors: true,
|
||||
// },
|
||||
// headers: {
|
||||
// 'Access-Control-Allow-Origin': '*',
|
||||
// },
|
||||
proxy: {
|
||||
/* '/api': {
|
||||
target: 'https://mock.ihx.me/mock/5baf3052f7da7e07e04a5116/antd-pro', //mock API接口系统
|
||||
@ -94,8 +105,10 @@ module.exports = {
|
||||
'/jeecg-boot': '' //默认所有请求都加了jeecg-boot前缀,需要去掉
|
||||
}
|
||||
},*/
|
||||
/* 注意:jeecgboot前端做了改造,此处不需要配置跨域和后台接口(只需要改.env相关配置文件即可)
|
||||
issues/3462 很多人此处做了配置,导致刷新前端404问题,请一定注意*/
|
||||
'/jeecg-boot': {
|
||||
target: 'http://localhost:8080', //请求本地 需要jeecg-boot后台项目
|
||||
target: 'http://localhost:8080',
|
||||
ws: false,
|
||||
changeOrigin: true
|
||||
},
|
||||
|
||||
@ -814,6 +814,13 @@
|
||||
dependencies:
|
||||
regenerator-runtime "^0.13.4"
|
||||
|
||||
"@babel/runtime@^7.10.5", "@babel/runtime@^7.7.2":
|
||||
version "7.17.2"
|
||||
resolved "https://registry.npmjs.org/@babel/runtime/-/runtime-7.17.2.tgz#66f68591605e59da47523c631416b18508779941"
|
||||
integrity sha512-hzeyJyMA1YGdJTuWU0e/j4wKXrU4OMFvY2MSlaI9B7VQb0r5cxTE3EAIS2Q7Tn2RIcDkRvTA/v2JsAEhxe99uw==
|
||||
dependencies:
|
||||
regenerator-runtime "^0.13.4"
|
||||
|
||||
"@babel/template@^7.10.4":
|
||||
version "7.10.4"
|
||||
resolved "https://registry.npmjs.org/@babel/template/-/template-7.10.4.tgz#3251996c4200ebc71d1a8fc405fba940f36ba278"
|
||||
@ -888,10 +895,10 @@
|
||||
cssnano-preset-default "^4.0.0"
|
||||
postcss "^7.0.0"
|
||||
|
||||
"@jeecg/antd-online-mini@3.0.0-RC":
|
||||
version "3.0.0-RC"
|
||||
resolved "https://registry.npmjs.org/@jeecg/antd-online-mini/-/antd-online-mini-3.0.0-RC.tgz#8b220234d39bfcd9b8b1ce2c78ca1bd92b86da0b"
|
||||
integrity sha512-oNYRPsnlKUPpJKJvQSaqgX6XenDPKwFLHcLYFdrmEYnSCGU46x1p/coqea9r8lI6s1Y2Az0+xAOdwOMPnu/AtQ==
|
||||
"@jeecg/antd-online-mini@3.1.0-beta":
|
||||
version "3.1.0-beta"
|
||||
resolved "https://registry.npmmirror.com/@jeecg/antd-online-mini/-/antd-online-mini-3.1.0-beta.tgz#cf3e254259503405a5e83ffa6775ac9fa02fe74c"
|
||||
integrity sha512-pW0zWzExnxjlC3e7DzGYjQibLU22K/7N0kp1ddJrGgX33Ia/wq7ELOcwn6bLzITD89RcvX1JUW/om+IJ1PxOSw==
|
||||
|
||||
"@mrmlnc/readdir-enhanced@^2.2.1":
|
||||
version "2.2.1"
|
||||
@ -923,7 +930,7 @@
|
||||
error-stack-parser "^2.0.0"
|
||||
string-width "^2.0.0"
|
||||
|
||||
"@tinymce/tinymce-vue@^2.1.0":
|
||||
"@tinymce/tinymce-vue@2.1.0":
|
||||
version "2.1.0"
|
||||
resolved "https://registry.npmjs.org/@tinymce/tinymce-vue/-/tinymce-vue-2.1.0.tgz#cac3e935b217a277424f2258f3235824aa3c17c0"
|
||||
integrity sha512-lDIpeLbkaobS/f00wWaOhGJdiZLdtL0dEDYB4JvqgVeAAoaDFG2PvXXP/kN49xpHpUe8vOdt7xFaN48nrPmsbQ==
|
||||
@ -6267,6 +6274,13 @@ import-from@^2.1.0:
|
||||
dependencies:
|
||||
resolve-from "^3.0.0"
|
||||
|
||||
import-html-entry@^1.9.0:
|
||||
version "1.11.1"
|
||||
resolved "https://registry.npmjs.org/import-html-entry/-/import-html-entry-1.11.1.tgz#3d8c5977926bdd122ab8e658965c102068b4af8d"
|
||||
integrity sha512-O7mCUTwKdYU49/LH6nq1adWPnUlZQpKeGWIEcDq07KTcqP/v0jBLEIVc0oE0Mtlw3CEe0eeKGMyhl6LwfXCV7A==
|
||||
dependencies:
|
||||
"@babel/runtime" "^7.7.2"
|
||||
|
||||
import-local@^1.0.0:
|
||||
version "1.0.0"
|
||||
resolved "https://registry.npmjs.org/import-local/-/import-local-1.0.0.tgz#5e4ffdc03f4fe6c009c6729beb29631c2f8227bc"
|
||||
@ -7671,15 +7685,15 @@ mkdirp@^0.5.1, mkdirp@^0.5.3, mkdirp@~0.5.0, mkdirp@~0.5.1:
|
||||
minimist "^1.2.5"
|
||||
|
||||
moment-timezone@^0.5.31:
|
||||
version "0.5.33"
|
||||
resolved "https://registry.npmjs.org/moment-timezone/-/moment-timezone-0.5.33.tgz#b252fd6bb57f341c9b59a5ab61a8e51a73bbd22c"
|
||||
integrity sha512-PTc2vcT8K9J5/9rDEPe5czSIKgLoGsH8UNpA4qZTVw0Vd/Uz19geE9abbIOQKaAQFcnQ3v5YEXrbSc5BpshH+w==
|
||||
version "0.5.34"
|
||||
resolved "https://registry.npmjs.org/moment-timezone/-/moment-timezone-0.5.34.tgz#a75938f7476b88f155d3504a9343f7519d9a405c"
|
||||
integrity sha512-3zAEHh2hKUs3EXLESx/wsgw6IQdusOT8Bxm3D9UrHPQR7zlMmzwybC8zHEM1tQ4LJwP7fcxrWr8tuBg05fFCbg==
|
||||
dependencies:
|
||||
moment ">= 2.9.0"
|
||||
|
||||
"moment@>= 2.9.0":
|
||||
version "2.29.1"
|
||||
resolved "https://registry.yarnpkg.com/moment/-/moment-2.29.1.tgz#b2be769fa31940be9eeea6469c075e35006fa3d3"
|
||||
resolved "https://registry.npmjs.org/moment/-/moment-2.29.1.tgz#b2be769fa31940be9eeea6469c075e35006fa3d3"
|
||||
integrity sha512-kHmoybcPV8Sqy59DwNDY3Jefr64lK/by/da0ViFcuA4DH0vQg5Q6Ze5VimxkfQNSC+Mls/Kx53s7TjP1RhFEDQ==
|
||||
|
||||
moment@^2.21.0:
|
||||
@ -9298,6 +9312,17 @@ q@^1.1.2:
|
||||
resolved "https://registry.npmjs.org/q/-/q-1.5.1.tgz#7e32f75b41381291d04611f1bf14109ac00651d7"
|
||||
integrity sha1-fjL3W0E4EpHQRhHxvxQQmsAGUdc=
|
||||
|
||||
qiankun@^2.5.1:
|
||||
version "2.6.3"
|
||||
resolved "https://registry.npmjs.org/qiankun/-/qiankun-2.6.3.tgz#00c55a3d6655b2a78b6e0578d70c694cdb662073"
|
||||
integrity sha512-h1NIokwjdt508HNPcWBdzoYFDJvhbpUUlFSa5dDkpJYVCl55iqqHgdyi1YayinmLmr/9s/zD+WQv+A2mbzkMQw==
|
||||
dependencies:
|
||||
"@babel/runtime" "^7.10.5"
|
||||
import-html-entry "^1.9.0"
|
||||
lodash "^4.17.11"
|
||||
single-spa "^5.9.2"
|
||||
tslib "^1.10.0"
|
||||
|
||||
qs@6.7.0:
|
||||
version "6.7.0"
|
||||
resolved "https://registry.npmjs.org/qs/-/qs-6.7.0.tgz#41dc1a015e3d581f1621776be31afb2876a9b1bc"
|
||||
@ -10127,6 +10152,11 @@ simple-swizzle@^0.2.2:
|
||||
dependencies:
|
||||
is-arrayish "^0.3.1"
|
||||
|
||||
single-spa@^5.9.2:
|
||||
version "5.9.3"
|
||||
resolved "https://registry.npmjs.org/single-spa/-/single-spa-5.9.3.tgz#2d151cbb3b273629a5b27b30a3b8ca847dcba4c5"
|
||||
integrity sha512-qMGraRzIBsodV6569Fob4cQ4/yQNrcZ5Achh3SAQDljmqUtjAZ7BAA7GAyO/l5eizb7GtTmVq9Di7ORyKw82CQ==
|
||||
|
||||
slash@^1.0.0:
|
||||
version "1.0.0"
|
||||
resolved "https://registry.npmjs.org/slash/-/slash-1.0.0.tgz#c41f2f6c39fc16d1cd17ad4b5d896114ae470d55"
|
||||
@ -10870,7 +10900,7 @@ tinycolor2@^1.4.1:
|
||||
resolved "https://registry.npmjs.org/tinycolor2/-/tinycolor2-1.4.1.tgz#f4fad333447bc0b07d4dc8e9209d8f39a8ac77e8"
|
||||
integrity sha1-9PrTM0R7wLB9TcjpIJ2POaisd+g=
|
||||
|
||||
tinymce@^5.3.2:
|
||||
tinymce@5.4.1:
|
||||
version "5.4.1"
|
||||
resolved "https://registry.npmjs.org/tinymce/-/tinymce-5.4.1.tgz#4c101e78cbd22c148d6013f7c66eb0cb480723db"
|
||||
integrity sha512-eUjwDVCTSHSnFfpzX5TjTHXsGj5gvPQwzo3RFDF374gfK5voHqcRGojvQnu4NtNW1BAb012/KW1tkXBbUrEveg==
|
||||
|
||||
@ -1,21 +1,213 @@
|
||||
MIT License
|
||||
Apache License
|
||||
Version 2.0, January 2004
|
||||
http://www.apache.org/licenses/
|
||||
|
||||
Copyright (c) 2019 jeecg-boot
|
||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
1. Definitions.
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
"License" shall mean the terms and conditions for use, reproduction,
|
||||
and distribution as defined by Sections 1 through 9 of this document.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
"Licensor" shall mean the copyright owner or entity authorized by
|
||||
the copyright owner that is granting the License.
|
||||
|
||||
"Legal Entity" shall mean the union of the acting entity and all
|
||||
other entities that control, are controlled by, or are under common
|
||||
control with that entity. For the purposes of this definition,
|
||||
"control" means (i) the power, direct or indirect, to cause the
|
||||
direction or management of such entity, whether by contract or
|
||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||
|
||||
"You" (or "Your") shall mean an individual or Legal Entity
|
||||
exercising permissions granted by this License.
|
||||
|
||||
"Source" form shall mean the preferred form for making modifications,
|
||||
including but not limited to software source code, documentation
|
||||
source, and configuration files.
|
||||
|
||||
"Object" form shall mean any form resulting from mechanical
|
||||
transformation or translation of a Source form, including but
|
||||
not limited to compiled object code, generated documentation,
|
||||
and conversions to other media types.
|
||||
|
||||
"Work" shall mean the work of authorship, whether in Source or
|
||||
Object form, made available under the License, as indicated by a
|
||||
copyright notice that is included in or attached to the work
|
||||
(an example is provided in the Appendix below).
|
||||
|
||||
"Derivative Works" shall mean any work, whether in Source or Object
|
||||
form, that is based on (or derived from) the Work and for which the
|
||||
editorial revisions, annotations, elaborations, or other modifications
|
||||
represent, as a whole, an original work of authorship. For the purposes
|
||||
of this License, Derivative Works shall not include works that remain
|
||||
separable from, or merely link (or bind by name) to the interfaces of,
|
||||
the Work and Derivative Works thereof.
|
||||
|
||||
"Contribution" shall mean any work of authorship, including
|
||||
the original version of the Work and any modifications or additions
|
||||
to that Work or Derivative Works thereof, that is intentionally
|
||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||
or by an individual or Legal Entity authorized to submit on behalf of
|
||||
the copyright owner. For the purposes of this definition, "submitted"
|
||||
means any form of electronic, verbal, or written communication sent
|
||||
to the Licensor or its representatives, including but not limited to
|
||||
communication on electronic mailing lists, source code control systems,
|
||||
and issue tracking systems that are managed by, or on behalf of, the
|
||||
Licensor for the purpose of discussing and improving the Work, but
|
||||
excluding communication that is conspicuously marked or otherwise
|
||||
designated in writing by the copyright owner as "Not a Contribution."
|
||||
|
||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||
on behalf of whom a Contribution has been received by Licensor and
|
||||
subsequently incorporated within the Work.
|
||||
|
||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
copyright license to reproduce, prepare Derivative Works of,
|
||||
publicly display, publicly perform, sublicense, and distribute the
|
||||
Work and such Derivative Works in Source or Object form.
|
||||
|
||||
3. Grant of Patent License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
(except as stated in this section) patent license to make, have made,
|
||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||
where such license applies only to those patent claims licensable
|
||||
by such Contributor that are necessarily infringed by their
|
||||
Contribution(s) alone or by combination of their Contribution(s)
|
||||
with the Work to which such Contribution(s) was submitted. If You
|
||||
institute patent litigation against any entity (including a
|
||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||
or a Contribution incorporated within the Work constitutes direct
|
||||
or contributory patent infringement, then any patent licenses
|
||||
granted to You under this License for that Work shall terminate
|
||||
as of the date such litigation is filed.
|
||||
|
||||
4. Redistribution. You may reproduce and distribute copies of the
|
||||
Work or Derivative Works thereof in any medium, with or without
|
||||
modifications, and in Source or Object form, provided that You
|
||||
meet the following conditions:
|
||||
|
||||
(a) You must give any other recipients of the Work or
|
||||
Derivative Works a copy of this License; and
|
||||
|
||||
(b) You must cause any modified files to carry prominent notices
|
||||
stating that You changed the files; and
|
||||
|
||||
(c) You must retain, in the Source form of any Derivative Works
|
||||
that You distribute, all copyright, patent, trademark, and
|
||||
attribution notices from the Source form of the Work,
|
||||
excluding those notices that do not pertain to any part of
|
||||
the Derivative Works; and
|
||||
|
||||
(d) If the Work includes a "NOTICE" text file as part of its
|
||||
distribution, then any Derivative Works that You distribute must
|
||||
include a readable copy of the attribution notices contained
|
||||
within such NOTICE file, excluding those notices that do not
|
||||
pertain to any part of the Derivative Works, in at least one
|
||||
of the following places: within a NOTICE text file distributed
|
||||
as part of the Derivative Works; within the Source form or
|
||||
documentation, if provided along with the Derivative Works; or,
|
||||
within a display generated by the Derivative Works, if and
|
||||
wherever such third-party notices normally appear. The contents
|
||||
of the NOTICE file are for informational purposes only and
|
||||
do not modify the License. You may add Your own attribution
|
||||
notices within Derivative Works that You distribute, alongside
|
||||
or as an addendum to the NOTICE text from the Work, provided
|
||||
that such additional attribution notices cannot be construed
|
||||
as modifying the License.
|
||||
|
||||
You may add Your own copyright statement to Your modifications and
|
||||
may provide additional or different license terms and conditions
|
||||
for use, reproduction, or distribution of Your modifications, or
|
||||
for any such Derivative Works as a whole, provided Your use,
|
||||
reproduction, and distribution of the Work otherwise complies with
|
||||
the conditions stated in this License.
|
||||
|
||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||
any Contribution intentionally submitted for inclusion in the Work
|
||||
by You to the Licensor shall be under the terms and conditions of
|
||||
this License, without any additional terms or conditions.
|
||||
Notwithstanding the above, nothing herein shall supersede or modify
|
||||
the terms of any separate license agreement you may have executed
|
||||
with Licensor regarding such Contributions.
|
||||
|
||||
6. Trademarks. This License does not grant permission to use the trade
|
||||
names, trademarks, service marks, or product names of the Licensor,
|
||||
except as required for reasonable and customary use in describing the
|
||||
origin of the Work and reproducing the content of the NOTICE file.
|
||||
|
||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||
agreed to in writing, Licensor provides the Work (and each
|
||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||
implied, including, without limitation, any warranties or conditions
|
||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||
appropriateness of using or redistributing the Work and assume any
|
||||
risks associated with Your exercise of permissions under this License.
|
||||
|
||||
8. Limitation of Liability. In no event and under no legal theory,
|
||||
whether in tort (including negligence), contract, or otherwise,
|
||||
unless required by applicable law (such as deliberate and grossly
|
||||
negligent acts) or agreed to in writing, shall any Contributor be
|
||||
liable to You for damages, including any direct, indirect, special,
|
||||
incidental, or consequential damages of any character arising as a
|
||||
result of this License or out of the use or inability to use the
|
||||
Work (including but not limited to damages for loss of goodwill,
|
||||
work stoppage, computer failure or malfunction, or any and all
|
||||
other commercial damages or losses), even if such Contributor
|
||||
has been advised of the possibility of such damages.
|
||||
|
||||
9. Accepting Warranty or Additional Liability. While redistributing
|
||||
the Work or Derivative Works thereof, You may choose to offer,
|
||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||
or other liability obligations and/or rights consistent with this
|
||||
License. However, in accepting such obligations, You may act only
|
||||
on Your own behalf and on Your sole responsibility, not on behalf
|
||||
of any other Contributor, and only if You agree to indemnify,
|
||||
defend, and hold each Contributor harmless for any liability
|
||||
incurred by, or claims asserted against, such Contributor by reason
|
||||
of your accepting any such warranty or additional liability.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
APPENDIX: How to apply the Apache License to your work.
|
||||
|
||||
To apply the Apache License to your work, attach the following
|
||||
boilerplate notice, with the fields enclosed by brackets "[]"
|
||||
replaced with your own identifying information. (Don't include
|
||||
the brackets!) The text should be enclosed in the appropriate
|
||||
comment syntax for the file format. We also recommend that a
|
||||
file or class name and description of purpose be included on the
|
||||
same "printed page" as the copyright notice for easier
|
||||
identification within third-party archives.
|
||||
|
||||
Copyright (c) 2019 <a href="http://www.jeecg.com">Jeecg Boot</a> All rights reserved.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
|
||||
In any case, you must not make any such use of this software as to develop software which may be considered competitive with this software.
|
||||
|
||||
开源协议补充
|
||||
JeecgBoot 是由 北京国炬信息技术有限公司 发行的软件。 总部位于北京,地址:中国·北京·朝阳区科荟前街1号院奥林佳泰大厦。邮箱:jeecgos@163.com
|
||||
本软件受适用的国家软件著作权法(包括国际条约)和双重保护许可。
|
||||
|
||||
1.允许基于本平台软件开展业务系统开发。
|
||||
2.不得基于该平台软件的基础,修改包装成一个与JeecgBoot平台软件功能类似的产品进行发布、销售,或与JeecgBoot参与同类软件产品市场的竞争。
|
||||
违反此条款属于侵权行为,须赔偿侵权经济损失,同时立即停止著作权侵权行为。
|
||||
解释权归:http://www.jeecg.com
|
||||
|
||||
@ -1,15 +1,15 @@
|
||||
Jeecg-Boot 低代码开发平台
|
||||
===============
|
||||
|
||||
当前最新版本: 3.0(发布日期:2021-11-01)
|
||||
当前最新版本: 3.2.0(发布日期:20220425)
|
||||
|
||||
|
||||
## 后端技术架构
|
||||
- 基础框架:Spring Boot 2.3.5.RELEASE
|
||||
- 基础框架:Spring Boot 2.6.6
|
||||
|
||||
- 持久层框架:Mybatis-plus 3.4.3.1
|
||||
- 持久层框架:Mybatis-plus 3.5.1
|
||||
|
||||
- 安全框架:Apache Shiro 1.7.0,Jwt 3.11.0
|
||||
- 安全框架:Apache Shiro 1.8.0,Jwt 3.11.0
|
||||
|
||||
- 数据库连接池:阿里巴巴Druid 1.1.22
|
||||
|
||||
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
26407
jeecg-boot/db/jeecgboot-sqlserver2019.sql
Normal file
26407
jeecg-boot/db/jeecgboot-sqlserver2019.sql
Normal file
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -1,63 +0,0 @@
|
||||
-- 字段长度不规范,导致转库错误Specified key was too long; max key length is 767 bytes
|
||||
ALTER TABLE `rep_demo_dxtj`
|
||||
MODIFY COLUMN `id` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '主键' FIRST;
|
||||
|
||||
ALTER TABLE `sys_third_account`
|
||||
MODIFY COLUMN `third_type` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '登录来源' AFTER `third_user_id`;
|
||||
|
||||
|
||||
-- 数据源字典sql整理
|
||||
DELETE FROM `sys_dict_item` WHERE dict_id ='1209733563293962241';
|
||||
INSERT INTO `sys_dict_item` (`id`, `dict_id`, `item_text`, `item_value`, `description`, `sort_order`, `status`, `create_by`, `create_time`, `update_by`, `update_time`) VALUES ('1209733775114702850', '1209733563293962241', 'MySQL5.5', '1', '', 1, 1, 'admin', '2019-12-25 15:13:02', NULL, NULL);
|
||||
INSERT INTO `sys_dict_item` (`id`, `dict_id`, `item_text`, `item_value`, `description`, `sort_order`, `status`, `create_by`, `create_time`, `update_by`, `update_time`) VALUES ('1334440962954936321', '1209733563293962241', 'MYSQL5.7+', '4', '', 2, 1, 'admin', '2020-12-03 18:16:02', 'admin', '2021-07-15 13:44:29');
|
||||
INSERT INTO `sys_dict_item` (`id`, `dict_id`, `item_text`, `item_value`, `description`, `sort_order`, `status`, `create_by`, `create_time`, `update_by`, `update_time`) VALUES ('1209733839933476865', '1209733563293962241', 'Oracle', '2', '', 3, 1, 'admin', '2019-12-25 15:13:18', 'admin', '2021-07-15 13:44:08');
|
||||
INSERT INTO `sys_dict_item` (`id`, `dict_id`, `item_text`, `item_value`, `description`, `sort_order`, `status`, `create_by`, `create_time`, `update_by`, `update_time`) VALUES ('1209733903020003330', '1209733563293962241', 'SQLServer', '3', '', 4, 1, 'admin', '2019-12-25 15:13:33', 'admin', '2021-07-15 13:44:11');
|
||||
INSERT INTO `sys_dict_item` (`id`, `dict_id`, `item_text`, `item_value`, `description`, `sort_order`, `status`, `create_by`, `create_time`, `update_by`, `update_time`) VALUES ('1414837074500976641', '1209733563293962241', 'postgresql', '6', '', 5, 1, 'admin', '2021-07-13 14:40:20', 'admin', '2021-07-15 13:44:15');
|
||||
INSERT INTO `sys_dict_item` (`id`, `dict_id`, `item_text`, `item_value`, `description`, `sort_order`, `status`, `create_by`, `create_time`, `update_by`, `update_time`) VALUES ('1415547541091504129', '1209733563293962241', 'marialDB', '5', '', 6, 1, 'admin', '2021-07-15 13:43:28', 'admin', '2021-07-15 13:44:23');
|
||||
INSERT INTO `sys_dict_item` (`id`, `dict_id`, `item_text`, `item_value`, `description`, `sort_order`, `status`, `create_by`, `create_time`, `update_by`, `update_time`) VALUES ('1418049969003089922', '1209733563293962241', '达梦', '7', '', 7, 1, 'admin', '2021-07-22 11:27:13', 'admin', '2021-07-22 11:27:30');
|
||||
INSERT INTO `sys_dict_item` (`id`, `dict_id`, `item_text`, `item_value`, `description`, `sort_order`, `status`, `create_by`, `create_time`, `update_by`, `update_time`) VALUES ('1418050017053036545', '1209733563293962241', '人大金仓', '8', '', 8, 1, 'admin', '2021-07-22 11:27:25', NULL, NULL);
|
||||
INSERT INTO `sys_dict_item` (`id`, `dict_id`, `item_text`, `item_value`, `description`, `sort_order`, `status`, `create_by`, `create_time`, `update_by`, `update_time`) VALUES ('1418050075555188737', '1209733563293962241', '神通', '9', '', 9, 1, 'admin', '2021-07-22 11:27:39', NULL, NULL);
|
||||
INSERT INTO `sys_dict_item` (`id`, `dict_id`, `item_text`, `item_value`, `description`, `sort_order`, `status`, `create_by`, `create_time`, `update_by`, `update_time`) VALUES ('1418050110669901826', '1209733563293962241', 'SQLite', '10', '', 10, 1, 'admin', '2021-07-22 11:27:47', NULL, NULL);
|
||||
INSERT INTO `sys_dict_item` (`id`, `dict_id`, `item_text`, `item_value`, `description`, `sort_order`, `status`, `create_by`, `create_time`, `update_by`, `update_time`) VALUES ('1418050149475602434', '1209733563293962241', 'DB2', '11', '', 11, 1, 'admin', '2021-07-22 11:27:56', NULL, NULL);
|
||||
INSERT INTO `sys_dict_item` (`id`, `dict_id`, `item_text`, `item_value`, `description`, `sort_order`, `status`, `create_by`, `create_time`, `update_by`, `update_time`) VALUES ('1418050209823248385', '1209733563293962241', 'Hsqldb', '12', '', 12, 1, 'admin', '2021-07-22 11:28:11', 'admin', '2021-07-22 11:28:27');
|
||||
INSERT INTO `sys_dict_item` (`id`, `dict_id`, `item_text`, `item_value`, `description`, `sort_order`, `status`, `create_by`, `create_time`, `update_by`, `update_time`) VALUES ('1418050323111399425', '1209733563293962241', 'Derby', '13', '', 13, 1, 'admin', '2021-07-22 11:28:38', NULL, NULL);
|
||||
INSERT INTO `sys_dict_item` (`id`, `dict_id`, `item_text`, `item_value`, `description`, `sort_order`, `status`, `create_by`, `create_time`, `update_by`, `update_time`) VALUES ('1418117316707590146', '1209733563293962241', 'H2', '14', '', 14, 1, 'admin', '2021-07-22 15:54:50', NULL, NULL);
|
||||
INSERT INTO `sys_dict_item` (`id`, `dict_id`, `item_text`, `item_value`, `description`, `sort_order`, `status`, `create_by`, `create_time`, `update_by`, `update_time`) VALUES ('1418491604048449537', '1209733563293962241', '其他数据库', '15', '', 15, 1, 'admin', '2021-07-23 16:42:07', NULL, NULL);
|
||||
|
||||
|
||||
-- 新增 hideTab 字段
|
||||
ALTER TABLE `sys_permission`
|
||||
ADD COLUMN `hide_tab` int(2) NULL COMMENT '是否隐藏tab: 0否,1是' AFTER `hidden`;
|
||||
|
||||
|
||||
|
||||
-- 【online表单】新增 low_app_id 字段
|
||||
ALTER TABLE `onl_cgform_head`
|
||||
ADD COLUMN `low_app_id` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '关联的应用ID' AFTER `des_form_code`;
|
||||
|
||||
|
||||
|
||||
-- online老数据,存在字符串类型key值不一致的情况,String改为string
|
||||
UPDATE onl_cgform_field SET db_type = 'string' where binary db_type = 'String';
|
||||
|
||||
-- 积木报表升级
|
||||
ALTER TABLE `jimu_report`
|
||||
MODIFY COLUMN `view_count` bigint(15) NULL DEFAULT 0 COMMENT '浏览次数' AFTER `template`;
|
||||
ALTER TABLE `jimu_report`
|
||||
MODIFY COLUMN `json_str` longtext CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT 'json字符串' AFTER `type`;
|
||||
ALTER TABLE `jimu_report_db_field`
|
||||
ADD COLUMN `search_format` varchar(50) NULL COMMENT '查询时间格式化表达式' AFTER `search_value`;
|
||||
ALTER TABLE `jimu_report_db_param`
|
||||
ADD COLUMN `search_format` varchar(50) NULL COMMENT '查询时间格式化表达式' AFTER `dict_code`;
|
||||
UPDATE jimu_report SET json_str=replace(json_str,'"subtotal":"totalField"','"funcname":"SUM"');
|
||||
ALTER TABLE `jimu_report`
|
||||
ADD COLUMN `css_str` text NULL COMMENT 'css增强' AFTER `view_count`,
|
||||
ADD COLUMN `js_str` text NULL COMMENT 'js增强' AFTER `css_str`;
|
||||
ALTER TABLE `jimu_report_link`
|
||||
CHANGE COLUMN `expression` `requirement` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '条件' AFTER `link_chart_id`;
|
||||
ALTER TABLE `jimu_report_db_field`
|
||||
ADD COLUMN `ext_json` text NULL COMMENT '参数配置' AFTER `search_format`;
|
||||
ALTER TABLE `jimu_report_db_param`
|
||||
ADD COLUMN `ext_json` text NULL COMMENT '参数配置' AFTER `search_format`;
|
||||
ALTER TABLE `jimu_report_db`
|
||||
MODIFY COLUMN `is_list` varchar(10) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '0' COMMENT '是否是列表0否1是 默认0' AFTER `api_method`;
|
||||
16
jeecg-boot/db/增量SQL/3.1.0升级到3.2.0增量脚本sql
Normal file
16
jeecg-boot/db/增量SQL/3.1.0升级到3.2.0增量脚本sql
Normal file
@ -0,0 +1,16 @@
|
||||
-- ----------------------------
|
||||
-- Table structure for sys_role_index
|
||||
-- ----------------------------
|
||||
CREATE TABLE `sys_role_index` (
|
||||
`id` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
|
||||
`role_code` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '角色编码',
|
||||
`url` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '路由地址',
|
||||
`priority` int(11) NULL DEFAULT 0 COMMENT '优先级',
|
||||
`status` varchar(2) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '0' COMMENT '状态0:无效 1:有效',
|
||||
`create_by` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '创建人登录名称',
|
||||
`create_time` datetime NULL DEFAULT NULL COMMENT '创建日期',
|
||||
`update_by` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '更新人登录名称',
|
||||
`update_time` datetime NULL DEFAULT NULL COMMENT '更新日期',
|
||||
`sys_org_code` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '所属部门',
|
||||
PRIMARY KEY (`id`) USING BTREE
|
||||
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '角色首页表' ROW_FORMAT = Dynamic;
|
||||
@ -5,7 +5,7 @@
|
||||
<parent>
|
||||
<artifactId>jeecg-boot-base-api</artifactId>
|
||||
<groupId>org.jeecgframework.boot</groupId>
|
||||
<version>3.0</version>
|
||||
<version>3.2.0</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
|
||||
@ -1,89 +0,0 @@
|
||||
package org.jeecg.common.bpm.api;
|
||||
|
||||
import org.jeecg.common.api.vo.Result;
|
||||
import org.jeecg.common.constant.ServiceNameConstants;
|
||||
import org.jeecg.common.online.api.factory.OnlineBaseExtAPIFallbackFactory;
|
||||
import org.springframework.cloud.openfeign.FeignClient;
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
|
||||
/**
|
||||
* 流程接口
|
||||
*
|
||||
* @author scott
|
||||
*/
|
||||
@Component
|
||||
@FeignClient(contextId = "bpmBaseRemoteApi", value = ServiceNameConstants.SYSTEM_SERVICE,
|
||||
fallbackFactory = OnlineBaseExtAPIFallbackFactory.class)
|
||||
public interface IBpmBaseExtAPI {
|
||||
/**
|
||||
* 23. 流程提交接口(online,自定义开发)
|
||||
*
|
||||
* @param flowCode
|
||||
* 流程业务关联 例如:joa_leave_01
|
||||
* @param id
|
||||
* 表单业务数据data id
|
||||
* @param formUrl
|
||||
* 流程审批时附件页面默认展示的PC端表单组件(地址)
|
||||
* @param formUrlMobile
|
||||
* 流程审批时附件页面默认展示的移动端表单组件(地址)
|
||||
* @param username
|
||||
* 流程发起人账号
|
||||
* @param jsonData
|
||||
* Json串,额外扩展的流程变量值 【非必填】
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
@PostMapping(value = "/act/process/extActProcess/startMutilProcess")
|
||||
Result<String> startMutilProcess(@RequestParam("flowCode") String flowCode, @RequestParam("id") String id,
|
||||
@RequestParam("formUrl") String formUrl, @RequestParam("formUrlMobile") String formUrlMobile,
|
||||
@RequestParam("username") String username, @RequestParam("jsonData") String jsonData) throws Exception;
|
||||
|
||||
/**
|
||||
* 24. 流程提交接口(自定义表单设计器)
|
||||
*
|
||||
* @param flowCode
|
||||
* 流程业务关联 例如:joa_leave_01
|
||||
* @param id
|
||||
* 表单业务数据data id
|
||||
* @param formUrl
|
||||
* 流程审批时附件页面默认展示的PC端表单组件(地址)
|
||||
* @param formUrlMobile
|
||||
* 流程审批时附件页面默认展示的移动端表单组件(地址)
|
||||
* @param username
|
||||
* 流程发起人账号
|
||||
* @param jsonData
|
||||
* Json串,额外扩展的流程变量值 【非必填】
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
@PostMapping(value = "/act/process/extActProcess/startDesFormMutilProcess")
|
||||
Result<String> startDesFormMutilProcess(@RequestParam("flowCode") String flowCode, @RequestParam("id") String id,
|
||||
@RequestParam("formUrl") String formUrl, @RequestParam("formUrlMobile") String formUrlMobile,
|
||||
@RequestParam("username") String username, @RequestParam("jsonData") String jsonData) throws Exception;
|
||||
|
||||
/**
|
||||
* 25. 保存流程草稿箱接口(自定义开发表单、online表单)
|
||||
*
|
||||
* @param flowCode
|
||||
* 流程业务关联 例如:joa_leave_01
|
||||
* @param id
|
||||
* 表单业务数据data id
|
||||
* @param formUrl
|
||||
* 流程审批时附件页面默认展示的PC端表单组件(地址) 【非必填】
|
||||
* @param formUrlMobile
|
||||
* 流程审批时附件页面默认展示的移动端表单组件(地址) 【非必填】
|
||||
* @param username
|
||||
* 流程发起人账号
|
||||
* @param jsonData
|
||||
* Json串,额外扩展的流程变量值 【非必填】
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
@PostMapping(value = "/act/process/extActProcess/saveMutilProcessDraft")
|
||||
Result<String> saveMutilProcessDraft(@RequestParam("flowCode") String flowCode, @RequestParam("id") String id,
|
||||
@RequestParam("formUrl") String formUrl, @RequestParam("formUrlMobile") String formUrlMobile,
|
||||
@RequestParam("username") String username, @RequestParam("jsonData") String jsonData) throws Exception;
|
||||
|
||||
}
|
||||
@ -1,18 +0,0 @@
|
||||
package org.jeecg.common.bpm.api.factory;
|
||||
|
||||
import org.jeecg.common.bpm.api.IBpmBaseExtAPI;
|
||||
import org.jeecg.common.bpm.api.fallback.BpmBaseExtAPIFallback;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import feign.hystrix.FallbackFactory;
|
||||
|
||||
@Component
|
||||
public class BpmBaseExtAPIFallbackFactory implements FallbackFactory<IBpmBaseExtAPI> {
|
||||
|
||||
@Override
|
||||
public IBpmBaseExtAPI create(Throwable throwable) {
|
||||
BpmBaseExtAPIFallback fallback = new BpmBaseExtAPIFallback();
|
||||
fallback.setCause(throwable);
|
||||
return fallback;
|
||||
}
|
||||
}
|
||||
@ -1,42 +0,0 @@
|
||||
package org.jeecg.common.bpm.api.fallback;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import org.jeecg.common.api.vo.Result;
|
||||
import org.jeecg.common.bpm.api.IBpmBaseExtAPI;
|
||||
import org.jeecg.common.online.api.IOnlineBaseExtAPI;
|
||||
import org.jeecg.common.system.vo.DictModel;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
|
||||
import lombok.Setter;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
/**
|
||||
* 进入fallback的方法 检查是否token未设置
|
||||
*/
|
||||
@Slf4j
|
||||
public class BpmBaseExtAPIFallback implements IBpmBaseExtAPI {
|
||||
|
||||
@Setter
|
||||
private Throwable cause;
|
||||
|
||||
@Override
|
||||
public Result<String> startMutilProcess(String flowCode, String id, String formUrl, String formUrlMobile,
|
||||
String username, String jsonData) throws Exception {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Result<String> startDesFormMutilProcess(String flowCode, String id, String formUrl, String formUrlMobile,
|
||||
String username, String jsonData) throws Exception {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Result<String> saveMutilProcessDraft(String flowCode, String id, String formUrl, String formUrlMobile,
|
||||
String username, String jsonData) throws Exception {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@ -1,72 +0,0 @@
|
||||
package org.jeecg.common.online.api;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import org.jeecg.common.constant.ServiceNameConstants;
|
||||
import org.jeecg.common.online.api.factory.OnlineBaseExtAPIFallbackFactory;
|
||||
import org.jeecg.common.system.vo.DictModel;
|
||||
import org.springframework.cloud.openfeign.FeignClient;
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 【Online】Feign API接口
|
||||
*/
|
||||
@Component
|
||||
@FeignClient(contextId = "onlineBaseRemoteApi", value = ServiceNameConstants.SYSTEM_ONLINE, fallbackFactory = OnlineBaseExtAPIFallbackFactory.class)
|
||||
public interface IOnlineBaseExtAPI {
|
||||
|
||||
/**
|
||||
* 【Online】 表单设计器专用:同步新增
|
||||
*/
|
||||
@PostMapping(value = "/online/api/cgform/crazyForm/{name}")
|
||||
String cgformPostCrazyForm(@PathVariable("name") String tableName, @RequestBody JSONObject jsonObject) throws Exception;
|
||||
|
||||
/**
|
||||
* 【Online】 表单设计器专用:同步编辑
|
||||
*/
|
||||
@PutMapping(value = "/online/api/cgform/crazyForm/{name}")
|
||||
String cgformPutCrazyForm(@PathVariable("name") String tableName, @RequestBody JSONObject jsonObject) throws Exception;
|
||||
|
||||
/**
|
||||
* 通过online表名查询数据,同时查询出子表的数据
|
||||
*
|
||||
* @param tableName online表名
|
||||
* @param dataIds online数据ID
|
||||
* @return
|
||||
*/
|
||||
@GetMapping(value = "/online/api/cgform/queryAllDataByTableName")
|
||||
JSONObject cgformQueryAllDataByTableName(@RequestParam("tableName") String tableName, @RequestParam("dataIds") String dataIds);
|
||||
|
||||
/**
|
||||
* online表单删除数据
|
||||
*
|
||||
* @param cgformCode Online表单code
|
||||
* @param dataIds 数据ID,可逗号分割
|
||||
* @return
|
||||
*/
|
||||
@DeleteMapping("/online/api/cgform/cgformDeleteDataByCode")
|
||||
String cgformDeleteDataByCode(@RequestParam("cgformCode") String cgformCode, @RequestParam("dataIds") String dataIds);
|
||||
|
||||
/**
|
||||
* 【cgreport】通过 head code 获取 sql语句,并执行该语句返回查询数据
|
||||
*
|
||||
* @param code 报表Code,如果没传ID就通过code查
|
||||
* @param forceKey
|
||||
* @param dataList
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/online/api/cgreportGetData")
|
||||
Map<String, Object> cgreportGetData(@RequestParam("code") String code, @RequestParam("forceKey") String forceKey, @RequestParam("dataList") String dataList);
|
||||
|
||||
/**
|
||||
* 【cgreport】对 cgreportGetData 的返回值做优化,封装 DictModel 集合
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/online/api/cgreportGetDataPackage")
|
||||
List<DictModel> cgreportGetDataPackage(@RequestParam("code") String code, @RequestParam("dictText") String dictText, @RequestParam("dictCode") String dictCode, @RequestParam("dataList") String dataList);
|
||||
|
||||
}
|
||||
@ -1,17 +0,0 @@
|
||||
package org.jeecg.common.online.api.factory;
|
||||
|
||||
import feign.hystrix.FallbackFactory;
|
||||
import org.jeecg.common.online.api.IOnlineBaseExtAPI;
|
||||
import org.jeecg.common.online.api.fallback.OnlineBaseExtAPIFallback;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
@Component
|
||||
public class OnlineBaseExtAPIFallbackFactory implements FallbackFactory<IOnlineBaseExtAPI> {
|
||||
|
||||
@Override
|
||||
public IOnlineBaseExtAPI create(Throwable throwable) {
|
||||
OnlineBaseExtAPIFallback fallback = new OnlineBaseExtAPIFallback();
|
||||
fallback.setCause(throwable);
|
||||
return fallback;
|
||||
}
|
||||
}
|
||||
@ -1,51 +0,0 @@
|
||||
package org.jeecg.common.online.api.fallback;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import lombok.Setter;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.jeecg.common.online.api.IOnlineBaseExtAPI;
|
||||
import org.jeecg.common.system.vo.DictModel;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 进入fallback的方法 检查是否token未设置
|
||||
*/
|
||||
@Slf4j
|
||||
public class OnlineBaseExtAPIFallback implements IOnlineBaseExtAPI {
|
||||
|
||||
@Setter
|
||||
private Throwable cause;
|
||||
|
||||
@Override
|
||||
public String cgformPostCrazyForm(String tableName, JSONObject jsonObject) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String cgformPutCrazyForm(String tableName, JSONObject jsonObject) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public JSONObject cgformQueryAllDataByTableName(String tableName, String dataIds) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String cgformDeleteDataByCode(String cgformCode, String dataIds) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Map<String, Object> cgreportGetData(String code, String forceKey, String dataList) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<DictModel> cgreportGetDataPackage(String code, String dictText, String dictCode, String dataList) {
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
@ -7,6 +7,7 @@ import org.jeecg.common.api.dto.message.*;
|
||||
import org.jeecg.common.constant.ServiceNameConstants;
|
||||
import org.jeecg.common.system.api.factory.SysBaseAPIFallbackFactory;
|
||||
import org.jeecg.common.system.vo.*;
|
||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingClass;
|
||||
import org.springframework.cloud.openfeign.FeignClient;
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
@ -16,18 +17,17 @@ import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
/**
|
||||
* 相比较local版
|
||||
* 去掉了一些方法:
|
||||
* addLog getDatabaseType queryAllDepart
|
||||
* queryAllUser(Wrapper wrapper) queryAllUser(String[] userIds, int pageNo, int pageSize)
|
||||
* 修改了一些方法:
|
||||
* createLog
|
||||
* sendSysAnnouncement 只保留了一个,其余全部干掉
|
||||
*
|
||||
* cloud接口数量43 local:35 common:9 额外一个特殊queryAllRole一个当两个用
|
||||
* 1、cloud接口数量43 local:35 common:9 额外一个特殊queryAllRole一个当两个用
|
||||
* - 相比较local版
|
||||
* - 去掉了一些方法:addLog、getDatabaseType、queryAllDepart、queryAllUser(Wrapper wrapper)、queryAllUser(String[] userIds, int pageNo, int pageSize)
|
||||
* - 修改了一些方法:createLog、sendSysAnnouncement(只保留了一个,其余全部干掉)
|
||||
* 2、@ConditionalOnMissingClass("org.jeecg.modules.system.service.impl.SysBaseApiImpl")=> 有实现类的时候,不实例化Feign接口
|
||||
* @author: jeecg-boot
|
||||
*/
|
||||
@Component
|
||||
@FeignClient(contextId = "sysBaseRemoteApi", value = ServiceNameConstants.SYSTEM_SERVICE, fallbackFactory = SysBaseAPIFallbackFactory.class)
|
||||
@FeignClient(contextId = "sysBaseRemoteApi", value = ServiceNameConstants.SERVICE_SYSTEM, fallbackFactory = SysBaseAPIFallbackFactory.class)
|
||||
@ConditionalOnMissingClass("org.jeecg.modules.system.service.impl.SysBaseApiImpl")
|
||||
public interface ISysBaseAPI extends CommonAPI {
|
||||
|
||||
/**
|
||||
@ -103,6 +103,7 @@ public interface ISysBaseAPI extends CommonAPI {
|
||||
* @param code
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
@GetMapping("/sys/api/queryDictItemsByCode")
|
||||
List<DictModel> queryDictItemsByCode(@RequestParam("code") String code);
|
||||
|
||||
@ -111,10 +112,13 @@ public interface ISysBaseAPI extends CommonAPI {
|
||||
* @param code
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
@GetMapping("/sys/api/queryEnableDictItemsByCode")
|
||||
public List<DictModel> queryEnableDictItemsByCode(@RequestParam("code") String code);
|
||||
|
||||
/** 11查询所有的父级字典,按照create_time排序 */
|
||||
/** 11查询所有的父级字典,按照create_time排序
|
||||
* @return List<DictModel> 字典值集合
|
||||
*/
|
||||
@GetMapping("/sys/api/queryAllDict")
|
||||
List<DictModel> queryAllDict();
|
||||
|
||||
@ -122,8 +126,8 @@ public interface ISysBaseAPI extends CommonAPI {
|
||||
* 12查询所有分类字典
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/sys/api/queryAllDSysCategory")
|
||||
List<SysCategoryModel> queryAllDSysCategory();
|
||||
@GetMapping("/sys/api/queryAllSysCategory")
|
||||
List<SysCategoryModel> queryAllSysCategory();
|
||||
|
||||
/**
|
||||
* 13获取表数据字典
|
||||
@ -132,6 +136,7 @@ public interface ISysBaseAPI extends CommonAPI {
|
||||
* @param code
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
@GetMapping("/sys/api/queryTableDictItemsByCode")
|
||||
List<DictModel> queryTableDictItemsByCode(@RequestParam("table") String table, @RequestParam("text") String text, @RequestParam("code") String code);
|
||||
|
||||
@ -144,6 +149,8 @@ public interface ISysBaseAPI extends CommonAPI {
|
||||
|
||||
/**
|
||||
* 15根据业务类型 busType 及业务 busId 修改消息已读
|
||||
* @param busType 业务类型
|
||||
* @param busId 业务id
|
||||
*/
|
||||
@GetMapping("/sys/api/updateSysAnnounReadFlag")
|
||||
public void updateSysAnnounReadFlag(@RequestParam("busType") String busType, @RequestParam("busId")String busId);
|
||||
@ -180,6 +187,9 @@ public interface ISysBaseAPI extends CommonAPI {
|
||||
|
||||
/**
|
||||
* 19分页查询用户 返回JSONObject
|
||||
* @param userIds 多个用户id
|
||||
* @param pageNo 当前页数
|
||||
* @param pageSize 每页条数
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/sys/api/queryAllUser")
|
||||
@ -188,7 +198,7 @@ public interface ISysBaseAPI extends CommonAPI {
|
||||
|
||||
/**
|
||||
* 20获取所有角色 带参
|
||||
* roleIds 默认选中角色
|
||||
* @param roleIds 默认选中角色
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/sys/api/queryAllRole")
|
||||
@ -243,7 +253,7 @@ public interface ISysBaseAPI extends CommonAPI {
|
||||
|
||||
/**
|
||||
* 27根据id获取所有参与用户
|
||||
* userIds
|
||||
* @param userIds 多个用户id
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/sys/api/queryAllUserByIds")
|
||||
@ -260,7 +270,7 @@ public interface ISysBaseAPI extends CommonAPI {
|
||||
|
||||
/**
|
||||
* 29根据name获取所有参与用户
|
||||
* userNames
|
||||
* @param userNames 多个用户账号
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/sys/api/queryUserByNames")
|
||||
@ -293,6 +303,8 @@ public interface ISysBaseAPI extends CommonAPI {
|
||||
|
||||
/**
|
||||
* 33通过部门id获取部门全部信息
|
||||
* @param id 部门id
|
||||
* @return SysDepartModel 部门信息
|
||||
*/
|
||||
@GetMapping("/sys/api/selectAllById")
|
||||
SysDepartModel selectAllById(@RequestParam("id") String id);
|
||||
@ -313,6 +325,7 @@ public interface ISysBaseAPI extends CommonAPI {
|
||||
* @param username
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
@GetMapping("/sys/api/queryUserRoles")
|
||||
Set<String> queryUserRoles(@RequestParam("username")String username);
|
||||
|
||||
@ -321,6 +334,7 @@ public interface ISysBaseAPI extends CommonAPI {
|
||||
* @param username
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
@GetMapping("/sys/api/queryUserAuths")
|
||||
Set<String> queryUserAuths(@RequestParam("username")String username);
|
||||
|
||||
@ -330,6 +344,7 @@ public interface ISysBaseAPI extends CommonAPI {
|
||||
* @param dbSourceId
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
@GetMapping("/sys/api/getDynamicDbSourceById")
|
||||
DynamicDataSourceModel getDynamicDbSourceById(@RequestParam("dbSourceId") String dbSourceId);
|
||||
|
||||
@ -339,13 +354,16 @@ public interface ISysBaseAPI extends CommonAPI {
|
||||
* @param dbSourceCode
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
@GetMapping("/sys/api/getDynamicDbSourceByCode")
|
||||
DynamicDataSourceModel getDynamicDbSourceByCode(@RequestParam("dbSourceCode") String dbSourceCode);
|
||||
|
||||
/**
|
||||
* 39根据用户账号查询用户信息 CommonAPI中定义
|
||||
* @param username
|
||||
* @return LoginUser 用户信息
|
||||
*/
|
||||
@Override
|
||||
@GetMapping("/sys/api/getUserByName")
|
||||
LoginUser getUserByName(@RequestParam("username") String username);
|
||||
|
||||
@ -357,6 +375,7 @@ public interface ISysBaseAPI extends CommonAPI {
|
||||
* @param key
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
@GetMapping("/sys/api/translateDictFromTable")
|
||||
String translateDictFromTable(@RequestParam("table") String table, @RequestParam("text") String text, @RequestParam("code") String code, @RequestParam("key") String key);
|
||||
|
||||
@ -366,13 +385,18 @@ public interface ISysBaseAPI extends CommonAPI {
|
||||
* @param key
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
@GetMapping("/sys/api/translateDict")
|
||||
String translateDict(@RequestParam("code") String code, @RequestParam("key") String key);
|
||||
|
||||
/**
|
||||
* 42查询数据权限
|
||||
* @param component
|
||||
* @param requestPath
|
||||
* @param username 用户姓名
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
@GetMapping("/sys/api/queryPermissionDataRule")
|
||||
List<SysPermissionDataRuleModel> queryPermissionDataRule(@RequestParam("component") String component, @RequestParam("requestPath")String requestPath, @RequestParam("username") String username);
|
||||
|
||||
@ -381,6 +405,7 @@ public interface ISysBaseAPI extends CommonAPI {
|
||||
* @param username
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
@GetMapping("/sys/api/getCacheUser")
|
||||
SysUserCacheInfo getCacheUser(@RequestParam("username") String username);
|
||||
|
||||
@ -426,13 +451,16 @@ public interface ISysBaseAPI extends CommonAPI {
|
||||
void sendEmailMsg(@RequestParam("email")String email,@RequestParam("title")String title,@RequestParam("content")String content);
|
||||
/**
|
||||
* 41 获取公司下级部门和公司下所有用户id
|
||||
* @param orgCode
|
||||
* @param orgCode 部门编号
|
||||
* @return List<Map>
|
||||
*/
|
||||
@GetMapping("/sys/api/getDeptUserByOrgCode")
|
||||
List<Map> getDeptUserByOrgCode(@RequestParam("orgCode")String orgCode);
|
||||
|
||||
/**
|
||||
* 42 查询分类字典翻译
|
||||
* @param ids 多个分类字典id
|
||||
* @return List<String>
|
||||
*/
|
||||
@GetMapping("/sys/api/loadCategoryDictItem")
|
||||
List<String> loadCategoryDictItem(@RequestParam("ids") String ids);
|
||||
@ -472,6 +500,7 @@ public interface ISysBaseAPI extends CommonAPI {
|
||||
*
|
||||
* @param dictCode 字典code格式:table,text,code
|
||||
* @param keyword 过滤关键字
|
||||
* @param pageSize 每页条数
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/sys/api/loadDictItemByKeyword")
|
||||
|
||||
@ -1,10 +1,14 @@
|
||||
package org.jeecg.common.system.api.factory;
|
||||
|
||||
import feign.hystrix.FallbackFactory;
|
||||
import org.springframework.cloud.openfeign.FallbackFactory;
|
||||
import org.jeecg.common.system.api.ISysBaseAPI;
|
||||
import org.jeecg.common.system.api.fallback.SysBaseAPIFallback;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
/**
|
||||
* @Description: SysBaseAPIFallbackFactory
|
||||
* @author: jeecg-boot
|
||||
*/
|
||||
@Component
|
||||
public class SysBaseAPIFallbackFactory implements FallbackFactory<ISysBaseAPI> {
|
||||
|
||||
|
||||
@ -14,6 +14,7 @@ import java.util.Set;
|
||||
|
||||
/**
|
||||
* 进入fallback的方法 检查是否token未设置
|
||||
* @author: jeecg-boot
|
||||
*/
|
||||
@Slf4j
|
||||
public class SysBaseAPIFallback implements ISysBaseAPI {
|
||||
@ -79,11 +80,12 @@ public class SysBaseAPIFallback implements ISysBaseAPI {
|
||||
|
||||
@Override
|
||||
public List<DictModel> queryAllDict() {
|
||||
log.error("fegin接口queryAllDict失败:"+cause.getMessage(), cause);
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<SysCategoryModel> queryAllDSysCategory() {
|
||||
public List<SysCategoryModel> queryAllSysCategory() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@ -221,7 +223,7 @@ public class SysBaseAPIFallback implements ISysBaseAPI {
|
||||
|
||||
@Override
|
||||
public LoginUser getUserByName(String username) {
|
||||
log.error("通过用户名获取当前登录用户信息 {}", cause);
|
||||
log.error("jeecg-system服务节点不通,导致获取登录用户信息失败: " + cause.getMessage(), cause);
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
@ -1,164 +1,180 @@
|
||||
package org.jeecg.config;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.SortedMap;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
|
||||
import org.jeecg.common.config.mqtoken.UserTokenContext;
|
||||
import org.jeecg.common.constant.CommonConstant;
|
||||
import org.jeecg.common.util.DateUtils;
|
||||
import org.jeecg.common.util.PathMatcherUtil;
|
||||
import org.jeecg.config.sign.interceptor.SignAuthConfiguration;
|
||||
import org.jeecg.config.sign.util.HttpUtils;
|
||||
import org.jeecg.config.sign.util.SignUtil;
|
||||
import org.springframework.beans.factory.ObjectFactory;
|
||||
import org.springframework.boot.autoconfigure.AutoConfigureBefore;
|
||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
|
||||
import org.springframework.boot.autoconfigure.http.HttpMessageConverters;
|
||||
import org.springframework.cloud.openfeign.FeignAutoConfiguration;
|
||||
import org.springframework.cloud.openfeign.support.SpringDecoder;
|
||||
import org.springframework.cloud.openfeign.support.SpringEncoder;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.context.annotation.Primary;
|
||||
import org.springframework.context.annotation.Scope;
|
||||
import org.springframework.http.MediaType;
|
||||
import org.springframework.web.context.request.RequestContextHolder;
|
||||
import org.springframework.web.context.request.ServletRequestAttributes;
|
||||
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.serializer.SerializerFeature;
|
||||
import com.alibaba.fastjson.support.config.FastJsonConfig;
|
||||
import com.alibaba.fastjson.support.spring.FastJsonHttpMessageConverter;
|
||||
import com.alibaba.fastjson.support.springfox.SwaggerJsonSerializer;
|
||||
|
||||
import feign.Feign;
|
||||
import feign.Logger;
|
||||
import feign.RequestInterceptor;
|
||||
import feign.codec.Decoder;
|
||||
import feign.codec.Encoder;
|
||||
import feign.form.spring.SpringFormEncoder;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
||||
@ConditionalOnClass(Feign.class)
|
||||
@AutoConfigureBefore(FeignAutoConfiguration.class)
|
||||
@Slf4j
|
||||
@Configuration
|
||||
public class FeignConfig {
|
||||
|
||||
@Bean
|
||||
public RequestInterceptor requestInterceptor() {
|
||||
return requestTemplate -> {
|
||||
ServletRequestAttributes attributes = (ServletRequestAttributes) RequestContextHolder.getRequestAttributes();
|
||||
if (null != attributes) {
|
||||
HttpServletRequest request = attributes.getRequest();
|
||||
log.debug("Feign request: {}", request.getRequestURI());
|
||||
// 将token信息放入header中
|
||||
String token = request.getHeader(CommonConstant.X_ACCESS_TOKEN);
|
||||
if(token==null || "".equals(token)){
|
||||
token = request.getParameter("token");
|
||||
}
|
||||
log.debug("Feign request token: {}", token);
|
||||
requestTemplate.header(CommonConstant.X_ACCESS_TOKEN, token);
|
||||
|
||||
//根据URL地址过滤请求 【字典表参数签名验证】
|
||||
if (PathMatcherUtil.matches(Arrays.asList(SignAuthConfiguration.urlList),requestTemplate.path())) {
|
||||
try {
|
||||
log.info("============================ [begin] fegin api url ============================");
|
||||
log.info(requestTemplate.path());
|
||||
log.info(requestTemplate.method());
|
||||
String queryLine = requestTemplate.queryLine();
|
||||
if(queryLine!=null && queryLine.startsWith("?")){
|
||||
queryLine = queryLine.substring(1);
|
||||
}
|
||||
log.info(queryLine);
|
||||
if(requestTemplate.body()!=null){
|
||||
log.info(new String(requestTemplate.body()));
|
||||
}
|
||||
SortedMap<String, String> allParams = HttpUtils.getAllParams(requestTemplate.path(),queryLine,requestTemplate.body(),requestTemplate.method());
|
||||
String sign = SignUtil.getParamsSign(allParams);
|
||||
log.info(" Feign request params sign: {}",sign);
|
||||
log.info("============================ [end] fegin api url ============================");
|
||||
requestTemplate.header(CommonConstant.X_SIGN, sign);
|
||||
requestTemplate.header(CommonConstant.X_TIMESTAMP, DateUtils.getCurrentTimestamp().toString());
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}else{
|
||||
String token = UserTokenContext.getToken();
|
||||
log.debug("Feign request token: {}", token);
|
||||
requestTemplate.header(CommonConstant.X_ACCESS_TOKEN, token);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Feign 客户端的日志记录,默认级别为NONE
|
||||
* Logger.Level 的具体级别如下:
|
||||
* NONE:不记录任何信息
|
||||
* BASIC:仅记录请求方法、URL以及响应状态码和执行时间
|
||||
* HEADERS:除了记录 BASIC级别的信息外,还会记录请求和响应的头信息
|
||||
* FULL:记录所有请求与响应的明细,包括头信息、请求体、元数据
|
||||
*/
|
||||
@Bean
|
||||
Logger.Level feignLoggerLevel() {
|
||||
return Logger.Level.FULL;
|
||||
}
|
||||
|
||||
/**
|
||||
* Feign支持文件上传
|
||||
* @param messageConverters
|
||||
* @return
|
||||
*/
|
||||
@Bean
|
||||
@Primary
|
||||
@Scope("prototype")
|
||||
public Encoder multipartFormEncoder(ObjectFactory<HttpMessageConverters> messageConverters) {
|
||||
return new SpringFormEncoder(new SpringEncoder(messageConverters));
|
||||
}
|
||||
|
||||
// update-begin--Author:sunjianlei Date:20210604 for: 给 Feign 添加 FastJson 的解析支持 ----------
|
||||
@Bean
|
||||
public Encoder feignEncoder() {
|
||||
return new SpringEncoder(feignHttpMessageConverter());
|
||||
}
|
||||
|
||||
@Bean
|
||||
public Decoder feignDecoder() {
|
||||
return new SpringDecoder(feignHttpMessageConverter());
|
||||
}
|
||||
|
||||
/**
|
||||
* 设置解码器为fastjson
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
private ObjectFactory<HttpMessageConverters> feignHttpMessageConverter() {
|
||||
final HttpMessageConverters httpMessageConverters = new HttpMessageConverters(this.getFastJsonConverter());
|
||||
return () -> httpMessageConverters;
|
||||
}
|
||||
|
||||
private FastJsonHttpMessageConverter getFastJsonConverter() {
|
||||
FastJsonHttpMessageConverter converter = new FastJsonHttpMessageConverter();
|
||||
|
||||
List<MediaType> supportedMediaTypes = new ArrayList<>();
|
||||
MediaType mediaTypeJson = MediaType.valueOf(MediaType.APPLICATION_JSON_VALUE);
|
||||
supportedMediaTypes.add(mediaTypeJson);
|
||||
converter.setSupportedMediaTypes(supportedMediaTypes);
|
||||
FastJsonConfig config = new FastJsonConfig();
|
||||
config.getSerializeConfig().put(JSON.class, new SwaggerJsonSerializer());
|
||||
config.setSerializerFeatures(SerializerFeature.DisableCircularReferenceDetect);
|
||||
converter.setFastJsonConfig(config);
|
||||
|
||||
return converter;
|
||||
}
|
||||
// update-end--Author:sunjianlei Date:20210604 for: 给 Feign 添加 FastJson 的解析支持 ----------
|
||||
|
||||
}
|
||||
//package org.jeecg.config;
|
||||
//
|
||||
//import java.io.IOException;
|
||||
//import java.util.ArrayList;
|
||||
//import java.util.Arrays;
|
||||
//import java.util.List;
|
||||
//import java.util.SortedMap;
|
||||
//
|
||||
//import javax.servlet.http.HttpServletRequest;
|
||||
//
|
||||
//import org.jeecg.common.config.mqtoken.UserTokenContext;
|
||||
//import org.jeecg.common.constant.CommonConstant;
|
||||
//import org.jeecg.common.util.DateUtils;
|
||||
//import org.jeecg.common.util.PathMatcherUtil;
|
||||
//import org.jeecg.config.sign.interceptor.SignAuthConfiguration;
|
||||
//import org.jeecg.config.sign.util.HttpUtils;
|
||||
//import org.jeecg.config.sign.util.SignUtil;
|
||||
//import org.springframework.beans.factory.ObjectFactory;
|
||||
//import org.springframework.boot.autoconfigure.AutoConfigureBefore;
|
||||
//import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
|
||||
//import org.springframework.boot.autoconfigure.http.HttpMessageConverters;
|
||||
//import org.springframework.cloud.openfeign.FeignAutoConfiguration;
|
||||
//import org.springframework.cloud.openfeign.support.SpringDecoder;
|
||||
//import org.springframework.cloud.openfeign.support.SpringEncoder;
|
||||
//import org.springframework.context.annotation.Bean;
|
||||
//import org.springframework.context.annotation.Configuration;
|
||||
//import org.springframework.context.annotation.Primary;
|
||||
//import org.springframework.context.annotation.Scope;
|
||||
//import org.springframework.http.MediaType;
|
||||
//import org.springframework.web.context.request.RequestContextHolder;
|
||||
//import org.springframework.web.context.request.ServletRequestAttributes;
|
||||
//
|
||||
//import com.alibaba.fastjson.JSON;
|
||||
//import com.alibaba.fastjson.serializer.SerializerFeature;
|
||||
//import com.alibaba.fastjson.support.config.FastJsonConfig;
|
||||
//import com.alibaba.fastjson.support.spring.FastJsonHttpMessageConverter;
|
||||
//import com.alibaba.fastjson.support.springfox.SwaggerJsonSerializer;
|
||||
//
|
||||
//import feign.Feign;
|
||||
//import feign.Logger;
|
||||
//import feign.RequestInterceptor;
|
||||
//import feign.codec.Decoder;
|
||||
//import feign.codec.Encoder;
|
||||
//import feign.form.spring.SpringFormEncoder;
|
||||
//import lombok.extern.slf4j.Slf4j;
|
||||
//
|
||||
///**
|
||||
// * @Description: FeignConfig
|
||||
// * @author: JeecgBoot
|
||||
// */
|
||||
//@ConditionalOnClass(Feign.class)
|
||||
//@AutoConfigureBefore(FeignAutoConfiguration.class)
|
||||
//@Slf4j
|
||||
//@Configuration
|
||||
//public class FeignConfig {
|
||||
//
|
||||
// /**
|
||||
// * 设置feign header参数
|
||||
// * 【X_ACCESS_TOKEN】【X_SIGN】【X_TIMESTAMP】
|
||||
// * @return
|
||||
// */
|
||||
// @Bean
|
||||
// public RequestInterceptor requestInterceptor() {
|
||||
// return requestTemplate -> {
|
||||
// ServletRequestAttributes attributes = (ServletRequestAttributes) RequestContextHolder.getRequestAttributes();
|
||||
// if (null != attributes) {
|
||||
// HttpServletRequest request = attributes.getRequest();
|
||||
// log.debug("Feign request: {}", request.getRequestURI());
|
||||
// // 将token信息放入header中
|
||||
// String token = request.getHeader(CommonConstant.X_ACCESS_TOKEN);
|
||||
// if(token==null || "".equals(token)){
|
||||
// token = request.getParameter("token");
|
||||
// }
|
||||
// log.info("Feign Login Request token: {}", token);
|
||||
// requestTemplate.header(CommonConstant.X_ACCESS_TOKEN, token);
|
||||
// }else{
|
||||
// //解决后台任务、MQ中调用feign接口,无会话token的问题
|
||||
// String token = UserTokenContext.getToken();
|
||||
// log.info("Feign No Login token: {}", token);
|
||||
// requestTemplate.header(CommonConstant.X_ACCESS_TOKEN, token);
|
||||
// }
|
||||
//
|
||||
// //================================================================================================================
|
||||
// //针对特殊接口,进行加签验证 ——根据URL地址过滤请求 【字典表参数签名验证】
|
||||
// if (PathMatcherUtil.matches(Arrays.asList(SignAuthConfiguration.SIGN_URL_LIST),requestTemplate.path())) {
|
||||
// try {
|
||||
// log.info("============================ [begin] fegin api url ============================");
|
||||
// log.info(requestTemplate.path());
|
||||
// log.info(requestTemplate.method());
|
||||
// String queryLine = requestTemplate.queryLine();
|
||||
// String questionMark="?";
|
||||
// if(queryLine!=null && queryLine.startsWith(questionMark)){
|
||||
// queryLine = queryLine.substring(1);
|
||||
// }
|
||||
// log.info(queryLine);
|
||||
// if(requestTemplate.body()!=null){
|
||||
// log.info(new String(requestTemplate.body()));
|
||||
// }
|
||||
// SortedMap<String, String> allParams = HttpUtils.getAllParams(requestTemplate.path(),queryLine,requestTemplate.body(),requestTemplate.method());
|
||||
// String sign = SignUtil.getParamsSign(allParams);
|
||||
// log.info(" Feign request params sign: {}",sign);
|
||||
// log.info("============================ [end] fegin api url ============================");
|
||||
// requestTemplate.header(CommonConstant.X_SIGN, sign);
|
||||
// requestTemplate.header(CommonConstant.X_TIMESTAMP, DateUtils.getCurrentTimestamp().toString());
|
||||
// } catch (IOException e) {
|
||||
// e.printStackTrace();
|
||||
// }
|
||||
// }
|
||||
// //================================================================================================================
|
||||
// };
|
||||
// }
|
||||
//
|
||||
//
|
||||
//
|
||||
// /**
|
||||
// * Feign 客户端的日志记录,默认级别为NONE
|
||||
// * Logger.Level 的具体级别如下:
|
||||
// * NONE:不记录任何信息
|
||||
// * BASIC:仅记录请求方法、URL以及响应状态码和执行时间
|
||||
// * HEADERS:除了记录 BASIC级别的信息外,还会记录请求和响应的头信息
|
||||
// * FULL:记录所有请求与响应的明细,包括头信息、请求体、元数据
|
||||
// */
|
||||
// @Bean
|
||||
// Logger.Level feignLoggerLevel() {
|
||||
// return Logger.Level.FULL;
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * Feign支持文件上传
|
||||
// * @param messageConverters
|
||||
// * @return
|
||||
// */
|
||||
// @Bean
|
||||
// @Primary
|
||||
// @Scope("prototype")
|
||||
// public Encoder multipartFormEncoder(ObjectFactory<HttpMessageConverters> messageConverters) {
|
||||
// return new SpringFormEncoder(new SpringEncoder(messageConverters));
|
||||
// }
|
||||
//
|
||||
// // update-begin--Author:sunjianlei Date:20210604 for: 给 Feign 添加 FastJson 的解析支持 ----------
|
||||
// /**
|
||||
// * 给 Feign 添加 FastJson 的解析支持
|
||||
// */
|
||||
// @Bean
|
||||
// public Encoder feignEncoder() {
|
||||
// return new SpringEncoder(feignHttpMessageConverter());
|
||||
// }
|
||||
//
|
||||
// @Bean
|
||||
// public Decoder feignDecoder() {
|
||||
// return new SpringDecoder(feignHttpMessageConverter());
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * 设置解码器为fastjson
|
||||
// *
|
||||
// * @return
|
||||
// */
|
||||
// private ObjectFactory<HttpMessageConverters> feignHttpMessageConverter() {
|
||||
// final HttpMessageConverters httpMessageConverters = new HttpMessageConverters(this.getFastJsonConverter());
|
||||
// return () -> httpMessageConverters;
|
||||
// }
|
||||
//
|
||||
// private FastJsonHttpMessageConverter getFastJsonConverter() {
|
||||
// FastJsonHttpMessageConverter converter = new FastJsonHttpMessageConverter();
|
||||
//
|
||||
// List<MediaType> supportedMediaTypes = new ArrayList<>();
|
||||
// MediaType mediaTypeJson = MediaType.valueOf(MediaType.APPLICATION_JSON_VALUE);
|
||||
// supportedMediaTypes.add(mediaTypeJson);
|
||||
// converter.setSupportedMediaTypes(supportedMediaTypes);
|
||||
// FastJsonConfig config = new FastJsonConfig();
|
||||
// config.getSerializeConfig().put(JSON.class, new SwaggerJsonSerializer());
|
||||
// config.setSerializerFeatures(SerializerFeature.DisableCircularReferenceDetect);
|
||||
// converter.setFastJsonConfig(config);
|
||||
//
|
||||
// return converter;
|
||||
// }
|
||||
// // update-end--Author:sunjianlei Date:20210604 for: 给 Feign 添加 FastJson 的解析支持 ----------
|
||||
//
|
||||
//}
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
<parent>
|
||||
<artifactId>jeecg-boot-base-api</artifactId>
|
||||
<groupId>org.jeecgframework.boot</groupId>
|
||||
<version>3.0</version>
|
||||
<version>3.2.0</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
|
||||
@ -1,55 +0,0 @@
|
||||
package org.jeecg.common.bpm.api;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import org.jeecg.common.api.vo.Result;
|
||||
import org.jeecg.common.system.vo.DictModel;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
|
||||
/**
|
||||
* 流程接口
|
||||
*
|
||||
* @author scott
|
||||
*/
|
||||
public interface IBpmBaseExtAPI {
|
||||
/**
|
||||
* 23. 流程提交接口(online,自定义开发)
|
||||
* @param flowCode 流程业务关联 例如:joa_leave_01
|
||||
* @param id 表单业务数据data id
|
||||
* @param formUrl 流程审批时附件页面默认展示的PC端表单组件(地址)
|
||||
* @param formUrlMobile 流程审批时附件页面默认展示的移动端表单组件(地址)
|
||||
* @param username 流程发起人账号
|
||||
* @param jsonData Json串,额外扩展的流程变量值 【非必填】
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
Result<String> startMutilProcess(String flowCode, String id, String formUrl, String formUrlMobile,String username, String jsonData) throws Exception;
|
||||
|
||||
/**
|
||||
* 24. 流程提交接口(自定义表单设计器)
|
||||
* @param flowCode 流程业务关联 例如:joa_leave_01
|
||||
* @param id 表单业务数据data id
|
||||
* @param formUrl 流程审批时附件页面默认展示的PC端表单组件(地址)
|
||||
* @param formUrlMobile 流程审批时附件页面默认展示的移动端表单组件(地址)
|
||||
* @param username 流程发起人账号
|
||||
* @param jsonData Json串,额外扩展的流程变量值 【非必填】
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
Result<String> startDesFormMutilProcess(String flowCode, String id, String formUrl, String formUrlMobile,String username,String jsonData) throws Exception;
|
||||
/**
|
||||
* 25. 保存流程草稿箱接口(自定义开发表单、online表单)
|
||||
* @param flowCode 流程业务关联 例如:joa_leave_01
|
||||
* @param id 表单业务数据data id
|
||||
* @param formUrl 流程审批时附件页面默认展示的PC端表单组件(地址) 【非必填】
|
||||
* @param formUrlMobile 流程审批时附件页面默认展示的移动端表单组件(地址) 【非必填】
|
||||
* @param username 流程发起人账号
|
||||
* @param jsonData Json串,额外扩展的流程变量值 【非必填】
|
||||
* @return
|
||||
* @throws Exception
|
||||
*/
|
||||
Result<String> saveMutilProcessDraft(String flowCode, String id, String formUrl, String formUrlMobile,String username,String jsonData) throws Exception;
|
||||
|
||||
}
|
||||
@ -1,61 +0,0 @@
|
||||
package org.jeecg.common.online.api;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import org.jeecg.common.system.vo.DictModel;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 表单设计器【Online】翻译API接口
|
||||
*
|
||||
* @author sunjianlei
|
||||
*/
|
||||
public interface IOnlineBaseExtAPI {
|
||||
|
||||
/**
|
||||
* 【Online】 表单设计器专用:同步新增
|
||||
*/
|
||||
String cgformPostCrazyForm(String tableName, JSONObject jsonObject) throws Exception;
|
||||
|
||||
/**
|
||||
* 【Online】 表单设计器专用:同步编辑
|
||||
*/
|
||||
String cgformPutCrazyForm(String tableName, JSONObject jsonObject) throws Exception;
|
||||
|
||||
/**
|
||||
* online表单删除数据
|
||||
*
|
||||
* @param cgformCode Online表单code
|
||||
* @param dataIds 数据ID,可逗号分割
|
||||
* @return
|
||||
*/
|
||||
String cgformDeleteDataByCode(String cgformCode, String dataIds);
|
||||
|
||||
/**
|
||||
* 通过online表名查询数据,同时查询出子表的数据
|
||||
*
|
||||
* @param tableName online表名
|
||||
* @param dataIds online数据ID
|
||||
* @return
|
||||
*/
|
||||
JSONObject cgformQueryAllDataByTableName(String tableName, String dataIds);
|
||||
|
||||
/**
|
||||
* 对 cgreportGetData 的返回值做优化,封装 DictModel 集合
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
List<DictModel> cgreportGetDataPackage(String code, String dictText, String dictCode, String dataList);
|
||||
|
||||
/**
|
||||
* 【cgreport】通过 head code 获取 sql语句,并执行该语句返回查询数据
|
||||
*
|
||||
* @param code 报表Code,如果没传ID就通过code查
|
||||
* @param forceKey
|
||||
* @param dataList
|
||||
* @return
|
||||
*/
|
||||
Map<String, Object> cgreportGetData(String code, String forceKey, String dataList);
|
||||
|
||||
}
|
||||
@ -80,14 +80,16 @@ public interface ISysBaseAPI extends CommonAPI {
|
||||
|
||||
|
||||
|
||||
/** 11查询所有的父级字典,按照create_time排序 */
|
||||
/** 11查询所有的父级字典,按照create_time排序
|
||||
* @return List<DictModel> 字典集合
|
||||
*/
|
||||
public List<DictModel> queryAllDict();
|
||||
|
||||
/**
|
||||
* 12查询所有分类字典
|
||||
* @return
|
||||
*/
|
||||
public List<SysCategoryModel> queryAllDSysCategory();
|
||||
public List<SysCategoryModel> queryAllSysCategory();
|
||||
|
||||
|
||||
/**
|
||||
@ -132,6 +134,9 @@ public interface ISysBaseAPI extends CommonAPI {
|
||||
|
||||
/**
|
||||
* 19分页查询用户 返回JSONObject
|
||||
* @param userIds 多个用户id
|
||||
* @param pageNo 当前页数
|
||||
* @param pageSize 每页显示条数
|
||||
* @return
|
||||
*/
|
||||
public JSONObject queryAllUser(String userIds, Integer pageNo, Integer pageSize);
|
||||
@ -144,7 +149,7 @@ public interface ISysBaseAPI extends CommonAPI {
|
||||
|
||||
/**
|
||||
* 21获取所有角色 带参
|
||||
* roleIds 默认选中角色
|
||||
* @param roleIds 默认选中角色
|
||||
* @return
|
||||
*/
|
||||
public List<ComboModel> queryAllRole(String[] roleIds );
|
||||
@ -192,7 +197,7 @@ public interface ISysBaseAPI extends CommonAPI {
|
||||
|
||||
/**
|
||||
* 28根据id获取所有参与用户
|
||||
* userIds
|
||||
* @param userIds 多个用户id
|
||||
* @return
|
||||
*/
|
||||
public List<LoginUser> queryAllUserByIds(String[] userIds);
|
||||
@ -207,7 +212,7 @@ public interface ISysBaseAPI extends CommonAPI {
|
||||
|
||||
/**
|
||||
* 30根据name获取所有参与用户
|
||||
* userNames
|
||||
* @param userNames 多个用户账户
|
||||
* @return
|
||||
*/
|
||||
List<LoginUser> queryUserByNames(String[] userNames);
|
||||
@ -236,6 +241,8 @@ public interface ISysBaseAPI extends CommonAPI {
|
||||
|
||||
/**
|
||||
* 34通过部门id获取部门全部信息
|
||||
* @param id 部门id
|
||||
* @return SysDepartModel对象
|
||||
*/
|
||||
SysDepartModel selectAllById(String id);
|
||||
|
||||
@ -284,11 +291,14 @@ public interface ISysBaseAPI extends CommonAPI {
|
||||
/**
|
||||
* 41 获取公司下级部门和公司下所有用户信息
|
||||
* @param orgCode
|
||||
* @return List<Map>
|
||||
*/
|
||||
List<Map> getDeptUserByOrgCode(String orgCode);
|
||||
|
||||
/**
|
||||
* 查询分类字典翻译
|
||||
* @param ids 多个分类字典id
|
||||
* @return List<String>
|
||||
*/
|
||||
List<String> loadCategoryDictItem(String ids);
|
||||
|
||||
@ -323,6 +333,7 @@ public interface ISysBaseAPI extends CommonAPI {
|
||||
*
|
||||
* @param dictCode 字典code格式:table,text,code
|
||||
* @param keyword 过滤关键字
|
||||
* @param pageSize 分页条数
|
||||
* @return
|
||||
*/
|
||||
List<DictModel> loadDictItemByKeyword(String dictCode, String keyword, Integer pageSize);
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
<parent>
|
||||
<artifactId>jeecg-boot-base</artifactId>
|
||||
<groupId>org.jeecgframework.boot</groupId>
|
||||
<version>3.0</version>
|
||||
<version>3.2.0</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
<parent>
|
||||
<groupId>org.jeecgframework.boot</groupId>
|
||||
<artifactId>jeecg-boot-base</artifactId>
|
||||
<version>3.0</version>
|
||||
<version>3.2.0</version>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
@ -63,6 +63,11 @@
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-validation</artifactId>
|
||||
</dependency>
|
||||
<!--springboot2.6+解决metrics端点不显示jvm信息的问题-->
|
||||
<dependency>
|
||||
<groupId>io.micrometer</groupId>
|
||||
<artifactId>micrometer-registry-prometheus</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- commons -->
|
||||
<dependency>
|
||||
@ -101,21 +106,6 @@
|
||||
<artifactId>dynamic-datasource-spring-boot-starter</artifactId>
|
||||
<version>${dynamic-datasource-spring-boot-starter.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.hibernate</groupId>
|
||||
<artifactId>hibernate-core</artifactId>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<groupId>commons-collections</groupId>
|
||||
<artifactId>commons-collections</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.jeecgframework.boot</groupId>
|
||||
<artifactId>hibernate-re</artifactId>
|
||||
<version>3.0.02</version>
|
||||
</dependency>
|
||||
|
||||
<!-- 数据库驱动 -->
|
||||
<!--mysql-->
|
||||
@ -176,6 +166,11 @@
|
||||
<groupId>org.apache.shiro</groupId>
|
||||
<artifactId>shiro-core</artifactId>
|
||||
</exclusion>
|
||||
<!-- [issues/3596] 解决启动报错:Cannot resolve com.sun:tools:1.8.0 -->
|
||||
<exclusion>
|
||||
<groupId>com.puppycrawl.tools</groupId>
|
||||
<artifactId>checkstyle</artifactId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
|
||||
@ -239,6 +234,11 @@
|
||||
<groupId>com.squareup.okhttp3</groupId>
|
||||
<artifactId>okhttp</artifactId>
|
||||
</dependency>
|
||||
<!-- 解决okhttp引用了kotlin,应用启动有警告日志问题 -->
|
||||
<dependency>
|
||||
<groupId>com.fasterxml.jackson.module</groupId>
|
||||
<artifactId>jackson-module-kotlin</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
</project>
|
||||
@ -6,6 +6,10 @@ import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
/**
|
||||
* 通用api
|
||||
* @author: jeecg-boot
|
||||
*/
|
||||
public interface CommonAPI {
|
||||
|
||||
/**
|
||||
@ -67,6 +71,9 @@ public interface CommonAPI {
|
||||
|
||||
/**
|
||||
* 8查询数据权限
|
||||
* @param component 组件
|
||||
* @param username 用户名
|
||||
* @param requestPath 前段请求地址
|
||||
* @return
|
||||
*/
|
||||
List<SysPermissionDataRuleModel> queryPermissionDataRule(String component, String requestPath, String username);
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user