|
|
@ -36,27 +36,27 @@ |
|
|
|
@selection-change="selectionChangeHandler" |
|
|
|
> |
|
|
|
<el-table-column type="selection" width="55" align="center" /> |
|
|
|
<el-table-column prop="user_name" label="姓名" min-width="100" align="center" /> |
|
|
|
<el-table-column prop="employee_id" label="工号" min-width="140" align="center" /> |
|
|
|
<el-table-column prop="card_no" label="卡编号" min-width="140" align="center" /> |
|
|
|
<el-table-column prop="card_code" label="卡内码" min-width="140" align="center" /> |
|
|
|
<el-table-column prop="department_name" label="部门" min-width="140" align="center" /> |
|
|
|
<el-table-column prop="door_name" label="门区" min-width="100" align="center" /> |
|
|
|
<el-table-column prop="in_or_out" label="事件" align="center" min-width="150"> |
|
|
|
<el-table-column prop="userName" label="姓名" min-width="100" align="center" /> |
|
|
|
<el-table-column prop="employeeId" label="工号" min-width="140" align="center" /> |
|
|
|
<el-table-column prop="cardNo" label="卡编号" min-width="140" align="center" /> |
|
|
|
<el-table-column prop="cardCode" label="卡内码" min-width="140" align="center" /> |
|
|
|
<el-table-column prop="departmentName" label="部门" min-width="140" align="center" /> |
|
|
|
<el-table-column prop="doorName" label="门区" min-width="100" align="center" /> |
|
|
|
<el-table-column prop="inOrOut" label="事件" align="center" min-width="150"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<span v-if="scope.row.in_or_out===0" class="clear" style="width:56px">进门</span> |
|
|
|
<span v-if="scope.row.in_or_out===1" class="clear" style="width:56px">出门</span> |
|
|
|
<el-tag v-if="scope.row.inOrOut===0">进门</el-tag> |
|
|
|
<el-tag v-if="scope.row.inOrOut===1" type="warning">出门</el-tag> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column prop="his_time" label="记录时间" align="center" min-width="150"> |
|
|
|
<el-table-column prop="hisTime" label="记录时间" align="center" min-width="150"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<div>{{ scope.row.his_time | parseTime }}</div> |
|
|
|
<div>{{ scope.row.hisTime | parseTime }}</div> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column prop="action" label="动作类型" align="center" min-width="180" /> |
|
|
|
<el-table-column prop="create_time" label="报警时间" align="center" min-width="180"> |
|
|
|
<el-table-column prop="createTime" label="创建时间" align="center" min-width="180"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<div>{{ scope.row.create_time | parseTime }}</div> |
|
|
|
<div>{{ scope.row.createTime | parseTime }}</div> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<!-- <el-table-column prop="alarmEvent" label="事件" min-width="150" align="center"> |
|
|
@ -85,24 +85,25 @@ export default { |
|
|
|
mixins: [presenter(), crud()], |
|
|
|
cruds() { |
|
|
|
return CRUD({ |
|
|
|
url: 'api/securitydoor/initSecurityDoorLog', |
|
|
|
url: 'api/securitydoor/initSecurityDoorLog1', |
|
|
|
optShow: { |
|
|
|
add: false, |
|
|
|
edit: false, |
|
|
|
del: false, |
|
|
|
download: true |
|
|
|
} |
|
|
|
}, |
|
|
|
sort: [] |
|
|
|
}) |
|
|
|
}, |
|
|
|
data() { |
|
|
|
return { |
|
|
|
selections: [], |
|
|
|
keyWord: '', |
|
|
|
optionVal: 'user_name', |
|
|
|
optionVal: 'userName', |
|
|
|
options: [ |
|
|
|
{ value: 'user_name', label: '姓名' }, |
|
|
|
{ value: 'employee_id', label: '工号' }, |
|
|
|
{ value: 'door_name', label: '门区' } |
|
|
|
{ value: 'userName', label: '姓名' }, |
|
|
|
{ value: 'employeeId', label: '工号' }, |
|
|
|
{ value: 'doorName', label: '门区' } |
|
|
|
], |
|
|
|
queryTime: [] |
|
|
|
} |
|
|
@ -114,25 +115,26 @@ export default { |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
[CRUD.HOOK.beforeRefresh]() { |
|
|
|
this.crud.query.roomName = null |
|
|
|
this.crud.query.deviceName = null |
|
|
|
this.crud.query.userName = null |
|
|
|
this.crud.query.employeeId = null |
|
|
|
this.crud.query.doorName = null |
|
|
|
this.crud.query.startTime = null |
|
|
|
this.crud.query.endTime = null |
|
|
|
if (this.optionVal === 'deviceName') { |
|
|
|
this.crud.query.deviceName = this.keyWord |
|
|
|
} else if (this.optionVal === 'roomName') { |
|
|
|
this.crud.query.roomName = this.keyWord |
|
|
|
if (this.optionVal === 'employeeId') { |
|
|
|
this.crud.query.employeeId = this.keyWord |
|
|
|
} else if (this.optionVal === 'userName') { |
|
|
|
this.crud.query.userName = this.keyWord |
|
|
|
} else if (this.optionVal === 'doorName') { |
|
|
|
this.crud.query.doorName = this.keyWord |
|
|
|
} |
|
|
|
if (this.queryTime.length > 0) { |
|
|
|
this.crud.query.startTime = this.queryTime[0] |
|
|
|
this.crud.query.endTime = this.queryTime[1] |
|
|
|
this.crud.query.startTime = this.queryTime |
|
|
|
} |
|
|
|
}, |
|
|
|
// 导出 |
|
|
|
handleDownload() { |
|
|
|
this.crud.downloadLoading = true |
|
|
|
const fileName = parseTime(new Date()) + '-门禁日志.xlsx' |
|
|
|
getBlob(this.baseApi + '/api/securitydoor/exportSecurityDoorLogList' + '?' + qs.stringify(this.crud.query, { indices: false }), function(blob) { |
|
|
|
getBlob(this.baseApi + '/api/securitydoor/exportSecurityDoorLog1List' + '?' + qs.stringify(this.crud.query, { indices: false }), function(blob) { |
|
|
|
saveAs(blob, fileName) |
|
|
|
}) |
|
|
|
this.crud.downloadLoading = false |
|
|
|