fangmingyue 2 лет назад
Родитель
Сommit
2fe5755995
3 измененных файлов: 72 добавлений и 76 удалений
  1. 1
    2
      src/components/ScrollPage/style.module.less
  2. 2
    2
      src/layouts/index.jsx
  3. 69
    72
      src/pages/check/edit/index.jsx

+ 1
- 2
src/components/ScrollPage/style.module.less Просмотреть файл

@@ -1,11 +1,10 @@
1 1
 .box {
2 2
   display: flex;
3
+  height: calc(100%-100px);
3 4
   .page {
4 5
     flex: 1;
5
-    height: 100%;
6 6
   }
7 7
   .button {
8
-    flex: none;
9 8
     height: 100px;
10 9
   }
11 10
 }

+ 2
- 2
src/layouts/index.jsx Просмотреть файл

@@ -13,7 +13,7 @@ export default (props) => {
13 13
 
14 14
   const { person, user } = useModel('user');
15 15
 
16
-  const conatinerClass = `${laySty['page-conatiner']} ${tabBar ? laySty['with-tabbar'] : ''} ${className}`;
16
+  const containerClass = `${laySty['page-conatiner']} ${tabBar ? laySty['with-tabbar'] : ''} ${className}`;
17 17
 
18 18
   React.useEffect(() => {
19 19
     if (person && !user) {
@@ -30,7 +30,7 @@ export default (props) => {
30 30
     <View className={laySty['page-wrapper']}>
31 31
       <Notify id="vanNotify" />
32 32
       <NavLoading loading={loading} />
33
-      <View className={conatinerClass} style={style}>
33
+      <View className={containerClass} style={style}>
34 34
         {
35 35
           !person && (
36 36
             <View className={laySty.loading}>

+ 69
- 72
src/pages/check/edit/index.jsx Просмотреть файл

@@ -37,11 +37,10 @@ export default (props) => {
37 37
   });
38 38
 
39 39
   const [showLocType, setShowLocType] = React.useState(false);
40
-  const [evaluationPage, setEvaluationPage] = React.useState(true);
40
+  const [evaluationPage, setEvaluationPage] = React.useState(false);
41 41
   const [evaluationPage2, setEvaluationPage2] = React.useState(false);
42
-  const [evaluationPage3, setEvaluationPage3] = React.useState(false);
43
-  const [scrollPage, setScrollPage] = React.useState(false);
44
-
42
+  const [evaluationPage3, setEvaluationPage3] = React.useState(true);
43
+  console.log('fff', evaluationPage3);
45 44
   const onLocTypeChange = (_, it) => {
46 45
     setFormData({
47 46
       ...formData,
@@ -66,17 +65,19 @@ export default (props) => {
66 65
   const onChangePage2 = () => {
67 66
     setEvaluationPage2(false);
68 67
     setEvaluationPage3(true);
68
+    console.log('ff', evaluationPage3);
69 69
   }
70 70
 
71
+
72
+
71 73
   const onChangePage3 = () => {
72 74
     setEvaluationPage3(false);
73
-    setScrollPage(true);
74 75
   }
75 76
 
76 77
   return (
77 78
     <>
78 79
       <Page>
79
-        {
80
+        {/* {
80 81
           evaluationPage && (<>
81 82
             <LocType
82 83
               show={showLocType}
@@ -172,81 +173,77 @@ export default (props) => {
172 173
                 </View>
173 174
               </View>
174 175
             </View>)
175
-        }
176
+        } */}
176 177
 
177 178
         {
178 179
           evaluationPage3 && (
179
-            <ScrollPage>
180
-              <CellGroup>
181
-                <Cell title="测评内容" border={false} size="large" style={{ paddingBottom: '0px' }} />
182
-                <View style={{ padding: 'var(--main-space)', paddingTop: '0px' }}>
183
-                  <View style={{ padding: 'var(--main-space)', fontSize: '14px', color: 'var(--main-bg-color)' }}>
184
-                    垃圾乱扔,乱张贴(具体标准),测评结果:<Input type="text" style={{ width: '45px', display: 'inline-block', verticalAlign: 'middle' }} />处。(此处填写数字)
180
+            <>
181
+              <ScrollPage>
182
+                <CellGroup>
183
+                  <Cell title="测评内容" border={false} size="large" style={{ paddingBottom: '0px' }} />
184
+                  <View style={{ padding: 'var(--main-space)', paddingTop: '0px' }}>
185
+                    <View style={{ padding: 'var(--main-space)', fontSize: '14px', color: 'var(--main-bg-color)' }}>
186
+                      垃圾乱扔,乱张贴(具体标准),测评结果:<Input type="text" style={{ width: '45px', display: 'inline-block', verticalAlign: 'middle' }} />处。(此处填写数字)
187
+                    </View>
185 188
                   </View>
186
-                </View>
187
-              </CellGroup>
188
-
189
-              <CellGroup>
190
-                <Cell title="评测标准" border={false} size="large" />
191
-                <Row>
192
-                  <Col offset="2" span="20">
193
-                    <Cell
194
-                      title="
189
+                </CellGroup>
190
+
191
+                <CellGroup>
192
+                  <Cell title="评测标准" border={false} size="large" />
193
+                  <Row>
194
+                    <Col offset="2" span="20">
195
+                      <Cell
196
+                        title="
195 197
                     (1)每看到1处垃圾乱扔(1平方米以内的垃圾算作1处)计为1处;
196 198
                     (2)每看到1处乱张贴乱涂写乱刻画《1平米内出现的算作1 处在统一设置的信息栏中张贴的小广告不算作失分点)计为1处;
197 199
                     (3)每看到建筑物外立面的1处大面积破损污损《高3米以上、宽2米以上)计为1处。"
198
-                      border={false}
199
-                      style={{ paddingTop: '0px' }}
200
-                    />
201
-                  </Col>
202
-                </Row>
203
-              </CellGroup>
204
-
205
-              <CellGroup style={{ marginTop: '20px' }}>
206
-                <Cell title="拍照" border={false} size="large" />
207
-
208
-                <Cell
209
-                  renderTitle={
210
-                    <Uploader
211
-                      value={formData.attachList}
212
-                      disabled={readOnly}
213
-                      onChange={e => setFieldChange('attachList', e)}
214
-                    />
215
-                  }
216
-                />
217
-              </CellGroup>
218
-
219
-              <CellGroup style={{ marginTop: '20px', padding: 'var(--main-space)' }}>
220
-                <Row>
221
-                  <Col offset="1" span="10">
222
-                    <Button
223
-                      type="primary"
224
-                      block
225
-                    >
226
-                      上一题
227
-                    </Button>
228
-                  </Col>
229
-                  <Col offset="2" span="10">
230
-                    <Button
231
-                      type="primary"
232
-                      block
233
-                      onClick={onChangePage3}
234
-                    >
235
-                      下一题
236
-                    </Button>
237
-                  </Col>
238
-                </Row>
239
-              </CellGroup>
240
-            </ScrollPage>)
241
-        }
242
-      </Page >
243
-      <View>
244
-        {
245
-          scrollPage && (
246
-            <ScrollPage />
200
+                        border={false}
201
+                        style={{ paddingTop: '0px' }}
202
+                      />
203
+                    </Col>
204
+                  </Row>
205
+                </CellGroup>
206
+
207
+                <CellGroup style={{ marginTop: '20px' }}>
208
+                  <Cell title="拍照" border={false} size="large" />
209
+
210
+                  <Cell
211
+                    renderTitle={
212
+                      <Uploader
213
+                        value={formData.attachList}
214
+                        disabled={readOnly}
215
+                        onChange={e => setFieldChange('attachList', e)}
216
+                      />
217
+                    }
218
+                  />
219
+                </CellGroup>
220
+
221
+                <CellGroup style={{ marginTop: '20px', padding: 'var(--main-space)' }}>
222
+                  <Row>
223
+                    <Col offset="1" span="10">
224
+                      <Button
225
+                        type="primary"
226
+                        block
227
+                      >
228
+                        上一题
229
+                      </Button>
230
+                    </Col>
231
+                    <Col offset="2" span="10">
232
+                      <Button
233
+                        type="primary"
234
+                        block
235
+                      // onClick={onChangePage3}
236
+                      >
237
+                        下一题
238
+                      </Button>
239
+                    </Col>
240
+                  </Row>
241
+                </CellGroup>
242
+              </ScrollPage>
243
+            </>
247 244
           )
248 245
         }
249
-      </View>
246
+      </Page >
250 247
     </>
251 248
   )
252 249
 }