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
|
@@ -64,7 +64,7 @@ const C = { data: () => ({ unifiedEnclosures: [], bigPictureVisible: false, base
|
|
|
64
64
|
} }, emits: ["onSuccess", "deleteSuccess"] }, N = ["accept"], S = { key: 1 }, _ = { key: 0 }, E = { key: 1 }, I = { key: 2 };
|
|
65
65
|
const L = P(C, [["render", function(e2, t2, i2, l2, b2, y2) {
|
|
66
66
|
const v2 = o("el-button"), U2 = o("el-link"), $2 = o("el-table-column"), k2 = o("el-image"), P2 = o("el-table"), C2 = o("el-icon-delete"), L2 = o("el-icon"), x = o("el-tooltip"), R = o("el-icon-view"), j = o("see-big-picture"), A = s("loading");
|
|
67
|
-
return a((d(), n("div", null, [i2.isShowButton && !i2.disabled ? (d(), u(v2, { key: 0, icon: b2.ElIconUpload2, size: "default", type: "primary", onClick: y2.selectDataFile }, { default: r(() => [c(p(e2.$t("fsUpload.upload")), 1)]), _: 1 }, 8, ["icon", "onClick"])) : f("", true), h("input", { ref: "uploadTemplate", accept: b2.accepts, name: "uploadTemplate", style: { display: "none" }, type: "file", onChange: t2[0] || (t2[0] = (...e3) => y2.upload && y2.upload(...e3)) }, null, 40, N), b2.unifiedEnclosures && b2.unifiedEnclosures.length > 0 && i2.isShowData ? (d(), n("div", S, [i2.isImg ? (d(), n("div", _, [m(P2, { data: b2.unifiedEnclosures, height: i2.tableHeight, style: { width: "100%" } }, { default: r(() => [m($2, { label: e2.$t("fsUpload.name"), width: "240" }, { default: r((e3) => [m(U2, { href: b2.baseURL + "/common/fs-upload/download?serverPath=" + e3.row.uuid + "&showName=" + e3.row.fileName, type: "primary" }, { default: r(() => [c(p(e3.row.fileName), 1)]), _: 2 }, 1032, ["href"])]), _: 1 }, 8, ["label"]), m($2, { label: e2.$t("fsUpload.picture"), width: "240" }, { default: r((e3) => [m(k2, { "preview-src-list": [b2.baseURL + "/common/fs-upload/download?serverPath=" + e3.row.uuid + "&showName=" + e3.row.fileName], src: b2.baseURL + "/common/fs-upload/download?serverPath=" + e3.row.uuid + "&showName=" + e3.row.fileName, onClick: (t3) => y2.bigPicture(e3.$index) }, null, 8, ["preview-src-list", "src", "onClick"])]), _: 1 }, 8, ["label"]), i2.disabled ? f("", true) : (d(), u($2, { key: 0, label: e2.$t("fsUpload.operating"), width: "120" }, { default: r((t3) => [m(v2, { size: "default", type: "danger", onClick: (e3) => y2.deleteFile(t3.$index) }, { default: r(() => [c(p(e2.$t("fsUpload.delete")), 1)]), _:
|
|
67
|
+
return a((d(), n("div", null, [i2.isShowButton && !i2.disabled ? (d(), u(v2, { key: 0, icon: b2.ElIconUpload2, size: "default", type: "primary", onClick: y2.selectDataFile }, { default: r(() => [c(p(e2.$t("fsUpload.upload")), 1)]), _: 1 }, 8, ["icon", "onClick"])) : f("", true), h("input", { ref: "uploadTemplate", accept: b2.accepts, name: "uploadTemplate", style: { display: "none" }, type: "file", onChange: t2[0] || (t2[0] = (...e3) => y2.upload && y2.upload(...e3)) }, null, 40, N), b2.unifiedEnclosures && b2.unifiedEnclosures.length > 0 && i2.isShowData ? (d(), n("div", S, [i2.isImg ? (d(), n("div", _, [m(P2, { data: b2.unifiedEnclosures, height: i2.tableHeight, style: { width: "100%" } }, { default: r(() => [m($2, { label: e2.$t("fsUpload.name"), width: "240" }, { default: r((e3) => [m(U2, { href: b2.baseURL + "/common/fs-upload/download?serverPath=" + e3.row.uuid + "&showName=" + e3.row.fileName, type: "primary" }, { default: r(() => [c(p(e3.row.fileName), 1)]), _: 2 }, 1032, ["href"])]), _: 1 }, 8, ["label"]), m($2, { label: e2.$t("fsUpload.picture"), width: "240" }, { default: r((e3) => [m(k2, { "preview-src-list": [b2.baseURL + "/common/fs-upload/download?serverPath=" + e3.row.uuid + "&showName=" + e3.row.fileName], src: b2.baseURL + "/common/fs-upload/download?serverPath=" + e3.row.uuid + "&showName=" + e3.row.fileName, onClick: (t3) => y2.bigPicture(e3.$index) }, null, 8, ["preview-src-list", "src", "onClick"])]), _: 1 }, 8, ["label"]), i2.disabled ? f("", true) : (d(), u($2, { key: 0, label: e2.$t("fsUpload.operating"), width: "120" }, { default: r((t3) => [m(v2, { size: "default", type: "danger", onClick: (e3) => y2.deleteFile(t3.$index) }, { default: r(() => [c(p(e2.$t("fsUpload.delete")), 1)]), _: 1 }, 8, ["onClick"])]), _: 1 }, 8, ["label"]))]), _: 1 }, 8, ["data", "height"])])) : i2.isShowList ? (d(), n("div", E, [m(P2, { data: b2.unifiedEnclosures, height: i2.tableHeight, style: { width: "100%" } }, { default: r(() => [m($2, { label: e2.$t("fsUpload.name"), width: "240" }, { default: r((e3) => [m(U2, { href: b2.baseURL + "/common/fs-upload/download?serverPath=" + e3.row.uuid + "&showName=" + e3.row.fileName, type: "primary" }, { default: r(() => [c(p(e3.row.fileName), 1)]), _: 2 }, 1032, ["href"])]), _: 1 }, 8, ["label"]), m($2, { label: e2.$t("fsUpload.operating"), width: "200" }, { default: r((t3) => [i2.disabled ? f("", true) : (d(), u(v2, { key: 0, size: "default", type: "danger", onClick: (e3) => y2.deleteFile(t3.$index) }, { default: r(() => [c(p(e2.$t("fsUpload.delete")), 1)]), _: 1 }, 8, ["onClick"])), m(v2, { size: "default", onClick: (e3) => y2.preview(t3.row) }, { default: r(() => [c(p(e2.$t("fsUpload.preview")), 1)]), _: 1 }, 8, ["onClick"])]), _: 1 }, 8, ["label"])]), _: 1 }, 8, ["data", "height"])])) : (d(), n("div", I, [(d(true), n(w, null, g(b2.unifiedEnclosures, (t3, l3) => (d(), n("div", { key: l3 }, [m(U2, { href: b2.baseURL + "/common/fs-upload/download?serverPath=" + t3.uuid + "&showName=" + t3.fileName, type: "primary" }, { default: r(() => [c(p(t3.fileName), 1)]), _: 2 }, 1032, ["href"]), m(x, { content: e2.$t("fsUpload.delete"), effect: "light" }, { default: r(() => [i2.disabled ? f("", true) : (d(), u(L2, { key: 0, style: { color: "red", "margin-left": "10px" }, onClick: (e3) => y2.deleteFile(l3) }, { default: r(() => [m(C2)]), _: 1 }, 8, ["onClick"]))]), _: 2 }, 1032, ["content"]), m(x, { content: e2.$t("fsUpload.preview"), effect: "light", style: { "margin-left": "10px" } }, { default: r(() => [m(L2, { onClick: (e3) => y2.preview(t3) }, { default: r(() => [m(R)]), _: 1 }, 8, ["onClick"])]), _: 2 }, 1032, ["content"])]))), 128))]))])) : f("", true), b2.bigPictureVisible ? (d(), u(j, { key: 2, "show-index": b2.showIndex, "unified-enclosures": b2.unifiedEnclosures, onClose: t2[1] || (t2[1] = (e3) => b2.bigPictureVisible = false) }, null, 8, ["show-index", "unified-enclosures"])) : f("", true)])), [[A, b2.loading]]);
|
|
68
68
|
}]]);
|
|
69
69
|
export {
|
|
70
70
|
L as default
|
|
@@ -91,7 +91,7 @@ const F = { name: "FsUploadList", props: { value: { type: String, default: null
|
|
|
91
91
|
} }, emits: ["close", "upload-success", "delete-success", "delete", "update:value", "close", "update:value", "on-error"] }, O = { style: { width: "100%" } }, P = { style: { display: "flex" } }, U = { key: 0, style: { display: "flex", "align-items": "center" } }, x = { class: "fs-upload-tag-text" }, C = { class: "fs-upload-tag-percent" };
|
|
92
92
|
const L = I(F, [["render", function(e2, t2, l2, o2, i2, s2) {
|
|
93
93
|
const a2 = n("UploadFilled"), r2 = n("el-icon"), v2 = n("el-button"), S2 = n("el-upload"), j2 = n("el-tag"), I2 = n("fs-preview"), F2 = n("FileUploadInputMobile");
|
|
94
|
-
return p(), f("span", O, [l2.disabled ? (p(), u(I2, { key: 1, entity: l2.row, disabled: l2.disabled, fileInfo: l2.fileInfo, "file-set-obj": l2.fileSetObj, "is-sql": l2.isSql, label: l2.value, watermark: i2.watermark }, null, 8, ["entity", "disabled", "fileInfo", "file-set-obj", "is-sql", "label", "watermark"])) : (p(), f(d, { key: 0 }, [i2.isMobile ? (p(), u(F2, { key: 1, ref: "fileUploadRef", disabled: l2.disabled, fileInfo: l2.fileInfo, systemCode: i2.systemCode, accept: l2.fileSetObj.accept ? l2.fileSetObj.accept : null, multiple: l2.fileSetObj.multiple, limitFileSize: l2.fileSetObj.limitFileSize, placeholder: e2.$t("imatrixUIMessage.fileUpload"), "file-list": l2.fileList, beforeUpload: l2.fileSetObj.beforeUpload, onSuccess: s2.uploadOnSuccessMobile, beforeRemove: l2.fileSetObj.beforeRemove, onRemove: s2.onRemoveMobile, beforeDownload: l2.fileSetObj.beforeDownload, pageContext: l2.pageContext, openFsUpload: l2.openFsUpload, componentId: l2.componentId, listCode: l2.listCode, openCameraOrChoosePhoto: l2.fileSetObj.openCameraOrChoosePhoto, watermark: i2.watermark }, null, 8, ["disabled", "fileInfo", "systemCode", "accept", "multiple", "limitFileSize", "placeholder", "file-list", "beforeUpload", "onSuccess", "beforeRemove", "onRemove", "beforeDownload", "pageContext", "openFsUpload", "componentId", "listCode", "openCameraOrChoosePhoto", "watermark"])) : (p(), u(I2, { key: 0, "enable-delete": true, entity: l2.row, disabled: l2.disabled, fileInfo: l2.fileInfo, "file-set-obj": l2.fileSetObj, "is-sql": l2.isSql, label: l2.value, uploading: i2.uploading, watermark: i2.watermark, onDeleteFile: s2.deleteRow }, { prefix: h(() => [c("div", P, [m(S2, { ref: "uploadRef", accept: l2.fileSetObj.accept ? l2.fileSetObj.accept : null, action: i2.defaultAction, multiple: l2.fileSetObj.multiple, "before-upload": s2.handleBeforeUpload, "on-progress": s2.uploadOnProgress, "show-file-list": false, headers: i2.headers, "on-success": s2.uploadOnSuccess, "on-error": s2.onError, "with-credentials": true, name: "file" }, { default: h(() => [m(v2, { size: "small", style: { "margin-right": "5px" }, bg: "" }, { default: h(() => [m(r2, null, { default: h(() => [m(a2)]), _: 1 })]), _: 1 })]), _: 1 }, 8, ["accept", "action", "multiple", "before-upload", "on-progress", "headers", "on-success", "on-error"]), i2.uploading ? (p(), f("div", U, [m(j2, { style: g(s2.tagStyle), size: "large", class: "fs-upload-tag" }, { default: h(() => [b(" 上传中: "), c("span", x, w(i2.uoloadingFileName), 1), c("span", C, w(i2.uploadPercentage) + "%", 1)]), _: 1 }, 8, ["style"])])) : y("", true)])]), _: 1 }, 8, ["entity", "disabled", "fileInfo", "file-set-obj", "is-sql", "label", "uploading", "watermark", "onDeleteFile"]))], 64))]);
|
|
94
|
+
return p(), f("span", O, [l2.disabled ? (p(), u(I2, { key: 1, entity: l2.row, disabled: l2.disabled, fileInfo: l2.fileInfo, "file-set-obj": l2.fileSetObj, "is-sql": l2.isSql, label: l2.value, watermark: i2.watermark }, null, 8, ["entity", "disabled", "fileInfo", "file-set-obj", "is-sql", "label", "watermark"])) : (p(), f(d, { key: 0 }, [i2.isMobile ? (p(), u(F2, { key: 1, ref: "fileUploadRef", disabled: l2.disabled, fileInfo: l2.fileInfo, systemCode: i2.systemCode, accept: l2.fileSetObj.accept ? l2.fileSetObj.accept : null, multiple: l2.fileSetObj.multiple, limitFileSize: l2.fileSetObj.limitFileSize, placeholder: e2.$t("imatrixUIMessage.fileUpload"), "file-list": l2.fileList, beforeUpload: l2.fileSetObj.beforeUpload, onSuccess: s2.uploadOnSuccessMobile, beforeRemove: l2.fileSetObj.beforeRemove, onRemove: s2.onRemoveMobile, beforeDownload: l2.fileSetObj.beforeDownload, pageContext: l2.pageContext, openFsUpload: l2.openFsUpload, componentId: l2.componentId, listCode: l2.listCode, openCameraOrChoosePhoto: l2.fileSetObj.openCameraOrChoosePhoto, watermark: i2.watermark }, null, 8, ["disabled", "fileInfo", "systemCode", "accept", "multiple", "limitFileSize", "placeholder", "file-list", "beforeUpload", "onSuccess", "beforeRemove", "onRemove", "beforeDownload", "pageContext", "openFsUpload", "componentId", "listCode", "openCameraOrChoosePhoto", "watermark"])) : (p(), u(I2, { key: 0, "enable-delete": true, entity: l2.row, disabled: l2.disabled, fileInfo: l2.fileInfo, "file-set-obj": l2.fileSetObj, "is-sql": l2.isSql, label: l2.value, uploading: i2.uploading, watermark: i2.watermark, onDeleteFile: s2.deleteRow }, { prefix: h(() => [c("div", P, [m(S2, { ref: "uploadRef", accept: l2.fileSetObj.accept ? l2.fileSetObj.accept : null, action: i2.defaultAction, multiple: l2.fileSetObj.multiple, "before-upload": s2.handleBeforeUpload, "on-progress": s2.uploadOnProgress, "show-file-list": false, headers: i2.headers, "on-success": s2.uploadOnSuccess, "on-error": s2.onError, "with-credentials": true, name: "file" }, { default: h(() => [m(v2, { size: "small", style: { "margin-right": "5px" }, bg: "" }, { default: h(() => [m(r2, null, { default: h(() => [m(a2)]), _: 1 })]), _: 1 })]), _: 1 }, 8, ["accept", "action", "multiple", "before-upload", "on-progress", "headers", "on-success", "on-error"]), i2.uploading ? (p(), f("div", U, [m(j2, { style: g(s2.tagStyle), size: "large", class: "fs-upload-tag" }, { default: h(() => [t2[0] || (t2[0] = b(" 上传中: ", -1)), c("span", x, w(i2.uoloadingFileName), 1), c("span", C, w(i2.uploadPercentage) + "%", 1)]), _: 1 }, 8, ["style"])])) : y("", true)])]), _: 1 }, 8, ["entity", "disabled", "fileInfo", "file-set-obj", "is-sql", "label", "uploading", "watermark", "onDeleteFile"]))], 64))]);
|
|
95
95
|
}], ["__scopeId", "data-v-5254701d"]]);
|
|
96
96
|
export {
|
|
97
97
|
L as default
|
|
@@ -16,12 +16,12 @@ const p = e({ __name: "file-upload-app", props: { openFsUpload: { type: Object,
|
|
|
16
16
|
u.pageContext && u.pageContext.backendUrl && (f = u.pageContext.backendUrl), f || (f = window.$vueApp.config.globalProperties.baseURL);
|
|
17
17
|
const d = t(f);
|
|
18
18
|
window.$vueApp.config.globalProperties.baseAPI;
|
|
19
|
-
const m = t(null), c = t(["album", "camera"]);
|
|
20
|
-
function
|
|
21
|
-
let e3 = { type: "pickFiles", sourceType:
|
|
19
|
+
const m = t(null), c = r, y = t(["album", "camera"]);
|
|
20
|
+
function b() {
|
|
21
|
+
let e3 = { type: "pickFiles", sourceType: y.value, multiple: u.multiple, componentId: u.componentId, componentName: u.componentName, systemCode: u.systemCode, token: a(), listCode: u.listCode };
|
|
22
22
|
window.parent && window.parent.parent ? (e3.myCustom = "window.parent.parent", window.parent.parent.postMessage(JSON.stringify(e3), "*")) : (e3.myCustom = "window.parent", window.parent.postMessage(JSON.stringify(e3), "*"));
|
|
23
23
|
}
|
|
24
|
-
function
|
|
24
|
+
function v(e3) {
|
|
25
25
|
const t2 = e3.files;
|
|
26
26
|
let o2 = t2;
|
|
27
27
|
t2 && "string" == typeof t2 && (o2 = JSON.parse(t2)), o2 && !Array.isArray(o2) && (o2 = [o2]), function(e4) {
|
|
@@ -41,20 +41,20 @@ const p = e({ __name: "file-upload-app", props: { openFsUpload: { type: Object,
|
|
|
41
41
|
});
|
|
42
42
|
else {
|
|
43
43
|
const t4 = JSON.parse(JSON.stringify(s.value));
|
|
44
|
-
s.value = e4,
|
|
44
|
+
s.value = e4, c("remove", { rmFiles: t4, serverFiles: s.value });
|
|
45
45
|
}
|
|
46
|
-
JSON.stringify(s.value), m.value.changeFileList(s.value),
|
|
46
|
+
JSON.stringify(s.value), m.value.changeFileList(s.value), c("uploadend", s.value);
|
|
47
47
|
}(o2);
|
|
48
48
|
}
|
|
49
|
-
function
|
|
49
|
+
function g(e3) {
|
|
50
50
|
const t2 = e3.file;
|
|
51
|
-
t2 &&
|
|
51
|
+
t2 && c("remove", { rmFiles: [t2], serverFiles: s.value, index: e3.index });
|
|
52
52
|
}
|
|
53
|
-
return u.openCameraOrChoosePhoto && ("openCamera" === u.openCameraOrChoosePhoto ?
|
|
54
|
-
|
|
53
|
+
return u.openCameraOrChoosePhoto && ("openCamera" === u.openCameraOrChoosePhoto ? y.value = ["camera"] : "openChoosePhoto" === u.openCameraOrChoosePhoto && (y.value = ["album"])), p2({ pickFileDone: function(e3) {
|
|
54
|
+
v(e3);
|
|
55
55
|
}, uploadFileDone: function(e3) {
|
|
56
|
-
|
|
57
|
-
} }), (t2, a2) => (o(), l("div", null, [n(i, { ref_key: "fileUploadRef", ref: m, disabled: e2.disabled, systemCode: e2.systemCode, accept: e2.accept, multiple: e2.multiple, limitFileSize: e2.limitFileSize, fileList: s.value, beforeRemove: e2.beforeRemove, onRemove: [e2.onRemove,
|
|
56
|
+
v(e3);
|
|
57
|
+
} }), (t2, a2) => (o(), l("div", null, [n(i, { ref_key: "fileUploadRef", ref: m, disabled: e2.disabled, systemCode: e2.systemCode, accept: e2.accept, multiple: e2.multiple, limitFileSize: e2.limitFileSize, fileList: s.value, beforeRemove: e2.beforeRemove, onRemove: [e2.onRemove, g], beforeDownload: e2.beforeDownload, baseURL: d.value, watermark: e2.watermark, onChooseFile: b }, null, 8, ["disabled", "systemCode", "accept", "multiple", "limitFileSize", "fileList", "beforeRemove", "onRemove", "beforeDownload", "baseURL", "watermark"])]));
|
|
58
58
|
} });
|
|
59
59
|
export {
|
|
60
60
|
p as default
|
|
@@ -34,12 +34,12 @@ const g = ["multiple", "accept"], b = ["multiple", "accept"], C = e({ __name: "f
|
|
|
34
34
|
t([]);
|
|
35
35
|
let L = t(false);
|
|
36
36
|
t(false);
|
|
37
|
-
const R = t(), j = t(false), { t:
|
|
38
|
-
function
|
|
37
|
+
const R = t(), j = t(false), T = C2, { t: A } = h(), N = t(null);
|
|
38
|
+
function I(e3) {
|
|
39
39
|
const t2 = e3.file;
|
|
40
|
-
t2 &&
|
|
40
|
+
t2 && T("remove", { rmFiles: [t2], serverFiles: O.value, index: e3.index });
|
|
41
41
|
}
|
|
42
|
-
function
|
|
42
|
+
function $() {
|
|
43
43
|
z.value = "image/*", U.value ? function() {
|
|
44
44
|
let e3 = ["album"];
|
|
45
45
|
"openCameraAndChoosePhoto" === w.openCameraOrChoosePhoto ? e3 = ["album", "camera"] : "openChoosePhoto" === w.openCameraOrChoosePhoto ? e3 = ["album"] : "openCamera" === w.openCameraOrChoosePhoto && (e3 = ["camera"]);
|
|
@@ -47,7 +47,7 @@ const g = ["multiple", "accept"], b = ["multiple", "accept"], C = e({ __name: "f
|
|
|
47
47
|
if (w.multiple && (t2 = 20, w.limit))
|
|
48
48
|
if (O.value && O.value.length > 0) {
|
|
49
49
|
if (w.limit === O.value.length)
|
|
50
|
-
return void v({ showClose: true, type: "warning", message:
|
|
50
|
+
return void v({ showClose: true, type: "warning", message: A("fsUpload.theNumberOfUploadsExceedsTheLimitTheLimitIs") + ": " + w.limit });
|
|
51
51
|
t2 = w.limit - O.value.length;
|
|
52
52
|
} else
|
|
53
53
|
t2 = w.limit;
|
|
@@ -62,7 +62,7 @@ const g = ["multiple", "accept"], b = ["multiple", "accept"], C = e({ __name: "f
|
|
|
62
62
|
}(e4.files).then(async (e5) => {
|
|
63
63
|
let t3 = [];
|
|
64
64
|
try {
|
|
65
|
-
t3 = await
|
|
65
|
+
t3 = await V(e5);
|
|
66
66
|
} catch (l2) {
|
|
67
67
|
console.error("压缩图片失败", l2), t3 = e5;
|
|
68
68
|
}
|
|
@@ -70,12 +70,12 @@ const g = ["multiple", "accept"], b = ["multiple", "accept"], C = e({ __name: "f
|
|
|
70
70
|
const e6 = new FormData();
|
|
71
71
|
if (w.limitFileSize, w.multiple) {
|
|
72
72
|
if (O.value && O.value.length > 0 && O.value.length + t3.length > w.limit)
|
|
73
|
-
return void v({ showClose: true, type: "warning", message:
|
|
73
|
+
return void v({ showClose: true, type: "warning", message: A("fsUpload.theNumberOfUploadsExceedsTheLimitTheLimitIs") + ": " + w.limit });
|
|
74
74
|
for (let l2 = 0; l2 < t3.length; l2++)
|
|
75
75
|
e6.append("files", t3[l2]);
|
|
76
76
|
} else
|
|
77
77
|
e6.append("file", t3[0]);
|
|
78
|
-
|
|
78
|
+
B(e6);
|
|
79
79
|
}
|
|
80
80
|
});
|
|
81
81
|
});
|
|
@@ -83,30 +83,30 @@ const g = ["multiple", "accept"], b = ["multiple", "accept"], C = e({ __name: "f
|
|
|
83
83
|
R.value.click();
|
|
84
84
|
});
|
|
85
85
|
}
|
|
86
|
-
function
|
|
86
|
+
function _(e3) {
|
|
87
87
|
z.value = "", e3 && "image" === e3 ? z.value = "image/*" : e3 && "video" === e3 && (z.value = "video/*"), setTimeout(() => {
|
|
88
88
|
j.value = false, R.value.click();
|
|
89
89
|
});
|
|
90
90
|
}
|
|
91
|
-
function
|
|
91
|
+
function D(e3, t2) {
|
|
92
92
|
let l2 = true;
|
|
93
|
-
return e3.size > 1024 * t2 * 1024 && (v({ showClose: true, type: "warning", message:
|
|
93
|
+
return e3.size > 1024 * t2 * 1024 && (v({ showClose: true, type: "warning", message: A("imatrixUIMessage.exceedFileSize", { fileName: e3.name, fileSize: t2 }) }), l2 = false), l2;
|
|
94
94
|
}
|
|
95
|
-
function
|
|
95
|
+
function E(e3) {
|
|
96
96
|
if (O.value || (O.value = []), w.multiple)
|
|
97
97
|
O.value = O.value.concat(e3);
|
|
98
98
|
else {
|
|
99
99
|
const t2 = JSON.parse(JSON.stringify(O.value));
|
|
100
|
-
O.value = [], O.value.push(e3),
|
|
100
|
+
O.value = [], O.value.push(e3), T("remove", { rmFiles: t2, serverFiles: O.value, index: 0 });
|
|
101
101
|
}
|
|
102
|
-
R.value.value = null, L.value = false,
|
|
102
|
+
R.value.value = null, L.value = false, N.value.changeFileList(O.value), T("uploadend", O.value);
|
|
103
103
|
}
|
|
104
|
-
function
|
|
104
|
+
function M() {
|
|
105
105
|
!function() {
|
|
106
106
|
const e3 = R.value.files;
|
|
107
107
|
if (e3 && e3.length > 0) {
|
|
108
108
|
if (U.value && !w.multiple && e3.length > 1)
|
|
109
|
-
return v({ showClose: true, type: "warning", message:
|
|
109
|
+
return v({ showClose: true, type: "warning", message: A("fsUpload.theNumberOfUploadsExceedsTheLimitTheLimitIs") + ": 1" }), void (R.value.value = null);
|
|
110
110
|
L.value = true, async function() {
|
|
111
111
|
const e4 = new FormData(), t2 = [], l2 = [];
|
|
112
112
|
let o2 = w.limitFileSize;
|
|
@@ -115,7 +115,7 @@ const g = ["multiple", "accept"], b = ["multiple", "accept"], C = e({ __name: "f
|
|
|
115
115
|
const i2 = R.value.files;
|
|
116
116
|
for (let e5 = 0; e5 < i2.length; e5++) {
|
|
117
117
|
const l3 = i2[e5];
|
|
118
|
-
if (a2 =
|
|
118
|
+
if (a2 = D(l3, o2), !a2)
|
|
119
119
|
break;
|
|
120
120
|
t2.push(l3.name);
|
|
121
121
|
}
|
|
@@ -133,7 +133,7 @@ const g = ["multiple", "accept"], b = ["multiple", "accept"], C = e({ __name: "f
|
|
|
133
133
|
return void console.error("未选择任何文件");
|
|
134
134
|
let n2 = [];
|
|
135
135
|
try {
|
|
136
|
-
n2 = await
|
|
136
|
+
n2 = await V(l2);
|
|
137
137
|
} catch (e5) {
|
|
138
138
|
console.error("压缩图片失败", e5), n2 = l2;
|
|
139
139
|
}
|
|
@@ -143,13 +143,13 @@ const g = ["multiple", "accept"], b = ["multiple", "accept"], C = e({ __name: "f
|
|
|
143
143
|
e4.append("limitFileSize", o2);
|
|
144
144
|
} else
|
|
145
145
|
e4.append("file", n2[0]);
|
|
146
|
-
|
|
146
|
+
B(e4);
|
|
147
147
|
}();
|
|
148
148
|
} else
|
|
149
|
-
R.value.value = null,
|
|
149
|
+
R.value.value = null, T("uploadend", O.value);
|
|
150
150
|
}();
|
|
151
151
|
}
|
|
152
|
-
function
|
|
152
|
+
function V(e3) {
|
|
153
153
|
const t2 = [];
|
|
154
154
|
for (let l2 = 0; l2 < e3.length; l2++)
|
|
155
155
|
t2.push(new Promise((t3, o2) => {
|
|
@@ -161,16 +161,16 @@ const g = ["multiple", "accept"], b = ["multiple", "accept"], C = e({ __name: "f
|
|
|
161
161
|
}));
|
|
162
162
|
return Promise.all(t2);
|
|
163
163
|
}
|
|
164
|
-
function
|
|
164
|
+
function B(e3) {
|
|
165
165
|
e3.append("systemCode", w.systemCode), window.$vueApp.config.globalProperties.$http.post(x.value, e3, { headers: { "Content-Type": "multipart/form-data", Authorization: c() } }).then((e4) => {
|
|
166
|
-
e4 ? w.multiple ? e4.length > 0 ?
|
|
166
|
+
e4 ? w.multiple ? e4.length > 0 ? E(e4) : console.error("多选时上传后返回值异常") : E(e4) : console.error("上传后返回值异常");
|
|
167
167
|
}).catch(() => {
|
|
168
168
|
L.value = false;
|
|
169
169
|
});
|
|
170
170
|
}
|
|
171
171
|
return (t2, f2) => {
|
|
172
172
|
const m2 = l("el-button"), c2 = l("el-drawer");
|
|
173
|
-
return o(), a("div", null, [i(y, { ref_key: "fileUploadRef", ref:
|
|
173
|
+
return o(), a("div", null, [i(y, { ref_key: "fileUploadRef", ref: N, disabled: e2.disabled, systemCode: e2.systemCode, accept: e2.accept, multiple: e2.multiple, limitFileSize: e2.limitFileSize, fileList: O.value, beforeRemove: e2.beforeRemove, onRemove: [e2.onRemove, I], beforeDownload: e2.beforeDownload, baseURL: P.value, watermark: e2.watermark, onChooseFile: $ }, null, 8, ["disabled", "systemCode", "accept", "multiple", "limitFileSize", "fileList", "beforeRemove", "onRemove", "beforeDownload", "baseURL", "watermark"]), "openChoosePhoto" === e2.openCameraOrChoosePhoto || "openCameraAndChoosePhoto" === e2.openCameraOrChoosePhoto ? (o(), a("input", { key: 0, ref_key: "fileRef", ref: R, type: "file", multiple: F.value, name: "file", accept: n(z), style: { display: "none" }, onChange: M }, null, 40, g)) : (o(), a("input", { key: 1, ref_key: "fileRef", ref: R, type: "file", multiple: F.value, capture: "environment", name: "file", accept: n(z), style: { display: "none" }, onChange: M }, null, 40, b)), i(c2, { modelValue: j.value, "onUpdate:modelValue": f2[2] || (f2[2] = (e3) => j.value = e3), direction: "btt", onClose: f2[3] || (f2[3] = (e3) => j.value = false) }, { default: u(() => [r("div", null, [i(m2, { link: "", onClick: f2[0] || (f2[0] = (e3) => _("image")) }, { default: u(() => [s(p(t2.$t("fsUpload.image")), 1)]), _: 1 })]), r("div", null, [i(m2, { link: "", onClick: f2[1] || (f2[1] = (e3) => _("video")) }, { default: u(() => [s(p(t2.$t("fsUpload.video")), 1)]), _: 1 })])]), _: 1 }, 8, ["modelValue"])]);
|
|
174
174
|
};
|
|
175
175
|
} });
|
|
176
176
|
export {
|
|
@@ -8,30 +8,30 @@ const h = { style: { width: "100%" } }, g = { key: 0, class: "el-upload-list__it
|
|
|
8
8
|
} }, onRemove: { type: Function, default: () => {
|
|
9
9
|
} }, beforeDownload: { type: Function, default: () => {
|
|
10
10
|
} }, accept: { type: String, default: "" }, limitFileSize: { type: Number, default: 30 }, baseURL: { type: String, default: "" }, watermark: { type: Object, default: () => ({}) } }, emits: ["chooseFile", "remove"], setup(e2, { expose: _2, emit: R }) {
|
|
11
|
-
const S = e2;
|
|
11
|
+
const S = e2, j = R;
|
|
12
12
|
t(""), t(false);
|
|
13
|
-
const
|
|
14
|
-
let
|
|
15
|
-
const
|
|
16
|
-
|
|
17
|
-
const
|
|
18
|
-
|
|
19
|
-
},
|
|
20
|
-
function
|
|
21
|
-
e3 =
|
|
13
|
+
const N = t(false);
|
|
14
|
+
let x = S.baseURL;
|
|
15
|
+
const z = window.$vueApp.config.globalProperties.baseAPI, L = t(S.fileList);
|
|
16
|
+
L.value ? JSON.stringify(L.value) : L.value;
|
|
17
|
+
const C = () => {
|
|
18
|
+
j("chooseFile");
|
|
19
|
+
}, P = (e3) => v(e3.showName ? e3.showName : e3.name);
|
|
20
|
+
function U(e3, t2) {
|
|
21
|
+
e3 = $(e3);
|
|
22
22
|
const o2 = y();
|
|
23
|
-
let l2 =
|
|
24
|
-
return w(S.systemCode) && (l2 =
|
|
23
|
+
let l2 = x + "/common/super-form/downloads?jwt=" + o2;
|
|
24
|
+
return w(S.systemCode) && (l2 = z + "/component/super-form/downloads?jwt=" + o2), l2 = b(l2), l2 + "&showName=" + encodeURI(e3) + "&serverPath=" + t2;
|
|
25
25
|
}
|
|
26
|
-
const
|
|
27
|
-
function
|
|
28
|
-
|
|
26
|
+
const $ = (e3) => (e3 && (e3 = e3.replace("#", "~~").replace("?", "~$").replace("&", "$")), e3);
|
|
27
|
+
function A(e3) {
|
|
28
|
+
j("remove", e3);
|
|
29
29
|
}
|
|
30
30
|
return _2({ changeFileList: function(e3) {
|
|
31
|
-
|
|
31
|
+
L.value = e3;
|
|
32
32
|
} }), (t2, v2) => {
|
|
33
33
|
const y2 = o("el-text"), w2 = o("el-icon"), b2 = o("el-upload");
|
|
34
|
-
return l(), i(b2, { action: "#", "list-type": "picture-card", "file-list":
|
|
34
|
+
return l(), i(b2, { action: "#", "list-type": "picture-card", "file-list": L.value, "auto-upload": false, disabled: true }, a({ file: s(({ file: t3 }) => [r("div", h, [P(t3) ? (l(), n("img", { key: 1, class: "el-upload-list__item-thumbnail", src: U(t3.showName ? t3.showName : t3.name, t3.serverPath), alt: "" }, null, 8, k)) : (l(), n("div", g, [r("div", F, m(t3.name), 1)])), u(p, { disabled: N.value, "file-list": L.value, file: t3, "system-code": e2.systemCode, watermark: e2.watermark, "before-remove": e2.beforeRemove, "on-remove": e2.onRemove, "before-download": e2.beforeDownload, onRemove: A }, null, 8, ["disabled", "file-list", "file", "system-code", "watermark", "before-remove", "on-remove", "before-download"])])]), _: 2 }, [N.value ? void 0 : { name: "tip", fn: s(() => [u(y2, { size: "small", style: { padding: "10px", "font-weight": "600" } }, { default: s(() => [d(m(e2.accept) + " " + m(e2.limitFileSize ? t2.$t("imatrixUIMessage.uploadFileTip", { fileSize: e2.limitFileSize }) : ""), 1)]), _: 1 })]), key: "0" }, N.value ? void 0 : { name: "trigger", fn: s(() => [u(w2, { onClick: C }, { default: s(() => [u(f(c))]), _: 1 })]), key: "1" }]), 1032, ["file-list"]);
|
|
35
35
|
};
|
|
36
36
|
} });
|
|
37
37
|
export {
|
|
@@ -13,22 +13,22 @@ const u = e({ __name: "file-upload", props: { openFsUpload: { type: Object, defa
|
|
|
13
13
|
return "file-upload";
|
|
14
14
|
} }, listCode: { type: String, default: null }, openCameraOrChoosePhoto: { type: String, default: "openCameraAndChoosePhoto" }, beforeUpload: { type: Function, default: () => {
|
|
15
15
|
} }, watermark: { type: Object, default: () => ({}) } }, emits: ["uploadend", "remove", "pickup-file", "close"], setup(e2, { expose: u2, emit: s }) {
|
|
16
|
-
const f = window.$vueApp.config.globalProperties.baseAPI + "/component/super-form/deleteFile", { t:
|
|
17
|
-
function
|
|
18
|
-
|
|
16
|
+
const f = window.$vueApp.config.globalProperties.baseAPI + "/component/super-form/deleteFile", m = s, { t: c } = p(), v = o(null), b = o(null), y = o([]), h = o(null), C = navigator.userAgent;
|
|
17
|
+
function g(e3) {
|
|
18
|
+
m("uploadend", e3);
|
|
19
19
|
}
|
|
20
|
-
function
|
|
20
|
+
function F({ rmFiles: e3, serverFiles: o2, newFiles: t2 }) {
|
|
21
21
|
e3 && e3.length > 0 && (e3.forEach((e4) => {
|
|
22
|
-
e4.serverPath &&
|
|
23
|
-
}),
|
|
24
|
-
i({ showClose: true, message:
|
|
25
|
-
}),
|
|
22
|
+
e4.serverPath && y.value && y.value.indexOf(e4.serverPath) < 0 && y.value.push(e4.serverPath);
|
|
23
|
+
}), y.value && y.value.length > 0 && window.$vueApp.config.globalProperties.$http.post(f, y.value).then(() => {
|
|
24
|
+
i({ showClose: true, message: c("fsUpload.updateSuccess"), type: "success" });
|
|
25
|
+
}), m("remove", { rmFiles: e3, serverFiles: o2, newFiles: t2 }));
|
|
26
26
|
}
|
|
27
|
-
return
|
|
28
|
-
"app" ===
|
|
27
|
+
return b.value = C, C.indexOf(" uni-app ") > 0 ? v.value = "app" : v.value = "browser", u2({ pickFileDone: function(e3) {
|
|
28
|
+
"app" === v.value && h.value.pickFileDone(e3);
|
|
29
29
|
}, uploadFileDone: function(e3) {
|
|
30
|
-
"app" ===
|
|
31
|
-
} }), (o2, i2) => (t(), l("div", null, ["app" ===
|
|
30
|
+
"app" === v.value && h.value.uploadFileDone(e3);
|
|
31
|
+
} }), (o2, i2) => (t(), l("div", null, ["app" === v.value ? (t(), a(r, { key: 0, ref_key: "fileUploadRef", ref: h, "file-list": e2.fileList, multiple: e2.multiple, disabled: e2.disabled, fileInfo: e2.fileInfo, systemCode: e2.systemCode, accept: e2.accept, limit: e2.limit, limitFileSize: e2.limitFileSize, placeholder: e2.placeholder, action: e2.action, headers: e2.headers, beforeUpload: e2.beforeUpload, onSuccess: e2.onSuccess, beforeRemove: e2.beforeRemove, onRemove: [e2.onRemove, F], beforeDownload: e2.beforeDownload, pageContext: e2.pageContext, configure: e2.configure, openFsUpload: e2.openFsUpload, componentId: e2.componentId, componentName: e2.componentName, listCode: e2.listCode, openCameraOrChoosePhoto: e2.openCameraOrChoosePhoto, watermark: e2.watermark, onUploadend: g }, 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" === v.value ? (t(), a(d, { key: 1, ref_key: "fileUploadRef", ref: h, "file-list": e2.fileList, multiple: e2.multiple, disabled: e2.disabled, fileInfo: e2.fileInfo, systemCode: e2.systemCode, accept: e2.accept, limit: e2.limit, limitFileSize: e2.limitFileSize, placeholder: e2.placeholder, action: e2.action, headers: e2.headers, beforeUpload: e2.beforeUpload, onSuccess: e2.onSuccess, beforeRemove: e2.beforeRemove, onRemove: [e2.onRemove, F], beforeDownload: e2.beforeDownload, pageContext: e2.pageContext, configure: e2.configure, openFsUpload: e2.openFsUpload, componentId: e2.componentId, componentName: e2.componentName, listCode: e2.listCode, openCameraOrChoosePhoto: e2.openCameraOrChoosePhoto, watermark: e2.watermark, onUploadend: g }, 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"])) : n("", true)]));
|
|
32
32
|
} });
|
|
33
33
|
export {
|
|
34
34
|
u as default
|
|
@@ -10,28 +10,28 @@ const x = { style: { width: "100%" } }, F = { key: 0, style: { display: "flex",
|
|
|
10
10
|
} }, beforeDownload: { type: Function, default: () => {
|
|
11
11
|
} }, pageContext: { type: Object, default: () => ({}) }, configure: { type: Object, default: () => ({}) }, beforeUpload: { type: Function, default: () => {
|
|
12
12
|
} }, disabledNoPreview: { type: Boolean, default: false }, disabledNoDownload: { type: Boolean, default: false }, limit: { type: Number, default: 0 }, watermark: { type: Object, default: () => ({}) } }, emits: ["on-error"], setup(e2, { emit: U2 }) {
|
|
13
|
-
const k =
|
|
14
|
-
const e3 = Math.max(0, Math.min(100, Number(
|
|
13
|
+
const k = U2, { t: L } = w(), N = e2, j = b(window.$vueApp.config.globalProperties.baseURL), A = b(window.$vueApp.config.globalProperties.baseAPI), C = t(""), O = t(), P = t(false), R = t(""), _ = t(0), B = t(N.limitFileSize), M = o(() => {
|
|
14
|
+
const e3 = Math.max(0, Math.min(100, Number(_.value || 0)));
|
|
15
15
|
return { background: `linear-gradient(90deg, #409EFF ${e3}%, rgba(255,255,255,0.92) ${e3}%)`, color: e3 >= 50 ? "#fff" : "#303133", transition: "background 0.3s linear" };
|
|
16
16
|
});
|
|
17
|
-
if (
|
|
18
|
-
|
|
17
|
+
if (N.action)
|
|
18
|
+
C.value = N.action;
|
|
19
19
|
else {
|
|
20
|
-
let e3 =
|
|
21
|
-
v(window.$vueApp.config.globalProperties.systemCode) && (e3 =
|
|
20
|
+
let e3 = j + "/common/fs-upload";
|
|
21
|
+
v(window.$vueApp.config.globalProperties.systemCode) && (e3 = A + "/component/super-form/uploads"), C.value = e3;
|
|
22
22
|
}
|
|
23
|
-
|
|
24
|
-
const
|
|
23
|
+
N.headers && N.headers.Authorization || (N.headers.Authorization = y());
|
|
24
|
+
const $ = (e3) => {
|
|
25
25
|
var _a;
|
|
26
|
-
if (0 !== ((_a =
|
|
27
|
-
return h({ type: "warning", message: L("fsUpload.theNumberOfUploadsExceedsTheLimitTheLimitIs") + ": " +
|
|
28
|
-
if (
|
|
29
|
-
return h({ type: "warning", message: L("imatrixUIMessage.exceedFileSize", { fileSize:
|
|
30
|
-
return
|
|
31
|
-
},
|
|
32
|
-
h({ message: L("fsUpload.uploadSucceeded"), type: "success", placement: "top" }),
|
|
33
|
-
},
|
|
34
|
-
|
|
26
|
+
if (0 !== ((_a = N.fileList) == null ? void 0 : _a.length) && N.limit > 0 && N.fileList.length >= N.limit)
|
|
27
|
+
return h({ type: "warning", message: L("fsUpload.theNumberOfUploadsExceedsTheLimitTheLimitIs") + ": " + N.limit, showClose: true }), false;
|
|
28
|
+
if (B.value || (B.value = 30), e3.size > 1024 * B.value * 1024)
|
|
29
|
+
return h({ type: "warning", message: L("imatrixUIMessage.exceedFileSize", { fileSize: B.value }), showClose: true }), false;
|
|
30
|
+
return N.beforeUpload({ fileObj: e3, files: [e3], isMobile: false, pageContext: N.pageContext, configureObj: N.configure });
|
|
31
|
+
}, D = (e3, t2, o2) => {
|
|
32
|
+
h({ message: L("fsUpload.uploadSucceeded"), type: "success", placement: "top" }), N.fileList.push({ showName: e3.name, serverPath: e3.serverPath }), N.onSuccess(e3, t2, o2), P.value = false, _.value = 0;
|
|
33
|
+
}, I = (e3, t2) => {
|
|
34
|
+
P.value = false, _.value = 0;
|
|
35
35
|
let o2 = L("fsUpload.uploadFailed");
|
|
36
36
|
try {
|
|
37
37
|
const e4 = t2 && t2.xhr && (t2.xhr.response || t2.xhr.responseText);
|
|
@@ -41,20 +41,20 @@ const x = { style: { width: "100%" } }, F = { key: 0, style: { display: "flex",
|
|
|
41
41
|
}
|
|
42
42
|
} catch (e4) {
|
|
43
43
|
}
|
|
44
|
-
h({ type: "error", message: o2 }),
|
|
44
|
+
h({ type: "error", message: o2 }), k("on-error", e3);
|
|
45
45
|
};
|
|
46
|
-
function
|
|
46
|
+
function T(e3, t2, o2) {
|
|
47
47
|
try {
|
|
48
|
-
|
|
48
|
+
R.value = t2.name;
|
|
49
49
|
const o3 = e3 && e3.percent ? Math.floor(e3.percent) : 0;
|
|
50
|
-
|
|
50
|
+
P.value = true, _.value = 100 === o3 ? 99 : o3;
|
|
51
51
|
} catch (e4) {
|
|
52
|
-
|
|
52
|
+
P.value = false, _.value = 0;
|
|
53
53
|
}
|
|
54
54
|
}
|
|
55
55
|
return (t2, o2) => {
|
|
56
56
|
const b2 = l("el-button"), v2 = l("el-text"), y2 = l("el-upload"), h2 = l("el-tag");
|
|
57
|
-
return a(), i(s, null, [r("div", x, [e2.disabled ? m("", true) : (a(), d(y2, { key: 0, ref_key: "buttonUploadRef", ref:
|
|
57
|
+
return a(), i(s, null, [r("div", x, [e2.disabled ? m("", true) : (a(), d(y2, { key: 0, ref_key: "buttonUploadRef", ref: O, class: "upload-demo", accept: e2.accept, "show-file-list": false, "auto-upload": "", headers: e2.headers, disabled: !e2.openFsUpload, action: C.value, multiple: e2.multiple, "before-upload": $, "before-remove": e2.beforeRemove, "on-success": D, "on-error": I, "on-progress": T }, { tip: n(() => [u(v2, null, { default: n(() => [p(f(e2.accept) + " " + f(t2.$t("imatrixUIMessage.uploadFileTip", { fileSize: e2.limitFileSize })), 1)]), _: 1 })]), default: n(() => [u(b2, { size: "small", type: "primary" }, { default: n(() => [p(f(e2.placeholder), 1)]), _: 1 })]), _: 1 }, 8, ["accept", "headers", "disabled", "action", "multiple", "before-remove"]))]), P.value ? (a(), i("div", F, [u(h2, { style: c(M.value), size: "large", class: "fs-upload-tag" }, { default: n(() => [o2[0] || (o2[0] = p(" 上传中: ", -1)), r("span", S, f(R.value), 1), r("span", z, f(_.value) + "%", 1)]), _: 1 }, 8, ["style"])])) : m("", true), e2.fileList && e2.fileList.length > 0 ? (a(), d(g, { key: 1, disabled: e2.disabled, "disabled-no-preview": e2.disabledNoPreview, "disabled-no-download": e2.disabledNoDownload, "file-list": e2.fileList, "system-code": e2.systemCode, "before-remove": e2.beforeRemove, watermark: e2.watermark, "on-remove": e2.onRemove, "before-download": e2.beforeDownload, downloadable: e2.downloadable }, null, 8, ["disabled", "disabled-no-preview", "disabled-no-download", "file-list", "system-code", "before-remove", "watermark", "on-remove", "before-download", "downloadable"])) : m("", true)], 64);
|
|
58
58
|
};
|
|
59
59
|
} });
|
|
60
60
|
export {
|
|
@@ -11,28 +11,28 @@ const S = { class: "el-upload__text" }, z = { key: 1, style: { display: "flex",
|
|
|
11
11
|
} }, beforeDownload: { type: Function, default: () => {
|
|
12
12
|
} }, pageContext: { type: Object, default: () => ({}) }, configure: { type: Object, default: () => ({}) }, beforeUpload: { type: Function, default: () => {
|
|
13
13
|
} }, disabledNoPreview: { type: Boolean, default: false }, disabledNoDownload: { type: Boolean, default: false }, limit: { type: Number, default: 0 }, watermark: { type: Object, default: () => ({}) } }, emits: ["on-error"], setup(e2, { emit: L2 }) {
|
|
14
|
-
const N =
|
|
15
|
-
const e3 = Math.max(0, Math.min(100, Number(
|
|
14
|
+
const N = L2, { t: j } = F(), _ = e2, A = g(window.$vueApp.config.globalProperties.baseURL), C = g(window.$vueApp.config.globalProperties.baseAPI), O = t(""), P = t(_.limitFileSize), R = t(false), B = t(""), M = t(0), $ = t(), D = o(() => {
|
|
15
|
+
const e3 = Math.max(0, Math.min(100, Number(M.value || 0)));
|
|
16
16
|
return { background: `linear-gradient(90deg, #409EFF ${e3}%, rgba(255,255,255,0.92) ${e3}%)`, color: e3 >= 50 ? "#fff" : "#303133", transition: "background 0.3s linear" };
|
|
17
17
|
});
|
|
18
|
-
if (
|
|
19
|
-
|
|
18
|
+
if (_.action)
|
|
19
|
+
O.value = _.action;
|
|
20
20
|
else {
|
|
21
|
-
let e3 =
|
|
22
|
-
y(window.$vueApp.config.globalProperties.systemCode) && (e3 =
|
|
21
|
+
let e3 = A + "/common/fs-upload";
|
|
22
|
+
y(window.$vueApp.config.globalProperties.systemCode) && (e3 = C + "/component/super-form/uploads"), O.value = e3;
|
|
23
23
|
}
|
|
24
|
-
|
|
25
|
-
const
|
|
24
|
+
_.headers && _.headers.Authorization || (_.headers.Authorization = h());
|
|
25
|
+
const I = (e3) => {
|
|
26
26
|
var _a;
|
|
27
|
-
if (0 !== ((_a =
|
|
28
|
-
return x({ type: "warning", message: j("fsUpload.theNumberOfUploadsExceedsTheLimitTheLimitIs") + ": " +
|
|
29
|
-
if (
|
|
30
|
-
return x({ type: "warning", message: j("imatrixUIMessage.exceedFileSize", { fileSize:
|
|
31
|
-
return
|
|
32
|
-
},
|
|
33
|
-
x.success(j("fsUpload.uploadSucceeded")),
|
|
34
|
-
},
|
|
35
|
-
|
|
27
|
+
if (0 !== ((_a = _.fileList) == null ? void 0 : _a.length) && _.limit > 0 && _.fileList.length >= _.limit)
|
|
28
|
+
return x({ type: "warning", message: j("fsUpload.theNumberOfUploadsExceedsTheLimitTheLimitIs") + ": " + _.limit, showClose: true }), false;
|
|
29
|
+
if (P.value || (P.value = 30), e3.size > 1024 * P.value * 1024)
|
|
30
|
+
return x({ type: "warning", message: j("imatrixUIMessage.exceedFileSize", { fileSize: P.value }), showClose: true }), false;
|
|
31
|
+
return _.beforeUpload({ fileObj: e3, files: [e3], isMobile: false, pageContext: _.pageContext, configureObj: _.configure });
|
|
32
|
+
}, T = (e3, t2, o2) => {
|
|
33
|
+
x.success(j("fsUpload.uploadSucceeded")), _.fileList.push({ showName: e3.name, serverPath: e3.serverPath }), _.onSuccess(e3, t2, o2), R.value = false, M.value = 0;
|
|
34
|
+
}, E = (e3, t2) => {
|
|
35
|
+
R.value = false, M.value = 0;
|
|
36
36
|
let o2 = j("fsUpload.uploadFailed");
|
|
37
37
|
try {
|
|
38
38
|
const e4 = t2 && t2.xhr && (t2.xhr.response || t2.xhr.responseText);
|
|
@@ -42,20 +42,20 @@ const S = { class: "el-upload__text" }, z = { key: 1, style: { display: "flex",
|
|
|
42
42
|
}
|
|
43
43
|
} catch (e4) {
|
|
44
44
|
}
|
|
45
|
-
x({ type: "error", message: o2 }),
|
|
45
|
+
x({ type: "error", message: o2 }), N("on-error", e3);
|
|
46
46
|
};
|
|
47
|
-
function
|
|
47
|
+
function J(e3, t2, o2) {
|
|
48
48
|
try {
|
|
49
|
-
|
|
49
|
+
B.value = t2.name;
|
|
50
50
|
const o3 = e3 && e3.percent ? Math.floor(e3.percent) : 0;
|
|
51
|
-
|
|
51
|
+
R.value = true, M.value = 100 === o3 ? 99 : o3;
|
|
52
52
|
} catch (e4) {
|
|
53
|
-
|
|
53
|
+
R.value = false, M.value = 0;
|
|
54
54
|
}
|
|
55
55
|
}
|
|
56
56
|
return (t2, o2) => {
|
|
57
57
|
const g2 = l("el-icon"), y2 = l("el-text"), h2 = l("el-upload"), x2 = l("el-tag");
|
|
58
|
-
return a(), i(s, null, [e2.disabled ? m("", true) : (a(), r(h2, { key: 0, ref_key: "buttonUploadRef", ref:
|
|
58
|
+
return a(), i(s, null, [e2.disabled ? m("", true) : (a(), r(h2, { key: 0, ref_key: "buttonUploadRef", ref: $, class: "upload-demo", style: { width: "100%" }, accept: e2.accept, "show-file-list": false, drag: "", headers: e2.headers, action: O.value, multiple: e2.multiple, "before-upload": I, "on-success": T, "before-remove": e2.beforeRemove, "on-error": E, "on-progress": J }, { tip: n(() => [d(y2, null, { default: n(() => [u(p(e2.accept) + " " + p(t2.$t("imatrixUIMessage.uploadFileTip", { fileSize: e2.limitFileSize })), 1)]), _: 1 })]), default: n(() => [d(g2, { class: "el-icon--upload" }, { default: n(() => [d(f(v))]), _: 1 }), c("div", S, p(e2.placeholder), 1)]), _: 1 }, 8, ["accept", "headers", "action", "multiple", "before-remove"])), R.value ? (a(), i("div", z, [d(x2, { style: b(D.value), size: "large", class: "fs-upload-tag" }, { default: n(() => [o2[0] || (o2[0] = u(" 上传中: ", -1)), c("span", U, p(B.value), 1), c("span", k, p(M.value) + "%", 1)]), _: 1 }, 8, ["style"])])) : m("", true), e2.fileList && e2.fileList.length > 0 ? (a(), r(w, { key: 2, disabled: e2.disabled, "disabled-no-preview": e2.disabledNoPreview, "disabled-no-download": e2.disabledNoDownload, "file-list": e2.fileList, "system-code": e2.systemCode, watermark: e2.watermark, "before-remove": e2.beforeRemove, "on-remove": e2.onRemove, "before-download": e2.beforeDownload }, null, 8, ["disabled", "disabled-no-preview", "disabled-no-download", "file-list", "system-code", "watermark", "before-remove", "on-remove", "before-download"])) : m("", true)], 64);
|
|
59
59
|
};
|
|
60
60
|
} });
|
|
61
61
|
export {
|