v1.2 版本发布,代码同步后端v1.2版本

This commit is contained in:
郑杰
2018-12-28 18:11:30 +08:00
parent c6484593df
commit 7f2e4ed3f9
41 changed files with 797 additions and 58 deletions

View File

@@ -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',

View File

@@ -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

View File

@@ -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