egova-urbanpro-web 0.0.1

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.
Files changed (79) hide show
  1. package/README.md +134 -0
  2. package/es/_plugin-vue_export-helper-BwmSBgGG.js +9 -0
  3. package/es/act-menu-refresh-3YeQne1X.js +77 -0
  4. package/es/async-select-modal-lRKCEMBM.js +316 -0
  5. package/es/bulletin-add-Dt1Xi_oL.js +1251 -0
  6. package/es/bulletin-config-Ber1L1T2.js +297 -0
  7. package/es/bulletin-detail-Ce7riX6X.js +1430 -0
  8. package/es/bulletin-detail-file-2Ij39UlM.js +187 -0
  9. package/es/bulletin-drawer-DmwW23ng.js +461 -0
  10. package/es/bulletin-level-Cz_6Mg2x.js +501 -0
  11. package/es/bulletin-manage-JMjvzUhg.js +1526 -0
  12. package/es/bulletin-notify-info-drawer-vR3KSaRS.js +487 -0
  13. package/es/bulletin-property-CvohCK8q.js +656 -0
  14. package/es/bulletin-type-CQS6_MYv.js +675 -0
  15. package/es/bulletin-view-DcdZrV19.js +870 -0
  16. package/es/business-collection-and-repair-B2DfBAsx.js +109 -0
  17. package/es/cascader-filter-DOg-iNnE.js +68 -0
  18. package/es/cascader-multiple-filter-C-cKxmkk.js +103 -0
  19. package/es/chat-BB8_LIT6.js +4634 -0
  20. package/es/checkbox-filter-DC1VaGo9.js +39 -0
  21. package/es/chunk-CHb_fpD5.js +29 -0
  22. package/es/condition-search-criteria-B_HnHQBy.js +190 -0
  23. package/es/constant-CYnp-Cj8.js +4925 -0
  24. package/es/constants-BijBPSuc.js +480 -0
  25. package/es/constants-DQ6XzzDS.js +137 -0
  26. package/es/contact-DxLrJ_f_.js +339 -0
  27. package/es/contact-unit-BvCPmyNK.js +708 -0
  28. package/es/department-radio-filter-BbrntEcc.js +72 -0
  29. package/es/downtime-timer-repair-D_SuN4fE.js +255 -0
  30. package/es/dynamic-form-input-10ce5824-Cju2XHEl.js +60 -0
  31. package/es/dynamic-form-input-number-c60b4ff5-gYvoAgss.js +61 -0
  32. package/es/dynamic-form-login-type-6c9d78bf-CxtLGfA6.js +175 -0
  33. package/es/dynamic-form-multiple-select-3e2bd885-CrD_ALk8.js +77 -0
  34. package/es/dynamic-form-password-57dc81c4-CcmoNfq0.js +84 -0
  35. package/es/dynamic-form-region-tree-b2c57d1c-BRm2M8Er.js +133 -0
  36. package/es/dynamic-form-select-cdbf49ad-C0eLS2zd.js +76 -0
  37. package/es/dynamic-form-upload-768a0d32-ClHw2ZkO.js +116 -0
  38. package/es/egova-urbanpro-web.css +10907 -0
  39. package/es/egova-urbanpro-web.d.ts +79 -0
  40. package/es/egova-urbanpro-web.js +9223 -0
  41. package/es/field-cell-PNcIBk8w.js +93 -0
  42. package/es/field-icon-cell-BQvkUM-O.js +65 -0
  43. package/es/file-cell-ClyA9XoC.js +147 -0
  44. package/es/hooks-CuXq9j8q.js +324 -0
  45. package/es/icon-cell-BF-Nf-QP.js +78 -0
  46. package/es/im-conversation-06-TFmZZ.js +158 -0
  47. package/es/image-cell-cu9ezfsV.js +92 -0
  48. package/es/image-gray-surS1IZ2.js +5 -0
  49. package/es/index-15d85366-BVTMMFAV.js +97 -0
  50. package/es/index-lib-23bd328c-DtcJvHvJ.js +42122 -0
  51. package/es/info-card-DgYedeWN.js +30 -0
  52. package/es/localforage-B_66fZyP.js +1798 -0
  53. package/es/number-filter-SyfJaaIG.js +55 -0
  54. package/es/operation-selector-TEcr5s2w.js +157 -0
  55. package/es/option-style-BTFl4VQj.js +32 -0
  56. package/es/package.json +46 -0
  57. package/es/query-CiRQQsE1.js +11 -0
  58. package/es/radio-filter-t5QSYiRY.js +68 -0
  59. package/es/rec-delete-DBvqRiKp.js +74 -0
  60. package/es/rec-timer-refresh-Dfd6hH2t.js +74 -0
  61. package/es/region-radio-filter-CoybNPaj.js +271 -0
  62. package/es/render-cell-BI9mUiTe.js +45 -0
  63. package/es/select-checkbox-filter-B89vKdLG.js +60 -0
  64. package/es/select-multiple-tree-filter-BEYUKg7q.js +298 -0
  65. package/es/select-radio-filter-BW2P3uwp.js +58 -0
  66. package/es/select-single-tree-filter-CKYo3kV1.js +94 -0
  67. package/es/service-BabEdPB2.js +100 -0
  68. package/es/service-fs3hJh7w.js +126 -0
  69. package/es/text-filter-B80UB8KG.js +66 -0
  70. package/es/time-filter-Nc-cflut.js +211 -0
  71. package/es/types-DjDPFQk1.js +44 -0
  72. package/es/use-file-D_9JbApO.js +58 -0
  73. package/es/user-radio-filter-T79Kp2jW.js +72 -0
  74. package/es/utils-4fqWDxwG.js +2643 -0
  75. package/es/utils-BlJtAQle.js +161 -0
  76. package/es/utils-Cn_7yZzr.js +355 -0
  77. package/es/utils-D-E5UJPP.js +14 -0
  78. package/es/version.json +33 -0
  79. package/package.json +165 -0
