Yansen 2 lat temu
rodzic
commit
7e5c2b948f
2 zmienionych plików z 3 dodań i 2 usunięć
  1. 1
    1
      config/routes.js
  2. 2
    1
      src/pages/guaranteeTask/Edit/BasicForm.jsx

+ 1
- 1
config/routes.js Wyświetl plik

83
     path: '/guaranteeTask/edit',
83
     path: '/guaranteeTask/edit',
84
     name: '任务详情',
84
     name: '任务详情',
85
     icon: 'borderBottom',
85
     icon: 'borderBottom',
86
-    // hideInMenu: true,
86
+    hideInMenu: true,
87
     component: './guaranteeTask/Edit/index',
87
     component: './guaranteeTask/Edit/index',
88
   },
88
   },
89
   {
89
   {

+ 2
- 1
src/pages/guaranteeTask/Edit/BasicForm.jsx Wyświetl plik

1
 import React, { useState, useEffect } from 'react';
1
 import React, { useState, useEffect } from 'react';
2
 import moment from 'moment';
2
 import moment from 'moment';
3
 import { Link } from 'umi';
3
 import { Link } from 'umi';
4
+import { history } from '@umijs/max';
4
 import { Button, Row, Col, Form, Input, InputNumber, DatePicker, notification } from 'antd';
5
 import { Button, Row, Col, Form, Input, InputNumber, DatePicker, notification } from 'antd';
5
 import { addGuaranteeTask, updateGuaranteeTask } from '@/services/api/guaranteeTask';
6
 import { addGuaranteeTask, updateGuaranteeTask } from '@/services/api/guaranteeTask';
6
 
7
 
199
       <Row gutter={48}>
200
       <Row gutter={48}>
200
         <Col offset={6} span={12}>
201
         <Col offset={6} span={12}>
201
           <Button type="primary" htmlType="submit" loading={loading}>提交</Button>
202
           <Button type="primary" htmlType="submit" loading={loading}>提交</Button>
202
-          <Button style={{ marginLeft: '48px' }}>返回</Button>
203
+          <Button style={{ marginLeft: '48px' }} onClick={() => history.back()}>返回</Button>
203
           <Button style={{ marginLeft: '48px' }}>
204
           <Button style={{ marginLeft: '48px' }}>
204
             <Link target="_blank" to={`/guaranteeTask/print?id=${id}`}>打印预览</Link>
205
             <Link target="_blank" to={`/guaranteeTask/print?id=${id}`}>打印预览</Link>
205
           </Button>
206
           </Button>