tx-sider 2.3.14 → 2.3.16

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
@@ -27930,7 +27930,10 @@ const getPermissionModuleList = (data3) => {
27930
27930
  });
27931
27931
  };
27932
27932
  const getPermissionSetOfBookList = (modulePermissionName, data3) => {
27933
- console.log("🚀 ~ getPermissionSetOfBookList ~ modulePermissionName:", modulePermissionName);
27933
+ console.log(
27934
+ "🚀 ~ getPermissionSetOfBookList ~ modulePermissionName:",
27935
+ modulePermissionName
27936
+ );
27934
27937
  return cwRequest({
27935
27938
  url: `/api/basis-management/userrolesetofbookpermission/getPermissionSetOfBookList/${modulePermissionName}`,
27936
27939
  method: "get",
@@ -27967,6 +27970,14 @@ const GetVersionManageAllList = (data3) => {
27967
27970
  requestBase: "USER_BASE_URL"
27968
27971
  });
27969
27972
  };
27973
+ const GetUnReadCountList = (data3) => {
27974
+ return cwRequest({
27975
+ url: "/api/basis-management/PersonalInform/getUnReadCount",
27976
+ method: "get",
27977
+ data: data3,
27978
+ requestBase: "USER_BASE_URL"
27979
+ });
27980
+ };
27970
27981
  var e = "undefined" != typeof globalThis ? globalThis : "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof self ? self : {};
27971
27982
  function t(e10) {
27972
27983
  return e10 && e10.__esModule && Object.prototype.hasOwnProperty.call(e10, "default") ? e10.default : e10;
@@ -54443,18 +54454,18 @@ function useCcflowCall() {
54443
54454
  connection.value.on("GetNum", (res) => {
54444
54455
  ccflowData.todoList = res;
54445
54456
  });
54446
- connection.value.on("GetPersonUnReadCount", (res) => {
54447
- console.log("GetPersonUnReadCount", "获取数据:", res);
54448
- ccflowData.messageList = res;
54449
- });
54450
54457
  connection.value.on("MenuNums", (res) => {
54451
54458
  ccflowData.menuNumsList = JSON.parse(res);
54452
54459
  });
54453
54460
  connection.value.on("PublishNewVersion", (res) => {
54454
54461
  ccflowData.newVersionList = res;
54455
54462
  });
54463
+ connection.value.on("GetPersonUnReadCount", (res) => {
54464
+ console.log("GetPersonUnReadCount", "获取数据:", res);
54465
+ ccflowData.messageList = res;
54466
+ });
54456
54467
  connection.value.onreconnected(async (id2) => {
54457
- var _a2, _b2, _c2;
54468
+ var _a2, _b2;
54458
54469
  await connection.value.invoke("Start");
54459
54470
  await connection.value.invoke("MenuNums");
54460
54471
  await connection.value.invoke(
@@ -54462,10 +54473,6 @@ function useCcflowCall() {
54462
54473
  (_a2 = JSON.parse(localStorage.getItem("selectModule"))) == null ? void 0 : _a2.location,
54463
54474
  (_b2 = JSON.parse(localStorage.getItem("userInfos"))) == null ? void 0 : _b2.userId
54464
54475
  );
54465
- await connection.value.invoke(
54466
- "PersonUnReadCount",
54467
- (_c2 = JSON.parse(localStorage.getItem("userInfos"))) == null ? void 0 : _c2.userId
54468
- );
54469
54476
  });
54470
54477
  if (connection.value.state !== HubConnectionState.Connected) {
54471
54478
  connection.value.start().then(async () => {
@@ -54644,8 +54651,14 @@ const _sfc_main = {
54644
54651
  ref();
54645
54652
  const menuList = ref();
54646
54653
  const goUrl = ref();
54654
+ const unReadCount = ref();
54655
+ const getUnReadMessage = async () => {
54656
+ const result = await GetUnReadCountList();
54657
+ unReadCount.value = result ?? 0;
54658
+ };
54647
54659
  onMounted(async () => {
54648
54660
  var _a3, _b2, _c2, _d2, _e2, _f2;
54661
+ await getUnReadMessage();
54649
54662
  getModeuleInfoDataHandle = await getModeuleInfoData();
54650
54663
  isShowAllProductionBases.value = (_a3 = getModeuleInfoDataHandle(
54651
54664
  window.location.hostname.split(".")[0]
@@ -55251,6 +55264,18 @@ const _sfc_main = {
55251
55264
  },
55252
55265
  { deep: true }
55253
55266
  );
55267
+ watch(
55268
+ () => ccflowData.messageList,
55269
+ async (newVal) => {
55270
+ var _a3;
55271
+ console.log("ccflowData.messageList", ccflowData.messageList);
55272
+ console.log("newVal", newVal);
55273
+ if (newVal && newVal == ((_a3 = JSON.parse(localStorage.getItem("userInfos"))) == null ? void 0 : _a3.userId)) {
55274
+ await getUnReadMessage();
55275
+ }
55276
+ },
55277
+ { deep: true }
55278
+ );
55254
55279
  const tableOptionRef = ref([
55255
55280
  {
55256
55281
  title: "序号",
@@ -55379,6 +55404,7 @@ const _sfc_main = {
55379
55404
  getModuleVersion,
55380
55405
  moduleVersion,
55381
55406
  isModuleVersionUpdate,
55407
+ getUnReadMessage,
55382
55408
  tableOptionRef,
55383
55409
  tableData,
55384
55410
  dayjs,
@@ -55390,12 +55416,13 @@ const _sfc_main = {
55390
55416
  activeKey,
55391
55417
  content,
55392
55418
  changeTab,
55393
- editorRef
55419
+ editorRef,
55420
+ unReadCount
55394
55421
  /*******end*****/
55395
55422
  };
55396
55423
  }
55397
55424
  };
55398
- const _withScopeId = (n10) => (pushScopeId("data-v-2ae33c36"), n10 = n10(), popScopeId(), n10);
55425
+ const _withScopeId = (n10) => (pushScopeId("data-v-62f6ac75"), n10 = n10(), popScopeId(), n10);
55399
55426
  const _hoisted_1 = {
55400
55427
  class: "bg-white defaultTS funcTC relative",
55401
55428
  style: { "padding-bottom": "10px", "margin-bottom": "10px" }
@@ -55915,15 +55942,15 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
55915
55942
  createElementVNode("div", null, [
55916
55943
  createVNode(_component_a_badge, {
55917
55944
  onClick: $setup.onClickMessage,
55918
- count: $setup.ccflowData.messageList,
55945
+ count: $setup.unReadCount,
55919
55946
  "number-style": {
55920
55947
  backgroundColor: "#52c41a",
55921
55948
  fontSize: "12px",
55922
55949
  padding: "0 4px"
55923
55950
  },
55924
55951
  class: "w-[20px] h-[20px] cursor-pointer",
55925
- offset: [0, 0],
55926
- style: { "margin-right": "10px" }
55952
+ offset: [20, 0],
55953
+ style: { "margin-right": "20px" }
55927
55954
  }, {
55928
55955
  default: withCtx(() => [
55929
55956
  _hoisted_12
@@ -56552,7 +56579,7 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
56552
56579
  }, 8, ["show"])
56553
56580
  ], 64);
56554
56581
  }
56555
- const TSider = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-2ae33c36"]]);
56582
+ const TSider = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render], ["__scopeId", "data-v-62f6ac75"]]);
56556
56583
  const style = "";
56557
56584
  const components = [TSider];
56558
56585
  installComponents();