修复用户、角色、权限、添加或修改报错时再次添加后关联数据重复的问题
This commit is contained in:
@@ -87,6 +87,7 @@ export default {
|
||||
doSubmit() {
|
||||
this.$refs['form'].validate((valid) => {
|
||||
if (valid) {
|
||||
this.form.roles = []
|
||||
const _this = this
|
||||
this.roleIds.forEach(function(data, index) {
|
||||
const role = { id: data }
|
||||
|
||||
@@ -103,6 +103,7 @@ export default {
|
||||
doSubmit() {
|
||||
this.$refs['form'].validate((valid) => {
|
||||
if (valid) {
|
||||
this.form.roles = []
|
||||
const _this = this
|
||||
this.roleIds.forEach(function(data, index) {
|
||||
const role = { id: data }
|
||||
|
||||
Reference in New Issue
Block a user