李志伟 2 年 前
コミット
1417331023
共有2 個のファイルを変更した5 個の追加2 個の削除を含む
  1. 1
    1
      config/proxy.js
  2. 4
    1
      src/pages/Machinery/Person/index.jsx

+ 1
- 1
config/proxy.js ファイルの表示

@@ -12,7 +12,7 @@ export default {
12 12
     '/api/': {
13 13
       // 要代理的地址
14 14
       // target: 'http://127.0.0.1:7080',
15
-      target: 'http://192.168.89.25:7080',
15
+      target: 'http://192.168.89.147:7080',
16 16
       // target: 'http://machine.njyunzhi.com',
17 17
       // 配置了这个可以从 http 代理到 https
18 18
       // 依赖 origin 的功能可能需要这个,比如 cookie

+ 4
- 1
src/pages/Machinery/Person/index.jsx ファイルの表示

@@ -51,6 +51,9 @@ export default (props) => {
51 51
   // 列表点击编辑按钮
52 52
   const handleEdit = (val) => {
53 53
     setuserId(val.userId);
54
+    if (!userId && orgId) {
55
+      form.setFieldsValue({ orgId: orgId })
56
+    }
54 57
     setEditModal(true);
55 58
   };
56 59
   //列表点击删除按钮
@@ -124,7 +127,7 @@ export default (props) => {
124 127
   }, [orgId, userId]);
125 128
 
126 129
   const actions = () => [
127
-    <Button key="add" type="primary" icon={<PlusOutlined />} onClick={() => setEditModal(true)}>
130
+    <Button key="add" type="primary" icon={<PlusOutlined />} onClick={handleEdit}>
128 131
       新增
129 132
     </Button>,
130 133
   ];