mirror of
https://github.com/jeecgboot/JeecgBoot.git
synced 2026-01-04 04:45:28 +08:00
JeecgBoot 2.4.6版本发布
This commit is contained in:
@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<a-modal :visible="visible" title="修改头像" :maskClosable="false" :confirmLoading="confirmLoading" :width="800">
|
||||
<a-modal :visible="visible" title="修改头像" :maskClosable="false" :confirmLoading="confirmLoading" :width="800" @cancel="cancelHandel">
|
||||
<a-row>
|
||||
<a-col :xs="24" :md="12" :style="{height: '350px'}">
|
||||
<vue-cropper
|
||||
|
||||
@ -305,7 +305,7 @@
|
||||
<a-row :gutter="24">
|
||||
<a-col :span="12">
|
||||
<a-form-model-item label="cron表达式" prop="cronExpression">
|
||||
<j-cron v-model="formData.cronExpression"></j-cron>
|
||||
<j-easy-cron v-model="formData.cronExpression"></j-easy-cron>
|
||||
</a-form-model-item>
|
||||
</a-col>
|
||||
</a-row>
|
||||
@ -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() {
|
||||
|
||||
@ -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();
|
||||
},
|
||||
|
||||
@ -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',
|
||||
|
||||
@ -70,7 +70,7 @@
|
||||
import {getFileAccessHttpUrl} from '@/api/manage';
|
||||
|
||||
export default {
|
||||
name: "SysOnlineList",
|
||||
name: "SysUserOnlineList",
|
||||
mixins:[JeecgListMixin, mixinDevice],
|
||||
components: {},
|
||||
data () {
|
||||
@ -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",
|
||||
|
||||
@ -22,11 +22,11 @@
|
||||
:disabled="disabled">
|
||||
</j-tree-select>
|
||||
</a-form-model-item>
|
||||
|
||||
|
||||
<a-form-model-item label="分类名称" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="name">
|
||||
<a-input v-model="model.name" placeholder="请输入分类名称"></a-input>
|
||||
</a-form-model-item>
|
||||
|
||||
|
||||
</a-form-model>
|
||||
</a-spin>
|
||||
</a-modal>
|
||||
@ -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 () {
|
||||
|
||||
@ -41,12 +41,12 @@
|
||||
label="数据源地址">
|
||||
<a-input placeholder="请输入数据源地址" v-decorator="['dbUrl', validatorRules.dbUrl]"/>
|
||||
</a-form-item>
|
||||
<a-form-item
|
||||
<!-- <a-form-item
|
||||
:labelCol="labelCol"
|
||||
:wrapperCol="wrapperCol"
|
||||
label="数据库名称">
|
||||
<a-input placeholder="请输入数据库名称" v-decorator="['dbName', validatorRules.dbName]"/>
|
||||
</a-form-item>
|
||||
</a-form-item>-->
|
||||
<a-form-item
|
||||
:labelCol="labelCol"
|
||||
:wrapperCol="wrapperCol"
|
||||
@ -124,7 +124,7 @@
|
||||
dbUrl: { rules: [{ required: true, message: '请输入数据源地址!' }] },
|
||||
dbName: { rules: [{ required: true, message: '请输入数据库名称!' }] },
|
||||
dbUsername: { rules: [{ required: true, message: '请输入用户名!' }] },
|
||||
dbPassword: { rules: [{ required: true, message: '请输入密码!' }] }
|
||||
dbPassword: { rules: [{ required: false, message: '请输入密码!' }] }
|
||||
},
|
||||
url: {
|
||||
add: '/sys/dataSource/add',
|
||||
@ -142,7 +142,25 @@
|
||||
// marialDB 数据库
|
||||
'5': { dbDriver: 'org.mariadb.jdbc.Driver' },
|
||||
// postgresql 数据库
|
||||
'6': { dbDriver: 'org.postgresql.Driver' }
|
||||
'6': { dbDriver: 'org.postgresql.Driver' },
|
||||
// 达梦 数据库
|
||||
'7': { dbDriver: 'dm.jdbc.driver.DmDriver' },
|
||||
// 人大金仓 数据库
|
||||
'8': { dbDriver: 'com.kingbase8.Driver' },
|
||||
// 神通 数据库
|
||||
'9': { dbDriver: 'com.oscar.Driver' },
|
||||
// SQLite 数据库
|
||||
'10': { dbDriver: 'org.sqlite.JDBC' },
|
||||
// DB2 数据库
|
||||
'11': { dbDriver: 'com.ibm.db2.jcc.DB2Driver' },
|
||||
// Hsqldb 数据库
|
||||
'12': { dbDriver: 'org.hsqldb.jdbc.JDBCDriver' },
|
||||
// Derby 数据库
|
||||
'13': { dbDriver: 'org.apache.derby.jdbc.ClientDriver' },
|
||||
// H2 数据库
|
||||
'14': { dbDriver: 'org.h2.Driver' },
|
||||
// 其他数据库
|
||||
'15': { dbDriver: '' }
|
||||
},
|
||||
dbUrlMap: {
|
||||
// MySQL 数据库
|
||||
@ -153,10 +171,28 @@
|
||||
'2': { dbUrl: 'jdbc:oracle:thin:@127.0.0.1:1521:ORCL' },
|
||||
// SQLServer 数据库
|
||||
'3': { dbUrl: 'jdbc:sqlserver://127.0.0.1:1433;SelectMethod=cursor;DatabaseName=jeecgboot' },
|
||||
// SQLServer 数据库
|
||||
// Mariadb 数据库
|
||||
'5': { dbUrl: 'jdbc:mariadb://127.0.0.1:3306/jeecg-boot?characterEncoding=UTF-8&useSSL=false' },
|
||||
// SQLServer 数据库
|
||||
'6': { dbUrl: 'jdbc:postgresql://127.0.0.1:5432/jeecg-boot' }
|
||||
// Postgresql 数据库
|
||||
'6': { dbUrl: 'jdbc:postgresql://127.0.0.1:5432/jeecg-boot' },
|
||||
// 达梦 数据库
|
||||
'7': { dbUrl: 'jdbc:dm://127.0.0.1:5236/?jeecg-boot&zeroDateTimeBehavior=convertToNull&useUnicode=true&characterEncoding=utf-8' },
|
||||
// 人大金仓 数据库
|
||||
'8': { dbUrl: 'jdbc:kingbase8://127.0.0.1:54321/jeecg-boot' },
|
||||
// 神通 数据库
|
||||
'9': { dbUrl: 'jdbc:oscar://192.168.1.125:2003/jeecg-boot' },
|
||||
// SQLite 数据库
|
||||
'10': { dbUrl: 'jdbc:sqlite://opt/test.db' },
|
||||
// DB2 数据库
|
||||
'11': { dbUrl: 'jdbc:db2://127.0.0.1:50000/jeecg-boot' },
|
||||
// Hsqldb 数据库
|
||||
'12': { dbUrl: 'jdbc:hsqldb:hsql://127.0.0.1/jeecg-boot' },
|
||||
// Derby 数据库
|
||||
'13': { dbUrl: 'jdbc:derby://127.0.0.1:1527/jeecg-boot' },
|
||||
// H2 数据库
|
||||
'14': { dbUrl: 'jdbc:h2:tcp://127.0.0.1:8082/jeecg-boot' },
|
||||
// 其他数据库
|
||||
'15': { dbUrl: '' }
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
@ -59,7 +59,7 @@
|
||||
|
||||
<!--部门分配-->
|
||||
<a-form-model-item label="部门分配" :labelCol="labelCol" :wrapperCol="wrapperCol" v-show="!departDisabled">
|
||||
<j-select-depart v-model="model.selecteddeparts" :multi="true" @back="backDepartInfo" :backDepart="true"></j-select-depart>
|
||||
<j-select-depart v-model="model.selecteddeparts" :multi="true" @back="backDepartInfo" :backDepart="true" :treeOpera="true">></j-select-depart>
|
||||
</a-form-model-item>
|
||||
|
||||
<!--租户分配-->
|
||||
|
||||
@ -35,18 +35,18 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import Vue from 'vue'
|
||||
import { ACCESS_TOKEN ,ENCRYPTED_STRING} from "@/store/mutation-types"
|
||||
import ThirdLogin from './third/ThirdLogin'
|
||||
import LoginSelectTenant from "./LoginSelectTenant"
|
||||
import TwoStepCaptcha from '@/components/tools/TwoStepCaptcha'
|
||||
import { encryption , getEncryptedString } from '@/utils/encryption/aesEncrypt'
|
||||
import { timeFix } from "@/utils/util"
|
||||
import Vue from 'vue'
|
||||
import { ACCESS_TOKEN, ENCRYPTED_STRING } from '@/store/mutation-types'
|
||||
import ThirdLogin from './third/ThirdLogin'
|
||||
import LoginSelectTenant from './LoginSelectTenant'
|
||||
import TwoStepCaptcha from '@/components/tools/TwoStepCaptcha'
|
||||
import { getEncryptedString } from '@/utils/encryption/aesEncrypt'
|
||||
import { timeFix } from '@/utils/util'
|
||||
|
||||
import LoginAccount from './LoginAccount'
|
||||
import LoginPhone from './LoginPhone'
|
||||
import LoginAccount from './LoginAccount'
|
||||
import LoginPhone from './LoginPhone'
|
||||
|
||||
export default {
|
||||
export default {
|
||||
components: {
|
||||
LoginSelectTenant,
|
||||
TwoStepCaptcha,
|
||||
|
||||
@ -50,12 +50,11 @@
|
||||
|
||||
<script>
|
||||
|
||||
import Vue from 'vue'
|
||||
import { getAction,putAction } from '@/api/manage'
|
||||
import { USER_INFO } from "@/store/mutation-types"
|
||||
import store from './Login'
|
||||
import Vue from 'vue'
|
||||
import { putAction } from '@/api/manage'
|
||||
import { USER_INFO } from '@/store/mutation-types'
|
||||
|
||||
export default {
|
||||
export default {
|
||||
name: 'LoginSelectTenant',
|
||||
data(){
|
||||
return {
|
||||
@ -111,18 +110,19 @@
|
||||
this.isMultiDepart = false
|
||||
}
|
||||
},
|
||||
bizTenant(ids){
|
||||
if(!ids || ids.length==0){
|
||||
this.isMultiTenant = false
|
||||
} else if(ids.indexOf(',')<0){
|
||||
this.tenant_id = ids;
|
||||
this.isMultiTenant = false
|
||||
}else{
|
||||
this.visible = true
|
||||
this.isMultiTenant = true
|
||||
getAction('/sys/tenant/queryList', {ids: ids}).then(res=>{
|
||||
this.tenantList = res.result
|
||||
})
|
||||
bizTenantList(loginResult) {
|
||||
let tenantList = loginResult.tenantList
|
||||
if (Array.isArray(tenantList)) {
|
||||
if (tenantList.length === 0) {
|
||||
this.isMultiTenant = false
|
||||
} else if (tenantList.length === 1) {
|
||||
this.tenant_id = tenantList[0].id
|
||||
this.isMultiTenant = false
|
||||
} else {
|
||||
this.visible = true
|
||||
this.isMultiTenant = true
|
||||
this.tenantList = tenantList
|
||||
}
|
||||
}
|
||||
},
|
||||
show(loginResult){
|
||||
@ -131,8 +131,7 @@
|
||||
|
||||
let user = Vue.ls.get(USER_INFO)
|
||||
this.username = user.username
|
||||
let ids = user.relTenantIds
|
||||
this.bizTenant(ids);
|
||||
this.bizTenantList(loginResult);
|
||||
|
||||
if(this.visible===false){
|
||||
this.$store.dispatch('saveTenant', this.tenant_id);
|
||||
|
||||
130
ant-design-vue-jeecg/src/views/user/oauth2/OAuth2Login.vue
Normal file
130
ant-design-vue-jeecg/src/views/user/oauth2/OAuth2Login.vue
Normal file
@ -0,0 +1,130 @@
|
||||
<template>
|
||||
<div>
|
||||
<div id="loader-wrapper">
|
||||
<div id="loader"></div>
|
||||
<div class="loader-section section-left"></div>
|
||||
<div class="loader-section section-right"></div>
|
||||
<div class="load_title">正在登录 JeecgBoot 低代码平台,请耐心等待</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapActions } from 'vuex'
|
||||
import { isOAuth2AppEnv, timeFix } from '@/utils/util'
|
||||
import { INDEX_MAIN_PAGE_PATH } from '@/store/mutation-types'
|
||||
|
||||
export default {
|
||||
name: 'OAuth2Login',
|
||||
data() {
|
||||
return {
|
||||
env: {
|
||||
thirdApp: false,
|
||||
wxWork: false,
|
||||
dingtalk: false,
|
||||
},
|
||||
}
|
||||
},
|
||||
beforeCreate() {
|
||||
// 如果当前 不是 OAuth2APP环境,就重定向到 /user/login 页面
|
||||
if (!isOAuth2AppEnv()) {
|
||||
this.$router.replace({path: '/user/login'})
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.checkEnv()
|
||||
this.doOAuth2Login()
|
||||
},
|
||||
methods: {
|
||||
...mapActions(['ThirdLogin']),
|
||||
|
||||
/** 检测当前的环境 */
|
||||
checkEnv() {
|
||||
// 判断当时是否是企业微信环境
|
||||
if (/wxwork/i.test(navigator.userAgent)) {
|
||||
this.env.thirdApp = true
|
||||
this.env.wxWork = true
|
||||
}
|
||||
// 判断当时是否是钉钉环境
|
||||
if (/dingtalk/i.test(navigator.userAgent)) {
|
||||
this.env.thirdApp = true
|
||||
this.env.dingtalk = true
|
||||
}
|
||||
},
|
||||
|
||||
/** 进行OAuth2登录操作 */
|
||||
doOAuth2Login() {
|
||||
if (this.env.thirdApp) {
|
||||
// 判断是否携带了Token,是就说明登录成功
|
||||
if (this.$route.query.oauth2LoginToken) {
|
||||
this.thirdType = this.$route.query.thirdType
|
||||
let token = this.$route.query.oauth2LoginToken
|
||||
this.doThirdLogin(token)
|
||||
} else if (this.env.wxWork) {
|
||||
this.doWechatEnterpriseOAuth2Login()
|
||||
} else if (this.env.dingtalk) {
|
||||
this.doDingTalkOAuth2Login()
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
// 根据token执行登录
|
||||
doThirdLogin(token) {
|
||||
let param = {}
|
||||
param.thirdType = this.thirdType
|
||||
param.token = token
|
||||
this.ThirdLogin(param).then(res => {
|
||||
if (res.success) {
|
||||
this.loginSuccess()
|
||||
} else {
|
||||
this.requestFailed(res)
|
||||
}
|
||||
})
|
||||
},
|
||||
loginSuccess() {
|
||||
// 登陆成功,重定向到主页
|
||||
this.$router.replace({path: INDEX_MAIN_PAGE_PATH})
|
||||
// TODO 这个提示是否还需要?
|
||||
this.$notification.success({
|
||||
message: '欢迎',
|
||||
description: `${timeFix()},欢迎回来`,
|
||||
})
|
||||
},
|
||||
requestFailed(err) {
|
||||
this.$error({
|
||||
title: '登录失败',
|
||||
content: ((err.response || {}).data || {}).message || err.message || '请求出现错误,请稍后再试',
|
||||
okText: '重新登陆',
|
||||
onOk() {
|
||||
window.location.reload()
|
||||
},
|
||||
onCancel() {
|
||||
window.location.reload()
|
||||
},
|
||||
})
|
||||
},
|
||||
|
||||
/** 企业微信OAuth2登录 */
|
||||
doWechatEnterpriseOAuth2Login() {
|
||||
this.sysOAuth2Login('wechat_enterprise')
|
||||
},
|
||||
|
||||
/** 钉钉OAuth2登录 */
|
||||
doDingTalkOAuth2Login() {
|
||||
this.sysOAuth2Login('dingtalk')
|
||||
},
|
||||
|
||||
/** 后台构造oauth2登录地址 */
|
||||
sysOAuth2Login(source) {
|
||||
let url = `${window._CONFIG['domianURL']}/sys/thirdLogin/oauth2/${source}/login`
|
||||
url += `?state=${encodeURIComponent(window.location.origin)}`
|
||||
window.location.href = url
|
||||
},
|
||||
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
</style>
|
||||
Reference in New Issue
Block a user