yyb
3 小时以前 efc0c3a697969503634138d7881543f4099b81ca
src/views/officeProcessAutomation/EnterpriseNews/news-manage/useEnterpriseNews.js
@@ -10,7 +10,6 @@
  PUBLISH_ROLE_OPTIONS,
  DEPT_OPTIONS,
  createEmptyForm,
  createInitialMockNews,
  loadStoredNews,
  saveStoredNews,
  getUnreadEmployees,
@@ -24,7 +23,7 @@
export function useEnterpriseNews() {
  const stored = loadStoredNews();
  const allRows = ref(stored?.length ? stored : createInitialMockNews());
  const allRows = ref(stored?.length ? stored : []);
  const searchForm = reactive({
    keyword: "",
@@ -361,7 +360,7 @@
    return { ok: true, count: selectedIds.length };
  }
  function toggleLike(row, userId = "u1", userName = "张三") {
  function toggleLike(row, userId = "", userName = "") {
    const hit = allRows.value.find((r) => r.id === row.id);
    if (!hit) return;
    hit.likes = hit.likes || [];
@@ -377,7 +376,7 @@
    }
  }
  function addComment(row, content, userId = "u1", userName = "张三") {
  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);