|
|
@@ -1,7 +1,7 @@
|
|
|
<template>
|
|
|
<div>
|
|
|
<div class="head-container">
|
|
|
- <el-button size="mini" type="primary" @click="handleAdd">新增</el-button>
|
|
|
+ <el-button size="mini" type="primary" plain icon="el-icon-plus" @click="handleAdd">新增部门</el-button>
|
|
|
|
|
|
<el-input
|
|
|
v-model="deptName"
|
|
|
@@ -38,7 +38,7 @@
|
|
|
|
|
|
<!-- 添加或修改部门对话框 -->
|
|
|
<el-dialog :title="title" :visible.sync="open" width="600px" append-to-body :close-on-click-modal="false">
|
|
|
- <el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
|
|
+ <el-form ref="form" :model="form" :rules="rules" size="mini" label-width="80px">
|
|
|
<el-row>
|
|
|
<el-col :span="24" v-if="form.parentId !== 0">
|
|
|
<el-form-item label="上级部门" prop="parentId">
|
|
|
@@ -87,8 +87,8 @@
|
|
|
</el-row>
|
|
|
</el-form>
|
|
|
<div slot="footer" class="dialog-footer">
|
|
|
- <el-button type="primary" @click="submitForm">确 定</el-button>
|
|
|
- <el-button @click="cancel">取 消</el-button>
|
|
|
+ <el-button type="primary" size="mini" @click="submitForm">确 定</el-button>
|
|
|
+ <el-button size="mini" @click="cancel">取 消</el-button>
|
|
|
</div>
|
|
|
</el-dialog>
|
|
|
</div>
|
|
|
@@ -107,7 +107,7 @@ export default {
|
|
|
data() {
|
|
|
return {
|
|
|
deptName: '',
|
|
|
- deptData:[],
|
|
|
+ deptData: [],
|
|
|
// 部门树选项
|
|
|
deptOptions: [],
|
|
|
// 弹出层标题
|
|
|
@@ -192,15 +192,7 @@ export default {
|
|
|
};
|
|
|
this.resetForm("form");
|
|
|
},
|
|
|
- /** 搜索按钮操作 */
|
|
|
- handleQuery() {
|
|
|
- this.getList();
|
|
|
- },
|
|
|
- /** 重置按钮操作 */
|
|
|
- resetQuery() {
|
|
|
- this.resetForm("queryForm");
|
|
|
- this.handleQuery();
|
|
|
- },
|
|
|
+
|
|
|
/** 转换部门数据结构 */
|
|
|
normalizer(node) {
|
|
|
if (node.children && !node.children.length) {
|