From 3aba6fa9dd2c72db8ba48687adfca5bddbf4989d Mon Sep 17 00:00:00 2001 From: wanggongfeng <1305282856@qq.com> Date: Wed, 18 Mar 2020 17:22:53 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E5=90=8E=E5=8F=B0=E7=AE=A1=E7=90=86?= =?UTF-8?q?=E3=80=91=E7=BE=A4=E6=88=90=E5=91=98=E7=AE=A1=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../modules/master/masteruserrelation-add.vue | 21 ++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/src/views/modules/master/masteruserrelation-add.vue b/src/views/modules/master/masteruserrelation-add.vue index cc0f9682..632f3eb0 100644 --- a/src/views/modules/master/masteruserrelation-add.vue +++ b/src/views/modules/master/masteruserrelation-add.vue @@ -30,7 +30,8 @@ type="text" clearable style="width: 30rem;" @blur="nameInputBlur(index,$event)"> - +   + {{"删除"}}   @@ -82,6 +83,14 @@ export default { this.$refs.masterUser.init() }) }, + // 删除单个人员 + deleteUserMethod (index) { + if (this.formData.length === 1) { + this.formData = [{ deptName: '', username: '', nickName: '' }] + return false + } + this.formData.splice(index, 1) + }, // dialog回调函数 connectResponse (connectResponse) { for (var i = 0; i < connectResponse.length; i++) { @@ -144,10 +153,12 @@ export default { onClose: () => { this.isAble = false this.$emit('refreshDataList') - this.$message({ - message: res.data + '已存在!', - type: 'warning' - }) + if (res.data !== '') { + this.$message({ + message: res.data + '已存在!', + type: 'warning' + }) + } // 返回主列表 this.backToUserRelationList() }