From f29ad099c6dc5c55d6cb94fb190d06743777ec6d Mon Sep 17 00:00:00 2001
From: dangsn <dangsn@chicecm.com>
Date: 星期三, 05 六月 2024 10:56:48 +0800
Subject: [PATCH] 项目引用调整

---
 Source/ProjectWeb/src/components/actions/base/BaseAction.js |   15 ++++++---------
 1 files changed, 6 insertions(+), 9 deletions(-)

diff --git a/Source/ProjectWeb/src/components/actions/base/BaseAction.js b/Source/ProjectWeb/src/components/actions/base/BaseAction.js
index b560c29..1c336ee 100644
--- a/Source/ProjectWeb/src/components/actions/base/BaseAction.js
+++ b/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') {
     //鏈夐厤缃產ction璺緞锛屼娇鐢ㄨ矾寰勫搴旂殑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('鏈壘鍒板搴攁ction锛岃閲嶆柊閰嶇疆鎸夐挳锛�');
-    }
+    //鎵ц閫氱敤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) {

--
Gitblit v1.9.3