fix(接口自动化): 修复复制用例缺陷;优化操作日志样式。
This commit is contained in:
parent
94b1dcb7b7
commit
dd481c7cfd
|
@ -1,11 +1,13 @@
|
|||
package io.metersphere.controller;
|
||||
|
||||
import io.metersphere.commons.constants.OperLogConstants;
|
||||
import io.metersphere.commons.constants.UserSource;
|
||||
import io.metersphere.commons.user.SessionUser;
|
||||
import io.metersphere.commons.utils.RsaKey;
|
||||
import io.metersphere.commons.utils.SessionUtils;
|
||||
import io.metersphere.controller.request.LoginRequest;
|
||||
import io.metersphere.i18n.Translator;
|
||||
import io.metersphere.log.annotation.MsAuditLog;
|
||||
import io.metersphere.service.BaseDisplayService;
|
||||
import io.metersphere.service.UserService;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
|
@ -41,6 +43,7 @@ public class LoginController {
|
|||
}
|
||||
|
||||
@PostMapping(value = "/signin")
|
||||
@MsAuditLog(module = "auth_title", type = OperLogConstants.LOGIN, title = "登录")
|
||||
public ResultHolder login(@RequestBody LoginRequest request) {
|
||||
SessionUser sessionUser = SessionUtils.getUser();
|
||||
if (sessionUser != null) {
|
||||
|
@ -58,6 +61,7 @@ public class LoginController {
|
|||
}
|
||||
|
||||
@GetMapping(value = "/signout")
|
||||
@MsAuditLog(module = "auth_title", type = OperLogConstants.LOGIN, title = "登出")
|
||||
public ResultHolder logout() throws Exception {
|
||||
userService.logout();
|
||||
SecurityUtils.getSubject().logout();
|
||||
|
|
|
@ -221,7 +221,7 @@
|
|||
},
|
||||
watch: {},
|
||||
methods: {
|
||||
openHis(row){
|
||||
openHis(row) {
|
||||
this.$refs.changeHistory.open(row.id);
|
||||
},
|
||||
handleRunBatch() {
|
||||
|
@ -258,10 +258,13 @@
|
|||
this.$emit('singleRun', data);
|
||||
},
|
||||
copyCase(data) {
|
||||
let uuid = getUUID();
|
||||
data.request.id = uuid;
|
||||
let obj = {name: "copy_" + data.name, priority: data.priority, active: true, tags: data.tags, request: data.request, uuid: uuid};
|
||||
this.$emit('copyCase', obj);
|
||||
if (data && data.request) {
|
||||
let uuid = getUUID();
|
||||
let request = JSON.parse(JSON.stringify(data.request));
|
||||
request.id = uuid;
|
||||
let obj = {name: "copy_" + data.name, priority: data.priority, active: true, tags: data.tags, request: request, uuid: uuid};
|
||||
this.$emit('copyCase', obj);
|
||||
}
|
||||
},
|
||||
selectTestCase(item, $event) {
|
||||
if (!item.id || !this.loaded) {
|
||||
|
|
|
@ -23,7 +23,6 @@
|
|||
</el-col>
|
||||
<el-col :span="4">
|
||||
<el-form-item :label="$t('operating_log.user')" prop="user">
|
||||
<!--<el-input size="small" v-model="condition.operUser"/>-->
|
||||
<el-autocomplete
|
||||
class="input-with-autocomplete"
|
||||
v-model="condition.operUser"
|
||||
|
@ -33,8 +32,7 @@
|
|||
size="small"
|
||||
highlight-first-item
|
||||
value-key="email"
|
||||
@select="handleSelect"
|
||||
>
|
||||
@select="handleSelect">
|
||||
<template v-slot:default="scope">
|
||||
<span class="ws-member-name">{{scope.item.name}}</span>
|
||||
<span class="ws-member-email">{{scope.item.email}}</span>
|
||||
|
@ -61,11 +59,13 @@
|
|||
|
||||
<el-col :span="4">
|
||||
<el-form-item :label="$t('operating_log.object')" prop="module">
|
||||
<!--<el-input size="small" v-model="condition.operModule"/>-->
|
||||
<el-cascader :options="sysList" filterable :placeholder="$t('operating_log.object')" show-all-levels
|
||||
v-model="condition.operModules" :props="props"
|
||||
class="ms-case" ref="cascade"></el-cascader>
|
||||
|
||||
<el-cascader v-model="condition.operModules"
|
||||
show-all-levels filterable
|
||||
:options="sysList"
|
||||
:placeholder="$t('operating_log.object')"
|
||||
:props="props"
|
||||
class="ms-case"
|
||||
@change="initTableData" ref="cascade"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
|
@ -74,7 +74,9 @@
|
|||
<el-button type="primary" size="small" style="float: right" @click="search">
|
||||
{{ $t('commons.adv_search.search') }}
|
||||
</el-button>
|
||||
<el-button size="small" @click="reset">{{$t('commons.adv_search.reset')}}</el-button>
|
||||
<el-button size="small" @click="reset">
|
||||
{{$t('commons.adv_search.reset')}}
|
||||
</el-button>
|
||||
</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
@ -104,8 +106,7 @@
|
|||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<ms-table-pagination :change="initTableData" :current-page.sync="currentPage" :page-size.sync="pageSize"
|
||||
:total="total"/>
|
||||
<ms-table-pagination :change="initTableData" :current-page.sync="currentPage" :page-size.sync="pageSize" :total="total"/>
|
||||
</el-card>
|
||||
|
||||
<ms-log-detail ref="logDetail" :title="$t('report.test_log_details')"/>
|
||||
|
@ -129,55 +130,6 @@
|
|||
props: {
|
||||
multiple: false,
|
||||
},
|
||||
sysList: [
|
||||
{
|
||||
label: "测试跟踪", value: "track", children: [
|
||||
{label: "测试用例", value: "测试用例", leaf: true},
|
||||
{label: "用例评审", value: "用例评审", leaf: true},
|
||||
{label: "测试计划", value: "测试计划", leaf: true},
|
||||
{label: "缺陷管理", value: "缺陷管理", leaf: true},
|
||||
{label: "报告", value: "报告", leaf: true}]
|
||||
},
|
||||
{
|
||||
label: "接口测试", value: "api", children: [
|
||||
{label: "接口定义", value: "接口定义", leaf: true},
|
||||
{label: "接口自动化", value: "接口自动化", leaf: true},
|
||||
{label: "测试报告", value: "测试报告", leaf: true}]
|
||||
},
|
||||
{
|
||||
label: "性能测试", value: "性能测试", children: [
|
||||
{label: "性能测试", value: "性能测试", leaf: true},
|
||||
{label: "性能测试报告", value: "性能测试报告", leaf: true}]
|
||||
},
|
||||
{
|
||||
label: "系统设置", value: "系统设置", children: [
|
||||
{label: "系统-用户", value: "系统-用户", leaf: true},
|
||||
{label: "系统-组织", value: "系统-组织", leaf: true},
|
||||
{label: "工作空间", value: "工作空间", leaf: true},
|
||||
{label: "系统-测试资源池", value: "系统-测试资源池", leaf: true},
|
||||
{label: "系统-系统参数设置", value: "系统-系统参数设置", leaf: true},
|
||||
{label: "系统-配额管理", value: "系统-配额管理", leaf: true},
|
||||
{label: "系统-授权管理", value: "系统-授权管理", leaf: true},
|
||||
{label: "组织-成员", value: "组织-成员", leaf: true},
|
||||
{label: "组织-服务集成", value: "组织-服务集成", leaf: true},
|
||||
{label: "组织-消息设置", value: "组织-消息设置", leaf: true},
|
||||
|
||||
{label: "工作空间-成员", value: "工作空间-成员", leaf: true},
|
||||
{label: "项目-项目管理", value: "项目-项目管理", leaf: true},
|
||||
{label: "工作空间-模版设置", value: "工作空间-模版设置", leaf: true},
|
||||
{label: "工作空间-项目管理", value: "工作空间-项目管理", leaf: true},
|
||||
{label: "项目-项目管理", value: "项目-项目管理", leaf: true},
|
||||
{label: "项目-成员", value: "项目-成员", leaf: true},
|
||||
{label: "工作空间-成员", value: "工作空间-成员", leaf: true},
|
||||
|
||||
{label: "項目-JAR包管理", value: "項目-JAR包管理", leaf: true},
|
||||
{label: "项目-环境设置", value: "项目-环境设置", leaf: true},
|
||||
{label: "项目-文件管理", value: "项目-文件管理", leaf: true},
|
||||
{label: "个人信息-个人设置", value: "个人信息-个人设置", leaf: true},
|
||||
{label: "个人信息-API Keys", value: "个人信息-API Keys", leaf: true}
|
||||
]
|
||||
},
|
||||
],
|
||||
result: {},
|
||||
form: {},
|
||||
currentPage: 0,
|
||||
|
@ -235,7 +187,56 @@
|
|||
['BATCH_ADD', this.$t('commons.batch_add')],
|
||||
['BATCH_RESTORE', "批量恢复"],
|
||||
['BATCH_GC', "批量回收"],
|
||||
])
|
||||
]),
|
||||
sysList: [
|
||||
{
|
||||
label: "测试跟踪", value: "测试跟踪", children: [
|
||||
{label: "测试用例", value: "测试用例", leaf: true},
|
||||
{label: "用例评审", value: "用例评审", leaf: true},
|
||||
{label: "测试计划", value: "测试计划", leaf: true},
|
||||
{label: "缺陷管理", value: "缺陷管理", leaf: true},
|
||||
{label: "报告", value: "报告", leaf: true}]
|
||||
},
|
||||
{
|
||||
label: "接口测试", value: "api", children: [
|
||||
{label: "接口定义", value: "接口定义", leaf: true},
|
||||
{label: "接口自动化", value: "接口自动化", leaf: true},
|
||||
{label: "测试报告", value: "测试报告", leaf: true}]
|
||||
},
|
||||
{
|
||||
label: "性能测试", value: "性能测试", children: [
|
||||
{label: "性能测试", value: "性能测试", leaf: true},
|
||||
{label: "性能测试报告", value: "性能测试报告", leaf: true}]
|
||||
},
|
||||
{
|
||||
label: "系统设置", value: "系统设置", children: [
|
||||
{label: "系统-用户", value: "系统-用户", leaf: true},
|
||||
{label: "系统-组织", value: "系统-组织", leaf: true},
|
||||
{label: "工作空间", value: "工作空间", leaf: true},
|
||||
{label: "系统-测试资源池", value: "系统-测试资源池", leaf: true},
|
||||
{label: "系统-系统参数设置", value: "系统-系统参数设置", leaf: true},
|
||||
{label: "系统-配额管理", value: "系统-配额管理", leaf: true},
|
||||
{label: "系统-授权管理", value: "系统-授权管理", leaf: true},
|
||||
{label: "组织-成员", value: "组织-成员", leaf: true},
|
||||
{label: "组织-服务集成", value: "组织-服务集成", leaf: true},
|
||||
{label: "组织-消息设置", value: "组织-消息设置", leaf: true},
|
||||
|
||||
{label: "工作空间-成员", value: "工作空间-成员", leaf: true},
|
||||
{label: "项目-项目管理", value: "项目-项目管理", leaf: true},
|
||||
{label: "工作空间-模版设置", value: "工作空间-模版设置", leaf: true},
|
||||
{label: "工作空间-项目管理", value: "工作空间-项目管理", leaf: true},
|
||||
{label: "项目-项目管理", value: "项目-项目管理", leaf: true},
|
||||
{label: "项目-成员", value: "项目-成员", leaf: true},
|
||||
{label: "工作空间-成员", value: "工作空间-成员", leaf: true},
|
||||
|
||||
{label: "項目-JAR包管理", value: "項目-JAR包管理", leaf: true},
|
||||
{label: "项目-环境设置", value: "项目-环境设置", leaf: true},
|
||||
{label: "项目-文件管理", value: "项目-文件管理", leaf: true},
|
||||
{label: "个人信息-个人设置", value: "个人信息-个人设置", leaf: true},
|
||||
{label: "个人信息-API Keys", value: "个人信息-API Keys", leaf: true}
|
||||
]
|
||||
},
|
||||
],
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
|
|
Loading…
Reference in New Issue