作者 王勇

显示,从后台获取接收到的msg

@@ -541,7 +541,7 @@ @@ -541,7 +541,7 @@
541 if (res.code !== '200') { 541 if (res.code !== '200') {
542 // 关闭加载 542 // 关闭加载
543 this.exchange_loading.listLoading = false; 543 this.exchange_loading.listLoading = false;
544 - return this.$message.error('获取交换机列表,失败!'); 544 + return this.$message.error(res.msg);
545 } 545 }
546 // 获取列表数据 546 // 获取列表数据
547 this.exchange_page.exchangeList = res.data.list; 547 this.exchange_page.exchangeList = res.data.list;
@@ -549,7 +549,7 @@ @@ -549,7 +549,7 @@
549 this.exchange_page.total = res.data.total; 549 this.exchange_page.total = res.data.total;
550 // 关闭加载 550 // 关闭加载
551 this.exchange_loading.listLoading = false; 551 this.exchange_loading.listLoading = false;
552 - this.$message.success('获取交换机列表,成功!'); 552 + this.$message.success(res.msg);
553 }).catch(error => { 553 }).catch(error => {
554 // 关闭加载 554 // 关闭加载
555 this.exchange_loading.listLoading = false; 555 this.exchange_loading.listLoading = false;
@@ -583,22 +583,12 @@ @@ -583,22 +583,12 @@
583 let res = response.data; 583 let res = response.data;
584 // 添加失败 584 // 添加失败
585 if (res.code !== '200') { 585 if (res.code !== '200') {
586 - if (res.code === '400') {  
587 - // 关闭加载  
588 - this.exchange_loading.addLoading = false;  
589 - return this.$message.error('该交换机,已存在');  
590 - }  
591 - if (res.code === '999') {  
592 - // 关闭加载  
593 - this.exchange_loading.addLoading = false;  
594 - return this.$message.error('未知异常,添加交换机,失败');  
595 - }  
596 // 关闭加载 586 // 关闭加载
597 this.exchange_loading.addLoading = false; 587 this.exchange_loading.addLoading = false;
598 - return this.$message.error('添加交换机,失败'); 588 + return this.$message.error(res.msg);
599 } 589 }
600 // 添加,成功 590 // 添加,成功
601 - this.$message.success('添加交换机,成功'); 591 + this.$message.success(res.msg);
602 // 关闭加载 592 // 关闭加载
603 this.exchange_loading.addLoading = false; 593 this.exchange_loading.addLoading = false;
604 // 隐藏对话框 594 // 隐藏对话框
@@ -641,23 +631,13 @@ @@ -641,23 +631,13 @@
641 updateBusExchange(this.exchange_editForm).then((response) => { 631 updateBusExchange(this.exchange_editForm).then((response) => {
642 let res = response.data; 632 let res = response.data;
643 if (res.code !== '200') { 633 if (res.code !== '200') {
644 - if (res.code === '400') {  
645 - // 关闭加载  
646 - this.exchange_loading.editLoading = false;  
647 - return this.$message.error('该交换机,已存在');  
648 - }  
649 - if (res.code === '999') {  
650 - // 关闭加载  
651 - this.exchange_loading.editLoading = false;  
652 - return this.$message.error('未知异常,编辑交换机信息,失败');  
653 - }  
654 //关闭加载 634 //关闭加载
655 this.exchange_loading.editLoading = false; 635 this.exchange_loading.editLoading = false;
656 - return this.$message.error('编辑交换机信息,失败'); 636 + return this.$message.error(res.msg);
657 } 637 }
658 // 关闭加载 638 // 关闭加载
659 this.exchange_loading.editLoading = false; 639 this.exchange_loading.editLoading = false;
660 - this.$message.success('编辑交换机信息,成功!'); 640 + this.$message.success(res.msg);
661 // 隐藏对话框 641 // 隐藏对话框
662 this.exchange_dialog.editDialog = false; 642 this.exchange_dialog.editDialog = false;
663 // 刷新列表 643 // 刷新列表
@@ -686,11 +666,11 @@ @@ -686,11 +666,11 @@
686 if (res.code !== '200') { 666 if (res.code !== '200') {
687 // 关闭加载 667 // 关闭加载
688 this.exchange_loading.delLoading = false; 668 this.exchange_loading.delLoading = false;
689 - return this.$message.error('删除交换机信息,失败'); 669 + return this.$message.error(res.msg);
690 } 670 }
691 // 关闭加载 671 // 关闭加载
692 this.exchange_loading.delLoading = false; 672 this.exchange_loading.delLoading = false;
693 - this.$message.success('删除交换机信息,成功!'); 673 + this.$message.success(res.msg);
694 // 刷新列表 674 // 刷新列表
695 this.exchange_getList(); 675 this.exchange_getList();
696 }).catch(error => { 676 }).catch(error => {
@@ -725,9 +705,9 @@ @@ -725,9 +705,9 @@
725 if (res.code !== '200') { 705 if (res.code !== '200') {
726 // 关闭加载 706 // 关闭加载
727 this.exchange_loading.batchDelLoading = false; 707 this.exchange_loading.batchDelLoading = false;
728 - return this.$message.error('批量删除交换机信息,失败'); 708 + return this.$message.error(res.msg);
729 } 709 }
730 - this.$message.success('批量删除交换机信息,成功!'); 710 + this.$message.success(res.msg);
731 // 关闭加载 711 // 关闭加载
732 this.exchange_loading.batchDelLoading = false; 712 this.exchange_loading.batchDelLoading = false;
733 // 刷新列表 713 // 刷新列表
@@ -748,11 +728,10 @@ @@ -748,11 +728,10 @@
748 getHostList().then((response) => { 728 getHostList().then((response) => {
749 let res = response.data; 729 let res = response.data;
750 if (res.code !== '200') { 730 if (res.code !== '200') {
751 - return this.$message.error('获取虚拟主机列表,失败!'); 731 + return this.$message.error(res.msg);
752 } 732 }
753 // 获取列表数据 733 // 获取列表数据
754 this.exchange_config.virtualHostList = res.data; 734 this.exchange_config.virtualHostList = res.data;
755 - // this.$message.success('获取虚拟主机列表,成功!');  
756 }).catch(error => { 735 }).catch(error => {
757 this.$message.error(error.toString()); 736 this.$message.error(error.toString());
758 }); 737 });
@@ -766,11 +745,10 @@ @@ -766,11 +745,10 @@
766 getServerAndHostList().then((response) => { 745 getServerAndHostList().then((response) => {
767 let res = response.data; 746 let res = response.data;
768 if (res.code !== '200') { 747 if (res.code !== '200') {
769 - return this.$message.error('获取服务器与虚拟主机信息,失败!'); 748 + return this.$message.error(res.msg);
770 } 749 }
771 // 获取列表数据 750 // 获取列表数据
772 this.exchange_config.cascade.server_hostList = res.data; 751 this.exchange_config.cascade.server_hostList = res.data;
773 - // this.$message.success('获取虚拟主机列表,成功!');  
774 }).catch(error => { 752 }).catch(error => {
775 this.$message.error(error.toString()); 753 this.$message.error(error.toString());
776 }); 754 });
@@ -22,7 +22,7 @@ @@ -22,7 +22,7 @@
22 :options="queue_config.cascade.server_hostList" 22 :options="queue_config.cascade.server_hostList"
23 :show-all-levels="false" 23 :show-all-levels="false"
24 :change-on-select="false" 24 :change-on-select="false"
25 - clearable 25 + clearable filterable
26 @change="cascadeQueryChange" 26 @change="cascadeQueryChange"
27 :props="queue_config.cascade.defaultParams" 27 :props="queue_config.cascade.defaultParams"
28 placeholder="请选择所属虚拟主机"></el-cascader> 28 placeholder="请选择所属虚拟主机"></el-cascader>
@@ -127,19 +127,25 @@ @@ -127,19 +127,25 @@
127 </el-input> 127 </el-input>
128 </el-form-item> 128 </el-form-item>
129 129
130 - <el-form-item label="用户名称:" prop="userId">  
131 - <el-select v-model="queue_addForm.userId" clearable  
132 - style="width:240px" size="small" filterable  
133 - placeholder="请选择用户">  
134 - <el-option  
135 - v-for="item in (queue_config.userInfoList)"  
136 - :key="item.id"  
137 - :label="item.username"  
138 - :value="item.id">  
139 - </el-option>  
140 - </el-select> 130 + <el-form-item label="用户名称:" prop="username">
  131 + <el-input v-model="queue_addForm.username" style="width:240px" size="small" clearable
  132 + placeholder="请输入用户名称">
  133 + </el-input>
141 </el-form-item> 134 </el-form-item>
142 135
  136 + <!-- <el-form-item label="用户名称:" prop="userId">-->
  137 + <!-- <el-select v-model="queue_addForm.userId" clearable-->
  138 + <!-- style="width:240px" size="small" filterable-->
  139 + <!-- placeholder="请选择用户">-->
  140 + <!-- <el-option-->
  141 + <!-- v-for="item in (queue_config.userInfoList)"-->
  142 + <!-- :key="item.id"-->
  143 + <!-- :label="item.username"-->
  144 + <!-- :value="item.id">-->
  145 + <!-- </el-option>-->
  146 + <!-- </el-select>-->
  147 + <!-- </el-form-item>-->
  148 +
143 <el-form-item label="所属虚拟主机:" prop="virtualHostId"> 149 <el-form-item label="所属虚拟主机:" prop="virtualHostId">
144 <el-cascader 150 <el-cascader
145 clearable style="width: 240px" size="small" 151 clearable style="width: 240px" size="small"
@@ -212,19 +218,25 @@ @@ -212,19 +218,25 @@
212 </el-input> 218 </el-input>
213 </el-form-item> 219 </el-form-item>
214 220
215 - <el-form-item label="用户名称:" prop="userId">  
216 - <el-select v-model="queue_editForm.userId" clearable disabled  
217 - style="width:240px" size="small" filterable  
218 - placeholder="请选择用户">  
219 - <el-option  
220 - v-for="item in (queue_config.userInfoList)"  
221 - :key="item.id"  
222 - :label="item.username"  
223 - :value="item.id">  
224 - </el-option>  
225 - </el-select> 221 + <el-form-item label="用户名称:" prop="username">
  222 + <el-input v-model="queue_editForm.username" placeholder="请输入用户名称"
  223 + style="width:240px" size="small" clearable disabled>
  224 + </el-input>
226 </el-form-item> 225 </el-form-item>
227 226
  227 + <!-- <el-form-item label="用户名称:" prop="userId">-->
  228 + <!-- <el-select v-model="queue_editForm.userId" clearable disabled-->
  229 + <!-- style="width:240px" size="small" filterable-->
  230 + <!-- placeholder="请选择用户">-->
  231 + <!-- <el-option-->
  232 + <!-- v-for="item in (queue_config.userInfoList)"-->
  233 + <!-- :key="item.id"-->
  234 + <!-- :label="item.username"-->
  235 + <!-- :value="item.id">-->
  236 + <!-- </el-option>-->
  237 + <!-- </el-select>-->
  238 + <!-- </el-form-item>-->
  239 +
228 <el-form-item label="所属虚拟主机:" prop="virtualHostId"> 240 <el-form-item label="所属虚拟主机:" prop="virtualHostId">
229 <el-cascader 241 <el-cascader
230 disabled clearable style="width: 240px" size="small" 242 disabled clearable style="width: 240px" size="small"
@@ -353,7 +365,9 @@ @@ -353,7 +365,9 @@
353 queue_addForm: { 365 queue_addForm: {
354 // 队列名称 366 // 队列名称
355 queueName: '', 367 queueName: '',
356 - // 用户id 368 + // 用户名称
  369 + username: '',
  370 + // 用户id(该字段抛弃)
357 userId: '', 371 userId: '',
358 // 所属虚拟机id 372 // 所属虚拟机id
359 virtualHostId: '', 373 virtualHostId: '',
@@ -402,6 +416,10 @@ @@ -402,6 +416,10 @@
402 queueName: [ 416 queueName: [
403 {required: true, message: '请输入队列名称', trigger: ['blur', 'change']}, 417 {required: true, message: '请输入队列名称', trigger: ['blur', 'change']},
404 ], 418 ],
  419 + // 用户名称
  420 + username: [
  421 + {required: true, message: '请输入用户名称', trigger: ['blur', 'change']},
  422 + ],
405 // 所属虚拟机id 423 // 所属虚拟机id
406 virtualHostId: [ 424 virtualHostId: [
407 {required: true, message: '请选择所属虚拟机', trigger: ['blur', 'change']}, 425 {required: true, message: '请选择所属虚拟机', trigger: ['blur', 'change']},
@@ -431,6 +449,10 @@ @@ -431,6 +449,10 @@
431 queueName: [ 449 queueName: [
432 {required: true, message: '请输入队列名称', trigger: ['blur', 'change']}, 450 {required: true, message: '请输入队列名称', trigger: ['blur', 'change']},
433 ], 451 ],
  452 + // 用户名称
  453 + username: [
  454 + {required: true, message: '请输入用户名称', trigger: ['blur', 'change']},
  455 + ],
434 // 所属虚拟机id 456 // 所属虚拟机id
435 virtualHostId: [ 457 virtualHostId: [
436 {required: true, message: '请选择所属虚拟机', trigger: ['blur', 'change']}, 458 {required: true, message: '请选择所属虚拟机', trigger: ['blur', 'change']},
@@ -495,7 +517,7 @@ @@ -495,7 +517,7 @@
495 if (res.code !== '200') { 517 if (res.code !== '200') {
496 // 关闭加载 518 // 关闭加载
497 this.queue_loading.listLoading = false; 519 this.queue_loading.listLoading = false;
498 - return this.$message.error('获取队列-列表,失败!'); 520 + return this.$message.error(res.msg);
499 } 521 }
500 // 获取列表数据 522 // 获取列表数据
501 this.queue_page.queueList = res.data.list; 523 this.queue_page.queueList = res.data.list;
@@ -503,7 +525,7 @@ @@ -503,7 +525,7 @@
503 this.queue_page.total = res.data.total; 525 this.queue_page.total = res.data.total;
504 // 关闭加载 526 // 关闭加载
505 this.queue_loading.listLoading = false; 527 this.queue_loading.listLoading = false;
506 - this.$message.success('获取队列-列表,成功!'); 528 + this.$message.success(res.msg);
507 }).catch(error => { 529 }).catch(error => {
508 // 关闭加载 530 // 关闭加载
509 this.queue_loading.listLoading = false; 531 this.queue_loading.listLoading = false;
@@ -537,22 +559,12 @@ @@ -537,22 +559,12 @@
537 let res = response.data; 559 let res = response.data;
538 // 添加失败 560 // 添加失败
539 if (res.code !== '200') { 561 if (res.code !== '200') {
540 - if (res.code === '400') {  
541 - // 关闭加载  
542 - this.queue_loading.addLoading = false;  
543 - return this.$message.error('该队列信息,已存在');  
544 - }  
545 - if (res.code === '999') {  
546 - // 关闭加载  
547 - this.queue_loading.addLoading = false;  
548 - return this.$message.error('未知异常,添加队列,失败');  
549 - }  
550 // 关闭加载 562 // 关闭加载
551 this.queue_loading.addLoading = false; 563 this.queue_loading.addLoading = false;
552 - return this.$message.error('添加队列,失败'); 564 + return this.$message.error(res.msg);
553 } 565 }
554 // 添加,成功 566 // 添加,成功
555 - this.$message.success('添加队列,成功'); 567 + this.$message.success(res.msg);
556 // 关闭加载 568 // 关闭加载
557 this.queue_loading.addLoading = false; 569 this.queue_loading.addLoading = false;
558 // 隐藏对话框 570 // 隐藏对话框
@@ -593,23 +605,13 @@ @@ -593,23 +605,13 @@
593 updateBusQueue(this.queue_editForm).then((response) => { 605 updateBusQueue(this.queue_editForm).then((response) => {
594 let res = response.data; 606 let res = response.data;
595 if (res.code !== '200') { 607 if (res.code !== '200') {
596 - if (res.code === '400') {  
597 - // 关闭加载  
598 - this.queue_loading.editLoading = false;  
599 - return this.$message.error('该队列信息,已存在');  
600 - }  
601 - if (res.code === '999') {  
602 - // 关闭加载  
603 - this.queue_loading.editLoading = false;  
604 - return this.$message.error('未知异常,编辑队列信息,失败');  
605 - }  
606 //关闭加载 608 //关闭加载
607 this.queue_loading.editLoading = false; 609 this.queue_loading.editLoading = false;
608 - return this.$message.error('编辑队列信息,失败'); 610 + return this.$message.error(res.msg);
609 } 611 }
610 // 关闭加载 612 // 关闭加载
611 this.queue_loading.editLoading = false; 613 this.queue_loading.editLoading = false;
612 - this.$message.success('编辑队列信息,成功!'); 614 + this.$message.success(res.msg);
613 // 隐藏对话框 615 // 隐藏对话框
614 this.queue_dialog.editDialog = false; 616 this.queue_dialog.editDialog = false;
615 // 刷新列表 617 // 刷新列表
@@ -639,11 +641,11 @@ @@ -639,11 +641,11 @@
639 if (res.code !== '200') { 641 if (res.code !== '200') {
640 // 关闭加载 642 // 关闭加载
641 this.queue_loading.delLoading = false; 643 this.queue_loading.delLoading = false;
642 - return this.$message.error('删除队列信息,失败'); 644 + return this.$message.error(res.msg);
643 } 645 }
644 // 关闭加载 646 // 关闭加载
645 this.queue_loading.delLoading = false; 647 this.queue_loading.delLoading = false;
646 - this.$message.success('删除队列信息,成功!'); 648 + this.$message.success(res.msg);
647 // 刷新列表 649 // 刷新列表
648 this.queue_getList(); 650 this.queue_getList();
649 }).catch(error => { 651 }).catch(error => {
@@ -679,9 +681,9 @@ @@ -679,9 +681,9 @@
679 if (res.code !== '200') { 681 if (res.code !== '200') {
680 // 关闭加载 682 // 关闭加载
681 this.queue_loading.batchDelLoading = false; 683 this.queue_loading.batchDelLoading = false;
682 - return this.$message.error('批量删除队列信息,失败'); 684 + return this.$message.error(res.msg);
683 } 685 }
684 - this.$message.success('批量删除队列信息,成功!'); 686 + this.$message.success(res.msg);
685 // 关闭加载 687 // 关闭加载
686 this.queue_loading.batchDelLoading = false; 688 this.queue_loading.batchDelLoading = false;
687 // 刷新列表 689 // 刷新列表
@@ -702,7 +704,7 @@ @@ -702,7 +704,7 @@
702 getServerAndHostList().then((response) => { 704 getServerAndHostList().then((response) => {
703 let res = response.data; 705 let res = response.data;
704 if (res.code !== '200') { 706 if (res.code !== '200') {
705 - return this.$message.error('获取服务器与虚拟主机信息,失败!'); 707 + return this.$message.error(res.msg);
706 } 708 }
707 // 获取列表数据 709 // 获取列表数据
708 this.queue_config.cascade.server_hostList = res.data; 710 this.queue_config.cascade.server_hostList = res.data;
@@ -742,7 +744,7 @@ @@ -742,7 +744,7 @@
742 getUserInfoList().then((response) => { 744 getUserInfoList().then((response) => {
743 let res = response.data; 745 let res = response.data;
744 if (res.code !== '200') { 746 if (res.code !== '200') {
745 - return this.$message.error('获取路由键列表,失败!'); 747 + return this.$message.error(res.msg);
746 } 748 }
747 // 获取列表数据 749 // 获取列表数据
748 this.queue_config.userInfoList = res.data; 750 this.queue_config.userInfoList = res.data;
@@ -391,7 +391,7 @@ @@ -391,7 +391,7 @@
391 if (res.code !== '200') { 391 if (res.code !== '200') {
392 // 关闭加载 392 // 关闭加载
393 this.server_loading.listLoading = false; 393 this.server_loading.listLoading = false;
394 - return this.$message.error('获取服务器列表,失败!'); 394 + return this.$message.error(res.msg);
395 } 395 }
396 // 获取服务器列表数据 396 // 获取服务器列表数据
397 this.serverList = res.data.list; 397 this.serverList = res.data.list;
@@ -399,7 +399,7 @@ @@ -399,7 +399,7 @@
399 this.total = res.data.total; 399 this.total = res.data.total;
400 // 关闭加载 400 // 关闭加载
401 this.server_loading.listLoading = false; 401 this.server_loading.listLoading = false;
402 - this.$message.success('获取服务器列表,成功!'); 402 + this.$message.success(res.msg);
403 403
404 if (this.queryInfo.serverId !== undefined && this.queryInfo.serverId !== '') { 404 if (this.queryInfo.serverId !== undefined && this.queryInfo.serverId !== '') {
405 // 重置所属服务器id 405 // 重置所属服务器id
@@ -439,27 +439,12 @@ @@ -439,27 +439,12 @@
439 let res = response.data; 439 let res = response.data;
440 // 添加失败 440 // 添加失败
441 if (res.code !== '200') { 441 if (res.code !== '200') {
442 - if (res.code === '402') {  
443 - // 关闭加载  
444 - this.server_loading.addLoading = false;  
445 - return this.$message.error('服务器名称,已存在');  
446 - }  
447 - if (res.code === '400') {  
448 - // 关闭加载  
449 - this.server_loading.addLoading = false;  
450 - return this.$message.error('该服务器信息,已存在');  
451 - }  
452 - if (res.code === '999') {  
453 - // 关闭加载  
454 - this.server_loading.addLoading = false;  
455 - return this.$message.error('未知异常,添加服务器信息,失败');  
456 - }  
457 // 关闭加载 442 // 关闭加载
458 this.server_loading.addLoading = false; 443 this.server_loading.addLoading = false;
459 - return this.$message.error('添加服务器信息,失败'); 444 + return this.$message.error(res.msg);
460 } 445 }
461 // 添加,成功 446 // 添加,成功
462 - this.$message.success('添加服务器信息,成功'); 447 + this.$message.success(res.msg);
463 // 关闭加载 448 // 关闭加载
464 this.server_loading.addLoading = false; 449 this.server_loading.addLoading = false;
465 // 隐藏对话框 450 // 隐藏对话框
@@ -502,29 +487,13 @@ @@ -502,29 +487,13 @@
502 updateBusServer(this.editServerForm).then((response) => { 487 updateBusServer(this.editServerForm).then((response) => {
503 let res = response.data; 488 let res = response.data;
504 if (res.code !== '200') { 489 if (res.code !== '200') {
505 -  
506 - if (res.code === '402') {  
507 - // 关闭加载  
508 - this.server_loading.editLoading = false;  
509 - return this.$message.error('服务器名称,已存在');  
510 - }  
511 - if (res.code === '400') {  
512 - // 关闭加载  
513 - this.server_loading.editLoading = false;  
514 - return this.$message.error('该服务器信息,已存在');  
515 - }  
516 - if (res.code === '999') {  
517 - // 关闭加载  
518 - this.server_loading.editLoading = false;  
519 - return this.$message.error('未知异常,编辑服务器信息,失败');  
520 - }  
521 //关闭加载 490 //关闭加载
522 this.server_loading.editLoading = false; 491 this.server_loading.editLoading = false;
523 - return this.$message.error('编辑服务器信息,失败'); 492 + return this.$message.error(res.msg);
524 } 493 }
525 // 关闭加载 494 // 关闭加载
526 this.server_loading.editLoading = false; 495 this.server_loading.editLoading = false;
527 - this.$message.success('编辑服务器信息,成功!'); 496 + this.$message.success(res.msg);
528 // 隐藏对话框 497 // 隐藏对话框
529 this.serverDialog.editDialog = false; 498 this.serverDialog.editDialog = false;
530 // 刷新列表 499 // 刷新列表
@@ -554,11 +523,11 @@ @@ -554,11 +523,11 @@
554 if (res.code !== '200') { 523 if (res.code !== '200') {
555 //关闭加载 524 //关闭加载
556 this.server_loading.delLoading = false; 525 this.server_loading.delLoading = false;
557 - return this.$message.error('删除服务器信息,失败'); 526 + return this.$message.error(res.msg);
558 } 527 }
559 //关闭加载 528 //关闭加载
560 this.server_loading.delLoading = false; 529 this.server_loading.delLoading = false;
561 - this.$message.success('删除服务器信息,成功!'); 530 + this.$message.success(res.msg);
562 //刷新列表 531 //刷新列表
563 this.getServerList(); 532 this.getServerList();
564 }).catch(error => { 533 }).catch(error => {
@@ -594,9 +563,9 @@ @@ -594,9 +563,9 @@
594 let res = response.data; 563 let res = response.data;
595 if (res.code !== '200') { 564 if (res.code !== '200') {
596 this.server_loading.batchDelLoading = false; 565 this.server_loading.batchDelLoading = false;
597 - return this.$message.error('批量删除服务器信息,失败'); 566 + return this.$message.error(res.msg);
598 } 567 }
599 - this.$message.success('批量删除服务器信息,成功!'); 568 + this.$message.success(res.msg);
600 this.server_loading.batchDelLoading = false; 569 this.server_loading.batchDelLoading = false;
601 // 刷新列表 570 // 刷新列表
602 this.getServerList(); 571 this.getServerList();
@@ -583,7 +583,7 @@ @@ -583,7 +583,7 @@
583 if (res.code !== '200') { 583 if (res.code !== '200') {
584 // 关闭加载 584 // 关闭加载
585 this.umb_loading.listLoading = false; 585 this.umb_loading.listLoading = false;
586 - return this.$message.error('获取-配置-列表,失败!'); 586 + return this.$message.error(res.msg);
587 } 587 }
588 // 获取列表数据 588 // 获取列表数据
589 this.umb_page.umbList = res.data.list; 589 this.umb_page.umbList = res.data.list;
@@ -591,7 +591,7 @@ @@ -591,7 +591,7 @@
591 this.umb_page.total = res.data.total; 591 this.umb_page.total = res.data.total;
592 // 关闭加载 592 // 关闭加载
593 this.umb_loading.listLoading = false; 593 this.umb_loading.listLoading = false;
594 - this.$message.success('获取-配置-列表,成功!'); 594 + this.$message.success(res.msg);
595 }).catch(error => { 595 }).catch(error => {
596 // 关闭加载 596 // 关闭加载
597 this.umb_loading.listLoading = false; 597 this.umb_loading.listLoading = false;
@@ -629,17 +629,12 @@ @@ -629,17 +629,12 @@
629 let res = response.data; 629 let res = response.data;
630 // 添加失败 630 // 添加失败
631 if (res.code !== '200') { 631 if (res.code !== '200') {
632 - if (res.code === '999') {  
633 - // 关闭加载  
634 - this.umb_loading.addLoading = false;  
635 - return this.$message.error('未知异常,添加配置信息,失败');  
636 - }  
637 // 关闭加载 632 // 关闭加载
638 this.umb_loading.addLoading = false; 633 this.umb_loading.addLoading = false;
639 - return this.$message.error('添加配置信息,失败'); 634 + return this.$message.error(res.msg);
640 } 635 }
641 // 添加,成功 636 // 添加,成功
642 - this.$message.success('添加配置信息,成功'); 637 + this.$message.success(res.msg);
643 // 关闭加载 638 // 关闭加载
644 this.umb_loading.addLoading = false; 639 this.umb_loading.addLoading = false;
645 // 隐藏对话框 640 // 隐藏对话框
@@ -346,7 +346,7 @@ @@ -346,7 +346,7 @@
346 if (res.code !== '200') { 346 if (res.code !== '200') {
347 // 关闭加载 347 // 关闭加载
348 this.virtualHost_loading.listLoading = false; 348 this.virtualHost_loading.listLoading = false;
349 - return this.$message.error('获取虚拟主机列表,失败!'); 349 + return this.$message.error(res.msg);
350 } 350 }
351 351
352 console.log(res.data.list); 352 console.log(res.data.list);
@@ -356,7 +356,7 @@ @@ -356,7 +356,7 @@
356 this.total = res.data.total; 356 this.total = res.data.total;
357 // 关闭加载 357 // 关闭加载
358 this.virtualHost_loading.listLoading = false; 358 this.virtualHost_loading.listLoading = false;
359 - this.$message.success('获取虚拟主机列表,成功!'); 359 + this.$message.success(res.msg);
360 }).catch(error => { 360 }).catch(error => {
361 // 关闭加载 361 // 关闭加载
362 this.virtualHost_loading.listLoading = false; 362 this.virtualHost_loading.listLoading = false;
@@ -390,22 +390,12 @@ @@ -390,22 +390,12 @@
390 let res = response.data; 390 let res = response.data;
391 // 添加失败 391 // 添加失败
392 if (res.code !== '200') { 392 if (res.code !== '200') {
393 - if (res.code === '400') {  
394 - // 关闭加载  
395 - this.virtualHost_loading.addLoading = false;  
396 - return this.$message.error('该虚拟主机,已存在');  
397 - }  
398 - if (res.code === '999') {  
399 - // 关闭加载  
400 - this.virtualHost_loading.addLoading = false;  
401 - return this.$message.error('未知异常,添加虚拟主机,失败');  
402 - }  
403 // 关闭加载 393 // 关闭加载
404 this.virtualHost_loading.addLoading = false; 394 this.virtualHost_loading.addLoading = false;
405 - return this.$message.error('添加虚拟主机,失败'); 395 + return this.$message.error(res.msg);
406 } 396 }
407 // 添加,成功 397 // 添加,成功
408 - this.$message.success('添加虚拟主机,成功'); 398 + this.$message.success(res.msg);
409 // 关闭加载 399 // 关闭加载
410 this.virtualHost_loading.addLoading = false; 400 this.virtualHost_loading.addLoading = false;
411 // 隐藏对话框 401 // 隐藏对话框
@@ -447,23 +437,13 @@ @@ -447,23 +437,13 @@
447 updateVirtualHost(this.editVirtualHostForm).then((response) => { 437 updateVirtualHost(this.editVirtualHostForm).then((response) => {
448 let res = response.data; 438 let res = response.data;
449 if (res.code !== '200') { 439 if (res.code !== '200') {
450 - if (res.code === '400') {  
451 - // 关闭加载  
452 - this.virtualHost_loading.editLoading = false;  
453 - return this.$message.error('该虚拟主机,已存在');  
454 - }  
455 - if (res.code === '999') {  
456 - // 关闭加载  
457 - this.virtualHost_loading.editLoading = false;  
458 - return this.$message.error('未知异常,编辑虚拟主机信息,失败');  
459 - }  
460 //关闭加载 440 //关闭加载
461 this.virtualHost_loading.editLoading = false; 441 this.virtualHost_loading.editLoading = false;
462 - return this.$message.error('编辑虚拟主机信息,失败'); 442 + return this.$message.error(res.msg);
463 } 443 }
464 // 关闭加载 444 // 关闭加载
465 this.virtualHost_loading.editLoading = false; 445 this.virtualHost_loading.editLoading = false;
466 - this.$message.success('编辑虚拟主机信息,成功!'); 446 + this.$message.success(res.msg);
467 // 隐藏对话框 447 // 隐藏对话框
468 this.virtualHostDialog.editDialog = false; 448 this.virtualHostDialog.editDialog = false;
469 // 刷新列表 449 // 刷新列表
@@ -494,11 +474,11 @@ @@ -494,11 +474,11 @@
494 if (res.code !== '200') { 474 if (res.code !== '200') {
495 //关闭加载 475 //关闭加载
496 this.virtualHost_loading.delLoading = false; 476 this.virtualHost_loading.delLoading = false;
497 - return this.$message.error('删除虚拟主机信息,失败'); 477 + return this.$message.error(res.msg);
498 } 478 }
499 //关闭加载 479 //关闭加载
500 this.virtualHost_loading.delLoading = false; 480 this.virtualHost_loading.delLoading = false;
501 - this.$message.success('删除虚拟主机信息,成功!'); 481 + this.$message.success(res.msg);
502 //刷新列表 482 //刷新列表
503 this.getVirtualHostList(); 483 this.getVirtualHostList();
504 }).catch(error => { 484 }).catch(error => {
@@ -533,9 +513,9 @@ @@ -533,9 +513,9 @@
533 if (res.code !== '200') { 513 if (res.code !== '200') {
534 // 关闭加载 514 // 关闭加载
535 this.virtualHost_loading.batchDelLoading = false; 515 this.virtualHost_loading.batchDelLoading = false;
536 - return this.$message.error('批量删除服务器信息,失败'); 516 + return this.$message.error(res.msg);
537 } 517 }
538 - this.$message.success('批量删除服务器信息,成功!'); 518 + this.$message.success(res.msg);
539 // 关闭加载 519 // 关闭加载
540 this.virtualHost_loading.batchDelLoading = false; 520 this.virtualHost_loading.batchDelLoading = false;
541 // 刷新列表 521 // 刷新列表
@@ -556,11 +536,9 @@ @@ -556,11 +536,9 @@
556 getServerList().then((response) => { 536 getServerList().then((response) => {
557 let res = response.data; 537 let res = response.data;
558 if (res.code !== '200') { 538 if (res.code !== '200') {
559 - return this.$message.error('获取服务器列表,失败!'); 539 + return this.$message.error(res.msg);
560 } 540 }
561 - // 获取服务器列表数据  
562 this.virtualHost_config.serverList = res.data; 541 this.virtualHost_config.serverList = res.data;
563 - // this.$message.success('获取服务器列表,成功!');  
564 }).catch(error => { 542 }).catch(error => {
565 this.$message.error(error.toString()); 543 this.$message.error(error.toString());
566 }); 544 });