@ningboyz/apis 1.0.16 → 1.0.18

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (107) hide show
  1. package/index.ts +20 -21
  2. package/package.json +1 -1
  3. package/{src → packages}/antv/cnfg.ts +13 -18
  4. package/{src → packages}/antv/index.ts +1 -0
  5. package/{src → packages}/antv/main.ts +14 -22
  6. package/{src → packages}/antv/para.ts +11 -17
  7. package/packages/antv/type.ts +56 -0
  8. package/{src → packages}/axios.ts +25 -25
  9. package/{src → packages}/card/gblb.ts +38 -43
  10. package/{src → packages}/card/index.ts +1 -0
  11. package/packages/card/main.ts +210 -0
  12. package/packages/card/p4pz.ts +93 -0
  13. package/packages/card/type.ts +570 -0
  14. package/{src → packages}/card/zcbd.ts +33 -46
  15. package/{src → packages}/card/zccf.ts +34 -50
  16. package/{src → packages}/card/zccz.ts +39 -46
  17. package/packages/card/zcdb.ts +113 -0
  18. package/{src → packages}/card/zclb.ts +28 -29
  19. package/{src → packages}/card/zczj.ts +5 -10
  20. package/{src → packages}/card/zczjProp.ts +5 -12
  21. package/{src → packages}/cnfg/main.ts +9 -6
  22. package/{src → packages}/core/dept.ts +35 -52
  23. package/packages/core/dict.ts +61 -0
  24. package/{src → packages}/core/index.ts +2 -1
  25. package/packages/core/laid.ts +75 -0
  26. package/{src → packages}/core/part.ts +18 -22
  27. package/{src → packages}/core/path.ts +14 -24
  28. package/{src → packages}/core/sysbilltype.ts +5 -10
  29. package/{src → packages}/core/sysclas.ts +3 -7
  30. package/{src → packages}/core/sysmenu.ts +39 -26
  31. package/{src/core/tsystravel.ts → packages/core/systravel.ts} +13 -20
  32. package/{src → packages}/core/type.ts +13 -15
  33. package/packages/core/types.ts +451 -0
  34. package/{src → packages}/core/unit.ts +20 -34
  35. package/packages/core/user.ts +294 -0
  36. package/{src → packages}/expd/index.ts +1 -0
  37. package/{src → packages}/expd/main.ts +3 -5
  38. package/packages/expd/type.ts +8 -0
  39. package/packages/flow/type.ts +0 -0
  40. package/{src → packages}/gzjg/gzlm.ts +10 -2
  41. package/{src → packages}/gzjg/main.ts +8 -0
  42. package/packages/wtui/ctrl.ts +45 -0
  43. package/{src → packages}/wtui/form.ts +20 -33
  44. package/{src → packages}/wtui/item.ts +18 -32
  45. package/packages/wtui/main.ts +69 -0
  46. package/packages/wtui/menu.ts +37 -0
  47. package/packages/wtui/node.ts +37 -0
  48. package/packages/wtui/todo.ts +60 -0
  49. package/packages/wtui/type.ts +327 -0
  50. package/packages/wtui/user.ts +39 -0
  51. package/{src → packages}/wtui/view.ts +25 -28
  52. package/{src → packages}/wtui/zone.ts +11 -19
  53. package/src/card/main.ts +0 -234
  54. package/src/card/p4pz.ts +0 -145
  55. package/src/card/zcdb.ts +0 -141
  56. package/src/core/dict.ts +0 -77
  57. package/src/core/laid.ts +0 -96
  58. package/src/core/user.ts +0 -311
  59. package/src/wtui/ctrl.ts +0 -43
  60. package/src/wtui/main.ts +0 -65
  61. package/src/wtui/menu.ts +0 -44
  62. package/src/wtui/node.ts +0 -66
  63. package/src/wtui/todo.ts +0 -50
  64. package/src/wtui/user.ts +0 -33
  65. /package/{src → packages}/card/form.ts +0 -0
  66. /package/{src → packages}/cnfg/index.ts +0 -0
  67. /package/{src → packages}/core/sysenvr.ts +0 -0
  68. /package/{src → packages}/core/syskjnd.ts +0 -0
  69. /package/{src → packages}/flow/duty.ts +0 -0
  70. /package/{src → packages}/flow/flow.ts +0 -0
  71. /package/{src → packages}/flow/index.ts +0 -0
  72. /package/{src → packages}/flow/main.ts +0 -0
  73. /package/{src → packages}/flow/node.ts +0 -0
  74. /package/{src → packages}/gams/cnfg.ts +0 -0
  75. /package/{src → packages}/gams/index.ts +0 -0
  76. /package/{src → packages}/grow/grow.ts +0 -0
  77. /package/{src → packages}/grow/index.ts +0 -0
  78. /package/{src → packages}/gzjg/index.ts +0 -0
  79. /package/{src → packages}/gzjg/types.ts +0 -0
  80. /package/{src → packages}/gztb/index.ts +0 -0
  81. /package/{src → packages}/gztb/main.ts +0 -0
  82. /package/{src → packages}/load/index.ts +0 -0
  83. /package/{src → packages}/load/yqdw.ts +0 -0
  84. /package/{src → packages}/load/yqkm.ts +0 -0
  85. /package/{src → packages}/noti/index.ts +0 -0
  86. /package/{src → packages}/noti/main.ts +0 -0
  87. /package/{src → packages}/ocri/index.ts +0 -0
  88. /package/{src → packages}/ocri/path.ts +0 -0
  89. /package/{src → packages}/pzpt/cnfg.ts +0 -0
  90. /package/{src → packages}/pzpt/index.ts +0 -0
  91. /package/{src → packages}/pzpt/item.ts +0 -0
  92. /package/{src → packages}/pzpt/k0km.ts +0 -0
  93. /package/{src → packages}/pzpt/k8km.ts +0 -0
  94. /package/{src → packages}/pzpt/kbkm.ts +0 -0
  95. /package/{src → packages}/pzpt/type.ts +0 -0
  96. /package/{src → packages}/pzpt/yqkb.ts +0 -0
  97. /package/{src → packages}/pzpt/yqkm.ts +0 -0
  98. /package/{src → packages}/tabl/index.ts +0 -0
  99. /package/{src → packages}/tabl/main.ts +0 -0
  100. /package/{src → packages}/task/index.ts +0 -0
  101. /package/{src → packages}/task/main.ts +0 -0
  102. /package/{src → packages}/wldy/data.ts +0 -0
  103. /package/{src → packages}/wldy/index.ts +0 -0
  104. /package/{src → packages}/wldy/item.ts +0 -0
  105. /package/{src → packages}/wldy/page.ts +0 -0
  106. /package/{src → packages}/wtui/envr.ts +0 -0
  107. /package/{src → packages}/wtui/index.ts +0 -0
