|
@@ -118,7 +118,7 @@
|
|
<a-button type="primary" @click="handleSubmit()" :style="{ marginRight: '8px' }">
|
|
<a-button type="primary" @click="handleSubmit()" :style="{ marginRight: '8px' }">
|
|
保存
|
|
保存
|
|
</a-button>
|
|
</a-button>
|
|
- <a-button :style="{ marginLeft: '8px' }" @click="handleCancel()">
|
|
|
|
|
|
+ <a-button :style="{ marginLeft: '8px' }" @click="cancel">
|
|
取消
|
|
取消
|
|
</a-button>
|
|
</a-button>
|
|
</a-form-item>
|
|
</a-form-item>
|
|
@@ -167,11 +167,10 @@ export default {
|
|
}
|
|
}
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
- cancel (e) {
|
|
|
|
|
|
+ cancel () {
|
|
this.clear()
|
|
this.clear()
|
|
this.$emit('close')
|
|
this.$emit('close')
|
|
},
|
|
},
|
|
-
|
|
|
|
// 保存提交
|
|
// 保存提交
|
|
handleSubmit () {
|
|
handleSubmit () {
|
|
const _this = this
|
|
const _this = this
|
|
@@ -179,7 +178,6 @@ export default {
|
|
console.log(values, 'values222')
|
|
console.log(values, 'values222')
|
|
if (!err) {
|
|
if (!err) {
|
|
values.formData.roleNames = values.formData.roleNames.join(',')
|
|
values.formData.roleNames = values.formData.roleNames.join(',')
|
|
-
|
|
|
|
console.log(values.formData, ' formData.type222222222')
|
|
console.log(values.formData, ' formData.type222222222')
|
|
console.log(Object.assign({ id: this.data.id ? this.data.id : '' }, values.formData))
|
|
console.log(Object.assign({ id: this.data.id ? this.data.id : '' }, values.formData))
|
|
saveUserPower(Object.assign({ id: this.data.id ? this.data.id : '' }, values.formData)).then(res => {
|
|
saveUserPower(Object.assign({ id: this.data.id ? this.data.id : '' }, values.formData)).then(res => {
|
|
@@ -195,19 +193,6 @@ export default {
|
|
}
|
|
}
|
|
})
|
|
})
|
|
},
|
|
},
|
|
- // 取消
|
|
|
|
- handleCancel () {
|
|
|
|
- const _this = this
|
|
|
|
- this.$confirm({
|
|
|
|
- title: '提示',
|
|
|
|
- content: '确定取消吗?',
|
|
|
|
- centered: true,
|
|
|
|
- onOk () {
|
|
|
|
- _this.clear()
|
|
|
|
- _this.cancel()
|
|
|
|
- }
|
|
|
|
- })
|
|
|
|
- },
|
|
|
|
clear () {
|
|
clear () {
|
|
this.form.resetFields()
|
|
this.form.resetFields()
|
|
delete this.formData.id
|
|
delete this.formData.id
|
|
@@ -218,11 +203,9 @@ export default {
|
|
this.formData.sex = ''
|
|
this.formData.sex = ''
|
|
this.formData.remarks = ''
|
|
this.formData.remarks = ''
|
|
},
|
|
},
|
|
-
|
|
|
|
// 获取角色列表接口
|
|
// 获取角色列表接口
|
|
getRoleList () {
|
|
getRoleList () {
|
|
getRoleList().then(res => {
|
|
getRoleList().then(res => {
|
|
- console.log(res, 'res--role')
|
|
|
|
if (res.status + '' === '200') {
|
|
if (res.status + '' === '200') {
|
|
this.roleList = res.data
|
|
this.roleList = res.data
|
|
} else {
|
|
} else {
|
|
@@ -230,7 +213,6 @@ export default {
|
|
}
|
|
}
|
|
})
|
|
})
|
|
}
|
|
}
|
|
-
|
|
|
|
},
|
|
},
|
|
mounted () {
|
|
mounted () {
|
|
this.getRoleList()
|
|
this.getRoleList()
|