Browse Source

【后台管理】群成员管理

master
wanggongfeng 6 years ago
parent
commit
3aba6fa9dd
  1. 21
      src/views/modules/master/masteruserrelation-add.vue

21
src/views/modules/master/masteruserrelation-add.vue

@ -30,7 +30,8 @@
type="text" type="text"
clearable clearable
style="width: 30rem;" @blur="nameInputBlur(index,$event)"> style="width: 30rem;" @blur="nameInputBlur(index,$event)">
</el-input> </el-input>&emsp;
<el-button @click="deleteUserMethod(index)">{{"删除"}}</el-button>&emsp;&emsp;
</el-form-item> </el-form-item>
</el-row> </el-row>
</div> </div>
@ -82,6 +83,14 @@ export default {
this.$refs.masterUser.init() this.$refs.masterUser.init()
}) })
}, },
//
deleteUserMethod (index) {
if (this.formData.length === 1) {
this.formData = [{ deptName: '', username: '', nickName: '' }]
return false
}
this.formData.splice(index, 1)
},
// dialog // dialog
connectResponse (connectResponse) { connectResponse (connectResponse) {
for (var i = 0; i < connectResponse.length; i++) { for (var i = 0; i < connectResponse.length; i++) {
@ -144,10 +153,12 @@ export default {
onClose: () => { onClose: () => {
this.isAble = false this.isAble = false
this.$emit('refreshDataList') this.$emit('refreshDataList')
this.$message({ if (res.data !== '') {
message: res.data + '已存在!', this.$message({
type: 'warning' message: res.data + '已存在!',
}) type: 'warning'
})
}
// //
this.backToUserRelationList() this.backToUserRelationList()
} }

Loading…
Cancel
Save