正在显示
4 个修改的文件
包含
565 行增加
和
251 行删除
@@ -145,5 +145,9 @@ export const api_batchAddRouter = params =>{return http.post(`${baseUrl}/router/ | @@ -145,5 +145,9 @@ export const api_batchAddRouter = params =>{return http.post(`${baseUrl}/router/ | ||
145 | export const loadRouterBySndr = params =>{return http.get(`${baseUrl}/router/searchBysndr`, params);}; | 145 | export const loadRouterBySndr = params =>{return http.get(`${baseUrl}/router/searchBysndr`, params);}; |
146 | 146 | ||
147 | //路由接收者过滤器添加 | 147 | //路由接收者过滤器添加 |
148 | -export const api_addReceiverFileter = params =>{return http.post(`${baseUrl}/filter/`, params);}; | ||
149 | -export const api_getReceiverFileter = params =>{return http.getJson(`${baseUrl}/filter/`, params);}; | 148 | +export const api_addReceiverFileter = params =>{return http.post(`${baseUrl}/filter`, params);}; |
149 | +export const api_getReceiverFileter = params =>{return http.get(`${baseUrl}/filter`, params);}; | ||
150 | +export const api_putReceiverFileter = params =>{return http.put(`${baseUrl}/filter`, params);}; | ||
151 | +export const api_delReceiverFileter = params =>{return http.del(`${baseUrl}/filter`, params);}; | ||
152 | + | ||
153 | + |
@@ -33,11 +33,13 @@ | @@ -33,11 +33,13 @@ | ||
33 | <!-- slot="append">--> | 33 | <!-- slot="append">--> |
34 | <!-- </el-cascader>--> | 34 | <!-- </el-cascader>--> |
35 | <!-- </el-col>--> | 35 | <!-- </el-col>--> |
36 | - <el-col :span="5"> | 36 | + <el-col :span="4"> |
37 | <el-button type="warning" style="width:150px" size="medium" icon="el-icon-search" @click="queue_getListSub"> | 37 | <el-button type="warning" style="width:150px" size="medium" icon="el-icon-search" @click="queue_getListSub"> |
38 | 查询队列 | 38 | 查询队列 |
39 | </el-button> | 39 | </el-button> |
40 | - <el-button type="primary" style="width:150px" size="medium" icon="el-icon-plus" @click="queue_toAddDialog"> | 40 | + </el-col> |
41 | + <el-col :span="3"> | ||
42 | + <el-button type="primary" style="width:150px;" size="medium" icon="el-icon-plus" @click="queue_toAddDialog"> | ||
41 | 添加队列 | 43 | 添加队列 |
42 | </el-button> | 44 | </el-button> |
43 | </el-col> | 45 | </el-col> |
@@ -61,7 +63,14 @@ | @@ -61,7 +63,14 @@ | ||
61 | <el-table-column label="分区数量" prop="partitionCount" align="center" | 63 | <el-table-column label="分区数量" prop="partitionCount" align="center" |
62 | width="200"></el-table-column> | 64 | width="200"></el-table-column> |
63 | <el-table-column label="消费者组" prop="consumerGroupName" align="center" | 65 | <el-table-column label="消费者组" prop="consumerGroupName" align="center" |
64 | - width="200"></el-table-column> | 66 | + width="200"> |
67 | + <template slot-scope="scope"> | ||
68 | + <div v-for="reciver in scope.row.consumerList"> | ||
69 | + <!-- {{reciver.rcvrTopic}},{{reciver.filterList.filter}}--> | ||
70 | + {{reciver.name}} | ||
71 | + </div> | ||
72 | + </template> | ||
73 | + </el-table-column> | ||
65 | <el-table-column label="相关描述" prop="description" align="center" width="200"></el-table-column> | 74 | <el-table-column label="相关描述" prop="description" align="center" width="200"></el-table-column> |
66 | <!-- <el-table-column label="是否持久化" prop="durability" align="center" width="145">--> | 75 | <!-- <el-table-column label="是否持久化" prop="durability" align="center" width="145">--> |
67 | <!-- <template slot-scope="scope">--> | 76 | <!-- <template slot-scope="scope">--> |
@@ -425,6 +434,7 @@ | @@ -425,6 +434,7 @@ | ||
425 | this.queue_loading.listLoading = true; | 434 | this.queue_loading.listLoading = true; |
426 | selectBusQueueList(this.queue_queryInfo).then((response) => { | 435 | selectBusQueueList(this.queue_queryInfo).then((response) => { |
427 | let res = response.data; | 436 | let res = response.data; |
437 | + console.log(res) | ||
428 | if (res.code !== '200') { | 438 | if (res.code !== '200') { |
429 | // 关闭加载 | 439 | // 关闭加载 |
430 | this.queue_loading.listLoading = false; | 440 | this.queue_loading.listLoading = false; |
@@ -111,7 +111,7 @@ | @@ -111,7 +111,7 @@ | ||
111 | </div> | 111 | </div> |
112 | </el-row> | 112 | </el-row> |
113 | <el-row> | 113 | <el-row> |
114 | - <el-dialog title="路由消息添加" :visible.sync="dialogFormVisible" width="50%" style="margin-top: -20px" text-align="center"> | 114 | + <el-dialog title="路由消息添加" :visible.sync="dialogFormVisible" width="70%" style="margin-top: -20px" text-align="center"> |
115 | <el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-width="145px" | 115 | <el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-width="145px" |
116 | class="demo-ruleForm" style="margin-top: -10px ;margin-left: -150px" align="center" > | 116 | class="demo-ruleForm" style="margin-top: -10px ;margin-left: -150px" align="center" > |
117 | <el-form-item label="" prop="sndr"> | 117 | <el-form-item label="" prop="sndr"> |
@@ -139,6 +139,68 @@ | @@ -139,6 +139,68 @@ | ||
139 | 139 | ||
140 | </el-dialog> | 140 | </el-dialog> |
141 | </el-row> | 141 | </el-row> |
142 | + <el-row> | ||
143 | + <el-dialog title="增加过滤规则" :visible.sync="dialogFilterVisible" width="40%" style="margin-top: 100px"> | ||
144 | +<!-- <RouterFilter v-bind:propRouterReceiveId="selectReceiverId"> </RouterFilter>--> | ||
145 | + <el-form :inline="true" label-width="120px" status-icon style="margin-top: -10px" | ||
146 | + :model="queue_addForm" :rules="queue_addFormRules" ref="queue_addFormRef" align="center"> | ||
147 | + <el-form-item label="过滤规则" prop="filter"> | ||
148 | + <el-input v-model="queue_addForm.filter" style="width:250px" size="small" clearable | ||
149 | + placeholder="请输入过滤规则"> | ||
150 | + </el-input> | ||
151 | + </el-form-item> | ||
152 | + <el-form-item label="状态" prop="status"> | ||
153 | + <el-select v-model="queue_addForm.status" style="width:250px" size="small" clearable | ||
154 | + placeholder="请选择状态"> | ||
155 | + <el-option label="true" value="true"></el-option> | ||
156 | + <el-option label="false" value="false"></el-option> | ||
157 | + </el-select> | ||
158 | + </el-form-item> | ||
159 | + <el-form-item label="规则类型" prop="type"> | ||
160 | + <el-input v-model="queue_addForm.type" style="width:250px" size="small" clearable | ||
161 | + placeholder="请输入规则类型" disabled></el-input> | ||
162 | + </el-form-item> | ||
163 | + <el-form-item label="订阅者ID" prop="messageRouterReciverId"> | ||
164 | + <el-input v-model="queue_addForm.messageRouterReciverId" style="width:250px" size="small" clearable | ||
165 | + placeholder="请输入用户ID" disabled></el-input> | ||
166 | + </el-form-item> | ||
167 | +<!-- <el-form-item label="状态" prop="status" style="margin-left: -60px">--> | ||
168 | +<!-- <el-select v-model="queue_addForm.status" style="width:250px" size="small" clearable--> | ||
169 | +<!-- placeholder="请选择状态">--> | ||
170 | +<!-- <el-option label="true" ></el-option>--> | ||
171 | +<!-- <el-option label="false"></el-option>--> | ||
172 | +<!-- </el-select>--> | ||
173 | +<!-- </el-form-item>--> | ||
174 | +<!-- <el-form-item label="" prop="filter">--> | ||
175 | +<!-- <el-input v-model="queue_addForm.filter" style="width:300px" size="small" clearable--> | ||
176 | +<!-- placeholder="请输入过滤规则">--> | ||
177 | +<!-- <template slot="prepend" >过滤规则</template>--> | ||
178 | +<!-- </el-input>--> | ||
179 | +<!-- </el-form-item>--> | ||
180 | +<!-- <el-form-item label="" prop="type">--> | ||
181 | +<!-- <el-input v-model="queue_addForm.type" style="width:300px" size="small" clearable--> | ||
182 | +<!-- placeholder="请输入规则类型" disabled>--> | ||
183 | +<!-- <template slot="prepend" >规则类型</template>--> | ||
184 | +<!-- </el-input>--> | ||
185 | +<!-- </el-form-item>--> | ||
186 | +<!-- <el-form-item label="" prop="messageRouterReciverId">--> | ||
187 | +<!-- <el-input v-model="queue_addForm.messageRouterReciverId" style="width:300px" size="small" clearable--> | ||
188 | +<!-- placeholder="订阅者ID" disabled>--> | ||
189 | +<!-- <template slot="prepend" >订阅者ID</template>--> | ||
190 | +<!-- </el-input>--> | ||
191 | +<!-- </el-form-item>--> | ||
192 | + </el-form> | ||
193 | + <div slot="footer" class="dialog-footer" style="text-align: center;margin-top: -20px"> | ||
194 | + <el-button type="info" @click="dialogFilterVisible = false" size="medium" | ||
195 | + style="width: 100px;background-color: #6F8294;color: #ffffff">取消 | ||
196 | + </el-button> | ||
197 | + <el-button type="primary" @click="queue_add()" | ||
198 | + size="medium" style="width: 100px">提交 | ||
199 | + </el-button> | ||
200 | + </div> | ||
201 | + | ||
202 | + </el-dialog> | ||
203 | + </el-row> | ||
142 | </el-card> | 204 | </el-card> |
143 | </el-main> | 205 | </el-main> |
144 | </el-container> | 206 | </el-container> |
@@ -146,11 +208,61 @@ | @@ -146,11 +208,61 @@ | ||
146 | <script> | 208 | <script> |
147 | import {queRouter, deleteRouter, addRouter,api_addReceiverFileter} from "../../api/message_bus"; | 209 | import {queRouter, deleteRouter, addRouter,api_addReceiverFileter} from "../../api/message_bus"; |
148 | import Queue from "@/views/bus/Queue"; | 210 | import Queue from "@/views/bus/Queue"; |
211 | + import RouterFilter from "@/views/bus/RouterReceiverFilter"; | ||
149 | export default { | 212 | export default { |
150 | - components: { Queue }, | 213 | + components: { Queue,RouterFilter }, |
151 | data(){ | 214 | data(){ |
152 | return{ | 215 | return{ |
216 | + /** | ||
217 | + * queue,新增表单 | ||
218 | + */ | ||
219 | + queue_addForm: { | ||
220 | + filter: '', | ||
221 | + messageRouterReciverId: '', | ||
222 | + type: 'REGULAR', | ||
223 | + status:'true' | ||
224 | + }, | ||
225 | + /** | ||
226 | + * queue,添加表单,验证规则 | ||
227 | + */ | ||
228 | + queue_addFormRules: { | ||
229 | + // 队列名称 | ||
230 | + filter: [ | ||
231 | + {required: true, message: '请输入过滤规则', trigger: ['blur', 'change']}, | ||
232 | + ], | ||
233 | + // 用户名称 | ||
234 | + type: [ | ||
235 | + {required: true, message: '请输入规则类型', trigger: ['blur', 'change']}, | ||
236 | + ], | ||
237 | + // 所属虚拟机id | ||
238 | + messageRouterReciverId: [ | ||
239 | + {required: true, message: '请输入订阅者ID', trigger: ['blur', 'change']}, | ||
240 | + ], | ||
241 | + // // 所属虚拟机id | ||
242 | + // virtualHostId: [ | ||
243 | + // {required: true, message: '请选择所属虚拟机', trigger: ['blur', 'change']}, | ||
244 | + // ], | ||
245 | + // // 是否持久化,默认 true | ||
246 | + // durability: [ | ||
247 | + // {required: true, message: '请选择是否持久化', trigger: ['blur', 'change']}, | ||
248 | + // ], | ||
249 | + // // 是否自动删除,默认 false | ||
250 | + // autoDelete: [ | ||
251 | + // {required: true, message: '请选择是否自动删除', trigger: ['blur', 'change']}, | ||
252 | + // ], | ||
253 | + // // 扩展参数,以JSON格式存储 | ||
254 | + // arguments: [ | ||
255 | + // {required: true, message: '扩展参数', trigger: ['blur', 'change']}, | ||
256 | + // ], | ||
257 | + // // 相关描述 | ||
258 | + // description: [ | ||
259 | + // {required: true, message: '请输入相关描述', trigger: ['blur', 'change']}, | ||
260 | + // ], | ||
261 | + }, | ||
262 | + | ||
263 | + selectReceiverId: '', | ||
153 | dialogFormVisible:false, | 264 | dialogFormVisible:false, |
265 | + dialogFilterVisible:false, | ||
154 | ruleForm:{ | 266 | ruleForm:{ |
155 | sndr:undefined, | 267 | sndr:undefined, |
156 | btype:undefined, | 268 | btype:undefined, |
@@ -223,6 +335,7 @@ | @@ -223,6 +335,7 @@ | ||
223 | queryRouterList(){ | 335 | queryRouterList(){ |
224 | queRouter(this.umb_queryInfo).then((response) => { | 336 | queRouter(this.umb_queryInfo).then((response) => { |
225 | let res = response.data; | 337 | let res = response.data; |
338 | + console.log(res) | ||
226 | this.umb_queryData.tableData=res.data.list; | 339 | this.umb_queryData.tableData=res.data.list; |
227 | this.umb_queryData.total=res.data.total; | 340 | this.umb_queryData.total=res.data.total; |
228 | }).catch(error => { | 341 | }).catch(error => { |
@@ -280,7 +393,47 @@ | @@ -280,7 +393,47 @@ | ||
280 | addReceiverFileter:function (receiverId) { | 393 | addReceiverFileter:function (receiverId) { |
281 | let _this = this; | 394 | let _this = this; |
282 | _this.receiverFilterForm.messageRouterReciverId = receiverId; | 395 | _this.receiverFilterForm.messageRouterReciverId = receiverId; |
396 | + }, | ||
397 | + //打开增加过滤 | ||
398 | + addReceiverFiletery(id){ | ||
399 | + this.dialogFilterVisible = true; | ||
400 | + console.log(id) | ||
401 | + this.queue_addForm.messageRouterReciverId = id; | ||
402 | + }, | ||
403 | + //提交增加过滤 | ||
404 | + queue_add() { | ||
405 | + // 进行表单的预验证 | ||
406 | + this.$refs.queue_addFormRef.validate(valid => { | ||
407 | + // 未通过,表单预校验 | ||
408 | + if (!valid) return; | ||
409 | + // 通过,表单预检验,开启加载 | ||
410 | + // this.queue_loading.addLoading = true; | ||
411 | + api_addReceiverFileter(this.queue_addForm).then((response) => { | ||
412 | + let res = response.data; | ||
413 | + // 添加失败 | ||
414 | + if (res.code !== '200') { | ||
415 | + // 关闭加载 | ||
416 | + // this.queue_loading.addLoading = false; | ||
417 | + return this.$message.error(res.msg); | ||
283 | } | 418 | } |
419 | + // 添加,成功 | ||
420 | + this.$message.success(res.msg); | ||
421 | + // 关闭加载 | ||
422 | + // this.queue_loading.addLoading = false; | ||
423 | + // 隐藏对话框 | ||
424 | + // this.queue_dialog.addDialog = false; | ||
425 | + this.dialogFilterVisible = false; | ||
426 | + | ||
427 | + // 刷新列表 | ||
428 | + this.queryRouterList(); | ||
429 | + }).catch(error => { | ||
430 | + // 关闭加载 | ||
431 | + // this.queue_loading.addLoading = false; | ||
432 | + this.$message.error(error.toString()); | ||
433 | + }); | ||
434 | + }) | ||
435 | + }, | ||
436 | + | ||
284 | } | 437 | } |
285 | } | 438 | } |
286 | </script> | 439 | </script> |
@@ -8,17 +8,17 @@ | @@ -8,17 +8,17 @@ | ||
8 | <el-col :span="7"> | 8 | <el-col :span="7"> |
9 | <el-input v-model="queue_queryInfo.filter" | 9 | <el-input v-model="queue_queryInfo.filter" |
10 | size="medium" | 10 | size="medium" |
11 | - placeholder="过滤器内容" clearable> | ||
12 | - <template slot="prepend" ><i class="el-icon-notebook-2"></i>过滤器内容</template> | 11 | + placeholder="过滤规则内容" clearable> |
12 | + <template slot="prepend" ><i class="el-icon-notebook-2"></i>过滤规则内容</template> | ||
13 | </el-input> | 13 | </el-input> |
14 | </el-col> | 14 | </el-col> |
15 | <el-col :span="8"> | 15 | <el-col :span="8"> |
16 | <el-button type="warning" style="width:150px" size="medium" icon="el-icon-search" @click="queue_getListSub"> | 16 | <el-button type="warning" style="width:150px" size="medium" icon="el-icon-search" @click="queue_getListSub"> |
17 | 查询 | 17 | 查询 |
18 | </el-button> | 18 | </el-button> |
19 | - <el-button type="primary" style="width:150px" size="medium" icon="el-icon-plus" @click="queue_toAddDialog"> | ||
20 | - 添加 | ||
21 | - </el-button> | 19 | +<!-- <el-button type="primary" style="width:150px" size="medium" icon="el-icon-plus" @click="queue_toAddDialog">--> |
20 | +<!-- 添加--> | ||
21 | +<!-- </el-button>--> | ||
22 | </el-col> | 22 | </el-col> |
23 | </el-row> | 23 | </el-row> |
24 | </div> | 24 | </div> |
@@ -33,26 +33,26 @@ | @@ -33,26 +33,26 @@ | ||
33 | style="border-radius: 10px 10px 0px 0px;line-height: 25px;"> | 33 | style="border-radius: 10px 10px 0px 0px;line-height: 25px;"> |
34 | <el-table-column type="selection" width="55" align="center"></el-table-column> | 34 | <el-table-column type="selection" width="55" align="center"></el-table-column> |
35 | <el-table-column type="index" align="center" width="55" ></el-table-column> | 35 | <el-table-column type="index" align="center" width="55" ></el-table-column> |
36 | - <el-table-column label="过滤规则" prop="queueName" align="center" | 36 | + <el-table-column label="过滤规则" prop="filter" align="center" |
37 | width="200"></el-table-column> | 37 | width="200"></el-table-column> |
38 | - <el-table-column label="规则类型" prop="username" align="center" | 38 | + <el-table-column label="规则类型" prop="type" align="center" |
39 | width="200"></el-table-column> | 39 | width="200"></el-table-column> |
40 | - <el-table-column label="状态" prop="partitionCount" align="center" | 40 | + <el-table-column label="状态" prop="status" align="center" |
41 | width="200"></el-table-column> | 41 | width="200"></el-table-column> |
42 | - <el-table-column label="相关描述" prop="description" align="center" width="200"></el-table-column> | 42 | +<!-- <el-table-column label="相关描述" prop="description" align="center" width="200"></el-table-column>--> |
43 | <!-- <el-table-column label="是否持久化" prop="durability" align="center" width="145">--> | 43 | <!-- <el-table-column label="是否持久化" prop="durability" align="center" width="145">--> |
44 | <!-- <template slot-scope="scope">--> | 44 | <!-- <template slot-scope="scope">--> |
45 | <!-- <span v-if="scope.row.durability ===false">否</span>--> | 45 | <!-- <span v-if="scope.row.durability ===false">否</span>--> |
46 | <!-- <span v-if="scope.row.durability ===true">是</span>--> | 46 | <!-- <span v-if="scope.row.durability ===true">是</span>--> |
47 | <!-- </template>--> | 47 | <!-- </template>--> |
48 | <!-- </el-table-column>--> | 48 | <!-- </el-table-column>--> |
49 | - <el-table-column label="创建时间" prop="gmtCreate" align="center" width="200"> | 49 | + <el-table-column label="创建时间" prop="creatTime" align="center" width="200"> |
50 | </el-table-column> | 50 | </el-table-column> |
51 | <!-- <el-table-column label="扩展参数" prop="arguments" align="center" width="200">--> | 51 | <!-- <el-table-column label="扩展参数" prop="arguments" align="center" width="200">--> |
52 | <!-- </el-table-column>--> | 52 | <!-- </el-table-column>--> |
53 | 53 | ||
54 | <!-- fixed="right" --> | 54 | <!-- fixed="right" --> |
55 | - <el-table-column label="操作" width="220" align="center" fixed="right"> | 55 | + <el-table-column label="操作" align="center" fixed="right"> |
56 | <template slot-scope="scope"> | 56 | <template slot-scope="scope"> |
57 | <!-- 编辑按钮--> | 57 | <!-- 编辑按钮--> |
58 | <el-tooltip effect="dark" content="编辑" placement="top-start" :enterable="false"> | 58 | <el-tooltip effect="dark" content="编辑" placement="top-start" :enterable="false"> |
@@ -78,17 +78,17 @@ | @@ -78,17 +78,17 @@ | ||
78 | <!--分页区域--> | 78 | <!--分页区域--> |
79 | <div style="margin-top: 10px"> | 79 | <div style="margin-top: 10px"> |
80 | <el-row :gutter="24"> | 80 | <el-row :gutter="24"> |
81 | - <el-col :span="5"> | ||
82 | - <el-button type="danger" icon="el-icon-delete" | ||
83 | - :loading="queue_loading.listLoading" | ||
84 | - :disabled="this.queue_page.selectList.length===0" | ||
85 | - @click="queue_batchRemove">批量删除 | ||
86 | - </el-button> | ||
87 | - </el-col> | 81 | +<!-- <el-col :span="5">--> |
82 | +<!-- <el-button type="danger" icon="el-icon-delete"--> | ||
83 | +<!-- :loading="queue_loading.listLoading"--> | ||
84 | +<!-- :disabled="this.queue_page.selectList.length===0"--> | ||
85 | +<!-- @click="queue_batchRemove">批量删除--> | ||
86 | +<!-- </el-button>--> | ||
87 | +<!-- </el-col>--> | ||
88 | <el-col :span="10" style="margin-top: 5px"> | 88 | <el-col :span="10" style="margin-top: 5px"> |
89 | <el-pagination | 89 | <el-pagination |
90 | - @size-change="queue_handleSizeChange" | ||
91 | - @current-change="queue_handleCurrentChange" | 90 | + @size-change="handleSizeChange" |
91 | + @current-change="handleCurrentChange" | ||
92 | :current-page="queue_queryInfo.pageNum" | 92 | :current-page="queue_queryInfo.pageNum" |
93 | :page-sizes="[10,20,30,50]" | 93 | :page-sizes="[10,20,30,50]" |
94 | :page-size="queue_queryInfo.pageSize" | 94 | :page-size="queue_queryInfo.pageSize" |
@@ -104,48 +104,67 @@ | @@ -104,48 +104,67 @@ | ||
104 | <div> | 104 | <div> |
105 | <el-dialog :title="dialogMap[dialogStatus]" | 105 | <el-dialog :title="dialogMap[dialogStatus]" |
106 | :visible.sync="queue_dialog.addDialog" | 106 | :visible.sync="queue_dialog.addDialog" |
107 | - style="margin-top: -50px" text-align="center" width="60%" | 107 | + style="margin-top: 150px" text-align="center" width="40%" |
108 | @close="queue_addDialogClosed"> | 108 | @close="queue_addDialogClosed"> |
109 | <el-form :inline="true" label-width="120px" status-icon style="margin-top: -10px" | 109 | <el-form :inline="true" label-width="120px" status-icon style="margin-top: -10px" |
110 | :model="queue_addForm" :rules="queue_addFormRules" ref="queue_addFormRef" align="center"> | 110 | :model="queue_addForm" :rules="queue_addFormRules" ref="queue_addFormRef" align="center"> |
111 | - <el-form-item label="" prop="queueName"> | ||
112 | - <el-input v-model="queue_addForm.queueName" style="width:300px" size="small" clearable | ||
113 | - placeholder="请输入TOPIC名称"> | ||
114 | - <template slot="prepend" >TOPIC名称</template> | ||
115 | - </el-input> | ||
116 | - </el-form-item> | ||
117 | 111 | ||
118 | - <el-form-item label="" prop="partitionCount"> | ||
119 | - <el-input v-model="queue_addForm.partitionCount" style="width:300px" size="small" clearable | ||
120 | - placeholder="请输入TOPIC分区数量"> | ||
121 | - <template slot="prepend" >TOPIC分区数量</template> | 112 | + <el-form-item label="过滤规则" prop="filter"> |
113 | + <el-input v-model="queue_addForm.filter" style="width:250px" size="small" clearable | ||
114 | + placeholder="请输入过滤规则"> | ||
122 | </el-input> | 115 | </el-input> |
123 | </el-form-item> | 116 | </el-form-item> |
124 | - | ||
125 | - <el-form-item label="" prop="username"> | ||
126 | - <el-input v-model="queue_addForm.username" style="width:300px" size="small" clearable | ||
127 | - placeholder="请输入用户名称"> | ||
128 | - <template slot="prepend" >用户名称</template> | ||
129 | - </el-input> | 117 | + <el-form-item label="状态" prop="status"> |
118 | + <el-select v-model="queue_addForm.status" style="width:250px" size="small" clearable | ||
119 | + placeholder="请选择状态"> | ||
120 | + <el-option label="true" value="true"></el-option> | ||
121 | + <el-option label="false" value="false"></el-option> | ||
122 | + </el-select> | ||
130 | </el-form-item> | 123 | </el-form-item> |
131 | - | ||
132 | - <el-form-item label="" prop="virtualHostId"> | ||
133 | - <el-input v-model="queue_addForm.consumerGroupName" style="width:300px" size="small" clearable | ||
134 | - placeholder="请输入消费者组名称"> | ||
135 | - <template slot="prepend" >消费者组</template> | ||
136 | - </el-input> | 124 | + <el-form-item label="规则类型" prop="type"> |
125 | + <el-input v-model="queue_addForm.type" style="width:250px" size="small" clearable | ||
126 | + placeholder="请输入规则类型"></el-input> | ||
137 | </el-form-item> | 127 | </el-form-item> |
138 | - | ||
139 | - <el-form-item label="" prop="description"> | ||
140 | - <el-input v-model="queue_addForm.description" style="width:300px" clearable size="small" | ||
141 | - type="textarea" autosize :rows="1" | ||
142 | - placeholder="相关描述"> | ||
143 | - </el-input> | 128 | + <el-form-item label="订阅者ID" prop="messageRouterReciverId"> |
129 | + <el-input v-model="queue_addForm.messageRouterReciverId" style="width:250px" size="small" clearable | ||
130 | + placeholder="请输入用户ID"></el-input> | ||
144 | </el-form-item> | 131 | </el-form-item> |
132 | +<!-- <el-form-item label="" prop="filter">--> | ||
133 | +<!-- <el-input v-model="queue_addForm.filter" style="width:300px" size="small" clearable--> | ||
134 | +<!-- placeholder="请输入过滤规则">--> | ||
135 | +<!-- <template slot="prepend" >过滤规则</template>--> | ||
136 | +<!-- </el-input>--> | ||
137 | +<!-- </el-form-item>--> | ||
138 | + | ||
139 | +<!-- <el-form-item label="" prop="type">--> | ||
140 | +<!-- <el-input v-model="queue_addForm.type" style="width:300px" size="small" clearable--> | ||
141 | +<!-- placeholder="请输入规则类型">--> | ||
142 | +<!-- <template slot="prepend" >规则类型</template>--> | ||
143 | +<!-- </el-input>--> | ||
144 | +<!-- </el-form-item>--> | ||
145 | + | ||
146 | +<!-- <el-form-item label="" prop="status">--> | ||
147 | +<!-- <el-input v-model="queue_addForm.status" style="width:300px" size="small" clearable--> | ||
148 | +<!-- placeholder="请输入状态">--> | ||
149 | +<!-- <template slot="prepend" >状态</template>--> | ||
150 | +<!-- </el-input>--> | ||
151 | +<!-- </el-form-item>--> | ||
152 | + | ||
153 | +<!-- <el-form-item label="" prop="messageRouterReciverId">--> | ||
154 | +<!-- <el-input v-model="queue_addForm.messageRouterReciverId" style="width:300px" size="small" clearable--> | ||
155 | +<!-- placeholder="请输入用户ID">--> | ||
156 | +<!-- <template slot="prepend" >订阅者ID</template>--> | ||
157 | +<!-- </el-input>--> | ||
158 | +<!-- </el-form-item>--> | ||
159 | + | ||
160 | + | ||
161 | +<!-- <el-form-item label="" prop="description">--> | ||
162 | +<!-- <el-input v-model="queue_addForm.description" style="width:300px" clearable size="small"--> | ||
163 | +<!-- type="textarea" autosize :rows="1"--> | ||
164 | +<!-- placeholder="相关描述">--> | ||
165 | +<!-- </el-input>--> | ||
166 | +<!-- </el-form-item>--> | ||
145 | </el-form> | 167 | </el-form> |
146 | - <User | ||
147 | - v-on:getUserMessageEvent="getUserInfo"> | ||
148 | - </User> | ||
149 | <div slot="footer" class="dialog-footer" style="text-align: center;margin-top: -20px"> | 168 | <div slot="footer" class="dialog-footer" style="text-align: center;margin-top: -20px"> |
150 | <el-button type="info" @click="queue_dialog.addDialog = false" size="medium" | 169 | <el-button type="info" @click="queue_dialog.addDialog = false" size="medium" |
151 | style="width: 100px;background-color: #6F8294;color: #ffffff">取消 | 170 | style="width: 100px;background-color: #6F8294;color: #ffffff">取消 |
@@ -168,39 +187,25 @@ | @@ -168,39 +187,25 @@ | ||
168 | updateBusQueue, | 187 | updateBusQueue, |
169 | deleteBusQueue, | 188 | deleteBusQueue, |
170 | batchRemoveBusQueue, | 189 | batchRemoveBusQueue, |
171 | - getServerAndHostList, getUserInfoList, | ||
172 | - api_addReceiverFileter,api_getReceiverFileter | 190 | + getServerAndHostList, |
191 | + getUserInfoList, | ||
192 | + api_addReceiverFileter, | ||
193 | + api_getReceiverFileter, | ||
194 | + getTypesPage, | ||
195 | + deleteMessage, | ||
196 | + batchDelete, | ||
197 | + updateMessage, | ||
198 | + api_putReceiverFileter, | ||
199 | + api_delReceiverFileter, | ||
200 | + deleteRouter | ||
173 | } from "../../api/message_bus"; | 201 | } from "../../api/message_bus"; |
174 | 202 | ||
175 | - import User from "@/views/bus/dsly/user"; | ||
176 | 203 | ||
177 | export default { | 204 | export default { |
178 | name: "Queue", | 205 | name: "Queue", |
179 | - components: { User }, | 206 | + props:['propRouterReceiveId'], |
180 | data() { | 207 | data() { |
181 | return { | 208 | return { |
182 | - dialogMap: { | ||
183 | - update: '编辑', | ||
184 | - create: '新增', | ||
185 | - }, | ||
186 | - dialogStatus: 'create', | ||
187 | - /** | ||
188 | - * queue,配置与参数 | ||
189 | - */ | ||
190 | - queue_config: { | ||
191 | - // 用户信息列表 | ||
192 | - userInfoList: [], | ||
193 | - // 级联显示 | ||
194 | - cascade: { | ||
195 | - // 服务器及虚拟主机列表 | ||
196 | - server_hostList: [], | ||
197 | - defaultParams: { | ||
198 | - label: 'aliasName', | ||
199 | - value: 'id', | ||
200 | - children: 'aliasList' | ||
201 | - } | ||
202 | - }, | ||
203 | - }, | ||
204 | /** | 209 | /** |
205 | * queue,搜索参数 | 210 | * queue,搜索参数 |
206 | */ | 211 | */ |
@@ -222,30 +227,75 @@ | @@ -222,30 +227,75 @@ | ||
222 | // 批量删除,选中列表 | 227 | // 批量删除,选中列表 |
223 | selectList: [], | 228 | selectList: [], |
224 | }, | 229 | }, |
230 | + dialogMap: { | ||
231 | + update: '编辑', | ||
232 | + create: '新增', | ||
233 | + }, | ||
234 | + dialogStatus: 'create', | ||
225 | /** | 235 | /** |
226 | * queue,新增表单 | 236 | * queue,新增表单 |
227 | */ | 237 | */ |
228 | queue_addForm: { | 238 | queue_addForm: { |
239 | + filter: '', | ||
240 | + messageRouterReciverId: '', | ||
241 | + type: '', | ||
242 | + status:'true', | ||
243 | + id:'' | ||
244 | + }, | ||
245 | + /** | ||
246 | + * queue,添加表单,验证规则 | ||
247 | + */ | ||
248 | + queue_addFormRules: { | ||
229 | // 队列名称 | 249 | // 队列名称 |
230 | - queueName: '', | ||
231 | - consumerGroupName: '', | ||
232 | - partitionCount: 3, | ||
233 | - queueType: 1, | 250 | + filter: [ |
251 | + {required: true, message: '请输入过滤规则', trigger: ['blur', 'change']}, | ||
252 | + ], | ||
234 | // 用户名称 | 253 | // 用户名称 |
235 | - username: '', | ||
236 | - // 用户id(该字段抛弃) | ||
237 | - userId: '', | 254 | + type: [ |
255 | + {required: true, message: '请输入规则类型', trigger: ['blur', 'change']}, | ||
256 | + ], | ||
238 | // 所属虚拟机id | 257 | // 所属虚拟机id |
239 | - virtualHostId: '', | ||
240 | - // 是否持久化,默认 true | ||
241 | - durability: '', | ||
242 | - // 是否自动删除,默认 false | ||
243 | - autoDelete: '', | ||
244 | - // 扩展参数,以JSON格式存储 | ||
245 | - arguments: '', | ||
246 | - // 相关描述 | ||
247 | - description: '', | 258 | + messageRouterReciverId: [ |
259 | + {required: true, message: '请输入订阅者ID', trigger: ['blur', 'change']}, | ||
260 | + ], | ||
261 | + // // 是否持久化,默认 true | ||
262 | + // durability: [ | ||
263 | + // {required: true, message: '请选择是否持久化', trigger: ['blur', 'change']}, | ||
264 | + // ], | ||
265 | + // // 是否自动删除,默认 false | ||
266 | + // autoDelete: [ | ||
267 | + // {required: true, message: '请选择是否自动删除', trigger: ['blur', 'change']}, | ||
268 | + // ], | ||
269 | + // // 扩展参数,以JSON格式存储 | ||
270 | + // arguments: [ | ||
271 | + // {required: true, message: '扩展参数', trigger: ['blur', 'change']}, | ||
272 | + // ], | ||
273 | + // // 相关描述 | ||
274 | + // description: [ | ||
275 | + // {required: true, message: '请输入相关描述', trigger: ['blur', 'change']}, | ||
276 | + // ], | ||
277 | + }, | ||
278 | + | ||
279 | + | ||
280 | + | ||
281 | + /** | ||
282 | + * queue,配置与参数 | ||
283 | + */ | ||
284 | + queue_config: { | ||
285 | + // 用户信息列表 | ||
286 | + userInfoList: [], | ||
287 | + // 级联显示 | ||
288 | + cascade: { | ||
289 | + // 服务器及虚拟主机列表 | ||
290 | + server_hostList: [], | ||
291 | + defaultParams: { | ||
292 | + label: 'aliasName', | ||
293 | + value: 'id', | ||
294 | + children: 'aliasList' | ||
295 | + } | ||
296 | + }, | ||
248 | }, | 297 | }, |
298 | + | ||
249 | /** | 299 | /** |
250 | * queue,编辑表单 | 300 | * queue,编辑表单 |
251 | */ | 301 | */ |
@@ -274,39 +324,7 @@ | @@ -274,39 +324,7 @@ | ||
274 | // 编辑对话框 | 324 | // 编辑对话框 |
275 | editDialog: false, | 325 | editDialog: false, |
276 | }, | 326 | }, |
277 | - /** | ||
278 | - * queue,添加表单,验证规则 | ||
279 | - */ | ||
280 | - queue_addFormRules: { | ||
281 | - // 队列名称 | ||
282 | - queueName: [ | ||
283 | - {required: true, message: '请输入队列名称', trigger: ['blur', 'change']}, | ||
284 | - ], | ||
285 | - // 用户名称 | ||
286 | - username: [ | ||
287 | - {required: true, message: '请输入用户名称', trigger: ['blur', 'change']}, | ||
288 | - ], | ||
289 | - // // 所属虚拟机id | ||
290 | - // virtualHostId: [ | ||
291 | - // {required: true, message: '请选择所属虚拟机', trigger: ['blur', 'change']}, | ||
292 | - // ], | ||
293 | - // // 是否持久化,默认 true | ||
294 | - // durability: [ | ||
295 | - // {required: true, message: '请选择是否持久化', trigger: ['blur', 'change']}, | ||
296 | - // ], | ||
297 | - // // 是否自动删除,默认 false | ||
298 | - // autoDelete: [ | ||
299 | - // {required: true, message: '请选择是否自动删除', trigger: ['blur', 'change']}, | ||
300 | - // ], | ||
301 | - // // 扩展参数,以JSON格式存储 | ||
302 | - // arguments: [ | ||
303 | - // {required: true, message: '扩展参数', trigger: ['blur', 'change']}, | ||
304 | - // ], | ||
305 | - // // 相关描述 | ||
306 | - // description: [ | ||
307 | - // {required: true, message: '请输入相关描述', trigger: ['blur', 'change']}, | ||
308 | - // ], | ||
309 | - }, | 327 | + |
310 | /** | 328 | /** |
311 | * queue,编辑表单,验证规则 | 329 | * queue,编辑表单,验证规则 |
312 | */ | 330 | */ |
@@ -319,6 +337,10 @@ | @@ -319,6 +337,10 @@ | ||
319 | username: [ | 337 | username: [ |
320 | {required: true, message: '请输入用户名称', trigger: ['blur', 'change']}, | 338 | {required: true, message: '请输入用户名称', trigger: ['blur', 'change']}, |
321 | ], | 339 | ], |
340 | + // 所属虚拟机id | ||
341 | + messageRouterReciverId: [ | ||
342 | + {required: true, message: '请输入订阅者ID', trigger: ['blur', 'change']}, | ||
343 | + ], | ||
322 | // // 所属虚拟机id | 344 | // // 所属虚拟机id |
323 | // virtualHostId: [ | 345 | // virtualHostId: [ |
324 | // {required: true, message: '请选择所属虚拟机', trigger: ['blur', 'change']}, | 346 | // {required: true, message: '请选择所属虚拟机', trigger: ['blur', 'change']}, |
@@ -356,102 +378,50 @@ | @@ -356,102 +378,50 @@ | ||
356 | } | 378 | } |
357 | }, | 379 | }, |
358 | methods: { | 380 | methods: { |
359 | - /** | ||
360 | - * 从user获取选择的用户信息 | ||
361 | - */ | ||
362 | - getUserInfo:function(userListInfo){ | ||
363 | - let userList = []; | ||
364 | - userList = userListInfo; | ||
365 | - if (userList.length>0){ | ||
366 | - let user = userList.pop(); | ||
367 | - this.queue_addForm.username = user.username; | ||
368 | - this.queue_addForm.queueName = user.username; | ||
369 | - this.queue_addForm.userId = user.userId; | ||
370 | - this.queue_addForm.consumerGroupName = user.username+"Group"; | ||
371 | - } | ||
372 | - }, | ||
373 | - /** | ||
374 | - * 分页查询,监听 pageSize 改变的事件 | ||
375 | - */ | ||
376 | - queue_handleSizeChange(newSize) { | 381 | + handleSizeChange(newSize) { |
377 | this.queue_queryInfo.pageSize = newSize; | 382 | this.queue_queryInfo.pageSize = newSize; |
378 | - //刷新列表 | ||
379 | - this.queue_getList(); | 383 | + this.queue_getListSub(); |
380 | }, | 384 | }, |
381 | - /** | ||
382 | - * 分页查询,监听 pageNum 改变的事件 | ||
383 | - */ | ||
384 | - queue_handleCurrentChange(newPage) { | 385 | + handleCurrentChange(newPage) { |
385 | this.queue_queryInfo.pageNum = newPage; | 386 | this.queue_queryInfo.pageNum = newPage; |
386 | - //刷新列表 | ||
387 | - this.queue_getList(); | ||
388 | - }, | ||
389 | - queue_getListSub(){ | ||
390 | - this.queue_queryInfo.pageNum= 1; | ||
391 | - this.queue_getList(); | ||
392 | - }, | ||
393 | - /** | ||
394 | - * queue,分页查询 | ||
395 | - */ | ||
396 | - queue_getList() { | ||
397 | - // 开启加载 | ||
398 | - this.queue_loading.listLoading = true; | 387 | + this.queue_getListSub(); |
388 | + }, | ||
389 | + searchSubmit:function () { | ||
390 | + this.queryInfo.pageNum = 1; | ||
391 | + this.queryInfo.pageSize = 10; | ||
392 | + this.queue_getListSub(); | ||
393 | + } , | ||
394 | + // 获取消息标签列表 | ||
395 | + queue_getListSub() { | ||
396 | + let _this = this; | ||
399 | api_getReceiverFileter(this.queue_queryInfo).then((response) => { | 397 | api_getReceiverFileter(this.queue_queryInfo).then((response) => { |
400 | let res = response.data; | 398 | let res = response.data; |
401 | if (res.code !== '200') { | 399 | if (res.code !== '200') { |
402 | - // 关闭加载 | ||
403 | - this.queue_loading.listLoading = false; | ||
404 | - return this.$message.error(res.msg); | 400 | + return _this.$message.error('获取消息收发记录,失败!'); |
405 | } | 401 | } |
406 | // 获取列表数据 | 402 | // 获取列表数据 |
407 | - this.queue_page.queueList = res.data.list; | 403 | + _this.queue_page.queueList = res.data.list; |
408 | // 获取列表的总记录数 | 404 | // 获取列表的总记录数 |
409 | - this.queue_page.total = res.data.total; | ||
410 | - // 关闭加载 | ||
411 | - this.queue_loading.listLoading = false; | ||
412 | - this.$message.success(res.msg); | 405 | + _this.queue_page.total = res.data.total; |
406 | + _this.$message.success('获取消息收发记录,成功!'); | ||
413 | }).catch(error => { | 407 | }).catch(error => { |
414 | // 关闭加载 | 408 | // 关闭加载 |
415 | - this.queue_loading.listLoading = false; | ||
416 | - this.$message.error(error.toString()); | 409 | + _this.$message.error(error.toString()); |
417 | }); | 410 | }); |
418 | }, | 411 | }, |
419 | - /** | ||
420 | - * queue,添加对话框,打开事件 | ||
421 | - */ | 412 | + // 添加对话框,打开事件 |
422 | queue_toAddDialog() { | 413 | queue_toAddDialog() { |
423 | this.queue_addForm = { | 414 | this.queue_addForm = { |
424 | - // 队列名称 | ||
425 | - queueName: '', | ||
426 | - consumerGroupName: '', | ||
427 | - partitionCount: 3, | ||
428 | - queueType: 1, | ||
429 | - // 用户名称 | ||
430 | - username: '', | ||
431 | - // 用户id(该字段抛弃) | ||
432 | - userId: '', | ||
433 | - // 所属虚拟机id | ||
434 | - virtualHostId: '', | ||
435 | - // 是否持久化,默认 true | ||
436 | - durability: '', | ||
437 | - // 是否自动删除,默认 false | ||
438 | - autoDelete: '', | ||
439 | - // 扩展参数,以JSON格式存储 | ||
440 | - arguments: '', | ||
441 | - // 相关描述 | ||
442 | - description: '', | 415 | + filter: '', |
416 | + filterValue:'', | ||
417 | + messageRouterReciverId: '', | ||
418 | + type: '', | ||
419 | + status:'' | ||
443 | }; | 420 | }; |
444 | this.dialogStatus= 'create'; | 421 | this.dialogStatus= 'create'; |
445 | this.queue_dialog.addDialog = true; | 422 | this.queue_dialog.addDialog = true; |
446 | }, | 423 | }, |
447 | /** | 424 | /** |
448 | - * queue,添加对话框,关闭事件 | ||
449 | - */ | ||
450 | - queue_addDialogClosed() { | ||
451 | - // 重置对话框 | ||
452 | - this.$refs.queue_addFormRef.resetFields(); | ||
453 | - }, | ||
454 | - /** | ||
455 | * queue,添加功能 | 425 | * queue,添加功能 |
456 | */ | 426 | */ |
457 | queue_add() { | 427 | queue_add() { |
@@ -461,7 +431,7 @@ | @@ -461,7 +431,7 @@ | ||
461 | if (!valid) return; | 431 | if (!valid) return; |
462 | // 通过,表单预检验,开启加载 | 432 | // 通过,表单预检验,开启加载 |
463 | this.queue_loading.addLoading = true; | 433 | this.queue_loading.addLoading = true; |
464 | - insertBusQueue(this.queue_addForm).then((response) => { | 434 | + api_addReceiverFileter(this.queue_addForm).then((response) => { |
465 | let res = response.data; | 435 | let res = response.data; |
466 | // 添加失败 | 436 | // 添加失败 |
467 | if (res.code !== '200') { | 437 | if (res.code !== '200') { |
@@ -476,7 +446,7 @@ | @@ -476,7 +446,7 @@ | ||
476 | // 隐藏对话框 | 446 | // 隐藏对话框 |
477 | this.queue_dialog.addDialog = false; | 447 | this.queue_dialog.addDialog = false; |
478 | // 刷新列表 | 448 | // 刷新列表 |
479 | - this.queue_getList(); | 449 | + this.queue_getListSub(); |
480 | }).catch(error => { | 450 | }).catch(error => { |
481 | // 关闭加载 | 451 | // 关闭加载 |
482 | this.queue_loading.addLoading = false; | 452 | this.queue_loading.addLoading = false; |
@@ -484,22 +454,14 @@ | @@ -484,22 +454,14 @@ | ||
484 | }); | 454 | }); |
485 | }) | 455 | }) |
486 | }, | 456 | }, |
487 | - /** | ||
488 | - * queue,编辑对话框,打开事件 | ||
489 | - */ | 457 | + // 编辑对话框,打开事件 |
490 | queue_toEditDialog(index, row) { | 458 | queue_toEditDialog(index, row) { |
491 | - this.queue_addForm = Object.assign({}, row); | 459 | + console.log(row) |
492 | this.queue_dialog.addDialog = true; | 460 | this.queue_dialog.addDialog = true; |
461 | + this.queue_addForm = Object.assign({}, row); | ||
493 | this.dialogStatus= 'update'; | 462 | this.dialogStatus= 'update'; |
494 | }, | 463 | }, |
495 | /** | 464 | /** |
496 | - * queue,编辑对话框,关闭事件 | ||
497 | - */ | ||
498 | - queue_editDialogClosed() { | ||
499 | - //重置对话框 | ||
500 | - this.$refs.queue_editFormRef.resetFields(); | ||
501 | - }, | ||
502 | - /** | ||
503 | * queue,编辑功能 | 465 | * queue,编辑功能 |
504 | */ | 466 | */ |
505 | queue_edit() { | 467 | queue_edit() { |
@@ -509,7 +471,7 @@ | @@ -509,7 +471,7 @@ | ||
509 | if (!valid) return; | 471 | if (!valid) return; |
510 | // 通过,表单预检验,开启加载 | 472 | // 通过,表单预检验,开启加载 |
511 | this.queue_loading.editLoading = true; | 473 | this.queue_loading.editLoading = true; |
512 | - updateBusQueue(this.queue_addForm).then((response) => { | 474 | + api_putReceiverFileter(this.queue_addForm).then((response) => { |
513 | let res = response.data; | 475 | let res = response.data; |
514 | if (res.code !== '200') { | 476 | if (res.code !== '200') { |
515 | //关闭加载 | 477 | //关闭加载 |
@@ -522,7 +484,7 @@ | @@ -522,7 +484,7 @@ | ||
522 | // 隐藏对话框 | 484 | // 隐藏对话框 |
523 | this.queue_dialog.addDialog = false; | 485 | this.queue_dialog.addDialog = false; |
524 | // 刷新列表 | 486 | // 刷新列表 |
525 | - this.queue_getList(); | 487 | + this.queue_getListSub(); |
526 | }).catch(error => { | 488 | }).catch(error => { |
527 | // 关闭加载 | 489 | // 关闭加载 |
528 | this.queue_loading.addLoading = false; | 490 | this.queue_loading.addLoading = false; |
@@ -530,49 +492,32 @@ | @@ -530,49 +492,32 @@ | ||
530 | }); | 492 | }); |
531 | }) | 493 | }) |
532 | }, | 494 | }, |
533 | - /** | ||
534 | - * queue,删除功能 | ||
535 | - */ | ||
536 | - queue_remove(index, row) { | 495 | + // 删除 |
496 | + queue_remove(index,row){ | ||
537 | // 弹框询问是否删除? | 497 | // 弹框询问是否删除? |
538 | - this.$confirm('此操作永久删除该队列信息, 是否继续?', '警告', { | 498 | + this.$confirm('此操作永久删除该消息收发记录, 是否继续?', '警告', { |
539 | confirmButtonText: '确定删除', | 499 | confirmButtonText: '确定删除', |
540 | cancelButtonText: '取消', | 500 | cancelButtonText: '取消', |
541 | type: 'warning' | 501 | type: 'warning' |
542 | } | 502 | } |
543 | ).then(() => { | 503 | ).then(() => { |
544 | - // 开启加载 | ||
545 | - this.queue_loading.delLoading = true; | ||
546 | - deleteBusQueue(row).then((response) => { | 504 | + api_delReceiverFileter(row).then((response) => { |
505 | + // console.log(row.id) | ||
547 | let res = response.data; | 506 | let res = response.data; |
548 | - if (res.code !== '200') { | ||
549 | - // 关闭加载 | ||
550 | - this.queue_loading.delLoading = false; | ||
551 | - return this.$message.error(res.msg); | ||
552 | - } | ||
553 | - // 关闭加载 | ||
554 | - this.queue_loading.delLoading = false; | ||
555 | this.$message.success(res.msg); | 507 | this.$message.success(res.msg); |
556 | - // 刷新列表 | ||
557 | - this.queue_getList(); | 508 | + this.queue_getListSub(); |
558 | }).catch(error => { | 509 | }).catch(error => { |
559 | - // 关闭加载 | ||
560 | - this.queue_loading.delLoading = false; | ||
561 | - this.$message.error(error.toString()); | 510 | + this.$message.error(res.msg); |
562 | }); | 511 | }); |
563 | }).catch(() => { | 512 | }).catch(() => { |
564 | }); | 513 | }); |
565 | }, | 514 | }, |
566 | - /** | ||
567 | - * queue,批量删除---选中 | ||
568 | - */ | 515 | + // 批量删除---选中 |
569 | queue_selectChange: function (selectList) { | 516 | queue_selectChange: function (selectList) { |
570 | this.$emit("getQueueListEvent",selectList); | 517 | this.$emit("getQueueListEvent",selectList); |
571 | this.queue_page.selectList = selectList; | 518 | this.queue_page.selectList = selectList; |
572 | }, | 519 | }, |
573 | - /** | ||
574 | - * queue,批量删除功能 | ||
575 | - */ | 520 | + // 批量删除功能 |
576 | queue_batchRemove() { | 521 | queue_batchRemove() { |
577 | const ids = this.queue_page.selectList.map(item => item.id).toString(); | 522 | const ids = this.queue_page.selectList.map(item => item.id).toString(); |
578 | this.$confirm('此操作将永久删除选中的队列信息, 是否继续?', '警告', { | 523 | this.$confirm('此操作将永久删除选中的队列信息, 是否继续?', '警告', { |
@@ -604,6 +549,208 @@ | @@ -604,6 +549,208 @@ | ||
604 | }).catch(() => { | 549 | }).catch(() => { |
605 | }); | 550 | }); |
606 | }, | 551 | }, |
552 | + // /** | ||
553 | + // * queue,删除功能 | ||
554 | + // */ | ||
555 | + // queue_remove(index, row) { | ||
556 | + // // 弹框询问是否删除? | ||
557 | + // this.$confirm('此操作永久删除该队列信息, 是否继续?', '警告', { | ||
558 | + // confirmButtonText: '确定删除', | ||
559 | + // cancelButtonText: '取消', | ||
560 | + // type: 'warning' | ||
561 | + // } | ||
562 | + // ).then(() => { | ||
563 | + // // 开启加载 | ||
564 | + // this.queue_loading.delLoading = true; | ||
565 | + // api_delReceiverFileter(row).then((response) => { | ||
566 | + // let res = response.data; | ||
567 | + // if (res.code !== '200') { | ||
568 | + // // 关闭加载 | ||
569 | + // this.queue_loading.delLoading = false; | ||
570 | + // return this.$message.error(res.msg); | ||
571 | + // } | ||
572 | + // // 关闭加载 | ||
573 | + // this.queue_loading.delLoading = false; | ||
574 | + // this.$message.success(res.msg); | ||
575 | + // // 刷新列表 | ||
576 | + // this.queue_getListSub(); | ||
577 | + // }).catch(error => { | ||
578 | + // // 关闭加载 | ||
579 | + // this.queue_loading.delLoading = false; | ||
580 | + // this.$message.error(error.toString()); | ||
581 | + // }); | ||
582 | + // }).catch(() => { | ||
583 | + // }); | ||
584 | + // }, | ||
585 | + // /** | ||
586 | + // * queue,批量删除---选中 | ||
587 | + // */ | ||
588 | + // queue_selectChange: function (selectList) { | ||
589 | + // this.$emit("getQueueListEvent",selectList); | ||
590 | + // this.queue_page.selectList = selectList; | ||
591 | + // }, | ||
592 | + | ||
593 | + | ||
594 | + | ||
595 | + | ||
596 | + | ||
597 | + | ||
598 | + | ||
599 | + | ||
600 | + | ||
601 | + | ||
602 | + | ||
603 | + /** | ||
604 | + * 从user获取选择的用户信息 | ||
605 | + */ | ||
606 | + getUserInfo:function(userListInfo){ | ||
607 | + let userList = []; | ||
608 | + userList = userListInfo; | ||
609 | + if (userList.length>0){ | ||
610 | + let user = userList.pop(); | ||
611 | + this.queue_addForm.username = user.username; | ||
612 | + this.queue_addForm.queueName = user.username; | ||
613 | + this.queue_addForm.userId = user.userId; | ||
614 | + this.queue_addForm.consumerGroupName = user.username+"Group"; | ||
615 | + } | ||
616 | + }, | ||
617 | + // /** | ||
618 | + // * 分页查询,监听 pageSize 改变的事件 | ||
619 | + // */ | ||
620 | + // queue_handleSizeChange(newSize) { | ||
621 | + // this.queue_queryInfo.pageSize = newSize; | ||
622 | + // //刷新列表 | ||
623 | + // this.queue_getList(); | ||
624 | + // }, | ||
625 | + // /** | ||
626 | + // * 分页查询,监听 pageNum 改变的事件 | ||
627 | + // */ | ||
628 | + // queue_handleCurrentChange(newPage) { | ||
629 | + // this.queue_queryInfo.pageNum = newPage; | ||
630 | + // //刷新列表 | ||
631 | + // this.queue_getList(); | ||
632 | + // }, | ||
633 | + // queue_getListSub(){ | ||
634 | + // this.queue_queryInfo.pageNum= 1; | ||
635 | + // this.queue_getList(); | ||
636 | + // }, | ||
637 | + /** | ||
638 | + * queue,分页查询 | ||
639 | + */ | ||
640 | + queue_getList() { | ||
641 | + // 开启加载 | ||
642 | + this.queue_loading.listLoading = true; | ||
643 | + api_getReceiverFileter(this.queue_queryInfo).then((response) => { | ||
644 | + let res = response.data; | ||
645 | + if (res.code !== '200') { | ||
646 | + // 关闭加载 | ||
647 | + this.queue_loading.listLoading = false; | ||
648 | + return this.$message.error(res.msg); | ||
649 | + } | ||
650 | + // 获取列表数据 | ||
651 | + this.queue_page.queueList = res.data.list; | ||
652 | + // 获取列表的总记录数 | ||
653 | + this.queue_page.total = res.data.total; | ||
654 | + // 关闭加载 | ||
655 | + this.queue_loading.listLoading = false; | ||
656 | + this.$message.success(res.msg); | ||
657 | + }).catch(error => { | ||
658 | + // 关闭加载 | ||
659 | + this.queue_loading.listLoading = false; | ||
660 | + this.$message.error(error.toString()); | ||
661 | + }); | ||
662 | + }, | ||
663 | + | ||
664 | + /** | ||
665 | + * queue,添加对话框,关闭事件 | ||
666 | + */ | ||
667 | + queue_addDialogClosed() { | ||
668 | + // 重置对话框 | ||
669 | + this.$refs.queue_addFormRef.resetFields(); | ||
670 | + }, | ||
671 | + // /** | ||
672 | + // * queue,添加功能 | ||
673 | + // */ | ||
674 | + // queue_add() { | ||
675 | + // // 进行表单的预验证 | ||
676 | + // this.$refs.queue_addFormRef.validate(valid => { | ||
677 | + // // 未通过,表单预校验 | ||
678 | + // if (!valid) return; | ||
679 | + // // 通过,表单预检验,开启加载 | ||
680 | + // this.queue_loading.addLoading = true; | ||
681 | + // insertBusQueue(this.queue_addForm).then((response) => { | ||
682 | + // let res = response.data; | ||
683 | + // // 添加失败 | ||
684 | + // if (res.code !== '200') { | ||
685 | + // // 关闭加载 | ||
686 | + // this.queue_loading.addLoading = false; | ||
687 | + // return this.$message.error(res.msg); | ||
688 | + // } | ||
689 | + // // 添加,成功 | ||
690 | + // this.$message.success(res.msg); | ||
691 | + // // 关闭加载 | ||
692 | + // this.queue_loading.addLoading = false; | ||
693 | + // // 隐藏对话框 | ||
694 | + // this.queue_dialog.addDialog = false; | ||
695 | + // // 刷新列表 | ||
696 | + // this.queue_getList(); | ||
697 | + // }).catch(error => { | ||
698 | + // // 关闭加载 | ||
699 | + // this.queue_loading.addLoading = false; | ||
700 | + // this.$message.error(error.toString()); | ||
701 | + // }); | ||
702 | + // }) | ||
703 | + // }, | ||
704 | + // /** | ||
705 | + // * queue,编辑对话框,打开事件 | ||
706 | + // */ | ||
707 | + // queue_toEditDialog(index, row) { | ||
708 | + // this.queue_addForm = Object.assign({}, row); | ||
709 | + // this.queue_dialog.addDialog = true; | ||
710 | + // this.dialogStatus= 'update'; | ||
711 | + // }, | ||
712 | + /** | ||
713 | + * queue,编辑对话框,关闭事件 | ||
714 | + */ | ||
715 | + queue_editDialogClosed() { | ||
716 | + //重置对话框 | ||
717 | + this.$refs.queue_editFormRef.resetFields(); | ||
718 | + }, | ||
719 | + | ||
720 | + // /** | ||
721 | + // * queue,删除功能 | ||
722 | + // */ | ||
723 | + // queue_remove(index, row) { | ||
724 | + // // 弹框询问是否删除? | ||
725 | + // this.$confirm('此操作永久删除该队列信息, 是否继续?', '警告', { | ||
726 | + // confirmButtonText: '确定删除', | ||
727 | + // cancelButtonText: '取消', | ||
728 | + // type: 'warning' | ||
729 | + // } | ||
730 | + // ).then(() => { | ||
731 | + // // 开启加载 | ||
732 | + // this.queue_loading.delLoading = true; | ||
733 | + // deleteBusQueue(row).then((response) => { | ||
734 | + // let res = response.data; | ||
735 | + // if (res.code !== '200') { | ||
736 | + // // 关闭加载 | ||
737 | + // this.queue_loading.delLoading = false; | ||
738 | + // return this.$message.error(res.msg); | ||
739 | + // } | ||
740 | + // // 关闭加载 | ||
741 | + // this.queue_loading.delLoading = false; | ||
742 | + // this.$message.success(res.msg); | ||
743 | + // // 刷新列表 | ||
744 | + // this.queue_getList(); | ||
745 | + // }).catch(error => { | ||
746 | + // // 关闭加载 | ||
747 | + // this.queue_loading.delLoading = false; | ||
748 | + // this.$message.error(error.toString()); | ||
749 | + // }); | ||
750 | + // }).catch(() => { | ||
751 | + // }); | ||
752 | + // }, | ||
753 | + | ||
607 | /** | 754 | /** |
608 | * 服务器与虚拟主机 1:n | 755 | * 服务器与虚拟主机 1:n |
609 | * 获取列表 | 756 | * 获取列表 |
-
请 注册 或 登录 后发表评论