林凡 5 yıl önce
ebeveyn
işleme
3ee10250b1

+ 4
- 5
src/components/SelectButton/CitySelect.jsx Dosyayı Görüntüle

@@ -42,12 +42,12 @@ const CitySelect = (props) => {
42 42
   }
43 43
 
44 44
   return (
45
-      <Select 
46
-      showSearch 
45
+      <Select
46
+      showSearch
47 47
       value={props.value}
48 48
       style={{ width: '180px' }}
49
-      placeholder="请选择城市" 
50
-      onChange={props.onChange} 
49
+      placeholder="请选择城市"
50
+      onChange={props.onChange}
51 51
       filterOption={(input, option) =>
52 52
         option.props.children.toLowerCase().indexOf(input.toLowerCase()) >= 0
53 53
       }
@@ -59,4 +59,3 @@ const CitySelect = (props) => {
59 59
   )
60 60
 }
61 61
 export default CitySelect
62
-

+ 2
- 0
src/pages/carouselFigure/SelectH5.jsx Dosyayı Görüntüle

@@ -27,6 +27,8 @@ export default props => {
27 27
       },
28 28
     }).then(data => {
29 29
       setList(data.records || [])
30
+
31
+      updateGroup(value ? undefined : value);
30 32
     })
31 33
   }, []);
32 34
 

+ 20
- 4
src/pages/carouselFigure/editAdvertising.jsx Dosyayı Görüntüle

@@ -28,24 +28,40 @@ import SelectH5 from './SelectH5';
28 28
   let helpVisible = false
29 29
   let groupVisible = false
30 30
   let buildingId = ''
31
+  let cityId = ''
31 32
   let isHaveActive=true
32 33
 
33 34
   const setExtraData = (data) => {
34 35
     isHaveActive=data.isHaveActive
35 36
     if(!isHaveActive) {
36 37
       data.contentType=null
38
+      data.buildingId=null
37 39
     }
38 40
     contentVisible = data.contentType === 'other';
39 41
     activityVisible = data.contentType === 'activity';
40 42
     newsVisible = data.contentType === 'news';
41 43
     helpVisible = data.contentType === 'help';
42 44
     groupVisible = data.contentType === 'group';
43
-
45
+    cityId=data.cityId
44 46
     buildingId = data.buildingId
45 47
   }
46 48
 
49
+  const setExtraData1 = (data) => {
50
+     if(data.title){
51
+         isHaveActive=true
52
+     }else{
53
+        isHaveActive=false
54
+     }
55
+    contentVisible = data.contentType === 'other';
56
+    activityVisible = data.contentType === 'activity';
57
+    newsVisible = data.contentType === 'news';
58
+    helpVisible = data.contentType === 'help';
59
+    groupVisible = data.contentType === 'group';
60
+
61
+  }
62
+
47 63
   const handleFormValueChange = (props, changedValues, allValues) => {
48
-    setExtraData(allValues)
64
+      setExtraData(allValues)
49 65
   }
50 66
 
51 67
   const XForm = createForm({ onValuesChange: handleFormValueChange })
@@ -63,7 +79,7 @@ import SelectH5 from './SelectH5';
63 79
       // 查询列表
64 80
       const getDetail = (contentId) => {
65 81
         request({ ...apis.carsuseFigure.getExtendContent,urlData:{id: contentId}}).then((data) => {
66
-          setExtraData(data)
82
+          setExtraData1(data)
67 83
           setData(data)
68 84
         })
69 85
       }
@@ -77,7 +93,7 @@ import SelectH5 from './SelectH5';
77 93
 
78 94
     const fields = [
79 95
       {
80
-        label: '项目活动',
96
+        label: '是否关联活动',
81 97
         name: 'isHaveActive',
82 98
         type: FieldTypes.Switch,
83 99
         value:isHaveActive,

+ 22
- 3
src/pages/carouselFigure/editCarousel.jsx Dosyayı Görüntüle

@@ -30,6 +30,7 @@ const { MonthPicker, RangePicker, WeekPicker } = DatePicker;
30 30
   let helpVisible = false
31 31
   let groupVisible = false
32 32
   let buildingId = ''
33
+  let cityId=''
33 34
   let locationType = false
34 35
   let isHaveActive=true
35 36
 
@@ -38,6 +39,7 @@ const { MonthPicker, RangePicker, WeekPicker } = DatePicker;
38 39
     isHaveActive=data.isHaveActive
39 40
     if(!isHaveActive) {
40 41
       data.contentType=null
42
+      data.buildingId=null
41 43
     }
42 44
 
43 45
     contentVisible = data.contentType === 'other';
@@ -46,14 +48,31 @@ const { MonthPicker, RangePicker, WeekPicker } = DatePicker;
46 48
     helpVisible = data.contentType === 'help';
47 49
     groupVisible = data.contentType === 'group';
48 50
 
51
+    cityId=data.cityId
49 52
     buildingId = data.buildingId
50 53
     locationType = data.showPosition === 'mall';
51 54
     console.log(locationType, 'locationType');
52 55
   }
53 56
 
57
+  const setExtraData1 = (data) => {
58
+     if(data.title){
59
+        isHaveActive=true
60
+     }else{
61
+        isHaveActive=false
62
+     }
63
+    contentVisible = data.contentType === 'other';
64
+    activityVisible = data.contentType === 'activity';
65
+    newsVisible = data.contentType === 'news';
66
+    helpVisible = data.contentType === 'help';
67
+    groupVisible = data.contentType === 'group';
68
+
69
+    locationType = data.showPosition === 'mall';
70
+    console.log(locationType, 'locationType');
71
+  }
72
+
54 73
 
55 74
   const handleFormValueChange = (props, changedValues, allValues) => {
56
-    setExtraData(allValues)
75
+      setExtraData(allValues)
57 76
   }
58 77
 
59 78
   const XForm = createForm({ onValuesChange: handleFormValueChange })
@@ -73,7 +92,7 @@ const { MonthPicker, RangePicker, WeekPicker } = DatePicker;
73 92
     const getDetail = contentId => {
74 93
       request({ ...apis.carsuseFigure.getExtendContent, urlData: { id: contentId } }).then(data => {
75 94
           console.log(data)
76
-          setExtraData(data)
95
+          setExtraData1(data)
77 96
           setData(data)
78 97
       })
79 98
     }
@@ -87,7 +106,7 @@ const { MonthPicker, RangePicker, WeekPicker } = DatePicker;
87 106
 
88 107
       const fields = [
89 108
         {
90
-          label: '项目活动',
109
+          label: '是否关联活动',
91 110
           name: 'isHaveActive',
92 111
           type: FieldTypes.Switch,
93 112
           value:isHaveActive,