fix(接口定义): 修复数据源删除后页面显示问题

This commit is contained in:
fit2-zhao 2021-01-28 09:56:55 +08:00
parent ae29a9046c
commit 267dd14a93
1 changed files with 19 additions and 16 deletions

View File

@ -64,22 +64,22 @@
</el-form> </el-form>
</div> </div>
<!--<div v-if="showScript">--> <!--<div v-if="showScript">-->
<!--<div v-for="row in request.hashTree" :key="row.id" v-loading="isReloadData" style="margin-left: 20px;width: 100%">--> <!--<div v-for="row in request.hashTree" :key="row.id" v-loading="isReloadData" style="margin-left: 20px;width: 100%">-->
<!--&lt;!&ndash; 前置脚本 &ndash;&gt;--> <!--&lt;!&ndash; 前置脚本 &ndash;&gt;-->
<!--<ms-jsr233-processor v-if="row.label ==='JSR223 PreProcessor'" @copyRow="copyRow" @remove="remove" :is-read-only="false" :title="$t('api_test.definition.request.pre_script')" style-type="color: #B8741A;background-color: #F9F1EA"--> <!--<ms-jsr233-processor v-if="row.label ==='JSR223 PreProcessor'" @copyRow="copyRow" @remove="remove" :is-read-only="false" :title="$t('api_test.definition.request.pre_script')" style-type="color: #B8741A;background-color: #F9F1EA"-->
<!--:jsr223-processor="row"/>--> <!--:jsr223-processor="row"/>-->
<!--&lt;!&ndash;后置脚本&ndash;&gt;--> <!--&lt;!&ndash;后置脚本&ndash;&gt;-->
<!--<ms-jsr233-processor v-if="row.label ==='JSR223 PostProcessor'" @copyRow="copyRow" @remove="remove" :is-read-only="false" :title="$t('api_test.definition.request.post_script')" style-type="color: #783887;background-color: #F2ECF3"--> <!--<ms-jsr233-processor v-if="row.label ==='JSR223 PostProcessor'" @copyRow="copyRow" @remove="remove" :is-read-only="false" :title="$t('api_test.definition.request.post_script')" style-type="color: #783887;background-color: #F2ECF3"-->
<!--:jsr223-processor="row"/>--> <!--:jsr223-processor="row"/>-->
<!--&lt;!&ndash;断言规则&ndash;&gt;--> <!--&lt;!&ndash;断言规则&ndash;&gt;-->
<!--<div style="margin-top: 10px">--> <!--<div style="margin-top: 10px">-->
<!--<ms-api-assertions v-if="row.type==='Assertions'" @copyRow="copyRow" @remove="remove" :is-read-only="isReadOnly" :assertions="row"/>--> <!--<ms-api-assertions v-if="row.type==='Assertions'" @copyRow="copyRow" @remove="remove" :is-read-only="isReadOnly" :assertions="row"/>-->
<!--</div>--> <!--</div>-->
<!--&lt;!&ndash;提取规则&ndash;&gt;--> <!--&lt;!&ndash;提取规则&ndash;&gt;-->
<!--<div style="margin-top: 10px">--> <!--<div style="margin-top: 10px">-->
<!--<ms-api-extract :is-read-only="isReadOnly" @copyRow="copyRow" @remove="remove" v-if="row.type==='Extract'" :extract="row"/>--> <!--<ms-api-extract :is-read-only="isReadOnly" @copyRow="copyRow" @remove="remove" v-if="row.type==='Extract'" :extract="row"/>-->
<!--</div>--> <!--</div>-->
<!--</div>--> <!--</div>-->
<!--</div>--> <!--</div>-->
</el-col> </el-col>
<el-col :span="3" class="ms-left-cell" v-if="showScript"> <el-col :span="3" class="ms-left-cell" v-if="showScript">
@ -225,6 +225,9 @@
if (!hasEnvironment) { if (!hasEnvironment) {
this.request.environmentId = undefined; this.request.environmentId = undefined;
} }
if (!this.request.environmentId) {
this.request.dataSourceId = undefined;
}
this.initDataSource(); this.initDataSource();
}); });
}, },