From 11e3672578d831e87f55c7c9c8398e007f41b64f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E8=A3=95=E8=B4=A2?= Date: Tue, 31 Jan 2023 17:48:46 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/xm/core/xmFunc/XmFuncSelect.vue | 33 ++++++++++++++++------- 1 file changed, 24 insertions(+), 9 deletions(-) diff --git a/src/views/xm/core/xmFunc/XmFuncSelect.vue b/src/views/xm/core/xmFunc/XmFuncSelect.vue index f58c70f9..337f7abb 100644 --- a/src/views/xm/core/xmFunc/XmFuncSelect.vue +++ b/src/views/xm/core/xmFunc/XmFuncSelect.vue @@ -3,7 +3,17 @@ - + + 添加顶级模块 + 编辑 + 删除 + + + @@ -14,15 +24,12 @@ @@ -36,7 +43,7 @@ - + @@ -180,6 +187,10 @@ export default { //显示编辑界面 XmFunc 功能模块表 showEdit: function ( row,index ) { + if(!row||!row.id){ + this.$notify({ position:'bottom-left',showClose:true, message:"请选择一条数据再点击修改按钮", type: 'error' }); + return; + } this.editFormVisible = true; this.editForm = Object.assign({}, row); }, @@ -223,6 +234,10 @@ export default { }, //删除xmFunc handleDel: function (row,index) { + if(!row||!row.id){ + this.$notify({ position:'bottom-left',showClose:true, message:"请选择一条数据再点击删除按钮", type: 'error' }); + return; + } this.$confirm('确认删除该记录吗?', '提示', { type: 'warning' }).then(() => {