refactor: 删除无用代码

This commit is contained in:
shiziyuan9527 2020-09-20 12:42:07 +08:00
parent 3751cebd7e
commit b9509e3725
3 changed files with 15 additions and 25 deletions

View File

@ -204,8 +204,7 @@ export default {
}); });
}, },
statusChange(status) { statusChange(status) {
this.form.status = status;
this.$forceUpdate();
}, },
close() { close() {
removeGoBackListener(this.close); removeGoBackListener(this.close);

View File

@ -220,9 +220,7 @@
<i class="el-icon-refresh" @click="getComments(testCase)" <i class="el-icon-refresh" @click="getComments(testCase)"
style="margin-left:10px;font-size: 14px; cursor: pointer"/> style="margin-left:10px;font-size: 14px; cursor: pointer"/>
</template> </template>
<tempalte slot="default"> <review-comment :comments="comments" :case-id="testCase.caseId" @getComments="getComments"/>
<review-comment :comments="comments" :case-id="testCase.caseId" @getComments="getComments"/>
</tempalte>
</el-card> </el-card>
</el-col> </el-col>
</div> </div>
@ -365,7 +363,7 @@ export default {
} }
}, },
saveReport(reportId) { saveReport(reportId) {
this.$post('/test/plan/case/edit', {id: this.testCase.id, reportId: reportId}); // this.$post('/test/plan/case/edit', {id: this.testCase.id, reportId: reportId});
}, },
getComments(testCase) { getComments(testCase) {
let id = ''; let id = '';

View File

@ -354,7 +354,7 @@ export default {
let param = {}; let param = {};
param.id = this.reviewId; param.id = this.reviewId;
param.updateTime = Date.now(); param.updateTime = Date.now();
this.$post('/test/plan/edit', param); // this.$post('/test/case/review/edit', param);
} }
}, },
search() { search() {
@ -456,14 +456,7 @@ export default {
this.$refs.testReportTemplateList.open(this.reviewId); this.$refs.testReportTemplateList.open(this.reviewId);
}, },
statusChange(param) { statusChange(param) {
this.$post('/test/plan/case/edit', param, () => {
for (let i = 0; i < this.tableData.length; i++) {
if (this.tableData[i].id == param.id) {
this.tableData[i].status = param.status;
break;
}
}
});
}, },
getTestReviewById() { getTestReviewById() {
if (this.reviewId) { if (this.reviewId) {
@ -486,16 +479,16 @@ export default {
this.initTableData(); this.initTableData();
}, },
batchEdit(form) { batchEdit(form) {
let param = {}; // let param = {};
param[form.type] = form.value; // param[form.type] = form.value;
param.ids = Array.from(this.selectRows).map(row => row.id); // param.ids = Array.from(this.selectRows).map(row => row.id);
this.$post('/test/plan/case/batch/edit', param, () => { // this.$post('/test/plan/case/batch/edit', param, () => {
this.selectRows.clear(); // this.selectRows.clear();
this.status = ''; // this.status = '';
this.$post('/test/plan/edit/status/' + this.reviewId); // this.$post('/test/plan/edit/status/' + this.reviewId);
this.$success(this.$t('commons.save_success')); // this.$success(this.$t('commons.save_success'));
this.$emit('refresh'); // this.$emit('refresh');
}); // });
}, },
handleBatchEdit() { handleBatchEdit() {
this.getMaintainerOptions(); this.getMaintainerOptions();