mirror of
https://gitee.com/zoujingli/ThinkAdmin.git
synced 2025-04-06 03:58:04 +08:00
Update admin.js
This commit is contained in:
parent
0e8770f902
commit
56c3bd4f93
@ -783,19 +783,16 @@ $(function () {
|
|||||||
};
|
};
|
||||||
$.form.load(window.ROOT_URL + '?s=admin/api.queue/progress', {code: code}, 'post', function (ret) {
|
$.form.load(window.ROOT_URL + '?s=admin/api.queue/progress', {code: code}, 'post', function (ret) {
|
||||||
if (ret.code) {
|
if (ret.code) {
|
||||||
(function (lines) {
|
that.lines = [];
|
||||||
this.lines = [];
|
for (this.i in ret.data.history) {
|
||||||
for (this.i in lines) {
|
this.line = ret.data.history[this.i], this.percent = '[ ' + this.line.progress + '% ] ';
|
||||||
this.line = lines[this.i], this.percent = '[ ' + this.line.progress + '% ] ';
|
|
||||||
if (this.line.message.indexOf('javascript:') === -1) {
|
if (this.line.message.indexOf('javascript:') === -1) {
|
||||||
this.lines.push(this.line.message.indexOf('>>>') > -1 ? this.line.message : this.percent + this.line.message);
|
that.lines.push(this.line.message.indexOf('>>>') > -1 ? this.line.message : this.percent + this.line.message);
|
||||||
} else if (!scripts['_' + code + '_' + this.i]) {
|
} else if (!scripts['_' + code + '_' + this.i]) {
|
||||||
location.href = this.line.message;
|
location.href = this.line.message, scripts['_' + code + '_' + this.i] = true;
|
||||||
scripts['_' + code + '_' + this.i] = true;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
that.$area.val(this.lines.join("\n")), that.$area.animate({scrollTop: that.$area[0].scrollHeight + 'px'}, 200);
|
that.$area.val(that.lines.join("\n")), that.$area.animate({scrollTop: that.$area[0].scrollHeight + 'px'}, 200);
|
||||||
})(ret.data.history);
|
|
||||||
that.$percent.attr('lay-percent', (ret.data.progress || '0.00') + '%'), layui.element.render();
|
that.$percent.attr('lay-percent', (ret.data.progress || '0.00') + '%'), layui.element.render();
|
||||||
if (ret.data.status > 0) {
|
if (ret.data.status > 0) {
|
||||||
that.setState(parseInt(ret.data.status), ret.data.message);
|
that.setState(parseInt(ret.data.status), ret.data.message);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user