wangting
2024-05-07 ded3890236e8d2371afc44c48631bb0fb9101d76
Source/ProjectWeb/src/actions/base/BaseAction.js
@@ -189,16 +189,16 @@
 * @param callback 回调,如果存在后置事件,会在执行完成后执行回调,否则直接回调
 * @param preEventName 后置事件名称,默认 afterevent
 */
export const callPostEvent = (options,fnTarget,callback,postEventName)=>{
export const callPostEvent = (options,fnTarget,callback,actionType,postEventName)=>{
  let afterEvent = options.paramVOS[postEventName || 'afterevent'];
  if(afterEvent) {
    let buttonParse = parseEventByUrl(afterEvent,options,false);
    if(validatenull(buttonParse.jsPath)){
      fnTarget(buttonParse,callback);
      fnTarget(buttonParse,callback,actionType);
    }else{
      try {
        import("../"+buttonParse.jsPath+".js").then(module => {
          module[buttonParse.methodName](options,callback);
          module[buttonParse.methodName](options,callback,actionType);
        })
      } catch (error) {
        Vue.prototype.$message.error('未找到后置事件执行js');
@@ -206,7 +206,7 @@
    }
  }else{
    if(callback){
      callback(options);
      callback(actionType);
    }
  }
};