Merge remote-tracking branch 'origin/dev' into dev
This commit is contained in:
commit
1788e22351
|
@ -7,9 +7,14 @@
|
||||||
p.create_time, w.id as workspaceId, w.name as workspaceName
|
p.create_time, w.id as workspaceId, w.name as workspaceName
|
||||||
from project p
|
from project p
|
||||||
join workspace w on p.workspace_id = w.id
|
join workspace w on p.workspace_id = w.id
|
||||||
<if test="proRequest.workspaceId != null">
|
<where>
|
||||||
where w.id = #{proRequest.workspaceId}
|
<if test="proRequest.name != null and proRequest.name != ''">
|
||||||
|
and p.name like #{proRequest.name, jdbcType=VARCHAR}
|
||||||
</if>
|
</if>
|
||||||
|
<if test="proRequest.workspaceId != null">
|
||||||
|
and w.id = #{proRequest.workspaceId}
|
||||||
|
</if>
|
||||||
|
</where>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
|
@ -1,10 +1,12 @@
|
||||||
package io.metersphere.base.mapper.ext;
|
package io.metersphere.base.mapper.ext;
|
||||||
|
|
||||||
|
import io.metersphere.controller.request.WorkspaceRequest;
|
||||||
import io.metersphere.dto.WorkspaceDTO;
|
import io.metersphere.dto.WorkspaceDTO;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
public interface ExtWorkspaceMapper {
|
public interface ExtWorkspaceMapper {
|
||||||
|
|
||||||
List<WorkspaceDTO> getWorkspaceWithOrg();
|
List<WorkspaceDTO> getWorkspaceWithOrg(@Param("request") WorkspaceRequest request);
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,6 +5,11 @@
|
||||||
<select id="getWorkspaceWithOrg" resultType="io.metersphere.dto.WorkspaceDTO">
|
<select id="getWorkspaceWithOrg" resultType="io.metersphere.dto.WorkspaceDTO">
|
||||||
select w.id, w.name, w.organization_id as organizationId, w.description, o.name as organizationName
|
select w.id, w.name, w.organization_id as organizationId, w.description, o.name as organizationName
|
||||||
from workspace w join organization o on w.organization_id = o.id
|
from workspace w join organization o on w.organization_id = o.id
|
||||||
|
<where>
|
||||||
|
<if test="request.name != ''">
|
||||||
|
AND w.name LIKE #{request.name,jdbcType=VARCHAR}
|
||||||
|
</if>
|
||||||
|
</where>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
|
@ -1,15 +0,0 @@
|
||||||
package io.metersphere.commons.annotations;
|
|
||||||
|
|
||||||
import java.lang.annotation.Documented;
|
|
||||||
import java.lang.annotation.ElementType;
|
|
||||||
import java.lang.annotation.Inherited;
|
|
||||||
import java.lang.annotation.Retention;
|
|
||||||
import java.lang.annotation.RetentionPolicy;
|
|
||||||
import java.lang.annotation.Target;
|
|
||||||
|
|
||||||
@Documented
|
|
||||||
@Inherited
|
|
||||||
@Target(ElementType.FIELD)
|
|
||||||
@Retention(RetentionPolicy.RUNTIME)
|
|
||||||
public @interface FuzzyQuery {
|
|
||||||
}
|
|
|
@ -1,12 +1,8 @@
|
||||||
package io.metersphere.commons.utils;
|
package io.metersphere.commons.utils;
|
||||||
|
|
||||||
import io.metersphere.commons.annotations.FuzzyQuery;
|
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.springframework.util.ReflectionUtils;
|
|
||||||
|
|
||||||
import java.lang.reflect.Method;
|
import java.lang.reflect.Method;
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.Map;
|
|
||||||
|
|
||||||
public class BeanUtils {
|
public class BeanUtils {
|
||||||
|
|
||||||
|
@ -69,38 +65,4 @@ public class BeanUtils {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @param obj
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
public static Map<String, Object> objectToMap(Object obj) {
|
|
||||||
|
|
||||||
HashMap<String, Object> map = new HashMap<>();
|
|
||||||
if (obj != null) {
|
|
||||||
ReflectionUtils.doWithFields(obj.getClass(), field -> {
|
|
||||||
boolean accessFlag = field.isAccessible();
|
|
||||||
try {
|
|
||||||
String varName = field.getName();
|
|
||||||
field.setAccessible(true);
|
|
||||||
Object o = field.get(obj);
|
|
||||||
if (o != null) {
|
|
||||||
if (field.isAnnotationPresent(FuzzyQuery.class) && o instanceof String) {
|
|
||||||
String value = "%" + o + "%";
|
|
||||||
map.put(varName, value);
|
|
||||||
} else {
|
|
||||||
map.put(varName, field.get(obj));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
field.setAccessible(accessFlag);
|
|
||||||
} catch (Exception e) {
|
|
||||||
|
|
||||||
} finally {
|
|
||||||
field.setAccessible(accessFlag);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
return map;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,11 +6,13 @@ import io.metersphere.base.domain.Organization;
|
||||||
import io.metersphere.commons.constants.RoleConstants;
|
import io.metersphere.commons.constants.RoleConstants;
|
||||||
import io.metersphere.commons.utils.PageUtils;
|
import io.metersphere.commons.utils.PageUtils;
|
||||||
import io.metersphere.commons.utils.Pager;
|
import io.metersphere.commons.utils.Pager;
|
||||||
|
import io.metersphere.controller.request.OrganizationRequest;
|
||||||
import io.metersphere.dto.OrganizationMemberDTO;
|
import io.metersphere.dto.OrganizationMemberDTO;
|
||||||
import io.metersphere.service.OrganizationService;
|
import io.metersphere.service.OrganizationService;
|
||||||
import org.apache.shiro.authz.annotation.Logical;
|
import org.apache.shiro.authz.annotation.Logical;
|
||||||
import org.apache.shiro.authz.annotation.RequiresRoles;
|
import org.apache.shiro.authz.annotation.RequiresRoles;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
@ -23,26 +25,34 @@ public class OrganizationController {
|
||||||
|
|
||||||
@PostMapping("/add")
|
@PostMapping("/add")
|
||||||
@RequiresRoles(RoleConstants.ADMIN)
|
@RequiresRoles(RoleConstants.ADMIN)
|
||||||
public Organization addOrganization(@RequestBody Organization organization) { return organizationService.addOrganization(organization); }
|
public Organization addOrganization(@RequestBody Organization organization) {
|
||||||
|
return organizationService.addOrganization(organization);
|
||||||
|
}
|
||||||
|
|
||||||
@GetMapping("/list")
|
@GetMapping("/list")
|
||||||
@RequiresRoles(value = {RoleConstants.ADMIN,RoleConstants.ORG_ADMIN,RoleConstants.TEST_MANAGER}, logical = Logical.OR)
|
@RequiresRoles(value = {RoleConstants.ADMIN, RoleConstants.ORG_ADMIN, RoleConstants.TEST_MANAGER}, logical = Logical.OR)
|
||||||
public List<Organization> getOrganizationList() { return organizationService.getOrganizationList(); }
|
public List<Organization> getOrganizationList() {
|
||||||
|
return organizationService.getOrganizationList(new OrganizationRequest());
|
||||||
|
}
|
||||||
|
|
||||||
@PostMapping("/list/{goPage}/{pageSize}")
|
@PostMapping("/list/{goPage}/{pageSize}")
|
||||||
@RequiresRoles(value = {RoleConstants.ADMIN,RoleConstants.ORG_ADMIN}, logical = Logical.OR)
|
@RequiresRoles(value = {RoleConstants.ADMIN, RoleConstants.ORG_ADMIN}, logical = Logical.OR)
|
||||||
public Pager<List<Organization>> getOrganizationList(@PathVariable int goPage, @PathVariable int pageSize) {
|
public Pager<List<Organization>> getOrganizationList(@RequestBody OrganizationRequest request, @PathVariable int goPage, @PathVariable int pageSize) {
|
||||||
Page<Object> page = PageHelper.startPage(goPage, pageSize, true);
|
Page<Object> page = PageHelper.startPage(goPage, pageSize, true);
|
||||||
return PageUtils.setPageInfo(page, organizationService.getOrganizationList());
|
return PageUtils.setPageInfo(page, organizationService.getOrganizationList(request));
|
||||||
}
|
}
|
||||||
|
|
||||||
@GetMapping("/delete/{organizationId}")
|
@GetMapping("/delete/{organizationId}")
|
||||||
@RequiresRoles(RoleConstants.ADMIN)
|
@RequiresRoles(RoleConstants.ADMIN)
|
||||||
public void deleteOrganization(@PathVariable(value = "organizationId") String organizationId) { organizationService.deleteOrganization(organizationId); }
|
public void deleteOrganization(@PathVariable(value = "organizationId") String organizationId) {
|
||||||
|
organizationService.deleteOrganization(organizationId);
|
||||||
|
}
|
||||||
|
|
||||||
@PostMapping("/update")
|
@PostMapping("/update")
|
||||||
@RequiresRoles(value = {RoleConstants.ADMIN,RoleConstants.ORG_ADMIN}, logical = Logical.OR)
|
@RequiresRoles(value = {RoleConstants.ADMIN, RoleConstants.ORG_ADMIN}, logical = Logical.OR)
|
||||||
public void updateOrganization(@RequestBody Organization organization) { organizationService.updateOrganization(organization); }
|
public void updateOrganization(@RequestBody Organization organization) {
|
||||||
|
organizationService.updateOrganization(organization);
|
||||||
|
}
|
||||||
|
|
||||||
@GetMapping("/list/userorg/{userId}")
|
@GetMapping("/list/userorg/{userId}")
|
||||||
public List<Organization> getOrganizationListByUserId(@PathVariable String userId) {
|
public List<Organization> getOrganizationListByUserId(@PathVariable String userId) {
|
||||||
|
@ -50,7 +60,7 @@ public class OrganizationController {
|
||||||
}
|
}
|
||||||
|
|
||||||
@PostMapping("/member/update")
|
@PostMapping("/member/update")
|
||||||
@RequiresRoles(value = {RoleConstants.ADMIN,RoleConstants.ORG_ADMIN}, logical = Logical.OR)
|
@RequiresRoles(value = {RoleConstants.ADMIN, RoleConstants.ORG_ADMIN}, logical = Logical.OR)
|
||||||
public void updateOrgMember(@RequestBody OrganizationMemberDTO memberDTO) {
|
public void updateOrgMember(@RequestBody OrganizationMemberDTO memberDTO) {
|
||||||
organizationService.updateOrgMember(memberDTO);
|
organizationService.updateOrgMember(memberDTO);
|
||||||
}
|
}
|
||||||
|
|
|
@ -7,7 +7,6 @@ import io.metersphere.commons.constants.RoleConstants;
|
||||||
import io.metersphere.commons.utils.PageUtils;
|
import io.metersphere.commons.utils.PageUtils;
|
||||||
import io.metersphere.commons.utils.Pager;
|
import io.metersphere.commons.utils.Pager;
|
||||||
import io.metersphere.controller.request.WorkspaceRequest;
|
import io.metersphere.controller.request.WorkspaceRequest;
|
||||||
import io.metersphere.dto.OrganizationMemberDTO;
|
|
||||||
import io.metersphere.dto.WorkspaceDTO;
|
import io.metersphere.dto.WorkspaceDTO;
|
||||||
import io.metersphere.dto.WorkspaceMemberDTO;
|
import io.metersphere.dto.WorkspaceMemberDTO;
|
||||||
import io.metersphere.service.WorkspaceService;
|
import io.metersphere.service.WorkspaceService;
|
||||||
|
@ -73,9 +72,9 @@ public class WorkspaceController {
|
||||||
|
|
||||||
@PostMapping("list/all/{goPage}/{pageSize}")
|
@PostMapping("list/all/{goPage}/{pageSize}")
|
||||||
@RequiresRoles(RoleConstants.ADMIN)
|
@RequiresRoles(RoleConstants.ADMIN)
|
||||||
public Pager<List<WorkspaceDTO>> getAllWorkspaceList(@PathVariable int goPage, @PathVariable int pageSize) {
|
public Pager<List<WorkspaceDTO>> getAllWorkspaceList(@PathVariable int goPage, @PathVariable int pageSize, @RequestBody WorkspaceRequest request) {
|
||||||
Page<Object> page = PageHelper.startPage(goPage, pageSize, true);
|
Page<Object> page = PageHelper.startPage(goPage, pageSize, true);
|
||||||
return PageUtils.setPageInfo(page, workspaceService.getAllWorkspaceList());
|
return PageUtils.setPageInfo(page, workspaceService.getAllWorkspaceList(request));
|
||||||
}
|
}
|
||||||
|
|
||||||
@GetMapping("/list/userworkspace/{userId}")
|
@GetMapping("/list/userworkspace/{userId}")
|
||||||
|
|
|
@ -0,0 +1,13 @@
|
||||||
|
package io.metersphere.controller.request;
|
||||||
|
|
||||||
|
public class OrganizationRequest {
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
public String getName() {
|
||||||
|
return name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setName(String name) {
|
||||||
|
this.name = name;
|
||||||
|
}
|
||||||
|
}
|
|
@ -2,6 +2,15 @@ package io.metersphere.controller.request;
|
||||||
|
|
||||||
public class ProjectRequest {
|
public class ProjectRequest {
|
||||||
private String workspaceId;
|
private String workspaceId;
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
public String getName() {
|
||||||
|
return name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setName(String name) {
|
||||||
|
this.name = name;
|
||||||
|
}
|
||||||
|
|
||||||
public String getWorkspaceId() {
|
public String getWorkspaceId() {
|
||||||
return workspaceId;
|
return workspaceId;
|
||||||
|
|
|
@ -1,10 +1,7 @@
|
||||||
package io.metersphere.controller.request;
|
package io.metersphere.controller.request;
|
||||||
|
|
||||||
import io.metersphere.commons.annotations.FuzzyQuery;
|
|
||||||
|
|
||||||
public class WorkspaceRequest {
|
public class WorkspaceRequest {
|
||||||
private String organizationId;
|
private String organizationId;
|
||||||
@FuzzyQuery
|
|
||||||
private String name;
|
private String name;
|
||||||
|
|
||||||
public String getOrganizationId() {
|
public String getOrganizationId() {
|
||||||
|
|
|
@ -7,6 +7,7 @@ import io.metersphere.report.base.*;
|
||||||
import io.metersphere.report.dto.ErrorsTop5DTO;
|
import io.metersphere.report.dto.ErrorsTop5DTO;
|
||||||
import io.metersphere.report.dto.RequestStatisticsDTO;
|
import io.metersphere.report.dto.RequestStatisticsDTO;
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
|
|
||||||
import java.io.Reader;
|
import java.io.Reader;
|
||||||
import java.io.StringReader;
|
import java.io.StringReader;
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
|
@ -18,6 +19,7 @@ import java.time.Instant;
|
||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
import java.time.ZoneId;
|
import java.time.ZoneId;
|
||||||
import java.time.format.DateTimeFormatter;
|
import java.time.format.DateTimeFormatter;
|
||||||
|
import java.time.temporal.ChronoUnit;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
|
@ -418,7 +420,7 @@ public class JtlResolver {
|
||||||
totalLineList.sort(Comparator.comparing(t0 -> Long.valueOf(t0.getTimestamp())));
|
totalLineList.sort(Comparator.comparing(t0 -> Long.valueOf(t0.getTimestamp())));
|
||||||
|
|
||||||
String startTimeStamp = totalLineList.get(0).getTimestamp();
|
String startTimeStamp = totalLineList.get(0).getTimestamp();
|
||||||
String endTimeStamp = totalLineList.get(totalLineList.size()-1).getTimestamp();
|
String endTimeStamp = totalLineList.get(totalLineList.size() - 1).getTimestamp();
|
||||||
|
|
||||||
DateTimeFormatter dtf = DateTimeFormatter.ofPattern("yyyy/MM/dd HH:mm:ss");
|
DateTimeFormatter dtf = DateTimeFormatter.ofPattern("yyyy/MM/dd HH:mm:ss");
|
||||||
String startTime = dtf.format(LocalDateTime.ofInstant(Instant.ofEpochMilli(Long.parseLong(startTimeStamp)), ZoneId.systemDefault()));
|
String startTime = dtf.format(LocalDateTime.ofInstant(Instant.ofEpochMilli(Long.parseLong(startTimeStamp)), ZoneId.systemDefault()));
|
||||||
|
@ -426,9 +428,14 @@ public class JtlResolver {
|
||||||
reportTimeInfo.setStartTime(startTime);
|
reportTimeInfo.setStartTime(startTime);
|
||||||
reportTimeInfo.setEndTime(endTime);
|
reportTimeInfo.setEndTime(endTime);
|
||||||
|
|
||||||
// todo 时间问题
|
|
||||||
long seconds = Duration.between(Instant.ofEpochMilli(Long.parseLong(startTimeStamp)), Instant.ofEpochMilli(Long.parseLong(endTimeStamp))).getSeconds();
|
long seconds = Duration.between(Instant.ofEpochMilli(Long.parseLong(startTimeStamp)), Instant.ofEpochMilli(Long.parseLong(endTimeStamp))).getSeconds();
|
||||||
reportTimeInfo.setDuration(String.valueOf(seconds));
|
String duration;
|
||||||
|
if (seconds / 60 == 0) {
|
||||||
|
duration = String.valueOf(1);
|
||||||
|
} else {
|
||||||
|
duration = String.valueOf(seconds / 60);
|
||||||
|
}
|
||||||
|
reportTimeInfo.setDuration(duration);
|
||||||
|
|
||||||
return reportTimeInfo;
|
return reportTimeInfo;
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,6 +8,7 @@ import io.metersphere.base.mapper.ext.ExtOrganizationMapper;
|
||||||
import io.metersphere.base.mapper.ext.ExtUserRoleMapper;
|
import io.metersphere.base.mapper.ext.ExtUserRoleMapper;
|
||||||
import io.metersphere.commons.constants.RoleConstants;
|
import io.metersphere.commons.constants.RoleConstants;
|
||||||
import io.metersphere.commons.exception.MSException;
|
import io.metersphere.commons.exception.MSException;
|
||||||
|
import io.metersphere.controller.request.OrganizationRequest;
|
||||||
import io.metersphere.dto.OrganizationMemberDTO;
|
import io.metersphere.dto.OrganizationMemberDTO;
|
||||||
import io.metersphere.dto.UserRoleHelpDTO;
|
import io.metersphere.dto.UserRoleHelpDTO;
|
||||||
import io.metersphere.i18n.Translator;
|
import io.metersphere.i18n.Translator;
|
||||||
|
@ -48,8 +49,13 @@ public class OrganizationService {
|
||||||
return organization;
|
return organization;
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<Organization> getOrganizationList() {
|
public List<Organization> getOrganizationList(OrganizationRequest request) {
|
||||||
return organizationMapper.selectByExample(null);
|
OrganizationExample example = new OrganizationExample();
|
||||||
|
OrganizationExample.Criteria criteria = example.createCriteria();
|
||||||
|
if (StringUtils.isNotBlank(request.getName())) {
|
||||||
|
criteria.andNameLike(StringUtils.wrapIfMissing(request.getName(), "%"));
|
||||||
|
}
|
||||||
|
return organizationMapper.selectByExample(example);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void deleteOrganization(String organizationId) {
|
public void deleteOrganization(String organizationId) {
|
||||||
|
@ -57,6 +63,7 @@ public class OrganizationService {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void updateOrganization(Organization organization) {
|
public void updateOrganization(Organization organization) {
|
||||||
|
organization.setCreateTime(null);
|
||||||
organization.setUpdateTime(System.currentTimeMillis());
|
organization.setUpdateTime(System.currentTimeMillis());
|
||||||
organizationMapper.updateByPrimaryKeySelective(organization);
|
organizationMapper.updateByPrimaryKeySelective(organization);
|
||||||
}
|
}
|
||||||
|
|
|
@ -47,6 +47,9 @@ public class ProjectService {
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<ProjectDTO> getProjectList(ProjectRequest request) {
|
public List<ProjectDTO> getProjectList(ProjectRequest request) {
|
||||||
|
if (StringUtils.isNotBlank(request.getName())) {
|
||||||
|
request.setName(StringUtils.wrapIfMissing(request.getName(), "%"));
|
||||||
|
}
|
||||||
return extProjectMapper.getProjectWithWorkspace(request);
|
return extProjectMapper.getProjectWithWorkspace(request);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -77,13 +77,16 @@ public class WorkspaceService {
|
||||||
criteria.andOrganizationIdEqualTo(request.getOrganizationId());
|
criteria.andOrganizationIdEqualTo(request.getOrganizationId());
|
||||||
}
|
}
|
||||||
if (StringUtils.isNotBlank(request.getName())) {
|
if (StringUtils.isNotBlank(request.getName())) {
|
||||||
criteria.andNameLike(request.getName());
|
criteria.andNameLike(StringUtils.wrapIfMissing(request.getName(), "%"));
|
||||||
}
|
}
|
||||||
return workspaceMapper.selectByExample(example);
|
return workspaceMapper.selectByExample(example);
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<WorkspaceDTO> getAllWorkspaceList() {
|
public List<WorkspaceDTO> getAllWorkspaceList(WorkspaceRequest request) {
|
||||||
return extWorkspaceMapper.getWorkspaceWithOrg();
|
if (StringUtils.isNotBlank(request.getName())) {
|
||||||
|
request.setName(StringUtils.wrapIfMissing(request.getName(), "%"));
|
||||||
|
}
|
||||||
|
return extWorkspaceMapper.getWorkspaceWithOrg(request);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void deleteWorkspace(String workspaceId) {
|
public void deleteWorkspace(String workspaceId) {
|
||||||
|
@ -225,6 +228,7 @@ public class WorkspaceService {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void updateWorkspacebyAdmin(Workspace workspace) {
|
public void updateWorkspacebyAdmin(Workspace workspace) {
|
||||||
|
workspace.setCreateTime(null);
|
||||||
workspace.setUpdateTime(System.currentTimeMillis());
|
workspace.setUpdateTime(System.currentTimeMillis());
|
||||||
workspaceMapper.updateByPrimaryKeySelective(workspace);
|
workspaceMapper.updateByPrimaryKeySelective(workspace);
|
||||||
}
|
}
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="8">
|
<el-col :span="8">
|
||||||
<span class="ms-report-time-desc">
|
<span class="ms-report-time-desc">
|
||||||
持续时间: {{minutes}} 分钟 {{seconds}} 秒
|
持续时间: {{minutes}} 分钟
|
||||||
</span>
|
</span>
|
||||||
<span class="ms-report-time-desc">
|
<span class="ms-report-time-desc">
|
||||||
开始时间: {{startTime}}
|
开始时间: {{startTime}}
|
||||||
|
@ -79,7 +79,6 @@
|
||||||
startTime: '0',
|
startTime: '0',
|
||||||
endTime: '0',
|
endTime: '0',
|
||||||
minutes: '0',
|
minutes: '0',
|
||||||
seconds: '0'
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
@ -102,9 +101,7 @@
|
||||||
if(data){
|
if(data){
|
||||||
this.startTime = data.startTime;
|
this.startTime = data.startTime;
|
||||||
this.endTime = data.endTime;
|
this.endTime = data.endTime;
|
||||||
let duration = data.duration;
|
this.minutes = data.duration;
|
||||||
this.minutes = Math.floor(duration / 60);
|
|
||||||
this.seconds = duration % 60;
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
@ -147,7 +144,7 @@
|
||||||
if(data){
|
if(data){
|
||||||
this.startTime = data.startTime;
|
this.startTime = data.startTime;
|
||||||
this.endTime = data.endTime;
|
this.endTime = data.endTime;
|
||||||
this.duration = data.duration;
|
this.minutes = data.duration;
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
window.location.reload();
|
window.location.reload();
|
||||||
|
|
|
@ -192,6 +192,7 @@
|
||||||
font-size: 20px;
|
font-size: 20px;
|
||||||
color: #8492a6;
|
color: #8492a6;
|
||||||
display: block;
|
display: block;
|
||||||
|
text-align: center;
|
||||||
margin-bottom: 8px;
|
margin-bottom: 8px;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
@ -59,10 +59,10 @@
|
||||||
|
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<chart ref="chart1" :options="loadOption" :autoresize="true"></chart>
|
<chart ref="chart1" :options="loadOption" class="chart-config" :autoresize="true"></chart>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<chart ref="chart2" :options="resOption" :autoresize="true"></chart>
|
<chart ref="chart2" :options="resOption" class="chart-config" :autoresize="true"></chart>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
</div>
|
</div>
|
||||||
|
@ -276,4 +276,8 @@
|
||||||
border-left-width: 3px;
|
border-left-width: 3px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.chart-config {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
|
|
|
@ -11,6 +11,7 @@
|
||||||
<span class="search">
|
<span class="search">
|
||||||
<el-input type="text" size="small" :placeholder="$t('project.search_by_name')"
|
<el-input type="text" size="small" :placeholder="$t('project.search_by_name')"
|
||||||
prefix-icon="el-icon-search"
|
prefix-icon="el-icon-search"
|
||||||
|
@change="search"
|
||||||
maxlength="60" v-model="condition" clearable/>
|
maxlength="60" v-model="condition" clearable/>
|
||||||
</span>
|
</span>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
@ -56,7 +57,9 @@
|
||||||
</el-form>
|
</el-form>
|
||||||
<template v-slot:footer>
|
<template v-slot:footer>
|
||||||
<div class="dialog-footer">
|
<div class="dialog-footer">
|
||||||
<el-button type="primary" @click="submit('form')" size="medium">{{$t('commons.save')}}</el-button>
|
<el-button type="primary" onkeydown="return false;" @click="submit('form')" size="medium">
|
||||||
|
{{$t('commons.save')}}
|
||||||
|
</el-button>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
@ -101,7 +104,7 @@
|
||||||
if (this.$route.path.split('/')[2] === 'project' &&
|
if (this.$route.path.split('/')[2] === 'project' &&
|
||||||
this.$route.path.split('/')[3] === 'create') {
|
this.$route.path.split('/')[3] === 'create') {
|
||||||
this.create();
|
this.create();
|
||||||
this.$router.push( '/' + this.beaseUrl + '/project/all');
|
this.$router.push('/' + this.beaseUrl + '/project/all');
|
||||||
}
|
}
|
||||||
this.list();
|
this.list();
|
||||||
},
|
},
|
||||||
|
@ -172,9 +175,12 @@
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
search() {
|
||||||
|
this.list();
|
||||||
|
},
|
||||||
list() {
|
list() {
|
||||||
let url = "/project/list/" + this.currentPage + '/' + this.pageSize;
|
let url = "/project/list/" + this.currentPage + '/' + this.pageSize;
|
||||||
this.result = this.$post(url, {}, (response) => {
|
this.result = this.$post(url, {name: this.condition}, (response) => {
|
||||||
let data = response.data;
|
let data = response.data;
|
||||||
this.items = data.listObject;
|
this.items = data.listObject;
|
||||||
this.total = data.itemCount;
|
this.total = data.itemCount;
|
||||||
|
|
|
@ -28,8 +28,8 @@
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column>
|
<el-table-column>
|
||||||
<template v-slot:default="scope">
|
<template v-slot:default="scope">
|
||||||
<el-button @click="edit(scope.row)" type="primary" icon="el-icon-edit" size="mini" circle/>
|
<el-button @click="edit(scope.row)" onkeydown="return false;" type="primary" icon="el-icon-edit" size="mini" circle/>
|
||||||
<el-button @click="del(scope.row)" type="danger" icon="el-icon-delete" size="mini" circle/>
|
<el-button @click="del(scope.row)" onkeydown="return false;" type="danger" icon="el-icon-delete" size="mini" circle/>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
|
@ -79,7 +79,8 @@
|
||||||
</el-form>
|
</el-form>
|
||||||
<template v-slot:footer>
|
<template v-slot:footer>
|
||||||
<span class="dialog-footer">
|
<span class="dialog-footer">
|
||||||
<el-button type="primary" @click="submitForm('form')" size="medium">{{$t('commons.save')}}</el-button>
|
<el-button type="primary" onkeydown="return false;"
|
||||||
|
@click="submitForm('form')" size="medium">{{$t('commons.save')}}</el-button>
|
||||||
</span>
|
</span>
|
||||||
</template>
|
</template>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
@ -111,7 +112,8 @@
|
||||||
</el-form>
|
</el-form>
|
||||||
<template v-slot:footer>
|
<template v-slot:footer>
|
||||||
<span class="dialog-footer">
|
<span class="dialog-footer">
|
||||||
<el-button type="primary" @click="updateOrgMember('updateUserForm')" size="medium">{{$t('commons.save')}}</el-button>
|
<el-button type="primary" onkeydown="return false;"
|
||||||
|
@click="updateOrgMember('updateUserForm')" size="medium">{{$t('commons.save')}}</el-button>
|
||||||
</span>
|
</span>
|
||||||
</template>
|
</template>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
</span>
|
</span>
|
||||||
<span class="search">
|
<span class="search">
|
||||||
<el-input type="text" size="small" :placeholder="$t('workspace.search_by_name')"
|
<el-input type="text" size="small" :placeholder="$t('workspace.search_by_name')"
|
||||||
prefix-icon="el-icon-search"
|
prefix-icon="el-icon-search" @change="search"
|
||||||
maxlength="60" v-model="condition" clearable/>
|
maxlength="60" v-model="condition" clearable/>
|
||||||
</span>
|
</span>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
@ -20,13 +20,16 @@
|
||||||
<el-table-column prop="description" :label="$t('commons.description')"/>
|
<el-table-column prop="description" :label="$t('commons.description')"/>
|
||||||
<el-table-column :label="$t('commons.member')">
|
<el-table-column :label="$t('commons.member')">
|
||||||
<template v-slot:default="scope">
|
<template v-slot:default="scope">
|
||||||
<el-button type="text" class="member-size" @click="cellClick(scope.row)">{{scope.row.memberSize}}</el-button>
|
<el-button type="text" class="member-size" @click="cellClick(scope.row)">{{scope.row.memberSize}}
|
||||||
|
</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column>
|
<el-table-column>
|
||||||
<template v-slot:default="scope">
|
<template v-slot:default="scope">
|
||||||
<el-button @click="edit(scope.row)" type="primary" icon="el-icon-edit" size="mini" circle/>
|
<el-button @click="edit(scope.row)" onkeydown="return false;" type="primary" icon="el-icon-edit" size="mini"
|
||||||
<el-button @click="del(scope.row)" type="danger" icon="el-icon-delete" size="mini" circle/>
|
circle/>
|
||||||
|
<el-button @click="del(scope.row)" onkeydown="return false;" type="danger" icon="el-icon-delete" size="mini"
|
||||||
|
circle/>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
|
@ -60,7 +63,8 @@
|
||||||
</el-form>
|
</el-form>
|
||||||
<template v-slot:footer>
|
<template v-slot:footer>
|
||||||
<span class="dialog-footer">
|
<span class="dialog-footer">
|
||||||
<el-button type="primary" @click="submit('form')" size="medium">{{$t('commons.save')}}</el-button>
|
<el-button type="primary" onkeydown="return false;"
|
||||||
|
@click="submit('form')" size="medium">{{$t('commons.save')}}</el-button>
|
||||||
</span>
|
</span>
|
||||||
</template>
|
</template>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
@ -92,8 +96,10 @@
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column :label="$t('commons.operating')">
|
<el-table-column :label="$t('commons.operating')">
|
||||||
<template v-slot:default="scope">
|
<template v-slot:default="scope">
|
||||||
<el-button @click="editMember(scope.row)" type="primary" icon="el-icon-edit" size="mini" circle/>
|
<el-button @click="editMember(scope.row)" onkeydown="return false;" type="primary" icon="el-icon-edit"
|
||||||
<el-button @click="delMember(scope.row)" type="danger" icon="el-icon-delete" size="mini" circle/>
|
size="mini" circle/>
|
||||||
|
<el-button @click="delMember(scope.row)" onkeydown="return false;" type="danger" icon="el-icon-delete"
|
||||||
|
size="mini" circle/>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
|
@ -117,10 +123,13 @@
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
|
||||||
<!-- add workspace member dialog -->
|
<!-- add workspace member dialog -->
|
||||||
<el-dialog :title="$t('member.create')" :visible.sync="addMemberVisible" width="30%" :destroy-on-close="true" @close="closeFunc">
|
<el-dialog :title="$t('member.create')" :visible.sync="addMemberVisible" width="30%" :destroy-on-close="true"
|
||||||
<el-form :model="memberForm" ref="form" :rules="wsMemberRule" label-position="right" label-width="100px" size="small">
|
@close="closeFunc">
|
||||||
|
<el-form :model="memberForm" ref="form" :rules="wsMemberRule" label-position="right" label-width="100px"
|
||||||
|
size="small">
|
||||||
<el-form-item :label="$t('commons.member')" prop="userIds">
|
<el-form-item :label="$t('commons.member')" prop="userIds">
|
||||||
<el-select v-model="memberForm.userIds" multiple :placeholder="$t('member.please_choose_member')" class="select-width">
|
<el-select v-model="memberForm.userIds" multiple :placeholder="$t('member.please_choose_member')"
|
||||||
|
class="select-width">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in memberForm.userList"
|
v-for="item in memberForm.userList"
|
||||||
:key="item.id"
|
:key="item.id"
|
||||||
|
@ -132,7 +141,8 @@
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item :label="$t('commons.role')" prop="roleIds">
|
<el-form-item :label="$t('commons.role')" prop="roleIds">
|
||||||
<el-select v-model="memberForm.roleIds" multiple :placeholder="$t('role.please_choose_role')" class="select-width">
|
<el-select v-model="memberForm.roleIds" multiple :placeholder="$t('role.please_choose_role')"
|
||||||
|
class="select-width">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in memberForm.roles"
|
v-for="item in memberForm.roles"
|
||||||
:key="item.id"
|
:key="item.id"
|
||||||
|
@ -144,13 +154,15 @@
|
||||||
</el-form>
|
</el-form>
|
||||||
<template v-slot:footer>
|
<template v-slot:footer>
|
||||||
<span class="dialog-footer">
|
<span class="dialog-footer">
|
||||||
<el-button type="primary" @click="submitForm('form')" size="medium">{{$t('commons.save')}}</el-button>
|
<el-button type="primary" onkeydown="return false;"
|
||||||
|
@click="submitForm('form')" size="medium">{{$t('commons.save')}}</el-button>
|
||||||
</span>
|
</span>
|
||||||
</template>
|
</template>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
|
||||||
<!-- update workspace member dialog -->
|
<!-- update workspace member dialog -->
|
||||||
<el-dialog :title="$t('member.modify')" :visible.sync="updateMemberVisible" width="30%" :destroy-on-close="true" @close="closeFunc">
|
<el-dialog :title="$t('member.modify')" :visible.sync="updateMemberVisible" width="30%" :destroy-on-close="true"
|
||||||
|
@close="closeFunc">
|
||||||
<el-form :model="memberForm" label-position="right" label-width="100px" size="small" ref="updateUserForm">
|
<el-form :model="memberForm" label-position="right" label-width="100px" size="small" ref="updateUserForm">
|
||||||
<el-form-item label="ID" prop="id">
|
<el-form-item label="ID" prop="id">
|
||||||
<el-input v-model="memberForm.id" autocomplete="off" :disabled="true"/>
|
<el-input v-model="memberForm.id" autocomplete="off" :disabled="true"/>
|
||||||
|
@ -165,7 +177,8 @@
|
||||||
<el-input v-model="memberForm.phone" autocomplete="off"/>
|
<el-input v-model="memberForm.phone" autocomplete="off"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item :label="$t('commons.role')" prop="roleIds">
|
<el-form-item :label="$t('commons.role')" prop="roleIds">
|
||||||
<el-select v-model="memberForm.roleIds" multiple :placeholder="$t('role.please_choose_role')" class="select-width">
|
<el-select v-model="memberForm.roleIds" multiple :placeholder="$t('role.please_choose_role')"
|
||||||
|
class="select-width">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in memberForm.allroles"
|
v-for="item in memberForm.allroles"
|
||||||
:key="item.id"
|
:key="item.id"
|
||||||
|
@ -177,7 +190,8 @@
|
||||||
</el-form>
|
</el-form>
|
||||||
<template v-slot:footer>
|
<template v-slot:footer>
|
||||||
<span class="dialog-footer">
|
<span class="dialog-footer">
|
||||||
<el-button type="primary" @click="updateOrgMember('updateUserForm')" size="medium">{{$t('commons.save')}}</el-button>
|
<el-button type="primary" onkeydown="return false;"
|
||||||
|
@click="updateOrgMember('updateUserForm')" size="medium">{{$t('commons.save')}}</el-button>
|
||||||
</span>
|
</span>
|
||||||
</template>
|
</template>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
@ -250,6 +264,9 @@
|
||||||
|
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
search() {
|
||||||
|
this.list();
|
||||||
|
},
|
||||||
list() {
|
list() {
|
||||||
let url = '/workspace/list/' + this.currentPage + '/' + this.pageSize;
|
let url = '/workspace/list/' + this.currentPage + '/' + this.pageSize;
|
||||||
let lastOrganizationId = this.currentUser.lastOrganizationId;
|
let lastOrganizationId = this.currentUser.lastOrganizationId;
|
||||||
|
@ -297,7 +314,7 @@
|
||||||
this.$set(this.memberForm, "roles", response.data);
|
this.$set(this.memberForm, "roles", response.data);
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
cellClick(row){
|
cellClick(row) {
|
||||||
// 保存当前点击的组织信息到currentRow
|
// 保存当前点击的组织信息到currentRow
|
||||||
this.currentWorkspaceRow = row;
|
this.currentWorkspaceRow = row;
|
||||||
this.memberVisible = true;
|
this.memberVisible = true;
|
||||||
|
@ -343,7 +360,7 @@
|
||||||
roleIds: this.memberForm.roleIds,
|
roleIds: this.memberForm.roleIds,
|
||||||
workspaceId: this.currentWorkspaceRow.id
|
workspaceId: this.currentWorkspaceRow.id
|
||||||
};
|
};
|
||||||
this.result = this.$post("user/ws/member/add", param,() => {
|
this.result = this.$post("user/ws/member/add", param, () => {
|
||||||
this.cellClick(this.currentWorkspaceRow);
|
this.cellClick(this.currentWorkspaceRow);
|
||||||
this.addMemberVisible = false;
|
this.addMemberVisible = false;
|
||||||
})
|
})
|
||||||
|
@ -391,7 +408,7 @@
|
||||||
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.result = this.$post("/workspace/member/update", param, () => {
|
||||||
this.$message({
|
this.$message({
|
||||||
type: 'success',
|
type: 'success',
|
||||||
message: this.$t('commons.modify_success')
|
message: this.$t('commons.modify_success')
|
||||||
|
@ -469,8 +486,8 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
.member-size {
|
.member-size {
|
||||||
text-decoration:underline;
|
text-decoration: underline;
|
||||||
cursor:pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
|
||||||
.member-title {
|
.member-title {
|
||||||
|
|
|
@ -44,7 +44,8 @@
|
||||||
</el-form>
|
</el-form>
|
||||||
<template v-slot:footer>
|
<template v-slot:footer>
|
||||||
<span class="dialog-footer">
|
<span class="dialog-footer">
|
||||||
<el-button type="primary" @click="updateUser('updateUserForm')" size="medium">{{$t('commons.save')}}</el-button>
|
<el-button type="primary" onkeydown="return false;"
|
||||||
|
@click="updateUser('updateUserForm')" size="medium">{{$t('commons.save')}}</el-button>
|
||||||
</span>
|
</span>
|
||||||
</template>
|
</template>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
|
|
@ -9,7 +9,8 @@
|
||||||
<ms-create-box :tips="btnTips" :exec="create"/>
|
<ms-create-box :tips="btnTips" :exec="create"/>
|
||||||
</span>
|
</span>
|
||||||
<span class="search">
|
<span class="search">
|
||||||
<el-input type="text" size="small" :placeholder="$t('organization.search_by_name')" prefix-icon="el-icon-search"
|
<el-input type="text" size="small" :placeholder="$t('organization.search_by_name')"
|
||||||
|
prefix-icon="el-icon-search" @change="search"
|
||||||
maxlength="60" v-model="condition" clearable/>
|
maxlength="60" v-model="condition" clearable/>
|
||||||
</span>
|
</span>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
@ -22,13 +23,14 @@
|
||||||
<el-table-column prop="description" :label="$t('commons.description')"/>
|
<el-table-column prop="description" :label="$t('commons.description')"/>
|
||||||
<el-table-column :label="$t('commons.member')">
|
<el-table-column :label="$t('commons.member')">
|
||||||
<template v-slot:default="scope">
|
<template v-slot:default="scope">
|
||||||
<el-button type="text" class="member-size" @click="cellClick(scope.row)">{{scope.row.memberSize}}</el-button>
|
<el-button type="text" class="member-size" @click="cellClick(scope.row)">{{scope.row.memberSize}}
|
||||||
|
</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column :label="$t('commons.operating')">
|
<el-table-column :label="$t('commons.operating')">
|
||||||
<template v-slot:default="scope">
|
<template v-slot:default="scope">
|
||||||
<el-button @click="edit(scope.row)" type="primary" icon="el-icon-edit" size="mini" circle/>
|
<el-button @click="edit(scope.row)" onkeydown="return false;" type="primary" icon="el-icon-edit" size="mini" circle/>
|
||||||
<el-button @click="del(scope.row)" type="danger" icon="el-icon-delete" size="mini" circle/>
|
<el-button @click="del(scope.row)" onkeydown="return false;" type="danger" icon="el-icon-delete" size="mini" circle/>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
|
@ -77,8 +79,8 @@
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column :label="$t('commons.operating')">
|
<el-table-column :label="$t('commons.operating')">
|
||||||
<template v-slot:default="scope">
|
<template v-slot:default="scope">
|
||||||
<el-button @click="editMember(scope.row)" type="primary" icon="el-icon-edit" size="mini" circle/>
|
<el-button @click="editMember(scope.row)" onkeydown="return false;" type="primary" icon="el-icon-edit" size="mini" circle/>
|
||||||
<el-button @click="delMember(scope.row)" type="danger" icon="el-icon-delete" size="mini" circle/>
|
<el-button @click="delMember(scope.row)" onkeydown="return false;" type="danger" icon="el-icon-delete" size="mini" circle/>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
|
@ -102,8 +104,10 @@
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
|
||||||
<!-- add organization form -->
|
<!-- add organization form -->
|
||||||
<el-dialog :title="$t('organization.create')" :visible.sync="createVisible" width="30%" @closed="closeFunc" :destroy-on-close="true">
|
<el-dialog :title="$t('organization.create')" :visible.sync="createVisible" width="30%" @closed="closeFunc"
|
||||||
<el-form :model="form" label-position="right" label-width="100px" size="small" :rules="rule" ref="createOrganization">
|
:destroy-on-close="true">
|
||||||
|
<el-form :model="form" label-position="right" label-width="100px" size="small" :rules="rule"
|
||||||
|
ref="createOrganization">
|
||||||
<el-form-item :label="$t('commons.name')" prop="name">
|
<el-form-item :label="$t('commons.name')" prop="name">
|
||||||
<el-input v-model="form.name" autocomplete="off"/>
|
<el-input v-model="form.name" autocomplete="off"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
@ -113,14 +117,17 @@
|
||||||
</el-form>
|
</el-form>
|
||||||
<template v-slot:footer>
|
<template v-slot:footer>
|
||||||
<span class="dialog-footer">
|
<span class="dialog-footer">
|
||||||
<el-button type="primary" @click="createOrganization('createOrganization')" size="medium">{{$t('commons.save')}}</el-button>
|
<el-button type="primary" onkeydown="return false;"
|
||||||
|
@click="createOrganization('createOrganization')" size="medium">{{$t('commons.save')}}</el-button>
|
||||||
</span>
|
</span>
|
||||||
</template>
|
</template>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
|
||||||
<!-- update organization form -->
|
<!-- update organization form -->
|
||||||
<el-dialog :title="$t('organization.modify')" :visible.sync="updateVisible" width="30%" :destroy-on-close="true" @close="closeFunc">
|
<el-dialog :title="$t('organization.modify')" :visible.sync="updateVisible" width="30%" :destroy-on-close="true"
|
||||||
<el-form :model="form" label-position="right" label-width="100px" size="small" :rules="rule" ref="updateOrganizationForm">
|
@close="closeFunc">
|
||||||
|
<el-form :model="form" label-position="right" label-width="100px" size="small" :rules="rule"
|
||||||
|
ref="updateOrganizationForm">
|
||||||
<el-form-item :label="$t('commons.name')" prop="name">
|
<el-form-item :label="$t('commons.name')" prop="name">
|
||||||
<el-input v-model="form.name" autocomplete="off"/>
|
<el-input v-model="form.name" autocomplete="off"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
@ -130,16 +137,20 @@
|
||||||
</el-form>
|
</el-form>
|
||||||
<template v-slot:footer>
|
<template v-slot:footer>
|
||||||
<span class="dialog-footer">
|
<span class="dialog-footer">
|
||||||
<el-button type="primary" @click="updateOrganization('updateOrganizationForm')" size="medium">{{$t('organization.modify')}}</el-button>
|
<el-button type="primary" onkeydown="return false;"
|
||||||
|
@click="updateOrganization('updateOrganizationForm')" size="medium">{{$t('organization.modify')}}</el-button>
|
||||||
</span>
|
</span>
|
||||||
</template>
|
</template>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
|
||||||
<!-- add organization member form -->
|
<!-- add organization member form -->
|
||||||
<el-dialog :title="$t('member.create')" :visible.sync="addMemberVisible" width="30%" :destroy-on-close="true" @close="closeFunc">
|
<el-dialog :title="$t('member.create')" :visible.sync="addMemberVisible" width="30%" :destroy-on-close="true"
|
||||||
<el-form :model="memberForm" ref="form" :rules="orgMemberRule" label-position="right" label-width="100px" size="small">
|
@close="closeFunc">
|
||||||
|
<el-form :model="memberForm" ref="form" :rules="orgMemberRule" label-position="right" label-width="100px"
|
||||||
|
size="small">
|
||||||
<el-form-item :label="$t('commons.member')" prop="userIds">
|
<el-form-item :label="$t('commons.member')" prop="userIds">
|
||||||
<el-select v-model="memberForm.userIds" multiple :placeholder="$t('member.please_choose_member')" class="select-width">
|
<el-select v-model="memberForm.userIds" multiple :placeholder="$t('member.please_choose_member')"
|
||||||
|
class="select-width">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in memberForm.userList"
|
v-for="item in memberForm.userList"
|
||||||
:key="item.id"
|
:key="item.id"
|
||||||
|
@ -151,7 +162,8 @@
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item :label="$t('commons.role')" prop="roleIds">
|
<el-form-item :label="$t('commons.role')" prop="roleIds">
|
||||||
<el-select v-model="memberForm.roleIds" multiple :placeholder="$t('role.please_choose_role')" class="select-width">
|
<el-select v-model="memberForm.roleIds" multiple :placeholder="$t('role.please_choose_role')"
|
||||||
|
class="select-width">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in memberForm.roles"
|
v-for="item in memberForm.roles"
|
||||||
:key="item.id"
|
:key="item.id"
|
||||||
|
@ -163,13 +175,15 @@
|
||||||
</el-form>
|
</el-form>
|
||||||
<template v-slot:footer>
|
<template v-slot:footer>
|
||||||
<span class="dialog-footer">
|
<span class="dialog-footer">
|
||||||
<el-button type="primary" @click="submitForm('form')" size="medium">{{$t('commons.save')}}</el-button>
|
<el-button type="primary" onkeydown="return false;"
|
||||||
|
@click="submitForm('form')" size="medium">{{$t('commons.save')}}</el-button>
|
||||||
</span>
|
</span>
|
||||||
</template>
|
</template>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
|
||||||
<!-- update organization member form -->
|
<!-- update organization member form -->
|
||||||
<el-dialog :title="$t('member.modify')" :visible.sync="updateMemberVisible" width="30%" :destroy-on-close="true" @close="closeFunc">
|
<el-dialog :title="$t('member.modify')" :visible.sync="updateMemberVisible" width="30%" :destroy-on-close="true"
|
||||||
|
@close="closeFunc">
|
||||||
<el-form :model="memberForm" label-position="right" label-width="100px" size="small" ref="updateUserForm">
|
<el-form :model="memberForm" label-position="right" label-width="100px" size="small" ref="updateUserForm">
|
||||||
<el-form-item label="ID" prop="id">
|
<el-form-item label="ID" prop="id">
|
||||||
<el-input v-model="memberForm.id" autocomplete="off" :disabled="true"/>
|
<el-input v-model="memberForm.id" autocomplete="off" :disabled="true"/>
|
||||||
|
@ -184,7 +198,8 @@
|
||||||
<el-input v-model="memberForm.phone" autocomplete="off"/>
|
<el-input v-model="memberForm.phone" autocomplete="off"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item :label="$t('commons.role')" prop="roleIds">
|
<el-form-item :label="$t('commons.role')" prop="roleIds">
|
||||||
<el-select v-model="memberForm.roleIds" multiple :placeholder="$t('role.please_choose_role')" class="select-width">
|
<el-select v-model="memberForm.roleIds" multiple :placeholder="$t('role.please_choose_role')"
|
||||||
|
class="select-width">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in memberForm.allroles"
|
v-for="item in memberForm.allroles"
|
||||||
:key="item.id"
|
:key="item.id"
|
||||||
|
@ -196,7 +211,8 @@
|
||||||
</el-form>
|
</el-form>
|
||||||
<template v-slot:footer>
|
<template v-slot:footer>
|
||||||
<span class="dialog-footer">
|
<span class="dialog-footer">
|
||||||
<el-button type="primary" @click="updateOrgMember('updateUserForm')" size="medium">{{$t('commons.save')}}</el-button>
|
<el-button type="primary" onkeydown="return false;"
|
||||||
|
@click="updateOrgMember('updateUserForm')" size="medium">{{$t('commons.save')}}</el-button>
|
||||||
</span>
|
</span>
|
||||||
</template>
|
</template>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
@ -239,7 +255,7 @@
|
||||||
rule: {
|
rule: {
|
||||||
name: [
|
name: [
|
||||||
{required: true, message: this.$t('organization.input_name'), trigger: 'blur'},
|
{required: true, message: this.$t('organization.input_name'), trigger: 'blur'},
|
||||||
{ min: 2, max: 10, message: this.$t('commons.input_limit', [2, 50]), trigger: 'blur' },
|
{min: 2, max: 10, message: this.$t('commons.input_limit', [2, 50]), trigger: 'blur'},
|
||||||
{
|
{
|
||||||
required: true,
|
required: true,
|
||||||
pattern: /^[\u4e00-\u9fa5_a-zA-Z0-9.·-]+$/,
|
pattern: /^[\u4e00-\u9fa5_a-zA-Z0-9.·-]+$/,
|
||||||
|
@ -248,7 +264,7 @@
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
description: [
|
description: [
|
||||||
{ max: 50, message: this.$t('commons.input_limit', [0, 50]), trigger: 'blur'}
|
{max: 50, message: this.$t('commons.input_limit', [0, 50]), trigger: 'blur'}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
orgMemberRule: {
|
orgMemberRule: {
|
||||||
|
@ -292,7 +308,7 @@
|
||||||
// 编辑时填充角色信息
|
// 编辑时填充角色信息
|
||||||
this.$set(this.memberForm, 'roleIds', roleIds);
|
this.$set(this.memberForm, 'roleIds', roleIds);
|
||||||
},
|
},
|
||||||
cellClick(row){
|
cellClick(row) {
|
||||||
// 保存当前点击的组织信息到currentRow
|
// 保存当前点击的组织信息到currentRow
|
||||||
this.currentRow = row;
|
this.currentRow = row;
|
||||||
this.memberVisible = true;
|
this.memberVisible = true;
|
||||||
|
@ -320,7 +336,7 @@
|
||||||
cancelButtonText: this.$t('commons.cancel'),
|
cancelButtonText: this.$t('commons.cancel'),
|
||||||
type: 'warning'
|
type: 'warning'
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
this.result = this.$get(this.deletePath + row.id,() => {
|
this.result = this.$get(this.deletePath + row.id, () => {
|
||||||
this.$message({
|
this.$message({
|
||||||
type: 'success',
|
type: 'success',
|
||||||
message: this.$t('commons.delete_success')
|
message: this.$t('commons.delete_success')
|
||||||
|
@ -355,9 +371,9 @@
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
createOrganization(createOrganizationForm) {
|
createOrganization(createOrganizationForm) {
|
||||||
this.$refs[createOrganizationForm].validate( valide => {
|
this.$refs[createOrganizationForm].validate(valide => {
|
||||||
if (valide) {
|
if (valide) {
|
||||||
this.result = this.$post(this.createPath, this.form,() => {
|
this.result = this.$post(this.createPath, this.form, () => {
|
||||||
this.$message({
|
this.$message({
|
||||||
type: 'success',
|
type: 'success',
|
||||||
message: this.$t('commons.save_success')
|
message: this.$t('commons.save_success')
|
||||||
|
@ -373,7 +389,7 @@
|
||||||
updateOrganization(udpateOrganizationForm) {
|
updateOrganization(udpateOrganizationForm) {
|
||||||
this.$refs[udpateOrganizationForm].validate(valide => {
|
this.$refs[udpateOrganizationForm].validate(valide => {
|
||||||
if (valide) {
|
if (valide) {
|
||||||
this.result = this.$post(this.updatePath, this.form,() => {
|
this.result = this.$post(this.updatePath, this.form, () => {
|
||||||
this.$message({
|
this.$message({
|
||||||
type: 'success',
|
type: 'success',
|
||||||
message: this.$t('commons.modify_success')
|
message: this.$t('commons.modify_success')
|
||||||
|
@ -386,8 +402,14 @@
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
search() {
|
||||||
|
this.initTableData();
|
||||||
|
},
|
||||||
initTableData() {
|
initTableData() {
|
||||||
this.result = this.$post(this.buildPagePath(this.queryPath),{},response => {
|
let param = {
|
||||||
|
name: this.condition
|
||||||
|
};
|
||||||
|
this.result = this.$post(this.buildPagePath(this.queryPath), param, response => {
|
||||||
let data = response.data;
|
let data = response.data;
|
||||||
this.tableData = data.listObject;
|
this.tableData = data.listObject;
|
||||||
for (let i = 0; i < this.tableData.length; i++) {
|
for (let i = 0; i < this.tableData.length; i++) {
|
||||||
|
@ -441,7 +463,7 @@
|
||||||
roleIds: this.memberForm.roleIds,
|
roleIds: this.memberForm.roleIds,
|
||||||
organizationId: this.currentRow.id
|
organizationId: this.currentRow.id
|
||||||
};
|
};
|
||||||
this.result = this.$post("user/special/org/member/add", param,() => {
|
this.result = this.$post("user/special/org/member/add", param, () => {
|
||||||
this.cellClick(this.currentRow);
|
this.cellClick(this.currentRow);
|
||||||
this.addMemberVisible = false;
|
this.addMemberVisible = false;
|
||||||
})
|
})
|
||||||
|
@ -459,7 +481,7 @@
|
||||||
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.result = this.$post("/organization/member/update", param, () => {
|
||||||
this.$message({
|
this.$message({
|
||||||
type: 'success',
|
type: 'success',
|
||||||
message: this.$t('commons.modify_success')
|
message: this.$t('commons.modify_success')
|
||||||
|
@ -485,8 +507,8 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
.member-size {
|
.member-size {
|
||||||
text-decoration:underline;
|
text-decoration: underline;
|
||||||
cursor:pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
|
||||||
.org-member-name {
|
.org-member-name {
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
<span class="search">
|
<span class="search">
|
||||||
<el-input type="text" size="small"
|
<el-input type="text" size="small"
|
||||||
:placeholder="$t('workspace.search_by_name')"
|
:placeholder="$t('workspace.search_by_name')"
|
||||||
prefix-icon="el-icon-search"
|
prefix-icon="el-icon-search" @change="search"
|
||||||
maxlength="60" v-model="condition" clearable/>
|
maxlength="60" v-model="condition" clearable/>
|
||||||
</span>
|
</span>
|
||||||
</el-row>
|
</el-row>
|
||||||
|
@ -77,7 +77,7 @@
|
||||||
</el-form>
|
</el-form>
|
||||||
<template v-slot:footer>
|
<template v-slot:footer>
|
||||||
<span class="dialog-footer">
|
<span class="dialog-footer">
|
||||||
<el-button type="primary" @click="submit('form')" size="medium">{{$t('commons.save')}}</el-button>
|
<el-button type="primary" onkeydown="return false;" @click="submit('form')" size="medium">{{$t('commons.save')}}</el-button>
|
||||||
</span>
|
</span>
|
||||||
</template>
|
</template>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
@ -105,7 +105,7 @@
|
||||||
</el-form>
|
</el-form>
|
||||||
<template v-slot:footer>
|
<template v-slot:footer>
|
||||||
<span class="dialog-footer">
|
<span class="dialog-footer">
|
||||||
<el-button type="primary" @click="updateWorkspace('updateForm')"
|
<el-button type="primary" @click="updateWorkspace('updateForm')" onkeydown="return false;"
|
||||||
size="medium">{{$t('commons.save')}}</el-button>
|
size="medium">{{$t('commons.save')}}</el-button>
|
||||||
</span>
|
</span>
|
||||||
</template>
|
</template>
|
||||||
|
@ -139,8 +139,8 @@
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column :label="$t('commons.operating')">
|
<el-table-column :label="$t('commons.operating')">
|
||||||
<template v-slot:default="scope">
|
<template v-slot:default="scope">
|
||||||
<el-button @click="editMember(scope.row)" type="primary" icon="el-icon-edit" size="mini" circle/>
|
<el-button @click="editMember(scope.row)" onkeydown="return false;" type="primary" icon="el-icon-edit" size="mini" circle/>
|
||||||
<el-button @click="delMember(scope.row)" type="danger" icon="el-icon-delete" size="mini" circle/>
|
<el-button @click="delMember(scope.row)" onkeydown="return false;" type="danger" icon="el-icon-delete" size="mini" circle/>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
|
@ -195,7 +195,7 @@
|
||||||
</el-form>
|
</el-form>
|
||||||
<template v-slot:footer>
|
<template v-slot:footer>
|
||||||
<span class="dialog-footer">
|
<span class="dialog-footer">
|
||||||
<el-button type="primary" @click="submitForm('form')" size="medium">{{$t('commons.save')}}</el-button>
|
<el-button type="primary" onkeydown="return false;" @click="submitForm('form')" size="medium">{{$t('commons.save')}}</el-button>
|
||||||
</span>
|
</span>
|
||||||
</template>
|
</template>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
@ -230,7 +230,7 @@
|
||||||
</el-form>
|
</el-form>
|
||||||
<template v-slot:footer>
|
<template v-slot:footer>
|
||||||
<span class="dialog-footer">
|
<span class="dialog-footer">
|
||||||
<el-button type="primary" @click="updateOrgMember('updateUserForm')"
|
<el-button type="primary" @click="updateOrgMember('updateUserForm')" onkeydown="return false;"
|
||||||
size="medium">{{$t('commons.save')}}</el-button>
|
size="medium">{{$t('commons.save')}}</el-button>
|
||||||
</span>
|
</span>
|
||||||
</template>
|
</template>
|
||||||
|
@ -353,6 +353,9 @@
|
||||||
this.memberLineData = [];
|
this.memberLineData = [];
|
||||||
this.list();
|
this.list();
|
||||||
},
|
},
|
||||||
|
search() {
|
||||||
|
this.list();
|
||||||
|
},
|
||||||
list() {
|
list() {
|
||||||
let url = '/workspace/list/all/' + this.currentPage + '/' + this.pageSize;
|
let url = '/workspace/list/all/' + this.currentPage + '/' + this.pageSize;
|
||||||
this.result = this.$post(url, {name: this.condition}, response => {
|
this.result = this.$post(url, {name: this.condition}, response => {
|
||||||
|
|
|
@ -284,7 +284,6 @@
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
initTableData() {
|
initTableData() {
|
||||||
this.loading = true;
|
|
||||||
let param = {
|
let param = {
|
||||||
name: this.condition
|
name: this.condition
|
||||||
};
|
};
|
||||||
|
@ -293,7 +292,6 @@
|
||||||
let data = response.data;
|
let data = response.data;
|
||||||
this.items = data.listObject;
|
this.items = data.listObject;
|
||||||
this.total = data.itemCount;
|
this.total = data.itemCount;
|
||||||
this.loading = false;
|
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
changeResourceType() {
|
changeResourceType() {
|
||||||
|
|
|
@ -83,7 +83,8 @@
|
||||||
</el-form>
|
</el-form>
|
||||||
<template v-slot:footer>
|
<template v-slot:footer>
|
||||||
<span class="dialog-footer">
|
<span class="dialog-footer">
|
||||||
<el-button type="primary" @click="createUser('createUserForm')" size="medium">创建</el-button>
|
<el-button type="primary" onkeydown="return false;"
|
||||||
|
@click="createUser('createUserForm')" size="medium">创建</el-button>
|
||||||
</span>
|
</span>
|
||||||
</template>
|
</template>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
@ -105,7 +106,8 @@
|
||||||
</el-form>
|
</el-form>
|
||||||
<template v-slot:footer>
|
<template v-slot:footer>
|
||||||
<span class="dialog-footer">
|
<span class="dialog-footer">
|
||||||
<el-button type="primary" @click="updateUser('updateUserForm')" size="medium">{{$t('commons.save')}}</el-button>
|
<el-button type="primary" onkeydown="return false;"
|
||||||
|
@click="updateUser('updateUserForm')" size="medium">{{$t('commons.save')}}</el-button>
|
||||||
</span>
|
</span>
|
||||||
</template>
|
</template>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
|
|
@ -27,8 +27,8 @@
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column>
|
<el-table-column>
|
||||||
<template v-slot:default="scope">
|
<template v-slot:default="scope">
|
||||||
<el-button @click="edit(scope.row)" type="primary" icon="el-icon-edit" size="mini" circle v-permission="['test_manager']"/>
|
<el-button @click="edit(scope.row)" onkeydown="return false;" type="primary" icon="el-icon-edit" size="mini" circle v-permission="['test_manager']"/>
|
||||||
<el-button @click="del(scope.row)" type="danger" icon="el-icon-delete" size="mini" circle v-permission="['test_manager']"/>
|
<el-button @click="del(scope.row)" onkeydown="return false;" type="danger" icon="el-icon-delete" size="mini" circle v-permission="['test_manager']"/>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
|
@ -78,7 +78,8 @@
|
||||||
</el-form>
|
</el-form>
|
||||||
<template v-slot:footer>
|
<template v-slot:footer>
|
||||||
<span class="dialog-footer">
|
<span class="dialog-footer">
|
||||||
<el-button type="primary" @click="submitForm('form')" size="medium">{{$t('commons.save')}}</el-button>
|
<el-button type="primary" onkeydown="return false;"
|
||||||
|
@click="submitForm('form')" size="medium">{{$t('commons.save')}}</el-button>
|
||||||
</span>
|
</span>
|
||||||
</template>
|
</template>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
@ -110,7 +111,8 @@
|
||||||
</el-form>
|
</el-form>
|
||||||
<template v-slot:footer>
|
<template v-slot:footer>
|
||||||
<span class="dialog-footer">
|
<span class="dialog-footer">
|
||||||
<el-button type="primary" @click="updateWorkspaceMember('updateUserForm')" size="medium">{{$t('commons.save')}}</el-button>
|
<el-button type="primary" onkeydown="return false;"
|
||||||
|
@click="updateWorkspaceMember('updateUserForm')" size="medium">{{$t('commons.save')}}</el-button>
|
||||||
</span>
|
</span>
|
||||||
</template>
|
</template>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
|
|
@ -7,11 +7,7 @@
|
||||||
<el-row type="flex" justify="space-between" align="middle">
|
<el-row type="flex" justify="space-between" align="middle">
|
||||||
<el-col :span="5">
|
<el-col :span="5">
|
||||||
<span class="title">{{$t('test_track.test_case')}}</span>
|
<span class="title">{{$t('test_track.test_case')}}</span>
|
||||||
</el-col>
|
<ms-create-box :tips="$t('test_track.create')" :exec="testCaseCreate"/>
|
||||||
|
|
||||||
<el-col :span="2" :offset="10">
|
|
||||||
<el-button icon="el-icon-circle-plus-outline" size="small" round
|
|
||||||
@click="$emit('openTestCaseEditDialog')" >{{$t('commons.create')}}</el-button>
|
|
||||||
</el-col>
|
</el-col>
|
||||||
|
|
||||||
<el-col :span="5">
|
<el-col :span="5">
|
||||||
|
@ -108,8 +104,11 @@
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
|
||||||
|
import MsCreateBox from '../../../settings/CreateBox';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "TestCaseList",
|
name: "TestCaseList",
|
||||||
|
components: {MsCreateBox},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
result: {},
|
result: {},
|
||||||
|
@ -160,6 +159,9 @@
|
||||||
buildPagePath(path) {
|
buildPagePath(path) {
|
||||||
return path + "/" + this.currentPage + "/" + this.pageSize;
|
return path + "/" + this.currentPage + "/" + this.pageSize;
|
||||||
},
|
},
|
||||||
|
testCaseCreate() {
|
||||||
|
this.$emit('openTestCaseEditDialog');
|
||||||
|
},
|
||||||
handleSizeChange(size) {
|
handleSizeChange(size) {
|
||||||
this.pageSize = size;
|
this.pageSize = size;
|
||||||
this.initTableData();
|
this.initTableData();
|
||||||
|
@ -175,7 +177,7 @@
|
||||||
this.$emit('testCaseEdit', testCase);
|
this.$emit('testCaseEdit', testCase);
|
||||||
},
|
},
|
||||||
handleDelete(testCase) {
|
handleDelete(testCase) {
|
||||||
this.$alert(this.$t('load_test.delete_confirm') + testCase.name + "?", '', {
|
this.$alert(this.$t('test_track.case_delete_confirm') + testCase.name + "?", '', {
|
||||||
confirmButtonText: this.$t('commons.confirm'),
|
confirmButtonText: this.$t('commons.confirm'),
|
||||||
callback: (action) => {
|
callback: (action) => {
|
||||||
if (action === 'confirm') {
|
if (action === 'confirm') {
|
||||||
|
|
|
@ -21,7 +21,7 @@
|
||||||
<el-submenu v-if="isCurrentWorkspaceUser"
|
<el-submenu v-if="isCurrentWorkspaceUser"
|
||||||
index="6" popper-class="submenu" v-permission="['test_manager', 'test_user']">
|
index="6" popper-class="submenu" v-permission="['test_manager', 'test_user']">
|
||||||
<template v-slot:title>{{$t('test_track.test_case')}}</template>
|
<template v-slot:title>{{$t('test_track.test_case')}}</template>
|
||||||
<ms-recent-list :options="testRecent"/>
|
<ms-recent-list :options="caseRecent"/>
|
||||||
<el-divider/>
|
<el-divider/>
|
||||||
<ms-show-all :index="'/track/case/all'"/>
|
<ms-show-all :index="'/track/case/all'"/>
|
||||||
<el-menu-item :index="testCaseEditPath" class="blank_item"></el-menu-item>
|
<el-menu-item :index="testCaseEditPath" class="blank_item"></el-menu-item>
|
||||||
|
@ -34,7 +34,7 @@
|
||||||
<el-divider/>
|
<el-divider/>
|
||||||
<ms-show-all :index="'/track/plan/all'"/>
|
<ms-show-all :index="'/track/plan/all'"/>
|
||||||
<el-menu-item :index="testPlanViewPath" class="blank_item"></el-menu-item>
|
<el-menu-item :index="testPlanViewPath" class="blank_item"></el-menu-item>
|
||||||
<ms-create-button :index="'/track/plan/create'" :title="$t('project.create')"/>
|
<ms-create-button :index="'/track/plan/create'" :title="$t('test_track.create_plan')"/>
|
||||||
</el-submenu>
|
</el-submenu>
|
||||||
</el-menu>
|
</el-menu>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
@ -69,8 +69,8 @@
|
||||||
return {name: 'testCase', params: {projectId: item.id, projectName: item.name}}
|
return {name: 'testCase', params: {projectId: item.id, projectName: item.name}}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
testRecent: {
|
caseRecent: {
|
||||||
title: this.$t('load_test.recent'),
|
title: this.$t('test_track.recent_case'),
|
||||||
url: "/test/case/recent/5",
|
url: "/test/case/recent/5",
|
||||||
index: function (item) {
|
index: function (item) {
|
||||||
return '/track/case/edit/' + item.id;
|
return '/track/case/edit/' + item.id;
|
||||||
|
@ -78,7 +78,7 @@
|
||||||
router: function (item) {}
|
router: function (item) {}
|
||||||
},
|
},
|
||||||
planRecent: {
|
planRecent: {
|
||||||
title: this.$t('report.recent'),
|
title: this.$t('test_track.recent_plan'),
|
||||||
url: "/test/plan/recent/5",
|
url: "/test/plan/recent/5",
|
||||||
index: function (item) {
|
index: function (item) {
|
||||||
return '/track/plan/view/' + item.id;
|
return '/track/plan/view/' + item.id;
|
||||||
|
|
|
@ -8,14 +8,9 @@
|
||||||
<el-row type="flex" justify="space-between" align="middle">
|
<el-row type="flex" justify="space-between" align="middle">
|
||||||
<el-col :span="5">
|
<el-col :span="5">
|
||||||
<span class="title">{{$t('test_track.test_plan')}}</span>
|
<span class="title">{{$t('test_track.test_plan')}}</span>
|
||||||
|
<ms-create-box :tips="$t('test_track.create_plan')" :exec="testPlanCreate"/>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
|
||||||
<el-col :span="2" :offset="10">
|
|
||||||
<el-button icon="el-icon-circle-plus-outline" size="small" round
|
|
||||||
@click="$emit('openTestPlanEditDialog')" >{{$t('commons.create')}}</el-button>
|
|
||||||
</el-col>
|
|
||||||
|
|
||||||
|
|
||||||
<el-col :span="5">
|
<el-col :span="5">
|
||||||
<span class="search">
|
<span class="search">
|
||||||
<el-input type="text" size="small" :placeholder="$t('load_test.search_by_name')"
|
<el-input type="text" size="small" :placeholder="$t('load_test.search_by_name')"
|
||||||
|
@ -117,8 +112,11 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import MsCreateBox from '../../../settings/CreateBox';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "TestPlanList",
|
name: "TestPlanList",
|
||||||
|
components: {MsCreateBox},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
result: {},
|
result: {},
|
||||||
|
@ -154,6 +152,9 @@
|
||||||
buildPagePath(path) {
|
buildPagePath(path) {
|
||||||
return path + "/" + this.currentPage + "/" + this.pageSize;
|
return path + "/" + this.currentPage + "/" + this.pageSize;
|
||||||
},
|
},
|
||||||
|
testPlanCreate() {
|
||||||
|
this.$emit('openTestPlanEditDialog');
|
||||||
|
},
|
||||||
handleSizeChange(size) {
|
handleSizeChange(size) {
|
||||||
this.pageSize = size;
|
this.pageSize = size;
|
||||||
this.initTableData();
|
this.initTableData();
|
||||||
|
@ -169,7 +170,7 @@
|
||||||
this.$emit('testPlanEdit', testPlan);
|
this.$emit('testPlanEdit', testPlan);
|
||||||
},
|
},
|
||||||
handleDelete(testPlan) {
|
handleDelete(testPlan) {
|
||||||
this.$alert(this.$t('load_test.delete_confirm') + testPlan.name + "?", '', {
|
this.$alert(this.$t('test_track.plan_delete_confirm') + testPlan.name + "?", '', {
|
||||||
confirmButtonText: this.$t('commons.confirm'),
|
confirmButtonText: this.$t('commons.confirm'),
|
||||||
callback: (action) => {
|
callback: (action) => {
|
||||||
if (action === 'confirm') {
|
if (action === 'confirm') {
|
||||||
|
|
|
@ -228,7 +228,7 @@ export default {
|
||||||
'executor': 'executor',
|
'executor': 'executor',
|
||||||
'execute_result': 'Execute result',
|
'execute_result': 'Execute result',
|
||||||
'case_type': 'Case type',
|
'case_type': 'Case type',
|
||||||
'pass': 'Success',
|
'pass': 'Pass',
|
||||||
'failure': 'Failure',
|
'failure': 'Failure',
|
||||||
'blocking': 'Blocking',
|
'blocking': 'Blocking',
|
||||||
'skip': 'Skip',
|
'skip': 'Skip',
|
||||||
|
@ -239,6 +239,10 @@ export default {
|
||||||
'confirm_cancel_relevance': 'Confirm cancel relevance',
|
'confirm_cancel_relevance': 'Confirm cancel relevance',
|
||||||
'plan': 'Plan',
|
'plan': 'Plan',
|
||||||
'project': 'Project',
|
'project': 'Project',
|
||||||
|
'recent_plan': 'Recent plan',
|
||||||
|
'recent_case': 'Recent case',
|
||||||
|
'plan_delete_confirm': 'Confirm delete test plan: ',
|
||||||
|
'case_delete_confirm': 'Confirm delete test case: ',
|
||||||
},
|
},
|
||||||
test_resource_pool: {
|
test_resource_pool: {
|
||||||
'type': 'type',
|
'type': 'type',
|
||||||
|
|
|
@ -205,7 +205,7 @@ export default {
|
||||||
'add_submodule': '添加子模块',
|
'add_submodule': '添加子模块',
|
||||||
'add_module': '添加模块',
|
'add_module': '添加模块',
|
||||||
'module_name': '模块名称',
|
'module_name': '模块名称',
|
||||||
'create_plan': '新建测试计划',
|
'create_plan': '创建测试计划',
|
||||||
'plan_name': '计划名称',
|
'plan_name': '计划名称',
|
||||||
'plan_project': '所属项目',
|
'plan_project': '所属项目',
|
||||||
'plan_stage': '测试阶段',
|
'plan_stage': '测试阶段',
|
||||||
|
@ -228,7 +228,7 @@ export default {
|
||||||
'executor': '执行人',
|
'executor': '执行人',
|
||||||
'execute_result': '执行结果',
|
'execute_result': '执行结果',
|
||||||
'case_type': '用例类型',
|
'case_type': '用例类型',
|
||||||
'pass': '成功',
|
'pass': '通过',
|
||||||
'failure': '失败',
|
'failure': '失败',
|
||||||
'blocking': '阻塞',
|
'blocking': '阻塞',
|
||||||
'skip': '跳过',
|
'skip': '跳过',
|
||||||
|
@ -239,6 +239,10 @@ export default {
|
||||||
'confirm_cancel_relevance': '确认取消关联',
|
'confirm_cancel_relevance': '确认取消关联',
|
||||||
'plan': '计划',
|
'plan': '计划',
|
||||||
'project': '项目',
|
'project': '项目',
|
||||||
|
'recent_plan': '最近的计划',
|
||||||
|
'recent_case': '最近的用例',
|
||||||
|
'plan_delete_confirm': '确认删除测试计划: ',
|
||||||
|
'case_delete_confirm': '确认删除测试用例: ',
|
||||||
},
|
},
|
||||||
test_resource_pool: {
|
test_resource_pool: {
|
||||||
'type': '类型',
|
'type': '类型',
|
||||||
|
|
Loading…
Reference in New Issue