席位,工单,特征库

This commit is contained in:
liuye
2023-08-14 10:43:09 +08:00
parent f342e7d672
commit c99a9a1332
5 changed files with 261 additions and 481 deletions

View File

@@ -7,19 +7,25 @@
<template #content>
<ai-search-bar>
<template #left>
<ai-select v-model="search.integralType" placeholder="请选择机位" @change="current=1, getTableData()"
:selectList="dict.getDict('integralType')"/>
<span class="tips">当前机位1有效期为2024-06-24&nbsp;&nbsp;&nbsp;&nbsp;ip地址为192.168.1.120</span>
<el-select v-model="configInfo.id" filterable placeholder="请选择机位" size="small" @change="configChange">
<el-option
v-for="item in configList"
:key="item.value"
:label="item.label"
:value="item.value">
</el-option>
</el-select>
<span class="tips">当前机位1有效期为{{configInfo.validity}}&nbsp;&nbsp;&nbsp;&nbsp;ip地址为{{configInfo.xbotIp}}</span>
</template>
<template #right>
<el-button size="small" type="primary" @click="add('')">启动</el-button>
<el-button size="small" :type="configInfo.status == 1 ? 'info' : 'primary'" @click="openWechat()" :disabled="configInfo.status == 1">启动</el-button>
</template>
</ai-search-bar>
<ai-table :tableData="tableData" :total="total" :current.sync="current" :size.sync="size"
@getList="getTableData()" :col-configs="colConfigs" :dict="dict">
<el-table-column slot="num" label="监控群聊" align="center">
<ai-table :tableData="tableData" :total="total" :current.sync="search.current" :size.sync="search.size"
@getList="getTableData()" :col-configs="colConfigs">
<el-table-column slot="groupCount" label="监控群聊" align="center">
<template slot-scope="{ row }">
<div @click="showDialog(row)" style="cursor: pointer;">110</div>
<div @click="showDialog(row)" style="cursor: pointer;color:#26f">{{row.groupCount}}</div>
</template>
</el-table-column>
</ai-table>
@@ -30,8 +36,10 @@
:visible.sync="dialog"
:destroyOnClose="true"
width="720px"
@closed="form={}" :customFooter="false">
@closed="dialog=false" :customFooter="false">
<ai-table :tableData="tableDataGroup" :total="totalGroup" :current.sync="searchGroup.current" :size.sync="searchGroup.size"
@getList="getTableDataGroup()" :col-configs="colConfigsGroup">
</ai-table>
</ai-dialog>
</section>
@@ -51,55 +59,78 @@ export default {
data() {
return {
search: {
wordName: '',
current: 1,
size: 10,
},
tableData: [],
size: 10,
total: 0,
current: 1,
form: {
wordName: '',
// areaList: [],
deptList: [],
},
dialog: false,
flag: false,
configList: [],
configId: '',
configInfo: {id: ''},
groupInfo: {},
searchGroup: {
current: 1,
size: 10,
},
tableDataGroup: [],
totalGroup: 0,
}
},
created() {
this.$dict.load('integralType')
this.getTableData()
this.getConfigList()
},
computed: {
...mapState(['user']),
colConfigs() {
return [
{ prop: "wordName", label: '姓名', align: "left"},
{ prop: "createTime", label: '手机号'},
{ prop: "createUserName", label: '管辖区域'},
{ slot: "num", label: '监控群聊'},
{ prop: "departmentNames", label: '状态'},
{ slot: "loginUserId", label: '用户id'},
{ prop: "loginUserName", label: '姓名', align: "left"},
{ prop: "phone", label: '手机号'},
{ prop: "girdNames", label: '管辖区域'},
{ slot: "groupCount", label: '监控群聊'},
// { prop: "status", label: '状态'},
]
},
rules() {
return {
wordName: [{required: true, message: '请输入敏感词', trigger: 'blur' }],
// areaList: [{required: true, message: '请选择生效地区', trigger: 'blur' }],
deptList: [{required: true, message: '请选择生效部门', trigger: 'blur' }],
}
colConfigsGroup() {
return [
{ prop: "nickname", label: '群名称'},
// { prop: "phone", label: '群主'},
]
},
},
methods: {
getConfigList() {
this.instance.post(`/app/appxbotconfig/list?size=1000`).then(res => {
if(res?.data) {
res.data.records.map((item) => {
item.label = item.xbotName
item.value = item.id
})
this.configList = res.data.records
this.configInfo = this.configList[0]
this.getTableData()
}
})
},
configChange(e) {
this.configInfo = this.configList.filter(item => item.id == e)[0]
this.search.current = 1
this.getTableData()
},
openWechat() {
this.instance.post(`/app/appxbotconfig/openWechat?id=${this.configInfo.id}`).then(res => {
if(res.code === 0) {
this.configInfo.status = 1
this.$message.success('启动成功!')
}
})
},
getTableData() {
this.instance.post(`/app/appsessionarchivekeywordinfo/list`,null,{
this.instance.post(`/app/xbotCallback/list`,null,{
params: {
...this.search,
current: this.current,
size: this.size,
total: this.total,
wordName: this.search.name
xbotId: this.configInfo.id
}
}).then(res => {
if(res?.data) {
@@ -108,22 +139,24 @@ export default {
}
})
},
changeStatus(row, text, status) {
this.$confirm(`确定${text}该关键词?`).then(() => {
this.instance.post(`/app/appsessionarchivekeywordinfo/updateStatusById?id=${row.id}&status=${status}`).then(res => {
if (res.code == 0) {
this.$message.success('操作成功!')
this.getTableData()
}
})
})
},
showDialog(row) {
this.form = {...row}
this.form.deptList = []
// this.form.areaList = this.form.areaIds.split(',')
this.form.deptList = row.departmentIds.split(',')
this.dialog = true
this.groupInfo = row
this.getTableDataGroup()
},
getTableDataGroup() {
this.instance.post(`/app/xbotCallback/groupList`,null,{
params: {
...this.searchGroup,
managerWxid: this.groupInfo.loginUserId
}
}).then(res => {
if(res?.data) {
this.tableDataGroup = res.data.records
this.totalGroup = res.data.total
}
})
},
},
}