Merge remote-tracking branch 'origin/master' into master

This commit is contained in:
Captain.B 2020-12-22 15:55:59 +08:00
commit cfd203623e
5 changed files with 375 additions and 328 deletions

View File

@ -5,7 +5,7 @@
<i class="el-icon-refresh" @click="getComments()" <i class="el-icon-refresh" @click="getComments()"
style="margin-left:10px;font-size: 14px; cursor: pointer"/> style="margin-left:10px;font-size: 14px; cursor: pointer"/>
</template> </template>
<div class="comment-list" style="height: 500px; overflow: auto;"> <div style="height: 100%;overflow:auto;">
<review-comment-item v-for="(comment,index) in comments" <review-comment-item v-for="(comment,index) in comments"
:key="index" :key="index"
:comment="comment" :comment="comment"

View File

@ -1,6 +1,6 @@
<template> <template>
<el-row :gutter="5"> <el-row :gutter="5">
<el-col :span="16"> <el-col :span="15">
<el-card class="case-detail-form-card"> <el-card class="case-detail-form-card">
<el-form :model="form" ref="caseFrom" v-loading="result.loading"> <el-form :model="form" ref="caseFrom" v-loading="result.loading">
@ -11,13 +11,13 @@
:label="$t('test_track.case.name')" :label="$t('test_track.case.name')"
:label-width="formLabelWidth" :label-width="formLabelWidth"
prop="name"> prop="name">
<el-input class="case-name" :disabled="readOnly" v-model="testCase.name"></el-input> <el-input :disabled="readOnly" v-model="testCase.name"></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-form-item :label="$t('test_track.case.module')" :label-width="formLabelWidth" prop="module"> <el-form-item :label="$t('test_track.case.module')" :label-width="formLabelWidth" prop="module">
<el-input class="case-name" :disabled="readOnly" v-model="testCase.nodePath"></el-input> <el-input :disabled="readOnly" v-model="testCase.nodePath"></el-input>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
@ -156,8 +156,8 @@
</el-form> </el-form>
</el-card> </el-card>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="9">
<case-comment :case-id="testCaseId" :read-only="true"/> <case-comment :case-id="testCaseId" :read-only="true" class="case-detail-comment"/>
</el-col> </el-col>
</el-row> </el-row>
@ -193,7 +193,7 @@ export default {
remark: '', remark: '',
}, },
workspaceId: '', workspaceId: '',
formLabelWidth: "120px", formLabelWidth: "80px",
isStepTableAlive: true, isStepTableAlive: true,
methodOptions: [ methodOptions: [
@ -223,6 +223,12 @@ export default {
} }
.case-detail-form-card >>> .el-card__body { .case-detail-form-card >>> .el-card__body {
padding: 20px 28px; padding: 20px 0;
}
.case-detail-comment {
min-width: 320px;
height: 600px;
overflow: auto;
} }
</style> </style>

View File

@ -3,13 +3,13 @@
<el-dialog :close-on-click-modal="false" class="case-dialog" <el-dialog :close-on-click-modal="false" class="case-dialog"
@close="close" @close="close"
:title="operationType == 'edit' ? ( readOnly ? $t('test_track.case.view_case') : $t('test_track.case.edit_case')) : $t('test_track.case.create')" :title="operationType == 'edit' ? ( readOnly ? $t('test_track.case.view_case') : $t('test_track.case.edit_case')) : $t('test_track.case.create')"
:visible.sync="dialogFormVisible" width="88%"> :visible.sync="dialogFormVisible" width="85%">
<el-row :gutter="10"> <el-row :gutter="10">
<div> <div>
<el-col :span="17"> <el-col :span="17">
<el-card> <el-card class="container">
<el-form :model="form" :rules="rules" ref="caseFrom" v-loading="result.loading"> <el-form :model="form" :rules="rules" ref="caseFrom" v-loading="result.loading" class="case-form">
<el-row> <el-row>
<el-col :span="8" :offset="1"> <el-col :span="8" :offset="1">
@ -170,7 +170,7 @@
clearable/> clearable/>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column :label="$t('commons.input_content')" min-width="20%"> <el-table-column :label="$t('commons.input_content')" min-width="25%">
<template v-slot:default="scope"> <template v-slot:default="scope">
<el-button <el-button
type="primary" type="primary"
@ -237,7 +237,8 @@
</el-col> </el-col>
</el-row> </el-row>
<el-row style="float: right; margin-bottom: 10px;"> </el-form>
<el-row style="float: right; margin-bottom: 20px;margin-top: 20px">
<el-switch v-if="operationType == 'add'" <el-switch v-if="operationType == 'add'"
v-model="isCreateContinue" v-model="isCreateContinue"
:active-text="$t('test_track.case.save_create_continue')"> :active-text="$t('test_track.case.save_create_continue')">
@ -246,13 +247,10 @@
@cancel="dialogFormVisible = false" @cancel="dialogFormVisible = false"
@confirm="saveCase"/> @confirm="saveCase"/>
</el-row> </el-row>
</el-form>
</el-card> </el-card>
</el-col> </el-col>
<el-col :span="7"> <el-col :span="7">
<case-comment :case-id="testCase ? testCase.id : ''"/> <case-comment :case-id="testCase ? testCase.id : ''" class="comment-card"/>
</el-col> </el-col>
</div> </div>
</el-row> </el-row>
@ -712,8 +710,28 @@ export default {
width: 194px; width: 194px;
} }
.container {
height: 100vh;
}
.case-form {
height: 95%;
overflow: auto;
}
.case-dialog >>> .el-dialog__body { .case-dialog >>> .el-dialog__body {
padding: 0 20px 10px 20px; padding: 0 20px 10px 20px;
} }
.container >>> .el-card__body {
height: calc(100vh - 120px);
}
.comment-card >>> .el-card__header {
padding: 27px 20px;
}
.comment-card >>> .el-card__body {
height: calc(100vh - 120px);
}
</style> </style>

