@kengic/core.react 0.0.2-beta.35 → 0.0.2-beta.36

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.
@@ -66781,6 +66781,11 @@ function Execute(e, t) {
66781
66781
  }
66782
66782
  Execute.method = "POST";
66783
66783
  Execute.url = "/SqlClient/execute";
66784
+ function ExecutePage(e, t) {
66785
+ return httpClient().request({ method: ExecutePage.method, url: ExecutePage.url, ...e ?? {} }, t);
66786
+ }
66787
+ ExecutePage.method = "POST";
66788
+ ExecutePage.url = "/SqlClient/executePage";
66784
66789
  class ExecuteQuery {
66785
66790
  constructor(t) {
66786
66791
  /** 当前页码. */
@@ -66915,17 +66920,23 @@ function doKgSqlClient(e = "") {
66915
66920
  }), t;
66916
66921
  }
66917
66922
  function KgSqlClientResultTab({ executeResult: e, index: t }) {
66918
- var u, p;
66919
- const [r, n] = reactExports.useState(!1), a = ((u = e == null ? void 0 : e.columns) == null ? void 0 : u.map((C) => ({
66920
- dataIndex: C.columnLabel,
66923
+ var L, G;
66924
+ const [r, n] = reactExports.useState(!1), [a, s] = reactExports.useState(null), u = a ?? e, p = ((L = u == null ? void 0 : u.columns) == null ? void 0 : L.map((te) => ({
66925
+ dataIndex: te.columnLabel,
66921
66926
  title: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { children: [
66922
- /* @__PURE__ */ jsxRuntimeExports.jsx("div", { children: C.columnLabel }),
66923
- /* @__PURE__ */ jsxRuntimeExports.jsx("div", { dangerouslySetInnerHTML: { __html: C.columnDesc ?? " " } })
66927
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { children: te.columnLabel }),
66928
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { dangerouslySetInnerHTML: { __html: te.columnDesc ?? " " } })
66924
66929
  ] }),
66925
- render: (w) => w
66930
+ render: (oe) => oe
66926
66931
  }))) ?? [];
66927
- function s(C, w) {
66928
- w !== e.pageSize ? (e.pageIndex = 1, e.pageSize = w) : e.pageIndex = C;
66932
+ async function C(te, oe) {
66933
+ oe !== u.pageSize ? (u.pageIndex = 1, u.pageSize = oe) : u.pageIndex = te, await w(te, oe);
66934
+ }
66935
+ async function w(te, oe) {
66936
+ const ie = await ExecutePage({
66937
+ data: new ExecuteQuery({ sql: u.sql, pageIndex: te, pageSize: oe })
66938
+ });
66939
+ s(ie);
66929
66940
  }
66930
66941
  return /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
66931
66942
  /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "info", children: [
@@ -66935,8 +66946,8 @@ function KgSqlClientResultTab({ executeResult: e, index: t }) {
66935
66946
  ":"
66936
66947
  ] }),
66937
66948
  /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "value", children: [
66938
- e.success && /* @__PURE__ */ jsxRuntimeExports.jsx(Tag, { color: "green", children: /* @__PURE__ */ jsxRuntimeExports.jsx(MemoizedFormattedMessage, { id: "kg.success" }) }),
66939
- !e.success && /* @__PURE__ */ jsxRuntimeExports.jsx(Tag, { color: "red", children: /* @__PURE__ */ jsxRuntimeExports.jsx(MemoizedFormattedMessage, { id: "kg.fail" }) })
66949
+ u.success && /* @__PURE__ */ jsxRuntimeExports.jsx(Tag, { color: "green", children: /* @__PURE__ */ jsxRuntimeExports.jsx(MemoizedFormattedMessage, { id: "kg.success" }) }),
66950
+ !u.success && /* @__PURE__ */ jsxRuntimeExports.jsx(Tag, { color: "red", children: /* @__PURE__ */ jsxRuntimeExports.jsx(MemoizedFormattedMessage, { id: "kg.fail" }) })
66940
66951
  ] })
66941
66952
  ] }),
66942
66953
  /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "row", children: [
@@ -66945,7 +66956,7 @@ function KgSqlClientResultTab({ executeResult: e, index: t }) {
66945
66956
  ":"
66946
66957
  ] }),
66947
66958
  /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "value", children: [
66948
- e.elapse ?? 0,
66959
+ u.elapse ?? 0,
66949
66960
  " ",
66950
66961
  /* @__PURE__ */ jsxRuntimeExports.jsx(MemoizedFormattedMessage, { id: "kg.millisecond" })
66951
66962
  ] })
