From 9aae2af6f3937a7d99ec619b51f457002cef969f Mon Sep 17 00:00:00 2001
From: gaoluyang <2820782392@qq.com>
Date: 星期一, 03 十一月 2025 14:29:37 +0800
Subject: [PATCH] 档案管理-添加导出功能
---
src/views/collaborativeApproval/notificationManagement/index.vue | 72 ++++++++++++++++++------------------
1 files changed, 36 insertions(+), 36 deletions(-)
diff --git a/src/views/collaborativeApproval/notificationManagement/index.vue b/src/views/collaborativeApproval/notificationManagement/index.vue
index 9667d94..8e1b792 100644
--- a/src/views/collaborativeApproval/notificationManagement/index.vue
+++ b/src/views/collaborativeApproval/notificationManagement/index.vue
@@ -409,11 +409,11 @@
fileList: []
});
-const {
- searchForm,
- tableLoading,
- page,
- tableData,
+const {
+ searchForm,
+ tableLoading,
+ page,
+ tableData,
selectedIds,
form,
dialogVisible,
@@ -596,7 +596,7 @@
employeesLoading.value = true;
// 浼樺厛浣跨敤绯荤粺鐢ㄦ埛鎺ュ彛锛堟寜绉熸埛鑾峰彇锛�
const userResponse = await userListNoPageByTenantId();
-
+
if (userResponse.data) {
employees.value = userResponse.data.map(user => ({
label: user.nickName || user.userName || '鏈煡濮撳悕',
@@ -608,12 +608,12 @@
})).filter(user => user.status === '0'); // 鍙樉绀烘甯哥姸鎬佺殑鐢ㄦ埛
} else {
// 濡傛灉绯荤粺鐢ㄦ埛鎺ュ彛澶辫触锛屼娇鐢ㄥ憳宸ュ彴璐︽帴鍙�
- const response = await staffOnJobListPage({
- pageNum: 1,
- pageSize: 1000,
+ const response = await staffOnJobListPage({
+ pageNum: 1,
+ pageSize: 1000,
staffState: 1 // 鍦ㄨ亴鐘舵��
});
-
+
if (response.data && response.data.records) {
employees.value = response.data.records.map(employee => ({
label: employee.staffName || employee.name || '鏈煡濮撳悕',
@@ -648,7 +648,7 @@
}
groups[dept].push(employee);
});
-
+
// 鎸夐儴闂ㄥ悕绉版帓搴忥紝纭繚鏄剧ず椤哄簭涓�鑷�
return Object.keys(groups)
.sort()
@@ -662,7 +662,7 @@
const filterEmployees = (query) => {
if (query !== '') {
const lowerQuery = query.toLowerCase();
- return employees.value.filter(employee =>
+ return employees.value.filter(employee =>
employee.label.toLowerCase().includes(lowerQuery) ||
employee.dept.toLowerCase().includes(lowerQuery) ||
(employee.phone && employee.phone.includes(query)) ||
@@ -677,18 +677,18 @@
const refreshEmployees = async () => {
ElMessage.info("姝e湪鍒锋柊鍛樺伐鍒楄〃...");
await getEmployeesList();
-
+
// 缁熻鍚勯儴闂ㄤ汉鏁�
const deptStats = {};
employees.value.forEach(emp => {
const dept = emp.dept || '鍏朵粬閮ㄩ棬';
deptStats[dept] = (deptStats[dept] || 0) + 1;
});
-
+
const deptInfo = Object.entries(deptStats)
.map(([dept, count]) => `${dept}: ${count}浜篳)
.join(', ');
-
+
ElMessage.success(`鍛樺伐鍒楄〃鍒锋柊瀹屾垚锛屽叡 ${employees.value.length} 浜� (${deptInfo})`);
};
@@ -702,7 +702,7 @@
const getEmployeeInfo = (employeeId) => {
const employee = employees.value.find(emp => emp.value === employeeId);
if (!employee) return null;
-
+
return {
name: employee.label,
dept: employee.dept,
@@ -741,7 +741,7 @@
const now = new Date();
const randomType = notificationTypes[Math.floor(Math.random() * notificationTypes.length)];
const randomDept = departments[Math.floor(Math.random() * departments.length)];
-
+
// 鐢熸垚闅忔満鏍囬
let title = titleTemplates[Math.floor(Math.random() * titleTemplates.length)];
title = title
@@ -753,15 +753,15 @@
.replace('{company}', ['鍏徃', '闆嗗洟', '鎬婚儴'][Math.floor(Math.random() * 4)])
.replace('{project}', ['鏁板瓧鍖栬浆鍨�', '浜у搧鍗囩骇', '甯傚満鎷撳睍', '浜烘墠鍩瑰吇'][Math.floor(Math.random() * 4)])
.replace('{policy}', ['鑰冨嫟', '钖叕', '绂忓埄', '鏅嬪崌'][Math.floor(Math.random() * 4)]);
-
+
// 闅忔満鐘舵��
const statuses = ['draft', 'published'];
const randomStatus = statuses[Math.floor(Math.random() * statuses.length)];
-
+
// 闅忔満浼樺厛绾�
const priorities = ['low', 'medium', 'high'];
const randomPriority = priorities[Math.floor(Math.random() * priorities.length)];
-
+
const newNotification = {
id: newId,
title: title,
@@ -774,15 +774,15 @@
syncMethods: ["wechat", "dingtalk"],
createTime: now.toLocaleString()
};
-
+
// 娣诲姞鍒版暟鎹紑澶�
mockData.unshift(newNotification);
-
+
// 淇濇寔鏁版嵁閲忓湪鍚堢悊鑼冨洿鍐咃紙鏈�澶氫繚鐣�20鏉★級
if (mockData.length > 20) {
mockData = mockData.slice(0, 20);
}
-
+
console.log(`[${new Date().toLocaleString()}] 鑷姩鐢熸垚鏂伴�氱煡: ${title}`);
};
@@ -903,7 +903,7 @@
const submitForm = async () => {
try {
await formRef.value.validate();
-
+
if (dialogType.value === "add") {
// 鏂板閫氱煡
addNotification({...form.value}).then(res => {
@@ -936,7 +936,7 @@
const createMeeting = async () => {
try {
await meetingFormRef.value.validate();
-
+
// 妯℃嫙鍒涘缓浼氳
const meetingInfo = {
title: meetingForm.value.title,
@@ -957,7 +957,7 @@
ElMessage.error(err.msg);
})
// 妯℃嫙鍙戦�佸埌浼佷笟寰俊/閽夐拤
- // const platformName = meetingPlatforms.find(p => p.value === meetingForm.value.platform)?.label || "鏈煡骞冲彴";
+ // const platformName = meetingPlatforms.find(p => p.value === meetingForm.value.platform)?.label || "鏈煡骞冲彴";
// ElMessage.success(`浼氳鍒涘缓鎴愬姛锛佷細璁甀D: ${meetingInfo.meetingId}锛屽皢閫氳繃${platformName}鍙戦�侀�氱煡`);
// 鑾峰彇鍙備細浜哄憳淇℃伅
@@ -965,7 +965,7 @@
const employee = employees.value.find(emp => emp.value === participantId);
return employee ? employee.label : '鏈煡浜哄憳';
}).join('銆�');
-
+
// 鑾峰彇鍙備細浜哄憳璇︾粏淇℃伅
const participantDetails = meetingForm.value.participants.map(participantId => {
const employee = employees.value.find(emp => emp.value === participantId);
@@ -976,7 +976,7 @@
email: employee.email
} : null;
}).filter(Boolean);
-
+
// 灏嗕細璁俊鎭坊鍔犲埌閫氱煡鍒楄〃
const meetingNotification = {
title: `[浼氳閫氱煡] ${meetingInfo.title}`,
@@ -1011,14 +1011,14 @@
ElMessage.error("涓婁紶鏂囦欢澶у皬涓嶈兘瓒呰繃 10MB!");
return false;
}
-
+
const fileInfo = {
name: file.name,
size: file.size,
type: file.type,
uid: file.uid
};
-
+
fileList.value.push(fileInfo);
fileShareForm.value.files.push(fileInfo.name);
return false; // 闃绘鑷姩涓婁紶
@@ -1040,12 +1040,12 @@
const shareFiles = async () => {
try {
await fileShareFormRef.value.validate();
-
+
if (fileShareForm.value.files.length === 0) {
ElMessage.warning("璇疯嚦灏戦�夋嫨涓�涓枃浠�");
return;
}
-
+
// 妯℃嫙鏂囦欢鍏变韩
const shareInfo = {
title: fileShareForm.value.title,
@@ -1062,10 +1062,10 @@
}).catch(err => {
ElMessage.error(err.msg);
})
-
+
// ElMessage.success(`鏂囦欢鍏变韩鎴愬姛锛佸叡浜獻D: ${shareInfo.shareId}锛屽凡閫氱煡鐩稿叧閮ㄩ棬`);
-
-
+
+
// 灏嗘枃浠跺叡浜俊鎭坊鍔犲埌閫氱煡鍒楄〃
const fileShareNotification = {
title: `[鏂囦欢鍏变韩] ${shareInfo.title}`,
@@ -1086,7 +1086,7 @@
}).catch(err => {
ElMessage.error(err.msg);
})
-
+
// mockData.unshift(fileShareNotification);
// getList();
} catch (error) {
--
Gitblit v1.9.3