aldehyde 0.2.421 → 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 (182) 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/user-button.d.ts +3 -0
  15. package/lib/layout2/components/user-button.d.ts.map +1 -1
  16. package/lib/layout2/components/user-button.js +17 -8
  17. package/lib/layout2/components/user-button.js.map +1 -1
  18. package/lib/layout2/header.d.ts +2 -0
  19. package/lib/layout2/header.d.ts.map +1 -1
  20. package/lib/layout2/header.js +3 -3
  21. package/lib/layout2/header.js.map +1 -1
  22. package/lib/layout2/page.d.ts.map +1 -1
  23. package/lib/layout2/page.js +7 -5
  24. package/lib/layout2/page.js.map +1 -1
  25. package/lib/layout2/sider.d.ts +2 -0
  26. package/lib/layout2/sider.d.ts.map +1 -1
  27. package/lib/layout2/sider.js +2 -2
  28. package/lib/layout2/sider.js.map +1 -1
  29. package/lib/layout3/header.d.ts +2 -0
  30. package/lib/layout3/header.d.ts.map +1 -1
  31. package/lib/layout3/header.js +4 -4
  32. package/lib/layout3/header.js.map +1 -1
  33. package/lib/layout3/page.d.ts.map +1 -1
  34. package/lib/layout3/page.js +6 -4
  35. package/lib/layout3/page.js.map +1 -1
  36. package/lib/layout3/sider.d.ts +2 -0
  37. package/lib/layout3/sider.d.ts.map +1 -1
  38. package/lib/layout3/sider.js +2 -2
  39. package/lib/layout3/sider.js.map +1 -1
  40. package/lib/layout4/header.d.ts +2 -0
  41. package/lib/layout4/header.d.ts.map +1 -1
  42. package/lib/layout4/header.js +4 -4
  43. package/lib/layout4/header.js.map +1 -1
  44. package/lib/layout4/page.d.ts.map +1 -1
  45. package/lib/layout4/page.js +7 -5
  46. package/lib/layout4/page.js.map +1 -1
  47. package/lib/layout4/sider.d.ts +2 -0
  48. package/lib/layout4/sider.d.ts.map +1 -1
  49. package/lib/layout4/sider.js +2 -2
  50. package/lib/layout4/sider.js.map +1 -1
  51. package/lib/layout5/header.d.ts +2 -0
  52. package/lib/layout5/header.d.ts.map +1 -1
  53. package/lib/layout5/header.js +2 -2
  54. package/lib/layout5/header.js.map +1 -1
  55. package/lib/layout5/page.d.ts.map +1 -1
  56. package/lib/layout5/page.js +7 -5
  57. package/lib/layout5/page.js.map +1 -1
  58. package/lib/layout5/sider.d.ts +2 -0
  59. package/lib/layout5/sider.d.ts.map +1 -1
  60. package/lib/layout5/sider.js +2 -2
  61. package/lib/layout5/sider.js.map +1 -1
  62. package/lib/list/card-list/card-list-item.js +1 -1
  63. package/lib/list/card-list/card-list-item.js.map +1 -1
  64. package/lib/lowcode-components/bar-chart/index.d.ts.map +1 -1
  65. package/lib/lowcode-components/bar-chart/index.js +9 -1
  66. package/lib/lowcode-components/bar-chart/index.js.map +1 -1
  67. package/lib/lowcode-components/base-map/index.d.ts.map +1 -1
  68. package/lib/lowcode-components/base-map/index.js +9 -1
  69. package/lib/lowcode-components/base-map/index.js.map +1 -1
  70. package/lib/lowcode-components/capsule-bar-chart/index.d.ts.map +1 -1
  71. package/lib/lowcode-components/capsule-bar-chart/index.js +9 -1
  72. package/lib/lowcode-components/capsule-bar-chart/index.js.map +1 -1
  73. package/lib/lowcode-components/circular-progress-chart/index.d.ts.map +1 -1
  74. package/lib/lowcode-components/circular-progress-chart/index.js +9 -1
  75. package/lib/lowcode-components/circular-progress-chart/index.js.map +1 -1
  76. package/lib/lowcode-components/column-3d-chart/index.d.ts.map +1 -1
  77. package/lib/lowcode-components/column-3d-chart/index.js +9 -1
  78. package/lib/lowcode-components/column-3d-chart/index.js.map +1 -1
  79. package/lib/lowcode-components/column-chart/index.d.ts.map +1 -1
  80. package/lib/lowcode-components/column-chart/index.js +9 -1
  81. package/lib/lowcode-components/column-chart/index.js.map +1 -1
  82. package/lib/lowcode-components/effectScatter-map/index.d.ts.map +1 -1
  83. package/lib/lowcode-components/effectScatter-map/index.js +9 -1
  84. package/lib/lowcode-components/effectScatter-map/index.js.map +1 -1
  85. package/lib/lowcode-components/effectScatter-map-3d/index.d.ts.map +1 -1
  86. package/lib/lowcode-components/effectScatter-map-3d/index.js +9 -1
  87. package/lib/lowcode-components/effectScatter-map-3d/index.js.map +1 -1
  88. package/lib/lowcode-components/gauge-chart/index.d.ts.map +1 -1
  89. package/lib/lowcode-components/gauge-chart/index.js +9 -1
  90. package/lib/lowcode-components/gauge-chart/index.js.map +1 -1
  91. package/lib/lowcode-components/line-bar-chart/index.d.ts.map +1 -1
  92. package/lib/lowcode-components/line-bar-chart/index.js +9 -1
  93. package/lib/lowcode-components/line-bar-chart/index.js.map +1 -1
  94. package/lib/lowcode-components/line-chart/index.d.ts.map +1 -1
  95. package/lib/lowcode-components/line-chart/index.js +9 -1
  96. package/lib/lowcode-components/line-chart/index.js.map +1 -1
  97. package/lib/lowcode-components/liquid-chart/index.d.ts.map +1 -1
  98. package/lib/lowcode-components/liquid-chart/index.js +9 -1
  99. package/lib/lowcode-components/liquid-chart/index.js.map +1 -1
  100. package/lib/lowcode-components/lowcode-view/index.less +7 -0
  101. package/lib/lowcode-components/pie-chart/index.d.ts.map +1 -1
  102. package/lib/lowcode-components/pie-chart/index.js +9 -1
  103. package/lib/lowcode-components/pie-chart/index.js.map +1 -1
  104. package/lib/lowcode-components/progress-chart/index.d.ts.map +1 -1
  105. package/lib/lowcode-components/progress-chart/index.js +9 -1
  106. package/lib/lowcode-components/progress-chart/index.js.map +1 -1
  107. package/lib/table/act-table.d.ts.map +1 -1
  108. package/lib/table/act-table.js +4 -2
  109. package/lib/table/act-table.js.map +1 -1
  110. package/lib/table/column/column-builder.d.ts.map +1 -1
  111. package/lib/table/column/column-builder.js +6 -8
  112. package/lib/table/column/column-builder.js.map +1 -1
  113. package/lib/table/index.css +0 -2
  114. package/lib/table/pagination.d.ts +1 -0
  115. package/lib/table/pagination.d.ts.map +1 -1
  116. package/lib/table/pagination.js +2 -2
  117. package/lib/table/pagination.js.map +1 -1
  118. package/lib/table/query-table.d.ts.map +1 -1
  119. package/lib/table/query-table.js +1 -1
  120. package/lib/table/query-table.js.map +1 -1
  121. package/lib/table/relation-table.d.ts +1 -0
  122. package/lib/table/relation-table.d.ts.map +1 -1
  123. package/lib/tmpl/hcservice-v3.d.ts +4 -1
  124. package/lib/tmpl/hcservice-v3.d.ts.map +1 -1
  125. package/lib/tmpl/hcservice-v3.js +51 -0
  126. package/lib/tmpl/hcservice-v3.js.map +1 -1
  127. package/lib/tmpl/interface.d.ts +2 -0
  128. package/lib/tmpl/interface.d.ts.map +1 -1
  129. package/lib/tmpl/interface.js.map +1 -1
  130. package/lib/welcome/HCWelcome.js +10 -0
  131. package/lib/welcome/HCWelcome.js.map +1 -1
  132. package/lib/welcome/components/menu-card.less +1 -0
  133. package/lib/welcome/components/user-menus.d.ts +16 -0
  134. package/lib/welcome/components/user-menus.d.ts.map +1 -0
  135. package/lib/welcome/components/user-menus.js +210 -0
  136. package/lib/welcome/components/user-menus.js.map +1 -0
  137. package/lib/welcome/components/user-menus.less +193 -0
  138. package/package.json +1 -1
  139. package/src/aldehyde/controls/date-picker/index.tsx +12 -4
  140. package/src/aldehyde/controls/file-view/index.tsx +5 -1
  141. package/src/aldehyde/detail/button/view-button.tsx +7 -6
  142. package/src/aldehyde/hooks/use-tabs/index.tsx +3 -0
  143. package/src/aldehyde/layout2/components/user-button.tsx +19 -8
  144. package/src/aldehyde/layout2/header.tsx +5 -3
  145. package/src/aldehyde/layout2/page.tsx +8 -7
  146. package/src/aldehyde/layout2/sider.tsx +4 -3
  147. package/src/aldehyde/layout3/header.tsx +6 -4
  148. package/src/aldehyde/layout3/page.tsx +7 -4
  149. package/src/aldehyde/layout3/sider.tsx +4 -3
  150. package/src/aldehyde/layout4/header.tsx +6 -4
  151. package/src/aldehyde/layout4/page.tsx +8 -5
  152. package/src/aldehyde/layout4/sider.tsx +4 -3
  153. package/src/aldehyde/layout5/header.tsx +4 -2
  154. package/src/aldehyde/layout5/page.tsx +8 -5
  155. package/src/aldehyde/layout5/sider.tsx +4 -3
  156. package/src/aldehyde/list/card-list/card-list-item.tsx +1 -1
  157. package/src/aldehyde/lowcode-components/bar-chart/index.tsx +12 -2
  158. package/src/aldehyde/lowcode-components/base-map/index.tsx +12 -2
  159. package/src/aldehyde/lowcode-components/capsule-bar-chart/index.tsx +12 -2
  160. package/src/aldehyde/lowcode-components/circular-progress-chart/index.tsx +12 -2
  161. package/src/aldehyde/lowcode-components/column-3d-chart/index.tsx +12 -2
  162. package/src/aldehyde/lowcode-components/column-chart/index.tsx +12 -2
  163. package/src/aldehyde/lowcode-components/effectScatter-map/index.tsx +12 -2
  164. package/src/aldehyde/lowcode-components/effectScatter-map-3d/index.tsx +12 -2
  165. package/src/aldehyde/lowcode-components/gauge-chart/index.tsx +12 -2
  166. package/src/aldehyde/lowcode-components/line-bar-chart/index.tsx +12 -2
  167. package/src/aldehyde/lowcode-components/line-chart/index.tsx +12 -2
  168. package/src/aldehyde/lowcode-components/liquid-chart/index.tsx +12 -2
  169. package/src/aldehyde/lowcode-components/lowcode-view/index.less +7 -0
  170. package/src/aldehyde/lowcode-components/pie-chart/index.tsx +12 -2
  171. package/src/aldehyde/lowcode-components/progress-chart/index.tsx +12 -2
  172. package/src/aldehyde/table/act-table.tsx +10 -3
  173. package/src/aldehyde/table/column/column-builder.tsx +13 -20
  174. package/src/aldehyde/table/index.css +0 -2
  175. package/src/aldehyde/table/pagination.tsx +8 -7
  176. package/src/aldehyde/table/query-table.tsx +1 -0
  177. package/src/aldehyde/tmpl/hcservice-v3.tsx +45 -1
  178. package/src/aldehyde/tmpl/interface.tsx +2 -0
  179. package/src/aldehyde/welcome/HCWelcome.js +10 -0
  180. package/src/aldehyde/welcome/components/menu-card.less +1 -0
  181. package/src/aldehyde/welcome/components/user-menus.less +193 -0
  182. 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 HydrocarbonService from "../../tmpl/hcservice-v3";
