feat: 新功能、bug修复

新功能:
1.顶部菜单的Create按钮:Project、Module;
2.Project页:除Endpoint新增、Metrics列表外的功能;
BUG修复:
1.Config、Project、Alert各个后台交互操作都加上了成功、失败提示;
2.Config-Account:列表、弹框增加了删除功能
3.Config-PromServer:弹框中DC下拉框删除功能可以用了
4.Project:Endpoint列表--编辑--Host子弹框,优化了一下asset列表交互
This commit is contained in:
chenjinsong
2019-12-19 17:22:18 +08:00
parent 53639fb3e2
commit c5fda756c6
11 changed files with 723 additions and 207 deletions

View File

@@ -92,7 +92,7 @@
<span v-if="rightBox.isEdit">{{$t('overall.save')}}</span>
<span v-else>{{$t('overall.edit')}}</span>
</div>
<div @click="del" class="right-box-top-btn" v-if="rightBox.isEdit && promServer.id != ''">
<div @click="del(promServer)" class="right-box-top-btn" v-if="rightBox.isEdit && promServer.id != ''">
<div class="right-box-btn-icon">
<i class="el-icon-delete"></i>
</div>
@@ -282,9 +282,7 @@ export default {
disabled: false
}],
},
searchLabel: { //搜索参数
},
searchLabel: {}, //搜索参数
}
},
methods: {
@@ -302,8 +300,9 @@ export default {
}).then(() => {
this.$delete("promServer?ids=" + u.id).then(response => {
if (response.code === 200) {
this.$message({type: 'success', message: this.$t("tip.deleteSuccess")});
this.$message({duration: 1000, type: 'success', message: this.$t("tip.deleteSuccess")});
this.getTableData();
this.rightBox.show = false;
} else {
this.$message.error(response.msg);
}
@@ -326,17 +325,23 @@ export default {
if (this.promServer.id) {
this.$put('promServer', this.promServer).then(response => {
if (response.code === 200) {
this.$message({duration: 1000, type: 'success', message: this.$t("tip.saveSuccess")});
this.getTableData();
this.rightBox.isEdit = false;
this.esc();
} else {
this.$message.error(response.msg);
}
});
} else {
this.$post('promServer', this.promServer).then(response => {
if (response.code === 200) {
this.$message({duration: 1000, type: 'success', message: this.$t("tip.saveSuccess")});
this.getTableData();
this.rightBox.isEdit = false;
this.esc();
} else {
this.$message.error(response.msg);
}
});
}
@@ -384,7 +389,21 @@ export default {
},
toDelIdc: function(item) {
this.blurEditIdc();
//TODO 请求后台,删除
this.$confirm(this.$t("tip.confirmDelete"), {
confirmButtonText: this.$t("tip.yes"),
cancelButtonText: this.$t("tip.no"),
type: 'warning'
}).then(() => {
this.$delete("idc?ids=" + item.id).then(response => {
if (response.code === 200) {
this.$message({duration: 1000, type: 'success', message: this.$t("tip.deleteSuccess")});
this.getTableData();
this.getIdcData();
} else {
this.$message.error(response.msg);
}
});
});
},
getIdcData: function() {
this.$get('idc', this.pageObj).then(response => {