席位管理
This commit is contained in:
@@ -7,7 +7,7 @@
|
||||
<template #content>
|
||||
<ai-search-bar>
|
||||
<template #left>
|
||||
<el-select v-model="configInfo.id" filterable placeholder="请选择机位" size="small" @change="configChange">
|
||||
<el-select v-model="configInfo.id" filterable placeholder="请选择机位" size="small" @change="configChange" clearable>
|
||||
<el-option
|
||||
v-for="item in configList"
|
||||
:key="item.value"
|
||||
@@ -18,7 +18,7 @@
|
||||
<span class="tips">当前机位1有效期为:{{configInfo.validity}} ip地址为:{{configInfo.xbotIp}}</span>
|
||||
</template>
|
||||
<template #right>
|
||||
<el-button size="small" :type="configInfo.status != 1 ? 'info' : 'primary'" @click="openWechat()" :disabled="configInfo.status != 1">{{configInfo.status != 1 ? '已启动' : '启动'}}</el-button>
|
||||
<el-button size="small" v-if="configInfo.validity" :type="configInfo.status != 1 ? 'info' : 'primary'" @click="openWechat()" :disabled="configInfo.status != 1">{{configInfo.status != 1 ? '已启动' : '启动'}}</el-button>
|
||||
</template>
|
||||
</ai-search-bar>
|
||||
<ai-table :tableData="tableData" :total="total" :current.sync="search.current" :size.sync="search.size"
|
||||
@@ -107,6 +107,7 @@ export default {
|
||||
colConfigs() {
|
||||
return [
|
||||
{ slot: "avatar"},
|
||||
{ prop: "xbotName", label: '机位'},
|
||||
{ slot: "loginUserId", label: '用户id'},
|
||||
{ prop: "loginUserName", label: '姓名', align: "left"},
|
||||
{ prop: "phone", label: '手机号'},
|
||||
@@ -135,13 +136,21 @@ export default {
|
||||
item.value = item.id
|
||||
})
|
||||
this.configList = res.data.records
|
||||
this.configInfo = this.configList[0]
|
||||
// this.configInfo = this.configList[0]
|
||||
this.getTableData()
|
||||
}
|
||||
})
|
||||
},
|
||||
configChange(e) {
|
||||
this.configInfo = this.configList.filter(item => item.id == e)[0]
|
||||
if(e) {
|
||||
this.configList.map((item) => {
|
||||
if(item.id == e) {
|
||||
this.configInfo = {...item}
|
||||
}
|
||||
})
|
||||
}else {
|
||||
this.configInfo = {id: ''}
|
||||
}
|
||||
this.search.current = 1
|
||||
this.getTableData()
|
||||
},
|
||||
@@ -157,7 +166,7 @@ export default {
|
||||
this.instance.post(`/app/xbotCallback/list`,null,{
|
||||
params: {
|
||||
...this.search,
|
||||
xbotId: this.configInfo.id
|
||||
xbotId: this.configInfo.id ? this.configInfo.id : ''
|
||||
}
|
||||
}).then(res => {
|
||||
if(res?.data) {
|
||||
@@ -167,9 +176,11 @@ export default {
|
||||
})
|
||||
},
|
||||
showDialog(row) {
|
||||
this.dialog = true
|
||||
this.groupInfo = row
|
||||
this.getTableDataGroup()
|
||||
if(row.status == 1) {
|
||||
this.dialog = true
|
||||
this.groupInfo = row
|
||||
this.getTableDataGroup()
|
||||
}
|
||||
},
|
||||
getTableDataGroup() {
|
||||
this.tableDataGroup = []
|
||||
|
||||
Reference in New Issue
Block a user