mirror of
https://github.com/kuaifan/dootask.git
synced 2025-12-13 12:02:51 +00:00
perf: 团队管理选择离职时根据离职时间排序
This commit is contained in:
parent
afcbd6af92
commit
bb163605af
@ -724,6 +724,7 @@ class UsersController extends AbstractController
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ($keys['disable'] === 'yes') {
|
if ($keys['disable'] === 'yes') {
|
||||||
|
$builder->orderByDesc('disable_at');
|
||||||
$builder->whereNotNull('disable_at');
|
$builder->whereNotNull('disable_at');
|
||||||
} elseif ($keys['disable'] !== 'all') {
|
} elseif ($keys['disable'] !== 'all') {
|
||||||
$builder->whereNull('disable_at');
|
$builder->whereNull('disable_at');
|
||||||
|
|||||||
@ -318,6 +318,7 @@ export default {
|
|||||||
|
|
||||||
keys: {},
|
keys: {},
|
||||||
keyIs: false,
|
keyIs: false,
|
||||||
|
keyDisable: false,
|
||||||
|
|
||||||
columns: [
|
columns: [
|
||||||
{
|
{
|
||||||
@ -503,9 +504,34 @@ export default {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: this.$L('最后在线'),
|
|
||||||
key: 'line_at',
|
key: 'line_at',
|
||||||
width: 168,
|
width: 168,
|
||||||
|
renderHeader: (h) => {
|
||||||
|
const arr = [];
|
||||||
|
if (this.keyDisable) {
|
||||||
|
arr.push(h('span', {
|
||||||
|
style: {
|
||||||
|
color: '#f90'
|
||||||
|
}
|
||||||
|
}, this.$L('离职时间')))
|
||||||
|
arr.push(h('span', '/'))
|
||||||
|
}
|
||||||
|
arr.push(h('span', this.$L('最后在线')))
|
||||||
|
return h('div', arr)
|
||||||
|
},
|
||||||
|
render: (h, params) => {
|
||||||
|
const {line_at, disable_at} = params.row;
|
||||||
|
const arr = [];
|
||||||
|
if (this.keyDisable) {
|
||||||
|
arr.push(h('div', {
|
||||||
|
style: {
|
||||||
|
color: '#f90'
|
||||||
|
}
|
||||||
|
}, disable_at || '-'))
|
||||||
|
}
|
||||||
|
arr.push(h('div', line_at || '-'))
|
||||||
|
return h('div', arr);
|
||||||
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: this.$L('操作'),
|
title: this.$L('操作'),
|
||||||
@ -815,6 +841,7 @@ export default {
|
|||||||
getLists() {
|
getLists() {
|
||||||
this.loadIng++;
|
this.loadIng++;
|
||||||
this.keyIs = $A.objImplode(this.keys) != "";
|
this.keyIs = $A.objImplode(this.keys) != "";
|
||||||
|
this.keyDisable = this.keys.disable === "yes";
|
||||||
let keys = $A.cloneJSON(this.keys)
|
let keys = $A.cloneJSON(this.keys)
|
||||||
if (this.departmentSelect > -1) {
|
if (this.departmentSelect > -1) {
|
||||||
keys = Object.assign(keys, {
|
keys = Object.assign(keys, {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user