v1.2 版本发布,代码同步后端v1.2版本
This commit is contained in:
@@ -76,7 +76,7 @@ export default {
|
||||
del(row.id).then(res => {
|
||||
this.delLoading = false
|
||||
row.delPopover = false
|
||||
this.init(search.data().query)
|
||||
this.init()
|
||||
this.$notify({
|
||||
title: '删除成功',
|
||||
type: 'success',
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="text" @click="cancel">取消</el-button>
|
||||
<el-button type="primary" @click="doSubmit">确认</el-button>
|
||||
<el-button :loading="loading" type="primary" @click="doSubmit">确认</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
@@ -34,7 +34,7 @@ export default {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dialog: false, title: '新增角色',
|
||||
loading: false, dialog: false, title: '新增角色',
|
||||
form: { name: '', permissions: [], remark: '' }, permissionIds: [],
|
||||
rules: {
|
||||
name: [
|
||||
@@ -50,6 +50,7 @@ export default {
|
||||
doSubmit() {
|
||||
this.$refs['form'].validate((valid) => {
|
||||
if (valid) {
|
||||
this.loading = true
|
||||
this.form.permissions = []
|
||||
const _this = this
|
||||
this.permissionIds.forEach(function(data, index) {
|
||||
@@ -63,7 +64,11 @@ export default {
|
||||
type: 'success',
|
||||
duration: 2500
|
||||
})
|
||||
this.loading = false
|
||||
this.$parent.$parent.init()
|
||||
}).catch(err => {
|
||||
this.loading = false
|
||||
console.log(err.response.data.message)
|
||||
})
|
||||
} else {
|
||||
return false
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="text" @click="cancel">取消</el-button>
|
||||
<el-button type="primary" @click="doSubmit">确认</el-button>
|
||||
<el-button :loading="loading" type="primary" @click="doSubmit">确认</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
@@ -44,7 +44,7 @@ export default {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dialog: false, title: '编辑角色',
|
||||
loading: false, dialog: false, title: '编辑角色',
|
||||
form: { id: '', name: '', permissions: [], remark: '' }, permissionIds: [],
|
||||
rules: {
|
||||
name: [
|
||||
@@ -68,6 +68,7 @@ export default {
|
||||
doSubmit() {
|
||||
this.$refs['form'].validate((valid) => {
|
||||
if (valid) {
|
||||
this.loading = true
|
||||
this.form.permissions = []
|
||||
const _this = this
|
||||
this.permissionIds.forEach(function(data, index) {
|
||||
@@ -81,7 +82,11 @@ export default {
|
||||
type: 'success',
|
||||
duration: 2500
|
||||
})
|
||||
this.loading = false
|
||||
_this.sup_this.init()
|
||||
}).catch(err => {
|
||||
this.loading = false
|
||||
console.log(err.response.data.message)
|
||||
})
|
||||
} else {
|
||||
return false
|
||||
|
||||
Reference in New Issue
Block a user