ForCAX/entry/src/main/ets/pages/LayoutInterface/Layout/CAM.ets
JackLee ba448cd637 解耦事件,把事件类型分为Page和Event.
Page主要针对Arkui侧的子窗口事件
Event主要针对Native侧的事件.

后续考虑解耦为如下:
Arkui_Page(主要针对子窗口归一化调用)
Arkui_Event(主要针对arkui侧的归一化动态组件操作)
Native_Page(主要针对Native侧对Arkui侧的页面数据更新和回调)
Native_Event(主要针对单一从Aarkui侧调用Native指令)

本次更新后btnEvent中增加了page地址和args.可以在预置功能中预置命令和参数.
2026-04-13 01:06:38 +08:00

31 lines
2.3 KiB
Plaintext

import { TitleModel } from "../Interface/ModelInterface";
import {TitleDefaultBars} from './TitleDefaultBars'
import { GroupActionMenu } from "./GroupAction";
import { TitleGroup } from "../Interface/GroupInterface";
import { MatrixModel,DevModel } from "./MatrixModel";
import { TitleButton,ModelType,EventType } from "../Interface/ButtonInterface";
export let TitleCAM:Array<TitleModel>=[
TitleDefaultBars[0],
{cmName:'加工',cmPage:'',cmTips:'',cmEvents: [
//数组表示非单个BtnEvent
[
//数组成员区别是GroupEvent还是BtnEvent
[{grpName:'加工环境',grpBtn:[
{btnModel:[ModelType.BASE],btnName:"重置环境",btnNamed:"",btnIcon:"base_new_file",btnTips:"",btnEvent:{uid:'',command:'',page:'',type:EventType.EVENT,args:[]}},
{btnModel:[ModelType.BASE],btnName:"工艺",btnNamed:"",btnIcon:"base_open_file",btnTips:"",btnEvent:{uid:'',command:'',page:'',type:EventType.EVENT,args:[]}},
[
{btnModel:[ModelType.BASE],btnName:"切削参数",btnNamed:"",btnIcon:"base_save_file",btnTips:"",btnEvent:{uid:'',command:'',page:'',type:EventType.EVENT,args:[]}},
{btnModel:[ModelType.BASE],btnName:"切削速度",btnNamed:"",btnIcon:"base_saveas_file",btnTips:"",btnEvent:{uid:'',command:'',page:'',type:EventType.EVENT,args:[]}},
{btnModel:[ModelType.BASE],btnName:"主轴参数",btnNamed:"",btnIcon:"base_saveall_file",btnTips:"",btnEvent:{uid:'',command:'',page:'',type:EventType.EVENT,args:[]}},
] as Array<TitleButton>,
{btnModel:[ModelType.BASE],btnName:"显示刀路",btnNamed:"",btnIcon:"base_close_file",btnTips:"",btnEvent:{uid:'',command:'',page:'',type:EventType.EVENT,args:[]}},
{btnModel:[ModelType.BASE],btnName:"新建工序",btnNamed:"",btnIcon:"base_import_file",btnTips:"",btnEvent:{uid:'',command:'',page:'',type:EventType.EVENT,args:[]}},
{btnModel:[ModelType.BASE],btnName:"新建刀具",btnNamed:"",btnIcon:"base_export_file",btnTips:"",btnEvent:{uid:'',command:'',page:'',type:EventType.EVENT,args:[]}},
{btnModel:[ModelType.BASE],btnName:"选项",btnNamed:"",btnIcon:"base_open_file",btnTips:"",btnEvent:{uid:'',command:'',page:'',type:EventType.EVENT,args:[]}},
],grpMenu:GroupActionMenu}] as Array<TitleGroup>
]
]},
MatrixModel,
DevModel
]