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

@@ -89,7 +89,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

@@ -19,7 +19,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>
@@ -38,7 +38,7 @@ export default {
},
data() {
return {
dialog: false, title: '新增用户',
loading: false, dialog: false, title: '新增用户',
form: { username: '', email: '', enabled: 'false', roles: [] }, roleIds: [],
rules: {
username: [
@@ -62,6 +62,7 @@ export default {
doSubmit() {
this.$refs['form'].validate((valid) => {
if (valid) {
this.loading = true
this.form.roles = []
const _this = this
this.roleIds.forEach(function(data, index) {
@@ -76,7 +77,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

@@ -19,7 +19,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>
@@ -46,7 +46,7 @@ export default {
},
data() {
return {
dialog: false, title: '编辑用户',
loading: false, dialog: false, title: '编辑用户',
form: { id: '', username: '', email: '', enabled: '', roles: [] }, roleIds: [],
rules: {
username: [
@@ -78,6 +78,7 @@ export default {
doSubmit() {
this.$refs['form'].validate((valid) => {
if (valid) {
this.loading = true
this.form.roles = []
const _this = this
this.roleIds.forEach(function(data, index) {
@@ -91,7 +92,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