优化所有弹窗、导出和提交等待的用户体验

修复第二页只有一条数据如果删除页面显示无数据,分页那里显示选中的第一页的bug
修复分页页数成小数的bug
优化所有添加删除dialog点击model不会关闭
pull/82/head
王欣健 4 years ago
parent 1c2134bf27
commit 9005eb74ab

@ -143,7 +143,7 @@
</el-table>
<!-- 添加或修改${functionName}对话框 -->
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
<el-dialog :title="title" :close-on-click-modal="false" :visible.sync="open" width="500px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
#foreach($column in $columns)
#set($field=$column.javaField)

@ -334,8 +334,8 @@ export default {
getList() {
this.loading = true;
listJob(this.queryParams).then(response => {
let currentPageNum = response.total / this.queryParams.pageSize;
if(this.queryParams.pageNum > currentPageNum){
let currentPageNum = response.total % this.queryParams.pageSize > 0 ? parseInt(response.total / this.queryParams.pageSize) + 1 : (response.total / this.queryParams.pageSize);
if(currentPageNum !== 0 && currentPageNum !== 0 && this.queryParams.pageNum > currentPageNum){
this.queryParams.pageNum = currentPageNum;
}
this.jobList = response.rows;

@ -219,8 +219,8 @@ export default {
getList() {
this.loading = true;
listJobLog(this.addDateRange(this.queryParams, this.dateRange)).then(response => {
let currentPageNum = response.total / this.queryParams.pageSize;
if(this.queryParams.pageNum > currentPageNum){
let currentPageNum = response.total % this.queryParams.pageSize > 0 ? parseInt(response.total / this.queryParams.pageSize) + 1 : (response.total / this.queryParams.pageSize);
if(currentPageNum !== 0 && currentPageNum !== 0 && this.queryParams.pageNum > currentPageNum){
this.queryParams.pageNum = currentPageNum;
}
this.jobLogList = response.rows;

@ -90,8 +90,8 @@ export default {
getList() {
this.loading = true;
list(this.queryParams).then(response => {
let currentPageNum = response.total / this.queryParams.pageSize;
if(this.queryParams.pageNum > currentPageNum){
let currentPageNum = response.total % this.queryParams.pageSize > 0 ? parseInt(response.total / this.queryParams.pageSize) + 1 : (response.total / this.queryParams.pageSize);
if(currentPageNum !== 0 && currentPageNum !== 0 && this.queryParams.pageNum > currentPageNum){
this.queryParams.pageNum = currentPageNum;
}
this.list = response.rows;

@ -149,7 +149,7 @@
/>
<!-- 添加或修改参数配置对话框 -->
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
<el-dialog :title="title" :close-on-click-modal="false" :visible.sync="open" width="500px" append-to-body>
<el-form ref="form" v-loading="dialogLoading" :model="form" :rules="rules" label-width="80px">
<el-form-item label="参数名称" prop="configName">
<el-input v-model="form.configName" placeholder="请输入参数名称" />
@ -254,8 +254,8 @@ export default {
getList() {
this.loading = true;
listConfig(this.addDateRange(this.queryParams, this.dateRange)).then(response => {
let currentPageNum = response.total / this.queryParams.pageSize;
if(this.queryParams.pageNum > currentPageNum){
let currentPageNum = response.total % this.queryParams.pageSize > 0 ? parseInt(response.total / this.queryParams.pageSize) + 1 : (response.total / this.queryParams.pageSize);
if(currentPageNum !== 0 && currentPageNum !== 0 && this.queryParams.pageNum > currentPageNum){
this.queryParams.pageNum = currentPageNum;
}
this.configList = response.rows;

@ -84,7 +84,7 @@
</el-table>
<!-- 添加或修改部门对话框 -->
<el-dialog :title="title" :visible.sync="open" width="600px" append-to-body>
<el-dialog :title="title" :close-on-click-modal="false" :visible.sync="open" width="600px" append-to-body>
<el-form ref="form" v-loading="dialogLoading" :model="form" :rules="rules" label-width="80px">
<el-row>
<el-col :span="24" v-if="form.parentId !== 0">

@ -133,7 +133,7 @@
/>
<!-- 添加或修改参数配置对话框 -->
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
<el-dialog :title="title" :close-on-click-modal="false" :visible.sync="open" width="500px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
<el-form-item label="字典类型">
<el-input v-model="form.dictType" :disabled="true" />
@ -291,8 +291,8 @@ export default {
getList() {
this.loading = true;
listData(this.queryParams).then(response => {
let currentPageNum = response.total / this.queryParams.pageSize;
if(this.queryParams.pageNum > currentPageNum){
let currentPageNum = response.total % this.queryParams.pageSize > 0 ? parseInt(response.total / this.queryParams.pageSize) + 1 : (response.total / this.queryParams.pageSize);
if(currentPageNum !== 0 && currentPageNum !== 0 && this.queryParams.pageNum > currentPageNum){
this.queryParams.pageNum = currentPageNum;
}
this.dataList = response.rows;

@ -164,7 +164,7 @@
/>
<!-- 添加或修改参数配置对话框 -->
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
<el-dialog :title="title" :close-on-click-modal="false" :visible.sync="open" width="500px" append-to-body>
<el-form ref="form" v-loading="dialogLoading" :model="form" :rules="rules" label-width="80px">
<el-form-item label="字典名称" prop="dictName">
<el-input v-model="form.dictName" placeholder="请输入字典名称" />
@ -263,8 +263,8 @@ export default {
getList() {
this.loading = true;
listType(this.addDateRange(this.queryParams, this.dateRange)).then(response => {
let currentPageNum = response.total / this.queryParams.pageSize;
if(this.queryParams.pageNum > currentPageNum){
let currentPageNum = response.total % this.queryParams.pageSize > 0 ? parseInt(response.total / this.queryParams.pageSize) + 1 : (response.total / this.queryParams.pageSize);
if(currentPageNum !== 0 && currentPageNum !== 0 && this.queryParams.pageNum > currentPageNum){
this.queryParams.pageNum = currentPageNum;
}
this.typeList = response.rows;

@ -160,8 +160,8 @@ export default {
getList() {
this.loading = true;
list(this.addDateRange(this.queryParams, this.dateRange)).then(response => {
let currentPageNum = response.total / this.queryParams.pageSize;
if(this.queryParams.pageNum > currentPageNum){
let currentPageNum = response.total % this.queryParams.pageSize > 0 ? parseInt(response.total / this.queryParams.pageSize) + 1 : (response.total / this.queryParams.pageSize);
if(currentPageNum !== 0 && currentPageNum !== 0 && this.queryParams.pageNum > currentPageNum){
this.queryParams.pageNum = currentPageNum;
}
this.list = response.rows;

@ -88,7 +88,7 @@
</el-table>
<!-- 添加或修改菜单对话框 -->
<el-dialog :title="title" :visible.sync="open" width="600px" append-to-body>
<el-dialog :title="title" :close-on-click-modal="false" :visible.sync="open" width="600px" append-to-body>
<el-form ref="form" v-loading="dialogLoading" :model="form" :rules="rules" label-width="80px">
<el-row>
<el-col :span="24">

@ -129,7 +129,7 @@
/>
<!-- 添加或修改公告对话框 -->
<el-dialog :title="title" :visible.sync="open" width="780px" append-to-body>
<el-dialog :title="title" :close-on-click-modal="false" :visible.sync="open" width="780px" append-to-body>
<el-form ref="form" v-loading="dialogLoading" :model="form" :rules="rules" label-width="80px">
<el-row>
<el-col :span="12">
@ -248,8 +248,8 @@ export default {
getList() {
this.loading = true;
listNotice(this.queryParams).then(response => {
let currentPageNum = response.total / this.queryParams.pageSize;
if(this.queryParams.pageNum > currentPageNum){
let currentPageNum = response.total % this.queryParams.pageSize > 0 ? parseInt(response.total / this.queryParams.pageSize) + 1 : (response.total / this.queryParams.pageSize);
if(currentPageNum !== 0 && currentPageNum !== 0 && this.queryParams.pageNum > currentPageNum){
this.queryParams.pageNum = currentPageNum;
}
this.noticeList = response.rows;

@ -241,8 +241,8 @@ export default {
getList() {
this.loading = true;
list(this.addDateRange(this.queryParams, this.dateRange)).then( response => {
let currentPageNum = response.total / this.queryParams.pageSize;
if(this.queryParams.pageNum > currentPageNum){
let currentPageNum = response.total % this.queryParams.pageSize > 0 ? parseInt(response.total / this.queryParams.pageSize) + 1 : (response.total / this.queryParams.pageSize);
if(currentPageNum !== 0 && currentPageNum !== 0 && this.queryParams.pageNum > currentPageNum){
this.queryParams.pageNum = currentPageNum;
}
this.list = response.rows;

@ -123,7 +123,7 @@
/>
<!-- 添加或修改岗位对话框 -->
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
<el-dialog :title="title" :close-on-click-modal="false" :visible.sync="open" width="500px" append-to-body>
<el-form ref="form" v-loading="dialogLoading" :model="form" :rules="rules" label-width="80px">
<el-form-item label="岗位名称" prop="postName">
<el-input v-model="form.postName" placeholder="请输入岗位名称" />
@ -224,8 +224,8 @@ export default {
getList() {
this.loading = true;
listPost(this.queryParams).then(response => {
let currentPageNum = response.total / this.queryParams.pageSize;
if(this.queryParams.pageNum > currentPageNum){
let currentPageNum = response.total % this.queryParams.pageSize > 0 ? parseInt(response.total / this.queryParams.pageSize) + 1 : (response.total / this.queryParams.pageSize);
if(currentPageNum !== 0 && currentPageNum !== 0 && this.queryParams.pageNum > currentPageNum){
this.queryParams.pageNum = currentPageNum;
}
this.postList = response.rows;

@ -149,8 +149,8 @@ export default {
getList() {
this.loading = true;
allocatedUserList(this.queryParams).then(response => {
let currentPageNum = response.total / this.queryParams.pageSize;
if(this.queryParams.pageNum > currentPageNum){
let currentPageNum = response.total % this.queryParams.pageSize > 0 ? parseInt(response.total / this.queryParams.pageSize) + 1 : (response.total / this.queryParams.pageSize);
if(currentPageNum !== 0 && currentPageNum !== 0 && this.queryParams.pageNum > currentPageNum){
this.queryParams.pageNum = currentPageNum;
}
this.userList = response.rows;

@ -163,7 +163,7 @@
/>
<!-- 添加或修改角色配置对话框 -->
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
<el-dialog :title="title" :close-on-click-modal="false" :visible.sync="open" width="500px" append-to-body>
<el-form ref="form" v-loading="dialogLoading" :model="form" :rules="rules" label-width="80px">
<el-form-item label="角色名称" prop="roleName">
<el-input v-model="form.roleName" placeholder="请输入角色名称" />
@ -209,7 +209,7 @@
</el-dialog>
<!-- 分配角色数据权限对话框 -->
<el-dialog :title="title" :visible.sync="openDataScope" width="500px" append-to-body>
<el-dialog :title="title" :close-on-click-modal="false" :visible.sync="openDataScope" width="500px" append-to-body>
<el-form v-loading="dialogLoading" :model="form" label-width="80px">
<el-form-item label="角色名称">
<el-input v-model="form.roleName" :disabled="true" />

@ -1,6 +1,6 @@
<template>
<!-- 授权用户 -->
<el-dialog title="选择用户" :visible.sync="visible" width="800px" top="5vh" append-to-body>
<el-dialog title="选择用户" :close-on-click-modal="false" :close-on-click-modal="false" :visible.sync="visible" width="800px" top="5vh" append-to-body>
<el-form :model="queryParams" v-loading="dialogLoading" ref="queryForm" :inline="true">
<el-form-item label="用户名称" prop="userName">
<el-input
@ -115,8 +115,8 @@ export default {
//
getList() {
unallocatedUserList(this.queryParams).then(res => {
let currentPageNum = response.total / this.queryParams.pageSize;
if(this.queryParams.pageNum > currentPageNum){
let currentPageNum = response.total % this.queryParams.pageSize > 0 ? parseInt(response.total / this.queryParams.pageSize) + 1 : (response.total / this.queryParams.pageSize);
if(currentPageNum !== 0 && currentPageNum !== 0 && this.queryParams.pageNum > currentPageNum){
this.queryParams.pageNum = currentPageNum;
}
this.userList = res.rows;

@ -208,7 +208,7 @@
</el-row>
<!-- 添加或修改参数配置对话框 -->
<el-dialog :title="title" :visible.sync="open" width="600px" append-to-body>
<el-dialog :title="title" :close-on-click-modal="false" :visible.sync="open" width="600px" append-to-body>
<el-form ref="form" v-loading="dialogLoading" :model="form" :rules="rules" label-width="80px">
<el-row>
<el-col :span="12">
@ -495,8 +495,8 @@ export default {
getList() {
this.loading = true;
listUser(this.addDateRange(this.queryParams, this.dateRange)).then(response => {
let currentPageNum = response.total / this.queryParams.pageSize;
if(this.queryParams.pageNum > currentPageNum){
let currentPageNum = response.total % this.queryParams.pageSize > 0 ? parseInt(response.total / this.queryParams.pageSize) + 1 : (response.total / this.queryParams.pageSize);
if(currentPageNum !== 0 && currentPageNum !== 0 && this.queryParams.pageNum > currentPageNum){
this.queryParams.pageNum = currentPageNum;
}
this.userList = response.rows;

@ -1,7 +1,7 @@
<template>
<div>
<div class="user-info-head" @click="editCropper()"><img v-bind:src="options.img" title="点击上传头像" class="img-circle img-lg" /></div>
<el-dialog :title="title" :visible.sync="open" width="800px" append-to-body @opened="modalOpened" @close="closeDialog()">
<el-dialog :title="title" :close-on-click-modal="false" :visible.sync="open" width="800px" append-to-body @opened="modalOpened" @close="closeDialog()">
<el-row>
<el-col :xs="24" :md="12" :style="{height: '350px'}">
<vue-cropper

@ -246,8 +246,8 @@ export default {
getList() {
this.loading = true;
listTable(this.addDateRange(this.queryParams, this.dateRange)).then(response => {
let currentPageNum = response.total / this.queryParams.pageSize;
if(this.queryParams.pageNum > currentPageNum){
let currentPageNum = response.total % this.queryParams.pageSize > 0 ? parseInt(response.total / this.queryParams.pageSize) + 1 : (response.total / this.queryParams.pageSize);
if(currentPageNum !== 0 && currentPageNum !== 0 && this.queryParams.pageNum > currentPageNum){
this.queryParams.pageNum = currentPageNum;
}
this.tableList = response.rows;

Loading…
Cancel
Save