aldehyde 0.2.420 → 0.2.422

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.
Files changed (216) hide show
  1. package/lib/controls/date-picker/index.d.ts.map +1 -1
  2. package/lib/controls/date-picker/index.js +8 -15
  3. package/lib/controls/date-picker/index.js.map +1 -1
  4. package/lib/controls/file-view/index.d.ts.map +1 -1
  5. package/lib/controls/file-view/index.js +5 -3
  6. package/lib/controls/file-view/index.js.map +1 -1
  7. package/lib/detail/button/view-button.d.ts +1 -0
  8. package/lib/detail/button/view-button.d.ts.map +1 -1
  9. package/lib/detail/button/view-button.js +3 -3
  10. package/lib/detail/button/view-button.js.map +1 -1
  11. package/lib/hooks/use-tabs/index.d.ts.map +1 -1
  12. package/lib/hooks/use-tabs/index.js +3 -0
  13. package/lib/hooks/use-tabs/index.js.map +1 -1
  14. package/lib/layout2/components/search-menu.js +1 -1
  15. package/lib/layout2/components/search-menu.js.map +1 -1
  16. package/lib/layout2/components/user-button.d.ts +3 -0
  17. package/lib/layout2/components/user-button.d.ts.map +1 -1
  18. package/lib/layout2/components/user-button.js +27 -7
  19. package/lib/layout2/components/user-button.js.map +1 -1
  20. package/lib/layout2/header.d.ts +2 -0
  21. package/lib/layout2/header.d.ts.map +1 -1
  22. package/lib/layout2/header.js +3 -3
  23. package/lib/layout2/header.js.map +1 -1
  24. package/lib/layout2/page.d.ts.map +1 -1
  25. package/lib/layout2/page.js +7 -5
  26. package/lib/layout2/page.js.map +1 -1
  27. package/lib/layout2/sider.d.ts +2 -0
  28. package/lib/layout2/sider.d.ts.map +1 -1
  29. package/lib/layout2/sider.js +2 -2
  30. package/lib/layout2/sider.js.map +1 -1
  31. package/lib/layout3/header.d.ts +2 -0
  32. package/lib/layout3/header.d.ts.map +1 -1
  33. package/lib/layout3/header.js +4 -4
  34. package/lib/layout3/header.js.map +1 -1
  35. package/lib/layout3/page.d.ts.map +1 -1
  36. package/lib/layout3/page.js +6 -4
  37. package/lib/layout3/page.js.map +1 -1
  38. package/lib/layout3/sider.d.ts +2 -0
  39. package/lib/layout3/sider.d.ts.map +1 -1
  40. package/lib/layout3/sider.js +2 -2
  41. package/lib/layout3/sider.js.map +1 -1
  42. package/lib/layout4/header.d.ts +2 -0
  43. package/lib/layout4/header.d.ts.map +1 -1
  44. package/lib/layout4/header.js +4 -4
  45. package/lib/layout4/header.js.map +1 -1
  46. package/lib/layout4/page.d.ts.map +1 -1
  47. package/lib/layout4/page.js +7 -5
  48. package/lib/layout4/page.js.map +1 -1
  49. package/lib/layout4/sider.d.ts +2 -0
  50. package/lib/layout4/sider.d.ts.map +1 -1
  51. package/lib/layout4/sider.js +2 -2
  52. package/lib/layout4/sider.js.map +1 -1
  53. package/lib/layout5/header.d.ts +2 -0
  54. package/lib/layout5/header.d.ts.map +1 -1
  55. package/lib/layout5/header.js +2 -2
  56. package/lib/layout5/header.js.map +1 -1
  57. package/lib/layout5/page.d.ts.map +1 -1
  58. package/lib/layout5/page.js +7 -5
  59. package/lib/layout5/page.js.map +1 -1
  60. package/lib/layout5/sider.d.ts +2 -0
  61. package/lib/layout5/sider.d.ts.map +1 -1
  62. package/lib/layout5/sider.js +2 -2
  63. package/lib/layout5/sider.js.map +1 -1
  64. package/lib/list/card-list/card-list-item.js +1 -1
  65. package/lib/list/card-list/card-list-item.js.map +1 -1
  66. package/lib/lowcode-components/bar-chart/index.d.ts.map +1 -1
  67. package/lib/lowcode-components/bar-chart/index.js +9 -1
  68. package/lib/lowcode-components/bar-chart/index.js.map +1 -1
  69. package/lib/lowcode-components/base-map/index.d.ts.map +1 -1
  70. package/lib/lowcode-components/base-map/index.js +9 -1
  71. package/lib/lowcode-components/base-map/index.js.map +1 -1
  72. package/lib/lowcode-components/capsule-bar-chart/index.d.ts.map +1 -1
  73. package/lib/lowcode-components/capsule-bar-chart/index.js +9 -1
  74. package/lib/lowcode-components/capsule-bar-chart/index.js.map +1 -1
  75. package/lib/lowcode-components/circular-progress-chart/index.d.ts.map +1 -1
  76. package/lib/lowcode-components/circular-progress-chart/index.js +9 -1
  77. package/lib/lowcode-components/circular-progress-chart/index.js.map +1 -1
  78. package/lib/lowcode-components/column-3d-chart/index.d.ts.map +1 -1
  79. package/lib/lowcode-components/column-3d-chart/index.js +9 -1
  80. package/lib/lowcode-components/column-3d-chart/index.js.map +1 -1
  81. package/lib/lowcode-components/column-chart/index.d.ts.map +1 -1
  82. package/lib/lowcode-components/column-chart/index.js +9 -1
  83. package/lib/lowcode-components/column-chart/index.js.map +1 -1
  84. package/lib/lowcode-components/effectScatter-map/index.d.ts.map +1 -1
  85. package/lib/lowcode-components/effectScatter-map/index.js +9 -1
  86. package/lib/lowcode-components/effectScatter-map/index.js.map +1 -1
  87. package/lib/lowcode-components/effectScatter-map-3d/index.d.ts.map +1 -1
  88. package/lib/lowcode-components/effectScatter-map-3d/index.js +9 -1
  89. package/lib/lowcode-components/effectScatter-map-3d/index.js.map +1 -1
  90. package/lib/lowcode-components/gauge-chart/index.d.ts.map +1 -1
  91. package/lib/lowcode-components/gauge-chart/index.js +9 -1
  92. package/lib/lowcode-components/gauge-chart/index.js.map +1 -1
  93. package/lib/lowcode-components/line-bar-chart/index.d.ts.map +1 -1
  94. package/lib/lowcode-components/line-bar-chart/index.js +9 -1
  95. package/lib/lowcode-components/line-bar-chart/index.js.map +1 -1
  96. package/lib/lowcode-components/line-chart/index.d.ts.map +1 -1
  97. package/lib/lowcode-components/line-chart/index.js +9 -1
  98. package/lib/lowcode-components/line-chart/index.js.map +1 -1
  99. package/lib/lowcode-components/liquid-chart/index.d.ts.map +1 -1
  100. package/lib/lowcode-components/liquid-chart/index.js +9 -1
  101. package/lib/lowcode-components/liquid-chart/index.js.map +1 -1
  102. package/lib/lowcode-components/lowcode-view/component/screen-fit/index.d.ts.map +1 -1
  103. package/lib/lowcode-components/lowcode-view/component/screen-fit/index.js +2 -0
  104. package/lib/lowcode-components/lowcode-view/component/screen-fit/index.js.map +1 -1
  105. package/lib/lowcode-components/lowcode-view/component/screen-fit/index.less +2 -1
  106. package/lib/lowcode-components/lowcode-view/index.d.ts +2 -1
  107. package/lib/lowcode-components/lowcode-view/index.d.ts.map +1 -1
  108. package/lib/lowcode-components/lowcode-view/index.js +2 -2
  109. package/lib/lowcode-components/lowcode-view/index.js.map +1 -1
  110. package/lib/lowcode-components/lowcode-view/index.less +7 -0
  111. package/lib/lowcode-components/pie-chart/index.d.ts.map +1 -1
  112. package/lib/lowcode-components/pie-chart/index.js +9 -1
  113. package/lib/lowcode-components/pie-chart/index.js.map +1 -1
  114. package/lib/lowcode-components/progress-chart/index.d.ts.map +1 -1
  115. package/lib/lowcode-components/progress-chart/index.js +9 -1
  116. package/lib/lowcode-components/progress-chart/index.js.map +1 -1
  117. package/lib/routable/ltmpl-route.d.ts +2 -1
  118. package/lib/routable/ltmpl-route.d.ts.map +1 -1
  119. package/lib/routable/ltmpl-route.js +11 -5
  120. package/lib/routable/ltmpl-route.js.map +1 -1
  121. package/lib/routable/splitview-ltmpl-route.d.ts.map +1 -1
  122. package/lib/routable/splitview-ltmpl-route.js +11 -4
  123. package/lib/routable/splitview-ltmpl-route.js.map +1 -1
  124. package/lib/table/act-table.d.ts +4 -0
  125. package/lib/table/act-table.d.ts.map +1 -1
  126. package/lib/table/act-table.js +37 -12
  127. package/lib/table/act-table.js.map +1 -1
  128. package/lib/table/column/column-builder.d.ts.map +1 -1
  129. package/lib/table/column/column-builder.js +6 -8
  130. package/lib/table/column/column-builder.js.map +1 -1
  131. package/lib/table/index.css +29 -2
  132. package/lib/table/page-config-button.d.ts +15 -0
  133. package/lib/table/page-config-button.d.ts.map +1 -0
  134. package/lib/table/page-config-button.js +156 -0
  135. package/lib/table/page-config-button.js.map +1 -0
  136. package/lib/table/pagination.d.ts +1 -0
  137. package/lib/table/pagination.d.ts.map +1 -1
  138. package/lib/table/pagination.js +2 -2
  139. package/lib/table/pagination.js.map +1 -1
  140. package/lib/table/query-table.d.ts.map +1 -1
  141. package/lib/table/query-table.js +1 -1
  142. package/lib/table/query-table.js.map +1 -1
  143. package/lib/table/relation-table.d.ts +1 -0
  144. package/lib/table/relation-table.d.ts.map +1 -1
  145. package/lib/tmpl/hcservice-v3.d.ts +9 -0
  146. package/lib/tmpl/hcservice-v3.d.ts.map +1 -1
  147. package/lib/tmpl/hcservice-v3.js +154 -0
  148. package/lib/tmpl/hcservice-v3.js.map +1 -1
  149. package/lib/tmpl/interface.d.ts +21 -0
  150. package/lib/tmpl/interface.d.ts.map +1 -1
  151. package/lib/tmpl/interface.js.map +1 -1
  152. package/lib/units/index.d.ts +9 -4
  153. package/lib/units/index.d.ts.map +1 -1
  154. package/lib/units/index.js +49 -13
  155. package/lib/units/index.js.map +1 -1
  156. package/lib/welcome/HCWelcome.js +10 -0
  157. package/lib/welcome/HCWelcome.js.map +1 -1
  158. package/lib/welcome/components/menu-card.less +1 -0
  159. package/lib/welcome/components/user-menus.d.ts +16 -0
  160. package/lib/welcome/components/user-menus.d.ts.map +1 -0
  161. package/lib/welcome/components/user-menus.js +210 -0
  162. package/lib/welcome/components/user-menus.js.map +1 -0
  163. package/lib/welcome/components/user-menus.less +193 -0
  164. package/package.json +1 -1
  165. package/src/aldehyde/controls/date-picker/index.tsx +12 -4
  166. package/src/aldehyde/controls/file-view/index.tsx +5 -1
  167. package/src/aldehyde/detail/button/view-button.tsx +7 -6
  168. package/src/aldehyde/hooks/use-tabs/index.tsx +3 -0
  169. package/src/aldehyde/layout2/components/search-menu.tsx +1 -1
  170. package/src/aldehyde/layout2/components/user-button.tsx +45 -8
  171. package/src/aldehyde/layout2/header.tsx +5 -3
  172. package/src/aldehyde/layout2/page.tsx +8 -7
  173. package/src/aldehyde/layout2/sider.tsx +4 -3
  174. package/src/aldehyde/layout3/header.tsx +6 -4
  175. package/src/aldehyde/layout3/page.tsx +7 -4
  176. package/src/aldehyde/layout3/sider.tsx +4 -3
  177. package/src/aldehyde/layout4/header.tsx +6 -4
  178. package/src/aldehyde/layout4/page.tsx +8 -5
  179. package/src/aldehyde/layout4/sider.tsx +4 -3
  180. package/src/aldehyde/layout5/header.tsx +4 -2
  181. package/src/aldehyde/layout5/page.tsx +8 -5
  182. package/src/aldehyde/layout5/sider.tsx +4 -3
  183. package/src/aldehyde/list/card-list/card-list-item.tsx +1 -1
  184. package/src/aldehyde/lowcode-components/bar-chart/index.tsx +12 -2
  185. package/src/aldehyde/lowcode-components/base-map/index.tsx +12 -2
  186. package/src/aldehyde/lowcode-components/capsule-bar-chart/index.tsx +12 -2
  187. package/src/aldehyde/lowcode-components/circular-progress-chart/index.tsx +12 -2
  188. package/src/aldehyde/lowcode-components/column-3d-chart/index.tsx +12 -2
  189. package/src/aldehyde/lowcode-components/column-chart/index.tsx +12 -2
  190. package/src/aldehyde/lowcode-components/effectScatter-map/index.tsx +12 -2
  191. package/src/aldehyde/lowcode-components/effectScatter-map-3d/index.tsx +12 -2
  192. package/src/aldehyde/lowcode-components/gauge-chart/index.tsx +12 -2
  193. package/src/aldehyde/lowcode-components/line-bar-chart/index.tsx +12 -2
  194. package/src/aldehyde/lowcode-components/line-chart/index.tsx +12 -2
  195. package/src/aldehyde/lowcode-components/liquid-chart/index.tsx +12 -2
  196. package/src/aldehyde/lowcode-components/lowcode-view/component/screen-fit/index.less +2 -1
  197. package/src/aldehyde/lowcode-components/lowcode-view/component/screen-fit/index.tsx +3 -1
  198. package/src/aldehyde/lowcode-components/lowcode-view/index.less +7 -0
  199. package/src/aldehyde/lowcode-components/lowcode-view/index.tsx +3 -1
  200. package/src/aldehyde/lowcode-components/pie-chart/index.tsx +12 -2
  201. package/src/aldehyde/lowcode-components/progress-chart/index.tsx +12 -2
  202. package/src/aldehyde/routable/ltmpl-route.tsx +13 -5
  203. package/src/aldehyde/routable/splitview-ltmpl-route.tsx +12 -3
  204. package/src/aldehyde/table/act-table.tsx +44 -13
  205. package/src/aldehyde/table/column/column-builder.tsx +13 -20
  206. package/src/aldehyde/table/index.css +29 -2
  207. package/src/aldehyde/table/page-config-button.tsx +199 -0
  208. package/src/aldehyde/table/pagination.tsx +8 -7
  209. package/src/aldehyde/table/query-table.tsx +1 -0
  210. package/src/aldehyde/tmpl/hcservice-v3.tsx +136 -0
  211. package/src/aldehyde/tmpl/interface.tsx +22 -0
  212. package/src/aldehyde/units/index.tsx +34 -3
  213. package/src/aldehyde/welcome/HCWelcome.js +10 -0
  214. package/src/aldehyde/welcome/components/menu-card.less +1 -0
  215. package/src/aldehyde/welcome/components/user-menus.less +193 -0
  216. package/src/aldehyde/welcome/components/user-menus.tsx +275 -0
