fix(测试跟踪): 修复运行环境显示错位的问题
--bug=1015018 --user=宋天阳 【测试跟踪】测试计划报告里的运行环境显示错位了 https://www.tapd.cn/55049933/s/1204559
This commit is contained in:
parent
417dbf90c0
commit
658beceb7d
|
@ -422,13 +422,27 @@
|
|||
|
||||
<select id="selectByResourceIdsAndMaxCreateTime"
|
||||
resultType="io.metersphere.base.domain.ApiDefinitionExecResultWithBLOBs">
|
||||
SELECT resource_id,max(create_time) AS create_time, id, env_config, project_id FROM api_definition_exec_result
|
||||
SELECT
|
||||
execResult.resource_id,
|
||||
execResult.create_time,
|
||||
execResult.id,
|
||||
execResult.env_config,
|
||||
execResult.project_id
|
||||
FROM api_definition_exec_result execResult
|
||||
INNER JOIN ( SELECT
|
||||
resource_id,
|
||||
max( create_time + 0 ) AS create_time
|
||||
FROM
|
||||
api_definition_exec_result
|
||||
WHERE
|
||||
resource_id IN
|
||||
<foreach collection="ids" item="id" separator="," open="(" close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
GROUP BY resource_id;
|
||||
GROUP BY
|
||||
resource_id )maxdata ON maxdata.resource_id = execResult.resource_id AND maxdata.create_time = execResult.create_time;
|
||||
|
||||
|
||||
</select>
|
||||
|
||||
<select id="findByProjectIds" resultType="io.metersphere.base.domain.ApiDefinitionExecResult"
|
||||
|
|
|
@ -4,21 +4,26 @@
|
|||
<el-form-item :label="$t('test_track.report.testing_time') + ':'">
|
||||
{{ showTime }}
|
||||
</el-form-item>
|
||||
<el-row type="flex" class="select-time"
|
||||
v-if="report.envGroupName || report.projectEnvMap">
|
||||
<el-form-item :label="$t('commons.environment') + ':'" style="width: 100%">
|
||||
<div v-if="report.envGroupName" style="margin-left: 12px">
|
||||
<ms-tag type="danger" :content="$t('commons.group')"></ms-tag>
|
||||
{{ report.envGroupName }}
|
||||
<el-row class="select-time"
|
||||
v-if="report.envGroupName || report.projectEnvMap" style="display:inline-block">
|
||||
<div>
|
||||
<div style="float: left">
|
||||
{{$t('commons.environment') + ':'}}
|
||||
</div>
|
||||
<div v-else-if="report.projectEnvMap" style="margin-left: 12px">
|
||||
<div v-for="(values,key) in report.projectEnvMap" :key="key" style="margin-right: 10px">
|
||||
{{ key + ":" }}
|
||||
<ms-tag v-for="(item,index) in values" :key="index" type="success" :content="item"
|
||||
style="margin-left: 2px"/>
|
||||
<div style="float: right">
|
||||
<div v-if="report.envGroupName" style="margin-left: 42px">
|
||||
<ms-tag type="danger" :content="$t('commons.group')"></ms-tag>
|
||||
{{ report.envGroupName }}
|
||||
</div>
|
||||
<div v-else-if="report.projectEnvMap" style="margin-left: 42px">
|
||||
<div v-for="(values,key) in report.projectEnvMap" :key="key" style="margin-right: 10px">
|
||||
{{ key + ":" }}
|
||||
<ms-tag v-for="(item,index) in values" :key="index" type="success" :content="item"
|
||||
style="margin-left: 2px"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</el-form-item>
|
||||
</div>
|
||||
</el-row>
|
||||
<el-row type="flex" justify="space-between" class="select-time">
|
||||
<el-col :span="8">
|
||||
|
|
Loading…
Reference in New Issue