Merge branch 'dev' of https://github.com/metersphere/server into dev
This commit is contained in:
commit
5833c3b902
|
@ -2,6 +2,8 @@ FROM registry.fit2cloud.com/metersphere/fabric8-java-alpine-openjdk8-jre
|
||||||
|
|
||||||
MAINTAINER FIT2CLOUD <support@fit2cloud.com>
|
MAINTAINER FIT2CLOUD <support@fit2cloud.com>
|
||||||
|
|
||||||
|
ARG MS_VERSION=dev
|
||||||
|
|
||||||
RUN mkdir -p /opt/apps && mkdir -p /opt/jmeter
|
RUN mkdir -p /opt/apps && mkdir -p /opt/jmeter
|
||||||
|
|
||||||
ADD backend/target/backend-1.0.jar /opt/apps
|
ADD backend/target/backend-1.0.jar /opt/apps
|
||||||
|
@ -12,5 +14,7 @@ ENV JAVA_APP_JAR=/opt/apps/backend-1.0.jar
|
||||||
|
|
||||||
ENV AB_OFF=true
|
ENV AB_OFF=true
|
||||||
|
|
||||||
|
ENV MS_VERSION=${MS_VERSION}
|
||||||
|
|
||||||
ENV JAVA_OPTIONS="-Dfile.encoding=utf-8 -Djava.awt.headless=true"
|
ENV JAVA_OPTIONS="-Dfile.encoding=utf-8 -Djava.awt.headless=true"
|
||||||
CMD ["/deployments/run-java.sh"]
|
CMD ["/deployments/run-java.sh"]
|
||||||
|
|
|
@ -12,7 +12,6 @@ import org.apache.jmeter.visualizers.backend.AbstractBackendListenerClient;
|
||||||
import org.apache.jmeter.visualizers.backend.BackendListenerContext;
|
import org.apache.jmeter.visualizers.backend.BackendListenerContext;
|
||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
import java.nio.charset.StandardCharsets;
|
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -126,7 +125,7 @@ public class APIBackendListenerClient extends AbstractBackendListenerClient impl
|
||||||
}
|
}
|
||||||
|
|
||||||
ResponseResult responseResult = requestResult.getResponseResult();
|
ResponseResult responseResult = requestResult.getResponseResult();
|
||||||
responseResult.setBody(new String(result.getResponseData(), StandardCharsets.UTF_8));
|
responseResult.setBody(result.getResponseDataAsString());
|
||||||
responseResult.setHeaders(result.getResponseHeaders());
|
responseResult.setHeaders(result.getResponseHeaders());
|
||||||
responseResult.setLatency(result.getLatency());
|
responseResult.setLatency(result.getLatency());
|
||||||
responseResult.setResponseCode(result.getResponseCode());
|
responseResult.setResponseCode(result.getResponseCode());
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
package io.metersphere.controller;
|
package io.metersphere.controller;
|
||||||
|
|
||||||
import io.metersphere.base.domain.UserRole;
|
import io.metersphere.base.domain.UserRole;
|
||||||
import io.metersphere.commons.utils.SessionUtils;
|
|
||||||
import io.metersphere.controller.request.LoginRequest;
|
import io.metersphere.controller.request.LoginRequest;
|
||||||
import io.metersphere.dto.UserDTO;
|
import io.metersphere.dto.UserDTO;
|
||||||
|
import io.metersphere.i18n.Translator;
|
||||||
import io.metersphere.service.UserService;
|
import io.metersphere.service.UserService;
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.apache.shiro.SecurityUtils;
|
import org.apache.shiro.SecurityUtils;
|
||||||
|
@ -64,22 +64,22 @@ public class LoginController {
|
||||||
// 返回 userDTO
|
// 返回 userDTO
|
||||||
return ResultHolder.success(subject.getSession().getAttribute("user"));
|
return ResultHolder.success(subject.getSession().getAttribute("user"));
|
||||||
} else {
|
} else {
|
||||||
return ResultHolder.error("login fail");
|
return ResultHolder.error(Translator.get("login_fail"));
|
||||||
}
|
}
|
||||||
} catch (ExcessiveAttemptsException e) {
|
} catch (ExcessiveAttemptsException e) {
|
||||||
msg = "excessive attempts";
|
msg = "excessive_attempts";
|
||||||
} catch (LockedAccountException e) {
|
} catch (LockedAccountException e) {
|
||||||
msg = "the user has been locked.";
|
msg = "user_locked";
|
||||||
} catch (DisabledAccountException e) {
|
} catch (DisabledAccountException e) {
|
||||||
msg = "the user has been disabled. ";
|
msg = "user_has_been_disabled ";
|
||||||
} catch (ExpiredCredentialsException e) {
|
} catch (ExpiredCredentialsException e) {
|
||||||
msg = "user expires. ";
|
msg = "user_expires. ";
|
||||||
} catch (AuthenticationException e) {
|
} catch (AuthenticationException e) {
|
||||||
msg = e.getMessage();
|
msg = e.getMessage();
|
||||||
} catch (UnauthorizedException e) {
|
} catch (UnauthorizedException e) {
|
||||||
msg = "not authorized. " + e.getMessage();
|
msg = "not_authorized" + e.getMessage();
|
||||||
}
|
}
|
||||||
return ResultHolder.error(msg);
|
return ResultHolder.error(Translator.get(msg));
|
||||||
}
|
}
|
||||||
|
|
||||||
@GetMapping(value = "/signout")
|
@GetMapping(value = "/signout")
|
||||||
|
|
|
@ -5,6 +5,7 @@ import io.metersphere.base.domain.Role;
|
||||||
import io.metersphere.commons.user.SessionUser;
|
import io.metersphere.commons.user.SessionUser;
|
||||||
import io.metersphere.commons.utils.SessionUtils;
|
import io.metersphere.commons.utils.SessionUtils;
|
||||||
import io.metersphere.dto.UserDTO;
|
import io.metersphere.dto.UserDTO;
|
||||||
|
import io.metersphere.i18n.Translator;
|
||||||
import io.metersphere.service.UserService;
|
import io.metersphere.service.UserService;
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.apache.shiro.authc.*;
|
import org.apache.shiro.authc.*;
|
||||||
|
@ -67,7 +68,7 @@ public class ShiroDBRealm extends AuthorizingRealm {
|
||||||
UserDTO user = userService.getUserDTO(userId);
|
UserDTO user = userService.getUserDTO(userId);
|
||||||
String msg;
|
String msg;
|
||||||
if (user == null) {
|
if (user == null) {
|
||||||
msg = "The user does not exist: " + userId;
|
msg = Translator.get("user_not_exist") + userId;
|
||||||
logger.warn(msg);
|
logger.warn(msg);
|
||||||
throw new UnknownAccountException(msg);
|
throw new UnknownAccountException(msg);
|
||||||
}
|
}
|
||||||
|
@ -79,7 +80,7 @@ public class ShiroDBRealm extends AuthorizingRealm {
|
||||||
}
|
}
|
||||||
// 密码验证
|
// 密码验证
|
||||||
if (!userService.checkUserPassword(userId, password)) {
|
if (!userService.checkUserPassword(userId, password)) {
|
||||||
throw new IncorrectCredentialsException("The password is incorrect");
|
throw new IncorrectCredentialsException(Translator.get("password_is_incorrect"));
|
||||||
}
|
}
|
||||||
//
|
//
|
||||||
SessionUser sessionUser = SessionUser.fromUser(user);
|
SessionUser sessionUser = SessionUser.fromUser(user);
|
||||||
|
|
|
@ -12,7 +12,7 @@ user_name_is_null=User name cannot be null
|
||||||
user_email_is_null=User email cannot be null
|
user_email_is_null=User email cannot be null
|
||||||
password_is_null=Password cannot be null
|
password_is_null=Password cannot be null
|
||||||
user_id_already_exists=User ID already exists
|
user_id_already_exists=User ID already exists
|
||||||
password_modification_failed=Password modification failed
|
password_modification_failed=The old password is wrong. Please re-enter it
|
||||||
cannot_delete_current_user=Cannot delete the user currently logged in
|
cannot_delete_current_user=Cannot delete the user currently logged in
|
||||||
user_already_exists=The user already exists in the current member list
|
user_already_exists=The user already exists in the current member list
|
||||||
#load test
|
#load test
|
||||||
|
@ -96,4 +96,12 @@ please_input_workspace_member=Please input workspace merber
|
||||||
test_case_report_template_repeat=The workspace has the same name template
|
test_case_report_template_repeat=The workspace has the same name template
|
||||||
plan_name_already_exists=Test plan name already exists
|
plan_name_already_exists=Test plan name already exists
|
||||||
test_case_already_exists_excel=There are duplicate test cases in the import file
|
test_case_already_exists_excel=There are duplicate test cases in the import file
|
||||||
api_test_name_already_exists=Test name already exists
|
api_test_name_already_exists=Test name already exists
|
||||||
|
password_is_incorrect=Incorrect password
|
||||||
|
user_not_exist=user does not exist:
|
||||||
|
user_has_been_disabled=the user has been disabled.
|
||||||
|
excessive_attempts=Excessive attempts
|
||||||
|
user_locked=the user has been locked.
|
||||||
|
user_expires=user expires.
|
||||||
|
not_authorized=not authorized.
|
||||||
|
login_fail=Login fail
|
|
@ -11,10 +11,11 @@ user_name_is_null=用户名不能为空
|
||||||
user_email_is_null=用户邮箱不能为空
|
user_email_is_null=用户邮箱不能为空
|
||||||
password_is_null=密码不能为空
|
password_is_null=密码不能为空
|
||||||
user_id_already_exists=用户id已存在
|
user_id_already_exists=用户id已存在
|
||||||
password_modification_failed=密码修改失败
|
password_modification_failed=旧密码输入错误,请重新输入
|
||||||
cannot_delete_current_user=无法删除当前登录用户
|
cannot_delete_current_user=无法删除当前登录用户
|
||||||
connection_failed=连接失败
|
connection_failed=连接失败
|
||||||
user_already_exists=该用户已存在于当前成员列表中
|
user_already_exists=该用户已存在于当前成员列表中
|
||||||
|
|
||||||
#load test
|
#load test
|
||||||
edit_load_test_not_found=无法编辑测试,未找到测试:
|
edit_load_test_not_found=无法编辑测试,未找到测试:
|
||||||
run_load_test_not_found=无法运行测试,未找到测试:
|
run_load_test_not_found=无法运行测试,未找到测试:
|
||||||
|
@ -97,3 +98,14 @@ test_case_report_template_repeat=同一工作空间下不能存在同名模版
|
||||||
plan_name_already_exists=测试计划名称已存在
|
plan_name_already_exists=测试计划名称已存在
|
||||||
test_case_already_exists_excel=导入文件中存在重复用例
|
test_case_already_exists_excel=导入文件中存在重复用例
|
||||||
api_test_name_already_exists=测试名称已经存在
|
api_test_name_already_exists=测试名称已经存在
|
||||||
|
login_fail=登陆失败
|
||||||
|
password_is_incorrect=密码不正确
|
||||||
|
user_not_exist=用户不存在:
|
||||||
|
user_has_been_disabled=用户已被禁用
|
||||||
|
excessive_attempts=操作频繁
|
||||||
|
user_locked=用户被锁定
|
||||||
|
user_expires=用户过期
|
||||||
|
not_authorized=未经授权
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -12,7 +12,7 @@ user_name_is_null=用戶名不能為空
|
||||||
user_email_is_null=用戶郵箱不能為空
|
user_email_is_null=用戶郵箱不能為空
|
||||||
password_is_null=密碼不能為空
|
password_is_null=密碼不能為空
|
||||||
user_id_already_exists=用戶id已存在
|
user_id_already_exists=用戶id已存在
|
||||||
password_modification_failed=密碼修改失敗
|
password_modification_failed=舊密碼輸入錯誤,請重新輸入
|
||||||
cannot_delete_current_user=無法刪除當前登錄用戶
|
cannot_delete_current_user=無法刪除當前登錄用戶
|
||||||
user_already_exists=該用戶已存在於當前成員列表中
|
user_already_exists=該用戶已存在於當前成員列表中
|
||||||
#load test
|
#load test
|
||||||
|
@ -96,4 +96,12 @@ please_input_workspace_member=請填寫該工作空間相關人員
|
||||||
test_case_report_template_repeat=同壹工作空間下不能存在同名模版
|
test_case_report_template_repeat=同壹工作空間下不能存在同名模版
|
||||||
plan_name_already_exists=測試計劃名稱已存在
|
plan_name_already_exists=測試計劃名稱已存在
|
||||||
test_case_already_exists_excel=導入文件中存在重復用例
|
test_case_already_exists_excel=導入文件中存在重復用例
|
||||||
api_test_name_already_exists=測試名稱已經存在
|
api_test_name_already_exists=測試名稱已經存在
|
||||||
|
password_is_incorrect=密碼不正確
|
||||||
|
user_not_exist=用戶不存在:
|
||||||
|
user_has_been_disabled.=用戶已被禁用
|
||||||
|
excessive_attempts=操作頻繁
|
||||||
|
user_locked=用戶被鎖定
|
||||||
|
user_expires=用戶過期
|
||||||
|
not_authorized=未經授權。
|
||||||
|
login_fail=登入失敗
|
||||||
|
|
|
@ -1081,7 +1081,7 @@ csvdataset.file.encoding_list=UTF-8|UTF-16|ISO-8859-15|US-ASCII
|
||||||
#httpsampler.user_defined_methods=VERSION-CONTROL,REPORT,CHECKOUT,CHECKIN,UNCHECKOUT,MKWORKSPACE,UPDATE,LABEL,MERGE,BASELINE-CONTROL,MKACTIVITY
|
#httpsampler.user_defined_methods=VERSION-CONTROL,REPORT,CHECKOUT,CHECKIN,UNCHECKOUT,MKWORKSPACE,UPDATE,LABEL,MERGE,BASELINE-CONTROL,MKACTIVITY
|
||||||
|
|
||||||
# The encoding to be used if none is provided (default ISO-8859-1)
|
# The encoding to be used if none is provided (default ISO-8859-1)
|
||||||
#sampleresult.default.encoding=ISO-8859-1
|
sampleresult.default.encoding=UTF-8
|
||||||
|
|
||||||
# CookieManager behaviour - should cookies with null/empty values be deleted?
|
# CookieManager behaviour - should cookies with null/empty values be deleted?
|
||||||
# Default is true. Use false to revert to original behaviour
|
# Default is true. Use false to revert to original behaviour
|
||||||
|
|
|
@ -139,7 +139,7 @@
|
||||||
},
|
},
|
||||||
handleCopy(test) {
|
handleCopy(test) {
|
||||||
this.result = this.$post("/api/copy", {id: test.id}, () => {
|
this.result = this.$post("/api/copy", {id: test.id}, () => {
|
||||||
this.$success(this.$t('commons.delete_success'));
|
this.$success(this.$t('commons.copy_success'));
|
||||||
this.search();
|
this.search();
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
|
@ -174,7 +174,7 @@
|
||||||
},
|
},
|
||||||
handleCopy(testPlan) {
|
handleCopy(testPlan) {
|
||||||
this.result = this.$post("/performance/copy", {id: testPlan.id}, () => {
|
this.result = this.$post("/performance/copy", {id: testPlan.id}, () => {
|
||||||
this.$success(this.$t('commons.save_success'));
|
this.$success(this.$t('commons.copy_success'));
|
||||||
this.search();
|
this.search();
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
|
@ -41,7 +41,6 @@
|
||||||
v-model="row.enable"
|
v-model="row.enable"
|
||||||
active-color="#13ce66"
|
active-color="#13ce66"
|
||||||
inactive-color="#ff4949"
|
inactive-color="#ff4949"
|
||||||
active-value="readOnly"
|
|
||||||
@click="confirmEdit(row)"
|
@click="confirmEdit(row)"
|
||||||
>
|
>
|
||||||
</el-switch>
|
</el-switch>
|
||||||
|
|
|
@ -78,7 +78,7 @@
|
||||||
<el-form-item :label="$t('commons.phone')" prop="phone">
|
<el-form-item :label="$t('commons.phone')" prop="phone">
|
||||||
<el-input v-model="form.phone" autocomplete="off" :disabled="true"/>
|
<el-input v-model="form.phone" autocomplete="off" :disabled="true"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item :label="$t('commons.role')" prop="roleIds">
|
<el-form-item :label="$t('commons.role')" prop="roleIds" :rules="{required: true, message: $t('role.please_choose_role'), trigger: 'change'}">
|
||||||
<el-select v-model="form.roleIds" multiple :placeholder="$t('role.please_choose_role')" class="select-width">
|
<el-select v-model="form.roleIds" multiple :placeholder="$t('role.please_choose_role')" class="select-width">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in form.allroles"
|
v-for="item in form.allroles"
|
||||||
|
@ -175,7 +175,7 @@
|
||||||
// 编辑使填充角色信息
|
// 编辑使填充角色信息
|
||||||
this.$set(this.form, 'roleIds', roleIds);
|
this.$set(this.form, 'roleIds', roleIds);
|
||||||
},
|
},
|
||||||
updateOrgMember() {
|
updateOrgMember(formName) {
|
||||||
let param = {
|
let param = {
|
||||||
id: this.form.id,
|
id: this.form.id,
|
||||||
name: this.form.name,
|
name: this.form.name,
|
||||||
|
@ -184,11 +184,15 @@
|
||||||
roleIds: this.form.roleIds,
|
roleIds: this.form.roleIds,
|
||||||
organizationId: this.currentUser().lastOrganizationId
|
organizationId: this.currentUser().lastOrganizationId
|
||||||
}
|
}
|
||||||
this.result = this.$post("/organization/member/update", param, () => {
|
this.$refs[formName].validate((valid) => {
|
||||||
this.$success(this.$t('commons.modify_success'));
|
if (valid) {
|
||||||
this.updateVisible = false;
|
this.result = this.$post("/organization/member/update", param, () => {
|
||||||
this.initTableData();
|
this.$success(this.$t('commons.modify_success'));
|
||||||
});
|
this.updateVisible = false;
|
||||||
|
this.initTableData();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
})
|
||||||
},
|
},
|
||||||
del(row) {
|
del(row) {
|
||||||
this.$confirm(this.$t('member.remove_member'), '', {
|
this.$confirm(this.$t('member.remove_member'), '', {
|
||||||
|
|
|
@ -125,7 +125,7 @@
|
||||||
<el-form-item :label="$t('commons.phone')" prop="phone">
|
<el-form-item :label="$t('commons.phone')" prop="phone">
|
||||||
<el-input v-model="memberForm.phone" autocomplete="off" :disabled="true"/>
|
<el-input v-model="memberForm.phone" autocomplete="off" :disabled="true"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item :label="$t('commons.role')" prop="roleIds">
|
<el-form-item :label="$t('commons.role')" prop="roleIds" :rules="{required: true, message: $t('role.please_choose_role'), trigger: 'change'}">
|
||||||
<el-select v-model="memberForm.roleIds" multiple :placeholder="$t('role.please_choose_role')"
|
<el-select v-model="memberForm.roleIds" multiple :placeholder="$t('role.please_choose_role')"
|
||||||
class="select-width">
|
class="select-width">
|
||||||
<el-option
|
<el-option
|
||||||
|
@ -366,7 +366,7 @@
|
||||||
this.$info(this.$t('commons.remove_cancel'));
|
this.$info(this.$t('commons.remove_cancel'));
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
updateOrgMember() {
|
updateOrgMember(formName) {
|
||||||
let param = {
|
let param = {
|
||||||
id: this.memberForm.id,
|
id: this.memberForm.id,
|
||||||
name: this.memberForm.name,
|
name: this.memberForm.name,
|
||||||
|
@ -375,11 +375,15 @@
|
||||||
roleIds: this.memberForm.roleIds,
|
roleIds: this.memberForm.roleIds,
|
||||||
workspaceId: this.currentWorkspaceRow.id
|
workspaceId: this.currentWorkspaceRow.id
|
||||||
}
|
}
|
||||||
this.result = this.$post("/workspace/member/update", param, () => {
|
this.$refs[formName].validate((valid) => {
|
||||||
this.$success(this.$t('commons.modify_success'));
|
if (valid) {
|
||||||
this.dialogWsMemberUpdateVisible = false;
|
this.result = this.$post("/workspace/member/update", param, () => {
|
||||||
this.cellClick(this.currentWorkspaceRow);
|
this.$success(this.$t('commons.modify_success'));
|
||||||
});
|
this.dialogWsMemberUpdateVisible = false;
|
||||||
|
this.cellClick(this.currentWorkspaceRow);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
})
|
||||||
},
|
},
|
||||||
buildPagePath(path) {
|
buildPagePath(path) {
|
||||||
return path + "/" + this.dialogCurrentPage + "/" + this.dialogPageSize;
|
return path + "/" + this.dialogCurrentPage + "/" + this.dialogPageSize;
|
||||||
|
|
|
@ -59,7 +59,7 @@
|
||||||
<!--Change personal password-->
|
<!--Change personal password-->
|
||||||
<el-dialog :title="$t('member.edit_password')" :visible.sync="editPasswordVisible" width="30%" left>
|
<el-dialog :title="$t('member.edit_password')" :visible.sync="editPasswordVisible" width="30%" left>
|
||||||
<el-form :model="ruleForm" :rules="rules" ref="editPasswordForm" label-width="120px" class="demo-ruleForm">
|
<el-form :model="ruleForm" :rules="rules" ref="editPasswordForm" label-width="120px" class="demo-ruleForm">
|
||||||
<el-form-item :label="$t('member.old_password')" prop="password">
|
<el-form-item :label="$t('member.old_password')" prop="password" style="margin-bottom: 29px">
|
||||||
<el-input v-model="ruleForm.password" autocomplete="off" show-password/>
|
<el-input v-model="ruleForm.password" autocomplete="off" show-password/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item :label="$t('member.new_password')" prop="newpassword">
|
<el-form-item :label="$t('member.new_password')" prop="newpassword">
|
||||||
|
|
|
@ -145,7 +145,7 @@
|
||||||
<el-form-item :label="$t('commons.phone')" prop="phone">
|
<el-form-item :label="$t('commons.phone')" prop="phone">
|
||||||
<el-input v-model="memberForm.phone" autocomplete="off" :disabled="true"/>
|
<el-input v-model="memberForm.phone" autocomplete="off" :disabled="true"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item :label="$t('commons.role')" prop="roleIds">
|
<el-form-item :label="$t('commons.role')" prop="roleIds" :rules="{required: true, message: $t('role.please_choose_role'), trigger: 'change'}">
|
||||||
<el-select v-model="memberForm.roleIds" multiple :placeholder="$t('role.please_choose_role')"
|
<el-select v-model="memberForm.roleIds" multiple :placeholder="$t('role.please_choose_role')"
|
||||||
class="select-width">
|
class="select-width">
|
||||||
<el-option
|
<el-option
|
||||||
|
@ -427,7 +427,7 @@
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
updateOrgMember() {
|
updateOrgMember(formName) {
|
||||||
let param = {
|
let param = {
|
||||||
id: this.memberForm.id,
|
id: this.memberForm.id,
|
||||||
name: this.memberForm.name,
|
name: this.memberForm.name,
|
||||||
|
@ -436,10 +436,14 @@
|
||||||
roleIds: this.memberForm.roleIds,
|
roleIds: this.memberForm.roleIds,
|
||||||
organizationId: this.currentRow.id
|
organizationId: this.currentRow.id
|
||||||
}
|
}
|
||||||
this.result = this.$post("/organization/member/update", param, () => {
|
this.$refs[formName].validate((valid) => {
|
||||||
this.$success(this.$t('commons.modify_success'));
|
if (valid) {
|
||||||
this.dialogOrgMemberUpdateVisible = false;
|
this.result = this.$post("/organization/member/update", param, () => {
|
||||||
this.cellClick(this.currentRow);
|
this.$success(this.$t('commons.modify_success'));
|
||||||
|
this.dialogOrgMemberUpdateVisible = false;
|
||||||
|
this.cellClick(this.currentRow);
|
||||||
|
});
|
||||||
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
|
@ -164,7 +164,7 @@
|
||||||
<el-form-item :label="$t('commons.phone')" prop="phone">
|
<el-form-item :label="$t('commons.phone')" prop="phone">
|
||||||
<el-input v-model="memberForm.phone" autocomplete="off" :disabled="true"/>
|
<el-input v-model="memberForm.phone" autocomplete="off" :disabled="true"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item :label="$t('commons.role')" prop="roleIds">
|
<el-form-item :label="$t('commons.role')" prop="roleIds" :rules="{required: true, message: $t('role.please_choose_role'), trigger: 'change'}">
|
||||||
<el-select v-model="memberForm.roleIds" multiple :placeholder="$t('role.please_choose_role')"
|
<el-select v-model="memberForm.roleIds" multiple :placeholder="$t('role.please_choose_role')"
|
||||||
class="select-width">
|
class="select-width">
|
||||||
<el-option
|
<el-option
|
||||||
|
@ -405,7 +405,7 @@
|
||||||
this.$info(this.$t('commons.remove_cancel'));
|
this.$info(this.$t('commons.remove_cancel'));
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
updateWorkspaceMember() {
|
updateWorkspaceMember(formName) {
|
||||||
let param = {
|
let param = {
|
||||||
id: this.memberForm.id,
|
id: this.memberForm.id,
|
||||||
name: this.memberForm.name,
|
name: this.memberForm.name,
|
||||||
|
@ -414,10 +414,14 @@
|
||||||
roleIds: this.memberForm.roleIds,
|
roleIds: this.memberForm.roleIds,
|
||||||
workspaceId: this.currentWorkspaceRow.id
|
workspaceId: this.currentWorkspaceRow.id
|
||||||
}
|
}
|
||||||
this.result = this.$post("/workspace/member/update", param, () => {
|
this.$refs[formName].validate((valid) => {
|
||||||
this.$success(this.$t('commons.modify_success'));
|
if (valid) {
|
||||||
this.dialogWsMemberUpdateVisible = false;
|
this.result = this.$post("/workspace/member/update", param, () => {
|
||||||
this.cellClick(this.currentWorkspaceRow);
|
this.$success(this.$t('commons.modify_success'));
|
||||||
|
this.dialogWsMemberUpdateVisible = false;
|
||||||
|
this.cellClick(this.currentWorkspaceRow);
|
||||||
|
});
|
||||||
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
|
@ -53,19 +53,19 @@
|
||||||
:destroy-on-close="true">
|
:destroy-on-close="true">
|
||||||
<el-form :model="form" label-position="right" label-width="120px" size="small" :rules="rule" ref="createUserForm">
|
<el-form :model="form" label-position="right" label-width="120px" size="small" :rules="rule" ref="createUserForm">
|
||||||
<el-form-item label="ID" prop="id">
|
<el-form-item label="ID" prop="id">
|
||||||
<el-input v-model="form.id" autocomplete="off"/>
|
<el-input v-model="form.id" autocomplete="off" :placeholder="$t('user.input_id')"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item :label="$t('commons.username')" prop="name">
|
<el-form-item :label="$t('commons.username')" prop="name">
|
||||||
<el-input v-model="form.name" autocomplete="off"/>
|
<el-input v-model="form.name" autocomplete="off" :placeholder="$t('user.input_name')"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item :label="$t('commons.email')" prop="email">
|
<el-form-item :label="$t('commons.email')" prop="email">
|
||||||
<el-input v-model="form.email" autocomplete="off"/>
|
<el-input v-model="form.email" autocomplete="off" :placeholder="$t('user.input_email')"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item :label="$t('commons.phone')" prop="phone">
|
<el-form-item :label="$t('commons.phone')" prop="phone">
|
||||||
<el-input v-model="form.phone" autocomplete="off"/>
|
<el-input v-model="form.phone" autocomplete="off" :placeholder="$t('user.input_phone')"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item :label="$t('commons.password')" prop="password">
|
<el-form-item :label="$t('commons.password')" prop="password">
|
||||||
<el-input v-model="form.password" autocomplete="off" show-password/>
|
<el-input v-model="form.password" autocomplete="new-password" show-password :placeholder="$t('user.input_password')"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<div v-for="(role, index) in form.roles" :key="index">
|
<div v-for="(role, index) in form.roles" :key="index">
|
||||||
<el-form-item :label="$t('commons.role')+index"
|
<el-form-item :label="$t('commons.role')+index"
|
||||||
|
|
|
@ -79,7 +79,7 @@
|
||||||
<el-form-item :label="$t('commons.phone')" prop="phone">
|
<el-form-item :label="$t('commons.phone')" prop="phone">
|
||||||
<el-input v-model="form.phone" autocomplete="off" :disabled="true"/>
|
<el-input v-model="form.phone" autocomplete="off" :disabled="true"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item :label="$t('commons.role')" prop="roleIds">
|
<el-form-item :label="$t('commons.role')" prop="roleIds" :rules="{required: true, message: $t('role.please_choose_role'), trigger: 'change'}">
|
||||||
<el-select v-model="form.roleIds" multiple :placeholder="$t('role.please_choose_role')" class="select-width">
|
<el-select v-model="form.roleIds" multiple :placeholder="$t('role.please_choose_role')" class="select-width">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in form.allroles"
|
v-for="item in form.allroles"
|
||||||
|
@ -197,7 +197,7 @@
|
||||||
// 编辑使填充角色信息
|
// 编辑使填充角色信息
|
||||||
this.$set(this.form, 'roleIds', roleIds);
|
this.$set(this.form, 'roleIds', roleIds);
|
||||||
},
|
},
|
||||||
updateWorkspaceMember() {
|
updateWorkspaceMember(formName) {
|
||||||
let param = {
|
let param = {
|
||||||
id: this.form.id,
|
id: this.form.id,
|
||||||
name: this.form.name,
|
name: this.form.name,
|
||||||
|
@ -206,10 +206,14 @@
|
||||||
roleIds: this.form.roleIds,
|
roleIds: this.form.roleIds,
|
||||||
workspaceId: this.currentUser().lastWorkspaceId
|
workspaceId: this.currentUser().lastWorkspaceId
|
||||||
}
|
}
|
||||||
this.result = this.$post("/workspace/member/update", param, () => {
|
this.$refs[formName].validate((valid) => {
|
||||||
this.$success(this.$t('commons.modify_success'));
|
if (valid) {
|
||||||
this.updateVisible = false;
|
this.result = this.$post("/workspace/member/update", param, () => {
|
||||||
this.initTableData();
|
this.$success(this.$t('commons.modify_success'));
|
||||||
|
this.updateVisible = false;
|
||||||
|
this.initTableData();
|
||||||
|
});
|
||||||
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
create() {
|
create() {
|
||||||
|
|
|
@ -164,6 +164,7 @@ export default {
|
||||||
'input_id': 'Please enter a ID',
|
'input_id': 'Please enter a ID',
|
||||||
'input_email': 'Please enter a email',
|
'input_email': 'Please enter a email',
|
||||||
'input_password': 'Please enter a password',
|
'input_password': 'Please enter a password',
|
||||||
|
'input_phone': 'Please enter phone number',
|
||||||
'special_characters_are_not_supported': 'Special characters are not supported',
|
'special_characters_are_not_supported': 'Special characters are not supported',
|
||||||
'mobile_number_format_is_incorrect': 'Mobile number format is incorrect',
|
'mobile_number_format_is_incorrect': 'Mobile number format is incorrect',
|
||||||
'email_format_is_incorrect': 'Email format is incorrect',
|
'email_format_is_incorrect': 'Email format is incorrect',
|
||||||
|
|
|
@ -162,6 +162,7 @@ export default {
|
||||||
'input_id': '请输入ID',
|
'input_id': '请输入ID',
|
||||||
'input_email': '请输入邮箱',
|
'input_email': '请输入邮箱',
|
||||||
'input_password': '请输入密码',
|
'input_password': '请输入密码',
|
||||||
|
'input_phone': '请输入电话号码',
|
||||||
'special_characters_are_not_supported': '不支持特殊字符',
|
'special_characters_are_not_supported': '不支持特殊字符',
|
||||||
'mobile_number_format_is_incorrect': '手机号码格式不正确',
|
'mobile_number_format_is_incorrect': '手机号码格式不正确',
|
||||||
'email_format_is_incorrect': '邮箱格式不正确',
|
'email_format_is_incorrect': '邮箱格式不正确',
|
||||||
|
|
|
@ -161,6 +161,7 @@ export default {
|
||||||
'input_id': '請輸入ID',
|
'input_id': '請輸入ID',
|
||||||
'input_email': '請輸入郵箱',
|
'input_email': '請輸入郵箱',
|
||||||
'input_password': '請輸入密碼',
|
'input_password': '請輸入密碼',
|
||||||
|
'input_phone': '請輸入電話號碼',
|
||||||
'special_characters_are_not_supported': '不支持特殊字符',
|
'special_characters_are_not_supported': '不支持特殊字符',
|
||||||
'mobile_number_format_is_incorrect': '手機號碼格式不正確',
|
'mobile_number_format_is_incorrect': '手機號碼格式不正確',
|
||||||
'email_format_is_incorrect': '郵箱格式不正確',
|
'email_format_is_incorrect': '郵箱格式不正確',
|
||||||
|
|
Loading…
Reference in New Issue