Browse Source

部门

master
蔡玲玲 4 weeks ago
parent
commit
47acf70c81
  1. 2
      base-vue/src/views/modules/sys/dept-add-or-update.vue
  2. 27
      base-vue/src/views/modules/sys/dept.vue

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

27
base-vue/src/views/modules/sys/dept.vue

@ -151,6 +151,20 @@ export default {
this.dataListLoading = false
})
},
// :load="getDeptDatas" row-keyid
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-keyid
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)
}
}
}

Loading…
Cancel
Save