浏览代码

Merge branch 'dev' of http://git.ycjcjy.com/jgz/admin into dev

lisenzhou 2 年前
父节点
当前提交
a8c754ccb1

+ 0
- 10
src/components/page/Container.jsx 查看文件

@@ -1,10 +0,0 @@
1
-import React from 'react';
2
-import './style.less'
3
-
4
-export default (props) => {
5
-  return (
6
-    <div className="page-container">
7
-      {props.children}
8
-    </div>
9
-  )
10
-}

+ 0
- 14
src/components/page/index.jsx 查看文件

@@ -1,14 +0,0 @@
1
-import React, { useEffect } from 'react';
2
-// import { PageHeader } from 'antd';
3
-import { useModel } from '@/store';
4
-import Container from './Container';
5
-
6
-export default (props) => {
7
-  // const { children, ...headerProps } = props;
8
-  
9
-  return (
10
-    <Container>
11
-      {props.children}
12
-    </Container>
13
-  )
14
-}

+ 0
- 5
src/components/page/style.less 查看文件

@@ -1,5 +0,0 @@
1
-
2
-.page-container {
3
-  margin: 24px;
4
-  margin-bottom: 0;
5
-}

+ 4
- 14
src/layouts/AuthLayout/components/Container.jsx 查看文件

@@ -6,25 +6,15 @@ import Footer from './Footer';
6 6
 
7 7
 const { Content } = Layout;
8 8
 
