From 97081b89ee45da49b8dbb4173ab45df031fe3c0d Mon Sep 17 00:00:00 2001
From: yyb <995253665@qq.com>
Date: 星期三, 20 五月 2026 16:58:40 +0800
Subject: [PATCH] 删除冗余和无效代码
---
/dev/null | 431 ---------------------------------------
src/views/officeProcessAutomation/ApproveManage/approve-shared/approvalModuleRegistry.js | 7
src/views/officeProcessAutomation/NoticeAnnouncement/notice-manage/useNoticeAnnouncement.js | 7
src/views/officeProcessAutomation/HrManage/resign-apply/index.vue | 27 --
src/views/officeProcessAutomation/HrManage/staff-contract/index.vue | 18 -
src/views/officeProcessAutomation/EnterpriseNews/news-manage/enterpriseNewsUtils.js | 56 -----
src/views/officeProcessAutomation/HrManage/staff-archive/components/Show.vue | 4
src/views/officeProcessAutomation/EnterpriseNews/news-manage/index.vue | 15
src/views/officeProcessAutomation/ApproveManage/approve-list/approveListConstants.js | 9
src/views/officeProcessAutomation/NoticeAnnouncement/notice-manage/noticeAnnouncementUtils.js | 20 -
src/views/officeProcessAutomation/HrManage/staff-archive/index.vue | 49 ----
11 files changed, 13 insertions(+), 630 deletions(-)
diff --git a/src/views/officeProcessAutomation/ApproveManage/approve-list/approveListConstants.js b/src/views/officeProcessAutomation/ApproveManage/approve-list/approveListConstants.js
index 3f6bf88..c16dcd8 100644
--- a/src/views/officeProcessAutomation/ApproveManage/approve-list/approveListConstants.js
+++ b/src/views/officeProcessAutomation/ApproveManage/approve-list/approveListConstants.js
@@ -335,11 +335,6 @@
return dto;
}
-/** @deprecated 浣跨敤 buildInstanceDto */
-export function buildSaveInstanceDto(params) {
- return buildInstanceDto(params);
-}
-
/** 鏍¢獙鎻愪氦瀹℃壒娴佺▼锛堜笌妯℃澘椤佃鍒欎竴鑷达級 */
export function validateSubmitFlowNodes(flowNodes) {
const nodes = normalizeFlowNodes(flowNodes);
@@ -520,10 +515,6 @@
if (key === "rejected") return "danger";
if (key === "cancelled") return "info";
return "warning";
-}
-
-export function unreadLabel(v) {
- return v ? "鏄�" : "鍚�";
}
/** 鍒楄〃琛� 鈫� 缂栬緫琛ㄥ崟锛堜粎鐢ㄨ鏁版嵁鍥炴樉锛� */
diff --git a/src/views/officeProcessAutomation/ApproveManage/approve-shared/approvalInstanceRowMappers.js b/src/views/officeProcessAutomation/ApproveManage/approve-shared/approvalInstanceRowMappers.js
deleted file mode 100644
index 8503d6a..0000000
--- a/src/views/officeProcessAutomation/ApproveManage/approve-shared/approvalInstanceRowMappers.js
+++ /dev/null
@@ -1,10 +0,0 @@
-import { enrichInstanceRowFromFormConfig } from "./approvalInstanceFormConfigTable.js";
-
-/** @deprecated 缁熶竴浣跨敤 enrichInstanceRowFromFormConfig */
-export const enrichLeaveListRow = enrichInstanceRowFromFormConfig;
-export const enrichOvertimeListRow = enrichInstanceRowFromFormConfig;
-export const enrichRegularListRow = enrichInstanceRowFromFormConfig;
-export const enrichTransferListRow = enrichInstanceRowFromFormConfig;
-export const enrichWorkHandoverListRow = enrichInstanceRowFromFormConfig;
-
-export { enrichInstanceRowFromFormConfig };
diff --git a/src/views/officeProcessAutomation/ApproveManage/approve-shared/approvalModuleRegistry.js b/src/views/officeProcessAutomation/ApproveManage/approve-shared/approvalModuleRegistry.js
index 3b60cb7..2bdd35a 100644
--- a/src/views/officeProcessAutomation/ApproveManage/approve-shared/approvalModuleRegistry.js
+++ b/src/views/officeProcessAutomation/ApproveManage/approve-shared/approvalModuleRegistry.js
@@ -90,13 +90,6 @@
return cfg.approvalType || "";
}
-export function listApprovalModuleEntries() {
- return Object.entries(APPROVAL_MODULE_REGISTRY).map(([moduleKey, cfg]) => ({
- moduleKey,
- ...cfg,
- }));
-}
-
/** 浠� TypeEnums 閫夐」涓В鏋愭湰妯″潡鐨� businessType锛堜笌瀹℃壒鍒楄〃涓嬫媺涓�鑷达級 */
export function resolveModuleBusinessType(moduleKey, typeOptions = []) {
const cfg = getApprovalModuleConfig(moduleKey);
diff --git a/src/views/officeProcessAutomation/EnterpriseNews/news-manage/enterpriseNewsUtils.js b/src/views/officeProcessAutomation/EnterpriseNews/news-manage/enterpriseNewsUtils.js
index 9e74340..4ba3085 100644
--- a/src/views/officeProcessAutomation/EnterpriseNews/news-manage/enterpriseNewsUtils.js
+++ b/src/views/officeProcessAutomation/EnterpriseNews/news-manage/enterpriseNewsUtils.js
@@ -40,8 +40,6 @@
{ value: "editor", label: "鍐呭缂栬緫" },
];
-export const STORAGE_KEY = "oa_enterprise_news_v1";
-
/** 鐩爣鍙椾紬锛堝鎺ョ粍缁囨灦鏋� API 鍓嶄负绌猴級 */
export const MOCK_AUDIENCE = [];
@@ -114,49 +112,6 @@
};
}
-function buildReadRecords(readUserIds = []) {
- return (readUserIds || []).map((userId) => ({
- userId,
- employeeNo: "",
- name: "",
- deptName: "",
- readAt: "",
- lastRemindAt: "",
- }));
-}
-
-function createVersionSnapshot(row, changeNote = "鍙戝竷") {
- return {
- versionNo: row.versionNo || 1,
- title: row.title,
- summary: row.summary,
- contentHtml: row.contentHtml,
- newsType: row.newsType,
- publishTime: row.publishTime || dayjs().format("YYYY-MM-DD HH:mm:ss"),
- archivedAt: dayjs().format("YYYY-MM-DD HH:mm:ss"),
- changeNote,
- publisherName: row.publisherName || "绯荤粺",
- };
-}
-
-/** @deprecated 涓嶅啀娉ㄥ叆婕旂ず鏁版嵁锛屽垵濮嬪垪琛ㄤ负绌� */
-export function createInitialMockNews() {
- return [];
-}
-
-/** 涓嶅啀浣跨敤鍓嶇鏈湴缂撳瓨锛屽垪琛ㄦ暟鎹互鎺ュ彛涓哄噯锛涘苟娓呴櫎鍘嗗彶 localStorage 鏁版嵁 */
-export function loadStoredNews() {
- try {
- localStorage.removeItem(STORAGE_KEY);
- } catch {
- /* ignore */
- }
- return [];
-}
-
-/** @deprecated 淇濈暀绌哄疄鐜帮紝閬垮厤鏃ц皟鐢ㄦ姤閿欙紱涓嶅仛浠讳綍鎸佷箙鍖� */
-export function saveStoredNews() {}
-
/** 鎸夐槄璇昏寖鍥磋В鏋愮洰鏍囧彈浼� */
export function resolveTargetAudience(row) {
const scope = row.readScope || "all";
@@ -186,17 +141,6 @@
if (!audience.length) return 0;
const readCount = (row.readRecords || []).filter((r) => r.readAt).length;
return Math.round((readCount / audience.length) * 100);
-}
-
-export function nextNewsNo() {
- return `EN${dayjs().format("YYYYMMDD")}${String(Math.floor(Math.random() * 9000) + 1000)}`;
-}
-
-export function pushVersionBeforeUpdate(row, changeNote) {
- const versions = row.versions || [];
- versions.unshift(createVersionSnapshot(row, changeNote));
- row.versions = versions;
- row.versionNo = (row.versionNo || 1) + 1;
}
export function validateNewsForm(form) {
diff --git a/src/views/officeProcessAutomation/EnterpriseNews/news-manage/index.vue b/src/views/officeProcessAutomation/EnterpriseNews/news-manage/index.vue
index 29302a0..f444153 100644
--- a/src/views/officeProcessAutomation/EnterpriseNews/news-manage/index.vue
+++ b/src/views/officeProcessAutomation/EnterpriseNews/news-manage/index.vue
@@ -201,7 +201,7 @@
<!-- 璇︽儏 -->
<el-dialog v-model="detailDialog.visible" title="鏂伴椈璇︽儏" width="880px" append-to-body destroy-on-close>
- <NewsDetailPanel :row="detailNewsRow" @like="onDetailLike" @comment="onDetailComment" />
+ <NewsDetailPanel :row="detailNewsRow" />
<el-divider content-position="left">瀹℃壒淇℃伅</el-divider>
<ApproveDetailPanel :row="detailRow" />
<template #footer>
@@ -452,15 +452,12 @@
pagination(obj, searchForm);
}
-function onDetailLike() {
- /* 璇︽儏浜掑姩浠嶈蛋琛屽唴鏁版嵁锛屽埛鏂板垪琛ㄥ悗鏇存柊 */
-}
-
-function onDetailComment() {
- ElMessage.info("璇勮宸茶褰曪紙婕旂ず锛�");
-}
-
onMounted(async () => {
+ try {
+ localStorage.removeItem("oa_enterprise_news_v1");
+ } catch {
+ /* 娓呴櫎鍘嗗彶鏈湴婕旂ず缂撳瓨 */
+ }
loadFlowUsers();
await initModuleList(searchForm);
});
diff --git a/src/views/officeProcessAutomation/EnterpriseNews/news-manage/useEnterpriseNews.js b/src/views/officeProcessAutomation/EnterpriseNews/news-manage/useEnterpriseNews.js
deleted file mode 100644
index aeaa4ca..0000000
--- a/src/views/officeProcessAutomation/EnterpriseNews/news-manage/useEnterpriseNews.js
+++ /dev/null
@@ -1,431 +0,0 @@
-import { Search } from "@element-plus/icons-vue";
-import dayjs from "dayjs";
-import { ElMessageBox } from "element-plus";
-import { computed, onMounted, reactive, ref, watch } from "vue";
-import {
- NEWS_TYPE_OPTIONS,
- PUBLISH_STATUS_OPTIONS,
- LAYOUT_TEMPLATE_OPTIONS,
- READ_SCOPE_OPTIONS,
- PUBLISH_ROLE_OPTIONS,
- DEPT_OPTIONS,
- createEmptyForm,
- loadStoredNews,
- getUnreadEmployees,
- readRate,
- nextNewsNo,
- pushVersionBeforeUpdate,
- validateNewsForm,
- newsTypeLabel,
- publishStatusLabel,
-} from "./enterpriseNewsUtils.js";
-
-export function useEnterpriseNews() {
- const allRows = ref([]);
-
- const searchForm = reactive({
- keyword: "",
- newsType: "",
- publishStatus: "",
- publishTimeRange: [],
- });
-
- const tableLoading = ref(false);
- const page = reactive({ current: 1, size: 10, total: 0 });
-
- const formDialog = reactive({ visible: false, title: "", mode: "add", readonly: false });
- const form = reactive(createEmptyForm());
- const formRef = ref();
-
- const detailDialog = reactive({ visible: false });
- const detailRow = ref({});
-
- const unreadDialog = reactive({ visible: false, row: null });
- const unreadSelection = ref([]);
-
- const versionDialog = reactive({ visible: false, row: null });
-
- const filteredList = computed(() => {
- let list = [...allRows.value];
- const kw = (searchForm.keyword || "").trim().toLowerCase();
- if (kw) {
- list = list.filter((r) => {
- const title = (r.title || "").toLowerCase();
- const summary = (r.summary || "").toLowerCase();
- const no = (r.newsNo || "").toLowerCase();
- return title.includes(kw) || summary.includes(kw) || no.includes(kw);
- });
- }
- if (searchForm.newsType) {
- list = list.filter((r) => r.newsType === searchForm.newsType);
- }
- if (searchForm.publishStatus) {
- list = list.filter((r) => r.publishStatus === searchForm.publishStatus);
- }
- const range = searchForm.publishTimeRange;
- if (range?.length === 2 && range[0] && range[1]) {
- const start = dayjs(range[0]).startOf("day");
- const end = dayjs(range[1]).endOf("day");
- list = list.filter((r) => {
- if (!r.publishTime) return false;
- const t = dayjs(r.publishTime);
- return t.isAfter(start) && t.isBefore(end);
- });
- }
- return list.sort((a, b) => (String(a.updateTime) < String(b.updateTime) ? 1 : -1));
- });
-
- watch(
- filteredList,
- (list) => {
- page.total = list.length;
- const maxPage = Math.max(1, Math.ceil(list.length / page.size) || 1);
- if (page.current > maxPage) page.current = maxPage;
- },
- { immediate: true }
- );
-
- const tableData = computed(() => {
- const start = (page.current - 1) * page.size;
- return filteredList.value.slice(start, start + page.size);
- });
-
- const unreadList = computed(() => {
- if (!unreadDialog.row) return [];
- return getUnreadEmployees(unreadDialog.row);
- });
-
- const formRules = {
- title: [{ required: true, message: "璇疯緭鍏ユ柊闂绘爣棰�", trigger: "blur" }],
- newsType: [{ required: true, message: "璇烽�夋嫨鏂伴椈鍒嗙被", trigger: "change" }],
- readScope: [{ required: true, message: "璇烽�夋嫨闃呰鑼冨洿", trigger: "change" }],
- };
-
- const tableColumn = ref([
- { label: "缂栧彿", prop: "newsNo", width: 150 },
- { label: "鏍囬", prop: "title", minWidth: 180, showOverflowTooltip: true },
- {
- label: "鍒嗙被",
- prop: "newsType",
- width: 100,
- dataType: "slot",
- slot: "newsType",
- },
- {
- label: "鐘舵��",
- prop: "publishStatus",
- width: 90,
- dataType: "tag",
- formatData: (v) => publishStatusLabel(v),
- formatType: (v) => {
- const hit = PUBLISH_STATUS_OPTIONS.find((x) => x.value === v);
- return hit?.tag || "info";
- },
- },
- {
- label: "闃呰鐜�",
- prop: "readRecords",
- width: 90,
- align: "center",
- formatData: (_, row) => `${readRate(row)}%`,
- },
- {
- label: "鏈",
- prop: "id",
- width: 70,
- align: "center",
- formatData: (_, row) => {
- if (row.publishStatus !== "published") return "鈥�";
- return getUnreadEmployees(row).length;
- },
- },
- { label: "鍙戝竷浜�", prop: "publisherName", width: 110 },
- { label: "鍙戝竷鏃堕棿", prop: "publishTime", width: 170 },
- { label: "鏇存柊鏃堕棿", prop: "updateTime", width: 170 },
- {
- dataType: "action",
- label: "鎿嶄綔",
- align: "center",
- fixed: "right",
- width: 280,
- operation: [
- { name: "璇︽儏", type: "text", clickFun: (row) => openDetail(row) },
- {
- name: "缂栬緫",
- type: "text",
- disabled: (row) => row.publishStatus === "archived",
- clickFun: (row) => openFormDialog("edit", row),
- },
- {
- name: "瀹℃牳",
- type: "text",
- disabled: (row) => row.publishStatus !== "pending_review",
- clickFun: (row) => openReview(row),
- },
- {
- name: "鏈鎻愰啋",
- type: "text",
- disabled: (row) =>
- row.publishStatus !== "published" || getUnreadEmployees(row).length === 0,
- clickFun: (row) => openUnreadRemind(row),
- },
- { name: "鐗堟湰鐣欒瘉", type: "text", clickFun: (row) => openVersionHistory(row) },
- ],
- },
- ]);
-
- onMounted(() => {
- loadStoredNews();
- });
-
- function handleQuery() {
- tableLoading.value = true;
- page.current = 1;
- setTimeout(() => {
- tableLoading.value = false;
- }, 200);
- }
-
- function resetSearch() {
- searchForm.keyword = "";
- searchForm.newsType = "";
- searchForm.publishStatus = "";
- searchForm.publishTimeRange = [];
- handleQuery();
- }
-
- function pagination({ page: p, limit }) {
- page.current = p;
- page.size = limit;
- }
-
- function resetForm(target = createEmptyForm()) {
- Object.assign(form, createEmptyForm(), target);
- }
-
- function openFormDialog(mode, row) {
- formDialog.mode = mode;
- formDialog.readonly = mode === "view";
- formDialog.title =
- mode === "add" ? "鏂板缓浼佷笟鏂伴椈" : mode === "edit" ? "缂栬緫浼佷笟鏂伴椈" : "鏌ョ湅浼佷笟鏂伴椈";
- if (mode === "add") {
- resetForm({ publisherName: "褰撳墠鐢ㄦ埛" });
- } else {
- resetForm({
- ...JSON.parse(JSON.stringify(row)),
- targetDeptIds: [...(row.targetDeptIds || [])],
- targetUserIds: [...(row.targetUserIds || [])],
- mediaList: [...(row.mediaList || [])],
- attachmentList: [...(row.attachmentList || [])],
- });
- }
- formDialog.visible = true;
- }
-
- function openDetail(row) {
- detailRow.value = { ...row };
- detailDialog.visible = true;
- }
-
- function openUnreadRemind(row) {
- unreadDialog.row = row;
- unreadSelection.value = [];
- unreadDialog.visible = true;
- }
-
- function openVersionHistory(row) {
- versionDialog.row = row;
- versionDialog.visible = true;
- }
-
- async function openReview(row) {
- try {
- await ElMessageBox.confirm(
- `纭瀹℃牳閫氳繃骞跺彂甯冦��${row.title}銆嶏紵澶栭儴/琛屼笟绫绘柊闂婚渶绠$悊鍛樺鏍搞�俙,
- "瀹℃牳鍙戝竷",
- { type: "warning", confirmButtonText: "閫氳繃骞跺彂甯�", cancelButtonText: "鍙栨秷" }
- );
- const hit = allRows.value.find((r) => r.id === row.id);
- if (!hit) return;
- hit.publishStatus = "published";
- hit.publishTime = dayjs().format("YYYY-MM-DD HH:mm:ss");
- hit.updateTime = hit.publishTime;
- if (!hit.readRecords?.length) {
- hit.readRecords = [];
- }
- return true;
- } catch {
- return false;
- }
- }
-
- function saveForm(submitAction = "save") {
- const v = validateNewsForm(form);
- if (!v.ok) return { ok: false, message: v.message };
-
- const now = dayjs().format("YYYY-MM-DD HH:mm:ss");
- const payload = {
- ...JSON.parse(JSON.stringify(form)),
- title: v.title,
- updateTime: now,
- };
-
- if (formDialog.mode === "add") {
- payload.id = `news_${Date.now()}`;
- payload.newsNo = nextNewsNo();
- payload.createTime = now;
- if (submitAction === "submit_review") {
- payload.publishStatus = "pending_review";
- } else if (submitAction === "publish") {
- payload.publishStatus = "published";
- payload.publishTime = now;
- } else {
- payload.publishStatus = "draft";
- }
- allRows.value.unshift(payload);
- } else {
- const idx = allRows.value.findIndex((r) => r.id === form.id);
- if (idx < 0) return { ok: false, message: "璁板綍涓嶅瓨鍦�" };
- const prev = allRows.value[idx];
- if (prev.publishStatus === "published" && submitAction !== "draft") {
- pushVersionBeforeUpdate(prev, submitAction === "publish" ? "淇鍙戝竷" : "鍐呭鏇存柊");
- }
- if (submitAction === "submit_review") {
- payload.publishStatus = "pending_review";
- } else if (submitAction === "publish") {
- payload.publishStatus = "published";
- payload.publishTime = payload.publishTime || now;
- }
- payload.versions = prev.versions || [];
- payload.versionNo = prev.versionNo || 1;
- if (prev.publishStatus === "published" && submitAction === "publish") {
- payload.versionNo = (prev.versionNo || 1) + 1;
- }
- allRows.value[idx] = { ...prev, ...payload };
- }
- formDialog.visible = false;
- return { ok: true };
- }
-
- function archiveNews(row) {
- const hit = allRows.value.find((r) => r.id === row.id);
- if (hit) {
- hit.publishStatus = "archived";
- hit.updateTime = dayjs().format("YYYY-MM-DD HH:mm:ss");
- }
- }
-
- function sendUnreadRemind(selectedIds) {
- const row = unreadDialog.row;
- if (!row || !selectedIds?.length) return { ok: false, message: "璇烽�夋嫨瑕佹彁閱掔殑鍛樺伐" };
- const hit = allRows.value.find((r) => r.id === row.id);
- if (!hit) return { ok: false };
-
- const now = dayjs().format("YYYY-MM-DD HH:mm:ss");
- hit.remindLogs = hit.remindLogs || [];
- hit.remindLogs.push({
- time: now,
- count: selectedIds.length,
- operator: "HR",
- userIds: [...selectedIds],
- });
-
- const records = hit.readRecords || [];
- selectedIds.forEach((uid) => {
- let rec = records.find((r) => r.userId === uid);
- if (!rec) {
- const emp = getUnreadEmployees(hit).find((e) => e.userId === uid);
- rec = {
- userId: uid,
- employeeNo: emp?.employeeNo || "",
- name: emp?.name || "",
- deptName: emp?.deptName || "",
- readAt: "",
- lastRemindAt: now,
- };
- records.push(rec);
- } else {
- rec.lastRemindAt = now;
- }
- });
- hit.readRecords = records;
- hit.updateTime = now;
- unreadDialog.visible = false;
- return { ok: true, count: selectedIds.length };
- }
-
- function toggleLike(row, userId = "", userName = "") {
- const hit = allRows.value.find((r) => r.id === row.id);
- if (!hit) return;
- hit.likes = hit.likes || [];
- const idx = hit.likes.findIndex((l) => l.userId === userId);
- if (idx >= 0) {
- hit.likes.splice(idx, 1);
- } else {
- hit.likes.push({ userId, name: userName, time: dayjs().format("YYYY-MM-DD HH:mm:ss") });
- }
- if (detailRow.value?.id === row.id) {
- detailRow.value = { ...hit };
- }
- }
-
- function addComment(row, content, userId = "", userName = "") {
- const text = (content || "").trim();
- if (!text) return { ok: false, message: "璇疯緭鍏ヨ瘎璁哄唴瀹�" };
- const hit = allRows.value.find((r) => r.id === row.id);
- if (!hit) return { ok: false };
- hit.comments = hit.comments || [];
- hit.comments.push({
- id: `c_${Date.now()}`,
- userId,
- name: userName,
- content: text,
- time: dayjs().format("YYYY-MM-DD HH:mm:ss"),
- });
- if (detailRow.value?.id === row.id) {
- detailRow.value = { ...hit };
- }
- return { ok: true };
- }
-
- return {
- Search,
- NEWS_TYPE_OPTIONS,
- PUBLISH_STATUS_OPTIONS,
- LAYOUT_TEMPLATE_OPTIONS,
- READ_SCOPE_OPTIONS,
- PUBLISH_ROLE_OPTIONS,
- DEPT_OPTIONS,
- newsTypeLabel,
- searchForm,
- tableLoading,
- page,
- tableData,
- tableColumn,
- formDialog,
- form,
- formRef,
- formRules,
- detailDialog,
- detailRow,
- unreadDialog,
- unreadList,
- unreadSelection,
- versionDialog,
- getUnreadEmployees,
- readRate,
- handleQuery,
- resetSearch,
- pagination,
- openFormDialog,
- openDetail,
- openUnreadRemind,
- openVersionHistory,
- openReview,
- saveForm,
- archiveNews,
- sendUnreadRemind,
- toggleLike,
- addComment,
- };
-}
diff --git a/src/views/officeProcessAutomation/HrManage/resign-apply/index.vue b/src/views/officeProcessAutomation/HrManage/resign-apply/index.vue
index 5ef0cf9..2b20970 100644
--- a/src/views/officeProcessAutomation/HrManage/resign-apply/index.vue
+++ b/src/views/officeProcessAutomation/HrManage/resign-apply/index.vue
@@ -19,7 +19,6 @@
<div>
<el-button type="primary" @click="openForm('add')">鏂板绂昏亴</el-button>
<el-button @click="handleOut">瀵煎嚭</el-button>
- <!-- <el-button type="danger" plain @click="handleDelete">鍒犻櫎</el-button> -->
</div>
</div>
<div class="table_list">
@@ -43,7 +42,7 @@
import { Search } from "@element-plus/icons-vue";
import {onMounted, ref} from "vue";
import FormDia from "@/views/personnelManagement/dimission/components/formDia.vue";
-import {findStaffLeaveListPage, batchDeleteStaffLeaves} from "@/api/personnelManagement/staffLeave.js";
+import { findStaffLeaveListPage } from "@/api/personnelManagement/staffLeave.js";
import {ElMessageBox} from "element-plus";
const data = reactive({
@@ -198,30 +197,6 @@
})
};
-// 鍒犻櫎
-const handleDelete = () => {
- let ids = [];
- if (selectedRows.value.length > 0) {
- ids = selectedRows.value.map((item) => item.id);
- } else {
- proxy.$modal.msgWarning("璇烽�夋嫨鏁版嵁");
- return;
- }
- ElMessageBox.confirm("閫変腑鐨勫唴瀹瑰皢琚垹闄わ紝鏄惁纭鍒犻櫎锛�", "瀵煎嚭", {
- confirmButtonText: "纭",
- cancelButtonText: "鍙栨秷",
- type: "warning",
- })
- .then(() => {
- batchDeleteStaffLeaves(ids).then((res) => {
- proxy.$modal.msgSuccess("鍒犻櫎鎴愬姛");
- getList();
- });
- })
- .catch(() => {
- proxy.$modal.msg("宸插彇娑�");
- });
-};
// 瀵煎嚭
const handleOut = () => {
ElMessageBox.confirm("閫変腑鐨勫唴瀹瑰皢琚鍑猴紝鏄惁纭瀵煎嚭锛�", "瀵煎嚭", {
diff --git a/src/views/officeProcessAutomation/HrManage/staff-archive/components/Show.vue b/src/views/officeProcessAutomation/HrManage/staff-archive/components/Show.vue
index 9220d45..5d0b261 100644
--- a/src/views/officeProcessAutomation/HrManage/staff-archive/components/Show.vue
+++ b/src/views/officeProcessAutomation/HrManage/staff-archive/components/Show.vue
@@ -31,10 +31,6 @@
const dialogFormVisible = ref(false);
const operationType = ref('')
const tableColumn = ref([
- // {
- // label: "鍚堝悓骞撮檺",
- // prop: "contractTerm",
- // },
{
label: "鍚堝悓寮�濮嬫棩鏈�",
prop: "contractStartTime",
diff --git a/src/views/officeProcessAutomation/HrManage/staff-archive/index.vue b/src/views/officeProcessAutomation/HrManage/staff-archive/index.vue
index c0d8b2b..66cec7a 100644
--- a/src/views/officeProcessAutomation/HrManage/staff-archive/index.vue
+++ b/src/views/officeProcessAutomation/HrManage/staff-archive/index.vue
@@ -28,9 +28,6 @@
format="YYYY-MM-DD"
placeholder="璇烽�夋嫨"
/>
- <!-- <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
>
@@ -39,7 +36,6 @@
<el-button type="primary" @click="openFormNewOrEditFormDia('add')">鏂板鍏ヨ亴</el-button>
<el-button type="info" @click="handleImport">瀵煎叆</el-button>
<el-button @click="handleOut">瀵煎嚭</el-button>
- <!-- <el-button type="danger" plain @click="handleDelete">鍒犻櫎</el-button> -->
</div>
</div>
<div class="table_list">
@@ -102,7 +98,7 @@
import {onMounted, ref} from "vue";
import {ElMessageBox} from "element-plus";
import { deptTreeSelect } from "@/api/system/user.js";
-import {batchDeleteStaffOnJobs, staffOnJobListPage} from "@/api/personnelManagement/staffOnJob.js";
+import { staffOnJobListPage } from "@/api/personnelManagement/staffOnJob.js";
import { getToken } from "@/utils/auth";
import dayjs from "dayjs";
@@ -218,13 +214,6 @@
id.value = row.id;
},
},
- // {
- // name: "璇︽儏",
- // type: "text",
- // clickFun: (row) => {
- // openForm("edit", row);
- // },
- // },
],
},
]);
@@ -257,7 +246,6 @@
const fetchDeptOptions = () => {
deptTreeSelect().then(response => {
- console.log(response.data)
deptOptions.value = filterDisabledDept(
JSON.parse(JSON.stringify(response.data))
);
@@ -274,16 +262,6 @@
return true;
});
};
-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 = () => {
page.current = 1;
@@ -322,31 +300,6 @@
nextTick(() => {
formDiaNewOrEditFormDia.value?.openDialog(type, row)
})
-};
-
-// 鍒犻櫎
-const handleDelete = () => {
- let ids = [];
- if (selectedRows.value.length > 0) {
- ids = selectedRows.value.map((item) => item.id);
- } else {
- proxy.$modal.msgWarning("璇烽�夋嫨鏁版嵁");
- return;
- }
- ElMessageBox.confirm("閫変腑鐨勫唴瀹瑰皢琚垹闄わ紝鏄惁纭鍒犻櫎锛�", "瀵煎嚭", {
- confirmButtonText: "纭",
- cancelButtonText: "鍙栨秷",
- type: "warning",
- })
- .then(() => {
- batchDeleteStaffOnJobs(ids).then((res) => {
- proxy.$modal.msgSuccess("鍒犻櫎鎴愬姛");
- getList();
- });
- })
- .catch(() => {
- proxy.$modal.msg("宸插彇娑�");
- });
};
// 瀵煎嚭
diff --git a/src/views/officeProcessAutomation/HrManage/staff-contract/index.vue b/src/views/officeProcessAutomation/HrManage/staff-contract/index.vue
index 1125445..f44f9f3 100644
--- a/src/views/officeProcessAutomation/HrManage/staff-contract/index.vue
+++ b/src/views/officeProcessAutomation/HrManage/staff-contract/index.vue
@@ -46,13 +46,6 @@
<template #tip>
<div class="el-upload__tip text-center">
<span>浠呭厑璁稿鍏ls銆亁lsx鏍煎紡鏂囦欢銆�</span>
- <!-- <el-link
- type="primary"
- :underline="false"
- style="font-size: 12px; vertical-align: baseline"
- @click="importTemplate"
- >涓嬭浇妯℃澘</el-link
- > -->
</div>
</template>
</el-upload>
@@ -162,15 +155,6 @@
prop: "emergencyContactPhone",
width: 150
},
- // {
- // label: "鍚堝悓骞撮檺",
- // prop: "contractTerm",
- // },
- // {
- // label: "鍚堝悓寮�濮嬫棩鏈�",
- // prop: "contractStartTime",
- // width: 120
- // },
{
label: "鍚堝悓缁撴潫鏃ユ湡",
prop: "contractExpireTime",
@@ -216,7 +200,6 @@
};
// 鎵撳紑闄勪欢寮规
const openFilesFormDia = (row) => {
- console.log(row)
nextTick(() => {
filesDia.value?.openDialog( row,'鍚堝悓')
})
@@ -291,7 +274,6 @@
}
/** 鎻愪氦涓婁紶鏂囦欢 */
function submitFileForm() {
- console.log(upload.url + '?updateSupport=' + upload.updateSupport)
proxy.$refs["uploadRef"].submit();
}
/**鏂囦欢涓婁紶涓鐞� */
diff --git a/src/views/officeProcessAutomation/NoticeAnnouncement/notice-manage/noticeAnnouncementUtils.js b/src/views/officeProcessAutomation/NoticeAnnouncement/notice-manage/noticeAnnouncementUtils.js
index 7f420c9..7fe3d6d 100644
--- a/src/views/officeProcessAutomation/NoticeAnnouncement/notice-manage/noticeAnnouncementUtils.js
+++ b/src/views/officeProcessAutomation/NoticeAnnouncement/notice-manage/noticeAnnouncementUtils.js
@@ -38,8 +38,6 @@
{ value: "106", label: "浜哄姏璧勬簮閮�" },
];
-export const STORAGE_KEY = "oa_notice_announcement_v1";
-
export function noticeTypeLabel(v) {
return NOTICE_TYPE_OPTIONS.find((x) => x.value === v)?.label || v || "鈥�";
}
@@ -89,24 +87,6 @@
updateTime: "",
};
}
-
-/** @deprecated 涓嶅啀娉ㄥ叆婕旂ず鏁版嵁锛屽垵濮嬪垪琛ㄤ负绌� */
-export function createInitialMockNotices() {
- return [];
-}
-
-/** 涓嶅啀浣跨敤鍓嶇鏈湴缂撳瓨锛屽垪琛ㄦ暟鎹互鎺ュ彛涓哄噯锛涘苟娓呴櫎鍘嗗彶 localStorage 鏁版嵁 */
-export function loadStoredNotices() {
- try {
- localStorage.removeItem(STORAGE_KEY);
- } catch {
- /* ignore */
- }
- return [];
-}
-
-/** @deprecated 淇濈暀绌哄疄鐜帮紝閬垮厤鏃ц皟鐢ㄦ姤閿欙紱涓嶅仛浠讳綍鎸佷箙鍖� */
-export function saveStoredNotices() {}
export function nextNoticeNo() {
return `NA${dayjs().format("YYYYMMDD")}${String(Math.floor(Math.random() * 9000) + 1000)}`;
diff --git a/src/views/officeProcessAutomation/NoticeAnnouncement/notice-manage/useNoticeAnnouncement.js b/src/views/officeProcessAutomation/NoticeAnnouncement/notice-manage/useNoticeAnnouncement.js
index 1858fdb..67281c4 100644
--- a/src/views/officeProcessAutomation/NoticeAnnouncement/notice-manage/useNoticeAnnouncement.js
+++ b/src/views/officeProcessAutomation/NoticeAnnouncement/notice-manage/useNoticeAnnouncement.js
@@ -9,7 +9,6 @@
READ_SCOPE_OPTIONS,
DEPT_OPTIONS,
createEmptyForm,
- loadStoredNotices,
nextNoticeNo,
validateNoticeForm,
noticeTypeLabel,
@@ -150,7 +149,11 @@
]);
onMounted(() => {
- loadStoredNotices();
+ try {
+ localStorage.removeItem("oa_notice_announcement_v1");
+ } catch {
+ /* 娓呴櫎鍘嗗彶鏈湴婕旂ず缂撳瓨 */
+ }
});
function handleQuery() {
--
Gitblit v1.9.3