fix: 自定义表头修改完不确认表头依然发生改变

This commit is contained in:
wenyann 2021-05-25 11:08:38 +08:00 committed by 刘瑞斌
parent 001cd152bf
commit 33f061e33f
10 changed files with 28 additions and 19 deletions

View File

@ -208,7 +208,7 @@ import {
_filter,
_handleSelect,
_handleSelectAll,
_sort,
_sort, deepClone,
getLabel,
getSelectDataCounts,
setUnSelectIds,
@ -418,7 +418,8 @@ export default {
},
methods: {
customHeader() {
this.$refs.headerCustom.open(this.tableLabel);
const list = deepClone(this.tableLabel);
this.$refs.headerCustom.open(list);
},
selectByParam() {
this.changeSelectDataRangeAll();

View File

@ -164,7 +164,7 @@ import {parseEnvironment} from "@/business/components/api/test/model/Environment
import MsTableHeaderSelectPopover from "@/business/components/common/components/table/MsTableHeaderSelectPopover";
import MsTableAdvSearchBar from "@/business/components/common/components/search/MsTableAdvSearchBar";
import {API_CASE_CONFIGS} from "@/business/components/common/components/search/search-components";
import {_filter, _handleSelect, _handleSelectAll, _sort, getLabel} from "@/common/js/tableUtils";
import {_filter, _handleSelect, _handleSelectAll, _sort, deepClone, getLabel} from "@/common/js/tableUtils";
import {API_CASE_LIST} from "@/common/js/constants";
import {Api_Case_List} from "@/business/components/common/model/JsonData";
import HeaderCustom from "@/business/components/common/head/HeaderCustom";
@ -314,7 +314,8 @@ export default {
},
methods: {
customHeader() {
this.$refs.headerCustom.open(this.tableLabel)
const list = deepClone(this.tableLabel);
this.$refs.headerCustom.open(list);
},
initTable() {
if (this.$refs.caseTable) {

View File

@ -177,7 +177,7 @@ import {
_handleSelect,
_handleSelectAll,
_sort,
buildBatchParam,
buildBatchParam, deepClone,
getLabel,
getSelectDataCounts,
initCondition,
@ -360,7 +360,8 @@ export default {
}
},
customHeader() {
this.$refs.headerCustom.open(this.tableLabel);
const list = deepClone(this.tableLabel);
this.$refs.headerCustom.open(list);
},
getSelectDataRange() {
let dataRange = this.$route.params.dataSelectRange;

View File

@ -31,7 +31,7 @@
</span>
<span v-if="!data.isEdit" class="node-title" v-text="data.name"/>
<span v-if="data.caseNum" class="node-title">
<span>(0/{{ data.caseNum }})</span>
<span>({{ data.caseNum }})</span>
</span>
<span v-if="!disabled" class="node-operate child">
<el-tooltip

View File

@ -228,7 +228,7 @@ import TestCaseReportView from "../view/comonents/report/TestCaseReportView";
import MsDeleteConfirm from "../../../common/components/MsDeleteConfirm";
import {TEST_PLAN_CONFIGS} from "../../../common/components/search/search-components";
import {LIST_CHANGE, TrackEvent} from "@/business/components/common/head/ListEvent";
import {_filter, _sort, getLabel} from "@/common/js/tableUtils";
import {_filter, _sort, deepClone, getLabel} from "@/common/js/tableUtils";
import {TEST_PLAN_LIST} from "@/common/js/constants";
import {Test_Plan_List} from "@/business/components/common/model/JsonData";
import HeaderCustom from "@/business/components/common/head/HeaderCustom";
@ -300,7 +300,8 @@ export default {
this.initTableData();
},
customHeader() {
this.$refs.headerCustom.open(this.tableLabel);
const list = deepClone(this.tableLabel);
this.$refs.headerCustom.open(list);
},
initTableData() {
if (this.planId) {

View File

@ -181,7 +181,7 @@ import {
_handleSelectAll,
_sort,
buildBatchParam,
checkTableRowIsSelect,
checkTableRowIsSelect, deepClone,
getLabel,
getSelectDataCounts,
setUnSelectIds,
@ -334,7 +334,8 @@ export default {
},
methods: {
customHeader() {
this.$refs.headerCustom.open(this.tableLabel);
const list = deepClone(this.tableLabel);
this.$refs.headerCustom.open(list);
},
getMaintainerOptions() {
let workspaceId = localStorage.getItem(WORKSPACE_ID);

View File

@ -138,7 +138,7 @@ import {
initCondition,
buildBatchParam,
toggleAllSelection,
checkTableRowIsSelect
checkTableRowIsSelect, deepClone
} from "../../../../../../../common/js/tableUtils";
import MsTableOperatorButton from "../../../../../common/components/MsTableOperatorButton";
import HeaderCustom from "@/business/components/common/head/HeaderCustom";
@ -241,7 +241,8 @@ export default {
},
methods: {
customHeader() {
this.$refs.headerCustom.open(this.tableLabel)
const list = deepClone(this.tableLabel);
this.$refs.headerCustom.open(list);
},
search() {
initCondition(this.condition,this.condition.selectAll);

View File

@ -158,7 +158,7 @@ import {
buildBatchParam,
initCondition,
toggleAllSelection,
checkTableRowIsSelect
checkTableRowIsSelect, deepClone
} from "@/common/js/tableUtils";
import HeaderCustom from "@/business/components/common/head/HeaderCustom";
import {TAPD, TEST_CASE_LIST, TEST_PLAN_LOAD_CASE} from "@/common/js/constants";
@ -296,7 +296,8 @@ export default {
},
customHeader() {
this.$refs.headerCustom.open(this.tableLabel)
const list = deepClone(this.tableLabel);
this.$refs.headerCustom.open(list);
},
initTable() {
this.autoCheckStatus();

View File

@ -120,7 +120,7 @@ import MsTableHeader from "../../../common/components/MsTableHeader";
import MsCreateBox from "../../../settings/CreateBox";
import MsTablePagination from "../../../common/pagination/TablePagination";
import {checkoutTestManagerOrTestUser, getCurrentWorkspaceId} from "@/common/js/utils";
import {_filter, _sort, getLabel} from "@/common/js/tableUtils";
import {_filter, _sort, deepClone, getLabel} from "@/common/js/tableUtils";
import PlanStatusTableItem from "../../common/tableItems/plan/PlanStatusTableItem";
import {Test_Case_Review} from "@/business/components/common/model/JsonData";
import {TEST_CASE_REVIEW_LIST} from "@/common/js/constants";
@ -180,7 +180,8 @@ export default {
},
methods: {
customHeader() {
this.$refs.headerCustom.open(this.tableLabel);
const list = deepClone(this.tableLabel);
this.$refs.headerCustom.open(list);
},
initTableData() {

View File

@ -211,7 +211,7 @@ import {
_handleSelect,
_handleSelectAll,
_sort,
buildBatchParam,
buildBatchParam, deepClone,
getLabel,
getSelectDataCounts,
initCondition,
@ -315,7 +315,8 @@ export default {
},
methods: {
customHeader() {
this.$refs.headerCustom.open(this.tableLabel);
const list = deepClone(this.tableLabel);
this.$refs.headerCustom.open(list);
},
initTableData() {
initCondition(this.condition, this.condition.selectAll);