fix(项目设置): 优化环境设置的样式
--bug=1011999 --user=宋天阳 【环境配置】一个项目有多个环境,同时修改多个环境变量,只能报错最后修改的一个 https://www.tapd.cn/55049933/s/1135776
This commit is contained in:
parent
977412c141
commit
69efcbbedd
|
@ -2,17 +2,13 @@
|
|||
<el-dialog :close-on-click-modal="false" :title="$t('api_test.environment.environment_config')"
|
||||
:visible.sync="visible" class="environment-dialog" width="80%" top="50px"
|
||||
@close="close" append-to-body destroy-on-close ref="environmentConfig">
|
||||
<template #title>
|
||||
<ms-dialog-header :title="$t('api_test.environment.environment_config')"
|
||||
@cancel="visible = false"
|
||||
@confirm="save"/>
|
||||
</template>
|
||||
<el-container v-loading="result.loading">
|
||||
<ms-aside-item :enable-aside-hidden="false" :title="$t('api_test.environment.environment_list')"
|
||||
:data="environments" :item-operators="environmentOperators" :add-fuc="addEnvironment"
|
||||
:env-add-permission="ENV_CREATE"
|
||||
:delete-fuc="deleteEnvironment" @itemSelected="environmentSelected" ref="environmentItems"/>
|
||||
<environment-edit :if-create="ifCreate" :project-id="projectId" :environment="currentEnvironment" ref="environmentEdit" :is-read-only="isReadOnly"
|
||||
@confirm="save"
|
||||
@close="close"/>
|
||||
</el-container>
|
||||
</el-dialog>
|
||||
|
|
|
@ -1,11 +1,26 @@
|
|||
<template>
|
||||
<el-main v-loading="result.loading" class="environment-edit" style="margin-left: 0px">
|
||||
<el-form :model="environment" :rules="rules" ref="environment" label-width="80px">
|
||||
<el-row>
|
||||
<el-col :span="20">
|
||||
<el-form-item prop="name" :label="$t('api_test.environment.name')">
|
||||
<el-input v-model="environment.name" :disabled="isReadOnly" :placeholder="this.$t('commons.input_name')"
|
||||
clearable/>
|
||||
</el-form-item>
|
||||
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<div style="float: right;width: fit-content;">
|
||||
<div style="float: left; margin-right: 8px;">
|
||||
<slot name="other"></slot>
|
||||
</div>
|
||||
<div class="ms_btn">
|
||||
<el-button type="primary" @click="confirm" @keydown.enter.native.prevent>
|
||||
{{ $t('commons.confirm') }}
|
||||
</el-button>
|
||||
</div>
|
||||
</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-tabs v-model="activeName">
|
||||
|
||||
|
@ -86,7 +101,8 @@
|
|||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<global-assertions :is-read-only="isReadOnly" :assertions="environment.config.assertions" :is-show-json-path-suggest="false"/>
|
||||
<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">-->
|
||||
|
@ -380,6 +396,9 @@ export default {
|
|||
cancel() {
|
||||
this.$emit('close');
|
||||
},
|
||||
confirm() {
|
||||
this.$emit("confirm");
|
||||
},
|
||||
clearValidate() {
|
||||
this.$refs["environment"].clearValidate();
|
||||
},
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<div class="msDialogHeader">
|
||||
<span style="float: left;font-size: 18px;color: #303133;">{{ title }}</span>
|
||||
|
||||
<div style="float: right;width: fit-content;">
|
||||
<div v-if="!hideButton" style="float: right;width: fit-content;">
|
||||
<div style="float: left; margin-right: 8px;">
|
||||
<slot name="other"></slot>
|
||||
</div>
|
||||
|
@ -30,6 +30,7 @@ export default {
|
|||
return 'small';
|
||||
}
|
||||
},
|
||||
hideButton: Boolean,
|
||||
enableCancel: Boolean
|
||||
},
|
||||
methods: {
|
||||
|
@ -48,6 +49,7 @@ export default {
|
|||
float: right;
|
||||
margin-right: 50px;
|
||||
}
|
||||
|
||||
.msDialogHeader {
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
|
|
|
@ -59,7 +59,7 @@
|
|||
<!-- 创建、编辑、复制环境时的对话框 -->
|
||||
<el-dialog :visible.sync="dialogVisible" :close-on-click-modal="false" width="66%" top="50px">
|
||||
<template #title>
|
||||
<ms-dialog-header :title="dialogTitle"
|
||||
<ms-dialog-header :title="dialogTitle" :hide-button="true"
|
||||
@cancel="dialogVisible = false"
|
||||
@confirm="save"/>
|
||||
</template>
|
||||
|
|
|
@ -52,12 +52,18 @@
|
|||
<span class="ms-report-time-desc" v-if="startTime !== '0'">
|
||||
{{ $t('report.test_start_time') }}:{{ startTime | timestampFormatDate }}
|
||||
</span>
|
||||
<span class="ms-report-time-desc" v-else-if="planReportTemplate && planReportTemplate.startTime">
|
||||
{{ $t('report.test_start_time') }}:{{ planReportTemplate.startTime | timestampFormatDate }}
|
||||
</span>
|
||||
<span class="ms-report-time-desc" v-else>
|
||||
{{ $t('report.test_start_time') }}:-
|
||||
</span>
|
||||
<span class="ms-report-time-desc" v-if="report.status === 'Completed' && endTime !== '0'">
|
||||
{{ $t('report.test_end_time') }}:{{ endTime | timestampFormatDate }}
|
||||
</span>
|
||||
<span class="ms-report-time-desc" v-else-if="planReportTemplate && planReportTemplate.endTime">
|
||||
{{ $t('report.test_end_time') }}:{{ planReportTemplate.endTime | timestampFormatDate }}
|
||||
</span>
|
||||
<span class="ms-report-time-desc" v-else>
|
||||
{{ $t('report.test_end_time') }}:-
|
||||
</span>
|
||||
|
|
|
@ -128,8 +128,10 @@ export default {
|
|||
if (this.isShare) {
|
||||
config.url = '/share' + config.url;
|
||||
}
|
||||
this.result = this.$download(config, this.report.name + '.html');
|
||||
}
|
||||
this.result = this.$download(config, this.report.name + '.html',()=>{
|
||||
this.$success(this.$t("organization.integration.successful_operation"));
|
||||
});
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
|
Loading…
Reference in New Issue