LOGIC.vue.ftl 1.1 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12
<#assign keyPSDEField>${de.getCodeName()?lower_case}</#assign>
    /**
     * ${item.getCaption()}
     *
     * @param {any[]} args 当前数据
     * @param {any} contextJO 行为附加上下文
     * @param {*} [params] 附加参数
     * @param {*} [$event] 事件源
     * @param {*} [xData]  执行行为所需当前部件
     * @param {*} [actionContext]  执行行为上下文
     * @memberof ${srfclassname('${view.name}')}Base
     */
13
    public ${item.getFullCodeName()}(args: any[],contextJO?:any, params?: any, $event?: any, xData?: any,actionContext?:any,srfParentDeName?:string) {
14 15 16 17 18 19 20 21 22 23 24 25 26 27
        if (args.length === 0) {
            return;
        }
        const _this: any = this;
        if (_this.opendata && _this.opendata instanceof Function) {
            const data: any = { };
            if (args.length > 0) {
                Object.assign(data, { ${keyPSDEField}: args[0].${keyPSDEField} })
            }
            _this.opendata([{ ...data }], params, $event, xData);
        } else {
            _this.$Notice.error({ title: '错误', desc: 'opendata 视图处理逻辑不存在,请添加!' });
        }
    }