This commit is contained in:
2025-03-05 11:24:10 +08:00
parent 4e71b99606
commit 47acf70c81
2 changed files with 15 additions and 14 deletions

View File

@@ -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)

View File

@@ -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)
}
}
}