Merge branch 'gin-vue-admin_v2_dev' of https://github.com/piexlmax/gin-vue-admin into gin-vue-admin_v2_dev
# Conflicts: # server/model/sys_authority.go # server/model/sys_authority_menu.go # server/model/sys_base_menu.go
This commit is contained in:
@@ -22,7 +22,7 @@
|
||||
<el-dropdown>
|
||||
<span class="el-dropdown-link">
|
||||
<img :src="userInfo.headerImg" height="30" width="30" />
|
||||
{{userInfo.nickName}}
|
||||
{{userInfo.title}}
|
||||
<i class="el-icon-arrow-down"></i>
|
||||
</span>
|
||||
<el-dropdown-menu class="dropdown-group" slot="dropdown">
|
||||
|
||||
@@ -167,12 +167,7 @@ export default {
|
||||
this.getTableData()
|
||||
},
|
||||
initForm() {
|
||||
this.form = {
|
||||
path: '',
|
||||
apiGroup: '',
|
||||
description: '',
|
||||
method: ''
|
||||
}
|
||||
this.$refs.apiForm.resetFields()
|
||||
},
|
||||
closeDialog() {
|
||||
this.initForm()
|
||||
|
||||
@@ -136,9 +136,7 @@ export default {
|
||||
},
|
||||
// 初始化表单
|
||||
initForm() {
|
||||
for (const key in this.form) {
|
||||
this.form[key] = ''
|
||||
}
|
||||
this.$refs.authorityForm.resetFields()
|
||||
},
|
||||
// 关闭窗口
|
||||
closeDialog() {
|
||||
|
||||
@@ -44,10 +44,10 @@ export default {
|
||||
const apiObj = new Object()
|
||||
apis &&
|
||||
apis.map(item => {
|
||||
if (apiObj.hasOwnProperty(item.group)) {
|
||||
apiObj[item.group].push(item)
|
||||
if (apiObj.hasOwnProperty(item.apiGroup)) {
|
||||
apiObj[item.apiGroup].push(item)
|
||||
} else {
|
||||
Object.assign(apiObj, { [item.group]: [item] })
|
||||
Object.assign(apiObj, { [item.apiGroup]: [item] })
|
||||
}
|
||||
})
|
||||
const apiTree = []
|
||||
|
||||
@@ -34,7 +34,9 @@ export default {
|
||||
menuTreeIds: [],
|
||||
menuDefaultProps: {
|
||||
children: 'children',
|
||||
label: 'nickName'
|
||||
label: function(data){
|
||||
return data.meta.title
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -64,8 +66,8 @@ export default {
|
||||
const arr = []
|
||||
menus.map(item => {
|
||||
// 防止直接选中父级造成全选
|
||||
if (!menus.some(same => same.parentId === item.menuId)) {
|
||||
arr.push(Number(item.menuId))
|
||||
if (!menus.some(same => same.parentId === item.ID)) {
|
||||
arr.push(Number(item.ID))
|
||||
}
|
||||
})
|
||||
this.menuTreeIds = arr
|
||||
|
||||
@@ -162,17 +162,7 @@ export default {
|
||||
},
|
||||
// 初始化弹窗内表格方法
|
||||
initForm() {
|
||||
this.form = {
|
||||
path: '',
|
||||
name: '',
|
||||
hidden: '',
|
||||
parentId: '',
|
||||
component: '',
|
||||
meta: {
|
||||
title: '',
|
||||
icon: ''
|
||||
}
|
||||
}
|
||||
this.$refs.menuForm.resetFields()
|
||||
},
|
||||
// 关闭弹窗
|
||||
closeDialog() {
|
||||
|
||||
@@ -141,13 +141,7 @@ export default {
|
||||
})
|
||||
},
|
||||
closeAddUserDialog() {
|
||||
this.userInfo = {
|
||||
username: '',
|
||||
password: '',
|
||||
nickName: '',
|
||||
headerImg: '',
|
||||
authorityId: ''
|
||||
}
|
||||
this.$refs.userForm.resetFields()
|
||||
this.addUserDialog = false
|
||||
},
|
||||
handleAvatarSuccess(res) {
|
||||
|
||||
+4
-4
@@ -1,7 +1,7 @@
|
||||
'use strict'
|
||||
|
||||
const path = require('path')
|
||||
|
||||
|
||||
function resolve(dir) {
|
||||
return path.join(__dirname, dir)
|
||||
}
|
||||
@@ -51,10 +51,10 @@ module.exports = {
|
||||
})
|
||||
.end()
|
||||
config
|
||||
// https://webpack.js.org/configuration/devtool/#development
|
||||
// https://webpack.js.org/configuration/devtool/#development
|
||||
.when(process.env.NODE_ENV === 'development',
|
||||
config => config.devtool('cheap-source-map')
|
||||
)
|
||||
config => config.devtool('cheap-source-map')
|
||||
)
|
||||
|
||||
config
|
||||
.when(process.env.NODE_ENV !== 'development',
|
||||
|
||||
Reference in New Issue
Block a user