Browse Source

JeecgBoot 2.4 微服务正式版本发布,基于SpringBoot的低代码平台

pull/2025/head
zhangdaiscott 4 years ago
parent
commit
a004acee4b
  1. 16
      README.md
  2. 3
      ant-design-vue-jeecg/.env
  3. 4
      ant-design-vue-jeecg/.env.development
  4. 4
      ant-design-vue-jeecg/.env.preview
  5. 4
      ant-design-vue-jeecg/.env.production
  6. 2
      ant-design-vue-jeecg/README.md
  7. 11
      ant-design-vue-jeecg/package.json
  8. 10
      ant-design-vue-jeecg/public/index.html
  9. 32
      ant-design-vue-jeecg/src/api/api.js
  10. 23
      ant-design-vue-jeecg/src/api/login.js
  11. 10
      ant-design-vue-jeecg/src/api/manage.js
  12. 30
      ant-design-vue-jeecg/src/cas/sso.js
  13. 20
      ant-design-vue-jeecg/src/components/JVxeCells/JVxeFileCell.vue
  14. 20
      ant-design-vue-jeecg/src/components/JVxeCells/JVxeImageCell.vue
  15. 7
      ant-design-vue-jeecg/src/components/dict/JMultiSelectTag.vue
  16. 14
      ant-design-vue-jeecg/src/components/dict/index.js
  17. 53
      ant-design-vue-jeecg/src/components/jeecg/JEditableTable.vue
  18. 36
      ant-design-vue-jeecg/src/components/jeecg/JImageUpload.vue
  19. 1
      ant-design-vue-jeecg/src/components/jeecg/JMarkdownEditor/default-options.js
  20. 127
      ant-design-vue-jeecg/src/components/jeecg/JMarkdownEditor/index.vue
  21. 7
      ant-design-vue-jeecg/src/components/jeecg/JPopup.vue
  22. 39
      ant-design-vue-jeecg/src/components/jeecg/JVxeTable/components/JVxeTable.js
  23. 2
      ant-design-vue-jeecg/src/components/jeecg/README.md
  24. 30
      ant-design-vue-jeecg/src/components/jeecg/index.js
  25. 7
      ant-design-vue-jeecg/src/components/jeecg/minipop/JFilePop.vue
  26. 58
      ant-design-vue-jeecg/src/components/jeecg/modal/JPopupOnlReport.vue
  27. 2
      ant-design-vue-jeecg/src/components/jeecgbiz/JSelectBizComponent/index.vue
  28. 6
      ant-design-vue-jeecg/src/components/jeecgbiz/JSelectDepart.vue
  29. 2
      ant-design-vue-jeecg/src/components/jeecgbiz/modal/JSelectUserByDepModal.vue
  30. 25
      ant-design-vue-jeecg/src/components/layouts/RouteView.vue
  31. 29
      ant-design-vue-jeecg/src/components/layouts/TabLayout.vue
  32. 5
      ant-design-vue-jeecg/src/components/lazy_antd.js
  33. 40
      ant-design-vue-jeecg/src/components/menu/SideMenu.vue
  34. 1
      ant-design-vue-jeecg/src/components/page/GlobalHeader.vue
  35. 55
      ant-design-vue-jeecg/src/components/page/GlobalLayout.vue
  36. 14
      ant-design-vue-jeecg/src/components/setting/SettingDrawer.vue
  37. 9
      ant-design-vue-jeecg/src/components/tools/UserMenu.vue
  38. 10
      ant-design-vue-jeecg/src/config/index.js
  39. 6
      ant-design-vue-jeecg/src/config/router.config.js
  40. 54
      ant-design-vue-jeecg/src/main.js
  41. 27
      ant-design-vue-jeecg/src/mixins/JEditableTableMixin.js
  42. 34
      ant-design-vue-jeecg/src/mixins/JeecgListMixin.js
  43. 116
      ant-design-vue-jeecg/src/mixins/OnlAutoListMixin.js
  44. 10
      ant-design-vue-jeecg/src/router/index.js
  45. 21
      ant-design-vue-jeecg/src/store/modules/user.js
  46. 2
      ant-design-vue-jeecg/src/store/mutation-types.js
  47. 60
      ant-design-vue-jeecg/src/utils/desform/DesformRouteUtils.js
  48. 185
      ant-design-vue-jeecg/src/utils/desform/pcaaUtils.js
  49. 43
      ant-design-vue-jeecg/src/utils/request.js
  50. 8
      ant-design-vue-jeecg/src/utils/util.js
  51. 15
      ant-design-vue-jeecg/src/views/404.vue
  52. 2
      ant-design-vue-jeecg/src/views/account/center/Index.vue
  53. 8
      ant-design-vue-jeecg/src/views/dashboard/Workplace.vue
  54. 0
      ant-design-vue-jeecg/src/views/examples/form/BasicForm.vue
  55. 0
      ant-design-vue-jeecg/src/views/examples/form/advancedForm/AdvancedForm.vue
  56. 0
      ant-design-vue-jeecg/src/views/examples/form/advancedForm/RepositoryForm.vue
  57. 0
      ant-design-vue-jeecg/src/views/examples/form/advancedForm/TaskForm.vue
  58. 0
      ant-design-vue-jeecg/src/views/examples/form/stepForm/Step1.vue
  59. 0
      ant-design-vue-jeecg/src/views/examples/form/stepForm/Step2.vue
  60. 2
      ant-design-vue-jeecg/src/views/examples/form/stepForm/Step3.vue
  61. 0
      ant-design-vue-jeecg/src/views/examples/form/stepForm/StepForm.vue
  62. 0
      ant-design-vue-jeecg/src/views/examples/list/CardList.vue
  63. 2
      ant-design-vue-jeecg/src/views/examples/list/PermissionList.vue
  64. 2
      ant-design-vue-jeecg/src/views/examples/list/RoleList.vue
  65. 0
      ant-design-vue-jeecg/src/views/examples/list/StandardList.vue
  66. 2
      ant-design-vue-jeecg/src/views/examples/list/TableInnerEditList.vue
  67. 0
      ant-design-vue-jeecg/src/views/examples/list/TableList.vue
  68. 0
      ant-design-vue-jeecg/src/views/examples/list/UserList.vue
  69. 0
      ant-design-vue-jeecg/src/views/examples/list/modules/RoleModal.vue
  70. 0
      ant-design-vue-jeecg/src/views/examples/list/search/SearchLayout.vue
  71. 0
      ant-design-vue-jeecg/src/views/examples/profile/advanced/Advanced.vue
  72. 0
      ant-design-vue-jeecg/src/views/examples/profile/basic/Index.vue
  73. 2
      ant-design-vue-jeecg/src/views/jeecg/JeecgPdfView.vue
  74. 2
      ant-design-vue-jeecg/src/views/jeecg/JeecgTreeTable.vue
  75. 4
      ant-design-vue-jeecg/src/views/jeecg/SelectDemo.vue
  76. 2
      ant-design-vue-jeecg/src/views/jeecg/helloworld.vue
  77. 14
      ant-design-vue-jeecg/src/views/jeecg/modules/JeecgOrderMainModal.vue
  78. 2
      ant-design-vue-jeecg/src/views/jeecg/report/Analysis.vue
  79. 8
      ant-design-vue-jeecg/src/views/jeecg/report/ArchivesStatisticst.vue
  80. 10
      ant-design-vue-jeecg/src/views/modules/message/SysMessageList.vue
  81. 10
      ant-design-vue-jeecg/src/views/modules/message/SysMessageTemplateList.vue
  82. 4
      ant-design-vue-jeecg/src/views/modules/message/modules/SysMessageModal.vue
  83. 4
      ant-design-vue-jeecg/src/views/modules/message/modules/SysMessageTemplateModal.vue
  84. 2
      ant-design-vue-jeecg/src/views/modules/message/modules/SysMessageTestModal.vue
  85. 2
      ant-design-vue-jeecg/src/views/modules/monitor/DiskMonitoring.vue
  86. 6
      ant-design-vue-jeecg/src/views/modules/monitor/RedisInfo.vue
  87. 6
      ant-design-vue-jeecg/src/views/modules/oss/OSSFileList.vue
  88. 170
      ant-design-vue-jeecg/src/views/system/SysGatewayRouteList.vue
  89. 101
      ant-design-vue-jeecg/src/views/system/SysGatewayRouteList2.vue
  90. 18
      ant-design-vue-jeecg/src/views/system/UserList.vue
  91. 5
      ant-design-vue-jeecg/src/views/system/modules/DepartWindow.vue
  92. 16
      ant-design-vue-jeecg/src/views/system/modules/DictItemModal.vue
  93. 306
      ant-design-vue-jeecg/src/views/system/modules/GateWayRouteModal.vue
  94. 10
      ant-design-vue-jeecg/src/views/system/modules/SysPositionModal.vue
  95. 9
      ant-design-vue-jeecg/src/views/system/modules/TenantForm.vue
  96. 2
      ant-design-vue-jeecg/src/views/system/modules/UserModal.vue
  97. 53
      ant-design-vue-jeecg/src/views/user/Login.vue
  98. 2
      ant-design-vue-jeecg/src/views/user/LoginSelectTenant.vue
  99. 0
      ant-design-vue-jeecg/src/views/user/alteration/Alteration.vue
  100. 2
      ant-design-vue-jeecg/src/views/user/alteration/Step1.vue
  101. Some files were not shown because too many files have changed in this diff Show More

16
README.md

