From d6544c0c711c3a81d675b5891462e07a645ddb3b Mon Sep 17 00:00:00 2001 From: 648540858 <18010473990@163.com> Date: 星期六, 25 九月 2021 22:48:03 +0800 Subject: [PATCH] 添加媒体服务器节点管理ui-移除接口 --- web_src/src/components/MediaServerManger.vue | 22 +++++++++++++++++++++- 1 files changed, 21 insertions(+), 1 deletions(-) diff --git a/web_src/src/components/MediaServerManger.vue b/web_src/src/components/MediaServerManger.vue index 19674d1..969d739 100644 --- a/web_src/src/components/MediaServerManger.vue +++ b/web_src/src/components/MediaServerManger.vue @@ -18,9 +18,10 @@ <div class="card-img-zlm"></div> <div style="padding: 14px;text-align: left"> <span style="font-size: 16px">{{item.id}}</span> + <el-button icon="el-icon-edit" style="padding: 0;float: right;" type="text" @click="edit(item)">缂栬緫</el-button> + <el-button icon="el-icon-delete" style="margin-right: 10px;padding: 0;float: right;" type="text" @click="del(item)">绉婚櫎</el-button> <div style="margin-top: 13px; line-height: 12px; "> <span style="font-size: 14px; color: #999; margin-top: 5px">鍒涘缓鏃堕棿锛� {{item.createTime}}</span> - <el-button icon="el-icon-edit" style="padding: 0;float: right;" type="text" @click="edit(item)">缂栬緫</el-button> </div> </div> <i v-if="item.status" class="iconfont icon-online server-card-status-online" title="鍦ㄧ嚎"></i> @@ -88,6 +89,25 @@ edit: function (row){ this.$refs.mediaServerEdit.openDialog(row, this.initData) }, + del: function (row){ + this.$confirm('纭鍒犻櫎姝よ妭鐐癸紵', '鎻愮ず', { + confirmButtonText: '纭畾', + cancelButtonText: '鍙栨秷', + type: 'warning' + }).then(() => { + this.mediaServerObj.delete(row.id, (data)=>{ + if (data.code === 0) { + this.$message({ + type: 'success', + message: '鍒犻櫎鎴愬姛!' + }); + } + }) + + }).catch(() => { + }); + + }, getNumberByWidth(){ let candidateNums = [1, 2, 3, 4, 6, 8, 12, 24] let clientWidth = window.innerWidth - 30; -- Gitblit v1.8.0