协同宣发
This commit is contained in:
@@ -38,6 +38,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapState } from "vuex";
|
||||
export default {
|
||||
name: "selectDeptUser",
|
||||
appName: "选择人员",
|
||||
@@ -54,7 +55,8 @@ export default {
|
||||
computed: {
|
||||
hasData() {
|
||||
return this.treeList?.length > 0 || this.userList?.length > 0
|
||||
}
|
||||
},
|
||||
...mapState(['user'])
|
||||
},
|
||||
onLoad(o) {
|
||||
this.selected = uni.getStorageSync('selectDeptUser') || []
|
||||
@@ -66,7 +68,15 @@ export default {
|
||||
return !!this.selected.find(e => e.id == id && e.corpId == corpId)
|
||||
},
|
||||
getAllDepts() {
|
||||
this.$http.post('/app/wxcp/wxdepartment/listAllByCorp').then((res) => {
|
||||
// this.$http.post('/app/wxcp/wxdepartment/listAllByCorp').then((res) => {
|
||||
// if (res?.data) {
|
||||
// let parents = res.data.map(e => e.parentid)
|
||||
// this.allData = res.data.map(e => ({...e, hasChildren: parents.includes(e.id), isChecked: this.isSelected(e.id, e.corpId)}))
|
||||
// this.deptInit()
|
||||
// }
|
||||
// })
|
||||
|
||||
this.$http.post(`/app/wxcp/wxdepartment/listAll?wxMainDepartmentId=${this.user.wxMainDepartmentId}`).then((res) => {
|
||||
if (res?.data) {
|
||||
let parents = res.data.map(e => e.parentid)
|
||||
this.allData = res.data.map(e => ({...e, hasChildren: parents.includes(e.id), isChecked: this.isSelected(e.id, e.corpId)}))
|
||||
@@ -75,7 +85,8 @@ export default {
|
||||
})
|
||||
},
|
||||
deptInit() {
|
||||
this.treeList = this.allData.filter(e => !e.parentid)
|
||||
// this.treeList = this.allData.filter(e => !e.parentid)
|
||||
this.treeList = this.allData
|
||||
this.selectDeptPath = [{name: "可选范围", id: ''}]
|
||||
},
|
||||
itemClick({id, name, corpId}) {
|
||||
|
||||
Reference in New Issue
Block a user