设计文件
“设计文件”是“项列表”组件的预定义配置,用于显示部件和 CAD 文档的设计文件列表,其中包括说明方文档、所参考的文档、附件和表示。与“项列表”组件类似,“设计文件”具有搜索、排序、筛选和恢复默认值等功能。对于每个文件,“设计文件”都会显示可通过配置进行选取的属性。默认属性为“名称”和“格式”,这些属性为自定义属性。“名称”包含一个链接,通过该链接可以下载文件;“格式”包含一个下拉菜单,其中提供可供下载且仅与表示相关的所有其他可用格式。
下面的示例图示为“设计文件”预定义配置:
绑定特性 
有关绑定“设计文件”的信息,请参阅项列表组件。
* 
对于“设计文件”,输入绑定特性支持 PTC.CADDocumentMgmt.CADDocumentPTC.ProdMgmt.Part 对象类型。
selectedItems 绑定特性的输出中包含对象类型为 PTC.ContentItemPTC.VisualizationRepresentation 的项。
配置特性 
有关“设计文件”的所有可用配置特性的列表,请参阅项列表组件的配置特性表。下表提供了“设计文件”的相关配置特性的其他信息。
有关详情,请参阅组件配置结构
有关子特性的详情,请参阅子特性和容器键
特性名称
说明
特性类型
默认值
必需或可选
fileFormatSelection
用于控制:在“格式”列的下拉菜单中检索和显示的表示文件格式。只有在 relationships 特性中包含 representations 键时,此子特性才相关。
选项:
specifiedFormats - 仅检索指定的文件格式;使用 formats 特性可指定要包括的文件格式。文件格式在下拉菜单中的显示顺序与 formats 特性中的顺序相同。
allFormats - 检索所有可用的文件格式。如果设计文件可使用 PDF 格式,则“名称”列包含一个链接,通过该链接可以下载 PDF,而 PDF 是下拉菜单中的第一个格式。
* 
如果表示只有一种文件格式可用,则该格式会显示在“名称”列下,并且“格式”列为空。
此子特性位于组件配置中 designFileImplementationDefinition 特性的下方。
specifiedFormats
必需
showImplementationActions
当此特性包含 downloadZip 键时,“设计文件”会在嵌入式操作栏中包括“全部下载”按钮,以供用户下载所有设计文件。
downloadZip 是“设计文件”针对此特性支持的唯一值。
不适用
可选
formats
要针对表示检索的指定格式的列表。格式之间以空格分隔。此处列出的格式顺序指定了“格式”列的下拉菜单中的格式显示顺序。
这是 fileFormatSelection 的子特性,只有在 fileFormatSelection 设置为 specifiedFormats 时,此子特性才相关。
PDF DXF PLT CGM
必需
relationships
基于与部件或 CAD 文档的关系显示的设计文件类型列表。可以包括下列一个或多个键:
describedByDocuments:用于显示说明方文档
referenceDocuments:用于显示所参考的文档
attachments:用于显示附件
representations:用于显示表示
* 
representations 键中包含 designFileImplementationDefinition 键下的附加信息。
不适用
必需
attributes
有关详情,请参阅项列表
接受 PTC.ContentItemPTC.VisualizationRepresentation 对象类型的属性。
此外,还接受 NameFormats 属性,两者分别具有 PTC.Nav.DesignFiles.Custom.ImplementationPTC.Visualization.Representation.Custom.Implementation 对象类型。
不适用
必需
defaultSortField
有关详情,请参阅项列表
接受 PTC.ContentItemPTC.VisualizationRepresentation 对象类型的属性。
此外,还接受 NameFormats 属性,两者分别具有 PTC.Nav.DesignFiles.Custom.ImplementationPTC.Visualization.Representation.Custom.Implementation 对象类型。
不适用
可选
配置示例 
{
"showImplementationActions":{
"selected":[
{
"key":"downloadZip"
}
]
},
"selectionType":{
"selectedKey":"none"
},
"waitForInput":{
"value":true
},
"implementationConfiguration":{
"inTailoring":true,
"value":{
"relationships":{
"selected":[
{
"key":"describedByDocuments"
},
{
"key":"referenceDocuments"
},
{
"key":"attachments"
},
{
"key":"representations",
"additionalData":{
"designFileImplementationDefinition":{
"value":{
"fileFormatSelection":{
"selectedKey":"specifiedFormats",
"additionalData":{
"formatsDefinition":{
"formats":{
"value":"PDF DXF PLT CGM"
}
}
}
},
"fileSelection":{
"selectedKey":"defaultFile"
}
}
}
}
}
]
}
}
},
"baseConfigurationVersion":{
"value":"nav.3"
},
"implementationConfigurationVersion":{
"value":"nav.1"
},
"defaultSortFields":{
"selectedValues":{
"data":[
{
"itemListsData":[
{
"items":[
{
"additionalData":{
"itemListDefaultSortFieldDefinition":{
"defaultSortDirection":{
"selectedKey":"asc"
}
}
},
"id":"Name"
}
],
"objectType":"PTC.Nav.DesignFiles.Custom.Implementation"
}
],
"adapter":{
"instanceName":"windchill",
"thingName":"PTC.WCAdapter"
}
}
]
}
},
"attributes":{
"selectedValues":{
"data":[
{
"itemListsData":[
{
"items":[
{
"id":"Name",
"ordinal":0
}
],
"objectType":"PTC.Nav.DesignFiles.Custom.Implementation"
},
{
"items":[
{
"id":"Formats",
"ordinal":1
}
],
"objectType":"PTC.Visualization.Representation.Custom.Implementation"
}
],
"adapter":{
"instanceName":"windchill",
"thingName":"PTC.WCAdapter"
}
}
]
}
},
"label":{
"value":""
},
"showExportAction":{
"value":false
},
"enableSearch":{
"additionalData":{
"itemListSearchDefinition":{
"searchHintText":{
"value":"[[PTC.Nav.DesignFiles.FindDesignLabel]]"
}
}
},
"value":true
}
}
自定义服务 
除了配置外,每个组件还支持通过扩展其业务逻辑来自定义组件。每个组件的业务逻辑在事物模板中都包含可改写服务,您可以对这些服务进行扩展和改写。下表对此组件的可改写服务进行了详细说明。
有关每个服务的返回值和参数的示例,请参阅自定义服务的输入/输出示例
名称
说明
GetConfigurations
返回“设计文件”的可用配置。
参数:
返回:JSON
GetImplementationSettings
返回设置数据,其中包括“全部下载”按钮的数据。此数据由“设计文件”实施内部使用。
参数:
返回:JSON 对象
GetItems
返回后端系统中设计文件的列表及其属性和值。
参数:
input (必需) - CCO 格式的 JSON,其中包含要从后端系统获取的数据的输入 ID,以及后端系统的适配器信息。
configuration (必需) - 包含配置的 JSON。
返回:CCO 格式的 JSON
DefHookGetImplementationActionsList
返回 GetImplementationSettings 服务中的 implementationActions 键下方列出的操作。
参数:
返回:JSON:Array
DefHookImplementationConfigurationDefinitionGroup
返回“设计文件”实施定义,其中包含可用的自定义配置。包含 relationshipsfileFormatsToDisplayspecifiedFormats 配置特性的定义。
参数:
返回:JSON:Array
实施定义 
{
"array":[
{
"property":{

},
"value":{
"initializationData":{
"version":"1.0.0",
"constraints":{

},
"properties":{
"directDefinition":[
{
"property":{

},
"value":{
"initializationData":{
"version":"1.0.0",
"constraints":{

},
"properties":{

}
},
"elementVersion":"1.0.0",
"elementName":"PTC.Nav.DynamicForm.Textbox"
},
"mandatory":false,
"key":"actionBarConfigurationJSON"
}
]
}
},
"elementVersion":"1.0.0",
"elementName":"PTC.Nav.DynamicForm.DefinitionGroup"
},
"mandatory":false,
"key":"actionBarConfiguration"
},
{
"property":{

},
"value":{
"initializationData":{
"version":"1.0.0",
"constraints":{

},
"properties":{
"additionalDefinition":[
{
"directDefinition":[
{
"property":{

},
"value":{
"initializationData":{
"version":"1.0.0",
"constraints":{

},
"properties":{

}
},
"elementVersion":"1.0.0",
"elementName":"PTC.Nav.DynamicForm.Textbox"
},
"mandatory":false,
"key":"fieldTitleOverride"
}
],
"key":"itemListAttributesDefinition"
},
{
"directDefinition":[

],
"key":"implementationAttributesDefinition"
}
],
"updateServiceName":"",
"minimumSelectedAttributes":null,
"supportedTypes":{
"data":[
{
"itemListsData":[
{
"selectionGroupIds":[
"PCI"
],
"objectType":"PTC.ContentItem"
},
{
"selectionGroupIds":[
"PVR"
],
"objectType":"PTC.Visualization.Representation"
},
{
"selectionGroupIds":[
"PNDCI"
],
"objectType":"PTC.Nav.DesignFiles.Custom.Implementation"
},
{
"selectionGroupIds":[
"PVRCI"
],
"objectType":"PTC.Visualization.Representation.Custom.Implementation"
}
],
"adapter":{
"instanceName":"windchill",
"thingName":"PTC.WCAdapter"
}
}
],
"allowSubsetForTailoring":false
},
"addServiceName":"",
"maximumSelectedAttributes":null
}
},
"elementVersion":"1.0.0",
"elementName":"PTC.Nav.DynamicForm.AttributesSelector"
},
"mandatory":true,
"key":"attributes"
},
{
"property":{

},
"value":{
"initializationData":{
"version":"1.0.0",
"constraints":{

},
"properties":{
"options":[
{
"label":"1",
"key":"1"
},
{
"label":"2",
"key":"2"
},
{
"label":"3",
"key":"3"
},
{
"label":"4",
"key":"4"
},
{
"label":"5",
"key":"5"
},
{
"label":"6",
"key":"6"
},
{
"label":"7",
"key":"7"
},
{
"label":"8",
"key":"8"
},
{
"label":"9",
"key":"9"
},
{
"label":"-1",
"key":"-1"
}
],
"updateServiceName":null,
"addServiceName":null
}
},
"elementVersion":"1.0.0",
"elementName":"PTC.Nav.DynamicForm.Dropdown"
},
"mandatory":false,
"key":"defaultExpansionLevel"
},
{
"property":{

},
"value":{
"initializationData":{
"version":"1.0.0",
"constraints":{

},
"properties":{
"additionalDefinition":[
{
"directDefinition":[
{
"property":{

},
"value":{
"initializationData":{
"version":"1.0.0",
"constraints":{

},
"properties":{
"options":[
{
"description":"Sort column in ascending order",
"label":"[[PTC.Nav.ItemList.SortOrder.Asc]]",
"key":"asc"
},
{
"description":"Sort column in descending order",
"label":"[[PTC.Nav.ItemList.SortOrder.Dsc]]",
"key":"dsc"
}
],
"updateServiceName":null,
"addServiceName":null
}
},
"elementVersion":"1.0.0",
"elementName":"PTC.Nav.DynamicForm.RadioButton"
},
"mandatory":false,
"key":"defaultSortDirection"
}
],
"key":"itemListDefaultSortFieldDefinition"
}
],
"updateServiceName":"",
"minimumSelectedAttributes":null,
"supportedTypes":{
"data":[
{
"itemListsData":[
{
"selectionGroupIds":[
"PCI"
],
"objectType":"PTC.ContentItem"
},
{
"selectionGroupIds":[
"PVR"
],
"objectType":"PTC.Visualization.Representation"
},
{
"selectionGroupIds":[
"PNDCI"
],
"objectType":"PTC.Nav.DesignFiles.Custom.Implementation"
},
{
"selectionGroupIds":[
"PVRCI"
],
"objectType":"PTC.Visualization.Representation.Custom.Implementation"
}
],
"adapter":{
"instanceName":"windchill",
"thingName":"PTC.WCAdapter"
}
}
],
"allowSubsetForTailoring":false
},
"addServiceName":"",
"maximumSelectedAttributes":null
}
},
"elementVersion":"1.0.0",
"elementName":"PTC.Nav.DynamicForm.AttributesSelector"
},
"mandatory":false,
"key":"defaultSortFields"
},
{
"property":{

},
"value":{
"initializationData":{
"version":"1.0.0",
"constraints":{

},
"properties":{
"default":true,
"true":{
"additionalDefinition":[
{
"directDefinition":[
{
"property":{

},
"value":{
"initializationData":{
"version":"1.0.0",
"constraints":{

},
"properties":{

}
},
"elementVersion":"1.0.0",
"elementName":"PTC.Nav.DynamicForm.Textbox"
},
"mandatory":false,
"key":"searchHintText"
}
],
"key":"itemListSearchDefinition"
}
],
"label":"[[PTC.Nav.Yes]]"
},
"false":{
"additionalDefinition":[

],
"label":"[[PTC.Nav.No]]"
},
"label":null
}
},
"elementVersion":"1.0.0",
"elementName":"PTC.Nav.DynamicForm.Toggle"
},
"mandatory":false,
"key":"enableSearch"
},
{
"property":{

},
"value":{
"initializationData":{
"version":"1.0.0",
"constraints":{

},
"properties":{
"additionalDefinition":[
{
"directDefinition":[
{
"property":{

},
"value":{
"initializationData":{
"version":"1.0.0",
"constraints":{

},
"properties":{
"dynamicallySetTypeServiceName":"GetFilterTypeDefinitionForFilterField",
"type":{
"enum":{
"options":[

],
"updateServiceName":null,
"dynamicallySetOptionsServiceName":null,
"addServiceName":null,
"multiSelect":null
}
}
}
},
"elementVersion":"1.0.0",
"elementName":"PTC.Nav.DynamicForm.FieldFilter"
},
"mandatory":false,
"key":"defaultSelectedFilterValues"
},
{
"property":{

},
"value":{
"initializationData":{
"version":"1.0.0",
"constraints":{

},
"properties":{

}
},
"elementVersion":"1.0.0",
"elementName":"PTC.Nav.DynamicForm.Textbox"
},
"mandatory":false,
"key":"filterLabelOverride"
}
],
"key":"itemListFilterFieldDefinition"
}
],
"updateServiceName":"",
"minimumSelectedAttributes":0,
"supportedTypes":{
"data":[
{
"itemListsData":[
{
"selectionGroupIds":[
"PCI"
],
"objectType":"PTC.ContentItem"
},
{
"selectionGroupIds":[
"PVR"
],
"objectType":"PTC.Visualization.Representation"
},
{
"selectionGroupIds":[
"PNDCI"
],
"objectType":"PTC.Nav.DesignFiles.Custom.Implementation"
},
{
"selectionGroupIds":[
"PVRCI"
],
"objectType":"PTC.Visualization.Representation.Custom.Implementation"
}
],
"adapter":{
"instanceName":"windchill",
"thingName":"PTC.WCAdapter"
}
}
],
"allowSubsetForTailoring":false
},
"addServiceName":"",
"maximumSelectedAttributes":1
}
},
"elementVersion":"1.0.0",
"elementName":"PTC.Nav.DynamicForm.AttributesSelector"
},
"mandatory":false,
"key":"filterFields"
},
{
"property":{

},
"value":{
"initializationData":{
"version":"1.0.0",
"constraints":{

},
"properties":{
"directDefinition":[
{
"property":{

},
"value":{
"initializationData":{
"version":"1.0.0",
"constraints":{

},
"properties":{
"default":"",
"overflow":null,
"minimumSelectedItems":null,
"options":[
{
"data":{

},
"description":"[[PTC.Nav.DesignFiles.Configuration.DescribedByDocuments_HelpText]]",
"label":"[[PTC.Nav.DesignFiles.Configuration.DescribedByDocuments]]",
"key":"describedByDocuments"
},
{
"data":{

},
"description":"[[PTC.Nav.DesignFiles.Configuration.ReferenceDocuments_HelpText]]",
"label":"[[PTC.Nav.DesignFiles.Configuration.ReferenceDocuments]]",
"key":"referenceDocuments"
},
{
"data":{

},
"description":"[[PTC.Nav.DesignFiles.Configuration.Attachments_HelpText]]",
"label":"[[PTC.Nav.DesignFiles.Configuration.Attachments]]",
"key":"attachments"
},
{
"data":{

},
"additionalDefinition":[
{
"directDefinition":[
{
"property":{

},
"value":{
"initializationData":{
"version":"1.0.0",
"constraints":{

},
"properties":{
"options":[
{
"description":"[[PTC.Nav.DesignFiles.Configuration.AllFiles_HelpText]]",
"label":"[[PTC.Nav.DesignFiles.Configuration.AllFiles]]",
"key":"defaultFile"
},
{
"description":"[[PTC.Nav.DesignFiles.Configuration.DefaultFile_HelpText]]",
"label":"[[PTC.Nav.DesignFiles.Configuration.DefaultFile]]",
"key":"allFiles"
}
],
"updateServiceName":null,
"addServiceName":null
}
},
"elementVersion":"1.0.0",
"elementName":"PTC.Nav.DynamicForm.RadioButton"
},
"mandatory":true,
"key":"fileSelection"
},
{
"property":{

},
"value":{
"initializationData":{
"version":"1.0.0",
"constraints":{

},
"properties":{
"options":[
{
"description":"[[PTC.Nav.BusinessLogicCommon.Configuration.AllFormats_HelpText]]",
"label":"[[PTC.Nav.BusinessLogicCommon.Configuration.AllFormats]]",
"key":"allFormats"
},
{
"additionalDefinition":[
{
"directDefinition":[
{
"property":{

},
"value":{
"initializationData":{
"version":"1.0.0",
"constraints":{

},
"properties":{

}
},
"elementVersion":"1.0.0",
"elementName":"PTC.Nav.DynamicForm.Textbox"
},
"mandatory":true,
"key":"formats"
}
],
"key":"formatsDefinition"
}
],
"description":"[[PTC.Nav.BusinessLogicCommon.Configuration.SpecifiedFormats_HelpText]]",
"label":"[[PTC.Nav.BusinessLogicCommon.Configuration.SpecifiedFormats]]",
"key":"specifiedFormats"
}
],
"updateServiceName":null,
"addServiceName":null
}
},
"elementVersion":"1.0.0",
"elementName":"PTC.Nav.DynamicForm.RadioButton"
},
"mandatory":true,
"key":"fileFormatSelection"
}
],
"key":"designFileImplementationDefinition"
}
],
"description":"[[PTC.Nav.DesignFiles.Configuration.Representations_HelpText]]",
"label":"[[PTC.Nav.DesignFiles.Configuration.Representations]]",
"key":"representations"
}
],
"updateServiceName":null,
"minimumSelectedAttributes":"1",
"addServiceName":null,
"constraints":{
"enforceMinimumSelectedItems":{
"message":"[[PTC.Nav.DesignFiles.Configuration.SelectAtleastOneRelationship_ErrorText]]"
}
}
}
},
"elementVersion":"1.0.0",
"elementName":"PTC.Nav.DynamicForm.CheckboxArray"
},
"mandatory":true,
"key":"relationships"
}
]
}
},
"elementVersion":"1.0.0",
"elementName":"PTC.Nav.DynamicForm.DefinitionGroup"
},
"mandatory":false,
"key":"implementationConfiguration"
},
{
"property":{

},
"value":{
"initializationData":{
"version":"1.0.0",
"constraints":{

},
"properties":{

}
},
"elementVersion":"1.0.0",
"elementName":"PTC.Nav.DynamicForm.Textbox"
},
"mandatory":false,
"key":"label"
},
{
"property":{

},
"value":{
"initializationData":{
"version":"1.0.0",
"constraints":{

},
"properties":{
"minValue":50,
"default":500,
"maxValue":10000,
"step":50
}
},
"elementVersion":"1.0.0",
"elementName":"PTC.Nav.DynamicForm.Number"
},
"mandatory":false,
"key":"maxNumberOfRowsInGrid"
},
{
"property":{

},
"value":{
"initializationData":{
"version":"1.0.0",
"constraints":{

},
"properties":{
"options":[
{
"description":"Disallow items selection",
"label":"[[PTC.Nav.ItemList.SelectionType.None]]",
"key":"none"
},
{
"description":"Allow single item selection",
"label":"[[PTC.Nav.ItemList.SelectionType.Single]]",
"key":"single"
},
{
"description":"Allow multiple items selection",
"label":"[[PTC.Nav.ItemList.SelectionType.Multiple]]",
"key":"multi"
}
],
"updateServiceName":null,
"addServiceName":null
}
},
"elementVersion":"1.0.0",
"elementName":"PTC.Nav.DynamicForm.RadioButton"
},
"mandatory":false,
"key":"selectionType"
},
{
"property":{

},
"value":{
"initializationData":{
"version":"1.0.0",
"constraints":{

},
"properties":{
"default":true,
"true":{
"additionalDefinition":[
{
"directDefinition":[
{
"property":{
"options":[
[
{
"label":"[[PTC.Nav.ItemList.ExportCSVActionLabel]]",
"key":"exportToCsv"
},
{
"label":"[[PTC.Nav.ItemList.ExportCSVAsExcelActionLabel]]",
"key":"exportToExcel"
}
]
]
},
"value":{
"initializationData":{
"version":"1.0.0",
"constraints":{

},
"properties":{
"default":"",
"overflow":null,
"minimumSelectedItems":null,
"options":[

],
"updateServiceName":null,
"addServiceName":null,
"constraints":{

}
}
},
"elementVersion":"1.0.0",
"elementName":"PTC.Nav.DynamicForm.CheckboxArray"
},
"mandatory":false,
"key":"exportTypes"
},
{
"property":{

},
"value":{
"initializationData":{
"version":"1.0.0",
"constraints":{

},
"properties":{
"default":false,
"true":{
"additionalDefinition":[

],
"label":null
},
"false":{
"additionalDefinition":[

],
"label":null
},
"label":null
}
},
"elementVersion":"1.0.0",
"elementName":"PTC.Nav.DynamicForm.Toggle"
},
"mandatory":false,
"key":"exportUnFilteredData"
}
],
"key":"itemListExportDefinition"
}
],
"label":"[[PTC.Nav.Yes]]"
},
"false":{
"additionalDefinition":[

],
"label":"[[PTC.Nav.No]]"
},
"label":null
}
},
"elementVersion":"1.0.0",
"elementName":"PTC.Nav.DynamicForm.Toggle"
},
"mandatory":false,
"key":"showExportAction"
},
{
"property":{

},
"value":{
"initializationData":{
"version":"1.0.0",
"constraints":{

},
"properties":{
"listLabel":null,
"showFilter":false,
"minimumSelectedItems":0,
"showDropDown":false,
"options":[
{
"label":"[[PTC.Nav.BusinessLogicCommon.Configuration.DownloadAll]]",
"key":"downloadZip"
}
],
"updateServiceName":null,
"addServiceName":null,
"showClearSelectedItems":false,
"dropDownLabel":null
}
},
"elementVersion":"1.0.0",
"elementName":"PTC.Nav.DynamicForm.List"
},
"mandatory":false,
"key":"showImplementationActions"
},
{
"property":{

},
"value":{
"initializationData":{
"version":"1.0.0",
"constraints":{

},
"properties":{
"default":"alphanumeric",
"options":[
{
"description":"Alphanumeric sort order",
"label":"[[PTC.Nav.ItemList.SortOrder.Alphanumeric]]",
"key":"alphanumeric"
},
{
"description":"Natural sort order",
"label":"[[PTC.Nav.ItemList.SortOrder.Natural]]",
"key":"natural"
}
],
"updateServiceName":null,
"addServiceName":null
}
},
"elementVersion":"1.0.0",
"elementName":"PTC.Nav.DynamicForm.RadioButton"
},
"mandatory":false,
"key":"sortOrder"
},
{
"property":{

},
"value":{
"initializationData":{
"version":"1.0.0",
"constraints":{

},
"properties":{
"default":false,
"true":{
"additionalDefinition":[

],
"label":"[[PTC.Nav.Yes]]"
},
"false":{
"additionalDefinition":[

],
"label":"[[PTC.Nav.No]]"
},
"label":null
}
},
"elementVersion":"1.0.0",
"elementName":"PTC.Nav.DynamicForm.Toggle"
},
"mandatory":false,
"key":"waitForInput"
}
]
}
这对您有帮助吗?