parent
de1071c7b8
commit
905f5a053e
|
@ -34,3 +34,4 @@ class LoginLogViewSet(CustomModelViewSet):
|
||||||
queryset = LoginLog.objects.all()
|
queryset = LoginLog.objects.all()
|
||||||
serializer_class = LoginLogSerializer
|
serializer_class = LoginLogSerializer
|
||||||
extra_filter_backends = []
|
extra_filter_backends = []
|
||||||
|
ordering_fields = ['create_datetime']
|
||||||
|
|
|
@ -20,9 +20,9 @@
|
||||||
"china-division": "^2.4.0",
|
"china-division": "^2.4.0",
|
||||||
"core-js": "^3.4.3",
|
"core-js": "^3.4.3",
|
||||||
"cropperjs": "^1.5.6",
|
"cropperjs": "^1.5.6",
|
||||||
"d2-crud-plus": "^2.13.1",
|
"d2-crud-plus": "^2.17.9",
|
||||||
"d2-crud-x": "^2.13.1",
|
"d2-crud-x": "^2.17.9",
|
||||||
"d2p-extends": "^2.13.1",
|
"d2p-extends": "^2.17.9",
|
||||||
"dayjs": "^1.8.17",
|
"dayjs": "^1.8.17",
|
||||||
"echarts": "^5.1.2",
|
"echarts": "^5.1.2",
|
||||||
"el-phone-number-input": "^1.1.5",
|
"el-phone-number-input": "^1.1.5",
|
||||||
|
|
|
@ -62,7 +62,15 @@ Vue.use(d2CrudPlus, {
|
||||||
page: { // page接口返回的数据结构配置,
|
page: { // page接口返回的数据结构配置,
|
||||||
request: {
|
request: {
|
||||||
current: 'page',
|
current: 'page',
|
||||||
size: 'limit'
|
size: 'limit',
|
||||||
|
orderAsc (query, value) {
|
||||||
|
const field = query.orderProp
|
||||||
|
if (value) {
|
||||||
|
query.ordering = field
|
||||||
|
} else {
|
||||||
|
query.ordering = `-${field}`
|
||||||
|
}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
response: {
|
response: {
|
||||||
current: 'page', // 当前页码 ret.data.current
|
current: 'page', // 当前页码 ret.data.current
|
||||||
|
|
|
@ -4,12 +4,11 @@ export const crudOptions = (vm) => {
|
||||||
compact: true
|
compact: true
|
||||||
},
|
},
|
||||||
options: {
|
options: {
|
||||||
tableType: 'vxe-table',
|
// tableType: 'vxe-table',
|
||||||
rowKey: true, // 必须设置,true or false
|
// rowKey: true, // 必须设置,true or false
|
||||||
rowId: 'id',
|
rowId: 'id',
|
||||||
height: '100%', // 表格高度100%, 使用toolbar必须设置
|
height: '100%', // 表格高度100%, 使用toolbar必须设置
|
||||||
highlightCurrentRow: false
|
highlightCurrentRow: false,
|
||||||
|
|
||||||
},
|
},
|
||||||
rowHandle: {
|
rowHandle: {
|
||||||
fixed: 'right',
|
fixed: 'right',
|
||||||
|
@ -284,7 +283,8 @@ export const crudOptions = (vm) => {
|
||||||
title: '登录时间',
|
title: '登录时间',
|
||||||
key: 'create_datetime',
|
key: 'create_datetime',
|
||||||
width: 160,
|
width: 160,
|
||||||
type: 'datetime'
|
type: 'datetime',
|
||||||
|
sortable: true
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,8 +9,8 @@ export const crudOptions = (vm) => {
|
||||||
},
|
},
|
||||||
options: {
|
options: {
|
||||||
height: '100%',
|
height: '100%',
|
||||||
tableType: 'vxe-table',
|
// tableType: 'vxe-table',
|
||||||
rowKey: true,
|
//rowKey: true,
|
||||||
rowId: 'id'
|
rowId: 'id'
|
||||||
},
|
},
|
||||||
selectionRow: {
|
selectionRow: {
|
||||||
|
@ -149,6 +149,7 @@ export const crudOptions = (vm) => {
|
||||||
{
|
{
|
||||||
title: '姓名',
|
title: '姓名',
|
||||||
key: 'name',
|
key: 'name',
|
||||||
|
sortable: 'custom',
|
||||||
minWidth: 90,
|
minWidth: 90,
|
||||||
search: {
|
search: {
|
||||||
disabled: false
|
disabled: false
|
||||||
|
|
Loading…
Reference in New Issue