@ -7,14 +7,14 @@
JEECG BOOT 低代码开发平台(前后端分离版本)
===============
-当前最新版本: 2.3(发布日期:2020-09-14
[![AUR](https://img.shields.io/badge/license-Apache%20License%202.0-blue.svg)](https://github.com/zhangdaiscott/jeecg-boot/blob/master/LICENSE)
[![](https://img.shields.io/badge/Author-北京国炬软件-orange.svg)](http://www.jeecg.com)
[![](https://img.shields.io/badge/version-2.3-brightgreen.svg)](https://github.com/zhangdaiscott/jeecg-boot)
[![GitHub stars](https://img.shields.io/github/stars/zhangdaiscott/jeecg-boot.svg?style=social&label=Stars)](https://github.com/zhangdaiscott/jeecg-boot)
[![GitHub forks](https://img.shields.io/github/forks/zhangdaiscott/jeecg-boot.svg?style=social&label=Fork)](https://github.com/zhangdaiscott/jeecg-boot)
当前最新版本: 2.4.0(发布日期:2020-12-01
[![AUR](https://img.shields.io/badge/license-Apache%20License%202.0-blue.svg)](https://github.com/zhangdaiscott/jeecg-boot/blob/master/LICENSE)
[![](https://img.shields.io/badge/Author-北京国炬软件-orange.svg)](http://www.jeecg.com)
[![](https://img.shields.io/badge/version-2.4-brightgreen.svg)](https://github.com/zhangdaiscott/jeecg-boot)
[![GitHub stars](https://img.shields.io/github/stars/zhangdaiscott/jeecg-boot.svg?style=social&label=Stars)](https://github.com/zhangdaiscott/jeecg-boot)
[![GitHub forks](https://img.shields.io/github/forks/zhangdaiscott/jeecg-boot.svg?style=social&label=Fork)](https://github.com/zhangdaiscott/jeecg-boot)

3
ant-design-vue-jeecg/.env

@ -0,0 +1,3 @@
NODE_ENV=production
VUE_APP_PLATFORM_NAME=Jeecg-Boot 企业级快速开发平台
VUE_APP_SSO=false

4
ant-design-vue-jeecg/.env.development

@ -0,0 +1,4 @@
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

4
ant-design-vue-jeecg/.env.preview

@ -0,0 +1,4 @@
NODE_ENV=production
VUE_APP_API_BASE_URL=http://boot.jeecg.com:8080/jeecg-boot
VUE_APP_CAS_BASE_URL=http://cas.example.org:8443/cas
VUE_APP_ONLINE_BASE_URL=http://fileview.jeecg.com/onlinePreview

4
ant-design-vue-jeecg/.env.production

@ -0,0 +1,4 @@
NODE_ENV=production
VUE_APP_API_BASE_URL=https://bootapi.jeecg.com
VUE_APP_CAS_BASE_URL=http://localhost:8888/cas
VUE_APP_ONLINE_BASE_URL=http://fileview.jeecg.com/onlinePreview

2
ant-design-vue-jeecg/README.md

@ -1,7 +1,7 @@
Ant Design Jeecg Vue
====
当前最新版本: 2.3.0(发布日期:20200914
当前最新版本: 2.4.0(发布日期:20201201
Overview
----

11
ant-design-vue-jeecg/package.json

@ -1,16 +1,17 @@
{
"name": "vue-antd-jeecg",
"version": "2.3.0",
"version": "2.4.0",
"private": true,
"scripts": {
"pre": "cnpm install || yarn --registry https://registry.npm.taobao.org || npm install --registry https://registry.npm.taobao.org ",
"serve": "vue-cli-service serve",
"build:preview": "vue-cli-service build --mode preview",
"build": "vue-cli-service build",
"lint": "vue-cli-service lint"
},
"dependencies": {
"ant-design-vue": "^1.6.3",
"@jeecg/antd-online-mini": "2.3.0",
"@jeecg/antd-online-mini": "2.4.0-beta2",
"ant-design-vue": "^1.7.2",
"@antv/data-set": "^0.11.4",
"viser-vue": "^2.4.8",
"axios": "^0.18.0",
@ -39,7 +40,6 @@
"@toast-ui/editor": "^2.1.2",
"vue-area-linkage": "^5.1.0",
"area-data": "^5.0.6",
"jsoneditor": "^9.0.0",
"dom-align": "1.12.0",
"xe-utils": "2.4.8",
"vxe-table": "2.9.13",
@ -58,8 +58,7 @@
"less-loader": "^4.1.0",
"vue-template-compiler": "^2.6.10",
"html-webpack-plugin": "^4.2.0",
"compression-webpack-plugin": "^3.1.0",
"babel-plugin-import": "^1.13.0"
"compression-webpack-plugin": "^3.1.0"
},
"eslintConfig": {
"root": true,

10
ant-design-vue-jeecg/public/index.html vendored

@ -7,8 +7,7 @@
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<title>Jeecg-Boot 企业级快速开发平台</title>
<link rel="icon" href="<%= BASE_URL %>logo.png">
<script src="/cdn/babel-polyfill/polyfill_7_2_5.js"></script>
<script src="<%= BASE_URL %>cdn/babel-polyfill/polyfill_7_2_5.js"></script>
<style>
html,
body,
@ -243,17 +242,10 @@
<!-- 全局配置 -->
<script>
window._CONFIG = {};
window._CONFIG['domianURL'] = 'http://127.0.0.1:8080/jeecg-boot';
window._CONFIG['casPrefixUrl'] = 'http://cas.example.org:8443/cas';
window._CONFIG['onlinePreviewDomainURL'] = 'http://fileview.jeecg.com/onlinePreview'
window._CONFIG['staticDomainURL'] = window._CONFIG['domianURL'] + '/sys/common/static';
//window._CONFIG['downloadUrl'] = window._CONFIG['domianURL'] + '/sys/common/download';
window._CONFIG['pdfDomainURL'] = window._CONFIG['domianURL'] + '/sys/common/pdf/pdfPreviewIframe';
</script>
</head>
<body>
<!-- built files will be auto injected -->
<div id="app">
<div id="loader-wrapper">
<div id="loader"></div>

32
ant-design-vue-jeecg/src/api/api.js

@ -2,17 +2,9 @@ import { getAction, deleteAction, putAction, postAction, httpAction } from '@/ap
import Vue from 'vue'
import {UI_CACHE_DB_DICT_DATA } from "@/store/mutation-types"
////根路径
// const doMian = "/jeecg-boot/";
////图片预览请求地址
// const imgView = "http://localhost:8080/jeecg-boot/sys/common/view/";
//角色管理
const addRole = (params)=>postAction("/sys/role/add",params);
const editRole = (params)=>putAction("/sys/role/edit",params);
// const getRoleList = (params)=>getAction("/sys/role/list",params);
// const deleteRole = (params)=>deleteAction("/sys/role/delete",params);
// const deleteRoleList = (params)=>deleteAction("/sys/role/deleteBatch",params);
const checkRoleCode = (params)=>getAction("/sys/role/checkRoleCode",params);
const queryall = (params)=>getAction("/sys/role/queryall",params);
@ -21,33 +13,25 @@ const addUser = (params)=>postAction("/sys/user/add",params);
const editUser = (params)=>putAction("/sys/user/edit",params);
const queryUserRole = (params)=>getAction("/sys/user/queryUserRole",params);
const getUserList = (params)=>getAction("/sys/user/list",params);
// const deleteUser = (params)=>deleteAction("/sys/user/delete",params);
// const deleteUserList = (params)=>deleteAction("/sys/user/deleteBatch",params);
const frozenBatch = (params)=>putAction("/sys/user/frozenBatch",params);
//验证用户是否存在
const checkOnlyUser = (params)=>getAction("/sys/user/checkOnlyUser",params);
//改变密码
const changePassword = (params)=>putAction("/sys/user/changePassword",params);
//权限管理
const addPermission= (params)=>postAction("/sys/permission/add",params);
const editPermission= (params)=>putAction("/sys/permission/edit",params);
const getPermissionList = (params)=>getAction("/sys/permission/list",params);
/*update_begin author:wuxianquan date:20190908 for:添加查询一级菜单和子菜单查询api */
const getSystemMenuList = (params)=>getAction("/sys/permission/getSystemMenuList",params);
const getSystemSubmenu = (params)=>getAction("/sys/permission/getSystemSubmenu",params);
const getSystemSubmenuBatch = (params) => getAction('/sys/permission/getSystemSubmenuBatch', params)
/*update_end author:wuxianquan date:20190908 for:添加查询一级菜单和子菜单查询api */
// const deletePermission = (params)=>deleteAction("/sys/permission/delete",params);
// const deletePermissionList = (params)=>deleteAction("/sys/permission/deleteBatch",params);
const queryTreeList = (params)=>getAction("/sys/permission/queryTreeList",params);
const queryTreeListForRole = (params)=>getAction("/sys/role/queryTreeList",params);
const queryListAsync = (params)=>getAction("/sys/permission/queryListAsync",params);
const queryRolePermission = (params)=>getAction("/sys/permission/queryRolePermission",params);
const saveRolePermission = (params)=>postAction("/sys/permission/saveRolePermission",params);
//const queryPermissionsByUser = (params)=>getAction("/sys/permission/queryByUser",params);
const queryPermissionsByUser = (params)=>getAction("/sys/permission/getUserPermissionByToken",params);
const queryPermissionsByUser = ()=>getAction("/sys/permission/getUserPermissionByToken");
const loadAllRoleIds = (params)=>getAction("/sys/permission/loadAllRoleIds",params);
const getPermissionRuleList = (params)=>getAction("/sys/permission/getPermRuleListByPermId",params);
const queryPermissionRule = (params)=>getAction("/sys/permission/queryPermissionRule",params);
@ -68,21 +52,15 @@ const saveDeptRolePermission = (params)=>postAction("/sys/sysDepartPermission/sa
const queryMyDepartTreeList = (params)=>getAction("/sys/sysDepart/queryMyDeptTreeList",params);
//日志管理
//const getLogList = (params)=>getAction("/sys/log/list",params);
const deleteLog = (params)=>deleteAction("/sys/log/delete",params);
const deleteLogList = (params)=>deleteAction("/sys/log/deleteBatch",params);
//数据字典
const addDict = (params)=>postAction("/sys/dict/add",params);
const editDict = (params)=>putAction("/sys/dict/edit",params);
//const getDictList = (params)=>getAction("/sys/dict/list",params);
const treeList = (params)=>getAction("/sys/dict/treeList",params);
// const delDict = (params)=>deleteAction("/sys/dict/delete",params);
//const getDictItemList = (params)=>getAction("/sys/dictItem/list",params);
const addDictItem = (params)=>postAction("/sys/dictItem/add",params);
const editDictItem = (params)=>putAction("/sys/dictItem/edit",params);
//const delDictItem = (params)=>deleteAction("/sys/dictItem/delete",params);
//const delDictItemList = (params)=>deleteAction("/sys/dictItem/deleteBatch",params);
//字典标签专用(通过code获取字典数组)
export const ajaxGetDictItems = (code, params)=>getAction(`/sys/dict/getDictItems/${code}`,params);
@ -101,14 +79,8 @@ const doReovkeData = (params)=>getAction("/sys/annountCement/doReovkeData",param
//获取系统访问量
const getLoginfo = (params)=>getAction("/sys/loginfo",params);
const getVisitInfo = (params)=>getAction("/sys/visitInfo",params);
//数据日志访问
// const getDataLogList = (params)=>getAction("/sys/dataLog/list",params);
// 根据部门主键查询用户信息
const queryUserByDepId = (params)=>getAction("/sys/user/queryUserByDepId",params);
// 查询用户角色表里的所有信息
// const queryUserRoleMap = (params)=>getAction("/sys/user/queryUserRoleMap",params);
// 重复校验
const duplicateCheck = (params)=>getAction("/sys/duplicate/check",params);
// 加载分类字典
@ -126,8 +98,6 @@ export const transitRESTful = {
}
export {
// imgView,
// doMian,
addRole,
editRole,
checkRoleCode,

23
ant-design-vue-jeecg/src/api/login.js

@ -36,15 +36,15 @@ export function getSmsCaptcha(parameter) {
})
}
export function getInfo() {
return axios({
url: '/api/user/info',
method: 'get',
headers: {
'Content-Type': 'application/json;charset=UTF-8'
}
})
}
// export function getInfo() {
// return axios({
// url: '/api/user/info',
// method: 'get',
// headers: {
// 'Content-Type': 'application/json;charset=UTF-8'
// }
// })
// }
export function logout(logoutToken) {
return axios({
@ -60,11 +60,12 @@ export function logout(logoutToken) {
/**
* 第三方登录
* @param token
* @param thirdType
* @returns {*}
*/
export function thirdLogin(token) {
export function thirdLogin(token,thirdType) {
return axios({
url: `/thirdLogin/getLoginUser/${token}`,
url: `/sys/thirdLogin/getLoginUser/${token}/${thirdType}`,
method: 'get',
headers: {
'Content-Type': 'application/json;charset=UTF-8'

10
ant-design-vue-jeecg/src/api/manage.js

@ -2,11 +2,11 @@ import Vue from 'vue'
import { axios } from '@/utils/request'
const api = {
user: '/api/user',
role: '/api/role',
service: '/api/service',
permission: '/api/permission',
permissionNoPager: '/api/permission/no-pager'
user: '/mock/api/user',
role: '/mock/api/role',
service: '/mock/api/service',
permission: '/mock/api/permission',
permissionNoPager: '/mock/api/permission/no-pager'
}
export default api

30
ant-design-vue-jeecg/src/cas/sso.js

@ -5,21 +5,25 @@ import store from '@/store'
* 单点登录
*/
const init = (callback) => {
console.log("-------单点登录开始-------");
let token = Vue.ls.get(ACCESS_TOKEN);
let st = getUrlParam("ticket");
let sevice = "http://"+window.location.host+"/";
if(token){
loginSuccess(callback);
}else{
if(st){
validateSt(st,sevice,callback);
}else{
let serviceUrl = encodeURIComponent(sevice);
window.location.href = window._CONFIG['casPrefixUrl']+"/login?service="+serviceUrl;
if (process.env.VUE_APP_SSO == 'true') {
console.log("-------单点登录开始-------");
let token = Vue.ls.get(ACCESS_TOKEN);
let st = getUrlParam("ticket");
let sevice = "http://" + window.location.host + "/";
if (token) {
loginSuccess(callback);
} else {
if (st) {
validateSt(st, sevice, callback);
} else {
let serviceUrl = encodeURIComponent(sevice);
window.location.href = window._CONFIG['casPrefixUrl'] + "/login?service=" + serviceUrl;
}
}
console.log("-------单点登录结束-------");
}else{
callback && callback()
}
console.log("-------单点登录结束-------");
};
const SSO = {
init: init

20
ant-design-vue-jeecg/src/components/JVxeCells/JVxeFileCell.vue

@ -33,7 +33,7 @@
<a-menu-item v-if="originColumn.allowRemove !== false" @click="handleClickDeleteFile">
<span><a-icon type="delete"/>&nbsp;删除</span>
</a-menu-item>
<a-menu-item @click="handleMoreOperation">
<a-menu-item @click="handleMoreOperation(originColumn)">
<span><a-icon type="bars"/> 更多</span>
</a-menu-item>
</a-menu>
@ -55,7 +55,7 @@
>
<a-button icon="upload">{{originColumn.btnText || '上传文件'}}</a-button>
</a-upload>
<j-file-pop ref="filePop" @ok="handleFileSuccess"/>
<j-file-pop ref="filePop" @ok="handleFileSuccess" :number="number"/>
</div>
</template>
@ -75,6 +75,7 @@
data() {
return {
innerFile: null,
number:0,
}
},
computed: {
@ -137,7 +138,18 @@
methods: {
// 点击更多按钮
handleMoreOperation() {
handleMoreOperation(originColumn) {
//update-begin-author:wangshuai date:20201021 for:LOWCOD-969 判断传过来的字段是否存在number,用于控制上传文件
if (originColumn.number) {
this.number = originColumn.number
} else {
this.number = 0
}
//update-end-author:wangshuai date:20201021 for:LOWCOD-969 判断传过来的字段是否存在number,用于控制上传文件
if(originColumn && originColumn.fieldExtendJson){
let json = JSON.parse(originColumn.fieldExtendJson);
this.number = json.uploadnum?json.uploadnum:0;
}
let path = ''
if (this.innerFile) {
path = this.innerFile.path
@ -202,4 +214,4 @@
</script>
<style scoped lang="less">
</style>
</style>

20
ant-design-vue-jeecg/src/components/JVxeCells/JVxeImageCell.vue

@ -41,7 +41,7 @@
<a-menu-item v-if="originColumn.allowRemove !== false" @click="handleClickDeleteFile">
<span><a-icon type="delete"/>&nbsp;删除</span>
</a-menu-item>
<a-menu-item @click="handleMoreOperation">
<a-menu-item @click="handleMoreOperation(originColumn)">
<span><a-icon type="bars"/> 更多</span>
</a-menu-item>
</a-menu>
@ -63,7 +63,7 @@
>
<a-button icon="upload">{{originColumn.btnText || '上传图片'}}</a-button>
</a-upload>
<j-file-pop ref="filePop" @ok="handleFileSuccess"/>
<j-file-pop ref="filePop" @ok="handleFileSuccess" :number="number"/>
</div>
</template>
@ -83,6 +83,7 @@
data() {
return {
innerFile: null,
number:0
}
},
computed: {
@ -146,7 +147,18 @@
methods: {
// 点击更多按钮
handleMoreOperation() {
handleMoreOperation(originColumn) {
//update-begin-author:wangshuai date:20201021 for:LOWCOD-969 判断传过来的字段是否存在number,用于控制上传文件
if (originColumn.number) {
this.number = originColumn.number
} else {
this.number = 0
}
//update-end-author:wangshuai date:20201021 for:LOWCOD-969 判断传过来的字段是否存在number,用于控制上传文件
if(originColumn && originColumn.fieldExtendJson){
let json = JSON.parse(originColumn.fieldExtendJson);
this.number = json.uploadnum?json.uploadnum:0;
}
let path = ''
if (this.innerFile) {
path = this.innerFile.path
@ -227,4 +239,4 @@
}
}
</style>
</style>

7
ant-design-vue-jeecg/src/components/dict/JMultiSelectTag.vue

@ -11,6 +11,8 @@
mode="multiple"
:placeholder="placeholder"
:getPopupContainer="(node) => node.parentNode"
optionFilterProp="children"
:filterOption="filterOption"
allowClear>
<a-select-option
v-for="(item,index) in dictOptions"
@ -97,7 +99,12 @@
},
getCurrentDictOptions(){
return this.dictOptions
},
// update--begin--autor:lvdandan-----date:20201120------for:LOWCOD-1086 下拉多选框,搜索时只字典code进行搜索不能通过字典text搜索
filterOption(input, option) {
return option.componentOptions.children[0].children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
}
// update--end--autor:lvdandan-----date:20201120------for:LOWCOD-1086 下拉多选框,搜索时只字典code进行搜索不能通过字典text搜索
},
model: {
prop: 'value',

14
ant-design-vue-jeecg/src/components/dict/index.js

@ -1,7 +1,11 @@
import T from './JDictSelectTag.vue'
const JDictSelectTag = {
import JDictSelectTag from './JDictSelectTag.vue'
import JMultiSelectTag from './JMultiSelectTag.vue'
import JSearchSelectTag from './JSearchSelectTag.vue'
export default {
install: function (Vue) {
Vue.component('JDictSelectTag',T);
Vue.component('JDictSelectTag',JDictSelectTag);
Vue.component('JMultiSelectTag',JMultiSelectTag);
Vue.component('JSearchSelectTag',JSearchSelectTag);
}
}
export default JDictSelectTag;
}

53
ant-design-vue-jeecg/src/components/jeecg/JEditableTable.vue

@ -59,7 +59,7 @@
v-show="col.type !== formTypes.hidden"
class="td"
:key="col.key"
:style="buildTdStyle(col)">
:style="buildTdStyle(col,true)">
<span>{{ col.title }}</span>
</div>
@ -375,7 +375,7 @@
<a-menu-item @click="handleClickDelFile(id)">
<span><a-icon type="delete"/>&nbsp;删除</span>
</a-menu-item>
<a-menu-item @click="handleMoreOperation(id)">
<a-menu-item @click="handleMoreOperation(id,col,col)">
<span><a-icon type="bars" /> 更多</span>
</a-menu-item>
</a-menu>
@ -410,7 +410,7 @@
<a-icon type="loading"/>
</template>
<template v-else-if="uploadValues[id]['path']">
<img class="j-editable-image" :src="getCellImageView(id)" alt="无图片" @click="handleMoreOperation(id,'img')"/>
<img class="j-editable-image" :src="getCellImageView(id)" alt="无图片" @click="handleMoreOperation(id,'img',col)"/>
</template>
<template v-else>
<a-icon type="exclamation-circle" style="color: red;" @click="handleClickShowImageError(id)"/>
@ -443,7 +443,7 @@
<a-menu-item @click="handleClickDelFile(id)">
<span><a-icon type="delete"/>&nbsp;删除</span>
</a-menu-item>
<a-menu-item @click="handleMoreOperation(id,'img')">
<a-menu-item @click="handleMoreOperation(id,'img',col)">
<span><a-icon type="bars" /> 更多</span>
</a-menu-item>
</a-menu>
@ -612,7 +612,7 @@
</div>
</div>
<j-file-pop ref="filePop" @ok="handleFileSuccess"></j-file-pop>
<j-file-pop ref="filePop" @ok="handleFileSuccess" :number="number"></j-file-pop>
</div>
</a-spin>
</template>
@ -774,6 +774,7 @@
currentEditRows: {},
// 上次push数据的事件,用于判断是否点击过快
lastPushTimeMap: new Map(),
number:0,
}
},
created() {
@ -1203,6 +1204,12 @@
this.inputValues.splice(insertIndex, 0, value)
}
}
//update-begin-author:lvdandan date:20201105 for:LOWCOD-987 【online】js增强的问题--数据对象带有id,且和现有数据一致时,替换患有数据
if(-1 !== rows.findIndex(item => item.id === row.id)){
added = true
this.inputValues = this.inputValues.map(item => item.id === row.id ? value : item)
}
//update-begin-author:lvdandan date:20201105 for:LOWCOD-987 【online】js增强的问题--数据对象带有id,且和现有数据一致时,替换患有数据
if (!added) {
rows.push(row)
this.inputValues.push(value)
@ -2143,8 +2150,12 @@
}
target.value = value
}
// 做单个表单验证
this.validateOneInput(value, row, column, this.notPassedIds, true, 'blur')
//update--begin--autor:lvdandan-----date:20201126------for:LOWCOD-1088 JEditableTable输入校验提示框位置偏移 #2005
setTimeout(()=>{
// 做单个表单验证
this.validateOneInput(value, row, column, this.notPassedIds, true, 'blur')
}, 100)
//update--end--autor:lvdandan-----date:20201126------for:LOWCOD-1088 JEditableTable输入校验提示框位置偏移 #2005
},
handleChangeCheckboxCommon(event, row, column) {
let { id, checked } = event.target
@ -2201,7 +2212,18 @@
// 触发valueChange 事件
this.elemValueChange(column.type, row, column, value)
},
handleMoreOperation(id,flag){
handleMoreOperation(id,flag,column){
//update-begin-author:wangshuai date:20201021 for:LOWCOD-969 判断传过来的字段是否存在number,用于控制上传文件
if(column.number){
this.number = column.number;
}else{
this.number = 0;
}
//update-end-author:wangshuai date:20201021 for:LOWCOD-969 判断传过来的字段是否存在number,用于控制上传文件
if(column && column.fieldExtendJson){
let json = JSON.parse(column.fieldExtendJson);
this.number = json.uploadnum?json.uploadnum:0;
}
//console.log("this.uploadValues[id]",this.uploadValues[id])
let path = ''
if(this.uploadValues && this.uploadValues[id]){
@ -2440,7 +2462,7 @@
}
},
/** view辅助方法:构建 td style */
buildTdStyle(col) {
buildTdStyle(col,isTitle) {
const isEmptyWidth = (column) => (column.type === FormTypes.hidden || column.width === '0px' || column.width === '0' || column.width === 0)
let style = {}
@ -2452,6 +2474,17 @@
} else {
style['width'] = '120px'
}
//update-begin-author:lvdandan date:20201116 for:LOWCOD-984 默认风格功能测试附表样式问题 日期时间控件长度太大
//是否为标题,如果是时间控件设为200,时间控件的标题设为240 时间
if(col.type === FormTypes.datetime){
if(true === isTitle){
style['width'] = '240px'
}else{
style['width'] = '200px'
}
}
//update-end-author:lvdandan date:20201116 for:LOWCOD-984 默认风格功能测试附表样式问题 日期时间控件长度太大
// checkbox 居中显示
let isCheckbox = col.type === FormTypes.checkbox
if (isCheckbox) {
@ -3061,4 +3094,4 @@
}
</style>
</style>

36
ant-design-vue-jeecg/src/components/jeecg/JImageUpload.vue

@ -80,18 +80,29 @@
type:Boolean,
required:false,
default: false
},
//update-begin-author:wangshuai date:20201021 for:LOWCOD-969 新增number属性,用于判断上传数量
number:{
type:Number,
required:false,
default:0
}
//update-end-author:wangshuai date:20201021 for:LOWCOD-969 新增number属性,用于判断上传数量
},
watch:{
value(val){
if (val instanceof Array) {
this.initFileList(val.join(','))
} else {
this.initFileList(val)
}
if(!val || val.length==0){
this.picUrl = false;
}
value: {
handler(val,oldValue) {
if (val instanceof Array) {
this.initFileList(val.join(','))
} else {
this.initFileList(val)
}
if(!val || val.length==0){
this.picUrl = false;
}
},
//立刻执行handler
immediate: true
}
},
created(){
@ -132,6 +143,11 @@
handleChange(info) {
this.picUrl = false;
let fileList = info.fileList
//update-begin-author:wangshuai date:20201022 for:LOWCOD-969 判断number是否大于0和是否多选,返回选定的元素。
if(this.number>0 && this.isMultiple){
fileList = fileList.slice(-this.number);
}
//update-end-author:wangshuai date:20201022 for:LOWCOD-969 判断number是否大于0和是否多选,返回选定的元素。
if(info.file.status==='done'){
if(info.file.response.success){
this.picUrl = true;
@ -217,4 +233,4 @@
/deep/ .imgupload .ant-upload.ant-upload-select-picture-card{ width:120px;height: 120px;}
/deep/ .imgupload .iconp{padding:32px;}
/* update--end--autor:lvdandan-----date:20201016------for:j-image-upload图片组件单张图片详情回显空白*/
</style>
</style>

1
ant-design-vue-jeecg/src/components/jeecg/JMarkdownEditor/default-options.js

@ -21,7 +21,6 @@ export default {
'outdent',
'divider',
'table',
'image',
'link',
'divider',
'code',

127
ant-design-vue-jeecg/src/components/jeecg/JMarkdownEditor/index.vue

@ -1,5 +1,28 @@
<template>
<div class="j-markdown-editor" :id="id"/>
<div>
<div class="j-markdown-editor" :id="id"/>
<div v-if="isShow">
<j-modal
title="图片上传"
:visible.sync="dialogVisible"
width="30%"
:before-close="handleClose"
@ok="handleOk">
<a-tabs default-active-key="1" @change="handleChange">
<a-tab-pane tab="本地图片上传" key="1" :forceRender="true">
<j-upload v-model="fileList" :number="1"></j-upload>
<div style="margin-top: 20px">
<a-input v-model="remark" placeholder="请填写备注"></a-input>
</div>
</a-tab-pane>
<a-tab-pane tab="网络图片地址" key="2" :forceRender="true">
<a-input v-model="networkPic" placeholder="请填写网络图片地址"></a-input>
<a-input style="margin-top: 20px" v-model="remark" placeholder="请填写备注"></a-input>
</a-tab-pane>
</a-tabs>
</j-modal>
</div>
</div>
</template>
<script>
@ -9,9 +32,14 @@ import '@toast-ui/editor/dist/i18n/zh-cn';
import Editor from '@toast-ui/editor';
import defaultOptions from './default-options'
import JUpload from '@/components/jeecg/JUpload'
import { getFileAccessHttpUrl } from '@/api/manage'
export default {
name: 'JMarkdownEditor',
components: {
JUpload,
},
props: {
value: {
type: String,
@ -47,7 +75,16 @@ export default {
},
data() {
return {
editor: null
editor: null,
isShow:false,
activeIndex:"1",
dialogVisible:false,
index:"1",
fileList:[],
remark:"",
imageName:"",
imageUrl:"",
networkPic:""
}
},
computed: {
@ -94,6 +131,40 @@ export default {
this.editor.on('change', () => {
this.$emit('change', this.editor.getMarkdown())
})
//--begin 添加自定义上传按钮
/*
* 添加自定义按钮
*/
//获取编辑器上的功能条
let toolbar = this.editor.getUI().getToolbar();
let fileDom = this.$refs.files;
//添加图片点击事件
this.editor.eventManager.addEventType('isShowClickEvent');
this.editor.eventManager.listen('isShowClickEvent', () => {
this.isShow = true
this.dialogVisible = true
});
//addImageBlobHook图片上传、剪切、拖拽都会走此方法
// 删除默认监听事件
this.editor.eventManager.removeEventHandler('addImageBlobHook')
// 添加自定义监听事件
this.editor.eventManager.listen('addImageBlobHook', (blob, callback) => {
this.upload(blob, url => {
callback(url)
})
})
// 添加自定义按钮 第二个参数代表位置,不传默认放在最后
toolbar.insertItem(15,{
type: 'button',
options:{
name: 'customize',
className: 'tui-image tui-toolbar-icons',
event: 'isShowClickEvent',
tooltip: '上传图片',
}
//
});
//--end 添加自定义上传按钮
},
destroyEditor() {
if (!this.editor) return
@ -111,7 +182,57 @@ export default {
},
getHtml() {
return this.editor.getHtml()
}
},
handleOk(){
if(this.index=='1'){
this.imageUrl = getFileAccessHttpUrl(this.fileList)
if(this.remark){
this.addImgToMd(this.imageUrl,this.remark)
}else{
this.addImgToMd(this.imageUrl,"")
}
}else{
if(this.remark){
this.addImgToMd(this.networkPic,this.remark)
}else{
this.addImgToMd(this.networkPic,"")
}
}
this.index="1"
this.fileList=[]
this.imageName="";
this.imageUrl="";
this.remark=""
this.networkPic=""
this.dialogVisible=false
this.isShow=false;
},
handleClose(done) {
done();
},
handleChange(val){
this.fileList=[]
this.remark=""
this.imageName=""
this.imageUrl=""
this.networkPic=""
this.index=val
},
//添加图片到markdown
addImgToMd(data,name) {
let editor = this.editor.getCodeMirror();
let editorHtml = this.editor.getCurrentModeEditor();
let isMarkdownMode = this.editor.isMarkdownMode();
if (isMarkdownMode) {
editor.replaceSelection(`![${name}](${data})`);
} else {
let range = editorHtml.getRange();
let img = document.createElement('img');
img.src = `${data}`;
img.alt = name;
range.insertNode(img);
}
},
},
model: {
prop: 'value',

7
ant-design-vue-jeecg/src/components/jeecg/JPopup.vue

@ -11,6 +11,7 @@
:code="code"
:multi="multi"
:groupId="uniqGroupId"
:param="param"
@ok="callBack"
/>
@ -75,6 +76,12 @@
required: false,
default: false
},
//popup动态参数 支持系统变量语法
param:{
type: Object,
required: false,
default: ()=>{}
},
/** 分组ID,用于将多个popup的请求合并到一起,不传不分组 */
groupId: String

39
ant-design-vue-jeecg/src/components/jeecg/JVxeTable/components/JVxeTable.js

@ -181,6 +181,13 @@ export default {
if (column.cellRender) {
Object.assign(column.cellRender, renderOptions)
}
// update--begin--autor:lvdandan-----date:20201019------for:LOWCOD-882 【新行编辑】列表上带按钮的遮挡问题
if (column.$type === JVXETypes.file || column.$type === JVXETypes.image) {
if (column.width && column.width.endsWith('px')) {
column.width = Number.parseInt(column.width.substr(0,column.width.length-2))+Number.parseInt(1)+'px';
}
}
// update--begin--autor:lvdandan-----date:20201019------for:LOWCOD-882 【新行编辑】列表上带按钮的遮挡问题
})
return this._innerColumns
},
@ -727,6 +734,11 @@ export default {
newData.forEach(row => delete row.id)
return newData
},
/** 仅获取新增的数据,带有id */
getNewDataWithId() {
let newData = cloneObject(this.$refs.vxe.getInsertRecords())
return newData
},
/** 根据ID获取行,新增的行也能查出来 */
getIfRowById(id) {
let row = this.getRowById(id), isNew = false
@ -760,8 +772,8 @@ export default {
* @param rows
* @return
*/
async addRows(rows = {}) {
return this._addOrInsert(rows, -1, 'added')
async addRows(rows = {}, isOnlJs) {
return this._addOrInsert(rows, -1, 'added', isOnlJs)
},
/**
@ -1005,7 +1017,7 @@ export default {
return await xTable.updateData()
},
async _addOrInsert(rows = {}, index, triggerName) {
async _addOrInsert(rows = {}, index, triggerName, isOnlJs) {
let {xTable} = this.$refs.vxe.$refs
let records
if (Array.isArray(rows)) {
@ -1017,14 +1029,19 @@ export default {
records.forEach(record => this._createRow(record))
let result = await this.pushRows(records, {index: index, setActive: true})
// 遍历插入的行
for (let i = 0; i < result.rows.length; i++) {
let row = result.rows[i]
this.trigger(triggerName, {
row: row,
$table: xTable,
target: this,
})
// update--begin--autor:lvdandan-----date:20201117------for:LOWCOD-987 【新行编辑】js增强附表内置方法调用问题 #1819
// online js增强时以传过来值为准,不再赋默认值
if (isOnlJs != true) {
for (let i = 0; i < result.rows.length; i++) {
let row = result.rows[i]
this.trigger(triggerName, {
row: row,
$table: xTable,
target: this,
})
}
}
// update--end--autor:lvdandan-----date:20201117------for:LOWCOD-987 【新行编辑】js增强附表内置方法调用问题 #1819
return result
},
// 创建新行,自动添加默认值
@ -1035,7 +1052,7 @@ export default {
let col = column.own
if (record[col.key] == null || record[col.key] === '') {
// 设置默认值
let createValue = getEnhancedMixins(col.$type, 'createValue')
let createValue = getEnhancedMixins(col.$type || col.type, 'createValue')
record[col.key] = createValue({row: record, column, $table: xTable})
}
})

2
ant-design-vue-jeecg/src/components/jeecg/README.md

@ -258,7 +258,7 @@ export default {
components: { JTreeTable },
data() {
return {
url: '/api/asynTreeList',
url: '/mock/api/asynTreeList',
columns: [
{ title: '菜单名称', dataIndex: 'name' },
{ title: '组件', dataIndex: 'component' },

30
ant-design-vue-jeecg/src/components/jeecg/index.js

@ -1,11 +1,41 @@
import JModal from './JModal'
import JFormContainer from './JFormContainer.vue'
import JPopup from './JPopup.vue'
import JMarkdownEditor from './JMarkdownEditor'
import JCodeEditor from './JCodeEditor.vue'
import JEditor from './JEditor.vue'
import JEditableTable from './JEditableTable.vue'
import JAreaLinkage from './JAreaLinkage.vue'
import JSuperQuery from './JSuperQuery.vue'
import JUpload from './JUpload.vue'
import JTreeSelect from './JTreeSelect.vue'
import JCategorySelect from './JCategorySelect.vue'
import JImageUpload from './JImageUpload.vue'
import JTreeDict from './JTreeDict.vue'
import JCheckbox from './JCheckbox.vue'
import JCron from './JCron.vue'
import JSelectMultiple from './JSelectMultiple.vue'
import JPopupOnlReport from './modal/JPopupOnlReport.vue'
export default {
install(Vue) {
Vue.component('JFormContainer', JFormContainer)
Vue.component('JPopup', JPopup)
Vue.component(JModal.name, JModal)
Vue.component('JMarkdownEditor', JMarkdownEditor)
Vue.component('JEditor', JEditor)
Vue.component('JCodeEditor', JCodeEditor)
Vue.component('JEditableTable', JEditableTable)
Vue.component('JAreaLinkage', JAreaLinkage)
Vue.component('JSuperQuery', JSuperQuery)
Vue.component('JUpload', JUpload)
Vue.component('JTreeSelect', JTreeSelect)
Vue.component('JCategorySelect', JCategorySelect)
Vue.component('JImageUpload', JImageUpload)
Vue.component('JTreeDict', JTreeDict)
Vue.component('JCheckbox', JCheckbox)
Vue.component('JCron', JCron)
Vue.component('JPopupOnlReport', JPopupOnlReport)
Vue.component('JSelectMultiple', JSelectMultiple)
}
}

7
ant-design-vue-jeecg/src/components/jeecg/minipop/JFilePop.vue

@ -8,7 +8,7 @@
cancelText="取消"
@cancel="close">
<!--style="top: 20px;"-->
<j-upload :file-type="fileType" :value="filePath" @change="handleChange" :disabled="disabled"></j-upload>
<j-upload :file-type="fileType" :value="filePath" @change="handleChange" :disabled="disabled" :number="number"></j-upload>
</a-modal>
</div>
</template>
@ -59,6 +59,11 @@
type:Boolean,
default:false,
required:false
},
number:{
type:Number,
required:false,
default: 0
}
},
data(){

58
ant-design-vue-jeecg/src/components/jeecg/modal/JPopupOnlReport.vue

@ -78,7 +78,7 @@
const MODAL_WIDTH = 1200;
export default {
name: 'JPopupOnlReport',
props: ['multi', 'code', 'groupId'],
props: ['multi', 'code', 'groupId', 'param'],
components:{
},
data(){
@ -121,16 +121,24 @@
},
cgRpConfigId:"",
modalWidth:MODAL_WIDTH,
tableScroll:{x:MODAL_WIDTH-100}
tableScroll:{x:MODAL_WIDTH-100},
dynamicParam:{}
}
},
mounted() {
this.loadColumnsInfo()
//this.loadColumnsInfo()
},
watch: {
code() {
this.loadColumnsInfo()
},
param:{
deep:true,
handler(){
this.dynamicParamHandler()
this.loadData();
},
}
},
computed:{
@ -162,7 +170,6 @@
}
this.table.columns = [...currColumns]
this.initQueryInfo()
this.loadData(1)
}
})
},
@ -176,12 +183,43 @@
httpGroupRequest(() => getAction(url), groupIdKey).then((res) => {
// console.log("获取查询条件", res);
if (res.success) {
this.dynamicParamHandler(res.result)
this.queryInfo = res.result
//查询条件加载后再请求数据
this.loadData(1)
} else {
this.$message.warning(res.message)
}
})
},
//处理动态参数
dynamicParamHandler(arr){
if(arr && arr.length>0){
//第一次加载查询条件前 初始化queryParam为空对象
let queryTemp = {}
for(let item of arr){
if(item.mode==='single'){
queryTemp[item.field] = ''
}
}
this.queryParam = {...queryTemp}
}
let dynamicTemp = {}
if(this.param){
Object.keys(this.param).map(key=>{
let str = this.param[key]
if(key in this.queryParam){
if(str && str.startsWith("'") && str.endsWith("'")){
str = str.substring(1,str.length-1)
}
//如果查询条件包含参数 设置值
this.queryParam[key]=str
}
dynamicTemp[key] = this.param[key]
})
}
this.dynamicParam = {...dynamicTemp}
},
loadData(arg) {
if (arg == 1) {
this.table.pagination.current = 1
@ -208,7 +246,14 @@
})
},
getQueryParams() {
let param = Object.assign({}, this.queryParam, this.sorter);
let paramTarget = {}
if(this.dynamicParam){
//处理自定义参数
Object.keys(this.dynamicParam).map(key=>{
paramTarget['self_'+key] = this.dynamicParam[key]
})
}
let param = Object.assign(paramTarget, this.queryParam, this.sorter);
param.pageNo = this.table.pagination.current;
param.pageSize = this.table.pagination.pageSize;
return filterObj(param);
@ -272,7 +317,8 @@
this.onClearSelected()
},
show(){
this.visible = true;
this.visible = true
this.loadColumnsInfo()
},
handleToggleSearch(){
this.toggleSearchStatus = !this.toggleSearchStatus;

2
ant-design-vue-jeecg/src/components/jeecgbiz/JSelectBizComponent/index.vue

@ -12,7 +12,7 @@
:open="selectOpen"
style="width: 100%;"
@dropdownVisibleChange="handleDropdownVisibleChange"
@click.native="visible=(buttons?visible:true)"
@click.native="visible=(buttons || disabled ?visible:true)"
/>
</slot>
</a-col>

6
ant-design-vue-jeecg/src/components/jeecgbiz/JSelectDepart.vue

@ -68,9 +68,11 @@
},
watch:{
value(val){
if (this.customReturnField === 'id') {
//update-begin-author:wangshuai date:20201124 for:组件 JSelectDepart.vue不是默认id时新内容编辑问题 gitee I247X2
// if (this.customReturnField === 'id') {
this.departIds = val
}
// }
//update-end-author:wangshuai date:20201124 for:组件 JSelectDepart.vue不是默认id时新内容编辑问题 gitee I247X2
}
},
methods:{

2
ant-design-vue-jeecg/src/components/jeecgbiz/modal/JSelectUserByDepModal.vue

@ -100,7 +100,7 @@
{
title: '部门',
align: 'center',
dataIndex: 'orgCode'
dataIndex: 'orgCodeTxt'
}
],
scrollTrigger: {},

25
ant-design-vue-jeecg/src/components/layouts/RouteView.vue

@ -1,6 +1,6 @@
<template>
<div class="main">
<keep-alive>
<keep-alive :include="includedComponents">
<router-view v-if="keepAlive" />
</keep-alive>
<router-view v-if="!keepAlive" />
@ -8,9 +8,32 @@
</template>
<script>
import Vue from 'vue'
import { CACHE_INCLUDED_ROUTES } from "@/store/mutation-types"
export default {
name: "RouteView",
computed: {
//update-begin--Author:scott Date:20201015 for:路由缓存问题,关闭了tab页时再打开就不刷新 #842
includedComponents() {
const includedRouters = Vue.ls.get(CACHE_INCLUDED_ROUTES)
console.log("includedRouters:" + includedRouters)
//如果是缓存路由,则加入到 cache_included_routes
if (this.$route.meta.keepAlive && this.$route.meta.componentName) {
let cacheRouterArray = Vue.ls.get(CACHE_INCLUDED_ROUTES) || []
if(!cacheRouterArray.includes(this.$route.meta.componentName)){
cacheRouterArray.push(this.$route.meta.componentName)
// cacheRouterArray.push("OnlCgformHeadList")
console.log("Vue ls set componentName :" + this.$route.meta.componentName)
Vue.ls.set(CACHE_INCLUDED_ROUTES, cacheRouterArray)
console.log("Vue ls includedRouterArrays :" + Vue.ls.get(CACHE_INCLUDED_ROUTES))
return cacheRouterArray;
}
}
return includedRouters;
},
//update-end--Author:scott Date:20201015 for:路由缓存问题,关闭了tab页时再打开就不刷新 #842
keepAlive () {
return this.$route.meta.keepAlive
}

29
ant-design-vue-jeecg/src/components/layouts/TabLayout.vue

@ -14,7 +14,7 @@
@change="changePage"
@tabClick="tabCallBack"
@edit="editPage">
<a-tab-pane :id="page.fullPath" :key="page.fullPath" v-for="page in pageList">
<a-tab-pane :id="page.fullPath" :key="page.fullPath" v-for="page in pageList" :closable="!(page.meta.title=='首页')">
<span slot="tab" :pagekey="page.fullPath">{{ page.meta.title }}</span>
</a-tab-pane>
</a-tabs>
@ -36,8 +36,9 @@
import Contextmenu from '@/components/menu/Contextmenu'
import { mixin, mixinDevice } from '@/utils/mixin.js'
import { triggerWindowResizeEvent } from '@/utils/util'
const indexKey = '/dashboard/analysis'
import Vue from 'vue'
import { CACHE_INCLUDED_ROUTES } from "@/store/mutation-types"
export default {
name: 'TabLayout',
@ -115,11 +116,11 @@
}else if (this.linkList.indexOf(newRoute.fullPath) < 0) {
this.linkList.push(newRoute.fullPath)
this.pageList.push(Object.assign({},newRoute))
// update-begin-author:sunjianlei date:20200103 for: 如果新增的页面配置了缓存路由,那么就强制刷新一遍 #842
//// update-begin-author:sunjianlei date:20200103 for: 如果新增的页面配置了缓存路由,那么就强制刷新一遍 #842
// if (newRoute.meta.keepAlive) {
// this.routeReload()
// }
// update-end-author:sunjianlei date:20200103 for: 如果新增的页面配置了缓存路由,那么就强制刷新一遍 #842
//// update-end-author:sunjianlei date:20200103 for: 如果新增的页面配置了缓存路由,那么就强制刷新一遍 #842
} else if (this.linkList.indexOf(newRoute.fullPath) >= 0) {
let oldIndex = this.linkList.indexOf(newRoute.fullPath)
let oldPositionRoute = this.pageList[oldIndex]
@ -132,8 +133,8 @@
// 【TESTA-523】修复:不允许重复跳转路由异常
if (waitRouter.fullPath !== this.$route.fullPath) {
this.$router.push(Object.assign({}, waitRouter))
this.changeTitle(waitRouter.meta.title)
}
this.changeTitle(waitRouter.meta.title)
},
'multipage': function(newVal) {
if(this.reloadFlag){
@ -201,11 +202,27 @@
return
}
console.log("this.pageList ",this.pageList );
let removeRoute = this.pageList.filter(item => item.fullPath == key)
this.pageList = this.pageList.filter(item => item.fullPath !== key)
let index = this.linkList.indexOf(key)
this.linkList = this.linkList.filter(item => item !== key)
index = index >= this.linkList.length ? this.linkList.length - 1 : index
this.activePage = this.linkList[index]
//update-begin--Author:scott Date:20201015 for:路由缓存问题,关闭了tab页时再打开就不刷新 #842
//关闭页面则从缓存cache_included_routes中删除路由,下次点击菜单会重新加载页面
let cacheRouterArray = Vue.ls.get(CACHE_INCLUDED_ROUTES) || []
if (removeRoute && removeRoute[0]) {
let componentName = removeRoute[0].meta.componentName
console.log("key: ", key);
console.log("componentName: ", componentName);
if(cacheRouterArray.includes(componentName)){
cacheRouterArray.splice(cacheRouterArray.findIndex(item => item === componentName), 1)
Vue.ls.set(CACHE_INCLUDED_ROUTES, cacheRouterArray)
}
}
//update-end--Author:scott Date:20201015 for:路由缓存问题,关闭了tab页时再打开就不刷新 #842
},
onContextmenu(e) {
const pagekey = this.getPageKey(e.target)
@ -401,4 +418,4 @@
}
</style>
</style>

5
ant-design-vue-jeecg/src/components/lazy_antd.js

@ -1,3 +1,6 @@
/**
* 按需加载antd组件
*/
import Vue from 'vue'
// base library
@ -50,6 +53,7 @@ import {
TreeSelect,
Carousel,
Pagination,
FormModel,
} from 'ant-design-vue'
import Viser from 'viser-vue'
@ -99,6 +103,7 @@ Vue.use(Tree)
Vue.use(TreeSelect)
Vue.use(Carousel)
Vue.use(Pagination)
Vue.use(FormModel)
Vue.prototype.$confirm = Modal.confirm
Vue.prototype.$message = message

40
ant-design-vue-jeecg/src/components/menu/SideMenu.vue

@ -1,7 +1,7 @@
<template>
<a-layout-sider
:class="['sider', isDesktop() ? null : 'shadow', theme, fixSiderbar ? 'ant-fixed-sidemenu' : null ]"
width="200px"
width="208px"
:collapsible="collapsible"
v-model="collapsed"
:trigger="null">
@ -136,12 +136,44 @@
background-color: #999999;
}
}
background-color: rgb(48, 65, 86);
/deep/ .ant-menu-submenu-title:hover{
background-color: #263445;
}
/deep/ .ant-menu-item:hover{
background-color: #263445;
}
/deep/ .ant-menu-item-selected {
background-color: #263445;
}
/deep/ .ant-menu-item-selected i{
color: rgb(24, 144, 255);
}
/deep/ .ant-menu-item-selected span{
color: rgb(24, 144, 255);
}
/deep/ .ant-menu-inline.ant-menu-sub{
background-color: #1f2d3d;
}
/deep/ .ant-menu-inline.ant-menu-sub li:hover{
background-color: #1f2d3d;
}
/deep/ .ant-menu-inline.ant-menu-sub .ant-menu-submenu-title:hover{
background-color: #1f2d3d;
}
/deep/ .ant-menu-inline.ant-menu-sub .ant-menu-item-selected{
background-color: #1f2d3d;
}
/deep/ .ant-menu-inline.ant-menu-sub .ant-menu-item-selected span{
color: rgb(24, 144, 255);
}
/deep/ .ant-menu-inline.ant-menu-sub .ant-menu-item-selected i{
color: rgb(24, 144, 255);
}
}
}
/* update_end author:sunjianlei date:20190509 for: 修改侧边导航栏滚动条的样式 */
</style>
<!-- update_begin author:sunjianlei date:20190530 for: 选中首页的时候不显示背景颜色 -->
@ -174,4 +206,4 @@
}
}
</style>
<!-- update_end author:sunjianlei date:20190530 for: 选中首页的时候不显示背景颜色 -->
<!-- update_end author:sunjianlei date:20190530 for: 选中首页的时候不显示背景颜色 -->

1
ant-design-vue-jeecg/src/components/page/GlobalHeader.vue

@ -42,7 +42,6 @@
<user-menu class="header-index-right" :theme="theme" :style="topMenuStyle.headerIndexRight"/>
</div>
</div>
</a-layout-header>
</template>

55
ant-design-vue-jeecg/src/components/page/GlobalLayout.vue

@ -528,8 +528,43 @@
margin: 0 auto;
width: 100%;
}
/deep/ .ant-menu-dark{
background-color: rgb(48, 65, 86);
/deep/ .ant-menu-submenu:hover{
background-color: #263445;
}
/deep/ .ant-menu-item:hover{
background-color: #263445;
}
}
/deep/ .ant-menu.ant-menu-dark .ant-menu-item-selected{
background-color: #263445;
}
/deep/ .ant-menu.ant-menu-dark .ant-menu-item-selected i{
color: rgb(24, 144, 255);
}
/deep/ .ant-menu.ant-menu-dark .ant-menu-item-selected span{
color: rgb(24, 144, 255);
}
/deep/ .ant-menu-dark .ant-menu-submenu-active{
color: #FFFFFF !important;
}
}
.dark.header-index-right{
background-color: rgb(48, 65, 86) !important;
}
.layout .top-nav-header-index.dark .user-wrapper .action:hover{
background-color: #263445 !important;
}
.layout .top-nav-header-index .dark .user-wrapper .action i{
color: #FFFFFF !important;
}
.layout .top-nav-header-index .user-wrapper .action .anticon{
color: inherit !important;
}
.dark.ant-dropdown-menu{
background-color: #999999;
}
// drawer-sider 自定义
.ant-drawer.drawer-sider {
.sider {
@ -680,4 +715,22 @@
}
}
}
.ant-menu-dark .ant-menu-vertical.ant-menu-sub li:hover{
background-color: #001528;
}
.ant-menu-submenu-popup.ant-menu-dark .ant-menu-item-selected{
background-color: #001528 !important;
}
.ant-menu-submenu-popup.ant-menu-dark .ant-menu-item-selected span{
color: rgb(24, 144, 255);
}
.ant-menu-submenu-popup.ant-menu-dark .ant-menu-item-selected i{
color: rgb(24, 144, 255);
}
.ant-menu-dark .ant-menu-sub{
background: #1f2d3d !important;
.ant-menu-submenu-open,.ant-menu-submenu-active{
color: #FFFFFF !important;
}
}
</style>

14
ant-design-vue-jeecg/src/components/setting/SettingDrawer.vue

@ -87,7 +87,7 @@
</div>
<div :style="{ marginTop: '24px' }">
<a-list :split="false">
<a-list-item>
<a-list-item slot="renderItem" slot-scope="item, index">
<a-tooltip slot="actions">
<template slot="title">
该设定仅 [顶部栏导航] 时有效
@ -101,19 +101,19 @@
<div slot="title">内容区域宽度</div>
</a-list-item-meta>
</a-list-item>
<a-list-item>
<a-list-item slot="renderItem" slot-scope="item, index">
<a-switch slot="actions" size="small" :defaultChecked="fixedHeader" @change="handleFixedHeader" />
<a-list-item-meta>
<div slot="title">固定 Header</div>
</a-list-item-meta>
</a-list-item>
<a-list-item>
<a-list-item slot="renderItem" slot-scope="item, index">
<a-switch slot="actions" size="small" :disabled="!fixedHeader" :defaultChecked="autoHideHeader" @change="handleFixedHeaderHidden" />
<a-list-item-meta>
<div slot="title" :style="{ textDecoration: !fixedHeader ? 'line-through' : 'unset' }">下滑时隐藏 Header</div>
</a-list-item-meta>
</a-list-item>
<a-list-item >
<a-list-item slot="renderItem" slot-scope="item, index">
<a-switch slot="actions" size="small" :disabled="(layoutMode === 'topmenu')" :checked="dataFixSiderbar" @change="handleFixSiderbar" />
<a-list-item-meta>
<div slot="title" :style="{ textDecoration: layoutMode === 'topmenu' ? 'line-through' : 'unset' }">固定侧边菜单</div>
@ -128,13 +128,13 @@
<h3 class="setting-drawer-index-title">其他设置</h3>
<div>
<a-list :split="false">
<a-list-item>
<a-list-item slot="renderItem" slot-scope="item, index">
<a-switch slot="actions" size="small" :defaultChecked="colorWeak" @change="onColorWeak" />
<a-list-item-meta>
<div slot="title">色弱模式</div>
</a-list-item-meta>
</a-list-item>
<a-list-item>
<a-list-item slot="renderItem" slot-scope="item, index">
<a-switch slot="actions" size="small" :defaultChecked="multipage" @change="onMultipageWeak" />
<a-list-item-meta>
<div slot="title">多页签模式</div>
@ -327,4 +327,4 @@
font-size: 20px;
}
}
</style>
</style>

9
ant-design-vue-jeecg/src/components/tools/UserMenu.vue

@ -133,6 +133,15 @@
this.searchMenus(lists,this.permissionMenuList)
this.searchMenuOptions=[...lists]
},
mounted() {
//如果是单点登录模式
if (process.env.VUE_APP_SSO == 'true') {
let depart = this.userInfo().orgCode
if (!depart) {
this.updateCurrentDepart()
}
}
},
computed: {
...mapState({
// 后台菜单

10
ant-design-vue-jeecg/src/config/index.js

@ -0,0 +1,10 @@
/** init domain config */
import Vue from 'vue'
//设置全局API_BASE_URL
Vue.prototype.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['staticDomainURL'] = Vue.prototype.API_BASE_URL + '/sys/common/static'
window._CONFIG['pdfDomainURL'] = Vue.prototype.API_BASE_URL+ '/sys/common/pdf/pdfPreviewIframe'

6
ant-design-vue-jeecg/src/config/router.config.js

@ -308,17 +308,17 @@ export const constantRouterMap = [
{
path: 'register',
name: 'register',
component: () => import(/* webpackChunkName: "user" */ '@/views/user/Register')
component: () => import(/* webpackChunkName: "user" */ '@/views/user/register/Register')
},
{
path: 'register-result',
name: 'registerResult',
component: () => import(/* webpackChunkName: "user" */ '@/views/user/RegisterResult')
component: () => import(/* webpackChunkName: "user" */ '@/views/user/register/RegisterResult')
},
{
path: 'alteration',
name: 'alteration',
component: () => import(/* webpackChunkName: "user" */ '@/views/user/Alteration')
component: () => import(/* webpackChunkName: "user" */ '@/views/user/alteration/Alteration')
},
]
},

54
ant-design-vue-jeecg/src/main.js

@ -1,11 +1,16 @@
/** init domain config */
import './config'
import Vue from 'vue'
import App from './App.vue'
import Storage from 'vue-ls'
import router from './router'
import store from './store/'
import { VueAxios } from "@/utils/request"
require('@jeecg/antd-online-mini')
require('@jeecg/antd-online-mini/dist/OnlineForm.css')
import Antd, { version } from 'ant-design-vue'
console.log('ant-design-vue version:', version)
@ -18,11 +23,7 @@ import Print from 'vue-print-nb-jeecg'
/*import '@babel/polyfill'*/
import preview from 'vue-photo-preview'
import 'vue-photo-preview/dist/skin.css'
require('@jeecg/antd-online-mini')
require('@jeecg/antd-online-mini/dist/OnlineForm.css')
import SSO from '@/cas/sso.js'
import {
ACCESS_TOKEN,
DEFAULT_COLOR,
@ -60,21 +61,26 @@ Vue.use(vueBus);
Vue.use(JeecgComponents);
Vue.use(VueAreaLinkage);
new Vue({
router,
store,
mounted () {
store.commit('SET_SIDEBAR_TYPE', Vue.ls.get(SIDEBAR_TYPE, true))
store.commit('TOGGLE_THEME', Vue.ls.get(DEFAULT_THEME, config.navTheme))
store.commit('TOGGLE_LAYOUT_MODE', Vue.ls.get(DEFAULT_LAYOUT_MODE, config.layout))
store.commit('TOGGLE_FIXED_HEADER', Vue.ls.get(DEFAULT_FIXED_HEADER, config.fixedHeader))
store.commit('TOGGLE_FIXED_SIDERBAR', Vue.ls.get(DEFAULT_FIXED_SIDEMENU, config.fixSiderbar))
store.commit('TOGGLE_CONTENT_WIDTH', Vue.ls.get(DEFAULT_CONTENT_WIDTH_TYPE, config.contentWidth))
store.commit('TOGGLE_FIXED_HEADER_HIDDEN', Vue.ls.get(DEFAULT_FIXED_HEADER_HIDDEN, config.autoHideHeader))
store.commit('TOGGLE_WEAK', Vue.ls.get(DEFAULT_COLOR_WEAK, config.colorWeak))
store.commit('TOGGLE_COLOR', Vue.ls.get(DEFAULT_COLOR, config.primaryColor))
store.commit('SET_TOKEN', Vue.ls.get(ACCESS_TOKEN))
store.commit('SET_MULTI_PAGE',Vue.ls.get(DEFAULT_MULTI_PAGE,config.multipage))
},
render: h => h(App)
}).$mount('#app')
SSO.init(() => {
main()
})
function main() {
new Vue({
router,
store,
mounted () {
store.commit('SET_SIDEBAR_TYPE', Vue.ls.get(SIDEBAR_TYPE, true))
store.commit('TOGGLE_THEME', Vue.ls.get(DEFAULT_THEME, config.navTheme))
store.commit('TOGGLE_LAYOUT_MODE', Vue.ls.get(DEFAULT_LAYOUT_MODE, config.layout))
store.commit('TOGGLE_FIXED_HEADER', Vue.ls.get(DEFAULT_FIXED_HEADER, config.fixedHeader))
store.commit('TOGGLE_FIXED_SIDERBAR', Vue.ls.get(DEFAULT_FIXED_SIDEMENU, config.fixSiderbar))
store.commit('TOGGLE_CONTENT_WIDTH', Vue.ls.get(DEFAULT_CONTENT_WIDTH_TYPE, config.contentWidth))
store.commit('TOGGLE_FIXED_HEADER_HIDDEN', Vue.ls.get(DEFAULT_FIXED_HEADER_HIDDEN, config.autoHideHeader))
store.commit('TOGGLE_WEAK', Vue.ls.get(DEFAULT_COLOR_WEAK, config.colorWeak))
store.commit('TOGGLE_COLOR', Vue.ls.get(DEFAULT_COLOR, config.primaryColor))
store.commit('SET_TOKEN', Vue.ls.get(ACCESS_TOKEN))
store.commit('SET_MULTI_PAGE',Vue.ls.get(DEFAULT_MULTI_PAGE,config.multipage))
},
render: h => h(App)
}).$mount('#app')
}

27
ant-design-vue-jeecg/src/mixins/JEditableTableMixin.js

@ -48,18 +48,23 @@ export const JEditableTableMixin = {
/** 当点击新增按钮时调用此方法 */
add() {
if (typeof this.addBefore === 'function') this.addBefore()
// 默认新增空数据
let rowNum = this.addDefaultRowNum
if (typeof rowNum !== 'number') {
rowNum = 1
console.warn('由于你没有在 data 中定义 addDefaultRowNum addDefaultRowNum 不是数字所以默认添加一条空数据如果不想默认添加空数据请将定义 addDefaultRowNum 0')
}
this.eachAllTable((item) => {
item.add(rowNum)
//update-begin-author:lvdandan date:20201113 for:LOWCOD-1049 JEditaTable,子表默认添加一条数据,addDefaultRowNum设置无效 #1930
return new Promise((resolve) => {
resolve();
}).then(() => {
// 默认新增空数据
let rowNum = this.addDefaultRowNum
if (typeof rowNum !== 'number') {
rowNum = 1
console.warn('由于你没有在 data 中定义 addDefaultRowNum addDefaultRowNum 不是数字所以默认添加一条空数据如果不想默认添加空数据请将定义 addDefaultRowNum 0')
}
this.eachAllTable((item) => {
item.add(rowNum)
})
if (typeof this.addAfter === 'function') this.addAfter(this.model)
this.edit({})
})
if (typeof this.addAfter === 'function') this.addAfter(this.model)
this.edit({})
//update-end-author:lvdandan date:20201113 for:LOWCOD-1049 JEditaTable,子表默认添加一条数据,addDefaultRowNum设置无效 #1930
},
/** 当点击了编辑(修改)按钮时调用此方法 */
edit(record) {

34
ant-design-vue-jeecg/src/mixins/JeecgListMixin.js

@ -7,6 +7,8 @@ import { filterObj } from '@/utils/util';
import { deleteAction, getAction,downFile,getFileAccessHttpUrl } from '@/api/manage'
import Vue from 'vue'
import { ACCESS_TOKEN } from "@/store/mutation-types"
import store from '@/store'
import {Modal} from 'ant-design-vue'
export const JeecgListMixin = {
data(){
@ -74,8 +76,13 @@ export const JeecgListMixin = {
this.loading = true;
getAction(this.url.list, params).then((res) => {
if (res.success) {
this.dataSource = res.result.records;
this.ipagination.total = res.result.total;
//update-begin---author:zhangyafei Date:20201118 for:适配不分页的数据列表------------
this.dataSource = res.result.records||res.result;
if(res.result.total)
{
this.ipagination.total = res.result.total;
}
//update-end---author:zhangyafei Date:20201118 for:适配不分页的数据列表------------
}
if(res.code===510){
this.$message.warning(res.message)
@ -233,7 +240,7 @@ export const JeecgListMixin = {
if(!fileName || typeof fileName != "string"){
fileName = "导出文件"
}
let param = {...this.getQueryParams()};
let param = this.getQueryParams();
if(this.selectedRowKeys && this.selectedRowKeys.length>0){
param['selections'] = this.selectedRowKeys.join(",")
}
@ -286,7 +293,26 @@ export const JeecgListMixin = {
this.$message.error(`${info.file.name} ${info.file.response.message}.`);
}
} else if (info.file.status === 'error') {
this.$message.error(`文件上传失败: ${info.file.msg} `);
if (info.file.response.status === 500) {
let data = info.file.response
const token = Vue.ls.get(ACCESS_TOKEN)
if (token && data.message.includes("Token失效")) {
Modal.error({
title: '登录已过期',
content: '很抱歉登录已过期请重新登录',
okText: '重新登录',
mask: false,
onOk: () => {
store.dispatch('Logout').then(() => {
Vue.ls.remove(ACCESS_TOKEN)
window.location.reload();
})
}
})
}
} else {
this.$message.error(`文件上传失败: ${info.file.msg} `);
}
}
},
/* 图片预览 */

116
ant-design-vue-jeecg/src/mixins/OnlAutoListMixin.js

@ -1,116 +0,0 @@
import { filterMultiDictText } from '@/components/dict/JDictSelectUtil'
export const HrefJump = {
data() {
return {
fieldHrefSlots: [],
hrefComponent: {
model: {
title: '',
width: '100%',
visible: false,
destroyOnClose: true,
style: {
top: 0,
left: 0,
height: '100%',
margin: 0,
padding: 0
},
bodyStyle: { padding: '8px', height: 'calc(100vh - 108px)', overflow: 'auto', overflowX: 'hidden' },
// 隐藏掉取消按钮
cancelButtonProps: { style: { display: 'none' } }
},
on: {
ok: () => this.hrefComponent.model.visible = false,
cancel: () => this.hrefComponent.model.visible = false
},
is: null,
params: {},
}
}
},
methods: {
// 处理接收href参数
handleAcceptHrefParams(){
this.acceptHrefParams={}
let hrefparam = this.$route.query;
if(hrefparam){
this.acceptHrefParams = {...hrefparam}
}
},
//支持链接href跳转
handleClickFieldHref(field, record) {
let href = field.href
let urlPattern = /(ht|f)tp(s?)\:\/\/[0-9a-zA-Z]([-.\w]*[0-9a-zA-Z])*(:(0-9)*)*(\/?)([a-zA-Z0-9\-\.\?\,\'\/\\\+&amp;%\$#_]*)?/
let compPattern = /\.vue(\?.*)?$/
if (typeof href === 'string') {
href = href.trim().replace(/\${([^}]+)?}/g, (s1, s2) => record[s2])
if (urlPattern.test(href)) {
window.open(href, '_blank')
} else if (compPattern.test(href)) {
this.openHrefCompModal(href)
} else {
this.$router.push(href)
}
}
},
openHrefCompModal(href) {
// 解析 href 参数
let index = href.indexOf('?')
let path = href
if (index !== -1) {
path = href.substring(0, index)
let paramString = href.substring(index + 1, href.length)
let paramArray = paramString.split('&')
let params = {}
paramArray.forEach(paramObject => {
let paramItem = paramObject.split('=')
params[paramItem[0]] = paramItem[1]
})
this.hrefComponent.params = params
} else {
this.hrefComponent.params = {}
}
this.hrefComponent.model.visible = true
this.hrefComponent.model.title = '操作'
this.hrefComponent.is = () => import('@/views/' + (path.startsWith('/') ? path.slice(1) : path))
},
/** 处理列中的 href 跳转和 dict 字典,使两者可以兼容存在 */
handleColumnHrefAndDict(column = {}, fieldHrefSlotKeysMap = {}) {
let { customRender, hrefSlotName } = column
if (!hrefSlotName && (column.scopedSlots && column.scopedSlots.customRender)) {
//hrefSlotName = column.scopedSlots.customRender
}
// 如果 customRender 有值则代表使用了字典
// 如果 hrefSlotName 有值则代表使用了href跳转
// 两者可以兼容。兼容的具体思路为:先获取到字典替换的值,再添加href链接跳转
if (customRender || hrefSlotName) {
let dictCode = customRender
let replaceFlag = '_replace_text_'
column.customRender = (text, record) => {
let value = text
// 如果 dictCode 有值,就进行字典转换
if (dictCode) {
if (dictCode.startsWith(replaceFlag)) {
let textFieldName = dictCode.replace(replaceFlag, '')
value = record[textFieldName]
} else {
value = filterMultiDictText(this.dictOptions[dictCode], text)
}
}
// 如果 hrefSlotName 有值,就生成一个 a 标签,包裹住字典替换后(或原生)的值
if (hrefSlotName) {
let field = fieldHrefSlotKeysMap[hrefSlotName]
if (field) {
// 此处为 JSX 语法
return (<a onClick={() => this.handleClickFieldHref(field, record)}>{value}</a>)
}
}
return value
}
}
},
}
}

10
ant-design-vue-jeecg/src/router/index.js

@ -2,16 +2,6 @@ import Vue from 'vue'
import Router from 'vue-router'
import { constantRouterMap } from '@/config/router.config'
//update-begin-author:taoyan date:20191011 for:TASK #3214 【优化】访问online功能测试 浏览器控制台抛出异常
try {
const originalPush = Router.prototype.push
Router.prototype.push = function push(location) {
return originalPush.call(this, location).catch(err => err)
}
} catch (e) {
}
//update-end-author:taoyan date:20191011 for:TASK #3214 【优化】访问online功能测试 浏览器控制台抛出异常
Vue.use(Router)
export default new Router({

21
ant-design-vue-jeecg/src/store/modules/user.js

@ -1,6 +1,6 @@
import Vue from 'vue'
import { login, logout, phoneLogin, thirdLogin } from "@/api/login"
import { ACCESS_TOKEN, USER_NAME,USER_INFO,USER_AUTH,SYS_BUTTON_AUTH,UI_CACHE_DB_DICT_DATA,TENANT_ID } from "@/store/mutation-types"
import { ACCESS_TOKEN, USER_NAME,USER_INFO,USER_AUTH,SYS_BUTTON_AUTH,UI_CACHE_DB_DICT_DATA,TENANT_ID,CACHE_INCLUDED_ROUTES } from "@/store/mutation-types"
import { welcome } from "@/utils/util"
import { queryPermissionsByUser } from '@/api/api'
import { getAction } from '@/api/manage'
@ -44,7 +44,7 @@ const user = {
// CAS验证登录
ValidateLogin({ commit }, userInfo) {
return new Promise((resolve, reject) => {
getAction("/cas/client/validateLogin",userInfo).then(response => {
getAction("/sys/cas/client/validateLogin",userInfo).then(response => {
console.log("----cas 登录--------",response);
if(response.success){
const result = response.result
@ -116,9 +116,7 @@ const user = {
// 获取用户信息
GetPermissionList({ commit }) {
return new Promise((resolve, reject) => {
let v_token = Vue.ls.get(ACCESS_TOKEN);
let params = {token:v_token};
queryPermissionsByUser(params).then(response => {
queryPermissionsByUser().then(response => {
const menuData = response.result.menu;
const authData = response.result.auth;
const allAuthData = response.result.allAuth;
@ -158,11 +156,14 @@ const user = {
commit('SET_PERMISSIONLIST', [])
Vue.ls.remove(ACCESS_TOKEN)
Vue.ls.remove(UI_CACHE_DB_DICT_DATA)
Vue.ls.remove(CACHE_INCLUDED_ROUTES)
//console.log('logoutToken: '+ logoutToken)
logout(logoutToken).then(() => {
//let sevice = "http://"+window.location.host+"/";
//let serviceUrl = encodeURIComponent(sevice);
//window.location.href = window._CONFIG['casPrefixUrl']+"/logout?service="+serviceUrl;
if (process.env.VUE_APP_SSO == 'true') {
let sevice = 'http://' + window.location.host + '/'
let serviceUrl = encodeURIComponent(sevice)
window.location.href = process.env.VUE_APP_CAS_BASE_URL + '/logout?service=' + serviceUrl
}
resolve()
}).catch(() => {
resolve()
@ -170,9 +171,9 @@ const user = {
})
},
// 第三方登录
ThirdLogin({ commit }, token) {
ThirdLogin({ commit }, param) {
return new Promise((resolve, reject) => {
thirdLogin(token).then(response => {
thirdLogin(param.token,param.thirdType).then(response => {
if(response.code =='200'){
const result = response.result
const userInfo = result.userInfo

2
ant-design-vue-jeecg/src/store/mutation-types.js

@ -19,6 +19,8 @@ export const UI_CACHE_DB_DICT_DATA = 'UI_CACHE_DB_DICT_DATA'
export const INDEX_MAIN_PAGE_PATH = '/dashboard/analysis'
export const TENANT_ID = 'TENANT_ID'
export const ONL_AUTH_FIELDS = 'ONL_AUTH_FIELDS'
//路由缓存问题,关闭了tab页时再打开就不刷新 #842
export const CACHE_INCLUDED_ROUTES = 'CACHE_INCLUDED_ROUTES'
export const CONTENT_WIDTH_TYPE = {
Fluid: 'Fluid',

60
ant-design-vue-jeecg/src/utils/desform/DesformRouteUtils.js

@ -1,60 +0,0 @@
import router from '@/router'
import { getAction } from '@api/manage'
/** 表单设计器路由类型 */
export const DESFORM_ROUTE_TYPE = {
/** 跳转到表单 */
form: '1',
/** 跳转到菜单 */
menu: '2',
/** 跳转到外部链接 */
href: '3',
}
/** 表单设计器路由跳转带过来的ID名字 */
export const DESFORM_ROUTE_DATA_ID = 'routeDataId'
/**
* 获取当前路由或指定路由的 routeDataId
*
* @param $route 路由对象默认为当前路由
*/
export function getDesformRouteDataId($route) {
if (arguments.length === 0) {
$route = router.currentRoute
}
if ($route) {
return $route.query[DESFORM_ROUTE_DATA_ID]
}
return null
}
/**
* 根据路由跳转带过来的ID来获取表单设计器的数据
* @param param 表单设计器路由跳转带过来的ID可以直接传id字符串也可以传 this.$route自动从$route里获取id如果不传就获取当前路由的参数
* @returns {Promise<void>}
*/
export async function getDesformDataByRouteDataId(param) {
if (!param) {
param = router.currentRoute
}
let id
if (typeof param == 'string') {
id = param
} else if (typeof param.query === 'object') {
id = getDesformRouteDataId(param)
if (!id) {
// 当前$route.query里没有带表单设计器路由ID,直接返回null
return null
}
} else {
throw new Error('传递的参数不能识别可以直接传id字符串也可以传 this.$route自动从$route里获取id如果不传就获取当前路由的参数')
}
let url = `/desform/data/queryById?id=${id}`
let { success, result, message } = await getAction(url)
if (success) {
result.desformDataJson = JSON.parse(result.desformDataJson)
return result
} else {
throw new Error('表单设计器路由数据获取失败' + message)
}
}

185
ant-design-vue-jeecg/src/utils/desform/pcaaUtils.js

@ -1,185 +0,0 @@
/*
* 省市区联动组件通用工具类
* 列表翻译组件反推表单设计器组件反推等功能都可以用该工具类实现
*
* 1. leafName字段的意义
* AntdvUI和ElementUI的叶级节点名字是不一样的
* AntdvUI的名字是 isLeafElementUI是 leaf
* 默认是AntdvUI的名字在表单设计器那边需要手动 setLeafName
*/
import { pcaa } from 'area-data'
export { pcaa }
/** 根节点Code = 86 */
export const ROOT_CODE = '86'
/** 叶级节点的名字 */
let leafName = 'isLeaf'
/**
* set leafName
* @param $leafName
*/
export function setLeafName($leafName = 'isLeaf') {
leafName = $leafName
}
/**
* 将地区数据转换成下拉框等组件可识别的Options数组
* @param data 地区data
* @param labelName label标签名字
* @return
*/
export function transToOptions(data, labelName = 'label') {
if (data) {
return Object.keys(data).map(key => ({ value: key, [labelName]: data[key] }))
} else {
return []
}
}
/**
* 获取子级Data对象
*
* @param code 父级地区Code
*/
export function getChildrenDataByCode(code) {
return pcaa[code]
}
/**
* 获取子级Options对象
*
* @param code 父级地区Code
* @return {Array} 返回的值一定是一个数组如果数组length===0则代表没有子级
*/
export function getChildrenOptionsByCode(code) {
let options = []
let data = getChildrenDataByCode(code)
if (data) {
for (let key in data) {
if (data.hasOwnProperty(key)) {
options.push({ value: key, label: data[key], })
}
}
return options
} else {
return []
}
}
/**
* 获取兄弟Data对象
*
* @param code 地区Code
*/
export function getSiblingsDataByCode(code) {
if (typeof code === 'string' && code.length === 6) {
// 父级节点Code
let parentCode = `${code.substring(0, 4)}00`
return getChildrenDataByCode(parentCode)
} else {
console.warn('[getSiblingsByCode]: code不合法')
return null
}
}
/**
* 获取对应的 Label
*
* @param code 地区Code
*/
export function getLabelByCode(code) {
if (code) {
// 获取当前code所有的兄弟节点
let siblingsData = getSiblingsDataByCode(code)
// 然后取出自己的值
return siblingsData[code]
} else {
return code
}
}
/**
* 获取所有的 Label包括自身和所有父级
*
* @param code 地区Code
* @param joinText 合并文本
*/
export function getAllLabelByCode(code, joinText = ' / ') {
if (code) {
let { labels } = getAllParentByCode(code)
return labels.join(joinText)
} else {
return code
}
}
/**
* 通过子级 code 反推所有父级的 code
*
* @param code 子级地区Code
* @returns {Object} options: 所有父级的选项codes: 所有父级的codelabels: 所有父级的显示名
*/
export function getAllParentByCode(code) {
code = (typeof code === 'string' ? code : '').trim()
if (code.length === 0) {
return { options: [], codes: [], labels: [] }
}
// 获取第一级数据
let rootOptions = getChildrenOptionsByCode(ROOT_CODE)
hasChildren(rootOptions)
// 父级code数组,code长度
let parentCodes = [code], length = code.length
// 父级label数组
let parentLabels = [getLabelByCode(code)]
// 级别,位数,是否继续循环
let level = 1, num = 2, flag = true
let options = rootOptions
do {
let endIndex = num * level++
// 末尾补零个数
let zeroPadding = [...new Array(length - endIndex)].map(i => '0').join('')
// 裁剪并补零(获取上级的方式就是将当前code的后两位变成 00)
let parentCode = code.substring(0, endIndex) + zeroPadding
// 是否找到在选项中的位置
let findIt = false
for (let option of options) {
if (option.value === parentCode) {
if (option[leafName]) {
flag = false
} else {
let children = getChildrenOptionsByCode(option.value)
hasChildren(children)
option.children = children
options = children
parentCodes.splice(parentCodes.length - 1, 0, option.value)
parentLabels.splice(parentLabels.length - 1, 0, option.label)
}
findIt = true
break
}
}
if (findIt) {
findIt = false
} else {
flag = false
}
} while (flag)
return { options: rootOptions, codes: parentCodes, labels: parentLabels }
}
/**
* 判断所有的项是否有子节点
*
* @param options
*/
export function hasChildren(options) {
options.forEach(option => {
option[leafName] = getChildrenOptionsByCode(option.value).length === 0
})
}

43
ant-design-vue-jeecg/src/utils/request.js

@ -32,6 +32,14 @@ const err = (error) => {
notification.error({ message: '系统提示', description: '拒绝访问',duration: 4})
break
case 500:
console.log("------error.response------",error.response)
// update-begin- --- author:liusq ------ date:20200910 ---- for:处理Blob情况----
let type=error.response.request.responseType;
if(type === 'blob'){
blobToJson(data);
break;
}
// update-end- --- author:liusq ------ date:20200910 ---- for:处理Blob情况----
//notification.error({ message: '系统提示', description:'Token失效,请重新登录!',duration: 4})
if(token && data.message.includes("Token失效")){
// update-begin- --- author:scott ------ date:20190225 ---- for:Token失效采用弹框模式,不直接跳转----
@ -123,6 +131,41 @@ const installer = {
Vue.use(VueAxios, router, service)
}
}
/**
* Blob解析
* @param data
*/
function blobToJson(data) {
let fileReader = new FileReader();
let token = Vue.ls.get(ACCESS_TOKEN);
fileReader.onload = function() {
try {
let jsonData = JSON.parse(this.result); // 说明是普通对象数据,后台转换失败
console.log("jsonData",jsonData)
if (jsonData.status === 500) {
console.log("token----------》",token)
if(token && jsonData.message.includes("Token失效")){
Modal.error({
title: '登录已过期',
content: '很抱歉登录已过期请重新登录',
okText: '重新登录',
mask: false,
onOk: () => {
store.dispatch('Logout').then(() => {
Vue.ls.remove(ACCESS_TOKEN)
window.location.reload()
})
}
})
}
}
} catch (err) {
// 解析成对象失败,说明是正常的文件流
console.log("blob解析fileReader返回err",err)
}
};
fileReader.readAsText(data)
}
export {
installer as VueAxios,

8
ant-design-vue-jeecg/src/utils/util.js

@ -126,6 +126,8 @@ function generateChildRouters (data) {
componentPath = onlineCommons.OnlCgformTreeList
}else if(item.component=="modules/online/cgform/auto/erp/OnlCgformErpList"){
componentPath = onlineCommons.OnlCgformErpList
}else if(item.component=="modules/online/cgform/auto/tab/OnlCgformTabList"){
componentPath = onlineCommons.OnlCgformTabList
}else if(item.component=="modules/online/cgform/auto/innerTable/OnlCgformInnerTableList"){
componentPath = onlineCommons.OnlCgformInnerTableList
}else if(item.component=="modules/online/cgreport/OnlCgreportHeadList"){
@ -136,14 +138,13 @@ function generateChildRouters (data) {
componentPath = resolve => require(['@/' + component+'.vue'], resolve)
}
let menu = {
path: item.path,
name: item.name,
redirect:item.redirect,
component: componentPath,
//component: resolve => require(['@/' + component+'.vue'], resolve),
hidden:item.hidden,
//component:()=> import(`@/views/${item.component}.vue`),
meta: {
title:item.meta.title ,
icon: item.meta.icon,
@ -151,8 +152,9 @@ function generateChildRouters (data) {
permissionList:item.meta.permissionList,
keepAlive:item.meta.keepAlive,
/*update_begin author:wuxianquan date:20190908 for:赋值 */
internalOrExternal:item.meta.internalOrExternal
internalOrExternal:item.meta.internalOrExternal,
/*update_end author:wuxianquan date:20190908 for:赋值 */
componentName:item.meta.componentName
}
}
if(item.alwaysShow){

15
ant-design-vue-jeecg/src/views/404.vue

@ -1,15 +0,0 @@
<template>
<div>
404 page
</div>
</template>
<script>
export default {
name: "404"
}
</script>
<style scoped>
</style>

2
ant-design-vue-jeecg/src/views/account/center/Index.vue

@ -137,7 +137,7 @@
return getFileAccessHttpUrl(this.avatar());
},
getTeams() {
this.$http.get('/api/workplace/teams')
this.$http.get('/mock/api/workplace/teams')
.then(res => {
this.teams = res.result
this.teamSpinning = false

8
ant-design-vue-jeecg/src/views/dashboard/Workplace.vue

@ -205,20 +205,20 @@
methods: {
...mapGetters(["nickname", "welcome"]),
getProjects() {
this.$http.get('/api/list/search/projects')
this.$http.get('/mock/api/list/search/projects')
.then(res => {
this.projects = res.result && res.result.data
this.loading = false
})
},
getActivity() {
this.$http.get('/api/workplace/activity')
this.$http.get('/mock/api/workplace/activity')
.then(res => {
this.activities = res.result
})
},
getTeams() {
this.$http.get('/api/workplace/teams')
this.$http.get('/mock/api/workplace/teams')
.then(res => {
this.teams = res.result
})
@ -226,7 +226,7 @@
initRadar() {
this.radarLoading = true
this.$http.get('/api/workplace/radar')
this.$http.get('/mock/api/workplace/radar')
.then(res => {
const dv = new DataSet.View().source(res.result)

0
ant-design-vue-jeecg/src/views/form/BasicForm.vue → ant-design-vue-jeecg/src/views/examples/form/BasicForm.vue

0
ant-design-vue-jeecg/src/views/form/advancedForm/AdvancedForm.vue → ant-design-vue-jeecg/src/views/examples/form/advancedForm/AdvancedForm.vue

0
ant-design-vue-jeecg/src/views/form/advancedForm/RepositoryForm.vue → ant-design-vue-jeecg/src/views/examples/form/advancedForm/RepositoryForm.vue

0
ant-design-vue-jeecg/src/views/form/advancedForm/TaskForm.vue → ant-design-vue-jeecg/src/views/examples/form/advancedForm/TaskForm.vue

0
ant-design-vue-jeecg/src/views/form/stepForm/Step1.vue → ant-design-vue-jeecg/src/views/examples/form/stepForm/Step1.vue

0
ant-design-vue-jeecg/src/views/form/stepForm/Step2.vue → ant-design-vue-jeecg/src/views/examples/form/stepForm/Step2.vue

2
ant-design-vue-jeecg/src/views/form/stepForm/Step3.vue → ant-design-vue-jeecg/src/views/examples/form/stepForm/Step3.vue

@ -30,7 +30,7 @@
</template>
<script>
import Result from '../../result/Result'
import Result from '../../../result/Result'
export default {
name: "Step3",

0
ant-design-vue-jeecg/src/views/form/stepForm/StepForm.vue → ant-design-vue-jeecg/src/views/examples/form/stepForm/StepForm.vue

0
ant-design-vue-jeecg/src/views/list/CardList.vue → ant-design-vue-jeecg/src/views/examples/list/CardList.vue

2
ant-design-vue-jeecg/src/views/list/PermissionList.vue → ant-design-vue-jeecg/src/views/examples/list/PermissionList.vue

@ -192,7 +192,7 @@
permissionList: null,
// 加载数据方法 必须为 Promise 对象
loadData: parameter => {
return this.$http.get('/api/permission', {
return this.$http.get('/mock/api/permission', {
params: Object.assign(parameter, this.queryParam)
}).then(res => {
let result = res.result

2
ant-design-vue-jeecg/src/views/list/RoleList.vue → ant-design-vue-jeecg/src/views/examples/list/RoleList.vue

@ -128,7 +128,7 @@
],
// 加载数据方法 必须为 Promise 对象
loadData: parameter => {
return this.$http.get('/api/role', {
return this.$http.get('/mock/api/role', {
params: Object.assign(parameter, this.queryParam)
}).then(res => {
return res.result

0
ant-design-vue-jeecg/src/views/list/StandardList.vue → ant-design-vue-jeecg/src/views/examples/list/StandardList.vue

2
ant-design-vue-jeecg/src/views/list/TableInnerEditList.vue → ant-design-vue-jeecg/src/views/examples/list/TableInnerEditList.vue

@ -173,7 +173,7 @@
],
// 加载数据方法 必须为 Promise 对象
loadData: parameter => {
return this.$http.get('/api/service', {
return this.$http.get('/mock/api/service', {
params: Object.assign(parameter, this.queryParam)
}).then(res => {
return res.result

0
ant-design-vue-jeecg/src/views/list/TableList.vue → ant-design-vue-jeecg/src/views/examples/list/TableList.vue

0
ant-design-vue-jeecg/src/views/list/UserList.vue → ant-design-vue-jeecg/src/views/examples/list/UserList.vue

0
ant-design-vue-jeecg/src/views/list/modules/RoleModal.vue → ant-design-vue-jeecg/src/views/examples/list/modules/RoleModal.vue

0
ant-design-vue-jeecg/src/views/list/search/SearchLayout.vue → ant-design-vue-jeecg/src/views/examples/list/search/SearchLayout.vue

0
ant-design-vue-jeecg/src/views/profile/advanced/Advanced.vue → ant-design-vue-jeecg/src/views/examples/profile/advanced/Advanced.vue

0
ant-design-vue-jeecg/src/views/profile/basic/Index.vue → ant-design-vue-jeecg/src/views/examples/profile/basic/Index.vue

2
ant-design-vue-jeecg/src/views/jeecg/JeecgPdfView.vue

@ -75,7 +75,7 @@
// 加载中
spinning:false,
url: {
pdfList: "/api/pdfList",
pdfList: "/mock/api/pdfList",
},
}
},

2
ant-design-vue-jeecg/src/views/jeecg/JeecgTreeTable.vue

@ -27,7 +27,7 @@
components: { JTreeTable },
data() {
return {
url: '/api/asynTreeList',
url: '/mock/api/asynTreeList',
columns: [
{
title: '菜单名称',

4
ant-design-vue-jeecg/src/views/jeecg/SelectDemo.vue

@ -130,7 +130,7 @@
<a-row :gutter="24">
<a-col :span="12">
<a-form-item label="选择职务">
<j-select-position v-model="formData.selectPosition" />
<j-select-position :buttons="false" :disabled="true" v-model="formData.selectPosition" />
</a-form-item>
</a-col>
<a-col :span="12">选中值{{ formData.selectPosition}}</a-col>
@ -285,7 +285,7 @@
<a-row :gutter="24">
<a-col :span="12">
<a-form-item label="分类字典树">
<j-category-select v-model="formData.selectCategory" pcode="A01" :multiple="true"/>
<j-category-select v-model="formData.selectCategory" pcode="B01" :multiple="true"/>
</a-form-item>
</a-col>
<a-col :span="12">选中的值(v-model){{ formData.selectCategory }}</a-col>

2
ant-design-vue-jeecg/src/views/jeecg/helloworld.vue

@ -68,7 +68,7 @@
console.log('props sex: ',this.sex);
console.log('props name: ',this.name);
getAction('/api/area').then((res) => {
getAction('/mock/api/area').then((res) => {
console.log("------------")
console.log(res)
this.areaOptions = res;

14
ant-design-vue-jeecg/src/views/jeecg/modules/JeecgOrderMainModal.vue

@ -71,6 +71,11 @@
</a-row>
<a-row type="flex" style="margin-bottom:10px" :gutter="16" v-for="(item, index) in orderMainModel.jeecgOrderCustomerList" :key="index">
<a-col :span="6" style="display: none">
<a-form-item>
<a-input placeholder="id" v-decorator="['jeecgOrderCustomerList['+index+'].id', {'initialValue':item.id}]" />
</a-form-item>
</a-col>
<a-col :span="5">
<a-form-item>
<a-input placeholder="客户名" v-decorator="['jeecgOrderCustomerList['+index+'].name', {'initialValue':item.name,rules: [{ required: true, message: '请输入用户名!' }]}]" />
@ -112,6 +117,11 @@
<a-col :span="6">操作</a-col>
</a-row>
<a-row type="flex" style="margin-bottom:10px" :gutter="16" v-for="(item, index) in orderMainModel.jeecgOrderTicketList" :key="index">
<a-col :span="6" style="display: none">
<a-form-item>
<a-input placeholder="id" v-decorator="['jeecgOrderTicketList['+index+'].id', {'initialValue':item.id}]" />
</a-form-item>
</a-col>
<a-col :span="6">
<a-form-item>
<a-input placeholder="航班号" v-decorator="['jeecgOrderTicketList['+index+'].ticketCode', {'initialValue':item.ticketCode,rules: [{ required: true, message: '请输入航班号!' }]}]" />
@ -213,7 +223,6 @@
this.form.setFieldsValue(pick(this.orderMainModel,'orderCode','ctype','orderMoney','content'))
this.form.setFieldsValue({orderDate:this.orderMainModel.orderDate?moment(this.orderMainModel.orderDate):null}) //时间格式化
});
console.log(this.orderMainModel)
},
close () {
this.$emit('close');
@ -242,7 +251,6 @@
jeecgOrderCustomerList: orderMainData.jeecgOrderCustomerList,
jeecgOrderTicketList: orderMainData.jeecgOrderTicketList
}
console.log(formData)
httpAction(httpurl,formData,method).then((res)=>{
if(res.success){
@ -309,4 +317,4 @@
.ant-tabs-content .ant-form-item {
margin-bottom: 0px;
}
</style>
</style>

2
ant-design-vue-jeecg/src/views/jeecg/report/Analysis.vue

@ -396,7 +396,7 @@
countBjl:"sps/register/bjlTenDaysCount",
countISll:'sps/register/ISllTenDaysCount',
countIBjl:'sps/register/IBjlTenDaysCount',
queryDiskInfo:'api/queryDiskInfo'
queryDiskInfo:'sys/actuator/redis/queryDiskInfo'
},
chartData:{
sll:[],

8
ant-design-vue-jeecg/src/views/jeecg/report/ArchivesStatisticst.vue

@ -93,10 +93,10 @@
// 统计图类型
tabStatus:"bar",
url: {
getYearCountInfo: "/api/report/getYearCountInfo",
getMonthCountInfo:"/api/report/getMonthCountInfo",
getCntrNoCountInfo:"/api/report/getCntrNoCountInfo",
getCabinetCountInfo:"/api/report/getCabinetCountInfo",
getYearCountInfo: "/mock/api/report/getYearCountInfo",
getMonthCountInfo:"/mock/api/report/getMonthCountInfo",
getCntrNoCountInfo:"/mock/api/report/getCntrNoCountInfo",
getCabinetCountInfo:"/mock/api/report/getCabinetCountInfo",
},
}
},

10
ant-design-vue-jeecg/src/views/modules/message/SysMessageList.vue

@ -183,11 +183,11 @@
}
],
url: {
list: "/message/sysMessage/list",
delete: "/message/sysMessage/delete",
deleteBatch: "/message/sysMessage/deleteBatch",
exportXlsUrl: "message/sysMessage/exportXls",
importExcelUrl: "message/sysMessage/importExcel",
list: "/sys/message/sysMessage/list",
delete: "/sys/message/sysMessage/delete",
deleteBatch: "/sys/message/sysMessage/deleteBatch",
exportXlsUrl: "sys/message/sysMessage/exportXls",
importExcelUrl: "sys/message/sysMessage/importExcel",
},
}
},

10
ant-design-vue-jeecg/src/views/modules/message/SysMessageTemplateList.vue

@ -192,11 +192,11 @@
}
],
url: {
list: "/message/sysMessageTemplate/list",
delete: "/message/sysMessageTemplate/delete",
deleteBatch: "/message/sysMessageTemplate/deleteBatch",
exportXlsUrl: "message/sysMessageTemplate/exportXls",
importExcelUrl: "message/sysMessageTemplate/importExcel",
list: "/sys/message/sysMessageTemplate/list",
delete: "/sys/message/sysMessageTemplate/delete",
deleteBatch: "/sys/message/sysMessageTemplate/deleteBatch",
exportXlsUrl: "sys/message/sysMessageTemplate/exportXls",
importExcelUrl: "sys/message/sysMessageTemplate/importExcel",
},
}
},

4
ant-design-vue-jeecg/src/views/modules/message/modules/SysMessageModal.vue

@ -109,8 +109,8 @@
validatorRules: {},
disableSubmit: true,
url: {
add: "/message/sysMessage/add",
edit: "/message/sysMessage/edit",
add: "/sys/message/sysMessage/add",
edit: "/sys/message/sysMessage/edit",
},
}
},

4
ant-design-vue-jeecg/src/views/modules/message/modules/SysMessageTemplateModal.vue

@ -114,8 +114,8 @@
templateType: {rules: [{required: true, message: '请输入模板类型!'}]},
},
url: {
add: "/message/sysMessageTemplate/add",
edit: "/message/sysMessageTemplate/edit",
add: "/sys/message/sysMessageTemplate/add",
edit: "/sys/message/sysMessageTemplate/edit",
},
useEditor:false,
templateEditorContent:""

2
ant-design-vue-jeecg/src/views/modules/message/modules/SysMessageTestModal.vue

@ -69,7 +69,7 @@
confirmLoading: false,
url: {
send: "/message/sysMessageTemplate/sendMsg",
send: "/sys/message/sysMessageTemplate/sendMsg",
},
templateName: "",
templateContent: "",

2
ant-design-vue-jeecg/src/views/modules/monitor/DiskMonitoring.vue

@ -27,7 +27,7 @@
//数据集
diskInfo:[],
url:{
queryDiskInfo:'actuator/redis/queryDiskInfo',
queryDiskInfo:'sys/actuator/redis/queryDiskInfo',
}
}
},

6
ant-design-vue-jeecg/src/views/modules/monitor/RedisInfo.vue

@ -76,9 +76,9 @@
dataIndex: 'value'
}],
url: {
keysSize: '/actuator/redis/keysSize',
memoryInfo: '/actuator/redis/memoryInfo',
info: '/actuator/redis/info'
keysSize: '/sys/actuator/redis/keysSize',
memoryInfo: '/sys/actuator/redis/memoryInfo',
info: '/sys/actuator/redis/info'
},
path: '/monitor/redis/info'
}

6
ant-design-vue-jeecg/src/views/modules/oss/OSSFileList.vue

@ -128,9 +128,9 @@
}
],
url: {
upload: "/oss/file/upload",
list: "/oss/file/list",
delete: "/oss/file/delete",
upload: "/sys/oss/file/upload",
list: "/sys/oss/file/list",
delete: "/sys/oss/file/delete",
minioUpload: "/sys/upload/uploadMinio"
}
}

170
ant-design-vue-jeecg/src/views/system/SysGatewayRouteList.vue

@ -1,101 +1,111 @@
<template>
<a-card :bordered="false" style="height: 100%">
<div style="padding-bottom: 2px">
<a-alert type="warning" show-icon>
<div slot="message" style="width: 100%">
<span>路由配置请慎重</span>
<span style="display:inline-block;float:right;padding-right: 5px">
<a @click="clearRedis"><a-icon type="reload" />清除缓存</a>
</span>
</div>
</a-alert>
<a-card :bordered="false">
<!-- 操作按钮区域 -->
<div class="table-operator">
<a-button @click="showModal(null)" type="primary" icon="plus">新增</a-button>
</div>
<div :id="eleId" :style="{ height: editorHeight + 'px', width: '100%' }"></div>
<div style="text-align: center;padding-top:10px">
<a-button type="primary" @click="submitForm" style="width:160px">保存</a-button>
<div>
<a-table
ref="table"
size="middle"
:scroll="{x:true}"
bordered
rowKey="id"
:columns="columns"
:dataSource="dataSource"
:pagination="false"
:loading="loading"
class="j-table-force-nowrap"
@change="handleTableChange">
<span slot="status" slot-scope="text, record, index">
<a-tag color="pink" v-if="text==0">禁用</a-tag>
<a-tag color="#87d068" v-if="text==1" >正常</a-tag>
</span>
<span slot="action" slot-scope="text, record">
<a @click="showModal(record)">编辑</a>
<a-divider type="vertical"/>
<a-dropdown>
<a class="ant-dropdown-link">更多 <a-icon type="down"/></a>
<a-menu slot="overlay">
<a-menu-item>
<a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
<a>删除</a>
</a-popconfirm>
</a-menu-item>
</a-menu>
</a-dropdown>
</span>
</a-table>
</div>
<gate-way-route-modal ref="modalForm" @ok="modalFormOk"></gate-way-route-modal>
</a-card>
</template>
<script>
import JsonEditor from 'jsoneditor'
import 'jsoneditor/dist/jsoneditor.min.css'
import { getAction, postAction } from '@/api/manage'
import '@/assets/less/TableExpand.less'
import { mixinDevice } from '@/utils/mixin'
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
import GateWayRouteModal from './modules/GateWayRouteModal'
export default {
name: "SysGatewayRouteList",
data () {
name: 'TenantList',
mixins: [JeecgListMixin, mixinDevice],
components: {
GateWayRouteModal
},
data() {
return {
eleId:'jsoneditor',
description: 'gateway路由管理管理页面',
editor: null,
editorWidth:400,
editorHeight:500,
url:{
description: 'adad管理页面',
// 表头
columns: [
{
title: '路由ID',
align: 'center',
dataIndex: 'routerId'
}, {
title: '路由名称',
align: 'center',
dataIndex: 'name'
},
{
title: '路由URI',
align: 'center',
dataIndex: 'uri'
},
{
title: '状态',
align: 'center',
dataIndex: 'status',
scopedSlots: { customRender: 'status' }
},
{
title: '操作',
dataIndex: 'action',
align: 'center',
fixed: 'right',
width: 147,
scopedSlots: { customRender: 'action' }
}
],
url: {
list: '/sys/gatewayRoute/list',
update: '/sys/gatewayRoute/updateAll',
clear: '/sys/gatewayRoute/clearRedis'
delete: '/sys/gatewayRoute/delete'
},
dictOptions: {}
}
},
created() {
let winWidth = window.innerWidth;
console.log("页面宽度",winWidth)
this.editorWidth = winWidth
},
mounted(){
this.initJsonEditor();
},
methods: {
initJsonEditor() {
let container = document.getElementById(this.eleId);
let options = {
modes: ['text', 'code', 'tree', 'form', 'view'],
mode: 'tree',
ace: ace,
sortObjectKeys: 'code',
mainMenuBar:['format']
};
this.editor = new JsonEditor(container, options);
this.initRouteData();
},
initRouteData(){
getAction(this.url.list).then(res=>{
if(res.success){
let array = res.result
console.log('当前路由配置信息为', array)
this.editor.set(array)
}
})
},
// 获取json
submitForm() {
let text = this.editor.getText()
console.log("保存的json数据",text)
if(!text || text.length<=0 || text=='{}' || text=='[]'){
this.$message.warning('未录入任何信息')
return ;
}
postAction(this.url.update,{
routes:text
}).then(res=>{
if(res.success){
this.$message.success(res.message)
}else{
this.$message.error(res.message)
}
})
},
clearRedis(){
getAction(this.url.clear).then(res=>{
if(res.success){
this.$message.success(res.message)
}
})
showModal(record) {
this.$refs['modalForm'].show(record)
}
}
}
</script>
<style scoped>
@import '~@assets/less/common.less';
</style>

101
ant-design-vue-jeecg/src/views/system/SysGatewayRouteList2.vue

@ -0,0 +1,101 @@
<!--<template>-->
<!-- <a-card :bordered="false" style="height: 100%">-->
<!-- <div style="padding-bottom: 2px">-->
<!-- <a-alert type="warning" show-icon>-->
<!-- <div slot="message" style="width: 100%">-->
<!-- <span>路由配置请慎重</span>-->
<!-- <span style="display:inline-block;float:right;padding-right: 5px">-->
<!-- <a @click="clearRedis"><a-icon type="reload" />清除缓存</a>-->
<!-- </span>-->
<!-- </div>-->
<!-- </a-alert>-->
<!-- </div>-->
<!-- <div :id="eleId" :style="{ height: editorHeight + 'px', width: '100%' }"></div>-->
<!-- <div style="text-align: center;padding-top:10px">-->
<!-- <a-button type="primary" @click="submitForm" style="width:160px">保存</a-button>-->
<!-- </div>-->
<!-- </a-card>-->
<!--</template>-->
<!--<script>-->
<!-- import JsonEditor from 'jsoneditor'-->
<!-- import 'jsoneditor/dist/jsoneditor.min.css'-->
<!-- import { getAction, postAction } from '@/api/manage'-->
<!-- export default {-->
<!-- name: "SysGatewayRouteList",-->
<!-- data () {-->
<!-- return {-->
<!-- eleId:'jsoneditor',-->
<!-- description: 'gateway路由管理管理页面',-->
<!-- editor: null,-->
<!-- editorWidth:400,-->
<!-- editorHeight:500,-->
<!-- url:{-->
<!-- list: '/sys/gatewayRoute/list',-->
<!-- update: '/sys/gatewayRoute/updateAll',-->
<!-- clear: '/sys/gatewayRoute/clearRedis'-->
<!-- },-->
<!-- }-->
<!-- },-->
<!-- created() {-->
<!-- let winWidth = window.innerWidth;-->
<!-- console.log("页面宽度",winWidth)-->
<!-- this.editorWidth = winWidth-->
<!-- },-->
<!-- mounted(){-->
<!-- this.initJsonEditor();-->
<!-- },-->
<!-- methods: {-->
<!-- initJsonEditor() {-->
<!-- let container = document.getElementById(this.eleId);-->
<!-- let options = {-->
<!-- modes: ['text', 'code', 'tree', 'form', 'view'],-->
<!-- mode: 'tree',-->
<!-- ace: ace,-->
<!-- sortObjectKeys: 'code',-->
<!-- mainMenuBar:['format']-->
<!-- };-->
<!-- this.editor = new JsonEditor(container, options);-->
<!-- this.initRouteData();-->
<!-- },-->
<!-- initRouteData(){-->
<!-- getAction(this.url.list).then(res=>{-->
<!-- if(res.success){-->
<!-- let array = res.result-->
<!-- console.log('当前路由配置信息为', array)-->
<!-- this.editor.set(array)-->
<!-- }-->
<!-- })-->
<!-- },-->
<!-- // 获取json-->
<!-- submitForm() {-->
<!-- let text = this.editor.getText()-->
<!-- console.log("保存的json数据",text)-->
<!-- if(!text || text.length<=0 || text=='{}' || text=='[]'){-->
<!-- this.$message.warning('未录入任何信息')-->
<!-- return ;-->
<!-- }-->
<!-- postAction(this.url.update,{-->
<!-- routes:text-->
<!-- }).then(res=>{-->
<!-- if(res.success){-->
<!-- this.$message.success(res.message)-->
<!-- }else{-->
<!-- this.$message.error(res.message)-->
<!-- }-->
<!-- })-->
<!-- },-->
<!-- clearRedis(){-->
<!-- getAction(this.url.clear).then(res=>{-->
<!-- if(res.success){-->
<!-- this.$message.success(res.message)-->
<!-- }-->
<!-- })-->
<!-- }-->
<!-- }-->
<!-- }-->
<!--</script>-->

18
ant-design-vue-jeecg/src/views/system/UserList.vue

@ -155,10 +155,6 @@
</a-popconfirm>
</a-menu-item>
<a-menu-item>
<a href="javascript:;" @click="handleAgentSettings(record.username)">代理人</a>
</a-menu-item>
</a-menu>
</a-dropdown>
</span>
@ -169,10 +165,7 @@
<!-- table区域-end -->
<user-modal ref="modalForm" @ok="modalFormOk"></user-modal>
<password-modal ref="passwordmodal" @ok="passwordModalOk"></password-modal>
<sys-user-agent-modal ref="sysUserAgentModal"></sys-user-agent-modal>
<password-modal ref="passwordmodal"></password-modal>
<!-- 用户回收站 -->
<user-recycle-bin-modal :visible.sync="recycleBinVisible" @ok="modalFormOk"/>
@ -291,7 +284,7 @@
{ type: 'select', value: 'sex', text: '性别', dictCode: 'sex' },
],
url: {
syncUser: "/process/extActProcess/doSyncUser",
syncUser: "/act/process/extActProcess/doSyncUser",
list: "/sys/user/list",
delete: "/sys/user/delete",
deleteBatch: "/sys/user/deleteBatch",
@ -375,13 +368,6 @@
handleChangePassword(username) {
this.$refs.passwordmodal.show(username);
},
handleAgentSettings(username){
this.$refs.sysUserAgentModal.agentSettings(username);
this.$refs.sysUserAgentModal.title = "用户代理人设置";
},
passwordModalOk() {
//TODO 密码修改完成 不需要刷新页面,可以把datasource中的数据更新一下
}
}
}

5
ant-design-vue-jeecg/src/views/system/modules/DepartWindow.vue

@ -177,9 +177,12 @@
}
</script>
<style scoped>
<style lang="less" scoped>
.ant-table-tbody .ant-table-row td{
padding-top:10px;
padding-bottom:10px;
}
/deep/ .ant-modal{
height: 700px;
}
</style>

16
ant-design-vue-jeecg/src/views/system/modules/DictItemModal.vue

@ -79,7 +79,7 @@
form: this.$form.createForm(this),
validatorRules: {
itemText: {rules: [{required: true, message: '请输入名称!'}]},
itemValue: {rules: [{required: true, message: '请输入数据值!'}]},
itemValue: {rules: [{required: true, message: '请输入数据值!'},{validator: this.validateItemValue}]},
},
}
},
@ -153,6 +153,18 @@
this.$emit('close');
this.visible = false;
},
validateItemValue(rule, value, callback){
if(value){
let reg=new RegExp("[`_~!@#$^&*()=|{}'.<>《》/?!¥()—【】‘;:”“。,、?]")
if(reg.test(value)){
callback("数据值不能包含特殊字符!")
}else{
callback()
}
}else{
callback()
}
}
}
}
</script>
</script>

306
ant-design-vue-jeecg/src/views/system/modules/GateWayRouteModal.vue

@ -0,0 +1,306 @@
<template>
<a-drawer
:title="title"
:maskClosable="true"
width="45%"
placement="right"
v-if="visible"
:closable="true"
@close="handleCancel"
:visible="visible"
style="overflow: auto;padding-bottom: 53px;">
<a-form-model ref="form" :layout="layout" :label-col="labelCol" :wrapper-col="wrapperCol" :model="router">
<a-form-model-item label="路由ID">
<a-input v-model="router.routerId" placeholder="路由唯一ID"/>
</a-form-model-item>
<a-form-model-item label="路由名称">
<a-input v-model="router.name" placeholder="路由名称"/>
</a-form-model-item>
<a-form-model-item label="路由URI">
<a-input v-model="router.uri" placeholder="路由URL"/>
</a-form-model-item>
<a-form-model-item label="路由状态" prop="status">
<a-switch default-checked v-model="router.status"/>
</a-form-model-item>
<a-form-model-item prop="predicates" label="路由条件">
<div v-for="(item,index) in router.predicates">
<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"
: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)">
{{ tag }}
</a-tag>
</template>
<a-input v-if="inputVisible&&index==currentNameIndex" ref="input" type="text" size="small"
:style="{ width: '100px' }"
:value="inputValue"
@change="handleInputChange" @blur="handleInputConfirm(item)"
@keyup.enter="handleInputConfirm(item)"/>
<a-tag v-else style="background: #fff; borderStyle: dashed;" @click="showInput(item,index)">
<a-icon type="plus"/>
新建{{item.name}}
</a-tag>
</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>
<a-button type="dashed" style="margin-left: 8px;width:100%"> 添加路由条件
<a-icon type="down"/>
</a-button>
</a-dropdown>
</p>
</a-form-model-item>
<a-form-model-item prop="predicates" label="过滤器">
<div v-for="(item,index) in router.filters">
<a-divider>{{item.name}}
<a-icon type="delete" size="22" @click="removeFilter(router,index)"/>
</a-divider>
<div v-for="(tag, index) in item.args" :key="tag.key">
<a-input v-model="tag.key" placeholder="参数键" style="width: 45%; margin-right: 8px"/>
<a-input v-model="tag.value" placeholder="参数值" style="width: 40%; margin-right: 8px"/>
<a-icon class="dynamic-delete-button" type="minus-circle-o" @click="removeFilterParams(item,index)"/>
</div>
<a-button type="dashed" style="margin-left:28%;width: 30%" size="small" @click="addFilterParams(item)">
<a-icon type="plus"/>
添加参数
</a-button>
</div>
<p class="btn" style="padding-top: 10px">
<a-dropdown>
<a-menu slot="overlay" @click="filterHandleMenuClick">
<a-menu-item :key="item.key" :name="item.name" v-for="item in filterArray">{{item.name}}</a-menu-item>
</a-menu>
<a-button type="dashed" style="margin-left: 8px;width:100%"> 添加过滤器
<a-icon type="down"/>
</a-button>
</a-dropdown>
</p>
</a-form-model-item>
<a-row :style="{textAlign:'right'}" class="drawer-bootom-button">
<a-button :style="{marginRight: '8px'}" @click="handleCancel">
关闭
</a-button>
<a-button @click="handleSubmit" type="primary">确定</a-button>
</a-row>
</a-form-model>
</a-drawer>
</template>
<script>
import { postAction } from '@/api/manage'
export default {
name: 'GateWayRouteModal',
components: {},
data() {
return {
layout: 'horizontal',
labelCol: { span: 3 },
wrapperCol: { span: 14 },
currentNameIndex: 0,
currentTagIndex:-1,
predicates: {},
filterArray: [{ key: 0, name: '熔断器' }, { key: 1, name: '限流过滤器' }],
tagArray: ['Path', 'Host', 'Cookie', 'Header', 'Method', 'Query', 'After', 'Before', 'Between', 'RemoteAddr'],
inputVisible: false,
inputValue: '',
url: {
update: '/sys/gatewayRoute/updateAll',
clear: '/sys/gatewayRoute/clearRedis'
},
router: this.getRouter(),
title: '路由编辑',
visible: false,
loading: false
}
},
methods: {
getRouter() {
return {
routerId: '',
name: '',
uri: '',
predicates: [],
filters: []
}
},
show(router) {
if (router) {
router.status=Boolean(router.status)
this.router = router
} else {
this.router = this.getRouter()
this.inputValue=''
}
this.visible = true
this.currentTagIndex=-1
this.currentNameIndex=-1
},
close() {
this.reset()
this.$emit('close')
this.$refs['form'].resetFields()
this.visible = false
},
//删除路由条件配置项
removeTag(item, removedTag) {
const tags = item.args.filter(tag => tag !== removedTag)
item.args = tags
},
//添加路由选项
predicatesHandleMenuClick(e) {
this.router.predicates.push({
args: [],
name: e.key
})
},
editTag(tag,index){
this.currentTagIndex=index
},
//显示输入框
showInput(item, index) {
this.inputVisible = true
this.currentNameIndex = index
this.$nextTick(function() {
this.$refs.input.focus()
})
},
//路由选项输入框失去焦点事件
handleInputChange(e) {
this.inputValue = e.target.value
},
//删除路由条件
removePredicate(item, index) {
item.predicates.splice(index, 1)
},
//删除过滤器参数
removeFilterParams(item, index) {
item.args.splice(index, 1)
},
//删除过滤器
removeFilter(item, index) {
item.filters.splice(index, 1)
},
//添加过滤器参数
addFilterParams(item) {
item.args.push({
key: 'key' + item.args.length + 1,
value: ''
})
},
//过滤器添加事件
filterHandleMenuClick(e) {
if (e.key == 0) {
this.router.filters.push({
args: [ {
key: 'name',
value: 'default'
},{
key: 'fallbackUri',
value: 'forward:/fallback'
}],
name:'Hystrix',
title: this.filterArray[0].name
})
}
if (e.key == 1) {
this.router.filters.push({
args: [ {
key: 'key-resolver',
value: '#{@ipKeyResolver}'
}, {
key: 'redis-rate-limiter.replenishRate',
value: 20
}, {
key: 'redis-rate-limiter.burstCapacity',
value: 20
}],
name:"RequestRateLimiter",
title: this.filterArray[1].name
})
}
},
//输入框确认
handleInputConfirm(item) {
const inputValue = this.inputValue
let tags = item.args
if (inputValue && tags.indexOf(inputValue) === -1) {
item.args = [...tags, inputValue]
}
console.log(tags)
Object.assign(this, {
tags,
inputVisible: false,
inputValue: ''
})
this.currentTagIndex=-1
},
//输入框确认
handleInputEditConfirm(item,tag,index) {
if(this.inputValue)
{
const inputValue = this.inputValue
item.args[index]=inputValue
}
this.currentTagIndex=-1
},
reset() {
this.expandedKeysss = []
this.checkedKeys = []
this.defaultCheckedKeys = []
this.loading = false
},
//关闭弹窗
handleCancel() {
this.close()
},
//提交路由
handleSubmit() {
let { predicates, filters, ...other } = this.router
let router = other
router.predicates = JSON.stringify(this.router.predicates)
router.filters = JSON.stringify(this.router.filters)
postAction(this.url.update, {
router
}).then(res => {
if (res.success) {
this.close()
this.$emit('ok')
this.$message.success(res.message)
} else {
this.$message.error(res.message)
}
})
}
}
}
</script>
<style lang="less" scoped>
.drawer-bootom-button {
position: absolute;
bottom: 0;
width: 100%;
border-top: 1px solid #e8e8e8;
padding: 10px 16px;
text-align: right;
left: 0;
background: #fff;
border-radius: 0 0 2px 2px;
}
</style>

10
ant-design-vue-jeecg/src/views/system/modules/SysPositionModal.vue

@ -16,7 +16,7 @@
:labelCol="labelCol"
:wrapperCol="wrapperCol"
label="职务编码">
<a-input placeholder="请输入职务编码" v-decorator="['code', validatorRules.code]"/>
<a-input placeholder="请输入职务编码" v-decorator="['code', validatorRules.code]" :read-only="readOnly"/>
</a-form-item>
<a-form-item
:labelCol="labelCol"
@ -110,6 +110,7 @@
add: '/sys/position/add',
edit: '/sys/position/edit',
},
readOnly:false
}
},
created() {
@ -122,6 +123,11 @@
this.form.resetFields()
this.model = Object.assign({}, record)
this.visible = true
if(record.id){
this.readOnly=true
}else{
this.readOnly=false
}
this.$nextTick(() => {
this.form.setFieldsValue(pick(this.model,
'code',
@ -177,4 +183,4 @@
<style lang="less" scoped>
</style>
</style>

9
ant-design-vue-jeecg/src/views/system/modules/TenantForm.vue

@ -48,7 +48,7 @@
import pick from 'lodash.pick'
import { validateDuplicateValue } from '@/utils/util'
import JFormContainer from '@/components/jeecg/JFormContainer'
import JDate from '@/components/jeecg/JDate'
import JDate from '@/components/jeecg/JDate'
import JDictSelectTag from "@/components/dict/JDictSelectTag"
export default {
@ -167,13 +167,16 @@
that.$message.success(res.message);
that.$emit('ok');
}else{
if("该编号已存在!" == res.message){
this.model.id=""
}
that.$message.warning(res.message);
}
}).finally(() => {
that.confirmLoading = false;
})
}
})
},
popupCallback(row){
@ -181,4 +184,4 @@
},
}
}
</script>
</script>

2
ant-design-vue-jeecg/src/views/system/modules/UserModal.vue

@ -269,7 +269,7 @@
fileUpload: window._CONFIG['domianURL']+"/sys/common/upload",
userWithDepart: "/sys/user/userDepartList", // 引入为指定用户查看部门信息需要的url
userId:"/sys/user/generateUserId", // 引入生成添加用户情况下的url
syncUserByUserName:"/process/extActProcess/doSyncUserByUserName",//同步用户到工作流
syncUserByUserName:"/act/process/extActProcess/doSyncUserByUserName",//同步用户到工作流
queryTenantList: '/sys/tenant/queryList'
},
identity:"1",

53
ant-design-vue-jeecg/src/views/user/Login.vue

@ -11,7 +11,7 @@
size="large"
v-decorator="['username',validatorRules.username,{ validator: this.handleUsernameOrEmail }]"
type="text"
placeholder="请输入帐户名 / admin">
placeholder="请输入帐户名 / jeecg">
<a-icon slot="prefix" type="user" :style="{ color: 'rgba(0,0,0,.25)' }"/>
</a-input>
</a-form-item>
@ -104,13 +104,6 @@
:disabled="loginBtn">确定
</a-button>
</a-form-item>
<div class="user-login-other">
<span>其他登录方式</span>
<a @click="onThirdLogin('github')" title="github"><a-icon class="item-icon" type="github"></a-icon></a>
<a @click="onThirdLogin('wechat_enterprise')" title="企业微信"><a-icon class="item-icon" type="wechat"></a-icon></a>
<a @click="onThirdLogin('dingtalk')" title="钉钉"><a-icon class="item-icon" type="dingding"></a-icon></a>
</div>
</a-form>
<two-step-captcha
@ -118,7 +111,8 @@
:visible="stepCaptchaVisible"
@success="stepCaptchaSuccess"
@cancel="stepCaptchaCancel"></two-step-captcha>
<login-select-modal ref="loginSelect" @success="loginSelectOk"></login-select-modal>
<login-select-tenant ref="loginSelect" @success="loginSelectOk"></login-select-tenant>
<third-login ref="thirdLogin"></third-login>
</div>
</template>
@ -134,12 +128,13 @@
import { encryption , getEncryptedString } from '@/utils/encryption/aesEncrypt'
import store from '@/store/'
import { USER_INFO } from "@/store/mutation-types"
import LoginSelectModal from './LoginSelectModal.vue'
import ThirdLogin from './third/ThirdLogin'
import LoginSelectTenant from "./LoginSelectTenant";
export default {
components: {
LoginSelectTenant,
TwoStepCaptcha,
LoginSelectModal
ThirdLogin
},
data () {
return {
@ -171,7 +166,7 @@
currentUsername:"",
currdatetime:'',
randCodeImage:'',
requestCodeSuccess:false
requestCodeSuccess:false,
}
},
created () {
@ -184,34 +179,7 @@
// update-end- --- author:scott ------ date:20190805 ---- for:密码加密逻辑暂时注释掉,有点问题
},
methods: {
...mapActions([ "Login", "Logout","PhoneLogin","ThirdLogin" ]),
//第三方登录
onThirdLogin(source){
let url = window._CONFIG['domianURL']+`/thirdLogin/render/${source}`
window.open(url, `login ${source}`, 'height=500, width=500, top=0, left=0, toolbar=no, menubar=no, scrollbars=no, resizable=no,location=n o, status=no')
let that = this;
let receiveMessage = function(event){
var origin = event.origin
console.log("origin",origin);
let token = event.data
//update-begin--Author:wangshuai Date:20200729 for:接口在签名校验失败时返回失败的标识码 #1441--------------------
if (token === '登录失败') {
that.$message.warning(token);
}else{
//update-end--Author:wangshuai Date:20200729 for:接口在签名校验失败时返回失败的标识码 #1441--------------------
console.log("event.data",token)
that.ThirdLogin(token).then(res=>{
if(res.success){
that.loginSuccess()
}else{
that.requestFailed(res);
}
})
}
}
window.addEventListener("message", receiveMessage, false);
},
...mapActions(['Login', 'Logout', 'PhoneLogin']),
// handler
handleUsernameOrEmail (rule, value, callback) {
const regex = /^([a-zA-Z0-9_-])+@([a-zA-Z0-9_-])+((\.[a-zA-Z0-9_-]{2,3}){1,2})$/;
@ -337,9 +305,6 @@
})
},
loginSuccess () {
// update-begin- author:sunjianlei --- date:20190812 --- for: 登录成功后不解除禁用按钮,防止多次点击
// this.loginBtn = false
// update-end- author:sunjianlei --- date:20190812 --- for: 登录成功后不解除禁用按钮,防止多次点击
this.$router.push({ path: "/dashboard/analysis" }).catch(()=>{
console.log('登录跳转首页出错,这个错误从哪里来的')
})

2
ant-design-vue-jeecg/src/views/user/LoginSelectModal.vue → ant-design-vue-jeecg/src/views/user/LoginSelectTenant.vue

@ -56,7 +56,7 @@
import store from './Login'
export default {
name: 'LoginSelectModal',
name: 'LoginSelectTenant',
data(){
return {
visible: false,

0
ant-design-vue-jeecg/src/views/user/Alteration.vue → ant-design-vue-jeecg/src/views/user/alteration/Alteration.vue

2
ant-design-vue-jeecg/src/views/user/Step1.vue → ant-design-vue-jeecg/src/views/user/alteration/Step1.vue

@ -29,7 +29,7 @@
</a-col>
<a-col :span="10" style="text-align: right">
<img v-if="requestCodeSuccess" style="margin-top: 2px;" :src="randCodeImage" @click="handleChangeCheckCode"/>
<img v-else style="margin-top: 2px;" src="../../assets/checkcode.png" @click="handleChangeCheckCode"/>
<img v-else style="margin-top: 2px;" src="../../../assets/checkcode.png" @click="handleChangeCheckCode"/>
</a-col>
</a-row>
<a-form-item :wrapperCol="{span: 19, offset: 5}">

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save