diff --git a/packages/designer/public/designer-canvas/empty1.json b/packages/designer/public/designer-canvas/empty1.json index 2a504418e8e78799509242643fd950491d8935ba..84f2cb1a342a990da75e97650c2d5ef5f7640c2f 100644 --- a/packages/designer/public/designer-canvas/empty1.json +++ b/packages/designer/public/designer-canvas/empty1.json @@ -1,1336 +1,1440 @@ { - "Header" : { - "Code" : "MobileVueTest", - "Type" : "MobileForm", - "NameSpace" : "Inspur.GS.MyDev.FarrisVueTest.VueFormTest.VueFormTest.Front", - "CertId" : null, - "Name" : "移动Vue测试", - "FileName" : "MobileVueTest.mfrm", - "BizobjectID" : "e34f063d-9c31-1e20-4ad7-c6b4f57ddfc9", - "Language" : null, - "Extendable" : false, - "NameLanguage" : { - "zh-CHS" : "移动Vue测试", - "en" : "", - "zh-CHT" : "" + "Header": { + "Code": "MobileVueTest", + "Type": "MobileForm", + "NameSpace": "Inspur.GS.MyDev.FarrisVueTest.VueFormTest.VueFormTest.Front", + "CertId": null, + "Name": "移动Vue测试", + "FileName": "MobileVueTest.mfrm", + "BizobjectID": "e34f063d-9c31-1e20-4ad7-c6b4f57ddfc9", + "Language": null, + "Extendable": false, + "NameLanguage": { + "zh-CHS": "移动Vue测试", + "en": "", + "zh-CHT": "" }, - "ID" : "af47af33-345b-471e-9a00-49db59c222a1", - "IsTranslating" : false + "ID": "af47af33-345b-471e-9a00-49db59c222a1", + "IsTranslating": false }, - "Refs" : [ { - "DependentMetadata" : { - "ID" : "1cfb0d2a-7300-4fc7-8d01-cd09a5df9198", - "CertId" : null, - "NameSpace" : "Inspur.GS.MyDev.FarrisVueTest.VueFormTest.VueFormTest.Front", - "Code" : "MobileVueTest.mfrm", - "Name" : "MobileVueTest.mfrm", - "Type" : "ResourceMetadata", - "BizobjectID" : "e34f063d-9c31-1e20-4ad7-c6b4f57ddfc9" + "Refs": [ + { + "DependentMetadata": { + "ID": "1cfb0d2a-7300-4fc7-8d01-cd09a5df9198", + "CertId": null, + "NameSpace": "Inspur.GS.MyDev.FarrisVueTest.VueFormTest.VueFormTest.Front", + "Code": "MobileVueTest.mfrm", + "Name": "MobileVueTest.mfrm", + "Type": "ResourceMetadata", + "BizobjectID": "e34f063d-9c31-1e20-4ad7-c6b4f57ddfc9" + } } - } ], - "Content" : { - "code" : null, - "name" : null, - "Id" : "af47af33-345b-471e-9a00-49db59c222a1", - "Contents" : { - "module" : { - "id" : "af47af33-345b-471e-9a00-49db59c222a1", - "code" : "MobileVueTest", - "name" : "移动Vue测试", - "type" : "Module", - "creator" : "lijiangkun", - "creationDate" : "2025-04-17T03:50:32.907Z", - "templateId" : "list-card-template", - "templateRule" : "list-card-template", - "entity" : [ { - "eapiId" : "29245968-6379-4c6c-a812-72e3411917c0", - "eapiCode" : null, - "eapiName" : null, - "eapiNameSpace" : null, - "voPath" : null, - "voNameSpace" : null, - "name" : "移动Vue测试_mfrm", - "id" : "0d20adf7-9ed1-44cf-a8f5-e9714353c174", - "extendProperties" : { - "enableStdTimeFormat" : true - }, - "sourceType" : "vo", - "variables" : [ ], - "code" : "MobileVueTest_mfrm", - "entities" : [ { - "name" : "Vue测试", - "id" : "fa4b4e84-11b2-40ce-b071-7b2cd5b93eed", - "type" : { - "$type" : "EntityType", - "fields" : [ { - "$type" : "SimpleField", - "defaultValue" : "", - "editor" : { - "$type" : "TextBox" - }, - "readonly" : false, - "multiLanguage" : false, - "require" : true, - "name" : "主键", - "id" : "389ab039-9b60-4dd0-8cdc-a23c0feccf31", - "type" : { - "$type" : "StringType", - "length" : 36, - "name" : "String", - "displayName" : "字符串" - }, - "path" : "ID", - "originalId" : "389ab039-9b60-4dd0-8cdc-a23c0feccf31", - "code" : "ID", - "label" : "id", - "bindingField" : "id", - "bindingPath" : "id" - }, { - "$type" : "SimpleField", - "defaultValue" : "", - "editor" : { - "$type" : "DateBox", - "format" : "'yyyy-MM-dd'" - }, - "readonly" : false, - "multiLanguage" : false, - "require" : false, - "name" : "版本", - "id" : "e3ca9955-1155-4a4b-a164-e48c31928c24", - "type" : { - "$type" : "DateTimeType", - "name" : "DateTime", - "displayName" : "日期时间" - }, - "path" : "Version", - "originalId" : "e3ca9955-1155-4a4b-a164-e48c31928c24", - "code" : "Version", - "label" : "version", - "bindingField" : "version", - "bindingPath" : "version" - }, { - "$type" : "ComplexField", - "name" : "状态", - "id" : "9fefd0ed-7594-43f7-a6f2-10828a4d00ae", - "type" : { - "$type" : "ObjectType", - "name" : "BillState9fef", - "fields" : [ { - "$type" : "SimpleField", - "defaultValue" : "", - "editor" : { - "$type" : "EnumField" - }, - "readonly" : false, - "multiLanguage" : false, - "require" : false, - "name" : "状态", - "id" : "9fefd0ed-0101-468f-ae3f-40c76c0f06b0", - "type" : { - "$type" : "EnumType", - "name" : "Enum", - "displayName" : "枚举", - "enumValues" : [ { - "disabled" : false, - "name" : "制单", - "value" : "Billing" - }, { - "disabled" : false, - "name" : "提交审批", - "value" : "SubmitApproval" - }, { - "disabled" : false, - "name" : "审批通过", - "value" : "Approved" - }, { - "disabled" : false, - "name" : "审批不通过", - "value" : "ApprovalNotPassed" - } ], - "valueType" : { - "$type" : "StringType", - "length" : 36, - "name" : "String", - "displayName" : "字符串" - } - }, - "path" : "BillStatus.BillState", - "originalId" : "a0b19650-0101-468f-ae3f-40c76c0f06b0", - "code" : "BillState", - "label" : "billState", - "bindingField" : "billStatus_BillState", - "bindingPath" : "billStatus.billState" - } ], - "displayName" : "状态" - }, - "path" : "BillStatus", - "originalId" : "9fefd0ed-7594-43f7-a6f2-10828a4d00ae", - "code" : "BillStatus", - "label" : "billStatus", - "bindingField" : "billStatus", - "bindingPath" : "billStatus" - }, { - "$type" : "ComplexField", - "name" : "流程实例", - "id" : "12ef9c5c-4ba3-4df4-bd0f-5672c3e0ecff", - "type" : { - "$type" : "ObjectType", - "name" : "ProcessInstance12ef", - "fields" : [ { - "$type" : "SimpleField", - "defaultValue" : "", - "editor" : { - "$type" : "TextBox" - }, - "readonly" : false, - "multiLanguage" : false, - "require" : false, - "name" : "流程实例", - "id" : "12ef9c5c-ad8f-4da3-a430-c8a7f2162135", - "type" : { - "$type" : "StringType", - "length" : 36, - "name" : "String", - "displayName" : "字符串" - }, - "path" : "ProcessInstance.ProcessInstance", - "originalId" : "2e1beb7d-ad8f-4da3-a430-c8a7f2162135", - "code" : "ProcessInstance", - "label" : "processInstance", - "bindingField" : "processInstance_ProcessInstance", - "bindingPath" : "processInstance.processInstance" - } ], - "displayName" : "流程实例" - }, - "path" : "ProcessInstance", - "originalId" : "12ef9c5c-4ba3-4df4-bd0f-5672c3e0ecff", - "code" : "ProcessInstance", - "label" : "processInstance", - "bindingField" : "processInstance", - "bindingPath" : "processInstance" - }, { - "$type" : "SimpleField", - "defaultValue" : "", - "editor" : { - "$type" : "TextBox" - }, - "readonly" : false, - "multiLanguage" : false, - "require" : false, - "name" : "编号", - "id" : "8537ca17-502f-4b90-ac87-ae1dde9a7f03", - "type" : { - "$type" : "StringType", - "length" : 36, - "name" : "String", - "displayName" : "字符串" - }, - "path" : "code", - "originalId" : "8537ca17-502f-4b90-ac87-ae1dde9a7f03", - "code" : "code", - "label" : "code", - "bindingField" : "code", - "bindingPath" : "code" - }, { - "$type" : "SimpleField", - "defaultValue" : "", - "editor" : { - "$type" : "TextBox" - }, - "readonly" : false, - "multiLanguage" : false, - "require" : false, - "name" : "名称", - "id" : "6a051d6e-f870-4a9f-84df-043cfbc26cf2", - "type" : { - "$type" : "StringType", - "length" : 36, - "name" : "String", - "displayName" : "字符串" - }, - "path" : "name", - "originalId" : "6a051d6e-f870-4a9f-84df-043cfbc26cf2", - "code" : "name", - "label" : "name", - "bindingField" : "name", - "bindingPath" : "name" - }, { - "$type" : "SimpleField", - "defaultValue" : "", - "editor" : { - "$type" : "SwitchField" - }, - "readonly" : false, - "multiLanguage" : false, - "require" : false, - "name" : "布尔字段", - "id" : "f51c1e5d-fe58-4591-8cd1-25a119c9f4c1", - "type" : { - "$type" : "BooleanType", - "name" : "Boolean", - "displayName" : "布尔" - }, - "path" : "booleanField", - "originalId" : "f51c1e5d-fe58-4591-8cd1-25a119c9f4c1", - "code" : "booleanField", - "label" : "booleanField", - "bindingField" : "booleanField", - "bindingPath" : "booleanField" - }, { - "$type" : "SimpleField", - "defaultValue" : "", - "editor" : { - "$type" : "NumericBox" - }, - "readonly" : false, - "multiLanguage" : false, - "require" : false, - "name" : "数值字段", - "id" : "1f816b38-2a72-4252-8eb6-760b8f97fcea", - "type" : { - "$type" : "NumericType", - "length" : 0, - "name" : "Number", - "displayName" : "数字", - "precision" : 0 - }, - "path" : "numberField", - "originalId" : "1f816b38-2a72-4252-8eb6-760b8f97fcea", - "code" : "numberField", - "label" : "numberField", - "bindingField" : "numberField", - "bindingPath" : "numberField" - }, { - "$type" : "SimpleField", - "defaultValue" : "", - "editor" : { - "$type" : "DateBox", - "format" : "'yyyy-MM-dd'" - }, - "readonly" : false, - "multiLanguage" : false, - "require" : false, - "name" : "日期字段", - "id" : "4911913b-1868-4b34-b4e0-84939b14ab6e", - "type" : { - "$type" : "DateType", - "name" : "Date", - "displayName" : "日期" - }, - "path" : "dateField", - "originalId" : "4911913b-1868-4b34-b4e0-84939b14ab6e", - "code" : "dateField", - "label" : "dateField", - "bindingField" : "dateField", - "bindingPath" : "dateField" - } ], - "primary" : "id", - "entities" : [ { - "name" : "子表1", - "id" : "97347b0b-1c54-432f-891a-4d7b139d6dbc", - "type" : { - "$type" : "EntityType", - "fields" : [ { - "$type" : "SimpleField", - "defaultValue" : "", - "editor" : { - "$type" : "TextBox" - }, - "readonly" : false, - "multiLanguage" : false, - "require" : true, - "name" : "主键", - "id" : "7d1363dc-bbb0-41ac-b52d-5cc12832bf58", - "type" : { - "$type" : "StringType", - "length" : 36, - "name" : "String", - "displayName" : "字符串" - }, - "path" : "ID", - "originalId" : "7d1363dc-bbb0-41ac-b52d-5cc12832bf58", - "code" : "ID", - "label" : "id", - "bindingField" : "id", - "bindingPath" : "id" - }, { - "$type" : "SimpleField", - "defaultValue" : "", - "editor" : { - "$type" : "TextBox" - }, - "readonly" : false, - "multiLanguage" : false, - "require" : true, - "name" : "上级对象主键", - "id" : "750cc77b-6562-4c83-9e5b-80ad5abb7bb8", - "type" : { - "$type" : "StringType", - "length" : 36, - "name" : "String", - "displayName" : "字符串" - }, - "path" : "ParentID", - "originalId" : "750cc77b-6562-4c83-9e5b-80ad5abb7bb8", - "code" : "ParentID", - "label" : "parentID", - "bindingField" : "parentID", - "bindingPath" : "parentID" - }, { - "$type" : "SimpleField", - "defaultValue" : "", - "editor" : { - "$type" : "TextBox" - }, - "readonly" : false, - "multiLanguage" : false, - "require" : false, - "name" : "编号", - "id" : "3c2b560e-5b8d-4781-b31f-719f83443df1", - "type" : { - "$type" : "StringType", - "length" : 36, - "name" : "String", - "displayName" : "字符串" - }, - "path" : "code", - "originalId" : "3c2b560e-5b8d-4781-b31f-719f83443df1", - "code" : "code", - "label" : "code", - "bindingField" : "code", - "bindingPath" : "code" - }, { - "$type" : "SimpleField", - "defaultValue" : "", - "editor" : { - "$type" : "TextBox" - }, - "readonly" : false, - "multiLanguage" : false, - "require" : false, - "name" : "名称", - "id" : "f89eb4ab-8d41-4fb5-a99d-013bd9242150", - "type" : { - "$type" : "StringType", - "length" : 36, - "name" : "String", - "displayName" : "字符串" - }, - "path" : "name", - "originalId" : "f89eb4ab-8d41-4fb5-a99d-013bd9242150", - "code" : "name", - "label" : "name", - "bindingField" : "name", - "bindingPath" : "name" - } ], - "primary" : "id", - "entities" : [ ], - "name" : "Child1", - "displayName" : "子表1" - }, - "code" : "Child1", - "label" : "child1s" - }, { - "name" : "子表2", - "id" : "e1c8145b-15d6-4a54-9d79-9149af8d6dc4", - "type" : { - "$type" : "EntityType", - "fields" : [ { - "$type" : "SimpleField", - "defaultValue" : "", - "editor" : { - "$type" : "TextBox" + ], + "Content": { + "code": null, + "name": null, + "Id": "af47af33-345b-471e-9a00-49db59c222a1", + "Contents": { + "module": { + "id": "af47af33-345b-471e-9a00-49db59c222a1", + "code": "MobileVueTest", + "name": "移动Vue测试", + "type": "Module", + "creator": "lijiangkun", + "creationDate": "2025-04-17T03:50:32.907Z", + "templateId": "list-card-template", + "templateRule": "list-card-template", + "entity": [ + { + "eapiId": "29245968-6379-4c6c-a812-72e3411917c0", + "eapiCode": null, + "eapiName": null, + "eapiNameSpace": null, + "voPath": null, + "voNameSpace": null, + "name": "移动Vue测试_mfrm", + "id": "0d20adf7-9ed1-44cf-a8f5-e9714353c174", + "extendProperties": { + "enableStdTimeFormat": true + }, + "sourceType": "vo", + "variables": [], + "code": "MobileVueTest_mfrm", + "entities": [ + { + "name": "Vue测试", + "id": "fa4b4e84-11b2-40ce-b071-7b2cd5b93eed", + "type": { + "$type": "EntityType", + "fields": [ + { + "$type": "SimpleField", + "defaultValue": "", + "editor": { + "$type": "TextBox" + }, + "readonly": false, + "multiLanguage": false, + "require": true, + "name": "主键", + "id": "389ab039-9b60-4dd0-8cdc-a23c0feccf31", + "type": { + "$type": "StringType", + "length": 36, + "name": "String", + "displayName": "字符串" + }, + "path": "ID", + "originalId": "389ab039-9b60-4dd0-8cdc-a23c0feccf31", + "code": "ID", + "label": "id", + "bindingField": "id", + "bindingPath": "id" }, - "readonly" : false, - "multiLanguage" : false, - "require" : true, - "name" : "主键", - "id" : "3a1e8cf0-9ad2-4eeb-b16b-e898a8b24be4", - "type" : { - "$type" : "StringType", - "length" : 36, - "name" : "String", - "displayName" : "字符串" + { + "$type": "SimpleField", + "defaultValue": "", + "editor": { + "$type": "DateBox", + "format": "'yyyy-MM-dd'" + }, + "readonly": false, + "multiLanguage": false, + "require": false, + "name": "版本", + "id": "e3ca9955-1155-4a4b-a164-e48c31928c24", + "type": { + "$type": "DateTimeType", + "name": "DateTime", + "displayName": "日期时间" + }, + "path": "Version", + "originalId": "e3ca9955-1155-4a4b-a164-e48c31928c24", + "code": "Version", + "label": "version", + "bindingField": "version", + "bindingPath": "version" }, - "path" : "ID", - "originalId" : "3a1e8cf0-9ad2-4eeb-b16b-e898a8b24be4", - "code" : "ID", - "label" : "id", - "bindingField" : "id", - "bindingPath" : "id" - }, { - "$type" : "SimpleField", - "defaultValue" : "", - "editor" : { - "$type" : "TextBox" + { + "$type": "ComplexField", + "name": "状态", + "id": "9fefd0ed-7594-43f7-a6f2-10828a4d00ae", + "type": { + "$type": "ObjectType", + "name": "BillState9fef", + "fields": [ + { + "$type": "SimpleField", + "defaultValue": "", + "editor": { + "$type": "EnumField" + }, + "readonly": false, + "multiLanguage": false, + "require": false, + "name": "状态", + "id": "9fefd0ed-0101-468f-ae3f-40c76c0f06b0", + "type": { + "$type": "EnumType", + "name": "Enum", + "displayName": "枚举", + "enumValues": [ + { + "disabled": false, + "name": "制单", + "value": "Billing" + }, + { + "disabled": false, + "name": "提交审批", + "value": "SubmitApproval" + }, + { + "disabled": false, + "name": "审批通过", + "value": "Approved" + }, + { + "disabled": false, + "name": "审批不通过", + "value": "ApprovalNotPassed" + } + ], + "valueType": { + "$type": "StringType", + "length": 36, + "name": "String", + "displayName": "字符串" + } + }, + "path": "BillStatus.BillState", + "originalId": "a0b19650-0101-468f-ae3f-40c76c0f06b0", + "code": "BillState", + "label": "billState", + "bindingField": "billStatus_BillState", + "bindingPath": "billStatus.billState" + } + ], + "displayName": "状态" + }, + "path": "BillStatus", + "originalId": "9fefd0ed-7594-43f7-a6f2-10828a4d00ae", + "code": "BillStatus", + "label": "billStatus", + "bindingField": "billStatus", + "bindingPath": "billStatus" }, - "readonly" : false, - "multiLanguage" : false, - "require" : true, - "name" : "上级对象主键", - "id" : "22649c9f-2483-4907-8a67-9fd70ce9b5e7", - "type" : { - "$type" : "StringType", - "length" : 36, - "name" : "String", - "displayName" : "字符串" + { + "$type": "ComplexField", + "name": "流程实例", + "id": "12ef9c5c-4ba3-4df4-bd0f-5672c3e0ecff", + "type": { + "$type": "ObjectType", + "name": "ProcessInstance12ef", + "fields": [ + { + "$type": "SimpleField", + "defaultValue": "", + "editor": { + "$type": "TextBox" + }, + "readonly": false, + "multiLanguage": false, + "require": false, + "name": "流程实例", + "id": "12ef9c5c-ad8f-4da3-a430-c8a7f2162135", + "type": { + "$type": "StringType", + "length": 36, + "name": "String", + "displayName": "字符串" + }, + "path": "ProcessInstance.ProcessInstance", + "originalId": "2e1beb7d-ad8f-4da3-a430-c8a7f2162135", + "code": "ProcessInstance", + "label": "processInstance", + "bindingField": "processInstance_ProcessInstance", + "bindingPath": "processInstance.processInstance" + } + ], + "displayName": "流程实例" + }, + "path": "ProcessInstance", + "originalId": "12ef9c5c-4ba3-4df4-bd0f-5672c3e0ecff", + "code": "ProcessInstance", + "label": "processInstance", + "bindingField": "processInstance", + "bindingPath": "processInstance" }, - "path" : "ParentID", - "originalId" : "22649c9f-2483-4907-8a67-9fd70ce9b5e7", - "code" : "ParentID", - "label" : "parentID", - "bindingField" : "parentID", - "bindingPath" : "parentID" - }, { - "$type" : "SimpleField", - "defaultValue" : "", - "editor" : { - "$type" : "TextBox" + { + "$type": "SimpleField", + "defaultValue": "", + "editor": { + "$type": "TextBox" + }, + "readonly": false, + "multiLanguage": false, + "require": false, + "name": "编号", + "id": "8537ca17-502f-4b90-ac87-ae1dde9a7f03", + "type": { + "$type": "StringType", + "length": 36, + "name": "String", + "displayName": "字符串" + }, + "path": "code", + "originalId": "8537ca17-502f-4b90-ac87-ae1dde9a7f03", + "code": "code", + "label": "code", + "bindingField": "code", + "bindingPath": "code" }, - "readonly" : false, - "multiLanguage" : false, - "require" : false, - "name" : "编号", - "id" : "bdc235f6-eded-443a-b95d-cf07fb4a741a", - "type" : { - "$type" : "StringType", - "length" : 36, - "name" : "String", - "displayName" : "字符串" + { + "$type": "SimpleField", + "defaultValue": "", + "editor": { + "$type": "TextBox" + }, + "readonly": false, + "multiLanguage": false, + "require": false, + "name": "名称", + "id": "6a051d6e-f870-4a9f-84df-043cfbc26cf2", + "type": { + "$type": "StringType", + "length": 36, + "name": "String", + "displayName": "字符串" + }, + "path": "name", + "originalId": "6a051d6e-f870-4a9f-84df-043cfbc26cf2", + "code": "name", + "label": "name", + "bindingField": "name", + "bindingPath": "name" }, - "path" : "code", - "originalId" : "bdc235f6-eded-443a-b95d-cf07fb4a741a", - "code" : "code", - "label" : "code", - "bindingField" : "code", - "bindingPath" : "code" - }, { - "$type" : "SimpleField", - "defaultValue" : "", - "editor" : { - "$type" : "TextBox" + { + "$type": "SimpleField", + "defaultValue": "", + "editor": { + "$type": "SwitchField" + }, + "readonly": false, + "multiLanguage": false, + "require": false, + "name": "布尔字段", + "id": "f51c1e5d-fe58-4591-8cd1-25a119c9f4c1", + "type": { + "$type": "BooleanType", + "name": "Boolean", + "displayName": "布尔" + }, + "path": "booleanField", + "originalId": "f51c1e5d-fe58-4591-8cd1-25a119c9f4c1", + "code": "booleanField", + "label": "booleanField", + "bindingField": "booleanField", + "bindingPath": "booleanField" }, - "readonly" : false, - "multiLanguage" : false, - "require" : false, - "name" : "名称", - "id" : "b5c97bc2-94e3-483c-8002-1352e103e9f6", - "type" : { - "$type" : "StringType", - "length" : 36, - "name" : "String", - "displayName" : "字符串" + { + "$type": "SimpleField", + "defaultValue": "", + "editor": { + "$type": "NumericBox" + }, + "readonly": false, + "multiLanguage": false, + "require": false, + "name": "数值字段", + "id": "1f816b38-2a72-4252-8eb6-760b8f97fcea", + "type": { + "$type": "NumericType", + "length": 0, + "name": "Number", + "displayName": "数字", + "precision": 0 + }, + "path": "numberField", + "originalId": "1f816b38-2a72-4252-8eb6-760b8f97fcea", + "code": "numberField", + "label": "numberField", + "bindingField": "numberField", + "bindingPath": "numberField" }, - "path" : "name", - "originalId" : "b5c97bc2-94e3-483c-8002-1352e103e9f6", - "code" : "name", - "label" : "name", - "bindingField" : "name", - "bindingPath" : "name" - } ], - "primary" : "id", - "entities" : [ ], - "name" : "Child2", - "displayName" : "子表2" - }, - "code" : "Child2", - "label" : "child2s" - } ], - "name" : "VueTest", - "displayName" : "Vue测试" - }, - "code" : "VueTest", - "label" : "vueTests" - } ], - "sourceUri" : "api/mydev/farrisvuetest/v1.0/MobileVueTest_mfrm" - } ], - "states" : [ ], - "stateMachines" : [ { - "id" : "MobileVueTest_list-page-component_state_machine", - "name" : "移动Vue测试_list-page-component状态机", - "uri" : "74843186-76b9-4ab3-8fad-c8ba64390c3c" - }, { - "id" : "MobileVueTest_card-page-component_state_machine", - "name" : "移动Vue测试_card-page-component状态机", - "uri" : "a39bf6b2-330a-4000-9d5e-82aa1c457edf" - } ], - "viewmodels" : [ { - "id" : "list-page-viewmodel", - "code" : "list-page-viewmodel", - "name" : "Vue测试", - "fields" : [ ], - "stateMachine" : "MobileVueTest_list-page-component_state_machine", - "commands" : [ { - "id" : "LoadPageForList", - "code" : "LoadPageForList", - "name" : "页面加载命令", - "params" : [ { - "name" : "commandName", - "shownName" : "命令名称", - "value" : "LoadDataForList" - }, { - "name" : "viewModelId", - "shownName" : "视图模型id", - "value" : "" - } ], - "handlerName" : "LoadPageForList", - "cmpId" : "cf5e568a-5243-4539-94ea-e195eb4d6736", - "extensions" : [ ], - "isInvalid" : false - }, { - "id" : "LoadDataForList", - "code" : "LoadDataForList", - "name" : "列表取数命令", - "params" : [ { - "name" : "filters", - "shownName" : "过滤条件", - "value" : "[]" - }, { - "name" : "sorts", - "shownName" : "排序条件", - "value" : "[]" - }, { - "name" : "autoMerge", - "shownName" : "是否合并过滤条件", - "value" : true - } ], - "handlerName" : "LoadForList", - "cmpId" : "0a68799b-48c6-4c9f-b0d7-140683c62b58", - "extensions" : [ ], - "isInvalid" : false - }, { - "id" : "OpenCardAndAdd", - "code" : "OpenCardAndAdd", - "name" : "打开卡片并新增命令", - "params" : [ { - "name" : "path", - "shownName" : "路由地址", - "value" : "/MobileVueTest/card-page-component" - }, { - "name" : "queryParams", - "shownName" : "携带参数", - "value" : "{ \"action\": \"LoadAndAddForCard\" }" - } ], - "handlerName" : "Navigate", - "cmpId" : "910661bd-963a-4287-aa32-441c95b8720f", - "extensions" : [ ], - "isInvalid" : false - }, { - "id" : "OpenCardAndEdit", - "code" : "OpenCardAndEdit", - "name" : "打开卡片并编辑命令", - "params" : [ { - "name" : "path", - "shownName" : "路由地址", - "value" : "/MobileVueTest/card-page-component" - }, { - "name" : "queryParams", - "shownName" : "携带参数", - "value" : "{ \"action\": \"LoadAndEditForCard\", \"id\":\"{DATA~/id}\"}" - } ], - "handlerName" : "Navigate", - "cmpId" : "910661bd-963a-4287-aa32-441c95b8720f", - "extensions" : [ ], - "isInvalid" : false - }, { - "id" : "OpenCardAndView", - "code" : "OpenCardAndView", - "name" : "打开卡片并查看命令", - "params" : [ { - "name" : "path", - "shownName" : "路由地址", - "value" : "/MobileVueTest/card-page-component" - }, { - "name" : "queryParams", - "shownName" : "携带参数", - "value" : "{ \"action\": \"LoadAndViewForCard\", \"id\":\"{DATA~/id}\"}" - } ], - "handlerName" : "Navigate", - "cmpId" : "910661bd-963a-4287-aa32-441c95b8720f", - "extensions" : [ ], - "isInvalid" : false - }, { - "id" : "RemoveById", - "code" : "RemoveById", - "name" : "删除命令", - "params" : [ { - "name" : "id", - "shownName" : "数据id", - "value" : "{DATA~/id}" - } ], - "handlerName" : "RemoveById", - "cmpId" : "dab6b7f1-f56f-490a-879c-3d74232cd3ba", - "extensions" : [ ], - "isInvalid" : false - }, { - "id" : "RemoveByIds", - "code" : "RemoveByIds", - "name" : "批量删除命令", - "params" : [ { - "name" : "ids", - "shownName" : "数据id的数组", - "value" : "" - } ], - "handlerName" : "RemoveByIds", - "cmpId" : "dab6b7f1-f56f-490a-879c-3d74232cd3ba", - "extensions" : [ ], - "isInvalid" : false - }, { - "id" : "GoBack", - "code" : "GoBack", - "name" : "返回命令", - "params" : [ { - "name" : "params", - "shownName" : "携带参数", - "value" : "{}" - } ], - "handlerName" : "GoBack", - "cmpId" : "910661bd-963a-4287-aa32-441c95b8720f", - "extensions" : [ ], - "isInvalid" : false - }, { - "id" : "77a277bf-6db3-4f7c-9418-1c12212ccab0", - "code" : "componentOnBeforeInit", - "name" : "列表页面初始化前事件", - "params" : [ ], - "handlerName" : "componentOnBeforeInit", - "cmpId" : "791cc5d9-65f9-40d0-b40c-444c7bc1afa3", - "shortcut" : { }, - "extensions" : [ ], - "isInvalid" : false - } ], - "states" : [ ], - "bindTo" : "/", - "parent" : null, - "enableValidation" : false - }, { - "id" : "card-page-viewmodel", - "code" : "card-page-viewmodel", - "name" : "卡片页面视图模型", - "fields" : [ { - "type" : "Form", - "id" : "389ab039-9b60-4dd0-8cdc-a23c0feccf31", - "fieldName" : "id", - "groupId" : null, - "groupName" : null, - "updateOn" : "blur" - }, { - "type" : "Form", - "id" : "e3ca9955-1155-4a4b-a164-e48c31928c24", - "fieldName" : "version", - "groupId" : null, - "groupName" : null, - "updateOn" : "blur" - }, { - "type" : "Form", - "id" : "9fefd0ed-0101-468f-ae3f-40c76c0f06b0", - "fieldName" : "billStatus_BillState", - "groupId" : null, - "groupName" : null, - "updateOn" : "change" - }, { - "type" : "Form", - "id" : "12ef9c5c-ad8f-4da3-a430-c8a7f2162135", - "fieldName" : "processInstance_ProcessInstance", - "groupId" : null, - "groupName" : null, - "updateOn" : "blur" - }, { - "type" : "Form", - "id" : "8537ca17-502f-4b90-ac87-ae1dde9a7f03", - "fieldName" : "code", - "groupId" : null, - "groupName" : null, - "updateOn" : "blur" - }, { - "type" : "Form", - "id" : "6a051d6e-f870-4a9f-84df-043cfbc26cf2", - "fieldName" : "name", - "groupId" : null, - "groupName" : null, - "updateOn" : "blur" - }, { - "type" : "Form", - "id" : "f51c1e5d-fe58-4591-8cd1-25a119c9f4c1", - "fieldName" : "booleanField", - "groupId" : null, - "groupName" : null, - "updateOn" : "blur" - }, { - "type" : "Form", - "id" : "1f816b38-2a72-4252-8eb6-760b8f97fcea", - "fieldName" : "numberField", - "groupId" : null, - "groupName" : null, - "updateOn" : "blur" - }, { - "type" : "Form", - "id" : "4911913b-1868-4b34-b4e0-84939b14ab6e", - "fieldName" : "dateField", - "groupId" : null, - "groupName" : null, - "updateOn" : "blur" - } ], - "stateMachine" : "MobileVueTest_card-page-component_state_machine", - "commands" : [ { - "id" : "LoadPageForCard", - "code" : "LoadPageForCard", - "name" : "卡片页面加载命令", - "params" : [ { - "name" : "commandName", - "shownName" : "命令名称", - "value" : "{UISTATE~/#{card-page-component}/routerState/queryParams/action}" - }, { - "name" : "viewModelId", - "shownName" : "视图模型id", - "value" : "" - } ], - "handlerName" : "LoadPageForCard", - "cmpId" : "cf5e568a-5243-4539-94ea-e195eb4d6736", - "extensions" : [ ], - "isInvalid" : false - }, { - "id" : "LoadAndAddForCard", - "code" : "LoadAndAddForCard", - "name" : "卡片加载并新增命令", - "params" : [ { - "name" : "action", - "shownName" : "状态迁移动作", - "value" : "editAction" - } ], - "handlerName" : "LoadAndAddForCard", - "cmpId" : "0a68799b-48c6-4c9f-b0d7-140683c62b58", - "extensions" : [ ], - "isInvalid" : false - }, { - "id" : "LoadAndEditForCard", - "code" : "LoadAndEditForCard", - "name" : "卡片加载并编辑命令", - "params" : [ { - "name" : "id", - "shownName" : "数据id", - "value" : "{UISTATE~/#{card-page-component}/routerState/queryParams/id}" - }, { - "name" : "action", - "shownName" : "状态迁移动作", - "value" : "editAction" - } ], - "handlerName" : "LoadAndEditForCard", - "cmpId" : "0a68799b-48c6-4c9f-b0d7-140683c62b58", - "extensions" : [ ], - "isInvalid" : false - }, { - "id" : "LoadAndViewForCard", - "code" : "LoadAndViewForCard", - "name" : "卡片加载并查看命令", - "params" : [ { - "name" : "id", - "shownName" : "数据id", - "value" : "{UISTATE~/#{card-page-component}/routerState/queryParams/id}" - }, { - "name" : "action", - "shownName" : "状态迁移动作", - "value" : "viewAction" - } ], - "handlerName" : "LoadAndViewForCard", - "cmpId" : "0a68799b-48c6-4c9f-b0d7-140683c62b58", - "extensions" : [ ], - "isInvalid" : false - }, { - "id" : "Save", - "code" : "Save", - "name" : "保存命令", - "params" : [ { - "name" : "action", - "shownName" : "状态迁移动作", - "value" : null - } ], - "handlerName" : "Save", - "cmpId" : "f863c66a-bf93-4d1f-9f99-bcd76009609d", - "extensions" : [ ], - "isInvalid" : false - }, { - "id" : "Cancel", - "code" : "Cancel", - "name" : "取消命令", - "params" : [ { - "name" : "id", - "shownName" : "数据id", - "value" : "{DATA~/id}" - }, { - "name" : "action", - "shownName" : "迁移动作", - "value" : null - } ], - "handlerName" : "Cancel", - "cmpId" : "05592163-fd45-474e-b0ab-61d7dc02e5c0", - "extensions" : [ ], - "isInvalid" : false - }, { - "id" : "GoBackAndCheck", - "code" : "GoBackAndCheck", - "name" : "返回并检查", - "params" : [ { - "name" : "params", - "shownName" : "返回携带参数", - "value" : "{}" - } ], - "handlerName" : "GoBackAndCheck", - "cmpId" : "910661bd-963a-4287-aa32-441c95b8720f", - "extensions" : [ ], - "isInvalid" : false - } ], - "states" : [ ], - "bindTo" : "/", - "parent" : null, - "enableValidation" : false - } ], - "components" : [ { - "id" : "card-page-component", - "type" : "component", - "title" : "卡片页面", - "componentType" : "page", - "pageType" : "Card", - "viewModel" : "card-page-viewmodel", - "appearance" : null, - "visible" : true, - "onBeforeInit" : null, - "onInit" : "LoadPageForCard", - "onLoadData" : null, - "goBack" : "GoBackAndCheck", - "contents" : [ { - "id" : "card-page-container", - "type" : "page-container", - "title" : "页面根容器", - "appearance" : null, - "visible" : true, - "contents" : [ { - "id" : "card-page-header-container", - "type" : "page-header-container", - "title" : "页头容器", - "appearance" : null, - "visible" : true, - "contents" : [ { - "id" : "card-page-navigation-bar", - "type" : "navbar", - "appearance" : null, - "title" : "卡片页面", - "text" : "导航栏", - "visible" : true, - "onLeftClick" : "GoBackAndCheck", - "rightToolbar" : { - "items" : [ { - "id" : "add-btn", - "type" : "tool-bar-item", - "appearance" : null, - "iconType" : "", - "disabled" : false, - "text" : "新增", - "visible" : true, - "onClick" : "LoadAndAddForCard" - }, { - "id" : "cancel-btn", - "type" : "tool-bar-item", - "appearance" : null, - "iconType" : "", - "disabled" : false, - "text" : "取消", - "visible" : true, - "onClick" : "Cancel" - } ] - } - } ] - }, { - "id" : "card-page-body-container", - "type" : "page-body-container", - "title" : "主内容容器", - "appearance" : null, - "visible" : true, - "contents" : [ { - "id" : "card-page-form-container", - "type" : "form", - "title" : "Form组件容器", - "appearance" : null, - "contents" : [ { - "id" : "form_id", - "type" : "form-group", - "appearance" : null, - "label" : "主键", - "binding" : { - "type" : "Form", - "path" : "id", - "field" : "389ab039-9b60-4dd0-8cdc-a23c0feccf31", - "fullPath" : "ID" - }, - "editor" : { - "type" : "input-group", - "required" : true, - "readonly" : { - "type" : "StateMachine", - "field" : "canEdit", - "status" : false - }, - "maxLength" : 36 - }, - "path" : "id" - }, { - "id" : "form_version", - "type" : "form-group", - "appearance" : null, - "label" : "版本", - "binding" : { - "type" : "Form", - "path" : "version", - "field" : "e3ca9955-1155-4a4b-a164-e48c31928c24", - "fullPath" : "Version" - }, - "editor" : { - "type" : "datetime-picker", - "required" : false, - "readonly" : { - "type" : "StateMachine", - "field" : "canEdit", - "status" : false + { + "$type": "SimpleField", + "defaultValue": "", + "editor": { + "$type": "DateBox", + "format": "'yyyy-MM-dd'" + }, + "readonly": false, + "multiLanguage": false, + "require": false, + "name": "日期字段", + "id": "4911913b-1868-4b34-b4e0-84939b14ab6e", + "type": { + "$type": "DateType", + "name": "Date", + "displayName": "日期" + }, + "path": "dateField", + "originalId": "4911913b-1868-4b34-b4e0-84939b14ab6e", + "code": "dateField", + "label": "dateField", + "bindingField": "dateField", + "bindingPath": "dateField" + } + ], + "primary": "id", + "entities": [ + { + "name": "子表1", + "id": "97347b0b-1c54-432f-891a-4d7b139d6dbc", + "type": { + "$type": "EntityType", + "fields": [ + { + "$type": "SimpleField", + "defaultValue": "", + "editor": { + "$type": "TextBox" + }, + "readonly": false, + "multiLanguage": false, + "require": true, + "name": "主键", + "id": "7d1363dc-bbb0-41ac-b52d-5cc12832bf58", + "type": { + "$type": "StringType", + "length": 36, + "name": "String", + "displayName": "字符串" + }, + "path": "ID", + "originalId": "7d1363dc-bbb0-41ac-b52d-5cc12832bf58", + "code": "ID", + "label": "id", + "bindingField": "id", + "bindingPath": "id" + }, + { + "$type": "SimpleField", + "defaultValue": "", + "editor": { + "$type": "TextBox" + }, + "readonly": false, + "multiLanguage": false, + "require": true, + "name": "上级对象主键", + "id": "750cc77b-6562-4c83-9e5b-80ad5abb7bb8", + "type": { + "$type": "StringType", + "length": 36, + "name": "String", + "displayName": "字符串" + }, + "path": "ParentID", + "originalId": "750cc77b-6562-4c83-9e5b-80ad5abb7bb8", + "code": "ParentID", + "label": "parentID", + "bindingField": "parentID", + "bindingPath": "parentID" + }, + { + "$type": "SimpleField", + "defaultValue": "", + "editor": { + "$type": "TextBox" + }, + "readonly": false, + "multiLanguage": false, + "require": false, + "name": "编号", + "id": "3c2b560e-5b8d-4781-b31f-719f83443df1", + "type": { + "$type": "StringType", + "length": 36, + "name": "String", + "displayName": "字符串" + }, + "path": "code", + "originalId": "3c2b560e-5b8d-4781-b31f-719f83443df1", + "code": "code", + "label": "code", + "bindingField": "code", + "bindingPath": "code" + }, + { + "$type": "SimpleField", + "defaultValue": "", + "editor": { + "$type": "TextBox" + }, + "readonly": false, + "multiLanguage": false, + "require": false, + "name": "名称", + "id": "f89eb4ab-8d41-4fb5-a99d-013bd9242150", + "type": { + "$type": "StringType", + "length": 36, + "name": "String", + "displayName": "字符串" + }, + "path": "name", + "originalId": "f89eb4ab-8d41-4fb5-a99d-013bd9242150", + "code": "name", + "label": "name", + "bindingField": "name", + "bindingPath": "name" + } + ], + "primary": "id", + "entities": [], + "name": "Child1", + "displayName": "子表1" + }, + "code": "Child1", + "label": "child1s" }, - "displayFormat" : "yyyy-MM-dd HH:mm:ss" - }, - "path" : "version" - }, { - "id" : "form_billStatus_BillState", - "type" : "form-group", - "appearance" : null, - "label" : "状态", - "binding" : { - "type" : "Form", - "path" : "billStatus_BillState", - "field" : "9fefd0ed-0101-468f-ae3f-40c76c0f06b0", - "fullPath" : "BillStatus.BillState" - }, - "editor" : { - "type" : "picker", - "data" : [ { - "disabled" : false, - "name" : "制单", - "value" : "Billing" - }, { - "disabled" : false, - "name" : "提交审批", - "value" : "SubmitApproval" - }, { - "disabled" : false, - "name" : "审批通过", - "value" : "Approved" - }, { - "disabled" : false, - "name" : "审批不通过", - "value" : "ApprovalNotPassed" - } ], - "textField" : "name", - "valueField" : "value", - "required" : false, - "readonly" : { - "type" : "StateMachine", - "field" : "canEdit", - "status" : false + { + "name": "子表2", + "id": "e1c8145b-15d6-4a54-9d79-9149af8d6dc4", + "type": { + "$type": "EntityType", + "fields": [ + { + "$type": "SimpleField", + "defaultValue": "", + "editor": { + "$type": "TextBox" + }, + "readonly": false, + "multiLanguage": false, + "require": true, + "name": "主键", + "id": "3a1e8cf0-9ad2-4eeb-b16b-e898a8b24be4", + "type": { + "$type": "StringType", + "length": 36, + "name": "String", + "displayName": "字符串" + }, + "path": "ID", + "originalId": "3a1e8cf0-9ad2-4eeb-b16b-e898a8b24be4", + "code": "ID", + "label": "id", + "bindingField": "id", + "bindingPath": "id" + }, + { + "$type": "SimpleField", + "defaultValue": "", + "editor": { + "$type": "TextBox" + }, + "readonly": false, + "multiLanguage": false, + "require": true, + "name": "上级对象主键", + "id": "22649c9f-2483-4907-8a67-9fd70ce9b5e7", + "type": { + "$type": "StringType", + "length": 36, + "name": "String", + "displayName": "字符串" + }, + "path": "ParentID", + "originalId": "22649c9f-2483-4907-8a67-9fd70ce9b5e7", + "code": "ParentID", + "label": "parentID", + "bindingField": "parentID", + "bindingPath": "parentID" + }, + { + "$type": "SimpleField", + "defaultValue": "", + "editor": { + "$type": "TextBox" + }, + "readonly": false, + "multiLanguage": false, + "require": false, + "name": "编号", + "id": "bdc235f6-eded-443a-b95d-cf07fb4a741a", + "type": { + "$type": "StringType", + "length": 36, + "name": "String", + "displayName": "字符串" + }, + "path": "code", + "originalId": "bdc235f6-eded-443a-b95d-cf07fb4a741a", + "code": "code", + "label": "code", + "bindingField": "code", + "bindingPath": "code" + }, + { + "$type": "SimpleField", + "defaultValue": "", + "editor": { + "$type": "TextBox" + }, + "readonly": false, + "multiLanguage": false, + "require": false, + "name": "名称", + "id": "b5c97bc2-94e3-483c-8002-1352e103e9f6", + "type": { + "$type": "StringType", + "length": 36, + "name": "String", + "displayName": "字符串" + }, + "path": "name", + "originalId": "b5c97bc2-94e3-483c-8002-1352e103e9f6", + "code": "name", + "label": "name", + "bindingField": "name", + "bindingPath": "name" + } + ], + "primary": "id", + "entities": [], + "name": "Child2", + "displayName": "子表2" + }, + "code": "Child2", + "label": "child2s" } + ], + "name": "VueTest", + "displayName": "Vue测试" + }, + "code": "VueTest", + "label": "vueTests" + } + ], + "sourceUri": "api/mydev/farrisvuetest/v1.0/MobileVueTest_mfrm" + } + ], + "states": [], + "stateMachines": [ + { + "id": "MobileVueTest_list-page-component_state_machine", + "name": "移动Vue测试_list-page-component状态机", + "uri": "74843186-76b9-4ab3-8fad-c8ba64390c3c" + }, + { + "id": "MobileVueTest_card-page-component_state_machine", + "name": "移动Vue测试_card-page-component状态机", + "uri": "a39bf6b2-330a-4000-9d5e-82aa1c457edf" + } + ], + "viewmodels": [ + { + "id": "list-page-viewmodel", + "code": "list-page-viewmodel", + "name": "Vue测试", + "fields": [], + "stateMachine": "MobileVueTest_list-page-component_state_machine", + "commands": [ + { + "id": "LoadPageForList", + "code": "LoadPageForList", + "name": "页面加载命令", + "params": [ + { + "name": "commandName", + "shownName": "命令名称", + "value": "LoadDataForList" }, - "path" : "billStatus.billState" - }, { - "id" : "form_processInstance_ProcessInstance", - "type" : "form-group", - "appearance" : null, - "label" : "流程实例", - "binding" : { - "type" : "Form", - "path" : "processInstance_ProcessInstance", - "field" : "12ef9c5c-ad8f-4da3-a430-c8a7f2162135", - "fullPath" : "ProcessInstance.ProcessInstance" + { + "name": "viewModelId", + "shownName": "视图模型id", + "value": "" + } + ], + "handlerName": "LoadPageForList", + "cmpId": "cf5e568a-5243-4539-94ea-e195eb4d6736", + "extensions": [], + "isInvalid": false + }, + { + "id": "LoadDataForList", + "code": "LoadDataForList", + "name": "列表取数命令", + "params": [ + { + "name": "filters", + "shownName": "过滤条件", + "value": "[]" }, - "editor" : { - "type" : "input-group", - "required" : false, - "readonly" : { - "type" : "StateMachine", - "field" : "canEdit", - "status" : false - }, - "maxLength" : 36 + { + "name": "sorts", + "shownName": "排序条件", + "value": "[]" }, - "path" : "processInstance.processInstance" - }, { - "id" : "form_code", - "type" : "form-group", - "appearance" : null, - "label" : "编号", - "binding" : { - "type" : "Form", - "path" : "code", - "field" : "8537ca17-502f-4b90-ac87-ae1dde9a7f03", - "fullPath" : "code" + { + "name": "autoMerge", + "shownName": "是否合并过滤条件", + "value": true + } + ], + "handlerName": "LoadForList", + "cmpId": "0a68799b-48c6-4c9f-b0d7-140683c62b58", + "extensions": [], + "isInvalid": false + }, + { + "id": "OpenCardAndAdd", + "code": "OpenCardAndAdd", + "name": "打开卡片并新增命令", + "params": [ + { + "name": "path", + "shownName": "路由地址", + "value": "/MobileVueTest/card-page-component" }, - "editor" : { - "type" : "input-group", - "required" : false, - "readonly" : { - "type" : "StateMachine", - "field" : "canEdit", - "status" : false - }, - "maxLength" : 36 + { + "name": "queryParams", + "shownName": "携带参数", + "value": "{ \"action\": \"LoadAndAddForCard\" }" + } + ], + "handlerName": "Navigate", + "cmpId": "910661bd-963a-4287-aa32-441c95b8720f", + "extensions": [], + "isInvalid": false + }, + { + "id": "OpenCardAndEdit", + "code": "OpenCardAndEdit", + "name": "打开卡片并编辑命令", + "params": [ + { + "name": "path", + "shownName": "路由地址", + "value": "/MobileVueTest/card-page-component" }, - "path" : "code" - }, { - "id" : "form_name", - "type" : "form-group", - "appearance" : null, - "label" : "名称", - "binding" : { - "type" : "Form", - "path" : "name", - "field" : "6a051d6e-f870-4a9f-84df-043cfbc26cf2", - "fullPath" : "name" + { + "name": "queryParams", + "shownName": "携带参数", + "value": "{ \"action\": \"LoadAndEditForCard\", \"id\":\"{DATA~/id}\"}" + } + ], + "handlerName": "Navigate", + "cmpId": "910661bd-963a-4287-aa32-441c95b8720f", + "extensions": [], + "isInvalid": false + }, + { + "id": "OpenCardAndView", + "code": "OpenCardAndView", + "name": "打开卡片并查看命令", + "params": [ + { + "name": "path", + "shownName": "路由地址", + "value": "/MobileVueTest/card-page-component" }, - "editor" : { - "type" : "input-group", - "required" : false, - "readonly" : { - "type" : "StateMachine", - "field" : "canEdit", - "status" : false - }, - "maxLength" : 36 + { + "name": "queryParams", + "shownName": "携带参数", + "value": "{ \"action\": \"LoadAndViewForCard\", \"id\":\"{DATA~/id}\"}" + } + ], + "handlerName": "Navigate", + "cmpId": "910661bd-963a-4287-aa32-441c95b8720f", + "extensions": [], + "isInvalid": false + }, + { + "id": "RemoveById", + "code": "RemoveById", + "name": "删除命令", + "params": [ + { + "name": "id", + "shownName": "数据id", + "value": "{DATA~/id}" + } + ], + "handlerName": "RemoveById", + "cmpId": "dab6b7f1-f56f-490a-879c-3d74232cd3ba", + "extensions": [], + "isInvalid": false + }, + { + "id": "RemoveByIds", + "code": "RemoveByIds", + "name": "批量删除命令", + "params": [ + { + "name": "ids", + "shownName": "数据id的数组", + "value": "" + } + ], + "handlerName": "RemoveByIds", + "cmpId": "dab6b7f1-f56f-490a-879c-3d74232cd3ba", + "extensions": [], + "isInvalid": false + }, + { + "id": "GoBack", + "code": "GoBack", + "name": "返回命令", + "params": [ + { + "name": "params", + "shownName": "携带参数", + "value": "{}" + } + ], + "handlerName": "GoBack", + "cmpId": "910661bd-963a-4287-aa32-441c95b8720f", + "extensions": [], + "isInvalid": false + }, + { + "id": "77a277bf-6db3-4f7c-9418-1c12212ccab0", + "code": "componentOnBeforeInit", + "name": "列表页面初始化前事件", + "params": [], + "handlerName": "componentOnBeforeInit", + "cmpId": "791cc5d9-65f9-40d0-b40c-444c7bc1afa3", + "shortcut": {}, + "extensions": [], + "isInvalid": false + } + ], + "states": [], + "bindTo": "/", + "parent": null, + "enableValidation": false + }, + { + "id": "card-page-viewmodel", + "code": "card-page-viewmodel", + "name": "卡片页面视图模型", + "fields": [], + "stateMachine": "MobileVueTest_card-page-component_state_machine", + "commands": [ + { + "id": "LoadPageForCard", + "code": "LoadPageForCard", + "name": "卡片页面加载命令", + "params": [ + { + "name": "commandName", + "shownName": "命令名称", + "value": "{UISTATE~/#{card-page-component}/routerState/queryParams/action}" }, - "path" : "name" - }, { - "id" : "form_booleanField", - "type" : "form-group", - "appearance" : null, - "label" : "布尔字段", - "binding" : { - "type" : "Form", - "path" : "booleanField", - "field" : "f51c1e5d-fe58-4591-8cd1-25a119c9f4c1", - "fullPath" : "booleanField" + { + "name": "viewModelId", + "shownName": "视图模型id", + "value": "" + } + ], + "handlerName": "LoadPageForCard", + "cmpId": "cf5e568a-5243-4539-94ea-e195eb4d6736", + "extensions": [], + "isInvalid": false + }, + { + "id": "LoadAndAddForCard", + "code": "LoadAndAddForCard", + "name": "卡片加载并新增命令", + "params": [ + { + "name": "action", + "shownName": "状态迁移动作", + "value": "editAction" + } + ], + "handlerName": "LoadAndAddForCard", + "cmpId": "0a68799b-48c6-4c9f-b0d7-140683c62b58", + "extensions": [], + "isInvalid": false + }, + { + "id": "LoadAndEditForCard", + "code": "LoadAndEditForCard", + "name": "卡片加载并编辑命令", + "params": [ + { + "name": "id", + "shownName": "数据id", + "value": "{UISTATE~/#{card-page-component}/routerState/queryParams/id}" }, - "editor" : { - "type" : "switch", - "required" : false, - "readonly" : { - "type" : "StateMachine", - "field" : "canEdit", - "status" : false - } + { + "name": "action", + "shownName": "状态迁移动作", + "value": "editAction" + } + ], + "handlerName": "LoadAndEditForCard", + "cmpId": "0a68799b-48c6-4c9f-b0d7-140683c62b58", + "extensions": [], + "isInvalid": false + }, + { + "id": "LoadAndViewForCard", + "code": "LoadAndViewForCard", + "name": "卡片加载并查看命令", + "params": [ + { + "name": "id", + "shownName": "数据id", + "value": "{UISTATE~/#{card-page-component}/routerState/queryParams/id}" }, - "path" : "booleanField" - }, { - "id" : "form_numberField", - "type" : "form-group", - "appearance" : null, - "label" : "数值字段", - "binding" : { - "type" : "Form", - "path" : "numberField", - "field" : "1f816b38-2a72-4252-8eb6-760b8f97fcea", - "fullPath" : "numberField" + { + "name": "action", + "shownName": "状态迁移动作", + "value": "viewAction" + } + ], + "handlerName": "LoadAndViewForCard", + "cmpId": "0a68799b-48c6-4c9f-b0d7-140683c62b58", + "extensions": [], + "isInvalid": false + }, + { + "id": "Save", + "code": "Save", + "name": "保存命令", + "params": [ + { + "name": "action", + "shownName": "状态迁移动作", + "value": null + } + ], + "handlerName": "Save", + "cmpId": "f863c66a-bf93-4d1f-9f99-bcd76009609d", + "extensions": [], + "isInvalid": false + }, + { + "id": "Cancel", + "code": "Cancel", + "name": "取消命令", + "params": [ + { + "name": "id", + "shownName": "数据id", + "value": "{DATA~/id}" }, - "editor" : { - "type" : "number-input", - "precision" : 0, - "required" : false, - "readonly" : { - "type" : "StateMachine", - "field" : "canEdit", - "status" : false - }, - "maxLength" : 0 - }, - "path" : "numberField" - }, { - "id" : "form_dateField", - "type" : "form-group", - "appearance" : null, - "label" : "日期字段", - "binding" : { - "type" : "Form", - "path" : "dateField", - "field" : "4911913b-1868-4b34-b4e0-84939b14ab6e", - "fullPath" : "dateField" + { + "name": "action", + "shownName": "迁移动作", + "value": null + } + ], + "handlerName": "Cancel", + "cmpId": "05592163-fd45-474e-b0ab-61d7dc02e5c0", + "extensions": [], + "isInvalid": false + }, + { + "id": "GoBackAndCheck", + "code": "GoBackAndCheck", + "name": "返回并检查", + "params": [ + { + "name": "params", + "shownName": "返回携带参数", + "value": "{}" + } + ], + "handlerName": "GoBackAndCheck", + "cmpId": "910661bd-963a-4287-aa32-441c95b8720f", + "extensions": [], + "isInvalid": false + } + ], + "states": [], + "bindTo": "/", + "parent": null, + "enableValidation": false + } + ], + "components": [ + { + "id": "card-page-component", + "type": "component", + "title": "卡片页面", + "componentType": "page", + "pageType": "Card", + "viewModel": "card-page-viewmodel", + "appearance": null, + "visible": true, + "onBeforeInit": null, + "onInit": "LoadPageForCard", + "onLoadData": null, + "goBack": "GoBackAndCheck", + "contents": [ + { + "id": "card-page-container", + "type": "page-container", + "title": "页面根容器", + "appearance": null, + "visible": true, + "contents": [ + { + "id": "card-page-header-container", + "type": "page-header-container", + "title": "页头容器", + "appearance": null, + "visible": true, + "contents": [ + { + "id": "card-page-navigation-bar", + "type": "navbar", + "appearance": null, + "title": "卡片页面", + "text": "导航栏", + "visible": true, + "onLeftClick": "GoBackAndCheck", + "rightToolbar": { + "items": [ + { + "id": "add-btn", + "type": "tool-bar-item", + "appearance": null, + "iconType": "", + "disabled": false, + "text": "新增", + "visible": true, + "onClick": "LoadAndAddForCard" + }, + { + "id": "cancel-btn", + "type": "tool-bar-item", + "appearance": null, + "iconType": "", + "disabled": false, + "text": "取消", + "visible": true, + "onClick": "Cancel" + } + ] + } + } + ] }, - "editor" : { - "type" : "date-picker", - "required" : false, - "readonly" : { - "type" : "StateMachine", - "field" : "canEdit", - "status" : false - }, - "displayFormat" : "yyyy-MM-dd" + { + "id": "card-page-body-container", + "type": "page-body-container", + "title": "主内容容器", + "appearance": null, + "visible": true, + "contents": [ + { + "id": "card-page-form-container", + "type": "form", + "title": "Form组件容器", + "appearance": null, + "contents": [ + { + "id": "form_id", + "type": "form-group", + "appearance": null, + "label": "主键", + "binding": { + "type": "Form", + "path": "id", + "field": "389ab039-9b60-4dd0-8cdc-a23c0feccf31", + "fullPath": "ID" + }, + "editor": { + "type": "radio-group", + "required": true, + "readonly": { + "type": "StateMachine", + "field": "canEdit", + "status": false + }, + "maxLength": 36 + }, + "path": "id" + }, + { + "id": "form_version", + "type": "form-group", + "appearance": null, + "label": "版本", + "binding": { + "type": "Form", + "path": "version", + "field": "e3ca9955-1155-4a4b-a164-e48c31928c24", + "fullPath": "Version" + }, + "editor": { + "type": "datetime-picker", + "required": false, + "readonly": { + "type": "StateMachine", + "field": "canEdit", + "status": false + }, + "displayFormat": "yyyy-MM-dd HH:mm:ss" + }, + "path": "version" + }, + { + "id": "form_billStatus_BillState", + "type": "form-group", + "appearance": null, + "label": "状态", + "binding": { + "type": "Form", + "path": "billStatus_BillState", + "field": "9fefd0ed-0101-468f-ae3f-40c76c0f06b0", + "fullPath": "BillStatus.BillState" + }, + "editor": { + "type": "picker", + "data": [ + { + "disabled": false, + "name": "制单", + "value": "Billing" + }, + { + "disabled": false, + "name": "提交审批", + "value": "SubmitApproval" + }, + { + "disabled": false, + "name": "审批通过", + "value": "Approved" + }, + { + "disabled": false, + "name": "审批不通过", + "value": "ApprovalNotPassed" + } + ], + "textField": "name", + "valueField": "value", + "required": false, + "readonly": { + "type": "StateMachine", + "field": "canEdit", + "status": false + } + }, + "path": "billStatus.billState" + }, + { + "id": "form_processInstance_ProcessInstance", + "type": "form-group", + "appearance": null, + "label": "流程实例", + "binding": { + "type": "Form", + "path": "processInstance_ProcessInstance", + "field": "12ef9c5c-ad8f-4da3-a430-c8a7f2162135", + "fullPath": "ProcessInstance.ProcessInstance" + }, + "editor": { + "type": "input-group", + "required": false, + "readonly": { + "type": "StateMachine", + "field": "canEdit", + "status": false + }, + "maxLength": 36 + }, + "path": "processInstance.processInstance" + }, + { + "id": "form_code", + "type": "form-group", + "appearance": null, + "label": "编号", + "binding": { + "type": "Form", + "path": "code", + "field": "8537ca17-502f-4b90-ac87-ae1dde9a7f03", + "fullPath": "code" + }, + "editor": { + "type": "input-group", + "required": false, + "readonly": { + "type": "StateMachine", + "field": "canEdit", + "status": false + }, + "maxLength": 36 + }, + "path": "code" + }, + { + "id": "form_name", + "type": "form-group", + "appearance": null, + "label": "名称", + "binding": { + "type": "Form", + "path": "name", + "field": "6a051d6e-f870-4a9f-84df-043cfbc26cf2", + "fullPath": "name" + }, + "editor": { + "type": "input-group", + "required": false, + "readonly": { + "type": "StateMachine", + "field": "canEdit", + "status": false + }, + "maxLength": 36 + }, + "path": "name" + }, + { + "id": "form_booleanField", + "type": "form-group", + "appearance": null, + "label": "布尔字段", + "binding": { + "type": "Form", + "path": "booleanField", + "field": "f51c1e5d-fe58-4591-8cd1-25a119c9f4c1", + "fullPath": "booleanField" + }, + "editor": { + "type": "switch", + "required": false, + "readonly": { + "type": "StateMachine", + "field": "canEdit", + "status": false + } + }, + "path": "booleanField" + }, + { + "id": "form_numberField", + "type": "form-group", + "appearance": null, + "label": "数值字段", + "binding": { + "type": "Form", + "path": "numberField", + "field": "1f816b38-2a72-4252-8eb6-760b8f97fcea", + "fullPath": "numberField" + }, + "editor": { + "type": "number-input", + "precision": 0, + "required": false, + "readonly": { + "type": "StateMachine", + "field": "canEdit", + "status": false + }, + "maxLength": 0 + }, + "path": "numberField" + }, + { + "id": "form_dateField", + "type": "form-group", + "appearance": null, + "label": "日期字段", + "binding": { + "type": "Form", + "path": "dateField", + "field": "4911913b-1868-4b34-b4e0-84939b14ab6e", + "fullPath": "dateField" + }, + "editor": { + "type": "date-picker", + "required": false, + "readonly": { + "type": "StateMachine", + "field": "canEdit", + "status": false + }, + "displayFormat": "yyyy-MM-dd" + }, + "path": "dateField" + } + ] + } + ] }, - "path" : "dateField" - } ] - } ] - }, { - "id" : "card-page-footer-container", - "type" : "page-footer-container", - "title" : "页尾容器", - "appearance" : null, - "size" : null, - "position" : null, - "visible" : true, - "contents" : [ { - "id" : "card-page-buttongroup-container", - "type" : "content-container", - "appearance" : null, - "size" : null, - "padding" : { - "left" : 16, - "right" : 16, - "top" : 8, - "bottom" : 8 - }, - "display" : "flex", - "flexBox" : { - "direction" : "row" - }, - "visible" : true, - "title" : "按钮组容器", - "contents" : [ { - "id" : "card-page-save-button", - "type" : "button", - "title" : "保存按钮", - "visible" : true, - "round" : true, - "disabled" : false, - "text" : "按钮", - "icon" : "图标", - "block" : true, - "displayType" : "primary", - "onClick" : "Save" - } ] - } ] - } ] - } ], - "route" : { - "id" : "card-page-component", - "uri" : "card-page-component", - "name" : "card-page-component", - "params" : [ ] + { + "id": "card-page-footer-container", + "type": "page-footer-container", + "title": "页尾容器", + "appearance": null, + "size": null, + "position": null, + "visible": true, + "contents": [ + { + "id": "card-page-buttongroup-container", + "type": "content-container", + "appearance": null, + "size": null, + "padding": { + "left": 16, + "right": 16, + "top": 8, + "bottom": 8 + }, + "display": "flex", + "flexBox": { + "direction": "row" + }, + "visible": true, + "title": "按钮组容器", + "contents": [ + { + "id": "card-page-save-button", + "type": "button", + "title": "保存按钮", + "visible": true, + "round": true, + "disabled": false, + "text": "按钮", + "icon": "图标", + "block": true, + "displayType": "primary", + "onClick": "Save" + } + ] + } + ] + } + ] + } + ], + "route": { + "id": "card-page-component", + "uri": "card-page-component", + "name": "card-page-component", + "params": [] + } + } + ], + "webcmds": [ + { + "id": "cf5e568a-5243-4539-94ea-e195eb4d6736", + "path": "Gsp/Mobile/MobileCmp/bo-mobilecmp/metadata/webcmd", + "name": "LoadPageCommands.webcmd", + "refedHandlers": [ + { + "host": "LoadPageForList", + "handler": "LoadPageForList" + }, + { + "host": "LoadPageForCard", + "handler": "LoadPageForCard" + } + ], + "code": "LoadPageCommands", + "nameSpace": "Inspur.GS.Gsp.Mobile.MobileCmp" + }, + { + "id": "0a68799b-48c6-4c9f-b0d7-140683c62b58", + "path": "Gsp/Mobile/MobileCmp/bo-mobilecmp/metadata/webcmd", + "name": "LoadCommands.webcmd", + "refedHandlers": [ + { + "host": "LoadDataForList", + "handler": "LoadForList" + }, + { + "host": "LoadAndAddForCard", + "handler": "LoadAndAddForCard" + }, + { + "host": "LoadAndEditForCard", + "handler": "LoadAndEditForCard" + }, + { + "host": "LoadAndViewForCard", + "handler": "LoadAndViewForCard" + } + ], + "code": "LoadCommands", + "nameSpace": "Inspur.GS.Gsp.Mobile.MobileCmp" + }, + { + "id": "910661bd-963a-4287-aa32-441c95b8720f", + "path": "Gsp/Mobile/MobileCmp/bo-mobilecmp/metadata/webcmd", + "name": "NavigateCommands.webcmd", + "refedHandlers": [ + { + "host": "OpenCardAndAdd", + "handler": "Navigate" + }, + { + "host": "OpenCardAndEdit", + "handler": "Navigate" + }, + { + "host": "OpenCardAndView", + "handler": "Navigate" + }, + { + "host": "GoBack", + "handler": "GoBack" + }, + { + "host": "GoBackAndCheck", + "handler": "GoBackAndCheck" + } + ], + "code": "NavigateCommands", + "nameSpace": "Inspur.GS.Gsp.Mobile.MobileCmp" + }, + { + "id": "dab6b7f1-f56f-490a-879c-3d74232cd3ba", + "path": "Gsp/Mobile/MobileCmp/bo-mobilecmp/metadata/webcmd", + "name": "RemoveCommands.webcmd", + "refedHandlers": [ + { + "host": "RemoveById", + "handler": "RemoveById" + }, + { + "host": "RemoveByIds", + "handler": "RemoveByIds" + } + ], + "code": "RemoveCommands", + "nameSpace": "Inspur.GS.Gsp.Mobile.MobileCmp" + }, + { + "id": "f863c66a-bf93-4d1f-9f99-bcd76009609d", + "path": "Gsp/Mobile/MobileCmp/bo-mobilecmp/metadata/webcmd", + "name": "SaveCommands.webcmd", + "refedHandlers": [ + { + "host": "Save", + "handler": "Save" + } + ], + "code": "SaveCommands", + "nameSpace": "Inspur.GS.Gsp.Mobile.MobileCmp" + }, + { + "id": "05592163-fd45-474e-b0ab-61d7dc02e5c0", + "path": "Gsp/Mobile/MobileCmp/bo-mobilecmp/metadata/webcmd", + "name": "CancelCommands.webcmd", + "refedHandlers": [ + { + "host": "Cancel", + "handler": "Cancel" + } + ], + "code": "CancelCommands", + "nameSpace": "Inspur.GS.Gsp.Mobile.MobileCmp" + }, + { + "id": "791cc5d9-65f9-40d0-b40c-444c7bc1afa3", + "path": "MyDev/FarrisVueTest/VueFormTest/bo-vueformtest-front/metadata/components", + "name": "MobileVueTest_frm_Controller.webcmd", + "refedHandlers": [ + { + "host": "77a277bf-6db3-4f7c-9418-1c12212ccab0", + "handler": "componentOnBeforeInit" + } + ], + "code": "MobileVueTest_frm_Controller", + "nameSpace": "Inspur.GS.MyDev.FarrisVueTest.VueFormTest.VueFormTest.Front" } - } ], - "webcmds" : [ { - "id" : "cf5e568a-5243-4539-94ea-e195eb4d6736", - "path" : "Gsp/Mobile/MobileCmp/bo-mobilecmp/metadata/webcmd", - "name" : "LoadPageCommands.webcmd", - "refedHandlers" : [ { - "host" : "LoadPageForList", - "handler" : "LoadPageForList" - }, { - "host" : "LoadPageForCard", - "handler" : "LoadPageForCard" - } ], - "code" : "LoadPageCommands", - "nameSpace" : "Inspur.GS.Gsp.Mobile.MobileCmp" - }, { - "id" : "0a68799b-48c6-4c9f-b0d7-140683c62b58", - "path" : "Gsp/Mobile/MobileCmp/bo-mobilecmp/metadata/webcmd", - "name" : "LoadCommands.webcmd", - "refedHandlers" : [ { - "host" : "LoadDataForList", - "handler" : "LoadForList" - }, { - "host" : "LoadAndAddForCard", - "handler" : "LoadAndAddForCard" - }, { - "host" : "LoadAndEditForCard", - "handler" : "LoadAndEditForCard" - }, { - "host" : "LoadAndViewForCard", - "handler" : "LoadAndViewForCard" - } ], - "code" : "LoadCommands", - "nameSpace" : "Inspur.GS.Gsp.Mobile.MobileCmp" - }, { - "id" : "910661bd-963a-4287-aa32-441c95b8720f", - "path" : "Gsp/Mobile/MobileCmp/bo-mobilecmp/metadata/webcmd", - "name" : "NavigateCommands.webcmd", - "refedHandlers" : [ { - "host" : "OpenCardAndAdd", - "handler" : "Navigate" - }, { - "host" : "OpenCardAndEdit", - "handler" : "Navigate" - }, { - "host" : "OpenCardAndView", - "handler" : "Navigate" - }, { - "host" : "GoBack", - "handler" : "GoBack" - }, { - "host" : "GoBackAndCheck", - "handler" : "GoBackAndCheck" - } ], - "code" : "NavigateCommands", - "nameSpace" : "Inspur.GS.Gsp.Mobile.MobileCmp" - }, { - "id" : "dab6b7f1-f56f-490a-879c-3d74232cd3ba", - "path" : "Gsp/Mobile/MobileCmp/bo-mobilecmp/metadata/webcmd", - "name" : "RemoveCommands.webcmd", - "refedHandlers" : [ { - "host" : "RemoveById", - "handler" : "RemoveById" - }, { - "host" : "RemoveByIds", - "handler" : "RemoveByIds" - } ], - "code" : "RemoveCommands", - "nameSpace" : "Inspur.GS.Gsp.Mobile.MobileCmp" - }, { - "id" : "f863c66a-bf93-4d1f-9f99-bcd76009609d", - "path" : "Gsp/Mobile/MobileCmp/bo-mobilecmp/metadata/webcmd", - "name" : "SaveCommands.webcmd", - "refedHandlers" : [ { - "host" : "Save", - "handler" : "Save" - } ], - "code" : "SaveCommands", - "nameSpace" : "Inspur.GS.Gsp.Mobile.MobileCmp" - }, { - "id" : "05592163-fd45-474e-b0ab-61d7dc02e5c0", - "path" : "Gsp/Mobile/MobileCmp/bo-mobilecmp/metadata/webcmd", - "name" : "CancelCommands.webcmd", - "refedHandlers" : [ { - "host" : "Cancel", - "handler" : "Cancel" - } ], - "code" : "CancelCommands", - "nameSpace" : "Inspur.GS.Gsp.Mobile.MobileCmp" - }, { - "id" : "791cc5d9-65f9-40d0-b40c-444c7bc1afa3", - "path" : "MyDev/FarrisVueTest/VueFormTest/bo-vueformtest-front/metadata/components", - "name" : "MobileVueTest_frm_Controller.webcmd", - "refedHandlers" : [ { - "host" : "77a277bf-6db3-4f7c-9418-1c12212ccab0", - "handler" : "componentOnBeforeInit" - } ], - "code" : "MobileVueTest_frm_Controller", - "nameSpace" : "Inspur.GS.MyDev.FarrisVueTest.VueFormTest.VueFormTest.Front" - } ], - "projectName" : "bo-vueformtest-front", - "customClass" : { }, - "actions" : [ ] + ], + "projectName": "bo-vueformtest-front", + "customClass": {}, + "actions": [] } }, - "CreationDate" : null + "CreationDate": null }, - "ExtendRule" : null, - "RelativePath" : "MyDev/FarrisVueTest/VueFormTest/bo-vueformtest-front/metadata/components", - "ExtendProperty" : "", - "Extended" : false, - "PreviousVersion" : null, - "Version" : null, - "Properties" : { - "SchemaVersion" : null, - "CacheVersion" : null, - "Framework" : "Vue" + "ExtendRule": null, + "RelativePath": "MyDev/FarrisVueTest/VueFormTest/bo-vueformtest-front/metadata/components", + "ExtendProperty": "", + "Extended": false, + "PreviousVersion": null, + "Version": null, + "Properties": { + "SchemaVersion": null, + "CacheVersion": null, + "Framework": "Vue" } } \ No newline at end of file diff --git a/packages/designer/src/components/composition/control-creator/use-mobile-control-creator.ts b/packages/designer/src/components/composition/control-creator/use-mobile-control-creator.ts index 08635720fc671b8b312660b62f7d1a8f0a487009..447f33c544f3867852f5ba20178c87be9ab3122e 100644 --- a/packages/designer/src/components/composition/control-creator/use-mobile-control-creator.ts +++ b/packages/designer/src/components/composition/control-creator/use-mobile-control-creator.ts @@ -1,8 +1,8 @@ -import { getSchemaByType } from "@farris/ui-vue/components"; +import { getSchemaByTypeForDesigner } from "@farris/mobile-ui-vue"; import { FormBindingType, EntityObjectField, EntityObjectFieldTypeName, UseControlCreator } from "../../types"; import { PageMetadataConverter } from "../page-metadata-converter"; -export function useMobileControlCreator(): UseControlCreator { +export function useMobileControlCreator(): UseControlCreator { /** * 配置输入控件属性 * @param field schema字段 @@ -10,9 +10,10 @@ export function useMobileControlCreator(): UseControlCreator { * @param controlClass 输入控件样式 * @returns */ - function setFormFieldProperty(field: EntityObjectField, editorType?: string, controlClass = 'col-12 col-md-6 col-xl-3 col-el-2'): any { + function setFormFieldProperty(field: EntityObjectField, editorType?: string, controlClass = ''): any { - const formGroupMetadata = getSchemaByType('form-group') || {}; + const formGroupMetadata = getSchemaByTypeForDesigner('form-group') || {}; + console.log(111) formGroupMetadata.id = field.id.length > 8 ? field.id.slice(0, 8) : field.id; formGroupMetadata.id = field.bindingField + '_' + formGroupMetadata.id.replace(/-/g, '_') + '_' + Math.random().toString(36).substr(2, 4); formGroupMetadata.label = field.name; @@ -26,7 +27,7 @@ export function useMobileControlCreator(): UseControlCreator { formGroupMetadata.path = field.bindingPath; const metadataConverter = new PageMetadataConverter(); const resolvedEditorType = editorType || metadataConverter.getRealEditorType(field?.editor?.$type || ''); - const formEditor = getSchemaByType(resolvedEditorType) || {}; + const formEditor = getSchemaByTypeForDesigner(resolvedEditorType) || {}; formGroupMetadata.editor = formEditor; if (field.require) { @@ -166,7 +167,7 @@ export function useMobileControlCreator(): UseControlCreator { function setGridFieldProperty(gridType: string, field: EntityObjectField, metadata: any, needInlineEditor = false): any { const metadataConverter = new PageMetadataConverter(); if (!metadata) { - metadata = getSchemaByType(gridType, {}); + metadata = getSchemaByTypeForDesigner(gridType, {}); } if (!metadata || !field) { return; @@ -224,12 +225,12 @@ export function useMobileControlCreator(): UseControlCreator { * @param controlClass 输入控件样式 */ function createFormGroupWithoutField(editorType = 'input-group', controlClass = '') { - const formGroupMetadata = getSchemaByType('form-group') || {}; + const formGroupMetadata = getSchemaByTypeForDesigner('form-group') || {}; formGroupMetadata.id = `${editorType}_${Math.random().toString(36).substr(2, 4)}`; formGroupMetadata.appearance = { class: controlClass || '' }; formGroupMetadata.binding = null; - const formEditor = getSchemaByType(editorType) || {}; + const formEditor = getSchemaByTypeForDesigner(editorType) || {}; formGroupMetadata.editor = formEditor; return formGroupMetadata; diff --git a/packages/designer/src/components/designer.component.tsx b/packages/designer/src/components/designer.component.tsx index c5f3ca67c6405cd783cdec67d3245c1214c0bc97..b708d0afdb58e68903a13bcebb07dbe9338763be 100644 --- a/packages/designer/src/components/designer.component.tsx +++ b/packages/designer/src/components/designer.component.tsx @@ -107,6 +107,7 @@ export default defineComponent({ // 初始化设计器上下文 const formSchemaType = designerHostService.usePageMetadataComposition.formSchemaType as Ref; designerContextRef.value = useDesignerContext(formSchemaType); + // 控件创建服务 const controlCreatorService = designerContextRef.value.useControlCreator(); designerHostService.controlCreator = controlCreatorService; @@ -120,9 +121,6 @@ export default defineComponent({ designerHostService.stateMachine.queryStateMachineMetadata(); }); }); - designerHostService.usePageMetadataComposition.getType().then((formMetadataBasicInfo)=>{ - formSchemType.value = formMetadataBasicInfo; - }) }); const metadataPath: string = inject(MetadataPathToken, ''); diff --git a/packages/designer/src/components/types/metadata.ts b/packages/designer/src/components/types/metadata.ts index 224439c0746b2d35f95aecb2f8d791e5da85bd7b..3f1f4ca280176dc1085acc24ee2dc7720e08e812 100644 --- a/packages/designer/src/components/types/metadata.ts +++ b/packages/designer/src/components/types/metadata.ts @@ -4,6 +4,7 @@ import { DesignViewModel } from "./design-viewmodel"; import { EntitySchema, EntityObject, EntityObjectField } from "./entity-schema"; import { ViewVariable, ViewModel, ViewModelField } from "./view-model"; import { ExternalComponentSchema } from "../components/form-designer/components/external-component-panel/composition/types"; +import { FormSchemaEntityField } from "@farris/mobile-ui-vue/components/common"; export interface PageOptions { /** 启用静态文本 */ diff --git a/packages/mobile-ui-vue/components/common/src/properties/input-base-property.ts b/packages/mobile-ui-vue/components/common/src/properties/input-base-property.ts index 44a5dc3a65712be6aac5f48774b0afd4a810fb10..8e4bf7cbee74cefefbe46849d5b3b0ba4db6abd1 100644 --- a/packages/mobile-ui-vue/components/common/src/properties/input-base-property.ts +++ b/packages/mobile-ui-vue/components/common/src/properties/input-base-property.ts @@ -160,8 +160,8 @@ export class InputBaseProperty extends BaseControlProperty { return { canChangeControlType: false, editorTypeList: [{ - key: propertyData.editor.type, - value: DgControl[propertyData.editor.type]?.name || propertyData.editor.type + key: propertyData.type, + value: DgControl[propertyData.type]?.name || propertyData.type }] }; } diff --git a/packages/mobile-ui-vue/components/form-item/src/designer/response-form-use-designer-rules.ts b/packages/mobile-ui-vue/components/form-item/src/designer/response-form-use-designer-rules.ts index f018052888428dc1a17a03236f34f700a3808d2d..ed48891b8523887d8f01c51f0d1abb633c4a914b 100644 --- a/packages/mobile-ui-vue/components/form-item/src/designer/response-form-use-designer-rules.ts +++ b/packages/mobile-ui-vue/components/form-item/src/designer/response-form-use-designer-rules.ts @@ -16,11 +16,24 @@ export function useDesignerRules(designItemContext: DesignerItemContext, designe const isInFixedContextRules = true; function canAccepts(draggingContext: DraggingResolveContext): boolean { - + // const acceptableControlTypes = [ + // 'input-group', + // 'textarea', + // 'date-picker', + // 'enum-field', + // 'number-spinner', + // 'radio-group', + // 'check-group', + // 'switch', + // 'input-group' + // ]; + // const { sourceType, parentComponentInstance } = draggingContext; + // if (!acceptableControlTypes.includes(sourceType)) { + // return false; + // } return true; } - function checkCanMoveComponent() { return true; } @@ -38,8 +51,8 @@ export function useDesignerRules(designItemContext: DesignerItemContext, designe function syncFieldToViewModel(resolveContext: DraggingResolveContext, editorType: string) { const { bindingSourceContext, parentComponentInstance } = resolveContext; if (bindingSourceContext?.entityFieldNode && parentComponentInstance) { - const designViewModelUtils = designerHostService?.designViewModelUtils; - const formSchemaUtils = designerHostService?.formSchemaUtils; + const designViewModelUtils = designerHostService?.designViewModel; + const formSchemaUtils = designerHostService?.pageSchema; const viewModelId = formSchemaUtils.getViewModelIdByComponentId(parentComponentInstance.belongedComponentId); const dgViewModel = designViewModelUtils.getDgViewModel(viewModelId); @@ -57,7 +70,7 @@ export function useDesignerRules(designItemContext: DesignerItemContext, designe let formGroupElementSchema; // 控件若有绑定信息,则根据绑定信息创建控件 if (resolveContext.bindingSourceContext?.entityFieldNode) { - const controlCreatorUtils = designerHostService?.controlCreatorUtils; + const controlCreatorUtils = designerHostService?.controlCreator; formGroupElementSchema = controlCreatorUtils.setFormFieldProperty(resolveContext.bindingSourceContext?.entityFieldNode, componentSchema?.type); } else { formGroupElementSchema = getSchemaByTypeForDesigner('form-group') as ComponentSchema;