李志伟 преди 3 години
родител
ревизия
c32c2efdbb

+ 69
- 60
config/routes.js Целия файл

@@ -43,21 +43,20 @@ export default [
43 43
     ],
44 44
   },
45 45
   {
46
-    path: '/PlatformMessageManagement',
47
-    name: '消息管理',
48
-    icon: 'MailOutlined',
46
+    path: '/MonitoringScreen',
47
+    name: '农机作业监控大屏',
48
+    icon: 'DesktopOutlined',
49 49
     component: '../layouts/BasicLayout',
50 50
     routes: [
51 51
       {
52
-        path: '/PlatformMessageManagement/MessageManageList',
53
-        name: '平台消息管理',
54
-        icon: 'smile',
55
-        component: './PlatformMessageManagement/MessageManageList',
52
+        path: '/MonitoringScreen/index.jsx',
53
+        name: '数据大屏',
54
+        component: './MonitoringScreen',
56 55
       },
57 56
       {
58
-        path: '/PlatformMessageManagement/MessageEdit',
59
-        name: '消息查看',
60
-        component: './PlatformMessageManagement/MessageEdit',
57
+        path: '/MonitoringScreen/detail.jsx',
58
+        name: '农机轨迹',
59
+        component: './MonitoringScreen/detail.jsx',
61 60
         hideInMenu: true,
62 61
       },
63 62
     ],
@@ -105,33 +104,30 @@ export default [
105 104
     ],
106 105
   },
