部分页面添加默认排序规则新增排序字段

uat_us
wangxiaoshuang 2024-03-27 14:39:22 +08:00
parent 5e2522147f
commit 1724e020f6
3 changed files with 11 additions and 3 deletions

View File

@ -117,6 +117,7 @@
@sort-change="handleSortChange" @sort-change="handleSortChange"
stripe stripe
height="100" height="100"
:default-sort ="{prop: 'CreateTime', order: 'descending'}"
> >
<el-table-column type="index" width="40" fixed="left" align="left" /> <el-table-column type="index" width="40" fixed="left" align="left" />
<!-- 研究方案号 --> <!-- 研究方案号 -->
@ -748,7 +749,7 @@ export default {
data() { data() {
const searchDataDefault = () => { const searchDataDefault = () => {
return { return {
SortField: '', SortField: 'CreateTime',
Asc: false, Asc: false,
PageIndex: 1, PageIndex: 1,
PageSize: 20, PageSize: 20,

View File

@ -69,6 +69,7 @@
:data="list" :data="list"
class="table" class="table"
@sort-change="handleSortByColumn" @sort-change="handleSortByColumn"
:default-sort ="{prop: 'CreateTime', order: 'descending'}"
> >
<el-table-column <el-table-column
type="index" type="index"
@ -90,6 +91,7 @@
prop="IP" prop="IP"
min-width="90" min-width="90"
show-overflow-tooltip show-overflow-tooltip
sortable="custom"
/> />
<el-table-column <el-table-column
:label="$t('trials:loginLog:table:incorrectUserName')" :label="$t('trials:loginLog:table:incorrectUserName')"
@ -110,6 +112,7 @@
prop="LoginUserTypeEnum" prop="LoginUserTypeEnum"
min-width="90" min-width="90"
show-overflow-tooltip show-overflow-tooltip
sortable="custom"
> >
<template slot-scope="scope"> <template slot-scope="scope">
{{ $fd('UserType',scope.row.LoginUserTypeEnum) }} {{ $fd('UserType',scope.row.LoginUserTypeEnum) }}
@ -120,12 +123,14 @@
prop="optUserName" prop="optUserName"
min-width="90" min-width="90"
show-overflow-tooltip show-overflow-tooltip
sortable="custom"
/> />
<el-table-column <el-table-column
:label="$t('trials:loginLog:table:optUserType')" :label="$t('trials:loginLog:table:optUserType')"
prop="OptUserTypeEnum" prop="OptUserTypeEnum"
min-width="90" min-width="90"
show-overflow-tooltip show-overflow-tooltip
sortable="custom"
> >
<template slot-scope="scope"> <template slot-scope="scope">
{{ $fd('UserType',scope.row.OptUserTypeEnum) }} {{ $fd('UserType',scope.row.OptUserTypeEnum) }}
@ -136,6 +141,7 @@
prop="CreateTime" prop="CreateTime"
min-width="90" min-width="90"
show-overflow-tooltip show-overflow-tooltip
sortable="custom"
/> />
</el-table> </el-table>
<!-- 分页组件 --> <!-- 分页组件 -->
@ -157,7 +163,7 @@ const searchDataDefault = () => {
BeginDate: '', BeginDate: '',
EndDate: '', EndDate: '',
Asc: false, Asc: false,
SortField: '', SortField: 'CreateTime',
PageIndex: 1, PageIndex: 1,
PageSize: 20 PageSize: 20
} }

View File

@ -90,6 +90,7 @@
stripe stripe
height="100" height="100"
@sort-change="handleSortByColumn" @sort-change="handleSortByColumn"
:default-sort ="{prop: 'ArchiveFinishedTime', order: 'descending'}"
> >
<el-table-column type="index" width="40" align="left" /> <el-table-column type="index" width="40" align="left" />
<!-- 中心编号 --> <!-- 中心编号 -->
@ -337,7 +338,7 @@ import BaseModel from '@/components/BaseModel'
import axios from "axios"; import axios from "axios";
const searchDataDefault = () => { const searchDataDefault = () => {
return { return {
SortField: '', SortField: 'ArchiveFinishedTime',
Asc: false, Asc: false,
PageIndex: 1, PageIndex: 1,
PageSize: 20, PageSize: 20,