package/index.ts CHANGED
@@ -1,23 +1,22 @@
1
- import CoreRequest from "./src/core";
2
- import FLowRequest from "./src/flow";
3
- import WtuiRequest from "./src/wtui";
4
- import PzptRequest from "./src/pzpt";
5
- import ExpdRequest from "./src/expd";
6
- import GamsRequest from "./src/gams";
7
- import WldyRequest from "./src/wldy";
8
- import GzjgRequest from "./src/gzjg";
9
- import TablRequest from "./src/tabl";
10
- import CardRequest from "./src/card";
11
- import CnfgRequest from "./src/cnfg";
12
- import LoadRequest from "./src/load";
13
- import OcriRequest from "./src/ocri";
14
- import GrowRequest from "./src/grow";
15
- import TaskRequest from "./src/task";
16
- import GztbRequest from "./src/gztb/index";
17
- import AntvRequest from "./src/antv/index";
18
- import NotiRequest from "./src/noti/index";
19
- import { IAxiosConfig } from "./src/axios";
20
-
1
+ import CoreRequest from "./packages/core";
2
+ import FLowRequest from "./packages/flow";
3
+ import WtuiRequest from "./packages/wtui";
4
+ import PzptRequest from "./packages/pzpt";
5
+ import ExpdRequest from "./packages/expd";
6
+ import GamsRequest from "./packages/gams";
7
+ import WldyRequest from "./packages/wldy";
8
+ import GzjgRequest from "./packages/gzjg";
9
+ import TablRequest from "./packages/tabl";
10
+ import CardRequest from "./packages/card";
11
+ import CnfgRequest from "./packages/cnfg";
12
+ import LoadRequest from "./packages/load";
13
+ import OcriRequest from "./packages/ocri";
14
+ import GrowRequest from "./packages/grow";
15
+ import TaskRequest from "./packages/task";
16
+ import GztbRequest from "./packages/gztb/index";
17
+ import AntvRequest from "./packages/antv/index";
18
+ import NotiRequest from "./packages/noti/index";
19
+ import { IAxiosConfig } from "./packages/axios";
21
20
  class Request {
22
21
  public static core: CoreRequest;
23
22
  public static flow: FLowRequest;
@@ -60,4 +59,4 @@ class Request {
60
59
  }
61
60
  }