@@ -0,0 +1,1430 @@
1
+ /*! egova-urbanpro-web v0.0.1 */
2
+ import { B as bus, I as signature, b as Enabled, j as http, k as media, s as I18NextKey, z as BusEventKey } from "./utils-4fqWDxwG.js";
3
+ import { t as _plugin_vue_export_helper_default } from "./_plugin-vue_export-helper-BwmSBgGG.js";
4
+ import { t as useNavTitle } from "./hooks-CuXq9j8q.js";
5
+ import "./index-lib-23bd328c-DtcJvHvJ.js";
6
+ import { E as BulletinService, h as DEFAULT_BULLETIN_LEVEL_STYLE_DATA, t as BULLETIN_IMAGE_MEDIA_TYPE_LIMIT } from "./constants-BijBPSuc.js";
7
+ import { s as getBulletinLevelStyle } from "./utils-BlJtAQle.js";
8
+ import { t as bulletin_detail_file_default } from "./bulletin-detail-file-2Ij39UlM.js";
9
+ import { debounce, isNil, merge } from "lodash-es";
10
+ import { EMediaTypeId, useMedia, useTableRequest } from "@kyjian/libs/hooks";
11
+ import { bodyPopupContainer, isEmptyText } from "@kyjian/libs/utils";
12
+ import { Fragment, Teleport, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createTextVNode, createVNode, defineComponent, mergeProps, normalizeClass, normalizeStyle, onActivated, onBeforeUnmount, onMounted, openBlock, popScopeId, pushScopeId, ref, renderList, renderSlot, resolveComponent, resolveDirective, toDisplayString, vShow, watch, watchEffect, withCtx, withDirectives } from "vue";
13
+ import { t } from "i18next";
14
+ import { message } from "ant-design-vue";
15
+ import { Avatar, Button, Image as Image$1, Pagination, Spin as Spin$1, TabPane, Tabs, Textarea as Textarea$1, Tooltip as Tooltip$1 } from "ant-design-vue/es";
16
+ import { ZtEditorText, ZtEmpty, ZtPanelBackground, ZtTypoText, ZtUploadMedia } from "zartd-biz/es/index";
17
+ import { useRoute } from "vue-router";
18
+ import dayjs from "dayjs";
19
+ import { useDraggable, useIntersectionObserver } from "@vueuse/core";
20
+ import { ZtEditorTextMenus } from "zartd-biz";
21
+ //#region ../egova-urbanpro-extend/src/views/bulletin/bulletin-detail/components/bulletin-detail-status-good/index.ts?vue&type=script&src=true&lang.ts
22
+ var index_ts_vue_type_script_src_true_lang_default$7 = defineComponent({
23
+ name: "VBulletinDetailStatusGood",
24
+ props: { bulletin: {
25
+ type: Object,
26
+ default: () => ({})
27
+ } },
28
+ setup(props, { expose }) {
29
+ const service = new BulletinService(http);
30
+ const rowKey = "id";
31
+ const showPagination = ref(false);
32
+ const { request, pagination, current, pageSize, dataSource, loading, handleTableChange, handleResult } = useTableRequest({
33
+ rowKey,
34
+ pagination: {
35
+ showSizeChanger: false,
36
+ simple: true,
37
+ pageSize: 20
38
+ }
39
+ });
40
+ async function getTableList() {
41
+ if (!props.bulletin?.id) return;
42
+ try {
43
+ loading.value = true;
44
+ const params = {
45
+ currentPage: current.value,
46
+ numPerPage: pageSize.value,
47
+ goodFlag: Enabled.ENABLE,
48
+ noticeId: props.bulletin.id,
49
+ sortField: "good_time"
50
+ };
51
+ const res = await service.getBulletinDetailHumanList(params);
52
+ if (!res?.hasError) {
53
+ handleResult(res);
54
+ if (res.result?.pageInfo?.totalPage && res.result.pageInfo.totalPage > 1) showPagination.value = true;
55
+ }
56
+ } catch (error) {
57
+ console.error("error: ", error);
58
+ } finally {
59
+ loading.value = false;
60
+ }
61
+ }
62
+ function handlePaginationChange(paginationCurrent, paginationSize) {
63
+ current.value = paginationCurrent;
64
+ pageSize.value = paginationSize;
65
+ }
66
+ function refresh() {
67
+ getTableList();
68
+ }
69
+ watch(() => [request.value, props.bulletin?.id], () => {
70
+ refresh();
71
+ }, { immediate: true });
72
+ expose({ refresh });
73
+ return {
74
+ dataSource,
75
+ loading,
76
+ rowKey,
77
+ request,
78
+ pagination,
79
+ handleTableChange,
80
+ handlePaginationChange,
81
+ showPagination,
82
+ refresh
83
+ };
84
+ }
85
+ });
86
+ //#endregion
87
+ //#region ../egova-urbanpro-extend/src/views/bulletin/bulletin-detail/components/bulletin-detail-status-good/index.vue
88
+ var _hoisted_1$7 = { class: "v-bulletin-detail-status-good" };
89
+ var _hoisted_2$7 = {
90
+ ref: "listBody",
91
+ class: "v-bulletin-detail-status-good-list"
92
+ };
93
+ var _hoisted_3$7 = {
94
+ key: 0,
95
+ class: "v-bulletin-detail-status-good-list-wrap"
96
+ };
97
+ var _hoisted_4$7 = { class: "human-name" };
98
+ var _hoisted_5$7 = { class: "name-wrap" };
99
+ var _hoisted_6$6 = {
100
+ key: 0,
101
+ class: "v-bulletin-detail-status-good-footer"
102
+ };
103
+ function _sfc_render$7(_ctx, _cache, $props, $setup, $data, $options) {
104
+ const _component_a_avatar = Avatar;
105
+ const _component_zt_typo_text = ZtTypoText;
106
+ const _component_zt_empty = ZtEmpty;
107
+ const _component_a_spin = Spin$1;
108
+ const _component_a_pagination = Pagination;
109
+ const _directive_zt_overlay_scrollbars = resolveDirective("zt-overlay-scrollbars");
110
+ return openBlock(), createElementBlock("div", _hoisted_1$7, [withDirectives((openBlock(), createElementBlock("main", _hoisted_2$7, [createVNode(_component_a_spin, {
111
+ spinning: _ctx.loading,
112
+ "wrapper-class-name": "zt-spin-full"
113
+ }, {
114
+ default: withCtx(() => [_ctx.dataSource.length > 0 ? (openBlock(), createElementBlock("div", _hoisted_3$7, [(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.dataSource, (item) => {
115
+ return openBlock(), createElementBlock("div", {
116
+ key: item.humanName,
117
+ class: "v-bulletin-detail-status-good-list-item"
118
+ }, [createElementVNode("div", _hoisted_4$7, [createVNode(_component_a_avatar, { class: "avatar" }, {
119
+ default: withCtx(() => [createTextVNode(toDisplayString(item.humanName?.slice(-2)), 1)]),
120
+ _: 2
121
+ }, 1024), createElementVNode("div", _hoisted_5$7, [createVNode(_component_zt_typo_text, { class: "name" }, {
122
+ default: withCtx(() => [createTextVNode(toDisplayString(item.humanName), 1)]),
123
+ _: 2
124
+ }, 1024), createVNode(_component_zt_typo_text, { class: "unit" }, {
125
+ default: withCtx(() => [createTextVNode(toDisplayString(item.unitName), 1)]),
126
+ _: 2
127
+ }, 1024)])])]);
128
+ }), 128))])) : (openBlock(), createBlock(_component_zt_empty, {
129
+ key: 1,
130
+ description: "暂无数据",
131
+ center: ""
132
+ }))]),
133
+ _: 1
134
+ }, 8, ["spinning"])])), [[_directive_zt_overlay_scrollbars]]), _ctx.showPagination ? (openBlock(), createElementBlock("footer", _hoisted_6$6, [createVNode(_component_a_pagination, mergeProps(_ctx.pagination, { onChange: _ctx.handlePaginationChange }), null, 16, ["onChange"])])) : createCommentVNode("", true)]);
135
+ }
136
+ var bulletin_detail_status_good_default = /* @__PURE__ */ _plugin_vue_export_helper_default(index_ts_vue_type_script_src_true_lang_default$7, [["render", _sfc_render$7], ["__scopeId", "data-v-e8e8aa87"]]);
137
+ //#endregion
138
+ //#region ../egova-urbanpro-extend/src/views/bulletin/bulletin-detail/components/bulletin-detail-status-read/index.ts?vue&type=script&src=true&lang.ts
139
+ var index_ts_vue_type_script_src_true_lang_default$6 = defineComponent({
140
+ name: "VBulletinDetailStatusRead",
141
+ props: {
142
+ bulletin: {
143
+ type: Object,
144
+ default: () => ({})
145
+ },
146
+ readFlag: {
147
+ type: Number,
148
+ default: Enabled.ENABLE
149
+ },
150
+ notReplyFlag: {
151
+ type: Boolean,
152
+ default: false
153
+ }
154
+ },
155
+ setup(props, { expose }) {
156
+ const service = new BulletinService(http);
157
+ const rowKey = "id";
158
+ const showPagination = ref(false);
159
+ const { request, pagination, current, pageSize, dataSource, loading, handleTableChange, handleResult } = useTableRequest({
160
+ rowKey,
161
+ pagination: {
162
+ showSizeChanger: false,
163
+ simple: true,
164
+ pageSize: 20
165
+ }
166
+ });
167
+ async function getTableList() {
168
+ if (!props.bulletin?.id) return;
169
+ try {
170
+ loading.value = true;
171
+ const params = merge({
172
+ currentPage: current.value,
173
+ numPerPage: pageSize.value,
174
+ noticeId: props.bulletin.id,
175
+ sortField: "read_time"
176
+ }, props.notReplyFlag ? { replyFlag: 0 } : { readFlag: props.readFlag });
177
+ const res = await service.getBulletinDetailHumanList(params);
178
+ if (!res?.hasError) {
179
+ handleResult(res, (data) => {
180
+ data.forEach((item) => {
181
+ item.readTime = item.readTime && dayjs(item.readTime).format("YYYY-MM-DD HH:mm");
182
+ item.receiveTime = item.receiveTime && dayjs(item.receiveTime).format("YYYY-MM-DD HH:mm");
183
+ });
184
+ return data;
185
+ });
186
+ if (res.result?.pageInfo?.totalPage && res.result.pageInfo.totalPage > 1) showPagination.value = true;
187
+ }
188
+ } catch (error) {
189
+ console.error("error: ", error);
190
+ } finally {
191
+ loading.value = false;
192
+ }
193
+ }
194
+ function handlePaginationChange(paginationCurrent, paginationSize) {
195
+ current.value = paginationCurrent;
196
+ pageSize.value = paginationSize;
197
+ }
198
+ function genListKey(key) {
199
+ return `${props.readFlag}_${key}`;
200
+ }
201
+ function refresh(init = false) {
202
+ if (init) current.value = 1;
203
+ getTableList();
204
+ }
205
+ watch(() => [request.value, props.bulletin?.id], () => {
206
+ refresh();
207
+ }, { immediate: true });
208
+ expose({ refresh });
209
+ return {
210
+ dataSource,
211
+ loading,
212
+ rowKey,
213
+ request,
214
+ pagination,
215
+ handleTableChange,
216
+ handlePaginationChange,
217
+ showPagination,
218
+ refresh,
219
+ bodyPopupContainer,
220
+ genListKey
221
+ };
222
+ }
223
+ });
224
+ //#endregion
225
+ //#region ../egova-urbanpro-extend/src/views/bulletin/bulletin-detail/components/bulletin-detail-status-read/index.vue
226
+ var _withScopeId$5 = (n) => (pushScopeId("data-v-5ca3d7e2"), n = n(), popScopeId(), n);
227
+ var _hoisted_1$6 = { class: "v-bulletin-detail-status-read" };
228
+ var _hoisted_2$6 = {
229
+ ref: "listBody",
230
+ class: "v-bulletin-detail-status-read-list"
231
+ };
232
+ var _hoisted_3$6 = {
233
+ key: 0,
234
+ class: "v-bulletin-detail-status-read-list-wrap"
235
+ };
236
+ var _hoisted_4$6 = { class: "human-name" };
237
+ var _hoisted_5$6 = { class: "name-wrap" };
238
+ var _hoisted_6$5 = { class: "unit-wrap" };
239
+ var _hoisted_7$5 = /* @__PURE__ */ _withScopeId$5(() => /* @__PURE__ */ createElementVNode("i", { class: "zt-nav-iconfont zt-nav-icon-line-institution" }, null, -1));
240
+ var _hoisted_8$5 = {
241
+ key: 0,
242
+ class: "human-read-time"
243
+ };
244
+ var _hoisted_9$3 = /* @__PURE__ */ _withScopeId$5(() => /* @__PURE__ */ createElementVNode("i", { class: "zt-iconfont zt-icon-enable" }, null, -1));
245
+ var _hoisted_10$2 = /* @__PURE__ */ _withScopeId$5(() => /* @__PURE__ */ createElementVNode("span", { class: "read-not-receive" }, "已读未接收", -1));
246
+ var _hoisted_11$2 = /* @__PURE__ */ _withScopeId$5(() => /* @__PURE__ */ createElementVNode("i", { class: "zt-iconfont zt-icon-enable" }, null, -1));
247
+ var _hoisted_12$2 = {
248
+ key: 1,
249
+ class: "human-unread"
250
+ };
251
+ var _hoisted_13$2 = /* @__PURE__ */ _withScopeId$5(() => /* @__PURE__ */ createElementVNode("i", { class: "zt-iconfont zt-icon-time" }, null, -1));
252
+ var _hoisted_14$2 = {
253
+ key: 0,
254
+ class: "v-bulletin-detail-status-read-footer"
255
+ };
256
+ function _sfc_render$6(_ctx, _cache, $props, $setup, $data, $options) {
257
+ const _component_a_avatar = Avatar;
258
+ const _component_zt_typo_text = ZtTypoText;
259
+ const _component_a_tooltip = Tooltip$1;
260
+ const _component_zt_empty = ZtEmpty;
261
+ const _component_a_spin = Spin$1;
262
+ const _component_a_pagination = Pagination;
263
+ const _directive_zt_overlay_scrollbars = resolveDirective("zt-overlay-scrollbars");
264
+ return openBlock(), createElementBlock("div", _hoisted_1$6, [withDirectives((openBlock(), createElementBlock("main", _hoisted_2$6, [createVNode(_component_a_spin, {
265
+ spinning: _ctx.loading,
266
+ "wrapper-class-name": "zt-spin-full"
267
+ }, {
268
+ default: withCtx(() => [_ctx.dataSource.length > 0 ? (openBlock(), createElementBlock("div", _hoisted_3$6, [(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.dataSource, (item) => {
269
+ return openBlock(), createElementBlock("div", {
270
+ key: _ctx.genListKey(item.id),
271
+ class: "v-bulletin-detail-status-read-list-item"
272
+ }, [createElementVNode("div", _hoisted_4$6, [createVNode(_component_a_avatar, { class: "avatar" }, {
273
+ default: withCtx(() => [createTextVNode(toDisplayString(item.humanName?.slice(-2)), 1)]),
274
+ _: 2
275
+ }, 1024), createElementVNode("div", _hoisted_5$6, [createVNode(_component_zt_typo_text, { class: "name" }, {
276
+ default: withCtx(() => [createTextVNode(toDisplayString(item.humanName), 1)]),
277
+ _: 2
278
+ }, 1024), createElementVNode("div", _hoisted_6$5, [_hoisted_7$5, createVNode(_component_zt_typo_text, { class: "unit" }, {
279
+ default: withCtx(() => [createTextVNode(toDisplayString(item.unitName), 1)]),
280
+ _: 2
281
+ }, 1024)])])]), item.readTime ? (openBlock(), createElementBlock("div", _hoisted_8$5, [!item.receiveFlag && _ctx.bulletin.needReceiveFlag ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [_ctx.notReplyFlag ? (openBlock(), createBlock(_component_a_tooltip, {
282
+ key: 0,
283
+ "get-popup-container": _ctx.bodyPopupContainer
284
+ }, {
285
+ title: withCtx(() => [createTextVNode(toDisplayString(item.receiveTime ? "接收时间" : "已读时间") + ":" + toDisplayString(item.receiveTime || item.readTime), 1)]),
286
+ default: withCtx(() => [createElementVNode("span", null, toDisplayString(`已${item.receiveTime ? "接收" : "读"}未回复`), 1)]),
287
+ _: 2
288
+ }, 1032, ["get-popup-container"])) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [_hoisted_9$3, _hoisted_10$2], 64))], 64)) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [!_ctx.notReplyFlag ? (openBlock(), createBlock(_component_a_tooltip, {
289
+ key: 0,
290
+ "get-popup-container": _ctx.bodyPopupContainer
291
+ }, {
292
+ title: withCtx(() => [createTextVNode(toDisplayString(item.receiveTime ? "接收时间" : "已读时间"), 1)]),
293
+ default: withCtx(() => [_hoisted_11$2, createElementVNode("span", null, toDisplayString(item.receiveTime || item.readTime), 1)]),
294
+ _: 2
295
+ }, 1032, ["get-popup-container"])) : (openBlock(), createBlock(_component_a_tooltip, {
296
+ key: 1,
297
+ "get-popup-container": _ctx.bodyPopupContainer
298
+ }, {
299
+ title: withCtx(() => [createTextVNode(toDisplayString(item.receiveTime ? "接收时间" : "已读时间") + ":" + toDisplayString(item.receiveTime || item.readTime), 1)]),
300
+ default: withCtx(() => [createElementVNode("span", null, toDisplayString(`已${item.receiveTime ? "接收" : "读"}未回复`), 1)]),
301
+ _: 2
302
+ }, 1032, ["get-popup-container"]))], 64))])) : !_ctx.readFlag ? (openBlock(), createElementBlock("div", _hoisted_12$2, [_hoisted_13$2, createTextVNode(" " + toDisplayString(_ctx.notReplyFlag ? "未回复" : "未读"), 1)])) : createCommentVNode("", true)]);
303
+ }), 128))])) : (openBlock(), createBlock(_component_zt_empty, {
304
+ key: 1,
305
+ description: "暂无数据",
306
+ center: ""
307
+ }))]),
308
+ _: 1
309
+ }, 8, ["spinning"])])), [[_directive_zt_overlay_scrollbars]]), _ctx.showPagination ? (openBlock(), createElementBlock("footer", _hoisted_14$2, [createVNode(_component_a_pagination, mergeProps(_ctx.pagination, { onChange: _ctx.handlePaginationChange }), null, 16, ["onChange"])])) : createCommentVNode("", true)]);
310
+ }
311
+ var bulletin_detail_status_read_default = /* @__PURE__ */ _plugin_vue_export_helper_default(index_ts_vue_type_script_src_true_lang_default$6, [["render", _sfc_render$6], ["__scopeId", "data-v-5ca3d7e2"]]);
312
+ //#endregion
313
+ //#region ../egova-urbanpro-core/src/components/drag-modal/index.ts?vue&type=script&src=true&lang.ts
314
+ /**
315
+ * 可以拖拽的弹窗且弹窗下的内容可以点击
316
+ */
317
+ var index_ts_vue_type_script_src_true_lang_default$5 = defineComponent({
318
+ name: "CDragModal",
319
+ props: {
320
+ visible: {
321
+ type: Boolean,
322
+ default: false
323
+ },
324
+ title: {
325
+ type: String,
326
+ default: ""
327
+ },
328
+ width: {
329
+ type: Number,
330
+ default: 520
331
+ }
332
+ },
333
+ emits: ["update:visible", "cancel"],
334
+ setup(props, { emit }) {
335
+ const modalTitleRef = ref(null);
336
+ const { x, y, isDragging } = useDraggable(modalTitleRef);
337
+ const startX = ref(0);
338
+ const startY = ref(0);
339
+ const startedDrag = ref(false);
340
+ const transformX = ref(0);
341
+ const transformY = ref(0);
342
+ const preTransformX = ref(0);
343
+ const preTransformY = ref(0);
344
+ const dragRect = ref({
345
+ left: -200,
346
+ right: 0,
347
+ top: 40,
348
+ bottom: 0
349
+ });
350
+ const transformStyle = computed(() => ({ transform: `translate(${transformX.value}px, ${transformY.value}px)` }));
351
+ const innerVisible = computed({
352
+ get() {
353
+ return props.visible;
354
+ },
355
+ set(val) {
356
+ emit("update:visible", val);
357
+ }
358
+ });
359
+ function handleCancel() {
360
+ transformX.value = 0;
361
+ transformY.value = 0;
362
+ emit("cancel");
363
+ emit("update:visible", false);
364
+ }
365
+ watch([() => x.value, () => y.value], () => {
366
+ if (isNil(modalTitleRef.value)) return;
367
+ if (!startedDrag.value) {
368
+ startX.value = x.value;
369
+ startY.value = y.value;
370
+ const bodyRect = document.body.getBoundingClientRect();
371
+ const titleRect = modalTitleRef.value.getBoundingClientRect();
372
+ dragRect.value.right = bodyRect.width - titleRect.width / 2;
373
+ dragRect.value.bottom = bodyRect.height - titleRect.height;
374
+ preTransformX.value = transformX.value;
375
+ preTransformY.value = transformY.value;
376
+ }
377
+ startedDrag.value = true;
378
+ });
379
+ watch(() => isDragging.value, () => {
380
+ if (!isDragging.value) startedDrag.value = false;
381
+ });
382
+ watchEffect(() => {
383
+ if (startedDrag.value) {
384
+ transformX.value = preTransformX.value + Math.min(Math.max(dragRect.value.left, x.value), dragRect.value.right) - startX.value;
385
+ transformY.value = preTransformY.value + Math.min(Math.max(dragRect.value.top, y.value), dragRect.value.bottom) - startY.value;
386
+ }
387
+ });
388
+ function unmountClear() {
389
+ modalTitleRef.value = null;
390
+ }
391
+ watch(() => props.visible, () => {
392
+ if (!props.visible) unmountClear();
393
+ });
394
+ onBeforeUnmount(() => {
395
+ unmountClear();
396
+ });
397
+ return {
398
+ innerVisible,
399
+ modalTitleRef,
400
+ transformStyle,
401
+ handleCancel
402
+ };
403
+ }
404
+ });
405
+ //#endregion
406
+ //#region ../egova-urbanpro-core/src/components/drag-modal/index.vue
407
+ var _withScopeId$4 = (n) => (pushScopeId("data-v-224a862d"), n = n(), popScopeId(), n);
408
+ var _hoisted_1$5 = {
409
+ ref: "modalTitleRef",
410
+ class: "c-drag-modal-title"
411
+ };
412
+ var _hoisted_2$5 = { class: "c-drag-modal-title-word" };
413
+ var _hoisted_3$5 = { class: "c-drag-modal-title-close" };
414
+ var _hoisted_4$5 = /* @__PURE__ */ _withScopeId$4(() => /* @__PURE__ */ createElementVNode("i", { class: "zt-iconfont zt-icon-close" }, null, -1));
415
+ var _hoisted_5$5 = { class: "c-drag-modal-body" };
416
+ function _sfc_render$5(_ctx, _cache, $props, $setup, $data, $options) {
417
+ const _component_a_button = Button;
418
+ return openBlock(), createBlock(Teleport, { to: "body" }, [_ctx.visible ? (openBlock(), createElementBlock("div", {
419
+ key: 0,
420
+ class: "c-drag-modal",
421
+ style: normalizeStyle(_ctx.transformStyle)
422
+ }, [createElementVNode("div", _hoisted_1$5, [createElementVNode("div", _hoisted_2$5, toDisplayString(_ctx.title), 1), createElementVNode("div", _hoisted_3$5, [createVNode(_component_a_button, {
423
+ type: "text",
424
+ onClick: _ctx.handleCancel
425
+ }, {
426
+ icon: withCtx(() => [_hoisted_4$5]),
427
+ _: 1
428
+ }, 8, ["onClick"])])], 512), createElementVNode("div", _hoisted_5$5, [renderSlot(_ctx.$slots, "default", {}, void 0, true)])], 4)) : createCommentVNode("", true)]);
429
+ }
430
+ //#endregion
431
+ //#region ../egova-urbanpro-extend/src/views/bulletin/bulletin-detail/components/bulletin-reply-text/index.ts?vue&type=script&src=true&lang.ts
432
+ var index_ts_vue_type_script_src_true_lang_default$4 = defineComponent({
433
+ name: "CBulletinReplyText",
434
+ components: { CDragModal: /* @__PURE__ */ _plugin_vue_export_helper_default(index_ts_vue_type_script_src_true_lang_default$5, [["render", _sfc_render$5], ["__scopeId", "data-v-224a862d"]]) },
435
+ props: {
436
+ maxRows: {
437
+ type: Number,
438
+ default: 1
439
+ },
440
+ word: {
441
+ type: String,
442
+ default: ""
443
+ }
444
+ },
445
+ setup(props) {
446
+ const wordExpanded = ref(false);
447
+ const showWordExpandedBtn = ref(false);
448
+ const wordAreaRef = ref();
449
+ const expandBtnRef = ref();
450
+ const expandLastWordRef = ref();
451
+ const statusRef = ref();
452
+ const agreeFlag = ref();
453
+ const agreeStatus = ref("");
454
+ const currentWord = ref("");
455
+ function handleToggleExpanded() {
456
+ wordExpanded.value = !wordExpanded.value;
457
+ }
458
+ function calculateHeight() {
459
+ if (!wordAreaRef.value || !props.word) return;
460
+ const el = wordAreaRef.value;
461
+ const baseWidth = el.getBoundingClientRect().width;
462
+ const stateWidth = (statusRef.value?.getBoundingClientRect().width ?? 0) + 8 * (window.pageZoomRef.value || 1);
463
+ const baseFontSize = window.getComputedStyle(el).fontSize.slice(0, -2);
464
+ const rowWordNum = Math.floor((baseWidth - stateWidth) / +baseFontSize);
465
+ const numberOfLineBreaks = (currentWord.value.match(/\n/g) ?? []).length;
466
+ if (numberOfLineBreaks === 0) {
467
+ if (currentWord.value.length > rowWordNum * props.maxRows) showWordExpandedBtn.value = true;
468
+ else showWordExpandedBtn.value = false;
469
+ return;
470
+ }
471
+ if (numberOfLineBreaks > props.maxRows - 1) showWordExpandedBtn.value = true;
472
+ else if (currentWord.value.length > rowWordNum * (props.maxRows - numberOfLineBreaks)) showWordExpandedBtn.value = true;
473
+ else showWordExpandedBtn.value = false;
474
+ }
475
+ watch([
476
+ () => currentWord.value,
477
+ () => statusRef.value,
478
+ () => wordAreaRef.value
479
+ ], () => {
480
+ calculateHeight();
481
+ }, { immediate: true });
482
+ const slicedWords = computed(() => {
483
+ return {
484
+ pre: currentWord.value.slice(0, currentWord.value.length - 1),
485
+ last: currentWord.value.slice(-1)
486
+ };
487
+ });
488
+ /** 判断展开后的文本最后一行是否跟收起按钮重叠了 */
489
+ const isOverlap = computed(() => {
490
+ if (wordExpanded.value && expandBtnRef.value && expandLastWordRef.value) {
491
+ const expandBtnRect = expandBtnRef.value.getBoundingClientRect();
492
+ const expandLastWordRect = expandLastWordRef.value.getBoundingClientRect();
493
+ return !(expandBtnRect.right < expandLastWordRect.left || expandBtnRect.left > expandLastWordRect.right);
494
+ }
495
+ return false;
496
+ });
497
+ watch(() => props.word, (val) => {
498
+ agreeFlag.value = void 0;
499
+ if (!isEmptyText(val)) {
500
+ const reg = /^(\[不同意\]|\[同意\])/gm;
501
+ currentWord.value = val;
502
+ currentWord.value = currentWord.value.replace(reg, (match) => {
503
+ if (match === "[不同意]") {
504
+ agreeFlag.value = false;
505
+ agreeStatus.value = "<span>不同意</span>";
506
+ } else {
507
+ agreeFlag.value = true;
508
+ agreeStatus.value = "<span>同意</span>";
509
+ }
510
+ return "";
511
+ });
512
+ if (isEmptyText(currentWord.value)) currentWord.value = "-";
513
+ }
514
+ }, { immediate: true });
515
+ return {
516
+ wordExpanded,
517
+ showWordExpandedBtn,
518
+ wordAreaRef,
519
+ handleToggleExpanded,
520
+ expandBtnRef,
521
+ slicedWords,
522
+ expandLastWordRef,
523
+ statusRef,
524
+ isOverlap,
525
+ agreeStatus,
526
+ agreeFlag,
527
+ isNil,
528
+ currentWord
529
+ };
530
+ }
531
+ });
532
+ //#endregion
533
+ //#region ../egova-urbanpro-extend/src/views/bulletin/bulletin-detail/components/bulletin-reply-text/index.vue
534
+ var _withScopeId$3 = (n) => (pushScopeId("data-v-0bccf567"), n = n(), popScopeId(), n);
535
+ var _hoisted_1$4 = { class: "c-bulletin-reply-text" };
536
+ var _hoisted_2$4 = {
537
+ ref: "wordAreaRef",
538
+ class: "c-bulletin-reply-text-container"
539
+ };
540
+ var _hoisted_3$4 = {
541
+ key: 0,
542
+ class: "c-bulletin-reply-text-ellipse"
543
+ };
544
+ var _hoisted_4$4 = /* @__PURE__ */ _withScopeId$3(() => /* @__PURE__ */ createElementVNode("i", { class: "zt-iconfont zt-icon-arrow-down" }, null, -1));
545
+ var _hoisted_5$4 = {
546
+ key: 0,
547
+ class: "c-bulletin-reply-text-expanded-container"
548
+ };
549
+ var _hoisted_6$4 = {
550
+ key: 0,
551
+ class: "c-bulletin-reply-text-expanded"
552
+ };
553
+ var _hoisted_7$4 = { class: "c-bulletin-reply-text-expanded-textarea" };
554
+ var _hoisted_8$4 = /* @__PURE__ */ _withScopeId$3(() => /* @__PURE__ */ createElementVNode("i", { class: "zt-iconfont zt-icon-arrow-up" }, null, -1));
555
+ function _sfc_render$4(_ctx, _cache, $props, $setup, $data, $options) {
556
+ const _component_a_textarea = Textarea$1;
557
+ const _directive_zt_xss_html = resolveDirective("zt-xss-html");
558
+ return openBlock(), createElementBlock("div", _hoisted_1$4, [withDirectives(createElementVNode("div", _hoisted_2$4, [
559
+ withDirectives(createElementVNode("div", {
560
+ ref: "statusRef",
561
+ class: normalizeClass([
562
+ "c-bulletin-reply-text-container-status",
563
+ _ctx.agreeFlag ? "agree" : "disagree",
564
+ _ctx.isNil(_ctx.agreeFlag) && "hidden"
565
+ ])
566
+ }, null, 2), [[_directive_zt_xss_html, _ctx.agreeStatus]]),
567
+ createVNode(_component_a_textarea, {
568
+ value: _ctx.currentWord,
569
+ "onUpdate:value": _cache[0] || (_cache[0] = ($event) => _ctx.currentWord = $event),
570
+ "auto-size": { maxRows: _ctx.maxRows },
571
+ class: "c-bulletin-reply-text-container-text",
572
+ readonly: ""
573
+ }, null, 8, ["value", "auto-size"]),
574
+ _ctx.showWordExpandedBtn ? (openBlock(), createElementBlock("div", _hoisted_3$4)) : createCommentVNode("", true),
575
+ _ctx.showWordExpandedBtn ? (openBlock(), createElementBlock("div", {
576
+ key: 1,
577
+ class: "c-bulletin-reply-text-btn c-bulletin-reply-text-btn-absolute c-bulletin-reply-text-container-btn",
578
+ onClick: _cache[1] || (_cache[1] = (...args) => _ctx.handleToggleExpanded && _ctx.handleToggleExpanded(...args))
579
+ }, [createTextVNode(" 展开"), _hoisted_4$4])) : createCommentVNode("", true)
580
+ ], 512), [[vShow, !_ctx.wordExpanded]]), _ctx.wordExpanded ? (openBlock(), createElementBlock("div", _hoisted_5$4, [withDirectives(createElementVNode("div", {
581
+ ref: "statusRef",
582
+ class: normalizeClass([
583
+ "c-bulletin-reply-text-container-status",
584
+ _ctx.agreeFlag ? "agree" : "disagree",
585
+ _ctx.isNil(_ctx.agreeFlag) && "hidden"
586
+ ])
587
+ }, null, 2), [[_directive_zt_xss_html, _ctx.agreeStatus]]), _ctx.wordExpanded ? (openBlock(), createElementBlock("div", _hoisted_6$4, [createElementVNode("div", _hoisted_7$4, [createElementVNode("span", null, toDisplayString(_ctx.slicedWords.pre), 1), createElementVNode("span", { ref: "expandLastWordRef" }, toDisplayString(_ctx.slicedWords.last), 513)]), createElementVNode("div", {
588
+ ref: "expandBtnRef",
589
+ class: normalizeClass([[_ctx.isOverlap ? " c-bulletin-reply-text-expanded-btn-overlap" : " c-bulletin-reply-text-expanded-btn"], "c-bulletin-reply-text-btn c-bulletin-reply-text-btn-absolute"]),
590
+ onClick: _cache[2] || (_cache[2] = (...args) => _ctx.handleToggleExpanded && _ctx.handleToggleExpanded(...args))
591
+ }, [createTextVNode(" 收起"), _hoisted_8$4], 2)])) : createCommentVNode("", true)])) : createCommentVNode("", true)]);
592
+ }
593
+ //#endregion
594
+ //#region ../egova-urbanpro-extend/src/views/bulletin/bulletin-detail/components/bulletin-detail-status-reply-item/index.ts?vue&type=script&src=true&lang.ts
595
+ var index_ts_vue_type_script_src_true_lang_default$3 = defineComponent({
596
+ name: "VBulletinDetailStatusReplyItem",
597
+ components: { CBulletinReplyText: /* @__PURE__ */ _plugin_vue_export_helper_default(index_ts_vue_type_script_src_true_lang_default$4, [["render", _sfc_render$4], ["__scopeId", "data-v-0bccf567"]]) },
598
+ props: { reply: {
599
+ type: Object,
600
+ default: () => ({})
601
+ } },
602
+ setup(props) {
603
+ const getMediaUrl = (mediaUrl) => {
604
+ return signature.signatureHref(media.getFullMediaPath(mediaUrl));
605
+ };
606
+ return {
607
+ dayjs,
608
+ getMediaUrl,
609
+ unitRoleName: computed(() => {
610
+ if (props.reply.roleNames?.length) return props.reply.unitName + "/" + props.reply.roleNames[0];
611
+ return props.reply.unitName;
612
+ })
613
+ };
614
+ }
615
+ });
616
+ //#endregion
617
+ //#region ../egova-urbanpro-extend/src/views/bulletin/bulletin-detail/components/bulletin-detail-status-reply-item/index.vue
618
+ var _hoisted_1$3 = { class: "v-bulletin-detail-status-reply-item" };
619
+ var _hoisted_2$3 = { class: "v-bulletin-detail-status-reply-item-avatar" };
620
+ var _hoisted_3$3 = { class: "v-bulletin-detail-status-reply-item-content" };
621
+ var _hoisted_4$3 = { class: "v-bulletin-detail-status-reply-item-content-name" };
622
+ var _hoisted_5$3 = { class: "name" };
623
+ var _hoisted_6$3 = { class: "unit-name" };
624
+ var _hoisted_7$3 = {
625
+ key: 0,
626
+ class: "v-bulletin-detail-status-reply-item-content-media"
627
+ };
628
+ var _hoisted_8$3 = {
629
+ key: 1,
630
+ class: "v-bulletin-detail-status-reply-item-content-time"
631
+ };
632
+ function _sfc_render$3(_ctx, _cache, $props, $setup, $data, $options) {
633
+ const _component_a_avatar = Avatar;
634
+ const _component_c_bulletin_reply_text = resolveComponent("c-bulletin-reply-text");
635
+ const _component_a_image = Image$1;
636
+ return openBlock(), createElementBlock("div", _hoisted_1$3, [createElementVNode("div", _hoisted_2$3, [createVNode(_component_a_avatar, { class: "avatar" }, {
637
+ default: withCtx(() => [createTextVNode(toDisplayString(_ctx.reply.humanName?.slice(-2)), 1)]),
638
+ _: 1
639
+ })]), createElementVNode("div", _hoisted_3$3, [
640
+ createElementVNode("div", _hoisted_4$3, [createElementVNode("div", _hoisted_5$3, toDisplayString(_ctx.reply.humanName), 1), createElementVNode("div", _hoisted_6$3, toDisplayString(_ctx.unitRoleName), 1)]),
641
+ createVNode(_component_c_bulletin_reply_text, {
642
+ "max-rows": 2,
643
+ word: _ctx.reply.replyContent,
644
+ class: "v-bulletin-detail-status-reply-item-content-text"
645
+ }, null, 8, ["word"]),
646
+ _ctx.reply.mediaList?.length ? (openBlock(), createElementBlock("div", _hoisted_7$3, [(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.reply.mediaList, (item) => {
647
+ return openBlock(), createBlock(_component_a_image, {
648
+ key: item.id,
649
+ src: _ctx.getMediaUrl(item.mediaUrl),
650
+ width: 64,
651
+ height: 64
652
+ }, null, 8, ["src"]);
653
+ }), 128))])) : createCommentVNode("", true),
654
+ _ctx.reply.replyTime ? (openBlock(), createElementBlock("div", _hoisted_8$3, toDisplayString(_ctx.dayjs(_ctx.reply.replyTime)?.format("YYYY-MM-DD HH:mm")), 1)) : createCommentVNode("", true)
655
+ ])]);
656
+ }
657
+ //#endregion
658
+ //#region ../egova-urbanpro-extend/src/views/bulletin/bulletin-detail/components/bulletin-detail-status-reply/index.ts?vue&type=script&src=true&lang.ts
659
+ var index_ts_vue_type_script_src_true_lang_default$2 = defineComponent({
660
+ name: "VBulletinDetailStatusReply",
661
+ components: { VBulletinDetailStatusReplyItem: /* @__PURE__ */ _plugin_vue_export_helper_default(index_ts_vue_type_script_src_true_lang_default$3, [["render", _sfc_render$3], ["__scopeId", "data-v-29d20b7d"]]) },
662
+ props: {
663
+ bulletin: {
664
+ type: Object,
665
+ default: () => ({})
666
+ },
667
+ isPreview: {
668
+ type: Boolean,
669
+ default: false
670
+ }
671
+ },
672
+ emits: ["reply"],
673
+ setup(props, { emit }) {
674
+ const service = new BulletinService(http);
675
+ const PAGE_SIZE = 10;
676
+ const { batchUploadFiles } = useMedia({ typeId: EMediaTypeId.BULLETIN_REPLY });
677
+ const loading = ref(false);
678
+ const loadError = ref(false);
679
+ const replyList = ref([]);
680
+ const submitting = ref(false);
681
+ const replyValue = ref("");
682
+ const replyMediaList = ref([]);
683
+ const currentPageIndex = ref(1);
684
+ const replyListAnchor = ref();
685
+ const canLoadMore = ref(true);
686
+ const mediaMaxNum = ref(5);
687
+ const handleBeforeUpload = (file) => {
688
+ const fileUnit = file.name.split(".").pop();
689
+ const isCheck = fileUnit && ".png,.jpg,.svg,.jpeg,.gif,.tif".indexOf(fileUnit?.toLocaleLowerCase()) > -1;
690
+ if (!isCheck) message.error("不支持的文件类型!");
691
+ return isCheck;
692
+ };
693
+ const loadListData = async () => {
694
+ try {
695
+ loadError.value = false;
696
+ const res = await service.getBulletinReplyList({
697
+ noticeId: props.bulletin.id,
698
+ currentPage: currentPageIndex.value,
699
+ numPerPage: PAGE_SIZE
700
+ });
701
+ if (!res.hasError) {
702
+ const list = (res.result?.resultList || []).filter((item) => {
703
+ return !replyList.value.find((reply) => reply.id === item.id);
704
+ });
705
+ replyList.value = replyList.value.concat(list);
706
+ currentPageIndex.value++;
707
+ }
708
+ if (!res.result?.pageInfo?.currentRecord) canLoadMore.value = false;
709
+ } catch (e) {
710
+ console.error("通告回复数据异常", e);
711
+ loadError.value = true;
712
+ }
713
+ };
714
+ const loadMore = async () => {
715
+ if (loading.value) return;
716
+ loading.value = true;
717
+ try {
718
+ await loadListData();
719
+ } finally {
720
+ loading.value = false;
721
+ }
722
+ };
723
+ function handleReload() {
724
+ loadMore();
725
+ }
726
+ useIntersectionObserver(replyListAnchor, ([{ isIntersecting }]) => {
727
+ if (isIntersecting && canLoadMore.value && !loadError.value) loadMore();
728
+ });
729
+ /**
730
+ * 回复完成后,将回复的数据添加进入恢复列表中,同时更新回复数量
731
+ */
732
+ async function doAfterReply(replyId) {
733
+ replyMediaList.value = [];
734
+ replyValue.value = "";
735
+ try {
736
+ const res = await service.getBulletinReplyList({
737
+ id: replyId,
738
+ noticeId: props.bulletin.id
739
+ });
740
+ if (!res.hasError && res.result?.resultList.length) {
741
+ replyList.value.unshift(res.result.resultList[0]);
742
+ emit("reply");
743
+ }
744
+ } catch (error) {
745
+ console.log("error: ", error);
746
+ }
747
+ }
748
+ async function handleSubmit() {
749
+ if (isEmptyText(replyValue.value)) {
750
+ message.warn("请输入回复内容");
751
+ return;
752
+ }
753
+ submitting.value = true;
754
+ try {
755
+ const res = await service.replyBulletin({
756
+ noticeId: props.bulletin.id,
757
+ replyContent: replyValue.value
758
+ });
759
+ if (!res.hasError && res.result?.noticeReplyId) {
760
+ if (replyMediaList.value.length > 0) try {
761
+ await batchUploadFiles(replyMediaList.value, res.result?.noticeReplyId?.toString() ?? "", "通知公告附件");
762
+ } catch (error) {
763
+ message.error("文件上传失败");
764
+ }
765
+ doAfterReply(res.result?.noticeReplyId);
766
+ message.success("回复成功");
767
+ }
768
+ } catch (e) {
769
+ console.error("回复失败", e);
770
+ } finally {
771
+ submitting.value = false;
772
+ }
773
+ }
774
+ onMounted(() => {
775
+ loadMore();
776
+ });
777
+ return {
778
+ loading,
779
+ replyList,
780
+ loadError,
781
+ handleReload,
782
+ submitting,
783
+ replyValue,
784
+ handleSubmit,
785
+ replyMediaList,
786
+ handleBeforeUpload,
787
+ BULLETIN_IMAGE_MEDIA_TYPE_LIMIT,
788
+ mediaMaxNum,
789
+ replyListAnchor
790
+ };
791
+ }
792
+ });
793
+ //#endregion
794
+ //#region ../egova-urbanpro-extend/src/views/bulletin/bulletin-detail/components/bulletin-detail-status-reply/index.vue
795
+ var _withScopeId$2 = (n) => (pushScopeId("data-v-7b20a9f4"), n = n(), popScopeId(), n);
796
+ var _hoisted_1$2 = { class: "v-bulletin-detail-status-reply" };
797
+ var _hoisted_2$2 = { class: "v-bulletin-detail-status-reply-textarea" };
798
+ var _hoisted_3$2 = { class: "v-bulletin-detail-status-reply-textarea-media" };
799
+ var _hoisted_4$2 = { class: "v-bulletin-detail-status-reply-textarea-media-inner" };
800
+ var _hoisted_5$2 = /* @__PURE__ */ _withScopeId$2(() => /* @__PURE__ */ createElementVNode("i", { class: "zt-iconfont zt-icon-plus" }, null, -1));
801
+ var _hoisted_6$2 = { class: "v-bulletin-detail-status-reply-list" };
802
+ var _hoisted_7$2 = { key: 0 };
803
+ var _hoisted_8$2 = {
804
+ key: 3,
805
+ class: "v-bulletin-detail-status-reply-list-load-more"
806
+ };
807
+ var _hoisted_9$2 = {
808
+ ref: "replyListAnchor",
809
+ class: "v-bulletin-detail-status-reply-list-anchor"
810
+ };
811
+ function _sfc_render$2(_ctx, _cache, $props, $setup, $data, $options) {
812
+ const _component_a_textarea = Textarea$1;
813
+ const _component_zt_upload_media = ZtUploadMedia;
814
+ const _component_a_button = Button;
815
+ const _component_v_bulletin_detail_status_reply_item = resolveComponent("v-bulletin-detail-status-reply-item");
816
+ const _component_zt_empty = ZtEmpty;
817
+ const _component_a_spin = Spin$1;
818
+ return openBlock(), createElementBlock("div", _hoisted_1$2, [withDirectives(createElementVNode("div", _hoisted_2$2, [createVNode(_component_a_textarea, {
819
+ value: _ctx.replyValue,
820
+ "onUpdate:value": _cache[0] || (_cache[0] = ($event) => _ctx.replyValue = $event),
821
+ valueModifiers: { trim: true },
822
+ rows: 4,
823
+ maxlength: 1e3,
824
+ "show-count": "",
825
+ placeholder: "请输入回复内容",
826
+ class: "v-bulletin-detail-status-reply-textarea-ant"
827
+ }, null, 8, ["value"]), createElementVNode("div", _hoisted_3$2, [createVNode(_component_zt_upload_media, {
828
+ value: _ctx.replyMediaList,
829
+ "onUpdate:value": _cache[1] || (_cache[1] = ($event) => _ctx.replyMediaList = $event),
830
+ "upload-mode": "picture",
831
+ "picture-layout": "row",
832
+ accept: _ctx.BULLETIN_IMAGE_MEDIA_TYPE_LIMIT,
833
+ "max-count": _ctx.mediaMaxNum,
834
+ multiple: "",
835
+ "on-before-upload": _ctx.handleBeforeUpload
836
+ }, {
837
+ default: withCtx(() => [createElementVNode("div", _hoisted_4$2, [_hoisted_5$2, createElementVNode("span", null, toDisplayString(_ctx.replyMediaList.length) + "/" + toDisplayString(_ctx.mediaMaxNum), 1)])]),
838
+ _: 1
839
+ }, 8, [
840
+ "value",
841
+ "accept",
842
+ "max-count",
843
+ "on-before-upload"
844
+ ]), createVNode(_component_a_button, {
845
+ loading: _ctx.submitting,
846
+ type: "primary",
847
+ onClick: _ctx.handleSubmit
848
+ }, {
849
+ default: withCtx(() => [createTextVNode(" 回复 ")]),
850
+ _: 1
851
+ }, 8, ["loading", "onClick"])])], 512), [[vShow, !_ctx.isPreview]]), createElementVNode("div", _hoisted_6$2, [
852
+ _ctx.replyList?.length ? (openBlock(), createElementBlock("div", _hoisted_7$2, [(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.replyList, (item) => {
853
+ return openBlock(), createBlock(_component_v_bulletin_detail_status_reply_item, {
854
+ key: item.id,
855
+ reply: item,
856
+ class: "v-bulletin-detail-status-reply-list-item"
857
+ }, null, 8, ["reply"]);
858
+ }), 128))])) : !_ctx.loadError && !_ctx.loading ? (openBlock(), createBlock(_component_zt_empty, {
859
+ key: 1,
860
+ description: "暂无数据",
861
+ center: ""
862
+ })) : createCommentVNode("", true),
863
+ _ctx.loadError ? (openBlock(), createElementBlock("div", {
864
+ key: 2,
865
+ class: "v-bulletin-detail-status-reply-list-load-error",
866
+ onClick: _cache[2] || (_cache[2] = (...args) => _ctx.handleReload && _ctx.handleReload(...args))
867
+ }, "请求失败,点击重新加载")) : _ctx.loading ? (openBlock(), createElementBlock("div", _hoisted_8$2, [createVNode(_component_a_spin)])) : createCommentVNode("", true),
868
+ createElementVNode("div", _hoisted_9$2, null, 512)
869
+ ])]);
870
+ }
871
+ //#endregion
872
+ //#region ../egova-urbanpro-extend/src/views/bulletin/bulletin-detail/components/bulletin-detail-status/index.ts?vue&type=script&src=true&lang.ts
873
+ var index_ts_vue_type_script_src_true_lang_default$1 = defineComponent({
874
+ name: "VBulletinDetailStatus",
875
+ components: {
876
+ VBulletinDetailStatusRead: bulletin_detail_status_read_default,
877
+ VBulletinDetailStatusGood: bulletin_detail_status_good_default,
878
+ VBulletinDetailStatusReply: /* @__PURE__ */ _plugin_vue_export_helper_default(index_ts_vue_type_script_src_true_lang_default$2, [["render", _sfc_render$2], ["__scopeId", "data-v-7b20a9f4"]])
879
+ },
880
+ props: {
881
+ bulletin: {
882
+ type: Object,
883
+ default: () => ({})
884
+ },
885
+ isPreview: {
886
+ type: Boolean,
887
+ default: false
888
+ }
889
+ },
890
+ setup(props, { expose }) {
891
+ const service = new BulletinService(http);
892
+ const tabKeys = ref({
893
+ read: "read",
894
+ unRead: "unRead",
895
+ good: "good",
896
+ reply: "reply",
897
+ unReply: "unReply"
898
+ });
899
+ const activeKey = ref(tabKeys.value.read);
900
+ const bulletinDetailStatusReadRef = ref();
901
+ const bulletinDetailStatusGoodRef = ref();
902
+ const bulletinDetailStatusUnReplyRef = ref();
903
+ const allStatusNum = ref({
904
+ readCount: 0,
905
+ noReadCount: 0,
906
+ goodCount: 0,
907
+ noGoodCount: 0,
908
+ receiveCount: 0,
909
+ noReceiveCount: 0,
910
+ replyCount: 0,
911
+ noReplyCount: 0
912
+ });
913
+ const isFirstReply = ref(true);
914
+ function handleReplyFinish() {
915
+ initStatusNum();
916
+ if (!isFirstReply.value) return;
917
+ isFirstReply.value = false;
918
+ bulletinDetailStatusUnReplyRef.value?.refresh(true);
919
+ }
920
+ async function initStatusNum() {
921
+ if (isEmptyText(props.bulletin.id)) return;
922
+ try {
923
+ const res = await service.getBulletinStatusNum({ noticeId: props.bulletin.id });
924
+ if (!res.hasError && res.result) allStatusNum.value = res.result;
925
+ } catch (error) {
926
+ console.log("error: ", error);
927
+ }
928
+ }
929
+ function canRenderNum(num) {
930
+ if (isEmptyText(num)) return false;
931
+ if (num <= 0) return false;
932
+ return true;
933
+ }
934
+ watchEffect(() => {
935
+ if (props.bulletin.id) initStatusNum();
936
+ });
937
+ function refreshGoodStatus() {
938
+ initStatusNum();
939
+ bulletinDetailStatusGoodRef.value?.refresh();
940
+ }
941
+ function refresh() {
942
+ initStatusNum();
943
+ bulletinDetailStatusReadRef.value?.refresh();
944
+ }
945
+ expose({
946
+ refresh,
947
+ refreshGoodStatus,
948
+ allStatusNum
949
+ });
950
+ return {
951
+ activeKey,
952
+ Enabled,
953
+ allStatusNum,
954
+ refresh,
955
+ bulletinDetailStatusGoodRef,
956
+ tabKeys,
957
+ bulletinDetailStatusReadRef,
958
+ refreshGoodStatus,
959
+ handleReplyFinish,
960
+ canRenderNum,
961
+ bulletinDetailStatusUnReplyRef
962
+ };
963
+ }
964
+ });
965
+ //#endregion
966
+ //#region ../egova-urbanpro-extend/src/views/bulletin/bulletin-detail/components/bulletin-detail-status/index.vue
967
+ var _withScopeId$1 = (n) => (pushScopeId("data-v-37d74973"), n = n(), popScopeId(), n);
968
+ var _hoisted_1$1 = { class: "v-bulletin-detail-status" };
969
+ var _hoisted_2$1 = { class: "v-bulletin-detail-status-tab-pane" };
970
+ var _hoisted_3$1 = /* @__PURE__ */ _withScopeId$1(() => /* @__PURE__ */ createElementVNode("div", { class: "name" }, "已读", -1));
971
+ var _hoisted_4$1 = {
972
+ key: 0,
973
+ class: "count"
974
+ };
975
+ var _hoisted_5$1 = { class: "v-bulletin-detail-status-tab-pane" };
976
+ var _hoisted_6$1 = /* @__PURE__ */ _withScopeId$1(() => /* @__PURE__ */ createElementVNode("div", { class: "name" }, "未读", -1));
977
+ var _hoisted_7$1 = {
978
+ key: 0,
979
+ class: "count"
980
+ };
981
+ var _hoisted_8$1 = { class: "v-bulletin-detail-status-tab-pane" };
982
+ var _hoisted_9$1 = /* @__PURE__ */ _withScopeId$1(() => /* @__PURE__ */ createElementVNode("div", { class: "name" }, "已回复", -1));
983
+ var _hoisted_10$1 = {
984
+ key: 0,
985
+ class: "count"
986
+ };
987
+ var _hoisted_11$1 = { class: "v-bulletin-detail-status-tab-pane" };
988
+ var _hoisted_12$1 = /* @__PURE__ */ _withScopeId$1(() => /* @__PURE__ */ createElementVNode("div", { class: "name" }, "未回复", -1));
989
+ var _hoisted_13$1 = {
990
+ key: 0,
991
+ class: "count"
992
+ };
993
+ var _hoisted_14$1 = { class: "v-bulletin-detail-status-tab-pane" };
994
+ var _hoisted_15$1 = /* @__PURE__ */ _withScopeId$1(() => /* @__PURE__ */ createElementVNode("div", { class: "name" }, "点赞", -1));
995
+ var _hoisted_16$1 = {
996
+ key: 0,
997
+ class: "count"
998
+ };
999
+ function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
1000
+ const _component_v_bulletin_detail_status_read = resolveComponent("v-bulletin-detail-status-read");
1001
+ const _component_a_tab_pane = TabPane;
1002
+ const _component_v_bulletin_detail_status_reply = resolveComponent("v-bulletin-detail-status-reply");
1003
+ const _component_v_bulletin_detail_status_good = resolveComponent("v-bulletin-detail-status-good");
1004
+ const _component_a_tabs = Tabs;
1005
+ return openBlock(), createElementBlock("div", _hoisted_1$1, [createVNode(_component_a_tabs, {
1006
+ activeKey: _ctx.activeKey,
1007
+ "onUpdate:activeKey": _cache[0] || (_cache[0] = ($event) => _ctx.activeKey = $event),
1008
+ class: "v-bulletin-detail-status-tab"
1009
+ }, {
1010
+ default: withCtx(() => [
1011
+ (openBlock(), createBlock(_component_a_tab_pane, { key: _ctx.tabKeys.read }, {
1012
+ tab: withCtx(() => [createElementVNode("div", _hoisted_2$1, [_hoisted_3$1, _ctx.canRenderNum(_ctx.allStatusNum?.readCount) ? (openBlock(), createElementBlock("div", _hoisted_4$1, toDisplayString(_ctx.allStatusNum?.readCount), 1)) : createCommentVNode("", true)])]),
1013
+ default: withCtx(() => [createVNode(_component_v_bulletin_detail_status_read, {
1014
+ ref: "bulletinDetailStatusReadRef",
1015
+ bulletin: _ctx.bulletin
1016
+ }, null, 8, ["bulletin"])]),
1017
+ _: 1
1018
+ })),
1019
+ (openBlock(), createBlock(_component_a_tab_pane, { key: _ctx.tabKeys.unRead }, {
1020
+ tab: withCtx(() => [createElementVNode("div", _hoisted_5$1, [_hoisted_6$1, _ctx.canRenderNum(_ctx.allStatusNum?.noReadCount) ? (openBlock(), createElementBlock("div", _hoisted_7$1, toDisplayString(_ctx.allStatusNum?.noReadCount), 1)) : createCommentVNode("", true)])]),
1021
+ default: withCtx(() => [createVNode(_component_v_bulletin_detail_status_read, {
1022
+ bulletin: _ctx.bulletin,
1023
+ "read-flag": _ctx.Enabled.NOT_ENABLE
1024
+ }, null, 8, ["bulletin", "read-flag"])]),
1025
+ _: 1
1026
+ })),
1027
+ (openBlock(), createBlock(_component_a_tab_pane, { key: _ctx.tabKeys.reply }, {
1028
+ tab: withCtx(() => [createElementVNode("div", _hoisted_8$1, [_hoisted_9$1, _ctx.canRenderNum(_ctx.allStatusNum?.replyCount) ? (openBlock(), createElementBlock("div", _hoisted_10$1, toDisplayString(_ctx.allStatusNum?.replyCount), 1)) : createCommentVNode("", true)])]),
1029
+ default: withCtx(() => [createVNode(_component_v_bulletin_detail_status_reply, {
1030
+ bulletin: _ctx.bulletin,
1031
+ "is-preview": _ctx.isPreview,
1032
+ onReply: _ctx.handleReplyFinish
1033
+ }, null, 8, [
1034
+ "bulletin",
1035
+ "is-preview",
1036
+ "onReply"
1037
+ ])]),
1038
+ _: 1
1039
+ })),
1040
+ (openBlock(), createBlock(_component_a_tab_pane, { key: _ctx.tabKeys.unReply }, {
1041
+ tab: withCtx(() => [createElementVNode("div", _hoisted_11$1, [_hoisted_12$1, _ctx.canRenderNum(_ctx.allStatusNum?.noReplyCount) ? (openBlock(), createElementBlock("div", _hoisted_13$1, toDisplayString(_ctx.allStatusNum?.noReplyCount), 1)) : createCommentVNode("", true)])]),
1042
+ default: withCtx(() => [createVNode(_component_v_bulletin_detail_status_read, {
1043
+ ref: "bulletinDetailStatusUnReplyRef",
1044
+ bulletin: _ctx.bulletin,
1045
+ "read-flag": _ctx.Enabled.NOT_ENABLE,
1046
+ "not-reply-flag": ""
1047
+ }, null, 8, ["bulletin", "read-flag"])]),
1048
+ _: 1
1049
+ })),
1050
+ (openBlock(), createBlock(_component_a_tab_pane, { key: _ctx.tabKeys.good }, {
1051
+ tab: withCtx(() => [createElementVNode("div", _hoisted_14$1, [_hoisted_15$1, _ctx.canRenderNum(_ctx.allStatusNum?.goodCount) ? (openBlock(), createElementBlock("div", _hoisted_16$1, toDisplayString(_ctx.allStatusNum?.goodCount), 1)) : createCommentVNode("", true)])]),
1052
+ default: withCtx(() => [createVNode(_component_v_bulletin_detail_status_good, {
1053
+ ref: "bulletinDetailStatusGoodRef",
1054
+ bulletin: _ctx.bulletin
1055
+ }, null, 8, ["bulletin"])]),
1056
+ _: 1
1057
+ }))
1058
+ ]),
1059
+ _: 1
1060
+ }, 8, ["activeKey"])]);
1061
+ }
1062
+ var bulletin_detail_status_default = /* @__PURE__ */ _plugin_vue_export_helper_default(index_ts_vue_type_script_src_true_lang_default$1, [["render", _sfc_render$1], ["__scopeId", "data-v-37d74973"]]);
1063
+ //#endregion
1064
+ //#region ../egova-urbanpro-core/src/assets/images/bulletin/bulletin-detail-have-good-icon.png
1065
+ var bulletin_detail_have_good_icon_default = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAMAAACdt4HsAAABKVBMVEUAAABlrP8ziP84i/+Du/+FwP9Bkf+Ev/+Gwf+Dv/+GwP9tsv9FlP+Bvf93u/9tsP9lq/+FwP9Kl/+FwP96uf+Gwf+Gwf86jf9Snf+Gwf9vsv9SnP91tv9GmP9/vv9tr/9Glf86jf9hp/9Tn/9ssP9Unv9Jl/9usf9ztP82iv+Dv/9mq/9cpf9KmP9lrf8zif8zif+GwP+Fwv9cpf9Tn/+Hwf94t/99u/89j/9bpP8ziP9gp/8/kP9Pm/9Rnf9Nm/80iP9Tnv85jP9bpP+Hwf+Hwf9QnP9Glf9Wn/8ziP+FwP9PnP9KmP9ztP99u/82iv87jv9Flf9gp/9dpf9ao/9Yov9lqv9iqP9VoP9orP9Tnv9qrv9tr/95uP93tv9vsf+Bvf9Bkv8/kP9Q5R7LAAAASXRSTlMACtYrBvkW7tW2fVJGKw/17uHPy8CpoJp/aV5aRSEf/fXq6Ojj4ODXyMXBvrSRgIB3X1RBOTUaFPjv3dra2cCysqqpoIx7bGNNJ5ZB0QAAAXhJREFUWMPt0ddWwkAQgOENJIGE0LsU6b1It/dGB7uI9f0fwrMcTcQkh7hz4U3+B/h2Zhbp6a2Kbpa2EqUGRQxcpm9vrq8SFUQYm3zAwP1dhXCG0OwLcFjIgMA38JiyEQFlEXhaIwKOJKBIMgK7LwFZKwHQTEuAPUwAnM8kYJ3gH6i9vgTMCa4Y6sMAIYMB8hUirgEG/nZE1oiL4P0vMoMlIGWJttudjo2ikXobeQMu7zca/bHpMmDP5nIej4fjOK+Prysq7GF30Xg82fx4n/4C5q/D4cvzaPTWwznPKIX3uyIwWQX0GF4ubGsHsFCTAV3tAI6DAiYowPz7BE4oYIYCbijghQKnUCAIBJg6EHC2gIA7CgS8NBDgERBoAQETDQR8CAYwNSBgtgIBHw0EwggGmGkYwAQRCMAnVMqgGQgixao/gN2yK6YKuG3KAOsXgbiAECUEDlxJBaBgRSqxVcMCiB8LaBEVaYQCJ8Udh0METAU+ivT05H0CMoz/POawNrwAAAAASUVORK5CYII=";
1066
+ //#endregion
1067
+ //#region ../egova-urbanpro-core/src/assets/images/bulletin/bulletin-detail-good-icon.png
1068
+ var bulletin_detail_good_icon_default = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAMAAACdt4HsAAABzlBMVEUAAABVnP8zh/81iP82i/85jf9FlP9fpP9orf+FwP+Ewf+FwP+Dv/98uP9fp/+Fv/+Cvf94v/9ztf80if9nrP+Dv/+Fwf9UoP97uv+Ewf+CvP8+kP82iP+Fwf9xsv9Pm/91tv9dpf89kP8zif+Gwv9orP9cpP+Fwf83jP9hqf+FwP81iv+FwP+Cvv+Fvf+Avf8ziP8ziP+Dv/9qrf86jv9/vP81iv+Bvv81iv9WoP90tf99u/9qrv90tP9nrP9wsv+Dv/+Cv/+Gwf9/vf81iv+Fv/+Hwv9Wov9mqf83iv9qrf9Zo/9ao/9nrP+FwP9wsf9Glv9bpP9Jl/9fp/93t/9ytP9ElP8ziP9Vn/8/kf9Nmv92tv8ziP9Lmf9kqv9JmP81iv9wsf9ao/9wsv9Il/9KmP81if+Gwf99vP83i/9usv9Flf+EwP9Nmf8zif9Klv93tf84j/83i/9RnP9trv9epP94t/97uv9bpP9gqP94tv80if9bpP8ziP+FwP97uv88jv8+j/9Akf9Ck/91tf9kqv9iqP9Vn/9Glv9fpv9Lmf9/vP9tsP9QnP94t/9nq/9ztP9dpf93t/85jP+Bvf9wsv9prf9bo/83i/9Yov8zrEQkAAAAfXRSTlMABlUrD7mxFAn8xenPFdtAHA3597+zrKKhTSMgFNjAwL+/vbq3raOWiFdGPTwtEfrw5+Tk3tjUysW/urGko6OhmY5/e3pwT0E5MyAa/Pj08vLv6+nj4eDb0c3GraeioZuWjYWEhHNnZWBdXFpZTUg0LRn77tHIxb+wlXNwbTmHpbwAAALuSURBVFjD7dZVVxtBGAbgWWibEAJEGkiIC4VQ3N3d3Yq7S91CKrQ4LRQq/7b7TpcsgUh3uOW9mnNyvufMZL6ZWXKX/8o9d1luZ3/JooqxvmW8/efR0cV3zctNpvrW2C/fKLBz1mdgqJe/+XoJnHjzM6QDjb0+4MzrreIkA9P7AJ7PWDT8DLz56ZKBFwBy1UQ+hRkc1ksGYgEk8QOVBoCeDSjDyHbCA4XsMyBPACglA90AKnxAvtR62SmAKQxLmJbwHkD7MoZ9+BPjpfaxHUBuEz9U72AG1SREjBF1kylLzdyVPk5oA5Ck5sfLADJXQ9TPF2k9Hs/TvJQt3zmebvsFwM2PuUo0Uk5a0HLTpIfm948PeRsEka0N7f4BQDdxsx8z0AU/TSlaH/DRYSTyjTnrs10KxDbh9xkNgNqg9Y9RfAl8GujZOzg4PqZAL62Xd9LTqFQoFK5kQ8zNUz/qB3ze8wGxboIkXlDg8HybT4frxqGMHERx9rypucgP6H7dIjSUBhcKAJqchmvAehaAOo5fS94VYMgtI0IsIoCY1f5AhAdpxm44BKBnZKLxSkukl4hLQKoDAZHY+/sABmZXGo2c/+X8Vl9aWqrT6cxRABSqkMADLsQ1mwwgOo4ZIKkAogy3BDpuAdTfcglcPABlIjOgUgBwyZmBtGgANYQZWKV9YGAHkukuZrADCgBmwgyo6Qqq2IG0bWSBHagR2ogNENuIGUhUAojnGAGxjZiBBboJcYyA2EbsgBmAkrABYhuxAeJ1tsgO1AptFBaQB7mRdcKVHg5wyCS0EbKuBbCEV7IAQNdcq8wvMTSq6kwA9QFe92wATiO+EwDsdY1Yrdbi4mK73f4QsVhsNturwsxzAOk3AZPTg2Q5C64/76f7wte6+Ly7SIC88wgJD+SkBgK4ovDACQWiG4J84xSIwMRwcECB+oDZcmb9A4ZXCFmbHRtL4POIz3hFRVllZXl5uV6vr40jwWOKGB3UZjvqjOQu0vIX8Rj6AuAwmE8AAAAASUVORK5CYII=";
1069
+ //#endregion
1070
+ //#region ../egova-urbanpro-extend/src/views/bulletin/bulletin-detail/index.ts?vue&type=script&src=true&lang.ts
1071
+ var index_ts_vue_type_script_src_true_lang_default = defineComponent({
1072
+ name: "VBulletinDetail",
1073
+ components: {
1074
+ CBulletinDetailFile: bulletin_detail_file_default,
1075
+ VBulletinDetailStatus: bulletin_detail_status_default
1076
+ },
1077
+ setup() {
1078
+ const service = new BulletinService(http);
1079
+ const route = useRoute();
1080
+ const isPreview = ref(!!route.query.preview);
1081
+ const title = computed(() => {
1082
+ if (isPreview.value) return `${t(I18NextKey.NOTICE_SHORT)}预览`;
1083
+ return `${t(I18NextKey.NOTICE_SHORT)}详情`;
1084
+ });
1085
+ useNavTitle({
1086
+ title,
1087
+ replace: true,
1088
+ updateDocumentTitle: true
1089
+ });
1090
+ const bulletinDetailStatusRef = ref();
1091
+ const bulletinId = ref();
1092
+ const loading = ref(false);
1093
+ const editorId = ref("bulletin-detail-editor-text");
1094
+ const bulletin = ref();
1095
+ const bulletinDetail = ref();
1096
+ const bulletinCanceled = computed(() => {
1097
+ return bulletin.value?.cancelFlag === Enabled.ENABLE;
1098
+ });
1099
+ const showBulletinCancelTip = computed(() => {
1100
+ return bulletinCanceled.value && !isPreview.value;
1101
+ });
1102
+ /** 当前人是否接收 */
1103
+ const receiveFlag = ref(Enabled.NOT_ENABLE);
1104
+ const receiveLoading = ref(false);
1105
+ const receiveFlagState = computed(() => {
1106
+ if (receiveFlag.value) return {
1107
+ disabled: true,
1108
+ text: "已接收",
1109
+ icon: "zt-iconfont zt-icon-right",
1110
+ type: "default"
1111
+ };
1112
+ return {
1113
+ disabled: false,
1114
+ text: "确认接收",
1115
+ icon: "zt-iconfont zt-icon-all-check",
1116
+ type: "primary"
1117
+ };
1118
+ });
1119
+ const goodNum = computed(() => {
1120
+ return bulletinDetailStatusRef.value?.allStatusNum?.goodCount || bulletin.value?.goodNum || 0;
1121
+ });
1122
+ const goodFlag = ref(Enabled.NOT_ENABLE);
1123
+ const goodFlagState = computed(() => {
1124
+ if (goodFlag.value) return {
1125
+ img: bulletin_detail_have_good_icon_default,
1126
+ text: "已点赞"
1127
+ };
1128
+ return {
1129
+ img: bulletin_detail_good_icon_default,
1130
+ text: "点赞"
1131
+ };
1132
+ });
1133
+ function refreshCurrentTabList() {
1134
+ bulletinDetailStatusRef.value?.refresh();
1135
+ }
1136
+ async function handleReceive() {
1137
+ if (receiveFlag.value) return;
1138
+ receiveLoading.value = true;
1139
+ try {
1140
+ if (!(await service.receiveBulletin({ noticeId: bulletinId.value })).hasError) receiveFlag.value = Enabled.ENABLE;
1141
+ refreshCurrentTabList();
1142
+ } catch (error) {
1143
+ console.log("error: ", error);
1144
+ } finally {
1145
+ receiveLoading.value = false;
1146
+ }
1147
+ }
1148
+ /** 只有在已读之后,再展示已读未读列表这些,避免数据错误 */
1149
+ const renderBulletinStatusHumanTab = ref(false);
1150
+ async function readBulletin() {
1151
+ try {
1152
+ await service.readBulletin({ noticeId: bulletinId.value });
1153
+ bus.emit(BusEventKey.BULLETIN__VIEW__NAV_DOT__REFRESH, true);
1154
+ } catch (error) {
1155
+ console.log("error: ", error);
1156
+ }
1157
+ }
1158
+ /**
1159
+ * 获取当前人在当前文章的已读、点赞、接收等状态
1160
+ */
1161
+ async function getBulletinStatusOfMine() {
1162
+ try {
1163
+ const res = await service.getBulletinStatusOfMine({ noticeId: bulletinId.value });
1164
+ if (!res.hasError) {
1165
+ goodFlag.value = res.result?.noticeHuman?.goodFlag ?? Enabled.NOT_ENABLE;
1166
+ receiveFlag.value = res.result?.noticeHuman?.receiveFlag ?? Enabled.NOT_ENABLE;
1167
+ if (!isPreview.value) {
1168
+ if (res.result?.noticeHuman?.readFlag !== Enabled.ENABLE) await readBulletin();
1169
+ }
1170
+ renderBulletinStatusHumanTab.value = true;
1171
+ }
1172
+ } catch (error) {
1173
+ console.log("error: ", error);
1174
+ }
1175
+ }
1176
+ async function initBulletinData() {
1177
+ try {
1178
+ loading.value = true;
1179
+ const res = await service.getBulletinDetail({ noticeId: bulletinId.value });
1180
+ if (!res.hasError) {
1181
+ bulletinDetail.value = res.result;
1182
+ bulletin.value = {
1183
+ ...res.result?.noticeInfo,
1184
+ content: res.result?.noticeInfoContent?.content || "",
1185
+ files: res.result?.mediaList ?? []
1186
+ };
1187
+ }
1188
+ } catch (error) {
1189
+ console.log("error: ", error);
1190
+ } finally {
1191
+ loading.value = false;
1192
+ }
1193
+ }
1194
+ const bulletinLevelList = ref([]);
1195
+ async function initBulletinLevel() {
1196
+ try {
1197
+ const res = await service.getBulletinLevelListNoAuth();
1198
+ if (!res.hasError) bulletinLevelList.value = res.result?.resultList ?? [];
1199
+ } catch (error) {
1200
+ console.log("error: ", error);
1201
+ }
1202
+ }
1203
+ const levelStyle = computed(() => {
1204
+ if (bulletin.value?.levelId) return getBulletinLevelStyle(bulletinLevelList.value, bulletin.value?.levelId);
1205
+ return DEFAULT_BULLETIN_LEVEL_STYLE_DATA;
1206
+ });
1207
+ async function handleDownloadAttachment(file) {
1208
+ try {
1209
+ file.fileName = file.fileName || file.name;
1210
+ await downloadFile(file);
1211
+ if (!isPreview.value) {
1212
+ await service.updateMediaDownloadNum(file.uid, bulletinId.value);
1213
+ file.downloadNum = (file.downloadNum ?? 0) + 1;
1214
+ }
1215
+ } catch (error) {
1216
+ console.log("error: ", error);
1217
+ }
1218
+ }
1219
+ async function downloadFile(file) {
1220
+ try {
1221
+ const url = file?.mediaUrl;
1222
+ const fileName = file?.fileName;
1223
+ if (isEmptyText(url)) return;
1224
+ media.adownloadFileByMediaUrl(url, fileName);
1225
+ } catch (error) {
1226
+ console.log(error);
1227
+ }
1228
+ }
1229
+ /**
1230
+ * 点赞此文章,可以取消点赞
1231
+ */
1232
+ async function handleGoodBulletin() {
1233
+ goodFlag.value = { flag: goodFlag.value ? Enabled.NOT_ENABLE : Enabled.ENABLE }.flag;
1234
+ if (isEmptyText(bulletinId.value)) return;
1235
+ try {
1236
+ let res;
1237
+ if (goodFlag.value) res = await service.goodBulletin(bulletinId.value);
1238
+ else res = await service.noGoodBulletin(bulletinId.value);
1239
+ if (!res.hasError) {
1240
+ getBulletinStatusOfMine();
1241
+ bulletinDetailStatusRef.value?.refreshGoodStatus();
1242
+ }
1243
+ } catch (error) {
1244
+ console.log("error: ", error);
1245
+ }
1246
+ }
1247
+ const debounceGoodBulletin = debounce(handleGoodBulletin, 200);
1248
+ onMounted(async () => {
1249
+ initBulletinLevel();
1250
+ if (route.query.id) {
1251
+ bulletinId.value = Number(route.query.id);
1252
+ await getBulletinStatusOfMine();
1253
+ initBulletinData();
1254
+ }
1255
+ });
1256
+ onActivated(() => {
1257
+ initBulletinData();
1258
+ });
1259
+ return {
1260
+ bulletin,
1261
+ levelStyle,
1262
+ editorId,
1263
+ handleDownloadAttachment,
1264
+ dayjs,
1265
+ ZtEditorTextMenus,
1266
+ title,
1267
+ loading,
1268
+ renderBulletinStatusHumanTab,
1269
+ goodFlagState,
1270
+ handleGoodBulletin,
1271
+ bulletinDetailStatusRef,
1272
+ isPreview,
1273
+ debounceGoodBulletin,
1274
+ receiveFlag,
1275
+ receiveFlagState,
1276
+ handleReceive,
1277
+ receiveLoading,
1278
+ goodNum,
1279
+ bulletinCanceled,
1280
+ showBulletinCancelTip
1281
+ };
1282
+ }
1283
+ });
1284
+ //#endregion
1285
+ //#region ../egova-urbanpro-extend/src/views/bulletin/bulletin-detail/index.vue
1286
+ var _withScopeId = (n) => (pushScopeId("data-v-60bcf082"), n = n(), popScopeId(), n);
1287
+ var _hoisted_1 = {
1288
+ key: 1,
1289
+ class: "v-bulletin-detail"
1290
+ };
1291
+ var _hoisted_2 = { class: "v-bulletin-detail-header" };
1292
+ var _hoisted_3 = { class: "v-bulletin-detail-header-title" };
1293
+ var _hoisted_4 = { class: "v-bulletin-detail-header-btn" };
1294
+ var _hoisted_5 = { class: "v-bulletin-detail-wrapper" };
1295
+ var _hoisted_6 = { class: "v-bulletin-detail-content" };
1296
+ var _hoisted_7 = { class: "v-bulletin-detail-content-title" };
1297
+ var _hoisted_8 = { class: "v-bulletin-detail-content-title-info" };
1298
+ var _hoisted_9 = { class: "v-bulletin-detail-content-basic" };
1299
+ var _hoisted_10 = { class: "left" };
1300
+ var _hoisted_11 = {
1301
+ key: 0,
1302
+ class: "v-bulletin-detail-content-basic-item"
1303
+ };
1304
+ var _hoisted_12 = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ createElementVNode("div", { class: "icon" }, [/* @__PURE__ */ createElementVNode("i", { class: "zt-iconfont zt-icon-user" })], -1));
1305
+ var _hoisted_13 = { class: "name" };
1306
+ var _hoisted_14 = {
1307
+ key: 1,
1308
+ class: "v-bulletin-detail-content-basic-item"
1309
+ };
1310
+ var _hoisted_15 = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ createElementVNode("div", { class: "icon" }, [/* @__PURE__ */ createElementVNode("i", { class: "zt-iconfont zt-icon-time" })], -1));
1311
+ var _hoisted_16 = { class: "name" };
1312
+ var _hoisted_17 = { class: "right" };
1313
+ var _hoisted_18 = { class: "v-bulletin-detail-content-basic-item" };
1314
+ var _hoisted_19 = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ createElementVNode("div", { class: "icon" }, [/* @__PURE__ */ createElementVNode("i", { class: "zt-iconfont zt-icon-eye" })], -1));
1315
+ var _hoisted_20 = { class: "name" };
1316
+ var _hoisted_21 = { class: "v-bulletin-detail-content-basic-item" };
1317
+ var _hoisted_22 = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ createElementVNode("div", { class: "icon" }, [/* @__PURE__ */ createElementVNode("i", { class: "ega-core-iconfont ega-core-icon-good" })], -1));
1318
+ var _hoisted_23 = { class: "name" };
1319
+ var _hoisted_24 = /* @__PURE__ */ _withScopeId(() => /* @__PURE__ */ createElementVNode("div", { class: "v-bulletin-detail-content-divide" }, null, -1));
1320
+ var _hoisted_25 = { class: "v-bulletin-detail-content-info" };
1321
+ var _hoisted_26 = {
1322
+ key: 0,
1323
+ class: "v-bulletin-detail-content-info-attachment"
1324
+ };
1325
+ var _hoisted_27 = ["onClick"];
1326
+ var _hoisted_28 = { class: "v-bulletin-detail-good-wrap" };
1327
+ var _hoisted_29 = ["src"];
1328
+ var _hoisted_30 = { class: "v-bulletin-detail-good-wrap-text" };
1329
+ var _hoisted_31 = { class: "v-bulletin-detail-status-wrap" };
1330
+ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
1331
+ const _component_zt_empty = ZtEmpty;
1332
+ const _component_a_button = Button;
1333
+ const _component_zt_typo_text = ZtTypoText;
1334
+ const _component_zt_editor_text = ZtEditorText;
1335
+ const _component_c_bulletin_detail_file = resolveComponent("c-bulletin-detail-file");
1336
+ const _component_v_bulletin_detail_status = resolveComponent("v-bulletin-detail-status");
1337
+ const _component_a_spin = Spin$1;
1338
+ const _component_zt_panel_background = ZtPanelBackground;
1339
+ const _directive_zt_overlay_scrollbars = resolveDirective("zt-overlay-scrollbars");
1340
+ return openBlock(), createBlock(_component_zt_panel_background, { padding: 0 }, {
1341
+ default: withCtx(() => [createVNode(_component_a_spin, {
1342
+ spinning: _ctx.loading,
1343
+ "wrapper-class-name": "zt-spin-full"
1344
+ }, {
1345
+ default: withCtx(() => [_ctx.showBulletinCancelTip ? (openBlock(), createBlock(_component_zt_empty, {
1346
+ key: 0,
1347
+ class: "v-bulletin-detail",
1348
+ size: "large",
1349
+ description: "该通知公告已被撤回"
1350
+ })) : (openBlock(), createElementBlock("div", _hoisted_1, [createElementVNode("div", _hoisted_2, [createElementVNode("div", _hoisted_3, toDisplayString(_ctx.title), 1), createElementVNode("div", _hoisted_4, [_ctx.bulletin?.needReceiveFlag && !_ctx.isPreview ? (openBlock(), createBlock(_component_a_button, {
1351
+ key: 0,
1352
+ disabled: _ctx.receiveFlagState.disabled,
1353
+ loading: _ctx.receiveLoading,
1354
+ type: _ctx.receiveFlagState.type,
1355
+ onClick: _ctx.handleReceive
1356
+ }, {
1357
+ icon: withCtx(() => [createElementVNode("i", { class: normalizeClass(_ctx.receiveFlagState.icon) }, null, 2)]),
1358
+ default: withCtx(() => [createTextVNode(" " + toDisplayString(_ctx.receiveFlagState.text), 1)]),
1359
+ _: 1
1360
+ }, 8, [
1361
+ "disabled",
1362
+ "loading",
1363
+ "type",
1364
+ "onClick"
1365
+ ])) : createCommentVNode("", true)])]), withDirectives((openBlock(), createElementBlock("div", _hoisted_5, [
1366
+ createElementVNode("div", _hoisted_6, [
1367
+ createElementVNode("div", _hoisted_7, [createElementVNode("div", {
1368
+ class: "v-bulletin-detail-content-title-level",
1369
+ style: normalizeStyle({
1370
+ background: _ctx.levelStyle.background,
1371
+ color: _ctx.levelStyle.color
1372
+ })
1373
+ }, toDisplayString(_ctx.levelStyle.name), 5), createElementVNode("div", _hoisted_8, [createVNode(_component_zt_typo_text, null, {
1374
+ default: withCtx(() => [createTextVNode(toDisplayString(_ctx.bulletin?.title), 1)]),
1375
+ _: 1
1376
+ })])]),
1377
+ createElementVNode("div", _hoisted_9, [createElementVNode("div", _hoisted_10, [_ctx.bulletin?.createHumanName ? (openBlock(), createElementBlock("div", _hoisted_11, [_hoisted_12, createElementVNode("div", _hoisted_13, toDisplayString(_ctx.bulletin?.createHumanName), 1)])) : createCommentVNode("", true), _ctx.bulletin?.publishTime ? (openBlock(), createElementBlock("div", _hoisted_14, [_hoisted_15, createElementVNode("div", _hoisted_16, toDisplayString(_ctx.dayjs(_ctx.bulletin?.publishTime)?.format("YYYY-MM-DD HH:mm")), 1)])) : createCommentVNode("", true)]), createElementVNode("div", _hoisted_17, [createElementVNode("div", _hoisted_18, [_hoisted_19, createElementVNode("div", _hoisted_20, toDisplayString(_ctx.bulletin?.readNum ?? 0), 1)]), createElementVNode("div", _hoisted_21, [_hoisted_22, createElementVNode("div", _hoisted_23, toDisplayString(_ctx.goodNum ?? 0), 1)])])]),
1378
+ _hoisted_24,
1379
+ createElementVNode("div", _hoisted_25, [(openBlock(), createBlock(_component_zt_editor_text, {
1380
+ id: _ctx.editorId,
1381
+ key: _ctx.editorId,
1382
+ ref: "editorRef",
1383
+ value: _ctx.bulletin?.content,
1384
+ "value-type": "HTML",
1385
+ disabled: "",
1386
+ class: "v-bulletin-detail-content-info-editor-text",
1387
+ menus: _ctx.ZtEditorTextMenus
1388
+ }, null, 8, [
1389
+ "id",
1390
+ "value",
1391
+ "menus"
1392
+ ])), _ctx.bulletin?.files?.length ? (openBlock(), createElementBlock("div", _hoisted_26, [(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.bulletin?.files, (file) => {
1393
+ return openBlock(), createBlock(_component_c_bulletin_detail_file, {
1394
+ key: file.id,
1395
+ media: file,
1396
+ preview: "",
1397
+ bulletin: _ctx.bulletin,
1398
+ "show-download-num": "",
1399
+ class: "custom-attachment"
1400
+ }, {
1401
+ icon: withCtx(() => [createElementVNode("i", {
1402
+ class: "zt-iconfont zt-icon-download",
1403
+ onClick: ($event) => _ctx.handleDownloadAttachment(file)
1404
+ }, null, 8, _hoisted_27)]),
1405
+ _: 2
1406
+ }, 1032, ["media", "bulletin"]);
1407
+ }), 128))])) : createCommentVNode("", true)])
1408
+ ]),
1409
+ withDirectives(createElementVNode("div", _hoisted_28, [createElementVNode("div", {
1410
+ class: "v-bulletin-detail-good-wrap-img-wrap",
1411
+ onClick: _cache[0] || (_cache[0] = (...args) => _ctx.debounceGoodBulletin && _ctx.debounceGoodBulletin(...args))
1412
+ }, [createElementVNode("img", {
1413
+ src: _ctx.goodFlagState.img,
1414
+ alt: ""
1415
+ }, null, 8, _hoisted_29)]), createElementVNode("div", _hoisted_30, toDisplayString(_ctx.goodFlagState.text), 1)], 512), [[vShow, _ctx.renderBulletinStatusHumanTab && !_ctx.isPreview]]),
1416
+ createElementVNode("div", _hoisted_31, [_ctx.renderBulletinStatusHumanTab ? (openBlock(), createBlock(_component_v_bulletin_detail_status, {
1417
+ key: 0,
1418
+ ref: "bulletinDetailStatusRef",
1419
+ bulletin: _ctx.bulletin,
1420
+ "is-preview": _ctx.isPreview
1421
+ }, null, 8, ["bulletin", "is-preview"])) : createCommentVNode("", true)])
1422
+ ])), [[_directive_zt_overlay_scrollbars]])]))]),
1423
+ _: 1
1424
+ }, 8, ["spinning"])]),
1425
+ _: 1
1426
+ });
1427
+ }
1428
+ var bulletin_detail_default = /* @__PURE__ */ _plugin_vue_export_helper_default(index_ts_vue_type_script_src_true_lang_default, [["render", _sfc_render], ["__scopeId", "data-v-60bcf082"]]);
1429
+ //#endregion
1430
+ export { bulletin_detail_default as default };