Yansen 2 年前
父节点
当前提交
1c422ec09a
共有 3 个文件被更改,包括 17 次插入8 次删除
  1. 4
    1
      src/components/map/index.jsx
  2. 2
    2
      src/pages/issue/components/Issue/index.jsx
  3. 11
    5
      src/pages/issue/edit/index.jsx

+ 4
- 1
src/components/map/index.jsx 查看文件

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

+ 2
- 2
src/pages/issue/components/Issue/index.jsx 查看文件

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

+ 11
- 5
src/pages/issue/edit/index.jsx 查看文件

32
     // 如果是督察员
32
     // 如果是督察员
33
     if (duty == ROLE_INSPECTOR) {
33
     if (duty == ROLE_INSPECTOR) {
34
       return [
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
         false,
37
         false,
38
         false,
38
         false,
39
       ]
39
       ]
42
     // 如果是管理员
42
     // 如果是管理员
43
     if (duty == ROLE_MANAGER) {
43
     if (duty == ROLE_MANAGER) {
44
       return [
44
       return [
45
-        issue?.processNode != 'start',
45
+        issue && issue.processNode != 'start',
46
         false,
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
     return [];
62
     return [];
63
   }, [issue, duty]);
63
   }, [issue, duty]);
64
 
64
 
65
+  console.log(duty, issue, 
66
+    readOnly,
67
+    canEdit,
68
+    canAssigned,
69
+    canCancel,)
70
+
65
   // const onIssueChange = (val = {}) => {
71
   // const onIssueChange = (val = {}) => {
66
   //   setIssue({
72
   //   setIssue({
67
   //     ...(issue || {}),
73
   //     ...(issue || {}),