aldehyde 0.2.502 → 0.2.504
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/controls/action/index.d.ts +3 -1
- package/lib/controls/action/index.d.ts.map +1 -1
- package/lib/controls/action/index.js +17 -1
- package/lib/controls/action/index.js.map +1 -1
- package/lib/controls/icon-selector/icon/phonenode-menu-icon/iconfont.css +39 -3
- package/lib/controls/icon-selector/icon/phonenode-menu-icon/iconfont.js +7 -7
- package/lib/controls/icon-selector/icon/phonenode-menu-icon/iconfont.js.map +1 -1
- package/lib/controls/icon-selector/icon/phonenode-menu-icon/iconfont.json +63 -0
- package/lib/controls/icon-selector/icon/phonenode-menu-icon/iconfont.ttf +0 -0
- package/lib/controls/icon-selector/icon/phonenode-menu-icon/iconfont.woff +0 -0
- package/lib/controls/icon-selector/icon/phonenode-menu-icon/iconfont.woff2 +0 -0
- package/lib/lowcode-components/column-3d-chart/index.d.ts +1 -0
- package/lib/lowcode-components/column-3d-chart/index.d.ts.map +1 -1
- package/lib/lowcode-components/column-3d-chart/index.js +3 -1
- package/lib/lowcode-components/column-3d-chart/index.js.map +1 -1
- package/lib/lowcode-components/column-chart/index.d.ts +1 -0
- package/lib/lowcode-components/column-chart/index.d.ts.map +1 -1
- package/lib/lowcode-components/column-chart/index.js +3 -1
- package/lib/lowcode-components/column-chart/index.js.map +1 -1
- package/lib/lowcode-components/line-bar-chart/index.d.ts +1 -0
- package/lib/lowcode-components/line-bar-chart/index.d.ts.map +1 -1
- package/lib/lowcode-components/line-bar-chart/index.js +3 -1
- package/lib/lowcode-components/line-bar-chart/index.js.map +1 -1
- package/lib/lowcode-components/line-chart/index.d.ts +1 -0
- package/lib/lowcode-components/line-chart/index.d.ts.map +1 -1
- package/lib/lowcode-components/line-chart/index.js +3 -1
- package/lib/lowcode-components/line-chart/index.js.map +1 -1
- package/lib/lowcode-components/lowcode-view/index.d.ts.map +1 -1
- package/lib/lowcode-components/lowcode-view/index.js +8 -0
- package/lib/lowcode-components/lowcode-view/index.js.map +1 -1
- package/lib/module/dtmpl-edit-page.d.ts.map +1 -1
- package/lib/module/dtmpl-edit-page.js +7 -7
- package/lib/module/dtmpl-edit-page.js.map +1 -1
- package/lib/table/act-table.d.ts.map +1 -1
- package/lib/table/act-table.js +6 -6
- package/lib/table/act-table.js.map +1 -1
- package/lib/table/column/column-builder.d.ts +1 -0
- package/lib/table/column/column-builder.d.ts.map +1 -1
- package/lib/table/column/column-builder.js +25 -16
- package/lib/table/column/column-builder.js.map +1 -1
- package/lib/table/column/index.less +8 -8
- package/lib/table/report-table.d.ts.map +1 -1
- package/lib/table/report-table.js +3 -3
- package/lib/table/report-table.js.map +1 -1
- package/lib/tmpl/interface.d.ts +7 -0
- package/lib/tmpl/interface.d.ts.map +1 -1
- package/lib/tmpl/interface.js.map +1 -1
- package/package.json +1 -1
- package/src/aldehyde/controls/action/index.tsx +33 -2
- package/src/aldehyde/controls/icon-selector/icon/phonenode-menu-icon/iconfont.css +39 -3
- package/src/aldehyde/controls/icon-selector/icon/phonenode-menu-icon/iconfont.js +1 -1
- package/src/aldehyde/controls/icon-selector/icon/phonenode-menu-icon/iconfont.json +63 -0
- package/src/aldehyde/controls/icon-selector/icon/phonenode-menu-icon/iconfont.ttf +0 -0
- package/src/aldehyde/controls/icon-selector/icon/phonenode-menu-icon/iconfont.woff +0 -0
- package/src/aldehyde/controls/icon-selector/icon/phonenode-menu-icon/iconfont.woff2 +0 -0
- package/src/aldehyde/lowcode-components/column-3d-chart/index.tsx +3 -1
- package/src/aldehyde/lowcode-components/column-chart/index.tsx +3 -1
- package/src/aldehyde/lowcode-components/line-bar-chart/index.tsx +3 -1
- package/src/aldehyde/lowcode-components/line-chart/index.tsx +3 -1
- package/src/aldehyde/lowcode-components/lowcode-view/index.tsx +9 -0
- package/src/aldehyde/module/dtmpl-edit-page.tsx +10 -10
- package/src/aldehyde/table/act-table.tsx +6 -6
- package/src/aldehyde/table/column/column-builder.tsx +26 -36
- package/src/aldehyde/table/column/index.less +8 -8
- package/src/aldehyde/table/report-table.tsx +3 -2
- package/src/aldehyde/tmpl/interface.tsx +7 -0
|
@@ -112,6 +112,7 @@ export interface ComponentStyle {
|
|
|
112
112
|
dataZoom?: boolean;
|
|
113
113
|
slider?: boolean; // 区域缩放是否显示滑动条
|
|
114
114
|
markLineColor?: string[]; // 标记线颜色
|
|
115
|
+
groupType?: string; // 图表分组类型(用于图表联动)
|
|
115
116
|
}
|
|
116
117
|
|
|
117
118
|
export interface ComponentProps {
|
|
@@ -263,7 +264,7 @@ const Index = forwardRef((props: ComponentProps, ref: ForwardedRef<ComponentRef>
|
|
|
263
264
|
}, [searchParams, initSearchParams]);
|
|
264
265
|
|
|
265
266
|
const renderChart = () => {
|
|
266
|
-
const { grid, barMaxWidth, legend, tooltip, color, xAxis, yAxis, dataZoom, slider, markLineColor } = config
|
|
267
|
+
const { grid, barMaxWidth, legend, tooltip, color, xAxis, yAxis, dataZoom, slider, markLineColor, groupType } = config
|
|
267
268
|
const option = _.cloneDeep(defOption);
|
|
268
269
|
// 编辑态无数据显示默认数据
|
|
269
270
|
const temData = isDesignMode && !data?.length ? defDatas[componentType] || [] : data;
|
|
@@ -326,6 +327,7 @@ const Index = forwardRef((props: ComponentProps, ref: ForwardedRef<ComponentRef>
|
|
|
326
327
|
}
|
|
327
328
|
}
|
|
328
329
|
}).filter(Boolean);
|
|
330
|
+
if (groupType) chart.current.group = groupType;
|
|
329
331
|
chart.current.setOption(option, true);
|
|
330
332
|
}
|
|
331
333
|
useEffect(() => {
|
|
@@ -105,6 +105,7 @@ export interface ComponentStyle {
|
|
|
105
105
|
connectNulls?: boolean; // 是否连接空值
|
|
106
106
|
nullSetZero?: boolean; // 空值是否置0
|
|
107
107
|
markLineColor?: string[]; // 标记线颜色
|
|
108
|
+
groupType?: string; // 图表分组类型(用于图表联动)
|
|
108
109
|
}
|
|
109
110
|
|
|
110
111
|
export interface ComponentProps {
|
|
@@ -256,7 +257,7 @@ const Index = forwardRef((props: ComponentProps, ref: ForwardedRef<ComponentRef>
|
|
|
256
257
|
}, [searchParams, initSearchParams]);
|
|
257
258
|
|
|
258
259
|
const renderChart = () => {
|
|
259
|
-
const { grid, legend, tooltip, color, xAxis, yAxis, smooth, lineStyle, step, isArea, isGradient, areaStyle, barMaxWidth, symbol, dataZoom, slider, connectNulls, markLineColor } = config;
|
|
260
|
+
const { grid, legend, tooltip, color, xAxis, yAxis, smooth, lineStyle, step, isArea, isGradient, areaStyle, barMaxWidth, symbol, dataZoom, slider, connectNulls, markLineColor, groupType } = config;
|
|
260
261
|
const option = _.cloneDeep(defOption);
|
|
261
262
|
// 编辑态无数据显示默认数据
|
|
262
263
|
const temData = isDesignMode && !data?.length ? option.series : data;
|
|
@@ -332,6 +333,7 @@ const Index = forwardRef((props: ComponentProps, ref: ForwardedRef<ComponentRef>
|
|
|
332
333
|
}
|
|
333
334
|
}
|
|
334
335
|
}).filter(Boolean);
|
|
336
|
+
if (groupType) chart.current.group = groupType;
|
|
335
337
|
chart.current.setOption(option, true);
|
|
336
338
|
};
|
|
337
339
|
|
|
@@ -116,6 +116,7 @@ export interface ComponentStyle {
|
|
|
116
116
|
connectNulls?: boolean; // 是否连接空值
|
|
117
117
|
nullSetZero?: boolean; // 空值是否置0
|
|
118
118
|
markLineColor?: string[]; // 标记线颜色
|
|
119
|
+
groupType?: string; // 图表分组类型(用于图表联动)
|
|
119
120
|
}
|
|
120
121
|
|
|
121
122
|
export interface ComponentProps {
|
|
@@ -267,7 +268,7 @@ const Index = forwardRef((props: ComponentProps, ref: ForwardedRef<ComponentRef>
|
|
|
267
268
|
}, [searchParams, initSearchParams]);
|
|
268
269
|
|
|
269
270
|
const renderChart = () => {
|
|
270
|
-
const { grid, legend, tooltip, color, xAxis, yAxis, smooth, connectNulls, lineStyle, step, isArea, isGradient, areaStyle, dataZoom, slider, symbol: configSymbol, markLineColor } = config;
|
|
271
|
+
const { grid, legend, tooltip, color, xAxis, yAxis, smooth, connectNulls, lineStyle, step, isArea, isGradient, areaStyle, dataZoom, slider, symbol: configSymbol, markLineColor, groupType } = config;
|
|
271
272
|
const { itemStyle, ...symbol } = configSymbol || {};
|
|
272
273
|
const option = _.cloneDeep(defOption);
|
|
273
274
|
// 编辑态无数据显示默认数据
|
|
@@ -339,6 +340,7 @@ const Index = forwardRef((props: ComponentProps, ref: ForwardedRef<ComponentRef>
|
|
|
339
340
|
}
|
|
340
341
|
}
|
|
341
342
|
}).filter(Boolean);
|
|
343
|
+
if (groupType) chart.current.group = groupType;
|
|
342
344
|
chart.current.setOption(option, true);
|
|
343
345
|
};
|
|
344
346
|
|
|
@@ -13,6 +13,7 @@ import abstractDesignerLoader from "./component/abstract-designer-loader";
|
|
|
13
13
|
import { merge } from "./component/util";
|
|
14
14
|
import ProgramConfig from ".././../units";
|
|
15
15
|
import { useLocale } from "../../index";
|
|
16
|
+
import * as echarts from "echarts";
|
|
16
17
|
import "./index.less";
|
|
17
18
|
|
|
18
19
|
export const ControllerContext = createContext(null);
|
|
@@ -87,6 +88,13 @@ const LowcodeView = (props: Props) => {
|
|
|
87
88
|
|
|
88
89
|
const backgroundImage = useMemo(() => handleImgUrl(canvasConfig?.backgroundImage), [canvasConfig]);
|
|
89
90
|
|
|
91
|
+
// 设置echarts图表联动
|
|
92
|
+
const handleEchartsConnect = (configs: { [key: string]: any }) => {
|
|
93
|
+
const groupTypes = Object.values(configs || {}).map(r => r.style?.groupType).filter(Boolean);
|
|
94
|
+
const groups = [...new Set(groupTypes)];
|
|
95
|
+
groups.forEach(r => echarts.connect(r));
|
|
96
|
+
}
|
|
97
|
+
|
|
90
98
|
useEffect(() => {
|
|
91
99
|
//加载
|
|
92
100
|
abstractDesignerLoader.load();
|
|
@@ -101,6 +109,7 @@ const LowcodeView = (props: Props) => {
|
|
|
101
109
|
const { entity } = await HcserviceV3.requestDDpageData(ddpageId);
|
|
102
110
|
const data = entity?.fieldMap || {};
|
|
103
111
|
const { layerManager, canvasManager } = data["内容"] ? JSON.parse(fromBase64(data["内容"]) || '{}') : {};
|
|
112
|
+
handleEchartsConnect(layerManager?.elemConfigs || {});
|
|
104
113
|
setLayerManager(layerManager);
|
|
105
114
|
setCanvasConfig(canvasManager);
|
|
106
115
|
setLoading(false);
|
|
@@ -412,14 +412,6 @@ export default class DtmplEditPage extends React.PureComponent<
|
|
|
412
412
|
const { saveBtnTitle, continueSaveBtnTitle } = dtmplConfig || {};
|
|
413
413
|
const { translate } = this.context;
|
|
414
414
|
if (dtmplConfig?.buttons?.includes("dtmplSave")) {
|
|
415
|
-
footerButtons.unshift(
|
|
416
|
-
<Button type="primary" loading={loading || btnLoading === "saveLoading"} onClick={() => {
|
|
417
|
-
this.setState({ btnLoading: "saveLoading" });
|
|
418
|
-
this.doSubmit();
|
|
419
|
-
}}>
|
|
420
|
-
{translate("${" + (saveBtnTitle || "保存") + "}")}
|
|
421
|
-
</Button>
|
|
422
|
-
);
|
|
423
415
|
if (continueSaveBtnTitle) {
|
|
424
416
|
footerButtons.unshift(
|
|
425
417
|
<Button type="primary" loading={loading || btnLoading === "continueSaveLoading"} onClick={() => {
|
|
@@ -429,6 +421,15 @@ export default class DtmplEditPage extends React.PureComponent<
|
|
|
429
421
|
{translate("${" + continueSaveBtnTitle + "}")}
|
|
430
422
|
</Button>
|
|
431
423
|
);
|
|
424
|
+
} else {
|
|
425
|
+
footerButtons.unshift(
|
|
426
|
+
<Button type="primary" loading={loading || btnLoading === "saveLoading"} onClick={() => {
|
|
427
|
+
this.setState({ btnLoading: "saveLoading" });
|
|
428
|
+
this.doSubmit();
|
|
429
|
+
}}>
|
|
430
|
+
{translate("${" + (saveBtnTitle || "保存") + "}")}
|
|
431
|
+
</Button>
|
|
432
|
+
);
|
|
432
433
|
}
|
|
433
434
|
}
|
|
434
435
|
//处理action
|
|
@@ -475,9 +476,8 @@ export default class DtmplEditPage extends React.PureComponent<
|
|
|
475
476
|
if (code) {
|
|
476
477
|
if (propsCode && isContinueSave) {
|
|
477
478
|
this.loadConfigData();
|
|
478
|
-
} else {
|
|
479
|
-
this.props.onOk(code, isContinueSave);
|
|
480
479
|
}
|
|
480
|
+
this.props.onOk(code, isContinueSave);
|
|
481
481
|
}
|
|
482
482
|
}
|
|
483
483
|
|
|
@@ -767,20 +767,19 @@ class ActTable extends React.PureComponent<ActTableProps, ActTableStat> {
|
|
|
767
767
|
doJump = async (jump: JumpConfig, record_: DtmplData) => {
|
|
768
768
|
let record = record_.fieldMap ? record_.fieldMap : record_;
|
|
769
769
|
const version = localStorage.getItem("version") || "";
|
|
770
|
-
|
|
771
770
|
let url = null;
|
|
772
771
|
let path = jump.path;
|
|
773
772
|
if (!path) {
|
|
774
773
|
path = "/";
|
|
775
774
|
}
|
|
776
775
|
//是否以http开头
|
|
777
|
-
if (path?.
|
|
776
|
+
if (path?.startsWith("#") || url?.startsWith("/#")) {
|
|
778
777
|
url = "";
|
|
779
778
|
} else if (
|
|
780
|
-
path.
|
|
781
|
-
path.
|
|
782
|
-
path.
|
|
783
|
-
path.
|
|
779
|
+
path.startsWith("http://") ||
|
|
780
|
+
path.startsWith("HTTP://") ||
|
|
781
|
+
path.startsWith("https://") ||
|
|
782
|
+
path.startsWith("HTTPS://")
|
|
784
783
|
) {
|
|
785
784
|
url = path.split("//")[0] + "//";
|
|
786
785
|
path = path.split("//")[1];
|
|
@@ -1634,6 +1633,7 @@ class ActTable extends React.PureComponent<ActTableProps, ActTableStat> {
|
|
|
1634
1633
|
leftFixedCols={ltmplConfig.leftFixedCols}
|
|
1635
1634
|
onChangeResize={this.onChangeResize}
|
|
1636
1635
|
showEmpty={showEmpty}
|
|
1636
|
+
tableLayout={ltmplConfig.tableLayout}
|
|
1637
1637
|
/> :
|
|
1638
1638
|
<QueryTable key={"querytable" + sourceId} sourceId={sourceId}
|
|
1639
1639
|
// queryTotal={this.queryTotal}
|
|
@@ -59,6 +59,7 @@ interface ReportColumnBuilderProps {
|
|
|
59
59
|
hiddenRowCodes?: string[],
|
|
60
60
|
unHiden?: () => any,
|
|
61
61
|
onHide?: (code: string) => any,
|
|
62
|
+
tableLayout?: "auto" | "fixed"; // 表格布局(自适应列宽/固定列宽)
|
|
62
63
|
}
|
|
63
64
|
|
|
64
65
|
|
|
@@ -73,16 +74,15 @@ export default {
|
|
|
73
74
|
onHide, translate,
|
|
74
75
|
sortColumns, serverKey,
|
|
75
76
|
editings, mainCode, criteriaData, actTableDoSearch, showView,
|
|
76
|
-
columnResize
|
|
77
|
+
columnResize, doRowJump
|
|
77
78
|
} = props;
|
|
78
79
|
|
|
79
80
|
const { primaryColumn, secondColumn, primaryColumnLabel } = ltmplConfig.extDisplayConfig || {};
|
|
80
|
-
|
|
81
|
+
const fieldJumps = ltmplConfig.fieldJumps || [];
|
|
81
82
|
let tableColumns = [];
|
|
82
83
|
let s = 0;
|
|
83
84
|
let colConfigs = sortedColConfigs ? sortedColConfigs : ltmplConfig.columns;
|
|
84
85
|
let buttons = ltmplConfig.buttons || [];
|
|
85
|
-
|
|
86
86
|
let currentDataColIndex = 0;
|
|
87
87
|
|
|
88
88
|
colConfigs.forEach((item) => {
|
|
@@ -182,6 +182,7 @@ export default {
|
|
|
182
182
|
: "left"
|
|
183
183
|
: false;
|
|
184
184
|
}
|
|
185
|
+
const fieldJump = fieldJumps.find(r => r.appendMstrucId === item.mstrucId); // 当前列对应的跳转按钮配置
|
|
185
186
|
column["render"] = (text, record) => {
|
|
186
187
|
let detailParams = undefined;
|
|
187
188
|
if (showView && primaryColumn?.id === item.id) { // 首字段增加主题色显示/查看详情功能
|
|
@@ -197,16 +198,21 @@ export default {
|
|
|
197
198
|
detailParams = { code: record.code, toCustomPage: true };
|
|
198
199
|
}
|
|
199
200
|
}
|
|
201
|
+
// 跳转按钮是否可以跳转
|
|
202
|
+
const isShowFieldJump = fieldJump ? ActionUtils.isShow(fieldJump.preposes, [record], undefined) : false;
|
|
203
|
+
// 渲染内容
|
|
204
|
+
const renderView = <ViewControl serverKey={serverKey} fieldConfig={item} value={record[item.id]} holderType="table" />;
|
|
200
205
|
|
|
201
206
|
// 首字段渲染
|
|
202
207
|
const renderPrimaryColumn = <div className="column-table-primary">
|
|
203
|
-
<div className="primary-column" onClick={() =>
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
208
|
+
<div className="table-primary-column" onClick={() => {
|
|
209
|
+
if (isShowFieldJump) {
|
|
210
|
+
doRowJump(fieldJump, record);
|
|
211
|
+
return;
|
|
212
|
+
}
|
|
213
|
+
detailParams && showView(detailParams);
|
|
214
|
+
}}>
|
|
215
|
+
{renderView}
|
|
210
216
|
</div>
|
|
211
217
|
{primaryColumnLabel?.id ?
|
|
212
218
|
<div className="primary-column-label" >
|
|
@@ -223,12 +229,7 @@ export default {
|
|
|
223
229
|
</div>;
|
|
224
230
|
// 次字段渲染
|
|
225
231
|
const renderSecondColumn = <div className="column-table-second">
|
|
226
|
-
<
|
|
227
|
-
serverKey={serverKey}
|
|
228
|
-
fieldConfig={item}
|
|
229
|
-
value={record[item.id]}
|
|
230
|
-
holderType="table"
|
|
231
|
-
/>
|
|
232
|
+
{isShowFieldJump ? <div className="table-primary-column" onClick={() => doRowJump(fieldJump, record)}>{renderView}</div> : renderView}
|
|
232
233
|
{this.renderColumnAction(props, record, "secondary")}
|
|
233
234
|
</div>;
|
|
234
235
|
|
|
@@ -247,12 +248,7 @@ export default {
|
|
|
247
248
|
</FormItem> :
|
|
248
249
|
<div className={record['dataType'] ? record['dataType'] === "小计" ? "xiaoji" : 'heji' : ""}>
|
|
249
250
|
{primaryColumn?.id === item.id ? renderPrimaryColumn : secondColumn?.id === item.id ? renderSecondColumn :
|
|
250
|
-
<
|
|
251
|
-
serverKey={serverKey}
|
|
252
|
-
fieldConfig={item}
|
|
253
|
-
value={record[item.id]}
|
|
254
|
-
holderType="table"
|
|
255
|
-
/>
|
|
251
|
+
(isShowFieldJump ? <div className="table-primary-column" onClick={() => doRowJump(fieldJump, record)}>{renderView}</div> : renderView)
|
|
256
252
|
}
|
|
257
253
|
</div>
|
|
258
254
|
);
|
|
@@ -344,7 +340,7 @@ export default {
|
|
|
344
340
|
|
|
345
341
|
buildReportTableColumns(props: ReportColumnBuilderProps) {
|
|
346
342
|
const {
|
|
347
|
-
columnConfigs, translate, leftFixedCols, hiddenColIds, hiddenRowCodes, unHiden, onHide
|
|
343
|
+
columnConfigs, translate, leftFixedCols, hiddenColIds, hiddenRowCodes, unHiden, onHide, tableLayout
|
|
348
344
|
} = props;
|
|
349
345
|
|
|
350
346
|
let tableColumns = [];
|
|
@@ -400,9 +396,10 @@ export default {
|
|
|
400
396
|
this.setHiddenRecordOpt(column, hiddenRowCodes, unHiden, onHide, translate);
|
|
401
397
|
} else {
|
|
402
398
|
currentDataColIndex++;
|
|
403
|
-
column["className"] = "opsColumn";
|
|
399
|
+
if (tableLayout !== "auto") column["className"] = "opsColumn"; // 表格非自适应设置
|
|
404
400
|
//column["title"] = translate("${" + item.title + "}");
|
|
405
401
|
column["width"] = item.colWidth ? item.colWidth : 160;
|
|
402
|
+
column["onCell"] = () => ({ style: { maxWidth: item.maxColWidth || undefined, minWidth: item.minColWidth || undefined } });
|
|
406
403
|
column["ellipsis"] = { showTitle: true };
|
|
407
404
|
column["align"] = item.valueAlign ? item.valueAlign : "left";
|
|
408
405
|
if (
|
|
@@ -735,9 +732,7 @@ export default {
|
|
|
735
732
|
})
|
|
736
733
|
}
|
|
737
734
|
|
|
738
|
-
if (ltmplConfig.rowActions
|
|
739
|
-
!readOnly &&
|
|
740
|
-
ltmplConfig.rowActions.length > 0) {
|
|
735
|
+
if (!readOnly && ltmplConfig.rowActions?.length) {
|
|
741
736
|
ltmplConfig.rowActions.map((action) => {
|
|
742
737
|
actionButtons.push(
|
|
743
738
|
<Action
|
|
@@ -747,22 +742,17 @@ export default {
|
|
|
747
742
|
data={[record]}
|
|
748
743
|
actionConfig={action}
|
|
749
744
|
doAction={doRowAction}
|
|
745
|
+
doEdit={doEdit}
|
|
750
746
|
buttonSize={"small"}
|
|
751
747
|
serial={1}
|
|
752
|
-
|
|
748
|
+
/>
|
|
753
749
|
);
|
|
754
750
|
})
|
|
755
751
|
}
|
|
756
752
|
|
|
757
|
-
if (ltmplConfig.rowJumps &&
|
|
758
|
-
ltmplConfig.rowJumps.length > 0 &&
|
|
759
|
-
!readOnly) {
|
|
753
|
+
if (!!ltmplConfig.rowJumps?.length && !readOnly) {
|
|
760
754
|
ltmplConfig.rowJumps.map((jump) => {
|
|
761
|
-
if (ActionUtils.isShow(
|
|
762
|
-
jump.preposes,
|
|
763
|
-
[record],
|
|
764
|
-
undefined
|
|
765
|
-
)) {
|
|
755
|
+
if (ActionUtils.isShow(jump.preposes, [record], undefined)) {
|
|
766
756
|
actionButtons.push(
|
|
767
757
|
<Button
|
|
768
758
|
key={jump.id}
|
|
@@ -12,15 +12,15 @@
|
|
|
12
12
|
visibility: visible;
|
|
13
13
|
}
|
|
14
14
|
|
|
15
|
-
.
|
|
15
|
+
.table-primary-column {
|
|
16
|
+
text-overflow: ellipsis;
|
|
17
|
+
overflow: hidden;
|
|
18
|
+
white-space: nowrap;
|
|
19
|
+
color: var(--ant-color-primary-active);
|
|
20
|
+
cursor: pointer;
|
|
21
|
+
}
|
|
16
22
|
|
|
17
|
-
|
|
18
|
-
text-overflow: ellipsis;
|
|
19
|
-
overflow: hidden;
|
|
20
|
-
white-space: nowrap;
|
|
21
|
-
color: var(--ant-color-primary-active);
|
|
22
|
-
cursor: pointer;
|
|
23
|
-
}
|
|
23
|
+
.column-table-primary {
|
|
24
24
|
|
|
25
25
|
.primary-column-label {
|
|
26
26
|
margin-left: 8px;
|
|
@@ -7,7 +7,7 @@ import ColumnBuilder from "./column/column-builder";
|
|
|
7
7
|
import ResizableTable from "./resizable-table";
|
|
8
8
|
|
|
9
9
|
const ReportTable = (props: ReportTableProps) => {
|
|
10
|
-
const { showEmpty = true } = props;
|
|
10
|
+
const { showEmpty = true, tableLayout } = props;
|
|
11
11
|
const [loading, setLoading] = useState<boolean>(false);
|
|
12
12
|
const [dataSource, setDataSource] = useState<object[]>(undefined);
|
|
13
13
|
const [reportData, setReportData] = useState<ReportData>(undefined);
|
|
@@ -94,7 +94,7 @@ const ReportTable = (props: ReportTableProps) => {
|
|
|
94
94
|
});
|
|
95
95
|
}
|
|
96
96
|
|
|
97
|
-
let current_cols = reportData?.columnConfigs ? ColumnBuilder.buildReportTableColumns({ columnConfigs: [...reportData.columnConfigs], translate, leftFixedCols, hiddenColIds }) : columns;
|
|
97
|
+
let current_cols = reportData?.columnConfigs ? ColumnBuilder.buildReportTableColumns({ columnConfigs: [...reportData.columnConfigs], translate, leftFixedCols, hiddenColIds, tableLayout }) : columns;
|
|
98
98
|
let table_x = 20;
|
|
99
99
|
|
|
100
100
|
current_cols.forEach((c) => {
|
|
@@ -107,6 +107,7 @@ const ReportTable = (props: ReportTableProps) => {
|
|
|
107
107
|
loading={loading}
|
|
108
108
|
columns={current_cols}
|
|
109
109
|
dataSource={dataSource}
|
|
110
|
+
tableLayout={tableLayout || "fixed"}
|
|
110
111
|
scroll={
|
|
111
112
|
tableProps?.scrollY == -1 || tableProps?.scrollY == 0
|
|
112
113
|
? null
|
|
@@ -48,6 +48,7 @@ export interface ReportTableProps {
|
|
|
48
48
|
queryKey: QueryKey;
|
|
49
49
|
onChangeResize?: (value: { [key: string]: number }) => void; // 表格列尺寸更新
|
|
50
50
|
showEmpty?: boolean;
|
|
51
|
+
tableLayout?: "auto" | "fixed"; // 表格布局(自适应列宽/固定列宽)
|
|
51
52
|
}
|
|
52
53
|
|
|
53
54
|
export interface CardListConfig {
|
|
@@ -162,6 +163,10 @@ export interface ActionConfig extends ButtonConfig {
|
|
|
162
163
|
preposes: FieldConfig[];
|
|
163
164
|
writes: FieldConfig[];
|
|
164
165
|
functionType?: "action" | "raction" | "customButton" | "fileExport" | "cQuery" | "customExport";
|
|
166
|
+
dtmplSourceId?: string; // 关联页面模板
|
|
167
|
+
winShowType?: string; // 关联编辑模板-窗口显示类型
|
|
168
|
+
windowHeight?: number; // 关联编辑模板-窗口高度
|
|
169
|
+
windowWidth?: number; // 关联编辑模板-窗口宽度
|
|
165
170
|
}
|
|
166
171
|
|
|
167
172
|
export interface BuinButtonConfig extends ButtonConfig {
|
|
@@ -235,6 +240,7 @@ export interface JumpConfig extends OrderableTmplBase {
|
|
|
235
240
|
routeParams: FieldConfig[];
|
|
236
241
|
preposes: FieldConfig[];
|
|
237
242
|
icon?: string;
|
|
243
|
+
appendMstrucId?: string; // 关联列MstrucId
|
|
238
244
|
}
|
|
239
245
|
export interface ClassAddConfig extends OrderableTmplBase { }
|
|
240
246
|
export interface ClassEditConfig extends OrderableTmplBase {
|
|
@@ -610,6 +616,7 @@ export interface LtmplConfig extends SelectConfig {
|
|
|
610
616
|
ractions?: RActionConfig[];
|
|
611
617
|
jumps?: JumpConfig[];
|
|
612
618
|
rowJumps?: JumpConfig[];
|
|
619
|
+
fieldJumps?: JumpConfig[]; // 列表字段跳转配置
|
|
613
620
|
cQuerys?: CQueryConfig[];
|
|
614
621
|
rowCQuerys?: CQueryConfig[];
|
|
615
622
|
chartType?: ChartType[];
|