Yansen 2 years ago
parent
commit
1c422ec09a

+ 4
- 1
src/components/map/index.jsx View File

@@ -39,7 +39,10 @@ export default (props) => {
39 39
   React.useEffect(() => {
40 40
     getLocation().then((res) => {
41 41
       setCurPos(res);
42
-      onLocChange([res.longitude, res.latitude].join(','))
42
+
43
+      if (onLocChange) {
44
+        onLocChange([res.longitude, res.latitude].join(','));
45
+      }
43 46
     }).catch((err) => {
44 47
       console.error(err);
45 48
       Taro.showToast({

+ 2
- 2
src/pages/issue/components/Issue/index.jsx View File

@@ -200,7 +200,7 @@ export default (props) => {
200 200
         />
201 201
       </CellGroup>
202 202
 
203
-      {/* <CellGroup style={{marginTop: '20px'}}>        
203
+      <CellGroup style={{marginTop: '20px'}}>        
204 204
         <Cell title="拍照或视频" border={false} />
205 205
 
206 206
         <Cell
@@ -212,7 +212,7 @@ export default (props) => {
212 212
             />
213 213
           }
214 214
         />
215
-      </CellGroup> */}
215
+      </CellGroup>
216 216
 
217 217
       {
218 218
         (showOrg || showExpireDate) && (

+ 11
- 5
src/pages/issue/edit/index.jsx View File

@@ -32,8 +32,8 @@ export default (props) => {
32 32
     // 如果是督察员
33 33
     if (duty == ROLE_INSPECTOR) {
34 34
       return [
35
-        issue?.processNode != 'start' && issue?.processStatus != 'reject',
36
-        issue?.processNode == 'start' || issue?.processStatus == 'reject',
35
+        issue && issue.processNode != 'start' && issue.processStatus != 'reject',
36
+        issue && (issue.processNode == 'start' || issue.processStatus == 'reject'),
37 37
         false,
38 38
         false,
39 39
       ]
@@ -42,10 +42,10 @@ export default (props) => {
42 42
     // 如果是管理员
43 43
     if (duty == ROLE_MANAGER) {
44 44
       return [
45
-        issue?.processNode != 'start',
45
+        issue && issue.processNode != 'start',
46 46
         false,
47
-        issue?.processNode == 'start',
48
-        issue?.processNode == 'start',
47
+        issue && issue.processNode == 'start',
48
+        issue && issue.processNode == 'start',
49 49
       ]
50 50
     }
51 51
 
@@ -62,6 +62,12 @@ export default (props) => {
62 62
     return [];
63 63
   }, [issue, duty]);
64 64
 
65
+  console.log(duty, issue, 
66
+    readOnly,
67
+    canEdit,
68
+    canAssigned,
69
+    canCancel,)
70
+
65 71
   // const onIssueChange = (val = {}) => {
66 72
   //   setIssue({
67 73
   //     ...(issue || {}),