refactor(接口测试): 解决保存时弹窗出现的条件不对问题

--user=郭雨琦
--bug=1015196
https://www.tapd.cn/55049933/bugtrace/bugs/view/1155049933001015196
This commit is contained in:
guoyuqi 2022-07-22 17:08:28 +08:00 committed by xiaomeinvG
parent d16449432f
commit 39107289c3
2 changed files with 13 additions and 4 deletions

View File

@ -536,8 +536,14 @@ export default {
if (this.httpForm.status !== this.beforeHttpForm.status) { if (this.httpForm.status !== this.beforeHttpForm.status) {
this.batchSyncApiVisible = true; this.batchSyncApiVisible = true;
} }
if (!this.beforeHttpForm.tags) {
this.beforeHttpForm.tags = [];
}
if (this.httpForm.tags !== this.beforeHttpForm.tags) { if (this.httpForm.tags !== this.beforeHttpForm.tags) {
this.batchSyncApiVisible = true; if (this.httpForm.tags.length !== this.beforeHttpForm.tags.length) {
this.batchSyncApiVisible = true;
}
} }
let submitRequest = JSON.stringify(this.httpForm.request); let submitRequest = JSON.stringify(this.httpForm.request);
let beforeRequest = JSON.stringify(this.beforeHttpForm.request); let beforeRequest = JSON.stringify(this.beforeHttpForm.request);

View File

@ -205,14 +205,14 @@
<el-row> <el-row>
<el-col :span="4">{{ $t('api_test.mock.base_info') + ":" }}</el-col> <el-col :span="4">{{ $t('api_test.mock.base_info') + ":" }}</el-col>
<el-col :span="20" style="color: #783887"> <el-col :span="20" style="color: #783887">
<el-checkbox v-model="apiSyncCaseRequest.protocol">{{ <el-checkbox v-model="apiSyncCaseRequest.protocol" disabled>{{
$t('api_report.request') + $t('api_test.request.protocol') $t('api_report.request') + $t('api_test.request.protocol')
}} }}
</el-checkbox> </el-checkbox>
<el-checkbox v-model="apiSyncCaseRequest.method"> <el-checkbox v-model="apiSyncCaseRequest.method" disabled>
{{ $t('api_test.definition.document.request_method') + '\xa0\xa0\xa0\xa0\xa0' }} {{ $t('api_test.definition.document.request_method') + '\xa0\xa0\xa0\xa0\xa0' }}
</el-checkbox> </el-checkbox>
<el-checkbox v-model="apiSyncCaseRequest.path">{{ "URL" }}</el-checkbox> <el-checkbox v-model="apiSyncCaseRequest.path" disabled>{{ "URL" }}</el-checkbox>
</el-col> </el-col>
</el-row> </el-row>
<el-row> <el-row>
@ -414,6 +414,9 @@ export default {
unExecute: true unExecute: true
} }
} }
this.apiSyncCaseRequest.protocol = true;
this.apiSyncCaseRequest.method = true;
this.apiSyncCaseRequest.path = true;
}, },
setSyncTime() { setSyncTime() {
this.showSyncTimeSetting = !this.showSyncTimeSetting; this.showSyncTimeSetting = !this.showSyncTimeSetting;