View File

@ -62,7 +62,6 @@
<el-popover <el-popover
placement="right-end" placement="right-end"
:title="$t('test_track.case.view_case')" :title="$t('test_track.case.view_case')"
width="70%"
trigger="hover" trigger="hover"
> >
<test-case-detail v-if="currentCaseId === scope.row.id" :test-case-id="currentCaseId"/> <test-case-detail v-if="currentCaseId === scope.row.id" :test-case-id="currentCaseId"/>

View File

@ -10,8 +10,10 @@
v-loading="result.loading"> v-loading="result.loading">
<template v-slot:default="scope"> <template v-slot:default="scope">
<el-row :gutter="10">
<div class="container"> <div class="container">
<el-col :span="17">
<el-card>
<el-scrollbar> <el-scrollbar>
<el-header> <el-header>
@ -68,7 +70,7 @@
<span class="cast_item" v-if="testCase.type === 'performance'">{{ $t('commons.performance') }}</span> <span class="cast_item" v-if="testCase.type === 'performance'">{{ $t('commons.performance') }}</span>
<span class="cast_item" v-if="testCase.type === 'api'">{{ $t('commons.api') }}</span> <span class="cast_item" v-if="testCase.type === 'api'">{{ $t('commons.api') }}</span>
</el-col> </el-col>
<el-col :span="13"> <el-col :span="10">
<test-plan-test-case-status-button class="status-button" <test-plan-test-case-status-button class="status-button"
@statusChange="statusChange" @statusChange="statusChange"
:is-read-only="isReadOnly" :is-read-only="isReadOnly"
@ -127,7 +129,7 @@
</el-row> </el-row>
<el-row v-if="testCase.method && testCase.method !== 'auto'"> <el-row v-if="testCase.method && testCase.method !== 'auto'">
<el-col :span="20" :offset="1"> <el-col :span="22" :offset="1">
<div> <div>
<span class="cast_label">{{ $t('test_track.case.steps') }}</span> <span class="cast_label">{{ $t('test_track.case.steps') }}</span>
</div> </div>
@ -340,8 +342,16 @@
</div> </div>
</el-scrollbar> </el-scrollbar>
</el-card>
</el-col>
<el-col :span="7">
<case-comment :case-id="testCase ? testCase.caseId : ''" class="comment-card"/>
</el-col>
</div> </div>
</el-row>
</template> </template>
@ -359,10 +369,12 @@ import PerformanceTestDetail from "../test/PerformanceTestDetail";
import PerformanceTestResult from "../test/PerformanceTestResult"; import PerformanceTestResult from "../test/PerformanceTestResult";
import {listenGoBack, removeGoBackListener} from "@/common/js/utils"; import {listenGoBack, removeGoBackListener} from "@/common/js/utils";
import TestCaseAttachment from "@/business/components/track/case/components/TestCaseAttachment"; import TestCaseAttachment from "@/business/components/track/case/components/TestCaseAttachment";
import CaseComment from "@/business/components/track/case/components/CaseComment";
export default { export default {
name: "FunctionalTestCaseEdit", name: "FunctionalTestCaseEdit",
components: { components: {
CaseComment,
PerformanceTestResult, PerformanceTestResult,
PerformanceTestDetail, PerformanceTestDetail,
ApiTestResult, ApiTestResult,
@ -722,6 +734,18 @@ export default {
height: 100vh; height: 100vh;
} }
.container >>> .el-card__body {
height: calc(100vh - 70px);
}
.comment-card >>> .el-card__header {
padding: 0 20px;
}
.comment-card >>> .el-card__body {
height: calc(100vh - 120px);
}
.case_container > .el-row { .case_container > .el-row {
margin-top: 1%; margin-top: 1%;
} }