修复key value不能正确显示的问题
This commit is contained in:
parent
b5e7b74633
commit
6745d8b5fc
|
@ -16,9 +16,13 @@
|
|||
{{$t('commons.save')}}
|
||||
</el-button>
|
||||
|
||||
<el-button type="primary" plain @click="runTest">
|
||||
<el-button type="primary" plain v-if="!isDisabled" @click="saveRunTest">
|
||||
{{$t('load_test.save_and_run')}}
|
||||
</el-button>
|
||||
|
||||
<el-button type="primary" plain v-if="isDisabled" @click="runTest">
|
||||
{{$t('api_test.run')}}
|
||||
</el-button>
|
||||
<el-button type="warning" plain @click="cancel">{{$t('commons.cancel')}}</el-button>
|
||||
</el-row>
|
||||
</el-header>
|
||||
|
@ -91,29 +95,31 @@
|
|||
}
|
||||
});
|
||||
},
|
||||
save: function (callback) {
|
||||
this.change = false;
|
||||
let url = this.create ? "/api/create" : "/api/update";
|
||||
this.result = this.$request(this.getOptions(url), () => {
|
||||
this.create = false;
|
||||
if (callback) callback();
|
||||
});
|
||||
},
|
||||
saveTest: function () {
|
||||
this.save(() => {
|
||||
this.$success(this.$t('commons.save_success'));
|
||||
})
|
||||
},
|
||||
save: function (callback) {
|
||||
this.change = false;
|
||||
let url = this.create ? "/api/create" : "/api/update";
|
||||
this.result = this.$request(this.getOptions(url), response => {
|
||||
this.create = false;
|
||||
if (callback) callback();
|
||||
runTest: function () {
|
||||
this.result = this.$post("/api/run", {id: this.test.id}, () => {
|
||||
this.$success(this.$t('api_test.running'));
|
||||
});
|
||||
},
|
||||
runTest: function () {
|
||||
saveRunTest: function () {
|
||||
this.change = false;
|
||||
|
||||
this.save(() => {
|
||||
this.$success(this.$t('commons.save_success'));
|
||||
this.result = this.$post("/api/run", {id: this.test.id}, response => {
|
||||
this.$success(this.$t('api_test.running'));
|
||||
});
|
||||
this.runTest();
|
||||
})
|
||||
|
||||
},
|
||||
cancel: function () {
|
||||
this.$router.push('/api/test/list/all');
|
||||
|
|
|
@ -12,20 +12,20 @@
|
|||
{{$t('api_test.scenario.config')}}
|
||||
</span>
|
||||
</div>
|
||||
<!-- 暂时去掉,将来再加-->
|
||||
<!-- <el-dropdown trigger="click" @command="handleCommand">-->
|
||||
<!-- <span class="el-dropdown-link el-icon-more scenario-btn"/>-->
|
||||
<!-- <el-dropdown-menu slot="dropdown">-->
|
||||
<!-- <el-dropdown-item :command="{type:'delete', index:index}">删除场景</el-dropdown-item>-->
|
||||
<!-- </el-dropdown-menu>-->
|
||||
<!-- </el-dropdown>-->
|
||||
<!-- 暂时去掉,将来再加-->
|
||||
<!-- <el-dropdown trigger="click" @command="handleCommand">-->
|
||||
<!-- <span class="el-dropdown-link el-icon-more scenario-btn"/>-->
|
||||
<!-- <el-dropdown-menu slot="dropdown">-->
|
||||
<!-- <el-dropdown-item :command="{type:'delete', index:index}">删除场景</el-dropdown-item>-->
|
||||
<!-- </el-dropdown-menu>-->
|
||||
<!-- </el-dropdown>-->
|
||||
</template>
|
||||
<ms-api-request-config :requests="scenario.requests" :open="select"/>
|
||||
</ms-api-collapse-item>
|
||||
</ms-api-collapse>
|
||||
</div>
|
||||
<!-- 暂时去掉,将来再加-->
|
||||
<!-- <el-button class="scenario-create" type="primary" size="mini" icon="el-icon-plus" plain @click="createScenario"/>-->
|
||||
<!-- 暂时去掉,将来再加-->
|
||||
<!-- <el-button class="scenario-create" type="primary" size="mini" icon="el-icon-plus" plain @click="createScenario"/>-->
|
||||
</el-aside>
|
||||
|
||||
<el-main class="scenario-main">
|
||||
|
@ -90,9 +90,13 @@
|
|||
}
|
||||
},
|
||||
select: function (obj) {
|
||||
this.selected = obj;
|
||||
this.selected = null;
|
||||
this.$nextTick(function () {
|
||||
this.selected = obj;
|
||||
});
|
||||
},
|
||||
reset: function () {
|
||||
this.selected = null;
|
||||
this.$nextTick(function () {
|
||||
this.activeName = 0;
|
||||
this.select(this.scenarios[0]);
|
||||
|
|
|
@ -12,7 +12,7 @@ export default {
|
|||
message: message,
|
||||
type: "success",
|
||||
showClose: true,
|
||||
duration: 1000
|
||||
duration: 1500
|
||||
})
|
||||
};
|
||||
|
||||
|
@ -30,7 +30,7 @@ export default {
|
|||
message: message,
|
||||
type: "warning",
|
||||
showClose: true,
|
||||
duration: 2000
|
||||
duration: 5000
|
||||
})
|
||||
};
|
||||
|
||||
|
|
|
@ -187,6 +187,7 @@ export default {
|
|||
},
|
||||
api_test: {
|
||||
save_and_run: "保存并执行",
|
||||
run: "执行",
|
||||
running: "正在执行",
|
||||
reset: "重置",
|
||||
input_name: "请输入测试名称",
|
||||
|
|
Loading…
Reference in New Issue