@ningboyz/apis 1.0.0 → 1.0.3
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 +12 -0
- package/package.json +1 -1
- package/src/card/gblb.ts +63 -0
- package/src/card/index.ts +28 -0
- package/src/card/main.ts +64 -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/dept.ts +55 -0
- package/src/core/{tdict.ts → dict.ts} +2 -2
- package/src/core/index.ts +39 -36
- package/src/core/{tpart.ts → part.ts} +23 -23
- package/src/core/{tpath.ts → path.ts} +2 -2
- package/src/core/place.ts +51 -0
- package/src/core/{tsysbilltype.ts → sysbilltype.ts} +2 -2
- package/src/core/{tsysclas.ts → sysclas.ts} +2 -2
- package/src/core/{tsysenvr.ts → sysenvr.ts} +2 -2
- package/src/core/{tsyskjnd.ts → syskjnd.ts} +2 -2
- package/src/core/{tsysmenu.ts → sysmenu.ts} +3 -3
- package/src/core/{ttype.ts → type.ts} +9 -2
- package/src/core/{tunit.ts → unit.ts} +8 -12
- package/src/core/{tuser.ts → user.ts} +25 -2
- package/src/expd/index.ts +3 -3
- package/src/expd/main.ts +2 -2
- package/src/flow/duty.ts +2 -2
- package/src/flow/index.ts +9 -9
- package/src/flow/{tmain.ts → main.ts} +2 -2
- package/src/flow/{tnode.ts → node.ts} +2 -2
- package/src/gams/cnfg.ts +2 -2
- package/src/gams/index.ts +3 -3
- package/src/gzjg/{tgzlm.ts → gzlm.ts} +2 -2
- package/src/gzjg/index.ts +6 -6
- package/src/gzjg/{tmain.ts → main.ts} +2 -2
- package/src/load/index.ts +16 -0
- package/src/load/yqdw.ts +16 -0
- package/src/load/yqkm.ts +16 -0
- package/src/ocri/index.ts +13 -0
- package/src/{core/tdept.ts → ocri/path.ts} +4 -7
- package/src/pzpt/cnfg.ts +7 -4
- package/src/pzpt/index.ts +24 -18
- package/src/pzpt/item.ts +2 -2
- package/src/pzpt/k0km.ts +2 -2
- package/src/pzpt/k8km.ts +2 -2
- package/src/pzpt/kbkm.ts +2 -2
- package/src/pzpt/type.ts +2 -2
- package/src/pzpt/yqkb.ts +27 -0
- package/src/pzpt/yqkm.ts +48 -0
- package/src/tabl/index.ts +3 -3
- package/src/tabl/{tmain.ts → main.ts} +11 -2
- package/src/wldy/data.ts +56 -0
- package/src/wldy/index.ts +9 -3
- package/src/wldy/item.ts +56 -0
- package/src/wldy/page.ts +2 -2
- package/src/wtui/index.ts +12 -12
- package/src/wtui/main.ts +2 -2
- package/src/wtui/tenvr.ts +2 -2
- package/src/wtui/todo.ts +2 -2
- package/src/wtui/view.ts +2 -2
package/index.ts
CHANGED
|
@@ -7,6 +7,10 @@ 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";
|
|
12
|
+
import LoadRequest from "./src/load";
|
|
13
|
+
import OcriRequest from "./src/ocri";
|
|
10
14
|
|
|
11
15
|
class Request {
|
|
12
16
|
public static core: CoreRequest;
|
|
@@ -18,6 +22,10 @@ class Request {
|
|
|
18
22
|
public static wldy: WldyRequest;
|
|
19
23
|
public static gzjg: GzjgRequest;
|
|
20
24
|
public static tabl: TablRequest;
|
|
25
|
+
public static card: CardRequest;
|
|
26
|
+
public static cnfg: CnfgRequest;
|
|
27
|
+
public static load: LoadRequest;
|
|
28
|
+
public static ocri: OcriRequest;
|
|
21
29
|
|
|
22
30
|
public static createRequest(baseURL: string) {
|
|
23
31
|
this.core = new CoreRequest(baseURL);
|
|
@@ -29,6 +37,10 @@ class Request {
|
|
|
29
37
|
this.wldy = new WldyRequest(baseURL);
|
|
30
38
|
this.gzjg = new GzjgRequest(baseURL);
|
|
31
39
|
this.tabl = new TablRequest(baseURL);
|
|
40
|
+
this.card = new CardRequest(baseURL);
|
|
41
|
+
this.cnfg = new CnfgRequest(baseURL);
|
|
42
|
+
this.load = new LoadRequest(baseURL);
|
|
43
|
+
this.ocri = new OcriRequest(baseURL);
|
|
32
44
|
}
|
|
33
45
|
}
|
|
34
46
|
|
package/package.json
CHANGED
package/src/card/gblb.ts
ADDED
|
@@ -0,0 +1,63 @@
|
|
|
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
|
+
*/
|
|
57
|
+
uploaddb(data: object, params: object) {
|
|
58
|
+
return this.httpRequest.post<TCard.IGblbResponse[]>(`/gapi/card/tgblb/uploaddb`, data, params);
|
|
59
|
+
}
|
|
60
|
+
// sourcend=2024
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
export default GblbRequest;
|
|
@@ -0,0 +1,28 @@
|
|
|
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
|
+
|
|
9
|
+
class CardRequest {
|
|
10
|
+
public gblb: GblbRequest;
|
|
11
|
+
public main: MainRequest;
|
|
12
|
+
public zcbd: ZcbdRequest;
|
|
13
|
+
public zccf: ZccfRequest;
|
|
14
|
+
public zccz: ZcczRequest;
|
|
15
|
+
public zcdb: ZcdbRequest;
|
|
16
|
+
|
|
17
|
+
constructor(baseURL: string) {
|
|
18
|
+
const request = createRequest(baseURL);
|
|
19
|
+
this.gblb = new GblbRequest(request);
|
|
20
|
+
this.main = new MainRequest(request);
|
|
21
|
+
this.zcbd = new ZcbdRequest(request);
|
|
22
|
+
this.zccf = new ZccfRequest(request);
|
|
23
|
+
this.zccz = new ZcczRequest(request);
|
|
24
|
+
this.zcdb = new ZcdbRequest(request);
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export default CardRequest;
|
package/src/card/main.ts
ADDED
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { TCard } 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<TCard.ICardMainResponse[]>("/gapi/card/tmain/selectdb");
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* 新增资产卡片
|
|
19
|
+
*/
|
|
20
|
+
insertdb(data: object) {
|
|
21
|
+
return this.httpRequest.post<TCard.ICardMainResponse[]>("/gapi/card/tmain/insertdb", data, undefined);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* 编辑资产卡片
|
|
26
|
+
* @param data
|
|
27
|
+
*/
|
|
28
|
+
updatedb(data: object) {
|
|
29
|
+
return this.httpRequest.post<TCard.ICardMainResponse[]>("/gapi/card/tmain/updatedb", data, undefined);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* 删除资产卡片
|
|
34
|
+
* @param data
|
|
35
|
+
* cardmain=1001
|
|
36
|
+
*/
|
|
37
|
+
deletedb(data: object) {
|
|
38
|
+
return this.httpRequest.post<TCard.ICardMainResponse[]>("/gapi/card/tmain/deletedb", data, undefined);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* 资产卡片详情
|
|
43
|
+
* @param data
|
|
44
|
+
* cardmain=1001
|
|
45
|
+
*/
|
|
46
|
+
detaildb(cardmain: number, cardexid: number, data: object) {
|
|
47
|
+
const params = {
|
|
48
|
+
cardmain,
|
|
49
|
+
cardexid
|
|
50
|
+
};
|
|
51
|
+
return this.httpRequest.post<TCard.ICardMainResponse[]>("/gapi/card/tmain/detaildb", data, params);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* 批量新增资产卡片
|
|
56
|
+
* @param data
|
|
57
|
+
* cardmain=1001
|
|
58
|
+
*/
|
|
59
|
+
uploaddb(data: object) {
|
|
60
|
+
return this.httpRequest.post<TCard.ICardMainResponse[]>("/gapi/card/tmain/uploaddb", data, undefined);
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
export default MainRequest;
|
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/dept.ts
ADDED
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import type { TCore } from "@ningboyz/types";
|
|
2
|
+
import type { HttpRequest } from "../axios";
|
|
3
|
+
|
|
4
|
+
class DeptRequest {
|
|
5
|
+
private httpRequest: HttpRequest;
|
|
6
|
+
constructor(httpRequest: HttpRequest) {
|
|
7
|
+
this.httpRequest = httpRequest;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* 获取所有部门单位
|
|
12
|
+
*/
|
|
13
|
+
deptliteGet4dept() {
|
|
14
|
+
return this.httpRequest.post<TCore.IDeptLiteResponse[]>("/core/tdept/deptlite/get4dept");
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* 根据单位获取对应的部门
|
|
19
|
+
*/
|
|
20
|
+
selectdb(unitmain: number = -1) {
|
|
21
|
+
const params = {
|
|
22
|
+
unitmain
|
|
23
|
+
};
|
|
24
|
+
return this.httpRequest.post<TCore.IDeptResponse[]>("/core/tdept/selectdb", undefined, params);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* 获取部门详情
|
|
29
|
+
*/
|
|
30
|
+
detaildb(deptmain: number = -1) {
|
|
31
|
+
const params = {
|
|
32
|
+
deptmain
|
|
33
|
+
};
|
|
34
|
+
return this.httpRequest.post<TCore.IDeptResponse[]>("/core/tdept/detaildb", undefined, params);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* 新增部门
|
|
39
|
+
*/
|
|
40
|
+
insertdb(unitmain: number = -1, formData: FormData) {
|
|
41
|
+
const params = {
|
|
42
|
+
unitmain
|
|
43
|
+
};
|
|
44
|
+
return this.httpRequest.post<TCore.IDeptResponse[]>("/core/tdept/insertdb", formData, params);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* 修改部门
|
|
49
|
+
*/
|
|
50
|
+
deletedb(formData: FormData) {
|
|
51
|
+
return this.httpRequest.post<TCore.IDeptResponse[]>("/core/tdept/deletedb", formData, undefined);
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
export default DeptRequest;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { TCore } from "@ningboyz/types";
|
|
2
2
|
import type { HttpRequest } from "../axios";
|
|
3
3
|
|
|
4
|
-
class
|
|
4
|
+
class DictRequest {
|
|
5
5
|
private httpRequest: HttpRequest;
|
|
6
6
|
constructor(httpRequest: HttpRequest) {
|
|
7
7
|
this.httpRequest = httpRequest;
|
|
@@ -66,4 +66,4 @@ class TDictRequest {
|
|
|
66
66
|
}
|
|
67
67
|
}
|
|
68
68
|
|
|
69
|
-
export default
|
|
69
|
+
export default DictRequest;
|
package/src/core/index.ts
CHANGED
|
@@ -1,45 +1,48 @@
|
|
|
1
1
|
import { createRequest } from "../axios";
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
import
|
|
12
|
-
import
|
|
13
|
-
import
|
|
2
|
+
import TypeRequest from "./type";
|
|
3
|
+
import DictRequest from "./dict";
|
|
4
|
+
import PartRequest from "./part";
|
|
5
|
+
import SysClasRequest from "./sysclas";
|
|
6
|
+
import UnitRequest from "./unit";
|
|
7
|
+
import SysmenuRequest from "./sysmenu";
|
|
8
|
+
import UserRequest from "./user";
|
|
9
|
+
import SysbilltypeRequest from "./sysbilltype";
|
|
10
|
+
import SysenvrRequest from "./sysenvr";
|
|
11
|
+
import DeptRequest from "./dept";
|
|
12
|
+
import PathRequest from "./path";
|
|
13
|
+
import SyskjndRequest from "./syskjnd";
|
|
14
|
+
import PlaceRequest from "./place";
|
|
14
15
|
|
|
15
16
|
class CoreRequest {
|
|
16
|
-
public
|
|
17
|
-
public
|
|
18
|
-
public
|
|
19
|
-
public
|
|
20
|
-
public
|
|
21
|
-
public
|
|
22
|
-
public
|
|
23
|
-
public
|
|
24
|
-
public
|
|
25
|
-
public
|
|
26
|
-
public
|
|
27
|
-
public
|
|
17
|
+
public type: TypeRequest;
|
|
18
|
+
public dict: DictRequest;
|
|
19
|
+
public part: PartRequest;
|
|
20
|
+
public sysclas: SysClasRequest;
|
|
21
|
+
public unit: UnitRequest;
|
|
22
|
+
public sysmenu: SysmenuRequest;
|
|
23
|
+
public user: UserRequest;
|
|
24
|
+
public sysbilltype: SysbilltypeRequest;
|
|
25
|
+
public sysenvr: SysenvrRequest;
|
|
26
|
+
public dept: DeptRequest;
|
|
27
|
+
public path: PathRequest;
|
|
28
|
+
public syskjnd: SyskjndRequest;
|
|
29
|
+
public place: PlaceRequest;
|
|
28
30
|
|
|
29
31
|
constructor(baseURL: string) {
|
|
30
32
|
const request = createRequest(baseURL);
|
|
31
|
-
this.
|
|
32
|
-
this.
|
|
33
|
-
this.
|
|
34
|
-
this.
|
|
35
|
-
this.
|
|
36
|
-
this.
|
|
37
|
-
this.
|
|
38
|
-
this.
|
|
39
|
-
this.
|
|
40
|
-
this.
|
|
41
|
-
this.
|
|
42
|
-
this.
|
|
33
|
+
this.type = new TypeRequest(request);
|
|
34
|
+
this.dict = new DictRequest(request);
|
|
35
|
+
this.part = new PartRequest(request);
|
|
36
|
+
this.sysclas = new SysClasRequest(request);
|
|
37
|
+
this.unit = new UnitRequest(request);
|
|
38
|
+
this.sysmenu = new SysmenuRequest(request);
|
|
39
|
+
this.user = new UserRequest(request);
|
|
40
|
+
this.sysbilltype = new SysbilltypeRequest(request);
|
|
41
|
+
this.sysenvr = new SysenvrRequest(request);
|
|
42
|
+
this.dept = new DeptRequest(request);
|
|
43
|
+
this.path = new PathRequest(request);
|
|
44
|
+
this.syskjnd = new SyskjndRequest(request);
|
|
45
|
+
this.place = new PlaceRequest(request);
|
|
43
46
|
}
|
|
44
47
|
}
|
|
45
48
|
|
|
@@ -1,17 +1,14 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { TCore } from "@ningboyz/types";
|
|
2
2
|
import type { HttpRequest } from "../axios";
|
|
3
3
|
|
|
4
|
-
class
|
|
4
|
+
class PartRequest {
|
|
5
5
|
private httpRequest: HttpRequest;
|
|
6
6
|
constructor(httpRequest: HttpRequest) {
|
|
7
7
|
this.httpRequest = httpRequest;
|
|
8
8
|
}
|
|
9
9
|
|
|
10
10
|
/**
|
|
11
|
-
*
|
|
12
|
-
* @param sysclasc
|
|
13
|
-
* @param useruuid
|
|
14
|
-
* @param unitmain
|
|
11
|
+
* 获取角色管理
|
|
15
12
|
*/
|
|
16
13
|
selectdb(sysclasc: number, useruuid: string, unitmain: number) {
|
|
17
14
|
const params = {
|
|
@@ -23,36 +20,39 @@ class TPartRequest {
|
|
|
23
20
|
}
|
|
24
21
|
|
|
25
22
|
/**
|
|
26
|
-
*
|
|
27
|
-
* @param
|
|
23
|
+
* 新增角色管理
|
|
24
|
+
* @param data
|
|
28
25
|
*/
|
|
29
|
-
|
|
30
|
-
return this.httpRequest.post<TCore.IPartResponse[]>("/core/tpart/
|
|
26
|
+
insertdb(data: object) {
|
|
27
|
+
return this.httpRequest.post<TCore.IPartResponse[]>("/core/tpart/insertdb", data, undefined);
|
|
31
28
|
}
|
|
32
29
|
|
|
33
30
|
/**
|
|
34
|
-
*
|
|
35
|
-
* @param
|
|
31
|
+
* 编辑角色管理
|
|
32
|
+
* @param data
|
|
36
33
|
*/
|
|
37
|
-
|
|
38
|
-
return this.httpRequest.post<TCore.IPartResponse[]>("/core/tpart/
|
|
34
|
+
updatedb(data: object) {
|
|
35
|
+
return this.httpRequest.post<TCore.IPartResponse[]>("/core/tpart/updatedb", data, undefined);
|
|
39
36
|
}
|
|
40
37
|
|
|
41
38
|
/**
|
|
42
|
-
*
|
|
43
|
-
* @param
|
|
39
|
+
* 角色管理详情
|
|
40
|
+
* @param unitmain
|
|
44
41
|
*/
|
|
45
|
-
|
|
46
|
-
|
|
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
47
|
}
|
|
48
48
|
|
|
49
49
|
/**
|
|
50
|
-
*
|
|
51
|
-
* @param
|
|
50
|
+
* 删除角色管理
|
|
51
|
+
* @param data
|
|
52
52
|
*/
|
|
53
|
-
|
|
54
|
-
return this.httpRequest.post<TCore.IPartResponse[]>("/core/tpart/
|
|
53
|
+
deletedb(data: object) {
|
|
54
|
+
return this.httpRequest.post<TCore.IPartResponse[]>("/core/tpart/deletedb", data, undefined);
|
|
55
55
|
}
|
|
56
56
|
}
|
|
57
57
|
|
|
58
|
-
export default
|
|
58
|
+
export default PartRequest;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { TCore } from "@ningboyz/types";
|
|
2
2
|
import type { HttpRequest } from "../axios";
|
|
3
3
|
|
|
4
|
-
class
|
|
4
|
+
class PathRequest {
|
|
5
5
|
private httpRequest: HttpRequest;
|
|
6
6
|
constructor(httpRequest: HttpRequest) {
|
|
7
7
|
this.httpRequest = httpRequest;
|
|
@@ -30,4 +30,4 @@ class TPathRequest {
|
|
|
30
30
|
}
|
|
31
31
|
}
|
|
32
32
|
|
|
33
|
-
export default
|
|
33
|
+
export default PathRequest;
|