107 106
   {
108
-    path: '/Machinery',
109
-    name: '农机管理',
110
-    icon: 'CarOutlined',
107
+    path: '/GPSDevice',
108
+    name: 'GPS设备管理',
109
+    icon: 'CompassOutlined',
111 110
     component: '../layouts/BasicLayout',
112 111
     routes: [
113 112
       {
114
-        path: '/Machinery/Cooperative',
115
-        name: '合作社列表',
116
-        component: './Machinery/Cooperative',
117
-      },
118
-      {
119
-        path: '/Machinery/Cooperative/edit.jsx',
120
-        name: '合作社编辑',
121
-        component: './Machinery/Cooperative/edit.jsx',
122
-        hideInMenu: true,
123
-      },
124
-      {
125
-        path: '/Machinery/Employees',
126
-        name: '员工列表',
127
-        component: './Machinery/Employees',
113
+        path: '/GPSDevice/GPS',
114
+        name: 'GPS管理',
115
+        component: './GPSDevice/GPS',
128 116
       },
129 117
       {
130
-        path: '/Machinery/Employees/edit.jsx',
131
-        name: '员工编辑',
132
-        component: './Machinery/Employees/edit.jsx',
118
+        path: '/GPSDevice/GPS/GPSEdit',
119
+        name: '新增设备',
120
+        component: './GPSDevice/GPS/GPSEdit',
133 121
         hideInMenu: true,
134 122
       },
123
+    ],
124
+  },
125
+  {
126
+    path: '/Machinery',
127
+    name: '农机管理',
128
+    icon: 'CarOutlined',
129
+    component: '../layouts/BasicLayout',
130
+    routes: [
135 131
       {
136 132
         path: '/Machinery/MachineryType',
137 133
         name: '农机分类列表',
@@ -151,20 +147,20 @@ export default [
151 147
     ],
152 148
   },
153 149
   {
154
-    path: '/MonitoringScreen',
155
-    name: '农机监控大屏',
156
-    icon: 'DesktopOutlined',
150
+    path: '/MachineryStatistics',
151
+    name: '农机统计',
152
+    icon: 'CompassOutlined',
157 153
     component: '../layouts/BasicLayout',
158 154
     routes: [
159 155
       {
160
-        path: '/MonitoringScreen/index.jsx',
161
-        name: '农机监控大屏',
162
-        component: './MonitoringScreen',
156
+        path: '/MachineryStatistics',
157
+        name: '农机统计',
158
+        component: './MachineryStatistics',
163 159
       },
164 160
       {
165
-        path: '/MonitoringScreen/detail.jsx',
166
-        name: '农机轨迹',
167
-        component: './MonitoringScreen/detail.jsx',
161
+        path: '/GPSDevice/GPS/GPSEdit',
162
+        name: '新增设备',
163
+        component: './GPSDevice/GPS/GPSEdit',
168 164
         hideInMenu: true,
169 165
       },
170 166
     ],
@@ -197,13 +193,13 @@ export default [
197 193
   },
198 194
   {
199 195
     path: '/JobWarning',
200
-    name: '作业预警',
196
+    name: '作业监管',
201 197
     icon: 'AlertOutlined',
202 198
     component: '../layouts/BasicLayout',
203 199
     routes: [
204 200
       {
205 201
         path: '/JobWarning/index.jsx',
206
-        name: '作业预警',
202
+        name: '预警监管',
207 203
         component: './JobWarning',
208 204
       },
209 205
     ],
@@ -231,6 +227,26 @@ export default [
231 227
       },
232 228
     ],
233 229
   },
230
+  {
231
+    path: '/PlatformMessageManagement',
232
+    name: '消息管理',
233
+    icon: 'MailOutlined',
234
+    component: '../layouts/BasicLayout',
235
+    routes: [
236
+      {
237
+        path: '/PlatformMessageManagement/MessageManageList',
238
+        name: '平台消息管理',
239
+        icon: 'smile',
240
+        component: './PlatformMessageManagement/MessageManageList',
241
+      },
242
+      {
243
+        path: '/PlatformMessageManagement/MessageEdit',
244
+        name: '消息查看',
245
+        component: './PlatformMessageManagement/MessageEdit',
246
+        hideInMenu: true,
247
+      },
248
+    ],
249
+  },
234 250
   {
235 251
     path: '/Finance',
236 252
     name: '财务管理',
@@ -249,40 +265,33 @@ export default [
249 265
       },
250 266
     ],
251 267
   },
268
+
252 269
   {
253
-    path: '/GPSDevice',
254
-    name: 'GPS设备管理',
255
-    icon: 'CompassOutlined',
270
+    path: '/SystemManagement',
271
+    name: '系统管理',
272
+    icon: 'SettingOutlined',
256 273
     component: '../layouts/BasicLayout',
257 274
     routes: [
258 275
       {
259
-        path: '/GPSDevice/GPS',
260
-        name: 'GPS管理',
261
-        component: './GPSDevice/GPS',
276
+        path: '/SystemManagement/Cooperative',
277
+        name: '机构列表',
278
+        component: './SystemManagement/Cooperative',
262 279
       },
263 280
       {
264
-        path: '/GPSDevice/GPS/GPSEdit',
265
-        name: '新增设备',
266
-        component: './GPSDevice/GPS/GPSEdit',
281
+        path: '/SystemManagement/Cooperative/edit.jsx',
282
+        name: '机构编辑',
283
+        component: './SystemManagement/Cooperative/edit.jsx',
267 284
         hideInMenu: true,
268 285
       },
269
-    ],
270
-  },
271
-  {
272
-    path: '/SystemManagement',
273
-    name: '系统管理',
274
-    icon: 'SettingOutlined',
275
-    component: '../layouts/BasicLayout',
276
-    routes: [
277 286
       {
278 287
         path: '/SystemManagement/Administrator',
279
-        name: '管理',
288
+        name: '人员管理',
280 289
         icon: 'smile',
281 290
         component: './SystemManagement/Administrator',
282 291
       },
283 292
       {
284 293
         path: '/SystemManagement/Administrator/AdminEdit',
285
-        name: '管理员编辑页',
294
+        name: '人员编辑',
286 295
         icon: 'smile',
287 296
         component: './SystemManagement/Administrator/AdminEdit',
288 297
         hideInMenu: true,

+ 0
- 153
src/pages/Machinery/Employees/edit.jsx Целия файл

@@ -1,153 +0,0 @@
1
-import { Form, Input, Card, InputNumber, Select, message, Button } from 'antd';
2
-import { history } from 'umi';
3
-import ProCard from '@ant-design/pro-card';
4
-import { useState, useEffect } from 'react';
5
-// import { getTagList } from '@/services/tag';
6
-// import { addAttaList, gettaTouristForm, EditaddAttaList } from '@/services/AttaList'
7
-
8
-const { TextArea } = Input;
9
-const { Option } = Select;
10
-const formItemLayout = { labelCol: { span: 6 }, wrapperCol: { span: 14 } };
11
-
12
-const goBack = () => {
13
-  history.goBack();
14
-};
15
-const FormItem = Form.Item;
16
-export default (props) => {
17
-  const { location } = props;
18
-  const { id } = location.query;
19
-  const [form] = Form.useForm();
20
-  const [listForm, setListForm] = useState({});
21
-  const [loading, setLoading] = useState(false);
22
-  const [imageList, setImageList] = useState([]);
23
-
24
-  const Submit = (data) => {
25
-    const typeList = (data.typeList || []).map((x) => {
26
-      return { ...x, targetId: id, targetType: 'tourist' };
27
-    });
28
-    setLoading(true);
29
-
30
-    // if (id) {
31
-    //   EditaddAttaList(id, { ...listForm, ...data, imageList, typeList }).then(() => {
32
-    //     setLoading(false);
33
-    //     message.success('数据更新成功');
34
-    //     goBack();
35
-    //   })
36
-    //     .catch(err => {
37
-    //       setLoading(false);
38
-    //       message.error(err.message || err);
39
-    //     });
40
-    // } else {
41
-    //   addAttaList({ ...data, imageList, typeList }).then((res) => {
42
-    //     setLoading(false);
43
-    //     message.success('数据保存成功');
44
-    //     history.replace(`/Attractions/Edit?id=${res.touristId}`)
45
-    //   })
46
-    //     .catch(err => {
47
-    //       setLoading(false);
48
-    //       message.error(err.message || err);
49
-    //     });
50
-    // }
51
-  };
52
-
53
-  //地址--占位
54
-  const [newLocName, setLocName] = useState('');
55
-  const [newAddress, setAddress] = useState('');
56
-
57
-  const selectTagList = (params) => {
58
-    // return getTagList({
59
-    // }).then((res) => {
60
-    // }).catch((err) => {
61
-    //   return {
62
-    //     success: false,
63
-    //   }
64
-    // })
65
-  };
66
-
67
-  const imageInput = (image) => {
68
-    return {
69
-      uid: image.imageId,
70
-      url: image.url,
71
-    };
72
-  };
73
-
74
-  const imageOutput = (image) => {
75
-    return {
76
-      imageId: image?.raw?.imageId,
77
-      shopId: id,
78
-      url: image.url,
79
-    };
80
-  };
81
-  useEffect(() => {
82
-    selectTagList();
83
-    // if (id) {
84
-    //   gettaTouristForm(id).then((res) => {
85
-    //     setListForm(res)
86
-    //     form.setFieldsValue(res)
87
-    //     setImageList(res?.imageList || [])
88
-    //   })
89
-    // }
90
-  }, [id]);
91
-
92
-  return (
93
-    <Card>
94
-      <ProCard tabs={{ type: 'card' }}>
95
-        <ProCard.TabPane key={1} tab="员工编辑">
96
-          <Form {...formItemLayout} onFinish={Submit} form={form}>
97
-            <FormItem label="姓名" name="name" rules={[{ required: true, message: '请输入姓名' }]}>
98
-              <Input placeholder="请输入姓名" style={{ width: '350px' }} />
99
-            </FormItem>
100
-            <FormItem
101
-              label="手机号"
102
-              name="phone"
103
-              rules={[{ required: true, message: '请输入手机号' }]}
104
-            >
105
-              <Input placeholder="请输入手机号" style={{ width: '350px' }} />
106
-            </FormItem>
107
-            <FormItem
108
-              label="所属机构"
109
-              name="cooperative_id"
110
-              rules={[{ required: true, message: '请选择所属机构' }]}
111
-            >
112
-              <Select style={{ width: '350px' }}>
113
-                <Option value="6" key="6">
114
-                  {6}
115
-                </Option>
116
-                <Option value="7" key="7">
117
-                  {7}
118
-                </Option>
119
-              </Select>
120
-            </FormItem>
121
-            <FormItem
122
-              label="身份"
123
-              name="identity"
124
-              rules={[{ required: true, message: '请选择身份' }]}
125
-            >
126
-              <Select style={{ width: '350px' }}>
127
-                <Option value="6" key="6">
128
-                  农机手
129
-                </Option>
130
-                <Option value="7" key="7">
131
-                  合作社负责人
132
-                </Option>
133
-              </Select>
134
-            </FormItem>
135
-            <FormItem label=" " colon={false}>
136
-              <Button type="default" onClick={() => goBack()}>
137
-                返回
138
-              </Button>
139
-              <Button
140
-                type="primary"
141
-                loading={loading}
142
-                htmlType="submit"
143
-                style={{ marginLeft: '4em' }}
144
-              >
145
-                保存
146
-              </Button>
147
-            </FormItem>
148
-          </Form>
149
-        </ProCard.TabPane>
150
-      </ProCard>
151
-    </Card>
152
-  );
153
-};

+ 0
- 88
src/pages/Machinery/Employees/index.jsx Целия файл

@@ -1,88 +0,0 @@
1
-import React from 'react';
2
-import { history, Link } from 'umi';
3
-import { Button, Popconfirm, message, Tooltip } from 'antd';
4
-import { PlusOutlined } from '@ant-design/icons';
5
-// import { getPersonList, exportPersonList } from '@/services/person';
6
-import { PageHeaderWrapper } from '@ant-design/pro-layout';
7
-import moment from 'moment';
8
-import PageTable from '@/components/PageTable';
9
-
10
-const formatterTime = (val) => {
11
-  return val ? moment(val).format('YYYY-MM-DD HH:mm:ss') : '';
12
-};
13
-
14
-export default (props) => {
15
-  const actions = () => [
16
-    <Button key="add" type="primary" icon={<PlusOutlined />} onClick={() => gotoEdit()}>
17
-      新增员工
18
-    </Button>,
19
-  ];
20
-  const gotoEdit = (id) => {
21
-    const queryStr = id ? `?id=${id}` : '';
22
-    history.push(`./Employees/edit.jsx${queryStr}`);
23
-  };
24
-  const columns = [
25
-    {
26
-      title: '姓名',
27
-      dataIndex: 'name',
28
-      key: 'name',
29
-    },
30
-    {
31
-      title: '手机号',
32
-      dataIndex: 'phone',
33
-      key: 'phone',
34
-    },
35
-    {
36
-      title: '所属机构',
37
-      dataIndex: 'title',
38
-      key: 'title',
39
-    },
40
-    {
41
-      title: '身份',
42
-      dataIndex: 'identity',
43
-      key: 'identity',
44
-    },
45
-    {
46
-      title: '工作状态',
47
-      dataIndex: 'status',
48
-      key: 'status',
49
-    },
50
-    {
51
-      title: '注册时间',
52
-      dataIndex: 'createData',
53
-      key: 'createData',
54
-    },
55
-    {
56
-      title: '操作',
57
-      valueType: 'option',
58
-      render: (_, record) => [
59
-        <Link key={1} to={`./edit.jsx`}>
60
-          编辑
61
-        </Link>,
62
-        <Popconfirm
63
-          key={2}
64
-          title="您是否确认删除 ?"
65
-          onConfirm={() => handleDelete(record.cooperativeId)}
66
-          okText="确定"
67
-          cancelText="取消"
68
-        >
69
-          <a href="#">删除</a>
70
-        </Popconfirm>,
71
-      ],
72
-    },
73
-  ];
74
-  const handleDelete = () => {};
75
-  return (
76
-    <PageHeaderWrapper>
77
-      <PageTable
78
-        // request={getPersonList}
79
-        // expfunc={exportPersonList}
80
-        toolBarRender={actions}
81
-        columns={columns}
82
-        rowKey="employeesId"
83
-        options={false}
84
-        scroll={{ x: 1000 }}
85
-      />
86
-    </PageHeaderWrapper>
87
-  );
88
-};

+ 3
- 0
src/pages/MachineryStatistics/index.jsx Целия файл

@@ -0,0 +1,3 @@
1
+export default (props) => {
2
+  return <div>农机统计</div>;
3
+};

src/pages/Machinery/Cooperative/edit.jsx → src/pages/SystemManagement/Cooperative/edit.jsx Целия файл


src/pages/Machinery/Cooperative/index.jsx → src/pages/SystemManagement/Cooperative/index.jsx Целия файл