@@ -66955,53 +66966,53 @@ function KgSqlClientResultTab({ executeResult: e, index: t }) {
66955
66966
  /* @__PURE__ */ jsxRuntimeExports.jsx(MemoizedFormattedMessage, { id: "KgSqlClient.ResultTab.rowsTotalLabel" }),
66956
66967
  ":"
66957
66968
  ] }),
66958
- /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "value", children: e.rowsTotal ?? 0 })
66969
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "value", children: u.rowsTotal ?? 0 })
66959
66970
  ] }),
66960
66971
  /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "row", children: [
66961
66972
  /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "label", children: [
66962
66973
  /* @__PURE__ */ jsxRuntimeExports.jsx(MemoizedFormattedMessage, { id: "KgSqlClient.ResultTab.messageLabel" }),
66963
66974
  ":"
66964
66975
  ] }),
66965
- /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "value", children: e.message })
66976
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "value", children: u.message })
66966
66977
  ] })
66967
66978
  ] }),
66968
- (e == null ? void 0 : e.columns) && ((p = e == null ? void 0 : e.columns) == null ? void 0 : p.length) > 0 && /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
66979
+ (u == null ? void 0 : u.columns) && ((G = u == null ? void 0 : u.columns) == null ? void 0 : G.length) > 0 && /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
66969
66980
  /* @__PURE__ */ jsxRuntimeExports.jsx(
66970
66981
  ForwardTable,
66971
66982
  {
66972
66983
  className: "kg-flex-table",
66973
- dataSource: (e == null ? void 0 : e.rows) ?? [],
66984
+ dataSource: (u == null ? void 0 : u.rows) ?? [],
66974
66985
  loading: r,
66975
- columns: a,
66986
+ columns: p,
66976
66987
  size: "small",
66977
66988
  pagination: !1,
66978
66989
  scroll: { y: "auto" },
66979
- rowKey: (C, w) => w
66990
+ rowKey: (te, oe) => oe
66980
66991
  }
66981
66992
  ),
66982
66993
  /* @__PURE__ */ jsxRuntimeExports.jsx(
66983
66994
  Pagination,
66984
66995
  {
66985
66996
  size: "default",
66986
- current: e.pageIndex ?? 1,
66987
- pageSize: e.pageSize ?? 50,
66988
- total: e.rowsTotal ?? 0,
66997
+ current: u.pageIndex ?? 1,
66998
+ pageSize: u.pageSize ?? 50,
66999
+ total: u.rowsTotal ?? 0,
66989
67000
  showSizeChanger: !0,
66990
67001
  showQuickJumper: !1,
66991
67002
  hideOnSinglePage: !1,
66992
67003
  locale: { page: "" },
66993
- showTotal: (C, w) => /* @__PURE__ */ jsxRuntimeExports.jsx(
67004
+ showTotal: (te, oe) => /* @__PURE__ */ jsxRuntimeExports.jsx(
66994
67005
  MemoizedFormattedMessage,
66995
67006
  {
66996
67007
  id: "kg.KgTable.totalText",
66997
67008
  values: {
66998
- from: w[0],
66999
- to: w[1],
67000
- total: C
67009
+ from: oe[0],
67010
+ to: oe[1],
67011
+ total: te
67001
67012
  }
67002
67013
  }
67003
67014
  ),
67004
- onChange: (C, w) => s(C, w)
67015
+ onChange: (te, oe) => C(te, oe)
67005
67016
  }
67006
67017
  )
67007
67018
  ] })
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kengic/core.react",
3
- "version": "0.0.2-beta.35",
3
+ "version": "0.0.2-beta.36",
4
4
  "type": "module",
5
5
  "main": "./kengic-core.react.js",
6
6
  "module": "./kengic-core.react.js",
@@ -0,0 +1,16 @@
1
+ import { IRequestConfig, IRequestOptions } from '../../../../service';
2
+ import * as DEF from '../../../def';
3
+ /** 请求参数. */
4
+ export declare class ExecutePageQuery {
5
+ }
6
+ /**
7
+ * 执行语句.
8
+ *
9
+ * @param config 请求配置.
10
+ * @param option 请求选项.
11
+ */
12
+ export declare function ExecutePage(config?: IRequestConfig<ExecutePageQuery, DEF.WMS.ExecuteQuery>, option?: IRequestOptions): Promise<DEF.WMS.ExecuteResultDTO>;
13
+ export declare namespace ExecutePage {
14
+ var method: "POST";
15
+ var url: string;
16
+ }
@@ -1 +1,2 @@
1
1
  export { Execute, ExecuteQuery } from './Execute';
2
+ export { ExecutePage, ExecutePageQuery } from './ExecutePage';