篮球场扫码入场

This commit is contained in:
2023-09-05 09:31:36 +08:00
parent 9bf561505b
commit d8d113d325
4 changed files with 79 additions and 48 deletions

View File

@@ -18,14 +18,14 @@
<Pagination uri="/devices" :request-params="params" ref="pagination">
<!-- 设备名称 -->
<el-table-column align="center" label="名称">
<el-table-column align="center" label="门禁序列号">
<template scope="scope">
<span>{{scope.row.name}}</span>
</template>
</el-table-column>
<!-- 视频流地址 -->
<el-table-column align="center" label="视频流地址">
<el-table-column align="center" label="设备IP地址">
<template scope="scope">
<span>{{scope.row.stream}}</span>
</template>
@@ -46,9 +46,9 @@
<el-table-column label="操作" align="center" width="150">
<template scope="scope">
<el-button size="small" type="text" @click="handleEdit(scope.row.id)">编辑</el-button>
<el-button size="small" type="text" class="danger" @click="handleDelete(scope.row)">删除</el-button>
<el-button size="small" v-if="scope.row.status == 0" type="text" @click="handleReconnect(scope.row.id)">重新连接</el-button>
<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" v-if="scope.row.status == 0" type="text" @click="handleReconnect(scope.row.id)">重新连接</el-button>-->
</template>
</el-table-column>
</Pagination>
@@ -56,7 +56,7 @@
</template>
<script>
import { remove, reconnect } from '@/api//device'
import { remove, reconnect ,adminEnter,adminOut} from '@/api//device'
import waves from '@/directive/waves.js'// 水波纹指令
import Pagination from '@/components/Pagination'
import { findVenueByType } from '@/api//venue'
@@ -102,6 +102,18 @@ export default {
this.handleSearch()
})
},
handleEnter(id) {
adminEnter(id).then(response => {
this.handleSearch()
})
},
handleOut(id) {
adminOut(id).then(response => {
this.handleSearch()
})
},
/**
* 搜索门禁设备
*/