diff --git a/packages/designer/public/designer-canvas/empty1.json b/packages/designer/public/designer-canvas/empty1.json index 4c180628078ac2cec1c7fd9676eb448098decd03..2a504418e8e78799509242643fd950491d8935ba 100644 --- a/packages/designer/public/designer-canvas/empty1.json +++ b/packages/designer/public/designer-canvas/empty1.json @@ -1,1254 +1,1336 @@ { - "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" + } ], + "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" }, - { - "$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" + "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" : "字符串" + } }, - { - "$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" + "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" }, - { - "$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" + "readonly" : false, + "multiLanguage" : false, + "require" : false, + "name" : "流程实例", + "id" : "12ef9c5c-ad8f-4da3-a430-c8a7f2162135", + "type" : { + "$type" : "StringType", + "length" : 36, + "name" : "String", + "displayName" : "字符串" }, - { - "$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" + "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" }, - { - "$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" + "readonly" : false, + "multiLanguage" : false, + "require" : true, + "name" : "主键", + "id" : "7d1363dc-bbb0-41ac-b52d-5cc12832bf58", + "type" : { + "$type" : "StringType", + "length" : 36, + "name" : "String", + "displayName" : "字符串" }, - { - "$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" + "path" : "ID", + "originalId" : "7d1363dc-bbb0-41ac-b52d-5cc12832bf58", + "code" : "ID", + "label" : "id", + "bindingField" : "id", + "bindingPath" : "id" + }, { + "$type" : "SimpleField", + "defaultValue" : "", + "editor" : { + "$type" : "TextBox" }, - { - "$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" + "readonly" : false, + "multiLanguage" : false, + "require" : true, + "name" : "上级对象主键", + "id" : "750cc77b-6562-4c83-9e5b-80ad5abb7bb8", + "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": "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" + "path" : "ParentID", + "originalId" : "750cc77b-6562-4c83-9e5b-80ad5abb7bb8", + "code" : "ParentID", + "label" : "parentID", + "bindingField" : "parentID", + "bindingPath" : "parentID" + }, { + "$type" : "SimpleField", + "defaultValue" : "", + "editor" : { + "$type" : "TextBox" }, - { - "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测试" + "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": "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" + "code" : "Child1", + "label" : "child1s" + }, { + "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" + }, { + "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" }, - { - "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" : true, + "readonly" : { + "type" : "StateMachine", + "field" : "canEdit", + "status" : false + }, + "maxLength" : 36 }, - { - "name": "sorts", - "shownName": "排序条件", - "value": "[]" + "path" : "id" + }, { + "id" : "form_version", + "type" : "form-group", + "appearance" : null, + "label" : "版本", + "binding" : { + "type" : "Form", + "path" : "version", + "field" : "e3ca9955-1155-4a4b-a164-e48c31928c24", + "fullPath" : "Version" }, - { - "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" : "datetime-picker", + "required" : false, + "readonly" : { + "type" : "StateMachine", + "field" : "canEdit", + "status" : false + }, + "displayFormat" : "yyyy-MM-dd HH:mm:ss" }, - { - "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" : "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" }, - { - "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" : "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": "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}" + "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": "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" : "input-group", + "required" : false, + "readonly" : { + "type" : "StateMachine", + "field" : "canEdit", + "status" : false + }, + "maxLength" : 36 }, - { - "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" : "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": "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" : "input-group", + "required" : false, + "readonly" : { + "type" : "StateMachine", + "field" : "canEdit", + "status" : false + }, + "maxLength" : 36 }, - { - "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" - } - ] - } - } - ] + "path" : "code" + }, { + "id" : "form_name", + "type" : "form-group", + "appearance" : null, + "label" : "名称", + "binding" : { + "type" : "Form", + "path" : "name", + "field" : "6a051d6e-f870-4a9f-84df-043cfbc26cf2", + "fullPath" : "name" }, - { - "id": "card-page-body-container", - "type": "page-body-container", - "title": "主内容容器", - "appearance": null, - "visible": true, - "contents": [ - - ] + "editor" : { + "type" : "input-group", + "required" : false, + "readonly" : { + "type" : "StateMachine", + "field" : "canEdit", + "status" : false + }, + "maxLength" : 36 }, - { - "id": "card-page-footer-container", - "type": "page-footer-container", - "title": "页尾容器", - "appearance": null, - "size": null, - "position": null, - "visible": true, - "contents": [ - { - "id": "card-page-save-button", - "type": "button", - "title": "保存按钮", - "visible": true, - "disabled": false, - "text": "按钮", - "icon": "图标" - } - - - ] - } - ] - } - ], - "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" + "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" + } ] + } ] + }, { + "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" : [ ] } - ], - "projectName": "bo-vueformtest-front", - "customClass": {}, - "actions": [] + } ], + "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" : [ ] } }, - "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/app-providers.ts b/packages/designer/src/app-providers.ts index 95ca72ad60a61387f212490e454c5b09d57fc9f0..ea3461537cdcd86238143feb91494b8095ee811b 100644 --- a/packages/designer/src/app-providers.ts +++ b/packages/designer/src/app-providers.ts @@ -1,12 +1,15 @@ import { FLoadingService, FTooltipDirective, FMessageBoxService, F_MODAL_SERVICE_TOKEN, FModalService, LookupSchemaRepositoryToken, FieldSelectorRepositoryToken, F_NOTIFY_SERVICE_TOKEN, FNotifyService, ControllerSchemaRepositorySymbol, FormSchemaRepositorySymbol } from "@farris/ui-vue/components"; import { App } from "vue"; +import { useDesignerContext } from "./components/composition/designer-context/use-designer-context"; +// const designerContext =useDesignerContext(); export default { install(app: App): void { app.provide(F_MODAL_SERVICE_TOKEN, new FModalService(app)); app.provide('FLoadingService', FLoadingService); + // app.provide('designerContext', designerContext); // const metadataPath = metadataService.getMetadataPath(); // app.provide(MetadataPathToken, metadataPath); diff --git a/packages/designer/src/components/composition/designer-context/use-mobile-designer-context.ts b/packages/designer/src/components/composition/designer-context/use-mobile-designer-context.ts index e6af180b98213fead2795bb80cbb1b2ddabc110f..2ba587498651636b8c2196c6f671abea9283a444 100644 --- a/packages/designer/src/components/composition/designer-context/use-mobile-designer-context.ts +++ b/packages/designer/src/components/composition/designer-context/use-mobile-designer-context.ts @@ -7,6 +7,7 @@ import { ContentContainer, Card, FloatContainer, Navbar, ListView, Form, FormItem, InputGroup, Button, Switch, CheckboxGroup, RadioGroup, ButtonGroup,registerDesignerComponents } from '@farris/mobile-ui-vue'; +import { HtmlTemplate } from "../../../../../mobile-ui-vue/components/html-template" import { useMobileControlCreator } from "../control-creator/use-mobile-control-creator"; import { PageComponent, UsePageSchema } from "../../../components/types"; import ControllCategories from '../schema-repository/controller/mobile-categories'; @@ -25,7 +26,7 @@ export function useMobileDesignerContext(): UseDesignerContext { ContentContainer, Card, FloatContainer, Textarea, DatePicker, DateTimePicker, Lookup, Navbar, ListView, Picker, NumberInput, Switch, CheckboxGroup, RadioGroup, Form, FormItem, InputGroup, - Button, ButtonGroup, FChartsBar + Button, ButtonGroup,HtmlTemplate,FChartsBar ]; registerDesignerComponents(componentsToRegister); diff --git a/packages/designer/src/components/designer.component.tsx b/packages/designer/src/components/designer.component.tsx index 5a054d6393a24feb10259ba7b6a27075e00ea645..c5f3ca67c6405cd783cdec67d3245c1214c0bc97 100644 --- a/packages/designer/src/components/designer.component.tsx +++ b/packages/designer/src/components/designer.component.tsx @@ -120,6 +120,9 @@ 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/toolbox/mobile-toolbox.json b/packages/designer/src/components/types/toolbox/mobile-toolbox.json index a017f97b814852ae92501e6ff71e87b5d32b28e5..bb1b83deb3d1f4fff7d875b5b26d3f8c73244117 100644 --- a/packages/designer/src/components/types/toolbox/mobile-toolbox.json +++ b/packages/designer/src/components/types/toolbox/mobile-toolbox.json @@ -152,6 +152,12 @@ "name": "卡片", "category": "container", "icon": "section" + },{ + "id": "HtmlTemplate", + "type": "html-template", + "name": "Html模板", + "category": "container", + "icon": "html-template" } ] }, diff --git a/packages/mobile-ui-vue/components/common/src/properties/dg-control.ts b/packages/mobile-ui-vue/components/common/src/properties/dg-control.ts index 7686b232834a19b95e8c414a2928b5fc1b1d167f..175de19256a58d0a41b17c84300dacfc3f783eb4 100644 --- a/packages/mobile-ui-vue/components/common/src/properties/dg-control.ts +++ b/packages/mobile-ui-vue/components/common/src/properties/dg-control.ts @@ -51,4 +51,6 @@ export const DgControl = { 'navbar': { type: 'navbar', name: '导航栏', icon: 'NavBar' }, 'picker': { type: 'picker', name: '选择器', icon: 'EnumField' }, + + 'html-template': { type: 'html-template', name: '模板容器', icon: '' }, }; diff --git a/packages/mobile-ui-vue/components/html-template/index.ts b/packages/mobile-ui-vue/components/html-template/index.ts new file mode 100644 index 0000000000000000000000000000000000000000..83b0e85368739656c900fd5bf6f9cc6771b7697e --- /dev/null +++ b/packages/mobile-ui-vue/components/html-template/index.ts @@ -0,0 +1,15 @@ +import { withInstall, withRegister, withRegisterDesigner } from '@farris/mobile-ui-vue/common'; +import HtmlTemplateInstallless from './src/html-template.component'; +import { propsResolverGenerator } from './src/html-template.props'; +import HtmlTemplateDesign from './src/designer/html-template.design.component'; + +const HTML_TEMPLATE_REGISTERED_NAME = 'html-template'; + +const HtmlTemplate = withInstall(HtmlTemplateInstallless); + +withRegister(HtmlTemplate, { name: HTML_TEMPLATE_REGISTERED_NAME, propsResolverGenerator }); +withRegisterDesigner(HtmlTemplate, { name: HTML_TEMPLATE_REGISTERED_NAME, propsResolverGenerator, designerComponent: HtmlTemplateDesign }); + +export * from './src/html-template.props'; +export { HtmlTemplate }; +export default HtmlTemplate; diff --git a/packages/mobile-ui-vue/components/html-template/src/designer/html-template.design.component.tsx b/packages/mobile-ui-vue/components/html-template/src/designer/html-template.design.component.tsx new file mode 100644 index 0000000000000000000000000000000000000000..95650c188bf5b920e880485a20baa8ffb4fd1cdc --- /dev/null +++ b/packages/mobile-ui-vue/components/html-template/src/designer/html-template.design.component.tsx @@ -0,0 +1,35 @@ +import { computed, defineComponent, inject, onMounted, ref, SetupContext } from 'vue'; +import { htmlTemplateDesignProps, HtmlTemplateDesignProps } from '../html-template.props'; +import { useDesignerRules } from './use-designer-rules'; +import { DesignerItemContext, useDesignerComponent } from '@farris/mobile-ui-vue/common'; + +export default defineComponent({ + name: 'FHtmlTemplateDesign', + props: htmlTemplateDesignProps, + emits: [] as (string[] & ThisType) | undefined, + setup(props: HtmlTemplateDesignProps, context: SetupContext) { + const elementRef = ref(); + const designerHostService = inject('designer-host-service'); + const designItemContext = inject('design-item-context'); + const designerRulesComposition = useDesignerRules(designItemContext!.schema, designerHostService); + const componentInstance = useDesignerComponent(elementRef, designItemContext, designerRulesComposition); + + onMounted(() => { + elementRef.value.componentInstance = componentInstance; + }); + + context.expose(componentInstance.value); + + const placeholderText = '请在属性面板中配置模板'; + const placeholderHtml = `
${placeholderText}
`; + const htmlTemplateInnerHTML = computed(() => { + return props.html ? props.html : placeholderHtml; + }); + + return () => { + return ( +
+ ); + }; + } +}); \ No newline at end of file diff --git a/packages/mobile-ui-vue/components/html-template/src/designer/use-designer-rules.ts b/packages/mobile-ui-vue/components/html-template/src/designer/use-designer-rules.ts new file mode 100644 index 0000000000000000000000000000000000000000..69f8cb69e78cc69a63214772448956d3280ce13e --- /dev/null +++ b/packages/mobile-ui-vue/components/html-template/src/designer/use-designer-rules.ts @@ -0,0 +1,35 @@ +import { ComponentSchema } from "@farris/mobile-ui-vue/common"; +import { HtmlTemplateProperty } from "../property-config/html-template.property-config"; +import { UseDesignerRules } from "@farris/mobile-ui-vue/common"; + +export function useDesignerRules(schema: ComponentSchema, designerHostService: any): UseDesignerRules { + + function canAccepts(): boolean { + return false; + } + + function checkCanDeleteComponent() { + return true; + } + + function checkCanMoveComponent() { + return true; + } + + function hideNestedPaddingInDesginerView() { + return true; + } + + function getPropsConfig(componentId: string) { + const htmlTemplateProperty = new HtmlTemplateProperty(componentId, designerHostService); + return htmlTemplateProperty.getPropertyConfig(schema); + } + + return { + canAccepts, + hideNestedPaddingInDesginerView, + getPropsConfig, + checkCanDeleteComponent, + checkCanMoveComponent + }; +} diff --git a/packages/mobile-ui-vue/components/html-template/src/html-template.component.tsx b/packages/mobile-ui-vue/components/html-template/src/html-template.component.tsx new file mode 100644 index 0000000000000000000000000000000000000000..c4ea43b9fdb307497e2d4a6270967142661ac606 --- /dev/null +++ b/packages/mobile-ui-vue/components/html-template/src/html-template.component.tsx @@ -0,0 +1,13 @@ +import { defineComponent, ref, computed } from 'vue'; +import { HTML_TEMPLATE_NAME, htmlTemplateProps, HtmlTemplateProps } from './html-template.props'; + +export default defineComponent({ + name: HTML_TEMPLATE_NAME, + props: htmlTemplateProps, + emits: [], + setup(props: HtmlTemplateProps, context) { + return () => { + return props.renderFunction?.(); + }; + } +}); diff --git a/packages/mobile-ui-vue/components/html-template/src/html-template.props.ts b/packages/mobile-ui-vue/components/html-template/src/html-template.props.ts new file mode 100644 index 0000000000000000000000000000000000000000..f172fc6d253bca98ef8b9138305f2371d79e7b95 --- /dev/null +++ b/packages/mobile-ui-vue/components/html-template/src/html-template.props.ts @@ -0,0 +1,37 @@ +import { ExtractPropTypes, PropType, RenderFunction } from 'vue'; +import { getPropsResolverGenerator } from '@farris/mobile-ui-vue/dynamic-resolver'; +import htmlTemplateSchema from './schema/html-template.schema.json'; +import { schemaMapper } from './schema/schema-mapper'; +import { schemaResolver } from './schema/schema-resolver'; + +export const HTML_TEMPLATE_NAME = 'fm-html-template'; + +export const htmlTemplateProps = { + + /** 渲染函数 */ + renderFunction: { type: Function as PropType }, +}; + +export type HtmlTemplateProps = ExtractPropTypes; + +export const propsResolverGenerator = getPropsResolverGenerator( + htmlTemplateProps, + htmlTemplateSchema, + schemaMapper, + schemaResolver, +); + +export const htmlTemplateDesignProps = { + + /** html模板 */ + html: { type: String, default: '' }, +}; + +export type HtmlTemplateDesignProps = ExtractPropTypes; + +export const designPropsResolverGenerator = getPropsResolverGenerator( + htmlTemplateDesignProps, + htmlTemplateSchema, + schemaMapper, + schemaResolver, +); \ No newline at end of file diff --git a/packages/mobile-ui-vue/components/html-template/src/html-template.scss b/packages/mobile-ui-vue/components/html-template/src/html-template.scss new file mode 100644 index 0000000000000000000000000000000000000000..5a6064b719f96b5e8edcc9bf6b85fbd5f49971a0 --- /dev/null +++ b/packages/mobile-ui-vue/components/html-template/src/html-template.scss @@ -0,0 +1,28 @@ +.fv-html-template-design { + display: inherit; + flex: 1; + flex-direction: inherit; + flex-wrap: inherit; + justify-content: inherit; + align-items: inherit; + width: 100%; + padding: 0; + border: 0; + + &-placeholder { + position: relative; + height: 50px; + width: 100%; + display: flex; + justify-content: center; + align-items: center; + overflow: hidden; + color: #315585; + background-color: #dfedff; + border-color: #d2e6ff; + padding: .75rem 1.25rem; + margin-bottom: 1rem; + border: 1px solid transparent; + border-radius: 3px; + } +} \ No newline at end of file diff --git a/packages/mobile-ui-vue/components/html-template/src/property-config/html-template.property-config.ts b/packages/mobile-ui-vue/components/html-template/src/property-config/html-template.property-config.ts new file mode 100644 index 0000000000000000000000000000000000000000..04e54e333fc3cd006beea9ed408744809d0bc12e --- /dev/null +++ b/packages/mobile-ui-vue/components/html-template/src/property-config/html-template.property-config.ts @@ -0,0 +1,36 @@ +import { BaseControlProperty, ToolbarItemProperty } from "@farris/mobile-ui-vue/common"; + +export class HtmlTemplateProperty extends BaseControlProperty { + + constructor(componentId: string, designerHostService: any) { + super(componentId, designerHostService); + } + + public getPropertyConfig(propertyData: any) { + // 基本信息 + this.propertyConfig.categories['basic'] = this.getBasicPropConfig(propertyData); + // 模板 + this.propertyConfig.categories['template'] = this.getTemplateProperties(propertyData); + return this.propertyConfig; + } + + private getTemplateProperties(propertyData: any) { + return { + title: '模板', + description: '', + properties: { + html: { + title: 'html', + type: 'string', + description: 'HTML模板', + refreshPanelAfterChanged: true, + editor: { + type: "code-editor", + language: "html", + }, + }, + } + }; + } + +} diff --git a/packages/mobile-ui-vue/components/html-template/src/schema/html-template.schema.json b/packages/mobile-ui-vue/components/html-template/src/schema/html-template.schema.json new file mode 100644 index 0000000000000000000000000000000000000000..e0c13127cd246940637f44cbe869cf4de085c328 --- /dev/null +++ b/packages/mobile-ui-vue/components/html-template/src/schema/html-template.schema.json @@ -0,0 +1,33 @@ +{ + "$schema": "https://json-schema.org/draft/2020-12/schema", + "$id": "https://farris-design.gitee.io/html-template.schema.json", + "title": "html-template", + "description": "A Farris Component", + "type": "object", + "properties": { + "id": { + "description": "The unique identifier for a html-template", + "type": "string" + }, + "type": { + "description": "The type string of html-template", + "type": "string", + "default": "html-template" + }, + "html": { + "description": "", + "type": "string", + "default": "" + }, + "renderFunction": { + "description": "", + "type": "function", + "default": null + } + }, + "required": [ + "id", + "type" + ], + "ignore": [] +} \ No newline at end of file diff --git a/packages/mobile-ui-vue/components/html-template/src/schema/schema-mapper.ts b/packages/mobile-ui-vue/components/html-template/src/schema/schema-mapper.ts new file mode 100644 index 0000000000000000000000000000000000000000..5ad252311a7b9602dedc55b76089b4ddcae59a79 --- /dev/null +++ b/packages/mobile-ui-vue/components/html-template/src/schema/schema-mapper.ts @@ -0,0 +1,4 @@ +import { resolveAppearance, resolvePadding, resolveMargin, resolveToolbar, MapperFunction } from '../../../dynamic-resolver'; + +export const schemaMapper = new Map([]); + diff --git a/packages/mobile-ui-vue/components/html-template/src/schema/schema-resolver.ts b/packages/mobile-ui-vue/components/html-template/src/schema/schema-resolver.ts new file mode 100644 index 0000000000000000000000000000000000000000..c1bf8da88a08c01a3c8d6e9f3d81859d84d87aa6 --- /dev/null +++ b/packages/mobile-ui-vue/components/html-template/src/schema/schema-resolver.ts @@ -0,0 +1,5 @@ +import { DynamicResolver } from "../../../dynamic-resolver"; + +export function schemaResolver(resolver: DynamicResolver, schema: Record, context: Record): Record { + return schema; +}