Yansen 2 anos atrás
pai
commit
e34bcac963

+ 1
- 1
src/components/map/index.jsx Ver arquivo

13
 export default (props) => {
13
 export default (props) => {
14
   const { readOnly, location, onChange } = props;
14
   const { readOnly, location, onChange } = props;
15
 
15
 
16
-  console.log('-----map---readOnly---', readOnly);
16
+  console.log('-----map---readOnly---', readOnly, location);
17
 
17
 
18
   const id = React.useMemo(() => `map-${Math.random().toString(36).substring(2, 10)}`, []);
18
   const id = React.useMemo(() => `map-${Math.random().toString(36).substring(2, 10)}`, []);
19
   const idReadOnly = React.useMemo(() => `map-${Math.random().toString(36).substring(2, 10)}`, []);
19
   const idReadOnly = React.useMemo(() => `map-${Math.random().toString(36).substring(2, 10)}`, []);

+ 2
- 1
src/pages/issue/components/Issue/index.jsx Ver arquivo

18
 
18
 
19
 export default (props) => {
19
 export default (props) => {
20
   const {
20
   const {
21
+    issueId,
21
     issue,
22
     issue,
22
     readOnly,
23
     readOnly,
23
     showOrg,
24
     showOrg,
146
 
147
 
147
       {/* 地图只在新增的时候允许修改 */}
148
       {/* 地图只在新增的时候允许修改 */}
148
       <Map
149
       <Map
149
-        readOnly={issue?.issueId}
150
+        readOnly={!!issueId}
150
         location={formData.location}
151
         location={formData.location}
151
         onChange={e => !formData.location && setFieldChange('location', e)}
152
         onChange={e => !formData.location && setFieldChange('location', e)}
152
       />
153
       />

+ 9
- 12
src/pages/issue/edit/index.jsx Ver arquivo

66
       ]
66
       ]
67
     }
67
     }
68
 
68
 
69
-    // 如果是市民 或者查询员
70
-    if (duty == ROLE_CITIZEN || duty == ROLE_QUERY_PERSON) {
71
-      return [
72
-        true,
73
-        false,
74
-        false,
75
-        false,
76
-        false,
77
-      ]
78
-    }
79
-
80
-    return [];
69
+    // 其他人员
70
+    return [
71
+      true,
72
+      false,
73
+      false,
74
+      false,
75
+      false,
76
+    ]
81
   }, [issue, duty]);
77
   }, [issue, duty]);
82
 
78
 
83
   // const onIssueChange = (val = {}) => {
79
   // const onIssueChange = (val = {}) => {
113
   return (
109
   return (
114
     <Page roles={[ROLE_INSPECTOR, ROLE_MANAGER, ROLE_CITIZEN, ROLE_QUERY_PERSON]} loading={loading}>
110
     <Page roles={[ROLE_INSPECTOR, ROLE_MANAGER, ROLE_CITIZEN, ROLE_QUERY_PERSON]} loading={loading}>
115
       <IssueForm
111
       <IssueForm
112
+        issueId={id}
116
         issue={issue}
113
         issue={issue}
117
         readOnly={readOnly}
114
         readOnly={readOnly}
118
         showOrg={showOrg}
115
         showOrg={showOrg}