diff --git a/ant-design-vue-jeecg/README.md b/ant-design-vue-jeecg/README.md
index 5aeec105f..1e1c0b53c 100644
--- a/ant-design-vue-jeecg/README.md
+++ b/ant-design-vue-jeecg/README.md
@@ -1,7 +1,7 @@
Ant Design Jeecg Vue
====
-当前最新版本: 2.4.5(发布日期:20210607)
+当前最新版本: 2.4.6(发布日期:20210816)
Overview
----
diff --git a/ant-design-vue-jeecg/package.json b/ant-design-vue-jeecg/package.json
index 60c98ce17..e085eeeb9 100644
--- a/ant-design-vue-jeecg/package.json
+++ b/ant-design-vue-jeecg/package.json
@@ -1,6 +1,6 @@
{
"name": "vue-antd-jeecg",
- "version": "2.4.5",
+ "version": "2.4.6",
"private": true,
"scripts": {
"pre": "cnpm install || yarn --registry https://registry.npm.taobao.org || npm install --registry https://registry.npm.taobao.org ",
@@ -11,7 +11,7 @@
},
"dependencies": {
"ant-design-vue": "^1.7.2",
- "@jeecg/antd-online-mini": "2.4.5-RC",
+ "@jeecg/antd-online-mini": "2.4.6-beta",
"@antv/data-set": "^0.11.4",
"viser-vue": "^2.4.8",
"axios": "^0.18.0",
@@ -39,7 +39,7 @@
"tinymce": "^5.3.2",
"@toast-ui/editor": "^2.1.2",
"vue-area-linkage": "^5.1.0",
- "area-data": "^5.0.6",
+ "china-area-data": "^5.0.1",
"dom-align": "1.12.0",
"xe-utils": "2.4.8",
"vxe-table": "2.9.13",
diff --git a/ant-design-vue-jeecg/src/components/JVxeCells/JVxeFileCell.vue b/ant-design-vue-jeecg/src/components/JVxeCells/JVxeFileCell.vue
index 3171f15c7..273291c91 100644
--- a/ant-design-vue-jeecg/src/components/JVxeCells/JVxeFileCell.vue
+++ b/ant-design-vue-jeecg/src/components/JVxeCells/JVxeFileCell.vue
@@ -12,9 +12,9 @@
{{ ellipsisFileName }}
-
-
- {{ ellipsisFileName }}
+
+
+ {{ ellipsisFileName }}
@@ -179,8 +179,19 @@
value['responseName'] = file.response[this.responseName]
}
if (file.status === 'done') {
- value['path'] = file.response[this.responseName]
- this.handleChangeCommon(value)
+ if (typeof file.response.success === 'boolean') {
+ if (file.response.success) {
+ value['path'] = file.response[this.responseName]
+ this.handleChangeCommon(value)
+ } else {
+ value['status'] = 'error'
+ value['message'] = file.response.message || '未知错误'
+ }
+ } else {
+ // 考虑到如果设置action上传路径为非jeecg-boot后台,可能不会返回 success 属性的情况,就默认为成功
+ value['path'] = file.response[this.responseName]
+ this.handleChangeCommon(value)
+ }
} else if (file.status === 'error') {
value['message'] = file.response.message || '未知错误'
}
diff --git a/ant-design-vue-jeecg/src/components/JVxeCells/JVxeImageCell.vue b/ant-design-vue-jeecg/src/components/JVxeCells/JVxeImageCell.vue
index b59960ab0..40da9b124 100644
--- a/ant-design-vue-jeecg/src/components/JVxeCells/JVxeImageCell.vue
+++ b/ant-design-vue-jeecg/src/components/JVxeCells/JVxeImageCell.vue
@@ -10,20 +10,9 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
@@ -196,8 +185,19 @@
value['responseName'] = file.response[this.responseName]
}
if (file.status === 'done') {
- value['path'] = file.response[this.responseName]
- this.handleChangeCommon(value)
+ if (typeof file.response.success === 'boolean') {
+ if (file.response.success) {
+ value['path'] = file.response[this.responseName]
+ this.handleChangeCommon(value)
+ } else {
+ value['status'] = 'error'
+ value['message'] = file.response.message || '未知错误'
+ }
+ } else {
+ // 考虑到如果设置action上传路径为非jeecg-boot后台,可能不会返回 success 属性的情况,就默认为成功
+ value['path'] = file.response[this.responseName]
+ this.handleChangeCommon(value)
+ }
} else if (file.status === 'error') {
value['message'] = file.response.message || '未知错误'
}
diff --git a/ant-design-vue-jeecg/src/components/_util/Area.js b/ant-design-vue-jeecg/src/components/_util/Area.js
index 84153b0a6..dda47214a 100644
--- a/ant-design-vue-jeecg/src/components/_util/Area.js
+++ b/ant-design-vue-jeecg/src/components/_util/Area.js
@@ -1,5 +1,3 @@
-import { pcaa } from 'area-data'
-
/**
* 省市区
*/
@@ -8,7 +6,7 @@ export default class Area {
* 构造器
* @param express
*/
- constructor() {
+ constructor(pcaa) {
let arr = []
const province = pcaa['86']
Object.keys(province).map(key=>{
@@ -17,9 +15,11 @@ export default class Area {
Object.keys(city).map(key2=>{
arr.push({id:key2, text:city[key2], pid:key, index:2});
const qu = pcaa[key2];
- Object.keys(qu).map(key3=>{
- arr.push({id:key3, text:qu[key3], pid:key2, index:3});
- })
+ if(qu){
+ Object.keys(qu).map(key3=>{
+ arr.push({id:key3, text:qu[key3], pid:key2, index:3});
+ })
+ }
})
})
this.all = arr;
diff --git a/ant-design-vue-jeecg/src/components/_util/StringUtil.js b/ant-design-vue-jeecg/src/components/_util/StringUtil.js
index 3f525982a..3977832bd 100644
--- a/ant-design-vue-jeecg/src/components/_util/StringUtil.js
+++ b/ant-design-vue-jeecg/src/components/_util/StringUtil.js
@@ -32,4 +32,15 @@ export const cutStrByFullLength = (str = '', maxLength) => {
}
return pre
}, '')
+}
+
+// 下划线转换驼峰
+export function underLinetoHump(name) {
+ return name.replace(/\_(\w)/g, function(all, letter){
+ return letter.toUpperCase();
+ });
+}
+// 驼峰转换下划线
+export function humptoUnderLine(name) {
+ return name.replace(/([A-Z])/g,"_$1").toLowerCase();
}
\ No newline at end of file
diff --git a/ant-design-vue-jeecg/src/components/jeecg/JAreaLinkage.vue b/ant-design-vue-jeecg/src/components/jeecg/JAreaLinkage.vue
index b46e3ce18..4cf8291f1 100644
--- a/ant-design-vue-jeecg/src/components/jeecg/JAreaLinkage.vue
+++ b/ant-design-vue-jeecg/src/components/jeecg/JAreaLinkage.vue
@@ -29,7 +29,6 @@
+
+
\ No newline at end of file
diff --git a/ant-design-vue-jeecg/src/components/jeecg/JModal/JPrompt.vue b/ant-design-vue-jeecg/src/components/jeecg/JModal/JPrompt.vue
new file mode 100644
index 000000000..9d7f85561
--- /dev/null
+++ b/ant-design-vue-jeecg/src/components/jeecg/JModal/JPrompt.vue
@@ -0,0 +1,124 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/ant-design-vue-jeecg/src/components/jeecg/JModal/index.js b/ant-design-vue-jeecg/src/components/jeecg/JModal/index.js
new file mode 100644
index 000000000..638538eac
--- /dev/null
+++ b/ant-design-vue-jeecg/src/components/jeecg/JModal/index.js
@@ -0,0 +1,18 @@
+import JModal from './JModal'
+import JPrompt from './JPrompt'
+
+export default {
+ install(Vue) {
+ Vue.component(JModal.name, JModal)
+
+ const JPromptExtend = Vue.extend(JPrompt)
+ Vue.prototype.$JPrompt = function (options = {}) {
+ // 创建prompt实例
+ const vm = new JPromptExtend().$mount()
+ vm.show(options)
+ // 关闭后销毁
+ vm.$on('after-close', () => vm.$destroy())
+ return vm
+ }
+ },
+}
\ No newline at end of file
diff --git a/ant-design-vue-jeecg/src/components/jeecg/JPopup.vue b/ant-design-vue-jeecg/src/components/jeecg/JPopup.vue
index 3d93e472a..ff689ed5e 100644
--- a/ant-design-vue-jeecg/src/components/jeecg/JPopup.vue
+++ b/ant-design-vue-jeecg/src/components/jeecg/JPopup.vue
@@ -173,9 +173,11 @@
let tempDestArr = []
for(let rw of rows){
let val = rw[orgFieldsArr[i]]
- if(!val){
+ // update--begin--autor:liusq-----date:20210713------for:处理val等于0的情况issues/I3ZL4T------
+ if(typeof val=='undefined'|| val==null || val.toString()==""){
val = ""
}
+ // update--end--autor:liusq-----date:20210713------for:处理val等于0的情况issues/I3ZL4T------
tempDestArr.push(val)
}
res[destFieldsArr[i]] = tempDestArr.join(",")
diff --git a/ant-design-vue-jeecg/src/components/jeecg/JSelectMultiple.vue b/ant-design-vue-jeecg/src/components/jeecg/JSelectMultiple.vue
index fddb04f27..de119db8d 100644
--- a/ant-design-vue-jeecg/src/components/jeecg/JSelectMultiple.vue
+++ b/ant-design-vue-jeecg/src/components/jeecg/JSelectMultiple.vue
@@ -1,7 +1,7 @@
@@ -12,6 +12,8 @@
diff --git a/ant-design-vue-jeecg/src/config/router.config.js b/ant-design-vue-jeecg/src/config/router.config.js
index 21b0b752f..70b1acca8 100644
--- a/ant-design-vue-jeecg/src/config/router.config.js
+++ b/ant-design-vue-jeecg/src/config/router.config.js
@@ -347,6 +347,21 @@ export const constantRouterMap = [
// ]
// },
+ {
+ // OAuth2 APP页面路由
+ path: '/oauth2-app',
+ component: BlankLayout,
+ redirect: '/oauth2-app/login',
+ children: [
+ {
+ // OAuth2 登录路由
+ path: 'login',
+ name: 'login',
+ component: () => import(/* webpackChunkName: "oauth2-app.login" */ '@/views/user/oauth2/OAuth2Login')
+ },
+ ]
+ },
+
{
path: '/test',
component: BlankLayout,
diff --git a/ant-design-vue-jeecg/src/mixins/JeecgListMixin.js b/ant-design-vue-jeecg/src/mixins/JeecgListMixin.js
index b20cf4723..db6658996 100644
--- a/ant-design-vue-jeecg/src/mixins/JeecgListMixin.js
+++ b/ant-design-vue-jeecg/src/mixins/JeecgListMixin.js
@@ -8,7 +8,6 @@ import { deleteAction, getAction,downFile,getFileAccessHttpUrl } from '@/api/man
import Vue from 'vue'
import { ACCESS_TOKEN, TENANT_ID } from "@/store/mutation-types"
import store from '@/store'
-import {Modal} from 'ant-design-vue'
export const JeecgListMixin = {
data(){
@@ -94,11 +93,11 @@ export const JeecgListMixin = {
this.ipagination.total = 0;
}
//update-end---author:zhangyafei Date:20201118 for:适配不分页的数据列表------------
- }
- if(res.code===510){
+ }else{
this.$message.warning(res.message)
}
- this.loading = false;
+ }).finally(() => {
+ this.loading = false
})
},
initDictConfig(){
@@ -296,10 +295,12 @@ export const JeecgListMixin = {
},
/* 导入 */
handleImportExcel(info){
+ this.loading = true;
if (info.file.status !== 'uploading') {
console.log(info.file, info.fileList);
}
if (info.file.status === 'done') {
+ this.loading = false;
if (info.file.response.success) {
// this.$message.success(`${info.file.name} 文件上传成功`);
if (info.file.response.code === 201) {
@@ -321,11 +322,12 @@ export const JeecgListMixin = {
this.$message.error(`${info.file.name} ${info.file.response.message}.`);
}
} else if (info.file.status === 'error') {
+ this.loading = false;
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({
+ this.$error({
title: '登录已过期',
content: '很抱歉,登录已过期,请重新登录',
okText: '重新登录',
diff --git a/ant-design-vue-jeecg/src/mixins/OnlineCommonUtil.js b/ant-design-vue-jeecg/src/mixins/OnlineCommonUtil.js
index 7de0b6dff..5ec8004ef 100644
--- a/ant-design-vue-jeecg/src/mixins/OnlineCommonUtil.js
+++ b/ant-design-vue-jeecg/src/mixins/OnlineCommonUtil.js
@@ -1,14 +1,16 @@
import { formatDate } from '@/utils/util'
import Area from '@/components/_util/Area'
+import { postAction } from '@/api/manage'
const onlUtil = {
data(){
return {
- mixin_pca:''
+ mixin_pca:'',
+ flowCodePre: 'onl_'
}
},
created(){
- this.mixin_pca = new Area()
+ this.mixin_pca = new Area(this.$Jpcaa)
},
methods:{
simpleDateFormat(millisecond, format){
diff --git a/ant-design-vue-jeecg/src/permission.js b/ant-design-vue-jeecg/src/permission.js
index c1c5982cd..4429d2ae8 100644
--- a/ant-design-vue-jeecg/src/permission.js
+++ b/ant-design-vue-jeecg/src/permission.js
@@ -4,19 +4,20 @@ import store from './store'
import NProgress from 'nprogress' // progress bar
import 'nprogress/nprogress.css' // progress bar style
import notification from 'ant-design-vue/es/notification'
-import { ACCESS_TOKEN,INDEX_MAIN_PAGE_PATH } from '@/store/mutation-types'
-import { generateIndexRouter } from "@/utils/util"
+import { ACCESS_TOKEN,INDEX_MAIN_PAGE_PATH, OAUTH2_LOGIN_PAGE_PATH } from '@/store/mutation-types'
+import { generateIndexRouter, isOAuth2AppEnv } from '@/utils/util'
NProgress.configure({ showSpinner: false }) // NProgress Configuration
const whiteList = ['/user/login', '/user/register', '/user/register-result','/user/alteration'] // no redirect whitelist
+whiteList.push(OAUTH2_LOGIN_PAGE_PATH)
router.beforeEach((to, from, next) => {
NProgress.start() // start progress bar
if (Vue.ls.get(ACCESS_TOKEN)) {
/* has token */
- if (to.path === '/user/login') {
+ if (to.path === '/user/login' || to.path === OAUTH2_LOGIN_PAGE_PATH) {
next({ path: INDEX_MAIN_PAGE_PATH })
NProgress.done()
} else {
@@ -59,10 +60,18 @@ router.beforeEach((to, from, next) => {
}
} else {
if (whiteList.indexOf(to.path) !== -1) {
- // 在免登录白名单,直接进入
- next()
+ // 在免登录白名单,如果进入的页面是login页面并且当前是OAuth2app环境,就进入OAuth2登录页面
+ if (to.path === '/user/login' && isOAuth2AppEnv()) {
+ next({path: OAUTH2_LOGIN_PAGE_PATH})
+ } else {
+ // 在免登录白名单,直接进入
+ next()
+ }
+ NProgress.done()
} else {
- next({ path: '/user/login', query: { redirect: to.fullPath } })
+ // 如果当前是在OAuth2APP环境,就跳转到OAuth2登录页面
+ let path = isOAuth2AppEnv() ? OAUTH2_LOGIN_PAGE_PATH : '/user/login'
+ next({ path: path, query: { redirect: to.fullPath } })
NProgress.done() // if current page is login will not trigger afterEach hook, so manually handle it
}
}
diff --git a/ant-design-vue-jeecg/src/store/index.js b/ant-design-vue-jeecg/src/store/index.js
index ee4e41ea6..908ddec0c 100644
--- a/ant-design-vue-jeecg/src/store/index.js
+++ b/ant-design-vue-jeecg/src/store/index.js
@@ -4,8 +4,6 @@ import Vuex from 'vuex'
import app from './modules/app'
import user from './modules/user'
import permission from './modules/permission'
-import enhance from './modules/enhance'
-import online from './modules/online'
import getters from './getters'
Vue.use(Vuex)
@@ -15,8 +13,6 @@ export default new Vuex.Store({
app,
user,
permission,
- enhance,
- online
},
state: {
diff --git a/ant-design-vue-jeecg/src/store/modules/user.js b/ant-design-vue-jeecg/src/store/modules/user.js
index 7593389b7..d3f2706b8 100644
--- a/ant-design-vue-jeecg/src/store/modules/user.js
+++ b/ant-design-vue-jeecg/src/store/modules/user.js
@@ -159,6 +159,7 @@ const user = {
Vue.ls.remove(USER_NAME)
Vue.ls.remove(UI_CACHE_DB_DICT_DATA)
Vue.ls.remove(CACHE_INCLUDED_ROUTES)
+ Vue.ls.remove(TENANT_ID)
//console.log('logoutToken: '+ logoutToken)
logout(logoutToken).then(() => {
if (process.env.VUE_APP_SSO == 'true') {
diff --git a/ant-design-vue-jeecg/src/store/mutation-types.js b/ant-design-vue-jeecg/src/store/mutation-types.js
index f58bdd9f7..fee0f7fa9 100644
--- a/ant-design-vue-jeecg/src/store/mutation-types.js
+++ b/ant-design-vue-jeecg/src/store/mutation-types.js
@@ -17,6 +17,7 @@ export const ENCRYPTED_STRING = 'ENCRYPTED_STRING'
export const ENHANCE_PRE = 'enhance_'
export const UI_CACHE_DB_DICT_DATA = 'UI_CACHE_DB_DICT_DATA'
export const INDEX_MAIN_PAGE_PATH = '/dashboard/analysis'
+export const OAUTH2_LOGIN_PAGE_PATH = '/oauth2-app/login'
export const TENANT_ID = 'TENANT_ID'
export const ONL_AUTH_FIELDS = 'ONL_AUTH_FIELDS'
//路由缓存问题,关闭了tab页时再打开就不刷新 #842
diff --git a/ant-design-vue-jeecg/src/utils/encryption/signMd5Utils.js b/ant-design-vue-jeecg/src/utils/encryption/signMd5Utils.js
index 5acb56be0..d138c70be 100644
--- a/ant-design-vue-jeecg/src/utils/encryption/signMd5Utils.js
+++ b/ant-design-vue-jeecg/src/utils/encryption/signMd5Utils.js
@@ -49,11 +49,13 @@ export default class signMd5Utils {
result = {};
// 获取URL上最后带逗号的参数变量 sys/dict/getDictItems/sys_user,realname,username
+ //【这边条件没有encode】带条件参数例子:/sys/dict/getDictItems/sys_user,realname,id,username!='admin'%20order%20by%20create_time
let lastpathVariable = url.substring(url.lastIndexOf('/') + 1);
if(lastpathVariable.includes(",")){
if(lastpathVariable.includes("?")){
lastpathVariable = lastpathVariable.substring(0, lastpathVariable.indexOf("?"));
}
+ //解决Sign 签名校验失败 #2728
result["x-path-variable"] = decodeURI(lastpathVariable);
}
if (urlArray && urlArray[1]) {
diff --git a/ant-design-vue-jeecg/src/utils/request.js b/ant-design-vue-jeecg/src/utils/request.js
index 53cc107fc..12634fd59 100644
--- a/ant-design-vue-jeecg/src/utils/request.js
+++ b/ant-design-vue-jeecg/src/utils/request.js
@@ -2,7 +2,7 @@ import Vue from 'vue'
import axios from 'axios'
import store from '@/store'
import { VueAxios } from './axios'
-import {Modal, notification} from 'ant-design-vue'
+import router from '@/router/index'
import { ACCESS_TOKEN, TENANT_ID } from "@/store/mutation-types"
/**
@@ -28,7 +28,7 @@ const err = (error) => {
console.log("------异常响应------",error.response.status)
switch (error.response.status) {
case 403:
- notification.error({ message: '系统提示', description: '拒绝访问',duration: 4})
+ Vue.prototype.$Jnotification.error({ message: '系统提示', description: '拒绝访问',duration: 4})
break
case 500:
console.log("------error.response------",error.response)
@@ -39,40 +39,43 @@ const err = (error) => {
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失效采用弹框模式,不直接跳转----
- Modal.error({
- title: '登录已过期',
- content: '很抱歉,登录已过期,请重新登录',
- okText: '重新登录',
- mask: false,
- onOk: () => {
- store.dispatch('Logout').then(() => {
- Vue.ls.remove(ACCESS_TOKEN)
- try {
- let path = window.document.location.pathname
- console.log("location pathname -> "+path)
- if(path!="/" && path.indexOf('/user/login')==-1){
+ if (/wxwork|dingtalk/i.test(navigator.userAgent)) {
+ Vue.prototype.$Jmessage.loading('登录已过期,正在重新登陆', 0)
+ } else {
+ Vue.prototype.$Jmodal.error({
+ title: '登录已过期',
+ content: '很抱歉,登录已过期,请重新登录',
+ okText: '重新登录',
+ mask: false,
+ onOk: () => {
+ store.dispatch('Logout').then(() => {
+ Vue.ls.remove(ACCESS_TOKEN)
+ try {
+ let path = window.document.location.pathname
+ console.log('location pathname -> ' + path)
+ if (path != '/' && path.indexOf('/user/login') == -1) {
+ window.location.reload()
+ }
+ } catch (e) {
window.location.reload()
}
- }catch (e) {
- window.location.reload()
- }
- })
- }
- })
+ })
+ }
+ })
+ }
// update-end- --- author:scott ------ date:20190225 ---- for:Token失效采用弹框模式,不直接跳转----
}
break
case 404:
- notification.error({ message: '系统提示', description:'很抱歉,资源未找到!',duration: 4})
+ Vue.prototype.$Jnotification.error({ message: '系统提示', description:'很抱歉,资源未找到!',duration: 4})
break
case 504:
- notification.error({ message: '系统提示', description: '网络超时'})
+ Vue.prototype.$Jnotification.error({ message: '系统提示', description: '网络超时'})
break
case 401:
- notification.error({ message: '系统提示', description:'未授权,请重新登录',duration: 4})
+ Vue.prototype.$Jnotification.error({ message: '系统提示', description:'未授权,请重新登录',duration: 4})
if (token) {
store.dispatch('Logout').then(() => {
setTimeout(() => {
@@ -82,13 +85,19 @@ const err = (error) => {
}
break
default:
- notification.error({
+ Vue.prototype.$Jnotification.error({
message: '系统提示',
description: data.message,
duration: 4
})
break
}
+ } else if (error.message) {
+ if (error.message.includes('timeout')) {
+ Vue.prototype.$Jnotification.error({message: '系统提示', description: '网络超时'})
+ } else {
+ Vue.prototype.$Jnotification.error({message: '系统提示', description: error.message})
+ }
}
return Promise.reject(error)
};
@@ -99,6 +108,14 @@ service.interceptors.request.use(config => {
if (token) {
config.headers[ 'X-Access-Token' ] = token // 让每个请求携带自定义 token 请根据实际情况自行修改
}
+
+ // update-begin--author:sunjianlei---date:20200723---for 如果当前在low-app环境,并且携带了appId,就向Header里传递appId
+ const $route = router.currentRoute
+ if ($route && $route.name && $route.name.startsWith('low-app') && $route.params.appId) {
+ config.headers['X-Low-App-ID'] = $route.params.appId
+ }
+ // update-end--author:sunjianlei---date:20200723---for 如果当前在low-app环境,并且携带了appId,就向Header里传递appId
+
//update-begin-author:taoyan date:2020707 for:多租户
let tenantid = Vue.ls.get(TENANT_ID)
if (!tenantid) {
diff --git a/ant-design-vue-jeecg/src/utils/util.js b/ant-design-vue-jeecg/src/utils/util.js
index 5255e4734..62ead493b 100644
--- a/ant-design-vue-jeecg/src/utils/util.js
+++ b/ant-design-vue-jeecg/src/utils/util.js
@@ -1,5 +1,7 @@
+import Vue from 'vue'
import * as api from '@/api/api'
import { isURL } from '@/utils/validate'
+import { ACCESS_TOKEN } from '@/store/mutation-types'
import onlineCommons from '@jeecg/antd-online-mini'
export function timeFix() {
@@ -145,6 +147,7 @@ function generateChildRouters (data) {
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,
@@ -559,4 +562,32 @@ export function removeArrayElement(array, prod, value) {
if(index>=0){
array.splice(index, 1);
}
-}
\ No newline at end of file
+}
+
+/** 判断是否是OAuth2APP环境 */
+export function isOAuth2AppEnv() {
+ return /wxwork|dingtalk/i.test(navigator.userAgent)
+}
+
+/**
+ * 获取积木报表打印地址
+ * @param url
+ * @param id
+ * @param open 是否自动打开
+ * @returns {*}
+ */
+export function getReportPrintUrl(url, id, open) {
+ // URL支持{{ window.xxx }}占位符变量
+ url = url.replace(/{{([^}]+)?}}/g, (s1, s2) => eval(s2))
+ if (url.includes('?')) {
+ url += '&'
+ } else {
+ url += '?'
+ }
+ url += `id=${id}`
+ url += `&token=${Vue.ls.get(ACCESS_TOKEN)}`
+ if (open) {
+ window.open(url)
+ }
+ return url
+}
diff --git a/ant-design-vue-jeecg/src/views/account/settings/AvatarModal.vue b/ant-design-vue-jeecg/src/views/account/settings/AvatarModal.vue
index 7eb3d8154..9986088d6 100644
--- a/ant-design-vue-jeecg/src/views/account/settings/AvatarModal.vue
+++ b/ant-design-vue-jeecg/src/views/account/settings/AvatarModal.vue
@@ -1,5 +1,5 @@
-
+
-
+
@@ -457,6 +457,7 @@
import JSelectMultiple from '@/components/jeecg/JSelectMultiple'
import JTreeDict from "../../components/jeecg/JTreeDict.vue";
import JCron from "@/components/jeecg/JCron.vue";
+ import JEasyCron from "@/components/jeecg/JEasyCron";
import JTreeSelect from '@/components/jeecg/JTreeSelect'
import JSuperQuery from '@/components/jeecg/JSuperQuery'
import JUpload from '@/components/jeecg/JUpload'
@@ -489,7 +490,7 @@
JCheckbox,
JCodeEditor,
JDate, JEditor, JEllipsis, JSlider, JSelectMultiple,
- JCron, JTreeSelect, JSuperQuery, JMultiSelectTag,
+ JCron, JEasyCron,JTreeSelect, JSuperQuery, JMultiSelectTag,
JSearchSelectTag
},
data() {
diff --git a/ant-design-vue-jeecg/src/views/system/QuartzJobList.vue b/ant-design-vue-jeecg/src/views/system/QuartzJobList.vue
index 1696e2b26..ed57aa398 100644
--- a/ant-design-vue-jeecg/src/views/system/QuartzJobList.vue
+++ b/ant-design-vue-jeecg/src/views/system/QuartzJobList.vue
@@ -214,7 +214,12 @@
this.isorter.order = "ascend" == sorter.order ? "asc" : "desc"
}
//这种筛选方式只支持单选
- this.filters.status = filters.status[0];
+
+ // update-begin-author:liusq date:20210624 for:前台定时任务无法翻页 #2666
+ if(filters && Object.keys(filters).length>0 && filters.status){
+ this.filters.status = filters.status[0];
+ }
+ // update-end-author:liusq date:20210624 for:前台定时任务无法翻页 #2666
this.ipagination = pagination;
this.loadData();
},
diff --git a/ant-design-vue-jeecg/src/views/system/SysDataSourceList.vue b/ant-design-vue-jeecg/src/views/system/SysDataSourceList.vue
index 5fc631723..246274a2f 100644
--- a/ant-design-vue-jeecg/src/views/system/SysDataSourceList.vue
+++ b/ant-design-vue-jeecg/src/views/system/SysDataSourceList.vue
@@ -122,11 +122,6 @@
align: 'center',
customRender: (t, r, index) => index + 1
},
- {
- title: '数据源编码',
- align: 'center',
- dataIndex: 'code'
- },
{
title: '数据源名称',
align: 'center',
@@ -149,11 +144,6 @@
dataIndex: 'dbUrl',
customRender: (t) => ellipsis(t)
},
- {
- title: '数据库名称',
- align: 'center',
- dataIndex: 'dbName'
- },
{
title: '用户名',
align: 'center',
diff --git a/ant-design-vue-jeecg/src/views/system/SysOnlineList.vue b/ant-design-vue-jeecg/src/views/system/SysUserOnlineList.vue
similarity index 99%
rename from ant-design-vue-jeecg/src/views/system/SysOnlineList.vue
rename to ant-design-vue-jeecg/src/views/system/SysUserOnlineList.vue
index 12b9db077..53152e26d 100644
--- a/ant-design-vue-jeecg/src/views/system/SysOnlineList.vue
+++ b/ant-design-vue-jeecg/src/views/system/SysUserOnlineList.vue
@@ -70,7 +70,7 @@
import {getFileAccessHttpUrl} from '@/api/manage';
export default {
- name: "SysOnlineList",
+ name: "SysUserOnlineList",
mixins:[JeecgListMixin, mixinDevice],
components: {},
data () {
diff --git a/ant-design-vue-jeecg/src/views/system/UserList.vue b/ant-design-vue-jeecg/src/views/system/UserList.vue
index 3cdf3833b..5a2f91a65 100644
--- a/ant-design-vue-jeecg/src/views/system/UserList.vue
+++ b/ant-design-vue-jeecg/src/views/system/UserList.vue
@@ -291,7 +291,7 @@
superQueryFieldList: [
{ type: 'input', value: 'username', text: '用户账号', },
{ type: 'input', value: 'realname', text: '用户姓名', },
- { type: 'select', value: 'sex', text: '性别', dictCode: 'sex' },
+ { type: 'select', value: 'sex', dbType: 'int', text: '性别', dictCode: 'sex' },
],
url: {
syncUser: "/act/process/extActProcess/doSyncUser",
diff --git a/ant-design-vue-jeecg/src/views/system/modules/SysCategoryModal.vue b/ant-design-vue-jeecg/src/views/system/modules/SysCategoryModal.vue
index 4afd66aa5..ebde59cb7 100644
--- a/ant-design-vue-jeecg/src/views/system/modules/SysCategoryModal.vue
+++ b/ant-design-vue-jeecg/src/views/system/modules/SysCategoryModal.vue
@@ -22,11 +22,11 @@
:disabled="disabled">
-
+
-
+
@@ -36,10 +36,10 @@
import { httpAction,getAction } from '@/api/manage'
import JTreeSelect from '@/components/jeecg/JTreeSelect'
-
+
export default {
name: "SysCategoryModal",
- components: {
+ components: {
JTreeSelect
},
data () {
@@ -70,7 +70,7 @@
expandedRowKeys:[],
pidField:"pid",
subExpandedKeys:[]
-
+
}
},
created () {
@@ -111,7 +111,8 @@
httpAction(httpurl,this.model,method).then((res)=>{
if(res.success){
that.$message.success(res.message);
- that.submitSuccess(this.model)
+ // close的时候清空了表单的值 导致model为空 修改值在列表页没有变 此处需要复制一下model
+ that.submitSuccess({...this.model})
}else{
that.$message.warning(res.message);
}
@@ -122,7 +123,7 @@
}else{
return false;
}
-
+
})
},
handleCancel () {
diff --git a/ant-design-vue-jeecg/src/views/system/modules/SysDataSourceModal.vue b/ant-design-vue-jeecg/src/views/system/modules/SysDataSourceModal.vue
index 309afaba6..a993af356 100644
--- a/ant-design-vue-jeecg/src/views/system/modules/SysDataSourceModal.vue
+++ b/ant-design-vue-jeecg/src/views/system/modules/SysDataSourceModal.vue
@@ -41,12 +41,12 @@
label="数据源地址">
-
-
+ -->
-
+ >
diff --git a/ant-design-vue-jeecg/src/views/user/Login.vue b/ant-design-vue-jeecg/src/views/user/Login.vue
index 14f8b6cba..3f6401aec 100644
--- a/ant-design-vue-jeecg/src/views/user/Login.vue
+++ b/ant-design-vue-jeecg/src/views/user/Login.vue
@@ -35,18 +35,18 @@
+
+
\ No newline at end of file