@steedos-widgets/amis-lib 1.2.38 → 1.2.39-beta.1
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/dist/cjs/tsconfig.tsbuildinfo +1 -1
- package/dist/index.cjs.js +164 -54
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +164 -54
- package/dist/index.esm.js.map +1 -1
- package/dist/index.umd.js +164 -54
- package/dist/index.umd.js.map +1 -1
- package/dist/types/lib/converter/amis/fields/lookup.d.ts +1 -0
- package/dist/types/lib/converter/amis/toolbar.d.ts +1 -1
- package/package.json +2 -2
package/dist/index.umd.js
CHANGED
|
@@ -1074,6 +1074,7 @@
|
|
|
1074
1074
|
var frontend_objects_related_alert_start$1 = "No related table fields associated with the related list object";
|
|
1075
1075
|
var frontend_objects_related_alert_end$1 = "were found.";
|
|
1076
1076
|
var frontend_no_records_found$1 = "No records found.";
|
|
1077
|
+
var frontend_records_no_allowedit$1 = "You do not have edit permission for this record";
|
|
1077
1078
|
var en_us = {
|
|
1078
1079
|
frontend_field_group_generalization: frontend_field_group_generalization$1,
|
|
1079
1080
|
frontend_download: frontend_download$1,
|
|
@@ -1156,7 +1157,8 @@
|
|
|
1156
1157
|
frontend_message_modification_failed: frontend_message_modification_failed$1,
|
|
1157
1158
|
frontend_objects_related_alert_start: frontend_objects_related_alert_start$1,
|
|
1158
1159
|
frontend_objects_related_alert_end: frontend_objects_related_alert_end$1,
|
|
1159
|
-
frontend_no_records_found: frontend_no_records_found$1
|
|
1160
|
+
frontend_no_records_found: frontend_no_records_found$1,
|
|
1161
|
+
frontend_records_no_allowedit: frontend_records_no_allowedit$1
|
|
1160
1162
|
};
|
|
1161
1163
|
|
|
1162
1164
|
var frontend_field_group_generalization = "通用";
|
|
@@ -1180,7 +1182,7 @@
|
|
|
1180
1182
|
var frontend_display_as = "显示为";
|
|
1181
1183
|
var frontend_record_sum = "个项目";
|
|
1182
1184
|
var frontend_button_reload_tooltip = "刷新";
|
|
1183
|
-
var frontend_button_search_tooltip = "
|
|
1185
|
+
var frontend_button_search_tooltip = "查询";
|
|
1184
1186
|
var frontend_fields_filter_button_search = "搜索";
|
|
1185
1187
|
var frontend_fields_filter_button_settings = "设置搜索项";
|
|
1186
1188
|
var frontend_button_listview_control_tooltip = "列表视图控制";
|
|
@@ -1242,6 +1244,7 @@
|
|
|
1242
1244
|
var frontend_objects_related_alert_start = "未找到与相关列表对象";
|
|
1243
1245
|
var frontend_objects_related_alert_end = "关联的相关表字段";
|
|
1244
1246
|
var frontend_no_records_found = "无法找到记录";
|
|
1247
|
+
var frontend_records_no_allowedit = "您对这条记录没有编辑权限";
|
|
1245
1248
|
var zh_cn = {
|
|
1246
1249
|
frontend_field_group_generalization: frontend_field_group_generalization,
|
|
1247
1250
|
frontend_download: frontend_download,
|
|
@@ -1325,7 +1328,8 @@
|
|
|
1325
1328
|
frontend_message_modification_failed: frontend_message_modification_failed,
|
|
1326
1329
|
frontend_objects_related_alert_start: frontend_objects_related_alert_start,
|
|
1327
1330
|
frontend_objects_related_alert_end: frontend_objects_related_alert_end,
|
|
1328
|
-
frontend_no_records_found: frontend_no_records_found
|
|
1331
|
+
frontend_no_records_found: frontend_no_records_found,
|
|
1332
|
+
frontend_records_no_allowedit: frontend_records_no_allowedit
|
|
1329
1333
|
};
|
|
1330
1334
|
|
|
1331
1335
|
const resources = {
|
|
@@ -3379,12 +3383,14 @@
|
|
|
3379
3383
|
if(!event.data.isLookup){
|
|
3380
3384
|
// 刷新浏览器后,filterFormValues值是空的,只能从本地存储中取出并重置为空值
|
|
3381
3385
|
const listName = event.data.listName;
|
|
3382
|
-
const listViewPropsStoreKey = location.pathname + "/crud
|
|
3386
|
+
const listViewPropsStoreKey = location.pathname + "/crud";
|
|
3383
3387
|
let localListViewProps = sessionStorage.getItem(listViewPropsStoreKey);
|
|
3384
3388
|
if(localListViewProps){
|
|
3385
3389
|
localListViewProps = JSON.parse(localListViewProps);
|
|
3386
3390
|
for(var k in localListViewProps){
|
|
3387
|
-
|
|
3391
|
+
if(k !== "__keywords"){
|
|
3392
|
+
removedValues[k] = null;
|
|
3393
|
+
}
|
|
3388
3394
|
}
|
|
3389
3395
|
}
|
|
3390
3396
|
}
|
|
@@ -3406,12 +3412,9 @@
|
|
|
3406
3412
|
const objectName = data.objectName;
|
|
3407
3413
|
const isLookup = data.isLookup;
|
|
3408
3414
|
const listName = data.listName;
|
|
3409
|
-
let searchableFieldsStoreKey = location.pathname + "/searchable_fields
|
|
3415
|
+
let searchableFieldsStoreKey = location.pathname + "/searchable_fields";
|
|
3410
3416
|
if(isLookup){
|
|
3411
|
-
searchableFieldsStoreKey += "lookup/" + objectName;
|
|
3412
|
-
}
|
|
3413
|
-
else{
|
|
3414
|
-
searchableFieldsStoreKey += (listName || "");
|
|
3417
|
+
searchableFieldsStoreKey += "/lookup/" + objectName;
|
|
3415
3418
|
}
|
|
3416
3419
|
let defaultSearchableFields = sessionStorage.getItem(searchableFieldsStoreKey);
|
|
3417
3420
|
if(defaultSearchableFields){
|
|
@@ -3438,7 +3441,7 @@
|
|
|
3438
3441
|
setData({ showFieldsFilter: false });
|
|
3439
3442
|
}
|
|
3440
3443
|
else{
|
|
3441
|
-
const listViewPropsStoreKey = location.pathname + "/crud
|
|
3444
|
+
const listViewPropsStoreKey = location.pathname + "/crud";
|
|
3442
3445
|
let localListViewProps = sessionStorage.getItem(listViewPropsStoreKey);
|
|
3443
3446
|
if(localListViewProps){
|
|
3444
3447
|
localListViewProps = JSON.parse(localListViewProps);
|
|
@@ -3478,12 +3481,9 @@
|
|
|
3478
3481
|
return n.props.type === "service";
|
|
3479
3482
|
});
|
|
3480
3483
|
filterService.setData({ filterFormSearchableFields: value });
|
|
3481
|
-
let searchableFieldsStoreKey = location.pathname + "/searchable_fields
|
|
3484
|
+
let searchableFieldsStoreKey = location.pathname + "/searchable_fields";
|
|
3482
3485
|
if(isLookup){
|
|
3483
|
-
searchableFieldsStoreKey += "lookup/" + objectName;
|
|
3484
|
-
}
|
|
3485
|
-
else{
|
|
3486
|
-
searchableFieldsStoreKey += (listName || "");
|
|
3486
|
+
searchableFieldsStoreKey += "/lookup/" + objectName;
|
|
3487
3487
|
}
|
|
3488
3488
|
sessionStorage.setItem(searchableFieldsStoreKey, value);
|
|
3489
3489
|
|
|
@@ -3541,7 +3541,7 @@
|
|
|
3541
3541
|
}
|
|
3542
3542
|
|
|
3543
3543
|
// 列表视图crud支持本地缓存,所以需要进一步清除浏览器本地缓存里面用户在可搜索项中移除的字段值
|
|
3544
|
-
const listViewPropsStoreKey = location.pathname + "/crud
|
|
3544
|
+
const listViewPropsStoreKey = location.pathname + "/crud";
|
|
3545
3545
|
let localListViewProps = sessionStorage.getItem(listViewPropsStoreKey);
|
|
3546
3546
|
if(localListViewProps){
|
|
3547
3547
|
localListViewProps = JSON.parse(localListViewProps);
|
|
@@ -5262,9 +5262,23 @@ crudService && crudService.setData({showFieldsFilter: toShowFieldsFilter});
|
|
|
5262
5262
|
`;
|
|
5263
5263
|
|
|
5264
5264
|
|
|
5265
|
-
function getObjectHeaderToolbar(mainObject, formFactor, {showDisplayAs = false, hiddenCount = false, headerToolbarItems, filterVisible = true} = {}){
|
|
5265
|
+
function getObjectHeaderToolbar(mainObject, fields, formFactor, {showDisplayAs = false, hiddenCount = false, headerToolbarItems, filterVisible = true} = {}){
|
|
5266
5266
|
// console.log(`getObjectHeaderToolbar====>`, filterVisible)
|
|
5267
|
-
console.log(`getObjectHeaderToolbar`, mainObject)
|
|
5267
|
+
// console.log(`getObjectHeaderToolbar`, mainObject)
|
|
5268
|
+
const searchableFieldsLabel = [];
|
|
5269
|
+
_.each(fields, function (field) {
|
|
5270
|
+
if (field.searchable) {
|
|
5271
|
+
searchableFieldsLabel.push(field.label);
|
|
5272
|
+
}
|
|
5273
|
+
});
|
|
5274
|
+
const listViewPropsStoreKey = location.pathname + "/crud";
|
|
5275
|
+
let localListViewProps = sessionStorage.getItem(listViewPropsStoreKey);
|
|
5276
|
+
let crudKeywords = "";
|
|
5277
|
+
if(localListViewProps){
|
|
5278
|
+
localListViewProps = JSON.parse(localListViewProps);
|
|
5279
|
+
crudKeywords = (localListViewProps && localListViewProps.__keywords) || "";
|
|
5280
|
+
}
|
|
5281
|
+
|
|
5268
5282
|
const isMobile = window.innerWidth < 768;
|
|
5269
5283
|
if(isMobile){
|
|
5270
5284
|
showDisplayAs = false;
|
|
@@ -5354,21 +5368,9 @@ crudService && crudService.setData({showFieldsFilter: toShowFieldsFilter});
|
|
|
5354
5368
|
"type": "tpl",
|
|
5355
5369
|
"tpl": "${count} " + i18next__default["default"].t('frontend_record_sum')
|
|
5356
5370
|
},
|
|
5357
|
-
{
|
|
5358
|
-
"type": "reload",
|
|
5359
|
-
"align": "right",
|
|
5360
|
-
//TODO: dropdown-button只支持在按钮上方配置提示,对于上方按钮的点击会有影响,为保持统一,暂时去除,等待amis优化,https://github.com/baidu/amis/issues/7330
|
|
5361
|
-
// "tooltip": i18next.t('frontend_button_reload_tooltip'),
|
|
5362
|
-
"tooltip":"",
|
|
5363
|
-
"tooltipPlacement": "top",
|
|
5364
|
-
"className": "bg-white p-2 rounded border-gray-300 text-gray-500"
|
|
5365
|
-
},
|
|
5366
|
-
// getExportExcelToolbarButtonSchema(),
|
|
5367
|
-
mainObject?.permissions?.allowCreateListViews ? getSettingListviewToolbarButtonSchema() : {},
|
|
5368
|
-
getDisplayAsButton(mainObject?.name),
|
|
5369
5371
|
filterVisible ? {
|
|
5370
5372
|
"label": i18next__default["default"].t('frontend_button_search_tooltip'),
|
|
5371
|
-
"icon": "fa fa-
|
|
5373
|
+
"icon": "fa fa-filter",
|
|
5372
5374
|
//TODO: dropdown-button只支持在按钮上方配置提示,对于上方按钮的点击会有影响,为保持统一,暂时去除,等待amis优化,https://github.com/baidu/amis/issues/7330
|
|
5373
5375
|
// "tooltip": i18next.t('frontend_button_search_tooltip'),
|
|
5374
5376
|
// "tooltipPlacement": "top",
|
|
@@ -5394,14 +5396,39 @@ crudService && crudService.setData({showFieldsFilter: toShowFieldsFilter});
|
|
|
5394
5396
|
]
|
|
5395
5397
|
}
|
|
5396
5398
|
}
|
|
5397
|
-
} : {}
|
|
5398
|
-
|
|
5399
|
-
|
|
5400
|
-
|
|
5401
|
-
|
|
5402
|
-
|
|
5403
|
-
|
|
5404
|
-
|
|
5399
|
+
} : {},
|
|
5400
|
+
{
|
|
5401
|
+
"type": "reload",
|
|
5402
|
+
"align": "right",
|
|
5403
|
+
//TODO: dropdown-button只支持在按钮上方配置提示,对于上方按钮的点击会有影响,为保持统一,暂时去除,等待amis优化,https://github.com/baidu/amis/issues/7330
|
|
5404
|
+
// "tooltip": i18next.t('frontend_button_reload_tooltip'),
|
|
5405
|
+
"tooltip":"",
|
|
5406
|
+
"tooltipPlacement": "top",
|
|
5407
|
+
"className": "bg-white p-2 rounded border-gray-300 text-gray-500"
|
|
5408
|
+
},
|
|
5409
|
+
// getExportExcelToolbarButtonSchema(),
|
|
5410
|
+
mainObject?.permissions?.allowCreateListViews ? getSettingListviewToolbarButtonSchema() : {},
|
|
5411
|
+
getDisplayAsButton(mainObject?.name),
|
|
5412
|
+
{
|
|
5413
|
+
"type": "tooltip-wrapper",
|
|
5414
|
+
"align": "right",
|
|
5415
|
+
"title": "",
|
|
5416
|
+
"content": "可模糊搜索字段:" + searchableFieldsLabel.join(","),
|
|
5417
|
+
"placement": "bottom",
|
|
5418
|
+
"tooltipTheme": "dark",
|
|
5419
|
+
"trigger": "click",
|
|
5420
|
+
"className": "mr-1",
|
|
5421
|
+
"body": [
|
|
5422
|
+
{
|
|
5423
|
+
"type": "search-box",
|
|
5424
|
+
"name": "__keywords",
|
|
5425
|
+
"placeholder": "请输入关键字",
|
|
5426
|
+
"value": crudKeywords,
|
|
5427
|
+
"clearable": true,
|
|
5428
|
+
"clearAndSubmit": true
|
|
5429
|
+
}
|
|
5430
|
+
]
|
|
5431
|
+
},
|
|
5405
5432
|
// {
|
|
5406
5433
|
// "type": "drag-toggler",
|
|
5407
5434
|
// "align": "right"
|
|
@@ -5745,16 +5772,17 @@ crudService && crudService.setData({showFieldsFilter: toShowFieldsFilter});
|
|
|
5745
5772
|
"autoCheckChildren": false,
|
|
5746
5773
|
"searchable": true,
|
|
5747
5774
|
"searchConfig": {
|
|
5748
|
-
"sticky": true
|
|
5775
|
+
"sticky": true,
|
|
5776
|
+
"placeholder": "查找部门"
|
|
5749
5777
|
},
|
|
5750
5778
|
"unfoldedLevel": 2,
|
|
5751
5779
|
"style": {
|
|
5752
5780
|
"max-height": "100%",
|
|
5753
5781
|
"position": "absolute",
|
|
5754
|
-
"left": "-
|
|
5755
|
-
"width": "
|
|
5782
|
+
"left": "-220px",
|
|
5783
|
+
"width": "210px",
|
|
5756
5784
|
"bottom": 0,
|
|
5757
|
-
"top": "
|
|
5785
|
+
"top": "0",
|
|
5758
5786
|
"overflow": "auto",
|
|
5759
5787
|
"min-height":"300px"
|
|
5760
5788
|
},
|
|
@@ -5773,7 +5801,7 @@ crudService && crudService.setData({showFieldsFilter: toShowFieldsFilter});
|
|
|
5773
5801
|
ctx.idFieldName = refObjectConfig.idFieldName;
|
|
5774
5802
|
ctx.objectName = refObjectConfig.name;
|
|
5775
5803
|
|
|
5776
|
-
|
|
5804
|
+
let tableFields = [];
|
|
5777
5805
|
let i = 0;
|
|
5778
5806
|
const searchableFields = [];
|
|
5779
5807
|
|
|
@@ -5902,16 +5930,31 @@ crudService && crudService.setData({showFieldsFilter: toShowFieldsFilter});
|
|
|
5902
5930
|
}
|
|
5903
5931
|
}
|
|
5904
5932
|
|
|
5905
|
-
|
|
5906
5933
|
if(allowSearchFields){
|
|
5907
5934
|
allowSearchFields.forEach(function(key){
|
|
5908
5935
|
const keyValue = selfData[key];
|
|
5909
|
-
if(keyValue){
|
|
5936
|
+
if(_.isString(keyValue)){
|
|
5910
5937
|
filters.push([key, "contains", keyValue]);
|
|
5938
|
+
}else if(_.isArray(keyValue) || _.isBoolean(keyValue) || keyValue){
|
|
5939
|
+
filters.push([key, "=", keyValue]);
|
|
5911
5940
|
}
|
|
5912
5941
|
})
|
|
5913
5942
|
}
|
|
5914
5943
|
|
|
5944
|
+
if(selfData.__keywords && allowSearchFields){
|
|
5945
|
+
const keywordsFilters = [];
|
|
5946
|
+
allowSearchFields.forEach(function(key, index){
|
|
5947
|
+
const keyValue = selfData.__keywords;
|
|
5948
|
+
if(keyValue){
|
|
5949
|
+
keywordsFilters.push([key, "contains", keyValue]);
|
|
5950
|
+
if(index < allowSearchFields.length - 1){
|
|
5951
|
+
keywordsFilters.push('or');
|
|
5952
|
+
}
|
|
5953
|
+
}
|
|
5954
|
+
})
|
|
5955
|
+
filters.push(keywordsFilters);
|
|
5956
|
+
};
|
|
5957
|
+
|
|
5915
5958
|
var fieldFilters = ${JSON.stringify(field.filters)};
|
|
5916
5959
|
if(fieldFilters && fieldFilters.length){
|
|
5917
5960
|
filters.push(fieldFilters);
|
|
@@ -6000,6 +6043,7 @@ crudService && crudService.setData({showFieldsFilter: toShowFieldsFilter});
|
|
|
6000
6043
|
if(refObjectConfig.paging && refObjectConfig.paging.enabled === false){
|
|
6001
6044
|
top = 1000;
|
|
6002
6045
|
}
|
|
6046
|
+
|
|
6003
6047
|
let pickerSchema = null;
|
|
6004
6048
|
if(ctx.formFactor === 'SMALL'){
|
|
6005
6049
|
pickerSchema = await getListSchema$1(tableFields, {
|
|
@@ -6021,7 +6065,7 @@ crudService && crudService.setData({showFieldsFilter: toShowFieldsFilter});
|
|
|
6021
6065
|
if(referenceTo.objectName === "space_users" && field.reference_to_field === "user" && !isMobile){
|
|
6022
6066
|
headerToolbarItems = getLookupSapceUserTreeSchema();
|
|
6023
6067
|
pickerSchema["style"] = {
|
|
6024
|
-
"margin-left":"
|
|
6068
|
+
"margin-left":"220px",
|
|
6025
6069
|
"min-height": "300px"
|
|
6026
6070
|
};
|
|
6027
6071
|
pickerSchema.className = pickerSchema.className || "" + " steedos-select-user";
|
|
@@ -6032,7 +6076,8 @@ crudService && crudService.setData({showFieldsFilter: toShowFieldsFilter});
|
|
|
6032
6076
|
if (isAllowCreate) {
|
|
6033
6077
|
const new_button = await getSchema$5(refObjectConfig, { appId: ctx.appId, objectName: refObjectConfig.name, formFactor: ctx.formFactor });
|
|
6034
6078
|
new_button.align = "right";
|
|
6035
|
-
|
|
6079
|
+
// 保持快速搜索放在最左侧,新建按钮往里插,而不是push到最后
|
|
6080
|
+
pickerSchema.headerToolbar.splice(pickerSchema.headerToolbar.length - 1, 0, new_button);
|
|
6036
6081
|
}
|
|
6037
6082
|
pickerSchema.footerToolbar = refObjectConfig.enable_tree ? [] : getObjectFooterToolbar();
|
|
6038
6083
|
if (ctx.filterVisible !== false) {
|
|
@@ -7722,7 +7767,71 @@ crudService && crudService.setData({showFieldsFilter: toShowFieldsFilter});
|
|
|
7722
7767
|
`;
|
|
7723
7768
|
break;
|
|
7724
7769
|
}
|
|
7725
|
-
|
|
7770
|
+
quickEditSchema.body[0].visibleOn = "${quickedit_record_permissions.allowEdit && quickedit_record_permissions_loading == false}";
|
|
7771
|
+
quickEditSchema.body.push({
|
|
7772
|
+
"type":"service",
|
|
7773
|
+
"body":[
|
|
7774
|
+
{
|
|
7775
|
+
"type": "tpl",
|
|
7776
|
+
"tpl": i18next__default["default"].t('frontend_records_no_allowedit'),
|
|
7777
|
+
"visibleOn": "${!quickedit_record_permissions.allowEdit && quickedit_record_permissions_loading == false}"
|
|
7778
|
+
},
|
|
7779
|
+
{
|
|
7780
|
+
"type": "spinner",
|
|
7781
|
+
"showOn": "${quickedit_record_permissions_loading}"
|
|
7782
|
+
}
|
|
7783
|
+
],
|
|
7784
|
+
"onEvent":{
|
|
7785
|
+
"init":{
|
|
7786
|
+
"actions":[
|
|
7787
|
+
{
|
|
7788
|
+
"actionType": "setValue",
|
|
7789
|
+
"componentId": `service_listview_${options.objectName}`,
|
|
7790
|
+
"args": {
|
|
7791
|
+
"value":{
|
|
7792
|
+
"quickedit_record_permissions_loading": true
|
|
7793
|
+
}
|
|
7794
|
+
}
|
|
7795
|
+
},
|
|
7796
|
+
{
|
|
7797
|
+
"actionType": "ajax",
|
|
7798
|
+
"args": {
|
|
7799
|
+
"api": {
|
|
7800
|
+
"url": "${context.rootUrl}/service/api/@\${objectName}/recordPermissions/${_id}",
|
|
7801
|
+
"method": "get",
|
|
7802
|
+
"headers": {
|
|
7803
|
+
"Authorization": "Bearer ${context.tenantId},${context.authToken}"
|
|
7804
|
+
},
|
|
7805
|
+
"cache": 30000,
|
|
7806
|
+
"messages": {
|
|
7807
|
+
"failed": "失败了呢。。"
|
|
7808
|
+
}
|
|
7809
|
+
}
|
|
7810
|
+
}
|
|
7811
|
+
},
|
|
7812
|
+
{
|
|
7813
|
+
"actionType": "setValue",
|
|
7814
|
+
"componentId": `service_listview_${options.objectName}`,
|
|
7815
|
+
"args": {
|
|
7816
|
+
"value":{
|
|
7817
|
+
"quickedit_record_permissions_loading": false
|
|
7818
|
+
}
|
|
7819
|
+
}
|
|
7820
|
+
},
|
|
7821
|
+
{
|
|
7822
|
+
"actionType": "setValue",
|
|
7823
|
+
"componentId": `service_listview_${options.objectName}`,
|
|
7824
|
+
"args": {
|
|
7825
|
+
"value":{
|
|
7826
|
+
"quickedit_record_permissions": "${event.data}"
|
|
7827
|
+
}
|
|
7828
|
+
}
|
|
7829
|
+
}
|
|
7830
|
+
]
|
|
7831
|
+
}
|
|
7832
|
+
}
|
|
7833
|
+
|
|
7834
|
+
});
|
|
7726
7835
|
} else {
|
|
7727
7836
|
quickEditSchema = false;
|
|
7728
7837
|
}
|
|
@@ -7755,7 +7864,7 @@ crudService && crudService.setData({showFieldsFilter: toShowFieldsFilter});
|
|
|
7755
7864
|
|
|
7756
7865
|
async function getTableColumns(fields, options){
|
|
7757
7866
|
const columns = [{name: '_index',type: 'text', width: 32, placeholder: ""}];
|
|
7758
|
-
const allowEdit = options.permissions?.allowEdit &&
|
|
7867
|
+
const allowEdit = options.permissions?.allowEdit && !options.isLookup && options.enable_inline_edit != false;
|
|
7759
7868
|
|
|
7760
7869
|
for (const field of fields) {
|
|
7761
7870
|
//增加quickEdit属性,实现快速编辑
|
|
@@ -8293,7 +8402,7 @@ crudService && crudService.setData({showFieldsFilter: toShowFieldsFilter});
|
|
|
8293
8402
|
try{
|
|
8294
8403
|
// TODO: 不应该直接在这里取localStorage,应该从外面传入
|
|
8295
8404
|
const listName = api.data.listName;
|
|
8296
|
-
const listViewPropsStoreKey = location.pathname + "/crud
|
|
8405
|
+
const listViewPropsStoreKey = location.pathname + "/crud";
|
|
8297
8406
|
let localListViewProps = sessionStorage.getItem(listViewPropsStoreKey);
|
|
8298
8407
|
if(localListViewProps){
|
|
8299
8408
|
localListViewProps = JSON.parse(localListViewProps);
|
|
@@ -8494,7 +8603,7 @@ crudService && crudService.setData({showFieldsFilter: toShowFieldsFilter});
|
|
|
8494
8603
|
try{
|
|
8495
8604
|
// TODO: 不应该直接在这里取localStorage,应该从外面传入
|
|
8496
8605
|
const listName = api.body.listName;
|
|
8497
|
-
const listViewPropsStoreKey = location.pathname + "/crud
|
|
8606
|
+
const listViewPropsStoreKey = location.pathname + "/crud";
|
|
8498
8607
|
/**
|
|
8499
8608
|
* localListViewProps规范来自crud请求api中api.data.$self参数值的。
|
|
8500
8609
|
* 比如:{"perPage":20,"page":1,"__searchable__name":"7","__searchable__between__n1__c":[null,null],"filter":[["name","contains","a"]]}
|
|
@@ -9684,7 +9793,7 @@ crudService && crudService.setData({showFieldsFilter: toShowFieldsFilter});
|
|
|
9684
9793
|
}
|
|
9685
9794
|
}
|
|
9686
9795
|
// console.log(`getObjectHeaderToolbar====2===>`, options.filterVisible)
|
|
9687
|
-
bodyProps.headerToolbar = getObjectHeaderToolbar(objectSchema, options.formFactor, {
|
|
9796
|
+
bodyProps.headerToolbar = getObjectHeaderToolbar(objectSchema, fields, options.formFactor, {
|
|
9688
9797
|
showDisplayAs,
|
|
9689
9798
|
hiddenCount: options.queryCount === false,
|
|
9690
9799
|
headerToolbarItems: options.headerToolbarItems,
|
|
@@ -9809,6 +9918,7 @@ crudService && crudService.setData({showFieldsFilter: toShowFieldsFilter});
|
|
|
9809
9918
|
return {
|
|
9810
9919
|
type: 'service',
|
|
9811
9920
|
className: '',
|
|
9921
|
+
//目前crud的service层id不认用户自定义id,只支持默认规则id
|
|
9812
9922
|
id: `service_${id}`,
|
|
9813
9923
|
name: `page`,
|
|
9814
9924
|
data: {
|