Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
MeterSphere
metersphere
提交
1b0dc296
M
metersphere
项目概览
MeterSphere
/
metersphere
上一次同步 3 年多
通知
25
Star
1
Fork
1
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
M
metersphere
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
1b0dc296
编写于
7月 30, 2020
作者:
C
chenjianxing
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'v1.1'
上级
02253403
049c7f06
变更
19
隐藏空白更改
内联
并排
Showing
19 changed file
with
198 addition
and
45 deletion
+198
-45
backend/src/main/java/io/metersphere/api/dto/scenario/assertions/AssertionJsonPath.java
...sphere/api/dto/scenario/assertions/AssertionJsonPath.java
+16
-0
backend/src/main/java/io/metersphere/api/dto/scenario/assertions/AssertionType.java
...etersphere/api/dto/scenario/assertions/AssertionType.java
+1
-0
backend/src/main/java/io/metersphere/api/dto/scenario/assertions/Assertions.java
...o/metersphere/api/dto/scenario/assertions/Assertions.java
+1
-0
backend/src/main/java/io/metersphere/api/jmeter/JMeterService.java
...rc/main/java/io/metersphere/api/jmeter/JMeterService.java
+2
-0
backend/src/main/java/io/metersphere/base/mapper/ext/ExtTestCaseMapper.xml
...java/io/metersphere/base/mapper/ext/ExtTestCaseMapper.xml
+1
-0
backend/src/main/java/io/metersphere/track/service/TestCaseService.java
...in/java/io/metersphere/track/service/TestCaseService.java
+0
-12
frontend/src/business/components/api/test/components/assertion/ApiAssertionJsonPath.vue
...ts/api/test/components/assertion/ApiAssertionJsonPath.vue
+93
-0
frontend/src/business/components/api/test/components/assertion/ApiAssertionRegex.vue
...nents/api/test/components/assertion/ApiAssertionRegex.vue
+1
-1
frontend/src/business/components/api/test/components/assertion/ApiAssertions.vue
...omponents/api/test/components/assertion/ApiAssertions.vue
+6
-1
frontend/src/business/components/api/test/components/assertion/ApiAssertionsEdit.vue
...nents/api/test/components/assertion/ApiAssertionsEdit.vue
+15
-1
frontend/src/business/components/api/test/components/extract/ApiExtractCommon.vue
...mponents/api/test/components/extract/ApiExtractCommon.vue
+1
-1
frontend/src/business/components/api/test/model/JMX.js
frontend/src/business/components/api/test/model/JMX.js
+14
-0
frontend/src/business/components/api/test/model/ScenarioModel.js
...d/src/business/components/api/test/model/ScenarioModel.js
+32
-10
frontend/src/business/components/project/MsProject.vue
frontend/src/business/components/project/MsProject.vue
+2
-2
frontend/src/business/components/settings/organization/OrganizationMember.vue
...s/components/settings/organization/OrganizationMember.vue
+9
-16
frontend/src/business/components/track/case/components/TestCaseEdit.vue
...usiness/components/track/case/components/TestCaseEdit.vue
+1
-1
frontend/src/i18n/en-US.js
frontend/src/i18n/en-US.js
+1
-0
frontend/src/i18n/zh-CN.js
frontend/src/i18n/zh-CN.js
+1
-0
frontend/src/i18n/zh-TW.js
frontend/src/i18n/zh-TW.js
+1
-0
未找到文件。
backend/src/main/java/io/metersphere/api/dto/scenario/assertions/AssertionJsonPath.java
0 → 100644
浏览文件 @
1b0dc296
package
io.metersphere.api.dto.scenario.assertions
;
import
lombok.Data
;
import
lombok.EqualsAndHashCode
;
@EqualsAndHashCode
(
callSuper
=
true
)
@Data
public
class
AssertionJsonPath
extends
AssertionType
{
private
String
expect
;
private
String
expression
;
private
String
description
;
public
AssertionJsonPath
()
{
setType
(
AssertionType
.
JSON_PATH
);
}
}
backend/src/main/java/io/metersphere/api/dto/scenario/assertions/AssertionType.java
浏览文件 @
1b0dc296
...
...
@@ -6,6 +6,7 @@ import lombok.Data;
public
class
AssertionType
{
public
final
static
String
REGEX
=
"Regex"
;
public
final
static
String
DURATION
=
"Duration"
;
public
final
static
String
JSON_PATH
=
"JSONPath"
;
public
final
static
String
TEXT
=
"Text"
;
private
String
type
;
...
...
backend/src/main/java/io/metersphere/api/dto/scenario/assertions/Assertions.java
浏览文件 @
1b0dc296
...
...
@@ -7,5 +7,6 @@ import java.util.List;
@Data
public
class
Assertions
{
private
List
<
AssertionRegex
>
regex
;
private
List
<
AssertionJsonPath
>
jsonPath
;
private
AssertionDuration
duration
;
}
backend/src/main/java/io/metersphere/api/jmeter/JMeterService.java
浏览文件 @
1b0dc296
package
io.metersphere.api.jmeter
;
import
io.metersphere.commons.exception.MSException
;
import
io.metersphere.commons.utils.LogUtil
;
import
io.metersphere.config.JmeterProperties
;
import
io.metersphere.i18n.Translator
;
import
org.apache.jmeter.config.Arguments
;
...
...
@@ -33,6 +34,7 @@ public class JMeterService {
LocalRunner
runner
=
new
LocalRunner
(
testPlan
);
runner
.
run
();
}
catch
(
Exception
e
)
{
LogUtil
.
error
(
e
.
getMessage
(),
e
);
MSException
.
throwException
(
Translator
.
get
(
"api_load_script_error"
));
}
}
...
...
backend/src/main/java/io/metersphere/base/mapper/ext/ExtTestCaseMapper.xml
浏览文件 @
1b0dc296
...
...
@@ -225,6 +225,7 @@
</foreach>
</if>
</where>
order by update_time desc
</select>
<select
id=
"getMaxNumByProjectId"
resultType=
"io.metersphere.base.domain.TestCase"
>
...
...
backend/src/main/java/io/metersphere/track/service/TestCaseService.java
浏览文件 @
1b0dc296
...
...
@@ -358,7 +358,6 @@ public class TestCaseService {
private
List
<
TestCaseExcelData
>
generateTestCaseExcel
(
TestCaseBatchRequest
request
)
{
List
<
TestCaseDTO
>
TestCaseList
=
extTestCaseMapper
.
listByTestCaseIds
(
request
);
List
<
TestCaseExcelData
>
list
=
new
ArrayList
<>();
SessionUser
user
=
SessionUtils
.
getUser
();
StringBuilder
step
=
new
StringBuilder
(
""
);
StringBuilder
result
=
new
StringBuilder
(
""
);
TestCaseList
.
forEach
(
t
->
{
...
...
@@ -395,18 +394,7 @@ public class TestCaseService {
}
data
.
setMaintainer
(
t
.
getMaintainer
());
list
.
add
(
data
);
});
list
.
add
(
new
TestCaseExcelData
());
TestCaseExcelData
explain
=
new
TestCaseExcelData
();
explain
.
setName
(
Translator
.
get
(
"do_not_modify_header_order"
));
explain
.
setNodePath
(
Translator
.
get
(
"module_created_automatically"
));
explain
.
setType
(
Translator
.
get
(
"options"
)
+
"(functional、performance、api)"
);
explain
.
setMethod
(
Translator
.
get
(
"options"
)
+
"(manual、auto)"
);
explain
.
setPriority
(
Translator
.
get
(
"options"
)
+
"(P0、P1、P2、P3)"
);
explain
.
setMaintainer
(
Translator
.
get
(
"please_input_workspace_member"
));
list
.
add
(
explain
);
return
list
;
}
...
...
frontend/src/business/components/api/test/components/assertion/ApiAssertionJsonPath.vue
0 → 100644
浏览文件 @
1b0dc296
<
template
>
<div>
<el-row
:gutter=
"10"
type=
"flex"
justify=
"space-between"
align=
"middle"
>
<el-col>
<el-input
:disabled=
"isReadOnly"
v-model=
"jsonPath.expression"
maxlength=
"200"
size=
"small"
show-word-limit
:placeholder=
"$t('api_test.request.extract.json_path_expression')"
/>
</el-col>
<el-col>
<el-input
:disabled=
"isReadOnly"
v-model=
"jsonPath.expect"
maxlength=
"2000"
size=
"small"
show-word-limit
:placeholder=
"$t('api_test.request.assertions.expect')"
/>
</el-col>
<el-col
class=
"assertion-btn"
>
<el-button
:disabled=
"isReadOnly"
type=
"danger"
size=
"mini"
icon=
"el-icon-delete"
circle
@
click=
"remove"
v-if=
"edit"
/>
<el-button
:disabled=
"isReadOnly"
type=
"primary"
size=
"small"
@
click=
"add"
v-else
>
Add
</el-button>
</el-col>
</el-row>
</div>
</
template
>
<
script
>
import
{
JSONPath
}
from
"
../../model/ScenarioModel
"
;
export
default
{
name
:
"
MsApiAssertionJsonPath
"
,
props
:
{
jsonPath
:
{
type
:
JSONPath
,
default
:
()
=>
{
return
new
JSONPath
();
}
},
edit
:
{
type
:
Boolean
,
default
:
false
},
index
:
Number
,
list
:
Array
,
callback
:
Function
,
isReadOnly
:
{
type
:
Boolean
,
default
:
false
}
},
data
()
{
return
{
}
},
watch
:
{
'
jsonPath.expect
'
()
{
this
.
setJSONPathDescription
();
},
'
jsonPath.expression
'
()
{
this
.
setJSONPathDescription
();
}
},
methods
:
{
add
:
function
()
{
this
.
list
.
push
(
this
.
getJSONPath
());
this
.
callback
();
},
remove
:
function
()
{
this
.
list
.
splice
(
this
.
index
,
1
);
},
getJSONPath
()
{
let
jsonPath
=
new
JSONPath
(
this
.
jsonPath
);
jsonPath
.
description
=
jsonPath
.
expression
+
"
expect:
"
+
(
jsonPath
.
expect
?
jsonPath
.
expect
:
''
);
return
jsonPath
;
},
setJSONPathDescription
()
{
this
.
jsonPath
.
description
=
this
.
jsonPath
.
expression
+
"
expect:
"
+
(
this
.
jsonPath
.
expect
?
this
.
jsonPath
.
expect
:
''
);
}
}
}
</
script
>
<
style
scoped
>
.assertion-select
{
width
:
250px
;
}
.assertion-item
{
width
:
100%
;
}
.assertion-btn
{
text-align
:
center
;
width
:
60px
;
}
</
style
>
frontend/src/business/components/api/test/components/assertion/ApiAssertionRegex.vue
浏览文件 @
1b0dc296
...
...
@@ -10,7 +10,7 @@
</el-select>
</el-col>
<el-col>
<el-input
:disabled=
"isReadOnly"
v-model=
"regex.expression"
maxlength=
"2
55
"
size=
"small"
show-word-limit
<el-input
:disabled=
"isReadOnly"
v-model=
"regex.expression"
maxlength=
"2
000
"
size=
"small"
show-word-limit
:placeholder=
"$t('api_test.request.assertions.expression')"
/>
</el-col>
<el-col
class=
"assertion-btn"
>
...
...
frontend/src/business/components/api/test/components/assertion/ApiAssertions.vue
浏览文件 @
1b0dc296
...
...
@@ -7,12 +7,14 @@
size=
"small"
>
<el-option
:label=
"$t('api_test.request.assertions.text')"
:value=
"options.TEXT"
/>
<el-option
:label=
"$t('api_test.request.assertions.regex')"
:value=
"options.REGEX"
/>
<el-option
:label=
"'JSONPath'"
:value=
"options.JSON_PATH"
/>
<el-option
:label=
"$t('api_test.request.assertions.response_time')"
:value=
"options.DURATION"
/>
</el-select>
</el-col>
<el-col
:span=
"20"
>
<ms-api-assertion-text
:is-read-only=
"isReadOnly"
:list=
"assertions.regex"
v-if=
"type === options.TEXT"
:callback=
"after"
/>
<ms-api-assertion-regex
:is-read-only=
"isReadOnly"
:list=
"assertions.regex"
v-if=
"type === options.REGEX"
:callback=
"after"
/>
<ms-api-assertion-json-path
:is-read-only=
"isReadOnly"
:list=
"assertions.jsonPath"
v-if=
"type === options.JSON_PATH"
:callback=
"after"
/>
<ms-api-assertion-duration
:is-read-only=
"isReadOnly"
v-model=
"time"
:duration=
"assertions.duration"
v-if=
"type === options.DURATION"
:callback=
"after"
/>
<el-button
v-if=
"!type"
:disabled=
"true"
type=
"primary"
size=
"small"
>
Add
</el-button>
...
...
@@ -30,11 +32,14 @@
import
MsApiAssertionDuration
from
"
./ApiAssertionDuration
"
;
import
{
ASSERTION_TYPE
,
Assertions
}
from
"
../../model/ScenarioModel
"
;
import
MsApiAssertionsEdit
from
"
./ApiAssertionsEdit
"
;
import
MsApiAssertionJsonPath
from
"
./ApiAssertionJsonPath
"
;
export
default
{
name
:
"
MsApiAssertions
"
,
components
:
{
MsApiAssertionsEdit
,
MsApiAssertionDuration
,
MsApiAssertionRegex
,
MsApiAssertionText
},
components
:
{
MsApiAssertionJsonPath
,
MsApiAssertionsEdit
,
MsApiAssertionDuration
,
MsApiAssertionRegex
,
MsApiAssertionText
},
props
:
{
assertions
:
Assertions
,
...
...
frontend/src/business/components/api/test/components/assertion/ApiAssertionsEdit.vue
浏览文件 @
1b0dc296
...
...
@@ -9,6 +9,15 @@
</div>
</div>
<div
class=
"assertion-item-editing json_path"
v-if=
"assertions.jsonPath.length > 0"
>
<div>
{{
'
JSONPath
'
}}
</div>
<div
class=
"regex-item"
v-for=
"(jsonPath, index) in assertions.jsonPath"
:key=
"index"
>
<ms-api-assertion-json-path
:is-read-only=
"isReadOnly"
:list=
"assertions.jsonPath"
:json-path=
"jsonPath"
:edit=
"true"
:index=
"index"
/>
</div>
</div>
<div
class=
"assertion-item-editing response-time"
v-if=
"isShow"
>
<div>
{{
$t
(
"
api_test.request.assertions.response_time
"
)
}}
...
...
@@ -23,11 +32,12 @@
import
MsApiAssertionRegex
from
"
./ApiAssertionRegex
"
;
import
MsApiAssertionDuration
from
"
./ApiAssertionDuration
"
;
import
{
Assertions
}
from
"
../../model/ScenarioModel
"
;
import
MsApiAssertionJsonPath
from
"
./ApiAssertionJsonPath
"
;
export
default
{
name
:
"
MsApiAssertionsEdit
"
,
components
:
{
MsApiAssertionDuration
,
MsApiAssertionRegex
},
components
:
{
MsApiAssertion
JsonPath
,
MsApiAssertion
Duration
,
MsApiAssertionRegex
},
props
:
{
assertions
:
Assertions
,
...
...
@@ -56,6 +66,10 @@
border-left
:
2px
solid
#7B0274
;
}
.assertion-item-editing.json_path
{
border-left
:
2px
solid
#44B3D2
;
}
.assertion-item-editing.response-time
{
border-left
:
2px
solid
#DD0240
;
}
...
...
frontend/src/business/components/api/test/components/extract/ApiExtractCommon.vue
浏览文件 @
1b0dc296
...
...
@@ -11,7 +11,7 @@
@
change=
"change"
show-word-limit
:placeholder=
"$t('api_test.variable_name')"
/>
</el-col>
<el-col>
<el-input
:disabled=
"isReadOnly"
v-model=
"common.expression"
maxlength=
"2
55
"
size=
"small"
show-word-limit
<el-input
:disabled=
"isReadOnly"
v-model=
"common.expression"
maxlength=
"2
000
"
size=
"small"
show-word-limit
:placeholder=
"expression"
/>
</el-col>
<el-col
class=
"extract-btn"
>
...
...
frontend/src/business/components/api/test/model/JMX.js
浏览文件 @
1b0dc296
...
...
@@ -352,6 +352,20 @@ export class ResponseAssertion extends DefaultTestElement {
}
}
export
class
JSONPathAssertion
extends
DefaultTestElement
{
constructor
(
testName
,
jsonPath
)
{
super
(
'
JSONPathAssertion
'
,
'
JSONPathAssertionGui
'
,
'
JSONPathAssertion
'
,
testName
);
this
.
jsonPath
=
jsonPath
||
{};
this
.
stringProp
(
'
JSON_PATH
'
,
this
.
jsonPath
.
expression
);
this
.
stringProp
(
'
EXPECTED_VALUE
'
,
this
.
jsonPath
.
expect
);
this
.
boolProp
(
'
JSONVALIDATION
'
,
true
);
this
.
boolProp
(
'
EXPECT_NULL
'
,
false
);
this
.
boolProp
(
'
INVERT
'
,
false
);
this
.
boolProp
(
'
ISREGEX
'
,
true
);
}
}
export
class
ResponseCodeAssertion
extends
ResponseAssertion
{
constructor
(
testName
,
type
,
value
,
message
)
{
let
assertion
=
{
...
...
frontend/src/business/components/api/test/model/ScenarioModel.js
浏览文件 @
1b0dc296
...
...
@@ -12,7 +12,7 @@ import {
ResponseCodeAssertion
,
ResponseDataAssertion
,
ResponseHeadersAssertion
,
RegexExtractor
,
JSONPostProcessor
,
XPath2Extractor
,
DubboSample
,
RegexExtractor
,
JSONPostProcessor
,
XPath2Extractor
,
DubboSample
,
JSONPathAssertion
,
}
from
"
./JMX
"
;
export
const
uuid
=
function
()
{
...
...
@@ -47,6 +47,7 @@ export const BODY_FORMAT = {
export
const
ASSERTION_TYPE
=
{
TEXT
:
"
Text
"
,
REGEX
:
"
Regex
"
,
JSON_PATH
:
"
JSON
"
,
DURATION
:
"
Duration
"
}
...
...
@@ -358,12 +359,6 @@ export class DubboRequest extends Request {
info
:
'
api_test.request.dubbo.input_method
'
}
}
if
(
!
this
.
configCenter
.
isValid
())
{
return
{
isValid
:
false
,
info
:
'
api_test.request.dubbo.input_config_center
'
}
}
if
(
!
this
.
registryCenter
.
isValid
())
{
return
{
isValid
:
false
,
...
...
@@ -514,10 +509,11 @@ export class Assertions extends BaseConfig {
super
();
this
.
text
=
[];
this
.
regex
=
[];
this
.
jsonPath
=
[];
this
.
duration
=
undefined
;
this
.
set
(
options
);
this
.
sets
({
text
:
Text
,
regex
:
Regex
},
options
);
this
.
sets
({
text
:
Text
,
regex
:
Regex
,
jsonPath
:
JSONPath
},
options
);
}
initOptions
(
options
)
{
...
...
@@ -560,6 +556,21 @@ export class Regex extends AssertionType {
}
}
export
class
JSONPath
extends
AssertionType
{
constructor
(
options
)
{
super
(
ASSERTION_TYPE
.
JSON_PATH
);
this
.
expression
=
undefined
;
this
.
expect
=
undefined
;
this
.
description
=
undefined
;
this
.
set
(
options
);
}
isValid
()
{
return
!!
this
.
expression
;
}
}
export
class
Duration
extends
AssertionType
{
constructor
(
options
)
{
super
(
ASSERTION_TYPE
.
DURATION
);
...
...
@@ -886,7 +897,13 @@ class JMXGenerator {
let
assertions
=
request
.
assertions
;
if
(
assertions
.
regex
.
length
>
0
)
{
assertions
.
regex
.
filter
(
this
.
filter
).
forEach
(
regex
=>
{
httpSamplerProxy
.
put
(
this
.
getAssertion
(
regex
));
httpSamplerProxy
.
put
(
this
.
getResponseAssertion
(
regex
));
})
}
if
(
assertions
.
jsonPath
.
length
>
0
)
{
assertions
.
jsonPath
.
filter
(
this
.
filter
).
forEach
(
item
=>
{
httpSamplerProxy
.
put
(
this
.
getJSONPathAssertion
(
item
));
})
}
...
...
@@ -896,7 +913,12 @@ class JMXGenerator {
}
}
getAssertion
(
regex
)
{
getJSONPathAssertion
(
jsonPath
)
{
let
name
=
jsonPath
.
description
;
return
new
JSONPathAssertion
(
name
,
jsonPath
);
}
getResponseAssertion
(
regex
)
{
let
name
=
regex
.
description
;
let
type
=
JMX_ASSERTION_CONDITION
.
CONTAINS
;
// 固定用Match,自己写正则
let
value
=
regex
.
expression
;
...
...
frontend/src/business/components/project/MsProject.vue
浏览文件 @
1b0dc296
...
...
@@ -106,10 +106,10 @@
rules
:
{
name
:
[
{
required
:
true
,
message
:
this
.
$t
(
'
project.input_name
'
),
trigger
:
'
blur
'
},
{
min
:
2
,
max
:
25
,
message
:
this
.
$t
(
'
commons.input_limit
'
,
[
2
,
25
]),
trigger
:
'
blur
'
}
{
min
:
2
,
max
:
50
,
message
:
this
.
$t
(
'
commons.input_limit
'
,
[
2
,
50
]),
trigger
:
'
blur
'
}
],
description
:
[
{
max
:
50
,
message
:
this
.
$t
(
'
commons.input_limit
'
,
[
0
,
5
0
]),
trigger
:
'
blur
'
}
{
max
:
50
0
,
message
:
this
.
$t
(
'
commons.input_limit
'
,
[
0
,
50
0
]),
trigger
:
'
blur
'
}
],
},
}
...
...
frontend/src/business/components/settings/organization/OrganizationMember.vue
浏览文件 @
1b0dc296
...
...
@@ -28,8 +28,8 @@
<el-dialog
:title=
"$t('member.create')"
:visible.sync=
"createVisible"
width=
"30%"
:destroy-on-close=
"true"
@
close=
"handleClose"
>
<el-form
:model=
"form"
ref=
"form"
:rules=
"rules"
label-position=
"right"
label-width=
"100px"
size=
"small"
>
<el-form-item
:label=
"$t('commons.member')"
prop=
"ids"
:rules=
"{required: true, message: $t('member.input_id_or_email'), trigger: 'blur'}"
>
<el-form-item
:label=
"$t('commons.member')"
prop=
"ids"
:rules=
"{required: true, message: $t('member.input_id_or_email'), trigger: 'blur'}"
>
<el-select
v-model=
"form.ids"
multiple
...
...
@@ -51,9 +51,9 @@
<span
class=
"org-member-email"
>
{{
item
.
email
}}
</span>
</
template
>
</el-option>
</el-select>
</el-form-item>
<el-form-item
:label=
"$t('commons.role')"
prop=
"roleIds"
>
<el-select
v-model=
"form.roleIds"
multiple
:placeholder=
"$t('role.please_choose_role')"
class=
"select-width"
>
<el-option
...
...
@@ -65,6 +65,7 @@
</el-select>
</el-form-item>
</el-form>
<
template
v-slot:footer
>
<ms-dialog-footer
@
cancel=
"createVisible = false"
...
...
@@ -87,7 +88,8 @@
<el-form-item
:label=
"$t('commons.phone')"
prop=
"phone"
>
<el-input
v-model=
"form.phone"
autocomplete=
"off"
:disabled=
"true"
/>
</el-form-item>
<el-form-item
:label=
"$t('commons.role')"
prop=
"roleIds"
:rules=
"{required: true, message: $t('role.please_choose_role'), trigger: 'change'}"
>
<el-form-item
:label=
"$t('commons.role')"
prop=
"roleIds"
:rules=
"{required: true, message: $t('role.please_choose_role'), trigger: 'change'}"
>
<el-select
v-model=
"form.roleIds"
multiple
:placeholder=
"$t('role.please_choose_role')"
class=
"select-width"
>
<el-option
v-for=
"item in form.allroles"
...
...
@@ -127,7 +129,6 @@
result
:
{},
createVisible
:
false
,
updateVisible
:
false
,
userList
:
[],
form
:
{},
queryPath
:
"
/user/org/member/list
"
,
condition
:
{},
...
...
@@ -146,7 +147,6 @@
total
:
0
,
options
:
[],
loading
:
false
,
ids
:
[]
}
},
methods
:
{
...
...
@@ -184,7 +184,7 @@
let
roleIds
=
this
.
form
.
roles
.
map
(
r
=>
r
.
id
);
this
.
result
=
this
.
$get
(
'
/role/list/org
'
,
response
=>
{
this
.
$set
(
this
.
form
,
"
allroles
"
,
response
.
data
);
})
})
;
// 编辑使填充角色信息
this
.
$set
(
this
.
form
,
'
roleIds
'
,
roleIds
);
},
...
...
@@ -196,7 +196,7 @@
phone
:
this
.
form
.
phone
,
roleIds
:
this
.
form
.
roleIds
,
organizationId
:
this
.
currentUser
().
lastOrganizationId
}
}
;
this
.
$refs
[
formName
].
validate
((
valid
)
=>
{
if
(
valid
)
{
this
.
result
=
this
.
$post
(
"
/organization/member/update
"
,
param
,
()
=>
{
...
...
@@ -229,9 +229,6 @@
}
this
.
form
=
{};
this
.
createVisible
=
true
;
// this.result = this.$get('/user/list/', response => {
// this.userList = response.data;
// });
this
.
result
=
this
.
$get
(
'
/role/list/org
'
,
response
=>
{
this
.
$set
(
this
.
form
,
"
roles
"
,
response
.
data
);
})
...
...
@@ -256,7 +253,7 @@
});
},
remoteMethod
(
query
)
{
query
=
query
.
trim
()
query
=
query
.
trim
()
;
if
(
query
!==
''
)
{
this
.
loading
=
true
;
setTimeout
(()
=>
{
...
...
@@ -285,10 +282,6 @@
font-size
:
13px
;
}
.input-with-autocomplete
{
width
:
100%
;
}
.select-width
{
width
:
100%
;
}
...
...
frontend/src/business/components/track/case/components/TestCaseEdit.vue
浏览文件 @
1b0dc296
...
...
@@ -175,7 +175,7 @@
icon=
"el-icon-delete"
circle
size=
"mini"
@
click=
"handleDeleteStep(scope.$index, scope.row)"
:disabled=
"readOnly ||
scope.$index == 0 ? true : false
"
></el-button>
:disabled=
"readOnly ||
(scope.$index == 0 && form.steps.length
<
=
1)
"
></el-button>
</
template
>
</el-table-column>
</el-table>
...
...
frontend/src/i18n/en-US.js
浏览文件 @
1b0dc296
...
...
@@ -404,6 +404,7 @@ export default {
start_with
:
"
Start with
"
,
end_with
:
"
End With
"
,
value
:
"
Value
"
,
expect
:
"
Expect Value
"
,
expression
:
"
Expression
"
,
response_in_time
:
"
Response in time
"
,
},
...
...
frontend/src/i18n/zh-CN.js
浏览文件 @
1b0dc296
...
...
@@ -402,6 +402,7 @@ export default {
start_with
:
"
以...开始
"
,
end_with
:
"
以...结束
"
,
value
:
"
值
"
,
expect
:
"
期望值
"
,
expression
:
"
Perl型正则表达式
"
,
response_in_time
:
"
响应时间在...毫秒以内
"
,
},
...
...
frontend/src/i18n/zh-TW.js
浏览文件 @
1b0dc296
...
...
@@ -403,6 +403,7 @@ export default {
start_with
:
"
以…開始
"
,
end_with
:
"
以…結束
"
,
value
:
"
值
"
,
expect
:
"
期望值
"
,
expression
:
"
Perl型規則運算式
"
,
response_in_time
:
"
回應時間在…毫秒以內
"
,
},
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录