style(任务中心): 修复任务中心报告详情中查看脚本样式问题

--bug=1018225 --user=赵勇 【接口测试】接口CASE集合报告查看报告详情中任意CASE脚本断言,点击查看失效 https://www.tapd.cn/55049933/s/1263701
This commit is contained in:
fit2-zhao 2022-10-17 13:54:07 +08:00 committed by f2c-ci-robot[bot]
parent 8a8ba6a9a9
commit f06c9d9c96
1 changed files with 31 additions and 28 deletions

View File

@ -1,31 +1,34 @@
<template> <template>
<el-table :data="assertions" :row-style="getRowStyle" :header-cell-style="getRowStyle"> <div>
<el-table-column prop="name" :label="$t('api_report.assertions_name')" width="150" show-overflow-tooltip> <el-table :data="assertions" :row-style="getRowStyle" :header-cell-style="getRowStyle">
<template v-slot:default="scope"> <el-table-column prop="name" :label="$t('api_report.assertions_name')" width="150" show-overflow-tooltip>
<span>{{ !scope.row.name || scope.row.name === 'null' ? "" : scope.row.name }}</span> <template v-slot:default="scope">
</template> <span>{{ !scope.row.name || scope.row.name === 'null' ? "" : scope.row.name }}</span>
</el-table-column> </template>
<el-table-column prop="content" v-if="showContent" :label="$t('api_report.assertions_content')" width="300" show-overflow-tooltip/> </el-table-column>
<el-table-column prop="message" :label="$t('api_report.assertions_error_message')"/> <el-table-column prop="content" v-if="showContent" :label="$t('api_report.assertions_content')" width="300"
<el-table-column prop="pass" :label="$t('api_report.assertions_is_success')" width="180"> show-overflow-tooltip/>
<template v-slot:default="{row}"> <el-table-column prop="message" :label="$t('api_report.assertions_error_message')"/>
<el-tag size="mini" type="success" v-if="row.pass"> <el-table-column prop="pass" :label="$t('api_report.assertions_is_success')" width="180">
{{ $t('api_report.success') }} <template v-slot:default="{row}">
</el-tag> <el-tag size="mini" type="success" v-if="row.pass">
<el-tag size="mini" type="danger" v-else> {{ $t('api_report.success') }}
{{ $t('api_report.fail') }} </el-tag>
</el-tag> <el-tag size="mini" type="danger" v-else>
</template> {{ $t('api_report.fail') }}
</el-table-column> </el-tag>
<el-table-column prop="script"> </template>
<template v-slot:default="{row}"> </el-table-column>
<div class="assertion-item btn circle" v-if="row.script"> <el-table-column prop="script">
<i class="el-icon-view el-button el-button--primary el-button--mini is-circle" circle <template v-slot:default="{row}">
@click="showPage(row.script)"/> <div class="assertion-item btn circle" v-if="row.script">
</div> <i class="el-icon-view el-button el-button--primary el-button--mini is-circle" circle
</template> @click="showPage(row.script)"/>
</el-table-column> </div>
<el-dialog :title="$t('api_test.request.assertions.script')" :visible.sync="visible" width="900px" append-to-body> </template>
</el-table-column>
</el-table>
<el-dialog :title="$t('api_test.request.assertions.script')" :visible.sync="visible" width="900px" modal-append-to-body append-to-body>
<el-row type="flex" justify="space-between" align="middle" class="quick-script-block"> <el-row type="flex" justify="space-between" align="middle" class="quick-script-block">
<el-col :span="codeSpan" class="script-content"> <el-col :span="codeSpan" class="script-content">
<ms-code-edit v-if="isCodeEditAlive" <ms-code-edit v-if="isCodeEditAlive"
@ -35,7 +38,7 @@
</el-col> </el-col>
</el-row> </el-row>
</el-dialog> </el-dialog>
</el-table> </div>
</template> </template>
<script> <script>