diff --git a/base-vue/src/views/modules/sys/dept-add-or-update.vue b/base-vue/src/views/modules/sys/dept-add-or-update.vue index 0fafacb..23f07d9 100644 --- a/base-vue/src/views/modules/sys/dept-add-or-update.vue +++ b/base-vue/src/views/modules/sys/dept-add-or-update.vue @@ -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) diff --git a/base-vue/src/views/modules/sys/dept.vue b/base-vue/src/views/modules/sys/dept.vue index 5b12a1c..eec1e8f 100644 --- a/base-vue/src/views/modules/sys/dept.vue +++ b/base-vue/src/views/modules/sys/dept.vue @@ -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) } } }