fix(项目设置): 修复非企业版在环境设置中会显示开启误报按钮的错误

修复非企业版在环境设置中会显示开启误报按钮的错误
This commit is contained in:
song-tianyang 2022-01-29 15:16:34 +08:00 committed by fit2-zhao
parent c30ec9a5c4
commit afd9c7c97b
4 changed files with 61 additions and 51 deletions

View File

@ -67,6 +67,7 @@
</div>
<api-json-path-suggest-button
v-if="isShowJsonPathSuggest"
:open-tip="$t('api_test.request.assertions.json_path_suggest')"
:clear-tip="$t('api_test.request.assertions.json_path_clear')"
@open="suggestJsonOpen"
@ -144,6 +145,10 @@ export default {
isReadOnly: {
type: Boolean,
default: false
},
isShowJsonPathSuggest: {
type: Boolean,
default: true
}
},
data() {

View File

@ -63,7 +63,7 @@
</el-tab-pane>
<!-- 全局断言-->
<el-tab-pane :label="$t('env_options.all_assertions')" name="assertions">
<el-row type="flex" :gutter="20">
<el-row type="flex" :gutter="20" v-if="hasLicense">
<el-col :span="12">
<el-form-item
:label="$t('error_report_library.use_error_report')"
@ -72,10 +72,8 @@
{{$t('error_report_library.use_desc')}}
</el-form-item>
</el-col>
</el-row>
<global-assertions :is-read-only="isReadOnly"
:assertions="environment.config.assertions"/>
<global-assertions :is-read-only="isReadOnly" :assertions="environment.config.assertions" :is-show-json-path-suggest="false"/>
</el-tab-pane>
</el-tabs>
<div class="environment-footer">
@ -100,7 +98,7 @@ import MsEnvironmentCommonConfig from "./EnvironmentCommonConfig";
import MsEnvironmentSSLConfig from "./EnvironmentSSLConfig";
import MsApiAuthConfig from "@/business/components/api/definition/components/auth/ApiAuthConfig";
import MsTcpConfig from "@/business/components/api/test/components/request/tcp/TcpConfig";
import {getUUID} from "@/common/js/utils";
import {getUUID,hasLicense} from "@/common/js/utils";
import Jsr233ProcessorContent from "@/business/components/api/automation/scenario/common/Jsr233ProcessorContent";
import {createComponent} from "@/business/components/api/definition/components/jmeter/components";
import EnvironmentGlobalScript from "@/business/components/api/test/components/environment/EnvironmentGlobalScript";
@ -238,6 +236,12 @@ export default {
this.envEnable = o.enable;
}
},
computed: {
hasLicense(){
let license= hasLicense();
return license;
},
},
methods: {
updateGlobalScript(isPreScript, filedName, value) {
if (isPreScript) {

View File

@ -46,6 +46,7 @@
<status-table-item v-else-if="scope.row.execResult === 'STOP'" :value="'STOP'"/>
<status-table-item v-else-if="scope.row.execResult === 'errorReportResult'"
:value="'ErrorReportResult'"/>
<status-table-item v-else-if="scope.row.execResult === 'Timeout'" :value="'Timeout'"/>
<status-table-item v-else :value="'Prepare'"/>
</template>
</ms-table-column>

View File

@ -168,7 +168,7 @@ export default {
this.response = row.response;
}
} else {
if (row.reportId) {
if (row.reportId && row.lastResult !=='Running' && row.lastResult !== 'Waiting') {
this.showResponse = true;
this.reportId = row.reportId;
}