v1.2 版本发布,代码同步后端v1.2版本
This commit is contained in:
@@ -8,9 +8,9 @@
|
||||
<svg-icon :icon-class="scope.row.icon" />
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="soft" align="center" width="100px" label="排序">
|
||||
<el-table-column prop="sort" align="center" width="100px" label="排序">
|
||||
<template slot-scope="scope">
|
||||
<el-tag>{{ scope.row.soft }}</el-tag>
|
||||
<el-tag>{{ scope.row.sort }}</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :show-overflow-tooltip="true" prop="path" label="链接地址"/>
|
||||
@@ -93,7 +93,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',
|
||||
|
||||
@@ -19,8 +19,8 @@
|
||||
<el-form-item label="菜单名称" prop="name">
|
||||
<el-input v-model="form.name" placeholder="名称" style="width: 460px;"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="菜单排序" prop="soft">
|
||||
<el-input v-model.number="form.soft" placeholder="序号越小越靠前" style="width: 460px;"/>
|
||||
<el-form-item label="菜单排序" prop="sort">
|
||||
<el-input v-model.number="form.sort" placeholder="序号越小越靠前" style="width: 460px;"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="内部菜单" prop="iframe">
|
||||
<el-radio v-model="form.iframe" label="false">是</el-radio>
|
||||
@@ -41,7 +41,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>
|
||||
@@ -65,13 +65,13 @@ export default {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dialog: false, title: '新增菜单',
|
||||
form: { name: '', soft: 999, path: '', component: '', iframe: 'false', roles: [], pid: 0, icon: '' }, roleIds: [],
|
||||
loading: false, dialog: false, title: '新增菜单',
|
||||
form: { name: '', sort: 999, path: '', component: '', iframe: 'false', roles: [], pid: 0, icon: '' }, roleIds: [],
|
||||
rules: {
|
||||
name: [
|
||||
{ required: true, message: '请输入名称', trigger: 'blur' }
|
||||
],
|
||||
soft: [
|
||||
sort: [
|
||||
{ required: true, message: '请输入序号', trigger: 'blur', type: 'number' }
|
||||
],
|
||||
iframe: [
|
||||
@@ -87,6 +87,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) {
|
||||
@@ -100,8 +101,14 @@ export default {
|
||||
type: 'success',
|
||||
duration: 2500
|
||||
})
|
||||
this.$parent.$parent.init()
|
||||
this.$parent.$parent.getMenus()
|
||||
this.loading = false
|
||||
setTimeout(() => {
|
||||
this.$parent.$parent.init()
|
||||
this.$parent.$parent.getMenus()
|
||||
}, 200)
|
||||
}).catch(err => {
|
||||
this.loading = false
|
||||
console.log(err.response.data.message)
|
||||
})
|
||||
} else {
|
||||
return false
|
||||
@@ -111,7 +118,7 @@ export default {
|
||||
resetForm() {
|
||||
this.dialog = false
|
||||
this.$refs['form'].resetFields()
|
||||
this.form = { name: '', soft: 999, path: '', component: '', iframe: 'false', roles: [], pid: 0, icon: '' }
|
||||
this.form = { name: '', sort: 999, path: '', component: '', iframe: 'false', roles: [], pid: 0, icon: '' }
|
||||
this.roleIds = []
|
||||
},
|
||||
selected(name) {
|
||||
|
||||
@@ -19,8 +19,8 @@
|
||||
<el-form-item label="菜单名称" prop="name">
|
||||
<el-input v-model="form.name" placeholder="名称" style="width: 460px;"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="菜单排序" prop="soft">
|
||||
<el-input v-model.number="form.soft" placeholder="序号越小越靠前" style="width: 460px;"/>
|
||||
<el-form-item label="菜单排序" prop="sort">
|
||||
<el-input v-model.number="form.sort" placeholder="序号越小越靠前" style="width: 460px;"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="内部菜单" prop="iframe">
|
||||
<el-radio v-model="form.iframe" label="false">是</el-radio>
|
||||
@@ -41,7 +41,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>
|
||||
@@ -73,13 +73,13 @@ export default {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dialog: false, title: '编辑菜单',
|
||||
form: { id: '', name: '', soft: 999, path: '', component: '', iframe: 'false', roles: [], pid: 0, icon: '' }, roleIds: [],
|
||||
loading: false, dialog: false, title: '编辑菜单',
|
||||
form: { id: '', name: '', sort: 999, path: '', component: '', iframe: 'false', roles: [], pid: 0, icon: '' }, roleIds: [],
|
||||
rules: {
|
||||
name: [
|
||||
{ required: true, message: '请输入名称', trigger: 'blur' }
|
||||
],
|
||||
soft: [
|
||||
sort: [
|
||||
{ required: true, message: '请输入序号', trigger: 'blur', type: 'number' }
|
||||
],
|
||||
iframe: [
|
||||
@@ -91,7 +91,7 @@ export default {
|
||||
methods: {
|
||||
to() {
|
||||
const _this = this
|
||||
this.form = { id: this.data.id, component: this.data.component, name: this.data.name, soft: this.data.soft, pid: this.data.pid, path: this.data.path, iframe: this.data.iframe.toString(), roles: [], icon: this.data.icon }
|
||||
this.form = { id: this.data.id, component: this.data.component, name: this.data.name, sort: this.data.sort, pid: this.data.pid, path: this.data.path, iframe: this.data.iframe.toString(), roles: [], icon: this.data.icon }
|
||||
this.data.roles.forEach(function(data, index) {
|
||||
_this.roleIds.push(data.id)
|
||||
})
|
||||
@@ -103,6 +103,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) {
|
||||
@@ -116,8 +117,14 @@ export default {
|
||||
type: 'success',
|
||||
duration: 2500
|
||||
})
|
||||
_this.sup_this.init()
|
||||
_this.sup_this.getMenus()
|
||||
this.loading = false
|
||||
setTimeout(() => {
|
||||
_this.sup_this.init()
|
||||
_this.sup_this.getMenus()
|
||||
}, 200)
|
||||
}).catch(err => {
|
||||
this.loading = false
|
||||
console.log(err.response.data.message)
|
||||
})
|
||||
} else {
|
||||
return false
|
||||
@@ -127,7 +134,7 @@ export default {
|
||||
resetForm() {
|
||||
this.dialog = false
|
||||
this.$refs['form'].resetFields()
|
||||
this.form = { id: '', name: '', soft: 999, path: '', component: '', iframe: 'false', roles: [], pid: 0, icon: '' }
|
||||
this.form = { id: '', name: '', sort: 999, path: '', component: '', iframe: 'false', roles: [], pid: 0, icon: '' }
|
||||
this.roleIds = []
|
||||
},
|
||||
selected(name) {
|
||||
|
||||
@@ -78,7 +78,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: '', alias: '', pid: 0 },
|
||||
rules: {
|
||||
name: [
|
||||
@@ -53,6 +53,7 @@ export default {
|
||||
doSubmit() {
|
||||
this.$refs['form'].validate((valid) => {
|
||||
if (valid) {
|
||||
this.loading = true
|
||||
add(this.form).then(res => {
|
||||
this.resetForm()
|
||||
this.$notify({
|
||||
@@ -60,8 +61,14 @@ export default {
|
||||
type: 'success',
|
||||
duration: 2500
|
||||
})
|
||||
this.$parent.$parent.init()
|
||||
this.$parent.$parent.getPermissions()
|
||||
this.loading = false
|
||||
setTimeout(() => {
|
||||
this.$parent.$parent.init()
|
||||
this.$parent.$parent.getPermissions()
|
||||
}, 200)
|
||||
}).catch(err => {
|
||||
this.loading = false
|
||||
console.log(err.response.data.message)
|
||||
})
|
||||
} else {
|
||||
return false
|
||||
|
||||
@@ -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>
|
||||
@@ -42,7 +42,7 @@ export default {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
dialog: false, title: '编辑权限',
|
||||
loading: false, dialog: false, title: '编辑权限',
|
||||
form: { id: '', name: '', alias: '', pid: 0 },
|
||||
rules: {
|
||||
name: [
|
||||
@@ -65,6 +65,7 @@ export default {
|
||||
doSubmit() {
|
||||
this.$refs['form'].validate((valid) => {
|
||||
if (valid) {
|
||||
this.loading = true
|
||||
const _this = this
|
||||
edit(this.form).then(res => {
|
||||
this.resetForm()
|
||||
@@ -73,8 +74,14 @@ export default {
|
||||
type: 'success',
|
||||
duration: 2500
|
||||
})
|
||||
_this.sup_this.init()
|
||||
_this.sup_this.getPermissions()
|
||||
this.loading = false
|
||||
setTimeout(() => {
|
||||
_this.sup_this.init()
|
||||
_this.sup_this.getPermissions()
|
||||
}, 200)
|
||||
}).catch(err => {
|
||||
this.loading = false
|
||||
console.log(err.response.data.message)
|
||||
})
|
||||
} else {
|
||||
return false
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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',
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user