@@ -1,6 +1,7 @@
1
1
  import * as echarts from 'echarts';
2
2
  import React, { useEffect, useRef, useState, ForwardedRef, forwardRef, useImperativeHandle } from 'react';
3
3
  import _ from 'lodash';
4
+ import { Spin } from "antd";
4
5
  import ProgramConfig from "../../units";
5
6
  import chinaJson from "../assets/china.json";
6
7
  import HydrocarbonService from "../../tmpl/hcservice-v3";
@@ -195,7 +196,7 @@ export interface ComponentStyle {
195
196
 
196
197
  export interface ComponentProps {
197
198
  style?: ComponentStyle;
198
- base: { width: number, height: number },
199
+ base: { width: number, height: number };
199
200
  data?: DataConfigProps;
200
201
  isDesignMode?: boolean; // 是否编辑模式
201
202
  initSearchParams?: { [key: string]: any }; // 全局初始化外部参数,例:传参包含设备id,则在查询时带上设备id
@@ -214,6 +215,7 @@ const Index = forwardRef((props: ComponentProps, ref: ForwardedRef<ComponentRef>
214
215
  const [data, setData] = useState<{ name: string, value: number[] }[]>([]);
215
216
  const [searchParams, setSearchParams] = useState<{ [key: string]: any }>();
216
217
  const [initSearchParams, setInitSearchParams] = useState<{ [key: string]: any }>();
218
+ const [loading, setLoading] = useState<boolean>(false);
217
219
  const chartRef = useRef<HTMLDivElement>(null);
218
220
  const chart = useRef<any>(null);
219
221
  const pollingIntervalRef = useRef<number | NodeJS.Timeout>(null);
@@ -279,7 +281,9 @@ const Index = forwardRef((props: ComponentProps, ref: ForwardedRef<ComponentRef>
279
281
 
280
282
  // 请求数据
281
283
  const getData = async (params?: object) => {
284
+ setLoading(true);
282
285
  const { data } = await HydrocarbonService.requestChartData(null, dataConfig?.sourceId, params) || {};
286
+ setLoading(false);
283
287
  const { config, value } = data || {};
284
288
  setData(handleData(value));
285
289
  return config;
@@ -394,7 +398,13 @@ const Index = forwardRef((props: ComponentProps, ref: ForwardedRef<ComponentRef>
394
398
  }
395
399
  }, [size]);
396
400
 
397
- return <div ref={chartRef} style={{ width: '100%', height: '100%' }} />;
401
+ const renderChartDom = () => <div ref={chartRef} style={{ width: '100%', height: '100%' }} />;
402
+
403
+ if (isDesignMode) {
404
+ return renderChartDom();
405
+ }
406
+
407
+ return <Spin spinning={loading}>{renderChartDom()}</Spin>;
398
408
  });
399
409
 
400
410
  export default Index;
@@ -1,6 +1,7 @@
1
1
  import * as echarts from 'echarts';
2
2
  import React, { useEffect, useRef, useState, ForwardedRef, forwardRef, useImperativeHandle } from 'react';
3
3
  import _ from 'lodash';
4
+ import { Spin } from "antd";
4
5
  import HydrocarbonService from "../../tmpl/hcservice-v3";
5
6
  import { DataConfigProps } from "../data";
6
7
 
@@ -46,7 +47,7 @@ export interface ComponentStyle {
46
47
 
47
48
  export interface ComponentProps {
48
49
  style?: ComponentStyle;
49
- base: { width: number, height: number },
50
+ base: { width: number, height: number };
50
51
  data?: DataConfigProps;
51
52
  isDesignMode?: boolean; // 是否编辑模式
52
53
  initSearchParams?: { [key: string]: any }; // 全局初始化外部参数,例:传参包含设备id,则在查询时带上设备id
@@ -66,6 +67,7 @@ const Index = forwardRef((props: ComponentProps, ref: ForwardedRef<ComponentRef>
66
67
  const [data, setData] = useState<number>(0);
67
68
  const [searchParams, setSearchParams] = useState<{ [key: string]: any }>();
68
69
  const [initSearchParams, setInitSearchParams] = useState<{ [key: string]: any }>();
70
+ const [loading, setLoading] = useState<boolean>(false);
69
71
  const chartRef = useRef<HTMLDivElement>(null);
70
72
  const chart = useRef<any>(null);
71
73
  const pollingIntervalRef = useRef<number | NodeJS.Timeout>(null);
@@ -121,7 +123,9 @@ const Index = forwardRef((props: ComponentProps, ref: ForwardedRef<ComponentRef>
121
123
 
122
124
  // 请求数据
123
125
  const getData = async (params?: object) => {
126
+ setLoading(true);
124
127
  const { data } = await HydrocarbonService.requestChartData(null, dataConfig?.sourceId, params) || {};
128
+ setLoading(false);
125
129
  const { config, value } = data || {};
126
130
  const temData = handleData(value);
127
131
  setData(temData);
@@ -227,7 +231,13 @@ const Index = forwardRef((props: ComponentProps, ref: ForwardedRef<ComponentRef>
227
231
  }
228
232
  }, [size]);
229
233
 
230
- return <div ref={chartRef} style={{ width: '100%', height: '100%' }} />;
234
+ const renderChartDom = () => <div ref={chartRef} style={{ width: '100%', height: '100%' }} />;
235
+
236
+ if (isDesignMode) {
237
+ return renderChartDom();
238
+ }
239
+
240
+ return <Spin spinning={loading}>{renderChartDom()}</Spin>;
231
241
  });
232
242
 
233
243
  export default Index;
@@ -1,6 +1,7 @@
1
1
  import * as echarts from 'echarts';
2
2
  import React, { useEffect, useRef, useState, ForwardedRef, forwardRef, useImperativeHandle } from 'react';
3
3
  import _ from 'lodash';
4
+ import { Spin } from "antd";
4
5
  import HydrocarbonService from "../../tmpl/hcservice-v3";
5
6
  import { DataConfigProps } from "../data";
6
7
 
@@ -92,7 +93,7 @@ export interface ComponentStyle {
92
93
 
93
94
  export interface ComponentProps {
94
95
  style?: ComponentStyle;
95
- base: { width: number, height: number },
96
+ base: { width: number, height: number };
96
97
  data?: DataConfigProps;
97
98
  isDesignMode?: boolean; // 是否编辑模式
98
99
  initSearchParams?: { [key: string]: any }; // 全局初始化外部参数,例:传参包含设备id,则在查询时带上设备id
@@ -112,6 +113,7 @@ const Index = forwardRef((props: ComponentProps, ref: ForwardedRef<ComponentRef>
112
113
  const [data, setData] = useState<{ name: string, data: any }[]>([]);
113
114
  const [searchParams, setSearchParams] = useState<{ [key: string]: any }>();
114
115
  const [initSearchParams, setInitSearchParams] = useState<{ [key: string]: any }>();
116
+ const [loading, setLoading] = useState<boolean>(false);
115
117
  const chartRef = useRef<HTMLDivElement>(null);
116
118
  const chart = useRef<any>(null);
117
119
  const pollingIntervalRef = useRef<number | NodeJS.Timeout>(null);
@@ -167,7 +169,9 @@ const Index = forwardRef((props: ComponentProps, ref: ForwardedRef<ComponentRef>
167
169
 
168
170
  // 请求数据
169
171
  const getData = async (params?: object) => {
172
+ setLoading(true);
170
173
  const { data } = await HydrocarbonService.requestChartData(null, dataConfig?.sourceId, params) || {};
174
+ setLoading(false);
171
175
  const { config, value } = data || {};
172
176
  const temData = handleData(value);
173
177
  setData(temData);
@@ -264,7 +268,13 @@ const Index = forwardRef((props: ComponentProps, ref: ForwardedRef<ComponentRef>
264
268
  }
265
269
  }, [size]);
266
270
 
267
- return <div ref={chartRef} style={{ width: '100%', height: '100%' }} />;
271
+ const renderChartDom = () => <div ref={chartRef} style={{ width: '100%', height: '100%' }} />;
272
+
273
+ if (isDesignMode) {
274
+ return renderChartDom();
275
+ }
276
+
277
+ return <Spin spinning={loading}>{renderChartDom()}</Spin>;
268
278
  });
269
279
 
270
280
  export default Index;
@@ -1,6 +1,7 @@
1
1
  import * as echarts from 'echarts';
2
2
  import React, { useEffect, useRef, useState, ForwardedRef, forwardRef, useImperativeHandle } from 'react';
3
3
  import _ from 'lodash';
4
+ import { Spin } from "antd";
4
5
  import HydrocarbonService from "../../tmpl/hcservice-v3";
5
6
  import { DataConfigProps } from "../data";
6
7
 
@@ -86,7 +87,7 @@ export interface ComponentStyle {
86
87
 
87
88
  export interface ComponentProps {
88
89
  style?: ComponentStyle;
89
- base: { width: number, height: number },
90
+ base: { width: number, height: number };
90
91
  data?: DataConfigProps;
91
92
  isDesignMode?: boolean; // 是否编辑模式
92
93
  initSearchParams?: { [key: string]: any }; // 全局初始化外部参数,例:传参包含设备id,则在查询时带上设备id
@@ -106,6 +107,7 @@ const Index = forwardRef((props: ComponentProps, ref: ForwardedRef<ComponentRef>
106
107
  const [data, setData] = useState<{ name: string, data: any }[]>([]);
107
108
  const [searchParams, setSearchParams] = useState<{ [key: string]: any }>();
108
109
  const [initSearchParams, setInitSearchParams] = useState<{ [key: string]: any }>();
110
+ const [loading, setLoading] = useState<boolean>(false);
109
111
  const chartRef = useRef<HTMLDivElement>(null);
110
112
  const chart = useRef<any>(null);
111
113
  const pollingIntervalRef = useRef<number | NodeJS.Timeout>(null);
@@ -161,7 +163,9 @@ const Index = forwardRef((props: ComponentProps, ref: ForwardedRef<ComponentRef>
161
163
 
162
164
  // 请求数据
163
165
  const getData = async (params?: object) => {
166
+ setLoading(true);
164
167
  const { data } = await HydrocarbonService.requestChartData(null, dataConfig?.sourceId, params) || {};
168
+ setLoading(false);
165
169
  const { config, value } = data || {};
166
170
  const temData = handleData(value);
167
171
  setData(temData);
@@ -253,7 +257,13 @@ const Index = forwardRef((props: ComponentProps, ref: ForwardedRef<ComponentRef>
253
257
  }
254
258
  }, [size]);
255
259
 
256
- return <div ref={chartRef} style={{ width: '100%', height: '100%' }} />;
260
+ const renderChartDom = () => <div ref={chartRef} style={{ width: '100%', height: '100%' }} />;
261
+
262
+ if (isDesignMode) {
263
+ return renderChartDom();
264
+ }
265
+
266
+ return <Spin spinning={loading}>{renderChartDom()}</Spin>;
257
267
  });
258
268
 
259
269
  export default Index;
@@ -2,6 +2,7 @@ import * as echarts from 'echarts';
2
2
  import 'echarts-liquidfill';
3
3
  import React, { useEffect, useRef, useState, ForwardedRef, forwardRef, useImperativeHandle } from 'react';
4
4
  import _ from 'lodash';
5
+ import { Spin } from "antd";
5
6
  import HydrocarbonService from "../../tmpl/hcservice-v3";
6
7
  import { DataConfigProps } from "../data";
7
8
 
@@ -62,7 +63,7 @@ export interface ComponentStyle {
62
63
 
63
64
  export interface ComponentProps {
64
65
  style?: ComponentStyle;
65
- base: { width: number, height: number },
66
+ base: { width: number, height: number };
66
67
  data?: DataConfigProps;
67
68
  isDesignMode?: boolean; // 是否编辑模式
68
69
  initSearchParams?: { [key: string]: any }; // 全局初始化外部参数,例:传参包含设备id,则在查询时带上设备id
@@ -82,6 +83,7 @@ const Index = forwardRef((props: ComponentProps, ref: ForwardedRef<ComponentRef>
82
83
  const [data, setData] = useState<number>(0);
83
84
  const [searchParams, setSearchParams] = useState<{ [key: string]: any }>();
84
85
  const [initSearchParams, setInitSearchParams] = useState<{ [key: string]: any }>();
86
+ const [loading, setLoading] = useState<boolean>(false);
85
87
  const chartRef = useRef<HTMLDivElement>(null);
86
88
  const chart = useRef<any>(null);
87
89
  const pollingIntervalRef = useRef<number | NodeJS.Timeout>(null);
@@ -137,7 +139,9 @@ const Index = forwardRef((props: ComponentProps, ref: ForwardedRef<ComponentRef>
137
139
 
138
140
  // 请求数据
139
141
  const getData = async (params?: object) => {
142
+ setLoading(true);
140
143
  const { data } = await HydrocarbonService.requestChartData(null, dataConfig?.sourceId, params) || {};
144
+ setLoading(false);
141
145
  const { config, value } = data || {};
142
146
  const temData = handleData(value);
143
147
  setData(temData);
@@ -225,7 +229,13 @@ const Index = forwardRef((props: ComponentProps, ref: ForwardedRef<ComponentRef>
225
229
  }
226
230
  }, [size]);
227
231
 
228
- return <div ref={chartRef} style={{ width: '100%', height: '100%' }} />;
232
+ const renderChartDom = () => <div ref={chartRef} style={{ width: '100%', height: '100%' }} />;
233
+
234
+ if (isDesignMode) {
235
+ return renderChartDom();
236
+ }
237
+
238
+ return <Spin spinning={loading}>{renderChartDom()}</Spin>;
229
239
  });
230
240
 
231
241
  export default Index;
@@ -2,6 +2,7 @@
2
2
  background-size: 100% 100%;
3
3
  width: 100%;
4
4
  height: 100%;
5
+ overflow: hidden;
5
6
 
6
7
  .screen-wrapper {
7
8
  transition-property: all;
@@ -10,4 +11,4 @@
10
11
  position: relative;
11
12
  transform-origin: left top;
12
13
  }
13
- }
14
+ }
@@ -52,10 +52,12 @@ export default function ScreenFit(props: ScreenFitProps) {
52
52
  break;
53
53
  case 'full-x':
54
54
  elRef.current.style.transform = `scale(${widthScale})`;
55
+ canvasRef.current.style.height = `${Number(realHeight) * widthScale}px`;
55
56
  scaleChange?.(widthScale, widthScale);
56
57
  break;
57
58
  case 'full-y':
58
59
  elRef.current.style.transform = `scale(${heightScale})`;
60
+ canvasRef.current.style.width = `${Number(realWidth) * heightScale}px`;
59
61
  scaleChange?.(heightScale, heightScale);
60
62
  if (currentWidth > (+realWidth * heightScale)) {
61
63
  elRef.current.style.margin = `0px ${(currentWidth - +realWidth * heightScale) / 2}px`;
@@ -115,7 +117,7 @@ export default function ScreenFit(props: ScreenFitProps) {
115
117
  }, [])
116
118
 
117
119
  return (
118
- <div ref={canvasRef} className={'react-screen-box'}>
120
+ <div ref={canvasRef} className={'react-screen-box'} >
119
121
  <div className={'screen-wrapper'} ref={elRef}>
120
122
  {props.children}
121
123
  </div>
@@ -4,6 +4,13 @@
4
4
  /* IE和Edge */
5
5
  scrollbar-width: none;
6
6
  /* Firefox */
7
+
8
+ .ant-spin-nested-loading,
9
+ .ant-spin-container {
10
+ width: 100%;
11
+ height: 100%;
12
+ }
13
+
7
14
  }
8
15
 
9
16
  .lowcodeView::-webkit-scrollbar {
@@ -62,10 +62,11 @@ interface Props {
62
62
  ddpageId?: string,
63
63
  layoutRootPath?: string,
64
64
  initSearchParams?: { [key: string]: any }, // 组件数据源初始化查询参数
65
+ style?: CSSProperties,
65
66
  }
66
67
 
67
68
  const LowcodeView = (props: Props) => {
68
- const { isFullScreen, layoutRootPath, ddpageId: propsDdpageId, initSearchParams } = props;
69
+ const { isFullScreen, layoutRootPath, ddpageId: propsDdpageId, initSearchParams, style = {} } = props;
69
70
  const { ddpageId: urlDdpageId } = useParams();
70
71
  const ddpageId = propsDdpageId || urlDdpageId;
71
72
  const [loading, setLoading] = useState<boolean>(false);
@@ -195,6 +196,7 @@ const LowcodeView = (props: Props) => {
195
196
  backgroundImage: backgroundImage ? `url(${backgroundImage})` : undefined,
196
197
  backgroundSize: "100% 100%",
197
198
  backgroundRepeat: 'no-repeat',
199
+ ...style,
198
200
  }}>
199
201
  {loading || !layerManager ?
200
202
  <Loading />
@@ -1,6 +1,7 @@
1
1
  import * as echarts from 'echarts';
2
2
  import React, { useEffect, useRef, useState, ForwardedRef, forwardRef, useImperativeHandle } from 'react';
3
3
  import _ from 'lodash';
4
+ import { Spin } from "antd";
4
5
  import HydrocarbonService from "../../tmpl/hcservice-v3";
5
6
  import { DataConfigProps } from "../data";
6
7
 
@@ -120,7 +121,7 @@ export interface ComponentStyle {
120
121
 
121
122
  export interface ComponentProps {
122
123
  style?: ComponentStyle;
123
- base: { width: number, height: number },
124
+ base: { width: number, height: number };
124
125
  data?: DataConfigProps;
125
126
  isDesignMode?: boolean; // 是否编辑模式
126
127
  initSearchParams?: { [key: string]: any }; // 全局初始化外部参数,例:传参包含设备id,则在查询时带上设备id
@@ -140,6 +141,7 @@ const Index = forwardRef((props: ComponentProps, ref: ForwardedRef<ComponentRef>
140
141
  const [data, setData] = useState<{ name: string, data: any }[]>([]);
141
142
  const [searchParams, setSearchParams] = useState<{ [key: string]: any }>();
142
143
  const [initSearchParams, setInitSearchParams] = useState<{ [key: string]: any }>();
144
+ const [loading, setLoading] = useState<boolean>(false);
143
145
  const chartRef = useRef<HTMLDivElement>(null);
144
146
  const chart = useRef<any>(null);
145
147
  const pollingIntervalRef = useRef<number | NodeJS.Timeout>(null);
@@ -195,7 +197,9 @@ const Index = forwardRef((props: ComponentProps, ref: ForwardedRef<ComponentRef>
195
197
 
196
198
  // 请求数据
197
199
  const getData = async (params?: object) => {
200
+ setLoading(true);
198
201
  const { data } = await HydrocarbonService.requestChartData(null, dataConfig?.sourceId, params) || {};
202
+ setLoading(false);
199
203
  const { config, value } = data || {};
200
204
  const temData = handleData(value);
201
205
  setData(temData);
@@ -310,7 +314,13 @@ const Index = forwardRef((props: ComponentProps, ref: ForwardedRef<ComponentRef>
310
314
  }
311
315
  }, [size]);
312
316
 
313
- return <div ref={chartRef} style={{ width: '100%', height: '100%' }} />;
317
+ const renderChartDom = () => <div ref={chartRef} style={{ width: '100%', height: '100%' }} />;
318
+
319
+ if (isDesignMode) {
320
+ return renderChartDom();
321
+ }
322
+
323
+ return <Spin spinning={loading}>{renderChartDom()}</Spin>;
314
324
  });
315
325
 
316
326
  export default Index;
@@ -1,6 +1,7 @@
1
1
  import * as echarts from 'echarts';
2
2
  import React, { useEffect, useRef, useState, ForwardedRef, forwardRef, useImperativeHandle } from 'react';
3
3
  import _ from 'lodash';
4
+ import { Spin } from "antd";
4
5
  import HydrocarbonService from "../../tmpl/hcservice-v3";
5
6
  import { DataConfigProps } from "../data";
6
7
 
@@ -93,7 +94,7 @@ export interface ComponentStyle {
93
94
 
94
95
  export interface ComponentProps {
95
96
  style?: ComponentStyle;
96
- base: { width: number, height: number },
97
+ base: { width: number, height: number };
97
98
  data?: DataConfigProps;
98
99
  isDesignMode?: boolean; // 是否编辑模式
99
100
  initSearchParams?: { [key: string]: any }; // 全局初始化外部参数,例:传参包含设备id,则在查询时带上设备id
@@ -113,6 +114,7 @@ const Index = forwardRef((props: ComponentProps, ref: ForwardedRef<ComponentRef>
113
114
  const [data, setData] = useState<number>(0);
114
115
  const [searchParams, setSearchParams] = useState<{ [key: string]: any }>();
115
116
  const [initSearchParams, setInitSearchParams] = useState<{ [key: string]: any }>();
117
+ const [loading, setLoading] = useState<boolean>(false);
116
118
  const chartRef = useRef<HTMLDivElement>(null);
117
119
  const chart = useRef<any>(null);
118
120
  const pollingIntervalRef = useRef<number | NodeJS.Timeout>(null);
@@ -168,7 +170,9 @@ const Index = forwardRef((props: ComponentProps, ref: ForwardedRef<ComponentRef>
168
170
 
169
171
  // 请求数据
170
172
  const getData = async (params?: object) => {
173
+ setLoading(true);
171
174
  const { data } = await HydrocarbonService.requestChartData(null, dataConfig?.sourceId, params) || {};
175
+ setLoading(false);
172
176
  const { config, value } = data || {};
173
177
  const temData = handleData(value);
174
178
  setData(temData);
@@ -270,7 +274,13 @@ const Index = forwardRef((props: ComponentProps, ref: ForwardedRef<ComponentRef>
270
274
  }
271
275
  }, [size]);
272
276
 
273
- return <div ref={chartRef} style={{ width: '100%', height: '100%' }} />;
277
+ const renderChartDom = () => <div ref={chartRef} style={{ width: '100%', height: '100%' }} />;
278
+
279
+ if (isDesignMode) {
280
+ return renderChartDom();
281
+ }
282
+
283
+ return <Spin spinning={loading}>{renderChartDom()}</Spin>;
274
284
  });
275
285
 
276
286
  export default Index;
@@ -3,7 +3,7 @@ import {
3
3
  DoEditParam, LtmplConfig,
4
4
  LtmplConfigRes, PageType,
5
5
  RouterCompProps,
6
- ShowViewParam, ActTableViewModel
6
+ ShowViewParam, ActTableViewModel, ThemeConfig
7
7
  } from "../tmpl/interface";
8
8
  import Units from "../units";
9
9
  import ActTable from "../table/act-table";
@@ -41,6 +41,7 @@ export interface LtmplRouteState {
41
41
  editSourceId?: string;
42
42
  toCustomPage?: boolean;
43
43
  userPageConfig?: { [key: string]: any };
44
+ themeConfig?: ThemeConfig;
44
45
  }
45
46
 
46
47
  class LtmplRoute extends React.PureComponent<LtmplRouteProps, LtmplRouteState> {
@@ -68,11 +69,13 @@ class LtmplRoute extends React.PureComponent<LtmplRouteProps, LtmplRouteState> {
68
69
  editSourceId: undefined,
69
70
  toCustomPage: false,
70
71
  userPageConfig: undefined,
72
+ themeConfig: undefined,
71
73
  };
72
74
 
73
75
  async componentDidMount() {
74
76
  this.loadData();
75
77
  this.getUserPageConfig();
78
+ this.getThemeConfig();
76
79
  }
77
80
  Z
78
81
  get computedLayoutPath() {
@@ -82,13 +85,18 @@ class LtmplRoute extends React.PureComponent<LtmplRouteProps, LtmplRouteState> {
82
85
  }
83
86
 
84
87
  // 获取用户页面配置
85
- getUserPageConfig = () => {
88
+ getUserPageConfig = async () => {
86
89
  const { params } = this.props;
87
90
  const { sourceId } = params;
88
- const config = Units.getUserPageConfig(sourceId);
91
+ const config = await Units.getUserPageConfig(sourceId);
89
92
  this.setState({ userPageConfig: config });
90
93
  };
91
94
 
95
+ getThemeConfig = async () => {
96
+ const theme: ThemeConfig = await Units.getThemeConfig();
97
+ this.setState({ themeConfig: theme });
98
+ }
99
+
92
100
  // 设置用户页面配置
93
101
  setUserPageConfig = (config: { [key: string]: any }) => {
94
102
  const { params } = this.props;
@@ -350,7 +358,7 @@ class LtmplRoute extends React.PureComponent<LtmplRouteProps, LtmplRouteState> {
350
358
  render() {
351
359
  const {
352
360
  ltmplConfigRes, showDraw, showWindowType, ractionId, selectedCode,
353
- showViewDrawer, showViewModal, showEdit, editSourceId, viewSourceId, toCustomPage, userPageConfig
361
+ showViewDrawer, showViewModal, showEdit, editSourceId, viewSourceId, toCustomPage, userPageConfig, themeConfig
354
362
  } = this.state;
355
363
  const { location, params, tableType, rowOperatable, defShowType } = this.props;
356
364
  const { sourceId } = params;
@@ -394,7 +402,7 @@ class LtmplRoute extends React.PureComponent<LtmplRouteProps, LtmplRouteState> {
394
402
  doCreate={this.doCreate} sourceId={sourceId}
395
403
  criteriaData={criteriaData} ltmplConfig={ltmplConfig} doRAction={this.doRAction}
396
404
  defShowType={defShowType} userPageConfig={userPageConfig} setUserPageConfig={this.setUserPageConfig}
397
- resetUserPageConfig={this.resetUserPageConfig}
405
+ resetUserPageConfig={this.resetUserPageConfig} allowUserConfig={themeConfig?.allowUserConfig}
398
406
  />
399
407
  {showDraw ? (
400
408
  <Drawer
@@ -1,6 +1,6 @@
1
1
  import React, { useEffect, useState, useMemo } from "react";
2
2
  import { useParams, useLocation, useNavigate } from "react-router-dom";
3
- import { DoEditParam, LtmplConfig, LtmplConfigRes, PageType, RouterCompProps, ShowViewParam, ActTableViewModel } from "../tmpl/interface";
3
+ import { DoEditParam, LtmplConfig, LtmplConfigRes, PageType, RouterCompProps, ShowViewParam, ActTableViewModel, ThemeConfig } from "../tmpl/interface";
4
4
  import Units from "../units";
5
5
  import ActTable from "../table/act-table";
6
6
  import HCDataSource from "../tmpl/hc-data-source";
@@ -38,6 +38,7 @@ const Index = (props: Props) => {
38
38
  const [viewSourceId, setViewSourceId] = useState<string>();
39
39
  const [editSourceId, setEditSourceId] = useState<string>();
40
40
  const [userPageConfig, setUserPageConfig] = useState<{ [key: string]: any }>();
41
+ const [themeConfig, setThemeConfig] = useState<ThemeConfig>(); // 主题配置信息
41
42
  const { sourceId } = useParams();
42
43
  const { search } = useLocation();
43
44
  const { translate } = useLocale();
@@ -60,11 +61,17 @@ const Index = (props: Props) => {
60
61
  };
61
62
 
62
63
  // 获取用户页面配置
63
- const getUserPageConfig = () => {
64
- const config = Units.getUserPageConfig(sourceId);
64
+ const getUserPageConfig = async () => {
65
+ const config = await Units.getUserPageConfig(sourceId);
65
66
  setUserPageConfig(config);
66
67
  };
67
68
 
69
+ // 获取全局主题配置
70
+ const getThemeConfig = async () => {
71
+ const theme: ThemeConfig = await Units.getThemeConfig();
72
+ setThemeConfig(theme);
73
+ }
74
+
68
75
  // 设置用户页面配置
69
76
  const handleSetUserPageConfig = (config: { [key: string]: any }) => {
70
77
  const temConfig = Units.setUserPageConfig(sourceId, config);
@@ -81,6 +88,7 @@ const Index = (props: Props) => {
81
88
  if (sourceId) {
82
89
  getLtmplConfig();
83
90
  getUserPageConfig();
91
+ getThemeConfig();
84
92
  }
85
93
  }, [sourceId]);
86
94
 
@@ -204,6 +212,7 @@ const Index = (props: Props) => {
204
212
  userPageConfig={userPageConfig}
205
213
  setUserPageConfig={handleSetUserPageConfig}
206
214
  resetUserPageConfig={resetUserPageConfig}
215
+ allowUserConfig={themeConfig?.allowUserConfig}
207
216
  />;
208
217
  };
209
218
 
@@ -1,12 +1,12 @@
1
1
  import React, { ReactNode } from "react";
2
2
  import {
3
3
  Button, Card, Checkbox, Col, Divider, Popover, Row, Space, Drawer, Tooltip,
4
- message, Layout, Table, Form as AntdForm, FormInstance, Modal, Input, Alert, Tabs, Radio
4
+ message, Layout, Table, Form as AntdForm, FormInstance, Modal, Input, Alert, Tabs, Radio, Typography
5
5
  } from "antd";
6
6
  import {
7
7
  ExportOutlined, FundOutlined, LineChartOutlined,
8
8
  PlusCircleOutlined, PlusOutlined, ReloadOutlined, RetweetOutlined, SearchOutlined,
9
- TableOutlined, ImportOutlined, SyncOutlined
9
+ TableOutlined, ImportOutlined
10
10
  } from "@ant-design/icons";
11
11
  import "./index.css";
12
12
  import {
@@ -35,8 +35,11 @@ import ReportTable from "./report-table";
35
35
  import EntryControl from "../controls/entry-control";
36
36
  import DraggableModal from "../module/draggable-modal";
37
37
  import Icon from "../icon/aliIcon";
38
+ import PageConfigButton from "./page-config-button";
38
39
 
39
40
  const { Content, Sider } = Layout;
41
+ const { Text } = Typography;
42
+
40
43
  type Level = "l1" | "l2";
41
44
 
42
45
  const enumTypes = ["select", "multiselect", "texttags", "checkbox", "radio", "steps"];
@@ -75,6 +78,7 @@ interface ActTableProps extends TmplBaseProps {
75
78
  userPageConfig?: { [key: string]: any }; // 用户页面配置本地缓存
76
79
  setUserPageConfig?: (config: { [key: string]: any }) => void; // 更新用户页面配置本地缓存
77
80
  resetUserPageConfig?: () => void; // 重置用户页面配置本地缓存
81
+ allowUserConfig?: boolean; // 是否可用户自定义配置
78
82
  }
79
83
 
80
84
  interface ActTableStat {
@@ -484,7 +488,7 @@ class ActTable extends React.PureComponent<ActTableProps, ActTableStat> {
484
488
  }
485
489
 
486
490
  async componentDidUpdate(prevProps, prevState) {
487
- const { sourceId, criteriaData, ltmplConfig, tableType, pageSize, pageNo, userPageConfig } = this.props;
491
+ const { sourceId, criteriaData, ltmplConfig, tableType, pageSize, pageNo, userPageConfig, defShowType } = this.props;
488
492
  // const {userCriteriaData:preUserCriteriaData}=prevState;
489
493
  const { userCriteriaData } = this.state;
490
494
  const { translate } = this.context;
@@ -492,6 +496,7 @@ class ActTable extends React.PureComponent<ActTableProps, ActTableStat> {
492
496
  ltmplConfig: preLtmplConfig,
493
497
  criteriaData: preCriteriaData,
494
498
  sourceId: preSourceId, pageSize: prePageSize, pageNo: prePageNo,
499
+ userPageConfig: preUserPageConfig
495
500
  } = prevProps;
496
501
  if (!this.isSameSourceQuery(sourceId, criteriaData)) {
497
502
  return false;
@@ -503,6 +508,9 @@ class ActTable extends React.PureComponent<ActTableProps, ActTableStat> {
503
508
  userCriteriaData: criteriaData,
504
509
  })
505
510
  }
511
+ if (!preUserPageConfig && userPageConfig) {
512
+ this.setState({ viewModels: userPageConfig?.["viewModels"] || [defShowType || ltmplConfig?.showType || "table"] });
513
+ }
506
514
  let { hiddenColIds, sortedColConfigs } = this.state;
507
515
  let currentQueryParams = ProgramConfig.transQueryParamsToStr(criteriaData, false, [
508
516
  "pageSize",
@@ -913,14 +921,38 @@ class ActTable extends React.PureComponent<ActTableProps, ActTableStat> {
913
921
  resetUserPageConfig();
914
922
  }
915
923
 
924
+ // 更新当前页面配置
925
+ handleUpdateUserPageConfig = (val: { [key: string]: any }) => {
926
+ const { sortedColIds, hiddenColIds, viewModels, criteriaData } = val;
927
+ const { setUserPageConfig, ltmplConfig, tableType, defShowType, menuId } = this.props;
928
+ const { userCriteriaData } = this.state;
929
+ const { translate } = this.context;
930
+ let sortedColConfigs = undefined;
931
+ if (ltmplConfig) {
932
+ sortedColConfigs = tableType === 'report' ? ltmplConfig.columns : [
933
+ { id: "10000", title: translate("${排序}"), originalId: "10000" },
934
+ { id: "20000", title: translate("${隐藏}"), originalId: "20000" },
935
+ ...ltmplConfig.columns,
936
+ ];
937
+ }
938
+ if (sortedColIds) { // 页面配置更新列排序
939
+ sortedColConfigs.sort((a, b) => sortedColIds.indexOf(a.id) - sortedColIds.indexOf(b.id));
940
+ }
941
+ // 旧过滤参数设置为空
942
+ const oldParms = Object.keys(userCriteriaData || {}).reduce((total, item) => { total[item] = ""; return total; }, {});
943
+ this.actTableDoSearch({ ...oldParms, ...(criteriaData || { menuId }) });
944
+ this.setState({ userCriteriaData: criteriaData, viewModels: viewModels || [defShowType || ltmplConfig.showType || "table"], hiddenColIds: hiddenColIds || defaultDisabledColIds, sortedColConfigs });
945
+ setUserPageConfig({ ...val, criteriaData: undefined });
946
+ }
947
+
916
948
  renderHeaderButtons = () => {
917
949
  let {
918
950
  hiddenColIds, viewModels, sortedColConfigs, disabledColIds, showL2Chart,
919
- showL2ActTable, restatParams,
951
+ showL2ActTable, restatParams, userCriteriaData
920
952
  } = this.state;
921
953
  const {
922
954
  ltmplConfig, sourceId, doCreate, doSearch, menuId,
923
- funcMode, customCreatable, serverKey, readOnly, userPageConfig
955
+ funcMode, customCreatable, serverKey, readOnly, userPageConfig, allowUserConfig
924
956
  } = this.props;
925
957
  const { translate } = this.context;
926
958
  let { buttons } = ltmplConfig;
@@ -929,13 +961,7 @@ class ActTable extends React.PureComponent<ActTableProps, ActTableStat> {
929
961
  return (
930
962
  <>
931
963
  <Space>
932
- {userPageConfig ? // 本地缓存重置按钮
933
- <Tooltip title={translate("${重置}")}>
934
- <Button onClick={() => this.handleResetUserPageConfig()}>
935
- <SyncOutlined />
936
- </Button>
937
- </Tooltip>
938
- : ""}
964
+ {userPageConfig && allowUserConfig ? <PageConfigButton menuCode={menuId} handleResetUserPageConfig={this.handleResetUserPageConfig} handleUpdateUserPageConfig={this.handleUpdateUserPageConfig} userCriteriaData={userCriteriaData} /> : ""}
939
965
  {funcMode == "common" && this.criteriaFormUseful() ? (
940
966
  <Popover trigger="click" content={this.renderCriteriaForm()}>
941
967
  <Button>
@@ -1401,7 +1427,12 @@ class ActTable extends React.PureComponent<ActTableProps, ActTableStat> {
1401
1427
  <div style={{ width: "calc(100% - 40px)" }}>
1402
1428
  <p className="title">{item.fieldTitle}</p>
1403
1429
  <div className="value">
1404
- <span className="number">{item.value}</span>
1430
+ <Text
1431
+ style={{ maxWidth: "100%" }}
1432
+ ellipsis={{ tooltip: item.value }}
1433
+ >
1434
+ <span className="number">{item.value}</span>
1435
+ </Text>
1405
1436
  {dataUnit ? <span className="unit">{dataUnit}</span> : ""}
1406
1437
  </div>
1407
1438
  </div>