张涛 преди 1 година
родител
ревизия
8cda2b5a2b

+ 5
- 1
config/prod.js Целия файл

@@ -3,11 +3,15 @@ module.exports = {
3 3
     NODE_ENV: '"production"'
4 4
   },
5 5
   defineConstants: {
6
+<<<<<<< HEAD
6 7
     // HOST: '"http://192.168.89.25:9087"',
8
+=======
9
+    // HOST: '"http://192.168.89.147:9087"',
10
+>>>>>>> 5ab9f7c14c635202431490cc583c16a77f4f47a2
7 11
     HOST: '"https://wmcj.huoshannews.com"',
8 12
     AD_IMAGE: '"https://h5.njyunzhi.com/images/citizen_banner.png"',
9 13
     DEFAULT_POS: '"116.3476917447715,31.409912844296578"', // 霍山县人民政府 gcj02
10
-    VERSION: '"1.1.22-20230413"',
14
+    VERSION: '"1.1.24-20230516"',
11 15
   },
12 16
   mini: {},
13 17
   h5: {

+ 17
- 8
src/pages/check/edit/components/Question.jsx Целия файл

@@ -16,6 +16,11 @@ export default (props) => {
16 16
   }
17 17
 
18 18
   const setFieldChange = (key, val) => {
19
+    // console.log('--------answerItem----------->', answerItem);
20
+    // console.log('--------key----------->', key);
21
+    // console.log('--------val----------->', val);
22
+
23
+
19 24
     if (readonly) return;
20 25
 
21 26
     onChange({
@@ -38,7 +43,7 @@ export default (props) => {
38 43
   //     });
39 44
   //   }
40 45
   // }, [quInfo?.quId]);
41
-  
46
+  console.log('------------>h');
42 47
   return (
43 48
     <View>
44 49
       <RadioGroup value={answerItem?.answerCode}>
@@ -46,7 +51,7 @@ export default (props) => {
46 51
           <Cell
47 52
             border={false}
48 53
             renderTitle={(
49
-              <View style={{fontWeight: 'bold'}}>
54
+              <View style={{ fontWeight: 'bold' }}>
50 55
                 <Text>{quInfo?.sortNo}、</Text>
51 56
                 <Text>{quInfo?.title}</Text>
52 57
               </View>
@@ -66,7 +71,7 @@ export default (props) => {
66 71
             )
67 72
           }
68 73
           {
69
-            (quInfo?.answerList || []).map((it) => {              
74
+            (quInfo?.answerList || []).map((it) => {
70 75
               return (
71 76
                 <Cell
72 77
                   key={it.answerId}
@@ -84,7 +89,7 @@ export default (props) => {
84 89
       {
85 90
         checkType != 'survey' && (
86 91
           <>
87
-            <CellGroup style={{marginTop: '20px'}}>
92
+            <CellGroup style={{ marginTop: '20px' }}>
88 93
               <Cell title="测评标准" />
89 94
               <Cell
90 95
                 renderTitle={
@@ -92,15 +97,19 @@ export default (props) => {
92 97
                 }
93 98
               />
94 99
             </CellGroup>
95
-            <CellGroup style={{marginTop: '20px'}}>        
96
-              <Cell title="拍照或视频" border={false} />
97
-      
100
+            <CellGroup style={{ marginTop: '20px' }}>
101
+              <Cell renderTitle={
102
+                <><Text style={{ color: 'red' }}>* </Text> <Text>拍照或视频</Text></>
103
+              }
104
+                border={false}
105
+              />
106
+
98 107
               <Cell
99 108
                 renderTitle={
100 109
                   <Uploader
101 110
                     disabled={readonly}
102 111
                     value={answerItem?.attachList}
103
-                    onChange={e => setFieldChange('attachList',e)}
112
+                    onChange={e => setFieldChange('attachList', e)}
104 113
                   />
105 114
                 }
106 115
               />

+ 2
- 2
src/pages/check/edit/index.jsx Целия файл

@@ -106,7 +106,7 @@ export default (props) => {
106 106
     const finished = quList.filter(x => x.finished).length == quList.length;
107 107
     if (!answer || !answer.answerItemList || !finished) {
108 108
       Notify.show({
109
-        message: '请作答完成所有题目',
109
+        message: '请作答完成所有题目即照片',
110 110
         type: 'warning',
111 111
       })
112 112
       return;
@@ -193,6 +193,7 @@ export default (props) => {
193 193
     }
194 194
   }, [checkItemInfo]);
195 195
 
196
+  // console.log('--------------quList---------------->', quList);
196 197
   return (
197 198
     <Page loading={loading} roles={[ROLE_INSPECTOR]}>
198 199
       <VABC
@@ -222,7 +223,6 @@ export default (props) => {
222 223
           {
223 224
             quList.map((x, inx) => {
224 225
               const answerItem = answer?.answerItemList?.filter(y => y.quId == x.quId)[0];
225
-
226 226
               return (
227 227
                 index == inx && (
228 228
                   <Question

+ 2
- 1
src/pages/check/list/index.jsx Целия файл

@@ -8,13 +8,14 @@ import PowerList from '@/components/PowerList';
8 8
 import { getTaCheck } from '@/services/tacheck';
9 9
 import Card from './components/Card';
10 10
 
11
-const queryParams = {isValid: true};
11
+const queryParams = { isValid: true };
12 12
 const sid1 = Math.random().toString(36).substring(2, 8);
13 13
 
14 14
 export default (props) => {
15 15
 
16 16
   const onClick = (typ, item) => {
17 17
     if (typ == 'loc') {
18
+      console.log('------xiaofang----->');
18 19
       Taro.navigateTo({
19 20
         url: `/pages/check/loc/list/index?checkId=${item.checkId}`
20 21
       })

+ 8
- 7
src/pages/check/loc/edit/components/Question.jsx Целия файл

@@ -38,7 +38,8 @@ export default (props) => {
38 38
       });
39 39
     }
40 40
   }, [quInfo?.quId]);
41
-  
41
+
42
+  // console.log('----------------方方--quInfo------------>', quInfo);
42 43
   return (
43 44
     <View>
44 45
       <RadioGroup value={answerItem?.answerCode}>
@@ -46,8 +47,8 @@ export default (props) => {
46 47
           <Cell
47 48
             border={false}
48 49
             renderTitle={(
49
-              <View style={{fontWeight: 'bold'}}>
50
-                <Text>{quInfo?.sortNo}、</Text>
50
+              <View style={{ fontWeight: 'bold' }}>
51
+                <Text style={{ color: '#999' }}>{quInfo?.sortNo}、</Text>
51 52
                 <Text>{quInfo?.title}</Text>
52 53
               </View>
53 54
             )}
@@ -66,7 +67,7 @@ export default (props) => {
66 67
             )
67 68
           }
68 69
           {
69
-            (quInfo?.answerList || []).map((it) => {              
70
+            (quInfo?.answerList || []).map((it) => {
70 71
               return (
71 72
                 <Cell
72 73
                   key={it.answerId}
@@ -81,7 +82,7 @@ export default (props) => {
81 82
           }
82 83
         </CellGroup>
83 84
       </RadioGroup>
84
-      <CellGroup style={{marginTop: '20px'}}>
85
+      <CellGroup style={{ marginTop: '20px' }}>
85 86
         <Cell title="测评标准" />
86 87
         <Cell
87 88
           renderTitle={
@@ -89,7 +90,7 @@ export default (props) => {
89 90
           }
90 91
         />
91 92
       </CellGroup>
92
-      <CellGroup style={{marginTop: '20px'}}>        
93
+      <CellGroup style={{ marginTop: '20px' }}>
93 94
         <Cell title="拍照或视频" border={false} />
94 95
 
95 96
         <Cell
@@ -97,7 +98,7 @@ export default (props) => {
97 98
             <Uploader
98 99
               disabled={readonly}
99 100
               value={answerItem?.attachList}
100
-              onChange={e => setFieldChange('attachList',e)}
101
+              onChange={e => setFieldChange('attachList', e)}
101 102
             />
102 103
           }
103 104
         />

+ 49
- 48
src/pages/check/loc/edit/index.jsx Целия файл

@@ -49,17 +49,17 @@ export default (props) => {
49 49
   const onAnswerItemChange = (answerItem, quInfo) => {
50 50
     if (!answerItem) return;
51 51
 
52
-    const an = {...(answer || {})}
52
+    const an = { ...(answer || {}) }
53 53
     const answerItemList = an.answerItemList || []
54 54
 
55 55
     if ((answerItem.answerCode || answerItem.answer) &&
56 56
       answerItem.attachList?.length) {
57
-        // 说明这一题已经回答完毕
58
-        quInfo.finished = true
59
-      } else {
60
-        quInfo.finished = false
61
-      }
62
-    
57
+      // 说明这一题已经回答完毕
58
+      quInfo.finished = true
59
+    } else {
60
+      quInfo.finished = false
61
+    }
62
+
63 63
     // 更新问题列表中是否作答的标志位
64 64
     setQuList(quList.map(x => x.quId == quInfo.quId ? quInfo : x));
65 65
 
@@ -104,8 +104,8 @@ export default (props) => {
104 104
       setLoading(false);
105 105
       const t = setTimeout(() => {
106 106
         clearTimeout(t);
107
-        Taro.navigateBack({delta: 1});
108
-      }, 1000);      
107
+        Taro.navigateBack({ delta: 1 });
108
+      }, 1000);
109 109
     }).catch(() => {
110 110
       setLoading(false);
111 111
     });
@@ -120,7 +120,7 @@ export default (props) => {
120 120
           type: 'warning',
121 121
         })
122 122
 
123
-        Taro.navigateBack({delta: 1})
123
+        Taro.navigateBack({ delta: 1 })
124 124
         return;
125 125
       }
126 126
 
@@ -136,12 +136,13 @@ export default (props) => {
136 136
       getTaCheckItemById(id).then(res => {
137 137
         setCheckItemInfo(res);
138 138
       });
139
-      
139
+
140 140
       // 查询我的答案
141 141
       getTaCheckItemAnswer(id).then(setAnswer);
142
-  
142
+
143 143
       // 查询当前测评主记录的所有问题
144
-      getTaCheckItemQu({pageSize: 200, itemId: id}).then(res => {
144
+      getTaCheckItemQu({ pageSize: 200, itemId: id }).then(res => {
145
+        console.log('---------->res------------->', res);
145 146
         setLoading(false);
146 147
         setQuList(res.records || []);
147 148
       }).catch(() => {
@@ -151,7 +152,8 @@ export default (props) => {
151 152
       setLoading(false);
152 153
     });
153 154
   }, [id]);
154
-  
155
+  // console.log('--------id---------->', id);
156
+  // console.log('--------方方--quList------>>>>>>>', quList);
155 157
   return (
156 158
     <Page loading={loading} roles={[ROLE_INSPECTOR]}>
157 159
       <VABC
@@ -165,41 +167,40 @@ export default (props) => {
165 167
           />
166 168
         )}
167 169
       >
168
-        <ScrollView scrollY style={{height: '100%'}}>
169
-        {
170
-          index == -1 && (
171
-            <LocForm
172
-              readonly={readonly}
173
-              checkItemInfo={checkItemInfo}
174
-              answer={answer}
175
-              onChange={setAnswer}
176
-              onLoadingChange={setLoading}
177
-            />
178
-          )
179
-        }
180
-        {
181
-          quList.map((x, inx) => {
182
-            const answerItem = answer?.answerItemList?.filter(y => y.quId == x.quId)[0];
183
-
184
-            return (
185
-              index == inx && (
186
-                <Question
187
-                  key={x.quId}
188
-                  cursor={inx}
189
-                  readonly={readonly}
190
-                  quInfo={x}
191
-                  answerItem={answerItem}
192
-                  total={quList?.length}
193
-                  onChange={e => onAnswerItemChange(e, x)}
194
-                  onPrev={() => onIndexChange(null, -1)}
195
-                  onNext={() => onIndexChange(null, 1)}
196
-                  onLoadingChange={setLoading}
197
-                />
198
-              )
170
+        <ScrollView scrollY style={{ height: '100%' }}>
171
+          {
172
+            index == -1 && (
173
+              <LocForm
174
+                readonly={readonly}
175
+                checkItemInfo={checkItemInfo}
176
+                answer={answer}
177
+                onChange={setAnswer}
178
+                onLoadingChange={setLoading}
179
+              />
199 180
             )
200
-          })
201
-        }
202
-          
181
+          }
182
+          {
183
+            quList.map((x, inx) => {
184
+              const answerItem = answer?.answerItemList?.filter(y => y.quId == x.quId)[0];
185
+              return (
186
+                index == inx && (
187
+                  <Question
188
+                    key={x.quId}
189
+                    cursor={inx}
190
+                    readonly={readonly}
191
+                    quInfo={x}
192
+                    answerItem={answerItem}
193
+                    total={quList?.length}
194
+                    onChange={e => onAnswerItemChange(e, x)}
195
+                    onPrev={() => onIndexChange(null, -1)}
196
+                    onNext={() => onIndexChange(null, 1)}
197
+                    onLoadingChange={setLoading}
198
+                  />
199
+                )
200
+              )
201
+            })
202
+          }
203
+
203 204
         </ScrollView>
204 205
       </VABC>
205 206
     </Page>