@ningboyz/apis 1.0.0 → 1.0.1
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.
- package/index.ts +6 -0
- package/package.json +1 -1
- package/src/card/gblb.ts +65 -0
- package/src/card/index.ts +34 -0
- package/src/card/main.ts +10 -0
- package/src/card/tpart.ts +58 -0
- package/src/card/tplace.ts +45 -0
- package/src/card/tresgister.ts +11 -0
- package/src/card/tunit.ts +53 -0
- package/src/card/zcbd.ts +41 -0
- package/src/card/zccf.ts +41 -0
- package/src/card/zccz.ts +41 -0
- package/src/card/zcdb.ts +41 -0
- package/src/cnfg/index.ts +13 -0
- package/src/cnfg/main.ts +39 -0
- package/src/core/ttype.ts +7 -0
- package/src/core/tuser.ts +23 -0
- package/src/wldy/data.ts +56 -0
- package/src/wldy/index.ts +3 -0
package/index.ts
CHANGED
|
@@ -7,6 +7,8 @@ import GamsRequest from "./src/gams";
|
|
|
7
7
|
import WldyRequest from "./src/wldy";
|
|
8
8
|
import GzjgRequest from "./src/gzjg";
|
|
9
9
|
import TablRequest from "./src/tabl";
|
|
10
|
+
import CardRequest from "./src/card";
|
|
11
|
+
import CnfgRequest from "./src/cnfg";
|
|
10
12
|
|
|
11
13
|
class Request {
|
|
12
14
|
public static core: CoreRequest;
|
|
@@ -18,6 +20,8 @@ class Request {
|
|
|
18
20
|
public static wldy: WldyRequest;
|
|
19
21
|
public static gzjg: GzjgRequest;
|
|
20
22
|
public static tabl: TablRequest;
|
|
23
|
+
public static card: CardRequest;
|
|
24
|
+
public static cnfg: CnfgRequest;
|
|
21
25
|
|
|
22
26
|
public static createRequest(baseURL: string) {
|
|
23
27
|
this.core = new CoreRequest(baseURL);
|
|
@@ -29,6 +33,8 @@ class Request {
|
|
|
29
33
|
this.wldy = new WldyRequest(baseURL);
|
|
30
34
|
this.gzjg = new GzjgRequest(baseURL);
|
|
31
35
|
this.tabl = new TablRequest(baseURL);
|
|
36
|
+
this.card = new CardRequest(baseURL);
|
|
37
|
+
this.cnfg = new CnfgRequest(baseURL);
|
|
32
38
|
}
|
|
33
39
|
}
|
|
34
40
|
|
package/package.json
CHANGED
package/src/card/gblb.ts
ADDED
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { TCard } from "@ningboyz/types";
|
|
2
|
+
import type { HttpRequest } from "../axios";
|
|
3
|
+
|
|
4
|
+
class GblbRequest {
|
|
5
|
+
private httpRequest: HttpRequest;
|
|
6
|
+
constructor(httpRequest: HttpRequest) {
|
|
7
|
+
this.httpRequest = httpRequest;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* 获取国标类别
|
|
12
|
+
*/
|
|
13
|
+
selectdb(sourcend: number) {
|
|
14
|
+
const params = {
|
|
15
|
+
sourcend
|
|
16
|
+
};
|
|
17
|
+
return this.httpRequest.post<TCard.IGblbResponse[]>("/gapi/card/tgblb/selectdb", undefined, params);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* 添加国标类别
|
|
22
|
+
*/
|
|
23
|
+
insertdb(data: object) {
|
|
24
|
+
return this.httpRequest.post<TCard.IGblbResponse[]>(`/gapi/card/tgblb/insertdb`, data, undefined);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* 编辑国标类别
|
|
29
|
+
* @param data
|
|
30
|
+
*/
|
|
31
|
+
updatedb(data: object) {
|
|
32
|
+
return this.httpRequest.post<TCard.IGblbResponse[]>("/gapi/card/tgblb/updatedb", data, undefined);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* 删除国标类别
|
|
37
|
+
* @param data
|
|
38
|
+
*/
|
|
39
|
+
deletedb(data: object) {
|
|
40
|
+
return this.httpRequest.post<TCard.IGblbResponse[]>("/gapi/card/tgblb/deletedb", data, undefined);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* 编辑国标类别
|
|
45
|
+
* @param data
|
|
46
|
+
*/
|
|
47
|
+
detaildb(gblbmain: number, data: object) {
|
|
48
|
+
const params = {
|
|
49
|
+
gblbmain
|
|
50
|
+
};
|
|
51
|
+
return this.httpRequest.post<TCard.IGblbResponse[]>("/gapi/card/tgblb/detaildb", data, params);
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* 导入国标类别
|
|
55
|
+
*/
|
|
56
|
+
uploaddb(sourcend: number, data: object) {
|
|
57
|
+
const params = {
|
|
58
|
+
sourcend
|
|
59
|
+
};
|
|
60
|
+
return this.httpRequest.post<TCard.IGblbResponse[]>(`/gapi/card/tgblb/uploaddb`, data, params);
|
|
61
|
+
}
|
|
62
|
+
// sourcend=2024
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
export default GblbRequest;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { createRequest } from "../axios";
|
|
2
|
+
import GblbRequest from "./gblb";
|
|
3
|
+
import MainRequest from "./main";
|
|
4
|
+
import ZcbdRequest from "./zcbd";
|
|
5
|
+
import ZccfRequest from "./zccf";
|
|
6
|
+
import ZcczRequest from "./zccz";
|
|
7
|
+
import ZcdbRequest from "./zcdb";
|
|
8
|
+
import TUnitRequest from "./tunit";
|
|
9
|
+
import TPartRequest from "./tpart";
|
|
10
|
+
|
|
11
|
+
class CardRequest {
|
|
12
|
+
public gblb: GblbRequest;
|
|
13
|
+
public main: MainRequest;
|
|
14
|
+
public zcbd: ZcbdRequest;
|
|
15
|
+
public zccf: ZccfRequest;
|
|
16
|
+
public zccz: ZcczRequest;
|
|
17
|
+
public zcdb: ZcdbRequest;
|
|
18
|
+
public tunit: TUnitRequest;
|
|
19
|
+
public tpart: TPartRequest;
|
|
20
|
+
|
|
21
|
+
constructor(baseURL: string) {
|
|
22
|
+
const request = createRequest(baseURL);
|
|
23
|
+
this.gblb = new GblbRequest(request);
|
|
24
|
+
this.main = new MainRequest(request);
|
|
25
|
+
this.zcbd = new ZcbdRequest(request);
|
|
26
|
+
this.zccf = new ZccfRequest(request);
|
|
27
|
+
this.zccz = new ZcczRequest(request);
|
|
28
|
+
this.zcdb = new ZcdbRequest(request);
|
|
29
|
+
this.tunit = new TUnitRequest(request);
|
|
30
|
+
this.tpart = new TPartRequest(request);
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export default CardRequest;
|
package/src/card/main.ts
ADDED
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { TCore } from "@ningboyz/types";
|
|
2
|
+
import type { HttpRequest } from "../axios";
|
|
3
|
+
|
|
4
|
+
class TPartRequest {
|
|
5
|
+
private httpRequest: HttpRequest;
|
|
6
|
+
constructor(httpRequest: HttpRequest) {
|
|
7
|
+
this.httpRequest = httpRequest;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* 获取角色管理
|
|
12
|
+
*/
|
|
13
|
+
selectdb(sysclasc: number, useruuid: string, unitmain: number) {
|
|
14
|
+
const params = {
|
|
15
|
+
sysclasc,
|
|
16
|
+
useruuid,
|
|
17
|
+
unitmain
|
|
18
|
+
};
|
|
19
|
+
return this.httpRequest.post<TCore.IPartResponse[]>("/core/tpart/selectdb", undefined, params);
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* 新增角色管理
|
|
24
|
+
* @param data
|
|
25
|
+
*/
|
|
26
|
+
insertdb(data: object) {
|
|
27
|
+
return this.httpRequest.post<TCore.IPartResponse[]>("/core/tpart/insertdb", data, undefined);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* 编辑角色管理
|
|
32
|
+
* @param data
|
|
33
|
+
*/
|
|
34
|
+
updatedb(data: object) {
|
|
35
|
+
return this.httpRequest.post<TCore.IPartResponse[]>("/core/tpart/updatedb", data, undefined);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* 角色管理详情
|
|
40
|
+
* @param unitmain
|
|
41
|
+
*/
|
|
42
|
+
detaildb(usrpartc: number, data: object) {
|
|
43
|
+
const params = {
|
|
44
|
+
usrpartc
|
|
45
|
+
};
|
|
46
|
+
return this.httpRequest.post<TCore.IPartResponse[]>("/core/tpart/detaildb", data, params);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* 删除角色管理
|
|
51
|
+
* @param data
|
|
52
|
+
*/
|
|
53
|
+
deletedb(data: object) {
|
|
54
|
+
return this.httpRequest.post<TCore.IPartResponse[]>("/core/tpart/deletedb", data, undefined);
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
export default TPartRequest;
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import type { TCore } from "@ningboyz/types";
|
|
2
|
+
import type { HttpRequest } from "../axios";
|
|
3
|
+
|
|
4
|
+
class TPlaceRequest {
|
|
5
|
+
private httpRequest: HttpRequest;
|
|
6
|
+
constructor(httpRequest: HttpRequest) {
|
|
7
|
+
this.httpRequest = httpRequest;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* 获取存放地点
|
|
12
|
+
* @param unitmain
|
|
13
|
+
*/
|
|
14
|
+
selectdb(unitmain: number = 1286) {
|
|
15
|
+
const params = {
|
|
16
|
+
unitmain
|
|
17
|
+
};
|
|
18
|
+
return this.httpRequest.post<TCore.ILaidResponse[]>("/core/tlaid/selectdb", undefined, params);
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* 添加存放地点
|
|
22
|
+
*/
|
|
23
|
+
insertdb(unitmain: number, data: object) {
|
|
24
|
+
const params = {
|
|
25
|
+
unitmain
|
|
26
|
+
};
|
|
27
|
+
return this.httpRequest.post<TCore.ILaidResponse[]>(`/core/tlaid/insertdb`, data, params);
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* 编辑存放单位
|
|
31
|
+
* @param data
|
|
32
|
+
*/
|
|
33
|
+
updatedb(data: object) {
|
|
34
|
+
return this.httpRequest.post<TCore.ILaidResponse[]>("/core/tlaid/updatedb", data, undefined);
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* 删除存放单位
|
|
38
|
+
* @param data
|
|
39
|
+
*/
|
|
40
|
+
deletedb(data: object) {
|
|
41
|
+
return this.httpRequest.post<TCore.ILaidResponse[]>("/core/tlaid/deletedb", data, undefined);
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
export default TPlaceRequest;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
// import { TCore } from "@ningboyz/types";
|
|
2
|
+
// import type { HttpRequest } from "../axios";
|
|
3
|
+
|
|
4
|
+
class TRegisterRequest {
|
|
5
|
+
// private httpRequest: HttpRequest;
|
|
6
|
+
// constructor(httpRequest: HttpRequest) {
|
|
7
|
+
// this.httpRequest = httpRequest;
|
|
8
|
+
// }
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export default TRegisterRequest;
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { TCore } from "@ningboyz/types";
|
|
2
|
+
import type { HttpRequest } from "../axios";
|
|
3
|
+
|
|
4
|
+
class TUnitRequest {
|
|
5
|
+
private httpRequest: HttpRequest;
|
|
6
|
+
constructor(httpRequest: HttpRequest) {
|
|
7
|
+
this.httpRequest = httpRequest;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* 获取单位管理
|
|
12
|
+
*/
|
|
13
|
+
selectdb() {
|
|
14
|
+
return this.httpRequest.post<TCore.IUnitResponse[]>("/core/tunit/selectdb");
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* 新增单位
|
|
19
|
+
* @param data
|
|
20
|
+
*/
|
|
21
|
+
insertdb(data: object) {
|
|
22
|
+
return this.httpRequest.post<TCore.IUnitResponse[]>("/core/tunit/insertdb", data, undefined);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* 编辑单位
|
|
27
|
+
* @param data
|
|
28
|
+
*/
|
|
29
|
+
updatedb(data: object) {
|
|
30
|
+
return this.httpRequest.post<TCore.IUnitResponse[]>("/core/tunit/updatedb", data, undefined);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* 单位详情
|
|
35
|
+
* @param unitmain
|
|
36
|
+
*/
|
|
37
|
+
detaildb(unitmain: number, data: object) {
|
|
38
|
+
const params = {
|
|
39
|
+
unitmain
|
|
40
|
+
};
|
|
41
|
+
return this.httpRequest.post<TCore.IUnitResponse[]>("/core/tunit/detaildb", data, params);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* 删除单位
|
|
46
|
+
* @param data
|
|
47
|
+
*/
|
|
48
|
+
deletedb(data: object) {
|
|
49
|
+
return this.httpRequest.post<TCore.IUnitResponse[]>("/core/tunit/deletedb", data, undefined);
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
export default TUnitRequest;
|
package/src/card/zcbd.ts
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { TCard } from "@ningboyz/types";
|
|
2
|
+
import type { HttpRequest } from "../axios";
|
|
3
|
+
|
|
4
|
+
class ZcbdRequest {
|
|
5
|
+
private httpRequest: HttpRequest;
|
|
6
|
+
constructor(httpRequest: HttpRequest) {
|
|
7
|
+
this.httpRequest = httpRequest;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* 获取资产变动
|
|
12
|
+
*/
|
|
13
|
+
selectdb() {
|
|
14
|
+
return this.httpRequest.post<TCard.IZcbdResponse[]>("/gapi/card/tzcbd/selectdb");
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* 添加资产变动
|
|
19
|
+
*/
|
|
20
|
+
insertdb(data: object) {
|
|
21
|
+
return this.httpRequest.post<TCard.IZcbdResponse[]>(`/gapi/card/tzcbd/insertdb`, data, undefined);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* 编辑资产变动
|
|
26
|
+
* @param data
|
|
27
|
+
*/
|
|
28
|
+
updatedb(data: object) {
|
|
29
|
+
return this.httpRequest.post<TCard.IZcbdResponse[]>("/gapi/card/tzcbd/updatedb", data, undefined);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* 删除资产变动
|
|
34
|
+
* @param data
|
|
35
|
+
*/
|
|
36
|
+
deletedb(data: object) {
|
|
37
|
+
return this.httpRequest.post<TCard.IZcbdResponse[]>("/gapi/card/tzcbd/deletedb", data, undefined);
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
export default ZcbdRequest;
|
package/src/card/zccf.ts
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { TCard } from "@ningboyz/types";
|
|
2
|
+
import type { HttpRequest } from "../axios";
|
|
3
|
+
|
|
4
|
+
class ZccfRequest {
|
|
5
|
+
private httpRequest: HttpRequest;
|
|
6
|
+
constructor(httpRequest: HttpRequest) {
|
|
7
|
+
this.httpRequest = httpRequest;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* 获取资产拆分
|
|
12
|
+
*/
|
|
13
|
+
selectdb() {
|
|
14
|
+
return this.httpRequest.post<TCard.IZccfResponse[]>("/gapi/card/tzccf/selectdb");
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* 添加资产拆分
|
|
19
|
+
*/
|
|
20
|
+
insertdb(data: object) {
|
|
21
|
+
return this.httpRequest.post<TCard.IZccfResponse[]>(`/gapi/card/tzccf/insertdb`, data, undefined);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* 编辑资产拆分
|
|
26
|
+
* @param data
|
|
27
|
+
*/
|
|
28
|
+
updatedb(data: object) {
|
|
29
|
+
return this.httpRequest.post<TCard.IZccfResponse[]>("/gapi/card/tzccf/updatedb", data, undefined);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* 删除资产拆分
|
|
34
|
+
* @param data
|
|
35
|
+
*/
|
|
36
|
+
deletedb(data: object) {
|
|
37
|
+
return this.httpRequest.post<TCard.IZccfResponse[]>("/gapi/card/tzccf/deletedb", data, undefined);
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
export default ZccfRequest;
|
package/src/card/zccz.ts
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { TCard } from "@ningboyz/types";
|
|
2
|
+
import type { HttpRequest } from "../axios";
|
|
3
|
+
|
|
4
|
+
class ZcczRequest {
|
|
5
|
+
private httpRequest: HttpRequest;
|
|
6
|
+
constructor(httpRequest: HttpRequest) {
|
|
7
|
+
this.httpRequest = httpRequest;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* 获取资产处置
|
|
12
|
+
*/
|
|
13
|
+
selectdb() {
|
|
14
|
+
return this.httpRequest.post<TCard.IZcczResponse[]>("/gapi/card/tzccz/selectdb");
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* 添加资产处置
|
|
19
|
+
*/
|
|
20
|
+
insertdb(data: object) {
|
|
21
|
+
return this.httpRequest.post<TCard.IZcczResponse[]>(`/gapi/card/tzccz/insertdb`, data, undefined);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* 编辑资产处置
|
|
26
|
+
* @param data
|
|
27
|
+
*/
|
|
28
|
+
updatedb(data: object) {
|
|
29
|
+
return this.httpRequest.post<TCard.IZcczResponse[]>("/gapi/card/tzccz/updatedb", data, undefined);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* 删除资产处置
|
|
34
|
+
* @param data
|
|
35
|
+
*/
|
|
36
|
+
deletedb(data: object) {
|
|
37
|
+
return this.httpRequest.post<TCard.IZcczResponse[]>("/gapi/card/tzccz/deletedb", data, undefined);
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
export default ZcczRequest;
|
package/src/card/zcdb.ts
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { TCard } from "@ningboyz/types";
|
|
2
|
+
import type { HttpRequest } from "../axios";
|
|
3
|
+
|
|
4
|
+
class ZcdbRequest {
|
|
5
|
+
private httpRequest: HttpRequest;
|
|
6
|
+
constructor(httpRequest: HttpRequest) {
|
|
7
|
+
this.httpRequest = httpRequest;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* 获取资产调拨
|
|
12
|
+
*/
|
|
13
|
+
selectdb() {
|
|
14
|
+
return this.httpRequest.post<TCard.IZcdbResponse[]>("/gapi/card/tzcdb/selectdb");
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* 添加资产调拨
|
|
19
|
+
*/
|
|
20
|
+
insertdb(data: object) {
|
|
21
|
+
return this.httpRequest.post<TCard.IZcdbResponse[]>(`/gapi/card/tzcdb/insertdb`, data, undefined);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* 编辑资产调拨
|
|
26
|
+
* @param data
|
|
27
|
+
*/
|
|
28
|
+
updatedb(data: object) {
|
|
29
|
+
return this.httpRequest.post<TCard.IZcdbResponse[]>("/gapi/card/tzcdb/updatedb", data, undefined);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* 删除资产调拨
|
|
34
|
+
* @param data
|
|
35
|
+
*/
|
|
36
|
+
deletedb(data: object) {
|
|
37
|
+
return this.httpRequest.post<TCard.IZcdbResponse[]>("/gapi/card/tzcdb/deletedb", data, undefined);
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
export default ZcdbRequest;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { createRequest } from "../axios";
|
|
2
|
+
import MainRequest from "./main";
|
|
3
|
+
|
|
4
|
+
class CnfgRequest {
|
|
5
|
+
public main: MainRequest;
|
|
6
|
+
|
|
7
|
+
constructor(baseURL: string) {
|
|
8
|
+
const request = createRequest(baseURL);
|
|
9
|
+
this.main = new MainRequest(request);
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export default CnfgRequest;
|
package/src/cnfg/main.ts
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { TCnfg } from "@ningboyz/types";
|
|
2
|
+
import type { HttpRequest } from "../axios";
|
|
3
|
+
|
|
4
|
+
class MainRequest {
|
|
5
|
+
private httpRequest: HttpRequest;
|
|
6
|
+
constructor(httpRequest: HttpRequest) {
|
|
7
|
+
this.httpRequest = httpRequest;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* 获取配置
|
|
12
|
+
*/
|
|
13
|
+
selectdb() {
|
|
14
|
+
return this.httpRequest.post<TCnfg.ICnfgMainResponse[]>("/gapi/cnfg/tmain/selectdb");
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* 添加配置
|
|
19
|
+
*/
|
|
20
|
+
insertdb(data: object) {
|
|
21
|
+
return this.httpRequest.post<TCnfg.ICnfgMainResponse[]>("/gapi/cnfg/tmain/insertdb", data);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* 修改配置
|
|
26
|
+
*/
|
|
27
|
+
updatedb(data: object) {
|
|
28
|
+
return this.httpRequest.post<TCnfg.ICnfgMainResponse[]>("/gapi/cnfg/tmain/updatedb", data);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* 删除配置
|
|
33
|
+
*/
|
|
34
|
+
deletedb(data: object) {
|
|
35
|
+
return this.httpRequest.post<TCnfg.ICnfgMainResponse[]>("/gapi/cnfg/tmain/deletedb", data);
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
export default MainRequest;
|
package/src/core/ttype.ts
CHANGED
|
@@ -48,6 +48,13 @@ class TTypeRequest {
|
|
|
48
48
|
};
|
|
49
49
|
return this.httpRequest.post<TCore.ITypeResponse[]>("/core/ttype/detaildb", undefined, params);
|
|
50
50
|
}
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* 查找工资栏目---字典类型
|
|
54
|
+
*/
|
|
55
|
+
typeSelectdb() {
|
|
56
|
+
return this.httpRequest.post<TCore.ITypeResponse[]>("/core/ttype/typelite/selectdb");
|
|
57
|
+
}
|
|
51
58
|
}
|
|
52
59
|
|
|
53
60
|
export default TTypeRequest;
|
package/src/core/tuser.ts
CHANGED
|
@@ -232,6 +232,29 @@ class TUserRequest {
|
|
|
232
232
|
get4view() {
|
|
233
233
|
return this.httpRequest.post<TWtui.IViewCtrlResponse[]>("/core/tuser/get4view");
|
|
234
234
|
}
|
|
235
|
+
|
|
236
|
+
/**
|
|
237
|
+
* 扫码登录
|
|
238
|
+
*/
|
|
239
|
+
scanlogin(code: string) {
|
|
240
|
+
return this.httpRequest.post<TCore.IUserResponse[]>(`http://www.yzcloud.net.cn:19000/dapi/user/get_userinfo_by_qrcode?appid=c9d1eee0c33ade8e0c9b7f12844a7b54&authcode=${code}`);
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
/**
|
|
244
|
+
* 扫码三方登录
|
|
245
|
+
* @param verifyID
|
|
246
|
+
* @param userName
|
|
247
|
+
* @returns
|
|
248
|
+
*/
|
|
249
|
+
loginThird(verifyID: string, userName: string) {
|
|
250
|
+
const thridObj = {
|
|
251
|
+
verifyID,
|
|
252
|
+
userName
|
|
253
|
+
};
|
|
254
|
+
const formData = new FormData();
|
|
255
|
+
formData.append("params", JSON.stringify(thridObj));
|
|
256
|
+
return this.httpRequest.post<TCore.IUserResponse[]>("/core/tuser/verifydb/dingding?thirdapp=DD", formData);
|
|
257
|
+
}
|
|
235
258
|
}
|
|
236
259
|
|
|
237
260
|
export default TUserRequest;
|
package/src/wldy/data.ts
ADDED
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import type { TWldy } from "@ningboyz/types";
|
|
2
|
+
import type { HttpRequest } from "../axios";
|
|
3
|
+
|
|
4
|
+
class TDataRequest {
|
|
5
|
+
private httpRequest: HttpRequest;
|
|
6
|
+
constructor(httpRequest: HttpRequest) {
|
|
7
|
+
this.httpRequest = httpRequest;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* 查询打印模板
|
|
12
|
+
* @param sysclasc
|
|
13
|
+
* @param useruuid
|
|
14
|
+
* @param unitmain
|
|
15
|
+
*/
|
|
16
|
+
selectdb(wldypage: number) {
|
|
17
|
+
const params = {
|
|
18
|
+
wldypage
|
|
19
|
+
};
|
|
20
|
+
return this.httpRequest.post<TWldy.IWldyDataResponse[]>("/gapi/wldy/tdata/selectdb", undefined, params);
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* 添加打印模板数据
|
|
25
|
+
* @param data
|
|
26
|
+
*/
|
|
27
|
+
insertdb(data: object) {
|
|
28
|
+
return this.httpRequest.post<TWldy.IWldyDataResponse[]>("/gapi/wldy/tdata/insertdb", data);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* 删除打印模板数据
|
|
33
|
+
* @param data
|
|
34
|
+
*/
|
|
35
|
+
deletedb(data: object) {
|
|
36
|
+
return this.httpRequest.post<TWldy.IWldyDataResponse[]>("/gapi/wldy/tdata/deletedb", data);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* 修改打印模板数据
|
|
41
|
+
* @param data
|
|
42
|
+
*/
|
|
43
|
+
updatedb(data: object) {
|
|
44
|
+
return this.httpRequest.post<TWldy.IWldyDataResponse[]>("/gapi/wldy/tdata/updatedb", data);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* 查看打印模板详情
|
|
49
|
+
* @param params
|
|
50
|
+
*/
|
|
51
|
+
detaildb(params: object) {
|
|
52
|
+
return this.httpRequest.post<TWldy.IWldyDataResponse[]>("/gapi/wldy/tdata/detaildb", undefined, params);
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
export default TDataRequest;
|
package/src/wldy/index.ts
CHANGED
|
@@ -1,12 +1,15 @@
|
|
|
1
1
|
import { createRequest } from "../axios";
|
|
2
2
|
import TPageRequest from "./page";
|
|
3
|
+
import TDataRequest from "./data";
|
|
3
4
|
|
|
4
5
|
class WldyRequest {
|
|
5
6
|
public tpage: TPageRequest;
|
|
7
|
+
public tdata: TDataRequest;
|
|
6
8
|
|
|
7
9
|
constructor(baseURL: string) {
|
|
8
10
|
const request = createRequest(baseURL);
|
|
9
11
|
this.tpage = new TPageRequest(request);
|
|
12
|
+
this.tdata = new TDataRequest(request);
|
|
10
13
|
}
|
|
11
14
|
}
|
|
12
15
|
|