席位管理
This commit is contained in:
@@ -15,6 +15,12 @@
|
||||
:value="item.value">
|
||||
</el-option>
|
||||
</el-select>
|
||||
<ai-area-get
|
||||
style="width: 180px;"
|
||||
placeholder="所属地区"
|
||||
:instance="instance"
|
||||
v-model="search.areaId"
|
||||
@change="getListInit"/>
|
||||
<span class="tips">当前机位1有效期为:{{configInfo.validity}} ip地址为:{{configInfo.xbotIp}}</span>
|
||||
</template>
|
||||
<template #right>
|
||||
@@ -33,6 +39,11 @@
|
||||
<div @click="showDialog(row)" style="cursor: pointer;color:#26f">{{row.monitorGroupCount}}</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column slot="areaName" label="所属地区" align="center">
|
||||
<template slot-scope="{ row }">
|
||||
<div @click="changeArea(row)" style="cursor: pointer;color:#26f">{{row.areaName || '请选择'}}</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column slot="num" label="群匹配" align="center">
|
||||
<template slot-scope="{ row }">
|
||||
<div>{{row.matchGroupCount}}/{{row.groupCount}}</div>
|
||||
@@ -65,6 +76,19 @@
|
||||
<el-button @click="dialog=false">关闭</el-button>
|
||||
</div>
|
||||
</ai-dialog>
|
||||
<ai-dialog
|
||||
title="所属地区设置"
|
||||
:visible.sync="showArea"
|
||||
:destroyOnClose="true"
|
||||
width="720px"
|
||||
@onConfirm="areaConfirm"
|
||||
>
|
||||
<el-form class="ai-form" :model="areaInfo" label-width="120px" ref="form">
|
||||
<el-form-item prop="areaId" style="width: 100%;" label="所属地区" :rules="[{required: true, message: '请选择所属地区地区', trigger: 'change'}]">
|
||||
<ai-area-get style="width: 400px;" placeholder="所属地区" :instance="instance" v-model="areaInfo.areaId" :name.sync="areaInfo.areaName" @change="selectArea" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</ai-dialog>
|
||||
</section>
|
||||
|
||||
</template>
|
||||
@@ -80,6 +104,7 @@ export default {
|
||||
data() {
|
||||
return {
|
||||
search: {
|
||||
areaId: '',
|
||||
current: 1,
|
||||
size: 10,
|
||||
},
|
||||
@@ -96,6 +121,8 @@ export default {
|
||||
},
|
||||
tableDataGroup: [],
|
||||
totalGroup: 0,
|
||||
showArea: false,
|
||||
areaInfo: {}
|
||||
}
|
||||
},
|
||||
created() {
|
||||
@@ -114,6 +141,7 @@ export default {
|
||||
{ prop: "phone", label: '手机号'},
|
||||
// { prop: "girdNames", label: '管辖区域'},
|
||||
{ slot: "groupCount", label: '监控群聊'},
|
||||
{ slot: "areaName"},
|
||||
{ slot: "num", label: '群匹配'},
|
||||
{ prop: "status", label: '状态', dict: 'deviceStatus'},
|
||||
{ slot: "option"},
|
||||
@@ -164,6 +192,10 @@ export default {
|
||||
}
|
||||
})
|
||||
},
|
||||
getListInit() {
|
||||
this.search.current = 1
|
||||
this.getTableData()
|
||||
},
|
||||
getTableData() {
|
||||
this.instance.post(`/app/xbotCallback/list`,null,{
|
||||
params: {
|
||||
@@ -184,6 +216,30 @@ export default {
|
||||
this.getTableDataGroup()
|
||||
}
|
||||
},
|
||||
changeArea(row) {
|
||||
this.showArea = true
|
||||
this.areaInfo = {...row}
|
||||
this.$refs['form'].clearValidate();
|
||||
},
|
||||
selectArea(e) {
|
||||
console.log(e[0].label)
|
||||
this.areaInfo.areaName = e[0].label
|
||||
},
|
||||
areaConfirm() {
|
||||
this.$refs['form'].validate((valid) => {
|
||||
if (valid) {
|
||||
this.instance.post(`app/xbotCallback/updateArea?id=${this.areaInfo.id}&areaId=${this.areaInfo.areaId}&areaName=${this.areaInfo.areaName}`).then(res => {
|
||||
if (res.code == 0) {
|
||||
this.$message.success('所属地区设置成功')
|
||||
this.showArea = false
|
||||
this.getListInit()
|
||||
}
|
||||
})
|
||||
} else {
|
||||
return false
|
||||
}
|
||||
});
|
||||
},
|
||||
getTableDataGroup() {
|
||||
this.tableDataGroup = []
|
||||
this.instance.post(`/app/xbotCallback/groupList`,null,{
|
||||
|
||||
Reference in New Issue
Block a user