From 658802bea263dc2acda03459fb023ea741671cf1 Mon Sep 17 00:00:00 2001
From: gaoluyang <2820782392@qq.com>
Date: 星期四, 30 十月 2025 15:50:19 +0800
Subject: [PATCH] 人力数据分析-企业人数根据在职员工台账读取
---
src/views/personnelManagement/employeeRecord/index.vue | 27 +++++++++++++++++++++++++--
1 files changed, 25 insertions(+), 2 deletions(-)
diff --git a/src/views/personnelManagement/employeeRecord/index.vue b/src/views/personnelManagement/employeeRecord/index.vue
index f1e04db..d0801fd 100644
--- a/src/views/personnelManagement/employeeRecord/index.vue
+++ b/src/views/personnelManagement/employeeRecord/index.vue
@@ -11,6 +11,9 @@
clearable
:prefix-icon="Search"
/>
+ <span style="margin-left: 10px" class="search_title">鍚堝悓缁撴潫鏃ユ湡锛�</span>
+ <el-date-picker v-model="searchForm.entryDate" value-format="YYYY-MM-DD" format="YYYY-MM-DD" type="daterange"
+ placeholder="璇烽�夋嫨" clearable @change="changeDaterange" />
<el-button type="primary" @click="handleQuery" style="margin-left: 10px"
>鎼滅储</el-button
>
@@ -44,10 +47,14 @@
import FormDia from "@/views/personnelManagement/employeeRecord/components/formDia.vue";
import {ElMessageBox} from "element-plus";
import {staffOnJobListPage} from "@/api/personnelManagement/employeeRecord.js";
+import dayjs from "dayjs";
const data = reactive({
searchForm: {
staffName: "",
+ entryDate: undefined, // 褰曞叆鏃ユ湡
+ entryDateStart: undefined,
+ entryDateEnd: undefined,
},
});
const { searchForm } = toRefs(data);
@@ -98,6 +105,7 @@
{
label: "瀹跺涵浣忓潃",
prop: "adress",
+ width:200
},
{
label: "绗竴瀛﹀巻",
@@ -106,10 +114,12 @@
{
label: "涓撲笟",
prop: "profession",
+ width:100
},
{
label: "韬唤璇佸彿",
prop: "identityCard",
+ width:200
},
{
label: "骞撮緞",
@@ -118,6 +128,7 @@
{
label: "鑱旂郴鐢佃瘽",
prop: "phone",
+ width:150
},
{
label: "绱ф�ヨ仈绯讳汉",
@@ -125,8 +136,9 @@
width: 120
},
{
- label: "鑱旂郴鐢佃瘽",
+ label: "绱ф�ヨ仈绯讳汉鐢佃瘽",
prop: "emergencyContactPhone",
+ width:150
},
{
label: "鍚堝悓骞撮檺",
@@ -169,6 +181,15 @@
const formDia = ref()
const { proxy } = getCurrentInstance()
+const changeDaterange = (value) => {
+ searchForm.value.entryDateStart = undefined;
+ searchForm.value.entryDateEnd = undefined;
+ if (value) {
+ searchForm.value.entryDateStart = dayjs(value[0]).format("YYYY-MM-DD");
+ searchForm.value.entryDateEnd = dayjs(value[1]).format("YYYY-MM-DD");
+ }
+ getList();
+};
// 鏌ヨ鍒楄〃
/** 鎼滅储鎸夐挳鎿嶄綔 */
const handleQuery = () => {
@@ -182,7 +203,9 @@
};
const getList = () => {
tableLoading.value = true;
- staffOnJobListPage({...page, ...searchForm.value, staffState: 1}).then(res => {
+ const params = { ...searchForm.value, ...page };
+ params.entryDate = undefined
+ staffOnJobListPage({...params, staffState: 1}).then(res => {
tableLoading.value = false;
tableData.value = res.data.records
page.total = res.data.total;
--
Gitblit v1.9.3