wangting
2024-05-14 948a8b5fba4baf0a19493ae6d7b8a1dee0d4101a
Source/ProjectWeb/src/components/actions/base/BaseAction.js
@@ -1,6 +1,6 @@
import {validatenull} from "@/util/validate";
import Vue from 'vue';
import {handlers} from '../handlers';
import {handlerAction} from '../handlers';
/**
 * 按钮的基础服务
@@ -61,15 +61,12 @@
  }
  if (button.url && button.url != 'null') {
    //有配置action路径,使用路径对应的js
    import("../" + button.url + ".js").then(module => {
    import(`../${button.url}`).then(module => {
      module.doAction(options, callback);
    })
  } else {
    if (handlers[button.actionVO.id.toLowerCase()]) {
      handlers[button.actionVO.id.toLowerCase()]()
    } else {
      Vue.prototype.$message.error('未找到对应action,请重新配置按钮!');
    }
    //执行通用action
    handlerAction(button.actionVO.id.toLowerCase(),options, callback)
  }
};
@@ -151,7 +148,7 @@
      fnTarget(buttonParse,callback);
    }else{
      try {
        import("../"+buttonParse.jsPath+".js").then(module => {
        import(`../${buttonParse.jsPath}.js`).then(module => {
          module[buttonParse.methodName](options,callback);
        })
      } catch (error) {
@@ -179,7 +176,7 @@
      fnTarget(buttonParse,callback,actionType);
    }else{
      try {
        import("../"+buttonParse.jsPath+".js").then(module => {
        import(`../${buttonParse.jsPath}.js`).then(module => {
          module[buttonParse.methodName](options,callback,actionType);
        })
      } catch (error) {