Teamcenter AWC/RCP 根据流程 节点配置对应节点 需要展示的属性和关系

1.定义运行时属性,根据当前对象中我的工作任务节点名称,返回节点名称

2.通过visiableWhen显示和隐藏各节点的section

visiableWhen 仅支持 page和seciton

3.每个节点创建一个 xml数据集,配置节点的展示界面。

4.中文 需要通过工具转为 UTF-8字符

 

5.配置xml的样例:

<?xml version="1.0" encoding="UTF-8"?>
<!--
// @<COPYRIGHT>@
// ==================================================
// Copyright 2016.
// Siemens Product Lifecycle Management Software Inc.
// All Rights Reserved.
// ==================================================
// @<COPYRIGHT>@
-->
<!-- Default style sheet for displaying part rev summary. -->
<rendering>
<header>
<image source="type"/>
<property name="owning_user"/>
<inject type="dataset" src="Ads1OwningProgram"/>
<property name="last_mod_date"/>
<property name="release_status_list" renderingHint="overflow"/>
<property name="object_type"/>
</header>
//我的工作任务
<page titleKey="&#25105;&#30340;&#24037;&#20316;&#27969;&#20220;&#21153;">
<content visibleWhen="v9MyCurrentTaskNodeName == DO" >
<section title="&#20013;&#25991;">
<section title="&#23646;&#24615;">
<content>
<property name="v9MyCurrentTaskNodeName" renderingHint="label"/>
<property name="item_id" renderingHint="label" required="true"/>
<property name="item_revision_id" renderingHint="label"/>
<property name="object_name"/>
<property name="object_desc"/>
<property name="object_type"/>
</content>
</section>
<section title="&#25991;&#20214;">
<content>
<column width="33.3%">
<section title="&#25991;&#20214;1">
<objectSet source="Fnd0IsDescribedByDocument.DocumentRevision" defaultdisplay="thumbnailDisplay" sortby="object_string" sortdirection="ascending">
<thumbnailDisplay/>
<command actionKey="newBusinessObjectContextualAction" commandId="com.teamcenter.rac.common.AddNew" renderingHint="commandbutton"/>
</objectSet>
</section>
</column>
<column width="33.3%">
<section title="&#25991;&#20214;2">
<objectSet source="Fnd0IsDescribedByDocument.DocumentRevision" defaultdisplay="thumbnailDisplay" sortby="object_string" sortdirection="ascending">
<thumbnailDisplay/>
<command actionKey="newBusinessObjectContextualAction" commandId="com.teamcenter.rac.common.AddNew" renderingHint="commandbutton"/>
</objectSet>

</section>
</column>
<column width="33.4%">
<section title="&#25991;&#20214;3">
<objectSet source="Fnd0IsDescribedByDocument.DocumentRevision" defaultdisplay="thumbnailDisplay" sortby="object_string" sortdirection="ascending">
<thumbnailDisplay/>
<command actionKey="newBusinessObjectContextualAction" commandId="com.teamcenter.rac.common.AddNew" renderingHint="commandbutton"/>
</objectSet>
</section>
</column>
</content>
</section>
</section>
</content>

<content visibleWhen="v9MyCurrentTaskNodeName == &#26657;&#23545;" >
<section title="&#26657;&#23545;">
<section title="&#23646;&#24615;">
<content>
<property name="v9MyCurrentTaskNodeName" renderingHint="label"/>
<property name="item_id" renderingHint="label" required="true"/>
<property name="item_revision_id" renderingHint="label"/>
<property name="object_name"/>
<property name="object_desc"/>
<property name="object_type"/>
</content>
</section>
<section title="&#25991;&#20214;">
<content>
<column width="33.3%">
<section title="&#25991;&#20214;1">
<objectSet source="Fnd0IsDescribedByDocument.DocumentRevision" defaultdisplay="thumbnailDisplay" sortby="object_string" sortdirection="ascending">
<thumbnailDisplay/>
<command actionKey="newBusinessObjectContextualAction" commandId="com.teamcenter.rac.common.AddNew" renderingHint="commandbutton"/>
</objectSet>
</section>
</column>
<column width="33.3%">
<section title="&#25991;&#20214;2">
<objectSet source="Fnd0IsDescribedByDocument.DocumentRevision" defaultdisplay="thumbnailDisplay" sortby="object_string" sortdirection="ascending">
<thumbnailDisplay/>
<command actionKey="newBusinessObjectContextualAction" commandId="com.teamcenter.rac.common.AddNew" renderingHint="commandbutton"/>
</objectSet>

