正在显示
4 个修改的文件
包含
262 行增加
和
26 行删除
@@ -49,7 +49,12 @@ export const updateRoutingKey = params =>{return http.put(`${baseUrl}/routing/up | @@ -49,7 +49,12 @@ export const updateRoutingKey = params =>{return http.put(`${baseUrl}/routing/up | ||
49 | export const deleteRoutingKey = params =>{return http.del(`${baseUrl}/routing/delete`, params);}; | 49 | export const deleteRoutingKey = params =>{return http.del(`${baseUrl}/routing/delete`, params);}; |
50 | // MQ路由键,批量删除 | 50 | // MQ路由键,批量删除 |
51 | export const batchRemoveRoutingKey = params =>{return http.get(`${baseUrl}/routing/batchRemove`, params);}; | 51 | export const batchRemoveRoutingKey = params =>{return http.get(`${baseUrl}/routing/batchRemove`, params);}; |
52 | - | 52 | +//路由管理查询 |
53 | +export const queRouter=params=>{return http.get(`${baseUrl}/routermanage/queRouter`, params);}; | ||
54 | +// 路由管理,删除 | ||
55 | +export const deleteRouter = params =>{return http.get(`${baseUrl}/routermanage/delRouter`, params);}; | ||
56 | +// 路由管理,添加 | ||
57 | +export const addRouter = params =>{return http.post(`${baseUrl}/routermanage/addRouter`, params);}; | ||
53 | 58 | ||
54 | // MQ消息队列,分页查询列表 | 59 | // MQ消息队列,分页查询列表 |
55 | export const selectBusQueueList = params =>{return http.get(`${baseUrl}/queue/list`, params);}; | 60 | export const selectBusQueueList = params =>{return http.get(`${baseUrl}/queue/list`, params);}; |
@@ -89,6 +89,10 @@ import ExchangeView from "./views/bus/view/ExchangeView.vue" | @@ -89,6 +89,10 @@ import ExchangeView from "./views/bus/view/ExchangeView.vue" | ||
89 | import ElasticSearchInfo from "./views/bus/ElasticSearchInfo.vue" | 89 | import ElasticSearchInfo from "./views/bus/ElasticSearchInfo.vue" |
90 | import RouterBatch from "./views/bus/RouterBatch.vue" | 90 | import RouterBatch from "./views/bus/RouterBatch.vue" |
91 | import MessageManagement from "./views/bus/MessageManagement.vue" | 91 | import MessageManagement from "./views/bus/MessageManagement.vue" |
92 | +import RouterManage from "./views/bus/RouterManage" | ||
93 | + | ||
94 | +//组件练习 | ||
95 | +//import Page7 from "./views/nav3/Page7.vue" | ||
92 | 96 | ||
93 | 97 | ||
94 | 98 | ||
@@ -160,6 +164,7 @@ let routes = [ | @@ -160,6 +164,7 @@ let routes = [ | ||
160 | // {path: '/exchange', component: Exchange, name: '交换机管理'}, | 164 | // {path: '/exchange', component: Exchange, name: '交换机管理'}, |
161 | // {path: '/routing', component: RoutingKey, name: '路由键管理'}, | 165 | // {path: '/routing', component: RoutingKey, name: '路由键管理'}, |
162 | {path: '/umb', component: UserMessageBinding, name: '路由配置管理'}, | 166 | {path: '/umb', component: UserMessageBinding, name: '路由配置管理'}, |
167 | + {path: '/routermanage', component: RouterManage, name: '路由配置'}, | ||
163 | {path: '/note', component: MessageNote, name: '消息记录管理'}, | 168 | {path: '/note', component: MessageNote, name: '消息记录管理'}, |
164 | {path: '/note_search', component: MessageNoteSearch, name: '消息记录搜索'}, | 169 | {path: '/note_search', component: MessageNoteSearch, name: '消息记录搜索'}, |
165 | {path: '/es', component: ElasticSearchInfo, name: 'ES信息管理'}, | 170 | {path: '/es', component: ElasticSearchInfo, name: 'ES信息管理'}, |
@@ -178,6 +183,15 @@ let routes = [ | @@ -178,6 +183,15 @@ let routes = [ | ||
178 | // {path: '/exchangeView', component: ExchangeView, name: '交换机监控'}, | 183 | // {path: '/exchangeView', component: ExchangeView, name: '交换机监控'}, |
179 | ] | 184 | ] |
180 | }, | 185 | }, |
186 | + { | ||
187 | + path: '/nav3', | ||
188 | + component: Home, | ||
189 | + name: '组件练习', | ||
190 | + iconCls: 'el-icon-view', | ||
191 | + children: [ | ||
192 | + {path: '/page7', component: Page7, name: '组件'}, | ||
193 | + ] | ||
194 | + }, | ||
181 | 195 | ||
182 | 196 | ||
183 | // { | 197 | // { |
src/views/bus/RouterManage.vue
0 → 100644
1 | +<template> | ||
2 | + <el-container> | ||
3 | + <el-main> | ||
4 | + <el-card style="background-color: #F5F7FA"> | ||
5 | + <!-- 搜素区域 --> | ||
6 | + <el-row> | ||
7 | + <el-col :span="6"> | ||
8 | + <el-input v-model="umb_queryInfo.sndr" | ||
9 | + size="medium" | ||
10 | + placeholder="帐户名称" clearable> | ||
11 | + <template slot="prepend" ><i class="el-icon-user"></i>帐户名称</template> | ||
12 | + </el-input> | ||
13 | + </el-col> | ||
14 | + <el-col :span="6"> | ||
15 | + <el-input v-model="umb_queryInfo.btype" | ||
16 | + size="medium" | ||
17 | + placeholder="消息大类" clearable> | ||
18 | + <template slot="prepend"><i class="el-icon-s-platform"></i>消息大类</template> | ||
19 | + </el-input> | ||
20 | + </el-col> | ||
21 | + <el-col :span="6"> | ||
22 | + <el-input v-model="umb_queryInfo.stype" | ||
23 | + size="medium" | ||
24 | + placeholder="消息子类" clearable> | ||
25 | + <template slot="prepend"><i class="el-icon-s-operation"></i>消息子类</template> | ||
26 | + </el-input> | ||
27 | + </el-col> | ||
28 | + <el-col :span="6"> | ||
29 | + <el-button type="warning" size="medium" icon="el-icon-search" @click="queryRouterList"> | ||
30 | + 查询 | ||
31 | + </el-button> | ||
32 | + <el-button type="primary" size="medium" icon="el-icon-plus" @click="dialogFormVisible = true"> | ||
33 | + 添加 | ||
34 | + </el-button> | ||
35 | + </el-col> | ||
36 | + </el-row> | ||
37 | + <el-row> | ||
38 | + <el-table | ||
39 | + :data="umb_queryData.tableData" | ||
40 | + border | ||
41 | + :header-cell-style="{background:'#6F8294',color:'#FFFFFF'}" | ||
42 | + style="width: 100%"> | ||
43 | + <el-table-column | ||
44 | + prop="sndr" | ||
45 | + label="帐户名称" | ||
46 | + > | ||
47 | + </el-table-column> | ||
48 | + <el-table-column | ||
49 | + prop="btype" | ||
50 | + label="消息大类" | ||
51 | + > | ||
52 | + </el-table-column> | ||
53 | + <el-table-column | ||
54 | + prop="stype" | ||
55 | + label="消息子类" | ||
56 | + > | ||
57 | + </el-table-column> | ||
58 | + <el-table-column | ||
59 | + prop="rcvr_topic" | ||
60 | + label="订阅主题" | ||
61 | + > | ||
62 | + <template slot-scope="scope"> | ||
63 | + <div v-for="reciver in scope.row.rcvrList"> | ||
64 | + {{reciver.rcvrTopic}}<!--,{{reciver.filterList.filter}}--> | ||
65 | + <!-- <div v-for="filters in reciver.filterList">{{filters.filter}}</div>--> | ||
66 | + </div> | ||
67 | + </template> | ||
68 | + </el-table-column> | ||
69 | + <el-table-column | ||
70 | + prop="filter" | ||
71 | + label="过滤规则" | ||
72 | + > | ||
73 | + <template slot-scope="scope"> | ||
74 | + <div v-for="reciver in scope.row.rcvrList"> | ||
75 | + <!-- {{reciver.rcvrTopic}},{{reciver.filterList.filter}}--> | ||
76 | + <div v-for="filters in reciver.filterList">{{reciver.rcvrTopic}}:[{{filters.filter}}]</div> | ||
77 | + </div> | ||
78 | + </template> | ||
79 | + </el-table-column> | ||
80 | + <el-table-column label="操作" width="145px" align="center" fixed="right"> | ||
81 | + <template slot-scope="scope"> | ||
82 | + <el-button type="danger" size="mini" @click="delRouter(scope.$index,scope.row)">删除</el-button> | ||
83 | + </template> | ||
84 | + </el-table-column> | ||
85 | + </el-table> | ||
86 | + </el-row> | ||
87 | + <el-row> | ||
88 | + <div class="block"> | ||
89 | + <el-pagination | ||
90 | + @size-change="handleSizeChange" | ||
91 | + @current-change="handleCurrentChange" | ||
92 | + :current-page="umb_queryInfo.pageNum" | ||
93 | + :page-sizes="[100, 200, 300, 400]" | ||
94 | + :page-size="umb_queryInfo.pageSize" | ||
95 | + layout="total, sizes, prev, pager, next, jumper" | ||
96 | + :total="umb_queryData.total"> | ||
97 | + </el-pagination> | ||
98 | + </div> | ||
99 | + </el-row> | ||
100 | + <el-row> | ||
101 | + <el-dialog title="路由消息添加" :visible.sync="dialogFormVisible"> | ||
102 | + <el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-width="100px" class="demo-ruleForm"> | ||
103 | + <el-form-item label="账户名称" prop="sndr"> | ||
104 | + <el-input v-model="ruleForm.sndr"></el-input> | ||
105 | + </el-form-item> | ||
106 | + <el-form-item label="消息大类" prop="btype"> | ||
107 | + <el-input v-model="ruleForm.btype"></el-input> | ||
108 | + </el-form-item> | ||
109 | + <el-form-item label="消息子类" prop="stype"> | ||
110 | + <el-input v-model="ruleForm.stype"></el-input> | ||
111 | + </el-form-item> | ||
112 | + <el-form-item label="订阅主题"> | ||
113 | + <el-input v-model="ruleForm.reciver.rcvrTopic"></el-input> | ||
114 | + </el-form-item> | ||
115 | + <el-form-item label="过滤规则"> | ||
116 | + <el-input v-model="ruleForm.reciver.reciverFilter.filter"></el-input> | ||
117 | + </el-form-item> | ||
118 | + </el-form> | ||
119 | + <div slot="footer" class="dialog-footer"> | ||
120 | + <el-button @click="dialogFormVisible = false">取 消</el-button> | ||
121 | + <el-button type="primary" @click="submitForm('ruleForm')">确 定</el-button> | ||
122 | + </div> | ||
123 | + </el-dialog> | ||
124 | + </el-row> | ||
125 | + </el-card> | ||
126 | + </el-main> | ||
127 | + </el-container> | ||
128 | +</template> | ||
129 | +<script> | ||
130 | + import {queRouter, deleteRouter, addRouter} from "../../api/message_bus"; | ||
131 | + export default { | ||
132 | + data(){ | ||
133 | + return{ | ||
134 | + dialogFormVisible:false, | ||
135 | + ruleForm:{ | ||
136 | + sndr:undefined, | ||
137 | + btype:undefined, | ||
138 | + stype:undefined, | ||
139 | + reciver:{ | ||
140 | + rcvrTopic:undefined, | ||
141 | + reciverFilter:{ | ||
142 | + filter:undefined | ||
143 | + } | ||
144 | + }, | ||
145 | + | ||
146 | + | ||
147 | + }, | ||
148 | + rules: { | ||
149 | + sndr: [ | ||
150 | + { required: true, message: '请输入账户名称', trigger: 'blur' }, | ||
151 | + { min: 3, max: 10, message: '长度在 3 到 10 个字符', trigger: 'blur' } | ||
152 | + ], | ||
153 | + btype: [ | ||
154 | + { required: true, message: '请输入消息大类', trigger: 'blur' } | ||
155 | + ], | ||
156 | + stype: [ | ||
157 | + { required: true, message: '请输入消息子类', trigger: 'blur' } | ||
158 | + ] | ||
159 | + }, | ||
160 | + user_cloud: { | ||
161 | + cloudUserList: [], | ||
162 | + queryInfo: { | ||
163 | + pageNum: 1, | ||
164 | + pageSize: 10000, | ||
165 | + } | ||
166 | + }, | ||
167 | + umb_queryInfo: { | ||
168 | + // 用户名称 | ||
169 | + sndr: undefined, | ||
170 | + // 消息大类 | ||
171 | + btype: undefined, | ||
172 | + // 消息子类 | ||
173 | + stype: undefined, | ||
174 | + // 当前页数 | ||
175 | + pageNum: 1, | ||
176 | + // 每页条数 | ||
177 | + pageSize: 10 | ||
178 | + | ||
179 | + }, | ||
180 | + umb_queryData: { | ||
181 | + tableData: [], | ||
182 | + total:0 | ||
183 | + } | ||
184 | + | ||
185 | + } | ||
186 | + }, | ||
187 | + methods: { | ||
188 | + handleSizeChange(val) { | ||
189 | + this.umb_queryInfo.pageSize=val; | ||
190 | + this.queryRouterList(); | ||
191 | + }, | ||
192 | + handleCurrentChange(val) { | ||
193 | + this.umb_queryInfo.pageNum=val; | ||
194 | + this.queryRouterList(); | ||
195 | + }, | ||
196 | + queryRouterList(){ | ||
197 | + queRouter(this.umb_queryInfo).then((response) => { | ||
198 | + let res = response.data; | ||
199 | + this.umb_queryData.tableData=res.data.list; | ||
200 | + this.umb_queryData.total=res.data.total; | ||
201 | + }).catch(error => { | ||
202 | + | ||
203 | + }); | ||
204 | + }, | ||
205 | + delRouter(index,row){ | ||
206 | + // 弹框询问是否删除? | ||
207 | + this.$confirm('此操作永久删除该消息收发记录, 是否继续?', '警告', { | ||
208 | + confirmButtonText: '确定删除', | ||
209 | + cancelButtonText: '取消', | ||
210 | + type: 'warning' | ||
211 | + } | ||
212 | + ).then(() => { | ||
213 | + deleteRouter({id:row.id}).then((response) => { | ||
214 | + let res = response.data; | ||
215 | + this.$message.success(res.msg); | ||
216 | + this.queryRouterList(); | ||
217 | + }).catch(error => { | ||
218 | + this.$message.error(res.msg); | ||
219 | + }); | ||
220 | + }).catch(() => { | ||
221 | + }); | ||
222 | + }, | ||
223 | + submitForm(formName){ | ||
224 | + this.$refs[formName].validate((valid) => { | ||
225 | + if (valid) { | ||
226 | + addRouter(this.ruleForm).then((response) => { | ||
227 | + let res = response.data; | ||
228 | + this.dialogFormVisible=false; | ||
229 | + this.$message.success(res.msg); | ||
230 | + this.queryRouterList(); | ||
231 | + }).catch(error => { | ||
232 | + this.$message.error(res.msg); | ||
233 | + }); | ||
234 | + } else { | ||
235 | + console.log('error submit!!'); | ||
236 | + return false; | ||
237 | + } | ||
238 | + }); | ||
239 | + } | ||
240 | + } | ||
241 | + } | ||
242 | +</script> |
@@ -49,11 +49,6 @@ | @@ -49,11 +49,6 @@ | ||
49 | <template slot="prepend" ><i class="el-icon-user"></i>路由键名称</template> | 49 | <template slot="prepend" ><i class="el-icon-user"></i>路由键名称</template> |
50 | </el-input> | 50 | </el-input> |
51 | </el-col> | 51 | </el-col> |
52 | - <!-- <el-col :span="4">--> | ||
53 | - <!-- <el-input v-model="umb_queryInfo.subscriber" prefix-icon="el-icon-search"--> | ||
54 | - <!-- size="medium"--> | ||
55 | - <!-- placeholder="订阅者名称" clearable></el-input>--> | ||
56 | - <!-- </el-col>--> | ||
57 | <el-col :span="8"> | 52 | <el-col :span="8"> |
58 | <el-button type="warning" style="width:150px" size="medium" icon="el-icon-search" @click="umb_getList"> | 53 | <el-button type="warning" style="width:150px" size="medium" icon="el-icon-search" @click="umb_getList"> |
59 | 查询配置信息 | 54 | 查询配置信息 |
@@ -140,20 +135,6 @@ | @@ -140,20 +135,6 @@ | ||
140 | <el-form :inline="true" label-width="120px" status-icon style="margin-top: -30px" align="center" | 135 | <el-form :inline="true" label-width="120px" status-icon style="margin-top: -30px" align="center" |
141 | :model="umb_addForm" :rules="umb_addFormRules" ref="umb_addFormRef"> | 136 | :model="umb_addForm" :rules="umb_addFormRules" ref="umb_addFormRef"> |
142 | 137 | ||
143 | - <!-- <el-form-item label="用户名称:" prop="userIds">--> | ||
144 | - <!-- <el-select v-model="umb_addForm.userIds" prefix-icon="el-icon-search" clearable--> | ||
145 | - <!-- @change="umb_userInfo_addChange"--> | ||
146 | - <!-- style="width:400px" size="medium" filterable multiple--> | ||
147 | - <!-- placeholder="请选择用户">--> | ||
148 | - <!-- <el-option--> | ||
149 | - <!-- v-for="item in (umb_config.userInfoList)"--> | ||
150 | - <!-- :key="item.id"--> | ||
151 | - <!-- :label="item.username"--> | ||
152 | - <!-- :value="item.id">--> | ||
153 | - <!-- </el-option>--> | ||
154 | - <!-- </el-select>--> | ||
155 | - <!-- </el-form-item>--> | ||
156 | - | ||
157 | <el-form-item label="" prop="usernames"> | 138 | <el-form-item label="" prop="usernames"> |
158 | <el-select v-model="umb_addForm.usernames" prefix-icon="el-icon-search" clearable | 139 | <el-select v-model="umb_addForm.usernames" prefix-icon="el-icon-search" clearable |
159 | @change="umb_userInfo_addChange" | 140 | @change="umb_userInfo_addChange" |
@@ -169,12 +150,6 @@ | @@ -169,12 +150,6 @@ | ||
169 | </el-option> | 150 | </el-option> |
170 | </el-select> | 151 | </el-select> |
171 | </el-form-item> | 152 | </el-form-item> |
172 | - | ||
173 | - <!-- <el-form-item label="订阅者名称:" prop="subscriber">--> | ||
174 | - <!-- <el-input v-model="umb_addForm.subscriber" style="width:240px" size="small" clearable--> | ||
175 | - <!-- placeholder="请输入订阅者名称">--> | ||
176 | - <!-- </el-input>--> | ||
177 | - <!-- </el-form-item>--> | ||
178 | <el-form-item label="" prop="serverId"> | 153 | <el-form-item label="" prop="serverId"> |
179 | <el-select v-model="umb_addForm.serverId" prefix-icon="el-icon-search" clearable | 154 | <el-select v-model="umb_addForm.serverId" prefix-icon="el-icon-search" clearable |
180 | style="width:300px" size="medium" filterable | 155 | style="width:300px" size="medium" filterable |
-
请 注册 或 登录 后发表评论