@steedos-widgets/amis-object 6.10.1-beta.37 → 6.10.1-beta.39
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/amis/AmisInstanceDetail.d.ts +32 -23
- package/dist/amis-object.cjs.css +34 -3
- package/dist/amis-object.cjs.js +103 -51
- package/dist/amis-object.cjs.js.map +1 -1
- package/dist/amis-object.esm.css +34 -3
- package/dist/amis-object.esm.js +103 -51
- package/dist/amis-object.esm.js.map +1 -1
- package/dist/amis-object.umd.css +34 -3
- package/dist/amis-object.umd.js +52 -23
- package/dist/amis-object.umd.js.map +1 -1
- package/dist/assets.json +19 -19
- package/package.json +3 -3
|
@@ -332,41 +332,50 @@ export declare const AmisInstanceDetail: (props: any) => Promise<{
|
|
|
332
332
|
md: string;
|
|
333
333
|
valign: string;
|
|
334
334
|
} | {
|
|
335
|
-
body: (
|
|
335
|
+
body: ({
|
|
336
336
|
type: string;
|
|
337
|
-
|
|
337
|
+
label: string;
|
|
338
338
|
name: string;
|
|
339
339
|
hiddenOn: string;
|
|
340
340
|
required: boolean;
|
|
341
|
-
|
|
341
|
+
id?: undefined;
|
|
342
|
+
multiple?: undefined;
|
|
343
|
+
source?: undefined;
|
|
344
|
+
labelField?: undefined;
|
|
345
|
+
valueField?: undefined;
|
|
346
|
+
value?: undefined;
|
|
347
|
+
joinValues?: undefined;
|
|
348
|
+
extractValue?: undefined;
|
|
349
|
+
} | {
|
|
342
350
|
type: string;
|
|
343
351
|
label: string;
|
|
344
352
|
name: string;
|
|
345
353
|
id: string;
|
|
346
354
|
required: boolean;
|
|
347
355
|
hiddenOn: string;
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
next_step: string;
|
|
365
|
-
};
|
|
356
|
+
multiple: string;
|
|
357
|
+
source: {
|
|
358
|
+
url: string;
|
|
359
|
+
method: string;
|
|
360
|
+
sendOn: string;
|
|
361
|
+
headers: {
|
|
362
|
+
Authorization: string;
|
|
363
|
+
};
|
|
364
|
+
messages: {};
|
|
365
|
+
requestAdaptor: string;
|
|
366
|
+
adaptor: string;
|
|
367
|
+
data: {
|
|
368
|
+
"&": string;
|
|
369
|
+
$scopeId: string;
|
|
370
|
+
context: string;
|
|
371
|
+
next_step: string;
|
|
366
372
|
};
|
|
367
|
-
labelField: string;
|
|
368
|
-
valueField: string;
|
|
369
373
|
};
|
|
374
|
+
labelField: string;
|
|
375
|
+
valueField: string;
|
|
376
|
+
value: string;
|
|
377
|
+
joinValues: boolean;
|
|
378
|
+
extractValue: boolean;
|
|
370
379
|
})[];
|
|
371
380
|
id: string;
|
|
372
381
|
md?: undefined;
|
package/dist/amis-object.cjs.css
CHANGED
|
@@ -418,8 +418,8 @@ fieldset.antd-Collapse > legend{
|
|
|
418
418
|
--Menu-light-fontColor: var(--Layout-light-fontColor);
|
|
419
419
|
--Menu-light-fontColor-onHover: var(--Layout-light-fontColor);
|
|
420
420
|
--Menu-light-fontColor-onActive: var(--Layout-light--onActive);
|
|
421
|
-
--Menu-light-active-backgroundColor:
|
|
422
|
-
--Menu-light-backgroundColor-onHover: rgb(
|
|
421
|
+
--Menu-light-active-backgroundColor: rgb(240, 240, 240);
|
|
422
|
+
--Menu-light-backgroundColor-onHover: rgb(240, 240, 240);
|
|
423
423
|
--Menu-light-selectedIndicator-color: rgb(14, 165, 233);
|
|
424
424
|
--Nav-Item-height: 2.5rem;
|
|
425
425
|
/* --Nav-Item-height--horizontal: 2.5rem; */
|
|
@@ -3106,7 +3106,16 @@ body.sidebar #sidebar {
|
|
|
3106
3106
|
border: none !important;
|
|
3107
3107
|
box-shadow: none !important;
|
|
3108
3108
|
}
|
|
3109
|
-
.steedos-amis-instance-view .instance-form-view .antd-Form-static .antd-Form-control {
|
|
3109
|
+
.steedos-amis-instance-view .instance-form-view .antd-Form-static > .antd-Form-control {
|
|
3110
|
+
padding-left: 0.75rem;
|
|
3111
|
+
}
|
|
3112
|
+
.steedos-amis-instance-view .instance-form-view .antd-Form-control > .antd-Form-control {
|
|
3113
|
+
padding-left: 0px !important;
|
|
3114
|
+
}
|
|
3115
|
+
.steedos-amis-instance-view .instance-form-view .antd-Table-table thead tr th {
|
|
3116
|
+
padding-left: 0.75rem !important;
|
|
3117
|
+
}
|
|
3118
|
+
.steedos-amis-instance-view .instance-form-view .antd-Form-static.antd-Form-control {
|
|
3110
3119
|
padding-left: 0.75rem !important;
|
|
3111
3120
|
}
|
|
3112
3121
|
.steedos-amis-instance-view .instance-form-view .antd-Number {
|
|
@@ -3150,6 +3159,28 @@ body.sidebar #sidebar {
|
|
|
3150
3159
|
.steedos-amis-instance-view .form-control .antd-Table-table tbody td:first-child {
|
|
3151
3160
|
border-left: none !important;
|
|
3152
3161
|
}
|
|
3162
|
+
.steedos-amis-instance-view .form-control .antd-Table-table tbody tr:last-child td {
|
|
3163
|
+
border-bottom: none !important;
|
|
3164
|
+
}
|
|
3165
|
+
.steedos-amis-instance-view .form-control.steedos-input-table-editable .antd-Table-table tbody tr:last-child td {
|
|
3166
|
+
border-bottom: 1px solid #000 !important;
|
|
3167
|
+
}
|
|
3168
|
+
.steedos-amis-instance-view .form-control.steedos-input-table-editable .antd-Table-table tbody td:first-child {
|
|
3169
|
+
border-right: none !important;
|
|
3170
|
+
}
|
|
3171
|
+
.steedos-amis-instance-view .form-control.steedos-input-table-editable .antd-Table-table thead th:first-child {
|
|
3172
|
+
border-right: none !important;
|
|
3173
|
+
}
|
|
3174
|
+
.steedos-amis-instance-view .form-control.steedos-input-table-editable .antd-Table-table thead th:nth-child(2) {
|
|
3175
|
+
border-left: none !important;
|
|
3176
|
+
}
|
|
3177
|
+
.steedos-amis-instance-view .form-control .antd-InputTable thead tr th {
|
|
3178
|
+
background: transparent !important;
|
|
3179
|
+
border-left: 1px solid #000;
|
|
3180
|
+
}
|
|
3181
|
+
.steedos-amis-instance-view .form-control .antd-InputTable thead tr th:first-child {
|
|
3182
|
+
border-left: none !important;
|
|
3183
|
+
}
|
|
3153
3184
|
.steedos-amis-instance-view .form-control .antd-InputTable .antd-Table {
|
|
3154
3185
|
margin-bottom: 0px;
|
|
3155
3186
|
}
|
package/dist/amis-object.cjs.js
CHANGED
|
@@ -20124,6 +20124,13 @@ const getNextStepInput = async (instance) => {
|
|
|
20124
20124
|
return api;
|
|
20125
20125
|
`,
|
|
20126
20126
|
"adaptor": `
|
|
20127
|
+
if(payload.error){
|
|
20128
|
+
SteedosUI.notification.error({message: payload.error});
|
|
20129
|
+
return {
|
|
20130
|
+
status: 0,
|
|
20131
|
+
data: {}
|
|
20132
|
+
}
|
|
20133
|
+
}
|
|
20127
20134
|
payload.data = {
|
|
20128
20135
|
value: payload.nextSteps.length === 1 ? payload.nextSteps[0]._id : null,
|
|
20129
20136
|
options: _.map(payload.nextSteps, (item)=>{
|
|
@@ -20201,53 +20208,95 @@ const getNextStepUsersInput = async (instance) => {
|
|
|
20201
20208
|
},
|
|
20202
20209
|
{
|
|
20203
20210
|
body: [
|
|
20204
|
-
// TODO 处理下一步处理人默认值
|
|
20205
|
-
Object.assign({},
|
|
20206
|
-
{
|
|
20207
|
-
"type": "steedos-select-user"
|
|
20208
|
-
},
|
|
20209
20211
|
{
|
|
20212
|
+
type: "steedos-select-user",
|
|
20213
|
+
label: "",
|
|
20210
20214
|
name: "next_users",
|
|
20211
20215
|
hiddenOn: "this.new_next_step.deal_type != 'pickupAtRuntime'",
|
|
20212
20216
|
required: true
|
|
20213
|
-
}
|
|
20217
|
+
},
|
|
20214
20218
|
{
|
|
20215
|
-
type: "
|
|
20219
|
+
type: "list-select",
|
|
20216
20220
|
label: "",
|
|
20217
20221
|
name: "next_users",
|
|
20218
20222
|
id: "u:next_users",
|
|
20219
20223
|
required: true,
|
|
20220
20224
|
hiddenOn: "this.new_next_step.deal_type === 'pickupAtRuntime'",
|
|
20221
|
-
|
|
20222
|
-
|
|
20223
|
-
"
|
|
20224
|
-
|
|
20225
|
-
|
|
20226
|
-
|
|
20227
|
-
"
|
|
20228
|
-
"Authorization": "Bearer ${context.tenantId},${context.authToken}"
|
|
20229
|
-
},
|
|
20230
|
-
"messages": {
|
|
20231
|
-
},
|
|
20232
|
-
"requestAdaptor": "\nconst { context, next_step, $scopeId } = api.data;\nconst formValues = SteedosUI.getRef($scopeId).getComponentById(\"instance_form\").getValues();\n\napi.data = {\n instanceId: context._id,\n nextStepId: next_step._id,\n values: formValues\n}\n\n\n return api;",
|
|
20233
|
-
"adaptor": "\npayload.data = {value: payload.nextStepUsers.length === 1 ? payload.nextStepUsers[0].id : null, options: payload.nextStepUsers};\nreturn payload;",
|
|
20234
|
-
"data": {
|
|
20235
|
-
"&": "$$",
|
|
20236
|
-
"$scopeId": "$scopeId",
|
|
20237
|
-
"context": "${context}",
|
|
20238
|
-
"next_step": "${new_next_step}",
|
|
20239
|
-
}
|
|
20225
|
+
multiple: "this.new_next_step.deal_type === 'counterSign'",
|
|
20226
|
+
"source": {
|
|
20227
|
+
"url": "${context.rootUrl}/api/workflow/v2/nextStepUsers?next_step=${next_step}",
|
|
20228
|
+
"method": "post",
|
|
20229
|
+
"sendOn": "!!this.new_next_step && this.new_next_step.step_type != 'end'",
|
|
20230
|
+
"headers": {
|
|
20231
|
+
"Authorization": "Bearer ${context.tenantId},${context.authToken}"
|
|
20240
20232
|
},
|
|
20241
|
-
"
|
|
20242
|
-
|
|
20243
|
-
|
|
20244
|
-
|
|
20233
|
+
"messages": {
|
|
20234
|
+
},
|
|
20235
|
+
"requestAdaptor": "\nconst { next_step, $scopeId } = api.data;\nconst formValues = context._scoped.getComponentById(\"instance_form\").getValues();\n\napi.data = {\n instanceId: api.data.context._id,\n nextStepId: next_step._id,\n values: formValues\n}\n\n\n return api;",
|
|
20236
|
+
"adaptor": `
|
|
20237
|
+
if(payload.error){
|
|
20238
|
+
SteedosUI.notification.error({message: payload.error});
|
|
20239
|
+
return {
|
|
20240
|
+
status: 0,
|
|
20241
|
+
data: {}
|
|
20242
|
+
}
|
|
20243
|
+
}
|
|
20244
|
+
payload.data = {
|
|
20245
|
+
value: payload.nextStepUsers.length === 1 ? payload.nextStepUsers[0].id : null,
|
|
20246
|
+
options: payload.nextStepUsers
|
|
20247
|
+
};
|
|
20248
|
+
return payload;`,
|
|
20249
|
+
"data": {
|
|
20250
|
+
"&": "$$",
|
|
20251
|
+
"$scopeId": "$scopeId",
|
|
20252
|
+
"context": "${context}",
|
|
20253
|
+
"next_step": "${new_next_step}",
|
|
20254
|
+
}
|
|
20255
|
+
},
|
|
20256
|
+
"labelField": "name",
|
|
20257
|
+
"valueField": "id",
|
|
20258
|
+
value: '${new_next_step.approver_users}',
|
|
20259
|
+
"joinValues": false,
|
|
20260
|
+
"extractValue": true,
|
|
20261
|
+
},
|
|
20262
|
+
// {
|
|
20263
|
+
// type: "steedos-select-user",
|
|
20264
|
+
// label: "",
|
|
20265
|
+
// name: "next_users",
|
|
20266
|
+
// id: "u:next_users",
|
|
20267
|
+
// required: true,
|
|
20268
|
+
// hiddenOn: "this.new_next_step.deal_type === 'pickupAtRuntime'",
|
|
20269
|
+
// amis: {
|
|
20270
|
+
// multiple: "this.new_next_step.deal_type === 'counterSign'",
|
|
20271
|
+
// "source": {
|
|
20272
|
+
// "url": "${context.rootUrl}/api/workflow/v2/nextStepUsers",
|
|
20273
|
+
// "method": "post",
|
|
20274
|
+
// "sendOn": "!!this.new_next_step && this.new_next_step.step_type != 'end'",
|
|
20275
|
+
// "headers": {
|
|
20276
|
+
// "Authorization": "Bearer ${context.tenantId},${context.authToken}"
|
|
20277
|
+
// },
|
|
20278
|
+
// "messages": {
|
|
20279
|
+
// },
|
|
20280
|
+
// "requestAdaptor": "\nconst { next_step, $scopeId } = api.data;\nconst formValues = context._scoped.getComponentById(\"instance_form\").getValues();\n\napi.data = {\n instanceId: api.data.context._id,\n nextStepId: next_step._id,\n values: formValues\n}\n\n\n return api;",
|
|
20281
|
+
// "adaptor": "\npayload.data = {value: payload.nextStepUsers.length === 1 ? payload.nextStepUsers[0].id : null, options: payload.nextStepUsers};\nreturn payload;",
|
|
20282
|
+
// "data": {
|
|
20283
|
+
// "&": "$$",
|
|
20284
|
+
// "$scopeId": "$scopeId",
|
|
20285
|
+
// "context": "${context}",
|
|
20286
|
+
// "next_step": "${new_next_step}",
|
|
20287
|
+
// }
|
|
20288
|
+
// },
|
|
20289
|
+
// "labelField": "name",
|
|
20290
|
+
// "valueField": "id",
|
|
20291
|
+
// value: '${new_next_step.approver_users}',
|
|
20292
|
+
// }
|
|
20293
|
+
// }
|
|
20245
20294
|
],
|
|
20246
20295
|
id: "u:81a4913c61cc",
|
|
20247
20296
|
},
|
|
20248
20297
|
],
|
|
20249
20298
|
id: "u:ffff15b76c89",
|
|
20250
|
-
className: "b-a b-1x p-xs m-b-none m-l-none m-r-none m-t-sm",
|
|
20299
|
+
className: "b-a b-1x p-xs m-b-none m-l-none m-r-none m-t-sm ${record.step.step_type == 'counterSign' ? 'hidden' : ''}",
|
|
20251
20300
|
subFormMode: "",
|
|
20252
20301
|
hiddenOn: "!!!this.new_next_step || (this.new_next_step && this.new_next_step.step_type === 'end')"
|
|
20253
20302
|
};
|
|
@@ -20287,14 +20336,13 @@ const getPostSubmitRequestAdaptor = async (instance) => {
|
|
|
20287
20336
|
_id: "${instance.approve._id}",
|
|
20288
20337
|
next_steps: [{
|
|
20289
20338
|
step: approveValues.next_step,
|
|
20290
|
-
users: nextUsers,
|
|
20339
|
+
users: nextUsers || [],
|
|
20291
20340
|
}],
|
|
20292
20341
|
description: approveValues.suggestion,
|
|
20293
20342
|
values: formValues
|
|
20294
20343
|
}]
|
|
20295
20344
|
}]
|
|
20296
20345
|
}]};
|
|
20297
|
-
console.log('submit api', api);
|
|
20298
20346
|
api.data = body;
|
|
20299
20347
|
return api;
|
|
20300
20348
|
`;
|
|
@@ -20315,7 +20363,7 @@ const getPostEngineRequestAdaptor = async (instance) => {
|
|
|
20315
20363
|
_id: "${instance.approve._id}",
|
|
20316
20364
|
next_steps: [{
|
|
20317
20365
|
step: approveValues.next_step,
|
|
20318
|
-
users: nextUsers,
|
|
20366
|
+
users: nextUsers || [],
|
|
20319
20367
|
}],
|
|
20320
20368
|
description: approveValues.suggestion,
|
|
20321
20369
|
values: formValues
|
|
@@ -20333,7 +20381,6 @@ const getPostEngineRequestAdaptor = async (instance) => {
|
|
|
20333
20381
|
* @returns
|
|
20334
20382
|
*/
|
|
20335
20383
|
const getSubmitActions = async (instance) => {
|
|
20336
|
-
console.log(`getSubmitActions instance====`, instance);
|
|
20337
20384
|
let api = "";
|
|
20338
20385
|
let requestAdaptor = "";
|
|
20339
20386
|
if(instance.approve?.type == "cc"){
|
|
@@ -20350,9 +20397,6 @@ const getSubmitActions = async (instance) => {
|
|
|
20350
20397
|
return null; //TODO 考虑异常情况?
|
|
20351
20398
|
}
|
|
20352
20399
|
}
|
|
20353
|
-
console.log(`getSubmitActions api====`, api);
|
|
20354
|
-
console.log(`getSubmitActions requestAdaptor====`, requestAdaptor);
|
|
20355
|
-
console.log('getObjectListViewPath========>', Router$1.getObjectListViewPath({appId: "${appId}", objectName: "${objectName}", listViewName: "${side_listview_id}"}));
|
|
20356
20400
|
return [
|
|
20357
20401
|
// 校验表单
|
|
20358
20402
|
{
|
|
@@ -20360,7 +20404,6 @@ const getSubmitActions = async (instance) => {
|
|
|
20360
20404
|
"args": {},
|
|
20361
20405
|
"actionType": "custom",
|
|
20362
20406
|
"script": `
|
|
20363
|
-
console.log("======getSubmitActions");
|
|
20364
20407
|
const form = event.context.scoped.getComponentById("instance_form");
|
|
20365
20408
|
return form.validate().then((instanceFormValidate)=>{
|
|
20366
20409
|
event.setData({...event.data, instanceFormValidate})
|
|
@@ -20420,7 +20463,6 @@ const getSubmitActions = async (instance) => {
|
|
|
20420
20463
|
};
|
|
20421
20464
|
|
|
20422
20465
|
const getApprovalDrawerSchema = async (instance) => {
|
|
20423
|
-
console.log("=============getApprovalDrawerSchema=============", instance);
|
|
20424
20466
|
return {
|
|
20425
20467
|
type: "drawer",
|
|
20426
20468
|
overlay: false,
|
|
@@ -21138,12 +21180,15 @@ const getFieldEditTpl = async (field, label)=>{
|
|
|
21138
21180
|
// }
|
|
21139
21181
|
// break;
|
|
21140
21182
|
case "table":
|
|
21141
|
-
tpl.type = "steedos-input-table";
|
|
21183
|
+
tpl.type = "steedos-input-table";
|
|
21142
21184
|
tpl.addable = field.permission === "editable";
|
|
21143
21185
|
tpl.editable = tpl.addable;
|
|
21144
21186
|
tpl.copyable = tpl.addable;
|
|
21145
21187
|
tpl.removable = tpl.addable;
|
|
21146
21188
|
tpl.fields = [];
|
|
21189
|
+
if(tpl.editable){
|
|
21190
|
+
tpl.className = `${tpl.className || ''} steedos-input-table-editable`;
|
|
21191
|
+
}
|
|
21147
21192
|
for (const sField of field.fields) {
|
|
21148
21193
|
if (sField.type != "hidden") {
|
|
21149
21194
|
sField.permission = field.permission;
|
|
@@ -21170,7 +21215,6 @@ const getFieldEditTpl = async (field, label)=>{
|
|
|
21170
21215
|
};
|
|
21171
21216
|
|
|
21172
21217
|
const getFieldReadonlyTpl = async (field, label)=>{
|
|
21173
|
-
// console.log(`getFieldReadonlyTpl`, label, field)
|
|
21174
21218
|
const tpl = {
|
|
21175
21219
|
label: label === true ? field.name : false,
|
|
21176
21220
|
name: field.code,
|
|
@@ -21237,6 +21281,11 @@ const getFieldReadonlyTpl = async (field, label)=>{
|
|
|
21237
21281
|
}
|
|
21238
21282
|
}else if(field.type === 'html'){
|
|
21239
21283
|
tpl.type = 'tpl';
|
|
21284
|
+
}else if(field.type.startsWith("sfield-") || field.type === 'steedos-field'){
|
|
21285
|
+
tpl.type = 'steedos-field';
|
|
21286
|
+
tpl.config = field.steedos_field || field.config;
|
|
21287
|
+
tpl.static = true;
|
|
21288
|
+
tpl.inInputTable = true;
|
|
21240
21289
|
}
|
|
21241
21290
|
else {
|
|
21242
21291
|
tpl.type = 'static';
|
|
@@ -21251,6 +21300,9 @@ const getFieldReadonlyTpl = async (field, label)=>{
|
|
|
21251
21300
|
* @returns
|
|
21252
21301
|
*/
|
|
21253
21302
|
const getTdInputTpl = async (field, label) => {
|
|
21303
|
+
if(field.config?.amis?.name){
|
|
21304
|
+
delete field.config.amis.name;
|
|
21305
|
+
}
|
|
21254
21306
|
const edit = field.permission === "editable";
|
|
21255
21307
|
if(edit){
|
|
21256
21308
|
return await getFieldEditTpl(field, label)
|
|
@@ -21368,7 +21420,6 @@ const getFormTableView = async (instance) => {
|
|
|
21368
21420
|
trs: await getFormTrs(instance),
|
|
21369
21421
|
id: "u:047f3669468b",
|
|
21370
21422
|
};
|
|
21371
|
-
console.log('getFormTableView===>', instance, formSchema);
|
|
21372
21423
|
return formSchema;
|
|
21373
21424
|
};
|
|
21374
21425
|
|
|
@@ -21899,7 +21950,6 @@ const isCurrentStepOpinionField = (field, currentStep)=>{
|
|
|
21899
21950
|
|
|
21900
21951
|
|
|
21901
21952
|
const getInstanceInfo = async (props) => {
|
|
21902
|
-
console.log(`getInstanceInfo props`, props);
|
|
21903
21953
|
const { instanceId, box } = props;
|
|
21904
21954
|
const userId = getSteedosAuth().userId;
|
|
21905
21955
|
const query = `{
|
|
@@ -21983,7 +22033,6 @@ const getInstanceInfo = async (props) => {
|
|
|
21983
22033
|
});
|
|
21984
22034
|
|
|
21985
22035
|
const moment = getMoment$2();
|
|
21986
|
-
console.log('getInstanceInfo====>', step, formVersion.fields);
|
|
21987
22036
|
return {
|
|
21988
22037
|
box: box,
|
|
21989
22038
|
_id: instanceId,
|
|
@@ -27283,7 +27332,7 @@ var AmisGlobalHeader = function (props) { return __awaiter(void 0, void 0, void
|
|
|
27283
27332
|
body: [
|
|
27284
27333
|
{
|
|
27285
27334
|
type: "wrapper",
|
|
27286
|
-
className: 'sidebar-wrapper px-0 pt-0 pb-16 fixed z-20 h-full h-fill ease-in-out duration-300 flex flex-col
|
|
27335
|
+
className: 'sidebar-wrapper px-0 pt-0 pb-16 fixed z-20 h-full h-fill ease-in-out duration-300 flex flex-col overflow-y-auto block -translate-x-0 sm:w-[220px] w-64',
|
|
27287
27336
|
visibleOn: '${!!appId}',
|
|
27288
27337
|
body: [
|
|
27289
27338
|
{
|
|
@@ -27509,6 +27558,7 @@ var AmisSteedosField = function (props) { return __awaiter(void 0, void 0, void
|
|
|
27509
27558
|
steedosField = null;
|
|
27510
27559
|
field = props.field, _a = props.readonly, readonly = _a === void 0 ? false : _a, _b = props.ctx, ctx = _b === void 0 ? {} : _b, config = props.config, props.$schema, fStatic = props.static, env = props.env, inInputTable = props.inInputTable, className = props.className, isLookupInTable = props.isLookupInTable;
|
|
27511
27560
|
_c = props.data || {}, appId = _c.appId, formFactor = _c.formFactor;
|
|
27561
|
+
console.log("AmisSteedosField", props);
|
|
27512
27562
|
editorClassName = "";
|
|
27513
27563
|
if (props.$$editor) {
|
|
27514
27564
|
if (config.amis) {
|
|
@@ -27548,6 +27598,7 @@ var AmisSteedosField = function (props) { return __awaiter(void 0, void 0, void
|
|
|
27548
27598
|
// 字段配置为只读,强制走fStatic模式,加上_display判断是为了不影响历史代码,比如直接在ObjectForm中调用steedos-field组件
|
|
27549
27599
|
fStatic = true;
|
|
27550
27600
|
}
|
|
27601
|
+
console.log('=-----steedosField--->', fStatic, steedosField);
|
|
27551
27602
|
_6.label = 1;
|
|
27552
27603
|
case 1:
|
|
27553
27604
|
_6.trys.push([1, 22, , 23]);
|
|
@@ -27558,8 +27609,8 @@ var AmisSteedosField = function (props) { return __awaiter(void 0, void 0, void
|
|
|
27558
27609
|
}
|
|
27559
27610
|
defaultSource = {
|
|
27560
27611
|
"method": "post",
|
|
27561
|
-
"url": "
|
|
27562
|
-
"requestAdaptor": "\n var steedosField = ".concat(JSON.stringify(steedosField), ";\n // console.log('defaultSource====>steedosField', steedosField);\n var objectName, filters, valueFieldKey, labelFieldKey;\n if(_.isString(steedosField.reference_to)){\n // reference_to\u4E3A\u5355\u9009\n const referenceTo = getReferenceToSync(steedosField);\n const referenceToField = steedosField.reference_to_field || '_id';\n\n objectName = referenceTo.objectName\n valueFieldKey = referenceTo && referenceTo.valueField?.name || '_id' ;\n labelFieldKey = referenceTo && referenceTo.labelField?.name || 'name';\n
|
|
27612
|
+
"url": "/api/v1/:objectName/names",
|
|
27613
|
+
"requestAdaptor": "\n var steedosField = ".concat(JSON.stringify(steedosField), ";\n let ids = [];\n // console.log('defaultSource====>steedosField', steedosField);\n var objectName, filters, valueFieldKey, labelFieldKey;\n if(_.isString(steedosField.reference_to)){\n // reference_to\u4E3A\u5355\u9009\n const referenceTo = getReferenceToSync(steedosField);\n const referenceToField = steedosField.reference_to_field || '_id';\n\n objectName = referenceTo.objectName\n valueFieldKey = referenceTo && referenceTo.valueField?.name || '_id' ;\n labelFieldKey = referenceTo && referenceTo.labelField?.name || 'name';\n ids = _.get(api.data, steedosField.name);\n if(_.isString(ids)){\n ids = [ids]\n }\n }else{\n // reference_to\u4E3A\u591A\u9009\n const _steedosField = {\n ...steedosField,\n reference_to: api.data[steedosField.name].o\n }\n const referenceTo = getReferenceToSync(_steedosField);\n const referenceToField = _steedosField.reference_to_field || '_id';\n\n objectName = referenceTo.objectName\n valueFieldKey = referenceTo && referenceTo.valueField?.name || '_id' ;\n labelFieldKey = referenceTo && referenceTo.labelField?.name || 'name';\n ids = api.data[_steedosField.name] && api.data[_steedosField.name].ids;\n }\n\n api.url = '/api/v1/' + objectName + '/names';\n\n // \u989D\u5916\u8FD4\u56DE_id\u5B57\u6BB5\n api.data = {\n ids: ids || [],\n idKey: valueFieldKey\n }\n return api;\n "),
|
|
27563
27614
|
"trackExpression": "${" + steedosField.name + "}",
|
|
27564
27615
|
"cache": 3000
|
|
27565
27616
|
};
|
|
@@ -27581,7 +27632,7 @@ var AmisSteedosField = function (props) { return __awaiter(void 0, void 0, void
|
|
|
27581
27632
|
multiple: steedosField.multiple,
|
|
27582
27633
|
name: steedosField.name,
|
|
27583
27634
|
label: steedosField.label,
|
|
27584
|
-
static: true,
|
|
27635
|
+
// static: true,
|
|
27585
27636
|
required: steedosField.required,
|
|
27586
27637
|
className: "".concat(className || '', " ").concat(((_2 = steedosField.amis) === null || _2 === void 0 ? void 0 : _2.className) || '')
|
|
27587
27638
|
};
|
|
@@ -27792,7 +27843,7 @@ var AmisSteedosField = function (props) { return __awaiter(void 0, void 0, void
|
|
|
27792
27843
|
schema = Object.assign({}, fieldBaseProps, _$1.pick(steedosField.amis || {}, ['className', 'inline', 'label', 'labelAlign', 'name', 'labelRemark', 'description', 'placeholder', 'staticClassName', 'staticLabelClassName', 'staticInputClassName', 'staticSchema']));
|
|
27793
27844
|
schema.placeholder = "";
|
|
27794
27845
|
addEditorClass(schema, editorClassName);
|
|
27795
|
-
|
|
27846
|
+
console.log("steedos field [lookup] schema:", schema);
|
|
27796
27847
|
return [2 /*return*/, schema];
|
|
27797
27848
|
case 16:
|
|
27798
27849
|
if (!fStatic) return [3 /*break*/, 19];
|
|
@@ -28044,6 +28095,7 @@ var AmisSteedosField = function (props) { return __awaiter(void 0, void 0, void
|
|
|
28044
28095
|
}
|
|
28045
28096
|
Object.assign(schema, steedosField.amis || {});
|
|
28046
28097
|
addEditorClass(schema, editorClassName);
|
|
28098
|
+
console.log("798 AmisSteedosField return schema", schema, props);
|
|
28047
28099
|
return [2 /*return*/, schema];
|
|
28048
28100
|
case 19:
|
|
28049
28101
|
if (!ctx.className) {
|
|
@@ -28109,7 +28161,7 @@ var AmisSteedosField = function (props) { return __awaiter(void 0, void 0, void
|
|
|
28109
28161
|
case 20:
|
|
28110
28162
|
schema = _6.sent();
|
|
28111
28163
|
addEditorClass(schema, editorClassName);
|
|
28112
|
-
console.log("AmisSteedosField return schema", schema, props);
|
|
28164
|
+
console.log("863 AmisSteedosField return schema", schema, props);
|
|
28113
28165
|
return [2 /*return*/, schema];
|
|
28114
28166
|
case 21: return [3 /*break*/, 23];
|
|
28115
28167
|
case 22:
|