+
@@ -110,6 +110,7 @@
props: ['testPlan'],
data() {
return {
+ result: {},
threadNumber: 10,
duration: 10,
rampUpTime: 10,
@@ -148,8 +149,12 @@
},
methods: {
getResourcePools() {
- this.$get('/testresourcepool/list/all/valid', response => {
+ this.result = this.$get('/testresourcepool/list/all/valid', response => {
this.resourcePools = response.data;
+ // 如果当前的资源池无效 设置 null
+ if (response.data.filter(p => p.id === this.resourcePool).length === 0) {
+ this.resourcePool = null;
+ }
})
},
getLoadConfig(testId) {
diff --git a/frontend/src/business/components/settings/Setting.vue b/frontend/src/business/components/settings/Setting.vue
index 22e37acc4a..e741a6dfb9 100644
--- a/frontend/src/business/components/settings/Setting.vue
+++ b/frontend/src/business/components/settings/Setting.vue
@@ -7,7 +7,9 @@
-
+
+
+
diff --git a/frontend/src/business/components/settings/SettingMenu.vue b/frontend/src/business/components/settings/SettingMenu.vue
index 57bce97947..803f3bab74 100644
--- a/frontend/src/business/components/settings/SettingMenu.vue
+++ b/frontend/src/business/components/settings/SettingMenu.vue
@@ -28,6 +28,7 @@
{{$t('commons.workspace')}}
{{$t('commons.member')}}
+
测试报告模版
diff --git a/frontend/src/business/components/settings/organization/OrganizationMember.vue b/frontend/src/business/components/settings/organization/OrganizationMember.vue
index 7adee98ff6..22fe460ff9 100644
--- a/frontend/src/business/components/settings/organization/OrganizationMember.vue
+++ b/frontend/src/business/components/settings/organization/OrganizationMember.vue
@@ -2,7 +2,7 @@
-
@@ -162,9 +162,6 @@
buildPagePath(path) {
return path + "/" + this.currentPage + "/" + this.pageSize;
},
- search() {
- this.initTableData();
- },
closeFunc() {
this.form = {};
this.initTableData();
diff --git a/frontend/src/business/components/settings/organization/OrganizationWorkspace.vue b/frontend/src/business/components/settings/organization/OrganizationWorkspace.vue
index 8e1de010f3..027c90d6de 100644
--- a/frontend/src/business/components/settings/organization/OrganizationWorkspace.vue
+++ b/frontend/src/business/components/settings/organization/OrganizationWorkspace.vue
@@ -2,7 +2,7 @@
-
@@ -46,7 +46,7 @@
-
@@ -69,7 +69,7 @@
-
@@ -202,16 +202,13 @@
type: 'warning'
}).then(() => {
this.$get('/workspace/delete/' + row.id, () => {
- Message.success(this.$t('commons.delete_success'));
+ this.$success(this.$t('commons.delete_success'));
this.list();
});
}).catch(() => {
});
},
- search() {
- this.list();
- },
list() {
let url = '/workspace/list/' + this.currentPage + '/' + this.pageSize;
let lastOrganizationId = this.currentUser.lastOrganizationId;
@@ -274,7 +271,7 @@
this.dialogTotal = data.itemCount;
});
},
- wsMemberList() {
+ dialogSearch() {
let row = this.currentWorkspaceRow;
this.dialogWsMemberVisible = true;
let param = this.dialogCondition;
diff --git a/frontend/src/business/components/settings/system/Organization.vue b/frontend/src/business/components/settings/system/Organization.vue
index 01d3042f3e..6df8ccbebd 100644
--- a/frontend/src/business/components/settings/system/Organization.vue
+++ b/frontend/src/business/components/settings/system/Organization.vue
@@ -32,7 +32,7 @@
-
@@ -55,7 +55,7 @@
-
@@ -220,7 +220,7 @@
rule: {
name: [
{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: 50, message: this.$t('commons.input_limit', [2, 50]), trigger: 'blur'},
{
required: true,
pattern: /^[\u4e00-\u9fa5_a-zA-Z0-9.·-]+$/,
@@ -295,7 +295,7 @@
this.dialogTotal = data.itemCount;
});
},
- orgMemberList() {
+ dialogSearch() {
let row = this.currentRow;
this.dialogOrgMemberVisible = true;
let param = this.dialogCondition;
@@ -322,7 +322,7 @@
}).then(() => {
this.result = this.$get(this.deletePath + row.id, () => {
this.$success(this.$t('commons.delete_success'));
- this.initTableData()
+ this.initTableData();
});
}).catch(() => {
this.$info(this.$t('commons.delete_cancel'));
@@ -343,8 +343,8 @@
});
},
createOrganization(createOrganizationForm) {
- this.$refs[createOrganizationForm].validate(valide => {
- if (valide) {
+ this.$refs[createOrganizationForm].validate(valid => {
+ if (valid) {
this.result = this.$post(this.createPath, this.form, () => {
this.$success(this.$t('commons.save_success'));
this.initTableData();
@@ -355,11 +355,11 @@
}
})
},
- updateOrganization(udpateOrganizationForm) {
- this.$refs[udpateOrganizationForm].validate(valide => {
- if (valide) {
+ updateOrganization(updateOrganizationForm) {
+ this.$refs[updateOrganizationForm].validate(valid => {
+ if (valid) {
this.result = this.$post(this.updatePath, this.form, () => {
- this.$success(this.$t('commons.modify_success'))
+ this.$success(this.$t('commons.modify_success'));
this.dialogOrgUpdateVisible = false;
this.initTableData();
});
@@ -423,7 +423,7 @@
organizationId: this.currentRow.id
}
this.result = this.$post("/organization/member/update", param, () => {
- this.$success(this.$t('commons.modify_success'))
+ this.$success(this.$t('commons.modify_success'));
this.dialogOrgMemberUpdateVisible = false;
this.cellClick(this.currentRow);
});
diff --git a/frontend/src/business/components/settings/system/SystemWorkspace.vue b/frontend/src/business/components/settings/system/SystemWorkspace.vue
index f9d652ebab..42b247a3ff 100644
--- a/frontend/src/business/components/settings/system/SystemWorkspace.vue
+++ b/frontend/src/business/components/settings/system/SystemWorkspace.vue
@@ -2,7 +2,7 @@
-
@@ -87,7 +87,7 @@
-
@@ -110,7 +110,7 @@
-
@@ -262,7 +262,7 @@
this.dialogTotal = data.itemCount;
});
},
- wsMemberList() {
+ dialogSearch() {
let row = this.currentWorkspaceRow;
this.dialogWsMemberVisible = true;
let param = this.dialogCondition;
@@ -324,9 +324,6 @@
this.memberLineData = [];
this.list();
},
- search() {
- this.list();
- },
list() {
let url = '/workspace/list/all/' + this.currentPage + '/' + this.pageSize;
this.result = this.$post(url, this.condition, response => {
diff --git a/frontend/src/business/components/settings/system/User.vue b/frontend/src/business/components/settings/system/User.vue
index ac4fcfd490..44bffab1f6 100644
--- a/frontend/src/business/components/settings/system/User.vue
+++ b/frontend/src/business/components/settings/system/User.vue
@@ -170,27 +170,18 @@
type: 'warning'
}).then(() => {
this.result = this.$get(this.deletePath + row.id, () => {
- this.$message({
- type: 'success',
- message: this.$t('commons.delete_success')
- });
+ this.$success(this.$t('commons.delete_success'));
this.search();
});
}).catch(() => {
- this.$message({
- type: 'info',
- message: this.$t('commons.delete_cancel')
- });
+ this.$info(this.$t('commons.delete_cancel'));
});
},
createUser(createUserForm) {
- this.$refs[createUserForm].validate(valide => {
- if (valide) {
+ this.$refs[createUserForm].validate(valid => {
+ if (valid) {
this.result = this.$post(this.createPath, this.form, () => {
- this.$message({
- type: 'success',
- message: this.$t('commons.save_success')
- });
+ this.$success(this.$t('commons.save_success'));
this.search();
this.createVisible = false;
});
@@ -200,13 +191,10 @@
})
},
updateUser(updateUserForm) {
- this.$refs[updateUserForm].validate(valide => {
- if (valide) {
+ this.$refs[updateUserForm].validate(valid => {
+ if (valid) {
this.result = this.$post(this.updatePath, this.form, () => {
- this.$message({
- type: 'success',
- message: this.$t('commons.modify_success')
- });
+ this.$success(this.$t('commons.modify_success'));
this.updateVisible = false;
this.search();
});
@@ -227,10 +215,7 @@
},
changeSwitch(row) {
this.$post(this.updatePath, row, () => {
- this.$message({
- type: 'success',
- message: this.$t('commons.modify_success')
- });
+ this.$success(this.$t('commons.modify_success'));
})
},
buildPagePath(path) {
diff --git a/frontend/src/business/components/settings/workspace/TestCaseReportTemplate.vue b/frontend/src/business/components/settings/workspace/TestCaseReportTemplate.vue
new file mode 100644
index 0000000000..2ba4b56aab
--- /dev/null
+++ b/frontend/src/business/components/settings/workspace/TestCaseReportTemplate.vue
@@ -0,0 +1,74 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/frontend/src/business/components/settings/workspace/WorkspaceMember.vue b/frontend/src/business/components/settings/workspace/WorkspaceMember.vue
index 3734d48a2f..0cb53f56bd 100644
--- a/frontend/src/business/components/settings/workspace/WorkspaceMember.vue
+++ b/frontend/src/business/components/settings/workspace/WorkspaceMember.vue
@@ -2,7 +2,7 @@
-
@@ -167,15 +167,12 @@
buildPagePath(path) {
return path + "/" + this.currentPage + "/" + this.pageSize;
},
- search() {
- this.initTableData();
- },
closeFunc() {
this.form = {};
this.initTableData();
},
del(row) {
- this.$confirm('移除该成员, 是否继续?', '提示', {
+ this.$confirm(this.$t('member.delete_confirm'), '', {
confirmButtonText: this.$t('commons.confirm'),
cancelButtonText: this.$t('commons.cancel'),
type: 'warning'
@@ -224,7 +221,7 @@
};
let wsId = this.currentUser().lastWorkspaceId;
if (typeof wsId == "undefined" || wsId == null || wsId == "") {
- this.$warning("请先选择工作空间!");
+ this.$warning(this.$t('workspace.please_select_a_workspace_first'));
return false;
}
this.$post('/user/org/member/list/all', param, response => {
diff --git a/frontend/src/business/components/settings/workspace/components/TemplateComponent/BaseInfoComponent.vue b/frontend/src/business/components/settings/workspace/components/TemplateComponent/BaseInfoComponent.vue
new file mode 100644
index 0000000000..819330b168
--- /dev/null
+++ b/frontend/src/business/components/settings/workspace/components/TemplateComponent/BaseInfoComponent.vue
@@ -0,0 +1,81 @@
+
+
+
+
+
+
+
+ 所属项目:
+ {{reportInfo.project}}
+
+
+ 测试负责人:
+ {{reportInfo.principal}}
+
+
+
+
+
+ 开始时间:
+ {{reportInfo.startTime}}
+
+
+ 结束时间:
+ {{reportInfo.endTime}}
+
+
+
+
+
+ 测试执行人:
+ {{item}}
+
+
+
+
+
+
+
+
+
+
diff --git a/frontend/src/business/components/settings/workspace/components/TemplateComponent/CommonComponent.vue b/frontend/src/business/components/settings/workspace/components/TemplateComponent/CommonComponent.vue
new file mode 100644
index 0000000000..6bd02f0789
--- /dev/null
+++ b/frontend/src/business/components/settings/workspace/components/TemplateComponent/CommonComponent.vue
@@ -0,0 +1,43 @@
+
+
+
+
+
+ {{title}}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/frontend/src/business/components/settings/workspace/components/TemplateComponent/TestResultChartComponent.vue b/frontend/src/business/components/settings/workspace/components/TemplateComponent/TestResultChartComponent.vue
new file mode 100644
index 0000000000..0e6cfbfc8b
--- /dev/null
+++ b/frontend/src/business/components/settings/workspace/components/TemplateComponent/TestResultChartComponent.vue
@@ -0,0 +1,67 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/frontend/src/business/components/settings/workspace/components/TemplateComponent/TestResultComponent.vue b/frontend/src/business/components/settings/workspace/components/TemplateComponent/TestResultComponent.vue
new file mode 100644
index 0000000000..c64ea50889
--- /dev/null
+++ b/frontend/src/business/components/settings/workspace/components/TemplateComponent/TestResultComponent.vue
@@ -0,0 +1,76 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/frontend/src/business/components/settings/workspace/components/TemplateComponentBar.vue b/frontend/src/business/components/settings/workspace/components/TemplateComponentBar.vue
new file mode 100644
index 0000000000..697cf4711a
--- /dev/null
+++ b/frontend/src/business/components/settings/workspace/components/TemplateComponentBar.vue
@@ -0,0 +1,55 @@
+
+
+
+ {{ component.name }}
+ 系统
+ 自定义
+
+
+
+
+
+
diff --git a/frontend/src/business/components/settings/workspace/components/TestCaseReportTemplateEdit.vue b/frontend/src/business/components/settings/workspace/components/TestCaseReportTemplateEdit.vue
new file mode 100644
index 0000000000..22f4c65150
--- /dev/null
+++ b/frontend/src/business/components/settings/workspace/components/TestCaseReportTemplateEdit.vue
@@ -0,0 +1,221 @@
+
+
+
+
+
+
+
+
+
+
+
+
+ {{name}}
+ 请填写模版名称
+
+
+
+
+
+ {{$t('test_track.return')}}
+ {{$t('test_track.save')}}
+
+
+
+
+
+
+
+
+
+
+ 组件库
+ 从组件库把需要使用的组件拖到右侧,预览测试报告的效果。系统组件只能添加一次。自定义组件,可以设定默认的标题和内容。
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{item.name}}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/frontend/src/business/components/settings/workspace/components/TestcaseTemplateItem.vue b/frontend/src/business/components/settings/workspace/components/TestcaseTemplateItem.vue
new file mode 100644
index 0000000000..d14e4ba93b
--- /dev/null
+++ b/frontend/src/business/components/settings/workspace/components/TestcaseTemplateItem.vue
@@ -0,0 +1,85 @@
+
+
+
+
+
+
{{ template.name }}
+
+
+
+
+
+
diff --git a/frontend/src/business/components/track/TestTrack.vue b/frontend/src/business/components/track/TestTrack.vue
index fa8fd46ece..4a16c8588d 100644
--- a/frontend/src/business/components/track/TestTrack.vue
+++ b/frontend/src/business/components/track/TestTrack.vue
@@ -33,8 +33,20 @@
position: relative;
border: 1px solid #EBEEF5;
box-sizing: border-box;
+ min-height: calc(100vh - 80px);
background: white;
}
+
+ .node-tree {
+ margin: 3%;
+ }
+
+ .case-container {
+ min-height: 600px;
+ margin-top: 0;
+ margin-left: 0;
+ }
+