Bläddra i källkod

Merge branch 'next' of github.com:jetlinks/jetlinks-ui-antd into next-wzy-edge

Wzyyy98 3 år sedan
förälder
incheckning
5336b75def

+ 2 - 2
src/components/Metadata/EnumParam/index.tsx

@@ -46,7 +46,7 @@ const EnumParam = () => {
                   'x-decorator': 'FormItem',
                   'x-component': 'Input',
                   'x-component-props': {
-                    placeholder: '对该枚举项的描述',
+                    placeholder: '请输入标识',
                   },
                   'x-validator': [
                     {
@@ -65,7 +65,7 @@ const EnumParam = () => {
                   'x-decorator': 'FormItem',
                   'x-component': 'Input',
                   'x-component-props': {
-                    placeholder: '请输入Text',
+                    placeholder: '对该枚举项的描述',
                   },
                   'x-validator': [
                     {

+ 1 - 1
src/pages/account/Center/bind/index.tsx

@@ -44,7 +44,7 @@ const Bind = () => {
     // const url = window.location.href.split('redirect=')?.[1];
     console.log(redirectUrl);
     if (redirectUrl) {
-      window.location.href = redirectUrl;
+      window.location.href = decodeURIComponent(redirectUrl);
     }
   };
 

+ 1 - 1
src/pages/notice/Config/Detail/doc/DingTalk.tsx

@@ -7,7 +7,7 @@ const DingTalk = () => {
   return (
     <div className={'doc'}>
       <div className={'url'}>
-        钉钉管理后台:
+        钉钉开放后台:
         <a href="https://open-dev.dingtalk.com" target="_blank" rel="noopener noreferrer">
           https://open-dev.dingtalk.com
         </a>

+ 5 - 5
src/pages/notice/Template/Detail/doc/Email.tsx

@@ -12,13 +12,13 @@ const Email = () => {
       </div>
       <h1>2.模板配置说明</h1>
       <div>
-        <h2> 1、服务器地址</h2>
-        <div>服务器地址支持自定义输入</div>
-        <h2> 2、标题</h2>
+        {/* <h2> 1、服务器地址</h2>
+        <div>服务器地址支持自定义输入</div> */}
+        <h2> 1、标题</h2>
         <div>支持输入变量,变量格式${a}</div>
-        <h2> 3、收件人</h2>
+        <h2> 2、收件人</h2>
         <div> 支持录入多个邮箱地址,可填写变量参数。</div>
-        <h2> 4、模板内容</h2>
+        <h2> 3、模板内容</h2>
         <div>
           支持填写带变量的动态模板。变量填写规范示例:${b}
           。填写动态参数后,可对变量的名称、类型、格式进行配置,以便告警通知时填写。

+ 1 - 1
src/pages/notice/Template/Detail/index.tsx

@@ -497,7 +497,7 @@ const Detail = observer(() => {
 
   registerValidateRules({
     batchCheckEmail(value) {
-      const regEmail = /^([a-zA-Z]|[0-9])(\w|\-)+@[a-zA-Z0-9]+\.([a-zA-Z]{2,4})$/;
+      const regEmail = /^([A-Za-z0-9_\-\.])+@[a-zA-Z0-9]+\.([a-zA-Z]{2,4})$/;
       let error;
       if (value) {
         value.some((item: string) => {

+ 5 - 4
src/pages/system/Apply/Save/index.tsx

@@ -18,7 +18,7 @@ import {
   ArrayTable,
 } from '@formily/antd';
 import { TreeSelect as ATreeSelect } from 'antd';
-import { useEffect, useState } from 'react';
+import { useEffect, useRef, useState } from 'react';
 import { createSchemaField } from '@formily/react';
 import { createForm, Field, onFieldReact, onFieldValueChange, onFormInit } from '@formily/core';
 import { onlyMessage, randomString, useAsyncDataSource } from '@/utils/util';
@@ -42,6 +42,7 @@ const Save = () => {
   const [id, setId] = useState<string>('');
   const [visible, setVisiable] = useState<boolean>(false);
   const [detail, setDetail] = useState<any>({});
+  const accessRef = useRef<any>([]);
 
   const provider1 = require('/public/images/apply/provider1.png');
   const provider2 = require('/public/images/apply/provider2.png');
@@ -169,6 +170,8 @@ const Save = () => {
         if (!id) return;
         const resp = await service.detail(id);
         const integrationModes = resp.result.integrationModes.map((item: any) => item.value);
+        // setAccess(integrationModes)
+        accessRef.current = integrationModes;
         formInit.setInitialValues({
           ...resp.result,
           integrationModes,
@@ -235,9 +238,7 @@ const Save = () => {
         });
       });
       onFieldReact('apiClient.authConfig.oauth2.clientId', (filed) => {
-        const parms = filed.query('provider').get('value');
-        // console.log(parms);
-        if (id && parms === 'internal-standalone') {
+        if (id && accessRef.current?.includes('apiClient')) {
           filed.componentProps = {
             disabled: true,
           };