9
-export default (props) => {  
10
-  const [footerHeight, setFooterHeight] = useState(0);
11
-
12
-  // 24 是 marginTop 的值
13
-  const contentStyle = useMemo(() => ({ height: footerHeight > 0 ? `calc(100% - ${footerHeight + 24}px)` : '100%' }), [footerHeight]);
14
-  
15
-  useEffect(() => {
16
-    const footerHeight = (document.querySelector('.ant-layout-footer') || {}).offsetHeight || 0;
17
-    setFooterHeight(footerHeight);
18
-  });
19
-
9
+export default (props) => {
20 10
   return (
21 11
     <div className='layout-container'>
22
-      <Content style={contentStyle}>
12
+      {/* <Content style={{ height: '100%' }}> */}
23 13
         {/* <PageTransition location={props.location}> */}
24 14
           <Outlet />
25 15
         {/* </PageTransition> */}
26
-      </Content>
27
-      {!props.noFooter && <Footer />}      
16
+      {/* </Content> */}
17
+      {/* {!noFooter && <Footer />} */}
28 18
     </div>
29 19
   )
30 20
 }

src/layouts/Container.jsx → src/layouts/PageContainer.jsx 查看文件

@@ -4,8 +4,9 @@ import { Outlet } from 'react-router-dom';
4 4
 import useRoute from '@/utils/hooks/useRoute';
5 5
 
6 6
 const containerStyle = {
7
-  margin: '24px 24px 0 24px',
8
-  height: '100%',
7
+  // margin: '24px 24px 0 24px',
8
+  margin: '24px',
9
+  minHeight: 'calc(100% - 48px)',
9 10
 }
10 11
 const { Title } = Typography;
11 12
 

+ 1
- 1
src/pages/dish/edit/index.jsx 查看文件

@@ -36,7 +36,7 @@ export default (props) => {
36 36
     console.log(values, '===');
37 37
 
38 38
     addDish({ ...values, price: floatMultiply(values.price, 100), id }).then((res) => {
39
-      message.success('添加成功');
39
+      // message.success('添加成功');
40 40
       navigate(-1);
41 41
     });
42 42
 

+ 2
- 2
src/pages/dish/list/index.jsx 查看文件

@@ -15,7 +15,7 @@ const DishList = (props) => {
15 15
   const updata = (row) => {
16 16
     if (row.id) {
17 17
       updataDish(row.id, { state: row.state === '1' ? '2' : '1' }).then((res) => {
18
-        message.success('修改成功');
18
+        // message.success('修改成功');
19 19
         actionRef.current.reload();
20 20
       });
21 21
     }
@@ -24,7 +24,7 @@ const DishList = (props) => {
24 24
   const handleDelete = (id) => {
25 25
     if (id) {
26 26
       deleteDish(id).then((res) => {
27
-        message.success('删除成功');
27
+        // message.success('删除成功');
28 28
         actionRef.current.reload();
29 29
       });
30 30
     }

+ 1
- 1
src/pages/evaluate/index.jsx 查看文件

@@ -21,7 +21,7 @@ const GuaranteeTaskList = (props) => {
21 21
   const handleDelete = (id) => {
22 22
     if (id) {
23 23
       deleteGuaranteeTask(id).then((res) => {
24
-        message.success("删除成功");
24
+        // message.success("删除成功");
25 25
         actionRef.current.reload();
26 26
       });
27 27
     }

+ 1
- 1
src/pages/guaranteeTask/Edit/BasicForm.jsx 查看文件

@@ -41,7 +41,7 @@ export default (props) => {
41 41
     func({ ...values, startDate, endDate }, id).then(res => {
42 42
       setLoading(false);
43 43
       setDataSource(res);
44
-      notification.success({ message: '操作成功' })
44
+      // notification.success({ message: '操作成功' })
45 45
     }).catch(() => {
46 46
       setLoading(false);
47 47
     });

+ 1
- 1
src/pages/guaranteeTask/Edit/DishList.jsx 查看文件

@@ -85,7 +85,7 @@ export default (props) => {
85 85
     addGuaranteeDetailBatch(list, dataSource.id).then(res => {
86 86
       setLoading(false);
87 87
       setList(res);
88
-      notification.success({ message: '操作成功' });
88
+      // notification.success({ message: '操作成功' });
89 89
     }).catch(() => {
90 90
       setLoading(false);
91 91
     });

+ 1
- 1
src/pages/guaranteeTask/index.jsx 查看文件

@@ -21,7 +21,7 @@ const GuaranteeTaskList = (props) => {
21 21
   const handleDelete = (id) => {
22 22
     if (id) {
23 23
       deleteGuaranteeTask(id).then((res) => {
24
-        message.success("删除成功");
24
+        // message.success("删除成功");
25 25
         actionRef.current.reload();
26 26
       });
27 27
     }

src/pages/sample/home/components/VideoPlay.jsx → src/pages/home/components/VideoPlay.jsx 查看文件


src/pages/sample/home/index.jsx → src/pages/home/index.jsx 查看文件


+ 1
- 1
src/pages/package/BasicForm.jsx 查看文件

@@ -18,7 +18,7 @@ export default (props) => {
18 18
     func(data, current.id).then(res => {
19 19
       setLoading(false);
20 20
       onChange(res);
21
-      notification.success({ message: '操作成功' })
21
+      // notification.success({ message: '操作成功' })
22 22
     }).catch(() => {
23 23
       setLoading(false);
24 24
     });

+ 2
- 2
src/pages/rotationChart/edit/index.jsx 查看文件

@@ -40,13 +40,13 @@ export default (props) => {
40 40
     if (id) {
41 41
       // 修改
42 42
       updataBanner(id, { ...values }).then((res) => {
43
-        message.success("修改成功");
43
+        // message.success("修改成功");
44 44
         navigate(-1);
45 45
       });
46 46
     } else {
47 47
       // 新增
48 48
       addBanner({ ...values }).then((res) => {
49
-        message.success("添加成功");
49
+        // message.success("添加成功");
50 50
         navigate(-1);
51 51
       });
52 52
     }

+ 14
- 10
src/pages/rotationChart/introduction/edit/index.jsx 查看文件

@@ -1,27 +1,29 @@
1
-import { addRegulation, getRegulationById } from '@/services/regulation';
1
+import { addRegulation, getRegulationList } from '@/services/regulation';
2 2
 import { PageContainer, ProForm, ProFormTextArea } from '@ant-design/pro-components';
3 3
 import { Card, Col, message, Row, Space } from 'antd';
4 4
 import { useNavigate, useSearchParams } from 'react-router-dom';
5 5
 import { useEffect, useRef, useState } from 'react';
6
+import { queryTable } from '@/utils/request';
6 7
 
7 8
 export default (props) => {
9
+
8 10
   const [searchParams, setSearchParams] = useSearchParams();
9 11
   const id = searchParams.get('id');
12
+  const [data, setData] = useState({});
10 13
   const formRef = useRef();
11 14
   const navigate = useNavigate();
12 15
 
13 16
   useEffect(() => {
14
-    if (id) {
15
-      getRegulationById(id).then((res) => {
16
-        formRef.current.setFieldsValue(res);
17
-      });
18
-    }
19
-  }, [id]);
17
+    getRegulationList({ type: `station` }).then((res) => {
18
+      formRef.current.setFieldsValue(res.records[0]);
19
+      console.log('tt', res)
20
+    });
21
+  }, []);
20 22
 
21 23
   const onFinish = async (values) => {
22 24
     //添加,修改
23 25
     addRegulation({ ...values, id }).then((res) => {
24
-      message.success('成功');
26
+      // message.success('成功');
25 27
       navigate(-1);
26 28
     });
27 29
     return false;
@@ -40,7 +42,7 @@ export default (props) => {
40 42
             searchConfig: {
41 43
               resetText: '返回',
42 44
             },
43
-            onReset: () => navigate(-1),
45
+            // onReset: () => navigate(-1),
44 46
             render: (props, doms) => {
45 47
               return (
46 48
                 <Row>
@@ -53,12 +55,14 @@ export default (props) => {
53 55
           }}
54 56
         >
55 57
           <ProFormTextArea
56
-            name="detail"
57 58
             label="发布内容"
58 59
             placeholder="请输入发布内容"
59 60
             rules={[{ required: true, message: '请输入发布内容' }]}
60 61
             allowClear={false}
61 62
             width={750}
63
+            name="detail"
64
+            onFinish={onFinish}
65
+            request={queryTable(getRegulationList)}
62 66
           />
63 67
         </ProForm>
64 68
       </Card>

+ 1
- 1
src/pages/rotationChart/introduction/index.jsx 查看文件

@@ -12,7 +12,7 @@ const IntroductionList = (props) => {
12 12
   const handleDelete = (id) => {
13 13
     if (id) {
14 14
       deleteRegulation(id).then((res) => {
15
-        message.success('删除成功');
15
+        // message.success('删除成功');
16 16
         actionRef.current.reload();
17 17
       });
18 18
     }

+ 2
- 2
src/pages/rotationChart/list/index.jsx 查看文件

@@ -15,7 +15,7 @@ const RotationChartList = (props) => {
15 15
   const updata = (row) => {
16 16
     if (row.id) {
17 17
       updataBanner(row.id, { state: row.state === '1' ? '2' : '1' }).then((res) => {
18
-        message.success('修改成功');
18
+        // message.success('修改成功');
19 19
         actionRef.current.reload();
20 20
       });
21 21
     }
@@ -24,7 +24,7 @@ const RotationChartList = (props) => {
24 24
   const handleDelete = (id) => {
25 25
     if (id) {
26 26
       deleteBanner(id).then((res) => {
27
-        message.success('删除成功');
27
+        // message.success('删除成功');
28 28
         actionRef.current.reload();
29 29
       });
30 30
     }

+ 0
- 353
src/pages/sample/form/index.jsx 查看文件

@@ -1,353 +0,0 @@
1
-import {
2
-  AutoComplete,
3
-  Button,
4
-  Cascader,
5
-  Checkbox,
6
-  Col,
7
-  Form,
8
-  Input,
9
-  InputNumber,
10
-  Row,
11
-  Select,
12
-  Card,
13
-} from 'antd';
14
-import React, { useState } from 'react';
15
-import Page from '@/components/page';
16
-
17
-const { Option } = Select;
18
-const residences = [
19
-  {
20
-    value: 'zhejiang',
21
-    label: 'Zhejiang',
22
-    children: [
23
-      {
24
-        value: 'hangzhou',
25
-        label: 'Hangzhou',
26
-        children: [
27
-          {
28
-            value: 'xihu',
29
-            label: 'West Lake',
30
-          },
31
-        ],
32
-      },
33
-    ],
34
-  },
35
-  {
36
-    value: 'jiangsu',
37
-    label: 'Jiangsu',
38
-    children: [
39
-      {
40
-        value: 'nanjing',
41
-        label: 'Nanjing',
42
-        children: [
43
-          {
44
-            value: 'zhonghuamen',
45
-            label: 'Zhong Hua Men',
46
-          },
47
-        ],
48
-      },
49
-    ],
50
-  },
51
-];
52
-const formItemLayout = {
53
-  labelCol: {
54
-    xs: {
55
-      span: 24,
56
-    },
57
-    sm: {
58
-      span: 8,
59
-    },
60
-  },
61
-  wrapperCol: {
62
-    xs: {
63
-      span: 24,
64
-    },
65
-    sm: {
66
-      span: 16,
67
-    },
68
-  },
69
-};
70
-const tailFormItemLayout = {
71
-  wrapperCol: {
72
-    xs: {
73
-      span: 24,
74
-      offset: 0,
75
-    },
76
-    sm: {
77
-      span: 16,
78
-      offset: 8,
79
-    },
80
-  },
81
-};
82
-
83
-
84
-const BasicForm = () => {
85
-  const [form] = Form.useForm();
86
-
87
-  const onFinish = (values) => {
88
-    console.log('Received values of form: ', values);
89
-  };
90
-
91
-  const prefixSelector = (
92
-    <Form.Item name="prefix" noStyle>
93
-      <Select
94
-        style={{
95
-          width: 70,
96
-        }}
97
-      >
98
-        <Option value="86">+86</Option>
99
-        <Option value="87">+87</Option>
100
-      </Select>
101
-    </Form.Item>
102
-  );
103
-  const suffixSelector = (
104
-    <Form.Item name="suffix" noStyle>
105
-      <Select
106
-        style={{
107
-          width: 70,
108
-        }}
109
-      >
110
-        <Option value="USD">$</Option>
111
-        <Option value="CNY">¥</Option>
112
-      </Select>
113
-    </Form.Item>
114
-  );
115
-  const [autoCompleteResult, setAutoCompleteResult] = useState([]);
116
-
117
-  const onWebsiteChange = (value) => {
118
-    if (!value) {
119
-      setAutoCompleteResult([]);
120
-    } else {
121
-      setAutoCompleteResult(['.com', '.org', '.net'].map((domain) => `${value}${domain}`));
122
-    }
123
-  };
124
-
125
-  const websiteOptions = autoCompleteResult.map((website) => ({
126
-    label: website,
127
-    value: website,
128
-  }));
129
-  return (
130
-    <Form
131
-      {...formItemLayout}
132
-      form={form}
133
-      name="register"
134
-      onFinish={onFinish}
135
-      initialValues={{
136
-        residence: ['zhejiang', 'hangzhou', 'xihu'],
137
-        prefix: '86',
138
-      }}
139
-      scrollToFirstError
140
-      style={{ background: '#fff', boxSizing: 'border-box', padding: '24px' }}
141
-    >
142
-      <Form.Item
143
-        name="email"
144
-        label="E-mail"
145
-        rules={[
146
-          {
147
-            type: 'email',
148
-            message: 'The input is not valid E-mail!',
149
-          },
150
-          {
151
-            required: true,
152
-            message: 'Please input your E-mail!',
153
-          },
154
-        ]}
155
-      >
156
-        <Input />
157
-      </Form.Item>
158
-
159
-      <Form.Item
160
-        name="password"
161
-        label="Password"
162
-        rules={[
163
-          {
164
-            required: true,
165
-            message: 'Please input your password!',
166
-          },
167
-        ]}
168
-        hasFeedback
169
-      >
170
-        <Input.Password />
171
-      </Form.Item>
172
-
173
-      <Form.Item
174
-        name="confirm"
175
-        label="Confirm Password"
176
-        dependencies={['password']}
177
-        hasFeedback
178
-        rules={[
179
-          {
180
-            required: true,
181
-            message: 'Please confirm your password!',
182
-          },
183
-          ({ getFieldValue }) => ({
184
-            validator(_, value) {
185
-              if (!value || getFieldValue('password') === value) {
186
-                return Promise.resolve();
187
-              }
188
-
189
-              return Promise.reject(new Error('The two passwords that you entered do not match!'));
190
-            },
191
-          }),
192
-        ]}
193
-      >
194
-        <Input.Password />
195
-      </Form.Item>
196
-
197
-      <Form.Item
198
-        name="nickname"
199
-        label="Nickname"
200
-        tooltip="What do you want others to call you?"
201
-        rules={[
202
-          {
203
-            required: true,
204
-            message: 'Please input your nickname!',
205
-            whitespace: true,
206
-          },
207
-        ]}
208
-      >
209
-        <Input />
210
-      </Form.Item>
211
-
212
-      <Form.Item
213
-        name="residence"
214
-        label="Habitual Residence"
215
-        rules={[
216
-          {
217
-            type: 'array',
218
-            required: true,
219
-            message: 'Please select your habitual residence!',
220
-          },
221
-        ]}
222
-      >
223
-        <Cascader options={residences} />
224
-      </Form.Item>
225
-
226
-      <Form.Item
227
-        name="phone"
228
-        label="Phone Number"
229
-        rules={[
230
-          {
231
-            required: true,
232
-            message: 'Please input your phone number!',
233
-          },
234
-        ]}
235
-      >
236
-        <Input
237
-          addonBefore={prefixSelector}
238
-          style={{
239
-            width: '100%',
240
-          }}
241
-        />
242
-      </Form.Item>
243
-
244
-      <Form.Item
245
-        name="donation"
246
-        label="Donation"
247
-        rules={[
248
-          {
249
-            required: true,
250
-            message: 'Please input donation amount!',
251
-          },
252
-        ]}
253
-      >
254
-        <InputNumber
255
-          addonAfter={suffixSelector}
256
-          style={{
257
-            width: '100%',
258
-          }}
259
-        />
260
-      </Form.Item>
261
-
262
-      <Form.Item
263
-        name="website"
264
-        label="Website"
265
-        rules={[
266
-          {
267
-            required: true,
268
-            message: 'Please input website!',
269
-          },
270
-        ]}
271
-      >
272
-        <AutoComplete options={websiteOptions} onChange={onWebsiteChange} placeholder="website">
273
-          <Input />
274
-        </AutoComplete>
275
-      </Form.Item>
276
-
277
-      <Form.Item
278
-        name="intro"
279
-        label="Intro"
280
-        rules={[
281
-          {
282
-            required: true,
283
-            message: 'Please input Intro',
284
-          },
285
-        ]}
286
-      >
287
-        <Input.TextArea showCount maxLength={100} />
288
-      </Form.Item>
289
-
290
-      <Form.Item
291
-        name="gender"
292
-        label="Gender"
293
-        rules={[
294
-          {
295
-            required: true,
296
-            message: 'Please select gender!',
297
-          },
298
-        ]}
299
-      >
300
-        <Select placeholder="select your gender">
301
-          <Option value="male">Male</Option>
302
-          <Option value="female">Female</Option>
303
-          <Option value="other">Other</Option>
304
-        </Select>
305
-      </Form.Item>
306
-
307
-      <Form.Item label="Captcha" extra="We must make sure that your are a human.">
308
-        <Row gutter={8}>
309
-          <Col span={12}>
310
-            <Form.Item
311
-              name="captcha"
312
-              noStyle
313
-              rules={[
314
-                {
315
-                  required: true,
316
-                  message: 'Please input the captcha you got!',
317
-                },
318
-              ]}
319
-            >
320
-              <Input />
321
-            </Form.Item>
322
-          </Col>
323
-          <Col span={12}>
324
-            <Button>Get captcha</Button>
325
-          </Col>
326
-        </Row>
327
-      </Form.Item>
328
-
329
-      <Form.Item
330
-        name="agreement"
331
-        valuePropName="checked"
332
-        rules={[
333
-          {
334
-            validator: (_, value) =>
335
-              value ? Promise.resolve() : Promise.reject(new Error('Should accept agreement')),
336
-          },
337
-        ]}
338
-        {...tailFormItemLayout}
339
-      >
340
-        <Checkbox>
341
-          I have read the <a href="">agreement</a>
342
-        </Checkbox>
343
-      </Form.Item>
344
-      <Form.Item {...tailFormItemLayout}>
345
-        <Button type="primary" htmlType="submit">
346
-          Register
347
-        </Button>
348
-      </Form.Item>
349
-    </Form>
350
-  );
351
-};
352
-
353
-export default () => <Page><Card><BasicForm /></Card></Page>;

+ 0
- 169
src/pages/sample/table/index.jsx 查看文件

@@ -1,169 +0,0 @@
1
-import { EllipsisOutlined, PlusOutlined } from '@ant-design/icons';
2
-import { ProTable, TableDropdown } from '@ant-design/pro-components';
3
-import { Button, Dropdown, Menu, Space, Tag } from 'antd';
4
-import { useRef, useEffect } from 'react';
5
-import Page from '@/components/page';
6
-import { useModel } from '@/store';
7
-
8
-// import request from 'umi-request';
9
-const columns = [
10
-    {
11
-        dataIndex: 'index',
12
-        valueType: 'indexBorder',
13
-        width: 48,
14
-    },
15
-    {
16
-        title: '标题',
17
-        dataIndex: 'title',
18
-        copyable: true,
19
-        ellipsis: true,
20
-        tip: '标题过长会自动收缩',
21
-        formItemProps: {
22
-            rules: [
23
-                {
24
-                    required: true,
25
-                    message: '此项为必填项',
26
-                },
27
-            ],
28
-        },
29
-    },
30
-    {
31
-        disable: true,
32
-        title: '状态',
33
-        dataIndex: 'state',
34
-        filters: true,
35
-        onFilter: true,
36
-        ellipsis: true,
37
-        valueType: 'select',
38
-        valueEnum: {
39
-            all: { text: '超长'.repeat(50) },
40
-            open: {
41
-                text: '未解决',
42
-                status: 'Error',
43
-            },
44
-            closed: {
45
-                text: '已解决',
46
-                status: 'Success',
47
-                disabled: true,
48
-            },
49
-            processing: {
50
-                text: '解决中',
51
-                status: 'Processing',
52
-            },
53
-        },
54
-    },
55
-    {
56
-        disable: true,
57
-        title: '标签',
58
-        dataIndex: 'labels',
59
-        search: false,
60
-        renderFormItem: (_, { defaultRender }) => {
61
-            return defaultRender(_);
62
-        },
63
-        render: (_, record) => (<Space>
64
-        {record.labels.map(({ name, color }) => (<Tag color={color} key={name}>
65
-            {name}
66
-          </Tag>))}
67
-      </Space>),
68
-    },
69
-    {
70
-        title: '创建时间',
71
-        key: 'showTime',
72
-        dataIndex: 'created_at',
73
-        valueType: 'date',
74
-        sorter: true,
75
-        hideInSearch: true,
76
-    },
77
-    {
78
-        title: '创建时间',
79
-        dataIndex: 'created_at',
80
-        valueType: 'dateRange',
81
-        hideInTable: true,
82
-        search: {
83
-            transform: (value) => {
84
-                return {
85
-                    startTime: value[0],
86
-                    endTime: value[1],
87
-                };
88
-            },
89
-        },
90
-    },
91
-    {
92
-        title: '操作',
93
-        valueType: 'option',
94
-        key: 'option',
95
-        render: (text, record, _, action) => [
96
-            <a key="editable" onClick={() => {
97
-                    var _a;
98
-                    (_a = action === null || action === void 0 ? void 0 : action.startEditable) === null || _a === void 0 ? void 0 : _a.call(action, record.id);
99
-                }}>
100
-        编辑
101
-      </a>,
102
-            <a href={record.url} target="_blank" rel="noopener noreferrer" key="view">
103
-        查看
104
-      </a>,
105
-            <TableDropdown key="actionGroup" onSelect={() => action === null || action === void 0 ? void 0 : action.reload()} menus={[
106
-                    { key: 'copy', name: '复制' },
107
-                    { key: 'delete', name: '删除' },
108
-                ]}/>,
109
-        ],
110
-    },
111
-];
112
-const menu = (<Menu items={[
113
-        {
114
-            label: '1st item',
115
-            key: '1',
116
-        },
117
-        {
118
-            label: '2nd item',
119
-            key: '1',
120
-        },
121
-        {
122
-            label: '3rd item',
123
-            key: '1',
124
-        },
125
-    ]}/>);
126
-export default () => {
127
-
128
-    const actionRef = useRef();
129
-    return (<Page><ProTable columns={columns} actionRef={actionRef} cardBordered request={async (params = {}, sort, filter) => {
130
-            console.log(sort, filter);
131
-            // return request('https://proapi.azurewebsites.net/github/issues', {
132
-            //     params,
133
-            // });
134
-        }} editable={{
135
-            type: 'multiple',
136
-        }} columnsState={{
137
-            persistenceKey: 'pro-table-singe-demos',
138
-            persistenceType: 'localStorage',
139
-            onChange(value) {
140
-                console.log('value: ', value);
141
-            },
142
-        }} rowKey="id" search={{
143
-            labelWidth: 'auto',
144
-        }} options={{
145
-            setting: {
146
-                listsHeight: 400,
147
-            },
148
-        }} form={{
149
-            // 由于配置了 transform,提交的参与与定义的不同这里需要转化一下
150
-            syncToUrl: (values, type) => {
151
-                if (type === 'get') {
152
-                    return Object.assign(Object.assign({}, values), { created_at: [values.startTime, values.endTime] });
153
-                }
154
-                return values;
155
-            },
156
-        }} pagination={{
157
-            pageSize: 5,
158
-            onChange: (page) => console.log(page),
159
-        }} dateFormatter="string" headerTitle="高级表格" toolBarRender={() => [
160
-            <Button key="button" icon={<PlusOutlined />} type="primary">
161
-          新建
162
-        </Button>,
163
-            <Dropdown key="menu" overlay={menu}>
164
-          <Button>
165
-            <EllipsisOutlined />
166
-          </Button>
167
-        </Dropdown>,
168
-        ]}/></Page>);
169
-};

+ 2
- 2
src/pages/stock/edit/index.jsx 查看文件

@@ -26,13 +26,13 @@ export default (props) => {
26 26
     if (id) {
27 27
       // 修改
28 28
       updataStore(id, { ...values }).then((res) => {
29
-        message.success('修改成功');
29
+        // message.success('修改成功');
30 30
         navigate(-1);
31 31
       });
32 32
     } else {
33 33
       // 新增
34 34
       addStore({ ...values }).then((res) => {
35
-        message.success('添加成功');
35
+        // message.success('添加成功');
36 36
         navigate(-1);
37 37
       });
38 38
     }

+ 1
- 1
src/pages/stock/list/index.jsx 查看文件

@@ -20,7 +20,7 @@ const StockList = (props) => {
20 20
   const handleDelete = (id) => {
21 21
     if (id) {
22 22
       deleteStore(id).then((res) => {
23
-        message.success('删除成功');
23
+        // message.success('删除成功');
24 24
         actionRef.current.reload();
25 25
       });
26 26
     }

+ 2
- 2
src/pages/stockClassification/edit/index.jsx 查看文件

@@ -24,13 +24,13 @@ export default (props) => {
24 24
     if (id) {
25 25
       // 修改
26 26
       updataStoreType(id, { ...values }).then((res) => {
27
-        message.success('修改成功');
27
+        // message.success('修改成功');
28 28
         navigate(-1);
29 29
       });
30 30
     } else {
31 31
       // 新增;
32 32
       addStoreType({ ...values }).then((res) => {
33
-        message.success('添加成功');
33
+        // message.success('添加成功');
34 34
         navigate(-1);
35 35
       });
36 36
     }

+ 1
- 1
src/pages/stockClassification/list/index.jsx 查看文件

@@ -15,7 +15,7 @@ const StockList = (props) => {
15 15
   const handleDelete = (id) => {
16 16
     if (id) {
17 17
       deleteStoreType(id).then((res) => {
18
-        message.success('删除成功');
18
+        // message.success('删除成功');
19 19
         actionRef.current.reload();
20 20
       });
21 21
     }

+ 1
- 2
src/regulation/edit/index.jsx 查看文件

@@ -22,10 +22,9 @@ export default (props) => {
22 22
   const onFinish = async (values) => {
23 23
     console.log(values);
24 24
 
25
-    // if (id) {
26 25
     //添加,修改
27 26
     addRegulation({ ...values, id }).then((res) => {
28
-      message.success('成功');
27
+      // message.success('成功');
29 28
       navigate(-1);
30 29
     });
31 30
     return false;

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

@@ -16,7 +16,7 @@ const RegulationList = (props) => {
16 16
   const handleDelete = (id) => {
17 17
     if (id) {
18 18
       deleteRegulation(id).then((res) => {
19
-        message.success('删除成功');
19
+        // message.success('删除成功');
20 20
         actionRef.current.reload();
21 21
       });
22 22
     }

+ 30
- 23
src/routes/routes.jsx 查看文件

@@ -9,12 +9,10 @@ import {
9 9
 } from "@ant-design/icons";
10 10
 import { Navigate } from "react-router-dom";
11 11
 import AuthLayout from "@/layouts/AuthLayout";
12
-import Container from "@/layouts/Container";
12
+import PageContainer from "@/layouts/PageContainer";
13 13
 import Login from "@/pages/login";
14 14
 import Page404 from "@/pages/404";
15
-import Home from "@/pages/sample/home";
16
-import BasicForm from "@/pages/sample/form";
17
-import BasicTable from "@/pages/sample/table";
15
+import Home from "@/pages/home";
18 16
 import GuaranteeTaskList from "@/pages/guaranteeTask";
19 17
 import GuaranteeTaskEdit from "@/pages/guaranteeTask/Edit";
20 18
 import GuaranteeTaskPrint from "@/pages/guaranteeTask/print";
@@ -65,9 +63,19 @@ import StatisCharts from "@/pages/statis/charts";
65 63
  */
66 64
 
67 65
 export const authRoutes = [
66
+  {
67
+    path: "static",
68
+    element: <StatisCharts />,
69
+    meta: {
70
+      title: "数据分析",
71
+      noSiderBar: true,
72
+      noFooter: true,
73
+      permission: 'static',
74
+    },
75
+  },
68 76
   {
69 77
     path: "task",
70
-    element: <Container />,
78
+    element: <PageContainer />,
71 79
     meta: {
72 80
       title: "军供任务",
73 81
       permission: 'task',
@@ -125,7 +133,7 @@ export const authRoutes = [
125 133
   },
126 134
   {
127 135
     path: "stock",
128
-    element: <Container />,
136
+    element: <PageContainer />,
129 137
     meta: {
130 138
       title: "库存物资",
131 139
       permission: 'stock',
@@ -180,7 +188,7 @@ export const authRoutes = [
180 188
   },
181 189
   {
182 190
     path: "purchase",
183
-    element: <Container />,
191
+    element: <PageContainer />,
184 192
     meta: {
185 193
       title: "采购管理",
186 194
       permission: 'purchase',
@@ -232,11 +240,20 @@ export const authRoutes = [
232 240
           permission: 'purchase.instore',
233 241
         },
234 242
       },
243
+      {
244
+        path: "inStore/edit",
245
+        element: <PurchaseInStoreEdit />,
246
+        meta: {
247
+          title: "采购详情",
248
+          permission: 'purchase.detail',
249
+          hideInMenu: true,
250
+        },
251
+      },
235 252
     ],
236 253
   },
237 254
   {
238 255
     path: "cms",
239
-    element: <Container />,
256
+    element: <PageContainer />,
240 257
     meta: {
241 258
       title: "公告文件",
242 259
       permission: 'cms',
@@ -247,8 +264,8 @@ export const authRoutes = [
247 264
         element: <Navigate to="rotationChart/list" replace />,
248 265
       },
249 266
       {
250
-        path: "station",
251
-        element: null,
267
+        path: "rotationChart/introduction",
268
+        element: <RotationChartIntroductionEdit />,
252 269
         meta: {
253 270
           title: "本站信息",
254 271
           permission: 'station',
@@ -334,19 +351,9 @@ export const authRoutes = [
334 351
       },
335 352
     ],
336 353
   },
337
-  {
338
-    path: "static",
339
-    element: <StatisCharts />,
340
-    meta: {
341
-      title: "数据分析",
342
-      noSiderBar: true,
343
-      noFooter: true,
344
-      permission: 'static',
345
-    },
346
-  },
347 354
   {
348 355
     path: "system",
349
-    element: <Container />,
356
+    element: <PageContainer />,
350 357
     meta: {
351 358
       title: "系统管理",
352 359
       permission: 'system',
@@ -474,7 +481,7 @@ export const defaultRoutes = [
474 481
   },
475 482
 ];
476 483
 
477
-export function mergeAuthRoutes(r1, r2) {
484
+export function mergeAuthRoutes (r1, r2) {
478 485
   const r = r1.slice();
479 486
   const children = r1[0].children.slice();
480 487
   r[0].children = children.concat(r2);
@@ -483,7 +490,7 @@ export function mergeAuthRoutes(r1, r2) {
483 490
 
484 491
 // 全部路由
485 492
 export const routes = mergeAuthRoutes(defaultRoutes, authRoutes);
486
-function getPath(parent = "/", current = "") {
493
+function getPath (parent = "/", current = "") {
487 494
   if (current.indexOf("/") === 0 || current.indexOf("http") === 0)
488 495
     return current;
489 496
   return `${parent}/${current}`.replace(/\/\//g, "/");

+ 1
- 1
src/services/dish.js 查看文件

@@ -12,7 +12,7 @@ export const getDishList = (params) => request('/dishes', { params,successTip:fa
12 12
  * @param {*} params
13 13
  * @returns
14 14
  */
15
-export const getFoodIngredientsList = (params) => request('/foodIngredients', { params });
15
+export const getFoodIngredientsList = (params) => request('/foodIngredients', { params, successTip: false });
16 16
 
17 17
 /**
18 18
  * 详情

+ 2
- 2
src/services/package.js 查看文件

@@ -5,7 +5,7 @@ import request from '@/utils/request';
5 5
  * @param {*} params
6 6
  * @returns
7 7
  */
8
-export const getPackageList = (params) => request('/package', { params,successTip:false });
8
+export const getPackageList = (params) => request('/package', { params, successTip: false });
9 9
 
10 10
 
11 11
 /**
@@ -36,7 +36,7 @@ export const deletePackage = id => request(`/package/${id}`, { method: 'delete'
36 36
  * @param {*} params 
37 37
  * @returns 
38 38
  */
39
-export const getPackageDetailList = params => request('/packageDetail', { params });
39
+export const getPackageDetailList = params => request('/packageDetail', { params, successTip: false });
40 40
 
41 41
 
42 42
 /**

+ 2
- 10
src/services/regulation.js 查看文件

@@ -1,4 +1,4 @@
1
-import request, { restful } from '@/utils/request';
1
+import request from '@/utils/request';
2 2
 
3 3
 /**
4 4
  * 查询列表
@@ -27,12 +27,4 @@ export const getRegulationById = (id) => request(`/posts/${id}`);
27 27
  * @param {*} id
28 28
  * @returns
29 29
  */
30
-export const deleteRegulation = (id) => request(`/posts/${id}`, { method: 'delete' });
31
-
32
-//标题
33
-/**
34
- * 查询列表
35
- * @param {*} params
36
- * @returns
37
- */
38
-export const getRegulationTitleList = (params) => request('/posts', { params, successTip: false });
30
+export const deleteRegulation = (id) => request(`/posts/${id}`, { method: 'delete' });