Merge remote-tracking branch 'origin/build' into build

This commit is contained in:
aixianling
2023-09-12 10:25:30 +08:00

View File

@@ -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}}&nbsp;&nbsp;&nbsp;&nbsp;ip地址为{{configInfo.xbotIp}}</span> <span class="tips">当前机位1有效期为{{configInfo.validity}}&nbsp;&nbsp;&nbsp;&nbsp;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"
@@ -30,7 +30,7 @@
</el-table-column> </el-table-column>
<el-table-column slot="groupCount" label="监控群聊" align="center"> <el-table-column slot="groupCount" label="监控群聊" align="center">
<template slot-scope="{ row }"> <template slot-scope="{ row }">
<div @click="showDialog(row)" style="cursor: pointer;color:#26f">{{row.groupCount}}</div> <div @click="showDialog(row)" style="cursor: pointer;color:#26f">{{row.monitorGroupCount}}</div>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column slot="num" label="群匹配" align="center"> <el-table-column slot="num" label="群匹配" align="center">
@@ -98,7 +98,7 @@ export default {
} }
}, },
created() { created() {
this.dict.load('yesOrNo').then(() => { this.dict.load('yesOrNo', 'deviceStatus').then(() => {
this.getConfigList() this.getConfigList()
}) })
}, },
@@ -107,12 +107,14 @@ 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: '手机号'},
// { prop: "girdNames", label: '管辖区域'}, // { prop: "girdNames", label: '管辖区域'},
{ slot: "groupCount", label: '监控群聊'}, { slot: "groupCount", label: '监控群聊'},
{ slot: "num", label: '群匹配'}, { slot: "num", label: '群匹配'},
{ prop: "status", label: '状态', dict: 'deviceStatus'},
{ slot: "option"}, { slot: "option"},
] ]
}, },
@@ -135,13 +137,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 +167,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,11 +177,14 @@ export default {
}) })
}, },
showDialog(row) { showDialog(row) {
if(row.status == 1) {
this.dialog = true this.dialog = true
this.groupInfo = row this.groupInfo = row
this.getTableDataGroup() this.getTableDataGroup()
}
}, },
getTableDataGroup() { getTableDataGroup() {
this.tableDataGroup = []
this.instance.post(`/app/xbotCallback/groupList`,null,{ this.instance.post(`/app/xbotCallback/groupList`,null,{
params: { params: {
// ...this.searchGroup, // ...this.searchGroup,
@@ -180,11 +193,13 @@ export default {
} }
}).then(res => { }).then(res => {
if(res?.data) { if(res?.data) {
this.tableDataGroup = JSON.parse(res.data) var tableDataGroup = JSON.parse(res.data)
this.tableDataGroup.map((item) => { tableDataGroup.map((item) => {
item.num = item.member_list.length item.num = item.member_list.length
if(item.total_member > 2) {
this.tableDataGroup.push(item)
}
}) })
// this.totalGroup = res.data.total
} }
}) })
}, },