Просмотр исходного кода

8.3二开平台 getModuleFileContent 超时问题

luoyifan 2 лет назад
Родитель
Сommit
7bd4d3b2c7
2 измененных файлов с 16 добавлено и 5 удалено
  1. 15 4
      dist/yvan-ext.js
  2. 1 1
      dist/yvan-ext.js.map

+ 15 - 4
dist/yvan-ext.js

@@ -4034,6 +4034,7 @@ define(['exports', 'axios', 'qs', 'lodash', 'jquery', 'moment', 'recast', 'xlsx'
             },
         ],
     };
+    //# sourceMappingURL=Workbench.view.js.map
 
     /**
      * 获取当前打开的项目资料
@@ -10294,13 +10295,18 @@ define(['exports', 'axios', 'qs', 'lodash', 'jquery', 'moment', 'recast', 'xlsx'
                 moduleObject.moduleObj = { vjson: jsViewToVJson(moduleObject.modulePage, jsView) };
                 // 触发事件 ModuleItemChange
                 moduleObject.moduleEventBus.publish(EventType.ModuleItemChange, moduleObject);
-                moduleObject.moduleEventBus.publish(EventType.SetVjson, { vjson: moduleObject.moduleObj.vjson, from: "reloadModule" });
+                moduleObject.moduleEventBus.publish(EventType.SetVjson, {
+                    vjson: moduleObject.moduleObj.vjson,
+                    from: "reloadModule"
+                });
                 eventBus.publish(EventType.SetVjson, { moduleId: id, from: "reloadModule" });
             });
         };
         ModuleStore.prototype.addModule = function (id, module, modulePage) {
             var _this = this;
-            getModuleFileContent(module).then(function (_a) {
+            window['mainWindow'].setLoading(true);
+            getModuleFileContent(module)
+                .then(function (_a) {
                 var _b = _a.data, jsController = _b.jsController, jsView = _b.jsView, jsModel = _b.jsModel, groovy = _b.groovy, mybatis = _b.mybatis, lastModifyTime = _b.lastModifyTime;
                 var moduleObject = {
                     id: id, module: module,
@@ -10315,6 +10321,9 @@ define(['exports', 'axios', 'qs', 'lodash', 'jquery', 'moment', 'recast', 'xlsx'
                 moduleObject.moduleEventBus.publish(EventType.ModuleItemChange, moduleObject);
                 // moduleObject.moduleEventBus.publish(EventType.SetVjson, {moduleId: id, from: "addModule"})
                 eventBus.publish(EventType.SetVjson, { moduleId: id, from: "addModule" });
+            })
+                .finally(function () {
+                window['mainWindow'].setLoading(false);
             });
         };
         ModuleStore.prototype.onMainTabChange = function (moduleId, oldModuleId, from) {
@@ -10330,7 +10339,10 @@ define(['exports', 'axios', 'qs', 'lodash', 'jquery', 'moment', 'recast', 'xlsx'
             var moduleObject = this.store[id];
             moduleObject.fileContent.jsView = codeValue;
             moduleObject.moduleObj.vjson = jsViewToVJson(moduleObject.modulePage, codeValue);
-            handles$1.mainWindow.activeModulePage.moduleEventBus.publish(EventType.SetVjson, { vjson: moduleObject.moduleObj.vjson, from: from });
+            handles$1.mainWindow.activeModulePage.moduleEventBus.publish(EventType.SetVjson, {
+                vjson: moduleObject.moduleObj.vjson,
+                from: from
+            });
             eventBus.publish(EventType.SetVjson, { moduleId: id, from: from });
         };
         ModuleStore.prototype.updateJsModel = function (id, codeValue, from) {
@@ -10373,7 +10385,6 @@ define(['exports', 'axios', 'qs', 'lodash', 'jquery', 'moment', 'recast', 'xlsx'
     }(CacheStore));
     // ------------------------------------------------------------------------------------------ use
     var moduleStore = new ModuleStore();
-    //# sourceMappingURL=ModuleStore.js.map
 
     var VjsonExchange = /** @class */ (function () {
         function VjsonExchange(vjson) {

Разница между файлами не показана из-за своего большого размера
+ 1 - 1
dist/yvan-ext.js.map