v3.7.2 版本代码合并

This commit is contained in:
JEECG
2024-12-09 15:10:46 +08:00
parent 64b29f47e0
commit b0c4194602
118 changed files with 12729 additions and 1596 deletions

View File

@ -4,7 +4,7 @@
<BasicForm @register="register" />
</CollapseContainer>
<CollapseContainer title="超过3行自动收起折叠时保留2行" class="mt-4">
<CollapseContainer title="超过5列自动收起折叠时保留2行" class="mt-4">
<BasicForm @register="register1" />
</CollapseContainer>
</PageWrapper>
@ -175,11 +175,12 @@
labelWidth: 120,
schemas: [...getSchamas(), ...getAppendSchemas(), { field: '', component: 'Divider', label: '更多字段' }, ...extraSchemas],
actionColOptions: {
span: 24,
span: 8,
},
compact: true,
showAdvancedButton: true,
alwaysShowLines: 2,
autoAdvancedCol: 2,
alwaysShowLines: 1,
});
return {
register,

View File

@ -1,7 +1,7 @@
import { defHttp } from '/@/utils/http/axios';
enum Api {
actuatorList = '/actuator/httptrace-new/',
actuatorList = '/actuator/jeecghttptrace/',
}
/**

View File

@ -3,11 +3,8 @@
<template #headerContent>
<div class="flex justify-between items-center">
<span class="flex-1">
<a :href="GITHUB_URL" target="_blank">
<!-- {{ name }}-->
JeecgBoot
</a>
是一款基于BPM的低代码开发平台前后端分离架构 SpringBoot 2.xSpringCloudAnt Design&VueMybatis-plusShiroJWT支持微服务强大的代码生成器让前后端代码一键生成实现低代码开发 JeecgBoot引领新低代码开发模式 OnlineCoding-> 代码生成器-> 手工MERGE 帮助Java项目解决70%的重复工作让开发更多关注业务既能快速提高效率节省研发成本同时又不失灵活性一系列低代码能力Online表单Online报表Online图表表单设计流程设计报表设计大屏设计 等等...
<a :href="GITHUB_URL" target="_blank">{{ name }}</a>
是一款基于BPM的低代码平台前后端分离架构 SpringBoot 2.xSpringCloudAnt Design&VueMybatis-plusShiroJWT支持微服务强大的代码生成器让前后端代码一键生成实现低代码开发 JeecgBoot引领新低代码开发模式 OnlineCoding-> 代码生成器-> 手工MERGE 帮助Java项目解决70%的重复工作让开发更多关注业务既能快速提高效率节省研发成本同时又不失灵活性一系列低代码能力Online表单Online报表Online图表表单设计流程设计报表设计大屏设计 等等...
</span>
</div>
</template>

View File

@ -4,14 +4,17 @@
<script setup lang="ts">
import { ref } from 'vue';
import { isOAuth2AppEnv, sysOAuth2Login } from '/@/views/sys/login/useLogin';
import {isOAuth2AppEnv, sysOAuth2Callback, sysOAuth2Login} from '/@/views/sys/login/useLogin';
import { useRouter } from 'vue-router';
import { PageEnum } from '/@/enums/pageEnum';
import { router } from '/@/router';
import { useUserStore } from '/@/store/modules/user';
import { useMessage } from '/@/hooks/web/useMessage';
import { useI18n } from '/@/hooks/web/useI18n';
import {getTenantId} from "/@/utils/auth";
import { getAuthCache, getTenantId, getToken } from "/@/utils/auth";
import { OAUTH2_THIRD_LOGIN_TENANT_ID } from "@/enums/cacheEnum";
import { defHttp } from "@/utils/http/axios";
import { requestAuthCode } from "dingtalk-jsapi";
const isOAuth = ref<boolean>(isOAuth2AppEnv());
const env = ref<any>({ thirdApp: false, wxWork: false, dingtalk: false });
@ -55,7 +58,8 @@
} else if (env.value.wxWork) {
sysOAuth2Login('wechat_enterprise');
} else if (env.value.dingtalk) {
sysOAuth2Login('dingtalk');
//新版钉钉登录
dingdingLogin();
}
}
}
@ -84,4 +88,43 @@
}
});
}
/**
* 钉钉登录
*/
function dingdingLogin() {
//先获取钉钉的企业id如果没有配置 还是走原来的逻辑,走原来的逻辑 需要判断存不存在token存在token直接去首页
let tenantId = getAuthCache(OAUTH2_THIRD_LOGIN_TENANT_ID) || 0;
let url = `/sys/thirdLogin/get/corpId/clientId?tenantId=${tenantId}`;
//update-begin---author:wangshuai---date:2024-12-09---for:不要使用getAction online里面的要用defHttp---
defHttp.get({ url:url },{ isTransformResponse: false }).then((res) => {
//update-end---author:wangshuai---date:2024-12-09---for:不要使用getAction online里面的要用defHttp---
if (res.success) {
if(res.result && res.result.corpId && res.result.clientId){
requestAuthCode({ corpId: res.result.corpId, clientId: res.result.clientId }).then((res) => {
let { code } = res;
sysOAuth2Callback(code);
});
}else{
toOldAuthLogin();
}
} else {
toOldAuthLogin();
}
}).catch((err) => {
toOldAuthLogin();
});
}
/**
* 旧版钉钉登录
*/
function toOldAuthLogin() {
let token = getToken();
if (token) {
router.replace({ path: PageEnum.BASE_HOME });
} else {
sysOAuth2Login('dingtalk');
}
}
</script>

View File

@ -174,6 +174,13 @@ export function isOAuth2AppEnv() {
return /wxwork|dingtalk/i.test(navigator.userAgent);
}
/**
* 判断是否是钉钉环境
*/
export function isOAuth2DingAppEnv() {
return /dingtalk/i.test(navigator.userAgent);
}
/**
* 后台构造oauth2登录地址
* @param source
@ -191,3 +198,19 @@ export function sysOAuth2Login(source) {
window.location.href = url;
}
//update-end---author:wangshuai ---date:20220629 for[issues/I5BG1I]vue3不支持auth2登录------------
//update-begin---author:wangshuai ---date:20241108 for[QQYUN-9421]vue3新版auth登录用户不用点击登录------------
/**
* 后台callBack
* @param code
*/
export function sysOAuth2Callback(code:string) {
let url = `${window._CONFIG['domianURL']}/sys/thirdLogin/oauth2/dingding/login`;
url += `?state=${encodeURIComponent(window.location.origin)}&authCode=${code}`;
let tenantId = getAuthCache(OAUTH2_THIRD_LOGIN_TENANT_ID);
if(tenantId){
url += `&tenantId=${tenantId}`;
}
window.location.href = url;
}
//update-end---author:wangshuai ---date:20241108 for[QQYUN-9421]vue3新版auth登录用户不用点击登录------------

View File

@ -15,6 +15,15 @@ export const thirdAppFormSchema: FormSchema[] = [
component: 'Input',
show: false,
},
{
label: 'CorpId',
field: 'corpId',
component: 'Input',
ifShow: ({ values }) => {
return values.thirdType === 'dingtalk';
},
required: true,
},
{
label: 'Agentld',
field: 'agentId',
@ -32,12 +41,6 @@ export const thirdAppFormSchema: FormSchema[] = [
field: 'clientSecret',
component: 'Input',
required: true,
},
{
label: 'agentAppSecret',
field: 'agentAppSecret',
component: 'Input',
ifShow: false,
},{
label: '启用',
field: 'status',

View File

@ -21,6 +21,12 @@
</div>
</template>
<div class="base-desc">完成步骤1后填入Agentld AppKeyAppSecret后 可对接应用与同步通讯录</div>
<div class="flex-flow">
<div class="base-title">CorpId</div>
<div class="base-message">
<a-input-password v-model:value="appConfigData.corpId" readonly />
</div>
</div>
<div class="flex-flow">
<div class="base-title">Agentld</div>
<div class="base-message">

View File

@ -82,7 +82,6 @@
agentId: '',
clientId: '',
clientSecret: '',
agentAppSecret: '',
});
//企业微信钉钉配置modal
const [registerAppConfigModal, { openModal }] = useModal();

View File

@ -10,6 +10,9 @@
import { BasicForm, useForm } from '/@/components/Form/index';
import { formSchema } from './fill.rule.data';
import { saveFillRule, updateFillRule } from './fill.rule.api';
import {useMessage} from "@/hooks/web/useMessage";
const { createMessage: $message } = useMessage();
//设置标题
const title = computed(() => (!unref(isUpdate) ? '新增' : '编辑'));
@ -43,6 +46,20 @@
async function handleSubmit() {
try {
let formValue = await validate();
// 检查参数是否合法
let ruleParams = formValue.ruleParams;
if (!!ruleParams) {
ruleParams = JSON.parse(ruleParams);
for (const key of Object.keys(ruleParams)) {
// online 保留字检查
if (key === 'onl_watch') {
$message.error('参数名称不能是onl_watch');
return
}
}
}
setModalProps({ confirmLoading: true });
if (isUpdate.value) {
let allFieldsValue = getFieldsValue();

View File

@ -4,14 +4,17 @@
<script setup lang="ts">
import { ref } from 'vue';
import { isOAuth2AppEnv, sysOAuth2Login } from '/@/views/sys/login/useLogin';
import { isOAuth2AppEnv, sysOAuth2Callback, sysOAuth2Login } from '/@/views/sys/login/useLogin';
import { useRouter } from 'vue-router';
import { PageEnum } from '/@/enums/pageEnum';
import { router } from '/@/router';
import { useUserStore } from '/@/store/modules/user';
import { useMessage } from '/@/hooks/web/useMessage';
import { useI18n } from '/@/hooks/web/useI18n';
import {getTenantId} from "/@/utils/auth";
import { getAuthCache, getTenantId, getToken } from "/@/utils/auth";
import { requestAuthCode } from 'dingtalk-jsapi';
import { defHttp } from '/@/utils/http/axios';
import { OAUTH2_THIRD_LOGIN_TENANT_ID } from "/@/enums/cacheEnum";
const isOAuth = ref<boolean>(isOAuth2AppEnv());
const env = ref<any>({ thirdApp: false, wxWork: false, dingtalk: false });
@ -55,7 +58,8 @@
} else if (env.value.wxWork) {
sysOAuth2Login('wechat_enterprise');
} else if (env.value.dingtalk) {
sysOAuth2Login('dingtalk');
//新版钉钉登录
dingdingLogin();
}
}
}
@ -84,4 +88,43 @@
}
});
}
/**
* 钉钉登录
*/
function dingdingLogin() {
//先获取钉钉的企业id如果没有配置 还是走原来的逻辑,走原来的逻辑 需要判断存不存在token存在token直接去首页
let tenantId = getAuthCache(OAUTH2_THIRD_LOGIN_TENANT_ID) || 0;
let url = `/sys/thirdLogin/get/corpId/clientId?tenantId=${tenantId}`;
//update-begin---author:wangshuai---date:2024-12-09---for:不要使用getAction online里面的要用defHttp---
defHttp.get({ url:url },{ isTransformResponse: false }).then((res) => {
//update-end---author:wangshuai---date:2024-12-09---for:不要使用getAction online里面的要用defHttp---
if (res.success) {
if(res.result && res.result.corpId && res.result.clientId){
requestAuthCode({ corpId: res.result.corpId, clientId: res.result.clientId }).then((res) => {
let { code } = res;
sysOAuth2Callback(code);
});
}else{
toOldAuthLogin();
}
} else {
toOldAuthLogin();
}
}).catch((err) => {
toOldAuthLogin();
});
}
/**
* 旧版钉钉登录
*/
function toOldAuthLogin() {
let token = getToken();
if (token) {
router.replace({ path: PageEnum.BASE_HOME });
} else {
sysOAuth2Login('dingtalk');
}
}
</script>