Merge remote-tracking branch 'origin/build' into build
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" | ||||
| @@ -30,7 +30,7 @@ | ||||
|           </el-table-column> | ||||
|           <el-table-column slot="groupCount" label="监控群聊"  align="center"> | ||||
|             <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> | ||||
|           </el-table-column> | ||||
|           <el-table-column slot="num" label="群匹配"  align="center"> | ||||
| @@ -98,7 +98,7 @@ export default { | ||||
|     } | ||||
|   }, | ||||
|   created() { | ||||
|     this.dict.load('yesOrNo').then(() => { | ||||
|     this.dict.load('yesOrNo', 'deviceStatus').then(() => { | ||||
|       this.getConfigList() | ||||
|     }) | ||||
|   }, | ||||
| @@ -107,12 +107,14 @@ export default { | ||||
|     colConfigs() { | ||||
|       return [ | ||||
|         { slot: "avatar"}, | ||||
|         { prop: "xbotName", label: '机位'}, | ||||
|         { slot: "loginUserId", label: '用户id'}, | ||||
|         { prop: "loginUserName", label: '姓名', align: "left"}, | ||||
|         { prop: "phone", label: '手机号'}, | ||||
|         // { prop: "girdNames", label: '管辖区域'}, | ||||
|         { slot: "groupCount", label: '监控群聊'}, | ||||
|         { slot: "num", label: '群匹配'}, | ||||
|         { prop: "status", label: '状态', dict: 'deviceStatus'}, | ||||
|         { slot: "option"}, | ||||
|       ] | ||||
|     }, | ||||
| @@ -135,13 +137,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 +167,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,11 +177,14 @@ 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 = [] | ||||
|       this.instance.post(`/app/xbotCallback/groupList`,null,{ | ||||
|         params: { | ||||
|           // ...this.searchGroup, | ||||
| @@ -180,11 +193,13 @@ export default { | ||||
|         } | ||||
|       }).then(res => { | ||||
|         if(res?.data) { | ||||
|           this.tableDataGroup = JSON.parse(res.data) | ||||
|           this.tableDataGroup.map((item) => { | ||||
|           var tableDataGroup = JSON.parse(res.data) | ||||
|           tableDataGroup.map((item) => { | ||||
|             item.num = item.member_list.length | ||||
|             if(item.total_member > 2) { | ||||
|               this.tableDataGroup.push(item) | ||||
|             } | ||||
|           }) | ||||
|           // this.totalGroup = res.data.total | ||||
|         } | ||||
|       }) | ||||
|     }, | ||||
|   | ||||
		Reference in New Issue
	
	Block a user