yahee-components 0.0.9 → 0.0.10
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/es/annex-upload/annex-upload.vue.js +6 -6
- package/es/api/server.js +13 -0
- package/es/api/tool.js +69 -0
- package/es/comprehensive-search/comprehensive-search.vue.js +10 -10
- package/es/image-upload/image-upload.vue.js +125 -124
- package/es/index.js +21 -16
- package/es/node_modules/.pnpm/axios@1.7.7/node_modules/axios/index.js +38 -0
- package/es/operation-log/operation-log-content.vue.js +6 -6
- package/es/operation-log/operation-log-form.vue.js +2 -2
- package/es/operation-log/operation-log-form.vue2.js +17 -17
- package/es/operation-log/operation-log.vue.js +50 -49
- package/es/packages/components/api/log/index.js +15 -0
- package/es/packages/components/api/log-server.js +17 -21
- package/es/packages/components/api/server.js +19 -0
- package/es/packages/components/api/tool.js +57 -0
- package/es/packages/components/api/{requestTools.js → upload-server.js} +13 -10
- package/es/packages/components/hooks/useClipboard.js +16 -14
- package/es/packages/components/hooks/useImport.js +14 -12
- package/es/packages/components/hooks/useUpload.js +9 -9
- package/es/utils/config.js +19 -0
- package/es/utils/const.js +19 -0
- package/es/utils/translate.js +33 -31
- package/package.json +1 -1
- package/types/hooks/useClipboard.d.ts +7 -0
- package/types/hooks/useImg.d.ts +10 -0
- package/types/hooks/useImgPath.d.ts +5 -0
- package/types/hooks/useImport.d.ts +11 -0
- package/types/hooks/useUpload.d.ts +12 -0
- package/types/index.d.ts +6 -1204
- package/types/src/annex-upload/annex-upload.d.ts +30 -0
- package/types/src/annex-upload/annex-upload.vue.d.ts +443 -0
- package/types/src/annex-upload/index.d.ts +123 -0
- package/types/src/annex-upload/mimeType.d.ts +2 -0
- package/types/src/api/server.d.ts +6 -0
- package/types/src/api/tool.d.ts +6 -0
- package/types/src/api/types.d.ts +17 -0
- package/types/src/components.d.ts +6 -0
- package/types/src/comprehensive-search/comprehensive-search.d.ts +12 -0
- package/types/src/comprehensive-search/comprehensive-search.vue.d.ts +33 -0
- package/types/src/comprehensive-search/index.d.ts +36 -0
- package/types/src/copy/copy.d.ts +12 -0
- package/types/src/copy/copy.vue.d.ts +21 -0
- package/types/src/copy/index.d.ts +32 -0
- package/types/src/image-upload/image-upload.d.ts +26 -0
- package/types/src/image-upload/image-upload.vue.d.ts +43 -0
- package/types/src/image-upload/index.d.ts +94 -0
- package/types/src/index.d.ts +7 -0
- package/types/src/input/index.d.ts +16 -0
- package/types/src/input/input.d.ts +18 -0
- package/types/src/input/input.vue.d.ts +14 -0
- package/types/src/installs.d.ts +278 -0
- package/types/src/operation-log/index.d.ts +9 -0
- package/types/src/operation-log/operation-log-content.vue.d.ts +24 -0
- package/types/src/operation-log/operation-log-dialog.vue.d.ts +39 -0
- package/types/src/operation-log/operation-log-form.vue.d.ts +19 -0
- package/types/src/operation-log/operation-log.d.ts +11 -0
- package/types/src/operation-log/operation-log.vue.d.ts +6 -0
- package/types/src/static/CommonObject.d.ts +18 -0
- package/types/src/static/CommonVariables.d.ts +4 -0
- package/types/src/utils/config.d.ts +8 -0
- package/types/src/utils/const.d.ts +19 -0
- package/types/src/utils/functions.d.ts +1 -0
- package/types/src/utils/install.d.ts +8 -0
- package/types/src/utils/storage.d.ts +18 -0
- package/types/src/utils/style.d.ts +19 -0
- package/types/src/utils/to-kebab-case.d.ts +1 -0
- package/types/src/utils/translate.d.ts +5 -0
- package/types/src/utils/typescript.d.ts +5 -0
- package/es/packages/components/api/remarkApi.js +0 -15
- package/es/packages/components/api/requestRemark.js +0 -47
- package/lib/_virtual/_commonjsHelpers.js +0 -1
- package/lib/_virtual/_plugin-vue_export-helper.js +0 -1
- package/lib/_virtual/dayjs.min.js +0 -1
- package/lib/_virtual/lodash.js +0 -1
- package/lib/annex-upload/annex-upload.vue.js +0 -1
- package/lib/annex-upload/annex-upload.vue2.js +0 -1
- package/lib/annex-upload/index.js +0 -1
- package/lib/annex-upload/mimeType.js +0 -1
- package/lib/comprehensive-search/comprehensive-search.vue.js +0 -1
- package/lib/comprehensive-search/comprehensive-search.vue2.js +0 -1
- package/lib/comprehensive-search/index.js +0 -1
- package/lib/copy/copy.vue.js +0 -1
- package/lib/copy/copy.vue2.js +0 -1
- package/lib/copy/index.js +0 -1
- package/lib/image-upload/image-upload.vue.js +0 -1
- package/lib/image-upload/image-upload.vue2.js +0 -1
- package/lib/image-upload/index.js +0 -1
- package/lib/index.js +0 -1
- package/lib/input/index.js +0 -1
- package/lib/input/input.vue.js +0 -1
- package/lib/input/input.vue2.js +0 -1
- package/lib/installs.js +0 -1
- package/lib/node_modules/.pnpm/axios@1.7.7/node_modules/axios/lib/adapters/adapters.js +0 -3
- package/lib/node_modules/.pnpm/axios@1.7.7/node_modules/axios/lib/adapters/fetch.js +0 -1
- package/lib/node_modules/.pnpm/axios@1.7.7/node_modules/axios/lib/adapters/xhr.js +0 -1
- package/lib/node_modules/.pnpm/axios@1.7.7/node_modules/axios/lib/axios.js +0 -1
- package/lib/node_modules/.pnpm/axios@1.7.7/node_modules/axios/lib/cancel/CancelToken.js +0 -1
- package/lib/node_modules/.pnpm/axios@1.7.7/node_modules/axios/lib/cancel/CanceledError.js +0 -1
- package/lib/node_modules/.pnpm/axios@1.7.7/node_modules/axios/lib/cancel/isCancel.js +0 -1
- package/lib/node_modules/.pnpm/axios@1.7.7/node_modules/axios/lib/core/Axios.js +0 -2
- package/lib/node_modules/.pnpm/axios@1.7.7/node_modules/axios/lib/core/AxiosError.js +0 -1
- package/lib/node_modules/.pnpm/axios@1.7.7/node_modules/axios/lib/core/AxiosHeaders.js +0 -2
- package/lib/node_modules/.pnpm/axios@1.7.7/node_modules/axios/lib/core/InterceptorManager.js +0 -1
- package/lib/node_modules/.pnpm/axios@1.7.7/node_modules/axios/lib/core/buildFullPath.js +0 -1
- package/lib/node_modules/.pnpm/axios@1.7.7/node_modules/axios/lib/core/dispatchRequest.js +0 -1
- package/lib/node_modules/.pnpm/axios@1.7.7/node_modules/axios/lib/core/mergeConfig.js +0 -1
- package/lib/node_modules/.pnpm/axios@1.7.7/node_modules/axios/lib/core/settle.js +0 -1
- package/lib/node_modules/.pnpm/axios@1.7.7/node_modules/axios/lib/core/transformData.js +0 -1
- package/lib/node_modules/.pnpm/axios@1.7.7/node_modules/axios/lib/defaults/index.js +0 -1
- package/lib/node_modules/.pnpm/axios@1.7.7/node_modules/axios/lib/defaults/transitional.js +0 -1
- package/lib/node_modules/.pnpm/axios@1.7.7/node_modules/axios/lib/env/data.js +0 -1
- package/lib/node_modules/.pnpm/axios@1.7.7/node_modules/axios/lib/helpers/AxiosURLSearchParams.js +0 -1
- package/lib/node_modules/.pnpm/axios@1.7.7/node_modules/axios/lib/helpers/HttpStatusCode.js +0 -1
- package/lib/node_modules/.pnpm/axios@1.7.7/node_modules/axios/lib/helpers/bind.js +0 -1
- package/lib/node_modules/.pnpm/axios@1.7.7/node_modules/axios/lib/helpers/buildURL.js +0 -1
- package/lib/node_modules/.pnpm/axios@1.7.7/node_modules/axios/lib/helpers/combineURLs.js +0 -1
- package/lib/node_modules/.pnpm/axios@1.7.7/node_modules/axios/lib/helpers/composeSignals.js +0 -1
- package/lib/node_modules/.pnpm/axios@1.7.7/node_modules/axios/lib/helpers/cookies.js +0 -1
- package/lib/node_modules/.pnpm/axios@1.7.7/node_modules/axios/lib/helpers/formDataToJSON.js +0 -1
- package/lib/node_modules/.pnpm/axios@1.7.7/node_modules/axios/lib/helpers/isAbsoluteURL.js +0 -1
- package/lib/node_modules/.pnpm/axios@1.7.7/node_modules/axios/lib/helpers/isAxiosError.js +0 -1
- package/lib/node_modules/.pnpm/axios@1.7.7/node_modules/axios/lib/helpers/isURLSameOrigin.js +0 -1
- package/lib/node_modules/.pnpm/axios@1.7.7/node_modules/axios/lib/helpers/null.js +0 -1
- package/lib/node_modules/.pnpm/axios@1.7.7/node_modules/axios/lib/helpers/parseHeaders.js +0 -2
- package/lib/node_modules/.pnpm/axios@1.7.7/node_modules/axios/lib/helpers/parseProtocol.js +0 -1
- package/lib/node_modules/.pnpm/axios@1.7.7/node_modules/axios/lib/helpers/progressEventReducer.js +0 -1
- package/lib/node_modules/.pnpm/axios@1.7.7/node_modules/axios/lib/helpers/resolveConfig.js +0 -1
- package/lib/node_modules/.pnpm/axios@1.7.7/node_modules/axios/lib/helpers/speedometer.js +0 -1
- package/lib/node_modules/.pnpm/axios@1.7.7/node_modules/axios/lib/helpers/spread.js +0 -1
- package/lib/node_modules/.pnpm/axios@1.7.7/node_modules/axios/lib/helpers/throttle.js +0 -1
- package/lib/node_modules/.pnpm/axios@1.7.7/node_modules/axios/lib/helpers/toFormData.js +0 -1
- package/lib/node_modules/.pnpm/axios@1.7.7/node_modules/axios/lib/helpers/toURLEncodedForm.js +0 -1
- package/lib/node_modules/.pnpm/axios@1.7.7/node_modules/axios/lib/helpers/trackStream.js +0 -1
- package/lib/node_modules/.pnpm/axios@1.7.7/node_modules/axios/lib/helpers/validator.js +0 -1
- package/lib/node_modules/.pnpm/axios@1.7.7/node_modules/axios/lib/platform/browser/classes/Blob.js +0 -1
- package/lib/node_modules/.pnpm/axios@1.7.7/node_modules/axios/lib/platform/browser/classes/FormData.js +0 -1
- package/lib/node_modules/.pnpm/axios@1.7.7/node_modules/axios/lib/platform/browser/classes/URLSearchParams.js +0 -1
- package/lib/node_modules/.pnpm/axios@1.7.7/node_modules/axios/lib/platform/browser/index.js +0 -1
- package/lib/node_modules/.pnpm/axios@1.7.7/node_modules/axios/lib/platform/common/utils.js +0 -1
- package/lib/node_modules/.pnpm/axios@1.7.7/node_modules/axios/lib/platform/index.js +0 -1
- package/lib/node_modules/.pnpm/axios@1.7.7/node_modules/axios/lib/utils.js +0 -1
- package/lib/node_modules/.pnpm/dayjs@1.11.13/node_modules/dayjs/dayjs.min.js +0 -1
- package/lib/node_modules/.pnpm/element-plus@2.8.3_vue@3.5.4_typescript@5.6.2_/node_modules/element-plus/es/locale/lang/zh-cn.js +0 -1
- package/lib/node_modules/.pnpm/lodash@4.17.21/node_modules/lodash/lodash.js +0 -27
- package/lib/node_modules/.pnpm/v3-infinite-loading@1.3.2/node_modules/v3-infinite-loading/lib/v3-infinite-loading.es.js +0 -1
- package/lib/operation-log/index.js +0 -1
- package/lib/operation-log/operation-log-content.vue.js +0 -1
- package/lib/operation-log/operation-log-content.vue2.js +0 -1
- package/lib/operation-log/operation-log-dialog.vue.js +0 -1
- package/lib/operation-log/operation-log-dialog.vue2.js +0 -1
- package/lib/operation-log/operation-log-form.vue.js +0 -1
- package/lib/operation-log/operation-log-form.vue2.js +0 -1
- package/lib/operation-log/operation-log.vue.js +0 -1
- package/lib/operation-log/operation-log.vue2.js +0 -1
- package/lib/packages/components/api/log-server.js +0 -1
- package/lib/packages/components/api/remarkApi.js +0 -1
- package/lib/packages/components/api/requestRemark.js +0 -1
- package/lib/packages/components/api/requestTools.js +0 -1
- package/lib/packages/components/assets/images/errorimg.png.js +0 -1
- package/lib/packages/components/assets/images/excel.png.js +0 -1
- package/lib/packages/components/assets/images/file-word.png.js +0 -1
- package/lib/packages/components/assets/images/pdf.png.js +0 -1
- package/lib/packages/components/assets/images/ppt.png.js +0 -1
- package/lib/packages/components/assets/images/vue.svg.js +0 -1
- package/lib/packages/components/hooks/useClipboard.js +0 -1
- package/lib/packages/components/hooks/useImg.js +0 -1
- package/lib/packages/components/hooks/useImgPath.js +0 -1
- package/lib/packages/components/hooks/useImport.js +0 -1
- package/lib/packages/components/hooks/useUpload.js +0 -1
- package/lib/utils/install.js +0 -1
- package/lib/utils/storage.js +0 -1
- package/lib/utils/translate.js +0 -1
- /package/es/node_modules/.pnpm/{element-plus@2.8.3_vue@3.5.4_typescript@5.6.2_ → element-plus@2.8.3_vue@3.5.12_typescript@5.6.2_}/node_modules/element-plus/es/locale/lang/zh-cn.js +0 -0
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { ElForm as Y, ElFormItem as
|
|
1
|
+
import { defineComponent as k, reactive as v, ref as B, onMounted as x, openBlock as u, createBlock as c, unref as t, withCtx as n, createVNode as r, createElementBlock as T, Fragment as E, renderList as M, createTextVNode as f, toDisplayString as g } from "vue";
|
|
2
|
+
import { ElForm as Y, ElFormItem as i, ElDatePicker as b, ElSelect as N, ElOption as _, ElInput as S, ElButton as d } from "element-plus";
|
|
3
3
|
import "element-plus/theme-chalk/src/base.scss";
|
|
4
4
|
import "element-plus/theme-chalk/src/form.scss";
|
|
5
5
|
import "element-plus/theme-chalk/src/date-picker.scss";
|
|
@@ -13,9 +13,9 @@ import "element-plus/theme-chalk/src/option.scss";
|
|
|
13
13
|
import "element-plus/theme-chalk/src/option-group.scss";
|
|
14
14
|
import "element-plus/theme-chalk/src/select.scss";
|
|
15
15
|
import { Search as U } from "@element-plus/icons-vue";
|
|
16
|
-
import {
|
|
16
|
+
import { getGlobalNotesUsers as F } from "../packages/components/api/log/index.js";
|
|
17
17
|
import { M2 as o } from "../utils/translate.js";
|
|
18
|
-
const Z = /* @__PURE__ */
|
|
18
|
+
const Z = /* @__PURE__ */ k({
|
|
19
19
|
__name: "operation-log-form",
|
|
20
20
|
props: {
|
|
21
21
|
projectId: {
|
|
@@ -65,11 +65,11 @@ const Z = /* @__PURE__ */ w({
|
|
|
65
65
|
l.append(
|
|
66
66
|
"filter",
|
|
67
67
|
JSON.stringify({ BusinessKey: y.projectId, BusinessName: "PRODUCT_DEV" })
|
|
68
|
-
), F
|
|
68
|
+
), F(l).then((e) => {
|
|
69
69
|
p.value = e;
|
|
70
70
|
});
|
|
71
|
-
},
|
|
72
|
-
m.Mark = l,
|
|
71
|
+
}, w = D, s = (l) => {
|
|
72
|
+
m.Mark = l, w("filterChange", m);
|
|
73
73
|
};
|
|
74
74
|
return x(() => {
|
|
75
75
|
V();
|
|
@@ -80,7 +80,7 @@ const Z = /* @__PURE__ */ w({
|
|
|
80
80
|
size: "small"
|
|
81
81
|
}, {
|
|
82
82
|
default: n(() => [
|
|
83
|
-
r(t(
|
|
83
|
+
r(t(i), null, {
|
|
84
84
|
default: n(() => [
|
|
85
85
|
r(t(b), {
|
|
86
86
|
modelValue: m.timeValue,
|
|
@@ -95,12 +95,12 @@ const Z = /* @__PURE__ */ w({
|
|
|
95
95
|
shortcuts: h,
|
|
96
96
|
size: "small",
|
|
97
97
|
clearable: "",
|
|
98
|
-
onChange:
|
|
98
|
+
onChange: s
|
|
99
99
|
}, null, 8, ["modelValue", "range-separator", "start-placeholder", "end-placeholder"])
|
|
100
100
|
]),
|
|
101
101
|
_: 1
|
|
102
102
|
}),
|
|
103
|
-
r(t(
|
|
103
|
+
r(t(i), null, {
|
|
104
104
|
default: n(() => [
|
|
105
105
|
r(t(N), {
|
|
106
106
|
modelValue: m.CreatedBy,
|
|
@@ -109,7 +109,7 @@ const Z = /* @__PURE__ */ w({
|
|
|
109
109
|
style: { width: "120px" },
|
|
110
110
|
size: "small",
|
|
111
111
|
clearable: "",
|
|
112
|
-
onChange:
|
|
112
|
+
onChange: s
|
|
113
113
|
}, {
|
|
114
114
|
default: n(() => [
|
|
115
115
|
(u(!0), T(E, null, M(p.value, (a) => (u(), c(t(_), {
|
|
@@ -123,7 +123,7 @@ const Z = /* @__PURE__ */ w({
|
|
|
123
123
|
]),
|
|
124
124
|
_: 1
|
|
125
125
|
}),
|
|
126
|
-
r(t(
|
|
126
|
+
r(t(i), null, {
|
|
127
127
|
default: n(() => [
|
|
128
128
|
r(t(S), {
|
|
129
129
|
modelValue: m.search,
|
|
@@ -135,7 +135,7 @@ const Z = /* @__PURE__ */ w({
|
|
|
135
135
|
append: n(() => [
|
|
136
136
|
r(t(d), {
|
|
137
137
|
icon: t(U),
|
|
138
|
-
onClick:
|
|
138
|
+
onClick: s
|
|
139
139
|
}, null, 8, ["icon"])
|
|
140
140
|
]),
|
|
141
141
|
_: 1
|
|
@@ -143,11 +143,11 @@ const Z = /* @__PURE__ */ w({
|
|
|
143
143
|
]),
|
|
144
144
|
_: 1
|
|
145
145
|
}),
|
|
146
|
-
r(t(
|
|
146
|
+
r(t(i), null, {
|
|
147
147
|
default: n(() => [
|
|
148
148
|
r(t(d), {
|
|
149
149
|
type: "primary",
|
|
150
|
-
onClick: e[3] || (e[3] = (a) =>
|
|
150
|
+
onClick: e[3] || (e[3] = (a) => s(null))
|
|
151
151
|
}, {
|
|
152
152
|
default: n(() => [
|
|
153
153
|
f(g(t(o)("搜索全部")), 1)
|
|
@@ -157,11 +157,11 @@ const Z = /* @__PURE__ */ w({
|
|
|
157
157
|
]),
|
|
158
158
|
_: 1
|
|
159
159
|
}),
|
|
160
|
-
r(t(
|
|
160
|
+
r(t(i), null, {
|
|
161
161
|
default: n(() => [
|
|
162
162
|
r(t(d), {
|
|
163
163
|
type: "primary",
|
|
164
|
-
onClick: e[4] || (e[4] = (a) =>
|
|
164
|
+
onClick: e[4] || (e[4] = (a) => s("Check"))
|
|
165
165
|
}, {
|
|
166
166
|
default: n(() => [
|
|
167
167
|
f(g(t(o)("审核节点备注")), 1)
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import { defineComponent as R, ref as d, reactive as $, onMounted as K, openBlock as c, createElementBlock as u, createVNode as s, unref as n, normalizeStyle as
|
|
1
|
+
import { defineComponent as R, ref as d, reactive as $, onMounted as K, openBlock as c, createElementBlock as u, createVNode as s, unref as n, normalizeStyle as G, withCtx as x, Fragment as y, renderList as A, normalizeClass as J, createElementVNode as l, toDisplayString as p, createCommentVNode as k, withDirectives as Q, vModelText as q, createTextVNode as W } from "vue";
|
|
2
2
|
import { CaretRight as X, CaretLeft as Z } from "@element-plus/icons-vue";
|
|
3
|
-
import {
|
|
4
|
-
import { ElScrollbar as ee, ElIcon as B, ElButton as te, ElMessage as f } from "element-plus";
|
|
3
|
+
import { ElScrollbar as ee, ElIcon as w, ElButton as te, ElMessage as f } from "element-plus";
|
|
5
4
|
import "element-plus/theme-chalk/src/base.scss";
|
|
6
5
|
import "element-plus/theme-chalk/src/badge.scss";
|
|
7
6
|
import "element-plus/theme-chalk/src/message.scss";
|
|
@@ -10,29 +9,30 @@ import "element-plus/theme-chalk/src/button.scss";
|
|
|
10
9
|
import { useUpload as oe } from "../packages/components/hooks/useUpload.js";
|
|
11
10
|
import { useFile as ae } from "../packages/components/hooks/useImg.js";
|
|
12
11
|
import ne from "./operation-log-form.vue.js";
|
|
13
|
-
import
|
|
12
|
+
import B from "./operation-log-content.vue.js";
|
|
14
13
|
import se from "./operation-log-dialog.vue.js";
|
|
15
|
-
import
|
|
14
|
+
import U from "../node_modules/.pnpm/dayjs@1.11.13/node_modules/dayjs/dayjs.min.js";
|
|
16
15
|
import { M2 as r } from "../utils/translate.js";
|
|
17
16
|
import le from "../annex-upload/annex-upload.vue.js";
|
|
18
17
|
import ie from "../node_modules/.pnpm/v3-infinite-loading@1.3.2/node_modules/v3-infinite-loading/lib/v3-infinite-loading.es.js";
|
|
19
18
|
/* empty css */
|
|
20
|
-
|
|
19
|
+
import { insertGlobalnotes as P, findGlobalNotes as re } from "../packages/components/api/log/index.js";
|
|
20
|
+
const de = { class: "yahee-operation-log" }, ce = { class: "d-flex jc-end" }, ue = { class: "content text-color-secondary" }, pe = { class: "date fontSize-12 pull-right text-color-a4" }, fe = { class: "name" }, me = { class: "name" }, ge = { class: "d-flex" }, ve = { class: "content text-color-secondary" }, he = { class: "date fontSize-12 text-color-a4" }, _e = {
|
|
21
21
|
key: 0,
|
|
22
22
|
class: "loading text-color-a4"
|
|
23
|
-
},
|
|
23
|
+
}, xe = {
|
|
24
24
|
key: 1,
|
|
25
25
|
class: "no-more text-color-a4"
|
|
26
|
-
},
|
|
26
|
+
}, Ie = ["placeholder"], ye = { class: "d-flex text-right marginT10" }, He = /* @__PURE__ */ R({
|
|
27
27
|
name: "YaheeOperationLog",
|
|
28
28
|
__name: "operation-log",
|
|
29
29
|
props: {
|
|
30
30
|
projectId: { default: "" }
|
|
31
31
|
},
|
|
32
|
-
setup(
|
|
33
|
-
const I =
|
|
32
|
+
setup(b) {
|
|
33
|
+
const I = b, m = d(!1), L = d(!1), _ = d(!1), C = d({}), i = $({
|
|
34
34
|
List: [],
|
|
35
|
-
LoginId:
|
|
35
|
+
LoginId: 0
|
|
36
36
|
}), g = d(""), v = d([]), a = {
|
|
37
37
|
PageIndex: -1,
|
|
38
38
|
StartOn: "",
|
|
@@ -55,35 +55,35 @@ const re = { class: "yahee-operation-log" }, de = { class: "d-flex jc-end" }, ce
|
|
|
55
55
|
Notes: a.Notes,
|
|
56
56
|
Mark: a.Mark
|
|
57
57
|
})
|
|
58
|
-
),
|
|
58
|
+
), re(e).then((t) => {
|
|
59
59
|
var o;
|
|
60
|
-
i.LoginId = t.LoginId, a.PageIndex === 0 ? i.List = t.List || [] : i.List = [...i.List || [], ...t.List || []], ((o = t == null ? void 0 : t.List) == null ? void 0 : o.length) === 0 && (
|
|
60
|
+
i.LoginId = t.LoginId, a.PageIndex === 0 ? i.List = t.List || [] : i.List = [...i.List || [], ...t.List || []], ((o = t == null ? void 0 : t.List) == null ? void 0 : o.length) === 0 && (L.value = !0);
|
|
61
61
|
}).finally(() => {
|
|
62
62
|
m.value = !1;
|
|
63
63
|
});
|
|
64
|
-
},
|
|
64
|
+
}, D = () => {
|
|
65
65
|
m.value || (m.value = !0, a.PageIndex += 1, h());
|
|
66
66
|
}, T = (e) => {
|
|
67
67
|
i.List = [], a.PageIndex = 0, a.StartOn = e.timeValue ? e.timeValue[0] : "", a.EndOn = e.timeValue ? e.timeValue[1] : "", a.UserIds = e.CreatedBy ? [e.CreatedBy] : [], a.Notes = e.search, a.Mark = e.Mark, h();
|
|
68
68
|
}, S = () => {
|
|
69
|
-
v.value.length > 0 &&
|
|
70
|
-
f.success(r("上传文件成功!")), a.PageIndex = 0, v.value = [], await h(),
|
|
69
|
+
v.value.length > 0 && V(v.value[0]).then(async () => {
|
|
70
|
+
f.success(r("上传文件成功!")), a.PageIndex = 0, v.value = [], await h(), N();
|
|
71
71
|
});
|
|
72
72
|
}, F = (e) => {
|
|
73
|
-
|
|
73
|
+
V(e).then(() => {
|
|
74
74
|
f.success(r("上传文件成功!")), _.value = !1, a.PageIndex = 0, h();
|
|
75
75
|
});
|
|
76
|
-
},
|
|
76
|
+
}, V = (e) => {
|
|
77
77
|
const t = new FormData();
|
|
78
|
-
return t.append("BusinessKey", I.projectId), t.append("BusinessName", "PRODUCT_DEV"), t.append("notes", e.fileUrl), t.append("ViewTitle", e.fileName),
|
|
78
|
+
return t.append("BusinessKey", I.projectId), t.append("BusinessName", "PRODUCT_DEV"), t.append("notes", e.fileUrl), t.append("ViewTitle", e.fileName), P(t);
|
|
79
79
|
}, j = () => {
|
|
80
80
|
if (!g.value) {
|
|
81
81
|
f.info(r("备注不能为空!"));
|
|
82
82
|
return;
|
|
83
83
|
}
|
|
84
84
|
const e = new FormData();
|
|
85
|
-
e.append("BusinessKey", I.projectId), e.append("BusinessName", "PRODUCT_DEV"), e.append("notes", g.value), e.append("ViewTitle", "备注"),
|
|
86
|
-
f.success(r("添加备注成功!")), a.PageIndex = 0, g.value = "", await h(),
|
|
85
|
+
e.append("BusinessKey", I.projectId), e.append("BusinessName", "PRODUCT_DEV"), e.append("notes", g.value), e.append("ViewTitle", "备注"), P(e).then(async () => {
|
|
86
|
+
f.success(r("添加备注成功!")), a.PageIndex = 0, g.value = "", await h(), N();
|
|
87
87
|
});
|
|
88
88
|
}, Y = (e) => {
|
|
89
89
|
if (e.clipboardData || e.originalEvent) {
|
|
@@ -97,7 +97,7 @@ const re = { class: "yahee-operation-log" }, de = { class: "d-flex jc-end" }, ce
|
|
|
97
97
|
e.clipboardData.files[t].size / 1024 / 1024 < 100 || f.error(r("上传文件大小不能超过 100MB!"));
|
|
98
98
|
const { name: H } = e.clipboardData.files[t];
|
|
99
99
|
oe("115", e.clipboardData.files[t]).then((z) => {
|
|
100
|
-
|
|
100
|
+
C.value = {
|
|
101
101
|
fileName: H || "",
|
|
102
102
|
fileUrl: ae({ fileId: z[0] })
|
|
103
103
|
};
|
|
@@ -106,13 +106,14 @@ const re = { class: "yahee-operation-log" }, de = { class: "d-flex jc-end" }, ce
|
|
|
106
106
|
}
|
|
107
107
|
}
|
|
108
108
|
}
|
|
109
|
-
},
|
|
110
|
-
|
|
109
|
+
}, M = d(null), N = () => {
|
|
110
|
+
M.value.scrollTo({ top: 0, behavior: "smooth" });
|
|
111
111
|
}, E = d(0), O = d(null);
|
|
112
112
|
return K(() => {
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
113
|
+
var t;
|
|
114
|
+
const e = (t = document.getElementsByClassName("log-form")[0]) == null ? void 0 : t.clientHeight;
|
|
115
|
+
E.value = window.innerHeight - e - O.value.offsetHeight - 90, D();
|
|
116
|
+
}), (e, t) => (c(), u("div", de, [
|
|
116
117
|
s(ne, {
|
|
117
118
|
ref: "logForm",
|
|
118
119
|
class: "text-right log-form",
|
|
@@ -121,25 +122,25 @@ const re = { class: "yahee-operation-log" }, de = { class: "d-flex jc-end" }, ce
|
|
|
121
122
|
}, null, 8, ["project-id"]),
|
|
122
123
|
s(n(ee), {
|
|
123
124
|
ref_key: "infiniteList",
|
|
124
|
-
ref:
|
|
125
|
+
ref: M,
|
|
125
126
|
class: "infinite-list-wrapper",
|
|
126
|
-
style:
|
|
127
|
+
style: G({ height: E.value + "px" })
|
|
127
128
|
}, {
|
|
128
129
|
default: x(() => [
|
|
129
|
-
(c(!0), u(y, null,
|
|
130
|
+
(c(!0), u(y, null, A(i.List, (o) => (c(), u("div", {
|
|
130
131
|
key: o.Id,
|
|
131
132
|
class: J(i.LoginId == o.CreatedBy ? "list-item-right" : "list-item-left")
|
|
132
133
|
}, [
|
|
133
134
|
i.LoginId == o.CreatedBy ? (c(), u(y, { key: 0 }, [
|
|
134
135
|
l("div", null, [
|
|
135
|
-
l("div",
|
|
136
|
-
l("div",
|
|
137
|
-
s(
|
|
136
|
+
l("div", ce, [
|
|
137
|
+
l("div", ue, [
|
|
138
|
+
s(B, {
|
|
138
139
|
id: i.LoginId,
|
|
139
140
|
info: o
|
|
140
141
|
}, null, 8, ["id", "info"])
|
|
141
142
|
]),
|
|
142
|
-
s(n(
|
|
143
|
+
s(n(w), {
|
|
143
144
|
color: "#f1f1f1",
|
|
144
145
|
size: "20"
|
|
145
146
|
}, {
|
|
@@ -149,14 +150,14 @@ const re = { class: "yahee-operation-log" }, de = { class: "d-flex jc-end" }, ce
|
|
|
149
150
|
_: 1
|
|
150
151
|
})
|
|
151
152
|
]),
|
|
152
|
-
l("div",
|
|
153
|
+
l("div", pe, p(n(U)(o.CreatedOnStr).format("YYYY-MM-DD HH: mm: ss")), 1)
|
|
153
154
|
]),
|
|
154
|
-
l("div",
|
|
155
|
+
l("div", fe, p(o.CreatedName), 1)
|
|
155
156
|
], 64)) : (c(), u(y, { key: 1 }, [
|
|
156
|
-
l("div",
|
|
157
|
+
l("div", me, p(o.CreatedName), 1),
|
|
157
158
|
l("div", null, [
|
|
158
|
-
l("div",
|
|
159
|
-
s(n(
|
|
159
|
+
l("div", ge, [
|
|
160
|
+
s(n(w), {
|
|
160
161
|
color: "#ccc",
|
|
161
162
|
size: "20"
|
|
162
163
|
}, {
|
|
@@ -165,23 +166,23 @@ const re = { class: "yahee-operation-log" }, de = { class: "d-flex jc-end" }, ce
|
|
|
165
166
|
]),
|
|
166
167
|
_: 1
|
|
167
168
|
}),
|
|
168
|
-
l("div",
|
|
169
|
-
s(
|
|
169
|
+
l("div", ve, [
|
|
170
|
+
s(B, {
|
|
170
171
|
id: i.LoginId,
|
|
171
172
|
info: o
|
|
172
173
|
}, null, 8, ["id", "info"])
|
|
173
174
|
])
|
|
174
175
|
]),
|
|
175
|
-
l("div",
|
|
176
|
+
l("div", he, p(n(U)(o.CreatedOnStr).format("YYYY-MM-DD HH:mm:ss")), 1)
|
|
176
177
|
])
|
|
177
178
|
], 64))
|
|
178
179
|
], 2))), 128)),
|
|
179
180
|
s(n(ie), {
|
|
180
181
|
distance: 10,
|
|
181
|
-
onInfinite:
|
|
182
|
+
onInfinite: D
|
|
182
183
|
}),
|
|
183
|
-
m.value ? (c(), u("div",
|
|
184
|
-
|
|
184
|
+
m.value ? (c(), u("div", _e, p(n(r)("加载中...")), 1)) : k("", !0),
|
|
185
|
+
L.value ? (c(), u("div", xe, p(n(r)("没有更多了!")), 1)) : k("", !0)
|
|
185
186
|
]),
|
|
186
187
|
_: 1
|
|
187
188
|
}, 8, ["style"]),
|
|
@@ -193,10 +194,10 @@ const re = { class: "yahee-operation-log" }, de = { class: "d-flex jc-end" }, ce
|
|
|
193
194
|
placeholder: n(r)("可通过 Ctrl+V 直接上传图片/文件"),
|
|
194
195
|
contenteditable: "true",
|
|
195
196
|
onPaste: Y
|
|
196
|
-
}, null, 40,
|
|
197
|
+
}, null, 40, Ie), [
|
|
197
198
|
[q, g.value]
|
|
198
199
|
]),
|
|
199
|
-
l("div",
|
|
200
|
+
l("div", ye, [
|
|
200
201
|
s(le, {
|
|
201
202
|
modelValue: v.value,
|
|
202
203
|
"onUpdate:modelValue": t[1] || (t[1] = (o) => v.value = o),
|
|
@@ -220,12 +221,12 @@ const re = { class: "yahee-operation-log" }, de = { class: "d-flex jc-end" }, ce
|
|
|
220
221
|
s(se, {
|
|
221
222
|
modelValue: _.value,
|
|
222
223
|
"onUpdate:modelValue": t[3] || (t[3] = (o) => _.value = o),
|
|
223
|
-
"doc-info":
|
|
224
|
+
"doc-info": C.value,
|
|
224
225
|
onConfirmUpload: F
|
|
225
226
|
}, null, 8, ["modelValue", "doc-info"])
|
|
226
227
|
]));
|
|
227
228
|
}
|
|
228
229
|
});
|
|
229
230
|
export {
|
|
230
|
-
|
|
231
|
+
He as default
|
|
231
232
|
};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { post as t } from "../log-server.js";
|
|
2
|
+
function e(o) {
|
|
3
|
+
return t("Common/GetGlobalNotesUsers", o);
|
|
4
|
+
}
|
|
5
|
+
function r(o) {
|
|
6
|
+
return t("Common/FindGlobalNotes", o);
|
|
7
|
+
}
|
|
8
|
+
function s(o) {
|
|
9
|
+
return t("Common/Insertglobalnotes", o);
|
|
10
|
+
}
|
|
11
|
+
export {
|
|
12
|
+
r as findGlobalNotes,
|
|
13
|
+
e as getGlobalNotesUsers,
|
|
14
|
+
s as insertGlobalnotes
|
|
15
|
+
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import i from "../../../node_modules/.pnpm/axios@1.7.7/node_modules/axios/lib/axios.js";
|
|
2
2
|
import { storage as m } from "../../../utils/storage.js";
|
|
3
3
|
import { ElMessageBox as s } from "element-plus";
|
|
4
4
|
import "element-plus/theme-chalk/src/base.scss";
|
|
@@ -6,24 +6,24 @@ import "element-plus/theme-chalk/src/message-box.scss";
|
|
|
6
6
|
import "element-plus/theme-chalk/src/button.scss";
|
|
7
7
|
import "element-plus/theme-chalk/src/input.scss";
|
|
8
8
|
import "element-plus/theme-chalk/src/overlay.scss";
|
|
9
|
-
const c = "https://newerp.yaheecloud.com/PMS/Latest/", r =
|
|
9
|
+
const c = "https://newerp.yaheecloud.com/PMS/Latest/", r = i.create({
|
|
10
10
|
baseURL: c,
|
|
11
11
|
timeout: 3e4,
|
|
12
12
|
withCredentials: !0
|
|
13
13
|
});
|
|
14
14
|
r.interceptors.request.use(
|
|
15
|
-
(
|
|
16
|
-
const
|
|
17
|
-
return
|
|
15
|
+
(e) => {
|
|
16
|
+
const t = m.get("token");
|
|
17
|
+
return t && (e.headers.token = t), e;
|
|
18
18
|
},
|
|
19
|
-
(
|
|
19
|
+
(e) => Promise.reject(e)
|
|
20
20
|
);
|
|
21
|
-
const
|
|
21
|
+
const o = localStorage.getItem("isTimeOutAlert");
|
|
22
22
|
r.interceptors.response.use(
|
|
23
|
-
(
|
|
24
|
-
(
|
|
25
|
-
if (
|
|
26
|
-
switch (
|
|
23
|
+
(e) => e.status === 200 && e.data ? Promise.resolve(e.data) : e,
|
|
24
|
+
(e) => {
|
|
25
|
+
if (e.response)
|
|
26
|
+
switch (e.response.status) {
|
|
27
27
|
case 404:
|
|
28
28
|
s.alert("网络请求地址不存在!");
|
|
29
29
|
break;
|
|
@@ -34,21 +34,17 @@ r.interceptors.response.use(
|
|
|
34
34
|
s.alert("服务器错误!");
|
|
35
35
|
break;
|
|
36
36
|
default:
|
|
37
|
-
console.error(
|
|
37
|
+
console.error(e.response.status, e.message);
|
|
38
38
|
break;
|
|
39
39
|
}
|
|
40
|
-
return
|
|
40
|
+
return e.code === "ECONNABORTED" && o && o === "0" && (s.alert("请求超时,请检查您的网络连接或稍后重试。"), localStorage.setItem("isTimeOutAlert", "1")), Promise.reject(e);
|
|
41
41
|
}
|
|
42
42
|
);
|
|
43
|
-
const
|
|
44
|
-
|
|
45
|
-
headers: {
|
|
46
|
-
"Content-Type": "multipart/form-data"
|
|
47
|
-
}
|
|
48
|
-
});
|
|
49
|
-
return r.post(t, e, i);
|
|
43
|
+
const b = async (e, t, a) => r.post(e, t, a), h = (e) => {
|
|
44
|
+
r.defaults.baseURL = e;
|
|
50
45
|
};
|
|
51
46
|
export {
|
|
52
47
|
r as default,
|
|
53
|
-
|
|
48
|
+
b as post,
|
|
49
|
+
h as setLogBaseUrl
|
|
54
50
|
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import t from "../../../node_modules/.pnpm/axios@1.7.7/node_modules/axios/lib/axios.js";
|
|
2
|
+
import { handleChangeRequestHeader as a, handleConfigureAuth as s, handleAuthError as n, handleGeneralError as o, handleNetworkError as u } from "./tool.js";
|
|
3
|
+
t.interceptors.request.use((e) => {
|
|
4
|
+
let r = a(e);
|
|
5
|
+
return r = s(r), r;
|
|
6
|
+
});
|
|
7
|
+
t.defaults.withCredentials = !0;
|
|
8
|
+
t.interceptors.response.use(
|
|
9
|
+
(e) => e.status !== 200 ? Promise.reject(e.data) : (n(e.data.errno), o(e.data.status, e.data.msg), e),
|
|
10
|
+
(e) => {
|
|
11
|
+
u(e.response.status), Promise.reject(e.response);
|
|
12
|
+
}
|
|
13
|
+
);
|
|
14
|
+
const l = (e) => {
|
|
15
|
+
t.defaults.baseURL = e;
|
|
16
|
+
};
|
|
17
|
+
export {
|
|
18
|
+
l as setBaseUrl
|
|
19
|
+
};
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { ElMessage as t } from "element-plus";
|
|
2
|
+
import "element-plus/theme-chalk/src/base.scss";
|
|
3
|
+
import "element-plus/theme-chalk/src/badge.scss";
|
|
4
|
+
import "element-plus/theme-chalk/src/message.scss";
|
|
5
|
+
import { AxiosHeaders as a } from "../../../node_modules/.pnpm/axios@1.7.7/node_modules/axios/index.js";
|
|
6
|
+
const s = "https://plmerp.yaheecloud.com/api/plm/product-dev/", m = (e) => ({
|
|
7
|
+
...e,
|
|
8
|
+
baseURL: s,
|
|
9
|
+
timeout: 2e4
|
|
10
|
+
}), c = (e) => {
|
|
11
|
+
const o = new a(e.headers);
|
|
12
|
+
return {
|
|
13
|
+
...e,
|
|
14
|
+
headers: o
|
|
15
|
+
};
|
|
16
|
+
}, u = (e) => {
|
|
17
|
+
const o = {
|
|
18
|
+
400: "错误的请求",
|
|
19
|
+
// token 失效
|
|
20
|
+
401: "未授权,请重新登录",
|
|
21
|
+
403: "拒绝访问",
|
|
22
|
+
404: "请求错误,未找到该资源",
|
|
23
|
+
405: "请求方法未允许",
|
|
24
|
+
408: "请求超时",
|
|
25
|
+
500: "服务器端出错",
|
|
26
|
+
501: "网络未实现",
|
|
27
|
+
502: "网络错误",
|
|
28
|
+
503: "服务不可用",
|
|
29
|
+
504: "网络超时",
|
|
30
|
+
505: "http版本不支持该请求"
|
|
31
|
+
};
|
|
32
|
+
if (e) {
|
|
33
|
+
t.error(o[e] ?? `其他连接错误 --${e}`);
|
|
34
|
+
return;
|
|
35
|
+
}
|
|
36
|
+
t.error("无法连接到服务器!");
|
|
37
|
+
};
|
|
38
|
+
var n = /* @__PURE__ */ ((e) => (e[e.AuthInvalid = 10031] = "AuthInvalid", e[e.AuthTooLong = 10032] = "AuthTooLong", e[e.UserHasNoRole = 10033] = "UserHasNoRole", e[e.UserNotRegistered = 10034] = "UserNotRegistered", e[e.ThirdPlatformUser = 10035] = "ThirdPlatformUser", e[e.NoRelatedEmployee = 10036] = "NoRelatedEmployee", e[e.CountInvalid = 10037] = "CountInvalid", e[e.CountNotFound = 10038] = "CountNotFound", e))(n || {});
|
|
39
|
+
const f = (e) => e in {
|
|
40
|
+
10031: "登录失效,需要重新登录",
|
|
41
|
+
// token 失效
|
|
42
|
+
10032: "您太久没登录,请重新登录~",
|
|
43
|
+
// token 过期
|
|
44
|
+
10033: "账户未绑定角色,请联系管理员绑定角色",
|
|
45
|
+
10034: "该用户未注册,请联系管理员注册用户",
|
|
46
|
+
10035: "code 无法获取对应第三方平台用户",
|
|
47
|
+
10036: "该账户未关联员工,请联系管理员做关联",
|
|
48
|
+
10037: "账号已无效",
|
|
49
|
+
10038: "账号未找到"
|
|
50
|
+
} ? (t.error(n[e]), !1) : !0, N = (e, o) => e !== 0 && o !== "OK" ? (t.error(o), !1) : !0;
|
|
51
|
+
export {
|
|
52
|
+
f as handleAuthError,
|
|
53
|
+
m as handleChangeRequestHeader,
|
|
54
|
+
c as handleConfigureAuth,
|
|
55
|
+
N as handleGeneralError,
|
|
56
|
+
u as handleNetworkError
|
|
57
|
+
};
|
|
@@ -1,25 +1,25 @@
|
|
|
1
1
|
import i from "../../../node_modules/.pnpm/axios@1.7.7/node_modules/axios/lib/axios.js";
|
|
2
|
-
import { storage as
|
|
2
|
+
import { storage as l } from "../../../utils/storage.js";
|
|
3
3
|
import { ElMessageBox as a } from "element-plus";
|
|
4
4
|
import "element-plus/theme-chalk/src/base.scss";
|
|
5
5
|
import "element-plus/theme-chalk/src/message-box.scss";
|
|
6
6
|
import "element-plus/theme-chalk/src/button.scss";
|
|
7
7
|
import "element-plus/theme-chalk/src/input.scss";
|
|
8
8
|
import "element-plus/theme-chalk/src/overlay.scss";
|
|
9
|
-
const
|
|
10
|
-
baseURL:
|
|
9
|
+
const m = "https://erptools.yaheecloud.com/", r = i.create({
|
|
10
|
+
baseURL: m,
|
|
11
11
|
timeout: 3e4,
|
|
12
12
|
withCredentials: !0
|
|
13
13
|
});
|
|
14
|
-
|
|
14
|
+
r.interceptors.request.use(
|
|
15
15
|
(t) => {
|
|
16
|
-
const e =
|
|
16
|
+
const e = l.get("token");
|
|
17
17
|
return e && (t.headers.token = e), t;
|
|
18
18
|
},
|
|
19
19
|
(t) => Promise.reject(t)
|
|
20
20
|
);
|
|
21
21
|
const o = localStorage.getItem("isTimeOutAlert");
|
|
22
|
-
|
|
22
|
+
r.interceptors.response.use(
|
|
23
23
|
(t) => {
|
|
24
24
|
if (t.status === 200 && t.data) {
|
|
25
25
|
const e = t.data.code || 0;
|
|
@@ -51,12 +51,15 @@ s.interceptors.response.use(
|
|
|
51
51
|
return t.code === "ECONNABORTED" && o && o == "0" && (a.alert("请求超时,请检查您的网络连接或稍后重试。"), localStorage.setItem("isTimeOutAlert", "1")), Promise.reject(t);
|
|
52
52
|
}
|
|
53
53
|
);
|
|
54
|
-
const
|
|
54
|
+
const h = async (t, e, s) => (s = Object.assign(s, {
|
|
55
55
|
headers: {
|
|
56
56
|
"Content-Type": "multipart/form-data"
|
|
57
57
|
}
|
|
58
|
-
}),
|
|
58
|
+
}), r.post(t, e, s)), k = (t) => {
|
|
59
|
+
r.defaults.baseURL = t;
|
|
60
|
+
};
|
|
59
61
|
export {
|
|
60
|
-
|
|
61
|
-
k as
|
|
62
|
+
r as default,
|
|
63
|
+
k as setUploadBaseUrl,
|
|
64
|
+
h as upload
|
|
62
65
|
};
|
|
@@ -1,24 +1,26 @@
|
|
|
1
|
-
import { ref as s, unref as
|
|
2
|
-
function f(
|
|
3
|
-
const
|
|
4
|
-
|
|
1
|
+
import { ref as s, unref as c } from "vue";
|
|
2
|
+
function f(d) {
|
|
3
|
+
const t = s(!1);
|
|
4
|
+
let n, r, i = 1500;
|
|
5
|
+
const u = !!n;
|
|
6
|
+
async function l(e = c(r)) {
|
|
5
7
|
if (e != null) {
|
|
6
|
-
if (
|
|
7
|
-
await
|
|
8
|
+
if (u)
|
|
9
|
+
await n.clipboard.writeText(e);
|
|
8
10
|
else
|
|
9
11
|
return;
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
},
|
|
12
|
+
t.value = !0, setTimeout(() => {
|
|
13
|
+
t.value = !1;
|
|
14
|
+
}, i);
|
|
13
15
|
}
|
|
14
16
|
}
|
|
15
|
-
function p(e =
|
|
16
|
-
|
|
17
|
-
o.value =
|
|
17
|
+
function p(e = c(r)) {
|
|
18
|
+
const a = e, o = document.createElement("input");
|
|
19
|
+
o.value = a, document.body.appendChild(o), o.select(), document.execCommand("Copy"), o.remove();
|
|
18
20
|
}
|
|
19
21
|
return {
|
|
20
|
-
isSupported:
|
|
21
|
-
copied:
|
|
22
|
+
isSupported: u,
|
|
23
|
+
copied: t,
|
|
22
24
|
copy: l,
|
|
23
25
|
copyUrl: p
|
|
24
26
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { upload as
|
|
1
|
+
import { upload as p } from "../api/upload-server.js";
|
|
2
2
|
import { ElMessageBox as n, ElMessage as l } from "element-plus";
|
|
3
3
|
import "element-plus/theme-chalk/src/base.scss";
|
|
4
4
|
import "element-plus/theme-chalk/src/badge.scss";
|
|
@@ -7,25 +7,27 @@ import "element-plus/theme-chalk/src/message-box.scss";
|
|
|
7
7
|
import "element-plus/theme-chalk/src/button.scss";
|
|
8
8
|
import "element-plus/theme-chalk/src/input.scss";
|
|
9
9
|
import "element-plus/theme-chalk/src/overlay.scss";
|
|
10
|
-
const
|
|
11
|
-
if (!
|
|
12
|
-
|
|
10
|
+
const D = (t, a) => new Promise((i, r) => {
|
|
11
|
+
if (!t) {
|
|
12
|
+
r(new Error("文件不能为空!"));
|
|
13
13
|
return;
|
|
14
14
|
}
|
|
15
15
|
const e = new FormData();
|
|
16
|
-
e.append("uploadFile",
|
|
16
|
+
e.append("uploadFile", t), p("file/project/import", e, {
|
|
17
17
|
onUploadProgress(o) {
|
|
18
18
|
if (o.lengthComputable) {
|
|
19
|
-
const
|
|
20
|
-
a({ percent:
|
|
19
|
+
const m = o.loaded / o.total * 100 || 0;
|
|
20
|
+
a({ percent: m });
|
|
21
21
|
}
|
|
22
22
|
}
|
|
23
|
-
}).then(
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
23
|
+
}).then(
|
|
24
|
+
(o) => {
|
|
25
|
+
o.status === 0 ? (o.data.haveError ? n.alert("部分数据导入失败,请下载并修改后重新导入") : l.success("全部导入成功,请下载文件"), i(o.data)) : r(new Error(`导入文件失败${o.msg}`));
|
|
26
|
+
}
|
|
27
|
+
).catch((o) => {
|
|
28
|
+
console.error(`导入文件失败!${o}`), r(new Error("导入文件失败!"));
|
|
27
29
|
});
|
|
28
30
|
});
|
|
29
31
|
export {
|
|
30
|
-
|
|
32
|
+
D as useImport
|
|
31
33
|
};
|