张涛 1 year ago
parent
commit
8cda2b5a2b

+ 5
- 1
config/prod.js View File

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

+ 17
- 8
src/pages/check/edit/components/Question.jsx View File

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

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

+ 2
- 1
src/pages/check/list/index.jsx View File

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

+ 8
- 7
src/pages/check/loc/edit/components/Question.jsx View File

38
       });
38
       });
39
     }
39
     }
40
   }, [quInfo?.quId]);
40
   }, [quInfo?.quId]);
41
-  
41
+
42
+  // console.log('----------------方方--quInfo------------>', quInfo);
42
   return (
43
   return (
43
     <View>
44
     <View>
44
       <RadioGroup value={answerItem?.answerCode}>
45
       <RadioGroup value={answerItem?.answerCode}>
46
           <Cell
47
           <Cell
47
             border={false}
48
             border={false}
48
             renderTitle={(
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
                 <Text>{quInfo?.title}</Text>
52
                 <Text>{quInfo?.title}</Text>
52
               </View>
53
               </View>
53
             )}
54
             )}
66
             )
67
             )
67
           }
68
           }
68
           {
69
           {
69
-            (quInfo?.answerList || []).map((it) => {              
70
+            (quInfo?.answerList || []).map((it) => {
70
               return (
71
               return (
71
                 <Cell
72
                 <Cell
72
                   key={it.answerId}
73
                   key={it.answerId}
81
           }
82
           }
82
         </CellGroup>
83
         </CellGroup>
83
       </RadioGroup>
84
       </RadioGroup>
84
-      <CellGroup style={{marginTop: '20px'}}>
85
+      <CellGroup style={{ marginTop: '20px' }}>
85
         <Cell title="测评标准" />
86
         <Cell title="测评标准" />
86
         <Cell
87
         <Cell
87
           renderTitle={
88
           renderTitle={
89
           }
90
           }
90
         />
91
         />
91
       </CellGroup>
92
       </CellGroup>
92
-      <CellGroup style={{marginTop: '20px'}}>        
93
+      <CellGroup style={{ marginTop: '20px' }}>
93
         <Cell title="拍照或视频" border={false} />
94
         <Cell title="拍照或视频" border={false} />
94
 
95
 
95
         <Cell
96
         <Cell
97
             <Uploader
98
             <Uploader
98
               disabled={readonly}
99
               disabled={readonly}
99
               value={answerItem?.attachList}
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 View File

49
   const onAnswerItemChange = (answerItem, quInfo) => {
49
   const onAnswerItemChange = (answerItem, quInfo) => {
50
     if (!answerItem) return;
50
     if (!answerItem) return;
51
 
51
 
52
-    const an = {...(answer || {})}
52
+    const an = { ...(answer || {}) }
53
     const answerItemList = an.answerItemList || []
53
     const answerItemList = an.answerItemList || []
54
 
54
 
55
     if ((answerItem.answerCode || answerItem.answer) &&
55
     if ((answerItem.answerCode || answerItem.answer) &&
56
       answerItem.attachList?.length) {
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
     setQuList(quList.map(x => x.quId == quInfo.quId ? quInfo : x));
64
     setQuList(quList.map(x => x.quId == quInfo.quId ? quInfo : x));
65
 
65
 
104
       setLoading(false);
104
       setLoading(false);
105
       const t = setTimeout(() => {
105
       const t = setTimeout(() => {
106
         clearTimeout(t);
106
         clearTimeout(t);
107
-        Taro.navigateBack({delta: 1});
108
-      }, 1000);      
107
+        Taro.navigateBack({ delta: 1 });
108
+      }, 1000);
109
     }).catch(() => {
109
     }).catch(() => {
110
       setLoading(false);
110
       setLoading(false);
111
     });
111
     });
120
           type: 'warning',
120
           type: 'warning',
121
         })
121
         })
122
 
122
 
123
-        Taro.navigateBack({delta: 1})
123
+        Taro.navigateBack({ delta: 1 })
124
         return;
124
         return;
125
       }
125
       }
126
 
126
 
136
       getTaCheckItemById(id).then(res => {
136
       getTaCheckItemById(id).then(res => {
137
         setCheckItemInfo(res);
137
         setCheckItemInfo(res);
138
       });
138
       });
139
-      
139
+
140
       // 查询我的答案
140
       // 查询我的答案
141
       getTaCheckItemAnswer(id).then(setAnswer);
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
         setLoading(false);
146
         setLoading(false);
146
         setQuList(res.records || []);
147
         setQuList(res.records || []);
147
       }).catch(() => {
148
       }).catch(() => {
151
       setLoading(false);
152
       setLoading(false);
152
     });
153
     });
153
   }, [id]);
154
   }, [id]);
154
-  
155
+  // console.log('--------id---------->', id);
156
+  // console.log('--------方方--quList------>>>>>>>', quList);
155
   return (
157
   return (
156
     <Page loading={loading} roles={[ROLE_INSPECTOR]}>
158
     <Page loading={loading} roles={[ROLE_INSPECTOR]}>
157
       <VABC
159
       <VABC
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
         </ScrollView>
204
         </ScrollView>
204
       </VABC>
205
       </VABC>
205
     </Page>
206
     </Page>