From 9c660d86b337a826e026e6bea093f937308c2883 Mon Sep 17 00:00:00 2001 From: wanglei Date: Tue, 10 Jun 2025 15:51:21 +0800 Subject: [PATCH] =?UTF-8?q?=E9=A1=B5=E9=9D=A2=E6=90=9C=E7=B4=A2=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ruoyi-ui/src/views/pay/attendance/index.vue | 56 ++++++++++++++------- 1 file changed, 38 insertions(+), 18 deletions(-) diff --git a/ruoyi-ui/src/views/pay/attendance/index.vue b/ruoyi-ui/src/views/pay/attendance/index.vue index a56e407..ec079e5 100644 --- a/ruoyi-ui/src/views/pay/attendance/index.vue +++ b/ruoyi-ui/src/views/pay/attendance/index.vue @@ -18,21 +18,18 @@
- - + + + + + - - + + @@ -336,10 +332,14 @@ import { listAttendance, getAttendance, delAttendance, addAttendance, updateAtte import { listEmployeeInfo } from "@/api/pay/employeeInfo"; import { listTenant } from "@/api/pay/tenant"; import { getToken } from "@/utils/auth"; +import { deptTreeSelect } from "@/api/system/user"; +import Treeselect from "@riophae/vue-treeselect"; +import "@riophae/vue-treeselect/dist/vue-treeselect.css"; export default { name: "Attendance", dicts: ['sys_user_sex', 'pay_del_status'], + components: { Treeselect }, data() { return { // 公司信息 @@ -370,6 +370,8 @@ export default { open: false, // 员工列表 employeeList: [], + // 部门树选项 + deptOptions: undefined, // 查询参数 queryParams: { pageNum: 1, @@ -456,7 +458,9 @@ export default { this.getGsInfoList() }else { this.gsInfo.active_id = this.$store.state.user.tenantId - this.getList() + this.getList(); + this.getDeptTree(); + this.getlistEmployee(); } }, methods: { @@ -466,7 +470,9 @@ export default { if(response.rows.length>0){ this.gsInfo.list = response.rows; this.gsInfo.active_id = this.gsInfo.list[0].id - this.getList() + this.getList(); + this.getDeptTree(); + this.getlistEmployee(); }else{ this.$alert(`没有查到相关公司,暂无数据!`, `提示`, { type: 'warning' @@ -477,7 +483,21 @@ export default { // 选择公司 changCompany(id){ this.gsInfo.active_id = id - this.getList() + this.getList(); + this.getDeptTree(); + this.getlistEmployee(); + }, + /** 查询时员工 */ + getlistEmployee() { + listEmployeeInfo({ pageSize: 1000000000, tenantId: this.gsInfo.active_id }).then(response => { + this.employeeList = response.rows + }); + }, + /** 查询部门下拉树结构 */ + getDeptTree() { + deptTreeSelect({tenantId: this.gsInfo.active_id}).then(response => { + this.deptOptions = response.data; + }); }, /** 查询考勤列表 */ getList() {