ngx-rs-ant 0.10.6 → 0.10.8
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/data-grid/data-grid.service.d.ts +1 -1
- package/esm2020/data-grid/data-grid.component.mjs +6 -2
- package/esm2020/data-grid/data-grid.service.mjs +3 -2
- package/esm2020/form/form.component.mjs +2 -5
- package/esm2020/form/form.service.mjs +4 -3
- package/fesm2015/ngx-rs-ant.mjs +11 -8
- package/fesm2015/ngx-rs-ant.mjs.map +1 -1
- package/fesm2020/ngx-rs-ant.mjs +11 -8
- package/fesm2020/ngx-rs-ant.mjs.map +1 -1
- package/form/form.service.d.ts +1 -1
- package/package.json +1 -1
package/fesm2020/ngx-rs-ant.mjs
CHANGED
|
@@ -822,10 +822,11 @@ class DataGridService {
|
|
|
822
822
|
return response.data.list;
|
|
823
823
|
}));
|
|
824
824
|
}
|
|
825
|
-
getColumnDataSource(className, view, field) {
|
|
825
|
+
getColumnDataSource(tenant, className, view, field) {
|
|
826
826
|
return this.http.get('api/data/custom', {
|
|
827
827
|
params: {
|
|
828
828
|
executor: 'com.cs.system.data.grid.header.filter.GetColumnDataSource',
|
|
829
|
+
tenant,
|
|
829
830
|
className,
|
|
830
831
|
view: view || '',
|
|
831
832
|
field
|
|
@@ -999,6 +1000,7 @@ class DataGridComponent {
|
|
|
999
1000
|
caption: field.caption,
|
|
1000
1001
|
dataType: 'string',
|
|
1001
1002
|
alignment: 'center',
|
|
1003
|
+
cssClass: 'cell-vertical-middle',
|
|
1002
1004
|
allowHeaderFiltering: false,
|
|
1003
1005
|
allowFiltering: false,
|
|
1004
1006
|
allowSorting: false,
|
|
@@ -1013,6 +1015,7 @@ class DataGridComponent {
|
|
|
1013
1015
|
caption: field.caption,
|
|
1014
1016
|
dataType: this.typeMap[field.dataType].dataType,
|
|
1015
1017
|
alignment: 'left',
|
|
1018
|
+
cssClass: 'cell-vertical-middle',
|
|
1016
1019
|
allowHeaderFiltering: true,
|
|
1017
1020
|
headerFilter: {
|
|
1018
1021
|
allowSelectAll: false
|
|
@@ -1234,6 +1237,7 @@ class DataGridComponent {
|
|
|
1234
1237
|
caption: field.caption,
|
|
1235
1238
|
dataType: 'string',
|
|
1236
1239
|
alignment: 'left',
|
|
1240
|
+
cssClass: 'cell-vertical-middle',
|
|
1237
1241
|
allowHeaderFiltering: false,
|
|
1238
1242
|
allowFiltering: false,
|
|
1239
1243
|
visible: field.visible,
|
|
@@ -1247,6 +1251,7 @@ class DataGridComponent {
|
|
|
1247
1251
|
caption: field.caption,
|
|
1248
1252
|
dataType: 'string',
|
|
1249
1253
|
alignment: 'left',
|
|
1254
|
+
cssClass: 'cell-vertical-middle',
|
|
1250
1255
|
allowHeaderFiltering: false,
|
|
1251
1256
|
filterOperations: ['='],
|
|
1252
1257
|
visible: field.visible,
|
|
@@ -1270,7 +1275,7 @@ class DataGridComponent {
|
|
|
1270
1275
|
if (loadOptions.dataField) {
|
|
1271
1276
|
// 未重写headerFilter的dataSource时,headerFilter会调用load方法加载筛选树,重写该方法查询该表所有数据
|
|
1272
1277
|
// 该方式存在风险,无法识别一定是通过headerFilter过滤才存在dataField参数
|
|
1273
|
-
return lastValueFrom(this.service.getColumnDataSource(this.className, this.view, loadOptions.dataField));
|
|
1278
|
+
return lastValueFrom(this.service.getColumnDataSource(this.tenant, this.className, this.view, loadOptions.dataField));
|
|
1274
1279
|
}
|
|
1275
1280
|
let params = '?';
|
|
1276
1281
|
if (loadOptions.skip || loadOptions.take) {
|
|
@@ -1453,12 +1458,13 @@ class FormService {
|
|
|
1453
1458
|
}
|
|
1454
1459
|
});
|
|
1455
1460
|
}
|
|
1456
|
-
getOne(tenant, className, oid, template) {
|
|
1461
|
+
getOne(tenant, className, oid, template, isCopy) {
|
|
1457
1462
|
let api = 'api/data/' + className + '/' + oid;
|
|
1458
1463
|
return this.http.get(api, {
|
|
1459
1464
|
params: {
|
|
1460
1465
|
tenant,
|
|
1461
|
-
template: template || ''
|
|
1466
|
+
template: template || '',
|
|
1467
|
+
isCopy: !!isCopy
|
|
1462
1468
|
}
|
|
1463
1469
|
});
|
|
1464
1470
|
}
|
|
@@ -1504,11 +1510,8 @@ class FormComponent {
|
|
|
1504
1510
|
this.service.getFormTemplateConfig(this.tenant, this.className, this.template).subscribe(response => {
|
|
1505
1511
|
this.config = response.data.template;
|
|
1506
1512
|
if (this.copyOid || this.oid) {
|
|
1507
|
-
this.service.getOne(this.tenant, this.className, this.copyOid || this.oid, this.template)
|
|
1513
|
+
this.service.getOne(this.tenant, this.className, this.copyOid || this.oid, this.template, this.copyOid)
|
|
1508
1514
|
.subscribe(response => {
|
|
1509
|
-
if (this.copyOid) {
|
|
1510
|
-
delete response.data.oid;
|
|
1511
|
-
}
|
|
1512
1515
|
this.model = response.data;
|
|
1513
1516
|
this.loaded = true;
|
|
1514
1517
|
this.loading = false;
|