创建基于角色的主页
安装 PTC FlexPLM 后主页中提供的唯一角色就是默认角色。要配置其他自定义角色,管理员将通过创建自定义版本的文件来覆盖出厂配置文件。可以根据需要配置任意数量的唯一主页布局。可以将每个布局关联到特定配置文件中,后者代表对系统企业用户有意义的角色集合。
创建基于角色的自定义主页
要在 PTC FlexPLM 中创建基于角色的自定义主页:
1. 创建 PDMLink 配置文件并向其中添加用户或组。记下为配置文件所取的名称。您将在后续步骤中使用此名称,将配置文件关联至主页布局。
2. 要覆盖默认配置文件,指示系统加载将要创建的自定义配置文件。打开 <Windchill>\codebase\FlexPLM.xconf 文件,然后查找以下条目︰
<Property name="com.ptc.layout.configurableview.
configurableViewDefinitionXMLFile"
default="/codebase/ConfigurableView_Definitions.xml"
targetFile="codebase/wt.properties"/>
3. 将步骤 2 中的条目复制到剪贴板中。
4. 打开 <Windchill>\site.xconf 文件,并通过从剪贴板粘贴到文件末尾附近的位置添加条目。
5. 更改条目,使其反映自定义文件名。
添加到 site.xconf 的示例︰
<Property name="com.ptc.layout.configurableview.
configurableViewDefinitionXMLFile"
default="/codebase/custom.ConfigurableView_Definitions.xml"
targetFile="codebase/wt.properties"/>
6. 要创建自定义文件,请将 <Windchill>\codebase\ConfigurableView_Definitions.xml 复制到 <Windchill>\codebase\custom.ConfigurableView_Definitions.xml。
7. 更改 custom.ConfigurableView_Definitions.xml 以针对每个自定义配置文件创建自定义配置文件和布局集合,从而满足业务用户担任的角色。以下示例调用用于定义新布局并将布局关联至角色配置文件的可配置元素。
在 custom.ConfigurableView_Definitions.xml 文件中,使用以下元素来定义所需的自定义布局,并将其关联到业务用户使用 PTC FlexPLM 系统时担任的角色:
◦ 针对在系统中定义的每个唯一角色配置文件定义一个 layoutProfileMapping 元素。请注意,可以将相同布局分配给一个或多个配置文件。
<layoutProfileMapping profile='default_oob_profile'
layout='standardLayout'/>
<layoutProfileMapping profile='vendor_oob_profile'
layout='standardVendorLayout'/>
<layoutProfileMapping profile='sourcingManager'
layout='sourcingLayout'/>
◦ 定义一个 layoutDefinition 元素,标识系统中可用的每个唯一布局。将布局关联至角色配置文件时,布局名称可用于 layoutProfileMapping 条目。
<layoutDefinition name='standardVendorLayout'>
◦ 每个 layoutDefinition 包含一个或多个列定义。使用列宽来帮助控制整个页面的宽度。
<column width='500'>
◦ 每列可以包含组件。组件在字面上指的是页面或报告。
<component>
◦ ID 是要使用的实际活动名称。
<id>NOTICES</id>
|
|
在 activityControllerMappings.properties 中,NOTICES 活动链接至特定控制器中的某个活动。
|
◦ 使用 params 元素,定义想要传递到报告中的任何请求参数。这可用于不同布局,其中可以使用相同报告,但可以根据传递到报告中的参数触发其中的不同视图。此外,不同布局也可传递不同参数。
<params>
◦ 在此示例中,templateType 是指根据请求传递到页面/报告中的实际请求参数。
<templateType>COMPONENT</templateType>
custom.ConfigurableView_Definitions.xml 文件的示例:
<layoutProfileMapping profile='default_oob_profile'
layout='standardLayout'/>
<layoutProfileMapping profile='vendor_oob_profile'
layout='standardVendorLayout'/>
<layoutProfileMapping profile='sourcingManager'
layout='sourcingLayout'/>
<layoutDefinition name='standardVendorLayout'>
<column width='500'>
<component>
<id>NOTICES</id>
<params>
<templateType>COMPONENT</templateType>
</params>
</component>
<component>
<id>ORDER_CONFIRMATION_SUMMARY</id>
<params>
<templateType>COMPONENT</templateType>
</params>
</component>
<component>
<id>PRODUCT_SAMPLE_SUMMARY</id>
<params>
<templateType>COMPONENT</templateType>
</params>
</component>
</column>
<column width='500'>
<component>
<id>SEASON_SUMMARY</id>
<params>
</params>
</component>
<component>
<id>RFQ_SUMMARY</id>
<params>
</params>
</component>
<component>
<id>MATERIAL_SAMPLE_SUMMARY</id>
<params>
<templateType>COMPONENT</templateType>
</params>
</component>
</column>
</layoutDefinition>