提交 87e8d584 编写于 作者: Mosher's avatar Mosher

update:更新表格工具栏行为

上级 8092ea74
......@@ -6,7 +6,7 @@
{{lowerCase item.codeName}}: [
{{#each item.psDEUIActionGroup.psUIActionGroupDetails as | action |}}
{{#action}}
{ name: "{{name}}", caption: "{{psUIAction.caption}}", showIcon: {{showIcon}}, showCaption: {{showCaption}}, separator: {{addSeparator}}, uIActionTag: "{{psUIAction.uIActionTag}}", noPrivDisplayMode: "{{psUIAction.noPrivDisplayMode}}", dataAccessAction: '{{psUIAction.dataAccessAction}}', actionTarget: '{{psUIAction.actionTarget}}', disabled: false, visible: true,{{#if psUIAction.psSysImage}}{{#if psUIAction.psSysImage.imagePath}} imgPath: "{{psUIAction.psSysImage.imagePath}}",{{/if}}{{#if psUIAction.psSysImage.cssClass}} iconClass: "{{psUIAction.psSysImage.cssClass}}",{{/if}}{{/if}} },
{ name: "{{name}}", caption: "{{psUIAction.caption}}", showIcon: {{showIcon}}, showCaption: {{showCaption}}, separator: {{addSeparator}}, uIActionTag: "{{psUIAction.uIActionTag}}", noPrivDisplayMode: "{{psUIAction.noPrivDisplayMode}}", dataAccessAction: '{{psUIAction.dataAccessAction}}', actionTarget: '{{psUIAction.actionTarget}}', uIActionMode: "{{psUIAction.uIActionMode}}", disabled: false, visible: true,{{#if psUIAction.psSysImage}}{{#if psUIAction.psSysImage.imagePath}} imgPath: "{{psUIAction.psSysImage.imagePath}}",{{/if}}{{#if psUIAction.psSysImage.cssClass}} iconClass: "{{psUIAction.psSysImage.cssClass}}",{{/if}}{{/if}} },
{{/action}}
{{/each}}
],
......
......@@ -194,12 +194,26 @@ export class GridControl extends MDControl {
/**
* @description 操作列事件触发
* @param {IActionParam} action
* @param {IActionParam} actionParam
* @param {IParam} record
* @memberof GridControl
*/
public onToolbarEvent(action: IActionParam, record: IParam) {
//todo 界面行为
public onToolbarEvent(actionParam: IActionParam, record: IParam) {
const { data } = actionParam;
if (!record || !data) {
console.warn("工具栏执行参数不足");
return;
}
// 准备参数
const inputParam = {
context: this.state.context,
viewParams: this.state.viewParams,
data: record,
event: data.event,
actionEnvironment: this
};
// 执行行为
App.getAppActionService().execute(data, inputParam);
}
/**
......@@ -661,7 +675,7 @@ export class GridControl extends MDControl {
...superParams,
useCustom: this.useCustom(),
onEditorEvent: this.onEditorEvent,
onToolbarEvent: this.onToolbarEvent
onToolbarEvent: this.onToolbarEvent.bind(this)
};
}
}
......@@ -22,6 +22,7 @@ export class ControlVO extends ControlVOBase {
export const ctrlState = {
controlCodeName: '{{ctrl.codeName}}',
controlName: '{{ctrl.name}}',
appEntityCodeName: '{{ctrl.appEntity.codeName}}',
appDeCodeName:'{{ctrl.appEntity.codeName}}',
appDeKeyFieldName: '{{#if ctrl.appEntity.keyPSAppDEField}}{{ctrl.appEntity.keyPSAppDEField.codeName}}{{/if}}',
appDeMajorFieldName: '{{#if ctrl.appEntity.majorPSAppDEField}}{{ctrl.appEntity.majorPSAppDEField.codeName}}{{/if}}',
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册