5
6
  import { DataConfigProps } from "../data";
6
7
 
@@ -84,7 +85,7 @@ export interface ComponentStyle {
84
85
 
85
86
  export interface ComponentProps {
86
87
  style?: ComponentStyle;
87
- base: { width: number, height: number },
88
+ base: { width: number, height: number };
88
89
  data?: DataConfigProps;
89
90
  isDesignMode?: boolean; // 是否编辑模式
90
91
  initSearchParams?: { [key: string]: any }; // 全局初始化外部参数,例:传参包含设备id,则在查询时带上设备id
@@ -104,6 +105,7 @@ const Index = forwardRef((props: ComponentProps, ref: ForwardedRef<ComponentRef>
104
105
  const [data, setData] = useState<number>(0);
105
106
  const [searchParams, setSearchParams] = useState<{ [key: string]: any }>();
106
107
  const [initSearchParams, setInitSearchParams] = useState<{ [key: string]: any }>();
108
+ const [loading, setLoading] = useState<boolean>(false);
107
109
  const chartRef = useRef<HTMLDivElement>(null);
108
110
  const chart = useRef<any>(null);
109
111
  const pollingIntervalRef = useRef<number | NodeJS.Timeout>(null);
@@ -160,7 +162,9 @@ const Index = forwardRef((props: ComponentProps, ref: ForwardedRef<ComponentRef>
160
162
 
161
163
  // 请求数据
162
164
  const getData = async (params?: object) => {
165
+ setLoading(true);
163
166
  const { data } = await HydrocarbonService.requestChartData(null, dataConfig?.sourceId, params) || {};
167
+ setLoading(false);
164
168
  const { config, value } = data || {};
165
169
  const temData = value?.[0]?.value?.[0]?.v1 || 0;
166
170
  setData(temData * 100);
@@ -238,7 +242,13 @@ const Index = forwardRef((props: ComponentProps, ref: ForwardedRef<ComponentRef>
238
242
  }
239
243
  }, [size]);
240
244
 
241
- return <div ref={chartRef} style={{ width: '100%', height: '100%' }} />;
245
+ const renderChartDom = () => <div ref={chartRef} style={{ width: '100%', height: '100%' }} />;
246
+
247
+ if (isDesignMode) {
248
+ return renderChartDom();
249
+ }
250
+
251
+ return <Spin spinning={loading}>{renderChartDom()}</Spin>;
242
252
  });
243
253
 
244
254
  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
 
@@ -133,7 +134,7 @@ export interface ComponentStyle {
133
134
 
134
135
  export interface ComponentProps {
135
136
  style?: ComponentStyle;
136
- base: { width: number, height: number, type: string },
137
+ base: { width: number, height: number, type: string };
137
138
  data?: DataConfigProps;
138
139
  isDesignMode?: boolean; // 是否编辑模式
139
140
  initSearchParams?: { [key: string]: any }; // 全局初始化外部参数,例:传参包含设备id,则在查询时带上设备id
@@ -153,6 +154,7 @@ const Index = forwardRef((props: ComponentProps, ref: ForwardedRef<ComponentRef>
153
154
  const [data, setData] = useState([]);
154
155
  const [searchParams, setSearchParams] = useState<{ [key: string]: any }>();
155
156
  const [initSearchParams, setInitSearchParams] = useState<{ [key: string]: any }>();
157
+ const [loading, setLoading] = useState<boolean>(false);
156
158
  const chartRef = useRef<HTMLDivElement>(null);
157
159
  const chart = useRef<any>(null);
158
160
  const pollingIntervalRef = useRef<number | NodeJS.Timeout>(null);
@@ -212,7 +214,9 @@ const Index = forwardRef((props: ComponentProps, ref: ForwardedRef<ComponentRef>
212
214
 
213
215
  // 请求数据
214
216
  const getData = async (params?: object) => {
217
+ setLoading(true);
215
218
  const { data } = await HydrocarbonService.requestChartData(null, dataConfig?.sourceId, params) || {};
219
+ setLoading(false);
216
220
  const { config, value } = data || {};
217
221
  const temData = handleData(value);
218
222
  setData(temData);
@@ -407,7 +411,13 @@ const Index = forwardRef((props: ComponentProps, ref: ForwardedRef<ComponentRef>
407
411
  }
408
412
  }, [size]);
409
413
 
410
- return <div ref={chartRef} style={{ width: '100%', height: '100%' }} />;
414
+ const renderChartDom = () => <div ref={chartRef} style={{ width: '100%', height: '100%' }} />;
415
+
416
+ if (isDesignMode) {
417
+ return renderChartDom();
418
+ }
419
+
420
+ return <Spin spinning={loading}>{renderChartDom()}</Spin>;
411
421
  });
412
422
 
413
423
  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
 
@@ -101,7 +102,7 @@ export interface ComponentStyle {
101
102
 
102
103
  export interface ComponentProps {
103
104
  style?: ComponentStyle;
104
- base: { width: number, height: number, type: string },
105
+ base: { width: number, height: number, type: string };
105
106
  data?: DataConfigProps;
106
107
  isDesignMode?: boolean; // 是否编辑模式
107
108
  initSearchParams?: { [key: string]: any }; // 全局初始化外部参数,例:传参包含设备id,则在查询时带上设备id
@@ -121,6 +122,7 @@ const Index = forwardRef((props: ComponentProps, ref: ForwardedRef<ComponentRef>
121
122
  const [data, setData] = useState<{ name: string, data: any }[]>([]);
122
123
  const [searchParams, setSearchParams] = useState<{ [key: string]: any }>();
123
124
  const [initSearchParams, setInitSearchParams] = useState<{ [key: string]: any }>();
125
+ const [loading, setLoading] = useState<boolean>(false);
124
126
  const chartRef = useRef<HTMLDivElement>(null);
125
127
  const chart = useRef<any>(null);
126
128
  const pollingIntervalRef = useRef<number | NodeJS.Timeout>(null);
@@ -177,7 +179,9 @@ const Index = forwardRef((props: ComponentProps, ref: ForwardedRef<ComponentRef>
177
179
 
178
180
  // 请求数据
179
181
  const getData = async (params?: object) => {
182
+ setLoading(true);
180
183
  const { data } = await HydrocarbonService.requestChartData(null, dataConfig?.sourceId, params) || {};
184
+ setLoading(false);
181
185
  const { config, value } = data || {};
182
186
  const temData = handleData(value);
183
187
  setData(temData);
@@ -261,7 +265,13 @@ const Index = forwardRef((props: ComponentProps, ref: ForwardedRef<ComponentRef>
261
265
  }
262
266
  }, [size]);
263
267
 
264
- return <div ref={chartRef} style={{ width: '100%', height: '100%' }} />;
268
+ const renderChartDom = () => <div ref={chartRef} style={{ width: '100%', height: '100%' }} />;
269
+
270
+ if (isDesignMode) {
271
+ return renderChartDom();
272
+ }
273
+
274
+ return <Spin spinning={loading}>{renderChartDom()}</Spin>;
265
275
  });
266
276
 
267
277
  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 ProgramConfig from "../../units";
5
6
  import chinaJson from "../assets/china.json";
6
7
  import HydrocarbonService from "../../tmpl/hcservice-v3";
@@ -113,7 +114,7 @@ export interface ComponentStyle {
113
114
 
114
115
  export interface ComponentProps {
115
116
  style?: ComponentStyle;
116
- base: { width: number, height: number },
117
+ base: { width: number, height: number };
117
118
  data?: DataConfigProps;
118
119
  isDesignMode?: boolean; // 是否编辑模式
119
120
  initSearchParams?: { [key: string]: any }; // 全局初始化外部参数,例:传参包含设备id,则在查询时带上设备id
@@ -132,6 +133,7 @@ const Index = forwardRef((props: ComponentProps, ref: ForwardedRef<ComponentRef>
132
133
  const [data, setData] = useState<{ name: string, value: number[] }[]>([]);
133
134
  const [searchParams, setSearchParams] = useState<{ [key: string]: any }>();
134
135
  const [initSearchParams, setInitSearchParams] = useState<{ [key: string]: any }>();
136
+ const [loading, setLoading] = useState<boolean>(false);
135
137
  const chartRef = useRef<HTMLDivElement>(null);
136
138
  const chart = useRef<any>(null);
137
139
  const pollingIntervalRef = useRef<number | NodeJS.Timeout>(null);
@@ -183,7 +185,9 @@ const Index = forwardRef((props: ComponentProps, ref: ForwardedRef<ComponentRef>
183
185
 
184
186
  // 请求数据
185
187
  const getData = async (params?: object) => {
188
+ setLoading(true);
186
189
  const { data } = await HydrocarbonService.requestChartData(null, dataConfig?.sourceId, params) || {};
190
+ setLoading(false);
187
191
  const { config, value } = data || {};
188
192
  setData(handleData(value));
189
193
  return config;
@@ -290,7 +294,13 @@ const Index = forwardRef((props: ComponentProps, ref: ForwardedRef<ComponentRef>
290
294
  }
291
295
  }, [size]);
292
296
 
293
- return <div ref={chartRef} style={{ width: '100%', height: '100%' }} />;
297
+ const renderChartDom = () => <div ref={chartRef} style={{ width: '100%', height: '100%' }} />;
298
+
299
+ if (isDesignMode) {
300
+ return renderChartDom();
301
+ }
302
+
303
+ return <Spin spinning={loading}>{renderChartDom()}</Spin>;
294
304
  });
295
305
 
296
306
  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 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;
@@ -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 {
@@ -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;
@@ -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 {
@@ -38,6 +38,8 @@ import Icon from "../icon/aliIcon";
38
38
  import PageConfigButton from "./page-config-button";
39
39
 
40
40
  const { Content, Sider } = Layout;
41
+ const { Text } = Typography;
42
+
41
43
  type Level = "l1" | "l2";
42
44
 
43
45
  const enumTypes = ["select", "multiselect", "texttags", "checkbox", "radio", "steps"];
@@ -1425,7 +1427,12 @@ class ActTable extends React.PureComponent<ActTableProps, ActTableStat> {
1425
1427
  <div style={{ width: "calc(100% - 40px)" }}>
1426
1428
  <p className="title">{item.fieldTitle}</p>
1427
1429
  <div className="value">
1428
- <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>
1429
1436
  {dataUnit ? <span className="unit">{dataUnit}</span> : ""}
1430
1437
  </div>
1431
1438
  </div>
@@ -427,31 +427,24 @@ export default {
427
427
 
428
428
  let actionButtons: any[] = [];
429
429
 
430
- if (buttons.includes("detail") &&
431
- showView &&
432
- ActionUtils.isShow(
433
- ltmplConfig.buttonViewAction?.preposes,
434
- [record],
435
- undefined
436
- )) {
437
- actionButtons.push(<ViewButton
438
- showView={showView}
439
- data={record}
440
- ltmplConfig={ltmplConfig}></ViewButton>);
441
- }
442
- if (buttons.includes("customDetail") &&
443
- showView &&
444
- ActionUtils.isShow(
445
- ltmplConfig.buttonViewAction?.preposes,
446
- [record],
447
- undefined
448
- )) {
430
+ const isShowDetail = buttons.includes("detail") && showView && ActionUtils.isShow(ltmplConfig.buttonViewAction?.preposes, [record], undefined);
431
+ const isShowCustomDetail = buttons.includes("customDetail") && showView && ActionUtils.isShow(ltmplConfig.buttonViewAction?.preposes, [record], undefined);
432
+
433
+ if (isShowCustomDetail) { // 自定义详情
449
434
  actionButtons.push(<Button
450
435
  size="small"
451
436
  type="primary"
452
437
  icon={<AlignLeftOutlined />}
453
438
  onClick={() => showView({ code: record.code, toCustomPage: true, })}
454
- ></Button>)
439
+ />)
440
+ }
441
+
442
+ if (isShowDetail) { // 默认详情
443
+ actionButtons.push(<ViewButton
444
+ showView={showView}
445
+ data={record}
446
+ ltmplConfig={ltmplConfig}
447
+ buttonType={isShowCustomDetail ? "default" : "primary"} />);
455
448
  }
456
449
 
457
450
  if (buttons.includes("dtmplEdit") && doEdit && !readOnly) {
@@ -127,8 +127,6 @@
127
127
  font-size: 28px;
128
128
  line-height: 32px;
129
129
  font-weight: 700;
130
- overflow: hidden;
131
- text-overflow: ellipsis;
132
130
  }
133
131
 
134
132
  .aggregate-card .value .unit {