[baozhangchao] 3 years ago
parent
commit
846b3403b4

+ 8
- 16
src/pages/ContentManagementSystem/InformationList/index.jsx View File

34
     })
34
     })
35
   }
35
   }
36
 
36
 
37
-  const handleOK = (record, data) => {
38
-    const titleCourse = record.status ? '您确定要禁用该用户吗? 禁用后该用户不能在后台登陆!' : '您确定要启用该用户吗? 启用后该用户将允许在后台登陆!';
39
-    Modal.confirm({
40
-      title: titleCourse,
41
-      okText: '确认',
42
-      cancelText: '取消',
43
-      onOk () {
44
-        publishNote(record.noteId, record.status ? 'off' : 'on').then(res => {
45
-          message.success('操作成功');
46
-          actionRef.current.reload()
47
-        })
48
-      },
49
-    });
50
-  }
37
+
51
   const actions = () => [
38
   const actions = () => [
52
     <Button key='add' type="primary" icon={<PlusOutlined />} onClick={() => gotoDetail()}>新增</Button>,
39
     <Button key='add' type="primary" icon={<PlusOutlined />} onClick={() => gotoDetail()}>新增</Button>,
53
   ]
40
   ]
41
+
42
+
43
+
44
+
45
+
54
   const columns = [
46
   const columns = [
55
     {
47
     {
56
       title: '资讯分类',
48
       title: '资讯分类',
66
       search: false,
58
       search: false,
67
     }, {
59
     }, {
68
       title: '资讯内容',
60
       title: '资讯内容',
69
-      dataIndex: 'name',
70
-      key: 'name',
61
+      dataIndex: 'nam1e',
62
+      key: 'nam1e',
71
       search: false,
63
       search: false,
72
     },
64
     },
73
     {
65
     {

+ 1
- 0
src/pages/GPSDevice/GPS/GPSEdit/index.jsx View File

21
   };
21
   };
22
 
22
 
23
   const Submit = values => {
23
   const Submit = values => {
24
+    setLoading(false)
24
     console.log("🚀 ~ file: index.jsx ~ line 21 ~ values", values)
25
     console.log("🚀 ~ file: index.jsx ~ line 21 ~ values", values)
25
 
26
 
26
   };
27
   };

+ 3
- 17
src/pages/GPSDevice/GPS/index.jsx View File

1
 import { history, Link } from 'umi';
1
 import { history, Link } from 'umi';
2
 import { useRef } from 'react';
2
 import { useRef } from 'react';
3
-import { Button, Modal, message, Popconfirm, Tooltip } from 'antd';
4
-import { PlusOutlined, QuestionCircleOutlined } from '@ant-design/icons';
3
+import { Button, message, Popconfirm, } from 'antd';
4
+import { PlusOutlined, } from '@ant-design/icons';
5
 import { PageHeaderWrapper } from '@ant-design/pro-layout';
5
 import { PageHeaderWrapper } from '@ant-design/pro-layout';
6
 import ProTable, { TableDropdown } from '@ant-design/pro-table';
6
 import ProTable, { TableDropdown } from '@ant-design/pro-table';
7
 
7
 
13
       key: '1',
13
       key: '1',
14
       name: '胡彦斌',
14
       name: '胡彦斌',
15
       age: 32,
15
       age: 32,
16
+      status: 1,
16
       zz: '西湖区湖底公园1号',
17
       zz: '西湖区湖底公园1号',
17
     },
18
     },
18
 
19
 
19
   ];
20
   ];
20
 
21
 
21
-
22
   // 测试内容👆-------------------------
22
   // 测试内容👆-------------------------
23
 
23
 
24
   const actionRef = useRef();
24
   const actionRef = useRef();
34
     })
34
     })
35
   }
35
   }
36
 
36
 
