| | |
| | | </div> |
| | | |
| | | <div class="btns"> |
| | | <div class="button add" @click="isShowAdd = true"> |
| | | <div class="button add" @click="addSubCount"> |
| | | <span class="iconfont"></span> |
| | | <span>添加子账号</span> |
| | | </div> |
| | |
| | | } |
| | | }); |
| | | }, |
| | | addSubCount(){ |
| | | this.isShowAdd = true |
| | | this.resetUser() |
| | | }, |
| | | editUser(row) { |
| | | this.isShowAdd = true; |
| | | this.isEditing = true; |
| | |
| | | menuIds: this.ruleForm.menuIds, |
| | | dataIds: this.ruleForm.dataIds, |
| | | }; |
| | | saveSubUser(json).then((res) => { |
| | | if (res.success) { |
| | | this.isShowAdd = false; |
| | | this.isEditing = false; |
| | | this.findUserList(); |
| | | } |
| | | }); |
| | | saveSubUser(json) |
| | | .then((res) => { |
| | | if (res.success) { |
| | | this.$notify.success(res.data) |
| | | this.isShowAdd = false; |
| | | this.isEditing = false; |
| | | this.findUserList(); |
| | | } else { |
| | | this.$notify.error(res.msg); |
| | | } |
| | | }) |
| | | .catch((err) => { |
| | | this.$notify.error(err.message); |
| | | }); |
| | | }, |
| | | findUserList() { |
| | | findUserList({ |
| | | inputText: this.inputText, |
| | | page: this.page, |
| | | size: this.size, |
| | | }).then((res) => { |
| | | if (res.success) { |
| | | this.dataList = res.data.dataList; |
| | | this.total = res.data.total |
| | | }else{ |
| | | this.$notify.error("加载子账户列表失败") |
| | | } |
| | | }).catch((e) => { |
| | | this.$notify.error(e.msg) |
| | | }); |
| | | }) |
| | | .then((res) => { |
| | | if (res.success) { |
| | | this.dataList = res.data.dataList; |
| | | this.total = res.data.total; |
| | | } else { |
| | | this.$notify.error("加载子账户列表失败"); |
| | | } |
| | | }) |
| | | .catch((e) => { |
| | | this.$notify.error(e.msg); |
| | | }); |
| | | }, |
| | | goback() { |
| | | this.isShowAdd = false; |