|
@@ -52,10 +52,10 @@ export default {
|
|
|
],
|
|
|
rules: {
|
|
|
name: [{ required: true, message: '请输入姓名' }],
|
|
|
-
|
|
|
- passwd: [{ required: true, message: '请输入密码' }],
|
|
|
+ passwd: [{ required: false, message: '请输入密码' }],
|
|
|
phone: [{ required: true, message: '请输入电话' }],
|
|
|
deptname: [{ required: true, message: '请输入机构名称' }],
|
|
|
+ role: [{ required: true, message: '请选择用户类型' }],
|
|
|
},
|
|
|
};
|
|
|
},
|
|
@@ -67,7 +67,6 @@ export default {
|
|
|
async search() {
|
|
|
if (this.id) {
|
|
|
let res = await this.fetch(this.id);
|
|
|
- console.log(res.data);
|
|
|
this.$set(this, `form`, res.data);
|
|
|
}
|
|
|
},
|
|
@@ -76,14 +75,8 @@ export default {
|
|
|
async drawerSave({ data, isNew }) {
|
|
|
let res;
|
|
|
let msg;
|
|
|
- console.log(this.isNew);
|
|
|
-
|
|
|
if (this.isNew) {
|
|
|
- console.log(data);
|
|
|
-
|
|
|
res = await this.update(data);
|
|
|
- console.log();
|
|
|
-
|
|
|
msg = `${this.keyWord}修改成功`;
|
|
|
} else {
|
|
|
res = await this.create(data);
|