Commit 998b9489 by 胡悦

修复bug

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