+
-
+
-
-
-
-
-
+
-
-
-
-
-
-
-
-
+
+
+
+
-
+
+
-
+
@@ -412,8 +416,8 @@
@@ -448,7 +452,7 @@
:underline="false"
style="font-size: 12px; vertical-align: baseline"
@click="importTemplate"
- >下载模板导出模板
@@ -606,6 +610,11 @@ export default {
name: "search",
color: "primary",
},
+ {
+ type: "button",
+ btnName: "重置",
+ name: "cancel",
+ },
{
type: this.$auth.hasPermiOr([
"system:user:create",
@@ -615,18 +624,11 @@ export default {
? "separate"
: "",
},
- {
- type: this.$auth.hasPermi("system:user:create") ? "button" : "",
- btnName: "新增",
- name: "addNew",
- color: "success",
- plain: true,
- },
{
type: this.$auth.hasPermi("system:user:import") ? "button" : "",
btnName: "导入",
name: "import",
- color: "warning",
+ color: "primary",
plain: true,
},
{
@@ -636,20 +638,15 @@ export default {
color: "primary",
plain: true,
},
+ {
+ type: this.$auth.hasPermi("system:user:create") ? "button" : "",
+ btnName: "新增",
+ name: "addNew",
+ color: "success",
+ plain: true,
+ },
],
tableBtn: [
- this.$auth.hasPermi("system:user:update")
- ? {
- type: "edit",
- btnName: "修改",
- }
- : undefined,
- this.$auth.hasPermi("system:user:delete")
- ? {
- type: "delete",
- btnName: "删除",
- }
- : undefined,
this.$auth.hasPermi("system:user:update-password")
? {
type: "reset",
@@ -662,6 +659,18 @@ export default {
btnName: "分配角色",
}
: undefined,
+ this.$auth.hasPermi("system:user:update")
+ ? {
+ type: "edit",
+ btnName: "修改",
+ }
+ : undefined,
+ this.$auth.hasPermi("system:user:delete")
+ ? {
+ type: "delete",
+ btnName: "删除",
+ }
+ : undefined,
].filter((v) => v),
tableProps,
// 遮罩层
@@ -803,6 +812,15 @@ export default {
case "search":
this.handleQuery(val);
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":
this.handleAdd();
break;
@@ -1033,7 +1051,7 @@ export default {
this.upload.title = "用户导入";
this.upload.open = true;
},
- /** 下载模板操作 */
+ /** 导出模板操作 */
importTemplate() {
importTemplate().then((response) => {
this.$download.excel(response, "用户导入模板.xls");
@@ -1090,11 +1108,19 @@ export default {
};