按部门选人
This commit is contained in:
@@ -49,6 +49,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapActions } from "vuex";
|
||||
export default {
|
||||
name: "scopedSelect",
|
||||
data() {
|
||||
@@ -58,12 +59,36 @@ export default {
|
||||
startTime: '',
|
||||
endTime: '',
|
||||
sex: "0",
|
||||
userList: [],
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
...mapActions(['selectEnterpriseContact']),
|
||||
// 选人
|
||||
selectUser() {
|
||||
uni.navigateTo({url: `./selectGridMember`})
|
||||
if(this.type == "1") { // 部门
|
||||
this.getDeptUser()
|
||||
} else if(this.type == "2") { // 网格
|
||||
uni.navigateTo({url: `./selectGridMember`})
|
||||
}
|
||||
},
|
||||
|
||||
getDeptUser() {
|
||||
this.selectEnterpriseContact({
|
||||
fromDepartmentId: 0,
|
||||
mode: "multi",
|
||||
type: ["user"],
|
||||
// selectedDepartmentIds: this.departList?.map(e => e.id)
|
||||
selectedUserIds: this.userList?.map(e => e.id)
|
||||
}).then((res)=>{
|
||||
console.log(res);
|
||||
// if(res?.departmentList) {
|
||||
// this.departmentId = res.departmentList[0].id
|
||||
// }
|
||||
}
|
||||
).catch((err) => {
|
||||
console.log(err);
|
||||
})
|
||||
},
|
||||
|
||||
toTagsList(e) {
|
||||
@@ -86,7 +111,7 @@ export default {
|
||||
},
|
||||
onLoad(o) {
|
||||
this.type = o.type;
|
||||
document.title = this.type == 0? '按部门选择':'按网格选择'
|
||||
document.title = this.type == 1? '按部门选择':'按网格选择'
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user