1、分页优化

Former-commit-id: 74f5cf9eeb24fa03de87c717b635ca27c72f8ab2
master
王兵 5 years ago
parent 57a2eaa195
commit f57760213a

@ -396,6 +396,7 @@
cancelButtonText: '取消', cancelButtonText: '取消',
type: 'warning' type: 'warning'
}).then(function () { }).then(function () {
nav.tipShow("删除中...");
this.select.forAsync(function (item, next) { this.select.forAsync(function (item, next) {
new Ajax(this.module, this.target).delete({id: item.id}, function (response) { new Ajax(this.module, this.target).delete({id: item.id}, function (response) {
if (response.errors.length > 0) { if (response.errors.length > 0) {
@ -404,6 +405,7 @@
next(); next();
}.bind(this)) }.bind(this))
}.bind(this), function () { }.bind(this), function () {
nav.tipClose();
nav.s("批量删除成功.") nav.s("批量删除成功.")
this.onFind(); this.onFind();
}.bind(this)) }.bind(this))

@ -211,6 +211,7 @@
v-if="vm.totalCount > vm.pageSize" v-if="vm.totalCount > vm.pageSize"
style="margin-top: 10px" style="margin-top: 10px"
@current-change="onPageChange" @current-change="onPageChange"
@size-change="onPageSizeChange"
:current-page="vm.pageNumber" :current-page="vm.pageNumber"
:page-size="vm.pageSize" :page-size="vm.pageSize"
layout="total, sizes, prev, pager, next, jumper" layout="total, sizes, prev, pager, next, jumper"

@ -117,6 +117,7 @@
v-if="vm.totalCount > vm.pageSize" v-if="vm.totalCount > vm.pageSize"
style="margin-top: 10px" style="margin-top: 10px"
@current-change="onPageChange" @current-change="onPageChange"
@size-change="onPageSizeChange"
:current-page="vm.pageNumber" :current-page="vm.pageNumber"
:page-size="vm.pageSize" :page-size="vm.pageSize"
layout="total, sizes, prev, pager, next, jumper" layout="total, sizes, prev, pager, next, jumper"
@ -178,6 +179,7 @@
if (this.select.length == 0) { if (this.select.length == 0) {
nav.w("至少选中一项!"); nav.w("至少选中一项!");
} else { } else {
nav.tipShow("批量处理中...");
this.select.forAsync(function (item, next) { this.select.forAsync(function (item, next) {
new Ajax("system", "logErr").update({ new Ajax("system", "logErr").update({
id: item.id, id: item.id,
@ -190,6 +192,8 @@
next(); next();
}.bind(this)) }.bind(this))
}, function () { }, function () {
nav.tipClose();
nav.s("批量处理完成.")
this.onFind(); this.onFind();
}.bind(this)) }.bind(this))
} }
@ -198,6 +202,7 @@
if (this.select.length == 0) { if (this.select.length == 0) {
nav.w("至少选中一项!"); nav.w("至少选中一项!");
} else { } else {
nav.tipShow("批量处理中...");
this.select.forAsync(function (item, next) { this.select.forAsync(function (item, next) {
new Ajax("system", "logErr").update({ new Ajax("system", "logErr").update({
id: item.id, id: item.id,
@ -211,6 +216,8 @@
} }
}.bind(this)) }.bind(this))
}, function () { }, function () {
nav.tipClose();
nav.s("批量处理完成.")
this.onFind(); this.onFind();
}.bind(this)) }.bind(this))
} }

@ -107,6 +107,7 @@
v-if="vm.totalCount > vm.pageSize" v-if="vm.totalCount > vm.pageSize"
style="margin-top: 10px" style="margin-top: 10px"
@current-change="onPageChange" @current-change="onPageChange"
@size-change="onPageSizeChange"
:current-page="vm.pageNumber" :current-page="vm.pageNumber"
:page-size="vm.pageSize" :page-size="vm.pageSize"
layout="total, sizes, prev, pager, next, jumper" layout="total, sizes, prev, pager, next, jumper"

@ -137,6 +137,7 @@
v-if="vm.totalCount > vm.pageSize" v-if="vm.totalCount > vm.pageSize"
style="margin-top: 10px" style="margin-top: 10px"
@current-change="onPageChange" @current-change="onPageChange"
@size-change="onPageSizeChange"
:current-page="vm.pageNumber" :current-page="vm.pageNumber"
:page-size="vm.pageSize" :page-size="vm.pageSize"
layout="total, sizes, prev, pager, next, jumper" layout="total, sizes, prev, pager, next, jumper"

Loading…
Cancel
Save

Powered by TurnKey Linux.