tx-sider 2.3.26 → 2.3.27

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/TXUI.mjs CHANGED
@@ -54446,6 +54446,7 @@ function useCcflowCall() {
54446
54446
  const ccflowData = reactive({
54447
54447
  todoList: 0,
54448
54448
  messageList: 0,
54449
+ lingDangList: 0,
54449
54450
  menuNumsList: [],
54450
54451
  newVersionList: []
54451
54452
  });
@@ -54454,9 +54455,6 @@ function useCcflowCall() {
54454
54455
  connection.value.on("GetNum", (res) => {
54455
54456
  ccflowData.todoList = res;
54456
54457
  });
54457
- connection.value.on("MenuNums", (res) => {
54458
- ccflowData.menuNumsList = JSON.parse(res);
54459
- });
54460
54458
  connection.value.on("PublishNewVersion", (res) => {
54461
54459
  ccflowData.newVersionList = res;
54462
54460
  });
@@ -54465,10 +54463,14 @@ function useCcflowCall() {
54465
54463
  ccflowData.messageList = "";
54466
54464
  ccflowData.messageList = res;
54467
54465
  });
54466
+ connection.value.on("UpdateTodoCount", (res) => {
54467
+ console.log("UpdateTodoCount", "获取数据:", res);
54468
+ ccflowData.lingDangList = "";
54469
+ ccflowData.lingDangList = res;
54470
+ });
54468
54471
  connection.value.onreconnected(async (id2) => {
54469
54472
  var _a2, _b2;
54470
54473
  await connection.value.invoke("Start");
54471
- await connection.value.invoke("MenuNums");
54472
54474
  await connection.value.invoke(
54473
54475
  "NewVersion",
54474
54476
  (_a2 = JSON.parse(localStorage.getItem("selectModule"))) == null ? void 0 : _a2.location,
@@ -54480,7 +54482,6 @@ function useCcflowCall() {
54480
54482
  var _a2, _b2;
54481
54483
  console.log("启动即时通信成功");
54482
54484
  await connection.value.invoke("Start");
54483
- await connection.value.invoke("MenuNums");
54484
54485
  await connection.value.invoke(
54485
54486
  "NewVersion",
54486
54487
  (_a2 = JSON.parse(localStorage.getItem("selectModule"))) == null ? void 0 : _a2.location,
@@ -54649,13 +54650,19 @@ const _sfc_main = {
54649
54650
  const menuList = ref();
54650
54651
  const goUrl = ref();
54651
54652
  const unReadCount = ref();
54652
- const getUnReadMessage = async () => {
54653
- const result = await GetUnReadCountList();
54654
- unReadCount.value = result ?? 0;
54653
+ const unLingDangCount = ref();
54654
+ const getUnReadMessage = async (type4) => {
54655
+ const result = await GetUnReadCountList({ type: type4 });
54656
+ if (type4 === 0) {
54657
+ unReadCount.value = result ?? 0;
54658
+ } else {
54659
+ unLingDangCount.value = result ?? 0;
54660
+ }
54655
54661
  };
54656
54662
  onMounted(async () => {
54657
54663
  var _a3, _b2, _c2, _d2, _e2, _f2;
54658
- await getUnReadMessage();
54664
+ await getUnReadMessage(0);
54665
+ await getUnReadMessage(1);
54659
54666
  getModeuleInfoDataHandle = await getModeuleInfoData();
54660
54667
  isShowAllProductionBases.value = (_a3 = getModeuleInfoDataHandle(
54661
54668
  window.location.hostname.split(".")[0]
@@ -54913,7 +54920,9 @@ const _sfc_main = {
54913
54920
  const setOfBookId = ref();
54914
54921
  const baseId = ref();
54915
54922
  const refreshSystemHostname = window.location.hostname.split(".");
54916
- const refreshSystemDomain = refreshSystemHostname.length === 1 ? "localhost" : "." + [refreshSystemHostname.at(-2), refreshSystemHostname.at(-1)].join(".");
54923
+ const refreshSystemDomain = refreshSystemHostname.length === 1 ? "localhost" : "." + [refreshSystemHostname.at(-2), refreshSystemHostname.at(-1)].join(
54924
+ "."
54925
+ );
54917
54926
  const isChangeTokenRefreshFlag = () => location.hash.includes("changeTokenRefreshFlag");
54918
54927
  const setCureentSetOfBookId = (res) => {
54919
54928
  setSetOfBookIdToLocalAndPage(res);
@@ -55273,7 +55282,24 @@ const _sfc_main = {
55273
55282
  );
55274
55283
  if (newVal && newVal == ((_b2 = JSON.parse(localStorage.getItem("userInfos"))) == null ? void 0 : _b2.userId)) {
55275
55284
  console.log("相等");
55276
- await getUnReadMessage();
55285
+ await getUnReadMessage(0);
55286
+ }
55287
+ },
55288
+ { deep: true }
55289
+ );
55290
+ watch(
55291
+ () => ccflowData.lingDangList,
55292
+ async (newVal) => {
55293
+ var _a3, _b2;
55294
+ console.log("ccflowData.lingDangList", ccflowData.lingDangList);
55295
+ console.log("newVal", newVal);
55296
+ console.log(
55297
+ 'JSON.parse(localStorage.getItem("userInfos"))?.userId',
55298
+ (_a3 = JSON.parse(localStorage.getItem("userInfos"))) == null ? void 0 : _a3.userId
55299
+ );
55300
+ if (newVal && newVal == ((_b2 = JSON.parse(localStorage.getItem("userInfos"))) == null ? void 0 : _b2.userId)) {
55301
+ console.log("相等");
55302
+ await getUnReadMessage(1);
55277
55303
  }
55278
55304
  },
55279
55305
  { deep: true }
@@ -55340,7 +55366,9 @@ const _sfc_main = {
55340
55366
  var _a3;
55341
55367
  console.log("已读");
55342
55368
  try {
55343
- await setUserRead((_a3 = JSON.parse(localStorage.getItem("userInfos"))) == null ? void 0 : _a3.userId);
55369
+ await setUserRead(
55370
+ (_a3 = JSON.parse(localStorage.getItem("userInfos"))) == null ? void 0 : _a3.userId
55371
+ );
55344
55372
  isModuleVersionUpdate.value = false;
55345
55373
  } catch (error) {
55346
55374
  isModuleVersionUpdate.value = false;
@@ -55424,7 +55452,7 @@ const _sfc_main = {
55424
55452
  };
55425
55453
  }
55426
55454
  };
55427
- const _withScopeId = (n10) => (pushScopeId("data-v-b5010672"), n10 = n10(), popScopeId(), n10);
55455
+ const _withScopeId = (n10) => (pushScopeId("data-v-9c260332"), n10 = n10(), popScopeId(), n10);
55428
55456
  const _hoisted_1 = {
55429
55457
  class: "bg-white defaultTS funcTC relative",
55430
55458
  style: { "padding-bottom": "10px", "margin-bottom": "10px" }
@@ -55961,7 +55989,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
55961
55989
  }, 8, ["onClick", "count"]),
55962
55990
  createVNode(_component_a_badge, {
55963
55991
  onClick: $setup.onClickTodo,
55964
- count: $setup.ccflowData.todoList,
55992
+ count: _ctx.unLingDangCount,
55965
55993
  "number-style": {
55966
55994
  backgroundColor: "#52c41a",
55967
55995
  fontSize: "12px",
@@ -56581,7 +56609,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
56581
56609
  }, 8, ["show"])
56582
56610
  ], 64);
56583
56611
  }
56584
- const TSider = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-b5010672"]]);
56612
+ const TSider = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-9c260332"]]);
56585
56613
  const style = "";
56586
56614
  const components = [TSider];
56587
56615
  installComponents();