@cmstops/pro-compo 0.1.9 → 0.1.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.css +949 -0
- package/dist/index.min.css +1 -1
- package/es/_virtual/plugin-vue_export-helper.js +7 -0
- package/es/config.d.ts +2 -0
- package/es/config.js +5 -3
- package/es/contentDetailList/component.d.ts +0 -0
- package/es/contentDetailList/component.js +89 -0
- package/es/contentDetailList/components/Content/CompoItem/index.d.ts +0 -0
- package/es/contentDetailList/components/Content/CompoItem/index.js +76 -0
- package/es/contentDetailList/components/Content/ContentListItem/index.d.ts +0 -0
- package/es/contentDetailList/components/Content/ContentListItem/index.js +99 -0
- package/es/contentDetailList/components/Content/DocItem/ApprovalStateMap/index.d.ts +0 -0
- package/es/contentDetailList/components/Content/DocItem/ApprovalStateMap/index.js +71 -0
- package/es/contentDetailList/components/Content/DocItem/index.d.ts +0 -0
- package/es/contentDetailList/components/Content/DocItem/index.js +199 -0
- package/es/contentDetailList/components/Content/KongoNavItem/DocTags/index.d.ts +0 -0
- package/es/contentDetailList/components/Content/KongoNavItem/DocTags/index.js +184 -0
- package/es/contentDetailList/components/Content/KongoNavItem/index.d.ts +0 -0
- package/es/contentDetailList/components/Content/KongoNavItem/index.js +131 -0
- package/es/contentDetailList/components/Content/LiveItem/index.d.ts +0 -0
- package/es/contentDetailList/components/Content/LiveItem/index.js +82 -0
- package/es/contentDetailList/components/Content/MaccountItem/index.d.ts +0 -0
- package/es/contentDetailList/components/Content/MaccountItem/index.js +84 -0
- package/es/contentDetailList/components/Content/MaccountItem/temp/user.js +2 -0
- package/es/contentDetailList/components/Content/index.d.ts +0 -0
- package/es/contentDetailList/components/Content/index.js +308 -0
- package/es/contentDetailList/components/Doc/index.d.ts +0 -0
- package/es/contentDetailList/components/Doc/index.js +58 -0
- package/es/contentDetailList/index.d.ts +2 -0
- package/es/contentDetailList/index.js +7 -0
- package/es/contentDetailList/scripts/data.d.ts +254 -0
- package/es/contentDetailList/scripts/index.d.ts +58 -0
- package/es/contentDetailList/scripts/index.js +137 -0
- package/es/contentDetailList/style/ComoItem.less +106 -0
- package/es/contentDetailList/style/Content.less +49 -0
- package/es/contentDetailList/style/ContentListItem.less +131 -0
- package/es/contentDetailList/style/Doc.less +8 -0
- package/es/contentDetailList/style/DocItem.less +145 -0
- package/es/contentDetailList/style/DocTags.less +63 -0
- package/es/contentDetailList/style/KongoNavItem.less +110 -0
- package/es/contentDetailList/style/LiveItem.less +115 -0
- package/es/contentDetailList/style/MaccountItem.less +114 -0
- package/es/contentDetailList/style/css.js +1 -0
- package/es/contentDetailList/style/index.css +683 -0
- package/es/contentDetailList/style/index.d.ts +1 -0
- package/es/contentDetailList/style/index.js +1 -0
- package/es/contentDetailList/style/index.less +9 -0
- package/es/contentModal/component.js +2 -1
- package/es/contentModal/components/CompoList/CompoFilter/index.js +3 -2
- package/es/contentModal/components/CompoList/index.js +3 -2
- package/es/contentModal/components/ViewAllColumn/MediaFilter/index.js +2 -1
- package/es/contentModal/components/ViewAllColumn/columnTree/index.js +2 -1
- package/es/contentModal/components/ViewAllColumn/index.js +2 -1
- package/es/contentModal/components/storeBox/index.js +2 -1
- package/es/emptyData/component.d.ts +0 -0
- package/es/emptyData/component.js +48 -0
- package/es/emptyData/index.d.ts +2 -0
- package/es/emptyData/index.js +7 -0
- package/es/emptyData/style/css.js +1 -0
- package/es/emptyData/style/index.css +26 -0
- package/es/emptyData/style/index.d.ts +1 -0
- package/es/emptyData/style/index.js +1 -0
- package/es/emptyData/style/index.less +30 -0
- package/es/hooks/toggle.d.ts +6 -0
- package/es/hooks/toggle.js +9 -0
- package/es/hooks/user.js +2 -0
- package/es/index.css +949 -0
- package/es/index.d.ts +6 -0
- package/es/index.js +6 -0
- package/es/index.less +6 -0
- package/es/mediaFilter/component.d.ts +0 -0
- package/es/mediaFilter/component.js +41 -0
- package/es/mediaFilter/components/DocFilter.d.ts +0 -0
- package/es/mediaFilter/components/DocFilter.js +251 -0
- package/es/mediaFilter/components/DocFilter.vue_vue_type_style_index_0_scoped_true_lang.js +2 -0
- package/es/mediaFilter/components/FilterGroup.d.ts +0 -0
- package/es/mediaFilter/components/FilterGroup.js +187 -0
- package/es/mediaFilter/components/FilterGroup.vue_vue_type_style_index_0_scoped_true_lang.js +2 -0
- package/es/mediaFilter/components/FilterItem.d.ts +0 -0
- package/es/mediaFilter/components/FilterItem.js +116 -0
- package/es/mediaFilter/components/FilterItem.vue_vue_type_style_index_0_scoped_true_lang.js +2 -0
- package/es/mediaFilter/components/MediaFilter.js +8 -0
- package/es/mediaFilter/components/MpAccountFilter.js +8 -0
- package/es/mediaFilter/components/MpContentFilter.js +8 -0
- package/es/mediaFilter/index.d.ts +2 -0
- package/es/mediaFilter/index.js +7 -0
- package/es/mediaFilter/script/optionsGetter.d.ts +26 -0
- package/es/mediaFilter/script/optionsGetter.js +82 -0
- package/es/mediaFilter/style/css.js +1 -0
- package/es/mediaFilter/style/index.css +4 -0
- package/es/mediaFilter/style/index.d.ts +1 -0
- package/es/mediaFilter/style/index.js +1 -0
- package/es/mediaFilter/style/index.less +4 -0
- package/es/messageBox/list.js +2 -1
- package/es/previousVersion/component.js +2 -1
- package/es/previousVersion/style/index.less +1 -0
- package/es/resourceModal/component.js +2 -1
- package/es/resourceModal/components/MediaPreviewer/index.js +2 -1
- package/es/resourceModal/components/MediaSelection/DocAiMediaSelected/index.js +2 -1
- package/es/resourceModal/components/MediaSelection/MainContent/FileTypeThumb/index.js +5 -3
- package/es/resourceModal/components/MediaSelection/MainContent/index.js +4 -2
- package/es/resourceModal/components/MediaSelection/ToolbarSearch/index.js +2 -1
- package/es/resourceModal/components/MediaSelection/index.js +3 -2
- package/es/resourceModal/script/filter.d.ts +1 -0
- package/es/resourceModal/script/filter.js +15 -2
- package/es/selectAvatarList/component.d.ts +0 -0
- package/es/selectAvatarList/component.js +77 -0
- package/es/selectAvatarList/index.d.ts +2 -0
- package/es/selectAvatarList/index.js +7 -0
- package/es/selectAvatarList/style/css.js +1 -0
- package/es/selectAvatarList/style/index.css +4 -0
- package/es/selectAvatarList/style/index.d.ts +1 -0
- package/es/selectAvatarList/style/index.js +1 -0
- package/es/selectAvatarList/style/index.less +4 -0
- package/es/selectGategory/component.js +5 -12
- package/es/selectGategory/components/ColumnSelection/index.js +5 -1
- package/es/style.css +89 -0
- package/es/uploadBefore/component.d.ts +0 -0
- package/es/uploadBefore/component.js +81 -0
- package/es/uploadBefore/components/UploadBefore.d.ts +0 -0
- package/es/uploadBefore/components/UploadBefore.js +228 -0
- package/es/uploadBefore/components/UploadForClick.d.ts +0 -0
- package/es/uploadBefore/components/UploadForClick.js +28 -0
- package/es/uploadBefore/index.d.ts +2 -0
- package/es/uploadBefore/index.js +7 -0
- package/es/uploadBefore/script/api.d.ts +16 -0
- package/es/uploadBefore/script/api.js +27 -0
- package/es/uploadBefore/script/fileTypeAdapter.d.ts +39 -0
- package/es/uploadBefore/script/fileTypeAdapter.js +48 -0
- package/es/uploadBefore/script/fileUpload.d.ts +7 -0
- package/es/uploadBefore/script/fileUpload.js +39 -0
- package/es/uploadBefore/script/uploadHooks.d.ts +55 -0
- package/es/uploadBefore/script/uploadHooks.js +33 -0
- package/es/uploadBefore/style/css.js +1 -0
- package/es/uploadBefore/style/index.css +111 -0
- package/es/uploadBefore/style/index.d.ts +1 -0
- package/es/uploadBefore/style/index.js +1 -0
- package/es/uploadBefore/style/index.less +144 -0
- package/es/uploadBefore/utils/dragUploadEvent.d.ts +0 -0
- package/es/uploadStep/component.js +139 -4
- package/es/uploadStep/script/fileTypeAdapter.d.ts +20 -0
- package/es/uploadStep/style/index.css +113 -0
- package/es/uploadStep/style/index.less +148 -0
- package/es/userDirector/component.d.ts +0 -0
- package/es/userDirector/component.js +200 -0
- package/es/userDirector/index.d.ts +2 -0
- package/es/userDirector/index.js +7 -0
- package/es/userDirector/script/api.d.ts +9 -0
- package/es/userDirector/script/api.js +32 -0
- package/es/userDirector/style/css.js +1 -0
- package/es/userDirector/style/index.css +8 -0
- package/es/userDirector/style/index.d.ts +1 -0
- package/es/userDirector/style/index.js +1 -0
- package/es/userDirector/style/index.less +8 -0
- package/es/utils/doc.d.ts +18 -16
- package/es/utils/doc.js +52 -0
- package/es/utils/index.d.ts +8 -0
- package/es/utils/index.js +22 -1
- package/es/utils/tusUpload.d.ts +8 -0
- package/es/utils/tusUpload.js +52 -0
- package/lib/_virtual/plugin-vue_export-helper.js +8 -0
- package/lib/config.js +6 -2
- package/lib/contentDetailList/component.js +90 -0
- package/lib/contentDetailList/components/Content/CompoItem/index.js +77 -0
- package/lib/contentDetailList/components/Content/ContentListItem/index.js +100 -0
- package/lib/contentDetailList/components/Content/DocItem/ApprovalStateMap/index.js +72 -0
- package/lib/contentDetailList/components/Content/DocItem/index.js +200 -0
- package/lib/contentDetailList/components/Content/KongoNavItem/DocTags/index.js +185 -0
- package/lib/contentDetailList/components/Content/KongoNavItem/index.js +132 -0
- package/lib/contentDetailList/components/Content/LiveItem/index.js +83 -0
- package/lib/contentDetailList/components/Content/MaccountItem/index.js +85 -0
- package/lib/contentDetailList/components/Content/MaccountItem/temp/user.js +3 -0
- package/lib/contentDetailList/components/Content/index.js +313 -0
- package/lib/contentDetailList/components/Doc/index.js +59 -0
- package/lib/contentDetailList/index.js +8 -0
- package/lib/contentDetailList/scripts/index.js +153 -0
- package/lib/contentDetailList/style/ComoItem.less +106 -0
- package/lib/contentDetailList/style/Content.less +49 -0
- package/lib/contentDetailList/style/ContentListItem.less +131 -0
- package/lib/contentDetailList/style/Doc.less +8 -0
- package/lib/contentDetailList/style/DocItem.less +145 -0
- package/lib/contentDetailList/style/DocTags.less +63 -0
- package/lib/contentDetailList/style/KongoNavItem.less +110 -0
- package/lib/contentDetailList/style/LiveItem.less +115 -0
- package/lib/contentDetailList/style/MaccountItem.less +114 -0
- package/lib/contentDetailList/style/css.js +2 -0
- package/lib/contentDetailList/style/index.css +683 -0
- package/lib/contentDetailList/style/index.js +2 -0
- package/lib/contentDetailList/style/index.less +9 -0
- package/lib/contentModal/component.js +2 -1
- package/lib/contentModal/components/CompoList/CompoFilter/index.js +3 -2
- package/lib/contentModal/components/CompoList/index.js +3 -2
- package/lib/contentModal/components/ViewAllColumn/MediaFilter/index.js +2 -1
- package/lib/contentModal/components/ViewAllColumn/columnTree/index.js +2 -1
- package/lib/contentModal/components/ViewAllColumn/index.js +2 -1
- package/lib/contentModal/components/storeBox/index.js +2 -1
- package/lib/emptyData/component.js +49 -0
- package/lib/emptyData/index.js +8 -0
- package/lib/emptyData/style/css.js +2 -0
- package/lib/emptyData/style/index.css +26 -0
- package/lib/emptyData/style/index.js +2 -0
- package/lib/emptyData/style/index.less +30 -0
- package/lib/hooks/toggle.js +11 -0
- package/lib/hooks/user.js +2 -0
- package/lib/index.css +949 -0
- package/lib/index.js +12 -0
- package/lib/index.less +6 -0
- package/lib/mediaFilter/component.js +42 -0
- package/lib/mediaFilter/components/DocFilter.js +252 -0
- package/lib/mediaFilter/components/DocFilter.vue_vue_type_style_index_0_scoped_true_lang.js +3 -0
- package/lib/mediaFilter/components/FilterGroup.js +188 -0
- package/lib/mediaFilter/components/FilterGroup.vue_vue_type_style_index_0_scoped_true_lang.js +3 -0
- package/lib/mediaFilter/components/FilterItem.js +117 -0
- package/lib/mediaFilter/components/FilterItem.vue_vue_type_style_index_0_scoped_true_lang.js +3 -0
- package/lib/mediaFilter/components/MediaFilter.js +9 -0
- package/lib/mediaFilter/components/MpAccountFilter.js +9 -0
- package/lib/mediaFilter/components/MpContentFilter.js +9 -0
- package/lib/mediaFilter/index.js +8 -0
- package/lib/mediaFilter/script/optionsGetter.js +88 -0
- package/lib/mediaFilter/style/css.js +2 -0
- package/lib/mediaFilter/style/index.css +4 -0
- package/lib/mediaFilter/style/index.js +2 -0
- package/lib/mediaFilter/style/index.less +4 -0
- package/lib/messageBox/list.js +2 -1
- package/lib/previousVersion/component.js +2 -1
- package/lib/previousVersion/style/index.less +1 -0
- package/lib/resourceModal/component.js +2 -1
- package/lib/resourceModal/components/MediaPreviewer/index.js +2 -1
- package/lib/resourceModal/components/MediaSelection/DocAiMediaSelected/index.js +2 -1
- package/lib/resourceModal/components/MediaSelection/MainContent/FileTypeThumb/index.js +5 -3
- package/lib/resourceModal/components/MediaSelection/MainContent/index.js +4 -2
- package/lib/resourceModal/components/MediaSelection/ToolbarSearch/index.js +2 -1
- package/lib/resourceModal/components/MediaSelection/index.js +3 -2
- package/lib/resourceModal/script/filter.js +14 -0
- package/lib/selectAvatarList/component.js +78 -0
- package/lib/selectAvatarList/index.js +8 -0
- package/lib/selectAvatarList/style/css.js +2 -0
- package/lib/selectAvatarList/style/index.css +4 -0
- package/lib/selectAvatarList/style/index.js +2 -0
- package/lib/selectAvatarList/style/index.less +4 -0
- package/lib/selectGategory/component.js +4 -11
- package/lib/selectGategory/components/ColumnSelection/index.js +5 -1
- package/lib/uploadBefore/component.js +82 -0
- package/lib/uploadBefore/components/UploadBefore.js +229 -0
- package/lib/uploadBefore/components/UploadForClick.js +29 -0
- package/lib/uploadBefore/index.js +8 -0
- package/lib/uploadBefore/script/api.js +32 -0
- package/lib/uploadBefore/script/fileTypeAdapter.js +53 -0
- package/lib/uploadBefore/script/fileUpload.js +42 -0
- package/lib/uploadBefore/script/uploadHooks.js +36 -0
- package/lib/uploadBefore/style/css.js +2 -0
- package/lib/uploadBefore/style/index.css +111 -0
- package/lib/uploadBefore/style/index.js +2 -0
- package/lib/uploadBefore/style/index.less +144 -0
- package/lib/uploadStep/component.js +138 -3
- package/lib/uploadStep/style/index.css +113 -0
- package/lib/uploadStep/style/index.less +148 -0
- package/lib/userDirector/component.js +201 -0
- package/lib/userDirector/index.js +8 -0
- package/lib/userDirector/script/api.js +38 -0
- package/lib/userDirector/style/css.js +2 -0
- package/lib/userDirector/style/index.css +8 -0
- package/lib/userDirector/style/index.js +2 -0
- package/lib/userDirector/style/index.less +8 -0
- package/lib/utils/doc.js +59 -0
- package/lib/utils/index.js +23 -0
- package/lib/utils/tusUpload.js +75 -0
- package/package.json +8 -1
|
@@ -0,0 +1,200 @@
|
|
|
1
|
+
import { defineComponent, ref, onMounted, computed, openBlock, createBlock, unref, withCtx, createTextVNode, toDisplayString, createElementVNode, createVNode } from "vue";
|
|
2
|
+
import { Modal, AutoComplete, Collapse, CollapseItem, Tree } from "@arco-design/web-vue";
|
|
3
|
+
import { DEFAULT_BASE_API } from "../config.js";
|
|
4
|
+
import { getRoleAllUser, getDepartUserList, getRepoRoleList, getDepartList, getRepoUserList } from "./script/api.js";
|
|
5
|
+
const _hoisted_1 = { class: "user-select-content" };
|
|
6
|
+
const _hoisted_2 = { class: "user-select-left" };
|
|
7
|
+
const _hoisted_3 = /* @__PURE__ */ createElementVNode("div", { class: "user-select-right" }, null, -1);
|
|
8
|
+
const _sfc_main = defineComponent({
|
|
9
|
+
...{ name: "userDirector" },
|
|
10
|
+
__name: "component",
|
|
11
|
+
props: {
|
|
12
|
+
BASE_API: {},
|
|
13
|
+
repositoryId: {},
|
|
14
|
+
visible: { type: Boolean },
|
|
15
|
+
title: {}
|
|
16
|
+
},
|
|
17
|
+
emits: ["update:visible"],
|
|
18
|
+
setup(__props, { emit: __emit }) {
|
|
19
|
+
const props = __props;
|
|
20
|
+
const BASE_API = props.BASE_API || DEFAULT_BASE_API;
|
|
21
|
+
const emit = __emit;
|
|
22
|
+
const loadMore = () => {
|
|
23
|
+
};
|
|
24
|
+
const RoleTreeData = ref([]);
|
|
25
|
+
const DepartTreeData = ref([]);
|
|
26
|
+
const fieldNames = {
|
|
27
|
+
children: "children",
|
|
28
|
+
title: "alias",
|
|
29
|
+
key: "node_key"
|
|
30
|
+
};
|
|
31
|
+
const selectRoleNode = (selectedKeys, data) => {
|
|
32
|
+
console.log("selectRoleNode", data);
|
|
33
|
+
};
|
|
34
|
+
const expandRoleNode = async (selectedKeys, data) => {
|
|
35
|
+
if (data.node.isRole) {
|
|
36
|
+
const res = await getRoleAllUser(BASE_API, { id: data.node.id });
|
|
37
|
+
if (res.code === 0) {
|
|
38
|
+
data.node.children = res.message.map((item) => {
|
|
39
|
+
item.node_key = `role_${data.node.id}_${item.uid}`;
|
|
40
|
+
item.isUser = true;
|
|
41
|
+
item.isLeaf = true;
|
|
42
|
+
return item;
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
};
|
|
47
|
+
const selectDepartNode = (selectedKeys, data) => {
|
|
48
|
+
console.log("selectDepartNode", data);
|
|
49
|
+
};
|
|
50
|
+
const expandDepartNode = async (selectedKeys, data) => {
|
|
51
|
+
if (data.node.isDepart) {
|
|
52
|
+
const res = await getDepartUserList(BASE_API, { pid: data.node.id });
|
|
53
|
+
if (res.code === 0) {
|
|
54
|
+
data.node.children = res.message.map((item) => {
|
|
55
|
+
item.node_key = `depart_${data.node.id}_${item.uid}`;
|
|
56
|
+
item.isUser = true;
|
|
57
|
+
item.isLeaf = true;
|
|
58
|
+
return item;
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
};
|
|
63
|
+
const collapseChange = async (keys) => {
|
|
64
|
+
if (keys.includes("Role")) {
|
|
65
|
+
getRepoRoleList(BASE_API, { repoID: props.repositoryId }).then((res) => {
|
|
66
|
+
if (res.code === 0) {
|
|
67
|
+
RoleTreeData.value = res.message.map((item) => {
|
|
68
|
+
item.node_key = `role_${item.id}`;
|
|
69
|
+
item.isRole = true;
|
|
70
|
+
return item;
|
|
71
|
+
});
|
|
72
|
+
}
|
|
73
|
+
});
|
|
74
|
+
}
|
|
75
|
+
if (keys.includes("Depart")) {
|
|
76
|
+
getDepartList(BASE_API).then((res) => {
|
|
77
|
+
if (res.code === 0) {
|
|
78
|
+
DepartTreeData.value = res.message.departments.map((item) => {
|
|
79
|
+
item.node_key = `depart_${item.id}`;
|
|
80
|
+
item.isDepart = true;
|
|
81
|
+
return item;
|
|
82
|
+
});
|
|
83
|
+
}
|
|
84
|
+
});
|
|
85
|
+
}
|
|
86
|
+
};
|
|
87
|
+
const allUserList = ref([]);
|
|
88
|
+
const completeUser = ref();
|
|
89
|
+
const getUserList = async () => {
|
|
90
|
+
const res = await getRepoUserList(BASE_API, { id: props.repositoryId });
|
|
91
|
+
if (res.code === 0) {
|
|
92
|
+
allUserList.value = res.message.map((item) => {
|
|
93
|
+
item.value = item.uid;
|
|
94
|
+
item.label = item.alias;
|
|
95
|
+
return item;
|
|
96
|
+
});
|
|
97
|
+
}
|
|
98
|
+
};
|
|
99
|
+
const selectUser = (value) => {
|
|
100
|
+
console.log(value);
|
|
101
|
+
setTimeout(() => {
|
|
102
|
+
completeUser.value = "";
|
|
103
|
+
}, 100);
|
|
104
|
+
};
|
|
105
|
+
onMounted(() => {
|
|
106
|
+
getUserList();
|
|
107
|
+
});
|
|
108
|
+
const visible = computed({
|
|
109
|
+
get() {
|
|
110
|
+
return props.visible;
|
|
111
|
+
},
|
|
112
|
+
set(value) {
|
|
113
|
+
setVisible(value);
|
|
114
|
+
}
|
|
115
|
+
});
|
|
116
|
+
const setVisible = (bool) => {
|
|
117
|
+
emit("update:visible", bool);
|
|
118
|
+
};
|
|
119
|
+
const handleOk = () => {
|
|
120
|
+
setVisible(false);
|
|
121
|
+
};
|
|
122
|
+
const handleCancel = () => {
|
|
123
|
+
setVisible(false);
|
|
124
|
+
};
|
|
125
|
+
return (_ctx, _cache) => {
|
|
126
|
+
return openBlock(), createBlock(unref(Modal), {
|
|
127
|
+
visible: visible.value,
|
|
128
|
+
width: "986px",
|
|
129
|
+
"mask-closable": false,
|
|
130
|
+
footer: false,
|
|
131
|
+
"title-align": "start",
|
|
132
|
+
"unmount-on-close": "",
|
|
133
|
+
onOk: handleOk,
|
|
134
|
+
onCancel: handleCancel
|
|
135
|
+
}, {
|
|
136
|
+
title: withCtx(() => [
|
|
137
|
+
createTextVNode(toDisplayString(props.title ? props.title : "\u9009\u62E9\u7528\u6237"), 1)
|
|
138
|
+
]),
|
|
139
|
+
default: withCtx(() => [
|
|
140
|
+
createElementVNode("div", _hoisted_1, [
|
|
141
|
+
createElementVNode("div", _hoisted_2, [
|
|
142
|
+
createVNode(unref(AutoComplete), {
|
|
143
|
+
modelValue: completeUser.value,
|
|
144
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => completeUser.value = $event),
|
|
145
|
+
data: allUserList.value,
|
|
146
|
+
placeholder: "\u641C\u7D22\u59D3\u540D\u3001\u7528\u6237\u540D",
|
|
147
|
+
onSelect: selectUser
|
|
148
|
+
}, null, 8, ["modelValue", "data"]),
|
|
149
|
+
createVNode(unref(Collapse), {
|
|
150
|
+
accordion: "",
|
|
151
|
+
onChange: collapseChange
|
|
152
|
+
}, {
|
|
153
|
+
default: withCtx(() => [
|
|
154
|
+
createVNode(unref(CollapseItem), {
|
|
155
|
+
key: "Role",
|
|
156
|
+
header: "\u6309\u89D2\u8272\u9009\u62E9"
|
|
157
|
+
}, {
|
|
158
|
+
default: withCtx(() => [
|
|
159
|
+
createVNode(unref(Tree), {
|
|
160
|
+
data: RoleTreeData.value,
|
|
161
|
+
"load-more": loadMore,
|
|
162
|
+
"field-names": fieldNames,
|
|
163
|
+
"action-on-node-click": "expand",
|
|
164
|
+
onSelect: selectRoleNode,
|
|
165
|
+
onExpand: expandRoleNode
|
|
166
|
+
}, null, 8, ["data"])
|
|
167
|
+
]),
|
|
168
|
+
_: 1
|
|
169
|
+
}),
|
|
170
|
+
createVNode(unref(CollapseItem), {
|
|
171
|
+
key: "Depart",
|
|
172
|
+
header: "\u6309\u7EC4\u7EC7\u67B6\u6784\u9009\u62E9"
|
|
173
|
+
}, {
|
|
174
|
+
default: withCtx(() => [
|
|
175
|
+
createVNode(unref(Tree), {
|
|
176
|
+
size: "large",
|
|
177
|
+
"block-node": "",
|
|
178
|
+
"field-names": fieldNames,
|
|
179
|
+
data: DepartTreeData.value,
|
|
180
|
+
"load-more": loadMore,
|
|
181
|
+
"action-on-node-click": "expand",
|
|
182
|
+
onSelect: selectDepartNode,
|
|
183
|
+
onExpand: expandDepartNode
|
|
184
|
+
}, null, 8, ["data"])
|
|
185
|
+
]),
|
|
186
|
+
_: 1
|
|
187
|
+
})
|
|
188
|
+
]),
|
|
189
|
+
_: 1
|
|
190
|
+
})
|
|
191
|
+
]),
|
|
192
|
+
_hoisted_3
|
|
193
|
+
])
|
|
194
|
+
]),
|
|
195
|
+
_: 1
|
|
196
|
+
}, 8, ["visible"]);
|
|
197
|
+
};
|
|
198
|
+
}
|
|
199
|
+
});
|
|
200
|
+
export { _sfc_main as default };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
interface Params {
|
|
2
|
+
[key: string]: any;
|
|
3
|
+
}
|
|
4
|
+
export declare function getRepoRoleList(BASE_API: string, params: Params): import("axios").AxiosPromise<any>;
|
|
5
|
+
export declare function getRoleAllUser(BASE_API: string, params: Params): import("axios").AxiosPromise<any>;
|
|
6
|
+
export declare function getDepartList(BASE_API: string): import("axios").AxiosPromise<any>;
|
|
7
|
+
export declare function getDepartUserList(BASE_API: string, params: Params): import("axios").AxiosPromise<any>;
|
|
8
|
+
export declare function getRepoUserList(BASE_API: string, params: Params): import("axios").AxiosPromise<any>;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import request from "../../utils/request.js";
|
|
2
|
+
function getRepoRoleList(BASE_API, params) {
|
|
3
|
+
return request(BASE_API, {
|
|
4
|
+
url: `/poplar/v2/roles/${params.repoID}`,
|
|
5
|
+
method: "get"
|
|
6
|
+
});
|
|
7
|
+
}
|
|
8
|
+
function getRoleAllUser(BASE_API, params) {
|
|
9
|
+
return request(BASE_API, {
|
|
10
|
+
url: `/poplar/v2/role/${params.id}/user`,
|
|
11
|
+
method: "get"
|
|
12
|
+
});
|
|
13
|
+
}
|
|
14
|
+
function getDepartList(BASE_API) {
|
|
15
|
+
return request(BASE_API, {
|
|
16
|
+
url: "/poplar/v2/department",
|
|
17
|
+
method: "get"
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
function getDepartUserList(BASE_API, params) {
|
|
21
|
+
return request(BASE_API, {
|
|
22
|
+
url: `/poplar/v2/department/${params.pid}/user`,
|
|
23
|
+
method: "get"
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
function getRepoUserList(BASE_API, params) {
|
|
27
|
+
return request(BASE_API, {
|
|
28
|
+
url: `/poplar/v2/repository/${params.id}/user`,
|
|
29
|
+
method: "get"
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
export { getDepartList, getDepartUserList, getRepoRoleList, getRepoUserList, getRoleAllUser };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import "./index.css";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import './index.less';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import "./index.less";
|
package/es/utils/doc.d.ts
CHANGED
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
declare type KeyValue = {
|
|
2
|
+
[key: string]: string;
|
|
3
|
+
};
|
|
1
4
|
export declare const docStateMap: {
|
|
2
5
|
0: string;
|
|
3
6
|
10: string;
|
|
@@ -10,11 +13,11 @@ export declare const docStateMap: {
|
|
|
10
13
|
19: string;
|
|
11
14
|
22: string;
|
|
12
15
|
};
|
|
13
|
-
export declare const docPubStateMap:
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
};
|
|
16
|
+
export declare const docPubStateMap: KeyValue;
|
|
17
|
+
export declare const stateOptions: () => {
|
|
18
|
+
value: string;
|
|
19
|
+
label: string;
|
|
20
|
+
}[];
|
|
18
21
|
export declare const docThumbObjMap: any;
|
|
19
22
|
export declare const docThumbRatioMap: () => any;
|
|
20
23
|
export declare const docThumbArrMap: () => unknown[];
|
|
@@ -23,17 +26,15 @@ export declare const docThumbOptions: () => {
|
|
|
23
26
|
value: string;
|
|
24
27
|
}[];
|
|
25
28
|
export declare const docThumbMap: () => any;
|
|
26
|
-
export declare const
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
special_v3: string;
|
|
36
|
-
};
|
|
29
|
+
export declare const docThumbTypeMap: () => {
|
|
30
|
+
value: string;
|
|
31
|
+
label: any;
|
|
32
|
+
}[];
|
|
33
|
+
export declare const docSeries: KeyValue;
|
|
34
|
+
export declare const typeOptions: () => {
|
|
35
|
+
value: string;
|
|
36
|
+
label: string;
|
|
37
|
+
}[];
|
|
37
38
|
export declare const otherSeries: {
|
|
38
39
|
wechat: string;
|
|
39
40
|
ad: string;
|
|
@@ -67,3 +68,4 @@ export declare const getPublishParmas: (categories: any[], categories_with: any[
|
|
|
67
68
|
clean_offline_time: boolean;
|
|
68
69
|
id: any;
|
|
69
70
|
};
|
|
71
|
+
export {};
|
package/es/utils/doc.js
ADDED
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
const docPubStateMap = {
|
|
2
|
+
"14|15|19": "\u5DF2\u53D1\u5E03",
|
|
3
|
+
"16|22": "\u5DF2\u4E0B\u7EBF",
|
|
4
|
+
"17": "\u5DF2\u5220\u9664"
|
|
5
|
+
};
|
|
6
|
+
const stateOptions = () => {
|
|
7
|
+
const arr = Object.keys(docPubStateMap).map((key) => {
|
|
8
|
+
return {
|
|
9
|
+
value: key,
|
|
10
|
+
label: docPubStateMap[key]
|
|
11
|
+
};
|
|
12
|
+
});
|
|
13
|
+
return [{ value: "", label: "\u5168\u90E8" }, ...arr];
|
|
14
|
+
};
|
|
15
|
+
const docThumbObjMap = {
|
|
16
|
+
1: { alias: "\u4E09\u56FE", maxLength: 3, value: "1", ratio: 4 / 3 },
|
|
17
|
+
2: { alias: "\u5927\u56FE", maxLength: 1, value: "2", ratio: 16 / 9 },
|
|
18
|
+
3: { alias: "\u5355\u56FE", maxLength: 1, value: "3", ratio: 4 / 3 },
|
|
19
|
+
4: { alias: "\u65E0\u56FE", maxLength: 0, value: "4", ratio: 1 },
|
|
20
|
+
5: { alias: "\u7AD6\u56FE", maxLength: 1, value: "5", ratio: 3 / 4 },
|
|
21
|
+
7: { alias: "\u7A84\u56FE", maxLength: 1, value: "7", ratio: 4 / 1 }
|
|
22
|
+
};
|
|
23
|
+
const docThumbTypeMap = () => {
|
|
24
|
+
const arr = Object.keys(docThumbObjMap).map((key) => {
|
|
25
|
+
return {
|
|
26
|
+
value: key,
|
|
27
|
+
label: docThumbObjMap[key].alias
|
|
28
|
+
};
|
|
29
|
+
});
|
|
30
|
+
return [{ value: "", label: "\u5168\u90E8" }, ...arr];
|
|
31
|
+
};
|
|
32
|
+
const docSeries = {
|
|
33
|
+
imagetext: "\u6587\u7AE0\u7A3F\u4EF6",
|
|
34
|
+
atlas: "\u56FE\u96C6\u7A3F\u4EF6",
|
|
35
|
+
video: "\u89C6\u9891\u7A3F\u4EF6",
|
|
36
|
+
video_album: "\u89C6\u9891\u96C6\u7A3F\u4EF6",
|
|
37
|
+
svideo: "\u5C0F\u89C6\u9891\u7A3F\u4EF6",
|
|
38
|
+
audio: "\u97F3\u9891\u7A3F\u4EF6",
|
|
39
|
+
audio_album: "\u97F3\u9891\u96C6\u7A3F\u4EF6",
|
|
40
|
+
h5: "H5\u7A3F\u4EF6",
|
|
41
|
+
special_v3: "\u4E13\u9898\u7A3F\u4EF6"
|
|
42
|
+
};
|
|
43
|
+
const typeOptions = () => {
|
|
44
|
+
const arr = Object.keys(docSeries).map((key) => {
|
|
45
|
+
return {
|
|
46
|
+
value: key,
|
|
47
|
+
label: docSeries[key].replace("\u7A3F\u4EF6", "")
|
|
48
|
+
};
|
|
49
|
+
});
|
|
50
|
+
return [{ value: "", label: "\u5168\u90E8" }, ...arr];
|
|
51
|
+
};
|
|
52
|
+
export { docPubStateMap, docSeries, docThumbObjMap, docThumbTypeMap, stateOptions, typeOptions };
|
package/es/utils/index.d.ts
CHANGED
|
@@ -1 +1,9 @@
|
|
|
1
1
|
export declare const dateYYYYDDMMHHmm: (date: any) => string;
|
|
2
|
+
export declare const generateUUID: () => string;
|
|
3
|
+
/**
|
|
4
|
+
* @description await 回调处理
|
|
5
|
+
* @param { Promise } promise
|
|
6
|
+
* @param { Object= } errorExt - Additional Information you can pass to the err object
|
|
7
|
+
* @return { Promise }
|
|
8
|
+
*/
|
|
9
|
+
export declare const to: <T, U = Error>(promise: Promise<T>, errorExt?: any) => Promise<[U, undefined] | [null, T]>;
|
package/es/utils/index.js
CHANGED
|
@@ -4,4 +4,25 @@ const dateYYYYDDMMHHmm = (date) => {
|
|
|
4
4
|
return "--";
|
|
5
5
|
return dayjs(date).format("YYYY-DD-MM HH:mm");
|
|
6
6
|
};
|
|
7
|
-
|
|
7
|
+
const generateUUID = () => {
|
|
8
|
+
let d = new Date().getTime();
|
|
9
|
+
const uuid = "xxxxxxxxxxxx4xxxyxxxxxxxxxxxxxxx".replace(
|
|
10
|
+
/[xy]/g,
|
|
11
|
+
function(c) {
|
|
12
|
+
const r = (d + Math.random() * 16) % 16 | 0;
|
|
13
|
+
d = Math.floor(d / 16);
|
|
14
|
+
return (c === "x" ? r : r & 3 | 8).toString(16);
|
|
15
|
+
}
|
|
16
|
+
);
|
|
17
|
+
return uuid;
|
|
18
|
+
};
|
|
19
|
+
const to = (promise, errorExt) => {
|
|
20
|
+
return promise.then((data) => [null, data]).catch((err) => {
|
|
21
|
+
if (errorExt) {
|
|
22
|
+
const parsedError = { ...err, ...errorExt };
|
|
23
|
+
return [parsedError, void 0];
|
|
24
|
+
}
|
|
25
|
+
return [err, void 0];
|
|
26
|
+
});
|
|
27
|
+
};
|
|
28
|
+
export { dateYYYYDDMMHHmm, generateUUID, to };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import * as TUS from 'tus-js-client';
|
|
2
|
+
/**
|
|
3
|
+
* @description 通过 TUS 实现大文件分片上传
|
|
4
|
+
* @param file 要上传的文件
|
|
5
|
+
* @param progressCallback 上传进度回调函数
|
|
6
|
+
* @returns
|
|
7
|
+
*/
|
|
8
|
+
export declare function uploadByTUS(file: File, progressCallback: (b: number, t: number) => void): Promise<TUS.Upload>;
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import * as TUS from "tus-js-client";
|
|
2
|
+
import { DEFAULT_UPLOAD_URL, DEFAULT_UPLOAD_CHUNK_SIZE } from "../config.js";
|
|
3
|
+
function uploadByTUS(file, progressCallback) {
|
|
4
|
+
return new Promise((resolve, reject) => {
|
|
5
|
+
const upload = new TUS.Upload(file, {
|
|
6
|
+
...uploadConfig(file),
|
|
7
|
+
onBeforeRequest: (req) => {
|
|
8
|
+
const xhr = req.getUnderlyingObject();
|
|
9
|
+
xhr.withCredentials = true;
|
|
10
|
+
},
|
|
11
|
+
onError: (error) => {
|
|
12
|
+
console.log(error);
|
|
13
|
+
reject(error);
|
|
14
|
+
},
|
|
15
|
+
onProgress: (bytesSent, bytesTotal) => {
|
|
16
|
+
progressCallback(bytesSent, bytesTotal);
|
|
17
|
+
},
|
|
18
|
+
onSuccess: () => {
|
|
19
|
+
resolve(upload);
|
|
20
|
+
}
|
|
21
|
+
});
|
|
22
|
+
upload.start();
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
function uploadConfig(file) {
|
|
26
|
+
const fType = getFileType(file);
|
|
27
|
+
console.log(DEFAULT_UPLOAD_URL);
|
|
28
|
+
return {
|
|
29
|
+
endpoint: DEFAULT_UPLOAD_URL,
|
|
30
|
+
chunkSize: DEFAULT_UPLOAD_CHUNK_SIZE,
|
|
31
|
+
retryDelays: [0, 1e3, 3e3, 5e3],
|
|
32
|
+
overridePatchMethod: true,
|
|
33
|
+
removeFingerprintOnSuccess: true,
|
|
34
|
+
metadata: {
|
|
35
|
+
filename: file.name,
|
|
36
|
+
filetype: fType,
|
|
37
|
+
platform: "holly"
|
|
38
|
+
}
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
function getFileType(file) {
|
|
42
|
+
let fType = file.type;
|
|
43
|
+
const ext = file.name.length > 4 ? file.name.substring(file.name.length - 4) : ".null";
|
|
44
|
+
if (ext.toLocaleLowerCase() === ".mkv")
|
|
45
|
+
fType = "video/x-matroska";
|
|
46
|
+
if (ext.toLocaleLowerCase() === ".zip")
|
|
47
|
+
fType = "application/zip";
|
|
48
|
+
if (ext.toLocaleLowerCase() === ".rar")
|
|
49
|
+
fType = "application/x-rar";
|
|
50
|
+
return fType;
|
|
51
|
+
}
|
|
52
|
+
export { uploadByTUS };
|
package/lib/config.js
CHANGED
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
|
|
3
|
-
const DEFAULT_BASE_API =
|
|
4
|
-
const DEFAULT_BASE_ACCOUNT_HOST =
|
|
3
|
+
const DEFAULT_BASE_API = {}.STORYBOOK_ENV === "dev" ? "https://site.cmstop.xyz" : "https://site.cmstop.xyz";
|
|
4
|
+
const DEFAULT_BASE_ACCOUNT_HOST = {}.STORYBOOK_ENV === "dev" ? "https://account.cmstop.xyz" : "";
|
|
5
|
+
const DEFAULT_UPLOAD_CHUNK_SIZE = {}.STORYBOOK_ENV === "dev" ? 5242880 : 5242880;
|
|
6
|
+
const DEFAULT_UPLOAD_URL = {}.STORYBOOK_ENV === "dev" ? "https://oss.cmstop.xyz/maple/v1/upload/" : "https://oss.cmstop.xyz/maple/v1/upload/";
|
|
5
7
|
exports.DEFAULT_BASE_ACCOUNT_HOST = DEFAULT_BASE_ACCOUNT_HOST;
|
|
6
8
|
exports.DEFAULT_BASE_API = DEFAULT_BASE_API;
|
|
9
|
+
exports.DEFAULT_UPLOAD_CHUNK_SIZE = DEFAULT_UPLOAD_CHUNK_SIZE;
|
|
10
|
+
exports.DEFAULT_UPLOAD_URL = DEFAULT_UPLOAD_URL;
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var vue = require("vue");
|
|
3
|
+
var index = require("./components/Content/index.js");
|
|
4
|
+
var index$1 = require("./components/Doc/index.js");
|
|
5
|
+
const _hoisted_1 = { class: "content-detail-list-container" };
|
|
6
|
+
const _sfc_main = vue.defineComponent({
|
|
7
|
+
...{ name: "contentDetailList" },
|
|
8
|
+
__name: "component",
|
|
9
|
+
props: {
|
|
10
|
+
type: {},
|
|
11
|
+
contentsMediaFileData: {},
|
|
12
|
+
query: {},
|
|
13
|
+
disdragalbe: { type: Boolean },
|
|
14
|
+
abttrites: {}
|
|
15
|
+
},
|
|
16
|
+
emits: [
|
|
17
|
+
"sortChange",
|
|
18
|
+
"dragstart",
|
|
19
|
+
"clickTitle",
|
|
20
|
+
"cellMouseEnter",
|
|
21
|
+
"cellMouseLeave"
|
|
22
|
+
],
|
|
23
|
+
setup(__props, { emit: __emit }) {
|
|
24
|
+
const props = __props;
|
|
25
|
+
const emit = __emit;
|
|
26
|
+
const queryProps = props.query || "";
|
|
27
|
+
const disdragalbeProps = props.disdragalbe || false;
|
|
28
|
+
const abttritesProps = props.abttrites || [];
|
|
29
|
+
const sortMediaFileData = (e) => {
|
|
30
|
+
emit("sortChange", e);
|
|
31
|
+
};
|
|
32
|
+
const dragStart = () => {
|
|
33
|
+
emit("dragstart");
|
|
34
|
+
};
|
|
35
|
+
const detail = (e) => {
|
|
36
|
+
emit("clickTitle", e);
|
|
37
|
+
};
|
|
38
|
+
const tableCellMouseEnter = (e) => {
|
|
39
|
+
emit("cellMouseEnter", e);
|
|
40
|
+
};
|
|
41
|
+
const tableCellMouseLeave = (e) => {
|
|
42
|
+
emit("cellMouseLeave", e);
|
|
43
|
+
};
|
|
44
|
+
return (_ctx, _cache) => {
|
|
45
|
+
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1, [
|
|
46
|
+
props.type === "content" ? (vue.openBlock(), vue.createBlock(index, {
|
|
47
|
+
key: 0,
|
|
48
|
+
"media-file-data": _ctx.contentsMediaFileData,
|
|
49
|
+
disdragalbe: vue.unref(disdragalbeProps),
|
|
50
|
+
abttrites: vue.unref(abttritesProps),
|
|
51
|
+
query: vue.unref(queryProps),
|
|
52
|
+
onSortChange: sortMediaFileData,
|
|
53
|
+
onDragstart: dragStart,
|
|
54
|
+
onClickTitle: detail
|
|
55
|
+
}, {
|
|
56
|
+
option: vue.withCtx((slotProps) => [
|
|
57
|
+
vue.renderSlot(_ctx.$slots, "option", {
|
|
58
|
+
row: slotProps.row,
|
|
59
|
+
index: slotProps.index
|
|
60
|
+
})
|
|
61
|
+
]),
|
|
62
|
+
_: 3
|
|
63
|
+
}, 8, ["media-file-data", "disdragalbe", "abttrites", "query"])) : vue.createCommentVNode("v-if", true),
|
|
64
|
+
props.type === "doc" ? (vue.openBlock(), vue.createBlock(index$1, {
|
|
65
|
+
key: 1,
|
|
66
|
+
"get-data": _ctx.contentsMediaFileData,
|
|
67
|
+
abttrites: vue.unref(abttritesProps),
|
|
68
|
+
onCellMouseEnter: tableCellMouseEnter,
|
|
69
|
+
onCellMouseLeave: tableCellMouseLeave,
|
|
70
|
+
onClickTitle: detail
|
|
71
|
+
}, {
|
|
72
|
+
batch: vue.withCtx((slotProps) => [
|
|
73
|
+
vue.renderSlot(_ctx.$slots, "batch", {
|
|
74
|
+
row: slotProps.row,
|
|
75
|
+
index: slotProps.index
|
|
76
|
+
})
|
|
77
|
+
]),
|
|
78
|
+
option: vue.withCtx((slotProps) => [
|
|
79
|
+
vue.renderSlot(_ctx.$slots, "option", {
|
|
80
|
+
row: slotProps.row,
|
|
81
|
+
index: slotProps.index
|
|
82
|
+
})
|
|
83
|
+
]),
|
|
84
|
+
_: 3
|
|
85
|
+
}, 8, ["get-data", "abttrites"])) : vue.createCommentVNode("v-if", true)
|
|
86
|
+
]);
|
|
87
|
+
};
|
|
88
|
+
}
|
|
89
|
+
});
|
|
90
|
+
module.exports = _sfc_main;
|