RuoYi
2020-12-10 b368ad764f123ced6b48052c490decafe93e5402
ruoyi-ui/src/views/system/user/index.vue
@@ -130,14 +130,7 @@
              v-hasPermi="['system:user:export']"
            >导出</el-button>
          </el-col>
          <div class="top-right-btn">
            <el-tooltip class="item" effect="dark" content="刷新" placement="top">
              <el-button size="mini" circle icon="el-icon-refresh" @click="handleQuery" />
            </el-tooltip>
            <el-tooltip class="item" effect="dark" :content="showSearch ? '隐藏搜索' : '显示搜索'" placement="top">
              <el-button size="mini" circle icon="el-icon-search" @click="showSearch=!showSearch" />
            </el-tooltip>
          </div>
          <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
        </el-row>
        <el-table v-loading="loading" :data="userList" @selection-change="handleSelectionChange">
@@ -165,7 +158,7 @@
          <el-table-column
            label="操作"
            align="center"
            width="180"
            width="160"
            class-name="small-padding fixed-width"
          >
            <template slot-scope="scope">
@@ -216,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>
@@ -429,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" }
@@ -589,9 +582,7 @@
        cancelButtonText: "取消"
      }).then(({ value }) => {
          resetUserPwd(row.userId, value).then(response => {
            if (response.code === 200) {
              this.msgSuccess("修改成功,新密码是:" + value);
            }
            this.msgSuccess("修改成功,新密码是:" + value);
          });
        }).catch(() => {});
    },
@@ -601,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();
            });
          }
        }
@@ -631,7 +618,7 @@
        }).then(() => {
          this.getList();
          this.msgSuccess("删除成功");
        }).catch(function() {});
        })
    },
    /** 导出按钮操作 */
    handleExport() {
@@ -644,7 +631,7 @@
          return exportUser(queryParams);
        }).then(response => {
          this.download(response.msg);
        }).catch(function() {});
        })
    },
    /** 导入按钮操作 */
    handleImport() {