部门
This commit is contained in:
@@ -110,7 +110,7 @@
|
||||
this.$http({
|
||||
url: this.$http.adornUrl('/api/dept/superior'),
|
||||
method: 'post',
|
||||
params: this.$http.adornParams(data)
|
||||
params: this.$http.adornData(data)
|
||||
}).then(({res}) => {
|
||||
const date = res.content
|
||||
this.buildDepts(date)
|
||||
|
||||
@@ -151,6 +151,20 @@ export default {
|
||||
this.dataListLoading = false
|
||||
})
|
||||
},
|
||||
// 表格渲染 :load="getDeptDatas" 点击事件 row-key需要指定唯一的数据id
|
||||
getDeptDatas (tree, treeNode, resolve) {
|
||||
setTimeout(() => {
|
||||
this.$http({
|
||||
url: this.$http.adornUrl('/api/dept/vo'),
|
||||
method: 'get',
|
||||
params: this.$http.adornParams({
|
||||
'pid': tree.deptId
|
||||
})
|
||||
}).then(({data}) => {
|
||||
resolve(data.content)
|
||||
})
|
||||
}, 100)
|
||||
},
|
||||
// 每页数
|
||||
sizeChangeHandle (val) {
|
||||
this.pageSize = val
|
||||
@@ -202,19 +216,6 @@ export default {
|
||||
}
|
||||
})
|
||||
}).catch(() => {})
|
||||
},
|
||||
// 表格渲染 :load="getDeptDatas" 点击事件 row-key需要指定唯一的数据id
|
||||
getDeptDatas(tree, treeNode, resolve) {
|
||||
const params = { pid: tree.deptId }
|
||||
setTimeout(() => {
|
||||
this.$http({
|
||||
url: this.$http.adornUrl('/api/dept/vo'),
|
||||
method: 'get',
|
||||
data: this.$http.adornData(params)
|
||||
}).then(({res}) => {
|
||||
resolve(res.content)
|
||||
})
|
||||
}, 100)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user