篮球设备增加上传日志功能
This commit is contained in:
@@ -18,7 +18,13 @@ export function adminEnter(id) {
|
||||
export function adminOut(id) {
|
||||
return http.post('/device/admin/out/' + id)
|
||||
}
|
||||
export function uploadLog(id) {
|
||||
return http.post('/device/upload/log/' + id)
|
||||
}
|
||||
|
||||
export function checkAlive(id) {
|
||||
return http.post('/device/checkAlive/' + id)
|
||||
}
|
||||
/**
|
||||
* 删除门禁设备
|
||||
*/
|
||||
|
||||
@@ -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()
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 搜索门禁设备
|
||||
*/
|
||||
|
||||
@@ -157,6 +157,18 @@
|
||||
<div style="color:red;margin-bottom: 5px;">*说明建议不超过200字</div>
|
||||
<tinymce :height="300" v-model="form.cardContent" id='cardContent' style="width:900px"></tinymce>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="计费方式" prop="payStyle">
|
||||
<el-select style="width:200px" v-model="form.payStyle">
|
||||
<el-option label="按次" :value="0"></el-option>
|
||||
<el-option label="按时" :value="1"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<!-- 按次需要操作的数据 -->
|
||||
<el-form-item v-if="form.payStyle==0" label="免费入场时效/时" prop="timePayHour">
|
||||
<el-input-number v-model="form.timePayHour" min="0" :precision="0" placeholder="小时数"></el-input-number>
|
||||
</el-form-item>
|
||||
|
||||
<div v-for="(item, i) in form.priceList" :key="i" >
|
||||
<el-form-item label="金额" prop="price" style="width:1000px">
|
||||
<el-input-number v-model="item.price" :min="0" :precision="2" placeholder="请输入单次金额"></el-input-number>
|
||||
@@ -173,7 +185,6 @@
|
||||
</el-time-picker>
|
||||
<el-button style="font-size: 13px;background-color: rgba(245,108,108,.1);border-color: rgba(245,108,108,.2); color:#f56c6c;" @click="handleDelete(i)">删除</el-button>
|
||||
</el-form-item>
|
||||
|
||||
</div>
|
||||
<el-button style="font-size: 13px;" type="success" @click="changePrice" v-if="form.type==1">添加时间段价格</el-button>
|
||||
<el-dialog title="价格设置" :visible.sync="dialogFormVisible" size="tiny">
|
||||
@@ -268,6 +279,8 @@ export default {
|
||||
limitWeek: 1,
|
||||
limitNoDay: 1,
|
||||
limitNoWeek: 1,
|
||||
payStyle: 0,
|
||||
timePayHour:undefined
|
||||
},
|
||||
imgs: [],
|
||||
timeData: undefined,
|
||||
@@ -399,6 +412,8 @@ export default {
|
||||
this.form.copyTime = response.venue.copyTime;
|
||||
this.form.copyTarget = response.venue.copyTarget;
|
||||
this.form.copyControl = response.venue.copyControl;
|
||||
this.form.payStyle = response.venue.payStyle;
|
||||
this.form.timePayHour = response.venue.timePayHour;
|
||||
this.timeData = [
|
||||
response.venue.businessStartTime,
|
||||
response.venue.businessEndTime
|
||||
|
||||
@@ -41,7 +41,7 @@
|
||||
</el-table-column>
|
||||
|
||||
<!-- 单次金额 -->
|
||||
<el-table-column align="center" label="进场金额(一次)">
|
||||
<el-table-column align="center" label="进场金额">
|
||||
<template scope="scope">
|
||||
<span>¥{{scope.row.price}}</span>
|
||||
</template>
|
||||
@@ -73,10 +73,10 @@
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
|
||||
|
||||
<el-table-column align="center" label="微信二维码">
|
||||
<template scope="scope">
|
||||
<img :src="scope.row.codeUrl" @click="openCodeUrl(scope.row.codeUrl)" style="width:100px;height:100px;cursor:pointer">
|
||||
<img :src="scope.row.codeUrl" @click="openCodeUrl(scope.row.codeUrl)" style="width:100px;height:100px;cursor:pointer">
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
@@ -93,9 +93,9 @@
|
||||
<el-button size="small" v-if="scope.row.id === 32" type="text" @click="clear(scope.row.id)">清空人数</el-button>
|
||||
<el-button size="small" v-if="scope.row.status === 0" type="text" @click="handleEditCard(scope.row.id)">会员卡配置</el-button>
|
||||
<el-button v-if="scope.row.status === 0" class="danger" size="small" type="text" @click="handleUpdateStatus(scope.row, 1)">禁用</el-button>
|
||||
<el-button v-if="scope.row.status === 1" size="small" type="text" @click="handleUpdateStatus(scope.row, 0)">启用</el-button>
|
||||
<el-button v-if="!scope.row.codeUrl" size="small" type="text" @click="generateCodeUrl(scope.row)">生成二维码</el-button>
|
||||
<el-button v-if="scope.row.status === 0" size="small" type="text" @click="handShowVenue(scope.row.id)">进场记录</el-button>
|
||||
<el-button v-if="scope.row.status === 1" size="small" type="text" @click="handleUpdateStatus(scope.row, 0)">启用</el-button>
|
||||
<el-button v-if="!scope.row.codeUrl" size="small" type="text" @click="generateCodeUrl(scope.row)">生成二维码</el-button>
|
||||
<el-button v-if="scope.row.status === 0" size="small" type="text" @click="handShowVenue(scope.row.id)">进场记录</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</Pagination>
|
||||
|
||||
Reference in New Issue
Block a user