Преглед изворни кода

Merge branch 'master' of http://git.ycjcjy.com/nanyang/machinery-admin

李志伟 пре 3 година
родитељ
комит
4d32f35fd5

+ 8
- 16
src/pages/ContentManagementSystem/InformationList/index.jsx Прегледај датотеку

@@ -34,23 +34,15 @@ export default (props) => {
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 38
   const actions = () => [
52 39
     <Button key='add' type="primary" icon={<PlusOutlined />} onClick={() => gotoDetail()}>新增</Button>,
53 40
   ]
41
+
42
+
43
+
44
+
45
+
54 46
   const columns = [
55 47
     {
56 48
       title: '资讯分类',
@@ -66,8 +58,8 @@ export default (props) => {
66 58
       search: false,
67 59
     }, {
68 60
       title: '资讯内容',
69
-      dataIndex: 'name',
70
-      key: 'name',
61
+      dataIndex: 'nam1e',
62
+      key: 'nam1e',
71 63
       search: false,
72 64
     },
73 65
     {

+ 1
- 0
src/pages/GPSDevice/GPS/GPSEdit/index.jsx Прегледај датотеку

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

+ 3
- 17
src/pages/GPSDevice/GPS/index.jsx Прегледај датотеку

@@ -1,7 +1,7 @@
1 1
 import { history, Link } from 'umi';
2 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 5
 import { PageHeaderWrapper } from '@ant-design/pro-layout';
6 6
 import ProTable, { TableDropdown } from '@ant-design/pro-table';
7 7
 
@@ -13,12 +13,12 @@ export default (props) => {
13 13
       key: '1',
14 14
       name: '胡彦斌',
15 15
       age: 32,
16
+      status: 1,
16 17
       zz: '西湖区湖底公园1号',
17 18
     },
18 19
 
19 20
   ];
20 21
 
21
-
22 22
   // 测试内容👆-------------------------
23 23
 
24 24
   const actionRef = useRef();
@@ -34,20 +34,6 @@ export default (props) => {
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 37
   const actions = () => [
52 38
     <Button key='add' type="primary" icon={<PlusOutlined />} onClick={() => gotoDetail()}>新增</Button>,
53 39
   ]

+ 0
- 1
src/pages/SystemManagement/BasicParameters/index.jsx Прегледај датотеку

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

+ 1
- 1
src/pages/SystemManagement/MapExtent/index.jsx Прегледај датотеку

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

+ 5
- 4
src/utils/request.js Прегледај датотеку

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