diff --git a/README.md b/README.md index c74143f6ced97ab8ee12fcfae52cdc7592720ec0..348acba8854ff4ebb1eac28bce8b5784ee0e22df 100644 --- a/README.md +++ b/README.md @@ -7,12 +7,12 @@ Jeecg-Boot 快速开发平台(前后端分离版本) =============== -当前最新版本: 2.1.4(发布日期:2020-02-24) +当前最新版本: 2.2.0(发布日期:2020-05-06) [![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-JEECG团队-orange.svg)](http://www.jeecg.com) -[![](https://img.shields.io/badge/version-2.1.4-brightgreen.svg)](https://github.com/zhangdaiscott/jeecg-boot) +[![](https://img.shields.io/badge/version-2.2.0-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) diff --git a/ant-design-vue-jeecg/README.md b/ant-design-vue-jeecg/README.md index 8d056d8467e89f2384d4391b0ab0838b20e3309a..8fc4123a920d966fa5455ff982fca0cbaf6d7cc1 100644 --- a/ant-design-vue-jeecg/README.md +++ b/ant-design-vue-jeecg/README.md @@ -1,7 +1,7 @@ Ant Design Jeecg Vue ==== -当前最新版本: 2.1.4(发布日期:2020-02-24) +当前最新版本: 2.2.0(发布日期:2020-05-06) Overview ---- diff --git a/ant-design-vue-jeecg/idea.config.js b/ant-design-vue-jeecg/idea.config.js index 8318a1253757a6028c794f3c91978f1b15de92e7..4d86bd94a2aca3c8b54fa25e4d8ce128459c40c3 100644 --- a/ant-design-vue-jeecg/idea.config.js +++ b/ant-design-vue-jeecg/idea.config.js @@ -6,19 +6,19 @@ function resolve (dir) { } module.exports = { - context: path.resolve(__dirname, './'), - resolve: { - extensions: ['.js', '.vue', '.json'], - alias: { - 'config': resolve('config'), - '@': resolve('src'), - '@views': resolve('src/views'), - '@comp': resolve('src/components'), - '@core': resolve('src/core'), - '@utils': resolve('src/utils'), - '@entry': resolve('src/entry'), - '@router': resolve('src/router'), - '@store': resolve('src/store') - } - } -} + context: path.resolve(__dirname, './'), + resolve: { + extensions: ['.js', '.vue', '.json'], + alias: { + 'config': resolve('config'), + '@': resolve('src'), + '@views': resolve('src/views'), + '@comp': resolve('src/components'), + '@core': resolve('src/core'), + '@utils': resolve('src/utils'), + '@entry': resolve('src/entry'), + '@router': resolve('src/router'), + '@store': resolve('src/store') + } + }, +} \ No newline at end of file diff --git a/ant-design-vue-jeecg/package.json b/ant-design-vue-jeecg/package.json index 2343568d88cc6afb7c96d5ef7686ba628d986b1c..cce40cc836a726a346407dac6e73e1d56f82ed1f 100644 --- a/ant-design-vue-jeecg/package.json +++ b/ant-design-vue-jeecg/package.json @@ -1,19 +1,19 @@ { "name": "vue-antd-jeecg", - "version": "2.1.4", + "version": "2.2.0", "private": true, "scripts": { - "pre": "cnpm install || yarn --registry https://registry.npm.taobao.org || npm install --registry https://registry.npm.taobao.org ", + "pre": "yarn --registry https://registry.npm.taobao.org || cnpm install || npm install --registry https://registry.npm.taobao.org ", "serve": "vue-cli-service serve", "build": "vue-cli-service build", "lint": "vue-cli-service lint" }, "dependencies": { - "@antv/data-set": "^0.10.2", - "@jeecg/antd-online-214": "^2.1.41", + "@antv/data-set": "^0.11.2", + "@jeecg/antd-online-beta220": "^1.0.1", "@tinymce/tinymce-vue": "^2.0.0", - "ant-design-vue": "^1.4.11", - "apexcharts": "^3.6.5", + "ant-design-vue": "^1.5.2", + "area-data": "^5.0.6", "axios": "^0.18.0", "clipboard": "^2.0.4", "codemirror": "^5.46.0", @@ -25,22 +25,20 @@ "md5": "^2.2.1", "nprogress": "^0.2.0", "tinymce": "^5.1.4", + "tui-editor": "^1.4.10", "viser-vue": "^2.4.4", "vue": "^2.6.10", - "vue-apexcharts": "^1.3.2", - "vue-class-component": "^6.0.0", + "vue-area-linkage": "^5.1.0", "vue-cropper": "^0.4.8", "vue-i18n": "^8.7.0", "vue-loader": "^15.7.0", "vue-ls": "^3.2.0", "vue-photo-preview": "^1.1.3", "vue-print-nb-jeecg": "^1.0.9", - "vue-property-decorator": "^7.3.0", "vue-router": "^3.0.1", "vue-splitpane": "^1.0.4", "vuedraggable": "^2.20.0", - "vuex": "^3.0.1", - "vuex-class": "^0.3.1" + "vuex": "^3.1.0" }, "devDependencies": { "@babel/polyfill": "^7.2.5", @@ -49,9 +47,10 @@ "@vue/cli-service": "^3.3.0", "@vue/eslint-config-standard": "^4.0.0", "babel-eslint": "^10.0.1", + "compression-webpack-plugin": "^3.1.0", "eslint": "^5.16.0", "eslint-plugin-vue": "^5.1.0", - "html-webpack-plugin": "^4.0.0-beta.11", + "html-webpack-plugin": "^4.2.0", "less": "^3.9.0", "less-loader": "^4.1.0", "vue-template-compiler": "^2.6.10" @@ -91,7 +90,7 @@ "vue/no-use-v-if-with-v-for": 0, "vue/html-closing-bracket-newline": 0, "vue/no-parsing-error": 0, - "no-console": 0, + "no-console": 0, "no-tabs": 0, "indent": [1, 4] } diff --git a/ant-design-vue-jeecg/public/color.less b/ant-design-vue-jeecg/public/color.less index f41d377dfc43d7cb3c9947c50ee505822d502af2..5629777532624ca03f4a472782c35ef462e714b9 100644 --- a/ant-design-vue-jeecg/public/color.less +++ b/ant-design-vue-jeecg/public/color.less @@ -7679,3 +7679,23 @@ font.medium { font.weak { color: #f5222d; } + + +// begin -------- JAreaLinkage 三级联动样式 -------------- +.cascader-menu-list .cascader-menu-option.hover, +.cascader-menu-list .cascader-menu-option:hover { + background-color: color(~`colorPalette("@{primary-color}", 1)`); +} + +.area-selectable-list .area-select-option.hover { + background-color: color(~`colorPalette("@{primary-color}", 1)`); +} + +.area-select:hover { + border-color: @primary-color; +} + +.area-select:active { + box-shadow: 0 0 0 2px color(~`colorPalette("@{primary-color}", 1)`); +} +// end -------- JAreaLinkage 三级联动样式 -------------- \ No newline at end of file diff --git a/ant-design-vue-jeecg/src/api/GroupRequest.js b/ant-design-vue-jeecg/src/api/GroupRequest.js new file mode 100644 index 0000000000000000000000000000000000000000..26881387a8a40d3236cacf537cd8a2aa60fcfe3a --- /dev/null +++ b/ant-design-vue-jeecg/src/api/GroupRequest.js @@ -0,0 +1,30 @@ +import Vue from 'vue' + +/** + * 将一个请求分组 + * + * @param getPromise 传入一个可以获取到Promise对象的方法 + * @param groupId 分组ID,如果不传或者为空则不分组 + * @param expire 过期时间,默认 半分钟 + */ +export function httpGroupRequest(getPromise, groupId, expire = 1000 * 30) { + if (groupId == null || groupId === '') { + console.log("--------popup----------getFrom DB-------with---no--groupId ") + return getPromise() + } + + if (Vue.ls.get(groupId)) { + console.log("---------popup--------getFrom Cache--------groupId = " + groupId) + return Promise.resolve(Vue.ls.get(groupId)); + } else { + console.log("--------popup----------getFrom DB---------groupId = " + groupId) + } + + // 还没有发出请求,就发出第一次的请求 + return getPromise().then(res => { + Vue.ls.set(groupId, res, expire); + return Promise.resolve(res); + }) +} + + diff --git a/ant-design-vue-jeecg/src/api/api.js b/ant-design-vue-jeecg/src/api/api.js index 856944a0a9c4980798cb87542ca6b082fa33acde..5ddf350548b113717c7eeb519964699add6a662a 100644 --- a/ant-design-vue-jeecg/src/api/api.js +++ b/ant-design-vue-jeecg/src/api/api.js @@ -1,16 +1,11 @@ -import { getAction,deleteAction,putAction,postAction} from '@/api/manage' +import { getAction, deleteAction, putAction, postAction, httpAction } from '@/api/manage' +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); @@ -19,8 +14,6 @@ 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); @@ -31,20 +24,15 @@ 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 loadAllRoleIds = (params)=>getAction("/sys/permission/loadAllRoleIds",params); const getPermissionRuleList = (params)=>getAction("/sys/permission/getPermRuleListByPermId",params); @@ -66,24 +54,26 @@ 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); +//从缓存中获取字典配置 +function getDictItemsFromCache(dictCode) { + if (Vue.ls.get(UI_CACHE_DB_DICT_DATA) && Vue.ls.get(UI_CACHE_DB_DICT_DATA)[dictCode]) { + let dictItems = Vue.ls.get(UI_CACHE_DB_DICT_DATA)[dictCode]; + console.log("-----------getDictItemsFromCache----------dictCode="+dictCode+"---- dictItems=",dictItems) + return dictItems; + } +} //系统通告 const doReleaseData = (params)=>getAction("/sys/annountCement/doReleaseData",params); @@ -91,23 +81,18 @@ 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); // 加载分类字典 const loadCategoryData = (params)=>getAction("/sys/category/loadAllData",params); const checkRuleByCode = (params) => getAction('/sys/checkRule/checkByCode', params) +//我的通告 +const getUserNoticeInfo= (params)=>getAction("/sys/sysAnnouncementSend/getMyAnnouncementSend",params); export { - // imgView, - // doMian, addRole, editRole, checkRoleCode, @@ -147,7 +132,6 @@ export { getLoginfo, getVisitInfo, queryUserByDepId, - queryUserRoleMap, duplicateCheck, queryTreeListForRole, getSystemMenuList, @@ -160,7 +144,9 @@ export { queryTreeListForDeptRole, queryDeptRolePermission, saveDeptRolePermission, - queryMyDepartTreeList + queryMyDepartTreeList, + getUserNoticeInfo, + getDictItemsFromCache } diff --git a/ant-design-vue-jeecg/src/api/login.js b/ant-design-vue-jeecg/src/api/login.js index 40d69369bbddfed992f64fad6e03313e82c53e94..87ecc5a58897ffc49ed8f536f9e0f8b60f5d2a14 100644 --- a/ant-design-vue-jeecg/src/api/login.js +++ b/ant-design-vue-jeecg/src/api/login.js @@ -55,4 +55,19 @@ export function logout(logoutToken) { 'X-Access-Token': logoutToken } }) +} + +/** + * 第三方登录 + * @param token + * @returns {*} + */ +export function thirdLogin(token) { + return axios({ + url: `/thirdLogin/getLoginUser/${token}`, + method: 'get', + headers: { + 'Content-Type': 'application/json;charset=UTF-8' + } + }) } \ No newline at end of file diff --git a/ant-design-vue-jeecg/src/api/manage.js b/ant-design-vue-jeecg/src/api/manage.js index 2af3b87622c06115ed937a2f3a98ac6ac101d7e6..076cbc9f6881b18c769e6d8cbb49a3aa198c9145 100644 --- a/ant-design-vue-jeecg/src/api/manage.js +++ b/ant-design-vue-jeecg/src/api/manage.js @@ -1,3 +1,4 @@ +import Vue from 'vue' import { axios } from '@/utils/request' const api = { @@ -113,16 +114,64 @@ export function downFile(url,parameter){ } /** - * 获取文件访问路径 + * 下载文件 + * @param url 文件路径 + * @param fileName 文件名 + * @param parameter + * @returns {*} + */ +export function downloadFile(url, fileName, parameter) { + return downFile(url, parameter).then((data) => { + if (!data || data.size === 0) { + Vue.prototype['$message'].warning('文件下载失败') + return + } + if (typeof window.navigator.msSaveBlob !== 'undefined') { + window.navigator.msSaveBlob(new Blob([data]), fileName) + } else { + let url = window.URL.createObjectURL(new Blob([data])) + let link = document.createElement('a') + link.style.display = 'none' + link.href = url + link.setAttribute('download', fileName) + document.body.appendChild(link) + link.click() + document.body.removeChild(link) //下载完成移除元素 + window.URL.revokeObjectURL(url) //释放掉blob对象 + } + }) +} + +/** + * 文件上传 用于富文本上传图片 + * @param url + * @param parameter + * @returns {*} + */ +export function uploadAction(url,parameter){ + return axios({ + url: url, + data: parameter, + method:'post' , + headers: { + 'Content-Type': 'multipart/form-data', // 文件上传 + }, + }) +} + +/** + * 获取文件服务访问路径 * @param avatar - * @param imgerver - * @param str + * @param subStr * @returns {*} */ -export function getFileAccessHttpUrl(avatar,imgerver,subStr) { - if(avatar && avatar.indexOf(subStr) != -1 ){ +export function getFileAccessHttpUrl(avatar,subStr) { + if(!subStr) subStr = 'http' + if(avatar && avatar.startsWith(subStr)){ return avatar; }else{ - return imgerver + "/" + avatar; + if(avatar && avatar.length>0 && avatar.indexOf('[')==-1){ + return window._CONFIG['staticDomainURL'] + "/" + avatar; + } } } diff --git a/ant-design-vue-jeecg/src/assets/less/JAreaLinkage.less b/ant-design-vue-jeecg/src/assets/less/JAreaLinkage.less new file mode 100644 index 0000000000000000000000000000000000000000..d367073b0682795badbb11af8fd12106e6fd024c --- /dev/null +++ b/ant-design-vue-jeecg/src/assets/less/JAreaLinkage.less @@ -0,0 +1,259 @@ +.area-zoom-in-top-enter-active, +.area-zoom-in-top-leave-active { + opacity: 1; + transform: scaleY(1); +} + +.area-zoom-in-top-enter, +.area-zoom-in-top-leave-active { + opacity: 0; + transform: scaleY(0); +} + +.area-select { + box-sizing: border-box; + margin: 0; + padding: 0; + color: rgba(0, 0, 0, 0.65); + font-size: 14px; + font-variant: tabular-nums; + line-height: 1.5; + list-style: none; + font-feature-settings: 'tnum'; + position: relative; + outline: 0; + display: block; + background-color: #fff; + border: 1px solid #d9d9d9; + border-top-width: 1.02px; + border-radius: 4px; + outline: none; + transition: all 0.3s cubic-bezier(0.645, 0.045, 0.355, 1); + -webkit-user-select: none; + -ms-user-select: none; + user-select: none; +} + +.area-select-wrap .area-select { + display: inline-block; +} + +.area-select * { + box-sizing: border-box; +} + +.area-select:hover { + border-color: #40a9ff; + border-right-width: 1px !important; + outline: 0; +} + + +.area-select:active { + box-shadow: 0 0 0 2px rgba(24, 144, 255, 0.2); +} + +.area-select.small { + width: 126px; +} + +.area-select.medium { + width: 160px; +} + +.area-select.large { + width: 194px; +} + +.area-select.is-disabled { + background: #eceff5; + cursor: not-allowed; +} + +.area-select.is-disabled:hover { + border-color: #e1e2e6; +} + +.area-select.is-disabled .area-selected-trigger { + cursor: not-allowed; +} + +.area-select .area-selected-trigger { + position: relative; + display: block; + font-size: 14px; + cursor: pointer; + margin: 0; + overflow: hidden; + white-space: nowrap; + text-overflow: ellipsis; + height: 100%; + padding: 8px 20px 7px 12px; +} + +.area-select .area-select-icon { + position: absolute; + top: 50%; + margin-top: -2px; + right: 6px; + content: ""; + width: 0; + height: 0; + border: 6px solid transparent; + border-top-color: rgba(0, 0, 0, 0.25); + transition: all .3s linear; + transform-origin: center; +} + +.area-select .area-select-icon.active { + margin-top: -8px; + transform: rotate(180deg); +} + +.area-selectable-list-wrap { + position: absolute; + width: 100%; + max-height: 275px; + z-index: 15000; + background-color: #fff; + box-sizing: border-box; + overflow-x: auto; + margin: 2px 0; + border-radius: 4px; + outline: none; + box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15); + + transition: opacity 0.15s, transform 0.3s !important; + transform-origin: center top !important; +} + +.area-selectable-list { + position: relative; + margin: 0; + padding: 6px 0; + width: 100%; + font-size: 14px; + color: #565656; + list-style: none; +} + +.area-selectable-list .area-select-option { + position: relative; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; + cursor: pointer; + padding: 0 15px 0 10px; + height: 32px; + line-height: 32px; +} + +.area-selectable-list .area-select-option.hover { + background-color: #e6f7ff; +} + +.area-selectable-list .area-select-option.selected { + color: rgba(0, 0, 0, 0.65); + font-weight: 600; + background-color: #efefef; +} + +.cascader-menu-list-wrap { + position: absolute; + white-space: nowrap; + z-index: 15000; + background-color: #fff; + box-sizing: border-box; + overflow: hidden; + font-size: 0; + margin: 2px 0; + border-radius: 4px; + outline: none; + box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15); + + transition: opacity 0.15s, transform 0.3s !important; + transform-origin: center top !important; +} + +.cascader-menu-list { + position: relative; + margin: 0; + font-size: 14px; + color: #565656; + padding: 6px 0; + list-style: none; + display: inline-block; + height: 204px; + overflow-x: hidden; + overflow-y: auto; + min-width: 160px; + vertical-align: top; + background-color: #fff; + border-right: 1px solid #e4e7ed; +} + +.cascader-menu-list:last-child { + border-right: none; +} + +.cascader-menu-list .cascader-menu-option { + position: relative; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; + cursor: pointer; + padding: 0 15px 0 10px; + height: 32px; + line-height: 32px; +} + +.cascader-menu-list .cascader-menu-option.hover, +.cascader-menu-list .cascader-menu-option:hover { + background-color: #e6f7ff; +} + +.cascader-menu-list .cascader-menu-option.selected { + color: rgba(0, 0, 0, 0.65); + font-weight: 600; + background-color: #efefef; +} + +.cascader-menu-list .cascader-menu-option.cascader-menu-extensible:after { + position: absolute; + top: 50%; + margin-top: -4px; + right: 5px; + content: ""; + width: 0; + height: 0; + border: 4px solid transparent; + border-left-color: #a1a4ad; +} + +.cascader-menu-list::-webkit-scrollbar, +.area-selectable-list-wrap::-webkit-scrollbar { + width: 8px; + background: transparent; +} + +.area-selectable-list-wrap::-webkit-scrollbar-button:vertical:decremen, +.area-selectable-list-wrap::-webkit-scrollbar-button:vertical:end:decrement, +.area-selectable-list-wrap::-webkit-scrollbar-button:vertical:increment, +.area-selectable-list-wrap::-webkit-scrollbar-button:vertical:start:increment, +.cascader-menu-list::-webkit-scrollbar-button:vertical:decremen, +.cascader-menu-list::-webkit-scrollbar-button:vertical:end:decrement, +.cascader-menu-list::-webkit-scrollbar-button:vertical:increment, +.cascader-menu-list::-webkit-scrollbar-button:vertical:start:increment { + display: none; +} + +.cascader-menu-list::-webkit-scrollbar-thumb:vertical, +.area-selectable-list-wrap::-webkit-scrollbar-thumb:vertical { + background-color: #b8b8b8; + border-radius: 4px; +} + +.cascader-menu-list::-webkit-scrollbar-thumb:vertical:hover, +.area-selectable-list-wrap::-webkit-scrollbar-thumb:vertical:hover { + background-color: #777; +} \ No newline at end of file diff --git a/ant-design-vue-jeecg/src/assets/less/TableExpand.less b/ant-design-vue-jeecg/src/assets/less/TableExpand.less new file mode 100644 index 0000000000000000000000000000000000000000..5616c9836a3a56f9a4117f6b1bf88e21dffe3370 --- /dev/null +++ b/ant-design-vue-jeecg/src/assets/less/TableExpand.less @@ -0,0 +1,15 @@ +/** [表格主题样式一] 表格强制列不换行 */ +.j-table-force-nowrap { + td, th { + white-space: nowrap; + } + + .ant-table-selection-column { + padding: 12px 22px !important; + } + + /** 列自适应,弊端会导致列宽失效 */ + &.ant-table-wrapper .ant-table-content { + overflow-x: auto; + } +} diff --git a/ant-design-vue-jeecg/src/assets/less/common.less b/ant-design-vue-jeecg/src/assets/less/common.less index f57caa56723851b09c89ddb6f32518039b09bc12..5eadd39d5457c456f68e42462caa2d134589540a 100644 --- a/ant-design-vue-jeecg/src/assets/less/common.less +++ b/ant-design-vue-jeecg/src/assets/less/common.less @@ -1,11 +1,18 @@ /*列表上方操作按钮区域*/ .ant-card-body .table-operator { - margin-bottom: 18px; + margin-bottom: 8px; } /** Button按钮间距 */ .table-operator .ant-btn { - margin: 8px 8px 0 0; + margin: 0 8px 8px 0; +} +.table-operator .ant-btn-group .ant-btn { + margin: 0; +} + +.table-operator .ant-btn-group .ant-btn:last-child { + margin: 0 8px 8px 0; } /*列表td的padding设置 可以控制列表大小*/ .ant-table-tbody .ant-table-row td { @@ -45,3 +52,7 @@ /*erp风格子表外框padding设置*/ .ant-card-wider-padding.cust-erp-sub-tab>.ant-card-body{padding:5px 12px} +/* 内嵌子表背景颜色 */ +.j-inner-table-wrapper /deep/ .ant-table-expanded-row .ant-table-wrapper .ant-table-tbody .ant-table-row { + background-color: #FFFFFF; +} \ No newline at end of file diff --git a/ant-design-vue-jeecg/src/cas/sso.js b/ant-design-vue-jeecg/src/cas/sso.js index dc230defbd5af1264ab89db48f1c04d08c3b65ff..61e176d791659b01143aff4421cb2c0cfdb22a33 100644 --- a/ant-design-vue-jeecg/src/cas/sso.js +++ b/ant-design-vue-jeecg/src/cas/sso.js @@ -8,14 +8,14 @@ const init = (callback) => { console.log("-------单点登录开始-------"); let token = Vue.ls.get(ACCESS_TOKEN); let st = getUrlParam("ticket"); - var sevice = "http://"+window.location.host+"/"; + let sevice = "http://"+window.location.host+"/"; if(token){ loginSuccess(callback); }else{ if(st){ validateSt(st,sevice,callback); }else{ - var serviceUrl = encodeURIComponent(sevice); + let serviceUrl = encodeURIComponent(sevice); window.location.href = window._CONFIG['casPrefixUrl']+"/login?service="+serviceUrl; } } @@ -26,14 +26,14 @@ const SSO = { }; function getUrlParam(paraName) { - var url = document.location.toString(); - var arrObj = url.split("?"); + let url = document.location.toString(); + let arrObj = url.split("?"); if (arrObj.length > 1) { - var arrPara = arrObj[1].split("&"); - var arr; + let arrPara = arrObj[1].split("&"); + let arr; - for (var i = 0; i < arrPara.length; i++) { + for (let i = 0; i < arrPara.length; i++) { arr = arrPara[i].split("="); if (arr != null && arr[0] == paraName) { @@ -57,8 +57,8 @@ function validateSt(ticket,service,callback){ if(res.success){ loginSuccess(callback); }else{ - var sevice = "http://"+window.location.host+"/"; - var serviceUrl = encodeURIComponent(sevice); + let sevice = "http://"+window.location.host+"/"; + let serviceUrl = encodeURIComponent(sevice); window.location.href = window._CONFIG['casPrefixUrl']+"/login?service="+serviceUrl; } }).catch((err) => { diff --git a/ant-design-vue-jeecg/src/components/Ellipsis/Ellipsis.vue b/ant-design-vue-jeecg/src/components/Ellipsis/Ellipsis.vue index 5fb14c2bb69b99136b96c5790972da1e38455a69..0001a3b21655eb143dc3d9bd813e41afc2c28e0d 100644 --- a/ant-design-vue-jeecg/src/components/Ellipsis/Ellipsis.vue +++ b/ant-design-vue-jeecg/src/components/Ellipsis/Ellipsis.vue @@ -1,31 +1,20 @@ \ No newline at end of file diff --git a/ant-design-vue-jeecg/src/components/_util/Area.js b/ant-design-vue-jeecg/src/components/_util/Area.js new file mode 100644 index 0000000000000000000000000000000000000000..89cba1fbb7a9bd492e9803d0ca318b334291df34 --- /dev/null +++ b/ant-design-vue-jeecg/src/components/_util/Area.js @@ -0,0 +1,79 @@ +import { pcaa } from 'area-data' + +/** + * 省市区 + */ +export default class Area { + /** + * 构造器 + * @param express + */ + constructor() { + let arr = [] + const province = pcaa['86'] + Object.keys(province).map(key=>{ + arr.push({id:key, text:province[key], pid:'86'}); + const city = pcaa[key]; + Object.keys(city).map(key2=>{ + arr.push({id:key2, text:city[key2], pid:key}); + const qu = pcaa[key2]; + Object.keys(qu).map(key3=>{ + arr.push({id:key3, text:qu[key3], pid:key2}); + }) + }) + }) + this.all = arr; + } + + get pca(){ + return this.all; + } + + getCode(text){ + if(!text || text.length==0){ + return '' + } + for(let item of this.all){ + if(item.text === text){ + return item.id; + } + } + } + + getText(code){ + if(!code || code.length==0){ + return '' + } + let arr = [] + this.getAreaBycode(code,arr); + return arr.join('/') + } + + getRealCode(code){ + let arr = [] + this.getPcode(code, arr) + return arr; + } + + getPcode(id, arr){ + for(let item of this.all){ + if(item.id === id){ + arr.unshift(id) + if(item.pid != '86'){ + this.getPcode(item.pid,arr) + } + } + } + } + + getAreaBycode(code,arr){ + //console.log("this.all.length",this.all) + for(let item of this.all){ + if(item.id === code){ + arr.unshift(item.text); + this.getAreaBycode(item.pid,arr) + } + } + } + +} \ No newline at end of file diff --git a/ant-design-vue-jeecg/src/components/chart/StackBar.vue b/ant-design-vue-jeecg/src/components/chart/StackBar.vue new file mode 100644 index 0000000000000000000000000000000000000000..01b566f5ee7f164a618abc3e031f2665473a0fa9 --- /dev/null +++ b/ant-design-vue-jeecg/src/components/chart/StackBar.vue @@ -0,0 +1,54 @@ + + + \ No newline at end of file diff --git a/ant-design-vue-jeecg/src/components/dict/JDictSelectTag.vue b/ant-design-vue-jeecg/src/components/dict/JDictSelectTag.vue index 2d676bd6f2e526695b48266a5f264d5408e8454c..76d33c30f4885c5e2bb2aa2b8c062a763cc445cf 100644 --- a/ant-design-vue-jeecg/src/components/dict/JDictSelectTag.vue +++ b/ant-design-vue-jeecg/src/components/dict/JDictSelectTag.vue @@ -3,6 +3,10 @@ {{ item.text }} + + {{ item.text }} + + 请选择 @@ -14,7 +18,7 @@ + + \ No newline at end of file diff --git a/ant-design-vue-jeecg/src/components/jeecg/JCategorySelect.vue b/ant-design-vue-jeecg/src/components/jeecg/JCategorySelect.vue index 19a7e78db8e69bd4cdb591ae638c865df3832d53..53cf6e614225d627386f3756b95fc5d913c48064 100644 --- a/ant-design-vue-jeecg/src/components/jeecg/JCategorySelect.vue +++ b/ant-design-vue-jeecg/src/components/jeecg/JCategorySelect.vue @@ -96,7 +96,7 @@ loadRoot(){ let param = { pid:this.pid, - pcode:this.pcode, + pcode:!this.pcode?'0':this.pcode, condition:this.condition } getAction(this.url,param).then(res=>{ @@ -122,8 +122,6 @@ this.treeValue = [] }else{ getAction(this.view,{ids:this.value}).then(res=>{ - console.log(124345) - console.log(124345,res) if(res.success){ let values = this.value.split(',') this.treeValue = res.result.map((item, index) => ({ diff --git a/ant-design-vue-jeecg/src/components/jeecg/JCodeEditor.vue b/ant-design-vue-jeecg/src/components/jeecg/JCodeEditor.vue index ff2b5a4cefb95584072ac6a738bcbfc9e19b5897..196c2a9b00934c95a19d99c666d69a8038892388 100644 --- a/ant-design-vue-jeecg/src/components/jeecg/JCodeEditor.vue +++ b/ant-design-vue-jeecg/src/components/jeecg/JCodeEditor.vue @@ -1,6 +1,6 @@ diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/resources/jeecg/code-template-online/default/tree/java/${bussiPackage}/${entityPackage}/vue/modules/${entityName}Modal.vuei b/jeecg-boot/jeecg-boot-module-system/src/main/resources/jeecg/code-template-online/default/tree/java/${bussiPackage}/${entityPackage}/vue/modules/${entityName}Modal.vuei index d64171eb346d1d68b46e5736b381fe7e5416afe8..99fc658db5dccaecf21ca68eacd53c39c816526b 100644 --- a/jeecg-boot/jeecg-boot-module-system/src/main/resources/jeecg/code-template-online/default/tree/java/${bussiPackage}/${entityPackage}/vue/modules/${entityName}Modal.vuei +++ b/jeecg-boot/jeecg-boot-module-system/src/main/resources/jeecg/code-template-online/default/tree/java/${bussiPackage}/${entityPackage}/vue/modules/${entityName}Modal.vuei @@ -1,9 +1,11 @@ +<#include "/common/utils.ftl"> + \ No newline at end of file diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/resources/jeecg/code-template-online/inner-table/onetomany/java/${bussiPackage}/${entityPackage}/vue/modules/${entityName}Modal.vuei b/jeecg-boot/jeecg-boot-module-system/src/main/resources/jeecg/code-template-online/inner-table/onetomany/java/${bussiPackage}/${entityPackage}/vue/modules/${entityName}Modal.vuei new file mode 100644 index 0000000000000000000000000000000000000000..3d6162ceaaa9c79476c4cf133060f7044bcd2306 --- /dev/null +++ b/jeecg-boot/jeecg-boot-module-system/src/main/resources/jeecg/code-template-online/inner-table/onetomany/java/${bussiPackage}/${entityPackage}/vue/modules/${entityName}Modal.vuei @@ -0,0 +1,436 @@ +<#include "/common/utils.ftl"> + + + + + \ No newline at end of file diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/resources/jeecg/code-template-online/inner-table/onetomany/java/${bussiPackage}/${entityPackage}/vue/modules/[1-n]Form.vuei b/jeecg-boot/jeecg-boot-module-system/src/main/resources/jeecg/code-template-online/inner-table/onetomany/java/${bussiPackage}/${entityPackage}/vue/modules/[1-n]Form.vuei new file mode 100644 index 0000000000000000000000000000000000000000..85a918d4cca6a7e0ed7e985c4aa3ef0cfdb2ed1e --- /dev/null +++ b/jeecg-boot/jeecg-boot-module-system/src/main/resources/jeecg/code-template-online/inner-table/onetomany/java/${bussiPackage}/${entityPackage}/vue/modules/[1-n]Form.vuei @@ -0,0 +1,213 @@ +<#include "/common/utils.ftl"> +<#list subTables as sub> +<#if sub.foreignRelationType=='1'> +#segment#${sub.entityName}Form.vue + + + + diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/resources/jeecg/code-template-online/inner-table/onetomany/java/${bussiPackage}/${entityPackage}/vue/subTables/[1-n]SubTable.vuei b/jeecg-boot/jeecg-boot-module-system/src/main/resources/jeecg/code-template-online/inner-table/onetomany/java/${bussiPackage}/${entityPackage}/vue/subTables/[1-n]SubTable.vuei new file mode 100644 index 0000000000000000000000000000000000000000..98bbfa75638eeb0bd672a6c05bf3182b41c4e3e6 --- /dev/null +++ b/jeecg-boot/jeecg-boot-module-system/src/main/resources/jeecg/code-template-online/inner-table/onetomany/java/${bussiPackage}/${entityPackage}/vue/subTables/[1-n]SubTable.vuei @@ -0,0 +1,139 @@ +<#--noinspection JSDuplicatedDeclaration--> +<#list subTables as sub> +#segment#${sub.entityName}SubTable.vue + + + + + + \ No newline at end of file diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/resources/jeecg/code-template/one/java/${bussiPackage}/${entityPackage}/vue/${entityName}List.vuei b/jeecg-boot/jeecg-boot-module-system/src/main/resources/jeecg/code-template/one/java/${bussiPackage}/${entityPackage}/vue/${entityName}List.vuei index 7260adc3d2f024d372c619d0695f1628987040bc..23e31224f2ce4201eddf85b7e1d76bb0c08e3d64 100644 --- a/jeecg-boot/jeecg-boot-module-system/src/main/resources/jeecg/code-template/one/java/${bussiPackage}/${entityPackage}/vue/${entityName}List.vuei +++ b/jeecg-boot/jeecg-boot-module-system/src/main/resources/jeecg/code-template/one/java/${bussiPackage}/${entityPackage}/vue/${entityName}List.vuei @@ -78,6 +78,7 @@ :dataSource="dataSource" :pagination="ipagination" :loading="loading" + class="j-table-force-nowrap" :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}" @change="handleTableChange"> @@ -107,6 +108,7 @@ \ No newline at end of file diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/resources/jeecg/code-template/one/java/${bussiPackage}/${entityPackage}/vue/modules/${entityName}Modal.vuei b/jeecg-boot/jeecg-boot-module-system/src/main/resources/jeecg/code-template/one/java/${bussiPackage}/${entityPackage}/vue/modules/${entityName}Modal.vuei index dc5666423ed7473542049a0f45e51533991c1b92..5a0d0c441f7a553e74f9419a25d0bc78ac7bf1d6 100644 --- a/jeecg-boot/jeecg-boot-module-system/src/main/resources/jeecg/code-template/one/java/${bussiPackage}/${entityPackage}/vue/modules/${entityName}Modal.vuei +++ b/jeecg-boot/jeecg-boot-module-system/src/main/resources/jeecg/code-template/one/java/${bussiPackage}/${entityPackage}/vue/modules/${entityName}Modal.vuei @@ -1,9 +1,10 @@ \ No newline at end of file diff --git a/jeecg-boot/jeecg-boot-module-system/src/main/resources/jeecg/code-template/one2/java/${bussiPackage}/vue/${entityPackage}/modules/${entityName}Modal.vuei b/jeecg-boot/jeecg-boot-module-system/src/main/resources/jeecg/code-template/one2/java/${bussiPackage}/vue/${entityPackage}/modules/${entityName}Modal.vuei index d7ea43d78bf15a52ab3e522abefd0c1c71c77b80..ff934f13ee649c864250737afa644f97539da68e 100644 --- a/jeecg-boot/jeecg-boot-module-system/src/main/resources/jeecg/code-template/one2/java/${bussiPackage}/vue/${entityPackage}/modules/${entityName}Modal.vuei +++ b/jeecg-boot/jeecg-boot-module-system/src/main/resources/jeecg/code-template/one2/java/${bussiPackage}/vue/${entityPackage}/modules/${entityName}Modal.vuei @@ -1,9 +1,10 @@ + + \ No newline at end of file diff --git a/jeecg-boot/pom.xml b/jeecg-boot/pom.xml index a0ef2e0615fdee97349dd9453005e476f3d7eb34..d59c1b83a682854a7612495c8f3d21c0d005352b 100644 --- a/jeecg-boot/pom.xml +++ b/jeecg-boot/pom.xml @@ -2,7 +2,7 @@ 4.0.0 org.jeecgframework.boot jeecg-boot-parent - 2.1.4 + 2.2.0 pom @@ -16,7 +16,7 @@ jeecg-boot-base-common jeecg-boot-module-system - + @@ -51,7 +51,7 @@ - 2.1.4 + 2.2.0 1.8 UTF-8 UTF-8 @@ -174,6 +174,21 @@ 42.2.6 runtime + + org.hibernate + hibernate-re + 2.1.5 + + + org.hibernate + hibernate-core + + + commons-collections + commons-collections + + + @@ -204,31 +219,32 @@ org.apache.shiro shiro-core - - - - - org.hibernate - hibernate-re - 2.1.4 - - - org.hibernate - hibernate-core - - commons-collections - commons-collections + guava + com.google.guava - - + io.springfox springfox-swagger2 2.9.2 + + + swagger-annotations + io.swagger + + + swagger-models + io.swagger + + + guava + com.google.guava + + io.springfox @@ -244,6 +260,12 @@ io.springfox springfox-bean-validators 2.9.2 + + + guava + com.google.guava + + @@ -273,14 +295,14 @@ org.jeecgframework.boot codegenerate - 1.1.0 + 1.2.0 org.jeecgframework autopoi-web - 1.0.5 + 1.1.1 commons-codec @@ -300,6 +322,16 @@ io.minio minio 4.0.0 + + + guava + com.google.guava + + + jsr305 + com.google.code.findbugs + + com.google.guava @@ -313,18 +345,6 @@ aliyun-java-sdk-dysmsapi ${aliyun-java-sdk-dysmsapi.version} - - com.aliyun - aliyun-java-sdk-core - ${aliyun-java-sdk-core.version} - - - - - org.apache.httpcomponents - httpclient - 4.5.3 - @@ -332,18 +352,6 @@ spring-boot-starter-websocket - - - org.springframework.boot - spring-boot-starter-jdbc - - - commons-dbcp - commons-dbcp - 1.4 - compile - - com.aliyun.oss @@ -351,6 +359,19 @@ ${aliyun.oss.version} + + + com.xkcoding.justauth + justauth-spring-boot-starter + 1.3.2 + + + fastjson + com.alibaba + + + + @@ -359,7 +380,7 @@ org.jeecgframework.boot jeecg-boot-base-common - ${jeecgboot.common.version} + ${jeecgboot.version}