{
- console.log(res)
if (String(res.code) === '1') {
console.log(res.data)
this.ruleForm = res.data
- this.ruleForm.sex = res.data.sex === '0' ? '女' : '男'
+ this.ruleForm.admin = res.data.admin === '0' ? '否' : '是'
// this.ruleForm.password = ''
} else {
this.$message.error(res.msg || '操作失败')
@@ -159,10 +158,11 @@
if (this.actionType === 'add') {
const params = {
...this.ruleForm,
- sex: this.ruleForm.sex === '女' ? '0' : '1'
+ admin: this.ruleForm.admin === '否' ? '0' : '1'
}
addEmployee(params).then(res => {
if (res.code === 1) {
+ console.log("添加成功")
this.$message.success('员工添加成功!')
if (!st) {
this.goBack()
@@ -173,7 +173,7 @@
'phone': '',
// 'password': '',
// 'rePassword': '',/
- 'sex': '男',
+ 'admin': '是',
'password': ''
}
}
@@ -186,11 +186,14 @@
} else {
const params = {
...this.ruleForm,
- sex: this.ruleForm.sex === '女' ? '0' : '1'
+ admin: this.ruleForm.admin === '否' ? '0' : '1'
}
editEmployee(params).then(res => {
+ console.log(res.toString());
if (res.code === 1) {
- this.$message.success('员工信息修改成功!')
+ var vm = this;
+ Vue.prototype.$message.success('员工信息修改成功!')
+ console.log("修改成功");
this.goBack()
} else {
this.$message.error(res.msg || '操作失败')
diff --git a/target/classes/backend/page/member/list.html b/target/classes/backend/page/member/list.html
index 17f8031..e98222e 100644
--- a/target/classes/backend/page/member/list.html
+++ b/target/classes/backend/page/member/list.html
@@ -22,7 +22,7 @@
{
if (String(res.code) === '1') {
diff --git a/target/classes/com/JIAL/FMSystem/FWApplication.class b/target/classes/com/JIAL/FMSystem/FWApplication.class
new file mode 100644
index 0000000..349b274
Binary files /dev/null and b/target/classes/com/JIAL/FMSystem/FWApplication.class differ
diff --git a/target/classes/com/JIAL/FMSystem/controller/EmployeeController.class b/target/classes/com/JIAL/FMSystem/controller/EmployeeController.class
index be3d287..9b6cddf 100644
Binary files a/target/classes/com/JIAL/FMSystem/controller/EmployeeController.class and b/target/classes/com/JIAL/FMSystem/controller/EmployeeController.class differ
diff --git a/target/classes/com/JIAL/FMSystem/entity/Employee.class b/target/classes/com/JIAL/FMSystem/entity/Employee.class
index 7a1a01e..fcc3833 100644
Binary files a/target/classes/com/JIAL/FMSystem/entity/Employee.class and b/target/classes/com/JIAL/FMSystem/entity/Employee.class differ