mirror of
https://github.com/kuaifan/dootask.git
synced 2025-12-30 07:30:22 +00:00
perf: 签到设备显示
This commit is contained in:
parent
4f6034457f
commit
be262c3a69
@ -788,12 +788,21 @@ export default {
|
|||||||
created() {
|
created() {
|
||||||
if (this.checkinMac) {
|
if (this.checkinMac) {
|
||||||
this.columns.splice(5, 0, {
|
this.columns.splice(5, 0, {
|
||||||
title: this.$L('MAC地址'),
|
title: this.$L('设备情况'),
|
||||||
key: 'checkin_mac',
|
key: 'checkin_mac',
|
||||||
minWidth: 80,
|
minWidth: 80,
|
||||||
render: (h, {row}) => {
|
render: (h, {row}) => {
|
||||||
let checkin_macs = $A.cloneJSON(row.checkin_macs || [])
|
let checkin_macs = $A.cloneJSON(row.checkin_macs || [])
|
||||||
|
let checkin_face = $A.cloneJSON(row.checkin_face || '')
|
||||||
|
const tmp = []
|
||||||
|
const checkin_face_desc = checkin_face ? "已上传(人脸)" : "未上传(人脸)"
|
||||||
if (checkin_macs.length === 0) {
|
if (checkin_macs.length === 0) {
|
||||||
|
if (checkin_face){
|
||||||
|
tmp.push(h('AutoTip', checkin_face_desc))
|
||||||
|
return h('div', {
|
||||||
|
class: 'team-table-department-warp'
|
||||||
|
}, tmp);
|
||||||
|
}
|
||||||
return h('div', '-');
|
return h('div', '-');
|
||||||
} else {
|
} else {
|
||||||
const desc = (item) => {
|
const desc = (item) => {
|
||||||
@ -802,24 +811,28 @@ export default {
|
|||||||
}
|
}
|
||||||
return item.mac
|
return item.mac
|
||||||
}
|
}
|
||||||
const tmp = []
|
const checkin_devices_desc = []
|
||||||
tmp.push(h('AutoTip', desc(checkin_macs[0])))
|
tmp.push(h('AutoTip', desc(checkin_macs[0])))
|
||||||
if (checkin_macs.length > 1) {
|
if (checkin_macs.length > 1) {
|
||||||
checkin_macs = checkin_macs.splice(1)
|
checkin_macs = checkin_macs.splice(1)
|
||||||
|
checkin_devices_desc.push(...checkin_macs.map(item => {
|
||||||
|
return desc(item)
|
||||||
|
}))
|
||||||
|
if (checkin_face) {
|
||||||
|
checkin_devices_desc.push(checkin_face_desc)
|
||||||
|
}
|
||||||
tmp.push(h('ETooltip', [
|
tmp.push(h('ETooltip', [
|
||||||
h('div', {
|
h('div', {
|
||||||
slot: 'content',
|
slot: 'content',
|
||||||
domProps: {
|
domProps: {
|
||||||
innerHTML: checkin_macs.map(item => {
|
innerHTML: checkin_devices_desc.join("<br/>")
|
||||||
return desc(item)
|
|
||||||
}).join("<br/>")
|
|
||||||
}
|
}
|
||||||
}),
|
}),
|
||||||
h('div', {
|
h('div', {
|
||||||
class: 'department-tag-num'
|
class: 'department-tag-num'
|
||||||
}, ` +${checkin_macs.length}`)
|
}, ` +${checkin_devices_desc.length}`)
|
||||||
]))
|
]))
|
||||||
}
|
}
|
||||||
return h('div', {
|
return h('div', {
|
||||||
class: 'team-table-department-warp'
|
class: 'team-table-department-warp'
|
||||||
}, tmp);
|
}, tmp);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user