From a50beae5991ec58cf2aaf684d897b80ba958e93d Mon Sep 17 00:00:00 2001
From: RuoYi <yzz_ivy@163.com>
Date: 星期四, 10 十二月 2020 11:13:39 +0800
Subject: [PATCH] 代码生成预览提供滚动机制
---
ruoyi-ui/src/views/system/user/index.vue | 37 +++++++++++++++++--------------------
1 files changed, 17 insertions(+), 20 deletions(-)
diff --git a/ruoyi-ui/src/views/system/user/index.vue b/ruoyi-ui/src/views/system/user/index.vue
index 51c2627..78bef4b 100644
--- a/ruoyi-ui/src/views/system/user/index.vue
+++ b/ruoyi-ui/src/views/system/user/index.vue
@@ -27,7 +27,7 @@
</el-col>
<!--鐢ㄦ埛鏁版嵁-->
<el-col :span="20" :xs="24">
- <el-form :model="queryParams" ref="queryForm" :inline="true" label-width="68px">
+ <el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="68px">
<el-form-item label="鐢ㄦ埛鍚嶇О" prop="userName">
<el-input
v-model="queryParams.userName"
@@ -77,7 +77,7 @@
></el-date-picker>
</el-form-item>
<el-form-item>
- <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">鎼滅储</el-button>
+ <el-button type="cyan" icon="el-icon-search" size="mini" @click="handleQuery">鎼滅储</el-button>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">閲嶇疆</el-button>
</el-form-item>
</el-form>
@@ -130,6 +130,7 @@
v-hasPermi="['system:user:export']"
>瀵煎嚭</el-button>
</el-col>
+ <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="userList" @selection-change="handleSelectionChange">
@@ -157,7 +158,7 @@
<el-table-column
label="鎿嶄綔"
align="center"
- width="180"
+ width="160"
class-name="small-padding fixed-width"
>
<template slot-scope="scope">
@@ -208,7 +209,7 @@
</el-col>
<el-col :span="12">
<el-form-item label="褰掑睘閮ㄩ棬" prop="deptId">
- <treeselect v-model="form.deptId" :options="deptOptions" :disable-branch-nodes="true" :show-count="true" placeholder="璇烽�夋嫨褰掑睘閮ㄩ棬" />
+ <treeselect v-model="form.deptId" :options="deptOptions" :show-count="true" placeholder="璇烽�夋嫨褰掑睘閮ㄩ棬" />
</el-form-item>
</el-col>
</el-row>
@@ -356,6 +357,8 @@
single: true,
// 闈炲涓鐢�
multiple: true,
+ // 鏄剧ず鎼滅储鏉′欢
+ showSearch: true,
// 鎬绘潯鏁�
total: 0,
// 鐢ㄦ埛琛ㄦ牸鏁版嵁
@@ -419,7 +422,7 @@
{ required: true, message: "鐢ㄦ埛鏄电О涓嶈兘涓虹┖", trigger: "blur" }
],
deptId: [
- { required: true, message: "褰掑睘閮ㄩ棬涓嶈兘涓虹┖", trigger: "blur" }
+ { required: true, message: "褰掑睘閮ㄩ棬涓嶈兘涓虹┖", trigger: "change" }
],
password: [
{ required: true, message: "鐢ㄦ埛瀵嗙爜涓嶈兘涓虹┖", trigger: "blur" }
@@ -579,9 +582,7 @@
cancelButtonText: "鍙栨秷"
}).then(({ value }) => {
resetUserPwd(row.userId, value).then(response => {
- if (response.code === 200) {
- this.msgSuccess("淇敼鎴愬姛锛屾柊瀵嗙爜鏄細" + value);
- }
+ this.msgSuccess("淇敼鎴愬姛锛屾柊瀵嗙爜鏄細" + value);
});
}).catch(() => {});
},
@@ -591,19 +592,15 @@
if (valid) {
if (this.form.userId != undefined) {
updateUser(this.form).then(response => {
- if (response.code === 200) {
- this.msgSuccess("淇敼鎴愬姛");
- this.open = false;
- this.getList();
- }
+ this.msgSuccess("淇敼鎴愬姛");
+ this.open = false;
+ this.getList();
});
} else {
addUser(this.form).then(response => {
- if (response.code === 200) {
- this.msgSuccess("鏂板鎴愬姛");
- this.open = false;
- this.getList();
- }
+ this.msgSuccess("鏂板鎴愬姛");
+ this.open = false;
+ this.getList();
});
}
}
@@ -621,7 +618,7 @@
}).then(() => {
this.getList();
this.msgSuccess("鍒犻櫎鎴愬姛");
- }).catch(function() {});
+ })
},
/** 瀵煎嚭鎸夐挳鎿嶄綔 */
handleExport() {
@@ -634,7 +631,7 @@
return exportUser(queryParams);
}).then(response => {
this.download(response.msg);
- }).catch(function() {});
+ })
},
/** 瀵煎叆鎸夐挳鎿嶄綔 */
handleImport() {
--
Gitblit v1.9.3