This commit is contained in:
磷叶 2025-02-24 15:06:09 +08:00
parent a0636c093f
commit 7e881ac42a

View File

@ -88,7 +88,7 @@
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList" :columns="columns"></right-toolbar>
</el-row>
<el-table v-loading="loading" :data="projectList" @selection-change="handleSelectionChange" :default-sort="defaultSort" @sort-change="onSortChange">
<el-table v-loading="loading" :data="projectList" @selection-change="handleSelectionChange" @sort-change="onSortChange">
<el-table-column type="selection" width="55" align="center" />
<template v-for="column of showColumns">
<el-table-column
@ -257,12 +257,6 @@ import BooleanTag from '@/components/BooleanTag/index.vue';
import UserSelect from '@/components/Business/User/UserSelect.vue';
import {ProjectUtils} from '@/views/bst/project/utils.js';
//
const defaultSort = {
prop: "createTime",
order: "descending"
}
export default {
name: "Project",
mixins: [$showColumns],
@ -295,7 +289,6 @@ export default {
return {
showTaskDialog: false, //
ProjectStatus,
defaultSort,
showStartDialog: false, //
showMaintenanceDialog: false, //
row: {}, //
@ -340,8 +333,6 @@ export default {
queryParams: {
pageNum: 1,
pageSize: 20,
orderByColumn: defaultSort.prop,
isAsc: defaultSort.order,
id: null,
no: null,
name: null,
@ -424,8 +415,8 @@ export default {
/** 当排序按钮被点击时触发 **/
onSortChange(column) {
if (column.order == null) {
this.queryParams.orderByColumn = defaultSort.prop;
this.queryParams.isAsc = defaultSort.order;
this.queryParams.orderByColumn = null;
this.queryParams.isAsc = null;
} else {
this.queryParams.orderByColumn = column.prop;
this.queryParams.isAsc = column.order;