This commit is contained in:
fit2-zhao 2020-10-13 17:31:41 +08:00
commit 21685342e4
2 changed files with 380 additions and 366 deletions

View File

@ -173,6 +173,12 @@
#{value}
</foreach>
</when>
<when test="key=='executor'">
and test_plan_test_case.executor in
<foreach collection="values" item="value" separator="," open="(" close=")">
#{value}
</foreach>
</when>
<otherwise>
and test_plan_test_case.status in
<foreach collection="values" item="value" separator="," open="(" close=")">

View File

@ -122,13 +122,13 @@
>
<ckeditor :editor="editor" disabled :config="editorConfig"
v-model="scope.row.description"/>
<el-button slot="reference" type="text">{{$t('test_track.issue.preview')}}</el-button>
<el-button slot="reference" type="text">{{ $t('test_track.issue.preview') }}</el-button>
</el-popover>
</template>
</el-table-column>
<el-table-column prop="platform" :label="$t('test_track.issue.platform')"/>
</el-table>
<el-button slot="reference" type="text">{{scope.row.issuesSize}}</el-button>
<el-button slot="reference" type="text">{{ scope.row.issuesSize }}</el-button>
</el-popover>
</template>
</el-table-column>
@ -136,6 +136,8 @@
<el-table-column
prop="executorName"
:filters="executorFilters"
column-key="executor"
:label="$t('test_track.plan_view.executor')">
</el-table-column>
@ -152,18 +154,18 @@
</span>
<el-dropdown-menu slot="dropdown" chang>
<el-dropdown-item :disabled="!isTestManagerOrTestUser" :command="{id: scope.row.id, status: 'Pass'}">
{{$t('test_track.plan_view.pass')}}
{{ $t('test_track.plan_view.pass') }}
</el-dropdown-item>
<el-dropdown-item :disabled="!isTestManagerOrTestUser"
:command="{id: scope.row.id, status: 'Failure'}">
{{$t('test_track.plan_view.failure')}}
{{ $t('test_track.plan_view.failure') }}
</el-dropdown-item>
<el-dropdown-item :disabled="!isTestManagerOrTestUser"
:command="{id: scope.row.id, status: 'Blocking'}">
{{$t('test_track.plan_view.blocking')}}
{{ $t('test_track.plan_view.blocking') }}
</el-dropdown-item>
<el-dropdown-item :disabled="!isTestManagerOrTestUser" :command="{id: scope.row.id, status: 'Skip'}">
{{$t('test_track.plan_view.skip')}}
{{ $t('test_track.plan_view.skip') }}
</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
@ -210,32 +212,32 @@
</template>
<script>
import ExecutorEdit from './ExecutorEdit';
import StatusEdit from './StatusEdit';
import TestPlanTestCaseEdit from "./TestPlanTestCaseEdit";
import MsTipButton from '../../../../common/components/MsTipButton';
import MsTablePagination from '../../../../common/pagination/TablePagination';
import MsTableHeader from '../../../../common/components/MsTableHeader';
import MsTableButton from '../../../../common/components/MsTableButton';
import NodeBreadcrumb from '../../../common/NodeBreadcrumb';
import ExecutorEdit from './ExecutorEdit';
import StatusEdit from './StatusEdit';
import TestPlanTestCaseEdit from "./TestPlanTestCaseEdit";
import MsTipButton from '../../../../common/components/MsTipButton';
import MsTablePagination from '../../../../common/pagination/TablePagination';
import MsTableHeader from '../../../../common/components/MsTableHeader';
import MsTableButton from '../../../../common/components/MsTableButton';
import NodeBreadcrumb from '../../../common/NodeBreadcrumb';
import {ROLE_TEST_MANAGER, ROLE_TEST_USER, TokenKey, WORKSPACE_ID} from '../../../../../../common/js/constants';
import {_filter, _sort, checkoutTestManagerOrTestUser, hasRoles} from '../../../../../../common/js/utils';
import PriorityTableItem from "../../../common/tableItems/planview/PriorityTableItem";
import StatusTableItem from "../../../common/tableItems/planview/StatusTableItem";
import TypeTableItem from "../../../common/tableItems/planview/TypeTableItem";
import MethodTableItem from "../../../common/tableItems/planview/MethodTableItem";
import MsTableOperator from "../../../../common/components/MsTableOperator";
import MsTableOperatorButton from "../../../../common/components/MsTableOperatorButton";
import TestReportTemplateList from "./TestReportTemplateList";
import TestCaseReportView from "./report/TestCaseReportView";
import {TEST_CASE_CONFIGS} from "../../../../common/components/search/search-components";
import ShowMoreBtn from "../../../case/components/ShowMoreBtn";
import BatchEdit from "../../../case/components/BatchEdit";
import ClassicEditor from "@ckeditor/ckeditor5-build-classic";
import {hub} from "@/business/components/track/plan/event-bus";
import {ROLE_TEST_MANAGER, ROLE_TEST_USER, TokenKey, WORKSPACE_ID} from "@/common/js/constants";
import {_filter, _sort, checkoutTestManagerOrTestUser, hasRoles} from "@/common/js/utils";
import PriorityTableItem from "../../../common/tableItems/planview/PriorityTableItem";
import StatusTableItem from "../../../common/tableItems/planview/StatusTableItem";
import TypeTableItem from "../../../common/tableItems/planview/TypeTableItem";
import MethodTableItem from "../../../common/tableItems/planview/MethodTableItem";
import MsTableOperator from "../../../../common/components/MsTableOperator";
import MsTableOperatorButton from "../../../../common/components/MsTableOperatorButton";
import TestReportTemplateList from "./TestReportTemplateList";
import TestCaseReportView from "./report/TestCaseReportView";
import {TEST_CASE_CONFIGS} from "../../../../common/components/search/search-components";
import ShowMoreBtn from "../../../case/components/ShowMoreBtn";
import BatchEdit from "../../../case/components/BatchEdit";
import ClassicEditor from "@ckeditor/ckeditor5-build-classic";
import {hub} from "@/business/components/track/plan/event-bus";
export default {
export default {
name: "TestPlanTestCaseList",
components: {
TestCaseReportView,
@ -288,6 +290,7 @@
{text: this.$t('test_track.plan_view.skip'), value: 'Skip'},
{text: this.$t('test_track.plan.plan_status_running'), value: 'Underway'},
],
executorFilters: [],
showMore: false,
buttons: [
{
@ -344,6 +347,11 @@
});
this.refreshTableAndPlan();
this.isTestManagerOrTestUser = checkoutTestManagerOrTestUser();
this.result = this.$get('user/list', response => {
this.executorFilters = response.data.map(u => {
return {text: u.name, value: u.id}
});
});
},
beforeDestroy() {
hub.$off("openFailureTestCase");
@ -454,7 +462,7 @@
});
},
_handleBatchDelete(ids) {
this.result = this.$post('/test/plan/case/batch/delete', {ids:ids}, () => {
this.result = this.$post('/test/plan/case/batch/delete', {ids: ids}, () => {
this.selectRows.clear();
this.$emit("refresh");
this.$success(this.$t('test_track.cancel_relevance_success'));
@ -578,18 +586,18 @@
});
}
}
}
}
</script>
<style scoped>
.search {
.search {
margin-left: 10px;
width: 240px;
}
}
.test-case-status, .el-table {
.test-case-status, .el-table {
cursor: pointer;
}
}
</style>