ling-yun-custom-components 0.0.66 → 0.0.67

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 (31) hide show
  1. package/es/chunks/AppIntro.DubEs5q_.js +431 -0
  2. package/es/chunks/BuildComponents.Bu-jJtCo.js +203 -0
  3. package/es/chunks/CustomDialog.T0DjhxY4.js +5 -0
  4. package/es/chunks/CustomDropdown.BoSVXB8_.js +132 -0
  5. package/es/chunks/CustomPagination.D26A7iFP.js +5 -0
  6. package/es/chunks/CustomTab.BCs2BQZr.js +52 -0
  7. package/es/chunks/GradientButton.BVlXDphQ.js +91 -0
  8. package/es/chunks/PageNotFound.CLFUj6wN.js +31 -0
  9. package/es/chunks/PaginationTable.DCYPUxcZ.js +357 -0
  10. package/es/chunks/PluginDetail.CV8dYPPL.js +223 -0
  11. package/es/chunks/UpdatePasswordDialog.CkKA35QX.js +110 -0
  12. package/es/chunks/_plugin-vue_export-helper.Cf-_TWPK.js +6 -0
  13. package/es/chunks/layout.BqQQsRMO.js +95 -0
  14. package/es/chunks/layout.BuyWf5hx.js +189 -0
  15. package/es/chunks/utils.BhlZXNZ6.js +19 -0
  16. package/lib/chunks/AppIntro.CIDfpAQM.js +1 -0
  17. package/lib/chunks/BuildComponents.CmF7gV_k.js +1 -0
  18. package/lib/chunks/CustomDialog.lBdGLThM.js +1 -0
  19. package/lib/chunks/CustomDropdown.DS2fIdjY.js +1 -0
  20. package/lib/chunks/CustomPagination.Cyej-_3r.js +1 -0
  21. package/lib/chunks/CustomTab.DccrszIL.js +1 -0
  22. package/lib/chunks/GradientButton.DVbHjYJL.js +1 -0
  23. package/lib/chunks/PageNotFound.DWUdrtNX.js +1 -0
  24. package/lib/chunks/PaginationTable.BfbaK5Og.js +1 -0
  25. package/lib/chunks/PluginDetail.BUfKJRob.js +1 -0
  26. package/lib/chunks/UpdatePasswordDialog.B-POajDC.js +1 -0
  27. package/lib/chunks/_plugin-vue_export-helper.C55-DZV2.js +1 -0
  28. package/lib/chunks/layout.C5f-mOl4.js +1 -0
  29. package/lib/chunks/layout.uCgAET3T.js +1 -0
  30. package/lib/chunks/utils.BT5Uuz2Q.js +1 -0
  31. package/package.json +10 -10
