/**
 * 执行 {{pascalCase logicNode.name}} 节点
 *
 * @protected
 * @memberof {{pascalCase uiLogic.codeName}}UILogicBase
 */
protected async execute_{{logicNode.codeName}}_node() {
    return new Promise<void>((resolve: any) => {
        const options = {};
        {{#if logicNode.buttonsType}}
            {{#eq logicNode.buttonsType 'YESNO'}}
        Object.assign(options, { okText: '是', cancelText: '否' });
            {{/eq}}
            {{#eq logicNode.buttonsType 'YESNOCANCEL'}}
        throw new Error('YESNOCANCEL 按钮样式暂未支持');
            {{/eq}}
            {{#eq logicNode.buttonsType 'OK'}}
        Object.assign(options, { okText: '确定' });
            {{/eq}}
            {{#eq logicNode.buttonsType 'OKCANCEL'}}
        Object.assign(options, { okText: '确定', cancelText: '取消' });
            {{/eq}}
        {{/if}}
        {{#if logicNode.msgBoxParam}}
        const msgBoxParam: any = this.getParam("{{logicNode.msgBoxParam.codeName}}");
        const data: any = msgBoxParam ? msgBoxParam.getReal() : {};
        {{/if}}
        {{#if (eq logicNode.msgBoxType 'INFO')}}
        Object.assign(options, { type: 'info' });
        {{else if (eq logicNode.msgBoxType 'QUESTION')}}
        Object.assign(options, { type: 'info' });
        {{else if (eq logicNode.msgBoxType 'WARNING')}}
        Object.assign(options, { type: 'warning' });
        {{else if (eq logicNode.msgBoxType 'ERROR')}}
        Object.assign(options, { type: 'error' });
        {{else}}
        Object.assign(options, { type: 'info' });
        {{/if}}
        const msgBox = App.getDialogHelper();
        const handleMsgBox = async (result: boolean) => {
        {{#or (eq logicNode.buttonsType 'YESNO') (eq logicNode.buttonsType 'YESNOCANCEL')}}
            const resultText = result ? 'yes' : 'no';
        {{/or}}
        {{#or (eq logicNode.buttonsType 'OK') (eq logicNode.buttonsType 'OKCANCEL')}}
            const resultText = result ? 'ok' : 'cancel';
        {{/or}}
            {{#if logicNode.msgBoxParam}}
            msgBoxParam.bind(resultText);
            {{/if}}
            this.bindLastReturnParam(resultText);
            {{> @macro/logic-node/next-node.hbs}}
            resolve();
        }
        Object.assign(options, {
            {{#if logicNode.msgBoxParam}}
            title: data && data.title ? data.title : "{{#if logicNode.title}}{{logicNode.title}}{{else}}消息弹窗{{/if}}",
            content: data && data.message ? data.message : `{{logicNode.message}}`,
            {{else}}
            title: "{{#if logicNode.title}}{{logicNode.title}}{{else}}消息弹窗{{/if}}",
            content: `{{logicNode.message}}`,
            {{/if}}
            ok: () => { handleMsgBox(true); },
            cancel: () => { handleMsgBox(false); }
        })
        msgBox.custom(options);
    })
}
