@ningboyz/apis 1.0.0
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 +35 -0
- package/package.json +24 -0
- package/src/axios.ts +119 -0
- package/src/core/index.ts +46 -0
- package/src/core/tdept.ts +18 -0
- package/src/core/tdict.ts +69 -0
- package/src/core/tpart.ts +58 -0
- package/src/core/tpath.ts +33 -0
- package/src/core/tsysbilltype.ts +26 -0
- package/src/core/tsysclas.ts +20 -0
- package/src/core/tsysenvr.ts +15 -0
- package/src/core/tsyskjnd.ts +18 -0
- package/src/core/tsysmenu.ts +95 -0
- package/src/core/ttype.ts +53 -0
- package/src/core/tunit.ts +57 -0
- package/src/core/tuser.ts +237 -0
- package/src/expd/index.ts +13 -0
- package/src/expd/main.ts +18 -0
- package/src/flow/duty.ts +58 -0
- package/src/flow/index.ts +19 -0
- package/src/flow/tmain.ts +55 -0
- package/src/flow/tnode.ts +53 -0
- package/src/gams/cnfg.ts +15 -0
- package/src/gams/index.ts +13 -0
- package/src/gzjg/index.ts +16 -0
- package/src/gzjg/tgzlm.ts +62 -0
- package/src/gzjg/tmain.ts +46 -0
- package/src/pzpt/cnfg.ts +66 -0
- package/src/pzpt/index.ts +28 -0
- package/src/pzpt/item.ts +74 -0
- package/src/pzpt/k0km.ts +52 -0
- package/src/pzpt/k8km.ts +73 -0
- package/src/pzpt/kbkm.ts +31 -0
- package/src/pzpt/type.ts +66 -0
- package/src/tabl/index.ts +13 -0
- package/src/tabl/tmain.ts +131 -0
- package/src/wldy/index.ts +13 -0
- package/src/wldy/page.ts +58 -0
- package/src/wtui/index.ts +22 -0
- package/src/wtui/main.ts +62 -0
- package/src/wtui/tenvr.ts +15 -0
- package/src/wtui/todo.ts +47 -0
- package/src/wtui/view.ts +59 -0
package/index.ts
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
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
|
+
|
|
11
|
+
class Request {
|
|
12
|
+
public static core: CoreRequest;
|
|
13
|
+
public static flow: FLowRequest;
|
|
14
|
+
public static wtui: WtuiRequest;
|
|
15
|
+
public static expd: ExpdRequest;
|
|
16
|
+
public static pzpt: PzptRequest;
|
|
17
|
+
public static gams: GamsRequest;
|
|
18
|
+
public static wldy: WldyRequest;
|
|
19
|
+
public static gzjg: GzjgRequest;
|
|
20
|
+
public static tabl: TablRequest;
|
|
21
|
+
|
|
22
|
+
public static createRequest(baseURL: string) {
|
|
23
|
+
this.core = new CoreRequest(baseURL);
|
|
24
|
+
this.flow = new FLowRequest(baseURL);
|
|
25
|
+
this.wtui = new WtuiRequest(baseURL);
|
|
26
|
+
this.pzpt = new PzptRequest(baseURL);
|
|
27
|
+
this.expd = new ExpdRequest(baseURL);
|
|
28
|
+
this.gams = new GamsRequest(baseURL);
|
|
29
|
+
this.wldy = new WldyRequest(baseURL);
|
|
30
|
+
this.gzjg = new GzjgRequest(baseURL);
|
|
31
|
+
this.tabl = new TablRequest(baseURL);
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
export default Request;
|
package/package.json
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@ningboyz/apis",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"private": false,
|
|
5
|
+
"description": "宁波甬政请求库",
|
|
6
|
+
"author": "",
|
|
7
|
+
"license": "ISC",
|
|
8
|
+
"keywords": [],
|
|
9
|
+
"main": "index.ts",
|
|
10
|
+
"types": "index.ts",
|
|
11
|
+
"scripts": {
|
|
12
|
+
"test": "echo \"Error: no test specified\" && exit 1"
|
|
13
|
+
},
|
|
14
|
+
"publishConfig": {
|
|
15
|
+
"access": "public",
|
|
16
|
+
"registry": "https://registry.npmjs.org/"
|
|
17
|
+
},
|
|
18
|
+
"dependencies": {
|
|
19
|
+
"@ningboyz/types": "workspace:^",
|
|
20
|
+
"@ningboyz/utils": "workspace:^"
|
|
21
|
+
},
|
|
22
|
+
"devDependencies": {
|
|
23
|
+
}
|
|
24
|
+
}
|
package/src/axios.ts
ADDED
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
import type { AxiosInstance, AxiosResponse } from "axios";
|
|
2
|
+
import axios from "axios";
|
|
3
|
+
import _ from "lodash";
|
|
4
|
+
import { SecretUtil } from "@ningboyz/utils";
|
|
5
|
+
import { Const, type IResponse, type TStore } from "@ningboyz/types";
|
|
6
|
+
|
|
7
|
+
class HttpRequest {
|
|
8
|
+
private instance: AxiosInstance;
|
|
9
|
+
private readonly METHOD_GET: string = "GET";
|
|
10
|
+
private readonly METHOD_POST: string = "POST";
|
|
11
|
+
|
|
12
|
+
constructor(baseURL: string) {
|
|
13
|
+
this.instance = axios.create({
|
|
14
|
+
baseURL,
|
|
15
|
+
timeout: 60000
|
|
16
|
+
});
|
|
17
|
+
|
|
18
|
+
this.instance.interceptors.request.use((request) => {
|
|
19
|
+
let whobuild = 0;
|
|
20
|
+
let userindx = 0;
|
|
21
|
+
let usrtoken = "";
|
|
22
|
+
let dbconfig = "";
|
|
23
|
+
|
|
24
|
+
try {
|
|
25
|
+
const enStr = sessionStorage.getItem(Const.User.USER_SESSION_INFO);
|
|
26
|
+
if (!_.isNil(enStr)) {
|
|
27
|
+
const str = SecretUtil.Decrypt(enStr);
|
|
28
|
+
const userInfo = JSON.parse(str) as TStore.ISessionUserInfo;
|
|
29
|
+
whobuild = userInfo.whobuild;
|
|
30
|
+
userindx = userInfo.userIndx;
|
|
31
|
+
usrtoken = userInfo.usrtoken;
|
|
32
|
+
dbconfig = userInfo.dbConfig;
|
|
33
|
+
}
|
|
34
|
+
} catch (e: any) {
|
|
35
|
+
console.error(e.message);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
request.params = {
|
|
39
|
+
whobuild,
|
|
40
|
+
userindx,
|
|
41
|
+
...request.params
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
request.headers.usrtoken = !_.isEmpty(request.headers.usrtoken) ? request.headers.usrtoken : usrtoken;
|
|
45
|
+
request.headers.dbconfig = dbconfig;
|
|
46
|
+
return request;
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
get<T>(url: string, params?: object): Promise<IResponse<T>> {
|
|
51
|
+
return new Promise((resolve, reject) => {
|
|
52
|
+
this.instance
|
|
53
|
+
.request<T>({
|
|
54
|
+
method: this.METHOD_GET,
|
|
55
|
+
url,
|
|
56
|
+
params
|
|
57
|
+
})
|
|
58
|
+
.then((res: AxiosResponse) => {
|
|
59
|
+
resolve(res.data as IResponse<T>);
|
|
60
|
+
})
|
|
61
|
+
.catch((err: any) => {
|
|
62
|
+
reject(err);
|
|
63
|
+
});
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
post<T>(url: string, data?: object, params?: object, headers?: object): Promise<IResponse<T>> {
|
|
68
|
+
return new Promise((resolve, reject) => {
|
|
69
|
+
this.instance
|
|
70
|
+
.request<T>({
|
|
71
|
+
method: this.METHOD_POST,
|
|
72
|
+
url,
|
|
73
|
+
params,
|
|
74
|
+
data,
|
|
75
|
+
headers: {
|
|
76
|
+
...headers
|
|
77
|
+
}
|
|
78
|
+
})
|
|
79
|
+
.then((res: AxiosResponse) => {
|
|
80
|
+
resolve(res.data as IResponse<T>);
|
|
81
|
+
})
|
|
82
|
+
.catch((err: any) => {
|
|
83
|
+
reject(err);
|
|
84
|
+
});
|
|
85
|
+
});
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
postFile<T>(url: string, data?: object, params?: object): Promise<IResponse<T>> {
|
|
89
|
+
return new Promise((resolve, reject) => {
|
|
90
|
+
this.instance
|
|
91
|
+
.request({
|
|
92
|
+
url,
|
|
93
|
+
method: this.METHOD_POST,
|
|
94
|
+
params,
|
|
95
|
+
data,
|
|
96
|
+
headers: {
|
|
97
|
+
"Content-Type": `multipart/form-data;boundary=${new Date().getTime()}`
|
|
98
|
+
}
|
|
99
|
+
})
|
|
100
|
+
.then((res: AxiosResponse) => {
|
|
101
|
+
resolve(res.data as IResponse<T>);
|
|
102
|
+
})
|
|
103
|
+
.catch((err: any) => {
|
|
104
|
+
reject(err);
|
|
105
|
+
});
|
|
106
|
+
});
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
getInstance() {
|
|
110
|
+
return this.instance;
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
function createRequest(baseURL: string) {
|
|
115
|
+
return new HttpRequest(baseURL);
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
export { createRequest };
|
|
119
|
+
export type { HttpRequest };
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { createRequest } from "../axios";
|
|
2
|
+
import TTypeRequest from "./ttype";
|
|
3
|
+
import TDictRequest from "./tdict";
|
|
4
|
+
import TPartRequest from "./tpart";
|
|
5
|
+
import TSysClasRequest from "./tsysclas";
|
|
6
|
+
import TUnitRequest from "./tunit";
|
|
7
|
+
import TSysmenuRequest from "./tsysmenu";
|
|
8
|
+
import TUserRequest from "./tuser";
|
|
9
|
+
import TsysbilltypeRequest from "./tsysbilltype";
|
|
10
|
+
import TSysenvrRequest from "./tsysenvr";
|
|
11
|
+
import TDeptRequest from "./tdept";
|
|
12
|
+
import TPathRequest from "./tpath";
|
|
13
|
+
import TsyskjndRequest from "./tsyskjnd";
|
|
14
|
+
|
|
15
|
+
class CoreRequest {
|
|
16
|
+
public ttype: TTypeRequest;
|
|
17
|
+
public tdict: TDictRequest;
|
|
18
|
+
public tpart: TPartRequest;
|
|
19
|
+
public tsysclas: TSysClasRequest;
|
|
20
|
+
public tunit: TUnitRequest;
|
|
21
|
+
public tsysmenu: TSysmenuRequest;
|
|
22
|
+
public tuser: TUserRequest;
|
|
23
|
+
public tsysbilltype: TsysbilltypeRequest;
|
|
24
|
+
public tsysenvr: TSysenvrRequest;
|
|
25
|
+
public tdept: TDeptRequest;
|
|
26
|
+
public tpath: TPathRequest;
|
|
27
|
+
public tsyskjnd: TsyskjndRequest;
|
|
28
|
+
|
|
29
|
+
constructor(baseURL: string) {
|
|
30
|
+
const request = createRequest(baseURL);
|
|
31
|
+
this.ttype = new TTypeRequest(request);
|
|
32
|
+
this.tdict = new TDictRequest(request);
|
|
33
|
+
this.tpart = new TPartRequest(request);
|
|
34
|
+
this.tsysclas = new TSysClasRequest(request);
|
|
35
|
+
this.tunit = new TUnitRequest(request);
|
|
36
|
+
this.tsysmenu = new TSysmenuRequest(request);
|
|
37
|
+
this.tuser = new TUserRequest(request);
|
|
38
|
+
this.tsysbilltype = new TsysbilltypeRequest(request);
|
|
39
|
+
this.tsysenvr = new TSysenvrRequest(request);
|
|
40
|
+
this.tdept = new TDeptRequest(request);
|
|
41
|
+
this.tpath = new TPathRequest(request);
|
|
42
|
+
this.tsyskjnd = new TsyskjndRequest(request);
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
export default CoreRequest;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { TCore } from "@ningboyz/types";
|
|
2
|
+
import type { HttpRequest } from "../axios";
|
|
3
|
+
|
|
4
|
+
class TDeptRequest {
|
|
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
|
+
export default TDeptRequest;
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import type { TCore } from "@ningboyz/types";
|
|
2
|
+
import type { HttpRequest } from "../axios";
|
|
3
|
+
|
|
4
|
+
class TDictRequest {
|
|
5
|
+
private httpRequest: HttpRequest;
|
|
6
|
+
constructor(httpRequest: HttpRequest) {
|
|
7
|
+
this.httpRequest = httpRequest;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* 获取字典列表
|
|
12
|
+
* @param typemain
|
|
13
|
+
* @param typename
|
|
14
|
+
* @param typeuses
|
|
15
|
+
* @param sysclasc
|
|
16
|
+
* @param systypec
|
|
17
|
+
* @param unitmain
|
|
18
|
+
* @param useronly
|
|
19
|
+
*/
|
|
20
|
+
selectdb(typemain?: number, typename: string = "-1", typeuses: string = "-1", sysclasc?: number, systypec?: number, unitmain: number = -1, useronly: number = -1) {
|
|
21
|
+
const params = {
|
|
22
|
+
typemain,
|
|
23
|
+
typename,
|
|
24
|
+
typeuses,
|
|
25
|
+
sysclasc,
|
|
26
|
+
systypec,
|
|
27
|
+
unitmain,
|
|
28
|
+
useronly
|
|
29
|
+
};
|
|
30
|
+
return this.httpRequest.post<TCore.IDictResponse[]>("/core/tdict/selectdb", undefined, params);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* 删除字典信息
|
|
35
|
+
* @param formData
|
|
36
|
+
*/
|
|
37
|
+
deletedb(formData: FormData) {
|
|
38
|
+
return this.httpRequest.post<TCore.IDictResponse[]>("/core/tdict/deletedb", formData, undefined);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* 新增字典信息
|
|
43
|
+
* @param formData
|
|
44
|
+
*/
|
|
45
|
+
insertdb(formData: FormData) {
|
|
46
|
+
return this.httpRequest.post<TCore.IDictResponse[]>("/core/tdict/insertdb", formData, undefined);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* 更新字典信息
|
|
51
|
+
* @param formData
|
|
52
|
+
*/
|
|
53
|
+
updatedb(formData: FormData) {
|
|
54
|
+
return this.httpRequest.post<TCore.IDictResponse[]>("/core/tdict/updatedb", formData, undefined);
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
* 更新字典信息
|
|
59
|
+
* @param dictmain
|
|
60
|
+
*/
|
|
61
|
+
detaildb(dictmain: number) {
|
|
62
|
+
const params = {
|
|
63
|
+
dictmain
|
|
64
|
+
};
|
|
65
|
+
return this.httpRequest.post<TCore.IDictResponse[]>("/core/tdict/detaildb", undefined, params);
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
export default TDictRequest;
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import type { 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
|
+
* @param sysclasc
|
|
13
|
+
* @param useruuid
|
|
14
|
+
* @param unitmain
|
|
15
|
+
*/
|
|
16
|
+
selectdb(sysclasc: number, useruuid: string, unitmain: number) {
|
|
17
|
+
const params = {
|
|
18
|
+
sysclasc,
|
|
19
|
+
useruuid,
|
|
20
|
+
unitmain
|
|
21
|
+
};
|
|
22
|
+
return this.httpRequest.post<TCore.IPartResponse[]>("/core/tpart/selectdb", undefined, params);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* 删除用户角色
|
|
27
|
+
* @param formData
|
|
28
|
+
*/
|
|
29
|
+
deletedb(formData: FormData) {
|
|
30
|
+
return this.httpRequest.post<TCore.IPartResponse[]>("/core/tpart/deletedb", formData);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* 添加用户角色
|
|
35
|
+
* @param formData
|
|
36
|
+
*/
|
|
37
|
+
insertdb(formData: FormData) {
|
|
38
|
+
return this.httpRequest.post<TCore.IPartResponse[]>("/core/tpart/insertdb", formData);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* 修改用户角色
|
|
43
|
+
* @param formData
|
|
44
|
+
*/
|
|
45
|
+
updatedb(formData: FormData) {
|
|
46
|
+
return this.httpRequest.post<TCore.IPartResponse[]>("/core/tpart/updatedb", formData);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* 用户角色详情
|
|
51
|
+
* @param params
|
|
52
|
+
*/
|
|
53
|
+
detaildb(params: object) {
|
|
54
|
+
return this.httpRequest.post<TCore.IPartResponse[]>("/core/tpart/detaildb", undefined, params);
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
export default TPartRequest;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import type { TCore } from "@ningboyz/types";
|
|
2
|
+
import type { HttpRequest } from "../axios";
|
|
3
|
+
|
|
4
|
+
class TPathRequest {
|
|
5
|
+
private httpRequest: HttpRequest;
|
|
6
|
+
constructor(httpRequest: HttpRequest) {
|
|
7
|
+
this.httpRequest = httpRequest;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
uploaddbInbase64(data: object) {
|
|
11
|
+
return this.httpRequest.post<TCore.IPathResponse[]>("/core/tpath/uploaddb/inbase64", data, undefined);
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* 上传附件
|
|
16
|
+
* @param data
|
|
17
|
+
*/
|
|
18
|
+
uploaddb(data: object, txupload: number = -1) {
|
|
19
|
+
const params = {
|
|
20
|
+
txupload
|
|
21
|
+
};
|
|
22
|
+
return this.httpRequest.postFile<TCore.IPathResponse[]>("/core/tpath/uploaddb", data, params);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* 获取预览票据
|
|
27
|
+
*/
|
|
28
|
+
downloadTicket() {
|
|
29
|
+
return this.httpRequest.get<string>("/core/tpath/download/ticket");
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
export default TPathRequest;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type { TCore } from "@ningboyz/types";
|
|
2
|
+
import type { HttpRequest } from "../axios";
|
|
3
|
+
|
|
4
|
+
class TsysbilltypeRequest {
|
|
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(sysclasc: number, useruuid: string, unitmain: number) {
|
|
17
|
+
const params = {
|
|
18
|
+
sysclasc,
|
|
19
|
+
useruuid,
|
|
20
|
+
unitmain
|
|
21
|
+
};
|
|
22
|
+
return this.httpRequest.post<TCore.ISysMenuWithExpdResponse[]>("/core/tsysbilltype/selectdb", undefined, params);
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export default TsysbilltypeRequest;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { TCore } from "@ningboyz/types";
|
|
2
|
+
import type { HttpRequest } from "../axios";
|
|
3
|
+
|
|
4
|
+
class TSysClasRequest {
|
|
5
|
+
private httpRequest: HttpRequest;
|
|
6
|
+
constructor(httpRequest: HttpRequest) {
|
|
7
|
+
this.httpRequest = httpRequest;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
selectdb(sysclasc: number, useruuid: string, unitmain: number) {
|
|
11
|
+
const params = {
|
|
12
|
+
sysclasc,
|
|
13
|
+
useruuid,
|
|
14
|
+
unitmain
|
|
15
|
+
};
|
|
16
|
+
return this.httpRequest.post<TCore.ISysClasResponse[]>("/core/tsysclas/selectdb", undefined, params);
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export default TSysClasRequest;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { TCore } from "@ningboyz/types";
|
|
2
|
+
import type { HttpRequest } from "../axios";
|
|
3
|
+
|
|
4
|
+
class TSysenvrRequest {
|
|
5
|
+
private httpRequest: HttpRequest;
|
|
6
|
+
constructor(httpRequest: HttpRequest) {
|
|
7
|
+
this.httpRequest = httpRequest;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
selectdb() {
|
|
11
|
+
return this.httpRequest.post<TCore.IEnvrResponse[]>("/core/tsysenvr/selectdb", undefined, undefined);
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export default TSysenvrRequest;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { TCore } from "@ningboyz/types";
|
|
2
|
+
import type { HttpRequest } from "../axios";
|
|
3
|
+
|
|
4
|
+
class TsyskjndRequest {
|
|
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.ISourceItem[]>("/core/tsyskjnd/selectdb");
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export default TsyskjndRequest;
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import type { TCore } from "@ningboyz/types";
|
|
2
|
+
import type { HttpRequest } from "../axios";
|
|
3
|
+
|
|
4
|
+
class TSysmenuRequest {
|
|
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
|
+
withexpdSelectdb(sysclasc: number, useruuid: string, unitmain: number) {
|
|
17
|
+
const params = {
|
|
18
|
+
sysclasc,
|
|
19
|
+
useruuid,
|
|
20
|
+
unitmain
|
|
21
|
+
};
|
|
22
|
+
return this.httpRequest.post<TCore.ISysMenuWithExpdResponse[]>("/core/tsysmenu/withexpd/selectdb", undefined, params);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* 功能菜单查询详情
|
|
27
|
+
* @param params
|
|
28
|
+
*/
|
|
29
|
+
withexpdDetaildb(params: object) {
|
|
30
|
+
return this.httpRequest.post<TCore.ISysMenuWithExpdResponse[]>("/core/tsysmenu/withexpd/detaildb", undefined, params);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* 功能菜单添加
|
|
35
|
+
*/
|
|
36
|
+
withexpdInsertdb(data: object) {
|
|
37
|
+
return this.httpRequest.post<TCore.ISysMenuWithExpdResponse[]>("/core/tsysmenu/withexpd/insertdb", data);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* 功能菜单修改
|
|
42
|
+
*/
|
|
43
|
+
withexpdUpdatedb(data: object) {
|
|
44
|
+
return this.httpRequest.post<TCore.ISysMenuWithExpdResponse[]>("/core/tsysmenu/withexpd/updatedb", data);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* 功能菜单删除
|
|
49
|
+
*/
|
|
50
|
+
withexpdDeletedb(data: object) {
|
|
51
|
+
return this.httpRequest.post<TCore.ISysMenuWithExpdResponse[]>("/core/tsysmenu/withexpd/deletedb", data);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* 所有菜单查询
|
|
56
|
+
*/
|
|
57
|
+
withcoreSelectdb(sysclasc: number, useruuid: string, unitmain: number) {
|
|
58
|
+
const params = {
|
|
59
|
+
sysclasc,
|
|
60
|
+
useruuid,
|
|
61
|
+
unitmain
|
|
62
|
+
};
|
|
63
|
+
return this.httpRequest.post<TCore.ISysMenuWithCoreResponse[]>("/core/tsysmenu/withcore/selectdb", undefined, params);
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
/**
|
|
67
|
+
* 所有菜单查询详情
|
|
68
|
+
*/
|
|
69
|
+
withcoreDetaildb(params: object) {
|
|
70
|
+
return this.httpRequest.post<TCore.ISysMenuWithExpdResponse[]>("/core/tsysmenu/withcore/detaildb", undefined, params);
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
/**
|
|
74
|
+
* 添加所有菜单
|
|
75
|
+
*/
|
|
76
|
+
withcoreInsertdb(data: object) {
|
|
77
|
+
return this.httpRequest.post<TCore.ISysMenuWithCoreResponse[]>("/core/tsysmenu/withcore/insertdb", data);
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
/**
|
|
81
|
+
* 修改所有菜单
|
|
82
|
+
*/
|
|
83
|
+
withcoreuUdatedb(data: object) {
|
|
84
|
+
return this.httpRequest.post<TCore.ISysMenuWithCoreResponse[]>("/core/tsysmenu/withcore/updatedb", data);
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
/**
|
|
88
|
+
* 删除所有菜单
|
|
89
|
+
*/
|
|
90
|
+
withcoreDeletedb(data: object) {
|
|
91
|
+
return this.httpRequest.post<TCore.ISysMenuWithCoreResponse[]>("/core/tsysmenu/withcore/deletedb", data);
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
export default TSysmenuRequest;
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import type { TCore } from "@ningboyz/types";
|
|
2
|
+
import type { HttpRequest } from "../axios";
|
|
3
|
+
|
|
4
|
+
class TTypeRequest {
|
|
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.ITypeResponse[]>("/core/ttype/selectdb");
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* 新增字典类型
|
|
19
|
+
* @param formData
|
|
20
|
+
*/
|
|
21
|
+
insertdb(formData: FormData) {
|
|
22
|
+
return this.httpRequest.post<TCore.ITypeResponse[]>("/core/ttype/insertdb", formData);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* 更新字典类型
|
|
27
|
+
* @param formData
|
|
28
|
+
*/
|
|
29
|
+
updatedb(formData: FormData) {
|
|
30
|
+
return this.httpRequest.post<TCore.ITypeResponse[]>("/core/ttype/updatedb", formData);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* 删除字典类型
|
|
35
|
+
* @param formData
|
|
36
|
+
*/
|
|
37
|
+
deletedb(formData: FormData) {
|
|
38
|
+
return this.httpRequest.post<TCore.ITypeResponse[]>("/core/ttype/deletedb", formData);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* 字典类型详情
|
|
43
|
+
* @param typemain
|
|
44
|
+
*/
|
|
45
|
+
detaildb(typemain: number) {
|
|
46
|
+
const params = {
|
|
47
|
+
typemain
|
|
48
|
+
};
|
|
49
|
+
return this.httpRequest.post<TCore.ITypeResponse[]>("/core/ttype/detaildb", undefined, params);
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
export default TTypeRequest;
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import type { 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
|
+
* @param unitmain
|
|
13
|
+
*/
|
|
14
|
+
selectdb(unitmain: number = -1) {
|
|
15
|
+
const params = {
|
|
16
|
+
unitmain
|
|
17
|
+
};
|
|
18
|
+
return this.httpRequest.post<TCore.IUnitResponse[]>("/core/tunit/selectdb", undefined, params);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* 新增单位
|
|
23
|
+
* @param data
|
|
24
|
+
*/
|
|
25
|
+
insertdb(data: object) {
|
|
26
|
+
return this.httpRequest.post<TCore.IUnitResponse[]>("/core/tunit/insertdb", data, undefined);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* 编辑单位
|
|
31
|
+
* @param data
|
|
32
|
+
*/
|
|
33
|
+
updatedb(data: object) {
|
|
34
|
+
return this.httpRequest.post<TCore.IUnitResponse[]>("/core/tunit/updatedb", data, undefined);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* 单位详情
|
|
39
|
+
* @param unitmain
|
|
40
|
+
*/
|
|
41
|
+
detaildb(unitmain: number) {
|
|
42
|
+
const params = {
|
|
43
|
+
unitmain
|
|
44
|
+
};
|
|
45
|
+
return this.httpRequest.post<TCore.IUnitResponse[]>("/core/tunit/detaildb", undefined, params);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* 删除单位
|
|
50
|
+
* @param data
|
|
51
|
+
*/
|
|
52
|
+
deletedb(data: object) {
|
|
53
|
+
return this.httpRequest.post<TCore.IUnitResponse[]>("/core/tunit/deletedb", data, undefined);
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
export default TUnitRequest;
|