62
61
 
63
- export default Request;
62
+ export default Request;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ningboyz/apis",
3
- "version": "1.0.16",
3
+ "version": "1.0.18",
4
4
  "private": false,
5
5
  "description": "宁波甬政请求库",
6
6
  "author": "",
@@ -1,7 +1,8 @@
1
1
  import { TAntv } from "@ningboyz/types";
2
2
  import type { HttpRequest } from "../axios";
3
+ import { IAntvCnfgDetaildbQuerys, IAntvCnfgSelectdbQuerys } from "./type";
3
4
 
4
- class ParaRequest {
5
+ class CnfgRequest {
5
6
  private httpRequest: HttpRequest;
6
7
  constructor(httpRequest: HttpRequest) {
7
8
  this.httpRequest = httpRequest;
@@ -10,43 +11,37 @@ class ParaRequest {
10
11
  /**
11
12
  * 获取数字提取列表
12
13
  */
13
- selectdb(antvmain: number) {
14
- const params = {
15
- antvmain
16
- };
17
- return this.httpRequest.post<TAntv.IAntvCnfgResponse[]>("/antv/tcnfg/selectdb", undefined, params);
14
+ selectdb(querys: IAntvCnfgSelectdbQuerys) {
15
+ return this.httpRequest.post<TAntv.IAntvCnfgResponse[]>("/antv/tcnfg/selectdb", querys, undefined);
18
16
  }
19
17
 
20
18
  /**
21
19
  * 新增数字提取列表
22
20
  */
23
- insertdb(data: object) {
24
- return this.httpRequest.post<TAntv.IAntvCnfgResponse[]>("/antv/tcnfg/insertdb", data, undefined);
21
+ insertdb(Querys: object) {
22
+ return this.httpRequest.post<TAntv.IAntvCnfgResponse[]>("/antv/tcnfg/insertdb", undefined, Querys);
25
23
  }
26
24
 
27
25
  /**
28
26
  * 修改数字提取列表
29
27
  */
30
- updatedb(data: object) {
31
- return this.httpRequest.post<TAntv.IAntvCnfgResponse[]>("/antv/tcnfg/updatedb", data, undefined);
28
+ updatedb(Querys: object) {
29
+ return this.httpRequest.post<TAntv.IAntvCnfgResponse[]>("/antv/tcnfg/updatedb", undefined, Querys);
32
30
  }
33
31
 
34
32
  /**
35
33
  * 删除数字提取列表
36
34
  */
37
- deletedb(data: object) {
38
- return this.httpRequest.post<TAntv.IAntvCnfgResponse[]>("/antv/tcnfg/deletedb", data, undefined);
35
+ deletedb(Querys: object) {
36
+ return this.httpRequest.post<TAntv.IAntvCnfgResponse[]>("/antv/tcnfg/deletedb", undefined, Querys);
39
37
  }
40
38
 
41
39
  /**
42
40
  * 获取数字提取详情列表
43
41
  */
44
- detaildb(antvmain: number) {
45
- const params = {
46
- antvmain
47
- };
48
- return this.httpRequest.post<TAntv.IAntvCnfgResponse[]>("/antv/tcnfg/detaildb", undefined, params);
42
+ detaildb(querys: IAntvCnfgDetaildbQuerys) {
43
+ return this.httpRequest.post<TAntv.IAntvCnfgResponse[]>("/antv/tcnfg/detaildb", querys, undefined);
49
44
  }
50
45
  }
51
46
 
52
- export default ParaRequest;
47
+ export default CnfgRequest;
@@ -2,6 +2,7 @@ import { createRequest, IAxiosConfig } from "../axios";
2
2
  import MainRequest from "./main";
3
3
  import CnfgRequest from "./cnfg";
4
4
  import ParaRequest from "./para";
5
+ export * from "./type";
5
6
 
6
7
  class AntvRequest {
7
8
  public main: MainRequest;
@@ -1,7 +1,8 @@
1
1
  import { TAntv } from "@ningboyz/types";
2
2
  import type { HttpRequest } from "../axios";
3
+ import { IAntvMainDetaildbQuerys, IAntvMainGet5DataQuerys } from "./type";
3
4
 
4
- class ParaRequest {
5
+ class MainRequest {
5
6
  private httpRequest: HttpRequest;
6
7
  constructor(httpRequest: HttpRequest) {
7
8
  this.httpRequest = httpRequest;
@@ -17,46 +18,37 @@ class ParaRequest {
17
18
  /**
18
19
  * 新增数字提取类型列表
19
20
  */
20
- insertdb(data: object) {
21
- return this.httpRequest.post<TAntv.IAntvMainResponse[]>("/antv/tmain/insertdb", data, undefined);
21
+ insertdb(Querys: object) {
22
+ return this.httpRequest.post<TAntv.IAntvMainResponse[]>("/antv/tmain/insertdb", undefined, Querys);
22
23
  }
23
24
 
24
25
  /**
25
26
  * 修改数字提取类型列表
26
27
  */
27
- updatedb(data: object) {
28
- return this.httpRequest.post<TAntv.IAntvMainResponse[]>("/antv/tmain/updatedb", data, undefined);
28
+ updatedb(Querys: object) {
29
+ return this.httpRequest.post<TAntv.IAntvMainResponse[]>("/antv/tmain/updatedb", undefined, Querys);
29
30
  }
30
31
 
31
32
  /**
32
33
  * 删除数字提取类型列表
33
34
  */
34
- deletedb(data: object) {
35
- return this.httpRequest.post<TAntv.IAntvMainResponse[]>("/antv/tmain/deletedb", data, undefined);
35
+ deletedb(Querys: object) {
36
+ return this.httpRequest.post<TAntv.IAntvMainResponse[]>("/antv/tmain/deletedb", undefined, Querys);
36
37
  }
37
38
 
38
39
  /**
39
- * 删除数字提取类型列表
40
+ * 详情数字提取类型列表
40
41
  */
41
- detaildb(antvmain: number) {
42
- const params = {
43
- antvmain
44
- };
45
- return this.httpRequest.post<TAntv.IAntvMainResponse[]>("/antv/tmain/detaildb", undefined, params);
42
+ detaildb(querys: IAntvMainDetaildbQuerys) {
43
+ return this.httpRequest.post<TAntv.IAntvMainResponse[]>("/antv/tmain/detaildb", querys, undefined);
46
44
  }
47
45
 
48
46
  /**
49
47
  * 动态取数
50
48
  */
51
- get5data(antvname: string, cnfgname: string, unitTypeText: string, cnfgPara?: any) {
52
- const params = {
53
- antvname,
54
- cnfgname,
55
- unitTypeText,
56
- ...cnfgPara
57
- };
58
- return this.httpRequest.post<any>("/gapi/antv/tmain/get5data", undefined, params);
49
+ get5data(querys: IAntvMainGet5DataQuerys) {
50
+ return this.httpRequest.post<any>("/gapi/antv/tmain/get5data", querys, undefined);
59
51
  }
60
52
  }
61
53
 
62
- export default ParaRequest;
54
+ export default MainRequest;
@@ -1,5 +1,6 @@
1
1
  import { TAntv } from "@ningboyz/types";
2
2
  import type { HttpRequest } from "../axios";
3
+ import { IAntvParaDetaildbQuerys, IAntvParaSelectdbQuerys } from "./type";
3
4
 
4
5
  class ParaRequest {
5
6
  private httpRequest: HttpRequest;
@@ -10,43 +11,36 @@ class ParaRequest {
10
11
  /**
11
12
  * 获取数字提取参数列表
12
13
  */
13
- selectdb(antvmain: number, antvcnfg: number) {
14
- const params = {
15
- antvmain,
16
- antvcnfg
17
- };
18
- return this.httpRequest.post<TAntv.IAntvParaResponse[]>("/antv/tpara/selectdb", undefined, params);
14
+ selectdb(querys: IAntvParaSelectdbQuerys) {
15
+ return this.httpRequest.post<TAntv.IAntvParaResponse[]>("/antv/tpara/selectdb", querys, undefined);
19
16
  }
20
17
 
21
18
  /**
22
19
  * 新增数字提取参数列表
23
20
  */
24
- insertdb(data: object) {
25
- return this.httpRequest.post<TAntv.IAntvParaResponse[]>("/antv/tpara/insertdb", data, undefined);
21
+ insertdb(Querys: object) {
22
+ return this.httpRequest.post<TAntv.IAntvParaResponse[]>("/antv/tpara/insertdb", undefined, Querys);
26
23
  }
27
24
 
28
25
  /**
29
26
  * 修改数字提取参数列表
30
27
  */
31
- updatedb(data: object) {
32
- return this.httpRequest.post<TAntv.IAntvParaResponse[]>("/antv/tpara/updatedb", data, undefined);
28
+ updatedb(Querys: object) {
29
+ return this.httpRequest.post<TAntv.IAntvParaResponse[]>("/antv/tpara/updatedb", undefined, Querys);
33
30
  }
34
31
 
35
32
  /**
36
33
  * 删除数字提取参数列表
37
34
  */
38
- deletedb(data: object) {
39
- return this.httpRequest.post<TAntv.IAntvParaResponse[]>("/antv/tpara/deletedb", data, undefined);
35
+ deletedb(Querys: object) {
36
+ return this.httpRequest.post<TAntv.IAntvParaResponse[]>("/antv/tpara/deletedb", undefined, Querys);
40
37
  }
41
38
 
42
39
  /**
43
40
  * 获取数字提取参数详情列表
44
41
  */
45
- detaildb(antvmain: number) {
46
- const params = {
47
- antvmain
48
- };
49
- return this.httpRequest.post<TAntv.IAntvParaResponse[]>("/antv/tpara/detaildb", undefined, params);
42
+ detaildb(querys: IAntvParaDetaildbQuerys) {
43
+ return this.httpRequest.post<TAntv.IAntvParaResponse[]>("/antv/tpara/detaildb", querys, undefined);
50
44
  }
51
45
  }
52
46
 
@@ -0,0 +1,56 @@
1
+ /** cnfg */
2
+ export interface IAntvCnfgSelectdbQuerys {
3
+ antvmain: number;
4
+ }
5
+
6
+ export class TAntvCnfgSelectdbQuerys implements IAntvCnfgSelectdbQuerys {
7
+ antvmain: number = -1;
8
+ }
9
+
10
+ export interface IAntvCnfgDetaildbQuerys {
11
+ antvmain: number;
12
+ }
13
+
14
+ export class TAntvCnfgDetaildbQuerys implements IAntvCnfgDetaildbQuerys {
15
+ antvmain: number = -1;
16
+ }
17
+
18
+ /** main */
19
+ export interface IAntvMainDetaildbQuerys {
20
+ antvmain: number;
21
+ }
22
+
23
+ export class TAntvMainDetaildbQuerys implements IAntvMainDetaildbQuerys {
24
+ antvmain: number = -1;
25
+ }
26
+
27
+ export interface IAntvMainGet5DataQuerys {
28
+ antvname: string;
29
+ cnfgname: string;
30
+ unittypetext: string;
31
+ }
32
+
33
+ export class TAntvMainGet5DataQuerys implements IAntvMainGet5DataQuerys {
34
+ antvname: string = "";
35
+ cnfgname: string = "";
36
+ unittypetext: string = "";
37
+ }
38
+
39
+ /** para */
40
+ export interface IAntvParaSelectdbQuerys {
41
+ antvmain: number;
42
+ antvcnfg: number;
43
+ }
44
+
45
+ export class TAntvParaSelectdbQuerys implements IAntvParaSelectdbQuerys {
46
+ antvmain: number = -1;
47
+ antvcnfg: number = -1;
48
+ }
49
+
50
+ export interface IAntvParaDetaildbQuerys {
51
+ antvmain: number;
52
+ }
53
+
54
+ export class TAntvParaDetaildbQuerys implements IAntvParaDetaildbQuerys {
55
+ antvmain: number = -1;
56
+ }
@@ -14,7 +14,7 @@ const initUserInfo = {
14
14
  whobuild: 0,
15
15
  userindx: 0,
16
16
  usrtoken: "",
17
- dbconfig: "",
17
+ dbconfig: ""
18
18
  };
19
19
 
20
20
  class HttpRequest {
@@ -26,20 +26,18 @@ class HttpRequest {
26
26
  const { baseURL, timeout = 60000, getUserInfo } = config;
27
27
  this.instance = axios.create({
28
28
  baseURL,
29
- timeout,
29
+ timeout
30
30
  });
31
31
 
32
32
  this.instance.interceptors.request.use((request) => {
33
- const userInfo = !_.isNil(getUserInfo)
34
- ? getUserInfo()
35
- : new TSessionUserInfo();
33
+ const userInfo = !_.isNil(getUserInfo) ? getUserInfo() : new TSessionUserInfo();
36
34
  /** 添加随机数,防止浏览器接口缓存 */
37
35
  const time = new Date().getTime() + Math.round(Math.random() * 1000);
38
36
  request.params = {
39
37
  whobuild: userInfo.whobuild !== 0 ? userInfo.whobuild : undefined,
40
38
  userindx: userInfo.userIndx !== 0 ? userInfo.userIndx : undefined,
41
39
  ...request.params,
42
- r: time,
40
+ r: time
43
41
  };
44
42
  request.headers.usrtoken = userInfo.usrtoken;
45
43
  request.headers.dbconfig = userInfo.dbConfig;
@@ -47,13 +45,22 @@ class HttpRequest {
47
45
  });
48
46
  }
49
47
 
50
- get<T>(url: string, params?: object): Promise<IResponse<T>> {
48
+ getFormData(data: object) {
49
+ if (data instanceof FormData) {
50
+ return data;
51
+ }
52
+ const formData = new FormData();
53
+ formData.append("params", JSON.stringify(data));
54
+ return formData;
55
+ }
56
+
57
+ get<T>(url: string, querys?: object): Promise<IResponse<T>> {
51
58
  return new Promise((resolve, reject) => {
52
59
  this.instance
53
60
  .request<T>({
54
61
  method: this.METHOD_GET,
55
62
  url,
56
- params,
63
+ params: querys
57
64
  })
58
65
  .then((res: AxiosResponse) => {
59
66
  resolve(res.data as IResponse<T>);
@@ -64,22 +71,18 @@ class HttpRequest {
64
71
  });
65
72
  }
66
73
 
67
- post<T>(
68
- url: string,
69
- data?: object,
70
- params?: object,
71
- headers?: object
72
- ): Promise<IResponse<T>> {
74
+ post<T>(url: string, querys?: object, params?: object, headers?: object): Promise<IResponse<T>> {
73
75
  return new Promise((resolve, reject) => {
76
+ const data = !_.isNil(params) ? this.getFormData(params) : void 0;
74
77
  this.instance
75
78
  .request<T>({
76
79
  method: this.METHOD_POST,
77
80
  url,
78
- params,
81
+ params: querys,
79
82
  data,
80
83
  headers: {
81
- ...headers,
82
- },
84
+ ...headers
85
+ }
83
86
  })
84
87
  .then((res: AxiosResponse) => {
85
88
  resolve(res.data as IResponse<T>);
@@ -90,21 +93,18 @@ class HttpRequest {
90
93
  });
91
94
  }
92
95
 
93
- postFile<T>(
94
- url: string,
95
- data?: object,
96
- params?: object
97
- ): Promise<IResponse<T>> {
96
+ postFile<T>(url: string, querys?: object, params?: object): Promise<IResponse<T>> {
98
97
  return new Promise((resolve, reject) => {
98
+ const data = !_.isNil(params) ? this.getFormData(params) : void 0;
99
99
  this.instance
100
100
  .request({
101
101
  url,
102
102
  method: this.METHOD_POST,
103
- params,
103
+ params: querys,
104
104
  data,
105
105
  headers: {
106
- "Content-Type": `multipart/form-data;boundary=${new Date().getTime()}`,
107
- },
106
+ "Content-Type": `multipart/form-data;boundary=${new Date().getTime()}`
107
+ }
108
108
  })
109
109
  .then((res: AxiosResponse) => {
110
110
  resolve(res.data as IResponse<T>);
@@ -1,5 +1,6 @@
1
1
  import { TCard } from "@ningboyz/types";
2
2
  import type { HttpRequest } from "../axios";
3
+ import { ICardGblbCheckzclbQuerys, ICardGblbDetaildbQuerys, ICardGblbGet4zclbQuerys, ICardGblbNextYearQuerys, ICardGblbSelectdbQuerys, ICardGblbUploaddbQuerys } from "./type";
3
4
 
4
5
  class GblbRequest {
5
6
  private httpRequest: HttpRequest;
@@ -9,86 +10,83 @@ class GblbRequest {
9
10
 
10
11
  /**
11
12
  * 获取国标类别
13
+ * @param querys
14
+ * @returns
12
15
  */
13
- selectdb(sourcend: number) {
14
- const params = {
15
- sourcend
16
- };
17
- return this.httpRequest.post<TCard.IGblbResponse[]>("/gapi/card/tgblb/selectdb", undefined, params);
16
+ selectdb(querys: ICardGblbSelectdbQuerys) {
17
+ return this.httpRequest.post<TCard.IGblbResponse[]>("/gapi/card/tgblb/selectdb", querys, undefined);
18
18
  }
19
19
 
20
20
  /**
21
21
  * 添加国标类别
22
+ * @param params
23
+ * @returns
22
24
  */
23
- insertdb(data: object) {
24
- return this.httpRequest.post<TCard.IGblbResponse[]>(`/gapi/card/tgblb/insertdb`, data, undefined);
25
+ insertdb(params: object) {
26
+ return this.httpRequest.post<TCard.IGblbResponse[]>(`/gapi/card/tgblb/insertdb`, undefined, params);
25
27
  }
26
28
 
27
29
  /**
28
30
  * 编辑国标类别
29
- * @param data
31
+ * @param params
30
32
  */
31
- updatedb(data: object) {
32
- return this.httpRequest.post<TCard.IGblbResponse[]>("/gapi/card/tgblb/updatedb", data, undefined);
33
+ updatedb(params: object) {
34
+ return this.httpRequest.post<TCard.IGblbResponse[]>("/gapi/card/tgblb/updatedb", undefined, params);
33
35
  }
34
36
 
35
37
  /**
36
38
  * 删除国标类别
37
- * @param data
39
+ * @param params
38
40
  */
39
- deletedb(data: object) {
40
- return this.httpRequest.post<TCard.IGblbResponse[]>("/gapi/card/tgblb/deletedb", data, undefined);
41
+ deletedb(params: object) {
42
+ return this.httpRequest.post<TCard.IGblbResponse[]>("/gapi/card/tgblb/deletedb", undefined, params);
41
43
  }
42
44
 
43
45
  /**
44
46
  * 国标类别详情
45
- * @param gblbmain
46
- * @param data
47
- * @param sourcend
47
+ * @param querys
48
+ * @param params
49
+ * @returns
48
50
  */
49
- detaildb(gblbmain: number, data: object, sourcend: number) {
50
- const params = {
51
- gblbmain,
52
- sourcend
53
- };
54
- return this.httpRequest.post<TCard.IGblbResponse[]>("/gapi/card/tgblb/detaildb", data, params);
51
+ detaildb(querys: ICardGblbDetaildbQuerys, params: object) {
52
+ return this.httpRequest.post<TCard.IGblbResponse[]>("/gapi/card/tgblb/detaildb", querys, params);
55
53
  }
56
54
 
57
55
  /**
58
56
  * 导入国标类别
57
+ * @param querys
58
+ * @param params
59
+ * @returns
59
60
  */
60
- uploaddb(data: object, params: object) {
61
- return this.httpRequest.post<TCard.IGblbResponse[]>(`/gapi/card/tgblb/uploaddb`, data, params);
61
+ uploaddb(querys: ICardGblbUploaddbQuerys, params: object) {
62
+ return this.httpRequest.post<TCard.IGblbResponse[]>(`/gapi/card/tgblb/uploaddb`, querys, params);
62
63
  }
63
64
 
64
65
  /**
65
66
  * 判断国标类别关联资产卡片
66
67
  * @param data
67
68
  */
68
- judgedb(data: object) {
69
- return this.httpRequest.post<TCard.IGblbResponse[]>("/gapi/card/tgblb/judgedb", data, undefined);
69
+ judgedb(params: object) {
70
+ return this.httpRequest.post<TCard.IGblbResponse[]>("/gapi/card/tgblb/judgedb", undefined, params);
70
71
  }
71
72
 
72
73
  /**
73
74
  * 根据国标类别获取资产类别
75
+ * @param querys
76
+ * @returns
74
77
  */
75
- get4zclb(gblbmain: number, sourcend: number) {
76
- const params = {
77
- gblbmain,
78
- sourcend
79
- };
80
- return this.httpRequest.post<TCard.IZclbResponse[]>(`/gapi/card/tgblb/get4zclb`, undefined, params);
78
+ get4zclb(querys: ICardGblbGet4zclbQuerys) {
79
+ return this.httpRequest.post<TCard.IZclbResponse[]>(`/gapi/card/tgblb/get4zclb`, querys, undefined);
81
80
  }
82
81
 
83
82
  /**
84
83
  * 检查国标类别对应资产类别
84
+ * @param querys
85
+ * @param params
86
+ * @returns
85
87
  */
86
- checkzclb(data: object, zclbtype: number, sourcend: number) {
87
- const params = {
88
- zclbtype,
89
- sourcend
90
- };
91
- return this.httpRequest.post<TCard.IGblbResponse[]>(`/gapi/card/tgblb/checkzclb`, data, params);
88
+ checkzclb(querys: ICardGblbCheckzclbQuerys, params: object) {
89
+ return this.httpRequest.post<TCard.IGblbResponse[]>(`/gapi/card/tgblb/checkzclb`, querys, params);
92
90
  }
93
91
 
94
92
  /**
@@ -96,11 +94,8 @@ class GblbRequest {
96
94
  * 结账时,调用该接口,将结账的那条年度传入sourcend
97
95
  * 如果跨年度,则调用该接口
98
96
  */
99
- nextYear(sourcend: number) {
100
- const params = {
101
- sourcend
102
- };
103
- return this.httpRequest.post<TCard.IZclbResponse[]>(`/gapi/card/tgblb/nextyear`, undefined, params);
97
+ nextYear(querys: ICardGblbNextYearQuerys) {
98
+ return this.httpRequest.post<TCard.IZclbResponse[]>(`/gapi/card/tgblb/nextyear`, querys, undefined);
104
99
  }
105
100
  }
106
101
 
@@ -10,6 +10,7 @@ import FormRequest from "./form";
10
10
  import ZczjRequest from "./zczj";
11
11
  import P4pzRequest from "./p4pz";
12
12
  import ZczjPropRequest from "./zczjProp";
13
+ export * from "./type";
13
14
 
14
15
  class CardRequest {
15
16
  public gblb: GblbRequest;