| | |
| | | v-hasPermi="['system:dept:add']"
|
| | | >新增</el-button>
|
| | | </el-col>
|
| | | <table-tools-ext :showSearch.sync="showSearch" @queryTable="getList"></table-tools-ext>
|
| | | <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
| | | </el-row>
|
| | |
|
| | | <el-table
|
| | |
| | | { required: true, message: "部门名称不能为空", trigger: "blur" }
|
| | | ],
|
| | | orderNum: [
|
| | | { required: true, message: "菜单顺序不能为空", trigger: "blur" }
|
| | | { required: true, message: "显示排序不能为空", trigger: "blur" }
|
| | | ],
|
| | | email: [
|
| | | {
|
| | |
| | | if (valid) {
|
| | | if (this.form.deptId != undefined) {
|
| | | updateDept(this.form).then(response => {
|
| | | if (response.code === 200) {
|
| | | this.msgSuccess("修改成功");
|
| | | this.open = false;
|
| | | this.getList();
|
| | | }
|
| | | this.msgSuccess("修改成功");
|
| | | this.open = false;
|
| | | this.getList();
|
| | | });
|
| | | } else {
|
| | | addDept(this.form).then(response => {
|
| | | if (response.code === 200) {
|
| | | this.msgSuccess("新增成功");
|
| | | this.open = false;
|
| | | this.getList();
|
| | | }
|
| | | this.msgSuccess("新增成功");
|
| | | this.open = false;
|
| | | this.getList();
|
| | | });
|
| | | }
|
| | | }
|
| | |
| | | }).then(() => {
|
| | | this.getList();
|
| | | this.msgSuccess("删除成功");
|
| | | }).catch(function() {});
|
| | | })
|
| | | }
|
| | | }
|
| | | };
|