|
@@ -40,42 +40,44 @@ |
|
@@ -40,42 +40,44 @@ |
40
|
:data="umb_queryData.tableData"
|
40
|
:data="umb_queryData.tableData"
|
41
|
border size="small"
|
41
|
border size="small"
|
42
|
:header-cell-style="{background:'#6F8294',color:'#FFFFFF'}"
|
42
|
:header-cell-style="{background:'#6F8294',color:'#FFFFFF'}"
|
43
|
- style="border-radius: 10px 10px 0px 0px;line-height: 25px;">
|
43
|
+ style="border-radius: 10px 10px 0px 0px;line-height: 25px">
|
44
|
<el-table-column
|
44
|
<el-table-column
|
45
|
prop="sndr"
|
45
|
prop="sndr"
|
46
|
label="帐户名称"
|
46
|
label="帐户名称"
|
47
|
- width="150"
|
47
|
+ width="80"
|
48
|
align="center"
|
48
|
align="center"
|
49
|
>
|
49
|
>
|
50
|
</el-table-column>
|
50
|
</el-table-column>
|
51
|
<el-table-column
|
51
|
<el-table-column
|
52
|
prop="btype"
|
52
|
prop="btype"
|
53
|
label="消息大类"
|
53
|
label="消息大类"
|
54
|
- width="120"
|
54
|
+ width="80"
|
55
|
align="center"
|
55
|
align="center"
|
56
|
>
|
56
|
>
|
57
|
</el-table-column>
|
57
|
</el-table-column>
|
58
|
<el-table-column
|
58
|
<el-table-column
|
59
|
prop="stype"
|
59
|
prop="stype"
|
60
|
label="消息子类"
|
60
|
label="消息子类"
|
61
|
- width="120"
|
61
|
+ width="80"
|
62
|
align="center"
|
62
|
align="center"
|
63
|
>
|
63
|
>
|
64
|
</el-table-column>
|
64
|
</el-table-column>
|
65
|
<el-table-column
|
65
|
<el-table-column
|
66
|
prop="rcvr_topic"
|
66
|
prop="rcvr_topic"
|
67
|
label="订阅者"
|
67
|
label="订阅者"
|
68
|
- width="250"
|
68
|
+ width="300"
|
69
|
align="center"
|
69
|
align="center"
|
70
|
>
|
70
|
>
|
71
|
- <template slot-scope="scope">
|
|
|
72
|
- <div v-for="reciver in scope.row.rcvrList" v-bind:key="reciver.id">
|
71
|
+ <template slot-scope="scope" style="text-align: right">
|
|
|
72
|
+ <div v-for="reciver in scope.row.rcvrList" v-bind:key="reciver.id" style="text-align: right;margin-right: 40px">
|
73
|
{{reciver.rcvrTopic}}
|
73
|
{{reciver.rcvrTopic}}
|
74
|
- <el-button type="text" size="mini" @click="addReceiverFiletery(reciver.id)">[删除]</el-button><!--,{{reciver.filterList.filter}}-->
|
74
|
+ <el-button type="text" size="mini" @click="delReceiverFiletery(reciver.id)">[删除]</el-button><!--,{{reciver.filterList.filter}}-->
|
75
|
<el-button type="text" size="mini" @click="addReceiverFiletery(reciver.id)">[增加过滤]</el-button>
|
75
|
<el-button type="text" size="mini" @click="addReceiverFiletery(reciver.id)">[增加过滤]</el-button>
|
76
|
<!-- <div v-for="filters in reciver.filterList">{{filters.filter}}</div>-->
|
76
|
<!-- <div v-for="filters in reciver.filterList">{{filters.filter}}</div>-->
|
77
|
</div>
|
77
|
</div>
|
78
|
- <el-button type="text" size="mini" @click="addReceiverFiletery()">[增加接收者]</el-button>
|
78
|
+ <div style="text-align: right;margin-right: 40px">
|
|
|
79
|
+ <el-button type="text" size="mini" @click="addRcvr(scope.$index,scope.row)">[增加订阅者]</el-button>
|
|
|
80
|
+ </div>
|
79
|
</template>
|
81
|
</template>
|
80
|
</el-table-column>
|
82
|
</el-table-column>
|
81
|
<el-table-column
|
83
|
<el-table-column
|
|
@@ -91,7 +93,7 @@ |
|
@@ -91,7 +93,7 @@ |
91
|
</div>
|
93
|
</div>
|
92
|
</template>
|
94
|
</template>
|
93
|
</el-table-column>
|
95
|
</el-table-column>
|
94
|
- <el-table-column label="操作" width="250px" align="center" fixed="right">
|
96
|
+ <el-table-column label="操作" width="150px" align="center" fixed="right">
|
95
|
<template slot-scope="scope">
|
97
|
<template slot-scope="scope">
|
96
|
<el-button type="primary" size="mini" @click="editRouter(scope.$index,scope.row)">编辑</el-button>
|
98
|
<el-button type="primary" size="mini" @click="editRouter(scope.$index,scope.row)">编辑</el-button>
|
97
|
<el-button type="danger" size="mini" @click="delRouter(scope.$index,scope.row)">删除</el-button>
|
99
|
<el-button type="danger" size="mini" @click="delRouter(scope.$index,scope.row)">删除</el-button>
|
|
@@ -113,6 +115,36 @@ |
|
@@ -113,6 +115,36 @@ |
113
|
</el-pagination>
|
115
|
</el-pagination>
|
114
|
</div>
|
116
|
</div>
|
115
|
</el-row>
|
117
|
</el-row>
|
|
|
118
|
+<!-- 编辑-->
|
|
|
119
|
+ <el-row>
|
|
|
120
|
+ <el-dialog title="编辑" :visible.sync="dialogFormVisibles" width="70%" style="margin-top: -20px" text-align="center">
|
|
|
121
|
+ <el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-width="145px"
|
|
|
122
|
+ class="demo-ruleForm" style="margin-top: -10px ;margin-left: -150px" align="center" >
|
|
|
123
|
+ <el-form-item label="" prop="sndr">
|
|
|
124
|
+ <el-input v-model="ruleForm.sndr" style="width:300px" size="small">
|
|
|
125
|
+ <template slot="prepend" >账户名称</template>
|
|
|
126
|
+ </el-input>
|
|
|
127
|
+ </el-form-item>
|
|
|
128
|
+ <el-form-item label="" prop="btype">
|
|
|
129
|
+ <el-input v-model="ruleForm.btype" style="width:300px" size="small">
|
|
|
130
|
+ <template slot="prepend" >消息大类</template>
|
|
|
131
|
+ </el-input>
|
|
|
132
|
+ </el-form-item>
|
|
|
133
|
+ <el-form-item label="" prop="stype">
|
|
|
134
|
+ <el-input v-model="ruleForm.stype" style="width:300px" size="small">
|
|
|
135
|
+ <template slot="prepend" >消息子类</template>
|
|
|
136
|
+ </el-input>
|
|
|
137
|
+ </el-form-item>
|
|
|
138
|
+ </el-form>
|
|
|
139
|
+ <div slot="footer" class="dialog-footer" align="center">
|
|
|
140
|
+ <el-button @click="dialogFormVisibles = false" size="medium"
|
|
|
141
|
+ style="width: 100px;background-color: #6F8294;color: #ffffff">取 消</el-button>
|
|
|
142
|
+ <el-button type="primary" size="medium" style="width: 100px" @click="submitEdit('ruleForm')">确 定</el-button>
|
|
|
143
|
+ </div>
|
|
|
144
|
+
|
|
|
145
|
+ </el-dialog>
|
|
|
146
|
+ </el-row>
|
|
|
147
|
+<!-- 添加/增加订阅者-->
|
116
|
<el-row>
|
148
|
<el-row>
|
117
|
<el-dialog :title="dialogMap[dialogStatus]" :visible.sync="dialogFormVisible" width="70%" style="margin-top: -20px" text-align="center">
|
149
|
<el-dialog :title="dialogMap[dialogStatus]" :visible.sync="dialogFormVisible" width="70%" style="margin-top: -20px" text-align="center">
|
118
|
<el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-width="145px"
|
150
|
<el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-width="145px"
|
|
@@ -137,9 +169,8 @@ |
|
@@ -137,9 +169,8 @@ |
137
|
<div slot="footer" class="dialog-footer" align="center">
|
169
|
<div slot="footer" class="dialog-footer" align="center">
|
138
|
<el-button @click="dialogFormVisible = false" size="medium"
|
170
|
<el-button @click="dialogFormVisible = false" size="medium"
|
139
|
style="width: 100px;background-color: #6F8294;color: #ffffff">取 消</el-button>
|
171
|
style="width: 100px;background-color: #6F8294;color: #ffffff">取 消</el-button>
|
140
|
- <el-button type="primary" size="medium" style="width: 100px" @click="ialogStatus==='create'?submitForm('ruleForm'):subEditForm()">确 定</el-button>
|
172
|
+ <el-button type="primary" size="medium" style="width: 100px" @click="dialogStatus==='create'?submitForm('ruleForm'):subRcvrForm()">确 定</el-button>
|
141
|
</div>
|
173
|
</div>
|
142
|
-
|
|
|
143
|
</el-dialog>
|
174
|
</el-dialog>
|
144
|
</el-row>
|
175
|
</el-row>
|
145
|
<el-row>
|
176
|
<el-row>
|
|
@@ -209,16 +240,27 @@ |
|
@@ -209,16 +240,27 @@ |
209
|
</el-container>
|
240
|
</el-container>
|
210
|
</template>
|
241
|
</template>
|
211
|
<script>
|
242
|
<script>
|
212
|
- import {queRouter, deleteRouter, addRouter,api_addReceiverFileter} from "../../api/message_bus";
|
243
|
+ import {
|
|
|
244
|
+ queRouter,
|
|
|
245
|
+ deleteRouter,
|
|
|
246
|
+ addRouter,
|
|
|
247
|
+ api_addReceiverFileter,
|
|
|
248
|
+ deleteMessage,
|
|
|
249
|
+ addRcvrs,
|
|
|
250
|
+ delRcvr,
|
|
|
251
|
+ ediRcvr,
|
|
|
252
|
+ updateMessage
|
|
|
253
|
+ } from "../../api/message_bus";
|
213
|
import Queue from "@/views/bus/Queue";
|
254
|
import Queue from "@/views/bus/Queue";
|
214
|
import RouterFilter from "@/views/bus/RouterReceiverFilter";
|
255
|
import RouterFilter from "@/views/bus/RouterReceiverFilter";
|
215
|
export default {
|
256
|
export default {
|
216
|
components: { Queue,RouterFilter },
|
257
|
components: { Queue,RouterFilter },
|
217
|
data(){
|
258
|
data(){
|
218
|
return{
|
259
|
return{
|
|
|
260
|
+ dialogFormVisibles:false,
|
219
|
dialogMap: {
|
261
|
dialogMap: {
|
220
|
- update: '编辑',
|
|
|
221
|
create: '新增',
|
262
|
create: '新增',
|
|
|
263
|
+ update: '增加订阅者',
|
222
|
},
|
264
|
},
|
223
|
dialogStatus: 'create',
|
265
|
dialogStatus: 'create',
|
224
|
/**
|
266
|
/**
|
|
@@ -353,11 +395,71 @@ |
|
@@ -353,11 +395,71 @@ |
353
|
|
395
|
|
354
|
});
|
396
|
});
|
355
|
},
|
397
|
},
|
356
|
- editRouter:function(index,row){
|
398
|
+ // 打开新增订阅者
|
|
|
399
|
+ addRcvr:function(index,row){
|
357
|
this.dialogStatus= 'update';
|
400
|
this.dialogStatus= 'update';
|
358
|
this.dialogFormVisible = true;
|
401
|
this.dialogFormVisible = true;
|
359
|
this.ruleForm = Object.assign({}, row);
|
402
|
this.ruleForm = Object.assign({}, row);
|
360
|
},
|
403
|
},
|
|
|
404
|
+ // 新增订阅者
|
|
|
405
|
+ subRcvrForm() {
|
|
|
406
|
+ this.$confirm('确认新增订阅者吗?', '提示', {
|
|
|
407
|
+ }).then(() => {
|
|
|
408
|
+ let para = Object.assign({}, this.ruleForm);
|
|
|
409
|
+ addRcvrs(para).then((res) => {
|
|
|
410
|
+ this.$message({
|
|
|
411
|
+ message: '提交成功',
|
|
|
412
|
+ type: 'success'
|
|
|
413
|
+ });
|
|
|
414
|
+ this.$refs['ruleForm'].resetFields();
|
|
|
415
|
+ this.dialogFormVisible = false;
|
|
|
416
|
+ this.queryRouterList();
|
|
|
417
|
+ }).catch(error => alert(error));
|
|
|
418
|
+ });
|
|
|
419
|
+ },
|
|
|
420
|
+ //删除
|
|
|
421
|
+ delReceiverFiletery: function (id) {
|
|
|
422
|
+ this.$confirm('确认删除该记录吗?', '提示', {
|
|
|
423
|
+ type: 'warning'
|
|
|
424
|
+ }).then(() => {
|
|
|
425
|
+ let para = { id: id };
|
|
|
426
|
+ //console.log(row);
|
|
|
427
|
+ delRcvr(para).then((res) => {
|
|
|
428
|
+ this.$message({
|
|
|
429
|
+ message: '删除成功',
|
|
|
430
|
+ type: 'success'
|
|
|
431
|
+ });
|
|
|
432
|
+ this.queryRouterList();
|
|
|
433
|
+ }).catch((error) => {
|
|
|
434
|
+ alert(error);
|
|
|
435
|
+ });
|
|
|
436
|
+ }).catch();
|
|
|
437
|
+ },
|
|
|
438
|
+ // 打开编辑
|
|
|
439
|
+ editRouter:function(index,row){
|
|
|
440
|
+ // this.dialogStatus= 'update';
|
|
|
441
|
+ this.dialogFormVisibles = true;
|
|
|
442
|
+ this.ruleForm = Object.assign({}, row);
|
|
|
443
|
+ },
|
|
|
444
|
+ //编辑
|
|
|
445
|
+ submitEdit: function () {
|
|
|
446
|
+ this.$refs.ruleForm.validate((valid) => {
|
|
|
447
|
+ if (valid) {
|
|
|
448
|
+ this.$confirm('确认提交吗?', '提示', {}).then(() => {
|
|
|
449
|
+ let para = Object.assign({}, this.ruleForm);
|
|
|
450
|
+ ediRcvr(para).then((res) => {
|
|
|
451
|
+ this.$message({
|
|
|
452
|
+ message: '提交成功',
|
|
|
453
|
+ type: 'success'
|
|
|
454
|
+ });
|
|
|
455
|
+ this.$refs['ruleForm'].resetFields();
|
|
|
456
|
+ this.dialogFormVisibles = false;
|
|
|
457
|
+ this.queryRouterList();
|
|
|
458
|
+ }).catch(error => alert(error));
|
|
|
459
|
+ });
|
|
|
460
|
+ }
|
|
|
461
|
+ });
|
|
|
462
|
+ },
|
361
|
delRouter(index,row){
|
463
|
delRouter(index,row){
|
362
|
// 弹框询问是否删除?
|
464
|
// 弹框询问是否删除?
|
363
|
this.$confirm('此操作永久删除该消息收发记录, 是否继续?', '警告', {
|
465
|
this.$confirm('此操作永久删除该消息收发记录, 是否继续?', '警告', {
|