Commit 998b9489 by 胡悦

修复bug

1 parent bdacbf6f
...@@ -323,7 +323,7 @@ export default { ...@@ -323,7 +323,7 @@ export default {
switch (pType) { switch (pType) {
case 'create': case 'create':
this.isOpen = true this.isOpen = true
this.menuDialogTitle = '新增菜单' this.menuDialogTitle = '新增目录'
this.menuData.map(item => { this.menuData.map(item => {
if (item.prop == 'parentName') { if (item.prop == 'parentName') {
item.hidden = true item.hidden = true
...@@ -331,7 +331,7 @@ export default { ...@@ -331,7 +331,7 @@ export default {
item.children = this.$Constants.MENU_TYPE item.children = this.$Constants.MENU_TYPE
item.disabled = false item.disabled = false
} else if (item.prop == 'icon') { } else if (item.prop == 'icon') {
item.hidden = true item.hidden = false
} }
}) })
this.menuForm = _.cloneDeep(this.form) this.menuForm = _.cloneDeep(this.form)
...@@ -345,7 +345,7 @@ export default { ...@@ -345,7 +345,7 @@ export default {
item.children = this.$Constants.MENU_OTYPE item.children = this.$Constants.MENU_OTYPE
item.disabled = false item.disabled = false
} else if (item.prop == 'icon') { } else if (item.prop == 'icon') {
item.hidden = !(scope.parentId == 0) item.hidden = true
} }
}) })
this.menuForm = _.cloneDeep(this.form) this.menuForm = _.cloneDeep(this.form)
......
...@@ -35,6 +35,7 @@ ...@@ -35,6 +35,7 @@
style="width: 100%" style="width: 100%"
row-key="id" row-key="id"
lazy lazy
stripe
:load="load" :load="load"
:tree-props="{children: 'children', hasChildren: 'hasChildren'}" :tree-props="{children: 'children', hasChildren: 'hasChildren'}"
> >
...@@ -139,7 +140,7 @@ export default { ...@@ -139,7 +140,7 @@ export default {
], ],
orginTableData: [], orginTableData: [],
listHeadData: [ // 列表 头部设置 数据 listHeadData: [ // 列表 头部设置 数据
{ prop: 'departmentName', label: '组织名称' }, { prop: 'departmentName', label: '组织名称', width: 300 },
{ prop: 'orderNum', label: '排序' }, { prop: 'orderNum', label: '排序' },
{ prop: 'enableStatus', label: '状态' }, { prop: 'enableStatus', label: '状态' },
{ prop: 'createdDate', label: '创建时间' } { prop: 'createdDate', label: '创建时间' }
...@@ -276,6 +277,9 @@ export default { ...@@ -276,6 +277,9 @@ export default {
case 'root': case 'root':
this.isRoot = true this.isRoot = true
this.orginizaData[0].hidden = true this.orginizaData[0].hidden = true
this.orginizaForm = {
enableStatus: true
}
this.orginizaDialogTitle = '新增根组织' this.orginizaDialogTitle = '新增根组织'
this.handleClose() this.handleClose()
break break
...@@ -332,9 +336,9 @@ export default { ...@@ -332,9 +336,9 @@ export default {
if (!row.superiorId) { if (!row.superiorId) {
this.getList() this.getList()
} else { } else {
getChildren({ rootId: params.superiorId }).then(res => { getChildren({ rootId: row.superiorId }).then(res => {
const nodes = res.data const nodes = res.data
this.$set(this.$refs.table.store.states.lazyTreeNodeMap, params.superiorId, nodes) this.$set(this.$refs.table.store.states.lazyTreeNodeMap, row.superiorId, nodes)
}) })
} }
} else { } else {
...@@ -351,6 +355,7 @@ export default { ...@@ -351,6 +355,7 @@ export default {
}, },
// 树形table懒加载 // 树形table懒加载
load(tree, treeNode, resolve) { load(tree, treeNode, resolve) {
console.log(tree, treeNode, resolve)
getChildren({ rootId: tree.id }).then(res => { getChildren({ rootId: tree.id }).then(res => {
let nodes = res.data let nodes = res.data
resolve(nodes) resolve(nodes)
......
...@@ -500,22 +500,22 @@ export default { ...@@ -500,22 +500,22 @@ export default {
// 岗位列表 // 岗位列表
getPosti(value) { getPosti(value) {
dictInfo('sys_position').then(res => { dictInfo('sys_position').then(res => {
const arr = [] // const arr = []
res.data.map(item => { // res.data.map(item => {
if (!item.disabled) arr.push(item) // if (!item.disabled) arr.push(item)
}) // })
this.userData[this.userData.length - 1].options = arr this.userData[this.userData.length - 1].options = res.data
}) })
}, },
getSex() { getSex() {
dictInfo('sys_user_sex').then(res => { dictInfo('sys_user_sex').then(res => {
const arr = [] // const arr = []
res.data.map(item => { // res.data.map(item => {
if (!item.disabled) arr.push(item) // if (!item.disabled) arr.push(item)
}) // })
this.userData.map(item => { this.userData.map(item => {
if (item.prop == 'gender') { if (item.prop == 'gender') {
item.options = arr item.options = res.data
} }
}) })
}) })
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!