diff --git a/src/components/pages/selectDept.vue b/src/components/pages/selectDept.vue index c1ee21b1..f6c4a69b 100644 --- a/src/components/pages/selectDept.vue +++ b/src/components/pages/selectDept.vue @@ -50,9 +50,11 @@ export default { ...mapState(['user']), isSingle: v => !!v.$route.query.single, nodeKey: v => v.$route.query.nodeKey || "idNumber", - isRequire: v => v.$route.query.isRequire || 1 + isRequire: v => v.$route.query.isRequire || 1, + isAuth: v => !!v.$route.query.isAuth, //是否只能选择自己当前部门及以下 }, onLoad(query) { + console.log(query) if (query.selected) { this.selected = query.selected?.split(",").map(e => Number(e)) || [] } @@ -60,7 +62,8 @@ export default { }, methods: { getList() { - this.$http.post(`/app/wxcp/wxdepartment/listAll?name=${this.name}`).then(res => { + var url = this.isAuth ? `/app/wxcp/wxdepartment/listByUser?name=${this.name}` : `/app/wxcp/wxdepartment/listAll?name=${this.name}` + this.$http.post(url).then(res => { if (res?.data) { res.data.forEach(e => e.isCheck = this.selected.includes(e[this.nodeKey])) this.depts = new this.$tree(res.data, {parent: 'parentid'}) diff --git a/src/project/qianxinan/AppGroupTags/AppGroupTags.vue b/src/project/qianxinan/AppGroupTags/AppGroupTags.vue index 520ba2e4..d2c05363 100644 --- a/src/project/qianxinan/AppGroupTags/AppGroupTags.vue +++ b/src/project/qianxinan/AppGroupTags/AppGroupTags.vue @@ -12,7 +12,7 @@