xyvcard-itsmsys 0.0.12 → 0.0.14
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/{edit-BSgQ7aTw.mjs → edit-BKRcHRhe.mjs} +1 -1
- package/dist/{edit-C-Ddf0UV.mjs → edit-BOYD0hK4.mjs} +103 -87
- package/dist/{edit-BSllWdRO.mjs → edit-CHMLN0tR.mjs} +1 -1
- package/dist/{edit-Cd4dWFsH.mjs → edit-DNMyksDd.mjs} +1 -1
- package/dist/{edit-q5TFAMBm.mjs → edit-W7Cqo-_d.mjs} +1 -1
- package/dist/{edit-CNw8JPUb.mjs → edit-b2ih9M1u.mjs} +89 -74
- package/dist/{edit-aqBMKpoJ.mjs → edit-mVmM-PRk.mjs} +97 -82
- package/dist/{edit.vue_vue_type_script_setup_true_lang-D1lAHFeM.mjs → edit.vue_vue_type_script_setup_true_lang-CAq_h6E3.mjs} +44 -37
- package/dist/{edit.vue_vue_type_script_setup_true_lang-BA39WCu3.mjs → edit.vue_vue_type_script_setup_true_lang-D31iEutB.mjs} +73 -73
- package/dist/{edit.vue_vue_type_script_setup_true_lang-BV_YHrlE.mjs → edit.vue_vue_type_script_setup_true_lang-DCq50Piw.mjs} +74 -74
- package/dist/{edit.vue_vue_type_script_setup_true_lang-BJcLgzvH.mjs → edit.vue_vue_type_script_setup_true_lang-hotcXxq3.mjs} +73 -73
- package/dist/import-upload-DBaTv04c.mjs +161 -0
- package/dist/import-upload-DZJ0GptW.mjs +161 -0
- package/dist/index-Cd5F5D4a.mjs +423 -0
- package/dist/{index-BaixQptZ.mjs → index-CvZlFuc4.mjs} +63 -61
- package/dist/{index-BY5Djw_C.mjs → index-Cy9iOhxs.mjs} +138 -127
- package/dist/index-Cz0VExll.mjs +196 -0
- package/dist/index-D8h0lcNy.mjs +504 -0
- package/dist/{index-LOMCvxtf.mjs → index-XoL9Os_9.mjs} +57 -55
- package/dist/{index-Cz9Xj4Mn.mjs → index-qfyel9S8.mjs} +1 -1
- package/dist/{index-DrBtW9Aj.mjs → index-uqlBd_1I.mjs} +163 -176
- package/dist/index.mjs +128 -124
- package/dist/{index.vue_vue_type_script_setup_true_lang-C67sXgs5.mjs → index.vue_vue_type_script_setup_true_lang-MCS-o6Sy.mjs} +2 -2
- package/dist/{info-C3knY6l_.mjs → info-C821AMSV.mjs} +21 -21
- package/dist/info-CU4nIMVM.mjs +186 -0
- package/dist/{info-BUDmirQy.mjs → info-CXCnXNu4.mjs} +80 -58
- package/dist/info-CYDV3va6.mjs +209 -0
- package/dist/info-DPIIgRG8.mjs +209 -0
- package/dist/{info-D0Pwnmsu.mjs → info-DcUASS45.mjs} +13 -13
- package/dist/style.css +1 -1
- package/dts/api/dict.d.ts +7 -1
- package/dts/api/index.d.ts +6 -4
- package/dts/api/itsm-sys-org/types.d.ts +1 -0
- package/dts/api/itsm-sys-user-ext/types.d.ts +18 -14
- package/dts/constant.d.ts +13 -5
- package/dts/lang/itsmsys/en.d.ts +2 -2
- package/dts/lang/itsmsys/zh-cn.d.ts +12 -8
- package/package.json +1 -1
- package/dist/import-upload-BIT504-g.mjs +0 -4
- package/dist/import-upload-pZG8yku3.mjs +0 -4
- package/dist/import-upload.vue_vue_type_script_setup_true_lang-pjSs3v9e.mjs +0 -162
- package/dist/import-upload.vue_vue_type_script_setup_true_lang-tjMLoB_W.mjs +0 -162
- package/dist/index-CoMhbtrg.mjs +0 -449
- package/dist/index-DPz8be3T.mjs +0 -351
- package/dist/index-Dno_3GpX.mjs +0 -145
- package/dist/info-BivxW-qV.mjs +0 -187
- package/dist/info-Bn-BseIm.mjs +0 -187
- package/dist/info-C-ga_8K9.mjs +0 -176
package/dts/api/dict.d.ts
CHANGED
|
@@ -1,9 +1,15 @@
|
|
|
1
1
|
import { BizLayDict, type Entry, type LayEntry, BizDict } from "jmash-core";
|
|
2
2
|
import type { SysOrgModel } from "./itsm-sys-org/types";
|
|
3
3
|
export declare class ParentIdBizDict extends BizLayDict {
|
|
4
|
-
useValues(): Promise<LayEntry[]>;
|
|
4
|
+
useValues(excludeOrgId?: string): Promise<LayEntry[]>;
|
|
5
5
|
convertToLayEntryArray(dictLayEntries: SysOrgModel[]): LayEntry[];
|
|
6
6
|
}
|
|
7
7
|
export declare class SysOrgBizDict extends BizDict {
|
|
8
8
|
useValues(): Promise<Entry[]>;
|
|
9
9
|
}
|
|
10
|
+
export declare class DeptBizDict extends BizDict {
|
|
11
|
+
useValues(): Promise<Entry[]>;
|
|
12
|
+
}
|
|
13
|
+
export declare class JobBizDict extends BizDict {
|
|
14
|
+
useValues(): Promise<Entry[]>;
|
|
15
|
+
}
|
package/dts/api/index.d.ts
CHANGED
|
@@ -1,15 +1,17 @@
|
|
|
1
1
|
import { EnumDict, CustomBizDict } from "jmash-core";
|
|
2
|
-
import { ParentIdBizDict, SysOrgBizDict } from "./dict";
|
|
2
|
+
import { DeptBizDict, JobBizDict, ParentIdBizDict, SysOrgBizDict } from "./dict";
|
|
3
3
|
import { EntryDict } from "jmash-dict";
|
|
4
4
|
export declare class Dict {
|
|
5
5
|
static readonly hasStatusDict: CustomBizDict;
|
|
6
6
|
static readonly invoiceTypeDictEnum: EnumDict;
|
|
7
7
|
static readonly parentIdBizDict: ParentIdBizDict;
|
|
8
8
|
static readonly jobStatusDictEnum: EnumDict;
|
|
9
|
-
static readonly
|
|
9
|
+
static readonly engineerJobModeDictEnum: EnumDict;
|
|
10
10
|
static readonly genderDict: EnumDict;
|
|
11
|
-
static readonly
|
|
11
|
+
static readonly engineerTypeDictEnum: EnumDict;
|
|
12
12
|
static readonly sysOrgBizDict: SysOrgBizDict;
|
|
13
13
|
static readonly sysOutBizDict: SysOrgBizDict;
|
|
14
|
-
static readonly
|
|
14
|
+
static readonly engineerCertificateDict: EntryDict;
|
|
15
|
+
static readonly deptBizDict: DeptBizDict;
|
|
16
|
+
static readonly jobBizDict: JobBizDict;
|
|
15
17
|
}
|
|
@@ -6,10 +6,14 @@ export interface SysUserExtReq extends EntityReq {
|
|
|
6
6
|
hasUserType?: boolean;
|
|
7
7
|
jobStatus?: string;
|
|
8
8
|
hasJobStatus?: boolean;
|
|
9
|
-
|
|
10
|
-
|
|
9
|
+
engineerJobMode?: string;
|
|
10
|
+
hasEngineerJobMode?: boolean;
|
|
11
11
|
likeUserName?: string;
|
|
12
12
|
orgId?: string;
|
|
13
|
+
deptId?: string;
|
|
14
|
+
jobId?: string;
|
|
15
|
+
engineerType?: string;
|
|
16
|
+
hasEngineerType?: boolean;
|
|
13
17
|
}
|
|
14
18
|
export interface SysUserExtModel extends EntityModel {
|
|
15
19
|
userId?: string;
|
|
@@ -23,16 +27,16 @@ export interface SysUserExtModel extends EntityModel {
|
|
|
23
27
|
jobId?: string;
|
|
24
28
|
userType?: string;
|
|
25
29
|
jobStatus?: string;
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
30
|
+
engineerType?: string;
|
|
31
|
+
engineerSpecialty?: string;
|
|
32
|
+
engineerJobMode?: string;
|
|
29
33
|
idNo?: string;
|
|
30
34
|
idNoIns?: string;
|
|
31
35
|
orgId?: string;
|
|
32
36
|
userPassword?: string;
|
|
33
37
|
avatar?: string;
|
|
34
38
|
userCreateTime?: string;
|
|
35
|
-
|
|
39
|
+
engineerCertificate?: string;
|
|
36
40
|
orgIds?: Array<string>;
|
|
37
41
|
roleIds?: Array<string>;
|
|
38
42
|
loginName?: string;
|
|
@@ -66,13 +70,13 @@ export interface SysUserExtCreateReq extends EntityCreateReq {
|
|
|
66
70
|
jobId?: string;
|
|
67
71
|
userType?: string;
|
|
68
72
|
jobStatus?: string;
|
|
69
|
-
|
|
70
|
-
|
|
73
|
+
engineerType?: string;
|
|
74
|
+
engineerSpecialty?: string;
|
|
71
75
|
idNo?: string;
|
|
72
|
-
|
|
76
|
+
engineerJobMode?: string;
|
|
73
77
|
orgId?: string;
|
|
74
78
|
userPassword?: string;
|
|
75
|
-
|
|
79
|
+
engineerCertificate?: string;
|
|
76
80
|
orgIds?: Array<string>;
|
|
77
81
|
roleIds?: Array<string>;
|
|
78
82
|
loginName?: string;
|
|
@@ -88,13 +92,13 @@ export interface SysUserExtUpdateReq extends EntityUpdateReq {
|
|
|
88
92
|
jobId?: string;
|
|
89
93
|
userType?: string;
|
|
90
94
|
jobStatus?: string;
|
|
91
|
-
|
|
92
|
-
|
|
95
|
+
engineerType?: string;
|
|
96
|
+
engineerSpecialty?: string;
|
|
93
97
|
idNo?: string;
|
|
94
|
-
|
|
98
|
+
engineerJobMode?: string;
|
|
95
99
|
orgId?: string;
|
|
96
100
|
userPassword?: string;
|
|
97
|
-
|
|
101
|
+
engineerCertificate?: string;
|
|
98
102
|
orgIds?: Array<string>;
|
|
99
103
|
roleIds?: Array<string>;
|
|
100
104
|
loginName?: string;
|
package/dts/constant.d.ts
CHANGED
|
@@ -13,9 +13,9 @@ export declare class Constant {
|
|
|
13
13
|
}[]>;
|
|
14
14
|
static readonly ENUM_INVOICE_TYPE = "xyvcard.itsmsys.protobuf.InvoiceType";
|
|
15
15
|
static readonly ENUM_JOB_ATATUS = "xyvcard.itsmsys.protobuf.SysUserJobStatus";
|
|
16
|
-
static readonly
|
|
16
|
+
static readonly ENUM_ENGINEER_JOB_MODE = "xyvcard.itsmsys.protobuf.SysUserJobMode";
|
|
17
17
|
static readonly ENUM_GENDER = "jmash.protobuf.Gender";
|
|
18
|
-
static readonly
|
|
18
|
+
static readonly ENUM_ENGINEER_TYPE = "xyvcard.itsmsys.protobuf.SysEngineerType";
|
|
19
19
|
static readonly orgType: {
|
|
20
20
|
cloud: string;
|
|
21
21
|
hall: string;
|
|
@@ -30,12 +30,12 @@ export declare class Constant {
|
|
|
30
30
|
companyOps: string;
|
|
31
31
|
outsourceOps: string;
|
|
32
32
|
};
|
|
33
|
-
static readonly
|
|
33
|
+
static readonly engineerType: {
|
|
34
34
|
ease_test: string;
|
|
35
35
|
security_service: string;
|
|
36
36
|
password_ecaluation: string;
|
|
37
37
|
};
|
|
38
|
-
static readonly
|
|
38
|
+
static readonly engineerJobMode: {
|
|
39
39
|
resident: string;
|
|
40
40
|
remote: string;
|
|
41
41
|
};
|
|
@@ -43,5 +43,13 @@ export declare class Constant {
|
|
|
43
43
|
apiKey: string;
|
|
44
44
|
securityJsCode: string;
|
|
45
45
|
};
|
|
46
|
-
static readonly
|
|
46
|
+
static readonly DICT_ENGINEER_GRADE = "engineer_grade";
|
|
47
|
+
static readonly orderBy: {
|
|
48
|
+
orderName: string;
|
|
49
|
+
orderAsc: boolean;
|
|
50
|
+
};
|
|
51
|
+
static readonly taxRate: {
|
|
52
|
+
min: number;
|
|
53
|
+
max: number;
|
|
54
|
+
};
|
|
47
55
|
}
|
package/dts/lang/itsmsys/en.d.ts
CHANGED
|
@@ -18,6 +18,8 @@ declare const _default: {
|
|
|
18
18
|
contactPersonTel: string;
|
|
19
19
|
contactPersonTelRequired: string;
|
|
20
20
|
contactPersonTelRequireds: string;
|
|
21
|
+
geoLongitudeRequired: string;
|
|
22
|
+
geoLatitudeRequired: string;
|
|
21
23
|
};
|
|
22
24
|
sysOrgInvoice: {
|
|
23
25
|
invoiceType: string;
|
|
@@ -56,6 +58,8 @@ declare const _default: {
|
|
|
56
58
|
contactPersonTel: string;
|
|
57
59
|
contactPersonTelRequired: string;
|
|
58
60
|
contactPersonTelRequireds: string;
|
|
61
|
+
geoLongitudeRequired: string;
|
|
62
|
+
geoLatitudeRequired: string;
|
|
59
63
|
};
|
|
60
64
|
sysOut: {
|
|
61
65
|
contactPerson: string;
|
|
@@ -114,12 +118,12 @@ declare const _default: {
|
|
|
114
118
|
name: string;
|
|
115
119
|
realName: string;
|
|
116
120
|
realNameRequired: string;
|
|
117
|
-
|
|
118
|
-
|
|
121
|
+
engineerType: string;
|
|
122
|
+
engineerTypeRequired: string;
|
|
119
123
|
jobStatus: string;
|
|
120
124
|
jobStatusRequired: string;
|
|
121
|
-
|
|
122
|
-
|
|
125
|
+
engineerJobMode: string;
|
|
126
|
+
engineerJobModeRequired: string;
|
|
123
127
|
mobilePhone: string;
|
|
124
128
|
mobilePhoneRequired: string;
|
|
125
129
|
mobilePhoneRequireds: string;
|
|
@@ -133,16 +137,16 @@ declare const _default: {
|
|
|
133
137
|
idNo: string;
|
|
134
138
|
idNoRequired: string;
|
|
135
139
|
idNoLengthRequired: string;
|
|
136
|
-
|
|
137
|
-
|
|
140
|
+
engineerSpecialty: string;
|
|
141
|
+
engineerSpecialtyRequired: string;
|
|
138
142
|
orgId: string;
|
|
139
143
|
orgIdRequired: string;
|
|
140
144
|
userPassword: string;
|
|
141
145
|
userPasswordRequired: string;
|
|
142
146
|
randomPwd: string;
|
|
143
147
|
userCreateTime: string;
|
|
144
|
-
|
|
145
|
-
|
|
148
|
+
engineerCertificate: string;
|
|
149
|
+
engineerCertificateRequired: string;
|
|
146
150
|
loginName: string;
|
|
147
151
|
loginNameRequired: string;
|
|
148
152
|
};
|
package/package.json
CHANGED
|
@@ -1,162 +0,0 @@
|
|
|
1
|
-
import { defineComponent as z, ref as c, reactive as V, toRefs as A, resolveComponent as l, openBlock as H, createBlock as G, unref as h, isRef as J, withCtx as e, createElementVNode as s, createVNode as t, createTextVNode as u, toDisplayString as d } from "vue";
|
|
2
|
-
import { useI18n as K } from "vue-i18n";
|
|
3
|
-
import { ElMessage as m } from "element-plus";
|
|
4
|
-
import { fileApi as C, useUserStore as D } from "jmash-core";
|
|
5
|
-
import { D as I } from "./index-Dno_3GpX.mjs";
|
|
6
|
-
const L = { class: "el-upload__text" }, P = { style: { color: "var(--el-color-primary)" } }, Q = { class: "dialog-footer" }, oe = /* @__PURE__ */ z({
|
|
7
|
-
__name: "import-upload",
|
|
8
|
-
props: {
|
|
9
|
-
uploadVisible: {
|
|
10
|
-
type: Boolean,
|
|
11
|
-
default: () => !1
|
|
12
|
-
},
|
|
13
|
-
templateTitle: {
|
|
14
|
-
type: String,
|
|
15
|
-
default: ""
|
|
16
|
-
}
|
|
17
|
-
},
|
|
18
|
-
emits: ["templateDown", "importEvents", "uploadClosed"],
|
|
19
|
-
setup(f, { emit: w }) {
|
|
20
|
-
const { t: _ } = K();
|
|
21
|
-
I.sysOutBizDict.useValues();
|
|
22
|
-
const k = c(C.uploadUrl()), U = c(C.authHeader()), b = V({
|
|
23
|
-
tenant: D().user.tenant
|
|
24
|
-
}), $ = c(), a = V({
|
|
25
|
-
tenant: D().user.tenant,
|
|
26
|
-
requestId: Math.random() * 10 + "",
|
|
27
|
-
fileNames: "",
|
|
28
|
-
updateMask: "",
|
|
29
|
-
addFlag: !0,
|
|
30
|
-
// 必填项,true新增,false修改
|
|
31
|
-
orgId: ""
|
|
32
|
-
}), E = f, r = w, { uploadVisible: i } = A(E);
|
|
33
|
-
function N() {
|
|
34
|
-
r("templateDown");
|
|
35
|
-
}
|
|
36
|
-
function R(o) {
|
|
37
|
-
a.fileNames = o.fileSrc, a.addFlag = o.addFlag, a.fileNames && m({
|
|
38
|
-
message: _("common.uploadSuccess"),
|
|
39
|
-
type: "success"
|
|
40
|
-
});
|
|
41
|
-
}
|
|
42
|
-
const S = () => {
|
|
43
|
-
m.warning("当前限制选择 1 个文件");
|
|
44
|
-
};
|
|
45
|
-
function q() {
|
|
46
|
-
if (!a.orgId) {
|
|
47
|
-
m({
|
|
48
|
-
message: _("sysUserOps.orgIdRequired"),
|
|
49
|
-
type: "error"
|
|
50
|
-
});
|
|
51
|
-
return;
|
|
52
|
-
}
|
|
53
|
-
r("importEvents", a);
|
|
54
|
-
}
|
|
55
|
-
function g() {
|
|
56
|
-
r("uploadClosed");
|
|
57
|
-
}
|
|
58
|
-
return (o, n) => {
|
|
59
|
-
const y = l("el-col"), B = l("jmash-select"), F = l("el-form-item"), O = l("el-row"), x = l("upload-filled"), M = l("el-icon"), T = l("el-upload"), v = l("el-button"), j = l("el-dialog");
|
|
60
|
-
return H(), G(j, {
|
|
61
|
-
modelValue: h(i),
|
|
62
|
-
"onUpdate:modelValue": n[1] || (n[1] = (p) => J(i) ? i.value = p : null),
|
|
63
|
-
title: o.$t("common.uploadFiles"),
|
|
64
|
-
width: "500px",
|
|
65
|
-
onClose: g
|
|
66
|
-
}, {
|
|
67
|
-
footer: e(() => [
|
|
68
|
-
s("div", Q, [
|
|
69
|
-
t(v, { onClick: g }, {
|
|
70
|
-
default: e(() => [
|
|
71
|
-
u(d(o.$t("common.cancel")), 1)
|
|
72
|
-
]),
|
|
73
|
-
_: 1
|
|
74
|
-
}),
|
|
75
|
-
t(v, {
|
|
76
|
-
type: "primary",
|
|
77
|
-
onClick: q
|
|
78
|
-
}, {
|
|
79
|
-
default: e(() => [
|
|
80
|
-
u(d(o.$t("common.confirm")), 1)
|
|
81
|
-
]),
|
|
82
|
-
_: 1
|
|
83
|
-
})
|
|
84
|
-
])
|
|
85
|
-
]),
|
|
86
|
-
default: e(() => [
|
|
87
|
-
t(O, null, {
|
|
88
|
-
default: e(() => [
|
|
89
|
-
t(y, { span: 24 }, {
|
|
90
|
-
default: e(() => [
|
|
91
|
-
t(F, { prop: "orgId" }, {
|
|
92
|
-
default: e(() => [
|
|
93
|
-
t(y, { span: 4 }, {
|
|
94
|
-
default: e(() => [
|
|
95
|
-
n[2] || (n[2] = s("span", { class: "required_red" }, "*", -1)),
|
|
96
|
-
s("span", null, d(o.$t("sysUserOps.orgId")), 1)
|
|
97
|
-
]),
|
|
98
|
-
_: 1
|
|
99
|
-
}),
|
|
100
|
-
t(B, {
|
|
101
|
-
modelValue: a.orgId,
|
|
102
|
-
"onUpdate:modelValue": n[0] || (n[0] = (p) => a.orgId = p),
|
|
103
|
-
data: h(I).sysOutBizDict.values,
|
|
104
|
-
filterable: "",
|
|
105
|
-
"check-strictly": "",
|
|
106
|
-
clearable: "",
|
|
107
|
-
"render-after-expand": !1,
|
|
108
|
-
placeholder: o.$t("sysUserOps.orgIdRequired"),
|
|
109
|
-
class: "w-80"
|
|
110
|
-
}, null, 8, ["modelValue", "data", "placeholder"])
|
|
111
|
-
]),
|
|
112
|
-
_: 1
|
|
113
|
-
})
|
|
114
|
-
]),
|
|
115
|
-
_: 1
|
|
116
|
-
})
|
|
117
|
-
]),
|
|
118
|
-
_: 1
|
|
119
|
-
}),
|
|
120
|
-
t(T, {
|
|
121
|
-
ref_key: "uploadRef",
|
|
122
|
-
ref: $,
|
|
123
|
-
drag: "",
|
|
124
|
-
action: k.value,
|
|
125
|
-
headers: U.value,
|
|
126
|
-
data: b,
|
|
127
|
-
limit: 1,
|
|
128
|
-
"on-success": R,
|
|
129
|
-
"on-exceed": S,
|
|
130
|
-
style: { "margin-top": "20px" }
|
|
131
|
-
}, {
|
|
132
|
-
tip: e(() => [
|
|
133
|
-
s("div", {
|
|
134
|
-
class: "el-upload__tip",
|
|
135
|
-
onClick: N
|
|
136
|
-
}, [
|
|
137
|
-
s("a", P, d(f.templateTitle), 1)
|
|
138
|
-
])
|
|
139
|
-
]),
|
|
140
|
-
default: e(() => [
|
|
141
|
-
t(M, { class: "el-icon--upload" }, {
|
|
142
|
-
default: e(() => [
|
|
143
|
-
t(x)
|
|
144
|
-
]),
|
|
145
|
-
_: 1
|
|
146
|
-
}),
|
|
147
|
-
s("div", L, [
|
|
148
|
-
u(d(o.$t("common.dragFiles")) + " ", 1),
|
|
149
|
-
s("em", null, d(o.$t("common.uploadEvent")), 1)
|
|
150
|
-
])
|
|
151
|
-
]),
|
|
152
|
-
_: 1
|
|
153
|
-
}, 8, ["action", "headers", "data"])
|
|
154
|
-
]),
|
|
155
|
-
_: 1
|
|
156
|
-
}, 8, ["modelValue", "title"]);
|
|
157
|
-
};
|
|
158
|
-
}
|
|
159
|
-
});
|
|
160
|
-
export {
|
|
161
|
-
oe as _
|
|
162
|
-
};
|
|
@@ -1,162 +0,0 @@
|
|
|
1
|
-
import { defineComponent as z, ref as c, reactive as V, toRefs as A, resolveComponent as l, openBlock as H, createBlock as G, unref as h, isRef as J, withCtx as e, createElementVNode as s, createVNode as t, createTextVNode as u, toDisplayString as d } from "vue";
|
|
2
|
-
import { useI18n as K } from "vue-i18n";
|
|
3
|
-
import { ElMessage as m } from "element-plus";
|
|
4
|
-
import { fileApi as C, useUserStore as D } from "jmash-core";
|
|
5
|
-
import { D as I } from "./index-Dno_3GpX.mjs";
|
|
6
|
-
const L = { class: "el-upload__text" }, P = { style: { color: "var(--el-color-primary)" } }, Q = { class: "dialog-footer" }, oe = /* @__PURE__ */ z({
|
|
7
|
-
__name: "import-upload",
|
|
8
|
-
props: {
|
|
9
|
-
uploadVisible: {
|
|
10
|
-
type: Boolean,
|
|
11
|
-
default: () => !1
|
|
12
|
-
},
|
|
13
|
-
templateTitle: {
|
|
14
|
-
type: String,
|
|
15
|
-
default: ""
|
|
16
|
-
}
|
|
17
|
-
},
|
|
18
|
-
emits: ["templateDown", "importEvents", "uploadClosed"],
|
|
19
|
-
setup(f, { emit: w }) {
|
|
20
|
-
const { t: _ } = K();
|
|
21
|
-
I.sysOrgBizDict.useValues();
|
|
22
|
-
const k = c(C.uploadUrl()), U = c(C.authHeader()), b = V({
|
|
23
|
-
tenant: D().user.tenant
|
|
24
|
-
}), $ = c(), a = V({
|
|
25
|
-
tenant: D().user.tenant,
|
|
26
|
-
requestId: Math.random() * 10 + "",
|
|
27
|
-
fileNames: "",
|
|
28
|
-
updateMask: "",
|
|
29
|
-
addFlag: !0,
|
|
30
|
-
// 必填项,true新增,false修改
|
|
31
|
-
orgId: ""
|
|
32
|
-
}), E = f, r = w, { uploadVisible: i } = A(E);
|
|
33
|
-
function N() {
|
|
34
|
-
r("templateDown");
|
|
35
|
-
}
|
|
36
|
-
function R(o) {
|
|
37
|
-
a.fileNames = o.fileSrc, a.addFlag = o.addFlag, a.fileNames && m({
|
|
38
|
-
message: _("common.uploadSuccess"),
|
|
39
|
-
type: "success"
|
|
40
|
-
});
|
|
41
|
-
}
|
|
42
|
-
const S = () => {
|
|
43
|
-
m.warning("当前限制选择 1 个文件");
|
|
44
|
-
};
|
|
45
|
-
function q() {
|
|
46
|
-
if (!a.orgId) {
|
|
47
|
-
m({
|
|
48
|
-
message: _("sysUserOps.orgIdRequired"),
|
|
49
|
-
type: "error"
|
|
50
|
-
});
|
|
51
|
-
return;
|
|
52
|
-
}
|
|
53
|
-
r("importEvents", a);
|
|
54
|
-
}
|
|
55
|
-
function g() {
|
|
56
|
-
r("uploadClosed");
|
|
57
|
-
}
|
|
58
|
-
return (o, n) => {
|
|
59
|
-
const y = l("el-col"), B = l("jmash-select"), F = l("el-form-item"), O = l("el-row"), x = l("upload-filled"), M = l("el-icon"), T = l("el-upload"), v = l("el-button"), j = l("el-dialog");
|
|
60
|
-
return H(), G(j, {
|
|
61
|
-
modelValue: h(i),
|
|
62
|
-
"onUpdate:modelValue": n[1] || (n[1] = (p) => J(i) ? i.value = p : null),
|
|
63
|
-
title: o.$t("common.uploadFiles"),
|
|
64
|
-
width: "500px",
|
|
65
|
-
onClose: g
|
|
66
|
-
}, {
|
|
67
|
-
footer: e(() => [
|
|
68
|
-
s("div", Q, [
|
|
69
|
-
t(v, { onClick: g }, {
|
|
70
|
-
default: e(() => [
|
|
71
|
-
u(d(o.$t("common.cancel")), 1)
|
|
72
|
-
]),
|
|
73
|
-
_: 1
|
|
74
|
-
}),
|
|
75
|
-
t(v, {
|
|
76
|
-
type: "primary",
|
|
77
|
-
onClick: q
|
|
78
|
-
}, {
|
|
79
|
-
default: e(() => [
|
|
80
|
-
u(d(o.$t("common.confirm")), 1)
|
|
81
|
-
]),
|
|
82
|
-
_: 1
|
|
83
|
-
})
|
|
84
|
-
])
|
|
85
|
-
]),
|
|
86
|
-
default: e(() => [
|
|
87
|
-
t(O, null, {
|
|
88
|
-
default: e(() => [
|
|
89
|
-
t(y, { span: 24 }, {
|
|
90
|
-
default: e(() => [
|
|
91
|
-
t(F, { prop: "orgId" }, {
|
|
92
|
-
default: e(() => [
|
|
93
|
-
t(y, { span: 4 }, {
|
|
94
|
-
default: e(() => [
|
|
95
|
-
n[2] || (n[2] = s("span", { class: "required_red" }, "*", -1)),
|
|
96
|
-
s("span", null, d(o.$t("sysUserOps.orgId")), 1)
|
|
97
|
-
]),
|
|
98
|
-
_: 1
|
|
99
|
-
}),
|
|
100
|
-
t(B, {
|
|
101
|
-
modelValue: a.orgId,
|
|
102
|
-
"onUpdate:modelValue": n[0] || (n[0] = (p) => a.orgId = p),
|
|
103
|
-
data: h(I).sysOrgBizDict.values,
|
|
104
|
-
filterable: "",
|
|
105
|
-
"check-strictly": "",
|
|
106
|
-
clearable: "",
|
|
107
|
-
"render-after-expand": !1,
|
|
108
|
-
placeholder: o.$t("sysUserOps.orgIdRequired"),
|
|
109
|
-
class: "w-80"
|
|
110
|
-
}, null, 8, ["modelValue", "data", "placeholder"])
|
|
111
|
-
]),
|
|
112
|
-
_: 1
|
|
113
|
-
})
|
|
114
|
-
]),
|
|
115
|
-
_: 1
|
|
116
|
-
})
|
|
117
|
-
]),
|
|
118
|
-
_: 1
|
|
119
|
-
}),
|
|
120
|
-
t(T, {
|
|
121
|
-
ref_key: "uploadRef",
|
|
122
|
-
ref: $,
|
|
123
|
-
drag: "",
|
|
124
|
-
action: k.value,
|
|
125
|
-
headers: U.value,
|
|
126
|
-
data: b,
|
|
127
|
-
limit: 1,
|
|
128
|
-
"on-success": R,
|
|
129
|
-
"on-exceed": S,
|
|
130
|
-
style: { "margin-top": "20px" }
|
|
131
|
-
}, {
|
|
132
|
-
tip: e(() => [
|
|
133
|
-
s("div", {
|
|
134
|
-
class: "el-upload__tip",
|
|
135
|
-
onClick: N
|
|
136
|
-
}, [
|
|
137
|
-
s("a", P, d(f.templateTitle), 1)
|
|
138
|
-
])
|
|
139
|
-
]),
|
|
140
|
-
default: e(() => [
|
|
141
|
-
t(M, { class: "el-icon--upload" }, {
|
|
142
|
-
default: e(() => [
|
|
143
|
-
t(x)
|
|
144
|
-
]),
|
|
145
|
-
_: 1
|
|
146
|
-
}),
|
|
147
|
-
s("div", L, [
|
|
148
|
-
u(d(o.$t("common.dragFiles")) + " ", 1),
|
|
149
|
-
s("em", null, d(o.$t("common.uploadEvent")), 1)
|
|
150
|
-
])
|
|
151
|
-
]),
|
|
152
|
-
_: 1
|
|
153
|
-
}, 8, ["action", "headers", "data"])
|
|
154
|
-
]),
|
|
155
|
-
_: 1
|
|
156
|
-
}, 8, ["modelValue", "title"]);
|
|
157
|
-
};
|
|
158
|
-
}
|
|
159
|
-
});
|
|
160
|
-
export {
|
|
161
|
-
oe as _
|
|
162
|
-
};
|