workplace.js 45 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197
  1. var Y = (e, t, a) => new Promise((l, i) => {
  2. var S = (p) => {
  3. try {
  4. o(a.next(p));
  5. } catch (m) {
  6. i(m);
  7. }
  8. }, h = (p) => {
  9. try {
  10. o(a.throw(p));
  11. } catch (m) {
  12. i(m);
  13. }
  14. }, o = (p) => p.done ? l(p.value) : Promise.resolve(p.value).then(S, h);
  15. o((a = a.apply(e, t)).next());
  16. });
  17. import { defineComponent as de, createVNode as d, inject as je, ref as z, provide as He, toRef as fe, computed as _, watch as Te, resolveComponent as ye, openBlock as $, createBlock as j, withCtx as P, createElementBlock as V, Fragment as se, renderList as re, normalizeStyle as Fe, unref as Z, resolveDynamicComponent as we, createTextVNode as te, toDisplayString as O, onMounted as Ve, onUnmounted as We, createElementVNode as D, createCommentVNode as oe, normalizeClass as Ie } from "vue";
  18. import { useRouter as Ue } from "vue-router";
  19. import { u as ue, P as ne, bD as Pe, _ as U, c as he, F as Ge, dI as Je, dG as Qe, g as ke, m as Xe, d as M, r as Ye, cp as qe, dJ as Ze, bi as xe, cO as Ke, ao as Re, i as Oe, e as ce, dH as ie, bc as Ae, bb as et, be as pe, l as tt, b as nt, bf as at, L as lt, aU as ot, aW as it, o as st, a3 as rt, dK as ct, bu as dt, b3 as ut, cV as $e, B as ze, bv as mt, f as q, bd as gt, K as vt, ad as pt, cR as J, dL as ft, n as yt, dM as ht, C as Ct, dN as bt, dO as St, dP as It, dQ as xt, dR as At, dS as $t } from "./index2.js";
  20. import { T as Et, _ as Tt } from "./index12.js";
  21. import { C as Me, _ as wt } from "./index18.js";
  22. import { _ as Pt } from "./index6.js";
  23. import { A as kt } from "./ActionButton.js";
  24. import { C as Rt, A as Ot } from "./Col.js";
  25. import { T as zt } from "./index13.js";
  26. const Mt = () => ({
  27. avatar: ne.any,
  28. description: ne.any,
  29. prefixCls: String,
  30. title: ne.any
  31. }), Bt = de({
  32. compatConfig: {
  33. MODE: 3
  34. },
  35. name: "AListItemMeta",
  36. props: Mt(),
  37. displayName: "AListItemMeta",
  38. __ANT_LIST_ITEM_META: !0,
  39. slots: Object,
  40. setup(e, t) {
  41. let {
  42. slots: a
  43. } = t;
  44. const {
  45. prefixCls: l
  46. } = ue("list", e);
  47. return () => {
  48. var i, S, h, o, p, m;
  49. const y = `${l.value}-item-meta`, I = (i = e.title) !== null && i !== void 0 ? i : (S = a.title) === null || S === void 0 ? void 0 : S.call(a), v = (h = e.description) !== null && h !== void 0 ? h : (o = a.description) === null || o === void 0 ? void 0 : o.call(a), T = (p = e.avatar) !== null && p !== void 0 ? p : (m = a.avatar) === null || m === void 0 ? void 0 : m.call(a), w = d("div", {
  50. class: `${l.value}-item-meta-content`
  51. }, [I && d("h4", {
  52. class: `${l.value}-item-meta-title`
  53. }, [I]), v && d("div", {
  54. class: `${l.value}-item-meta-description`
  55. }, [v])]);
  56. return d("div", {
  57. class: y
  58. }, [T && d("div", {
  59. class: `${l.value}-item-meta-avatar`
  60. }, [T]), (I || v) && w]);
  61. };
  62. }
  63. }), Be = Symbol("ListContextKey");
  64. var Dt = function(e, t) {
  65. var a = {};
  66. for (var l in e) Object.prototype.hasOwnProperty.call(e, l) && t.indexOf(l) < 0 && (a[l] = e[l]);
  67. if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, l = Object.getOwnPropertySymbols(e); i < l.length; i++)
  68. t.indexOf(l[i]) < 0 && Object.prototype.propertyIsEnumerable.call(e, l[i]) && (a[l[i]] = e[l[i]]);
  69. return a;
  70. };
  71. const Nt = () => ({
  72. prefixCls: String,
  73. extra: ne.any,
  74. actions: ne.array,
  75. grid: Object,
  76. colStyle: {
  77. type: Object,
  78. default: void 0
  79. }
  80. }), De = de({
  81. compatConfig: {
  82. MODE: 3
  83. },
  84. name: "AListItem",
  85. inheritAttrs: !1,
  86. Meta: Bt,
  87. props: Nt(),
  88. slots: Object,
  89. setup(e, t) {
  90. let {
  91. slots: a,
  92. attrs: l
  93. } = t;
  94. const {
  95. itemLayout: i,
  96. grid: S
  97. } = je(Be, {
  98. grid: z(),
  99. itemLayout: z()
  100. }), {
  101. prefixCls: h
  102. } = ue("list", e), o = () => {
  103. var m;
  104. const y = ((m = a.default) === null || m === void 0 ? void 0 : m.call(a)) || [];
  105. let I;
  106. return y.forEach((v) => {
  107. Je(v) && !Qe(v) && (I = !0);
  108. }), I && y.length > 1;
  109. }, p = () => {
  110. var m, y;
  111. const I = (m = e.extra) !== null && m !== void 0 ? m : (y = a.extra) === null || y === void 0 ? void 0 : y.call(a);
  112. return i.value === "vertical" ? !!I : !o();
  113. };
  114. return () => {
  115. var m, y, I, v, T;
  116. const {
  117. class: w
  118. } = l, x = Dt(l, ["class"]), k = h.value, L = (m = e.extra) !== null && m !== void 0 ? m : (y = a.extra) === null || y === void 0 ? void 0 : y.call(a), H = (I = a.default) === null || I === void 0 ? void 0 : I.call(a);
  119. let g = (v = e.actions) !== null && v !== void 0 ? v : Pe((T = a.actions) === null || T === void 0 ? void 0 : T.call(a));
  120. g = g && !Array.isArray(g) ? [g] : g;
  121. const u = g && g.length > 0 && d("ul", {
  122. class: `${k}-item-action`,
  123. key: "actions"
  124. }, [g.map((n, s) => d("li", {
  125. key: `${k}-item-action-${s}`
  126. }, [n, s !== g.length - 1 && d("em", {
  127. class: `${k}-item-action-split`
  128. }, null)]))]), R = S.value ? "div" : "li", r = d(R, U(U({}, x), {}, {
  129. class: he(`${k}-item`, {
  130. [`${k}-item-no-flex`]: !p()
  131. }, w)
  132. }), {
  133. default: () => [i.value === "vertical" && L ? [d("div", {
  134. class: `${k}-item-main`,
  135. key: "content"
  136. }, [H, u]), d("div", {
  137. class: `${k}-item-extra`,
  138. key: "extra"
  139. }, [L])] : [H, u, Ge(L, {
  140. key: "extra"
  141. })]]
  142. });
  143. return S.value ? d(Rt, {
  144. flex: 1,
  145. style: e.colStyle
  146. }, {
  147. default: () => [r]
  148. }) : r;
  149. };
  150. }
  151. }), Lt = (e) => {
  152. const {
  153. listBorderedCls: t,
  154. componentCls: a,
  155. paddingLG: l,
  156. margin: i,
  157. padding: S,
  158. listItemPaddingSM: h,
  159. marginLG: o,
  160. borderRadiusLG: p
  161. } = e;
  162. return {
  163. [`${t}`]: {
  164. border: `${e.lineWidth}px ${e.lineType} ${e.colorBorder}`,
  165. borderRadius: p,
  166. [`${a}-header,${a}-footer,${a}-item`]: {
  167. paddingInline: l
  168. },
  169. [`${a}-pagination`]: {
  170. margin: `${i}px ${o}px`
  171. }
  172. },
  173. [`${t}${a}-sm`]: {
  174. [`${a}-item,${a}-header,${a}-footer`]: {
  175. padding: h
  176. }
  177. },
  178. [`${t}${a}-lg`]: {
  179. [`${a}-item,${a}-header,${a}-footer`]: {
  180. padding: `${S}px ${l}px`
  181. }
  182. }
  183. };
  184. }, _t = (e) => {
  185. const {
  186. componentCls: t,
  187. screenSM: a,
  188. screenMD: l,
  189. marginLG: i,
  190. marginSM: S,
  191. margin: h
  192. } = e;
  193. return {
  194. [`@media screen and (max-width:${l})`]: {
  195. [`${t}`]: {
  196. [`${t}-item`]: {
  197. [`${t}-item-action`]: {
  198. marginInlineStart: i
  199. }
  200. }
  201. },
  202. [`${t}-vertical`]: {
  203. [`${t}-item`]: {
  204. [`${t}-item-extra`]: {
  205. marginInlineStart: i
  206. }
  207. }
  208. }
  209. },
  210. [`@media screen and (max-width: ${a})`]: {
  211. [`${t}`]: {
  212. [`${t}-item`]: {
  213. flexWrap: "wrap",
  214. [`${t}-action`]: {
  215. marginInlineStart: S
  216. }
  217. }
  218. },
  219. [`${t}-vertical`]: {
  220. [`${t}-item`]: {
  221. flexWrap: "wrap-reverse",
  222. [`${t}-item-main`]: {
  223. minWidth: e.contentWidth
  224. },
  225. [`${t}-item-extra`]: {
  226. margin: `auto auto ${h}px`
  227. }
  228. }
  229. }
  230. }
  231. };
  232. }, jt = (e) => {
  233. const {
  234. componentCls: t,
  235. antCls: a,
  236. controlHeight: l,
  237. minHeight: i,
  238. paddingSM: S,
  239. marginLG: h,
  240. padding: o,
  241. listItemPadding: p,
  242. colorPrimary: m,
  243. listItemPaddingSM: y,
  244. listItemPaddingLG: I,
  245. paddingXS: v,
  246. margin: T,
  247. colorText: w,
  248. colorTextDescription: x,
  249. motionDurationSlow: k,
  250. lineWidth: L
  251. } = e;
  252. return {
  253. [`${t}`]: M(M({}, Ye(e)), {
  254. position: "relative",
  255. "*": {
  256. outline: "none"
  257. },
  258. [`${t}-header, ${t}-footer`]: {
  259. background: "transparent",
  260. paddingBlock: S
  261. },
  262. [`${t}-pagination`]: {
  263. marginBlockStart: h,
  264. textAlign: "end",
  265. // https://github.com/ant-design/ant-design/issues/20037
  266. [`${a}-pagination-options`]: {
  267. textAlign: "start"
  268. }
  269. },
  270. [`${t}-spin`]: {
  271. minHeight: i,
  272. textAlign: "center"
  273. },
  274. [`${t}-items`]: {
  275. margin: 0,
  276. padding: 0,
  277. listStyle: "none"
  278. },
  279. [`${t}-item`]: {
  280. display: "flex",
  281. alignItems: "center",
  282. justifyContent: "space-between",
  283. padding: p,
  284. color: w,
  285. [`${t}-item-meta`]: {
  286. display: "flex",
  287. flex: 1,
  288. alignItems: "flex-start",
  289. maxWidth: "100%",
  290. [`${t}-item-meta-avatar`]: {
  291. marginInlineEnd: o
  292. },
  293. [`${t}-item-meta-content`]: {
  294. flex: "1 0",
  295. width: 0,
  296. color: w
  297. },
  298. [`${t}-item-meta-title`]: {
  299. marginBottom: e.marginXXS,
  300. color: w,
  301. fontSize: e.fontSize,
  302. lineHeight: e.lineHeight,
  303. "> a": {
  304. color: w,
  305. transition: `all ${k}`,
  306. "&:hover": {
  307. color: m
  308. }
  309. }
  310. },
  311. [`${t}-item-meta-description`]: {
  312. color: x,
  313. fontSize: e.fontSize,
  314. lineHeight: e.lineHeight
  315. }
  316. },
  317. [`${t}-item-action`]: {
  318. flex: "0 0 auto",
  319. marginInlineStart: e.marginXXL,
  320. padding: 0,
  321. fontSize: 0,
  322. listStyle: "none",
  323. "& > li": {
  324. position: "relative",
  325. display: "inline-block",
  326. padding: `0 ${v}px`,
  327. color: x,
  328. fontSize: e.fontSize,
  329. lineHeight: e.lineHeight,
  330. textAlign: "center",
  331. "&:first-child": {
  332. paddingInlineStart: 0
  333. }
  334. },
  335. [`${t}-item-action-split`]: {
  336. position: "absolute",
  337. insetBlockStart: "50%",
  338. insetInlineEnd: 0,
  339. width: L,
  340. height: Math.ceil(e.fontSize * e.lineHeight) - e.marginXXS * 2,
  341. transform: "translateY(-50%)",
  342. backgroundColor: e.colorSplit
  343. }
  344. }
  345. },
  346. [`${t}-empty`]: {
  347. padding: `${o}px 0`,
  348. color: x,
  349. fontSize: e.fontSizeSM,
  350. textAlign: "center"
  351. },
  352. [`${t}-empty-text`]: {
  353. padding: o,
  354. color: e.colorTextDisabled,
  355. fontSize: e.fontSize,
  356. textAlign: "center"
  357. },
  358. // ============================ without flex ============================
  359. [`${t}-item-no-flex`]: {
  360. display: "block"
  361. }
  362. }),
  363. [`${t}-grid ${a}-col > ${t}-item`]: {
  364. display: "block",
  365. maxWidth: "100%",
  366. marginBlockEnd: T,
  367. paddingBlock: 0,
  368. borderBlockEnd: "none"
  369. },
  370. [`${t}-vertical ${t}-item`]: {
  371. alignItems: "initial",
  372. [`${t}-item-main`]: {
  373. display: "block",
  374. flex: 1
  375. },
  376. [`${t}-item-extra`]: {
  377. marginInlineStart: h
  378. },
  379. [`${t}-item-meta`]: {
  380. marginBlockEnd: o,
  381. [`${t}-item-meta-title`]: {
  382. marginBlockEnd: S,
  383. color: w,
  384. fontSize: e.fontSizeLG,
  385. lineHeight: e.lineHeightLG
  386. }
  387. },
  388. [`${t}-item-action`]: {
  389. marginBlockStart: o,
  390. marginInlineStart: "auto",
  391. "> li": {
  392. padding: `0 ${o}px`,
  393. "&:first-child": {
  394. paddingInlineStart: 0
  395. }
  396. }
  397. }
  398. },
  399. [`${t}-split ${t}-item`]: {
  400. borderBlockEnd: `${e.lineWidth}px ${e.lineType} ${e.colorSplit}`,
  401. "&:last-child": {
  402. borderBlockEnd: "none"
  403. }
  404. },
  405. [`${t}-split ${t}-header`]: {
  406. borderBlockEnd: `${e.lineWidth}px ${e.lineType} ${e.colorSplit}`
  407. },
  408. [`${t}-split${t}-empty ${t}-footer`]: {
  409. borderTop: `${e.lineWidth}px ${e.lineType} ${e.colorSplit}`
  410. },
  411. [`${t}-loading ${t}-spin-nested-loading`]: {
  412. minHeight: l
  413. },
  414. [`${t}-split${t}-something-after-last-item ${a}-spin-container > ${t}-items > ${t}-item:last-child`]: {
  415. borderBlockEnd: `${e.lineWidth}px ${e.lineType} ${e.colorSplit}`
  416. },
  417. [`${t}-lg ${t}-item`]: {
  418. padding: I
  419. },
  420. [`${t}-sm ${t}-item`]: {
  421. padding: y
  422. },
  423. // Horizontal
  424. [`${t}:not(${t}-vertical)`]: {
  425. [`${t}-item-no-flex`]: {
  426. [`${t}-item-action`]: {
  427. float: "right"
  428. }
  429. }
  430. }
  431. };
  432. }, Ht = ke("List", (e) => {
  433. const t = Xe(e, {
  434. listBorderedCls: `${e.componentCls}-bordered`,
  435. minHeight: e.controlHeightLG,
  436. listItemPadding: `${e.paddingContentVertical}px ${e.paddingContentHorizontalLG}px`,
  437. listItemPaddingSM: `${e.paddingContentVerticalSM}px ${e.paddingContentHorizontal}px`,
  438. listItemPaddingLG: `${e.paddingContentVerticalLG}px ${e.paddingContentHorizontalLG}px`
  439. });
  440. return [jt(t), Lt(t), _t(t)];
  441. }, {
  442. contentWidth: 220
  443. }), Ft = () => ({
  444. bordered: Ae(),
  445. dataSource: tt(),
  446. extra: ie(),
  447. grid: ce(),
  448. itemLayout: String,
  449. loading: pe([Boolean, Object]),
  450. loadMore: ie(),
  451. pagination: pe([Boolean, Object]),
  452. prefixCls: String,
  453. rowKey: pe([String, Number, Function]),
  454. renderItem: et(),
  455. size: String,
  456. split: Ae(),
  457. header: ie(),
  458. footer: ie(),
  459. locale: ce()
  460. }), G = de({
  461. compatConfig: {
  462. MODE: 3
  463. },
  464. name: "AList",
  465. inheritAttrs: !1,
  466. Item: De,
  467. props: Oe(Ft(), {
  468. dataSource: [],
  469. bordered: !1,
  470. split: !0,
  471. loading: !1,
  472. pagination: !1
  473. }),
  474. slots: Object,
  475. setup(e, t) {
  476. let {
  477. slots: a,
  478. attrs: l
  479. } = t;
  480. var i, S;
  481. He(Be, {
  482. grid: fe(e, "grid"),
  483. itemLayout: fe(e, "itemLayout")
  484. });
  485. const h = {
  486. current: 1,
  487. total: 0
  488. }, {
  489. prefixCls: o,
  490. direction: p,
  491. renderEmpty: m
  492. } = ue("list", e), [y, I] = Ht(o), v = _(() => e.pagination && typeof e.pagination == "object" ? e.pagination : {}), T = z((i = v.value.defaultCurrent) !== null && i !== void 0 ? i : 1), w = z((S = v.value.defaultPageSize) !== null && S !== void 0 ? S : 10);
  493. Te(v, () => {
  494. "current" in v.value && (T.value = v.value.current), "pageSize" in v.value && (w.value = v.value.pageSize);
  495. });
  496. const x = [], k = (c) => (C, b) => {
  497. T.value = C, w.value = b, v.value[c] && v.value[c](C, b);
  498. }, L = k("onChange"), H = k("onShowSizeChange"), g = _(() => typeof e.loading == "boolean" ? {
  499. spinning: e.loading
  500. } : e.loading), u = _(() => g.value && g.value.spinning), R = _(() => {
  501. let c = "";
  502. switch (e.size) {
  503. case "large":
  504. c = "lg";
  505. break;
  506. case "small":
  507. c = "sm";
  508. break;
  509. }
  510. return c;
  511. }), r = _(() => ({
  512. [`${o.value}`]: !0,
  513. [`${o.value}-vertical`]: e.itemLayout === "vertical",
  514. [`${o.value}-${R.value}`]: R.value,
  515. [`${o.value}-split`]: e.split,
  516. [`${o.value}-bordered`]: e.bordered,
  517. [`${o.value}-loading`]: u.value,
  518. [`${o.value}-grid`]: !!e.grid,
  519. [`${o.value}-rtl`]: p.value === "rtl"
  520. })), n = _(() => {
  521. const c = M(M(M({}, h), {
  522. total: e.dataSource.length,
  523. current: T.value,
  524. pageSize: w.value
  525. }), e.pagination || {}), C = Math.ceil(c.total / c.pageSize);
  526. return c.current > C && (c.current = C), c;
  527. }), s = _(() => {
  528. let c = [...e.dataSource];
  529. return e.pagination && e.dataSource.length > (n.value.current - 1) * n.value.pageSize && (c = [...e.dataSource].splice((n.value.current - 1) * n.value.pageSize, n.value.pageSize)), c;
  530. }), E = qe(), A = Ze(() => {
  531. for (let c = 0; c < xe.length; c += 1) {
  532. const C = xe[c];
  533. if (E.value[C])
  534. return C;
  535. }
  536. }), f = _(() => {
  537. if (!e.grid)
  538. return;
  539. const c = A.value && e.grid[A.value] ? e.grid[A.value] : e.grid.column;
  540. if (c)
  541. return {
  542. width: `${100 / c}%`,
  543. maxWidth: `${100 / c}%`
  544. };
  545. }), N = (c, C) => {
  546. var b;
  547. const F = (b = e.renderItem) !== null && b !== void 0 ? b : a.renderItem;
  548. if (!F) return null;
  549. let B;
  550. const W = typeof e.rowKey;
  551. return W === "function" ? B = e.rowKey(c) : W === "string" || W === "number" ? B = c[e.rowKey] : B = c.key, B || (B = `list-item-${C}`), x[C] = B, F({
  552. item: c,
  553. index: C
  554. });
  555. };
  556. return () => {
  557. var c, C, b, F, B, W, K, Q;
  558. const ee = (c = e.loadMore) !== null && c !== void 0 ? c : (C = a.loadMore) === null || C === void 0 ? void 0 : C.call(a), X = (b = e.footer) !== null && b !== void 0 ? b : (F = a.footer) === null || F === void 0 ? void 0 : F.call(a), ae = (B = e.header) !== null && B !== void 0 ? B : (W = a.header) === null || W === void 0 ? void 0 : W.call(a), Ce = Pe((K = a.default) === null || K === void 0 ? void 0 : K.call(a)), Ne = !!(ee || e.pagination || X), Le = he(M(M({}, r.value), {
  559. [`${o.value}-something-after-last-item`]: Ne
  560. }), l.class, I.value), be = e.pagination ? d("div", {
  561. class: `${o.value}-pagination`
  562. }, [d(Ke, U(U({}, n.value), {}, {
  563. onChange: L,
  564. onShowSizeChange: H
  565. }), null)]) : null;
  566. let me = u.value && d("div", {
  567. style: {
  568. minHeight: "53px"
  569. }
  570. }, null);
  571. if (s.value.length > 0) {
  572. x.length = 0;
  573. const Se = s.value.map((ge, ve) => N(ge, ve)), _e = Se.map((ge, ve) => d("div", {
  574. key: x[ve],
  575. style: f.value
  576. }, [ge]));
  577. me = e.grid ? d(Ot, {
  578. gutter: e.grid.gutter
  579. }, {
  580. default: () => [_e]
  581. }) : d("ul", {
  582. class: `${o.value}-items`
  583. }, [Se]);
  584. } else !Ce.length && !u.value && (me = d("div", {
  585. class: `${o.value}-empty-text`
  586. }, [((Q = e.locale) === null || Q === void 0 ? void 0 : Q.emptyText) || m("List")]));
  587. const le = n.value.position || "bottom";
  588. return y(d("div", U(U({}, l), {}, {
  589. class: Le
  590. }), [(le === "top" || le === "both") && be, ae && d("div", {
  591. class: `${o.value}-header`
  592. }, [ae]), d(Re, g.value, {
  593. default: () => [me, Ce]
  594. }), X && d("div", {
  595. class: `${o.value}-footer`
  596. }, [X]), ee || (le === "bottom" || le === "both") && be]));
  597. };
  598. }
  599. });
  600. G.install = function(e) {
  601. return e.component(G.name, G), e.component(G.Item.name, G.Item), e.component(G.Item.Meta.name, G.Item.Meta), e;
  602. };
  603. const Vt = (e) => {
  604. const {
  605. componentCls: t,
  606. iconCls: a,
  607. zIndexPopup: l,
  608. colorText: i,
  609. colorWarning: S,
  610. marginXS: h,
  611. fontSize: o,
  612. fontWeightStrong: p,
  613. lineHeight: m
  614. } = e;
  615. return {
  616. [t]: {
  617. zIndex: l,
  618. [`${t}-inner-content`]: {
  619. color: i
  620. },
  621. [`${t}-message`]: {
  622. position: "relative",
  623. marginBottom: h,
  624. color: i,
  625. fontSize: o,
  626. display: "flex",
  627. flexWrap: "nowrap",
  628. alignItems: "start",
  629. [`> ${t}-message-icon ${a}`]: {
  630. color: S,
  631. fontSize: o,
  632. flex: "none",
  633. lineHeight: 1,
  634. paddingTop: (Math.round(o * m) - o) / 2
  635. },
  636. "&-title": {
  637. flex: "auto",
  638. marginInlineStart: h
  639. },
  640. "&-title-only": {
  641. fontWeight: p
  642. }
  643. },
  644. [`${t}-description`]: {
  645. position: "relative",
  646. marginInlineStart: o + h,
  647. marginBottom: h,
  648. color: i,
  649. fontSize: o
  650. },
  651. [`${t}-buttons`]: {
  652. textAlign: "end",
  653. button: {
  654. marginInlineStart: h
  655. }
  656. }
  657. }
  658. };
  659. }, Wt = ke("Popconfirm", (e) => Vt(e), (e) => {
  660. const {
  661. zIndexPopupBase: t
  662. } = e;
  663. return {
  664. zIndexPopup: t + 60
  665. };
  666. });
  667. var Ut = function(e, t) {
  668. var a = {};
  669. for (var l in e) Object.prototype.hasOwnProperty.call(e, l) && t.indexOf(l) < 0 && (a[l] = e[l]);
  670. if (e != null && typeof Object.getOwnPropertySymbols == "function") for (var i = 0, l = Object.getOwnPropertySymbols(e); i < l.length; i++)
  671. t.indexOf(l[i]) < 0 && Object.prototype.propertyIsEnumerable.call(e, l[i]) && (a[l[i]] = e[l[i]]);
  672. return a;
  673. };
  674. const Gt = () => M(M({}, mt()), {
  675. prefixCls: String,
  676. content: q(),
  677. title: q(),
  678. description: q(),
  679. okType: gt("primary"),
  680. disabled: {
  681. type: Boolean,
  682. default: !1
  683. },
  684. okText: q(),
  685. cancelText: q(),
  686. icon: q(),
  687. okButtonProps: ce(),
  688. cancelButtonProps: ce(),
  689. showCancel: {
  690. type: Boolean,
  691. default: !0
  692. },
  693. onConfirm: Function,
  694. onCancel: Function
  695. }), Jt = de({
  696. compatConfig: {
  697. MODE: 3
  698. },
  699. name: "APopconfirm",
  700. inheritAttrs: !1,
  701. props: Oe(Gt(), M(M({}, dt()), {
  702. trigger: "click",
  703. placement: "top",
  704. mouseEnterDelay: 0.1,
  705. mouseLeaveDelay: 0.1,
  706. arrowPointAtCenter: !1,
  707. autoAdjustOverflow: !0,
  708. okType: "primary",
  709. disabled: !1
  710. })),
  711. slots: Object,
  712. // emits: ['update:open', 'visibleChange'],
  713. setup(e, t) {
  714. let {
  715. slots: a,
  716. emit: l,
  717. expose: i,
  718. attrs: S
  719. } = t;
  720. const h = z();
  721. at(e.visible === void 0, "Popconfirm", "`visible` will be removed in next major version, please use `open` instead."), i({
  722. getPopupDomNode: () => {
  723. var r, n;
  724. return (n = (r = h.value) === null || r === void 0 ? void 0 : r.getPopupDomNode) === null || n === void 0 ? void 0 : n.call(r);
  725. }
  726. });
  727. const [o, p] = lt(!1, {
  728. value: fe(e, "open")
  729. }), m = (r, n) => {
  730. e.open === void 0 && p(r), l("update:open", r), l("openChange", r, n);
  731. }, y = (r) => {
  732. m(!1, r);
  733. }, I = (r) => {
  734. var n;
  735. return (n = e.onConfirm) === null || n === void 0 ? void 0 : n.call(e, r);
  736. }, v = (r) => {
  737. var n;
  738. m(!1, r), (n = e.onCancel) === null || n === void 0 || n.call(e, r);
  739. }, T = (r) => {
  740. r.keyCode === vt.ESC && o && m(!1, r);
  741. }, w = (r) => {
  742. const {
  743. disabled: n
  744. } = e;
  745. n || m(r);
  746. }, {
  747. prefixCls: x,
  748. getPrefixCls: k
  749. } = ue("popconfirm", e), L = _(() => k()), H = _(() => k("btn")), [g] = Wt(x), [u] = ot("Popconfirm", it.Popconfirm), R = () => {
  750. var r, n, s, E, A;
  751. const {
  752. okButtonProps: f,
  753. cancelButtonProps: N,
  754. title: c = (r = a.title) === null || r === void 0 ? void 0 : r.call(a),
  755. description: C = (n = a.description) === null || n === void 0 ? void 0 : n.call(a),
  756. cancelText: b = (s = a.cancel) === null || s === void 0 ? void 0 : s.call(a),
  757. okText: F = (E = a.okText) === null || E === void 0 ? void 0 : E.call(a),
  758. okType: B,
  759. icon: W = ((A = a.icon) === null || A === void 0 ? void 0 : A.call(a)) || d(ut, null, null),
  760. showCancel: K = !0
  761. } = e, {
  762. cancelButton: Q,
  763. okButton: ee
  764. } = a, X = M({
  765. onClick: v,
  766. size: "small"
  767. }, N), ae = M(M(M({
  768. onClick: I
  769. }, $e(B)), {
  770. size: "small"
  771. }), f);
  772. return d("div", {
  773. class: `${x.value}-inner-content`
  774. }, [d("div", {
  775. class: `${x.value}-message`
  776. }, [W && d("span", {
  777. class: `${x.value}-message-icon`
  778. }, [W]), d("div", {
  779. class: [`${x.value}-message-title`, {
  780. [`${x.value}-message-title-only`]: !!C
  781. }]
  782. }, [c])]), C && d("div", {
  783. class: `${x.value}-description`
  784. }, [C]), d("div", {
  785. class: `${x.value}-buttons`
  786. }, [K ? Q ? Q(X) : d(ze, X, {
  787. default: () => [b || u.value.cancelText]
  788. }) : null, ee ? ee(ae) : d(kt, {
  789. buttonProps: M(M({
  790. size: "small"
  791. }, $e(B)), f),
  792. actionFn: I,
  793. close: y,
  794. prefixCls: H.value,
  795. quitOnNullishReturnValue: !0,
  796. emitEvent: !0
  797. }, {
  798. default: () => [F || u.value.okText]
  799. })])]);
  800. };
  801. return () => {
  802. var r;
  803. const {
  804. placement: n,
  805. overlayClassName: s,
  806. trigger: E = "click"
  807. } = e, A = Ut(e, ["placement", "overlayClassName", "trigger"]), f = st(A, ["title", "content", "cancelText", "okText", "onUpdate:open", "onConfirm", "onCancel", "prefixCls"]), N = he(x.value, s);
  808. return g(d(Pt, U(U(U({}, f), S), {}, {
  809. trigger: E,
  810. placement: n,
  811. onOpenChange: w,
  812. open: o.value,
  813. overlayClassName: N,
  814. transitionName: rt(L.value, "zoom-big", e.transitionName),
  815. ref: h,
  816. "data-popover-inject": !0
  817. }), {
  818. default: () => [ct(((r = a.default) === null || r === void 0 ? void 0 : r.call(a)) || [], {
  819. onKeydown: (c) => {
  820. T(c);
  821. }
  822. }, !1)],
  823. content: R
  824. }));
  825. };
  826. }
  827. }), Qt = nt(Jt), Xt = {
  828. __name: "workplace-selector",
  829. props: {
  830. value: {
  831. type: Boolean,
  832. default: !1
  833. },
  834. selectedList: {
  835. type: Array,
  836. default: () => []
  837. }
  838. },
  839. emits: ["update:value", "done"],
  840. setup(e, { emit: t }) {
  841. const a = e, l = t, i = pt(), S = /(Outlined|Filled|TwoTone)$/, h = (g) => {
  842. if (!g) return J;
  843. const u = String(g).split(/[-_\s]+/).filter(Boolean).map((n) => n.charAt(0).toUpperCase() + n.slice(1)).join("");
  844. if (!u) return J;
  845. const R = S.test(u) ? u : u + "Outlined", r = ye(R);
  846. return typeof r == "string" ? J : r;
  847. }, o = _({
  848. get: () => a.value,
  849. set: (g) => l("update:value", g)
  850. }), p = z("mm0001"), m = z([]), y = z([]), I = _(() => i.menus), v = _(() => i.clients), T = () => {
  851. v.value && v.value.length && (m.value = v.value.map((g) => ({ id: g.id, clientId: g.clientId, clientName: g.clientName })));
  852. }, w = () => {
  853. o.value = !1;
  854. }, x = (g) => {
  855. g.forEach((u) => {
  856. u.children && u.children.length > 0 ? x(u.children) : u.href && u.isShow && y.value.push({
  857. id: u.id,
  858. name: u.name,
  859. icon: u.icon,
  860. href: u.href,
  861. hoverable: L(u, a.selectedList)
  862. });
  863. });
  864. }, k = (g) => {
  865. l("done", g);
  866. }, L = (g = {}, u = []) => !u || u.length < 1 ? !0 : !u.some((R) => R.menu.id === g.id), H = (g) => Y(this, null, function* () {
  867. var r;
  868. y.value = [];
  869. const u = window.$utils.ls.get("USER-TOKEN"), R = yield ft({
  870. baseURL: window.$utils.env.VITE_APP_API_BASE_URL,
  871. url: `/${window.$utils.env.VITE_APP_PORTAL_SERVER_NAME}/v1/users/menus`,
  872. timeout: 60 * 1e3,
  873. headers: {
  874. "Content-Type": "application/json;charset=UTF-8",
  875. "user-token": u,
  876. "client-id": g
  877. },
  878. method: "get",
  879. data: {}
  880. });
  881. x((r = R == null ? void 0 : R.data) == null ? void 0 : r.data);
  882. });
  883. return Te(
  884. () => a.selectedList,
  885. () => {
  886. y.value = [], x(I.value);
  887. }
  888. ), T(), (g, u) => {
  889. const R = Tt, r = Et, n = wt, s = Me, E = ze, A = ye("s-modal");
  890. return $(), j(A, {
  891. value: o.value,
  892. "onUpdate:value": u[1] || (u[1] = (f) => o.value = f),
  893. title: g.$l("添加快捷导航菜单"),
  894. width: "80%",
  895. maskClosable: !1
  896. }, {
  897. footer: P(() => [
  898. d(E, {
  899. key: "back",
  900. onClick: w
  901. }, {
  902. default: P(() => [
  903. te(O(g.$l("关闭")), 1)
  904. ]),
  905. _: 1
  906. })
  907. ]),
  908. default: P(() => [
  909. d(r, {
  910. activeKey: p.value,
  911. "onUpdate:activeKey": u[0] || (u[0] = (f) => p.value = f),
  912. onChange: H
  913. }, {
  914. default: P(() => [
  915. ($(!0), V(se, null, re(m.value, (f) => ($(), j(R, {
  916. key: f.clientId,
  917. tab: f.clientName
  918. }, null, 8, ["tab"]))), 128))
  919. ]),
  920. _: 1
  921. }, 8, ["activeKey"]),
  922. d(s, {
  923. style: { "margin-bottom": "6px" },
  924. bordered: !1
  925. }, {
  926. default: P(() => [
  927. ($(!0), V(se, null, re(y.value, (f, N) => ($(), j(n, {
  928. style: Fe({ width: "20%", textAlign: "center", cursor: f.hoverable ? "pointer" : "" }),
  929. key: f.id + N,
  930. hoverable: f.hoverable,
  931. onClick: (c) => f.hoverable ? k(f) : ""
  932. }, {
  933. default: P(() => [
  934. f.icon ? ($(), j(we(h(f.icon)), { key: 1 })) : ($(), j(Z(J), { key: 0 })),
  935. te(" " + O(f.name), 1)
  936. ]),
  937. _: 2
  938. }, 1032, ["style", "hoverable", "onClick"]))), 128))
  939. ]),
  940. _: 1
  941. })
  942. ]),
  943. _: 1
  944. }, 8, ["value", "title"]);
  945. };
  946. }
  947. }, Ee = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIwAAAB0CAIAAADYY00dAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyNpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGE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QUPasxt9pd6dfp8+DUdaLOBCq7IbdSqQBVGEYUD6QM4BFCTo6iSjpZJ0/l5FAf+gLeUau0UUHKBh6Rhfl5N2cguplRPT//SXRxFCHKtkqrd5aWlhYWngzKoMODlBk83Ih8w+FRe86mvQlOZ2dnyUOUhQpHenzctv9dXV29czTDgJQZPHJxOAC3VUrHaxO0NdzV9D6Dqyqt7T/cPbCrYjhIWcIzPT2FAaVxApP7x2rrUNeLi3NX+3u5oKq0tynanP8My0EgZQ7PXKWS1gnJKT77nGFlgFxxClul1Tt6kCuN7wdJBMQ+PyjV2EO+yGXTfhZU6g+o10Pjrq4ukzN1IpPd4lm6XeYh7i6QsDruQnbsP7AlDXj0bFU8WzYzZOXM0ns91vf6mn+dhFC128cnJ6eB99fW1trtdnrwoA3T0x5ZNm4t49nLcvaTBXpgOW6q07lOYl79j4tPAx6MxvP413sOcV4H0ZbzndFRUDFo9SQS12DEbJXWITxcRDtzwYY/RTghuFyoaTc9f96gZWXEVD2DKEJhN1lG8pxTRqBn/BE8BTy3uVz8aWw9rN7+DcjtV359V52Snd2++J9MTQma3t9xee5t+eY+b1cYE5l6GILiy38CDADXoxCrjDZe8wAAAABJRU5ErkJggg==", Yt = { class: "board-layout" }, qt = {
  948. key: 0,
  949. class: "flex-grid-5"
  950. }, Zt = ["onClick"], Kt = {
  951. key: 1,
  952. class: "empty project-content"
  953. }, en = ["src"], tn = { class: "tabs-wrap" }, nn = { class: "list-content" }, an = { class: "list-content-item" }, ln = ["onClick"], on = { style: { float: "right" } }, sn = {
  954. key: 1,
  955. class: "empty project-content"
  956. }, rn = ["src"], cn = /* @__PURE__ */ Object.assign({ name: "WorkPlaceIndex" }, {
  957. __name: "workplace",
  958. setup(e) {
  959. const t = Ue(), a = /(Outlined|Filled|TwoTone)$/, l = (n) => {
  960. if (!n) return J;
  961. const s = String(n).split(/[-_\s]+/).filter(Boolean).map((f) => f.charAt(0).toUpperCase() + f.slice(1)).join("");
  962. if (!s) return J;
  963. const E = a.test(s) ? s : s + "Outlined", A = ye(E);
  964. return typeof A == "string" ? J : A;
  965. }, i = z(1), S = { padding: 0 }, h = z(0), o = z(0), p = z(!1), m = z(!1), y = z([]), I = z(!1), v = z(!1), T = z([]), w = () => Y(this, null, function* () {
  966. try {
  967. p.value = !0;
  968. const n = yield bt();
  969. y.value = n || [], y.value.length < 1 && (v.value = !1), p.value = !1;
  970. } catch (n) {
  971. p.value = !1;
  972. }
  973. }), x = (n, s) => {
  974. try {
  975. const E = new URL(n);
  976. E.search = "", E.hash = "";
  977. let A = E.toString();
  978. return A.endsWith("/") || (A += "/"), A + s;
  979. } catch (E) {
  980. return n + s;
  981. }
  982. }, k = (n) => {
  983. if (n.menu.clientId && n.menu.clientId !== `${window.$utils.env.VITE_APP_CLIENT_ID}`) {
  984. const s = n.menu.hrefs ? n.menu.hrefs.substring(1, n.menu.hrefs.length) : "";
  985. window.open(x(n.clientRedirectUri, s));
  986. } else
  987. t.push({ path: n.menu.hrefs });
  988. }, L = (n) => {
  989. i.value = n, H();
  990. }, H = () => Y(this, null, function* () {
  991. m.value = !0;
  992. try {
  993. const n = yield St();
  994. i.value === 1 ? T.value = n.toDealList || [] : T.value = n.toReadList || [], h.value = n.toDealCount || 0, o.value = n.toReadCount || 0;
  995. } catch (n) {
  996. T.value = [], console.warn("[workplace] 待办消息获取失败:", n);
  997. } finally {
  998. m.value = !1;
  999. }
  1000. }), g = (n) => Y(this, null, function* () {
  1001. I.value = !1, p.value = !0, yield $t(n).then(() => {
  1002. p.value = !1;
  1003. }), w();
  1004. }), u = (n) => Y(this, null, function* () {
  1005. p.value = !0, yield It({ id: n.id }).then(() => {
  1006. p.value = !1;
  1007. }), w();
  1008. }), R = (n = {}) => {
  1009. if (n.messageTypeCode === "toRead" && xt([n.id]), n.clientId === "flow") {
  1010. const s = {
  1011. client_id: `${window.$utils.env.VITE_APP_CLIENT_ID}`,
  1012. scope: "snsapi_base"
  1013. };
  1014. At(s).then((E) => {
  1015. const A = E && typeof E == "object" ? E.data : E;
  1016. if (!A) {
  1017. location.reload();
  1018. return;
  1019. }
  1020. const f = `code=${A}`, N = s.state ? `&state=${s.state}` : "";
  1021. let c = "";
  1022. if (n.messageTypeCode === "toDeal" ? c = n.toDealUrl : n.messageTypeCode === "toRead" && (c = n.toReadUrl), c && c.includes("?")) {
  1023. let C = `${f}${N}`;
  1024. C && (C = `&${f}${N}`), window.open(c + C);
  1025. } else {
  1026. let C = `${f}${N}`;
  1027. C && (C = `?${f}${N}`), window.open(c + C);
  1028. }
  1029. });
  1030. } else {
  1031. let s = "";
  1032. n.messageTypeCode === "toDeal" ? s = n.toDealUrl : n.messageTypeCode === "toRead" && (s = n.toReadUrl), window.open(s);
  1033. }
  1034. };
  1035. let r = null;
  1036. return Ve(() => {
  1037. w(), H(), r = ht(() => H());
  1038. }), We(() => {
  1039. r && r(), r = null;
  1040. }), (n, s) => {
  1041. const E = Qt, A = Me, f = Re, N = zt, c = De, C = G;
  1042. return $(), V("div", Yt, [
  1043. d(f, { spinning: p.value }, {
  1044. default: P(() => [
  1045. d(A, { class: "project-list" }, {
  1046. title: P(() => [
  1047. te(O(n.$l("快捷导航")), 1)
  1048. ]),
  1049. extra: P(() => [
  1050. !v.value && y.value.length > 0 ? ($(), V("a", {
  1051. key: 0,
  1052. onClick: s[0] || (s[0] = (b) => v.value = !0)
  1053. }, O(n.$l("修改")), 1)) : oe("", !0),
  1054. v.value ? ($(), V("a", {
  1055. key: 1,
  1056. onClick: s[1] || (s[1] = (b) => v.value = !1)
  1057. }, O(n.$l("返回")), 1)) : oe("", !0),
  1058. !v.value && y.value.length < 10 ? ($(), V("a", {
  1059. key: 2,
  1060. style: { "margin-left": "24px" },
  1061. onClick: s[2] || (s[2] = (b) => I.value = !0)
  1062. }, O(n.$l("添加")), 1)) : oe("", !0)
  1063. ]),
  1064. default: P(() => [
  1065. y.value.length > 0 ? ($(), V("div", qt, [
  1066. ($(!0), V(se, null, re(y.value, (b, F) => ($(), j(A, {
  1067. bordered: !1,
  1068. "body-style": { padding: 0, position: "relative" },
  1069. key: F
  1070. }, {
  1071. default: P(() => [
  1072. D("div", {
  1073. class: "card-item",
  1074. onClick: (B) => k(b)
  1075. }, [
  1076. b.menu.icon ? ($(), j(we(l(b.menu.icon)), { key: 1 })) : ($(), j(Z(J), { key: 0 })),
  1077. D("a", null, O(b.menu.name), 1)
  1078. ], 8, Zt),
  1079. d(E, {
  1080. title: n.$l("确认要移除此快捷导航吗?"),
  1081. onConfirm: (B) => u(b),
  1082. okText: n.$l("删除"),
  1083. cancelText: n.$l("取消")
  1084. }, {
  1085. icon: P(() => [...s[7] || (s[7] = [
  1086. D("span", null, null, -1)
  1087. ])]),
  1088. default: P(() => [
  1089. v.value ? ($(), j(Z(Ct), {
  1090. key: 0,
  1091. class: "delete-menu"
  1092. })) : oe("", !0)
  1093. ]),
  1094. _: 1
  1095. }, 8, ["title", "onConfirm", "okText", "cancelText"])
  1096. ]),
  1097. _: 2
  1098. }, 1024))), 128))
  1099. ])) : ($(), V("div", Kt, [
  1100. D("img", { src: Z(Ee) }, null, 8, en),
  1101. D("h4", null, O(n.$l("您没有设置快捷导航")), 1)
  1102. ]))
  1103. ]),
  1104. _: 1
  1105. })
  1106. ]),
  1107. _: 1
  1108. }, 8, ["spinning"]),
  1109. d(f, { spinning: m.value }, {
  1110. default: P(() => [
  1111. d(A, {
  1112. class: "project-list margin-top-20",
  1113. "body-style": S
  1114. }, {
  1115. title: P(() => [
  1116. D("div", tn, [
  1117. D("div", {
  1118. class: Ie(["item", { "s-theme-color": i.value === 1 }]),
  1119. onClick: s[3] || (s[3] = (b) => L(1))
  1120. }, O(n.$l("待处理")) + "(" + O(h.value) + ") ", 3),
  1121. D("div", {
  1122. class: Ie(["item", { "s-theme-color": i.value === 2 }]),
  1123. onClick: s[4] || (s[4] = (b) => L(2))
  1124. }, O(n.$l("待阅读")) + "(" + O(o.value) + ") ", 3)
  1125. ])
  1126. ]),
  1127. extra: P(() => [
  1128. D("a", {
  1129. onClick: s[5] || (s[5] = (b) => Z(t).push({ path: "/message/index" }))
  1130. }, O(n.$l("更多")), 1)
  1131. ]),
  1132. default: P(() => [
  1133. T.value.length > 0 ? ($(), j(C, {
  1134. key: 0,
  1135. style: { "overflow-y": "scroll" },
  1136. size: "large",
  1137. class: "project-content"
  1138. }, {
  1139. default: P(() => [
  1140. ($(!0), V(se, null, re(T.value, (b, F) => ($(), j(c, { key: F }, {
  1141. default: P(() => [
  1142. D("div", nn, [
  1143. D("div", an, [
  1144. D("span", null, [
  1145. i.value === 1 ? ($(), j(N, {
  1146. key: 0,
  1147. color: "var(--s-color)"
  1148. }, {
  1149. default: P(() => [
  1150. te(O(n.$l("待处理")), 1)
  1151. ]),
  1152. _: 1
  1153. })) : ($(), j(N, {
  1154. key: 1,
  1155. color: "var(--s-color)"
  1156. }, {
  1157. default: P(() => [
  1158. te(O(n.$l("待阅读")), 1)
  1159. ]),
  1160. _: 1
  1161. })),
  1162. D("a", {
  1163. onClick: (B) => R(b),
  1164. class: "pull-right"
  1165. }, O(b.contentTitle), 9, ln)
  1166. ]),
  1167. D("span", on, O(b.createDate), 1)
  1168. ])
  1169. ])
  1170. ]),
  1171. _: 2
  1172. }, 1024))), 128))
  1173. ]),
  1174. _: 1
  1175. })) : ($(), V("div", sn, [
  1176. D("img", { src: Z(Ee) }, null, 8, rn),
  1177. D("h4", null, O(n.$l("没有消息")), 1)
  1178. ]))
  1179. ]),
  1180. _: 1
  1181. })
  1182. ]),
  1183. _: 1
  1184. }, 8, ["spinning"]),
  1185. d(Xt, {
  1186. value: I.value,
  1187. "onUpdate:value": s[6] || (s[6] = (b) => I.value = b),
  1188. selectedList: y.value,
  1189. onDone: g
  1190. }, null, 8, ["value", "selectedList"])
  1191. ]);
  1192. };
  1193. }
  1194. }), bn = /* @__PURE__ */ yt(cn, [["__scopeId", "data-v-a8e737d5"]]);
  1195. export {
  1196. bn as default
  1197. };