Merge branch 'v1.8'
This commit is contained in:
commit
5cc4e709fe
|
@ -446,7 +446,9 @@ export default {
|
||||||
}
|
}
|
||||||
|
|
||||||
this.$nextTick(function () {
|
this.$nextTick(function () {
|
||||||
this.$refs.scenarioTable.doLayout();
|
if (this.$refs.scenarioTable) {
|
||||||
|
this.$refs.scenarioTable.doLayout();
|
||||||
|
}
|
||||||
this.checkTableRowIsSelect();
|
this.checkTableRowIsSelect();
|
||||||
})
|
})
|
||||||
});
|
});
|
||||||
|
@ -726,8 +728,8 @@ export default {
|
||||||
// let ids = [row.id];
|
// let ids = [row.id];
|
||||||
let param = {};
|
let param = {};
|
||||||
this.buildBatchParam(param);
|
this.buildBatchParam(param);
|
||||||
if(param.ids && param.ids.length <=0){
|
if (param.ids && param.ids.length <= 0) {
|
||||||
param.ids =[row.id];
|
param.ids = [row.id];
|
||||||
}
|
}
|
||||||
this.$post('/api/automation/removeToGcByBatch/', param, () => {
|
this.$post('/api/automation/removeToGcByBatch/', param, () => {
|
||||||
// this.$post('/api/automation/removeToGc/', ids, () => {
|
// this.$post('/api/automation/removeToGc/', ids, () => {
|
||||||
|
|
|
@ -313,7 +313,7 @@ export default {
|
||||||
this.condition.status = "Trash";
|
this.condition.status = "Trash";
|
||||||
this.condition.moduleIds = [];
|
this.condition.moduleIds = [];
|
||||||
}
|
}
|
||||||
if(!this.selectAll){
|
if (!this.selectAll) {
|
||||||
this.selectAll = false;
|
this.selectAll = false;
|
||||||
this.unSelection = [];
|
this.unSelection = [];
|
||||||
this.selectDataCounts = 0;
|
this.selectDataCounts = 0;
|
||||||
|
@ -342,7 +342,7 @@ export default {
|
||||||
this.total = response.data.itemCount;
|
this.total = response.data.itemCount;
|
||||||
this.tableData = response.data.listObject;
|
this.tableData = response.data.listObject;
|
||||||
|
|
||||||
if(!this.selectAll){
|
if (!this.selectAll) {
|
||||||
this.unSelection = response.data.listObject.map(s => s.id);
|
this.unSelection = response.data.listObject.map(s => s.id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -352,8 +352,10 @@ export default {
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
this.$nextTick(function(){
|
this.$nextTick(function () {
|
||||||
this.$refs.caseTable.doLayout();
|
if (this.$refs.caseTable) {
|
||||||
|
this.$refs.caseTable.doLayout();
|
||||||
|
}
|
||||||
this.checkTableRowIsSelect();
|
this.checkTableRowIsSelect();
|
||||||
})
|
})
|
||||||
});
|
});
|
||||||
|
@ -361,20 +363,20 @@ export default {
|
||||||
getLabel(this, API_CASE_LIST);
|
getLabel(this, API_CASE_LIST);
|
||||||
|
|
||||||
},
|
},
|
||||||
checkTableRowIsSelect(){
|
checkTableRowIsSelect() {
|
||||||
//如果默认全选的话,则选中应该选中的行
|
//如果默认全选的话,则选中应该选中的行
|
||||||
if(this.selectAll){
|
if (this.selectAll) {
|
||||||
let unSelectIds = this.unSelection;
|
let unSelectIds = this.unSelection;
|
||||||
this.tableData.forEach(row=>{
|
this.tableData.forEach(row => {
|
||||||
if(unSelectIds.indexOf(row.id)<0){
|
if (unSelectIds.indexOf(row.id) < 0) {
|
||||||
this.$refs.caseTable.toggleRowSelection(row,true);
|
this.$refs.caseTable.toggleRowSelection(row, true);
|
||||||
|
|
||||||
//默认全选,需要把选中对行添加到selectRows中。不然会影响到勾选函数统计
|
//默认全选,需要把选中对行添加到selectRows中。不然会影响到勾选函数统计
|
||||||
if (!this.selectRows.has(row)) {
|
if (!this.selectRows.has(row)) {
|
||||||
this.$set(row, "showMore", true);
|
this.$set(row, "showMore", true);
|
||||||
this.selectRows.add(row);
|
this.selectRows.add(row);
|
||||||
}
|
}
|
||||||
}else{
|
} else {
|
||||||
//不勾选的行,也要判断是否被加入了selectRow中。加入了的话就去除。
|
//不勾选的行,也要判断是否被加入了selectRow中。加入了的话就去除。
|
||||||
if (this.selectRows.has(row)) {
|
if (this.selectRows.has(row)) {
|
||||||
this.$set(row, "showMore", false);
|
this.$set(row, "showMore", false);
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -2,128 +2,128 @@
|
||||||
|
|
||||||
<div class="card-container" v-loading="result.loading">
|
<div class="card-container" v-loading="result.loading">
|
||||||
|
|
||||||
<ms-table-header :is-tester-permission="true" :condition.sync="condition" @search="initTableData"
|
<ms-table-header :is-tester-permission="true" :condition.sync="condition" @search="initTableData"
|
||||||
:tip="$t('commons.search_by_name_or_id')" title="" :show-create="false"/>
|
:tip="$t('commons.search_by_name_or_id')" title="" :show-create="false"/>
|
||||||
<el-table
|
<el-table
|
||||||
border
|
border
|
||||||
:data="tableData"
|
:data="tableData"
|
||||||
@sort-change="sort"
|
@sort-change="sort"
|
||||||
@filter-change="filter"
|
@filter-change="filter"
|
||||||
@select-all="handleSelectAll"
|
@select-all="handleSelectAll"
|
||||||
@select="handleSelect"
|
@select="handleSelect"
|
||||||
@header-dragend="headerDragend"
|
@header-dragend="headerDragend"
|
||||||
@cell-mouse-enter="showPopover"
|
@cell-mouse-enter="showPopover"
|
||||||
row-key="id"
|
row-key="id"
|
||||||
class="test-content adjust-table ms-select-all-fixed"
|
class="test-content adjust-table ms-select-all-fixed"
|
||||||
ref="table" @row-click="handleEdit">
|
ref="table" @row-click="handleEdit">
|
||||||
|
<el-table-column
|
||||||
|
width="50"
|
||||||
|
type="selection"/>
|
||||||
|
|
||||||
|
<ms-table-header-select-popover v-show="total>0"
|
||||||
|
:page-size="pageSize > total ? total : pageSize"
|
||||||
|
:total="total"
|
||||||
|
@selectPageAll="isSelectDataAll(false)"
|
||||||
|
@selectAll="isSelectDataAll(true)"/>
|
||||||
|
|
||||||
|
<el-table-column width="40" :resizable="false" align="center">
|
||||||
|
<template v-slot:default="scope">
|
||||||
|
<show-more-btn :is-show="scope.row.showMore" :buttons="buttons" :size="selectDataCounts"/>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<template v-for="(item, index) in tableLabel">
|
||||||
|
|
||||||
<el-table-column
|
<el-table-column
|
||||||
width="50"
|
v-if="item.id == 'num'"
|
||||||
type="selection"/>
|
prop="num"
|
||||||
|
sortable="custom"
|
||||||
<ms-table-header-select-popover v-show="total>0"
|
:label="$t('commons.id')"
|
||||||
:page-size="pageSize > total ? total : pageSize"
|
:key="index"
|
||||||
:total="total"
|
show-overflow-tooltip>
|
||||||
@selectPageAll="isSelectDataAll(false)"
|
</el-table-column>
|
||||||
@selectAll="isSelectDataAll(true)"/>
|
<el-table-column
|
||||||
|
v-if="item.id == 'name'"
|
||||||
<el-table-column width="40" :resizable="false" align="center">
|
prop="name"
|
||||||
|
:label="$t('commons.name')"
|
||||||
|
show-overflow-tooltip
|
||||||
|
:key="index"
|
||||||
|
>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
v-if="item.id == 'priority'"
|
||||||
|
prop="priority"
|
||||||
|
:filters="priorityFilters"
|
||||||
|
column-key="priority"
|
||||||
|
min-width="100px"
|
||||||
|
:label="$t('test_track.case.priority')"
|
||||||
|
show-overflow-tooltip
|
||||||
|
:key="index">
|
||||||
<template v-slot:default="scope">
|
<template v-slot:default="scope">
|
||||||
<show-more-btn :is-show="scope.row.showMore" :buttons="buttons" :size="selectDataCounts"/>
|
<priority-table-item :value="scope.row.priority"/>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<template v-for="(item, index) in tableLabel">
|
<el-table-column
|
||||||
|
v-if="item.id=='reviewStatus'"
|
||||||
<el-table-column
|
column-key="reviewStatus"
|
||||||
v-if="item.id == 'num'"
|
min-width="100px"
|
||||||
prop="num"
|
:label="$t('test_track.case.status')"
|
||||||
sortable="custom"
|
:key="index">
|
||||||
:label="$t('commons.id')"
|
<template v-slot:default="scope">
|
||||||
:key="index"
|
|
||||||
show-overflow-tooltip>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column
|
|
||||||
v-if="item.id == 'name'"
|
|
||||||
prop="name"
|
|
||||||
:label="$t('commons.name')"
|
|
||||||
show-overflow-tooltip
|
|
||||||
:key="index"
|
|
||||||
>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column
|
|
||||||
v-if="item.id == 'priority'"
|
|
||||||
prop="priority"
|
|
||||||
:filters="priorityFilters"
|
|
||||||
column-key="priority"
|
|
||||||
min-width="100px"
|
|
||||||
:label="$t('test_track.case.priority')"
|
|
||||||
show-overflow-tooltip
|
|
||||||
:key="index">
|
|
||||||
<template v-slot:default="scope">
|
|
||||||
<priority-table-item :value="scope.row.priority"/>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column
|
|
||||||
v-if="item.id=='reviewStatus'"
|
|
||||||
column-key="reviewStatus"
|
|
||||||
min-width="100px"
|
|
||||||
:label="$t('test_track.case.status')"
|
|
||||||
:key="index">
|
|
||||||
<template v-slot:default="scope">
|
|
||||||
<span class="el-dropdown-link">
|
<span class="el-dropdown-link">
|
||||||
<review-status :value="scope.row.reviewStatus"/>
|
<review-status :value="scope.row.reviewStatus"/>
|
||||||
</span>
|
</span>
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column v-if="item.id=='tags'" prop="tags" :label="$t('commons.tag')" :key="index">
|
|
||||||
<template v-slot:default="scope">
|
|
||||||
<ms-tag v-for="(itemName,index) in scope.row.tags" :key="index" type="success" effect="plain"
|
|
||||||
:content="itemName" style="margin-left: 0px; margin-right: 2px"/>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
|
|
||||||
<el-table-column
|
|
||||||
v-if="item.id=='nodePath'"
|
|
||||||
prop="nodePath"
|
|
||||||
:label="$t('test_track.case.module')"
|
|
||||||
min-width="150px"
|
|
||||||
show-overflow-tooltip
|
|
||||||
:key="index">
|
|
||||||
</el-table-column>
|
|
||||||
|
|
||||||
<el-table-column
|
|
||||||
v-if="item.id=='updateTime'"
|
|
||||||
prop="updateTime"
|
|
||||||
sortable="custom"
|
|
||||||
:label="$t('commons.update_time')"
|
|
||||||
min-width="150px"
|
|
||||||
show-overflow-tooltip
|
|
||||||
:key="index">
|
|
||||||
<template v-slot:default="scope">
|
|
||||||
<span>{{ scope.row.updateTime | timestampFormatDate }}</span>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
</template>
|
|
||||||
<el-table-column fixed="right" min-width="150">
|
|
||||||
<template slot="header">
|
|
||||||
<header-label-operate @exec="customHeader"/>
|
|
||||||
</template>
|
|
||||||
<template v-slot:default="scope">
|
|
||||||
<ms-table-operator :is-tester-permission="true" @editClick="handleEdit(scope.row)"
|
|
||||||
@deleteClick="handleDelete(scope.row)">
|
|
||||||
<template v-slot:middle>
|
|
||||||
<ms-table-operator-button :is-tester-permission="true" :tip="$t('commons.copy')"
|
|
||||||
icon="el-icon-document-copy"
|
|
||||||
type="success" @exec="handleCopy(scope.row)"/>
|
|
||||||
</template>
|
|
||||||
</ms-table-operator>
|
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<header-custom ref="headerCustom" :initTableData="initTableData" :optionalFields=headerItems
|
<el-table-column v-if="item.id=='tags'" prop="tags" :label="$t('commons.tag')" :key="index">
|
||||||
:type=type></header-custom>
|
<template v-slot:default="scope">
|
||||||
</el-table>
|
<ms-tag v-for="(itemName,index) in scope.row.tags" :key="index" type="success" effect="plain"
|
||||||
|
:content="itemName" style="margin-left: 0px; margin-right: 2px"/>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
|
||||||
<ms-table-pagination :change="initTableData" :current-page.sync="currentPage" :page-size.sync="pageSize"
|
<el-table-column
|
||||||
:total="total"/>
|
v-if="item.id=='nodePath'"
|
||||||
|
prop="nodePath"
|
||||||
|
:label="$t('test_track.case.module')"
|
||||||
|
min-width="150px"
|
||||||
|
show-overflow-tooltip
|
||||||
|
:key="index">
|
||||||
|
</el-table-column>
|
||||||
|
|
||||||
|
<el-table-column
|
||||||
|
v-if="item.id=='updateTime'"
|
||||||
|
prop="updateTime"
|
||||||
|
sortable="custom"
|
||||||
|
:label="$t('commons.update_time')"
|
||||||
|
min-width="150px"
|
||||||
|
show-overflow-tooltip
|
||||||
|
:key="index">
|
||||||
|
<template v-slot:default="scope">
|
||||||
|
<span>{{ scope.row.updateTime | timestampFormatDate }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</template>
|
||||||
|
<el-table-column fixed="right" min-width="150">
|
||||||
|
<template slot="header">
|
||||||
|
<header-label-operate @exec="customHeader"/>
|
||||||
|
</template>
|
||||||
|
<template v-slot:default="scope">
|
||||||
|
<ms-table-operator :is-tester-permission="true" @editClick="handleEdit(scope.row)"
|
||||||
|
@deleteClick="handleDelete(scope.row)">
|
||||||
|
<template v-slot:middle>
|
||||||
|
<ms-table-operator-button :is-tester-permission="true" :tip="$t('commons.copy')"
|
||||||
|
icon="el-icon-document-copy"
|
||||||
|
type="success" @exec="handleCopy(scope.row)"/>
|
||||||
|
</template>
|
||||||
|
</ms-table-operator>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<header-custom ref="headerCustom" :initTableData="initTableData" :optionalFields=headerItems
|
||||||
|
:type=type></header-custom>
|
||||||
|
</el-table>
|
||||||
|
|
||||||
|
<ms-table-pagination :change="initTableData" :current-page.sync="currentPage" :page-size.sync="pageSize"
|
||||||
|
:total="total"/>
|
||||||
|
|
||||||
<batch-edit ref="batchEdit" @batchEdit="batchEdit"
|
<batch-edit ref="batchEdit" @batchEdit="batchEdit"
|
||||||
:typeArr="typeArr" :value-arr="valueArr" :dialog-title="$t('test_track.case.batch_edit_case')"/>
|
:typeArr="typeArr" :value-arr="valueArr" :dialog-title="$t('test_track.case.batch_edit_case')"/>
|
||||||
|
@ -160,15 +160,17 @@ import {
|
||||||
_filter,
|
_filter,
|
||||||
_handleSelect,
|
_handleSelect,
|
||||||
_handleSelectAll,
|
_handleSelectAll,
|
||||||
_sort, buildBatchParam, getLabel,
|
_sort,
|
||||||
getSelectDataCounts, initCondition,
|
buildBatchParam,
|
||||||
|
getLabel,
|
||||||
|
getSelectDataCounts,
|
||||||
|
initCondition,
|
||||||
setUnSelectIds,
|
setUnSelectIds,
|
||||||
toggleAllSelection
|
toggleAllSelection
|
||||||
} from "@/common/js/tableUtils";
|
} from "@/common/js/tableUtils";
|
||||||
import BatchMove from "./BatchMove";
|
import BatchMove from "./BatchMove";
|
||||||
import {Track_Test_Case} from "@/business/components/common/model/JsonData";
|
import {Track_Test_Case} from "@/business/components/common/model/JsonData";
|
||||||
import HeaderCustom from "@/business/components/common/head/HeaderCustom";
|
import HeaderCustom from "@/business/components/common/head/HeaderCustom";
|
||||||
import i18n from "@/i18n/i18n";
|
|
||||||
import HeaderLabelOperate from "@/business/components/common/head/HeaderLabelOperate";
|
import HeaderLabelOperate from "@/business/components/common/head/HeaderLabelOperate";
|
||||||
import PlanStatusTableItem from "@/business/components/track/common/tableItems/plan/PlanStatusTableItem";
|
import PlanStatusTableItem from "@/business/components/track/common/tableItems/plan/PlanStatusTableItem";
|
||||||
|
|
||||||
|
@ -314,7 +316,7 @@ export default {
|
||||||
watch: {
|
watch: {
|
||||||
selectNodeIds() {
|
selectNodeIds() {
|
||||||
this.currentPage = 1;
|
this.currentPage = 1;
|
||||||
initCondition(this.condition,false);
|
initCondition(this.condition, false);
|
||||||
this.initTableData();
|
this.initTableData();
|
||||||
},
|
},
|
||||||
condition() {
|
condition() {
|
||||||
|
@ -334,7 +336,7 @@ export default {
|
||||||
this.condition.planId = "";
|
this.condition.planId = "";
|
||||||
this.condition.nodeIds = [];
|
this.condition.nodeIds = [];
|
||||||
//initCondition(this.condition);
|
//initCondition(this.condition);
|
||||||
initCondition(this.condition,this.condition.selectAll);
|
initCondition(this.condition, this.condition.selectAll);
|
||||||
this.selectDataCounts = 0;
|
this.selectDataCounts = 0;
|
||||||
if (this.planId) {
|
if (this.planId) {
|
||||||
// param.planId = this.planId;
|
// param.planId = this.planId;
|
||||||
|
@ -393,27 +395,29 @@ export default {
|
||||||
item.tags = JSON.parse(item.tags);
|
item.tags = JSON.parse(item.tags);
|
||||||
})
|
})
|
||||||
|
|
||||||
this.$nextTick(function(){
|
this.$nextTick(() => {
|
||||||
this.$refs.table.doLayout();
|
if (this.$refs.table) {
|
||||||
|
this.$refs.table.doLayout();
|
||||||
|
}
|
||||||
this.checkTableRowIsSelect();
|
this.checkTableRowIsSelect();
|
||||||
})
|
})
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
checkTableRowIsSelect(){
|
checkTableRowIsSelect() {
|
||||||
//如果默认全选的话,则选中应该选中的行
|
//如果默认全选的话,则选中应该选中的行
|
||||||
if(this.condition.selectAll){
|
if (this.condition.selectAll) {
|
||||||
let unSelectIds = this.condition.unSelectIds;
|
let unSelectIds = this.condition.unSelectIds;
|
||||||
this.tableData.forEach(row=>{
|
this.tableData.forEach(row => {
|
||||||
if(unSelectIds.indexOf(row.id)<0){
|
if (unSelectIds.indexOf(row.id) < 0) {
|
||||||
this.$refs.table.toggleRowSelection(row,true);
|
this.$refs.table.toggleRowSelection(row, true);
|
||||||
|
|
||||||
//默认全选,需要把选中对行添加到selectRows中。不然会影响到勾选函数统计
|
//默认全选,需要把选中对行添加到selectRows中。不然会影响到勾选函数统计
|
||||||
if (!this.selectRows.has(row)) {
|
if (!this.selectRows.has(row)) {
|
||||||
this.$set(row, "showMore", true);
|
this.$set(row, "showMore", true);
|
||||||
this.selectRows.add(row);
|
this.selectRows.add(row);
|
||||||
}
|
}
|
||||||
}else{
|
} else {
|
||||||
//不勾选的行,也要判断是否被加入了selectRow中。加入了的话就去除。
|
//不勾选的行,也要判断是否被加入了selectRow中。加入了的话就去除。
|
||||||
if (this.selectRows.has(row)) {
|
if (this.selectRows.has(row)) {
|
||||||
this.$set(row, "showMore", false);
|
this.$set(row, "showMore", false);
|
||||||
|
@ -441,7 +445,7 @@ export default {
|
||||||
handleCopy(testCase) {
|
handleCopy(testCase) {
|
||||||
this.$get('test/case/get/' + testCase.id, response => {
|
this.$get('test/case/get/' + testCase.id, response => {
|
||||||
let testCase = response.data;
|
let testCase = response.data;
|
||||||
testCase.name='copy_'+testCase.name
|
testCase.name = 'copy_' + testCase.name
|
||||||
this.$emit('testCaseCopy', testCase);
|
this.$emit('testCaseCopy', testCase);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
|
@ -472,7 +472,9 @@ export default {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
this.selectRows.clear();
|
this.selectRows.clear();
|
||||||
this.$refs.table.doLayout();
|
if (this.$refs.table) {
|
||||||
|
this.$refs.table.doLayout();
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
getLabel(this, TEST_PLAN_FUNCTION_TEST_CASE);
|
getLabel(this, TEST_PLAN_FUNCTION_TEST_CASE);
|
||||||
|
|
Loading…
Reference in New Issue