篮球设备增加上传日志功能

This commit is contained in:
2023-12-13 21:25:47 +08:00
parent d8d113d325
commit dc00ac0ed4
4 changed files with 49 additions and 10 deletions

View File

@@ -46,8 +46,10 @@
<el-table-column label="操作" align="center" width="150">
<template scope="scope">
<el-button size="small" type="text" @click="handleEnter(scope.row.id)">管理员进场</el-button>
<el-button size="small" type="text" class="danger" @click="handleOut(scope.row.id)">管理员</el-button>
<el-button size="small" type="text" @click="uploadLog(scope.row.id)">上传日志(bug)</el-button>
<!-- <el-button size="small" type="text" @click="handleEnter(scope.row.id)">管理员</el-button>-->
<!-- <el-button size="small" type="text" @click="handleOut(scope.row.id)">管理员出场</el-button>-->
<el-button size="small" type="text" @click="printCard(scope.row.id)">打印临时卡凭证</el-button>
<!-- <el-button size="small" v-if="scope.row.status == 0" type="text" @click="handleReconnect(scope.row.id)">重新连接</el-button>-->
</template>
</el-table-column>
@@ -56,7 +58,7 @@
</template>
<script>
import { remove, reconnect ,adminEnter,adminOut} from '@/api//device'
import { remove, reconnect, checkAlive, adminEnter, adminOut, uploadLog } from '@/api//device'
import waves from '@/directive/waves.js'// 水波纹指令
import Pagination from '@/components/Pagination'
import { findVenueByType } from '@/api//venue'
@@ -114,6 +116,22 @@ export default {
this.handleSearch()
})
},
printCard(id) {
checkAlive(id).then(response => {
this.handleSearch()
// const fileUrl = 'http://127.0.0.1:8093/qrcode/print/' + id
const fileUrl = 'https://api.hongyutiyu.top/qrcode/print/' + id
window.open(fileUrl)
})
},
uploadLog(id) {
uploadLog(id).then(response => {
this.handleSearch()
})
},
/**
* 搜索门禁设备
*/