fix: 修改测试计划状态报错 (#1934)

Co-authored-by: chenjianxing <jianxing.chen@fit2cloud.com>
This commit is contained in:
metersphere-bot 2021-04-07 15:06:12 +08:00 committed by GitHub
parent 098eae1486
commit dbd5711c10
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 5 deletions

View File

@ -15,6 +15,11 @@
:icon="status == 'Completed' ? 'el-icon-check' : ''"
@click="setStatus('Completed')"> {{$t('test_track.plan.plan_status_completed')}}</el-button>
</el-col>
<el-col>
<el-button type="warning" round size="mini"
:icon="status == 'Finished' ? 'el-icon-check' : ''"
@click="setStatus('Finished')"> {{$t('test_track.plan.plan_status_finished')}}</el-button>
</el-col>
</el-row>
</template>

View File

@ -343,11 +343,11 @@ export default {
handleEdit(testPlan) {
this.$emit('testPlanEdit', testPlan);
},
statusChange(param) {
console.log(this.tableData);
let oldStatus = param.item.status;
let newStatus = param.status;
param = param.item;
statusChange(data) {
let oldStatus = data.item.status;
let newStatus = data.status;
let param = {};
param.id = data.item.id;
param.status = newStatus;
this.$post('/test/plan/edit', param, () => {
for (let i = 0; i < this.tableData.length; i++) {