正在显示
2 个修改的文件
包含
240 行增加
和
0 行删除
| @@ -82,6 +82,7 @@ import Exchange from './views/bus/Exchange.vue' | @@ -82,6 +82,7 @@ import Exchange from './views/bus/Exchange.vue' | ||
| 82 | import RoutingKey from './views/bus/RoutingKey.vue' | 82 | import RoutingKey from './views/bus/RoutingKey.vue' |
| 83 | import Queue from './views/bus/Queue.vue' | 83 | import Queue from './views/bus/Queue.vue' |
| 84 | import MessageNote from './views/bus/MessageNote.vue' | 84 | import MessageNote from './views/bus/MessageNote.vue' |
| 85 | +import MessageNoteSearch from './views/bus/MessageNoteSearch.vue' | ||
| 85 | import UserMessageBinding from './views/bus/UserMessageBinding.vue' | 86 | import UserMessageBinding from './views/bus/UserMessageBinding.vue' |
| 86 | import UserInfo from "./views/bus/UserInfo.vue" | 87 | import UserInfo from "./views/bus/UserInfo.vue" |
| 87 | import QueueView from "./views/bus/view/QueueView.vue" | 88 | import QueueView from "./views/bus/view/QueueView.vue" |
| @@ -156,6 +157,7 @@ let routes = [ | @@ -156,6 +157,7 @@ let routes = [ | ||
| 156 | {path: '/routing', component: RoutingKey, name: '路由键管理'}, | 157 | {path: '/routing', component: RoutingKey, name: '路由键管理'}, |
| 157 | {path: '/umb', component: UserMessageBinding, name: '配置管理'}, | 158 | {path: '/umb', component: UserMessageBinding, name: '配置管理'}, |
| 158 | {path: '/note', component: MessageNote, name: '消息记录管理'}, | 159 | {path: '/note', component: MessageNote, name: '消息记录管理'}, |
| 160 | + {path: '/note_search', component: MessageNoteSearch, name: '消息记录搜索'}, | ||
| 159 | {path: '/es', component: ElasticSearchInfo, name: 'ES信息管理'}, | 161 | {path: '/es', component: ElasticSearchInfo, name: 'ES信息管理'}, |
| 160 | ] | 162 | ] |
| 161 | }, | 163 | }, |
src/views/bus/MessageNoteSearch.vue
0 → 100644
| 1 | +<template> | ||
| 2 | + <el-container> | ||
| 3 | + <el-main> | ||
| 4 | + <el-card style="background-color: #F5F7FA"> | ||
| 5 | + <div> | ||
| 6 | + <el-row style="margin-left: 30px;"> | ||
| 7 | + <el-col :span="4"> | ||
| 8 | + <el-input v-model="messageNote_queryInfo.alias_sendContent" placeholder="发送内容" | ||
| 9 | + size="medium" clearable prefix-icon="el-icon-search"></el-input> | ||
| 10 | + </el-col> | ||
| 11 | + <el-col :span="4"> | ||
| 12 | + <el-button type="success" style="width:150px" size="medium" @click="messageNote_getList"> | ||
| 13 | + 查询 | ||
| 14 | + </el-button> | ||
| 15 | + </el-col> | ||
| 16 | + </el-row> | ||
| 17 | + </div> | ||
| 18 | + <div :index="item.id+''" v-for="item in messageNote_page.messageNoteList" :key="item.id" style="margin-left: 30px;margin-top: 30px"> | ||
| 19 | + <el-row> | ||
| 20 | + <el-col :span="3"> | ||
| 21 | + <span>发送人:</span> | ||
| 22 | + <el-tag>{{item.username}}</el-tag> | ||
| 23 | + </el-col> | ||
| 24 | + <el-col :span="4"> | ||
| 25 | + <span>发送时间:</span> | ||
| 26 | + <el-tag>{{item.alias_sendTime}}</el-tag> | ||
| 27 | + </el-col> | ||
| 28 | + <el-col :span="3"> | ||
| 29 | + <span>服务器:</span> | ||
| 30 | + <el-tag type="success">{{item.serverName}}</el-tag> | ||
| 31 | + </el-col> | ||
| 32 | + <el-col :span="3"> | ||
| 33 | + <span>虚拟主机:</span> | ||
| 34 | + <el-tag type="success">{{item.virtualHostName}}</el-tag> | ||
| 35 | + </el-col> | ||
| 36 | + <el-col :span="3"> | ||
| 37 | + <span>交换机:</span> | ||
| 38 | + <el-tag type="danger">{{item.exchangeName}}</el-tag> | ||
| 39 | + </el-col> | ||
| 40 | + <el-col :span="3"> | ||
| 41 | + <span>路由键:</span> | ||
| 42 | + <el-tag type="warning">{{item.routingKeyName}}</el-tag> | ||
| 43 | + </el-col> | ||
| 44 | + <el-col :span="2"> | ||
| 45 | + <el-button type="primary" @click="messageNote_toViewContentDialogDialog(item)" size="small">查看内容 | ||
| 46 | + </el-button> | ||
| 47 | + </el-col> | ||
| 48 | + </el-row> | ||
| 49 | + <el-row> | ||
| 50 | + <el-col style="width: 90%" :span="22"> | ||
| 51 | + <el-input v-model="item.alias_sendContent" readonly type="textarea" :rows="3"></el-input> | ||
| 52 | + </el-col> | ||
| 53 | + </el-row> | ||
| 54 | + <el-divider></el-divider> | ||
| 55 | + </div> | ||
| 56 | + | ||
| 57 | + <!--分页区域--> | ||
| 58 | + <div style="margin-top: 10px;margin-left: 20px;"> | ||
| 59 | + <el-row :gutter="24"> | ||
| 60 | + <el-col :span="10" style="margin-top: 5px"> | ||
| 61 | + <el-pagination | ||
| 62 | + @size-change="messageNote_handleSizeChange" | ||
| 63 | + @current-change="messageNote_handleCurrentChange" | ||
| 64 | + :current-page="messageNote_queryInfo.pageNum" | ||
| 65 | + :page-sizes="[10,50,200,500]" | ||
| 66 | + :page-size="messageNote_queryInfo.pageSize" | ||
| 67 | + layout=" sizes, prev, pager, next, jumper" | ||
| 68 | + :total="messageNote_page.total"> | ||
| 69 | + </el-pagination> | ||
| 70 | + </el-col> | ||
| 71 | + </el-row> | ||
| 72 | + </div> | ||
| 73 | + </el-card> | ||
| 74 | + <!-- 查看发送内容,对话框区域 --> | ||
| 75 | + <div> | ||
| 76 | + <el-dialog title="查看消息内容" | ||
| 77 | + :visible.sync="messageNote_dialog.viewContentDialog" | ||
| 78 | + style="margin-top: -80px" text-align="center" width="70%" | ||
| 79 | + @close="messageNote_viewContentDialogClosed"> | ||
| 80 | + <el-form :inline="true" label-width="120px" status-icon style="margin-top: -10px" align="center" | ||
| 81 | + :model="messageNote_viewContentForm" ref="messageNote_viewContentFormRef"> | ||
| 82 | + <el-form-item label="消息内容:" prop="alias_sendContent"> | ||
| 83 | + <el-input v-model="messageNote_viewContentForm.alias_sendContent" v-if="isViewContent === false" | ||
| 84 | + style="width:1000px" type="textarea" :rows="8"> | ||
| 85 | + </el-input> | ||
| 86 | + <el-input v-model="xml_content" v-if="isViewContent === true" | ||
| 87 | + style="width:1000px" type="textarea" autosize> | ||
| 88 | + </el-input> | ||
| 89 | + </el-form-item> | ||
| 90 | + </el-form> | ||
| 91 | + <div slot="footer" class="dialog-footer" style="text-align: center;margin-top: -20px"> | ||
| 92 | + | ||
| 93 | + <el-button type="success" @click="xml_format(messageNote_viewContentForm.alias_sendContent)" size="medium" | ||
| 94 | + style="width: 100px">xml格式化 | ||
| 95 | + </el-button> | ||
| 96 | + | ||
| 97 | + <el-button type="info" @click="messageNote_dialog.viewContentDialog = false" size="medium" | ||
| 98 | + style="width: 100px">取消 | ||
| 99 | + </el-button> | ||
| 100 | + <el-button type="primary" @click="messageNote_dialog.viewContentDialog = false" size="medium" | ||
| 101 | + style="width: 100px">关闭 | ||
| 102 | + </el-button> | ||
| 103 | + </div> | ||
| 104 | + </el-dialog> | ||
| 105 | + </div> | ||
| 106 | + </el-main> | ||
| 107 | + </el-container> | ||
| 108 | +</template> | ||
| 109 | + | ||
| 110 | +<script> | ||
| 111 | + import {selectMessageNoteList} from "../../api/message_bus"; | ||
| 112 | + import vkbeautify from "vkbeautify"; | ||
| 113 | + | ||
| 114 | + export default { | ||
| 115 | + name: "MessageNoteSearch", | ||
| 116 | + data() { | ||
| 117 | + return { | ||
| 118 | + // 抽屉 | ||
| 119 | + drawer: false, | ||
| 120 | + messageNote_queryInfo: { | ||
| 121 | + // 消息内容,别名 | ||
| 122 | + alias_sendContent: '', | ||
| 123 | + // 当前页数 | ||
| 124 | + pageNum: 1, | ||
| 125 | + // 每页条数 | ||
| 126 | + pageSize: 10 | ||
| 127 | + }, | ||
| 128 | + /** | ||
| 129 | + * messageNote,分页 | ||
| 130 | + */ | ||
| 131 | + messageNote_page: { | ||
| 132 | + // 路由键列表 | ||
| 133 | + messageNoteList: [], | ||
| 134 | + // 总条数 | ||
| 135 | + total: 0, | ||
| 136 | + }, | ||
| 137 | + /** | ||
| 138 | + * messageNote,加载 | ||
| 139 | + */ | ||
| 140 | + messageNote_loading: { | ||
| 141 | + // 列表加载 | ||
| 142 | + listLoading: false, | ||
| 143 | + }, | ||
| 144 | + /** | ||
| 145 | + * 发送内容,是否格式化 | ||
| 146 | + */ | ||
| 147 | + isViewContent: false, | ||
| 148 | + /** | ||
| 149 | + * 发送内容,格式化之后 | ||
| 150 | + */ | ||
| 151 | + xml_content: '', | ||
| 152 | + /** | ||
| 153 | + * messageNote,对话框管理 | ||
| 154 | + */ | ||
| 155 | + messageNote_dialog: { | ||
| 156 | + // 查看发送内容对话框 | ||
| 157 | + viewContentDialog: false, | ||
| 158 | + }, | ||
| 159 | + /** | ||
| 160 | + * 发送内容,表单 | ||
| 161 | + */ | ||
| 162 | + messageNote_viewContentForm: {}, | ||
| 163 | + } | ||
| 164 | + }, | ||
| 165 | + methods: { | ||
| 166 | + /** | ||
| 167 | + * 分页查询,监听 pageSize 改变的事件 | ||
| 168 | + */ | ||
| 169 | + messageNote_handleSizeChange(newSize) { | ||
| 170 | + this.messageNote_queryInfo.pageSize = newSize; | ||
| 171 | + //刷新列表 | ||
| 172 | + this.messageNote_getList(); | ||
| 173 | + }, | ||
| 174 | + /** | ||
| 175 | + * 分页查询,监听 pageNum 改变的事件 | ||
| 176 | + */ | ||
| 177 | + messageNote_handleCurrentChange(newPage) { | ||
| 178 | + this.messageNote_queryInfo.pageNum = newPage; | ||
| 179 | + //刷新列表 | ||
| 180 | + this.messageNote_getList(); | ||
| 181 | + }, | ||
| 182 | + /** | ||
| 183 | + * messageNote,分页查询 | ||
| 184 | + */ | ||
| 185 | + messageNote_getList() { | ||
| 186 | + // 开启加载 | ||
| 187 | + this.messageNote_loading.listLoading = true; | ||
| 188 | + selectMessageNoteList(this.messageNote_queryInfo).then((response) => { | ||
| 189 | + let res = response.data; | ||
| 190 | + if (res.code !== '200') { | ||
| 191 | + // 关闭加载 | ||
| 192 | + this.messageNote_loading.listLoading = false; | ||
| 193 | + return this.$message.error('获取消息收发记录,失败!'); | ||
| 194 | + } | ||
| 195 | + // 获取列表数据 | ||
| 196 | + this.messageNote_page.messageNoteList = res.data; | ||
| 197 | + // 获取列表的总记录数 | ||
| 198 | + this.messageNote_page.total = res.total; | ||
| 199 | + // 关闭加载 | ||
| 200 | + this.messageNote_loading.listLoading = false; | ||
| 201 | + this.$message.success('获取消息收发记录,成功!'); | ||
| 202 | + }).catch(error => { | ||
| 203 | + // 关闭加载 | ||
| 204 | + this.messageNote_loading.listLoading = false; | ||
| 205 | + this.$message.error(error.toString()); | ||
| 206 | + }); | ||
| 207 | + }, | ||
| 208 | + /** | ||
| 209 | + * 将消息内容,格式化xml | ||
| 210 | + * @param content | ||
| 211 | + */ | ||
| 212 | + xml_format(content) { | ||
| 213 | + this.isViewContent = true; | ||
| 214 | + this.xml_content = vkbeautify.xml(content); | ||
| 215 | + }, | ||
| 216 | + /** | ||
| 217 | + * messageNote,查看发送内容,打开事件 | ||
| 218 | + */ | ||
| 219 | + messageNote_toViewContentDialogDialog(item) { | ||
| 220 | + this.messageNote_viewContentForm = Object.assign({}, item); | ||
| 221 | + this.messageNote_dialog.viewContentDialog = true; | ||
| 222 | + }, | ||
| 223 | + /** | ||
| 224 | + * messageNote,查看发送内容对话框,关闭事件 | ||
| 225 | + */ | ||
| 226 | + messageNote_viewContentDialogClosed() { | ||
| 227 | + this.isViewContent = false; | ||
| 228 | + // 重置对话框 | ||
| 229 | + this.$refs.messageNote_viewContentFormRef.resetFields(); | ||
| 230 | + }, | ||
| 231 | + } | ||
| 232 | + } | ||
| 233 | + | ||
| 234 | +</script> | ||
| 235 | + | ||
| 236 | +<style scoped> | ||
| 237 | + | ||
| 238 | +</style> |
-
请 注册 或 登录 后发表评论