Compare commits

..

No commits in common. "7886d5ad5a806c0a136eb51708257f0b91b1b78b" and "be6d84daf508f1bd138f01dacaace4a5be0f0188" have entirely different histories.

3 changed files with 92 additions and 119 deletions

View File

@ -137,7 +137,7 @@
<!-- 添加或修改菜单对话框 --> <!-- 添加或修改菜单对话框 -->
<base-dialog :dialogTitle="title" :dialogVisible="open" width="50%"> <base-dialog :dialogTitle="title" :dialogVisible="open" width="50%">
<el-form ref="form" :model="form" :rules="rules" label-width="120px"> <el-form ref="form" :model="form" :rules="rules" label-width="100px">
<el-row> <el-row>
<el-col :span="24"> <el-col :span="24">
<el-form-item label="上级菜单"> <el-form-item label="上级菜单">
@ -205,7 +205,6 @@
v-model="form.sort" v-model="form.sort"
controls-position="right" controls-position="right"
:min="0" :min="0"
style="width: 100%"
/> />
</el-form-item> </el-form-item>
</el-col> </el-col>
@ -332,8 +331,8 @@
</el-row> </el-row>
</el-form> </el-form>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
<el-button @click="cancel"> </el-button>
<el-button type="primary" @click="submitForm"> </el-button> <el-button type="primary" @click="submitForm"> </el-button>
<el-button @click="cancel"> </el-button>
</div> </div>
</base-dialog> </base-dialog>
</div> </div>
@ -438,12 +437,6 @@ export default {
}, },
], ],
tableBtn: [ tableBtn: [
this.$auth.hasPermi("system:menu:create")
? {
type: "add",
btnName: "新增",
}
: undefined,
this.$auth.hasPermi("system:menu:update") this.$auth.hasPermi("system:menu:update")
? { ? {
type: "edit", type: "edit",
@ -456,6 +449,12 @@ export default {
btnName: "删除", btnName: "删除",
} }
: undefined, : undefined,
this.$auth.hasPermi("system:menu:create")
? {
type: "add",
btnName: "新增",
}
: undefined,
].filter((v) => v), ].filter((v) => v),
tableProps, tableProps,
heightNum: 210, heightNum: 210,

View File

@ -83,7 +83,7 @@
{{ parseTime(form.startTime) }} | {{ form.duration }} ms {{ parseTime(form.startTime) }} | {{ form.duration }} ms
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="24"> <el-col :span="12">
<el-form-item label="操作结果:"> <el-form-item label="操作结果:">
<div v-if="form.resultCode === 0"> <div v-if="form.resultCode === 0">
正常 | {{ form.resultData }} 正常 | {{ form.resultData }}

View File

@ -1,5 +1,5 @@
<template> <template>
<div class="user-container"> <div class="app-container">
<!-- <doc-alert title="用户体系" url="https://doc.iocoder.cn/user-center/" /> <!-- <doc-alert title="用户体系" url="https://doc.iocoder.cn/user-center/" />
<doc-alert title="三方登陆" url="https://doc.iocoder.cn/social-user/" /> <doc-alert title="三方登陆" url="https://doc.iocoder.cn/social-user/" />
<doc-alert <doc-alert
@ -8,43 +8,40 @@
/> --> /> -->
<!-- 搜索工作栏 --> <!-- 搜索工作栏 -->
<el-row :gutter="8" class="user-box"> <el-row :gutter="20">
<!--部门数据--> <!--部门数据-->
<el-col :span="4" :xs="24"> <el-col :span="4" :xs="24">
<div class="user-box-left"> <div class="head-container">
<div class="head-container"> <el-input
<el-input v-model="deptName"
v-model="deptName" placeholder="请输入部门名称"
placeholder="请输入部门名称" clearable
clearable size="small"
size="small" prefix-icon="el-icon-search"
prefix-icon="el-icon-search" style="margin-bottom: 20px"
style="margin-bottom: 20px" />
/> </div>
</div> <div class="head-container">
<div class="head-container"> <el-tree
<el-tree :data="deptOptions"
:data="deptOptions" :props="defaultProps"
:props="defaultProps" :expand-on-click-node="false"
:expand-on-click-node="false" :filter-node-method="filterNode"
:filter-node-method="filterNode" ref="tree"
ref="tree" default-expand-all
default-expand-all highlight-current
highlight-current @node-click="handleNodeClick"
@node-click="handleNodeClick" />
/>
</div>
</div> </div>
</el-col> </el-col>
<!--用户数据--> <!--用户数据-->
<el-col :span="20" :xs="24"> <el-col :span="20" :xs="24">
<div class="user-box-right"> <search-bar
<search-bar :formConfigs="formConfig"
:formConfigs="formConfig" ref="searchBarForm"
ref="userSearchBarForm" @headBtnClick="buttonClick"
@headBtnClick="buttonClick" />
/> <!-- <el-form
<!-- <el-form
:model="queryParams" :model="queryParams"
ref="queryForm" ref="queryForm"
size="small" size="small"
@ -107,7 +104,7 @@
</el-form-item> </el-form-item>
</el-form> --> </el-form> -->
<!-- <el-row :gutter="10" class="mb8"> <!-- <el-row :gutter="10" class="mb8">
<el-col :span="1.5"> <el-col :span="1.5">
<el-button <el-button
type="primary" type="primary"
@ -147,25 +144,25 @@
></right-toolbar> ></right-toolbar>
</el-row> --> </el-row> -->
<!-- 列表 --> <!-- 列表 -->
<base-table <base-table
:page="queryParams.pageNo" :page="queryParams.pageNo"
:limit="queryParams.pageSize" :limit="queryParams.pageSize"
:table-props="tableProps" :table-props="tableProps"
:table-data="userList" :table-data="userList"
:max-height="tableH" :max-height="tableH"
@emitFun="handleStatusChange" @emitFun="handleStatusChange"
> >
<method-btn <method-btn
v-if="tableBtn.length" v-if="tableBtn.length"
slot="handleBtn" slot="handleBtn"
:width="220" :width="220"
label="操作" label="操作"
:method-list="tableBtn" :method-list="tableBtn"
@clickBtn="handleClick" @clickBtn="handleClick"
/> />
</base-table> </base-table>
<!-- <el-table v-loading="loading" :data="userList"> <!-- <el-table v-loading="loading" :data="userList">
<el-table-column <el-table-column
label="用户编号" label="用户编号"
align="center" align="center"
@ -291,19 +288,18 @@
</el-table-column> </el-table-column>
</el-table> --> </el-table> -->
<pagination <pagination
:page.sync="queryParams.pageNo" :page.sync="queryParams.pageNo"
:limit.sync="queryParams.pageSize" :limit.sync="queryParams.pageSize"
:total="total" :total="total"
@pagination="getList" @pagination="getList"
/> />
</div>
</el-col> </el-col>
</el-row> </el-row>
<!-- 添加或修改参数配置对话框 --> <!-- 添加或修改参数配置对话框 -->
<base-dialog :dialogTitle="title" :dialogVisible="open" width="50%"> <base-dialog :dialogTitle="title" :dialogVisible="open" width="50%">
<el-form ref="form" :model="form" :rules="rules" label-width="100px"> <el-form ref="form" :model="form" :rules="rules" label-width="80px">
<el-row> <el-row>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="用户昵称" prop="nickname"> <el-form-item label="用户昵称" prop="nickname">
@ -416,8 +412,8 @@
</el-row> </el-row>
</el-form> </el-form>
<div slot="footer" class="dialog-footer"> <div slot="footer" class="dialog-footer">
<el-button @click="cancel"> </el-button>
<el-button type="primary" @click="submitForm"> </el-button> <el-button type="primary" @click="submitForm"> </el-button>
<el-button @click="cancel"> </el-button>
</div> </div>
</base-dialog> </base-dialog>
@ -452,7 +448,7 @@
:underline="false" :underline="false"
style="font-size: 12px; vertical-align: baseline" style="font-size: 12px; vertical-align: baseline"
@click="importTemplate" @click="importTemplate"
>导出模板</el-link >下载模板</el-link
> >
</div> </div>
</el-upload> </el-upload>
@ -610,11 +606,6 @@ export default {
name: "search", name: "search",
color: "primary", color: "primary",
}, },
{
type: "button",
btnName: "重置",
name: "cancel",
},
{ {
type: this.$auth.hasPermiOr([ type: this.$auth.hasPermiOr([
"system:user:create", "system:user:create",
@ -624,11 +615,18 @@ export default {
? "separate" ? "separate"
: "", : "",
}, },
{
type: this.$auth.hasPermi("system:user:create") ? "button" : "",
btnName: "新增",
name: "addNew",
color: "success",
plain: true,
},
{ {
type: this.$auth.hasPermi("system:user:import") ? "button" : "", type: this.$auth.hasPermi("system:user:import") ? "button" : "",
btnName: "导入", btnName: "导入",
name: "import", name: "import",
color: "primary", color: "warning",
plain: true, plain: true,
}, },
{ {
@ -638,27 +636,8 @@ export default {
color: "primary", color: "primary",
plain: true, plain: true,
}, },
{
type: this.$auth.hasPermi("system:user:create") ? "button" : "",
btnName: "新增",
name: "addNew",
color: "success",
plain: true,
},
], ],
tableBtn: [ tableBtn: [
this.$auth.hasPermi("system:user:update-password")
? {
type: "reset",
btnName: "重置密码",
}
: undefined,
this.$auth.hasPermi("system:permission:assign-user-role")
? {
type: "role",
btnName: "分配角色",
}
: undefined,
this.$auth.hasPermi("system:user:update") this.$auth.hasPermi("system:user:update")
? { ? {
type: "edit", type: "edit",
@ -671,6 +650,18 @@ export default {
btnName: "删除", btnName: "删除",
} }
: undefined, : undefined,
this.$auth.hasPermi("system:user:update-password")
? {
type: "reset",
btnName: "重置密码",
}
: undefined,
this.$auth.hasPermi("system:permission:assign-user-role")
? {
type: "role",
btnName: "分配角色",
}
: undefined,
].filter((v) => v), ].filter((v) => v),
tableProps, tableProps,
// //
@ -812,15 +803,6 @@ export default {
case "search": case "search":
this.handleQuery(val); this.handleQuery(val);
break; break;
case "cancel":
this.$refs["userSearchBarForm"].resetForm();
this.queryParams.pageNo = 1;
this.queryParams.username = "";
this.queryParams.mobile = "";
this.queryParams.status = "";
this.queryParams.createTime = [];
this.getList();
break;
case "addNew": case "addNew":
this.handleAdd(); this.handleAdd();
break; break;
@ -1051,7 +1033,7 @@ export default {
this.upload.title = "用户导入"; this.upload.title = "用户导入";
this.upload.open = true; this.upload.open = true;
}, },
/** 导出模板操作 */ /** 下载模板操作 */
importTemplate() { importTemplate() {
importTemplate().then((response) => { importTemplate().then((response) => {
this.$download.excel(response, "用户导入模板.xls"); this.$download.excel(response, "用户导入模板.xls");
@ -1108,19 +1090,11 @@ export default {
}; };
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.user-container { .app-container {
width: 100%; width: 100%;
height: calc(100vh - 120px - 8px); height: calc(100vh - 120px - 8px);
background-color: #f2f4f9; background-color: #fff;
border-radius: 8px;
.user-box { padding: 8px;
.user-box-left,
.user-box-right {
background-color: #fff;
padding: 8px;
border-radius: 8px;
height: calc(100vh - 128px);
}
}
} }
</style> </style>