张延森 3 年 前
コミット
c5087584b8
共有3 個のファイルを変更した8 個の追加4 個の削除を含む
  1. 1
    0
      config/proxy.js
  2. 1
    1
      src/pages/building/Edit/Basic/index.jsx
  3. 6
    3
      src/pages/building/Edit/components/BuildingTypeDetail.jsx

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

@@ -10,6 +10,7 @@ export default {
10 10
     '/api/': {
11 11
       // target: 'https://xlk.njyz.tech/',
12 12
       target: 'http://localhost:8081/',
13
+      // target: 'https://xlj.newlandsh.com/',
13 14
       changeOrigin: true,
14 15
       pathRewrite: {
15 16
         '^': '',

+ 1
- 1
src/pages/building/Edit/Basic/index.jsx ファイルの表示

@@ -416,7 +416,7 @@ const BuildingBasic = React.forwardRef((props, ref) => {
416 416
             })(<InputNumber style={fullWidth}/>)}
417 417
           </Form.Item>
418 418
         </FormGroupItem>
419
-        <Form.Item label="品牌开发商" help="【品牌开发商】与【开发商】二选一">
419
+        <Form.Item label="品牌开发商">
420 420
           {getFieldDecorator('brandId')(
421 421
             <Select style={fullWidth}>
422 422
               {

+ 6
- 3
src/pages/building/Edit/components/BuildingTypeDetail.jsx ファイルの表示

@@ -44,10 +44,13 @@ const BuildingTypeDetail = (props) => {
44 44
   }
45 45
 
46 46
   useEffect(() => {
47
-    if (!dataset.rightsYear) {
48
-      dataset.rightsYear = 70
47
+    form.resetFields()
48
+    if (dataset) {
49
+      if (!dataset.rightsYear) {
50
+        dataset.rightsYear = 70
51
+      }
52
+      form.setFieldsValue(dataset)
49 53
     }
50
-    form.setFieldsValue(dataset)
51 54
   }, [dataset])
52 55
 
53 56
   return (