agilebuilder-ui 1.1.65-tmp26 → 1.1.65-tmp27
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.full.min.js +1115 -1102
- package/dist/style.css +36 -20
- package/es/IntervalSelection/src/sectionDate.vue.mjs +8 -8
- package/es/chat-embed/src/chat-addition-data.vue2.mjs +14 -11
- package/es/chat-embed/src/chat-ai-answer-tip.vue2.mjs +8 -8
- package/es/chat-embed/src/chat-bubble-footer.vue2.mjs +5 -5
- package/es/chat-embed/src/chat-sender.vue2.mjs +41 -41
- package/es/chat-embed/src/components/answer-auto-chart.vue2.mjs +1 -2
- package/es/chat-embed/src/components/answer-interaction-data.vue2.mjs +6 -7
- package/es/chat-embed/src/components/history-detail.vue2.mjs +18 -18
- package/es/chat-embed/src/header.vue2.mjs +16 -16
- package/es/chat-embed/src/index.vue2.mjs +161 -161
- package/es/chat-embed/src/recommendation-message.vue2.mjs +9 -6
- package/es/chat-embed/src/sidebar-item.vue2.mjs +65 -65
- package/es/chat-embed/src/voice/voice.vue.mjs +36 -35
- package/es/date-picker-range/index.vue2.mjs +39 -39
- package/es/department-tree-mobile/src/department-tree-app.vue.mjs +8 -7
- package/es/department-tree-mobile/src/department-tree-inline-app.vue.mjs +54 -54
- package/es/department-tree-mobile/src/dept-path.vue.mjs +7 -6
- package/es/department-tree-mobile/src/dept-result.vue.mjs +7 -6
- package/es/department-user-tree-inline/src/department-user-multiple-tree-inline.vue.mjs +5 -5
- package/es/department-user-tree-mobile/src/department-user-tree-app.vue.mjs +10 -9
- package/es/department-user-tree-mobile/src/department-user-tree-inline-app.vue.mjs +64 -64
- package/es/department-user-tree-mobile/src/dept-path.vue.mjs +7 -6
- package/es/department-user-tree-mobile/src/dept-result.vue.mjs +4 -3
- package/es/empty-state/index.vue.mjs +2 -2
- package/es/fs-upload/src/fs-upload-multi.vue.mjs +1 -1
- package/es/fs-upload-list/src/fs-upload-list.vue.mjs +1 -1
- package/es/fs-upload-new/src/file-upload-mobile/file-upload-app.vue.mjs +12 -12
- package/es/fs-upload-new/src/file-upload-mobile/file-upload-browser.vue.mjs +24 -24
- package/es/fs-upload-new/src/file-upload-mobile/file-upload-component.vue2.mjs +17 -17
- package/es/fs-upload-new/src/file-upload-mobile/file-upload.vue.mjs +12 -12
- package/es/fs-upload-new/src/fs-button-upload.vue2.mjs +23 -23
- package/es/fs-upload-new/src/fs-drag-upload.vue2.mjs +23 -23
- package/es/fs-upload-new/src/fs-preview-new.vue2.mjs +34 -34
- package/es/fs-upload-new/src/fs-upload-new.vue.mjs +15 -15
- package/es/json-view/json-view-dialog.vue.mjs +5 -5
- package/es/multipart-upload/src/multipart-upload-form.vue.mjs +1 -1
- package/es/multipart-upload/src/multipart-upload-list.vue.mjs +5 -5
- package/es/row-form/index.vue2.mjs +31 -31
- package/es/row-form/operation.vue.mjs +13 -13
- package/es/secret-info/index.vue.mjs +1 -1
- package/es/src/components/Affix/index.vue2.mjs +26 -26
- package/es/src/components/Scrollbar/index.vue.mjs +22 -22
- package/es/src/views/error-page/401.vue.mjs +8 -8
- package/es/src/views/error-page/404.vue.mjs +8 -8
- package/es/style.css +933 -917
- package/es/super-grid/src/columns-config.vue.mjs +1 -1
- package/es/super-grid/src/components/grid-radio-input.vue.mjs +5 -5
- package/es/super-grid/src/components/select-input.vue.mjs +55 -55
- package/es/super-grid/src/row-detail.vue.mjs +1 -1
- package/es/super-grid/src/search-form-advancedQuery.vue.mjs +1 -1
- package/es/super-grid/src/search-form-number.vue.mjs +4 -5
- package/es/super-grid/src/super-grid.vue.mjs +1 -1
- package/es/super-nine-grid/src/search-form-number.vue.mjs +4 -5
- package/es/super-nine-grid/src/search-form.vue.mjs +1 -1
- package/es/super-nine-grid/src/super-nine-grid.vue.mjs +1 -1
- package/es/workgroup-tree-inline/src/workgroup-tree-inline.vue.mjs +8 -8
- package/es/workgroup-tree-mobile/src/dept-result.vue.mjs +4 -3
- package/es/workgroup-tree-mobile/src/workgroup-tree-app.vue.mjs +8 -7
- package/es/workgroup-tree-mobile/src/workgroup-tree-inline-app.vue.mjs +51 -51
- package/es/workgroup-user-tree-inline/src/workgroup-user-tree-inline.vue.mjs +5 -5
- package/es/workgroup-user-tree-mobile/src/dept-path.vue.mjs +7 -6
- package/es/workgroup-user-tree-mobile/src/dept-result.vue.mjs +4 -3
- package/es/workgroup-user-tree-mobile/src/workgroup-user-tree-app.vue.mjs +7 -6
- package/es/workgroup-user-tree-mobile/src/workgroup-user-tree-inline-app.vue.mjs +65 -65
- package/es/year-range-picker/src/year-range-picker.vue.mjs +1 -1
- package/lib/IntervalSelection/src/sectionDate.vue.cjs +6 -6
- package/lib/chat-embed/src/chat-addition-data.vue2.cjs +13 -10
- package/lib/chat-embed/src/chat-ai-answer-tip.vue2.cjs +8 -8
- package/lib/chat-embed/src/chat-bubble-footer.vue2.cjs +5 -5
- package/lib/chat-embed/src/chat-sender.vue2.cjs +20 -20
- package/lib/chat-embed/src/components/answer-auto-chart.vue2.cjs +1 -2
- package/lib/chat-embed/src/components/answer-interaction-data.vue2.cjs +5 -6
- package/lib/chat-embed/src/components/history-detail.vue2.cjs +18 -18
- package/lib/chat-embed/src/header.vue2.cjs +17 -17
- package/lib/chat-embed/src/index.vue2.cjs +123 -123
- package/lib/chat-embed/src/recommendation-message.vue2.cjs +7 -4
- package/lib/chat-embed/src/sidebar-item.vue2.cjs +35 -35
- package/lib/chat-embed/src/voice/voice.vue.cjs +36 -35
- package/lib/date-picker-range/index.vue2.cjs +11 -11
- package/lib/department-tree-mobile/src/department-tree-app.vue.cjs +7 -6
- package/lib/department-tree-mobile/src/department-tree-inline-app.vue.cjs +53 -53
- package/lib/department-tree-mobile/src/dept-path.vue.cjs +6 -6
- package/lib/department-tree-mobile/src/dept-result.vue.cjs +7 -6
- package/lib/department-user-tree-inline/src/department-user-multiple-tree-inline.vue.cjs +5 -5
- package/lib/department-user-tree-mobile/src/department-user-tree-app.vue.cjs +9 -8
- package/lib/department-user-tree-mobile/src/department-user-tree-inline-app.vue.cjs +61 -61
- package/lib/department-user-tree-mobile/src/dept-path.vue.cjs +6 -6
- package/lib/department-user-tree-mobile/src/dept-result.vue.cjs +4 -3
- package/lib/empty-state/index.vue.cjs +2 -2
- package/lib/fs-upload/src/fs-upload-multi.vue.cjs +1 -1
- package/lib/fs-upload-list/src/fs-upload-list.vue.cjs +1 -1
- package/lib/fs-upload-new/src/file-upload-mobile/file-upload-app.vue.cjs +12 -12
- package/lib/fs-upload-new/src/file-upload-mobile/file-upload-browser.vue.cjs +24 -24
- package/lib/fs-upload-new/src/file-upload-mobile/file-upload-component.vue2.cjs +17 -17
- package/lib/fs-upload-new/src/file-upload-mobile/file-upload.vue.cjs +12 -12
- package/lib/fs-upload-new/src/fs-button-upload.vue2.cjs +23 -23
- package/lib/fs-upload-new/src/fs-drag-upload.vue2.cjs +23 -23
- package/lib/fs-upload-new/src/fs-preview-new.vue2.cjs +36 -36
- package/lib/fs-upload-new/src/fs-upload-new.vue.cjs +15 -15
- package/lib/json-view/json-view-dialog.vue.cjs +6 -6
- package/lib/multipart-upload/src/multipart-upload-form.vue.cjs +1 -1
- package/lib/multipart-upload/src/multipart-upload-list.vue.cjs +5 -5
- package/lib/row-form/index.vue2.cjs +31 -31
- package/lib/row-form/operation.vue.cjs +13 -13
- package/lib/secret-info/index.vue.cjs +1 -1
- package/lib/src/components/Affix/index.vue2.cjs +28 -28
- package/lib/src/components/Scrollbar/index.vue.cjs +22 -22
- package/lib/src/views/error-page/401.vue.cjs +7 -7
- package/lib/src/views/error-page/404.vue.cjs +4 -4
- package/lib/style.css +955 -939
- package/lib/super-grid/src/columns-config.vue.cjs +1 -1
- package/lib/super-grid/src/components/grid-radio-input.vue.cjs +5 -5
- package/lib/super-grid/src/components/select-input.vue.cjs +56 -56
- package/lib/super-grid/src/row-detail.vue.cjs +1 -1
- package/lib/super-grid/src/search-form-advancedQuery.vue.cjs +1 -1
- package/lib/super-grid/src/search-form-number.vue.cjs +6 -6
- package/lib/super-grid/src/super-grid.vue.cjs +1 -1
- package/lib/super-nine-grid/src/search-form-number.vue.cjs +6 -6
- package/lib/super-nine-grid/src/search-form.vue.cjs +1 -1
- package/lib/super-nine-grid/src/super-nine-grid.vue.cjs +1 -1
- package/lib/workgroup-tree-inline/src/workgroup-tree-inline.vue.cjs +5 -5
- package/lib/workgroup-tree-mobile/src/dept-result.vue.cjs +4 -3
- package/lib/workgroup-tree-mobile/src/workgroup-tree-app.vue.cjs +9 -8
- package/lib/workgroup-tree-mobile/src/workgroup-tree-inline-app.vue.cjs +48 -48
- package/lib/workgroup-user-tree-inline/src/workgroup-user-tree-inline.vue.cjs +5 -5
- package/lib/workgroup-user-tree-mobile/src/dept-path.vue.cjs +6 -6
- package/lib/workgroup-user-tree-mobile/src/dept-result.vue.cjs +4 -3
- package/lib/workgroup-user-tree-mobile/src/workgroup-user-tree-app.vue.cjs +9 -8
- package/lib/workgroup-user-tree-mobile/src/workgroup-user-tree-inline-app.vue.cjs +63 -63
- package/lib/year-range-picker/src/year-range-picker.vue.cjs +1 -1
- package/package.json +2 -2
|
@@ -28,12 +28,12 @@ const e = require("vue"), t = require("../../../src/utils/common-util.cjs"), l =
|
|
|
28
28
|
e.ref([]);
|
|
29
29
|
let C = e.ref(false);
|
|
30
30
|
e.ref(false);
|
|
31
|
-
const w = e.ref(), k = e.ref(false), { t:
|
|
32
|
-
function
|
|
31
|
+
const w = e.ref(), k = e.ref(false), F = p, { t: U } = i.useI18n(), S = e.ref(null);
|
|
32
|
+
function O(e2) {
|
|
33
33
|
const t2 = e2.file;
|
|
34
|
-
t2 &&
|
|
34
|
+
t2 && F("remove", { rmFiles: [t2], serverFiles: d.value, index: e2.index });
|
|
35
35
|
}
|
|
36
|
-
function
|
|
36
|
+
function x() {
|
|
37
37
|
b.value = "image/*", m.value ? function() {
|
|
38
38
|
let e2 = ["album"];
|
|
39
39
|
"openCameraAndChoosePhoto" === f.openCameraOrChoosePhoto ? e2 = ["album", "camera"] : "openChoosePhoto" === f.openCameraOrChoosePhoto ? e2 = ["album"] : "openCamera" === f.openCameraOrChoosePhoto && (e2 = ["camera"]);
|
|
@@ -41,7 +41,7 @@ const e = require("vue"), t = require("../../../src/utils/common-util.cjs"), l =
|
|
|
41
41
|
if (f.multiple && (t2 = 20, f.limit))
|
|
42
42
|
if (d.value && d.value.length > 0) {
|
|
43
43
|
if (f.limit === d.value.length)
|
|
44
|
-
return void a.ElMessage({ showClose: true, type: "warning", message:
|
|
44
|
+
return void a.ElMessage({ showClose: true, type: "warning", message: U("fsUpload.theNumberOfUploadsExceedsTheLimitTheLimitIs") + ": " + f.limit });
|
|
45
45
|
t2 = f.limit - d.value.length;
|
|
46
46
|
} else
|
|
47
47
|
t2 = f.limit;
|
|
@@ -56,7 +56,7 @@ const e = require("vue"), t = require("../../../src/utils/common-util.cjs"), l =
|
|
|
56
56
|
}(e3.files).then(async (e4) => {
|
|
57
57
|
let t3 = [];
|
|
58
58
|
try {
|
|
59
|
-
t3 = await
|
|
59
|
+
t3 = await z(e4);
|
|
60
60
|
} catch (l2) {
|
|
61
61
|
console.error("压缩图片失败", l2), t3 = e4;
|
|
62
62
|
}
|
|
@@ -64,12 +64,12 @@ const e = require("vue"), t = require("../../../src/utils/common-util.cjs"), l =
|
|
|
64
64
|
const e5 = new FormData();
|
|
65
65
|
if (f.limitFileSize, f.multiple) {
|
|
66
66
|
if (d.value && d.value.length > 0 && d.value.length + t3.length > f.limit)
|
|
67
|
-
return void a.ElMessage({ showClose: true, type: "warning", message:
|
|
67
|
+
return void a.ElMessage({ showClose: true, type: "warning", message: U("fsUpload.theNumberOfUploadsExceedsTheLimitTheLimitIs") + ": " + f.limit });
|
|
68
68
|
for (let l2 = 0; l2 < t3.length; l2++)
|
|
69
69
|
e5.append("files", t3[l2]);
|
|
70
70
|
} else
|
|
71
71
|
e5.append("file", t3[0]);
|
|
72
|
-
|
|
72
|
+
L(e5);
|
|
73
73
|
}
|
|
74
74
|
});
|
|
75
75
|
});
|
|
@@ -77,30 +77,30 @@ const e = require("vue"), t = require("../../../src/utils/common-util.cjs"), l =
|
|
|
77
77
|
w.value.click();
|
|
78
78
|
});
|
|
79
79
|
}
|
|
80
|
-
function
|
|
80
|
+
function P(e2) {
|
|
81
81
|
b.value = "", e2 && "image" === e2 ? b.value = "image/*" : e2 && "video" === e2 && (b.value = "video/*"), setTimeout(() => {
|
|
82
82
|
k.value = false, w.value.click();
|
|
83
83
|
});
|
|
84
84
|
}
|
|
85
|
-
function
|
|
85
|
+
function N(e2, t2) {
|
|
86
86
|
let l2 = true;
|
|
87
|
-
return e2.size > 1024 * t2 * 1024 && (a.ElMessage({ showClose: true, type: "warning", message:
|
|
87
|
+
return e2.size > 1024 * t2 * 1024 && (a.ElMessage({ showClose: true, type: "warning", message: U("imatrixUIMessage.exceedFileSize", { fileName: e2.name, fileSize: t2 }) }), l2 = false), l2;
|
|
88
88
|
}
|
|
89
|
-
function
|
|
89
|
+
function R(e2) {
|
|
90
90
|
if (d.value || (d.value = []), f.multiple)
|
|
91
91
|
d.value = d.value.concat(e2);
|
|
92
92
|
else {
|
|
93
93
|
const t2 = JSON.parse(JSON.stringify(d.value));
|
|
94
|
-
d.value = [], d.value.push(e2),
|
|
94
|
+
d.value = [], d.value.push(e2), F("remove", { rmFiles: t2, serverFiles: d.value, index: 0 });
|
|
95
95
|
}
|
|
96
|
-
w.value.value = null, C.value = false,
|
|
96
|
+
w.value.value = null, C.value = false, S.value.changeFileList(d.value), F("uploadend", d.value);
|
|
97
97
|
}
|
|
98
|
-
function
|
|
98
|
+
function T() {
|
|
99
99
|
!function() {
|
|
100
100
|
const e2 = w.value.files;
|
|
101
101
|
if (e2 && e2.length > 0) {
|
|
102
102
|
if (m.value && !f.multiple && e2.length > 1)
|
|
103
|
-
return a.ElMessage({ showClose: true, type: "warning", message:
|
|
103
|
+
return a.ElMessage({ showClose: true, type: "warning", message: U("fsUpload.theNumberOfUploadsExceedsTheLimitTheLimitIs") + ": 1" }), void (w.value.value = null);
|
|
104
104
|
C.value = true, async function() {
|
|
105
105
|
const e3 = new FormData(), t2 = [], l2 = [];
|
|
106
106
|
let o2 = f.limitFileSize;
|
|
@@ -109,7 +109,7 @@ const e = require("vue"), t = require("../../../src/utils/common-util.cjs"), l =
|
|
|
109
109
|
const i2 = w.value.files;
|
|
110
110
|
for (let e4 = 0; e4 < i2.length; e4++) {
|
|
111
111
|
const l3 = i2[e4];
|
|
112
|
-
if (a2 =
|
|
112
|
+
if (a2 = N(l3, o2), !a2)
|
|
113
113
|
break;
|
|
114
114
|
t2.push(l3.name);
|
|
115
115
|
}
|
|
@@ -127,7 +127,7 @@ const e = require("vue"), t = require("../../../src/utils/common-util.cjs"), l =
|
|
|
127
127
|
return void console.error("未选择任何文件");
|
|
128
128
|
let n2 = [];
|
|
129
129
|
try {
|
|
130
|
-
n2 = await
|
|
130
|
+
n2 = await z(l2);
|
|
131
131
|
} catch (e4) {
|
|
132
132
|
console.error("压缩图片失败", e4), n2 = l2;
|
|
133
133
|
}
|
|
@@ -137,13 +137,13 @@ const e = require("vue"), t = require("../../../src/utils/common-util.cjs"), l =
|
|
|
137
137
|
e3.append("limitFileSize", o2);
|
|
138
138
|
} else
|
|
139
139
|
e3.append("file", n2[0]);
|
|
140
|
-
|
|
140
|
+
L(e3);
|
|
141
141
|
}();
|
|
142
142
|
} else
|
|
143
|
-
w.value.value = null,
|
|
143
|
+
w.value.value = null, F("uploadend", d.value);
|
|
144
144
|
}();
|
|
145
145
|
}
|
|
146
|
-
function
|
|
146
|
+
function z(e2) {
|
|
147
147
|
const t2 = [];
|
|
148
148
|
for (let l2 = 0; l2 < e2.length; l2++)
|
|
149
149
|
t2.push(new Promise((t3, a2) => {
|
|
@@ -155,16 +155,16 @@ const e = require("vue"), t = require("../../../src/utils/common-util.cjs"), l =
|
|
|
155
155
|
}));
|
|
156
156
|
return Promise.all(t2);
|
|
157
157
|
}
|
|
158
|
-
function
|
|
158
|
+
function L(e2) {
|
|
159
159
|
e2.append("systemCode", f.systemCode), window.$vueApp.config.globalProperties.$http.post(y.value, e2, { headers: { "Content-Type": "multipart/form-data", Authorization: l.getToken() } }).then((e3) => {
|
|
160
|
-
e3 ? f.multiple ? e3.length > 0 ?
|
|
160
|
+
e3 ? f.multiple ? e3.length > 0 ? R(e3) : console.error("多选时上传后返回值异常") : R(e3) : console.error("上传后返回值异常");
|
|
161
161
|
}).catch(() => {
|
|
162
162
|
C.value = false;
|
|
163
163
|
});
|
|
164
164
|
}
|
|
165
165
|
return (t2, l2) => {
|
|
166
166
|
const o2 = e.resolveComponent("el-button"), a2 = e.resolveComponent("el-drawer");
|
|
167
|
-
return e.openBlock(), e.createElementBlock("div", null, [e.createVNode(n, { ref_key: "fileUploadRef", ref:
|
|
167
|
+
return e.openBlock(), e.createElementBlock("div", null, [e.createVNode(n, { ref_key: "fileUploadRef", ref: S, disabled: s2.disabled, systemCode: s2.systemCode, accept: s2.accept, multiple: s2.multiple, limitFileSize: s2.limitFileSize, fileList: d.value, beforeRemove: s2.beforeRemove, onRemove: [s2.onRemove, O], beforeDownload: s2.beforeDownload, baseURL: h.value, watermark: s2.watermark, onChooseFile: x }, null, 8, ["disabled", "systemCode", "accept", "multiple", "limitFileSize", "fileList", "beforeRemove", "onRemove", "beforeDownload", "baseURL", "watermark"]), "openChoosePhoto" === s2.openCameraOrChoosePhoto || "openCameraAndChoosePhoto" === s2.openCameraOrChoosePhoto ? (e.openBlock(), e.createElementBlock("input", { key: 0, ref_key: "fileRef", ref: w, type: "file", multiple: c.value, name: "file", accept: e.unref(b), style: { display: "none" }, onChange: T }, null, 40, r)) : (e.openBlock(), e.createElementBlock("input", { key: 1, ref_key: "fileRef", ref: w, type: "file", multiple: c.value, capture: "environment", name: "file", accept: e.unref(b), style: { display: "none" }, onChange: T }, null, 40, u)), e.createVNode(a2, { modelValue: k.value, "onUpdate:modelValue": l2[2] || (l2[2] = (e2) => k.value = e2), direction: "btt", onClose: l2[3] || (l2[3] = (e2) => k.value = false) }, { default: e.withCtx(() => [e.createElementVNode("div", null, [e.createVNode(o2, { link: "", onClick: l2[0] || (l2[0] = (e2) => P("image")) }, { default: e.withCtx(() => [e.createTextVNode(e.toDisplayString(t2.$t("fsUpload.image")), 1)]), _: 1 })]), e.createElementVNode("div", null, [e.createVNode(o2, { link: "", onClick: l2[1] || (l2[1] = (e2) => P("video")) }, { default: e.withCtx(() => [e.createTextVNode(e.toDisplayString(t2.$t("fsUpload.video")), 1)]), _: 1 })])]), _: 1 }, 8, ["modelValue"])]);
|
|
168
168
|
};
|
|
169
169
|
} });
|
|
170
170
|
module.exports = s;
|
|
@@ -3,30 +3,30 @@ const e = require("vue"), t = require("@element-plus/icons-vue"), o = require(".
|
|
|
3
3
|
} }, onRemove: { type: Function, default: () => {
|
|
4
4
|
} }, beforeDownload: { type: Function, default: () => {
|
|
5
5
|
} }, accept: { type: String, default: "" }, limitFileSize: { type: Number, default: 30 }, baseURL: { type: String, default: "" }, watermark: { type: Object, default: () => ({}) } }, emits: ["chooseFile", "remove"], setup(u2, { expose: m, emit: d }) {
|
|
6
|
-
const p = u2;
|
|
6
|
+
const p = u2, f = d;
|
|
7
7
|
e.ref(""), e.ref(false);
|
|
8
|
-
const
|
|
9
|
-
let
|
|
10
|
-
const
|
|
11
|
-
|
|
12
|
-
const
|
|
13
|
-
|
|
14
|
-
},
|
|
15
|
-
function
|
|
16
|
-
e2 =
|
|
8
|
+
const v = e.ref(false);
|
|
9
|
+
let w = p.baseURL;
|
|
10
|
+
const y = window.$vueApp.config.globalProperties.baseAPI, b = e.ref(p.fileList);
|
|
11
|
+
b.value ? JSON.stringify(b.value) : b.value;
|
|
12
|
+
const h = () => {
|
|
13
|
+
f("chooseFile");
|
|
14
|
+
}, g = (e2) => l.isImage(e2.showName ? e2.showName : e2.name);
|
|
15
|
+
function k(e2, t2) {
|
|
16
|
+
e2 = N(e2);
|
|
17
17
|
const o2 = i.getToken();
|
|
18
|
-
let l2 =
|
|
19
|
-
return a.isPlateSys(p.systemCode) && (l2 =
|
|
18
|
+
let l2 = w + "/common/super-form/downloads?jwt=" + o2;
|
|
19
|
+
return a.isPlateSys(p.systemCode) && (l2 = y + "/component/super-form/downloads?jwt=" + o2), l2 = a.getReplaceUrlDomain(l2), l2 + "&showName=" + encodeURI(e2) + "&serverPath=" + t2;
|
|
20
20
|
}
|
|
21
|
-
const
|
|
22
|
-
function
|
|
23
|
-
|
|
21
|
+
const N = (e2) => (e2 && (e2 = e2.replace("#", "~~").replace("?", "~$").replace("&", "$")), e2);
|
|
22
|
+
function C(e2) {
|
|
23
|
+
f("remove", e2);
|
|
24
24
|
}
|
|
25
25
|
return m({ changeFileList: function(e2) {
|
|
26
|
-
|
|
26
|
+
b.value = e2;
|
|
27
27
|
} }), (l2, i2) => {
|
|
28
28
|
const a2 = e.resolveComponent("el-text"), m2 = e.resolveComponent("el-icon"), d2 = e.resolveComponent("el-upload");
|
|
29
|
-
return e.openBlock(), e.createBlock(d2, { action: "#", "list-type": "picture-card", "file-list":
|
|
29
|
+
return e.openBlock(), e.createBlock(d2, { action: "#", "list-type": "picture-card", "file-list": b.value, "auto-upload": false, disabled: true }, e.createSlots({ file: e.withCtx(({ file: t2 }) => [e.createElementVNode("div", r, [g(t2) ? (e.openBlock(), e.createElementBlock("img", { key: 1, class: "el-upload-list__item-thumbnail", src: k(t2.showName ? t2.showName : t2.name, t2.serverPath), alt: "" }, null, 8, c)) : (e.openBlock(), e.createElementBlock("div", s, [e.createElementVNode("div", n, e.toDisplayString(t2.name), 1)])), e.createVNode(o, { disabled: v.value, "file-list": b.value, file: t2, "system-code": u2.systemCode, watermark: u2.watermark, "before-remove": u2.beforeRemove, "on-remove": u2.onRemove, "before-download": u2.beforeDownload, onRemove: C }, null, 8, ["disabled", "file-list", "file", "system-code", "watermark", "before-remove", "on-remove", "before-download"])])]), _: 2 }, [v.value ? void 0 : { name: "tip", fn: e.withCtx(() => [e.createVNode(a2, { size: "small", style: { padding: "10px", "font-weight": "600" } }, { default: e.withCtx(() => [e.createTextVNode(e.toDisplayString(u2.accept) + " " + e.toDisplayString(u2.limitFileSize ? l2.$t("imatrixUIMessage.uploadFileTip", { fileSize: u2.limitFileSize }) : ""), 1)]), _: 1 })]), key: "0" }, v.value ? void 0 : { name: "trigger", fn: e.withCtx(() => [e.createVNode(m2, { onClick: h }, { default: e.withCtx(() => [e.createVNode(e.unref(t.Plus))]), _: 1 })]), key: "1" }]), 1032, ["file-list"]);
|
|
30
30
|
};
|
|
31
31
|
} });
|
|
32
32
|
module.exports = u;
|
|
@@ -9,21 +9,21 @@ const e = require("vue"), o = require("element-plus"), t = require("vue-i18n"),
|
|
|
9
9
|
return "file-upload";
|
|
10
10
|
} }, listCode: { type: String, default: null }, openCameraOrChoosePhoto: { type: String, default: "openCameraAndChoosePhoto" }, beforeUpload: { type: Function, default: () => {
|
|
11
11
|
} }, watermark: { type: Object, default: () => ({}) } }, emits: ["uploadend", "remove", "pickup-file", "close"], setup(n2, { expose: i, emit: p }) {
|
|
12
|
-
const r = window.$vueApp.config.globalProperties.baseAPI + "/component/super-form/deleteFile", { t:
|
|
13
|
-
function
|
|
14
|
-
|
|
12
|
+
const r = window.$vueApp.config.globalProperties.baseAPI + "/component/super-form/deleteFile", d = p, { t: u } = t.useI18n(), s = e.ref(null), c = e.ref(null), f = e.ref([]), m = e.ref(null), v = navigator.userAgent;
|
|
13
|
+
function b(e2) {
|
|
14
|
+
d("uploadend", e2);
|
|
15
15
|
}
|
|
16
|
-
function
|
|
16
|
+
function y({ rmFiles: e2, serverFiles: t2, newFiles: l2 }) {
|
|
17
17
|
e2 && e2.length > 0 && (e2.forEach((e3) => {
|
|
18
|
-
e3.serverPath &&
|
|
19
|
-
}),
|
|
20
|
-
o.ElMessage({ showClose: true, message:
|
|
21
|
-
}),
|
|
18
|
+
e3.serverPath && f.value && f.value.indexOf(e3.serverPath) < 0 && f.value.push(e3.serverPath);
|
|
19
|
+
}), f.value && f.value.length > 0 && window.$vueApp.config.globalProperties.$http.post(r, f.value).then(() => {
|
|
20
|
+
o.ElMessage({ showClose: true, message: u("fsUpload.updateSuccess"), type: "success" });
|
|
21
|
+
}), d("remove", { rmFiles: e2, serverFiles: t2, newFiles: l2 }));
|
|
22
22
|
}
|
|
23
|
-
return
|
|
24
|
-
"app" ===
|
|
23
|
+
return c.value = v, v.indexOf(" uni-app ") > 0 ? s.value = "app" : s.value = "browser", i({ pickFileDone: function(e2) {
|
|
24
|
+
"app" === s.value && m.value.pickFileDone(e2);
|
|
25
25
|
}, uploadFileDone: function(e2) {
|
|
26
|
-
"app" ===
|
|
27
|
-
} }), (o2, t2) => (e.openBlock(), e.createElementBlock("div", null, ["app" ===
|
|
26
|
+
"app" === s.value && m.value.uploadFileDone(e2);
|
|
27
|
+
} }), (o2, t2) => (e.openBlock(), e.createElementBlock("div", null, ["app" === s.value ? (e.openBlock(), e.createBlock(l, { key: 0, ref_key: "fileUploadRef", ref: m, "file-list": n2.fileList, multiple: n2.multiple, disabled: n2.disabled, fileInfo: n2.fileInfo, systemCode: n2.systemCode, accept: n2.accept, limit: n2.limit, limitFileSize: n2.limitFileSize, placeholder: n2.placeholder, action: n2.action, headers: n2.headers, beforeUpload: n2.beforeUpload, onSuccess: n2.onSuccess, beforeRemove: n2.beforeRemove, onRemove: [n2.onRemove, y], beforeDownload: n2.beforeDownload, pageContext: n2.pageContext, configure: n2.configure, openFsUpload: n2.openFsUpload, componentId: n2.componentId, componentName: n2.componentName, listCode: n2.listCode, openCameraOrChoosePhoto: n2.openCameraOrChoosePhoto, watermark: n2.watermark, onUploadend: b }, null, 8, ["file-list", "multiple", "disabled", "fileInfo", "systemCode", "accept", "limit", "limitFileSize", "placeholder", "action", "headers", "beforeUpload", "onSuccess", "beforeRemove", "onRemove", "beforeDownload", "pageContext", "configure", "openFsUpload", "componentId", "componentName", "listCode", "openCameraOrChoosePhoto", "watermark"])) : "browser" === s.value ? (e.openBlock(), e.createBlock(a, { key: 1, ref_key: "fileUploadRef", ref: m, "file-list": n2.fileList, multiple: n2.multiple, disabled: n2.disabled, fileInfo: n2.fileInfo, systemCode: n2.systemCode, accept: n2.accept, limit: n2.limit, limitFileSize: n2.limitFileSize, placeholder: n2.placeholder, action: n2.action, headers: n2.headers, beforeUpload: n2.beforeUpload, onSuccess: n2.onSuccess, beforeRemove: n2.beforeRemove, onRemove: [n2.onRemove, y], beforeDownload: n2.beforeDownload, pageContext: n2.pageContext, configure: n2.configure, openFsUpload: n2.openFsUpload, componentId: n2.componentId, componentName: n2.componentName, listCode: n2.listCode, openCameraOrChoosePhoto: n2.openCameraOrChoosePhoto, watermark: n2.watermark, onUploadend: b }, null, 8, ["file-list", "multiple", "disabled", "fileInfo", "systemCode", "accept", "limit", "limitFileSize", "placeholder", "action", "headers", "beforeUpload", "onSuccess", "beforeRemove", "onRemove", "beforeDownload", "pageContext", "configure", "openFsUpload", "componentId", "componentName", "listCode", "openCameraOrChoosePhoto", "watermark"])) : e.createCommentVNode("", true)]));
|
|
28
28
|
} });
|
|
29
29
|
module.exports = n;
|
|
@@ -5,28 +5,28 @@ const e = require("vue"), t = require("../../src/utils/common-util.cjs"), o = re
|
|
|
5
5
|
} }, beforeDownload: { type: Function, default: () => {
|
|
6
6
|
} }, pageContext: { type: Object, default: () => ({}) }, configure: { type: Object, default: () => ({}) }, beforeUpload: { type: Function, default: () => {
|
|
7
7
|
} }, disabledNoPreview: { type: Boolean, default: false }, disabledNoDownload: { type: Boolean, default: false }, limit: { type: Number, default: 0 }, watermark: { type: Object, default: () => ({}) } }, emits: ["on-error"], setup(u2, { emit: p }) {
|
|
8
|
-
const c =
|
|
9
|
-
const e2 = Math.max(0, Math.min(100, Number(
|
|
8
|
+
const c = p, { t: f } = r.useI18n(), m = u2, b = t.getRelativeBaseUrl(window.$vueApp.config.globalProperties.baseURL), g = t.getRelativeBaseUrl(window.$vueApp.config.globalProperties.baseAPI), v = e.ref(""), y = e.ref(), h = e.ref(false), w = e.ref(""), x = e.ref(0), N = e.ref(m.limitFileSize), C = e.computed(() => {
|
|
9
|
+
const e2 = Math.max(0, Math.min(100, Number(x.value || 0)));
|
|
10
10
|
return { background: `linear-gradient(90deg, #409EFF ${e2}%, rgba(255,255,255,0.92) ${e2}%)`, color: e2 >= 50 ? "#fff" : "#303133", transition: "background 0.3s linear" };
|
|
11
11
|
});
|
|
12
|
-
if (
|
|
13
|
-
|
|
12
|
+
if (m.action)
|
|
13
|
+
v.value = m.action;
|
|
14
14
|
else {
|
|
15
|
-
let e2 =
|
|
16
|
-
t.isPlateSys(window.$vueApp.config.globalProperties.systemCode) && (e2 =
|
|
15
|
+
let e2 = b + "/common/fs-upload";
|
|
16
|
+
t.isPlateSys(window.$vueApp.config.globalProperties.systemCode) && (e2 = g + "/component/super-form/uploads"), v.value = e2;
|
|
17
17
|
}
|
|
18
|
-
|
|
19
|
-
const
|
|
18
|
+
m.headers && m.headers.Authorization || (m.headers.Authorization = o.getToken());
|
|
19
|
+
const S = (e2) => {
|
|
20
20
|
var _a;
|
|
21
|
-
if (0 !== ((_a =
|
|
22
|
-
return a.ElMessage({ type: "warning", message: f("fsUpload.theNumberOfUploadsExceedsTheLimitTheLimitIs") + ": " +
|
|
23
|
-
if (
|
|
24
|
-
return a.ElMessage({ type: "warning", message: f("imatrixUIMessage.exceedFileSize", { fileSize:
|
|
25
|
-
return
|
|
26
|
-
},
|
|
27
|
-
a.ElMessage({ message: f("fsUpload.uploadSucceeded"), type: "success", placement: "top" }),
|
|
28
|
-
},
|
|
29
|
-
|
|
21
|
+
if (0 !== ((_a = m.fileList) == null ? void 0 : _a.length) && m.limit > 0 && m.fileList.length >= m.limit)
|
|
22
|
+
return a.ElMessage({ type: "warning", message: f("fsUpload.theNumberOfUploadsExceedsTheLimitTheLimitIs") + ": " + m.limit, showClose: true }), false;
|
|
23
|
+
if (N.value || (N.value = 30), e2.size > 1024 * N.value * 1024)
|
|
24
|
+
return a.ElMessage({ type: "warning", message: f("imatrixUIMessage.exceedFileSize", { fileSize: N.value }), showClose: true }), false;
|
|
25
|
+
return m.beforeUpload({ fileObj: e2, files: [e2], isMobile: false, pageContext: m.pageContext, configureObj: m.configure });
|
|
26
|
+
}, k = (e2, t2, o2) => {
|
|
27
|
+
a.ElMessage({ message: f("fsUpload.uploadSucceeded"), type: "success", placement: "top" }), m.fileList.push({ showName: e2.name, serverPath: e2.serverPath }), m.onSuccess(e2, t2, o2), h.value = false, x.value = 0;
|
|
28
|
+
}, B = (e2, t2) => {
|
|
29
|
+
h.value = false, x.value = 0;
|
|
30
30
|
let o2 = f("fsUpload.uploadFailed");
|
|
31
31
|
try {
|
|
32
32
|
const e3 = t2 && t2.xhr && (t2.xhr.response || t2.xhr.responseText);
|
|
@@ -36,20 +36,20 @@ const e = require("vue"), t = require("../../src/utils/common-util.cjs"), o = re
|
|
|
36
36
|
}
|
|
37
37
|
} catch (e3) {
|
|
38
38
|
}
|
|
39
|
-
a.ElMessage({ type: "error", message: o2 }),
|
|
39
|
+
a.ElMessage({ type: "error", message: o2 }), c("on-error", e2);
|
|
40
40
|
};
|
|
41
|
-
function
|
|
41
|
+
function F(e2, t2, o2) {
|
|
42
42
|
try {
|
|
43
|
-
|
|
43
|
+
w.value = t2.name;
|
|
44
44
|
const o3 = e2 && e2.percent ? Math.floor(e2.percent) : 0;
|
|
45
|
-
|
|
45
|
+
h.value = true, x.value = 100 === o3 ? 99 : o3;
|
|
46
46
|
} catch (e3) {
|
|
47
|
-
|
|
47
|
+
h.value = false, x.value = 0;
|
|
48
48
|
}
|
|
49
49
|
}
|
|
50
50
|
return (t2, o2) => {
|
|
51
51
|
const a2 = e.resolveComponent("el-button"), r2 = e.resolveComponent("el-text"), p2 = e.resolveComponent("el-upload"), c2 = e.resolveComponent("el-tag");
|
|
52
|
-
return e.openBlock(), e.createElementBlock(e.Fragment, null, [e.createElementVNode("div", i, [u2.disabled ? e.createCommentVNode("", true) : (e.openBlock(), e.createBlock(p2, { key: 0, ref_key: "buttonUploadRef", ref:
|
|
52
|
+
return e.openBlock(), e.createElementBlock(e.Fragment, null, [e.createElementVNode("div", i, [u2.disabled ? e.createCommentVNode("", true) : (e.openBlock(), e.createBlock(p2, { key: 0, ref_key: "buttonUploadRef", ref: y, class: "upload-demo", accept: u2.accept, "show-file-list": false, "auto-upload": "", headers: u2.headers, disabled: !u2.openFsUpload, action: v.value, multiple: u2.multiple, "before-upload": S, "before-remove": u2.beforeRemove, "on-success": k, "on-error": B, "on-progress": F }, { tip: e.withCtx(() => [e.createVNode(r2, null, { default: e.withCtx(() => [e.createTextVNode(e.toDisplayString(u2.accept) + " " + e.toDisplayString(t2.$t("imatrixUIMessage.uploadFileTip", { fileSize: u2.limitFileSize })), 1)]), _: 1 })]), default: e.withCtx(() => [e.createVNode(a2, { size: "small", type: "primary" }, { default: e.withCtx(() => [e.createTextVNode(e.toDisplayString(u2.placeholder), 1)]), _: 1 })]), _: 1 }, 8, ["accept", "headers", "disabled", "action", "multiple", "before-remove"]))]), h.value ? (e.openBlock(), e.createElementBlock("div", s, [e.createVNode(c2, { style: e.normalizeStyle(C.value), size: "large", class: "fs-upload-tag" }, { default: e.withCtx(() => [o2[0] || (o2[0] = e.createTextVNode(" 上传中: ", -1)), e.createElementVNode("span", n, e.toDisplayString(w.value), 1), e.createElementVNode("span", d, e.toDisplayString(x.value) + "%", 1)]), _: 1 }, 8, ["style"])])) : e.createCommentVNode("", true), u2.fileList && u2.fileList.length > 0 ? (e.openBlock(), e.createBlock(l, { key: 1, disabled: u2.disabled, "disabled-no-preview": u2.disabledNoPreview, "disabled-no-download": u2.disabledNoDownload, "file-list": u2.fileList, "system-code": u2.systemCode, "before-remove": u2.beforeRemove, watermark: u2.watermark, "on-remove": u2.onRemove, "before-download": u2.beforeDownload, downloadable: u2.downloadable }, null, 8, ["disabled", "disabled-no-preview", "disabled-no-download", "file-list", "system-code", "before-remove", "watermark", "on-remove", "before-download", "downloadable"])) : e.createCommentVNode("", true)], 64);
|
|
53
53
|
};
|
|
54
54
|
} });
|
|
55
55
|
module.exports = u;
|
|
@@ -5,28 +5,28 @@ const e = require("vue"), t = require("@element-plus/icons-vue"), o = require(".
|
|
|
5
5
|
} }, beforeDownload: { type: Function, default: () => {
|
|
6
6
|
} }, pageContext: { type: Object, default: () => ({}) }, configure: { type: Object, default: () => ({}) }, beforeUpload: { type: Function, default: () => {
|
|
7
7
|
} }, disabledNoPreview: { type: Boolean, default: false }, disabledNoDownload: { type: Boolean, default: false }, limit: { type: Number, default: 0 }, watermark: { type: Object, default: () => ({}) } }, emits: ["on-error"], setup(p2, { emit: c }) {
|
|
8
|
-
const f =
|
|
9
|
-
const e2 = Math.max(0, Math.min(100, Number(
|
|
8
|
+
const f = c, { t: m } = i.useI18n(), g = p2, v = o.getRelativeBaseUrl(window.$vueApp.config.globalProperties.baseURL), y = o.getRelativeBaseUrl(window.$vueApp.config.globalProperties.baseAPI), b = e.ref(""), h = e.ref(g.limitFileSize), w = e.ref(false), x = e.ref(""), N = e.ref(0), C = e.ref(), S = e.computed(() => {
|
|
9
|
+
const e2 = Math.max(0, Math.min(100, Number(N.value || 0)));
|
|
10
10
|
return { background: `linear-gradient(90deg, #409EFF ${e2}%, rgba(255,255,255,0.92) ${e2}%)`, color: e2 >= 50 ? "#fff" : "#303133", transition: "background 0.3s linear" };
|
|
11
11
|
});
|
|
12
|
-
if (
|
|
13
|
-
|
|
12
|
+
if (g.action)
|
|
13
|
+
b.value = g.action;
|
|
14
14
|
else {
|
|
15
|
-
let e2 =
|
|
16
|
-
o.isPlateSys(window.$vueApp.config.globalProperties.systemCode) && (e2 =
|
|
15
|
+
let e2 = v + "/common/fs-upload";
|
|
16
|
+
o.isPlateSys(window.$vueApp.config.globalProperties.systemCode) && (e2 = y + "/component/super-form/uploads"), b.value = e2;
|
|
17
17
|
}
|
|
18
|
-
|
|
19
|
-
const
|
|
18
|
+
g.headers && g.headers.Authorization || (g.headers.Authorization = l.getToken());
|
|
19
|
+
const k = (e2) => {
|
|
20
20
|
var _a;
|
|
21
|
-
if (0 !== ((_a =
|
|
22
|
-
return r.ElMessage({ type: "warning", message: m("fsUpload.theNumberOfUploadsExceedsTheLimitTheLimitIs") + ": " +
|
|
23
|
-
if (
|
|
24
|
-
return r.ElMessage({ type: "warning", message: m("imatrixUIMessage.exceedFileSize", { fileSize:
|
|
25
|
-
return
|
|
26
|
-
},
|
|
27
|
-
r.ElMessage.success(m("fsUpload.uploadSucceeded")),
|
|
28
|
-
},
|
|
29
|
-
|
|
21
|
+
if (0 !== ((_a = g.fileList) == null ? void 0 : _a.length) && g.limit > 0 && g.fileList.length >= g.limit)
|
|
22
|
+
return r.ElMessage({ type: "warning", message: m("fsUpload.theNumberOfUploadsExceedsTheLimitTheLimitIs") + ": " + g.limit, showClose: true }), false;
|
|
23
|
+
if (h.value || (h.value = 30), e2.size > 1024 * h.value * 1024)
|
|
24
|
+
return r.ElMessage({ type: "warning", message: m("imatrixUIMessage.exceedFileSize", { fileSize: h.value }), showClose: true }), false;
|
|
25
|
+
return g.beforeUpload({ fileObj: e2, files: [e2], isMobile: false, pageContext: g.pageContext, configureObj: g.configure });
|
|
26
|
+
}, B = (e2, t2, o2) => {
|
|
27
|
+
r.ElMessage.success(m("fsUpload.uploadSucceeded")), g.fileList.push({ showName: e2.name, serverPath: e2.serverPath }), g.onSuccess(e2, t2, o2), w.value = false, N.value = 0;
|
|
28
|
+
}, F = (e2, t2) => {
|
|
29
|
+
w.value = false, N.value = 0;
|
|
30
30
|
let o2 = m("fsUpload.uploadFailed");
|
|
31
31
|
try {
|
|
32
32
|
const e3 = t2 && t2.xhr && (t2.xhr.response || t2.xhr.responseText);
|
|
@@ -36,20 +36,20 @@ const e = require("vue"), t = require("@element-plus/icons-vue"), o = require(".
|
|
|
36
36
|
}
|
|
37
37
|
} catch (e3) {
|
|
38
38
|
}
|
|
39
|
-
r.ElMessage({ type: "error", message: o2 }),
|
|
39
|
+
r.ElMessage({ type: "error", message: o2 }), f("on-error", e2);
|
|
40
40
|
};
|
|
41
|
-
function
|
|
41
|
+
function U(e2, t2, o2) {
|
|
42
42
|
try {
|
|
43
|
-
|
|
43
|
+
x.value = t2.name;
|
|
44
44
|
const o3 = e2 && e2.percent ? Math.floor(e2.percent) : 0;
|
|
45
|
-
|
|
45
|
+
w.value = true, N.value = 100 === o3 ? 99 : o3;
|
|
46
46
|
} catch (e3) {
|
|
47
|
-
|
|
47
|
+
w.value = false, N.value = 0;
|
|
48
48
|
}
|
|
49
49
|
}
|
|
50
50
|
return (o2, l2) => {
|
|
51
51
|
const r2 = e.resolveComponent("el-icon"), i2 = e.resolveComponent("el-text"), c2 = e.resolveComponent("el-upload"), f2 = e.resolveComponent("el-tag");
|
|
52
|
-
return e.openBlock(), e.createElementBlock(e.Fragment, null, [p2.disabled ? e.createCommentVNode("", true) : (e.openBlock(), e.createBlock(c2, { key: 0, ref_key: "buttonUploadRef", ref:
|
|
52
|
+
return e.openBlock(), e.createElementBlock(e.Fragment, null, [p2.disabled ? e.createCommentVNode("", true) : (e.openBlock(), e.createBlock(c2, { key: 0, ref_key: "buttonUploadRef", ref: C, class: "upload-demo", style: { width: "100%" }, accept: p2.accept, "show-file-list": false, drag: "", headers: p2.headers, action: b.value, multiple: p2.multiple, "before-upload": k, "on-success": B, "before-remove": p2.beforeRemove, "on-error": F, "on-progress": U }, { tip: e.withCtx(() => [e.createVNode(i2, null, { default: e.withCtx(() => [e.createTextVNode(e.toDisplayString(p2.accept) + " " + e.toDisplayString(o2.$t("imatrixUIMessage.uploadFileTip", { fileSize: p2.limitFileSize })), 1)]), _: 1 })]), default: e.withCtx(() => [e.createVNode(r2, { class: "el-icon--upload" }, { default: e.withCtx(() => [e.createVNode(e.unref(t.UploadFilled))]), _: 1 }), e.createElementVNode("div", s, e.toDisplayString(p2.placeholder), 1)]), _: 1 }, 8, ["accept", "headers", "action", "multiple", "before-remove"])), w.value ? (e.openBlock(), e.createElementBlock("div", n, [e.createVNode(f2, { style: e.normalizeStyle(S.value), size: "large", class: "fs-upload-tag" }, { default: e.withCtx(() => [l2[0] || (l2[0] = e.createTextVNode(" 上传中: ", -1)), e.createElementVNode("span", d, e.toDisplayString(x.value), 1), e.createElementVNode("span", u, e.toDisplayString(N.value) + "%", 1)]), _: 1 }, 8, ["style"])])) : e.createCommentVNode("", true), p2.fileList && p2.fileList.length > 0 ? (e.openBlock(), e.createBlock(a, { key: 2, disabled: p2.disabled, "disabled-no-preview": p2.disabledNoPreview, "disabled-no-download": p2.disabledNoDownload, "file-list": p2.fileList, "system-code": p2.systemCode, watermark: p2.watermark, "before-remove": p2.beforeRemove, "on-remove": p2.onRemove, "before-download": p2.beforeDownload }, null, 8, ["disabled", "disabled-no-preview", "disabled-no-download", "file-list", "system-code", "watermark", "before-remove", "on-remove", "before-download"])) : e.createCommentVNode("", true)], 64);
|
|
53
53
|
};
|
|
54
54
|
} });
|
|
55
55
|
module.exports = p;
|
|
@@ -4,53 +4,53 @@ const e = require("vue"), o = require("@element-plus/icons-vue"), t = require(".
|
|
|
4
4
|
} }, beforeDownload: { type: Function, default: () => {
|
|
5
5
|
} }, file: { type: Object, default: null }, baseURL: { type: String, default: null }, disabledNoPreview: { type: Boolean, default: false }, disabledNoDownload: { type: Boolean, default: false }, watermark: { type: Object, default: () => ({}) } }, emits: ["remove"], setup(f2, { emit: v }) {
|
|
6
6
|
var _a, _b, _c, _d, _e;
|
|
7
|
-
const
|
|
8
|
-
let g =
|
|
9
|
-
g = t.getRelativeBaseUrl(g), N = t.getRelativeBaseUrl(N),
|
|
10
|
-
const b = e.ref(false), y = e.ref({}), C = e.ref([]), B = e.ref(t.isMobileBrowser());
|
|
11
|
-
let
|
|
7
|
+
const { t: k } = n.useI18n(), h = f2;
|
|
8
|
+
let g = h.baseURL ? h.baseURL : window.$vueApp.config.globalProperties.baseURL, N = window.$vueApp.config.globalProperties.baseAPI;
|
|
9
|
+
g = t.getRelativeBaseUrl(g), N = t.getRelativeBaseUrl(N), h.watermark.content || (h.watermark.isShowWatermark = void 0 === ((_b = (_a = h.configure.props) == null ? void 0 : _a.watermark) == null ? void 0 : _b.isShowWatermark) ? "true" : ((_c = h.configure.props) == null ? void 0 : _c.watermark.isShowWatermark) + "", h.watermark.content = (_e = (_d = h.configure.props) == null ? void 0 : _d.watermark) == null ? void 0 : _e.content);
|
|
10
|
+
const b = e.ref(false), y = e.ref({}), C = e.ref([]), B = e.ref(t.isMobileBrowser()), P = v;
|
|
11
|
+
let V = null;
|
|
12
12
|
i.getWatermarkSetting().then((e2) => {
|
|
13
|
-
|
|
13
|
+
V = e2;
|
|
14
14
|
});
|
|
15
|
-
const
|
|
16
|
-
|
|
17
|
-
false === o2 ||
|
|
18
|
-
}) : false ===
|
|
19
|
-
},
|
|
15
|
+
const R = (e2) => {
|
|
16
|
+
S(h.beforeDownload) ? h.beforeDownload(h.pageContext, h.configure, e2).then((o2) => {
|
|
17
|
+
false === o2 || U(e2);
|
|
18
|
+
}) : false === h.beforeDownload(h.pageContext, h.configure, e2) || U(e2);
|
|
19
|
+
}, U = (e2) => {
|
|
20
20
|
var _a2, _b2;
|
|
21
21
|
const o2 = l.getToken(), a2 = (e2.showName ? e2.showName : e2.name).replace("#", "~~").replace("?", "~$").replace("&", "$");
|
|
22
22
|
let r2 = false;
|
|
23
|
-
|
|
24
|
-
let n2 = (_b2 =
|
|
23
|
+
V && V.useRange && V.useRange.indexOf("annex") >= 0 && (r2 = (_a2 = h.watermark) == null ? void 0 : _a2.isShowWatermark);
|
|
24
|
+
let n2 = (_b2 = h.watermark) == null ? void 0 : _b2.content;
|
|
25
25
|
n2 || (n2 = "");
|
|
26
26
|
let i2 = g + "/common/super-form/downloads?showName=" + encodeURI(a2) + "&serverPath=" + e2.serverPath + "&jwt=" + o2 + "&isShowWatermark=" + r2 + "&watermark=" + encodeURI(n2);
|
|
27
|
-
t.isPlateSys(
|
|
28
|
-
},
|
|
27
|
+
t.isPlateSys(h.systemCode) && (i2 = N + "/component/super-form/downloads?showName=" + encodeURI(a2) + "&serverPath=" + e2.serverPath + "&jwt=" + o2), window.location.href = i2;
|
|
28
|
+
}, x = (e2) => {
|
|
29
29
|
let o2 = true;
|
|
30
|
-
if (
|
|
30
|
+
if (h.beforeRemove && "function" == typeof h.beforeRemove) {
|
|
31
31
|
const t3 = true;
|
|
32
|
-
o2 =
|
|
32
|
+
o2 = h.beforeRemove(h.pageContext, h.configure, e2, t3);
|
|
33
33
|
}
|
|
34
34
|
if (void 0 !== o2 && !o2)
|
|
35
35
|
return;
|
|
36
|
-
const t2 =
|
|
37
|
-
|
|
38
|
-
},
|
|
39
|
-
if (
|
|
36
|
+
const t2 = h.fileList.findIndex((o3) => o3.serverPath === e2.uuid || o3.serverPath === e2.serverPath);
|
|
37
|
+
h.fileList, h.fileList.splice(t2, 1), P("remove", { file: e2, index: t2 }), h.onRemove(e2);
|
|
38
|
+
}, S = (e2) => e2 && "[object Promise]" === Object.prototype.toString.call(e2), _ = (e2, o2) => {
|
|
39
|
+
if (h.fileList, h.disabled && h.disabledNoPreview)
|
|
40
40
|
return;
|
|
41
41
|
let t2 = false;
|
|
42
42
|
if (e2 && a.isImage(e2) && (t2 = true), t2) {
|
|
43
|
-
y.value.src =
|
|
43
|
+
y.value.src = I(e2, o2);
|
|
44
44
|
const t3 = [];
|
|
45
|
-
|
|
45
|
+
h.fileList.forEach((e3) => {
|
|
46
46
|
const o3 = e3.showName ? e3.showName : e3.name;
|
|
47
|
-
t3.push(
|
|
47
|
+
t3.push(I(o3, e3.serverPath));
|
|
48
48
|
}), C.value = t3, b.value = true;
|
|
49
49
|
} else
|
|
50
|
-
|
|
51
|
-
},
|
|
50
|
+
j(e2, o2);
|
|
51
|
+
}, j = (e2, o2) => {
|
|
52
52
|
const a2 = l.getToken();
|
|
53
|
-
if (e2 = e2 =
|
|
53
|
+
if (e2 = e2 = E(e2), window.$vueApp.config.globalProperties.customPreviewUrl)
|
|
54
54
|
window.open(t.getSystemFrontendUrlWith(window.$vueApp.config.globalProperties.portalUrl) + "/#/file-service/preview?serverPath=" + o2 + "&showName=" + encodeURI(e2), e2);
|
|
55
55
|
else {
|
|
56
56
|
let l2, r2 = g;
|
|
@@ -63,22 +63,22 @@ const e = require("vue"), o = require("@element-plus/icons-vue"), t = require(".
|
|
|
63
63
|
l2 = r2 + "/common/fs-upload/preview?jwt=" + a2, l2 = l2 + "&showName=" + encodeURI(e2) + "&serverPath=" + o2, l2 = t.getRelativeBaseUrl(l2), window.open(l2, e2);
|
|
64
64
|
}
|
|
65
65
|
};
|
|
66
|
-
function
|
|
66
|
+
function I(e2, o2) {
|
|
67
67
|
var _a2, _b2;
|
|
68
|
-
e2 =
|
|
68
|
+
e2 = E(e2);
|
|
69
69
|
const a2 = l.getToken();
|
|
70
70
|
let r2 = false;
|
|
71
|
-
|
|
72
|
-
let n2 = (_b2 =
|
|
71
|
+
V && V.useRange && V.useRange.indexOf("annex") >= 0 && (r2 = (_a2 = h.watermark) == null ? void 0 : _a2.isShowWatermark);
|
|
72
|
+
let n2 = (_b2 = h.watermark) == null ? void 0 : _b2.content;
|
|
73
73
|
n2 || (n2 = "");
|
|
74
74
|
let i2 = g + "/common/super-form/downloads?jwt=" + a2 + "&isShowWatermark=" + r2 + "&watermark=" + encodeURI(n2);
|
|
75
|
-
return t.isPlateSys(
|
|
75
|
+
return t.isPlateSys(h.systemCode) && (i2 = N + "/component/super-form/downloads?jwt=" + a2 + "&isShowWatermark=" + r2 + "&watermark=" + encodeURI(n2)), i2 = t.getReplaceUrlDomain(i2), i2 + "&showName=" + encodeURI(e2) + "&serverPath=" + o2;
|
|
76
76
|
}
|
|
77
|
-
const
|
|
77
|
+
const E = (e2) => (e2 && (e2 = e2.replace("#", "~~").replace("?", "~$").replace("&", "$")), e2);
|
|
78
78
|
return (t2, l2) => {
|
|
79
|
-
const n2 = e.resolveComponent("super-icon"), i2 = e.resolveComponent("el-tooltip"), v2 = e.resolveComponent("el-tag"),
|
|
80
|
-
return e.openBlock(), e.createElementBlock("div", null, [B.value ? (e.openBlock(), e.createElementBlock("span", w, [(
|
|
81
|
-
var
|
|
79
|
+
const n2 = e.resolveComponent("super-icon"), i2 = e.resolveComponent("el-tooltip"), v2 = e.resolveComponent("el-tag"), h2 = e.resolveComponent("zoom-in"), g2 = e.resolveComponent("el-icon"), N2 = e.resolveComponent("Delete"), P2 = e.resolveComponent("el-image"), V2 = e.resolveComponent("el-dialog");
|
|
80
|
+
return e.openBlock(), e.createElementBlock("div", null, [B.value ? (e.openBlock(), e.createElementBlock("span", w, [(U2 = f2.file.showName ? f2.file.showName : f2.file.name, !B.value || U2 && a.isImage(U2) ? (e.openBlock(), e.createElementBlock("span", { key: 0, class: "el-upload-list__item-preview", onClick: l2[0] || (l2[0] = (e2) => _(f2.file.showName ? f2.file.showName : f2.file.name, f2.file.serverPath)) }, [e.createVNode(g2, null, { default: e.withCtx(() => [e.createVNode(h2)]), _: 1 })])) : e.createCommentVNode("", true)), f2.disabled ? e.createCommentVNode("", true) : (e.openBlock(), e.createElementBlock("span", { key: 1, class: "el-upload-list__item-delete", onClick: l2[1] || (l2[1] = (e2) => R(f2.file)) }, [e.createVNode(g2, null, { default: e.withCtx(() => [e.createVNode(e.unref(o.Download))]), _: 1 })])), f2.disabled ? e.createCommentVNode("", true) : (e.openBlock(), e.createElementBlock("span", { key: 2, class: "el-upload-list__item-delete", onClick: l2[2] || (l2[2] = (e2) => x(f2.file)) }, [e.createVNode(g2, null, { default: e.withCtx(() => [e.createVNode(N2)]), _: 1 })]))])) : (e.openBlock(), e.createElementBlock("div", s, [(e.openBlock(true), e.createElementBlock(e.Fragment, null, e.renderList(f2.fileList, (o2, t3) => (e.openBlock(), e.createElementBlock("div", { key: t3, style: { width: "100%" } }, [e.createVNode(v2, { color: "white", size: "large", class: "amb-fs-preview-tag" }, { default: e.withCtx(() => [e.createElementVNode("div", c, [e.createVNode(n2, { iconValue: e.unref(r.getFileIconByName)(o2.showName) }, null, 8, ["iconValue"]), f2.disabled && f2.disabledNoPreview ? (e.openBlock(), e.createElementBlock("span", d, [e.createElementVNode("span", m, e.toDisplayString(o2.showName), 1)])) : e.createCommentVNode("", true), f2.disabled && f2.disabledNoPreview ? e.createCommentVNode("", true) : (e.openBlock(), e.createBlock(i2, { key: 1, content: e.unref(k)("fsUpload.preview"), placement: "top" }, { default: e.withCtx(() => [e.createElementVNode("span", { style: { cursor: "pointer" }, onClick: (e2) => _(o2.showName, o2.serverPath) }, [e.createElementVNode("span", u, e.toDisplayString(o2.showName), 1)], 8, p)]), _: 2 }, 1032, ["content"])), f2.disabled && f2.disabledNoDownload ? e.createCommentVNode("", true) : (e.openBlock(), e.createBlock(i2, { key: 2, content: e.unref(k)("fsUpload.download"), placement: "top" }, { default: e.withCtx(() => [e.createVNode(n2, { class: "fs-preview-icon", onClick: (e2) => R(o2), iconValue: "amb-color-icon-xiazai" }, null, 8, ["onClick"])]), _: 2 }, 1032, ["content"])), f2.disabled ? e.createCommentVNode("", true) : (e.openBlock(), e.createBlock(i2, { key: 3, content: e.unref(k)("fsUpload.delete"), placement: "top" }, { default: e.withCtx(() => [e.createVNode(n2, { class: "fs-preview-icon", onClick: (e2) => x(o2), iconValue: "amb-color-icon-shanchu" }, null, 8, ["onClick"])]), _: 2 }, 1032, ["content"]))])]), _: 2 }, 1024)]))), 128))])), e.createVNode(V2, { modelValue: b.value, "onUpdate:modelValue": l2[3] || (l2[3] = (e2) => b.value = e2), title: e.unref(k)("fsUpload.preview"), width: "500" }, { default: e.withCtx(() => [e.createVNode(P2, { "preview-src-list": C.value, src: y.value.src }, null, 8, ["preview-src-list", "src"])]), _: 1 }, 8, ["modelValue", "title"])]);
|
|
81
|
+
var U2;
|
|
82
82
|
};
|
|
83
83
|
} });
|
|
84
84
|
module.exports = f;
|