@cmstops/pro-compo 0.1.3 → 0.1.4

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 (132) hide show
  1. package/dist/index.css +26 -4
  2. package/dist/index.min.css +1 -1
  3. package/es/appCenter/component.js +2 -1
  4. package/es/config.d.ts +2 -0
  5. package/es/config.js +3 -0
  6. package/es/contentModal/component.d.ts +0 -0
  7. package/es/contentModal/component.js +175 -0
  8. package/es/contentModal/components/CompoList/CompoFilter/index.d.ts +0 -0
  9. package/es/contentModal/components/CompoList/CompoFilter/index.js +103 -0
  10. package/es/contentModal/components/CompoList/index.d.ts +0 -0
  11. package/es/contentModal/components/CompoList/index.js +234 -0
  12. package/es/contentModal/components/ViewAllColumn/MediaFilter/index.d.ts +0 -0
  13. package/es/contentModal/components/ViewAllColumn/MediaFilter/index.js +44 -0
  14. package/es/contentModal/components/ViewAllColumn/columnTree/index.d.ts +0 -0
  15. package/es/contentModal/components/ViewAllColumn/columnTree/index.js +101 -0
  16. package/es/contentModal/components/ViewAllColumn/index.d.ts +0 -0
  17. package/es/contentModal/components/ViewAllColumn/index.js +277 -0
  18. package/es/contentModal/components/storeBox/index.d.ts +0 -0
  19. package/es/contentModal/components/storeBox/index.js +107 -0
  20. package/es/contentModal/index.d.ts +2 -0
  21. package/es/contentModal/index.js +7 -0
  22. package/es/contentModal/script/api.d.ts +10 -0
  23. package/es/contentModal/script/api.js +45 -0
  24. package/es/contentModal/style/MediaFilter.less +8 -0
  25. package/es/contentModal/style/ViewAllColumn.less +33 -0
  26. package/es/contentModal/style/columnTree.less +9 -0
  27. package/es/contentModal/style/css.js +5 -0
  28. package/es/contentModal/style/index.css +13 -0
  29. package/es/contentModal/style/index.d.ts +5 -0
  30. package/es/contentModal/style/index.js +5 -0
  31. package/es/contentModal/style/index.less +16 -0
  32. package/es/contentModal/style/storeBox.less +45 -0
  33. package/es/hooks/batch.d.ts +8 -0
  34. package/es/hooks/batch.js +26 -0
  35. package/es/hooks/user.d.ts +11 -0
  36. package/es/hooks/user.js +46 -0
  37. package/es/index.css +26 -4
  38. package/es/index.d.ts +4 -1
  39. package/es/index.js +4 -1
  40. package/es/index.less +4 -1
  41. package/es/messageBox/component.js +2 -1
  42. package/es/messageBox/list.js +4 -4
  43. package/es/resourceModal/component.d.ts +0 -0
  44. package/es/resourceModal/component.js +14 -0
  45. package/es/resourceModal/index.d.ts +2 -0
  46. package/es/resourceModal/index.js +7 -0
  47. package/es/style.css +5 -0
  48. package/es/typeIcons/component.d.ts +0 -0
  49. package/es/typeIcons/component.js +62 -0
  50. package/es/typeIcons/index.d.ts +2 -0
  51. package/es/typeIcons/index.js +7 -0
  52. package/es/typeIcons/style/css.js +1 -0
  53. package/es/typeIcons/style/index.css +5 -0
  54. package/es/typeIcons/style/index.d.ts +1 -0
  55. package/es/typeIcons/style/index.js +1 -0
  56. package/es/typeIcons/style/index.less +5 -0
  57. package/es/uploadStep/component.d.ts +0 -0
  58. package/es/uploadStep/component.js +14 -0
  59. package/es/uploadStep/index.d.ts +2 -0
  60. package/es/uploadStep/index.js +7 -0
  61. package/es/uploadStep/style/css.js +1 -0
  62. package/es/uploadStep/style/index.d.ts +1 -0
  63. package/es/uploadStep/style/index.js +1 -0
  64. package/es/userAvater/component.js +3 -3
  65. package/es/utils/index.d.ts +1 -0
  66. package/es/utils/index.js +7 -0
  67. package/es/utils/request.js +3 -4
  68. package/es/utils/typeMap.d.ts +116 -0
  69. package/es/utils/typeMap.js +22 -0
  70. package/lib/appCenter/component.js +2 -1
  71. package/lib/config.js +6 -0
  72. package/lib/contentModal/component.js +176 -0
  73. package/lib/contentModal/components/CompoList/CompoFilter/index.js +104 -0
  74. package/lib/contentModal/components/CompoList/index.js +235 -0
  75. package/lib/contentModal/components/ViewAllColumn/MediaFilter/index.js +45 -0
  76. package/lib/contentModal/components/ViewAllColumn/columnTree/index.js +102 -0
  77. package/lib/contentModal/components/ViewAllColumn/index.js +278 -0
  78. package/lib/contentModal/components/storeBox/index.js +108 -0
  79. package/lib/contentModal/index.js +8 -0
  80. package/lib/contentModal/script/api.js +52 -0
  81. package/lib/contentModal/style/MediaFilter.less +8 -0
  82. package/lib/contentModal/style/ViewAllColumn.less +33 -0
  83. package/lib/contentModal/style/columnTree.less +9 -0
  84. package/lib/contentModal/style/css.js +6 -0
  85. package/lib/contentModal/style/index.css +13 -0
  86. package/lib/contentModal/style/index.js +6 -0
  87. package/lib/contentModal/style/index.less +16 -0
  88. package/lib/contentModal/style/storeBox.less +45 -0
  89. package/lib/hooks/batch.js +27 -0
  90. package/lib/hooks/user.js +49 -0
  91. package/lib/index.css +26 -4
  92. package/lib/index.js +14 -8
  93. package/lib/index.less +4 -1
  94. package/lib/messageBox/component.js +2 -1
  95. package/lib/messageBox/list.js +4 -4
  96. package/lib/resourceModal/component.js +15 -0
  97. package/lib/resourceModal/index.js +8 -0
  98. package/lib/resourceModal/style/index.css +4 -0
  99. package/lib/resourceModal/style/index.less +4 -0
  100. package/lib/typeIcons/component.js +63 -0
  101. package/lib/{button → typeIcons}/index.js +2 -2
  102. package/lib/typeIcons/style/css.js +2 -0
  103. package/lib/typeIcons/style/index.css +5 -0
  104. package/lib/typeIcons/style/index.js +2 -0
  105. package/lib/typeIcons/style/index.less +5 -0
  106. package/lib/uploadStep/component.js +15 -0
  107. package/lib/uploadStep/index.js +8 -0
  108. package/lib/uploadStep/style/css.js +2 -0
  109. package/lib/uploadStep/style/index.css +4 -0
  110. package/lib/uploadStep/style/index.js +2 -0
  111. package/lib/uploadStep/style/index.less +4 -0
  112. package/lib/userAvater/component.js +3 -3
  113. package/lib/utils/index.js +13 -0
  114. package/lib/utils/request.js +3 -4
  115. package/lib/utils/typeMap.js +25 -0
  116. package/package.json +4 -2
  117. package/es/_virtual/plugin-vue_export-helper.js +0 -7
  118. package/es/button/component.d.ts +0 -24
  119. package/es/button/component.js +0 -43
  120. package/es/button/index.d.ts +0 -103
  121. package/es/button/index.js +0 -7
  122. package/lib/_virtual/plugin-vue_export-helper.js +0 -8
  123. package/lib/button/component.js +0 -44
  124. /package/es/{button → resourceModal}/style/css.js +0 -0
  125. /package/es/{button → resourceModal}/style/index.css +0 -0
  126. /package/es/{button → resourceModal}/style/index.d.ts +0 -0
  127. /package/es/{button → resourceModal}/style/index.js +0 -0
  128. /package/es/{button → resourceModal}/style/index.less +0 -0
  129. /package/{lib/button → es/uploadStep}/style/index.css +0 -0
  130. /package/{lib/button → es/uploadStep}/style/index.less +0 -0
  131. /package/lib/{button → resourceModal}/style/css.js +0 -0
  132. /package/lib/{button → resourceModal}/style/index.js +0 -0
package/dist/index.css CHANGED
@@ -1,7 +1,3 @@
1
- .tooltip-button {
2
- height: auto;
3
- padding: 20px;
4
- }
5
1
  .reference-btn {
6
2
  border: none;
7
3
  padding: 12px 16px;
@@ -206,3 +202,29 @@
206
202
  align-items: center;
207
203
  justify-content: center;
208
204
  }
205
+ .type-icons-container {
206
+ display: inline-block;
207
+ vertical-align: middle;
208
+ font-size: 18px;
209
+ }
210
+ .tooltip-button {
211
+ height: auto;
212
+ padding: 20px;
213
+ }
214
+ .add-content-modal-wrapper .arco-modal-header {
215
+ border-bottom: none;
216
+ }
217
+ .add-content-modal-body {
218
+ padding: 0;
219
+ height: 70vh;
220
+ }
221
+ .add-content-modal-body .content-tabs {
222
+ height: 100%;
223
+ }
224
+ .add-content-modal-body .arco-tabs-content {
225
+ padding-top: 0;
226
+ }
227
+ .tooltip-button {
228
+ height: auto;
229
+ padding: 20px;
230
+ }
@@ -1 +1 @@
1
- .tooltip-button{height:auto;padding:20px}.reference-btn{border:none;padding:12px 16px;border-radius:4px;color:#5f5f5f}.apps-box-popover{position:relative;padding:10px}.app-title{font-size:16px;font-weight:700;padding:0 15px}.ul-list{list-style:none;overflow:hidden;width:435px!important;text-align:center;padding:0;margin:0}.ul-list .li_item{float:left;width:85px;height:90px;text-align:center;margin:13px 0;position:relative}.ul-list .li_item .icon-logo .svg-icon{width:4em;height:3.5em}.ul-list .li_item:hover{background:rgba(0,0,0,.05);border-radius:4px;cursor:pointer}.ul-list .li_item:hover .icon-gengduo{display:block}.ul-list .li_item .wrap_icon{width:70px;display:inline-block;margin-top:6px}.ul-list .li_item .wrap_icon .wrap_ .icon-logo{width:70px;height:50px;margin-bottom:4px}.ul-list .li_item .wrap_icon .wrap_ .icon-logo img{max-width:100%;max-height:100%}.ul-list .li_item .wrap_icon .wrap_ .shortcut-logo{line-height:77px}.ul-list .li_item .wrap_icon .wrap_ .shortcut-logo img{width:35px;height:35px}.ul-list .li_item .wrap_icon .wrap_ .icon_title{width:73px;height:20px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ul-list .li_item .wrap_icon .quick-add .icon-logo{width:40px;height:40px;margin:5px auto 9px;text-align:center;background-color:rgba(0,0,0,.12);border-radius:50%}.ul-list .li_item .wrap_icon .quick-add .icon-logo i{line-height:40px;color:rgba(0,0,0,.85);font-size:14px}.ul-list .li_item .icon-gengduo{display:none;position:absolute;top:2px;right:4px}.reference-btn{border:none;padding:12px 16px;border-radius:4px;color:#5f5f5f}.message-boxs-popover{width:435px;position:relative}.message-boxs-popover .arco-tabs-content{padding-top:0}.message-boxs-popover .msg-scroll-bar{height:80vh;overflow-y:auto;display:block}.message-boxs-popover .message-list{margin:0;padding:0;list-style:none}.message-boxs-popover .message-item{padding:16px;padding-bottom:0}.message-boxs-popover .message-item:last-child .message-body{border-bottom:none}.message-boxs-popover .message-item .message-body{border-bottom:1px solid rgba(0,0,0,.05);padding-bottom:16px}.message-boxs-popover .message-item .message-body .media-message-content{width:100%}.message-boxs-popover .message-item .message-body .media-message-content .message-content{display:flex;align-items:center;justify-content:space-between;font-size:12px;color:#4e5969;margin-bottom:18px}.message-boxs-popover .message-item .message-body .media-message-content .message-info{display:flex;align-items:center;justify-content:space-between;color:#1d2129;font-size:14px;line-height:14px}.message-boxs-popover .message-item .message-body .media-message-content .message-info .message-media-title{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.message-boxs-popover .message-item .message-body .media-message-content .message-info .message-media-title .icon{margin-right:4px}.message-boxs-popover .message-item .message-body .media-message-content .message-info .message-media-title:hover{text-decoration:underline}.user-avater-content-info{width:328px;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:24px;padding-bottom:0;line-height:1}.user-avater-content-info .avatar{width:74px;height:74px;position:relative;border-radius:50%;overflow:hidden;margin-bottom:10px;display:flex;align-items:center;justify-content:center}.user-avater-content-info .avatar .arco-avatar{width:100%;height:100%}.user-avater-content-info .nick-name{font-size:16px;color:#1d2129;font-weight:500;margin-bottom:10px}.user-avater-content-info .user-email,.user-avater-content-info .user-name{font-size:14px;color:#86909c;margin-bottom:10px}.user-avater-content-info .org-alias{border:1px solid #ebeef5;padding:10px 20px;border-radius:40px}.user-avater-content-info .b_info_bottom{height:52px;padding:10px 16px;width:100%;display:flex;align-items:center;justify-content:center}
1
+ .reference-btn{border:none;padding:12px 16px;border-radius:4px;color:#5f5f5f}.apps-box-popover{position:relative;padding:10px}.app-title{font-size:16px;font-weight:700;padding:0 15px}.ul-list{list-style:none;overflow:hidden;width:435px!important;text-align:center;padding:0;margin:0}.ul-list .li_item{float:left;width:85px;height:90px;text-align:center;margin:13px 0;position:relative}.ul-list .li_item .icon-logo .svg-icon{width:4em;height:3.5em}.ul-list .li_item:hover{background:rgba(0,0,0,.05);border-radius:4px;cursor:pointer}.ul-list .li_item:hover .icon-gengduo{display:block}.ul-list .li_item .wrap_icon{width:70px;display:inline-block;margin-top:6px}.ul-list .li_item .wrap_icon .wrap_ .icon-logo{width:70px;height:50px;margin-bottom:4px}.ul-list .li_item .wrap_icon .wrap_ .icon-logo img{max-width:100%;max-height:100%}.ul-list .li_item .wrap_icon .wrap_ .shortcut-logo{line-height:77px}.ul-list .li_item .wrap_icon .wrap_ .shortcut-logo img{width:35px;height:35px}.ul-list .li_item .wrap_icon .wrap_ .icon_title{width:73px;height:20px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ul-list .li_item .wrap_icon .quick-add .icon-logo{width:40px;height:40px;margin:5px auto 9px;text-align:center;background-color:rgba(0,0,0,.12);border-radius:50%}.ul-list .li_item .wrap_icon .quick-add .icon-logo i{line-height:40px;color:rgba(0,0,0,.85);font-size:14px}.ul-list .li_item .icon-gengduo{display:none;position:absolute;top:2px;right:4px}.reference-btn{border:none;padding:12px 16px;border-radius:4px;color:#5f5f5f}.message-boxs-popover{width:435px;position:relative}.message-boxs-popover .arco-tabs-content{padding-top:0}.message-boxs-popover .msg-scroll-bar{height:80vh;overflow-y:auto;display:block}.message-boxs-popover .message-list{margin:0;padding:0;list-style:none}.message-boxs-popover .message-item{padding:16px;padding-bottom:0}.message-boxs-popover .message-item:last-child .message-body{border-bottom:none}.message-boxs-popover .message-item .message-body{border-bottom:1px solid rgba(0,0,0,.05);padding-bottom:16px}.message-boxs-popover .message-item .message-body .media-message-content{width:100%}.message-boxs-popover .message-item .message-body .media-message-content .message-content{display:flex;align-items:center;justify-content:space-between;font-size:12px;color:#4e5969;margin-bottom:18px}.message-boxs-popover .message-item .message-body .media-message-content .message-info{display:flex;align-items:center;justify-content:space-between;color:#1d2129;font-size:14px;line-height:14px}.message-boxs-popover .message-item .message-body .media-message-content .message-info .message-media-title{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.message-boxs-popover .message-item .message-body .media-message-content .message-info .message-media-title .icon{margin-right:4px}.message-boxs-popover .message-item .message-body .media-message-content .message-info .message-media-title:hover{text-decoration:underline}.user-avater-content-info{width:328px;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:24px;padding-bottom:0;line-height:1}.user-avater-content-info .avatar{width:74px;height:74px;position:relative;border-radius:50%;overflow:hidden;margin-bottom:10px;display:flex;align-items:center;justify-content:center}.user-avater-content-info .avatar .arco-avatar{width:100%;height:100%}.user-avater-content-info .nick-name{font-size:16px;color:#1d2129;font-weight:500;margin-bottom:10px}.user-avater-content-info .user-email,.user-avater-content-info .user-name{font-size:14px;color:#86909c;margin-bottom:10px}.user-avater-content-info .org-alias{border:1px solid #ebeef5;padding:10px 20px;border-radius:40px}.user-avater-content-info .b_info_bottom{height:52px;padding:10px 16px;width:100%;display:flex;align-items:center;justify-content:center}.type-icons-container{display:inline-block;vertical-align:middle;font-size:18px}.tooltip-button{height:auto;padding:20px}.add-content-modal-wrapper .arco-modal-header{border-bottom:none}.add-content-modal-body{padding:0;height:70vh}.add-content-modal-body .content-tabs{height:100%}.add-content-modal-body .arco-tabs-content{padding-top:0}.tooltip-button{height:auto;padding:20px}
@@ -5,6 +5,7 @@ import permissionMap from "./script/permissionMap.js";
5
5
  import appList from "./script/apps.js";
6
6
  import { setResentApp, getPubApps, getUserRepoActs, getResentApp } from "./script/api.js";
7
7
  import { getRID } from "../utils/auth.js";
8
+ import { DEFAULT_BASE_API } from "../config.js";
8
9
  const _hoisted_1 = {
9
10
  key: 1,
10
11
  class: "reference-btn"
@@ -45,7 +46,7 @@ const _sfc_main = defineComponent({
45
46
  const permissions = ref([]);
46
47
  const slotTest = !!useSlots().reference;
47
48
  const rid = getRID() || "4";
48
- const BASE_API = props.BASE_API || "https://site.cmstop.xyz";
49
+ const BASE_API = props.BASE_API || DEFAULT_BASE_API;
49
50
  const navList = computed(() => {
50
51
  const appList2 = [];
51
52
  StorePubApplication.value.map((item) => {
package/es/config.d.ts ADDED
@@ -0,0 +1,2 @@
1
+ export declare const DEFAULT_BASE_API = "https://site.cmstop.xyz";
2
+ export declare const DEFAULT_BASE_ACCOUNT_HOST = "https://account.cmstop.xyz";
package/es/config.js ADDED
@@ -0,0 +1,3 @@
1
+ const DEFAULT_BASE_API = "https://site.cmstop.xyz";
2
+ const DEFAULT_BASE_ACCOUNT_HOST = "https://account.cmstop.xyz";
3
+ export { DEFAULT_BASE_ACCOUNT_HOST, DEFAULT_BASE_API };
File without changes
@@ -0,0 +1,175 @@
1
+ import { defineComponent, computed, ref, onMounted, openBlock, createBlock, unref, withCtx, createTextVNode, toDisplayString, createVNode, createCommentVNode } from "vue";
2
+ import { Modal, Tabs, TabPane, Button } from "@arco-design/web-vue";
3
+ import _sfc_main$1 from "./components/ViewAllColumn/index.js";
4
+ import _sfc_main$3 from "./components/CompoList/index.js";
5
+ import _sfc_main$2 from "./components/storeBox/index.js";
6
+ import "../typeIcons/style/index.js";
7
+ import { DEFAULT_BASE_API } from "../config.js";
8
+ import useLoadUserInfo from "../hooks/user.js";
9
+ const _sfc_main = defineComponent({
10
+ ...{ name: "contentModal" },
11
+ __name: "component",
12
+ props: {
13
+ BASE_API: {},
14
+ visible: { type: Boolean },
15
+ title: {},
16
+ defaultSelectedData: {},
17
+ maxSelect: {},
18
+ typeData: {},
19
+ userStore: {}
20
+ },
21
+ emits: ["update:visible", "comfirm"],
22
+ setup(__props, { emit }) {
23
+ const props = __props;
24
+ const BASE_API = props.BASE_API || DEFAULT_BASE_API;
25
+ const visible = computed({
26
+ get() {
27
+ return props.visible;
28
+ },
29
+ set(value) {
30
+ setVisible(value);
31
+ }
32
+ });
33
+ const selectedData = ref([]);
34
+ const hasSelected = computed(() => {
35
+ return selectedData.value.length > 0;
36
+ });
37
+ const typeDataController = ref(props.typeData);
38
+ const setVisible = (bool) => {
39
+ emit("update:visible", bool);
40
+ };
41
+ const selectedDataChangeHandle = (data) => {
42
+ selectedData.value = data;
43
+ };
44
+ const handleOk = () => {
45
+ setVisible(false);
46
+ };
47
+ const handleCancel = () => {
48
+ setVisible(false);
49
+ };
50
+ const comfirm = () => {
51
+ emit("comfirm", JSON.parse(JSON.stringify(selectedData.value)));
52
+ };
53
+ const { userInfo, getUserInfoHandle } = useLoadUserInfo(BASE_API);
54
+ const HandleOpen = () => {
55
+ selectedData.value = props.defaultSelectedData || [];
56
+ };
57
+ const HandleClose = () => {
58
+ selectedData.value = [];
59
+ };
60
+ onMounted(() => {
61
+ if (props.userStore) {
62
+ userInfo.value = { BASE_API, ...props.userStore };
63
+ } else {
64
+ getUserInfoHandle();
65
+ }
66
+ });
67
+ return (_ctx, _cache) => {
68
+ return openBlock(), createBlock(unref(Modal), {
69
+ visible: visible.value,
70
+ width: "986px",
71
+ "mask-closable": false,
72
+ footer: false,
73
+ "title-align": "start",
74
+ "unmount-on-close": "",
75
+ "modal-class": "add-content-modal-wrapper",
76
+ "body-class": "add-content-modal-body",
77
+ onOk: handleOk,
78
+ onOpen: HandleOpen,
79
+ onClose: HandleClose,
80
+ onCancel: handleCancel
81
+ }, {
82
+ title: withCtx(() => [
83
+ createTextVNode(toDisplayString(props.title ? props.title : "\u6DFB\u52A0\u5185\u5BB9"), 1)
84
+ ]),
85
+ default: withCtx(() => [
86
+ createVNode(unref(Tabs), {
87
+ class: "content-tabs",
88
+ justify: ""
89
+ }, {
90
+ default: withCtx(() => [
91
+ typeDataController.value.addDoc ? (openBlock(), createBlock(unref(TabPane), {
92
+ key: "1",
93
+ title: "\u680F\u76EE"
94
+ }, {
95
+ default: withCtx(() => [
96
+ unref(userInfo) && unref(userInfo).repository_id ? (openBlock(), createBlock(_sfc_main$1, {
97
+ key: 0,
98
+ "max-select": _ctx.maxSelect,
99
+ "default-selected-data": selectedData.value,
100
+ "type-data": typeDataController.value,
101
+ series: typeDataController.value.docSeries,
102
+ banner: typeDataController.value.docBanner,
103
+ "user-info": unref(userInfo),
104
+ onChange: selectedDataChangeHandle
105
+ }, {
106
+ store: withCtx(() => [
107
+ createVNode(_sfc_main$2, {
108
+ selectData: selectedData.value,
109
+ "onUpdate:selectData": _cache[0] || (_cache[0] = ($event) => selectedData.value = $event)
110
+ }, null, 8, ["selectData"])
111
+ ]),
112
+ options: withCtx(() => [
113
+ createVNode(unref(Button), {
114
+ type: "primary",
115
+ disabled: !hasSelected.value,
116
+ onClick: comfirm
117
+ }, {
118
+ default: withCtx(() => [
119
+ createTextVNode("\u6DFB\u52A0")
120
+ ]),
121
+ _: 1
122
+ }, 8, ["disabled"])
123
+ ]),
124
+ _: 1
125
+ }, 8, ["max-select", "default-selected-data", "type-data", "series", "banner", "user-info"])) : createCommentVNode("v-if", true)
126
+ ]),
127
+ _: 1
128
+ })) : createCommentVNode("v-if", true),
129
+ typeDataController.value.addCompo ? (openBlock(), createBlock(unref(TabPane), {
130
+ key: "2",
131
+ title: "\u7EC4\u4EF6"
132
+ }, {
133
+ default: withCtx(() => [
134
+ unref(userInfo) && unref(userInfo).repository_id ? (openBlock(), createBlock(_sfc_main$3, {
135
+ key: 0,
136
+ "max-select": _ctx.maxSelect,
137
+ "default-selected-data": selectedData.value,
138
+ "type-data": typeDataController.value,
139
+ columns: typeDataController.value.compoType,
140
+ "user-info": unref(userInfo),
141
+ onChange: selectedDataChangeHandle
142
+ }, {
143
+ store: withCtx(() => [
144
+ createVNode(_sfc_main$2, {
145
+ selectData: selectedData.value,
146
+ "onUpdate:selectData": _cache[1] || (_cache[1] = ($event) => selectedData.value = $event)
147
+ }, null, 8, ["selectData"])
148
+ ]),
149
+ options: withCtx(() => [
150
+ createVNode(unref(Button), {
151
+ type: "primary",
152
+ disabled: !hasSelected.value,
153
+ onClick: comfirm
154
+ }, {
155
+ default: withCtx(() => [
156
+ createTextVNode("\u6DFB\u52A0")
157
+ ]),
158
+ _: 1
159
+ }, 8, ["disabled"])
160
+ ]),
161
+ _: 1
162
+ }, 8, ["max-select", "default-selected-data", "type-data", "columns", "user-info"])) : createCommentVNode("v-if", true)
163
+ ]),
164
+ _: 1
165
+ })) : createCommentVNode("v-if", true)
166
+ ]),
167
+ _: 1
168
+ })
169
+ ]),
170
+ _: 1
171
+ }, 8, ["visible"]);
172
+ };
173
+ }
174
+ });
175
+ export { _sfc_main as default };
@@ -0,0 +1,103 @@
1
+ import { defineComponent, ref, computed, watch, openBlock, createElementBlock, createVNode, unref, withCtx, Fragment, renderList, createBlock } from "vue";
2
+ import { Space, Select, Option, Input } from "@arco-design/web-vue";
3
+ import { compoColumnsMap } from "../../../../utils/typeMap.js";
4
+ const _hoisted_1 = { class: "media-filter-container" };
5
+ const _sfc_main = defineComponent({
6
+ ...{ name: "CompoFilter" },
7
+ __name: "index",
8
+ props: {
9
+ group_id: {},
10
+ groups: {},
11
+ userInfo: {}
12
+ },
13
+ emits: ["update:group_id", "search"],
14
+ setup(__props, { emit }) {
15
+ const props = __props;
16
+ const columnIdMap = compoColumnsMap();
17
+ const filter = ref({ keyword: "", columns: "" });
18
+ const groupId = computed({
19
+ get() {
20
+ return props.group_id;
21
+ },
22
+ set(val) {
23
+ emit("update:group_id", val);
24
+ }
25
+ });
26
+ const typeOptions = computed(() => {
27
+ const arr = Object.keys(columnIdMap).map((key) => {
28
+ return {
29
+ label: columnIdMap[key],
30
+ value: key
31
+ };
32
+ });
33
+ return [{ value: "", label: "\u5168\u90E8\u7C7B\u578B" }, ...arr];
34
+ });
35
+ const groupOptions = computed(() => {
36
+ const arr = props.groups.map((item) => {
37
+ return {
38
+ label: item.alias || item.title,
39
+ value: item.id
40
+ };
41
+ });
42
+ return [{ value: "all", label: "\u5168\u90E8\u7EC4\u4EF6" }, ...arr];
43
+ });
44
+ const handleSearch = () => {
45
+ emit("search", filter.value);
46
+ };
47
+ watch(filter.value, () => {
48
+ handleSearch();
49
+ });
50
+ return (_ctx, _cache) => {
51
+ return openBlock(), createElementBlock("div", _hoisted_1, [
52
+ createVNode(unref(Space), { size: "large" }, {
53
+ default: withCtx(() => [
54
+ createVNode(unref(Select), {
55
+ modelValue: groupId.value,
56
+ "onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => groupId.value = $event),
57
+ class: "filter-item",
58
+ placeholder: "\u7EC4\u4EF6\u5206\u7C7B"
59
+ }, {
60
+ default: withCtx(() => [
61
+ (openBlock(true), createElementBlock(Fragment, null, renderList(groupOptions.value, (item) => {
62
+ return openBlock(), createBlock(unref(Option), {
63
+ key: item.value,
64
+ label: item.label,
65
+ value: item.value
66
+ }, null, 8, ["label", "value"]);
67
+ }), 128))
68
+ ]),
69
+ _: 1
70
+ }, 8, ["modelValue"]),
71
+ createVNode(unref(Select), {
72
+ modelValue: filter.value.columns,
73
+ "onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => filter.value.columns = $event),
74
+ class: "filter-item",
75
+ placeholder: "\u7C7B\u578B"
76
+ }, {
77
+ default: withCtx(() => [
78
+ (openBlock(true), createElementBlock(Fragment, null, renderList(typeOptions.value, (item) => {
79
+ return openBlock(), createBlock(unref(Option), {
80
+ key: item.value,
81
+ label: item.label,
82
+ value: item.value
83
+ }, null, 8, ["label", "value"]);
84
+ }), 128))
85
+ ]),
86
+ _: 1
87
+ }, 8, ["modelValue"]),
88
+ createVNode(unref(Input), {
89
+ modelValue: filter.value.keyword,
90
+ "onUpdate:modelValue": _cache[2] || (_cache[2] = ($event) => filter.value.keyword = $event),
91
+ class: "filter-item",
92
+ "allow-clear": "",
93
+ placeholder: "\u8F93\u5165\u7EC4\u4EF6\u6807\u9898\u67E5\u627E",
94
+ onPressEnter: handleSearch
95
+ }, null, 8, ["modelValue"])
96
+ ]),
97
+ _: 1
98
+ })
99
+ ]);
100
+ };
101
+ }
102
+ });
103
+ export { _sfc_main as default };
@@ -0,0 +1,234 @@
1
+ import { defineComponent, ref, computed, watch, onMounted, openBlock, createElementBlock, createVNode, createElementVNode, unref, withCtx, withModifiers, createBlock, toDisplayString, renderSlot } from "vue";
2
+ import { Table, Checkbox } from "@arco-design/web-vue";
3
+ import _sfc_main$2 from "../../../typeIcons/component.js";
4
+ import _sfc_main$1 from "./CompoFilter/index.js";
5
+ import useTableBatch from "../../../hooks/batch.js";
6
+ import { searchMlists, getCategorylistsGroups } from "../../script/api.js";
7
+ import { compoColumnsMap } from "../../../utils/typeMap.js";
8
+ import { dateYYYYDDMMHHmm } from "../../../utils/index.js";
9
+ const _hoisted_1 = { class: "view-all-column-container" };
10
+ const _hoisted_2 = { class: "content-table-view" };
11
+ const _hoisted_3 = { class: "title-span" };
12
+ const _hoisted_4 = ["onClick"];
13
+ const _hoisted_5 = { class: "title" };
14
+ const _hoisted_6 = { class: "bottom-view" };
15
+ const _hoisted_7 = { class: "left" };
16
+ const _sfc_main = defineComponent({
17
+ ...{ name: "CompoList" },
18
+ __name: "index",
19
+ props: {
20
+ maxSelect: {},
21
+ defaultSelectedData: {},
22
+ typeData: {},
23
+ userInfo: {}
24
+ },
25
+ emits: ["change"],
26
+ setup(__props, { emit }) {
27
+ const props = __props;
28
+ const columnIdMap = compoColumnsMap();
29
+ const _maxSelect = props.maxSelect || 100;
30
+ const selectedData = ref([]);
31
+ const tempSelectedData = computed(() => {
32
+ return props.defaultSelectedData || [];
33
+ });
34
+ watch(
35
+ () => tempSelectedData.value,
36
+ (val) => {
37
+ selectedData.value = val;
38
+ }
39
+ );
40
+ const {
41
+ isItemChecked,
42
+ hoverBatchBox,
43
+ tableCellMouseEnter,
44
+ tableCellMouseLeave
45
+ } = useTableBatch();
46
+ const clickCheckbox = (e, record) => {
47
+ e.stopPropagation();
48
+ e.preventDefault();
49
+ selectData(record);
50
+ };
51
+ const selectTableCell = (record) => {
52
+ selectData(record);
53
+ };
54
+ const selectData = (record) => {
55
+ addDataToSelectedList(record);
56
+ };
57
+ const addDataToSelectedList = async (record) => {
58
+ const index = selectedData.value.findIndex((v) => v.id === record.id);
59
+ if (selectedData.value.length < _maxSelect) {
60
+ if (index === -1) {
61
+ selectedData.value.push(record);
62
+ } else {
63
+ selectedData.value.splice(index, 1);
64
+ }
65
+ emitChange();
66
+ } else {
67
+ if (index === -1) {
68
+ selectedData.value.splice(selectedData.value.length - 1, 1);
69
+ selectedData.value.push(record);
70
+ } else {
71
+ selectedData.value.splice(index, 1);
72
+ }
73
+ emitChange();
74
+ }
75
+ };
76
+ const emitChange = () => {
77
+ emit("change", selectedData.value);
78
+ };
79
+ const group_id = ref("all");
80
+ const groupData = ref([]);
81
+ const scrollPercent = { y: "100%" };
82
+ const search = (_filter) => {
83
+ if (_filter.keyword || _filter.columns) {
84
+ filter.value = { ..._filter };
85
+ } else {
86
+ filter.value = null;
87
+ }
88
+ loadData();
89
+ };
90
+ watch(
91
+ () => group_id.value,
92
+ () => {
93
+ loadData();
94
+ }
95
+ );
96
+ const columns = [
97
+ {
98
+ title: "\u7EC4\u4EF6\u6807\u9898",
99
+ dataIndex: "title",
100
+ slotName: "title"
101
+ },
102
+ {
103
+ title: "\u7EC4\u4EF6\u7C7B\u578B",
104
+ dataIndex: "type",
105
+ slotName: "type"
106
+ },
107
+ {
108
+ title: "\u53D1\u5E03\u65F6\u95F4",
109
+ dataIndex: "pub_time",
110
+ slotName: "pub_time"
111
+ }
112
+ ];
113
+ const mediaFileData = ref([]);
114
+ const filter = ref(null);
115
+ const dataLoading = ref(false);
116
+ const loadData = async () => {
117
+ const gid = group_id.value;
118
+ if (!gid)
119
+ return;
120
+ let params = {
121
+ rid: props.userInfo.repository_id,
122
+ state: 1,
123
+ group_type: 2
124
+ };
125
+ if (filter.value) {
126
+ params = { ...params, ...filter.value };
127
+ }
128
+ if (gid !== "all") {
129
+ params.gid = gid;
130
+ }
131
+ dataLoading.value = true;
132
+ const { code, message } = await searchMlists(props.userInfo.BASE_API, params);
133
+ dataLoading.value = false;
134
+ if (code === 0) {
135
+ mediaFileData.value = message.map((v) => {
136
+ v.catalog = "contentList";
137
+ v.channel_type = 1;
138
+ v.target_id = v.id;
139
+ v.target_type = 6;
140
+ v.pub_time = dateYYYYDDMMHHmm(v.publish_at);
141
+ v.update_time = v.updated_at;
142
+ v.pub_user_alias = v.publish_user_alias;
143
+ v.creator_alias = v.creator_alias || v.author_alias;
144
+ v._type = 2;
145
+ return v;
146
+ }) || [];
147
+ }
148
+ };
149
+ const getGroupData = async () => {
150
+ const params = {
151
+ rid: props.userInfo.repository_id,
152
+ cid: props.userInfo.default_wap_channel_id,
153
+ group_type: 2,
154
+ less: true,
155
+ active: true,
156
+ limit: 500,
157
+ offset: 0
158
+ };
159
+ const { code, message } = await getCategorylistsGroups(
160
+ props.userInfo.BASE_API,
161
+ params
162
+ );
163
+ if (code === 0 && message) {
164
+ const { groups } = message;
165
+ groupData.value = groups.map((v) => {
166
+ v._type = 1;
167
+ v.catalog = "group";
168
+ return v;
169
+ });
170
+ loadData();
171
+ }
172
+ };
173
+ onMounted(() => {
174
+ getGroupData();
175
+ });
176
+ return (_ctx, _cache) => {
177
+ return openBlock(), createElementBlock("div", _hoisted_1, [
178
+ createVNode(_sfc_main$1, {
179
+ group_id: group_id.value,
180
+ "onUpdate:group_id": _cache[0] || (_cache[0] = ($event) => group_id.value = $event),
181
+ groups: groupData.value,
182
+ "user-info": props.userInfo,
183
+ onSearch: search
184
+ }, null, 8, ["group_id", "groups", "user-info"]),
185
+ createElementVNode("div", _hoisted_2, [
186
+ createVNode(unref(Table), {
187
+ columns,
188
+ scroll: scrollPercent,
189
+ pagination: false,
190
+ bordered: false,
191
+ data: mediaFileData.value,
192
+ loading: dataLoading.value,
193
+ onCellMouseEnter: unref(tableCellMouseEnter),
194
+ onCellMouseLeave: unref(tableCellMouseLeave),
195
+ onRowClick: selectTableCell
196
+ }, {
197
+ title: withCtx(({ record }) => [
198
+ createElementVNode("span", _hoisted_3, [
199
+ unref(hoverBatchBox)(selectedData.value, record) ? (openBlock(), createElementBlock("span", {
200
+ key: 0,
201
+ onClick: withModifiers(($event) => clickCheckbox($event, record), ["stop"])
202
+ }, [
203
+ createVNode(unref(Checkbox), {
204
+ class: "icon",
205
+ "model-value": unref(isItemChecked)(selectedData.value, record)
206
+ }, null, 8, ["model-value"])
207
+ ], 8, _hoisted_4)) : (openBlock(), createBlock(_sfc_main$2, {
208
+ key: 1,
209
+ class: "icon",
210
+ type: record.series
211
+ }, null, 8, ["type"])),
212
+ createElementVNode("span", _hoisted_5, toDisplayString(record.title || record.alias || "--"), 1)
213
+ ])
214
+ ]),
215
+ type: withCtx(({ record }) => [
216
+ createElementVNode("span", null, toDisplayString(unref(columnIdMap)[record.columns]), 1)
217
+ ]),
218
+ pub_time: withCtx(({ record }) => [
219
+ createElementVNode("span", null, toDisplayString(record.pub_time), 1)
220
+ ]),
221
+ _: 1
222
+ }, 8, ["data", "loading", "onCellMouseEnter", "onCellMouseLeave"])
223
+ ]),
224
+ createElementVNode("div", _hoisted_6, [
225
+ createElementVNode("div", _hoisted_7, [
226
+ renderSlot(_ctx.$slots, "store")
227
+ ]),
228
+ renderSlot(_ctx.$slots, "options")
229
+ ])
230
+ ]);
231
+ };
232
+ }
233
+ });
234
+ export { _sfc_main as default };
@@ -0,0 +1,44 @@
1
+ import { defineComponent, ref, watch, openBlock, createElementBlock, createVNode } from "vue";
2
+ import _sfc_main$1 from "../columnTree/index.js";
3
+ const _hoisted_1 = { class: "media-filter-container" };
4
+ const _sfc_main = defineComponent({
5
+ ...{ name: "MediaFilter" },
6
+ __name: "index",
7
+ props: {
8
+ group_id: {},
9
+ tree: {},
10
+ series: {},
11
+ banner: {},
12
+ height: {},
13
+ userInfo: {}
14
+ },
15
+ emits: ["update:group_id"],
16
+ setup(__props, { emit }) {
17
+ const props = __props;
18
+ const column_id = ref(0);
19
+ watch(
20
+ () => props.group_id,
21
+ (val) => {
22
+ column_id.value = val;
23
+ }
24
+ );
25
+ watch(
26
+ () => column_id.value,
27
+ (val) => {
28
+ emit("update:group_id", val);
29
+ }
30
+ );
31
+ return (_ctx, _cache) => {
32
+ return openBlock(), createElementBlock("div", _hoisted_1, [
33
+ createVNode(_sfc_main$1, {
34
+ column_id: column_id.value,
35
+ "onUpdate:column_id": _cache[0] || (_cache[0] = ($event) => column_id.value = $event),
36
+ height: props.height,
37
+ tree: props.tree,
38
+ "user-info": props.userInfo
39
+ }, null, 8, ["column_id", "height", "tree", "user-info"])
40
+ ]);
41
+ };
42
+ }
43
+ });
44
+ export { _sfc_main as default };