wzyyy 3 lat temu
rodzic
commit
62e3db4b8d

+ 2 - 2
config/proxy.ts

@@ -12,8 +12,8 @@ export default {
       // target: 'http://192.168.32.28:8844/',
       // ws: 'ws://192.168.32.28:8844/',
       // 开发环境
-      // target: 'http://120.79.18.123:8844/',
-      // ws: 'ws://120.79.18.123:8844/',
+      // target: 'http://47.109.52.230:8844/',
+      // ws: 'ws://47.109.52.230:8844/',
       // 测试环境
       target: 'http://120.77.179.54:8844/',
       ws: 'ws://120.77.179.54:8844/',

+ 6 - 1
src/pages/init-home/components/basis.tsx

@@ -83,6 +83,7 @@ const Basis = forwardRef((props: Props, ref) => {
         ico: require('/public/favicon.ico'),
         backgroud: require('/public/images/login.png'),
         apikey: '',
+        basePath: `${window.location.origin}/api`,
       }}
     >
       <Row gutter={[24, 24]}>
@@ -90,7 +91,11 @@ const Basis = forwardRef((props: Props, ref) => {
           <Form.Item
             label="系统名称"
             name="title"
-            rules={[{ max: 64, message: '最多可输入64个字符' }]}
+            required
+            rules={[
+              { max: 64, message: '最多可输入64个字符' },
+              { required: true, message: '请输入系统名称' },
+            ]}
           >
             <Input placeholder={'请输入系统名称'} />
           </Form.Item>

+ 2 - 1
src/pages/link/Type/Detail/index.tsx

@@ -120,13 +120,14 @@ const Save = observer(() => {
             if (param?.id && param.id !== ':id') {
               const resp = await service.detail(param.id);
               const data = resp?.result || {};
+              console.log(data);
               if (data?.shareCluster === false) {
                 data.cluster = data.cluster?.map((item: any) => ({
                   ...item.configuration,
                   configuration: item,
                 }));
               }
-              form1.setInitialValues({ ...data });
+              form1.setValues({ ...data });
             }
           });
           onFieldValueChange('type', (field, f) => {