This commit is contained in:
Tsanie Lily 2023-04-28 14:30:46 +08:00
parent c9723008af
commit d831a707ae
4 changed files with 26 additions and 11 deletions

View File

@ -50,8 +50,23 @@ if (typeof ($assetsummary) != "function") {
p.append(this.basectrl);
this.maskbgctrl = $('<div class="maskbg"><div class="loading_icon icon c-spin"></div></div>');
p.append(this.maskbgctrl);
//this.maskbgctrl = $('<div class="maskbg"><div class="loading_icon icon c-spin"></div></div>');
//p.append(this.maskbgctrl);
this.loadingicon = $('<span class="loading c-spin" style="top: 60px;right: 13px;font-size: 20px;color: black;position: absolute;left:unset;width:unset;height:unset;line-height:unset;"></span>');
p.append(this.loadingicon);
this.loadingCount = 0;
this.showLoading = function () {
this.loadingCount++;
this.loadingicon.show();
}
this.hideLoading = function () {
this.loadingCount--;
if (this.loadingCount === 0)
this.loadingicon.hide();
}
this.refresh = function () {
p.parent(".contentPane").unbind();
@ -530,8 +545,9 @@ if (typeof ($assetsummary) != "function") {
}
function loadAssetInfo() {
_this.maskbgctrl.show();
_this.showLoading();
devicerequest('GetAssetSummaryInfo', _this.companyid + String.fromCharCode(170) + _this.assetid, function (data) {
_this.hideLoading();
if (typeof data === 'string') {
_dialog.showAlert(GetTextByKey("P_SELECTASSETS_FAILEDGETLIST", 'Failed to get the machine list: ') + data, "Asset Summary");
return;
@ -539,24 +555,23 @@ if (typeof ($assetsummary) != "function") {
_this.asset = data;
if (_this.status == 0)
showAssetInfo();
_this.maskbgctrl.hide();
}, function () {
_this.maskbgctrl.hide();
_this.hideLoading();
});
}
function loadAssetExtInfo() {
//_this.maskbgctrl.show();
_this.showLoading();
devicerequest('GetAssetExtInfo', _this.companyid + String.fromCharCode(170) + _this.assetid, function (data) {
_this.hideLoading();
if (typeof data === 'string') {
return;
}
_this.assetext = data;
if (_this.status == 0 && _this.asset)
showAssetExtInfo(_this.assetext);
//_this.maskbgctrl.hide();
}, function () {
//_this.maskbgctrl.hide();
_this.hideLoading();
});
}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long