@vipl520/dk-ui 1.0.59 → 1.0.60
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/index.js +33 -18
- package/dist/index.min.js +1 -1
- package/dist/index.min.js.map +1 -1
- package/dist/index.min.mjs +1 -1
- package/dist/index.min.mjs.map +1 -1
- package/dist/index.mjs +33 -18
- package/dist/web-types.json +1 -1
- package/es/table/utils/dkTableApi.d.ts +2 -1
- package/es/table/utils/dkTableApi.mjs +33 -18
- package/es/table/utils/dkTableApi.mjs.map +1 -1
- package/lib/table/utils/dkTableApi.d.ts +2 -1
- package/lib/table/utils/dkTableApi.js +33 -18
- package/lib/table/utils/dkTableApi.js.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
@@ -18848,34 +18848,49 @@ Sortable.mount(Remove, Revert);
|
|
18848
18848
|
class dkTableApi {
|
18849
18849
|
controllerUrl;
|
18850
18850
|
actionUrl;
|
18851
|
+
query;
|
18851
18852
|
requestConfig = {};
|
18852
18853
|
// 新增:用于存储配置的request参数
|
18853
18854
|
constructor(controllerUrl, query) {
|
18854
|
-
|
18855
|
-
|
18855
|
+
let qStr = this.objectToQuery(query);
|
18856
|
+
if (controllerUrl.indexOf("?") > 0) {
|
18857
|
+
const path = controllerUrl.split("?");
|
18858
|
+
controllerUrl = path[0];
|
18859
|
+
qStr = qStr + "&" + path[1];
|
18860
|
+
}
|
18861
|
+
this.query = qStr;
|
18856
18862
|
if (!controllerUrl.endsWith("/")) {
|
18857
18863
|
controllerUrl += "/";
|
18858
18864
|
}
|
18859
18865
|
this.controllerUrl = controllerUrl;
|
18860
|
-
|
18861
|
-
|
18862
|
-
|
18863
|
-
|
18864
|
-
|
18865
|
-
|
18866
|
-
|
18867
|
-
|
18868
|
-
|
18869
|
-
|
18870
|
-
|
18871
|
-
|
18872
|
-
|
18866
|
+
const actions = [
|
18867
|
+
"index",
|
18868
|
+
// 列表
|
18869
|
+
"add",
|
18870
|
+
// 新增
|
18871
|
+
"edit",
|
18872
|
+
// 编辑
|
18873
|
+
"del",
|
18874
|
+
// 删除
|
18875
|
+
"sortable",
|
18876
|
+
// 排序
|
18877
|
+
"table",
|
18878
|
+
// 表格数据
|
18879
|
+
"form",
|
18880
|
+
// 表单
|
18881
|
+
"recycle",
|
18882
|
+
// 回收站数据
|
18883
|
+
"recycleTable",
|
18873
18884
|
// 回收站表格
|
18874
|
-
|
18885
|
+
"destroy",
|
18875
18886
|
// 回收站销毁
|
18876
|
-
|
18887
|
+
"restore"
|
18877
18888
|
// 回收站还原
|
18878
|
-
]
|
18889
|
+
];
|
18890
|
+
this.actionUrl = /* @__PURE__ */ new Map();
|
18891
|
+
for (const action of actions) {
|
18892
|
+
this.actionUrl.set(action, this.buildFullUrl(`${controllerUrl}${action}`, qStr));
|
18893
|
+
}
|
18879
18894
|
}
|
18880
18895
|
// 新增方法用于构建完整的URL
|
18881
18896
|
buildFullUrl(baseUrl, queryStr) {
|
package/dist/web-types.json
CHANGED
@@ -3,34 +3,49 @@ import { request } from '@vipl520/utils';
|
|
3
3
|
class dkTableApi {
|
4
4
|
controllerUrl;
|
5
5
|
actionUrl;
|
6
|
+
query;
|
6
7
|
requestConfig = {};
|
7
8
|
// 新增:用于存储配置的request参数
|
8
9
|
constructor(controllerUrl, query) {
|
9
|
-
|
10
|
-
|
10
|
+
let qStr = this.objectToQuery(query);
|
11
|
+
if (controllerUrl.indexOf("?") > 0) {
|
12
|
+
const path = controllerUrl.split("?");
|
13
|
+
controllerUrl = path[0];
|
14
|
+
qStr = qStr + "&" + path[1];
|
15
|
+
}
|
16
|
+
this.query = qStr;
|
11
17
|
if (!controllerUrl.endsWith("/")) {
|
12
18
|
controllerUrl += "/";
|
13
19
|
}
|
14
20
|
this.controllerUrl = controllerUrl;
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
21
|
+
const actions = [
|
22
|
+
"index",
|
23
|
+
// 列表
|
24
|
+
"add",
|
25
|
+
// 新增
|
26
|
+
"edit",
|
27
|
+
// 编辑
|
28
|
+
"del",
|
29
|
+
// 删除
|
30
|
+
"sortable",
|
31
|
+
// 排序
|
32
|
+
"table",
|
33
|
+
// 表格数据
|
34
|
+
"form",
|
35
|
+
// 表单
|
36
|
+
"recycle",
|
37
|
+
// 回收站数据
|
38
|
+
"recycleTable",
|
28
39
|
// 回收站表格
|
29
|
-
|
40
|
+
"destroy",
|
30
41
|
// 回收站销毁
|
31
|
-
|
42
|
+
"restore"
|
32
43
|
// 回收站还原
|
33
|
-
]
|
44
|
+
];
|
45
|
+
this.actionUrl = /* @__PURE__ */ new Map();
|
46
|
+
for (const action of actions) {
|
47
|
+
this.actionUrl.set(action, this.buildFullUrl(`${controllerUrl}${action}`, qStr));
|
48
|
+
}
|
34
49
|
}
|
35
50
|
// 新增方法用于构建完整的URL
|
36
51
|
buildFullUrl(baseUrl, queryStr) {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"dkTableApi.mjs","sources":["../../../src/table/utils/dkTableApi.ts"],"sourcesContent":["import { request } from '@vipl520/utils'\n\nexport class dkTableApi {\n private controllerUrl: string\n public actionUrl\n private requestConfig: anyObj = {} // 新增:用于存储配置的request参数\n\n constructor(controllerUrl: string, query: Object) {\n const qStr = this.objectToQuery(query)\n console.log('queryStr', qStr)\n\n if (!controllerUrl.endsWith('/')) {\n controllerUrl += '/'\n }\n\n this.controllerUrl = controllerUrl\n\n // 构建带有或不带有查询字符串的完整URL\n this.actionUrl = new Map([\n ['index', this.buildFullUrl(controllerUrl + 'index', qStr)],\n ['add', this.buildFullUrl(controllerUrl + 'add', qStr)],\n ['edit', this.buildFullUrl(controllerUrl + 'edit', qStr)],\n ['del', this.buildFullUrl(controllerUrl + 'del', qStr)],\n ['sortable', this.buildFullUrl(controllerUrl + 'sortable', qStr)],\n ['table', this.buildFullUrl(controllerUrl + 'table', qStr)], // 获取表格数据\n ['form', this.buildFullUrl(controllerUrl + 'form', qStr)], // 获取表单\n ['recycle', this.buildFullUrl(controllerUrl + 'recycle', qStr)], // 回收站\n ['recycleTable', this.buildFullUrl(controllerUrl + 'recycleTable', qStr)], // 回收站表格\n ['destroy', this.buildFullUrl(controllerUrl + 'destroy', qStr)], // 回收站销毁\n ['restore', this.buildFullUrl(controllerUrl + 'restore', qStr)], // 回收站还原\n ])\n }\n\n // 新增方法用于构建完整的URL\n private buildFullUrl(baseUrl: string, queryStr: string): string {\n return queryStr ? `${baseUrl}?${queryStr}` : baseUrl\n }\n\n objectToQuery(obj: any) {\n return Object.keys(obj)\n .map((key) => encodeURIComponent(key) + '=' + encodeURIComponent(obj[key]))\n .join('&')\n }\n\n /**\n * 配置request参数\n * @param config 包含HTTP方法、请求头等额外参数的对象\n */\n configureRequest(config: anyObj) {\n this.requestConfig = { ...config } // 将传入的配置对象浅拷贝到requestConfig\n }\n\n /**\n * 获取表格配置\n */\n table() {\n return request(\n {\n url: this.actionUrl.get('table'),\n method: 'post',\n ...this.requestConfig, // 将requestConfig的内容展开到request的参数中\n },\n {\n code_error_show: true,\n }\n )\n }\n\n /**\n * 获取表格配置\n */\n recycleTable() {\n return request(\n {\n url: this.actionUrl.get('recycleTable'),\n method: 'post',\n ...this.requestConfig,\n },\n {\n code_error_show: true,\n }\n )\n }\n\n /**\n * 获取表单\n */\n form(id?: number) {\n return request(\n {\n url: this.actionUrl.get('form'),\n method: 'post',\n data: { id },\n ...this.requestConfig,\n },\n {\n code_error_show: true,\n }\n )\n }\n\n /**\n * 获取表格列表\n * @param filter\n */\n index(filter: anyObj = {}) {\n return request(\n {\n url: this.actionUrl.get('index'),\n method: 'get',\n params: filter,\n ...this.requestConfig,\n },\n {\n code_error_show: true,\n }\n )\n }\n\n /**\n * 回收站列表\n * @param filter\n */\n recycle(filter: anyObj = {}) {\n return request(\n {\n url: this.actionUrl.get('recycle'),\n method: 'get',\n params: filter,\n ...this.requestConfig,\n },\n {\n code_error_show: true,\n }\n )\n }\n\n /**\n * 编辑\n * @param params\n */\n edit(params: anyObj) {\n return request(\n {\n url: this.actionUrl.get('edit'),\n method: 'get',\n params,\n ...this.requestConfig,\n },\n {\n code_error_show: true,\n }\n )\n }\n\n /**\n * 删除\n * @param ids\n */\n del(ids: number[]) {\n return request(\n {\n url: this.actionUrl.get('del'),\n method: 'DELETE',\n params: {\n ids,\n },\n ...this.requestConfig,\n },\n {\n code_success_show: true,\n code_error_show: true,\n }\n )\n }\n\n /**\n * 销毁\n * @param ids\n */\n destroy(ids: string[]) {\n return request(\n {\n url: this.actionUrl.get('destroy'),\n method: 'POST',\n data: {\n ids,\n },\n ...this.requestConfig,\n },\n {\n code_success_show: true,\n code_error_show: true,\n }\n )\n }\n\n /**\n * 还原\n * @param ids\n */\n restore(ids: string[]) {\n return request(\n {\n url: this.actionUrl.get('restore'),\n method: 'POST',\n data: {\n ids,\n },\n ...this.requestConfig,\n },\n {\n code_success_show: true,\n code_error_show: true,\n }\n )\n }\n\n /**\n * 自定义\n * @param action\n * @param data\n */\n postData(action: string, data: anyObj) {\n return request(\n {\n url: this.actionUrl.has(action) ? this.actionUrl.get(action) : this.controllerUrl + action,\n method: 'post',\n data,\n ...this.requestConfig,\n },\n {\n code_success_show: true,\n code_error_show: true,\n }\n )\n }\n\n /**\n * 排序\n * @param id\n * @param targetId\n */\n sortableApi(id: number, targetId: number) {\n return request(\n {\n url: this.actionUrl.get('sortable'),\n method: 'post',\n data: {\n id,\n targetId,\n },\n ...this.requestConfig,\n },\n {\n code_error_show: true,\n }\n )\n }\n}\n"],"names":[],"mappings":";;AAEO,MAAM,UAAW,CAAA;AAAA,EACd,aAAA,CAAA;AAAA,EACD,SAAA,CAAA;AAAA,EACC,gBAAwB,EAAC,CAAA;AAAA;AAAA,EAEjC,WAAA,CAAY,eAAuB,KAAe,EAAA;AAChD,IAAM,MAAA,IAAA,GAAO,IAAK,CAAA,aAAA,CAAc,KAAK,CAAA,CAAA;AACrC,IAAQ,OAAA,CAAA,GAAA,CAAI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,IAAM,EAAA;AAAA,UACJ,GAAA;AAAA,SACF;AAAA,QACA,GAAG,IAAK,CAAA,aAAA;AAAA,OACV;AAAA,MACA;AAAA,QACE,iBAAmB,EAAA,IAAA;AAAA,QACnB,eAAiB,EAAA,IAAA;AAAA,OACnB;AAAA,KACF,CAAA;AAAA,GACF;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAOA,QAAA,CAAS,QAAgB,IAAc,EAAA;AACrC,IAAO,OAAA,OAAA;AAAA,MACL;AAAA,QACE,GAAK,EAAA,IAAA,CAAK,SAAU,CAAA,GAAA,CAAI,MAAM,CAAA,GAAI,IAAK,CAAA,SAAA,CAAU,GAAI,CAAA,MAAM,CAAI,GAAA,IAAA,CAAK,aAAgB,GAAA,MAAA;AAAA,QACpF,MAAQ,EAAA,MAAA;AAAA,QACR,IAAA;AAAA,QACA,GAAG,IAAK,CAAA,aAAA;AAAA,OACV;AAAA,MACA;AAAA,QACE,iBAAmB,EAAA,IAAA;AAAA,QACnB,eAAiB,EAAA,IAAA;AAAA,OACnB;AAAA,KACF,CAAA;AAAA,GACF;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAOA,WAAA,CAAY,IAAY,QAAkB,EAAA;AACxC,IAAO,OAAA,OAAA;AAAA,MACL;AAAA,QACE,GAAK,EAAA,IAAA,CAAK,SAAU,CAAA,GAAA,CAAI,UAAU,CAAA;AAAA,QAClC,MAAQ,EAAA,MAAA;AAAA,QACR,IAAM,EAAA;AAAA,UACJ,EAAA;AAAA,UACA,QAAA;AAAA,SACF;AAAA,QACA,GAAG,IAAK,CAAA,aAAA;AAAA,OACV;AAAA,MACA;AAAA,QACE,eAAiB,EAAA,IAAA;AAAA,OACnB;AAAA,KACF,CAAA;AAAA,GACF;AACF;;;;"}
|
1
|
+
{"version":3,"file":"dkTableApi.mjs","sources":["../../../src/table/utils/dkTableApi.ts"],"sourcesContent":["import { request } from '@vipl520/utils'\n\nexport class dkTableApi {\n private controllerUrl: string\n public actionUrl\n public query\n private requestConfig: anyObj = {} // 新增:用于存储配置的request参数\n\n constructor(controllerUrl: string, query: Object) {\n let qStr = this.objectToQuery(query)\n if (controllerUrl.indexOf('?') > 0) {\n const path = controllerUrl.split('?')\n controllerUrl = path[0]\n qStr = qStr + '&' + path[1]\n }\n this.query = qStr\n if (!controllerUrl.endsWith('/')) {\n controllerUrl += '/'\n }\n this.controllerUrl = controllerUrl\n // 动作名称数组\n const actions = [\n 'index', // 列表\n 'add', // 新增\n 'edit', // 编辑\n 'del', // 删除\n 'sortable', // 排序\n 'table', // 表格数据\n 'form', // 表单\n 'recycle', // 回收站数据\n 'recycleTable', // 回收站表格\n 'destroy', // 回收站销毁\n 'restore', // 回收站还原\n ]\n\n // 使用循环填充Map\n this.actionUrl = new Map()\n for (const action of actions) {\n this.actionUrl.set(action, this.buildFullUrl(`${controllerUrl}${action}`, qStr))\n }\n }\n\n // 新增方法用于构建完整的URL\n private buildFullUrl(baseUrl: string, queryStr: string): string {\n return queryStr ? `${baseUrl}?${queryStr}` : baseUrl\n }\n\n objectToQuery(obj: any) {\n return Object.keys(obj)\n .map((key) => encodeURIComponent(key) + '=' + encodeURIComponent(obj[key]))\n .join('&')\n }\n\n /**\n * 配置request参数\n * @param config 包含HTTP方法、请求头等额外参数的对象\n */\n configureRequest(config: anyObj) {\n this.requestConfig = { ...config } // 将传入的配置对象浅拷贝到requestConfig\n }\n\n /**\n * 获取表格配置\n */\n table() {\n return request(\n {\n url: this.actionUrl.get('table'),\n method: 'post',\n ...this.requestConfig, // 将requestConfig的内容展开到request的参数中\n },\n {\n code_error_show: true,\n }\n )\n }\n\n /**\n * 获取表格配置\n */\n recycleTable() {\n return request(\n {\n url: this.actionUrl.get('recycleTable'),\n method: 'post',\n ...this.requestConfig,\n },\n {\n code_error_show: true,\n }\n )\n }\n\n /**\n * 获取表单\n */\n form(id?: number) {\n return request(\n {\n url: this.actionUrl.get('form'),\n method: 'post',\n data: { id },\n ...this.requestConfig,\n },\n {\n code_error_show: true,\n }\n )\n }\n\n /**\n * 获取表格列表\n * @param filter\n */\n index(filter: anyObj = {}) {\n return request(\n {\n url: this.actionUrl.get('index'),\n method: 'get',\n params: filter,\n ...this.requestConfig,\n },\n {\n code_error_show: true,\n }\n )\n }\n\n /**\n * 回收站列表\n * @param filter\n */\n recycle(filter: anyObj = {}) {\n return request(\n {\n url: this.actionUrl.get('recycle'),\n method: 'get',\n params: filter,\n ...this.requestConfig,\n },\n {\n code_error_show: true,\n }\n )\n }\n\n /**\n * 编辑\n * @param params\n */\n edit(params: anyObj) {\n return request(\n {\n url: this.actionUrl.get('edit'),\n method: 'get',\n params,\n ...this.requestConfig,\n },\n {\n code_error_show: true,\n }\n )\n }\n\n /**\n * 删除\n * @param ids\n */\n del(ids: number[]) {\n return request(\n {\n url: this.actionUrl.get('del'),\n method: 'DELETE',\n params: {\n ids,\n },\n ...this.requestConfig,\n },\n {\n code_success_show: true,\n code_error_show: true,\n }\n )\n }\n\n /**\n * 销毁\n * @param ids\n */\n destroy(ids: string[]) {\n return request(\n {\n url: this.actionUrl.get('destroy'),\n method: 'POST',\n data: {\n ids,\n },\n ...this.requestConfig,\n },\n {\n code_success_show: true,\n code_error_show: true,\n }\n )\n }\n\n /**\n * 还原\n * @param ids\n */\n restore(ids: string[]) {\n return request(\n {\n url: this.actionUrl.get('restore'),\n method: 'POST',\n data: {\n ids,\n },\n ...this.requestConfig,\n },\n {\n code_success_show: true,\n code_error_show: true,\n }\n )\n }\n\n /**\n * 自定义\n * @param action\n * @param data\n */\n postData(action: string, data: anyObj) {\n return request(\n {\n url: this.actionUrl.has(action) ? this.actionUrl.get(action) : this.controllerUrl + action,\n method: 'post',\n data,\n ...this.requestConfig,\n },\n {\n code_success_show: true,\n code_error_show: true,\n }\n )\n }\n\n /**\n * 排序\n * @param id\n * @param targetId\n */\n sortableApi(id: number, targetId: number) {\n return request(\n {\n url: this.actionUrl.get('sortable'),\n method: 'post',\n data: {\n id,\n targetId,\n },\n ...this.requestConfig,\n },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
actionUrl;
|
8
|
+
query;
|
8
9
|
requestConfig = {};
|
9
10
|
// 新增:用于存储配置的request参数
|
10
11
|
constructor(controllerUrl, query) {
|
11
|
-
|
12
|
-
|
12
|
+
let qStr = this.objectToQuery(query);
|
13
|
+
if (controllerUrl.indexOf("?") > 0) {
|
14
|
+
const path = controllerUrl.split("?");
|
15
|
+
controllerUrl = path[0];
|
16
|
+
qStr = qStr + "&" + path[1];
|
17
|
+
}
|
18
|
+
this.query = qStr;
|
13
19
|
if (!controllerUrl.endsWith("/")) {
|
14
20
|
controllerUrl += "/";
|
15
21
|
}
|
16
22
|
this.controllerUrl = controllerUrl;
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
23
|
+
const actions = [
|
24
|
+
"index",
|
25
|
+
// 列表
|
26
|
+
"add",
|
27
|
+
// 新增
|
28
|
+
"edit",
|
29
|
+
// 编辑
|
30
|
+
"del",
|
31
|
+
// 删除
|
32
|
+
"sortable",
|
33
|
+
// 排序
|
34
|
+
"table",
|
35
|
+
// 表格数据
|
36
|
+
"form",
|
37
|
+
// 表单
|
38
|
+
"recycle",
|
39
|
+
// 回收站数据
|
40
|
+
"recycleTable",
|
30
41
|
// 回收站表格
|
31
|
-
|
42
|
+
"destroy",
|
32
43
|
// 回收站销毁
|
33
|
-
|
44
|
+
"restore"
|
34
45
|
// 回收站还原
|
35
|
-
]
|
46
|
+
];
|
47
|
+
this.actionUrl = /* @__PURE__ */ new Map();
|
48
|
+
for (const action of actions) {
|
49
|
+
this.actionUrl.set(action, this.buildFullUrl(`${controllerUrl}${action}`, qStr));
|
50
|
+
}
|
36
51
|
}
|
37
52
|
// 新增方法用于构建完整的URL
|
38
53
|
buildFullUrl(baseUrl, queryStr) {
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"dkTableApi.js","sources":["../../../src/table/utils/dkTableApi.ts"],"sourcesContent":["import { request } from '@vipl520/utils'\n\nexport class dkTableApi {\n private controllerUrl: string\n public actionUrl\n private requestConfig: anyObj = {} // 新增:用于存储配置的request参数\n\n constructor(controllerUrl: string, query: Object) {\n const qStr = this.objectToQuery(query)\n console.log('queryStr', qStr)\n\n if (!controllerUrl.endsWith('/')) {\n controllerUrl += '/'\n }\n\n this.controllerUrl = controllerUrl\n\n // 构建带有或不带有查询字符串的完整URL\n this.actionUrl = new Map([\n ['index', this.buildFullUrl(controllerUrl + 'index', qStr)],\n ['add', this.buildFullUrl(controllerUrl + 'add', qStr)],\n ['edit', this.buildFullUrl(controllerUrl + 'edit', qStr)],\n ['del', this.buildFullUrl(controllerUrl + 'del', qStr)],\n ['sortable', this.buildFullUrl(controllerUrl + 'sortable', qStr)],\n ['table', this.buildFullUrl(controllerUrl + 'table', qStr)], // 获取表格数据\n ['form', this.buildFullUrl(controllerUrl + 'form', qStr)], // 获取表单\n ['recycle', this.buildFullUrl(controllerUrl + 'recycle', qStr)], // 回收站\n ['recycleTable', this.buildFullUrl(controllerUrl + 'recycleTable', qStr)], // 回收站表格\n ['destroy', this.buildFullUrl(controllerUrl + 'destroy', qStr)], // 回收站销毁\n ['restore', this.buildFullUrl(controllerUrl + 'restore', qStr)], // 回收站还原\n ])\n }\n\n // 新增方法用于构建完整的URL\n private buildFullUrl(baseUrl: string, queryStr: string): string {\n return queryStr ? `${baseUrl}?${queryStr}` : baseUrl\n }\n\n objectToQuery(obj: any) {\n return Object.keys(obj)\n .map((key) => encodeURIComponent(key) + '=' + encodeURIComponent(obj[key]))\n .join('&')\n }\n\n /**\n * 配置request参数\n * @param config 包含HTTP方法、请求头等额外参数的对象\n */\n configureRequest(config: anyObj) {\n this.requestConfig = { ...config } // 将传入的配置对象浅拷贝到requestConfig\n }\n\n /**\n * 获取表格配置\n */\n table() {\n return request(\n {\n url: this.actionUrl.get('table'),\n method: 'post',\n ...this.requestConfig, // 将requestConfig的内容展开到request的参数中\n },\n {\n code_error_show: true,\n }\n )\n }\n\n /**\n * 获取表格配置\n */\n recycleTable() {\n return request(\n {\n url: this.actionUrl.get('recycleTable'),\n method: 'post',\n ...this.requestConfig,\n },\n {\n code_error_show: true,\n }\n )\n }\n\n /**\n * 获取表单\n */\n form(id?: number) {\n return request(\n {\n url: this.actionUrl.get('form'),\n method: 'post',\n data: { id },\n ...this.requestConfig,\n },\n {\n code_error_show: true,\n }\n )\n }\n\n /**\n * 获取表格列表\n * @param filter\n */\n index(filter: anyObj = {}) {\n return request(\n {\n url: this.actionUrl.get('index'),\n method: 'get',\n params: filter,\n ...this.requestConfig,\n },\n {\n code_error_show: true,\n }\n )\n }\n\n /**\n * 回收站列表\n * @param filter\n */\n recycle(filter: anyObj = {}) {\n return request(\n {\n url: this.actionUrl.get('recycle'),\n method: 'get',\n params: filter,\n ...this.requestConfig,\n },\n {\n code_error_show: true,\n }\n )\n }\n\n /**\n * 编辑\n * @param params\n */\n edit(params: anyObj) {\n return request(\n {\n url: this.actionUrl.get('edit'),\n method: 'get',\n params,\n ...this.requestConfig,\n },\n {\n code_error_show: true,\n }\n )\n }\n\n /**\n * 删除\n * @param ids\n */\n del(ids: number[]) {\n return request(\n {\n url: this.actionUrl.get('del'),\n method: 'DELETE',\n params: {\n ids,\n },\n ...this.requestConfig,\n },\n {\n code_success_show: true,\n code_error_show: true,\n }\n )\n }\n\n /**\n * 销毁\n * @param ids\n */\n destroy(ids: string[]) {\n return request(\n {\n url: this.actionUrl.get('destroy'),\n method: 'POST',\n data: {\n ids,\n },\n ...this.requestConfig,\n },\n {\n code_success_show: true,\n code_error_show: true,\n }\n )\n }\n\n /**\n * 还原\n * @param ids\n */\n restore(ids: string[]) {\n return request(\n {\n url: this.actionUrl.get('restore'),\n method: 'POST',\n data: {\n ids,\n },\n ...this.requestConfig,\n },\n {\n code_success_show: true,\n code_error_show: true,\n }\n )\n }\n\n /**\n * 自定义\n * @param action\n * @param data\n */\n postData(action: string, data: anyObj) {\n return request(\n {\n url: this.actionUrl.has(action) ? this.actionUrl.get(action) : this.controllerUrl + action,\n method: 'post',\n data,\n ...this.requestConfig,\n },\n {\n code_success_show: true,\n code_error_show: true,\n }\n )\n }\n\n /**\n * 排序\n * @param id\n * @param targetId\n */\n sortableApi(id: number, targetId: number) {\n return request(\n {\n url: this.actionUrl.get('sortable'),\n method: 'post',\n data: {\n id,\n targetId,\n },\n ...this.requestConfig,\n },\n {\n code_error_show: true,\n }\n )\n }\n}\n"],"names":["request"],"mappings":";;;;AAEO,MAAM,UAAW,CAAA;AAAA,EACd,aAAA,CAAA;AAAA,EACD,SAAA,CAAA;AAAA,EACC,gBAAwB,EAAC,CAAA;AAAA;AAAA,EAEjC,WAAA,CAAY,eAAuB,KAAe,EAAA;AAChD,IAAM,MAAA,IAAA,GAAO,IAAK,CAAA,aAAA,CAAc,KAAK,CAAA,CAAA;AACrC,IAAQ,OAAA,CAAA,GAAA,CAAI,YAAY,IAAI,CAAA,CAAA;AAE5B,IAAA,IAAI,CAAC,aAAA,CAAc,QAAS,CAAA,GAAG,CAAG,EAAA;AAChC,MAAiB,aAAA,IAAA,GAAA,CAAA;AAAA,KACnB;AAEA,IAAA,IAAA,CAAK,aAAgB,GAAA,aAAA,CAAA;AAGrB,IAAK,IAAA,CAAA,SAAA,uBAAgB,GAAI,CAAA;AAAA,MACvB,CAAC,OAAS,EAAA,IAAA,CAAK,aAAa,aAAgB,GAAA,OAAA,EAAS,IAAI,CAAC,CAAA;AAAA,MAC1D,CAAC,KAAO,EAAA,IAAA,CAAK,aAAa,aAAgB,GAAA,KAAA,EAAO,IAAI,CAAC,CAAA;AAAA,MACtD,CAAC,MAAQ,EAAA,IAAA,CAAK,aAAa,aAAgB,GAAA,MAAA,EAAQ,IAAI,CAAC,CAAA;AAAA,MACxD,CAAC,KAAO,EAAA,IAAA,CAAK,aAAa,aAAgB,GAAA,KAAA,EAAO,IAAI,CAAC,CAAA;AAAA,MACtD,CAAC,UAAY,EAAA,IAAA,CAAK,aAAa,aA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AAAA,KACF,CAAA;AAAA,GACF;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAOA,WAAA,CAAY,IAAY,QAAkB,EAAA;AACxC,IAAO,OAAAA,aAAA;AAAA,MACL;AAAA,QACE,GAAK,EAAA,IAAA,CAAK,SAAU,CAAA,GAAA,CAAI,UAAU,CAAA;AAAA,QAClC,MAAQ,EAAA,MAAA;AAAA,QACR,IAAM,EAAA;AAAA,UACJ,EAAA;AAAA,UACA,QAAA;AAAA,SACF;AAAA,QACA,GAAG,IAAK,CAAA,aAAA;AAAA,OACV;AAAA,MACA;AAAA,QACE,eAAiB,EAAA,IAAA;AAAA,OACnB;AAAA,KACF,CAAA;AAAA,GACF;AACF;;;;"}
|
1
|
+
{"version":3,"file":"dkTableApi.js","sources":["../../../src/table/utils/dkTableApi.ts"],"sourcesContent":["import { request } from '@vipl520/utils'\n\nexport class dkTableApi {\n private controllerUrl: string\n public actionUrl\n public query\n private requestConfig: anyObj = {} // 新增:用于存储配置的request参数\n\n constructor(controllerUrl: string, query: Object) {\n let qStr = this.objectToQuery(query)\n if (controllerUrl.indexOf('?') > 0) {\n const path = controllerUrl.split('?')\n controllerUrl = path[0]\n qStr = qStr + '&' + path[1]\n }\n this.query = qStr\n if (!controllerUrl.endsWith('/')) {\n controllerUrl += '/'\n }\n this.controllerUrl = controllerUrl\n // 动作名称数组\n const actions = [\n 'index', // 列表\n 'add', // 新增\n 'edit', // 编辑\n 'del', // 删除\n 'sortable', // 排序\n 'table', // 表格数据\n 'form', // 表单\n 'recycle', // 回收站数据\n 'recycleTable', // 回收站表格\n 'destroy', // 回收站销毁\n 'restore', // 回收站还原\n ]\n\n // 使用循环填充Map\n this.actionUrl = new Map()\n for (const action of actions) {\n this.actionUrl.set(action, this.buildFullUrl(`${controllerUrl}${action}`, qStr))\n }\n }\n\n // 新增方法用于构建完整的URL\n private buildFullUrl(baseUrl: string, queryStr: string): string {\n return queryStr ? `${baseUrl}?${queryStr}` : baseUrl\n }\n\n objectToQuery(obj: any) {\n return Object.keys(obj)\n .map((key) => encodeURIComponent(key) + '=' + encodeURIComponent(obj[key]))\n .join('&')\n }\n\n /**\n * 配置request参数\n * @param config 包含HTTP方法、请求头等额外参数的对象\n */\n configureRequest(config: anyObj) {\n this.requestConfig = { ...config } // 将传入的配置对象浅拷贝到requestConfig\n }\n\n /**\n * 获取表格配置\n */\n table() {\n return request(\n {\n url: this.actionUrl.get('table'),\n method: 'post',\n ...this.requestConfig, // 将requestConfig的内容展开到request的参数中\n },\n {\n code_error_show: true,\n }\n )\n }\n\n /**\n * 获取表格配置\n */\n recycleTable() {\n return request(\n {\n url: this.actionUrl.get('recycleTable'),\n method: 'post',\n ...this.requestConfig,\n },\n {\n code_error_show: true,\n }\n )\n }\n\n /**\n * 获取表单\n */\n form(id?: number) {\n return request(\n {\n url: this.actionUrl.get('form'),\n method: 'post',\n data: { id },\n ...this.requestConfig,\n },\n {\n code_error_show: true,\n }\n )\n }\n\n /**\n * 获取表格列表\n * @param filter\n */\n index(filter: anyObj = {}) {\n return request(\n {\n url: this.actionUrl.get('index'),\n method: 'get',\n params: filter,\n ...this.requestConfig,\n },\n {\n code_error_show: true,\n }\n )\n }\n\n /**\n * 回收站列表\n * @param filter\n */\n recycle(filter: anyObj = {}) {\n return request(\n {\n url: this.actionUrl.get('recycle'),\n method: 'get',\n params: filter,\n ...this.requestConfig,\n },\n {\n code_error_show: true,\n }\n )\n }\n\n /**\n * 编辑\n * @param params\n */\n edit(params: anyObj) {\n return request(\n {\n url: this.actionUrl.get('edit'),\n method: 'get',\n params,\n ...this.requestConfig,\n },\n {\n code_error_show: true,\n }\n )\n }\n\n /**\n * 删除\n * @param ids\n */\n del(ids: number[]) {\n return request(\n {\n url: this.actionUrl.get('del'),\n method: 'DELETE',\n params: {\n ids,\n },\n ...this.requestConfig,\n },\n {\n code_success_show: true,\n code_error_show: true,\n }\n )\n }\n\n /**\n * 销毁\n * @param ids\n */\n destroy(ids: string[]) {\n return request(\n {\n url: this.actionUrl.get('destroy'),\n method: 'POST',\n data: {\n ids,\n },\n ...this.requestConfig,\n },\n {\n code_success_show: true,\n code_error_show: true,\n }\n )\n }\n\n /**\n * 还原\n * @param ids\n */\n restore(ids: string[]) {\n return request(\n {\n url: this.actionUrl.get('restore'),\n method: 'POST',\n data: {\n ids,\n },\n ...this.requestConfig,\n },\n {\n code_success_show: true,\n code_error_show: true,\n }\n )\n }\n\n /**\n * 自定义\n * @param action\n * @param data\n */\n postData(action: string, data: anyObj) {\n return request(\n {\n url: this.actionUrl.has(action) ? this.actionUrl.get(action) : this.controllerUrl + action,\n method: 'post',\n data,\n ...this.requestConfig,\n },\n {\n code_success_show: true,\n code_error_show: true,\n }\n )\n }\n\n /**\n * 排序\n * @param id\n * @param targetId\n */\n sortableApi(id: number, targetId: number) {\n return request(\n {\n url: this.actionUrl.get('sortable'),\n method: 'post',\n data: {\n id,\n targetId,\n },\n ...this.requestConfig,\n },\n {\n code_error_show: true,\n }\n )\n }\n}\n"],"names":["request"],"mappings":";;;;AAEO,MAAM,UAAW,CAAA;AAAA,EACd,aAAA,CAAA;AAAA,EACD,SAAA,CAAA;AAAA,EACA,KAAA,CAAA;AAAA,EACC,gBAAwB,EAAC,CAAA;AAAA;AAAA,EAEjC,WAAA,CAAY,eAAuB,KAAe,EAAA;AAChD,IAAI,IAAA,IAAA,GAAO,IAAK,CAAA,aAAA,CAAc,KAAK,CAAA,CAAA;AACnC,IAAA,IAAI,aAAc,CAAA,OAAA,CAAQ,GAAG,CAAA,GAAI,CAAG,EAAA;AAClC,MAAM,MAAA,IAAA,GAAO,aAAc,CAAA,KAAA,CAAM,GAAG,CAAA,CAAA;AACpC,MAAA,aAAA,GAAgB,KAAK,CAAC,CAAA,CAAA;AACtB,MAAO,IAAA,GAAA,IAAA,GAAO,GAAM,GAAA,IAAA,CAAK,CAAC,CAAA,CAAA;AAAA,KAC5B;AACA,IAAA,IAAA,CAAK,KAAQ,GAAA,IAAA,CAAA;AACb,IAAA,IAAI,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