Commit b2347643 authored by 张俊's avatar 张俊

新增编辑用户切换数据消失

parent fe9f13c0
...@@ -349,10 +349,10 @@ export default { ...@@ -349,10 +349,10 @@ export default {
}); });
}, },
change_type() { change_type() {
this.form.systemname = ""; // this.form.systemname = "";
this.form.domain = ""; // this.form.domain = "";
this.form.ip = []; // this.form.ip = [];
this.form.origin = ""; // this.form.origin = "";
}, },
handleClose(tag) { handleClose(tag) {
this.form.ip.splice(this.form.ip.indexOf(tag), 1); this.form.ip.splice(this.form.ip.indexOf(tag), 1);
...@@ -473,18 +473,22 @@ export default { ...@@ -473,18 +473,22 @@ export default {
this.$router.back(-1); this.$router.back(-1);
}, },
add_user() { add_user() {
// this.form.systemname = "";
// this.form.domain = "";
// this.form.ip = [];
// this.form.origin = "";
var temp = { var temp = {
user_id: this.form.account, // 用户名 user_id: this.form.account, // 用户名
password: this.form.password, password: this.form.password,
user_name: this.form.nickname, // 昵称 user_name: this.form.nickname, // 昵称
system_name: this.form.systemname, //系统名称 system_name: this.form.type>=2?this.form.systemname:'', //系统名称
phone: this.form.phone + "", // 电话号 phone: this.form.phone + "", // 电话号
email: this.form.email, // 邮箱 email: this.form.email, // 邮箱
department_id: this.form.origin, // 组织id department_id: this.form.type>=2?this.form.origin:'', // 组织id
is_admin: this.form.type, is_admin: this.form.type,
state: this.form.able, // 用户状态,1——启用,0 禁用 state: this.form.able, // 用户状态,1——启用,0 禁用
domain_name: this.form.domain, // domain_name: this.form.type>=3?this.form.domain:'', //
ip_whitelist: this.form.ip, // ip_whitelist: this.form.type>=3?this.form.ip:[], //
description: this.form.desc, //描述 description: this.form.desc, //描述
link_man: this.form.contact, link_man: this.form.contact,
}; };
...@@ -507,14 +511,14 @@ export default { ...@@ -507,14 +511,14 @@ export default {
var temp = { var temp = {
user_id: this.form.account, // 用户名 user_id: this.form.account, // 用户名
user_name: this.form.nickname, // 昵称 user_name: this.form.nickname, // 昵称
system_name: this.form.systemname, //系统名称 system_name: this.form.type>=2?this.form.systemname:'', //系统名称
phone: this.form.phone + "", // 电话号 phone: this.form.phone + "", // 电话号
email: this.form.email, // 邮箱 email: this.form.email, // 邮箱
department_id: this.form.origin, // 组织id department_id: this.form.type>=2?this.form.origin:'', // 组织id
is_admin: this.form.type, is_admin: this.form.type,
state: this.form.able, // 用户状态,1——启用,0 禁用 state: this.form.able, // 用户状态,1——启用,0 禁用
domain_name: this.form.domain, // domain_name: this.form.type>=3?this.form.domain:'', //
ip_whitelist: this.form.ip && this.form.ip.length ? this.form.ip : [], // ip_whitelist: this.form.type>=3?this.form.ip && this.form.ip.length ? this.form.ip : []:[], //
description: this.form.desc, //描述 description: this.form.desc, //描述
link_man: this.form.contact, link_man: this.form.contact,
}; };
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment