@cmstops/pro-compo 3.9.2-alpha.21 → 3.9.2-alpha.23

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 (35) hide show
  1. package/es/contentModal/components/ViewAllColumn/MediaFilter/index.js +6 -177
  2. package/es/contentModal/components/ViewAllColumn/index.js +0 -1
  3. package/es/contentModal/script/api.js +1 -7
  4. package/es/selectAddTo/component.js +23 -102
  5. package/es/selectAddTo/components/SelectAddToView.js +91 -0
  6. package/es/selectAddTo/components/SelectAddToView.vue_vue_type_style_index_0_scoped_true_lang.js +2 -0
  7. package/es/selectAddTo/components/ViewAllColumn/MediaFilter/index.js +1 -4
  8. package/es/selectAddTo/components/ViewAllColumn/index.js +21 -18
  9. package/es/selectAddTo/components/ViewAllColumn/script/useTableColumns.js +31 -7
  10. package/es/selectAddTo/components/ViewAllColumn/script/useViewAllColumnState.js +3 -14
  11. package/es/selectAddTo/index.js +1 -10
  12. package/es/selectAddTo/script/api.js +1 -14
  13. package/es/selectAddTo/script/useSelectAddToState.js +16 -67
  14. package/es/selectThumb/component.js +9 -9
  15. package/es/style.css +24 -18
  16. package/lib/contentModal/components/ViewAllColumn/MediaFilter/index.js +5 -176
  17. package/lib/contentModal/components/ViewAllColumn/index.js +0 -1
  18. package/lib/contentModal/script/api.js +0 -7
  19. package/lib/index.js +1 -1
  20. package/lib/selectAddTo/component.js +22 -101
  21. package/lib/selectAddTo/components/SelectAddToView.js +92 -0
  22. package/lib/selectAddTo/components/SelectAddToView.vue_vue_type_style_index_0_scoped_true_lang.js +3 -0
  23. package/lib/selectAddTo/components/ViewAllColumn/MediaFilter/index.js +1 -4
  24. package/lib/selectAddTo/components/ViewAllColumn/index.js +20 -17
  25. package/lib/selectAddTo/components/ViewAllColumn/script/useTableColumns.js +34 -6
  26. package/lib/selectAddTo/components/ViewAllColumn/script/useViewAllColumnState.js +3 -14
  27. package/lib/selectAddTo/index.js +2 -12
  28. package/lib/selectAddTo/script/api.js +0 -15
  29. package/lib/selectAddTo/script/useSelectAddToState.js +16 -67
  30. package/lib/selectThumb/component.js +9 -9
  31. package/package.json +1 -1
  32. package/es/contentModal/components/ViewAllColumn/columnTree/index.js +0 -151
  33. package/es/selectAddTo/components/ViewAllColumn/columnTree/index.js +0 -151
  34. package/lib/contentModal/components/ViewAllColumn/columnTree/index.js +0 -152
  35. package/lib/selectAddTo/components/ViewAllColumn/columnTree/index.js +0 -152
@@ -1,8 +1,6 @@
1
- import { defineComponent, ref, computed, watch, openBlock, createElementBlock, createVNode, unref, withCtx, Fragment, renderList, createElementVNode, toDisplayString, createBlock, withDirectives, createTextVNode, vShow } from "vue";
2
- import { Space, Input, Select, Option, Tooltip, Button } from "@arco-design/web-vue";
3
- import { IconInfoCircle, IconRefresh } from "@arco-design/web-vue/es/icon";
4
- import { docSeries, docThumbMap } from "../../../../utils/doc.js";
5
- import _sfc_main$1 from "../columnTree/index.js";
1
+ import { defineComponent, ref, computed, watch, openBlock, createElementBlock, createVNode, unref, withCtx, Fragment, renderList, createElementVNode, toDisplayString, createBlock } from "vue";
2
+ import { Space, Input, Select, Option, Tooltip } from "@arco-design/web-vue";
3
+ import { IconInfoCircle } from "@arco-design/web-vue/es/icon";
6
4
  const _hoisted_1 = { class: "media-filter-container" };
7
5
  const _hoisted_2 = { style: { "display": "flex", "align-items": "center", "gap": "5px" } };
8
6
  const _hoisted_3 = { class: "sort-button" };
@@ -12,10 +10,7 @@ const _sfc_main = defineComponent({
12
10
  props: {
13
11
  groupId: {},
14
12
  tree: { default: () => [] },
15
- series: { default: "all" },
16
- banner: { default: "all" },
17
- height: {},
18
- userInfo: {}
13
+ height: {}
19
14
  },
20
15
  emits: ["update:group_id", "search"],
21
16
  setup(__props, { emit: __emit }) {
@@ -43,82 +38,12 @@ const _sfc_main = defineComponent({
43
38
  desc: "\u4F1A\u5C06\u8F93\u5165\u5185\u5BB9\u5206\u8BCD\uFF0C\u4F8B\u5982\u201C\u6210\u957F\u201D\u4F1A\u5206\u4E3A\u201C\u6210\u201D\u3001\u201C\u957F\u201D\u3001\u201C\u6210\u957F\u201D\uFF0C\u5185\u5BB9\u5305\u542B\u4E09\u4E2A\u8BCD\u4E2D\u4EFB\u610F\u4E00\u4E2A\u5747\u4F1A\u663E\u793A\u51FA\u6765\uFF0C\u641C\u7D22\u5185\u5BB9\u66F4\u52A0\u4E30\u5BCC"
44
39
  }
45
40
  ];
46
- const bannerOptions = computed(() => {
47
- const options = [
48
- {
49
- value: "0",
50
- key: "0",
51
- label: "\u65E0\u72EC\u7ACB\u8F6E\u64AD"
52
- },
53
- {
54
- value: "1",
55
- key: "1",
56
- label: "\u6709\u72EC\u7ACB\u8F6E\u64AD"
57
- }
58
- ];
59
- return options.filter(
60
- (item) => props.banner === "all" || props.banner === item.key
61
- );
62
- });
63
- const typeOptions = computed(() => {
64
- const arr = Object.keys(docSeries).map((key) => {
65
- return {
66
- value: key,
67
- label: docSeries[key].replace("\u7A3F\u4EF6", "")
68
- };
69
- });
70
- return arr.filter((item) => {
71
- if (props.series === "all") {
72
- return true;
73
- }
74
- return props.series.split(",").includes(item.value);
75
- });
76
- });
77
- const thumbOptions = computed(() => {
78
- return Object.keys(docThumbMap()).map((key) => {
79
- return {
80
- value: key,
81
- label: docThumbMap()[key]
82
- };
83
- });
84
- });
85
41
  const sortMethodOptions = computed(() => {
86
42
  return [
87
43
  { value: "pub_time", label: "\u53D1\u5E03\u65F6\u95F4" },
88
44
  { value: "create_time", label: "\u521B\u5EFA\u65F6\u95F4" }
89
45
  ];
90
46
  });
91
- const showReset = computed(() => {
92
- let { banner } = filter.value;
93
- if (props.banner !== "all") {
94
- banner = "";
95
- }
96
- let series = filter.value.type;
97
- if (props.series !== "all") {
98
- series = "";
99
- }
100
- return filter.value.keywords || series || filter.value.cover_type || banner || filter.value.sort !== -1;
101
- });
102
- const reset = () => {
103
- const _set = {
104
- keywords: "",
105
- cover_type: "",
106
- sort: -1,
107
- order: "create_time"
108
- };
109
- Object.assign(filter.value, _set);
110
- if (props.banner !== "all") {
111
- filter.value.banner = props.banner;
112
- } else {
113
- filter.value.banner = "";
114
- }
115
- if (props.series !== "all" && props.series.split(",").length === 1) {
116
- filter.value.type = props.series;
117
- } else {
118
- filter.value.type = "";
119
- }
120
- column_id.value = "all";
121
- };
122
47
  const checkout = (type) => {
123
48
  filter.value.wordState = type;
124
49
  };
@@ -144,19 +69,6 @@ const _sfc_main = defineComponent({
144
69
  column_id.value = val;
145
70
  }
146
71
  );
147
- watch(
148
- () => props.banner,
149
- (val) => {
150
- filter.value.banner = val === "all" ? "" : val;
151
- },
152
- { immediate: true }
153
- );
154
- watch(
155
- () => column_id.value,
156
- (val) => {
157
- emit("update:group_id", val);
158
- }
159
- );
160
72
  return (_ctx, _cache) => {
161
73
  return openBlock(), createElementBlock("div", _hoisted_1, [
162
74
  createVNode(unref(Space), { size: "small" }, {
@@ -207,97 +119,14 @@ const _sfc_main = defineComponent({
207
119
  }, 8, ["modelValue"])
208
120
  ]),
209
121
  _: 1
210
- }, 8, ["modelValue"]),
211
- createVNode(_sfc_main$1, {
212
- column_id: column_id.value,
213
- "onUpdate:column_id": _cache[2] || (_cache[2] = ($event) => column_id.value = $event),
214
- height: props.height,
215
- tree: props.tree,
216
- "user-info": props.userInfo
217
- }, null, 8, ["column_id", "height", "tree", "user-info"]),
218
- createVNode(unref(Select), {
219
- modelValue: filter.value.type,
220
- "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => filter.value.type = $event),
221
- style: { width: "96px" },
222
- "trigger-props": { autoFitPopupMinWidth: true },
223
- "allow-clear": "",
224
- class: "filter-item",
225
- placeholder: "\u7C7B\u578B"
226
- }, {
227
- default: withCtx(() => [
228
- (openBlock(true), createElementBlock(Fragment, null, renderList(typeOptions.value, (item) => {
229
- return openBlock(), createBlock(unref(Option), {
230
- key: item.value,
231
- label: item.label,
232
- value: item.value
233
- }, null, 8, ["label", "value"]);
234
- }), 128))
235
- ]),
236
- _: 1
237
- }, 8, ["modelValue"]),
238
- createVNode(unref(Select), {
239
- modelValue: filter.value.cover_type,
240
- "onUpdate:modelValue": _cache[4] || (_cache[4] = ($event) => filter.value.cover_type = $event),
241
- style: { width: "96px" },
242
- "trigger-props": { autoFitPopupMinWidth: true },
243
- "allow-clear": "",
244
- class: "filter-item",
245
- placeholder: "\u5C01\u9762"
246
- }, {
247
- default: withCtx(() => [
248
- (openBlock(true), createElementBlock(Fragment, null, renderList(thumbOptions.value, (item) => {
249
- return openBlock(), createBlock(unref(Option), {
250
- key: item.value,
251
- label: item.label,
252
- value: item.value
253
- }, null, 8, ["label", "value"]);
254
- }), 128))
255
- ]),
256
- _: 1
257
- }, 8, ["modelValue"]),
258
- createVNode(unref(Select), {
259
- modelValue: filter.value.banner,
260
- "onUpdate:modelValue": _cache[5] || (_cache[5] = ($event) => filter.value.banner = $event),
261
- style: { width: "124px" },
262
- "trigger-props": { autoFitPopupMinWidth: true },
263
- "allow-clear": "",
264
- class: "filter-item",
265
- disabled: props.banner !== "all",
266
- placeholder: "\u72EC\u7ACB\u8F6E\u64AD"
267
- }, {
268
- default: withCtx(() => [
269
- (openBlock(true), createElementBlock(Fragment, null, renderList(bannerOptions.value, (item) => {
270
- return openBlock(), createBlock(unref(Option), {
271
- key: item.value,
272
- label: item.label,
273
- value: item.value
274
- }, null, 8, ["label", "value"]);
275
- }), 128))
276
- ]),
277
- _: 1
278
- }, 8, ["modelValue", "disabled"]),
279
- withDirectives(createVNode(unref(Button), {
280
- class: "reset-button",
281
- size: "small",
282
- type: "text",
283
- onClick: reset
284
- }, {
285
- default: withCtx(() => [
286
- createVNode(unref(IconRefresh), { class: "reset-icon" }),
287
- _cache[7] || (_cache[7] = createTextVNode(" \u91CD\u7F6E "))
288
- ]),
289
- _: 1,
290
- __: [7]
291
- }, 512), [
292
- [vShow, showReset.value]
293
- ])
122
+ }, 8, ["modelValue"])
294
123
  ]),
295
124
  _: 1
296
125
  }),
297
126
  createElementVNode("div", _hoisted_3, [
298
127
  createVNode(unref(Select), {
299
128
  modelValue: filter.value.order,
300
- "onUpdate:modelValue": _cache[6] || (_cache[6] = ($event) => filter.value.order = $event),
129
+ "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => filter.value.order = $event),
301
130
  class: "filter-item",
302
131
  placeholder: "\u53D1\u5E03\u65F6\u95F4"
303
132
  }, {
@@ -28,7 +28,6 @@ const _sfc_main = defineComponent({
28
28
  props: {
29
29
  maxSelect: {},
30
30
  defaultSelectedData: {},
31
- typeData: {},
32
31
  series: {},
33
32
  banner: {},
34
33
  userInfo: {}
@@ -6,12 +6,6 @@ function getCategoryCategoriesTree(BASE_API, params) {
6
6
  params
7
7
  });
8
8
  }
9
- function getCategoryPath(BASE_API, params) {
10
- return request(BASE_API, {
11
- url: `/poplar/v2/repo/${params == null ? void 0 : params.repo}/category/${params == null ? void 0 : params.category}/path`,
12
- method: "get"
13
- });
14
- }
15
9
  function getCategoryMediaNew(BASE_API, params) {
16
10
  return request(BASE_API, {
17
11
  url: `/poplar/v3/s/documents`,
@@ -98,4 +92,4 @@ function getTypeConfig(BASE_API, params) {
98
92
  params
99
93
  });
100
94
  }
101
- export { checkCommitFulfillment, getBroadcastList, getCategoryCategoriesTree, getCategoryMediaNew, getCategoryPath, getCategorylistsGroups, getConfigurationNew, getEqxiuList, getMpContentList, getReporterContent, getRevealContent, getTypeConfig, searchMlists, searchMpaccount };
95
+ export { checkCommitFulfillment, getBroadcastList, getCategoryCategoriesTree, getCategoryMediaNew, getCategorylistsGroups, getConfigurationNew, getEqxiuList, getMpContentList, getReporterContent, getRevealContent, getTypeConfig, searchMlists, searchMpaccount };
@@ -1,25 +1,18 @@
1
- import { defineComponent, onMounted, resolveComponent, openBlock, createBlock, unref, withCtx, createTextVNode, toDisplayString, createVNode, isRef, createCommentVNode } from "vue";
2
- import { Modal, Tabs, Button } from "@arco-design/web-vue";
3
- import ViewAllColumn from "./components/ViewAllColumn/index.js";
4
- import "../typeIcons/style/index.js";
1
+ import { defineComponent, openBlock, createBlock, unref } from "vue";
2
+ import SelectAddToView from "./components/SelectAddToView.js";
5
3
  import { useSelectAddToState } from "./script/useSelectAddToState.js";
6
4
  import "./component.vue_vue_type_style_index_0_scoped_true_lang.js";
7
5
  import _export_sfc from "../_virtual/plugin-vue_export-helper.js";
8
6
  const _sfc_main = defineComponent({
9
- ...{ name: "selectAddTo" },
7
+ ...{ name: "SelectAddTo" },
10
8
  __name: "component",
11
9
  props: {
12
- BASE_API: {},
13
10
  visible: { type: Boolean },
14
- title: {},
15
- outsideSelectData: {},
16
- defaultSelectedData: {},
11
+ rid: {},
17
12
  maxSelect: {},
18
- typeData: {},
19
13
  userStore: {},
20
- compoFilter: { type: Boolean, default: false },
21
- typeKey: {},
22
- rid: {}
14
+ BASE_API: {},
15
+ typeKey: {}
23
16
  },
24
17
  emits: ["update:visible", "comfirm"],
25
18
  setup(__props, { emit: __emit }) {
@@ -27,100 +20,28 @@ const _sfc_main = defineComponent({
27
20
  const props = __props;
28
21
  const {
29
22
  visible,
30
- title,
31
23
  selectedData,
32
- hasSelected,
33
- typeDataController,
34
- userInfo,
35
- handleOk,
36
- handleCancel,
37
- comfirm,
38
- HandleOpen,
39
- HandleClose,
40
- tabsChange,
41
- selectedDataChangeHandle,
42
- loadConfig,
43
- getUserInfoHandle
24
+ onOk,
25
+ onCancel,
26
+ onComfirm,
27
+ onClose,
28
+ onSelectedDataChange
44
29
  } = useSelectAddToState(props, emit);
45
- onMounted(() => {
46
- if (props.userStore) {
47
- userInfo.value = { BASE_API: props.BASE_API, ...props.userStore };
48
- } else {
49
- getUserInfoHandle();
50
- }
51
- loadConfig();
52
- });
53
30
  return (_ctx, _cache) => {
54
- const _component_storeBox = resolveComponent("storeBox");
55
- return openBlock(), createBlock(unref(Modal), {
56
- footer: false,
57
- "mask-closable": false,
31
+ return openBlock(), createBlock(SelectAddToView, {
58
32
  visible: unref(visible),
59
- "body-class": "add-content-modal-body",
60
- "modal-class": "add-content-modal-wrapper",
61
- "title-align": "start",
62
- "unmount-on-close": "",
63
- width: "1020px",
64
- onCancel: unref(handleCancel),
65
- onClose: unref(HandleClose),
66
- onOk: unref(handleOk),
67
- onOpen: unref(HandleOpen)
68
- }, {
69
- title: withCtx(() => [
70
- createTextVNode(toDisplayString(unref(title)), 1)
71
- ]),
72
- default: withCtx(() => [
73
- createVNode(unref(Tabs), {
74
- class: "content-tabs",
75
- justify: "",
76
- "lazy-load": "",
77
- onTabClick: unref(tabsChange)
78
- }, {
79
- default: withCtx(() => {
80
- var _a, _b;
81
- return [
82
- _ctx.rid ? (openBlock(), createBlock(ViewAllColumn, {
83
- key: 0,
84
- rid: _ctx.rid,
85
- "default-selected-data": unref(selectedData),
86
- "max-select": _ctx.maxSelect,
87
- "user-info": unref(userInfo),
88
- "type-key": _ctx.typeKey || "",
89
- "type-data": unref(typeDataController),
90
- series: ((_a = unref(typeDataController)) == null ? void 0 : _a.docSeries) || "all",
91
- banner: ((_b = unref(typeDataController)) == null ? void 0 : _b.docBanner) || "all",
92
- onChange: unref(selectedDataChangeHandle)
93
- }, {
94
- store: withCtx(() => [
95
- createVNode(_component_storeBox, {
96
- selectData: unref(selectedData),
97
- "onUpdate:selectData": _cache[0] || (_cache[0] = ($event) => isRef(selectedData) ? selectedData.value = $event : null)
98
- }, null, 8, ["selectData"])
99
- ]),
100
- options: withCtx(() => [
101
- createVNode(unref(Button), {
102
- disabled: !unref(hasSelected),
103
- type: "primary",
104
- onClick: unref(comfirm)
105
- }, {
106
- default: withCtx(() => _cache[1] || (_cache[1] = [
107
- createTextVNode(" \u6DFB\u52A0 ")
108
- ])),
109
- _: 1,
110
- __: [1]
111
- }, 8, ["disabled", "onClick"])
112
- ]),
113
- _: 1
114
- }, 8, ["rid", "default-selected-data", "max-select", "user-info", "type-key", "type-data", "series", "banner", "onChange"])) : createCommentVNode("v-if", true)
115
- ];
116
- }),
117
- _: 1
118
- }, 8, ["onTabClick"])
119
- ]),
120
- _: 1
121
- }, 8, ["visible", "onCancel", "onClose", "onOk", "onOpen"]);
33
+ rid: props.rid,
34
+ "selected-data": unref(selectedData),
35
+ "max-select": props.maxSelect,
36
+ "type-key": props.typeKey,
37
+ onCancel: unref(onCancel),
38
+ onClose: unref(onClose),
39
+ onOk: unref(onOk),
40
+ onSelectedChange: unref(onSelectedDataChange),
41
+ onComfirm: unref(onComfirm)
42
+ }, null, 8, ["visible", "rid", "selected-data", "max-select", "type-key", "onCancel", "onClose", "onOk", "onSelectedChange", "onComfirm"]);
122
43
  };
123
44
  }
124
45
  });
125
- var _selectAddTo = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-4e1a01f6"]]);
46
+ var _selectAddTo = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-7f81762c"]]);
126
47
  export { _selectAddTo as default };
@@ -0,0 +1,91 @@
1
+ import { defineComponent, computed, openBlock, createBlock, unref, withCtx, createTextVNode, createVNode, createCommentVNode } from "vue";
2
+ import { Modal, Button } from "@arco-design/web-vue";
3
+ import ViewAllColumn from "./ViewAllColumn/index.js";
4
+ import _sfc_main$1 from "../../contentModal/components/storeBox/index.js";
5
+ import "./SelectAddToView.vue_vue_type_style_index_0_scoped_true_lang.js";
6
+ import _export_sfc from "../../_virtual/plugin-vue_export-helper.js";
7
+ const _sfc_main = defineComponent({
8
+ __name: "SelectAddToView",
9
+ props: {
10
+ visible: { type: Boolean },
11
+ rid: {},
12
+ selectedData: {},
13
+ maxSelect: {},
14
+ typeKey: {}
15
+ },
16
+ emits: [
17
+ "cancel",
18
+ "close",
19
+ "ok",
20
+ "open",
21
+ "selected-change",
22
+ "comfirm"
23
+ ],
24
+ setup(__props, { emit: __emit }) {
25
+ const props = __props;
26
+ const emit = __emit;
27
+ const hasSelected = computed(
28
+ () => props.selectedData && props.selectedData.length > 0
29
+ );
30
+ function handleComfirm() {
31
+ emit("comfirm");
32
+ }
33
+ function handleSelectedDataChange(val) {
34
+ emit("selected-change", val);
35
+ }
36
+ return (_ctx, _cache) => {
37
+ return openBlock(), createBlock(unref(Modal), {
38
+ footer: false,
39
+ "mask-closable": false,
40
+ visible: _ctx.visible,
41
+ "body-style": { maxHeight: "700px" },
42
+ "body-class": "add-content-modal-body",
43
+ "modal-class": "add-content-modal-wrapper",
44
+ "title-align": "start",
45
+ "unmount-on-close": "",
46
+ width: "1020px",
47
+ onCancel: _cache[1] || (_cache[1] = () => emit("cancel")),
48
+ onClose: _cache[2] || (_cache[2] = () => emit("close")),
49
+ onOk: _cache[3] || (_cache[3] = () => emit("ok"))
50
+ }, {
51
+ title: withCtx(() => _cache[4] || (_cache[4] = [
52
+ createTextVNode("\u9009\u62E9\u6DFB\u52A0")
53
+ ])),
54
+ default: withCtx(() => [
55
+ _ctx.rid ? (openBlock(), createBlock(ViewAllColumn, {
56
+ key: 0,
57
+ rid: _ctx.rid,
58
+ "default-selected-data": _ctx.selectedData,
59
+ "max-select": _ctx.maxSelect,
60
+ "type-key": _ctx.typeKey || "",
61
+ onChange: handleSelectedDataChange
62
+ }, {
63
+ store: withCtx(() => [
64
+ createVNode(_sfc_main$1, {
65
+ selectData: _ctx.selectedData,
66
+ "onUpdate:selectData": _cache[0] || (_cache[0] = (val) => emit("selected-change", val))
67
+ }, null, 8, ["selectData"])
68
+ ]),
69
+ options: withCtx(() => [
70
+ createVNode(unref(Button), {
71
+ disabled: !hasSelected.value,
72
+ type: "primary",
73
+ onClick: handleComfirm
74
+ }, {
75
+ default: withCtx(() => _cache[5] || (_cache[5] = [
76
+ createTextVNode(" \u6DFB\u52A0 ")
77
+ ])),
78
+ _: 1,
79
+ __: [5]
80
+ }, 8, ["disabled"])
81
+ ]),
82
+ _: 1
83
+ }, 8, ["rid", "default-selected-data", "max-select", "type-key"])) : createCommentVNode("v-if", true)
84
+ ]),
85
+ _: 1
86
+ }, 8, ["visible"]);
87
+ };
88
+ }
89
+ });
90
+ var SelectAddToView = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-00adfb7c"]]);
91
+ export { SelectAddToView as default };
@@ -0,0 +1,2 @@
1
+ var SelectAddToView_vue_vue_type_style_index_0_scoped_true_lang = "";
2
+ export { SelectAddToView_vue_vue_type_style_index_0_scoped_true_lang as default };
@@ -13,10 +13,7 @@ const _sfc_main = defineComponent({
13
13
  props: {
14
14
  groupId: {},
15
15
  tree: { default: () => [] },
16
- series: { default: "all" },
17
- banner: { default: "all" },
18
16
  height: {},
19
- userInfo: {},
20
17
  typeKey: {}
21
18
  },
22
19
  emits: ["update:group_id", "search"],
@@ -148,7 +145,7 @@ const _sfc_main = defineComponent({
148
145
  modelValue: filter.value.order,
149
146
  "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => filter.value.order = $event),
150
147
  class: "filter-item",
151
- placeholder: "\u53D1\u5E03\u65F6\u95F4"
148
+ placeholder: "\u521B\u5EFA\u65F6\u95F4"
152
149
  }, {
153
150
  default: withCtx(() => [
154
151
  (openBlock(true), createElementBlock(Fragment, null, renderList(sortMethodOptions.value, (item) => {
@@ -1,4 +1,4 @@
1
- import { defineComponent, ref, onMounted, openBlock, createElementBlock, createVNode, unref, isRef, withCtx, createBlock, createElementVNode, toDisplayString, renderSlot, withDirectives, vShow } from "vue";
1
+ import { defineComponent, ref, onMounted, openBlock, createElementBlock, createVNode, unref, isRef, createSlots, withCtx, createBlock, createElementVNode, toDisplayString, renderSlot, withDirectives, vShow } from "vue";
2
2
  import { IconRight, IconDown } from "@arco-design/web-vue/es/icon";
3
3
  import { Table, Checkbox, Pagination } from "@arco-design/web-vue";
4
4
  import _sfc_main$2 from "../../../typeIcons/component.js";
@@ -32,11 +32,7 @@ const _sfc_main = defineComponent({
32
32
  ...{ name: "ViewAllColumn" },
33
33
  __name: "index",
34
34
  props: {
35
- maxSelect: {},
36
35
  defaultSelectedData: {},
37
- typeData: {},
38
- series: {},
39
- banner: {},
40
36
  userInfo: {},
41
37
  typeKey: {},
42
38
  rid: {}
@@ -62,12 +58,14 @@ const _sfc_main = defineComponent({
62
58
  search,
63
59
  pageChangeHandle,
64
60
  loadData,
65
- loadMore
61
+ loadMore,
62
+ filter
66
63
  } = useViewAllColumnState(props, emit);
67
64
  const { columns, politicalColumns } = useTableColumns(
68
65
  props,
69
66
  selectedData,
70
- isItemChecked
67
+ isItemChecked,
68
+ filter
71
69
  );
72
70
  onMounted(() => {
73
71
  loadData();
@@ -94,17 +92,10 @@ const _sfc_main = defineComponent({
94
92
  onCellMouseEnter: unref(tableCellMouseEnter),
95
93
  onCellMouseLeave: unref(tableCellMouseLeave),
96
94
  onRowClick: unref(selectTableCell)
97
- }, {
95
+ }, createSlots({
98
96
  "expand-icon": withCtx(({ expanded }) => [
99
97
  !expanded ? (openBlock(), createBlock(unref(IconRight), { key: 0 })) : (openBlock(), createBlock(unref(IconDown), { key: 1 }))
100
98
  ]),
101
- selectTitle: withCtx(() => [
102
- createVNode(unref(Checkbox), {
103
- "model-value": unref(selectedData).length === unref(mediaFileData).length,
104
- class: "icon",
105
- onChange: unref(selectTableAll)
106
- }, null, 8, ["model-value", "onChange"])
107
- ]),
108
99
  select: withCtx(({ record }) => [
109
100
  createVNode(unref(Checkbox), {
110
101
  "model-value": unref(isItemChecked)(unref(selectedData), record),
@@ -134,8 +125,20 @@ const _sfc_main = defineComponent({
134
125
  createElementVNode("span", null, toDisplayString(unref(timeFormat)(record.pub_time)), 1)
135
126
  ])
136
127
  ]),
137
- _: 1
138
- }, 8, ["columns", "data", "loading", "load-more", "onCellMouseEnter", "onCellMouseLeave", "onRowClick"])
128
+ _: 2
129
+ }, [
130
+ _ctx.typeKey !== "series:special_v3" ? {
131
+ name: "selectTitle",
132
+ fn: withCtx(() => [
133
+ createVNode(unref(Checkbox), {
134
+ "model-value": unref(selectedData).length === unref(mediaFileData).length,
135
+ class: "icon",
136
+ onChange: unref(selectTableAll)
137
+ }, null, 8, ["model-value", "onChange"])
138
+ ]),
139
+ key: "0"
140
+ } : void 0
141
+ ]), 1032, ["columns", "data", "loading", "load-more", "onCellMouseEnter", "onCellMouseLeave", "onRowClick"])
139
142
  ])) : (openBlock(), createElementBlock("div", _hoisted_7, [
140
143
  createVNode(unref(Table), {
141
144
  bordered: false,
@@ -205,5 +208,5 @@ const _sfc_main = defineComponent({
205
208
  };
206
209
  }
207
210
  });
208
- var ViewAllColumn = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-ac92e0de"]]);
211
+ var ViewAllColumn = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-01c2d0b8"]]);
209
212
  export { ViewAllColumn as default };
@@ -1,16 +1,17 @@
1
- import { ref, h } from "vue";
1
+ import { ref, h, computed } from "vue";
2
2
  import { Checkbox } from "@arco-design/web-vue";
3
- const useTableColumns = (props, selectedData, isItemChecked) => {
3
+ import dayjs from "dayjs";
4
+ const useTableColumns = (props, selectedData, isItemChecked, filter) => {
4
5
  const columns = ref([
5
6
  {
6
- title: "\u52FE",
7
+ title: "",
7
8
  dataIndex: "select",
8
9
  slotName: "select",
9
10
  width: 40,
10
11
  titleSlotName: "selectTitle",
11
12
  render: ({ record }) => {
12
13
  if (props.typeKey === "series:special_v3") {
13
- if (record.isLeaf) {
14
+ if (record.isLeaf && record.parentId) {
14
15
  return h(Checkbox, {
15
16
  modelValue: isItemChecked.value(selectedData.value, record),
16
17
  class: "icon"
@@ -37,10 +38,33 @@ const useTableColumns = (props, selectedData, isItemChecked) => {
37
38
  width: 100
38
39
  },
39
40
  {
40
- title: "\u53D1\u5E03\u65F6\u95F4",
41
- dataIndex: "pub_time",
41
+ title: computed(() => {
42
+ var _a;
43
+ return ((_a = filter.value) == null ? void 0 : _a.order) === "pub_time" ? "\u53D1\u5E03\u65F6\u95F4" : "\u521B\u5EFA\u65F6\u95F4";
44
+ }),
45
+ dataIndex: computed(
46
+ () => {
47
+ var _a;
48
+ return ((_a = filter.value) == null ? void 0 : _a.order) === "pub_time" ? "pub_time" : "created_at";
49
+ }
50
+ ),
42
51
  slotName: "pub_time",
43
- width: 150
52
+ width: 150,
53
+ render: ({ record }) => {
54
+ var _a;
55
+ if (((_a = filter.value) == null ? void 0 : _a.order) === "pub_time") {
56
+ const raw2 = record.pub_time;
57
+ if (!raw2)
58
+ return "--";
59
+ const d2 = typeof raw2 === "number" || /^\d+$/.test(raw2) ? dayjs.unix(Number(raw2)) : dayjs(raw2);
60
+ return d2.isValid() ? d2.format("YYYY-M-D HH:mm") : raw2;
61
+ }
62
+ const raw = record.created_at;
63
+ if (!raw)
64
+ return "--";
65
+ const d = dayjs(raw);
66
+ return d.isValid() ? d.format("YYYY-M-D HH:mm") : raw;
67
+ }
44
68
  }
45
69
  ]);
46
70
  const politicalColumns = ref([