Merge remote-tracking branch 'origin/dev' into dev
This commit is contained in:
commit
26c73ae223
|
@ -7,6 +7,8 @@ public class TestCase implements Serializable {
|
|||
|
||||
private Integer nodeId;
|
||||
|
||||
private String nodePath;
|
||||
|
||||
private String projectId;
|
||||
|
||||
private String name;
|
||||
|
@ -43,6 +45,14 @@ public class TestCase implements Serializable {
|
|||
this.nodeId = nodeId;
|
||||
}
|
||||
|
||||
public String getNodePath() {
|
||||
return nodePath;
|
||||
}
|
||||
|
||||
public void setNodePath(String nodePath) {
|
||||
this.nodePath = nodePath == null ? null : nodePath.trim();
|
||||
}
|
||||
|
||||
public String getProjectId() {
|
||||
return projectId;
|
||||
}
|
||||
|
|
|
@ -234,6 +234,76 @@ public class TestCaseExample {
|
|||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andNodePathIsNull() {
|
||||
addCriterion("node_path is null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andNodePathIsNotNull() {
|
||||
addCriterion("node_path is not null");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andNodePathEqualTo(String value) {
|
||||
addCriterion("node_path =", value, "nodePath");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andNodePathNotEqualTo(String value) {
|
||||
addCriterion("node_path <>", value, "nodePath");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andNodePathGreaterThan(String value) {
|
||||
addCriterion("node_path >", value, "nodePath");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andNodePathGreaterThanOrEqualTo(String value) {
|
||||
addCriterion("node_path >=", value, "nodePath");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andNodePathLessThan(String value) {
|
||||
addCriterion("node_path <", value, "nodePath");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andNodePathLessThanOrEqualTo(String value) {
|
||||
addCriterion("node_path <=", value, "nodePath");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andNodePathLike(String value) {
|
||||
addCriterion("node_path like", value, "nodePath");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andNodePathNotLike(String value) {
|
||||
addCriterion("node_path not like", value, "nodePath");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andNodePathIn(List<String> values) {
|
||||
addCriterion("node_path in", values, "nodePath");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andNodePathNotIn(List<String> values) {
|
||||
addCriterion("node_path not in", values, "nodePath");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andNodePathBetween(String value1, String value2) {
|
||||
addCriterion("node_path between", value1, value2, "nodePath");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andNodePathNotBetween(String value1, String value2) {
|
||||
addCriterion("node_path not between", value1, value2, "nodePath");
|
||||
return (Criteria) this;
|
||||
}
|
||||
|
||||
public Criteria andProjectIdIsNull() {
|
||||
addCriterion("project_id is null");
|
||||
return (Criteria) this;
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
<resultMap id="BaseResultMap" type="io.metersphere.base.domain.TestCase">
|
||||
<id column="id" jdbcType="VARCHAR" property="id" />
|
||||
<result column="node_id" jdbcType="INTEGER" property="nodeId" />
|
||||
<result column="node_path" jdbcType="VARCHAR" property="nodePath" />
|
||||
<result column="project_id" jdbcType="VARCHAR" property="projectId" />
|
||||
<result column="name" jdbcType="VARCHAR" property="name" />
|
||||
<result column="type" jdbcType="VARCHAR" property="type" />
|
||||
|
@ -77,7 +78,7 @@
|
|||
</where>
|
||||
</sql>
|
||||
<sql id="Base_Column_List">
|
||||
id, node_id, project_id, name, type, maintainer, priority, method, prerequisite,
|
||||
id, node_id, node_path, project_id, name, type, maintainer, priority, method, prerequisite,
|
||||
create_time, update_time
|
||||
</sql>
|
||||
<sql id="Blob_Column_List">
|
||||
|
@ -132,16 +133,16 @@
|
|||
</if>
|
||||
</delete>
|
||||
<insert id="insert" parameterType="io.metersphere.base.domain.TestCaseWithBLOBs">
|
||||
insert into test_case (id, node_id, project_id,
|
||||
name, type, maintainer,
|
||||
priority, method, prerequisite,
|
||||
create_time, update_time, remark,
|
||||
steps)
|
||||
values (#{id,jdbcType=VARCHAR}, #{nodeId,jdbcType=INTEGER}, #{projectId,jdbcType=VARCHAR},
|
||||
#{name,jdbcType=VARCHAR}, #{type,jdbcType=VARCHAR}, #{maintainer,jdbcType=VARCHAR},
|
||||
#{priority,jdbcType=VARCHAR}, #{method,jdbcType=VARCHAR}, #{prerequisite,jdbcType=VARCHAR},
|
||||
#{createTime,jdbcType=BIGINT}, #{updateTime,jdbcType=BIGINT}, #{remark,jdbcType=LONGVARCHAR},
|
||||
#{steps,jdbcType=LONGVARCHAR})
|
||||
insert into test_case (id, node_id, node_path,
|
||||
project_id, name, type,
|
||||
maintainer, priority, method,
|
||||
prerequisite, create_time, update_time,
|
||||
remark, steps)
|
||||
values (#{id,jdbcType=VARCHAR}, #{nodeId,jdbcType=INTEGER}, #{nodePath,jdbcType=VARCHAR},
|
||||
#{projectId,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, #{type,jdbcType=VARCHAR},
|
||||
#{maintainer,jdbcType=VARCHAR}, #{priority,jdbcType=VARCHAR}, #{method,jdbcType=VARCHAR},
|
||||
#{prerequisite,jdbcType=VARCHAR}, #{createTime,jdbcType=BIGINT}, #{updateTime,jdbcType=BIGINT},
|
||||
#{remark,jdbcType=LONGVARCHAR}, #{steps,jdbcType=LONGVARCHAR})
|
||||
</insert>
|
||||
<insert id="insertSelective" parameterType="io.metersphere.base.domain.TestCaseWithBLOBs">
|
||||
insert into test_case
|
||||
|
@ -152,6 +153,9 @@
|
|||
<if test="nodeId != null">
|
||||
node_id,
|
||||
</if>
|
||||
<if test="nodePath != null">
|
||||
node_path,
|
||||
</if>
|
||||
<if test="projectId != null">
|
||||
project_id,
|
||||
</if>
|
||||
|
@ -193,6 +197,9 @@
|
|||
<if test="nodeId != null">
|
||||
#{nodeId,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="nodePath != null">
|
||||
#{nodePath,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="projectId != null">
|
||||
#{projectId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
|
@ -243,6 +250,9 @@
|
|||
<if test="record.nodeId != null">
|
||||
node_id = #{record.nodeId,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="record.nodePath != null">
|
||||
node_path = #{record.nodePath,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="record.projectId != null">
|
||||
project_id = #{record.projectId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
|
@ -285,6 +295,7 @@
|
|||
update test_case
|
||||
set id = #{record.id,jdbcType=VARCHAR},
|
||||
node_id = #{record.nodeId,jdbcType=INTEGER},
|
||||
node_path = #{record.nodePath,jdbcType=VARCHAR},
|
||||
project_id = #{record.projectId,jdbcType=VARCHAR},
|
||||
name = #{record.name,jdbcType=VARCHAR},
|
||||
type = #{record.type,jdbcType=VARCHAR},
|
||||
|
@ -304,6 +315,7 @@
|
|||
update test_case
|
||||
set id = #{record.id,jdbcType=VARCHAR},
|
||||
node_id = #{record.nodeId,jdbcType=INTEGER},
|
||||
node_path = #{record.nodePath,jdbcType=VARCHAR},
|
||||
project_id = #{record.projectId,jdbcType=VARCHAR},
|
||||
name = #{record.name,jdbcType=VARCHAR},
|
||||
type = #{record.type,jdbcType=VARCHAR},
|
||||
|
@ -323,6 +335,9 @@
|
|||
<if test="nodeId != null">
|
||||
node_id = #{nodeId,jdbcType=INTEGER},
|
||||
</if>
|
||||
<if test="nodePath != null">
|
||||
node_path = #{nodePath,jdbcType=VARCHAR},
|
||||
</if>
|
||||
<if test="projectId != null">
|
||||
project_id = #{projectId,jdbcType=VARCHAR},
|
||||
</if>
|
||||
|
@ -362,6 +377,7 @@
|
|||
<update id="updateByPrimaryKeyWithBLOBs" parameterType="io.metersphere.base.domain.TestCaseWithBLOBs">
|
||||
update test_case
|
||||
set node_id = #{nodeId,jdbcType=INTEGER},
|
||||
node_path = #{nodePath,jdbcType=VARCHAR},
|
||||
project_id = #{projectId,jdbcType=VARCHAR},
|
||||
name = #{name,jdbcType=VARCHAR},
|
||||
type = #{type,jdbcType=VARCHAR},
|
||||
|
@ -378,6 +394,7 @@
|
|||
<update id="updateByPrimaryKey" parameterType="io.metersphere.base.domain.TestCase">
|
||||
update test_case
|
||||
set node_id = #{nodeId,jdbcType=INTEGER},
|
||||
node_path = #{nodePath,jdbcType=VARCHAR},
|
||||
project_id = #{projectId,jdbcType=VARCHAR},
|
||||
name = #{name,jdbcType=VARCHAR},
|
||||
type = #{type,jdbcType=VARCHAR},
|
||||
|
|
|
@ -8,6 +8,7 @@ import io.metersphere.commons.utils.PageUtils;
|
|||
import io.metersphere.commons.utils.Pager;
|
||||
import io.metersphere.controller.request.ReportRequest;
|
||||
import io.metersphere.dto.ReportDTO;
|
||||
import io.metersphere.report.base.ChartsData;
|
||||
import io.metersphere.report.base.Errors;
|
||||
import io.metersphere.report.base.TestOverview;
|
||||
import io.metersphere.report.dto.ErrorsTop5DTO;
|
||||
|
@ -76,5 +77,9 @@ public class ReportController {
|
|||
return reportService.getTestOverview(reportId);
|
||||
}
|
||||
|
||||
@GetMapping("/content/load_chart/{reportId}")
|
||||
public ChartsData getLoadChartData(@PathVariable String reportId) {
|
||||
return reportService.getLoadChartData(reportId);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -294,8 +294,8 @@ public class JtlResolver {
|
|||
List<String> hits = new ArrayList<>();
|
||||
List<String> erorrs = new ArrayList<>();
|
||||
List<String> timeList = new ArrayList<>();
|
||||
////
|
||||
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
||||
//// todo SimpleDateFormat
|
||||
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
||||
DecimalFormat df = new DecimalFormat("0.0");
|
||||
|
||||
total.sort(Comparator.comparing(metric -> Long.valueOf(metric.getTimestamp())));
|
||||
|
@ -310,8 +310,8 @@ public class JtlResolver {
|
|||
public int compare(Map.Entry<String, List<Metric>> t1, Map.Entry<String, List<Metric>> t2) {
|
||||
Date date1 = null,date2 = null;
|
||||
try {
|
||||
date1 = sdf.parse(t1.getKey());
|
||||
date2 = sdf.parse(t2.getKey());
|
||||
date1 = simpleDateFormat.parse(t1.getKey());
|
||||
date2 = simpleDateFormat.parse(t2.getKey());
|
||||
} catch (ParseException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
@ -323,6 +323,8 @@ public class JtlResolver {
|
|||
int failSize = 0;
|
||||
Map.Entry<String, List<Metric>> map = entries.get(i);
|
||||
List<Metric> metrics = map.getValue();
|
||||
Map<String, List<Metric>> metricsMap = metrics.stream().collect(Collectors.groupingBy(Metric::getThreadName));
|
||||
int maxUsers = metricsMap.size();
|
||||
for (int j = 0; j < metrics.size(); j++) {
|
||||
Metric metric = metrics.get(j);
|
||||
String success = metric.getSuccess();
|
||||
|
@ -330,17 +332,22 @@ public class JtlResolver {
|
|||
failSize++;
|
||||
}
|
||||
}
|
||||
// todo
|
||||
timeList.add(map.getKey());
|
||||
hits.add(String.valueOf(metrics.size()));
|
||||
users.add(String.valueOf(metrics.size()));
|
||||
hits.add(df.format(metrics.size() * 1.0 / maxUsers));
|
||||
users.add(String.valueOf(maxUsers));
|
||||
erorrs.add(String.valueOf(failSize));
|
||||
|
||||
}
|
||||
|
||||
data.setTime(timeList);
|
||||
data.setUsers(users);
|
||||
data.setHits(hits);
|
||||
data.setErrors(erorrs);
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
|
||||
private static String stampToDate(String s){
|
||||
String res;
|
||||
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
package io.metersphere.report.base;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class ChartsData {
|
||||
|
||||
private String xAxis;
|
||||
|
@ -7,6 +9,12 @@ public class ChartsData {
|
|||
private String yAxis1;
|
||||
private String serices;
|
||||
|
||||
////
|
||||
private List<String> time;
|
||||
private List<String> users;
|
||||
private List<String> hits;
|
||||
private List<String> errors;
|
||||
|
||||
public String getxAxis() {
|
||||
return xAxis;
|
||||
}
|
||||
|
@ -38,4 +46,36 @@ public class ChartsData {
|
|||
public void setSerices(String serices) {
|
||||
this.serices = serices;
|
||||
}
|
||||
|
||||
public List<String> getTime() {
|
||||
return time;
|
||||
}
|
||||
|
||||
public void setTime(List<String> time) {
|
||||
this.time=time;
|
||||
}
|
||||
|
||||
public List<String> getUsers() {
|
||||
return users;
|
||||
}
|
||||
|
||||
public void setUsers(List<String> users) {
|
||||
this.users=users;
|
||||
}
|
||||
|
||||
public List<String> getHits() {
|
||||
return hits;
|
||||
}
|
||||
|
||||
public void setHits(List<String> hits) {
|
||||
this.hits=hits;
|
||||
}
|
||||
|
||||
public List<String> getErrors() {
|
||||
return errors;
|
||||
}
|
||||
|
||||
public void setErrors(List<String> errors) {
|
||||
this.errors=errors;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -8,6 +8,7 @@ import io.metersphere.base.mapper.ext.ExtLoadTestReportMapper;
|
|||
import io.metersphere.controller.request.ReportRequest;
|
||||
import io.metersphere.dto.ReportDTO;
|
||||
import io.metersphere.report.JtlResolver;
|
||||
import io.metersphere.report.base.ChartsData;
|
||||
import io.metersphere.report.base.Errors;
|
||||
import io.metersphere.report.base.TestOverview;
|
||||
import io.metersphere.report.dto.ErrorsTop5DTO;
|
||||
|
@ -75,4 +76,11 @@ public class ReportService {
|
|||
TestOverview testOverview = JtlResolver.getTestOverview(content);
|
||||
return testOverview;
|
||||
}
|
||||
|
||||
public ChartsData getLoadChartData(String id) {
|
||||
LoadTestReportWithBLOBs loadTestReport = loadTestReportMapper.selectByPrimaryKey(id);
|
||||
String content = loadTestReport.getContent();
|
||||
ChartsData chartsData = JtlResolver.getLoadChartData(content);
|
||||
return chartsData;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -265,6 +265,7 @@ CREATE TABLE IF NOT EXISTS `test_case_node` (
|
|||
CREATE TABLE IF NOT EXISTS `test_case` (
|
||||
`id` varchar(50) NOT NULL COMMENT 'Test case ID',
|
||||
`node_id` int(13) NOT NULL COMMENT 'Node ID this case belongs to',
|
||||
`node_path` varchar(50) NOT NULL COMMENT 'Node path this case belongs to',
|
||||
`project_id` varchar(50) NOT NULL COMMENT 'Project ID this test belongs to',
|
||||
`name` varchar(64) NOT NULL COMMENT 'Case name',
|
||||
`type` varchar(25) NOT NULL COMMENT 'Test case type',
|
||||
|
|
|
@ -59,7 +59,7 @@
|
|||
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<chart ref="chart1" :options="option1" :autoresize="true"></chart>
|
||||
<chart ref="chart1" :options="option" :autoresize="true"></chart>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<chart ref="chart2" :options="option2" :autoresize="true"></chart>
|
||||
|
@ -79,53 +79,7 @@
|
|||
avgResponseTime: "0",
|
||||
responseTime90: "0",
|
||||
avgBandwidth: "0",
|
||||
option1: {
|
||||
legend: {
|
||||
top: 20,
|
||||
data: ['Users', 'Hits/s', 'Error(s)']
|
||||
},
|
||||
xAxis: {
|
||||
type: 'category',
|
||||
data: ["10:22:01", "10:22:02", "10:22:04", "10:22:06",
|
||||
"10:22:07", "10:22:08", "10:22:09", "10:22:10", "10:22:11", "10:22:12"]
|
||||
},
|
||||
yAxis: [{
|
||||
name: 'User',
|
||||
type: 'value',
|
||||
min: 0,
|
||||
max: 30,
|
||||
splitNumber: 5,
|
||||
interval: 30 / 5
|
||||
},
|
||||
{
|
||||
name: 'Hits/s',
|
||||
type: 'value'
|
||||
}
|
||||
],
|
||||
series: [
|
||||
{
|
||||
name: 'Users',
|
||||
color: '#0CA74A',
|
||||
data: [6,9,10,15,1,10,25,19,15,2],
|
||||
type: 'line',
|
||||
yAxisIndex: 0
|
||||
},
|
||||
{
|
||||
name: 'Hits/s',
|
||||
color: '#65A2FF',
|
||||
data: [1,1,1,1,1,1,1,1,1,1],
|
||||
type: 'line',
|
||||
yAxisIndex: 1
|
||||
},
|
||||
{
|
||||
name: 'Error(s)',
|
||||
color: '#E6113C',
|
||||
data: [0,0,0,0,1,1,2,0,5,2],
|
||||
type: 'line',
|
||||
yAxisIndex: 1
|
||||
}
|
||||
]
|
||||
},
|
||||
option: {},
|
||||
option2: {
|
||||
legend: {
|
||||
top: 20,
|
||||
|
@ -173,6 +127,59 @@
|
|||
this.responseTime90 = data.responseTime90;
|
||||
this.avgBandwidth = data.avgBandwidth;
|
||||
})
|
||||
this.$get("/report/content/load_chart/" + this.id, res => {
|
||||
let data = res.data;
|
||||
this.option = this.generateOption(data);
|
||||
})
|
||||
},
|
||||
generateOption(data) {
|
||||
let option = {
|
||||
legend: {
|
||||
top: 20,
|
||||
data: ['Users', 'Hits/s', 'Error(s)']
|
||||
},
|
||||
xAxis: {
|
||||
type: 'category',
|
||||
},
|
||||
yAxis: [{
|
||||
name: 'User',
|
||||
type: 'value',
|
||||
min: 0,
|
||||
splitNumber: 5,
|
||||
interval: 10 / 5
|
||||
},
|
||||
{
|
||||
name: 'Hits/s',
|
||||
type: 'value'
|
||||
}
|
||||
],
|
||||
series: [
|
||||
{
|
||||
name: 'Users',
|
||||
color: '#0CA74A',
|
||||
type: 'line',
|
||||
yAxisIndex: 0
|
||||
},
|
||||
{
|
||||
name: 'Hits/s',
|
||||
color: '#65A2FF',
|
||||
type: 'line',
|
||||
yAxisIndex: 1
|
||||
},
|
||||
{
|
||||
name: 'Error(s)',
|
||||
color: '#E6113C',
|
||||
type: 'line',
|
||||
yAxisIndex: 1
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
this.$set(option.xAxis, "data", data.time);
|
||||
this.$set(option.series[0], "data", data.users);
|
||||
this.$set(option.series[1], "data", data.hits);
|
||||
this.$set(option.series[2], "data", data.errors);
|
||||
return option;
|
||||
}
|
||||
},
|
||||
created() {
|
||||
|
@ -193,6 +200,10 @@
|
|||
this.responseTime90 = data.responseTime90;
|
||||
this.avgBandwidth = data.avgBandwidth;
|
||||
})
|
||||
this.$get("/report/content/load_chart/" + reportId, res => {
|
||||
let data = res.data;
|
||||
this.option1 = this.generateOption(data);
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -25,10 +25,14 @@
|
|||
ref="nodeTree"></node-tree>
|
||||
</el-aside>
|
||||
|
||||
<test-case-list
|
||||
@openTestCaseEditDialog="openTestCaseEditDialog"
|
||||
@testCaseEdit="openTestCaseEditDialog"
|
||||
ref="testCaseList"></test-case-list>
|
||||
<el-main class="main-content">
|
||||
|
||||
<test-case-list
|
||||
@openTestCaseEditDialog="openTestCaseEditDialog"
|
||||
@testCaseEdit="openTestCaseEditDialog"
|
||||
ref="testCaseList"></test-case-list>
|
||||
</el-main>
|
||||
|
||||
|
||||
</el-container>
|
||||
|
||||
|
@ -130,7 +134,7 @@
|
|||
moduleOptions.push(option);
|
||||
if(node.children){
|
||||
for (let i = 0; i < node.children.length; i++){
|
||||
this.buildNodePath(node.children[i], { path: '/' + node.name }, moduleOptions);
|
||||
this.buildNodePath(node.children[i], { path: option.path }, moduleOptions);
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@ -145,10 +149,12 @@
|
|||
</script>
|
||||
|
||||
<style scoped>
|
||||
.testplan-container {
|
||||
.case_container {
|
||||
padding: 15px;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background: white;
|
||||
height: 1000px;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
|
@ -158,21 +164,6 @@
|
|||
max-width: 1200px;
|
||||
}
|
||||
|
||||
.test-content {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.table-page {
|
||||
padding-top: 20px;
|
||||
margin-right: -9px;
|
||||
float: right;
|
||||
}
|
||||
|
||||
.case_container {
|
||||
background: white;
|
||||
height: 600px;
|
||||
}
|
||||
|
||||
.node_tree {
|
||||
margin: 10%;
|
||||
}
|
||||
|
|
|
@ -256,6 +256,11 @@
|
|||
Object.assign(param, this.form);
|
||||
param.steps = JSON.stringify(this.form.steps);
|
||||
param.nodeId = this.form.module;
|
||||
this.moduleOptions.forEach(item => {
|
||||
if(this.form.module === item.id){
|
||||
param.nodePath = item.path;
|
||||
}
|
||||
});
|
||||
if(localStorage.getItem('currentProject')){
|
||||
param.projectId = JSON.parse(localStorage.getItem('currentProject')).id;
|
||||
}
|
||||
|
|
|
@ -36,19 +36,19 @@
|
|||
<el-table-column
|
||||
prop="name"
|
||||
:label="$t('commons.name')"
|
||||
width="130"
|
||||
width="120"
|
||||
show-overflow-tooltip>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="priority"
|
||||
:label="$t('test_track.priority')"
|
||||
width="130"
|
||||
width="120"
|
||||
show-overflow-tooltip>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="type"
|
||||
:label="$t('test_track.type')"
|
||||
width="130"
|
||||
width="120"
|
||||
show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
<span v-if="scope.row.type == 'functional'">{{$t('commons.functional')}}</span>
|
||||
|
@ -59,7 +59,7 @@
|
|||
<el-table-column
|
||||
prop="method"
|
||||
:label="$t('test_track.method')"
|
||||
width="130"
|
||||
width="120"
|
||||
show-overflow-tooltip>
|
||||
<template slot-scope="scope">
|
||||
<span v-if="scope.row.method == 'manual'">{{$t('test_track.manual')}}</span>
|
||||
|
@ -67,8 +67,8 @@
|
|||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="remark"
|
||||
:label="$t('commons.remark')"
|
||||
prop="nodePath"
|
||||
:label="$t('test_track.module')"
|
||||
width="160"
|
||||
show-overflow-tooltip>
|
||||
</el-table-column>
|
||||
|
@ -87,7 +87,7 @@
|
|||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
width="160"
|
||||
width="100"
|
||||
:label="$t('commons.operating')">
|
||||
<template slot-scope="scope">
|
||||
<el-button @click="handleEdit(scope.row)" type="primary" icon="el-icon-edit" size="mini" circle/>
|
||||
|
@ -96,7 +96,6 @@
|
|||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
|
||||
<div>
|
||||
<el-row>
|
||||
<el-col :span="22" :offset="1">
|
||||
|
@ -204,4 +203,10 @@
|
|||
|
||||
<style scoped>
|
||||
|
||||
.table-page {
|
||||
padding-top: 20px;
|
||||
margin-right: -9px;
|
||||
float: right;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
|
Loading…
Reference in New Issue