This commit is contained in:
fit2-zhao 2021-03-23 13:54:22 +08:00
commit 6761a96f15
7 changed files with 43 additions and 16 deletions

View File

@ -306,9 +306,12 @@
or test_case.num like CONCAT('%', #{request.name},'%')
or test_case.tags like CONCAT('%', #{request.name},'%'))
</if>
<if test="request.createTime >0">
<if test="request.relevanceCreateTime >0">
and test_case.id in (select test_case_id from test_case_test where test_case_test.create_time >= #{request.createTime})
</if>
<if test="request.createTime >0">
and test_case.create_time >= #{request.createTime}
</if>
<if test="request.nodeIds != null and request.nodeIds.size() > 0">
and test_case.node_id in
<foreach collection="request.nodeIds" item="nodeId" separator="," open="(" close=")">

View File

@ -24,8 +24,10 @@ public class QueryTestCaseRequest extends BaseQueryRequest {
private String reviewId;
private boolean isSelectThisWeedData = false;
private boolean isSelectThisWeedRelevanceData = false;
private String caseCoverage;
private long createTime = 0;
private long relevanceCreateTime = 0;
}

View File

@ -210,13 +210,19 @@ public class TestCaseService {
*/
private void initRequest(QueryTestCaseRequest request, boolean checkThisWeekData) {
if (checkThisWeekData) {
Map<String, Date> weekFirstTimeAndLastTime = DateUtils.getWeedFirstTimeAndLastTime(new Date());
Date weekFirstTime = weekFirstTimeAndLastTime.get("firstTime");
if (request.isSelectThisWeedData()) {
Map<String, Date> weekFirstTimeAndLastTime = DateUtils.getWeedFirstTimeAndLastTime(new Date());
Date weekFirstTime = weekFirstTimeAndLastTime.get("firstTime");
if (weekFirstTime != null) {
request.setCreateTime(weekFirstTime.getTime());
}
}
if (request.isSelectThisWeedRelevanceData()) {
if (weekFirstTime != null) {
request.setRelevanceCreateTime(weekFirstTime.getTime());
}
}
}
}

View File

@ -439,6 +439,14 @@ export default {
if (this.type === 'edit' || this.type === 'copy') {
this.open(this.currentTestCaseInfo)
}
// Cascader : input
setInterval(function () {
document.querySelectorAll('.el-cascader-node__label').forEach(el => {
el.onclick = function () {
if (this.previousElementSibling) this.previousElementSibling.click();
};
});
}, 1000);
},
watch: {
treeNodes() {

View File

@ -409,11 +409,15 @@ export default {
getData() {
this.getSelectDataRange();
this.condition.selectThisWeedData = false;
this.condition.selectThisWeedRelevanceData = false;
this.condition.caseCoverage = null;
switch (this.selectDataRange) {
case 'thisWeekCount':
this.condition.selectThisWeedData = true;
break;
case 'thisWeekRelevanceCount':
this.condition.selectThisWeedRelevanceData = true;
break;
case 'uncoverage':
this.condition.caseCoverage = 'uncoverage';
break;

View File

@ -9,18 +9,22 @@
<el-menu-item :index="'/track/home'">
{{ $t("i18n.home") }}
</el-menu-item>
<el-submenu v-permission="['test_manager','test_user','test_viewer']"
index="6" popper-class="submenu">
<template v-slot:title>{{ $t('test_track.case.test_case') }}</template>
<ms-recent-list ref="caseRecent" :options="caseRecent"/>
<el-divider/>
<ms-show-all :index="'/track/case/all'"/>
<el-menu-item :index="testCaseEditPath" class="blank_item"></el-menu-item>
<el-menu-item :index="testCaseProjectPath" class="blank_item"></el-menu-item>
<ms-create-button v-permission="['test_manager','test_user']" :index="'/track/case/create'"
:title="$t('test_track.case.create_case')"/>
</el-submenu>
<el-menu-item :index="'/track/case/all'">
{{ $t("test_track.case.test_case") }}
</el-menu-item>
<!--
<el-submenu v-permission="['test_manager','test_user','test_viewer']"
index="6" popper-class="submenu">
<template v-slot:title>{{ $t('test_track.case.test_case') }}</template>
<ms-recent-list ref="caseRecent" :options="caseRecent"/>
<el-divider/>
<ms-show-all :index="'/track/case/all'"/>
<el-menu-item :index="testCaseEditPath" class="blank_item"></el-menu-item>
<el-menu-item :index="testCaseProjectPath" class="blank_item"></el-menu-item>
<ms-create-button v-permission="['test_manager','test_user']" :index="'/track/case/create'"
:title="$t('test_track.case.create_case')"/>
</el-submenu>
-->
<el-submenu v-permission="['test_manager','test_user','test_viewer']"
index="8" popper-class="submenu">

View File

@ -40,7 +40,7 @@
<el-row>
<el-col>
{{$t('api_test.home_page.api_details_card.this_week_add')}}
<el-link type="info" @click="redirectPage('thisWeekCount')" target="_blank" style="color: #000000">{{relevanceCountData.thisWeekAddedCount}}
<el-link type="info" @click="redirectPage('thisWeekRelevanceCount')" target="_blank" style="color: #000000">{{relevanceCountData.thisWeekAddedCount}}
</el-link>
{{$t('api_test.home_page.unit_of_measurement')}}
</el-col>