Yansen 2 年之前
父節點
當前提交
e34bcac963
共有 3 個檔案被更改,包括 12 行新增14 行删除
  1. 1
    1
      src/components/map/index.jsx
  2. 2
    1
      src/pages/issue/components/Issue/index.jsx
  3. 9
    12
      src/pages/issue/edit/index.jsx

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

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

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

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

+ 9
- 12
src/pages/issue/edit/index.jsx 查看文件

@@ -66,18 +66,14 @@ export default (props) => {
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 77
   }, [issue, duty]);
82 78
 
83 79
   // const onIssueChange = (val = {}) => {
@@ -113,6 +109,7 @@ export default (props) => {
113 109
   return (
114 110
     <Page roles={[ROLE_INSPECTOR, ROLE_MANAGER, ROLE_CITIZEN, ROLE_QUERY_PERSON]} loading={loading}>
115 111
       <IssueForm
112
+        issueId={id}
116 113
         issue={issue}
117 114
         readOnly={readOnly}
118 115
         showOrg={showOrg}