@@ -0,0 +1,223 @@
1
+ import { t as withInstall } from "./utils.BhlZXNZ6.js";
2
+ import { t as _plugin_vue_export_helper_default } from "./_plugin-vue_export-helper.Cf-_TWPK.js";
3
+ import { Fragment, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createTextVNode, createVNode, nextTick, normalizeClass, onMounted, openBlock, ref, renderList, renderSlot, toDisplayString, unref, watch, withCtx } from "vue";
4
+ import { ElButton, ElSegmented, ElTable, ElTableColumn } from "element-plus";
5
+ import { emitsMap } from "color-star-custom-methods";
6
+ import { CustomTitle } from "color-star-custom-components";
7
+ import '../assets/PluginDetail.css';const paramsConfigMap = {
8
+ name: "name",
9
+ type: "type",
10
+ required: "required",
11
+ description: "description"
12
+ }, paramsDataConfig = [
13
+ {
14
+ label: "参数名",
15
+ prop: paramsConfigMap.name
16
+ },
17
+ {
18
+ label: "参数类型",
19
+ prop: paramsConfigMap.type
20
+ },
21
+ {
22
+ label: "必填",
23
+ prop: paramsConfigMap.required
24
+ },
25
+ {
26
+ label: "描述",
27
+ prop: paramsConfigMap.description
28
+ }
29
+ ];
30
+ var _hoisted_1$1 = {
31
+ key: 1,
32
+ class: "type-tag"
33
+ }, ParamsTable_default = {
34
+ __name: "ParamsTable",
35
+ props: {
36
+ data: {
37
+ type: [Array, String],
38
+ default: () => []
39
+ },
40
+ columns: {
41
+ type: Array,
42
+ default: () => paramsDataConfig
43
+ },
44
+ hideColumns: {
45
+ type: Array,
46
+ default: () => []
47
+ }
48
+ },
49
+ setup(a) {
50
+ let E = a, O = computed(() => {
51
+ let a = E.data;
52
+ if (typeof a == "string") try {
53
+ a = JSON.parse(a);
54
+ } catch (a) {
55
+ return console.error("解析参数数据失败:", a), [];
56
+ }
57
+ return !a || !Array.isArray(a) ? [] : a;
58
+ }), k = computed(() => !E.hideColumns || E.hideColumns.length === 0 ? E.columns : E.columns.filter((a) => !E.hideColumns.includes(a.prop)));
59
+ return (a, E) => (openBlock(), createBlock(unref(ElTable), {
60
+ data: O.value,
61
+ "row-key": "uiid",
62
+ "tree-props": {
63
+ children: "children",
64
+ hasChildren: "hasChildren"
65
+ },
66
+ stripe: ""
67
+ }, {
68
+ default: withCtx(() => [(openBlock(!0), createElementBlock(Fragment, null, renderList(k.value, (a) => (openBlock(), createBlock(unref(ElTableColumn), {
69
+ key: a.prop,
70
+ prop: a.prop,
71
+ label: a.label,
72
+ width: a.width,
73
+ "min-width": a.minWidth
74
+ }, {
75
+ default: withCtx(({ row: E }) => [a.prop === "required" ? (openBlock(), createElementBlock("span", {
76
+ key: 0,
77
+ class: normalizeClass(E.required ? "required-yes" : "required-no")
78
+ }, toDisplayString(E.required ? "是" : "否"), 3)) : a.prop === "type" ? (openBlock(), createElementBlock("span", _hoisted_1$1, toDisplayString(E.type), 1)) : (openBlock(), createElementBlock(Fragment, { key: 2 }, [createTextVNode(toDisplayString(E[a.prop] || "-"), 1)], 64))]),
79
+ _: 2
80
+ }, 1032, [
81
+ "prop",
82
+ "label",
83
+ "width",
84
+ "min-width"
85
+ ]))), 128))]),
86
+ _: 1
87
+ }, 8, ["data"]));
88
+ }
89
+ }, _hoisted_1 = { key: 0 }, _hoisted_2 = { key: 1 }, _hoisted_3 = {
90
+ key: 3,
91
+ class: "radius-12 border-f0f0f0 pd-l-20 pd-r-20 pd-b-24 pd-t-20 mg-b-34"
92
+ }, _hoisted_4 = { class: "weight-400 fz-16 text-666666 lh-24" }, _hoisted_5 = { class: "flex justify-end items-center gap-10 text-right" };
93
+ const PluginDetail = withInstall(/* @__PURE__ */ _plugin_vue_export_helper_default(/* @__PURE__ */ Object.assign({ name: "PluginDetail" }, {
94
+ __name: "layout",
95
+ props: {
96
+ intro: {
97
+ type: String,
98
+ default: ""
99
+ },
100
+ description: {
101
+ type: String,
102
+ default: ""
103
+ },
104
+ modelValue: {
105
+ type: [String, Number],
106
+ default: ""
107
+ },
108
+ tabItems: {
109
+ type: Array,
110
+ default: () => []
111
+ },
112
+ pluginDetailApi: {
113
+ type: Function,
114
+ default: () => {}
115
+ },
116
+ showInputParams: {
117
+ type: Boolean,
118
+ default: !0
119
+ },
120
+ showOutputParams: {
121
+ type: Boolean,
122
+ default: !0
123
+ },
124
+ inputParamsHideColumns: {
125
+ type: Array,
126
+ default: () => []
127
+ },
128
+ outputParamsHideColumns: {
129
+ type: Array,
130
+ default: () => [paramsConfigMap.required]
131
+ },
132
+ showIntro: {
133
+ type: Boolean,
134
+ default: !0
135
+ }
136
+ },
137
+ emits: [emitsMap.updateModelValue, emitsMap.tabChange],
138
+ setup(a, { expose: E, emit: A }) {
139
+ let j = a, M = A, N = ref(!1), P = ref(!1), F = ref(null), I = ref(j.modelValue), L = computed(() => !j.tabItems?.length || !I.value ? null : j.tabItems.find((a) => a.bnid == I.value) || null), R = () => {
140
+ N.value = !N.value;
141
+ }, z = (a) => {
142
+ M(emitsMap.updateModelValue, a), M(emitsMap.tabChange, a);
143
+ }, B = () => {
144
+ nextTick(() => {
145
+ let a = F.value;
146
+ a && (P.value = a.scrollHeight > 24);
147
+ });
148
+ }, V = ref(null);
149
+ return watch(() => L.value?.bnid, (a) => {
150
+ a && j.pluginDetailApi(a).then((a) => {
151
+ V.value = a?.data?.[0];
152
+ });
153
+ }, { immediate: !0 }), watch(() => j.modelValue, (a) => {
154
+ I.value = a;
155
+ }), watch(() => j.tabItems, (a) => {
156
+ I.value = a?.[0]?.bnid;
157
+ }, { immediate: !0 }), watch(() => L.value?.description, () => {
158
+ B();
159
+ }, { immediate: !0 }), onMounted(() => {
160
+ B();
161
+ }), E({
162
+ checkShowMoreBtn: B,
163
+ currentTabItem: L
164
+ }), (E, D) => (openBlock(), createElementBlock(Fragment, null, [
165
+ a.showIntro ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [createVNode(unref(CustomTitle), {
166
+ content: "插件简介",
167
+ class: "mg-b-16"
168
+ }), createElementVNode("div", {
169
+ class: normalizeClass(["weight-400 fz-16 text-666", N.value ? "" : "hide-more"]),
170
+ ref_key: "descRef",
171
+ ref: F
172
+ }, [renderSlot(E.$slots, "intro", {}, () => [createTextVNode(toDisplayString(a.intro), 1)], !0)], 2)], 64)) : createCommentVNode("", !0),
173
+ a.tabItems?.length ? (openBlock(), createBlock(unref(ElSegmented), {
174
+ key: 1,
175
+ modelValue: I.value,
176
+ "onUpdate:modelValue": D[0] ||= (a) => I.value = a,
177
+ options: a.tabItems.map((a) => ({
178
+ label: a.interfaceName,
179
+ value: a.bnid
180
+ })),
181
+ onChange: z,
182
+ class: "mg-b-16"
183
+ }, null, 8, ["modelValue", "options"])) : createCommentVNode("", !0),
184
+ createVNode(unref(CustomTitle), {
185
+ content: "工具描述",
186
+ class: "mg-b-16"
187
+ }),
188
+ createElementVNode("div", {
189
+ class: normalizeClass(["weight-400 fz-16 text-666", N.value ? "" : "hide-more"]),
190
+ ref_key: "descRef",
191
+ ref: F
192
+ }, [renderSlot(E.$slots, "description", {}, () => [createTextVNode(toDisplayString(L.value?.description), 1)], !0)], 2),
193
+ P.value ? (openBlock(), createBlock(unref(ElButton), {
194
+ key: 2,
195
+ type: "text",
196
+ onClick: R
197
+ }, {
198
+ default: withCtx(() => [N.value ? (openBlock(), createElementBlock("span", _hoisted_2, "收起")) : (openBlock(), createElementBlock("span", _hoisted_1, "查看更多"))]),
199
+ _: 1
200
+ })) : createCommentVNode("", !0),
201
+ E.$slots.default || E.$slots.actions ? (openBlock(), createElementBlock("div", _hoisted_3, [createElementVNode("div", _hoisted_4, [renderSlot(E.$slots, "default", {}, () => [createTextVNode(toDisplayString(L.value?.description), 1)], !0)]), createElementVNode("div", _hoisted_5, [renderSlot(E.$slots, "actions", {}, void 0, !0)])])) : createCommentVNode("", !0),
202
+ a.showInputParams && a.tabItems?.length ? (openBlock(), createElementBlock(Fragment, { key: 4 }, [createVNode(unref(CustomTitle), {
203
+ content: "输入参数",
204
+ class: "mg-b-16 mg-t-34"
205
+ }), V.value?.paramsOuter ? (openBlock(), createBlock(ParamsTable_default, {
206
+ key: 0,
207
+ data: V.value.paramsOuter,
208
+ "hide-columns": a.inputParamsHideColumns
209
+ }, null, 8, ["data", "hide-columns"])) : createCommentVNode("", !0)], 64)) : createCommentVNode("", !0),
210
+ a.showOutputParams && a.tabItems?.length ? (openBlock(), createElementBlock(Fragment, { key: 5 }, [createVNode(unref(CustomTitle), {
211
+ content: "输出参数",
212
+ class: "mg-b-16 mg-t-34"
213
+ }), V.value?.responseOuter ? (openBlock(), createBlock(ParamsTable_default, {
214
+ key: 0,
215
+ data: V.value.responseOuter,
216
+ "hide-columns": a.outputParamsHideColumns
217
+ }, null, 8, ["data", "hide-columns"])) : createCommentVNode("", !0)], 64)) : createCommentVNode("", !0),
218
+ renderSlot(E.$slots, "plugin-detail", {}, void 0, !0)
219
+ ], 64));
220
+ }
221
+ }), [["__scopeId", "data-v-70e5945d"]])), PluginDetailParamsTable = withInstall(ParamsTable_default);
222
+ var PluginDetail_default = PluginDetail;
223
+ export { PluginDetailParamsTable as n, PluginDetail_default as r, PluginDetail as t };
@@ -0,0 +1,110 @@
1
+ import { t as withInstall } from "./utils.BhlZXNZ6.js";
2
+ import { t as layout_default$1 } from "./layout.BuyWf5hx.js";
3
+ import { t as _plugin_vue_export_helper_default } from "./_plugin-vue_export-helper.Cf-_TWPK.js";
4
+ import { computed, createBlock, createVNode, isRef, openBlock, ref, unref, withCtx } from "vue";
5
+ import { codeMap, componentType, emitsMap, messageSuccess } from "color-star-custom-methods";
6
+ import { SearchBar } from "color-star-custom-components";
7
+ import { AESCrypto } from "ling-yun-methods";
8
+ import '../assets/UpdatePasswordDialog.css';const usePasswordForm = () => {
9
+ let e = ref({
10
+ password: "",
11
+ confirmPassword: ""
12
+ }), p = computed(() => [{
13
+ label: "请输入新密码",
14
+ key: "password",
15
+ type: componentType.text,
16
+ placeholder: "请输入6-20位,需包含大小写字母、数字",
17
+ wide: !0,
18
+ required: !0,
19
+ showPassword: !0,
20
+ validator: m
21
+ }, {
22
+ label: "请再次输入新密码",
23
+ key: "confirmPassword",
24
+ type: componentType.text,
25
+ placeholder: "请输入6-20位,需包含大小写字母、数字",
26
+ wide: !0,
27
+ required: !0,
28
+ showPassword: !0,
29
+ validator: g
30
+ }]), m = (e, p, m) => {
31
+ !p || !/^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)[a-zA-Z\d]{6,20}$/.test(p) ? m(/* @__PURE__ */ Error("请输入6-20位,需包含大小写字母、数字")) : m();
32
+ }, g = (p, m, h) => {
33
+ m === "" ? h(/* @__PURE__ */ Error("两次密码不一致")) : m === e.value.password ? h() : h(/* @__PURE__ */ Error("两次密码不一致"));
34
+ };
35
+ return {
36
+ formData: e,
37
+ userFromItems: p
38
+ };
39
+ }, UpdatePasswordDialog = withInstall(/* @__PURE__ */ _plugin_vue_export_helper_default({
40
+ __name: "layout",
41
+ props: {
42
+ modelValue: {
43
+ type: Boolean,
44
+ default: !1
45
+ },
46
+ nowUserData: {
47
+ type: Object,
48
+ default: () => {}
49
+ },
50
+ apiConfig: {
51
+ type: Object,
52
+ default: () => {}
53
+ }
54
+ },
55
+ emits: [emitsMap.updateModelValue, emitsMap.change],
56
+ setup(e, { emit: m }) {
57
+ let _ = e, v = m, y = computed({
58
+ get: () => _.modelValue,
59
+ set: (e) => v(emitsMap.updateModelValue, e)
60
+ }), b = ref(null), { formData: x, userFromItems: S } = usePasswordForm(), C = async () => {
61
+ let e = await _.apiConfig.getSecretKeyApi();
62
+ if (e.code !== codeMap.success) return {};
63
+ let { key: p, iv: m, keyId: h } = e.data, { password: g } = b.value.getFormData();
64
+ return {
65
+ keyId: h,
66
+ encryptedPassword: AESCrypto.encrypt(g, p, m)
67
+ };
68
+ }, w = async () => {
69
+ let e = !1;
70
+ return await b.value.validate(async (p) => {
71
+ if (!p) return;
72
+ let { keyId: m, encryptedPassword: h } = await C();
73
+ if (!m || !h) return;
74
+ let g = {
75
+ userId: _.nowUserData.id,
76
+ newPassword: h,
77
+ aesKeyId: m
78
+ };
79
+ (await _.apiConfig.updatePasswordApi(g)).code === codeMap.success && (messageSuccess("修改成功"), y.value = !1, e = !0, v(emitsMap.change));
80
+ }), e;
81
+ };
82
+ return (e, m) => (openBlock(), createBlock(layout_default$1, {
83
+ modelValue: y.value,
84
+ "onUpdate:modelValue": m[1] ||= (e) => y.value = e,
85
+ title: "修改密码",
86
+ buttons: {
87
+ confirmText: "确定",
88
+ onConfirm: w
89
+ },
90
+ top: "30vh",
91
+ width: "568px",
92
+ "destroy-on-close": ""
93
+ }, {
94
+ default: withCtx(() => [createVNode(unref(SearchBar), {
95
+ modelValue: unref(x),
96
+ "onUpdate:modelValue": m[0] ||= (e) => isRef(x) ? x.value = e : null,
97
+ ref_key: "formRef",
98
+ ref: b,
99
+ items: unref(S),
100
+ isExpand: !1,
101
+ operationList: [],
102
+ filterMode: !1,
103
+ labelPosition: "top"
104
+ }, null, 8, ["modelValue", "items"])]),
105
+ _: 1
106
+ }, 8, ["modelValue", "buttons"]));
107
+ }
108
+ }, [["__scopeId", "data-v-befba0a5"]]));
109
+ var UpdatePasswordDialog_default = UpdatePasswordDialog;
110
+ export { UpdatePasswordDialog_default as n, UpdatePasswordDialog as t };
@@ -0,0 +1,6 @@
1
+ var _plugin_vue_export_helper_default = (e, t) => {
2
+ let n = e.__vccOpts || e;
3
+ for (let [e, r] of t) n[e] = r;
4
+ return n;
5
+ };
6
+ export { _plugin_vue_export_helper_default as t };
@@ -0,0 +1,95 @@
1
+ import { computed, createBlock, mergeProps, openBlock, unref } from "vue";
2
+ import { ElPagination } from "element-plus";
3
+ import { IconLeft, IconRight } from "color-message-lingyun-vue";
4
+ import { emitsMap, pageParams, paginationConfig } from "color-star-custom-methods";
5
+ var layout_default = /* @__PURE__ */ Object.assign({ name: "CustomPagination" }, {
6
+ __name: "layout",
7
+ props: {
8
+ currentPage: {
9
+ type: Number,
10
+ default: pageParams.pageNum
11
+ },
12
+ pageSize: {
13
+ type: Number,
14
+ default: pageParams.pageSize
15
+ },
16
+ pageSizes: {
17
+ type: Array,
18
+ default: () => paginationConfig.pageSizes
19
+ },
20
+ background: {
21
+ type: Boolean,
22
+ default: !0
23
+ },
24
+ layout: {
25
+ type: String,
26
+ default: paginationConfig.layout
27
+ },
28
+ prevIcon: {
29
+ type: Object,
30
+ default: IconLeft
31
+ },
32
+ nextIcon: {
33
+ type: Object,
34
+ default: IconRight
35
+ },
36
+ hideOnSinglePage: {
37
+ type: Boolean,
38
+ default: !0
39
+ },
40
+ total: {
41
+ type: Number,
42
+ default: 0
43
+ }
44
+ },
45
+ emits: [
46
+ emitsMap.sizeChange,
47
+ emitsMap.currentChange,
48
+ emitsMap.updateCurrentPage,
49
+ emitsMap.updatePageSize
50
+ ],
51
+ setup(s, { emit: c }) {
52
+ let l = c, u = s, d = computed({
53
+ get: () => u.currentPage,
54
+ set: (e) => {
55
+ l(emitsMap.updateCurrentPage, e);
56
+ }
57
+ }), f = computed({
58
+ get: () => u.pageSize,
59
+ set: (e) => {
60
+ l(emitsMap.updatePageSize, e);
61
+ }
62
+ }), p = (e) => {
63
+ l(emitsMap.sizeChange, e), l(emitsMap.updatePageSize, e);
64
+ }, m = (e) => {
65
+ l(emitsMap.currentChange, e), l(emitsMap.updateCurrentPage, e);
66
+ };
67
+ return (e, c) => (openBlock(), createBlock(unref(ElPagination), mergeProps({
68
+ "current-page": d.value,
69
+ "onUpdate:currentPage": c[0] ||= (e) => d.value = e,
70
+ "page-size": f.value,
71
+ "onUpdate:pageSize": c[1] ||= (e) => f.value = e,
72
+ "page-sizes": s.pageSizes,
73
+ background: s.background,
74
+ layout: s.layout,
75
+ total: s.total,
76
+ "prev-icon": s.prevIcon,
77
+ "next-icon": s.nextIcon,
78
+ "hide-on-single-page": s.hideOnSinglePage
79
+ }, e.$attrs, {
80
+ onSizeChange: p,
81
+ onCurrentChange: m
82
+ }), null, 16, [
83
+ "current-page",
84
+ "page-size",
85
+ "page-sizes",
86
+ "background",
87
+ "layout",
88
+ "total",
89
+ "prev-icon",
90
+ "next-icon",
91
+ "hide-on-single-page"
92
+ ]));
93
+ }
94
+ });
95
+ export { layout_default as t };
@@ -0,0 +1,189 @@
1
+ import { t as _plugin_vue_export_helper_default } from "./_plugin-vue_export-helper.Cf-_TWPK.js";
2
+ import { Fragment, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createTextVNode, createVNode, mergeProps, onMounted, openBlock, renderSlot, toDisplayString, unref, useAttrs, withCtx } from "vue";
3
+ import { ElButton, ElDialog, ElIcon } from "element-plus";
4
+ import { IconBack, IconClose } from "color-message-lingyun-vue";
5
+ import { emitsMap } from "color-star-custom-methods";
6
+ import '../assets/layout.css';const dialogModeMap = {
7
+ DEFAULT: "default",
8
+ PAGE: "page"
9
+ };
10
+ var _hoisted_1 = {
11
+ key: 0,
12
+ class: "flex justify-center w-full"
13
+ }, _hoisted_2 = {
14
+ class: "dialog-content flex flex-col",
15
+ style: { width: "60%" }
16
+ }, _hoisted_3 = {
17
+ key: 0,
18
+ class: "title-name flex items-center"
19
+ }, _hoisted_4 = { class: "dialog-footer" }, _hoisted_5 = {
20
+ key: 0,
21
+ class: "flex justify-center items-center w-full"
22
+ }, _hoisted_6 = {
23
+ class: "flex justify-center items-center",
24
+ style: { width: "60%" }
25
+ }, _hoisted_7 = { class: "flex justify-end items-center w-full" }, layout_default = /* @__PURE__ */ _plugin_vue_export_helper_default(/* @__PURE__ */ Object.assign({ name: "CustomDialog" }, {
26
+ __name: "layout",
27
+ props: {
28
+ modelValue: {
29
+ type: Boolean,
30
+ default: !1
31
+ },
32
+ width: {
33
+ type: [String, Number],
34
+ default: "50%"
35
+ },
36
+ closeOnClickModal: {
37
+ type: Boolean,
38
+ default: !1
39
+ },
40
+ closeOnPressEscape: {
41
+ type: Boolean,
42
+ default: !1
43
+ },
44
+ lockScroll: {
45
+ type: Boolean,
46
+ default: !0
47
+ },
48
+ closeIcon: {
49
+ type: Object,
50
+ default: IconClose
51
+ },
52
+ buttons: {
53
+ type: Object,
54
+ default: () => ({})
55
+ },
56
+ appendToBody: {
57
+ type: Boolean,
58
+ default: !0
59
+ },
60
+ dialogMode: {
61
+ type: String,
62
+ default: dialogModeMap.DEFAULT
63
+ },
64
+ titleName: {
65
+ type: String,
66
+ default: "默认标题"
67
+ }
68
+ },
69
+ emits: [
70
+ emitsMap.updateModelValue,
71
+ emitsMap.open,
72
+ emitsMap.opened,
73
+ emitsMap.close,
74
+ emitsMap.closed,
75
+ emitsMap.openAutoFocus,
76
+ emitsMap.closeAutoFocus,
77
+ emitsMap.cancel,
78
+ emitsMap.confirm
79
+ ],
80
+ setup(t, { emit: A }) {
81
+ let j = {
82
+ showCancel: !0,
83
+ showConfirm: !0,
84
+ cancelText: "取消",
85
+ confirmText: "确认",
86
+ onCancel: null,
87
+ onConfirm: null
88
+ }, M = t, N = useAttrs(), P = A, F = computed(() => M.dialogMode === dialogModeMap.PAGE ? {
89
+ marginLeft: "250px",
90
+ borderRadius: "24px",
91
+ boxShadow: "none"
92
+ } : {}), I = computed(() => M.dialogMode === dialogModeMap.PAGE ? !1 : N.modal ? N.modal : !0), L = computed(() => M.dialogMode === dialogModeMap.PAGE ? !0 : N.modalPenetrable ? N.modalPenetrable : !1), R = computed(() => M.dialogMode === dialogModeMap.PAGE ? "calc(100% - 250px - 12px)" : M.width), z = computed(() => M.dialogMode === dialogModeMap.PAGE ? "66px" : M.top || "15vh"), B = computed({
93
+ get: () => M.modelValue,
94
+ set: (t) => {
95
+ P(emitsMap.updateModelValue, t);
96
+ }
97
+ }), V = computed(() => ({
98
+ ...j,
99
+ ...M.buttons
100
+ })), H = computed(() => {
101
+ let { modelValue: t, ...D } = M;
102
+ return D;
103
+ }), U = () => {
104
+ P(emitsMap.open);
105
+ }, W = () => {
106
+ P(emitsMap.opened);
107
+ }, G = () => {
108
+ P(emitsMap.close);
109
+ }, K = () => {
110
+ P(emitsMap.closed);
111
+ }, q = () => {
112
+ P(emitsMap.openAutoFocus);
113
+ }, J = () => {
114
+ P(emitsMap.closeAutoFocus);
115
+ }, Y = () => {
116
+ V.value.onCancel ? V.value.onCancel() : B.value = !1, P(emitsMap.cancel);
117
+ }, X = async () => {
118
+ if (V.value.onConfirm) try {
119
+ await V.value.onConfirm() !== !1 && (B.value = !1);
120
+ } catch {}
121
+ else B.value = !1;
122
+ P(emitsMap.confirm);
123
+ };
124
+ return onMounted(() => {
125
+ M.dialogMode === dialogModeMap.PAGE && (document.querySelector(".el-overlay-dialog").style.overflow = "hidden");
126
+ }), (O, k) => (openBlock(), createBlock(unref(ElDialog), mergeProps({
127
+ ref: "dialogRef",
128
+ modelValue: B.value,
129
+ "onUpdate:modelValue": k[1] ||= (t) => B.value = t
130
+ }, H.value, {
131
+ width: R.value,
132
+ top: z.value,
133
+ style: F.value,
134
+ modal: I.value,
135
+ "modal-penetrable": L.value,
136
+ onOpen: U,
137
+ onOpened: W,
138
+ onClose: G,
139
+ onClosed: K,
140
+ onOpenAutoFocus: q,
141
+ onCloseAutoFocus: J,
142
+ "append-to-body": t.appendToBody,
143
+ class: { "custom-dialog-page": t.dialogMode === unref(dialogModeMap).PAGE }
144
+ }), {
145
+ header: withCtx(() => [t.dialogMode === unref(dialogModeMap).PAGE ? (openBlock(), createElementBlock("div", _hoisted_3, [createVNode(unref(ElIcon), {
146
+ size: 20,
147
+ color: "var(--text-color-1)",
148
+ class: "mg-r-6 pointer",
149
+ onClick: k[0] ||= (t) => B.value = !1
150
+ }, {
151
+ default: withCtx(() => [createVNode(unref(IconBack))]),
152
+ _: 1
153
+ }), createTextVNode(" " + toDisplayString(t.titleName), 1)])) : renderSlot(O.$slots, "header", { key: 1 }, void 0, !0)]),
154
+ footer: withCtx(() => [renderSlot(O.$slots, "footer", {}, () => [createElementVNode("div", _hoisted_4, [t.dialogMode === unref(dialogModeMap).PAGE ? (openBlock(), createElementBlock("div", _hoisted_5, [createElementVNode("div", _hoisted_6, [createElementVNode("div", _hoisted_7, [V.value.showConfirm ? (openBlock(), createBlock(unref(ElButton), {
155
+ key: 0,
156
+ type: "primary",
157
+ onClick: X
158
+ }, {
159
+ default: withCtx(() => [createTextVNode(toDisplayString(V.value.confirmText), 1)]),
160
+ _: 1
161
+ })) : createCommentVNode("", !0)])])])) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [V.value.showCancel ? (openBlock(), createBlock(unref(ElButton), {
162
+ key: 0,
163
+ onClick: Y
164
+ }, {
165
+ default: withCtx(() => [createTextVNode(toDisplayString(V.value.cancelText), 1)]),
166
+ _: 1
167
+ })) : createCommentVNode("", !0), V.value.showConfirm ? (openBlock(), createBlock(unref(ElButton), {
168
+ key: 1,
169
+ type: "primary",
170
+ onClick: X
171
+ }, {
172
+ default: withCtx(() => [createTextVNode(toDisplayString(V.value.confirmText), 1)]),
173
+ _: 1
174
+ })) : createCommentVNode("", !0)], 64))])], !0)]),
175
+ default: withCtx(() => [t.dialogMode === unref(dialogModeMap).PAGE ? (openBlock(), createElementBlock("div", _hoisted_1, [createElementVNode("div", _hoisted_2, [renderSlot(O.$slots, "default", {}, void 0, !0)])])) : renderSlot(O.$slots, "default", { key: 1 }, void 0, !0)]),
176
+ _: 3
177
+ }, 16, [
178
+ "modelValue",
179
+ "width",
180
+ "top",
181
+ "style",
182
+ "modal",
183
+ "modal-penetrable",
184
+ "append-to-body",
185
+ "class"
186
+ ]));
187
+ }
188
+ }), [["__scopeId", "data-v-09a941ae"]]);
189
+ export { layout_default as t };
@@ -0,0 +1,19 @@
1
+ Object.create;
2
+ var __defProp = Object.defineProperty;
3
+ Object.getOwnPropertyDescriptor, Object.getOwnPropertyNames, Object.getPrototypeOf, Object.prototype.hasOwnProperty;
4
+ var __commonJSMin = (e, t) => () => (t || e((t = { exports: {} }).exports, t), t.exports), __exportAll = (t, n) => {
5
+ let r = {};
6
+ for (var i in t) __defProp(r, i, {
7
+ get: t[i],
8
+ enumerable: !0
9
+ });
10
+ return n && __defProp(r, Symbol.toStringTag, { value: "Module" }), r;
11
+ }, require___vite_browser_external = /* @__PURE__ */ __commonJSMin(((e, t) => {
12
+ t.exports = {};
13
+ }));
14
+ require___vite_browser_external(), require___vite_browser_external();
15
+ const withInstall = (e) => (e.install = (t) => {
16
+ let n = e.name || e.__name;
17
+ t.component(n, e);
18
+ }, e);
19
+ export { __exportAll as n, withInstall as t };
@@ -0,0 +1 @@
1
+ require('../assets/AppIntro.css');const e=require(`./utils.BT5Uuz2Q.js`),t=require(`./layout.uCgAET3T.js`),n=require(`./_plugin-vue_export-helper.C55-DZV2.js`);let r=require(`vue`),i=require(`element-plus`),a=require(`color-message-lingyun-vue`),o=require(`color-star-custom-methods`),s=require(`color-star-custom-components`);const c={LISTING:1,DELISTING:2,ONLINE:3,OFFLINE:4},l={PENDING:0,APPROVED:1,REJECTED:2},u={IMAGE:1,VIDEO:2},d={INTRO:`intro`,TIMELINE:`timeline`},f={[c.LISTING]:`上架申请`,[c.DELISTING]:`下架申请`,[c.ONLINE]:`上线应用`,[c.OFFLINE]:`下线应用`},p={[l.PENDING]:{type:`warning`,text:`待审核`},[l.APPROVED]:{type:`primary`,text:`已通过`},[l.REJECTED]:{type:`danger`,text:`已驳回`}},m=[{title:`申请人:`,field:`appCreatorName`},{title:`应用省份:`,field:`appCreatorOrg`},{title:`应用说明:`,field:`appDesc`},{title:`接入系统:`,field:`accessSystem`},{title:`业务背景:`,field:`businessBackground`},{title:`业务目标:`,field:`businessTarget`},{title:`成效数据:`,field:`resultData`}],h=[{title:`申请人`,field:`creatorName`,showForTypes:[c.LISTING,c.DELISTING]},{title:`操作人`,field:`creatorName`,showForTypes:[c.ONLINE,c.OFFLINE]},{title:`下架原因`,field:`delistingReason`,showForTypes:[c.DELISTING]},{title:`成效数据`,field:`resultData`,showForTypes:[c.LISTING]},{title:`推荐理由`,field:`recommendReason`,showForTypes:[c.LISTING]},{title:`版本号`,field:`appVersionNum`,showForTypes:[c.ONLINE,c.OFFLINE],formatter:e=>e?`V${e}`:`--`},{title:`配置摘要`,field:`configSummary`,showForTypes:[c.ONLINE]},{title:`版本说明`,field:`publishRemark`,showForTypes:[c.ONLINE,c.OFFLINE]},{title:`下线原因`,field:`offlineReason`,showForTypes:[c.OFFLINE]}],g={[c.LISTING]:{text:`查看上架申请`},[c.DELISTING]:{text:`查看下架申请`}};var _={key:0,class:`media-video relative`},v=[`src`],y={key:1,class:`media-image relative`},b=[`src`],x={__name:`MediaViewer`,props:{media:{type:Object,default:null}},setup(e){return(t,n)=>e.media?.type===(0,r.unref)(u).VIDEO?((0,r.openBlock)(),(0,r.createElementBlock)(`div`,_,[(0,r.createElementVNode)(`video`,{class:`w-full`,src:e.media.url,controls:``},null,8,v)])):e.media?.type===(0,r.unref)(u).IMAGE?((0,r.openBlock)(),(0,r.createElementBlock)(`div`,y,[(0,r.createElementVNode)(`img`,{class:`w-full h-full`,src:e.media.url,alt:``},null,8,b)])):(0,r.createCommentVNode)(``,!0)}},S=n.t(x,[[`__scopeId`,`data-v-6cc88baf`]]),C={class:`app-intro-content overflow-hidden h-full`},w={key:0,class:`media-section w-full pd-b-12`},T={class:`media-content relative w-full`},E=[`onClick`],D={key:1,class:`info-section`},O={class:`flex items-center`},k={class:`fz-14 text-666 pd-r-12`},A={key:2,class:`flex flex-col mg-t-20`,style:{gap:`16px`}},j={class:`title-desc mg-r-2 fz-14`},M={class:`value-desc fz-14`},N={key:0,class:`flex`},P={class:`flex items-center`},F={class:`fz-14 text-666 pd-r-12`},I={class:`preview-content`},L={__name:`AppIntroContent`,props:{introData:{type:Object,default:()=>({})},layoutType:{type:String,default:`normal`}},setup(e){let n=(0,r.ref)(!1),o=(0,r.ref)(null),c=e=>{o.value=e,n.value=!0},l=()=>{n.value=!1,o.value=null},u=e=>{try{let t=document.createElement(`a`);t.href=e.attachementUrl,t.download=e.attachementName,t.style.display=`none`,t.target=`_blank`,document.body.appendChild(t),t.click(),document.body.removeChild(t)}catch(e){console.error(e)}};return(d,f)=>((0,r.openBlock)(),(0,r.createElementBlock)(`div`,C,[e.introData?.pics?.length>0?((0,r.openBlock)(),(0,r.createElementBlock)(`div`,w,[(0,r.createElementVNode)(`div`,T,[((0,r.openBlock)(!0),(0,r.createElementBlock)(r.Fragment,null,(0,r.renderList)(e.introData.pics,(e,t)=>((0,r.openBlock)(),(0,r.createElementBlock)(`div`,{key:t,class:`media-item w-full`},[(0,r.createVNode)(S,{media:e},null,8,[`media`]),(0,r.createElementVNode)(`div`,{class:`hover-overlay absolute top-0 left-0 flex justify-center items-center`,style:{width:`262px`,height:`148px`},onClick:t=>c(e)},[(0,r.createVNode)((0,r.unref)(i.ElIcon),{size:24,class:`view-icon`},{default:(0,r.withCtx)(()=>[(0,r.createVNode)((0,r.unref)(a.IconLook))]),_:1})],8,E)]))),128))])])):(0,r.createCommentVNode)(``,!0),(0,r.renderSlot)(d.$slots,`default`,{},void 0,!0),e.layoutType===`normal`?((0,r.openBlock)(),(0,r.createElementBlock)(`div`,D,[(0,r.createVNode)((0,r.unref)(i.ElForm),{model:e.introData,"label-width":`auto`},{default:(0,r.withCtx)(()=>[[`agent`,`workflow`].includes(e.introData?.appCategory)?((0,r.openBlock)(!0),(0,r.createElementBlock)(r.Fragment,{key:0},(0,r.renderList)((0,r.unref)(m),t=>((0,r.openBlock)(),(0,r.createBlock)((0,r.unref)(i.ElFormItem),{key:t.field,label:t.title,class:`mg-b-0`},{default:(0,r.withCtx)(()=>[(0,r.createTextVNode)((0,r.toDisplayString)(e.introData?.[t.field]??`--`),1)]),_:2},1032,[`label`]))),128)):(0,r.createCommentVNode)(``,!0)]),_:1},8,[`model`]),e.introData?.attachements?.length?((0,r.openBlock)(),(0,r.createElementBlock)(r.Fragment,{key:0},[(0,r.createVNode)((0,r.unref)(s.CustomTitle),{content:`附件:`,class:`pd-b-12 pd-t-24`}),((0,r.openBlock)(!0),(0,r.createElementBlock)(r.Fragment,null,(0,r.renderList)(e.introData.attachements,(e,t)=>((0,r.openBlock)(),(0,r.createElementBlock)(`div`,{key:t,class:`mg-b-8`},[(0,r.createElementVNode)(`div`,O,[(0,r.createElementVNode)(`span`,k,(0,r.toDisplayString)(e.attachementName),1),e.attachementUrl?((0,r.openBlock)(),(0,r.createBlock)((0,r.unref)(i.ElLink),{key:0,type:`primary`,underline:!1,onClick:t=>u(e)},{default:(0,r.withCtx)(()=>[...f[1]||=[(0,r.createTextVNode)(` 点击查看 `,-1)]]),_:1},8,[`onClick`])):(0,r.createCommentVNode)(``,!0)])]))),128))],64)):(0,r.createCommentVNode)(``,!0)])):e.layoutType===`list`?((0,r.openBlock)(),(0,r.createElementBlock)(`div`,A,[((0,r.openBlock)(!0),(0,r.createElementBlock)(r.Fragment,null,(0,r.renderList)((0,r.unref)(m),t=>((0,r.openBlock)(),(0,r.createElementBlock)(`div`,{key:t.field,class:`flex`},[(0,r.createElementVNode)(`div`,j,(0,r.toDisplayString)(t.title),1),(0,r.createElementVNode)(`div`,M,(0,r.toDisplayString)(e.introData?.[t.field]??`--`),1)]))),128)),e.introData?.attachements?.length?((0,r.openBlock)(),(0,r.createElementBlock)(`div`,N,[f[3]||=(0,r.createElementVNode)(`div`,{class:`title-desc mg-r-2 fz-14`},`附件:`,-1),(0,r.createElementVNode)(`div`,null,[((0,r.openBlock)(!0),(0,r.createElementBlock)(r.Fragment,null,(0,r.renderList)(e.introData.attachements,(e,t)=>((0,r.openBlock)(),(0,r.createElementBlock)(`div`,{key:t,class:`mg-b-8`},[(0,r.createElementVNode)(`div`,P,[(0,r.createElementVNode)(`span`,F,(0,r.toDisplayString)(e.attachementName),1),e.attachementUrl?((0,r.openBlock)(),(0,r.createBlock)((0,r.unref)(i.ElLink),{key:0,type:`primary`,underline:!1,onClick:t=>u(e)},{default:(0,r.withCtx)(()=>[...f[2]||=[(0,r.createTextVNode)(` 点击查看 `,-1)]]),_:1},8,[`onClick`])):(0,r.createCommentVNode)(``,!0)])]))),128))])])):(0,r.createCommentVNode)(``,!0)])):(0,r.createCommentVNode)(``,!0),(0,r.createVNode)(t.t,{modelValue:n.value,"onUpdate:modelValue":f[0]||=e=>n.value=e,width:`60%`,"show-close":!0,onClose:l,buttons:{showCancel:!1,showConfirm:!1}},{default:(0,r.withCtx)(()=>[(0,r.createElementVNode)(`div`,I,[(0,r.createVNode)(S,{media:o.value,class:`preview-media`},null,8,[`media`])])]),_:1},8,[`modelValue`])]))}},R=n.t(L,[[`__scopeId`,`data-v-1201fcb2`]]),z={class:`flex items-center flex-gap-row-nowrap-8 mg-b-12`},B={class:`fz-14 weight-500`,style:{color:`#1d2129`}},V={class:`fz-14`,style:{color:`#4e5969`}},H={__name:`AppTimeline`,props:{appId:{type:String,default:``},square:{type:Boolean,default:!1},vueRouter:{type:Object,default:()=>({})},appOperationList:{type:Function,default:()=>{}}},setup(e){let t=e,n=async e=>{t.vueRouter.push({path:`/promptTestDetail`,query:{id:e.id,type:e.auditStatus,sourceFlag:`1`,operationType:e.operationType,sourceHistory:`1`}})},a=e=>[c.LISTING,c.DELISTING].includes(e),s=e=>h.filter(t=>t.showForTypes.includes(e)),l=(0,r.ref)([]),u=async()=>{await t.appOperationList({appId:t.appId,operationType:[c.LISTING,c.DELISTING,c.ONLINE,c.OFFLINE].join(`,`),pageNum:o.pageParams.pageNum,pageSize:1e6}).then(({data:e})=>{l.value=e.list})};return(0,r.onMounted)(()=>{u()}),(t,o)=>((0,r.openBlock)(),(0,r.createBlock)((0,r.unref)(i.ElTimeline),{class:`overflow-y-auto h-full pd-l-4`},{default:(0,r.withCtx)(()=>[((0,r.openBlock)(!0),(0,r.createElementBlock)(r.Fragment,null,(0,r.renderList)(l.value,t=>((0,r.openBlock)(),(0,r.createBlock)((0,r.unref)(i.ElTimelineItem),{key:t.id,timestamp:t.createTime,placement:`top`,color:`var(--primary-color-1)`},{default:(0,r.withCtx)(()=>[(0,r.createVNode)((0,r.unref)(i.ElCard),{shadow:`hover`},{default:(0,r.withCtx)(()=>[(0,r.createElementVNode)(`div`,z,[(0,r.createElementVNode)(`span`,B,(0,r.toDisplayString)((0,r.unref)(f)[t.operationType]||`--`),1),a(t.operationType)?((0,r.openBlock)(),(0,r.createElementBlock)(r.Fragment,{key:0},[(0,r.unref)(p)[t.auditStatus]?((0,r.openBlock)(),(0,r.createBlock)((0,r.unref)(i.ElTag),{key:0,type:(0,r.unref)(p)[t.auditStatus].type},{default:(0,r.withCtx)(()=>[(0,r.createTextVNode)((0,r.toDisplayString)((0,r.unref)(p)[t.auditStatus].text),1)]),_:2},1032,[`type`])):(0,r.createCommentVNode)(``,!0)],64)):(0,r.createCommentVNode)(``,!0)]),(0,r.createElementVNode)(`div`,V,[((0,r.openBlock)(!0),(0,r.createElementBlock)(r.Fragment,null,(0,r.renderList)(s(t.operationType),e=>((0,r.openBlock)(),(0,r.createElementBlock)(`div`,{key:e.field+e.title,class:`mg-t-8 mg-b-8`,style:{"line-height":`1.5`}},(0,r.toDisplayString)(e.title)+`:`+(0,r.toDisplayString)(e.formatter?e.formatter(t[e.field]):t[e.field]??`--`),1))),128)),(0,r.unref)(g)[t.operationType]&&!e.square?((0,r.openBlock)(),(0,r.createBlock)((0,r.unref)(i.ElLink),{key:0,type:`primary`,underline:!1,class:`mg-t-8`,onClick:e=>n(t)},{default:(0,r.withCtx)(()=>[(0,r.createTextVNode)((0,r.toDisplayString)((0,r.unref)(g)[t.operationType].text),1)]),_:2},1032,[`onClick`])):(0,r.createCommentVNode)(``,!0)])]),_:2},1024)]),_:2},1032,[`timestamp`]))),128))]),_:1}))}},U=n.t(H,[[`__scopeId`,`data-v-c5a86032`]]),W={class:`h-full overflow-hidden flex flex-col pd-t-12`},G={class:`pd-b-12`},K={key:0,class:`flex-1 overflow-hidden`},q={key:1,class:`flex-1 overflow-hidden`},J=Object.assign({name:`AppIntro`},{__name:`layout`,props:{introData:{type:Object,default:()=>({})},square:{type:Boolean,default:!1},vueRouter:{type:Object,default:()=>({})},appId:{type:String,default:``},appOperationList:{type:Function,default:()=>{}},isOnlyAppIntroContent:{type:Boolean,default:!1},layoutType:{type:String,default:`normal`}},emits:[o.emitsMap.tabChange],setup(e,{emit:t}){let n=t,a=(0,r.ref)(d.INTRO),s=(0,r.computed)(()=>[{label:`应用介绍`,value:d.INTRO},{label:`迭代时间轴`,value:d.TIMELINE}]),c=e=>{n(o.emitsMap.tabChange,e)};return(t,n)=>((0,r.openBlock)(),(0,r.createElementBlock)(`div`,W,[e.isOnlyAppIntroContent?((0,r.openBlock)(),(0,r.createElementBlock)(r.Fragment,{key:1},[n[1]||=(0,r.createElementVNode)(`div`,{class:`fz-16 mg-b-14`,style:{color:`var(--text-color-1)`}},`应用介绍`,-1),(0,r.createVNode)(R,{"intro-data":e.introData,layoutType:e.layoutType},null,8,[`intro-data`,`layoutType`])],64)):((0,r.openBlock)(),(0,r.createElementBlock)(r.Fragment,{key:0},[(0,r.createElementVNode)(`div`,G,[(0,r.createVNode)((0,r.unref)(i.ElSegmented),{modelValue:a.value,"onUpdate:modelValue":n[0]||=e=>a.value=e,options:s.value,onChange:c},null,8,[`modelValue`,`options`])]),a.value===(0,r.unref)(d).INTRO?((0,r.openBlock)(),(0,r.createElementBlock)(`div`,K,[(0,r.createVNode)(R,{"intro-data":e.introData},{default:(0,r.withCtx)(()=>[(0,r.renderSlot)(t.$slots,`plugin-detail`)]),_:3},8,[`intro-data`])])):a.value===(0,r.unref)(d).TIMELINE?((0,r.openBlock)(),(0,r.createElementBlock)(`div`,q,[(0,r.createVNode)(U,{"app-operation-list":e.appOperationList,square:e.square,"vue-router":e.vueRouter,"app-id":e.appId},null,8,[`app-operation-list`,`square`,`vue-router`,`app-id`])])):(0,r.createCommentVNode)(``,!0)],64))]))}}),Y=J;const X=e.t(Y);var Z=X;Object.defineProperty(exports,`n`,{enumerable:!0,get:function(){return Z}}),Object.defineProperty(exports,`t`,{enumerable:!0,get:function(){return X}});