fix(测试跟踪):使得创建测试计划的对话框更加人性化 (#1878)

* fix(测试跟踪):使得创建测试计划的对话框更加人性化

* style(测试跟踪):删除一行额外代码
This commit is contained in:
Ambitiousliga 2021-04-07 15:09:16 +08:00 committed by GitHub
parent d26ddfe070
commit f96a323678
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 10 additions and 3 deletions

View File

@ -33,7 +33,7 @@
<el-option
v-for="item in principalOptions"
:key="item.id"
:label="item.name"
:label="item.name + '(' + item.id + ')'"
:value="item.id">
</el-option>
</el-select>
@ -158,6 +158,12 @@ export default {
principalOptions: []
};
},
created() {
//
this.form.stage = 'smoke';
const adminToken = JSON.parse(localStorage.getItem("Admin-Token"));
this.form.principal = adminToken.name + "(" + adminToken.id + ")";
},
methods: {
openTestPlanEditDialog(testPlan) {
this.resetForm();
@ -259,8 +265,9 @@ export default {
this.$refs['planFrom'].resetFields();
this.form.name = '';
this.form.projectIds = [];
this.form.principal = '';
this.form.stage = '';
const adminToken = JSON.parse(localStorage.getItem("Admin-Token"));
this.form.principal = adminToken.name + "(" + adminToken.id + ")";
this.form.stage = 'smoke';
this.form.description = '';
this.form.status = null;
this.form.plannedStartTime = null;