</section>
</column>
<column width="33.4%">
<section title="&#25991;&#20214;3">
<objectSet source="Fnd0IsDescribedByDocument.DocumentRevision" defaultdisplay="thumbnailDisplay" sortby="object_string" sortdirection="ascending">
<thumbnailDisplay/>
<command actionKey="newBusinessObjectContextualAction" commandId="com.teamcenter.rac.common.AddNew" renderingHint="commandbutton"/>
</objectSet>
</section>
</column>
</content>
</section>
</section>
</content>
</page>
<page titleKey="tc_xrt_Overview" visibleWhen="ActiveWorkspace:SubLocation != com.siemens.splm.client.occmgmt:OccurrenceManagementSubLocation and ActiveWorkspace:SubLocation != com.siemens.splm.client.cba.CADBOMAlignment:CBASublocation and {pref:EnterpriseBOM_feature_installed}!=true">

<column width="40%">
<section titleKey="tc_xrt_properties" >
<property name="item_id" renderingHint="label"/>
<property name="item_revision_id" renderingHint="label"/>
<property name="object_name"/>
<property name="object_desc"/>
<property name="object_type"/>
<content visibleWhen="REF(items_tag,Part).fnd0AssemblyIndicator==Configurable Assembly">
<inject type="dataset" src="Smc1VariantConfigContextOnItemRevision"/>
</content>
<content visibleWhen="REF(items_tag,Part).fnd0AssemblyIndicator==Generic Part">
<inject type="dataset" src="Smc1VariantConfigContextOnItemRevision"/>
</content>
<property name="release_status_list" renderingHint="label"/>
<property name="date_released" renderingHint="label"/>
<property name="effectivity_text" renderingHint="label"/>
<inject type="dataset" src="Pma1PartRevSummary"/>
<break/>
<property name="owning_user" renderingHint="objectlink" modifiable="false"/>
<property name="owning_group" renderingHint="objectlink" modifiable="false"/>
<property name="last_mod_user"/>
<property name="checked_out" renderingHint="label"/>
<property name="checked_out_user"/>
<break/>
<property name="fnd0CurrentLocationCode"/>
<inject type="dataset" src="Vm1OriginalLocationCode"/>
<property name="REF(items_tag,Item).GRM(IMAN_reference,PartLogisticsForm).isSerialized" />
<break/>
<command commandId="com.teamcenter.rac.properties" titleKey="tc_xrt_moreProperties"/>
</section>
<inject type="dataset" src="Sci0ItemOverviewPropOnItemRev"/>
<inject type="dataset" src="Sci0ImdsSemiComponent"/>
<inject type="dataset" src="S2clScalarRatingOverview"/>
<content visibleWhen="Cls0ClassifiedBy != null" >
<!-- advanced Classification -->
<inject type="dataset" src="Fnd0ClassificationSummary"/>
</content>
<content visibleWhen="ics_classified != null and Cls0ClassifiedBy == null" >
<!-- traditional Classification -->
<inject type="dataset" src="Fnd0ClassificationSummary"/>
</content>
<content visibleWhen="REFBY(lbr0LibraryObject,Lbr0LibraryElement).lbr0ElementId != null" >
<inject type="dataset" src="Lbr1LibraryInformation"/>
</content>
<inject type="dataset" src="ProjectListInfo"/>
<inject type="dataset" src="LicenseListInfo"/>
</column>
<column width="60%">
<section titleKey="tc_xrt_Preview">
<inject type="dataset" src="Awp0GalleryViewer" module="js/aw-include.directive"/>
</section>
</column>
<column width="100%">
<inject type="dataset" src="Fnd0AlignedDesignsProvider"/>
<inject type="dataset" src="Awp0GlobalAlternatesProvider"/>
<content visibleWhen="REF(items_tag,Part).fnd0AssemblyIndicator==Configurable Assembly">
<inject type="dataset" src="SolutionVariants"/>
</content>
<content visibleWhen="REF(items_tag,Part).fnd0AssemblyIndicator==Generic Part">
<inject type="dataset" src="SolutionVariants"/>
</content>
</column>
</page>
<page titleKey="tc_xrt_Overview" visibleWhen="ActiveWorkspace:SubLocation != com.siemens.splm.client.occmgmt:OccurrenceManagementSubLocation and ActiveWorkspace:SubLocation != com.siemens.splm.client.cba.CADBOMAlignment:CBASublocation and {pref:EnterpriseBOM_feature_installed}==true">
<column width="55%">
<section titleKey="tc_xrt_partProperties">
<property name="item_id" renderingHint="label"/>
<property name="item_revision_id" renderingHint="label"/>
<property name="object_name"/>
<property name="object_desc"/>
<content visibleWhen="REF(items_tag,Part).fnd0AssemblyIndicator==Configurable Assembly">
<inject type="dataset" src="Smc1VariantConfigContextOnItemRevision"/>
</content>
<content visibleWhen="REF(items_tag,Part).fnd0AssemblyIndicator==Generic Part">
<inject type="dataset" src="Smc1VariantConfigContextOnItemRevision"/>
</content>
<property name="object_type"/>
<property name="release_status_list" renderingHint="label"/>
<property name="effectivity_text" renderingHint="label"/>
<inject type="dataset" src="Pma1PartRevSummary"/>
<inject type="dataset" src="Ebm1PartRevSummary"/>
<break/>
<property name="owning_user" renderingHint="objectlink" modifiable="false"/>
<property name="owning_group" renderingHint="objectlink" modifiable="false"/>
<property name="last_mod_user"/>
</section>
<inject type="dataset" src="S2clScalarRatingOverview"/>
<content visibleWhen="Cls0ClassifiedBy != null" >
<!-- advanced Classification -->
<inject type="dataset" src="Fnd0ClassificationSummary"/>
</content>
<content visibleWhen="ics_classified != null and Cls0ClassifiedBy == null" >
<!-- traditional Classification -->
<inject type="dataset" src="Fnd0ClassificationSummary"/>
</content>
<content visibleWhen="REFBY(lbr0LibraryObject,Lbr0LibraryElement).lbr0ElementId != null" >
<inject type="dataset" src="Lbr1LibraryInformation"/>
</content>
</column>
<column width="45%">
<section titleKey="tc_xrt_Preview">
<image source="thumbnail"/>
</section>
</column>
<column width="100%">
<inject type="dataset" src="Fnd0AlignedDesignsProvider"/>
<content visibleWhen="REF(items_tag,Part).fnd0AssemblyIndicator!=Configurable Assembly and REF(items_tag,Part).fnd0AssemblyIndicator!=Generic Part">
<inject type="dataset" src="Ebm1GlobalAlternatesProvider"/>
</content>
<content visibleWhen="REF(items_tag,Part).fnd0AssemblyIndicator==Configurable Assembly">
<inject type="dataset" src="SolutionVariants"/>
</content>
<content visibleWhen="REF(items_tag,Part).fnd0AssemblyIndicator==Generic Part">
<inject type="dataset" src="SolutionVariants"/>
</content>
</column>
</page>
<content visibleWhen="REF(items_tag,Part).fnd0AssemblyIndicator!=Configurable Assembly and REF(items_tag,Part).fnd0AssemblyIndicator!=Generic Part">
<inject type="dataset" src="Vm1PartnerContracts"/>
<inject type="dataset" src="Vm1VendorParts"/>
</content>
<inject type="dataset" src="Fsh1FinishesSection"/>
<inject type="dataset" src="Ads1NotesSection"/>
<inject type="dataset" src="Sm1MadeFromSection"/>
<inject type="preference" src="ClassificationStylesheetTab"/>
<page titleKey="tc_xrt_jt_viewer" visibleWhen="IMAN_Rendering!=null and ActiveWorkspace:SubLocation != com.siemens.splm.client.occmgmt:OccurrenceManagementSubLocation and ActiveWorkspace:SubLocation != com.siemens.splm.client.cba.CADBOMAlignment:CBASublocation">
<image source="preview"/>
</page>
<page titleKey="tc_xrt_jt_viewer" visibleWhen="IMAN_Rendering==null and TC_Primary_Design_Representation!=null and ActiveWorkspace:SubLocation != com.siemens.splm.client.occmgmt:OccurrenceManagementSubLocation and ActiveWorkspace:SubLocation != com.siemens.splm.client.cba.CADBOMAlignment:CBASublocation">
<image source="preview"/>
</page>
<inject type="dataset" src="Smc1JTViewerForPartRevision"/>
<page titleKey="web_whereused">
<column width="100%">
<section titleKey="tc_xrt_UsedInStructures">
<inject type="dataset" src="UsedInStructures"/>
</section>
<content visibleWhen="{pref:QSEARCH_filter_queries_by_product_path}==true and {pref:PSEEnableUOMModifiableOnItem}!=NULL">
<section titleKey="tc_xrt_UsedInStructuresTopLevel">
<inject type="dataset" src="UsedInStructuresTopLevel"/>
</section>
</content>
<htmlPanel declarativeKey="partUsagesTableFullScreen"/>
<!--
// ====================================================================================================
// The following column defines the display for when Active Workspace Structure solution is installed.
// If you have not installed this option, this column should be removed.
// ====================================================================================================
-->
<inject type="dataset" src="Awb0Contexts" />
<inject type="dataset" src="Awp0RelatedDrawings" />
<!--
// ====================================================================================================
// The following column defines the display for when Active Workspace Structure solution is installed.
// If you have not installed this option, this column should be removed.
// ====================================================================================================
-->
<section titleKey="tc_xrt_References">
<objectSet source="Awp0ReferencesProvider.WorkspaceObject" sortdirection="ascending" sortby="object_string" defaultdisplay="tableDisplay">
<thumbnailDisplay/>
<tableDisplay>
<property name="object_string"/>
<property name="object_type"/>
<property name="release_status_list"/>
<property name="date_released"/>
<property name="owning_user"/>
</tableDisplay>
<listDisplay/>
</objectSet>
</section>
</column>
</page>
<page titleKey="attachments">
<section titleKey="tc_xrt_Files">
<objectSet source="IMAN_specification.Dataset,IMAN_reference.Dataset,IMAN_manifestation.Dataset,IMAN_Rendering.Dataset,TC_Attaches.Dataset,IMAN_UG_altrep.Dataset,IMAN_UG_scenario.Dataset,IMAN_Simulation.Dataset,Mci0PMIXmlRel.Dataset" defaultdisplay="listDisplay" sortby="object_string" sortdirection="ascending">
<tableDisplay>
<property name="object_string"/>
<property name="object_type"/>
<property name="relation" modifiable="true"/>
<property name="release_status_list"/>
<property name="date_released"/>
<property name="owning_user"/>
<inject type="dataset" src="Xc1TransactionRecordSummary" />
</tableDisplay>
<thumbnailDisplay/>
<treeDisplay>
<property name="object_string"/>
<property name="object_type"/>
<property name="release_status_list"/>
<property name="date_released"/>
<property name="owning_user"/>
<inject type="dataset" src="Xc1TransactionRecordSummary" />
</treeDisplay>
<listDisplay/>
<command actionKey="newBusinessObjectContextualAction" commandId="com.teamcenter.rac.common.AddNew" renderingHint="commandbutton"/>
<command actionKey="pasteAction" commandId="com.teamcenter.rac.viewer.pastewithContext" renderingHint="commandbutton"/>
<command actionKey="cutAction" commandId="org.eclipse.ui.edit.cut" renderingHint="commandbutton">
<parameter name="localSelection" value="true"/>
</command>
</objectSet>
</section>
<section titleKey="tc_xrt_Documents">
<objectSet source="IMAN_specification.DocumentRevision" sortdirection="ascending" sortby="object_string" defaultdisplay="listDisplay">
<tableDisplay>
<property name="object_string"/>
<property name="object_type"/>
<property name="release_status_list"/>
<property name="date_released"/>
<property name="owning_user"/>
</tableDisplay>
<thumbnailDisplay/>
<treeDisplay>
<property name="object_string"/>
<property name="object_type"/>
<property name="release_status_list"/>
<property name="date_released"/>
<property name="owning_user"/>
</treeDisplay>
<listDisplay/>
<command actionKey="newBusinessObjectContextualAction" commandId="com.teamcenter.rac.common.AddNew" renderingHint="commandbutton"/>
<command actionKey="pasteAction" commandId="com.teamcenter.rac.viewer.pastewithContext" renderingHint="commandbutton"/>
<command actionKey="cutAction" commandId="org.eclipse.ui.edit.cut" renderingHint="commandbutton">
<parameter name="localSelection" value="true"/>
</command>
</objectSet>
</section>
<inject type="dataset" src="Awn0ValidationResultsSummary"/>
<inject type="dataset" src="Cm1PartRevSummaryPrimaryToPrimaryDocRel"/>
</page>
<inject type="dataset" src="Cm1ChangeRelationSummary"/>
<inject type="dataset" src="Ase0SystemRequirementsSubLocation"/>
<inject type="dataset" src="Sci1IMDSTabSummary"/>
<inject type="dataset" src="Sci0Materials"/>
<inject type="dataset" src="Mtw0CompositionTabForItemRevSummary"/>
<inject type="dataset" src="Scw0ComplianceCategoriesSummary"/>
<inject type="dataset" src="Scw0ComplianceInfo"/>
<page titleKey="tc_xrt_History">
<section titleKey="tc_xrt_RevisionHistory">
<objectSet source="revision_list.ItemRevision" sortdirection="descending" sortby="last_mod_date" defaultdisplay="tableDisplay">
<tableDisplay>
<property name="object_string"/>
<property name="release_status_list"/>
<property name="date_released"/>
<property name="fnd0IsRevisionDiscontinued"/>
<content visibleWhen="{pref:Pma0IsReleaseAtLeast143}==true">
<property name="fnd0IsCancelled"/>
</content>
<property name="owning_user"/>
<property name="last_mod_date"/>
</tableDisplay>
<thumbnailDisplay/>
<treeDisplay>
<property name="object_string"/>
<property name="release_status_list"/>
<property name="date_released"/>
<property name="fnd0IsRevisionDiscontinued"/>
<content visibleWhen="{pref:Pma0IsReleaseAtLeast143}==true">
<property name="fnd0IsCancelled"/>
</content>
<property name="owning_user"/>
<property name="last_mod_date"/>
</treeDisplay>
<listDisplay/>
</objectSet>
</section>
<inject type="dataset" src="Cm1ChangeHistorySummary" />
</page>
<inject type="dataset" src="WorkflowSummary" />
<inject type="dataset" src="RelationsSummary" />
<inject type="dataset" src="S2clItemRevSummary"/>
<inject type="dataset" src="Cae1ItemRevSummary"/>
<inject type="dataset" src="Awn0ItemRevSummary"/>
<inject type="preference" src="InContextAnalyticsPref"/>
<inject type="dataset" src="Rb0InContextReportsSubLocation" />
<inject type="dataset" src="AuditLogForItemRev"/>
</rendering>

posted @ 2026-04-25 15:35  张永全-PLM顾问  阅读(72)  评论(0)    收藏  举报