李志伟 2 年前
父节点
当前提交
fd434df3f1
共有 2 个文件被更改,包括 19 次插入5 次删除
  1. 3
    3
      config/proxy.js
  2. 16
    2
      src/components/PageTable/index.jsx

+ 3
- 3
config/proxy.js 查看文件

@@ -11,11 +11,11 @@ export default {
11 11
     // localhost:8000/api/** -> https://preview.pro.ant.design/api/**
12 12
     '/api/': {
13 13
       // 要代理的地址
14
-      target: 'http://192.168.89.147:9002',
14
+      target: 'http://192.168.89.25:9002',
15 15
       changeOrigin: true,
16 16
       headers: {
17
-        origin: 'http://192.168.89.147:9002',
18
-        referer: 'http://192.168.89.147:9002',
17
+        origin: 'http://192.168.89.25:9002',
18
+        referer: 'http://192.168.89.25:9002',
19 19
       },
20 20
 
21 21
       // target: 'http://resumework-service.njyunzhi.com',

+ 16
- 2
src/components/PageTable/index.jsx 查看文件

@@ -1,5 +1,5 @@
1 1
 import React, { useState, useCallback, useRef } from 'react';
2
-import { Button } from 'antd';
2
+import { Button, message } from 'antd';
3 3
 import { UploadOutlined } from '@ant-design/icons';
4 4
 import ProTable from '@ant-design/pro-table';
5 5
 import { queryTable } from '@/utils/request';
@@ -30,11 +30,25 @@ export default (props) => {
30 30
   const [exporting, exportFunc] = useExport(expfunc);
31 31
 
32 32
   const handleExport = useCallback(() => {
33
+
33 34
     if (!exportParams.current) {
34 35
       const formData = ref.current ? ref.current.getFieldsValue() : {};
35 36
       exportParams.current = { ...formData, ...params }
36 37
     }
37
-    exportFunc(exportParams.current);
38
+    let obj = exportParams.current
39
+    if (obj.prefix) {
40
+      if (obj.start) {
41
+        if (obj.end) {
42
+          exportFunc(exportParams.current);
43
+        } else {
44
+          message.info('请输入终止号码点击查询后再点击导出')
45
+        }
46
+      } else {
47
+        message.info('请输入起始号码点击查询后再点击导出')
48
+      }
49
+    } else {
50
+      message.info('请输入卡号前缀点击查询后再点击导出')
51
+    }
38 52
   }, [exportFunc, params]);
39 53
 
40 54
   // 添加导出按钮