|
@@ -37727,6 +37727,7 @@ define(['exports'], function (exports) { 'use strict';
|
|
var Scope = /** @class */ (function () {
|
|
var Scope = /** @class */ (function () {
|
|
function Scope(_a) {
|
|
function Scope(_a) {
|
|
var model = _a.model, vjson = _a.vjson;
|
|
var model = _a.model, vjson = _a.vjson;
|
|
|
|
+ this.scopeTag = '';
|
|
/**
|
|
/**
|
|
* 业务模块的唯一编号
|
|
* 业务模块的唯一编号
|
|
*/
|
|
*/
|
|
@@ -37734,6 +37735,9 @@ define(['exports'], function (exports) { 'use strict';
|
|
this._lastShowTime = 0;
|
|
this._lastShowTime = 0;
|
|
this.model = model;
|
|
this.model = model;
|
|
this.originalVjson = lodash.cloneDeep(vjson);
|
|
this.originalVjson = lodash.cloneDeep(vjson);
|
|
|
|
+ if (vjson.scopeTag) {
|
|
|
|
+ this.scopeTag = vjson.scopeTag;
|
|
|
|
+ }
|
|
this.vjson = this.originalVjson; // this.buildVjson()
|
|
this.vjson = this.originalVjson; // this.buildVjson()
|
|
}
|
|
}
|
|
/**
|
|
/**
|
|
@@ -37746,6 +37750,8 @@ define(['exports'], function (exports) { 'use strict';
|
|
*/
|
|
*/
|
|
Scope.prototype.onDestroy = function () {
|
|
Scope.prototype.onDestroy = function () {
|
|
};
|
|
};
|
|
|
|
+ Scope.prototype.onGoBack = function (params) {
|
|
|
|
+ };
|
|
Object.defineProperty(Scope.prototype, "isScope", {
|
|
Object.defineProperty(Scope.prototype, "isScope", {
|
|
get: function () {
|
|
get: function () {
|
|
return true;
|
|
return true;
|
|
@@ -37766,6 +37772,9 @@ define(['exports'], function (exports) { 'use strict';
|
|
Scope.prototype._onLoad = function () {
|
|
Scope.prototype._onLoad = function () {
|
|
this.onLoad();
|
|
this.onLoad();
|
|
};
|
|
};
|
|
|
|
+ Scope.prototype._onGoBack = function (params) {
|
|
|
|
+ this.onGoBack(params);
|
|
|
|
+ };
|
|
Scope.prototype.showMainWindow = function () {
|
|
Scope.prototype.showMainWindow = function () {
|
|
var _a;
|
|
var _a;
|
|
var handle = (_a = window.mainWindow) === null || _a === void 0 ? void 0 : _a._handle;
|
|
var handle = (_a = window.mainWindow) === null || _a === void 0 ? void 0 : _a._handle;
|
|
@@ -37826,7 +37835,7 @@ define(['exports'], function (exports) { 'use strict';
|
|
{
|
|
{
|
|
iconCls: 'x-fa fa-home',
|
|
iconCls: 'x-fa fa-home',
|
|
handler: function () {
|
|
handler: function () {
|
|
- that.showMainWindow();
|
|
|
|
|
|
+ that.goHome();
|
|
},
|
|
},
|
|
},
|
|
},
|
|
],
|
|
],
|
|
@@ -37874,9 +37883,9 @@ define(['exports'], function (exports) { 'use strict';
|
|
}
|
|
}
|
|
}
|
|
}
|
|
Ext.Viewport.add(that._handle);
|
|
Ext.Viewport.add(that._handle);
|
|
- if (window.mainWindow === that || window.loginWindow === that) {
|
|
|
|
- Scope.SHOW_PAGE_STACK.length = 0;
|
|
|
|
- }
|
|
|
|
|
|
+ // if ((window as any).mainWindow === that || (window as any).loginWindow === that) {
|
|
|
|
+ // Scope.SHOW_PAGE_STACK.length = 0
|
|
|
|
+ // }
|
|
that._handle.setStyle({ 'z-index': 1 });
|
|
that._handle.setStyle({ 'z-index': 1 });
|
|
var actived = false;
|
|
var actived = false;
|
|
Ext.Viewport.getItems().items.forEach(function (item, idx) {
|
|
Ext.Viewport.getItems().items.forEach(function (item, idx) {
|
|
@@ -37890,21 +37899,49 @@ define(['exports'], function (exports) { 'use strict';
|
|
});
|
|
});
|
|
return that._handle;
|
|
return that._handle;
|
|
};
|
|
};
|
|
- Scope.prototype.goBack = function () {
|
|
|
|
|
|
+ Scope.prototype.goHome = function () {
|
|
|
|
+ var handle = Ext.Viewport.getActiveItem();
|
|
|
|
+ Scope.SHOW_PAGE_STACK.splice(1);
|
|
|
|
+ var scope = Scope.SHOW_PAGE_STACK[0];
|
|
|
|
+ scope._handle.setStyle({ 'z-index': 1 });
|
|
|
|
+ Ext.Viewport.getLayout().setAnimation({ type: 'slide', direction: 'right', duration: 300 });
|
|
|
|
+ Ext.Viewport.setActiveItem(scope._handle);
|
|
|
|
+ scope._lastShowTime = new Date().getTime();
|
|
|
|
+ scope._onGoBack.bind(scope).apply();
|
|
|
|
+ // 关闭
|
|
|
|
+ handle.setStyle({ 'z-index': 0 });
|
|
|
|
+ // Ext.Viewport.getLayout().setAnimation({type: 'slide', direction: 'right', duration: 300})
|
|
|
|
+ Ext.Viewport.remove(handle);
|
|
|
|
+ handle.close();
|
|
|
|
+ };
|
|
|
|
+ Scope.prototype.goBack = function (params, scopeTag) {
|
|
|
|
+ if (params === void 0) { params = null; }
|
|
|
|
+ if (scopeTag === void 0) { scopeTag = undefined; }
|
|
var handle = Ext.Viewport.getActiveItem();
|
|
var handle = Ext.Viewport.getActiveItem();
|
|
- // 显示前一个页面
|
|
|
|
- var index = Scope.SHOW_PAGE_STACK.findIndex(function (scope) { return scope._handle === handle; });
|
|
|
|
|
|
+ var tagIndex = 0;
|
|
|
|
+ var currentIndex = Scope.SHOW_PAGE_STACK.findIndex(function (scope) { return scope._handle === handle; });
|
|
|
|
+ if (scopeTag) {
|
|
|
|
+ tagIndex = Scope.SHOW_PAGE_STACK.findIndex(function (scope) { return scope.scopeTag === scopeTag; });
|
|
|
|
+ if (tagIndex < 0) {
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ else {
|
|
|
|
+ if (currentIndex > 0) {
|
|
|
|
+ tagIndex = currentIndex - 1;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
// console.log("###### remove", index)
|
|
// console.log("###### remove", index)
|
|
- if (index >= 0) {
|
|
|
|
- Scope.SHOW_PAGE_STACK.splice(index, 1);
|
|
|
|
|
|
+ if (tagIndex >= 0) {
|
|
|
|
+ Scope.SHOW_PAGE_STACK.splice(currentIndex, currentIndex - tagIndex);
|
|
}
|
|
}
|
|
- var scopeArr = lodash.sortBy(Scope.SHOW_PAGE_STACK, function (scope) { return scope._lastShowTime; });
|
|
|
|
- if (scopeArr.length > 0) {
|
|
|
|
- var scope = scopeArr[scopeArr.length - 1];
|
|
|
|
|
|
+ if (Scope.SHOW_PAGE_STACK.length > 0) {
|
|
|
|
+ var scope = Scope.SHOW_PAGE_STACK[Scope.SHOW_PAGE_STACK.length - 1];
|
|
scope._handle.setStyle({ 'z-index': 1 });
|
|
scope._handle.setStyle({ 'z-index': 1 });
|
|
Ext.Viewport.getLayout().setAnimation({ type: 'slide', direction: 'right', duration: 300 });
|
|
Ext.Viewport.getLayout().setAnimation({ type: 'slide', direction: 'right', duration: 300 });
|
|
Ext.Viewport.setActiveItem(scope._handle);
|
|
Ext.Viewport.setActiveItem(scope._handle);
|
|
scope._lastShowTime = new Date().getTime();
|
|
scope._lastShowTime = new Date().getTime();
|
|
|
|
+ scope._onGoBack.bind(scope, params).apply();
|
|
// console.log("###### show", (scopeArr.length - 1), Scope.SHOW_PAGE_STACK)
|
|
// console.log("###### show", (scopeArr.length - 1), Scope.SHOW_PAGE_STACK)
|
|
}
|
|
}
|
|
// 关闭
|
|
// 关闭
|
|
@@ -39250,7 +39287,7 @@ define(['exports'], function (exports) { 'use strict';
|
|
return obj;
|
|
return obj;
|
|
}
|
|
}
|
|
function confirm$1(msg, sender) {
|
|
function confirm$1(msg, sender) {
|
|
- return new Promise(function (resolve) {
|
|
|
|
|
|
+ return new Promise(function (resolve, reject) {
|
|
var _a, _b;
|
|
var _a, _b;
|
|
var scope = (_a = lookupScope(sender)) === null || _a === void 0 ? void 0 : _a.topScope;
|
|
var scope = (_a = lookupScope(sender)) === null || _a === void 0 ? void 0 : _a.topScope;
|
|
var config = {
|
|
var config = {
|
|
@@ -39264,23 +39301,29 @@ define(['exports'], function (exports) { 'use strict';
|
|
// constrainTo: scope._handle?.el?.dom || Ext.getBody(),
|
|
// constrainTo: scope._handle?.el?.dom || Ext.getBody(),
|
|
items: [
|
|
items: [
|
|
{
|
|
{
|
|
- html: "<div style=\"min-width: 300px;min-height: 110px\">" + lodash.escape(msg) + "</div>"
|
|
|
|
|
|
+ html: "<div style=\"max-width: 200px; min-width: 100px; min-height: 110px; font-size: 15px\">" + lodash.escape(msg) + "</div>"
|
|
}
|
|
}
|
|
],
|
|
],
|
|
buttons: [
|
|
buttons: [
|
|
|
|
+ '->',
|
|
{
|
|
{
|
|
- xtype: 'button', text: '确定', iconCls: 'x-fa fa-check',
|
|
|
|
|
|
+ xtype: 'button', text: '取消', iconCls: 'x-fa fa-times',
|
|
|
|
+ width: 90,
|
|
handler: function () {
|
|
handler: function () {
|
|
- resolve();
|
|
|
|
|
|
+ reject();
|
|
win.close();
|
|
win.close();
|
|
}
|
|
}
|
|
},
|
|
},
|
|
|
|
+ '->',
|
|
{
|
|
{
|
|
- xtype: 'button', text: '取消', iconCls: 'x-fa fa-times',
|
|
|
|
|
|
+ xtype: 'button', text: '确定', iconCls: 'x-fa fa-check',
|
|
|
|
+ width: 90,
|
|
handler: function () {
|
|
handler: function () {
|
|
|
|
+ resolve();
|
|
win.close();
|
|
win.close();
|
|
}
|
|
}
|
|
- }
|
|
|
|
|
|
+ },
|
|
|
|
+ '->',
|
|
]
|
|
]
|
|
};
|
|
};
|
|
if (scope === null || scope === void 0 ? void 0 : scope._handle) {
|
|
if (scope === null || scope === void 0 ? void 0 : scope._handle) {
|