feat: 增加整体运行时长
This commit is contained in:
parent
5c7134f691
commit
7f2f308057
@ -8,6 +8,9 @@
|
||||
</div>
|
||||
<div class="btn__container">
|
||||
<div class="btn">
|
||||
<el-tag style="margin-right: 12px;" v-if="['testRunError', 'testRunFinish'].includes(flowState)" :type="flowState === 'testRunFinish' ? 'success' : 'danger'">
|
||||
{{ totalRunningTime }}ms
|
||||
</el-tag>
|
||||
<el-button v-if="['testRunError', 'testRunFinish', 'stop'].includes(flowState)" @click="clearRun">清除上一次运行结果</el-button>
|
||||
<el-button @click="group">分组</el-button>
|
||||
<el-button v-if="flowState !== 'testRunning'" @click="testRun">试运行</el-button>
|
||||
@ -283,6 +286,8 @@ const flowPauseFn = async () => {
|
||||
}
|
||||
};
|
||||
|
||||
const totalRunningTime = ref(0);
|
||||
|
||||
const flowResumeFn = async () => {
|
||||
const res = await flowResume(instId.value);
|
||||
if (res.code === 200) {
|
||||
@ -409,6 +414,7 @@ const loopFlowView = async (instId, taskId = null) => {
|
||||
if (!flowInfoData.value.isLog) {
|
||||
flowStore.updateDisableForm(false);
|
||||
flowState.value = "testRunFinish";
|
||||
totalRunningTime.value = arr[arr.length - 1].endTime - arr[0].startTime
|
||||
}
|
||||
} else {
|
||||
if (!flowInfoData.value.isLog) {
|
||||
@ -416,6 +422,7 @@ const loopFlowView = async (instId, taskId = null) => {
|
||||
flowState.value = arr[arr.length - 1]?.status === "PAUSED" ? "pause" : "stop";
|
||||
} else {
|
||||
flowState.value = "testRunError";
|
||||
totalRunningTime.value = arr[arr.length - 1].endTime - arr[0].startTime
|
||||
flowStore.updateDisableForm(false);
|
||||
}
|
||||
}
|
||||
|
||||
@ -51,7 +51,7 @@ export default defineConfig(({mode, command}) => {
|
||||
//李小龙 http://192.168.0.5:13080
|
||||
// dev http://10.148.20.34:13080
|
||||
// target: VITE_API_URL,
|
||||
target: command === 'build' ? VITE_API_URL : 'http://192.168.0.100:13080',
|
||||
target: command === 'build' ? VITE_API_URL : 'http://192.168.0.5:13080',
|
||||
changeOrigin: true,
|
||||
rewrite: (p) => p.replace(/^\/dev-api/, '')
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user