@bytenew/bn-bus-ui 1.1.399
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/README.md +637 -0
- package/common.scss +715 -0
- package/dist/assocTableSearch-C9KUFIpd.js +349 -0
- package/dist/assocTableSearch.css +1 -0
- package/dist/bn-bus-ui.es.js +58 -0
- package/dist/bn-bus-ui.umd.js +42 -0
- package/dist/chooseIPaasData-Bfm58C-0.js +391 -0
- package/dist/chooseIPaasData.css +1 -0
- package/dist/defaultSet-BA11k622.js +322 -0
- package/dist/defaultSet.css +1 -0
- package/dist/fileFormData-D_Q1vylE.js +53 -0
- package/dist/formItemFooter-B3nlSwnS.js +108 -0
- package/dist/formItemFooter.css +1 -0
- package/dist/funcExprDialog-DeHPFa-L.js +139 -0
- package/dist/funcExprDialog.css +1 -0
- package/dist/index-B8KbssVN.js +45 -0
- package/dist/index-CTZ-0Tyh.js +45 -0
- package/dist/index-CZOFm8wK.js +135 -0
- package/dist/index-C_ix9-hS.js +44 -0
- package/dist/index-Cov88CtD.js +221 -0
- package/dist/index-DAtLc2a1.js +89 -0
- package/dist/index-DCbIfKgk.js +66 -0
- package/dist/index-DDy1d3BS.js +178 -0
- package/dist/index-DJ15iYPg.js +89 -0
- package/dist/index-DNHXG3dr.js +62 -0
- package/dist/index-Dg5V1uNO.js +740 -0
- package/dist/index-Dme97Hra.js +118 -0
- package/dist/index-DnzoAsk8.js +109 -0
- package/dist/index-DrngruPb.js +64 -0
- package/dist/index-Q08paoUN.js +51 -0
- package/dist/index-VbL1cqCu.js +58 -0
- package/dist/index-aooX1QXm.js +183 -0
- package/dist/index.css +1 -0
- package/dist/index2.css +1 -0
- package/dist/index3.css +1 -0
- package/dist/index4.css +1 -0
- package/dist/index5.css +1 -0
- package/dist/index6.css +1 -0
- package/dist/index7.css +1 -0
- package/dist/install-DSQCBsd_.js +19155 -0
- package/dist/install.css +1 -0
- package/dist/setOption-BOD7nAuG.js +329 -0
- package/dist/setOption.css +1 -0
- package/dist/setRelationOption-D7FqiLWj.js +5217 -0
- package/dist/setRelationOption.css +1 -0
- package/package.json +57 -0
|
@@ -0,0 +1,178 @@
|
|
|
1
|
+
import { a as b, f as I } from "./formItemFooter-B3nlSwnS.js";
|
|
2
|
+
import { _ as F, p as v } from "./install-DSQCBsd_.js";
|
|
3
|
+
import { f as w } from "./fileFormData-D_Q1vylE.js";
|
|
4
|
+
import { resolveComponent as o, openBlock as m, createElementBlock as y, createBlock as N, createCommentVNode as x, createElementVNode as a, createVNode as i, withCtx as V, createTextVNode as T, toDisplayString as r, withDirectives as B, vShow as C } from "vue";
|
|
5
|
+
const D = {
|
|
6
|
+
name: "FileForm",
|
|
7
|
+
components: { formItemFooter: I, formItemTop: b },
|
|
8
|
+
props: {
|
|
9
|
+
column: { type: Object, default: () => ({}) },
|
|
10
|
+
disabled: Boolean,
|
|
11
|
+
// 隐藏头部
|
|
12
|
+
hiddenTop: Boolean
|
|
13
|
+
},
|
|
14
|
+
data() {
|
|
15
|
+
return {
|
|
16
|
+
fileType: this.column.fileType || w,
|
|
17
|
+
pasteValue: "",
|
|
18
|
+
pasteImgList: [],
|
|
19
|
+
//用来存放粘贴的图片
|
|
20
|
+
// 上传进度
|
|
21
|
+
uploadProgress: 0,
|
|
22
|
+
uploadFileCount: 0,
|
|
23
|
+
//记录上传次数,限制最多上传5个
|
|
24
|
+
uploadFileNumber: this.column.uploadFileNumber || 10,
|
|
25
|
+
//可上传附件那个数
|
|
26
|
+
showLimit: 15,
|
|
27
|
+
//单文件最大M数
|
|
28
|
+
uploadAction: "/v2/attachment/upload",
|
|
29
|
+
uploadData: { source: "task" }
|
|
30
|
+
};
|
|
31
|
+
},
|
|
32
|
+
methods: {
|
|
33
|
+
/**
|
|
34
|
+
* 上传成功
|
|
35
|
+
* */
|
|
36
|
+
fileSuccess(t) {
|
|
37
|
+
if (this.column.error = "", this.uploadProgress = 0, t.code)
|
|
38
|
+
this.$message({
|
|
39
|
+
message: t.msg,
|
|
40
|
+
type: "warning"
|
|
41
|
+
});
|
|
42
|
+
else {
|
|
43
|
+
const e = {
|
|
44
|
+
title: t.data.fileName,
|
|
45
|
+
id: t.data.id,
|
|
46
|
+
code: t.data.id,
|
|
47
|
+
size: t.data.fileSize,
|
|
48
|
+
type: t.data.suffix,
|
|
49
|
+
url: t.data.url
|
|
50
|
+
};
|
|
51
|
+
this.column.value.length < this.uploadFileNumber ? (this.column.value.push(e), this.$emit("onChange", this.column)) : this.$message({
|
|
52
|
+
message: `上传文件个数不能超过${this.uploadFileNumber}个`,
|
|
53
|
+
type: "warning"
|
|
54
|
+
}), this.uploadFileCount = this.column.value.length;
|
|
55
|
+
}
|
|
56
|
+
},
|
|
57
|
+
/**
|
|
58
|
+
* 附件上传前
|
|
59
|
+
* */
|
|
60
|
+
beforeUpload(t) {
|
|
61
|
+
if (this.column.value.length >= this.uploadFileNumber)
|
|
62
|
+
return this.$message({
|
|
63
|
+
message: `上传文件个数不能超过${this.uploadFileNumber}个`,
|
|
64
|
+
type: "warning"
|
|
65
|
+
}), !1;
|
|
66
|
+
const e = 50, s = 1048576 * e;
|
|
67
|
+
if (t.size > s)
|
|
68
|
+
return this.$message({
|
|
69
|
+
message: `上传文件大小不能超出${e}MB`,
|
|
70
|
+
type: "warning"
|
|
71
|
+
}), !1;
|
|
72
|
+
const u = t.name.split(".").pop().toLowerCase();
|
|
73
|
+
return this.fileType.includes(u) ? (this.uploadFileCount++, !0) : (this.$message({
|
|
74
|
+
message: "上传的文件格式不支持",
|
|
75
|
+
type: "warning"
|
|
76
|
+
}), !1);
|
|
77
|
+
},
|
|
78
|
+
handleUploadProgress(t) {
|
|
79
|
+
this.uploadProgress = Math.round(t.percent);
|
|
80
|
+
},
|
|
81
|
+
//粘贴图片到编辑器,事件处理方法,主要用于事件销毁
|
|
82
|
+
pasteEvent(t) {
|
|
83
|
+
if (this.column.value.length >= this.uploadFileNumber)
|
|
84
|
+
return this.$message({
|
|
85
|
+
message: `上传文件个数不能超过${this.uploadFileNumber}个`,
|
|
86
|
+
type: "warning"
|
|
87
|
+
}), !1;
|
|
88
|
+
this.column.error = "", this.pasteImgList.push(t), v(t, this.column.pathUrl || this.uploadAction).then((e) => {
|
|
89
|
+
if (e.code)
|
|
90
|
+
this.$message({
|
|
91
|
+
message: e.msg,
|
|
92
|
+
type: "warning"
|
|
93
|
+
});
|
|
94
|
+
else {
|
|
95
|
+
const s = {
|
|
96
|
+
title: e.data.fileName,
|
|
97
|
+
id: e.data.id,
|
|
98
|
+
code: e.data.id,
|
|
99
|
+
size: e.data.fileSize,
|
|
100
|
+
type: e.data.suffix,
|
|
101
|
+
url: e.data.url
|
|
102
|
+
};
|
|
103
|
+
this.column.value.push(s), this.$emit("onChange", this.column), this.column.value.length >= this.uploadFileNumber && (this.pasteImgList = []);
|
|
104
|
+
}
|
|
105
|
+
});
|
|
106
|
+
}
|
|
107
|
+
},
|
|
108
|
+
mounted() {
|
|
109
|
+
this.$refs.pasteImgInput && this.$refs.pasteImgInput.$el && this.$refs.pasteImgInput.$el.addEventListener("paste", this.pasteEvent);
|
|
110
|
+
},
|
|
111
|
+
//实例销毁前
|
|
112
|
+
beforeDestroy() {
|
|
113
|
+
this.$refs.pasteImgInput && this.$refs.pasteImgInput.$el && this.$refs.pasteImgInput.$el.removeEventListener(
|
|
114
|
+
"paste",
|
|
115
|
+
this.pasteEvent
|
|
116
|
+
);
|
|
117
|
+
}
|
|
118
|
+
}, U = { class: "fileForm" }, E = { class: "" }, L = { class: "fileForm-tip" };
|
|
119
|
+
function S(t, e, s, u, l, n) {
|
|
120
|
+
const p = o("formItemTop"), d = o("el-upload"), c = o("el-input"), h = o("el-progress"), f = o("BnFileView"), g = o("formItemFooter");
|
|
121
|
+
return m(), y("div", U, [
|
|
122
|
+
s.hiddenTop ? x("", !0) : (m(), N(p, {
|
|
123
|
+
key: 0,
|
|
124
|
+
column: s.column
|
|
125
|
+
}, null, 8, ["column"])),
|
|
126
|
+
a("div", E, [
|
|
127
|
+
i(d, {
|
|
128
|
+
class: "fileForm-upload",
|
|
129
|
+
ref: "uploadInput",
|
|
130
|
+
drag: "",
|
|
131
|
+
action: s.column.pathUrl || l.uploadAction,
|
|
132
|
+
"show-file-list": !1,
|
|
133
|
+
disabled: s.disabled,
|
|
134
|
+
"before-upload": n.beforeUpload,
|
|
135
|
+
multiple: "",
|
|
136
|
+
data: l.uploadData,
|
|
137
|
+
"on-progress": n.handleUploadProgress,
|
|
138
|
+
"on-success": n.fileSuccess
|
|
139
|
+
}, {
|
|
140
|
+
default: V(() => [...e[1] || (e[1] = [
|
|
141
|
+
a("div", { class: "fileForm-btn" }, [
|
|
142
|
+
a("span", { class: "bnUIcon bnUIcon-upload" }),
|
|
143
|
+
T(" 选择或拖拽上传文件 ")
|
|
144
|
+
], -1)
|
|
145
|
+
])]),
|
|
146
|
+
_: 1
|
|
147
|
+
}, 8, ["action", "disabled", "before-upload", "data", "on-progress", "on-success"]),
|
|
148
|
+
i(c, {
|
|
149
|
+
modelValue: l.pasteValue,
|
|
150
|
+
"onUpdate:modelValue": e[0] || (e[0] = (_) => l.pasteValue = _),
|
|
151
|
+
ref: "pasteImgInput",
|
|
152
|
+
placeholder: "复制粘贴上传截图",
|
|
153
|
+
class: "fileForm-input",
|
|
154
|
+
disabled: s.disabled
|
|
155
|
+
}, null, 8, ["modelValue", "disabled"]),
|
|
156
|
+
a("span", L, "最多可上传" + r(l.uploadFileNumber) + "个文件,单个文件不超过" + r(l.showLimit) + "M", 1)
|
|
157
|
+
]),
|
|
158
|
+
B(i(h, {
|
|
159
|
+
style: { width: "100%", "max-width": "444px" },
|
|
160
|
+
percentage: l.uploadProgress,
|
|
161
|
+
class: "fileForm-progress"
|
|
162
|
+
}, null, 8, ["percentage"]), [
|
|
163
|
+
[C, l.uploadProgress > 0]
|
|
164
|
+
]),
|
|
165
|
+
a("div", null, [
|
|
166
|
+
i(f, {
|
|
167
|
+
"file-list": s.column.value,
|
|
168
|
+
isDel: !s.disabled,
|
|
169
|
+
row: "2"
|
|
170
|
+
}, null, 8, ["file-list", "isDel"])
|
|
171
|
+
]),
|
|
172
|
+
i(g, { column: s.column }, null, 8, ["column"])
|
|
173
|
+
]);
|
|
174
|
+
}
|
|
175
|
+
const A = /* @__PURE__ */ F(D, [["render", S], ["__scopeId", "data-v-ce213ba4"]]);
|
|
176
|
+
export {
|
|
177
|
+
A as default
|
|
178
|
+
};
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import { debounce as h } from "lodash";
|
|
2
|
+
import { f, a as _ } from "./formItemFooter-B3nlSwnS.js";
|
|
3
|
+
import { B as p } from "./index-DAtLc2a1.js";
|
|
4
|
+
import { resolveComponent as l, openBlock as C, createElementBlock as F, createVNode as u, createElementVNode as s } from "vue";
|
|
5
|
+
import { _ as B } from "./install-DSQCBsd_.js";
|
|
6
|
+
const b = {
|
|
7
|
+
name: "addressForm",
|
|
8
|
+
components: { BnAddressParse: p, formItemTop: _, formItemFooter: f },
|
|
9
|
+
props: {
|
|
10
|
+
column: Object,
|
|
11
|
+
disabled: Boolean,
|
|
12
|
+
postFunc: Function
|
|
13
|
+
},
|
|
14
|
+
methods: {
|
|
15
|
+
/**
|
|
16
|
+
* 输入框输入事件
|
|
17
|
+
* */
|
|
18
|
+
onInput(n) {
|
|
19
|
+
this.column.error = "", this.column.warning = "", this.$emit("onInput", this.column), this.onChange(n);
|
|
20
|
+
},
|
|
21
|
+
/**
|
|
22
|
+
* 输入框Change事件
|
|
23
|
+
* @param {String} type 是否是其他事件类型
|
|
24
|
+
* */
|
|
25
|
+
onChange: h(function(n, e) {
|
|
26
|
+
this.column.error = "", this.column.warning = "", this.$emit("onChange", this.column);
|
|
27
|
+
}, 600),
|
|
28
|
+
/**
|
|
29
|
+
* 输入框onFocus事件
|
|
30
|
+
* */
|
|
31
|
+
onFocus(n) {
|
|
32
|
+
this.$emit("focus", this.column);
|
|
33
|
+
},
|
|
34
|
+
/**
|
|
35
|
+
* 输入框失去焦点事件
|
|
36
|
+
* */
|
|
37
|
+
onBlur() {
|
|
38
|
+
this.$emit("blur", this.column);
|
|
39
|
+
},
|
|
40
|
+
/**
|
|
41
|
+
*自动识别
|
|
42
|
+
* */
|
|
43
|
+
autoParse(n) {
|
|
44
|
+
this.column.value[this.column.moduleDefinition[0].columnCode] = n.address, this.column.value[this.column.moduleDefinition[1].columnCode] = n.detail || "", this.onChange();
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
}, w = { class: "w-default-wrap" }, g = { class: "w-default-wrap w-margin-bottom10" }, v = { class: "w-default-wrap" };
|
|
48
|
+
function I(n, e, o, V, D, t) {
|
|
49
|
+
const c = l("formItemTop"), a = l("BnAddressParse"), d = l("BnAddress"), i = l("el-input"), r = l("formItemFooter");
|
|
50
|
+
return C(), F("div", w, [
|
|
51
|
+
u(c, { column: o.column }, null, 8, ["column"]),
|
|
52
|
+
u(a, {
|
|
53
|
+
onParse: t.autoParse,
|
|
54
|
+
"post-func": o.postFunc
|
|
55
|
+
}, null, 8, ["onParse", "post-func"]),
|
|
56
|
+
s("div", g, [
|
|
57
|
+
u(d, {
|
|
58
|
+
modelValue: o.column.value[o.column.moduleDefinition[0].columnCode],
|
|
59
|
+
"onUpdate:modelValue": e[0] || (e[0] = (m) => o.column.value[o.column.moduleDefinition[0].columnCode] = m),
|
|
60
|
+
postFunc: o.postFunc,
|
|
61
|
+
onChange: t.onChange,
|
|
62
|
+
"value-key": "code",
|
|
63
|
+
pathUrl: o.column.pathUrl || "/address/getAreaDataList",
|
|
64
|
+
disabled: o.disabled
|
|
65
|
+
}, null, 8, ["modelValue", "postFunc", "onChange", "pathUrl", "disabled"])
|
|
66
|
+
]),
|
|
67
|
+
s("div", v, [
|
|
68
|
+
u(i, {
|
|
69
|
+
modelValue: o.column.value[o.column.moduleDefinition[1].columnCode],
|
|
70
|
+
"onUpdate:modelValue": e[1] || (e[1] = (m) => o.column.value[o.column.moduleDefinition[1].columnCode] = m),
|
|
71
|
+
type: "textarea",
|
|
72
|
+
rows: 3,
|
|
73
|
+
disabled: o.disabled,
|
|
74
|
+
resize: "none",
|
|
75
|
+
placeholder: "输入详细地址",
|
|
76
|
+
onInput: t.onInput,
|
|
77
|
+
onFocus: t.onFocus,
|
|
78
|
+
onBlur: t.onBlur,
|
|
79
|
+
clearable: "",
|
|
80
|
+
"show-word-limit": ""
|
|
81
|
+
}, null, 8, ["modelValue", "disabled", "onInput", "onFocus", "onBlur"])
|
|
82
|
+
]),
|
|
83
|
+
u(r, { column: o.column }, null, 8, ["column"])
|
|
84
|
+
]);
|
|
85
|
+
}
|
|
86
|
+
const y = /* @__PURE__ */ B(b, [["render", I]]);
|
|
87
|
+
export {
|
|
88
|
+
y as default
|
|
89
|
+
};
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { a as u, f as s } from "./formItemFooter-B3nlSwnS.js";
|
|
2
|
+
import { resolveComponent as n, openBlock as d, createElementBlock as f, createVNode as l, createElementVNode as p } from "vue";
|
|
3
|
+
import { _ as h } from "./install-DSQCBsd_.js";
|
|
4
|
+
const _ = {
|
|
5
|
+
name: "relationForm",
|
|
6
|
+
components: { formItemFooter: s, formItemTop: u },
|
|
7
|
+
props: {
|
|
8
|
+
column: {
|
|
9
|
+
type: Object,
|
|
10
|
+
default: function() {
|
|
11
|
+
return {};
|
|
12
|
+
}
|
|
13
|
+
},
|
|
14
|
+
disabled: Boolean,
|
|
15
|
+
// 接口请求外部转发
|
|
16
|
+
postFunc: Function
|
|
17
|
+
},
|
|
18
|
+
computed: {
|
|
19
|
+
/**
|
|
20
|
+
* 过滤后的选项列表,只保留columnStatus等于1的项
|
|
21
|
+
*/
|
|
22
|
+
filteredOptions() {
|
|
23
|
+
if (!this.column.moduleDefinition || !this.column.moduleDefinition.optionList)
|
|
24
|
+
return [];
|
|
25
|
+
const o = (t) => Array.isArray(t) ? t.filter((e) => e.columnStatus != 1 ? !1 : (e.children && Array.isArray(e.children) && (e.children = o(e.children)), !0)) : [];
|
|
26
|
+
return o(this.column.moduleDefinition.optionList);
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
methods: {
|
|
30
|
+
/**
|
|
31
|
+
* 组件值发生变化
|
|
32
|
+
* */
|
|
33
|
+
changeValue() {
|
|
34
|
+
this.column.error = "", this.column.warning = "", this.$emit("onChange", this.column);
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
}, b = { class: "w-default-wrap" }, y = { class: "w-default-wrap" };
|
|
38
|
+
function g(o, t, e, v, V, r) {
|
|
39
|
+
const i = n("formItemTop"), m = n("BnRelation"), c = n("formItemFooter");
|
|
40
|
+
return d(), f("div", b, [
|
|
41
|
+
l(i, { column: e.column }, null, 8, ["column"]),
|
|
42
|
+
p("div", y, [
|
|
43
|
+
l(m, {
|
|
44
|
+
onChange: r.changeValue,
|
|
45
|
+
options: r.filteredOptions,
|
|
46
|
+
style: { width: "100%" },
|
|
47
|
+
props: { checkStrictly: !0, value: "code", label: "title" },
|
|
48
|
+
modelValue: e.column.value,
|
|
49
|
+
"onUpdate:modelValue": t[0] || (t[0] = (a) => e.column.value = a),
|
|
50
|
+
multiple: e.column.behaviorType == 20,
|
|
51
|
+
filterable: "",
|
|
52
|
+
disabled: e.disabled,
|
|
53
|
+
collapseTags: !1
|
|
54
|
+
}, null, 8, ["onChange", "options", "modelValue", "multiple", "disabled"])
|
|
55
|
+
]),
|
|
56
|
+
l(c, { column: e.column }, null, 8, ["column"])
|
|
57
|
+
]);
|
|
58
|
+
}
|
|
59
|
+
const T = /* @__PURE__ */ h(_, [["render", g]]);
|
|
60
|
+
export {
|
|
61
|
+
T as default
|
|
62
|
+
};
|