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

View File

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

View File

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