37
-  const handleOK = (record, data) => {
38
-    const titleCourse = record.status ? '您确定要禁用该用户吗? 禁用后该用户不能在后台登陆!' : '您确定要启用该用户吗? 启用后该用户将允许在后台登陆!';
39
-    Modal.confirm({
40
-      title: titleCourse,
41
-      okText: '确认',
42
-      cancelText: '取消',
43
-      onOk () {
44
-        publishNote(record.noteId, record.status ? 'off' : 'on').then(res => {
45
-          message.success('操作成功');
46
-          actionRef.current.reload()
47
-        })
48
-      },
49
-    });
50
-  }
51
   const actions = () => [
37
   const actions = () => [
52
     <Button key='add' type="primary" icon={<PlusOutlined />} onClick={() => gotoDetail()}>新增</Button>,
38
     <Button key='add' type="primary" icon={<PlusOutlined />} onClick={() => gotoDetail()}>新增</Button>,
53
   ]
39
   ]

+ 0
- 1
src/pages/SystemManagement/BasicParameters/index.jsx View File

22
 
22
 
23
   const Submit = values => {
23
   const Submit = values => {
24
     console.log("🚀 ~ file: index.jsx ~ line 21 ~ values", values)
24
     console.log("🚀 ~ file: index.jsx ~ line 21 ~ values", values)
25
-
26
   };
25
   };
27
 
26
 
28
   return (
27
   return (

+ 1
- 1
src/pages/SystemManagement/MapExtent/index.jsx View File

92
               </Popconfirm>,
92
               </Popconfirm>,
93
             ],
93
             ],
94
           },
94
           },
95
-        }} />,
95
+        }} />
96
       <Modal title="套餐权重修改" visible={editModal} onCancel={onCancel} keyboard={false} maskClosable={false} destroyOnClose={true} footer={null}>
96
       <Modal title="套餐权重修改" visible={editModal} onCancel={onCancel} keyboard={false} maskClosable={false} destroyOnClose={true} footer={null}>
97
         < Form {...formItemLayout} onFinish={Submit} form={form2} >
97
         < Form {...formItemLayout} onFinish={Submit} form={form2} >
98
           <FormItem label="范围名称" name="name" rules={[{ required: true, message: '请输入' }]}>
98
           <FormItem label="范围名称" name="name" rules={[{ required: true, message: '请输入' }]}>

+ 5
- 4
src/utils/request.js View File

1
+
1
 import { request } from 'umi';
2
 import { request } from 'umi';
2
 import { downloadBlob } from './download';
3
 import { downloadBlob } from './download';
3
 
4
 
4
-function requestInterceptor(url, options) {
5
+function requestInterceptor (url, options) {
5
   const headers = options.headers || {};
6
   const headers = options.headers || {};
6
   const token = localStorage.getItem('token')
7
   const token = localStorage.getItem('token')
7
     ? { 'X-Authorization-JWT': localStorage.getItem('token') }
8
     ? { 'X-Authorization-JWT': localStorage.getItem('token') }
8
     : // ? { 'Authorization': localStorage.getItem('token') }
9
     : // ? { 'Authorization': localStorage.getItem('token') }
9
-      {};
10
+    {};
10
   const prefix =
11
   const prefix =
11
     process.env.NODE_ENV === 'production' ? 'http://sgl-v2.njyunzhi.com/api/admin' : '/api/admin';
12
     process.env.NODE_ENV === 'production' ? 'http://sgl-v2.njyunzhi.com/api/admin' : '/api/admin';
12
 
13
 
22
   };
23
   };
23
 }
24
 }
24
 
25
 
25
-async function responseInterceptor(response) {
26
+async function responseInterceptor (response) {
26
   const contextType = response.headers.get('content-type');
27
   const contextType = response.headers.get('content-type');
27
   if (contextType.indexOf('json') > -1) {
28
   if (contextType.indexOf('json') > -1) {
28
     const result = await response.clone().json();
29
     const result = await response.clone().json();
64
 
65
 
65
 export default (...args) => request(...args).then((r) => r.data);
66
 export default (...args) => request(...args).then((r) => r.data);
66
 
67
 
67
-export function queryTable(apiRequest) {
68
+export function queryTable (apiRequest) {
68
   return function (params) {
69
   return function (params) {
69
     return apiRequest({
70
     return apiRequest({
70
       ...params,
71
       ...params,