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