|
|
|
@ -76,11 +76,11 @@
|
|
|
|
|
</el-table>
|
|
|
|
|
|
|
|
|
|
<el-pagination
|
|
|
|
|
:current-page="query.page"
|
|
|
|
|
:page-size="query.limit"
|
|
|
|
|
@current-change="handleCurrentChange"
|
|
|
|
|
layout="prev, pager, next"
|
|
|
|
|
:total="total"
|
|
|
|
|
:current-page="query.page"
|
|
|
|
|
>
|
|
|
|
|
</el-pagination>
|
|
|
|
|
|
|
|
|
@ -202,6 +202,7 @@ import {
|
|
|
|
|
} from "../../../api/auth/authAdmin";
|
|
|
|
|
|
|
|
|
|
import store from "../../../store/index";
|
|
|
|
|
import {isBlank} from "@/utils/strUtil";
|
|
|
|
|
|
|
|
|
|
const formJson = {
|
|
|
|
|
id: "",
|
|
|
|
@ -338,12 +339,10 @@ export default {
|
|
|
|
|
},
|
|
|
|
|
// 刷新表单
|
|
|
|
|
resetForm() {
|
|
|
|
|
if (this.$refs["dataForm"]) {
|
|
|
|
|
// 清空验证信息表单
|
|
|
|
|
this.$refs["dataForm"].clearValidate();
|
|
|
|
|
// 刷新表单
|
|
|
|
|
this.$nextTick(() => {
|
|
|
|
|
this.$refs["dataForm"].resetFields();
|
|
|
|
|
}
|
|
|
|
|
this.$refs["dataForm"].clearValidate();
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
// 隐藏表单
|
|
|
|
|
hideForm() {
|
|
|
|
@ -356,6 +355,7 @@ export default {
|
|
|
|
|
// 显示表单
|
|
|
|
|
handleForm(index, row) {
|
|
|
|
|
this.formVisible = true;
|
|
|
|
|
this.resetForm();
|
|
|
|
|
this.formData = JSON.parse(JSON.stringify(formJson));
|
|
|
|
|
if (row !== null) {
|
|
|
|
|
this.formData = Object.assign({}, row);
|
|
|
|
@ -372,6 +372,26 @@ export default {
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
formSubmit() {
|
|
|
|
|
if (isBlank(this.formData.userName)) {
|
|
|
|
|
this.$message.error("用户账号不能为空");
|
|
|
|
|
return;
|
|
|
|
|
} else if (isBlank(this.formData.passWord)) {
|
|
|
|
|
this.$message.error("密码不能为空")
|
|
|
|
|
return;
|
|
|
|
|
}else if (isBlank(this.formData.checkPassword)) {
|
|
|
|
|
this.$message.error("请再次确认密码");
|
|
|
|
|
return;
|
|
|
|
|
} else if (isBlank(this.formData.employeeName)) {
|
|
|
|
|
this.$message.error("用户名称不能为空");
|
|
|
|
|
return;
|
|
|
|
|
} else if (this.formData.passWord != this.formData.checkPassword) {
|
|
|
|
|
this.$message.error("两次输入密码不一致");
|
|
|
|
|
return;
|
|
|
|
|
} else if (this.formData.roles.length === 0) {
|
|
|
|
|
this.$message.error("未指定角色!");
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
this.$refs["dataForm"].validate(valid => {
|
|
|
|
|
if (valid) {
|
|
|
|
|
this.formLoading = true;
|
|
|
|
@ -424,7 +444,6 @@ export default {
|
|
|
|
|
});
|
|
|
|
|
})
|
|
|
|
|
.catch(() => {
|
|
|
|
|
this.$message.info("取消删除");
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|