china-mobile-international-custom-components 0.0.41 → 0.0.43
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/ApplicationTypeTag.mjs +1 -1
- package/es/AutoShowTooltip.mjs +90 -0
- package/es/AvailableRangePreview.mjs +1 -1
- package/es/AvailableRangeSetting.mjs +266 -11
- package/es/CommonTagsList.mjs +200 -0
- package/es/DialogContainer.mjs +128 -0
- package/es/FileUploader.mjs +255 -0
- package/es/ParameterTable.mjs +2288 -0
- package/es/SourcePublish.mjs +475 -833
- package/es/Table.mjs +2 -2
- package/es/assets/AutoShowTooltip.css +1 -0
- package/es/assets/AvailableRangeSetting.css +1 -0
- package/es/assets/CommonTagsList.css +1 -0
- package/es/assets/DialogContainer.css +1 -0
- package/es/assets/FileUploader.css +1 -0
- package/es/assets/ParameterTable.css +1 -0
- package/es/assets/SourcePublish.css +1 -1
- package/es/assets/index2.css +1 -1
- package/es/chunks/{BackBar.zjPh_z_w.js → BackBar.DY42HcZy.js} +33 -33
- package/es/chunks/{BackBar.C3Tp-e_K.js → BackBar.eaUb1JvV.js} +98 -98
- package/es/chunks/config.CyAT4SUn.js +435 -0
- package/es/chunks/config.JrGX09T5.js +435 -0
- package/es/chunks/i18n.Bd7hh14j.js +4026 -0
- package/es/chunks/{i18n.BNeBD4gR.js → i18n.CfMhDOdX.js} +6 -6
- package/es/chunks/{index.DENagLDS.js → index.CHlFhI6c.js} +2 -2
- package/es/chunks/index.DjDvyGXt.js +313 -0
- package/es/chunks/layout.B1qqvrXz.js +639 -0
- package/es/chunks/request.24c3shPx.js +5 -0
- package/es/index.mjs +184 -130
- package/lib/ApplicationTypeTag.js +1 -1
- package/lib/AutoShowTooltip.js +1 -0
- package/lib/AvailableRangePreview.js +1 -1
- package/lib/AvailableRangeSetting.js +1 -1
- package/lib/CommonTagsList.js +1 -0
- package/lib/DialogContainer.js +1 -0
- package/lib/FileUploader.js +1 -0
- package/lib/ParameterTable.js +1 -0
- package/lib/SourcePublish.js +1 -1
- package/lib/Table.js +1 -1
- package/lib/assets/AutoShowTooltip.css +1 -0
- package/lib/assets/AvailableRangeSetting.css +1 -0
- package/lib/assets/CommonTagsList.css +1 -0
- package/lib/assets/DialogContainer.css +1 -0
- package/lib/assets/FileUploader.css +1 -0
- package/lib/assets/ParameterTable.css +1 -0
- package/lib/assets/SourcePublish.css +1 -1
- package/lib/assets/index2.css +1 -1
- package/lib/chunks/{BackBar.BL8repFN.js → BackBar.By7ouDgL.js} +1 -1
- package/lib/chunks/BackBar.CaaASGvb.js +1 -0
- package/lib/chunks/config.BInpXFGZ.js +1 -0
- package/lib/chunks/config.CL0cmPQ6.js +1 -0
- package/lib/chunks/i18n.D3L1FBDI.js +6 -0
- package/lib/chunks/index.D-pFPuUr.js +1 -0
- package/lib/chunks/{index.5Su4CrC-.js → index.zQ1SfvBa.js} +1 -1
- package/lib/chunks/layout.Cen7E9tF.js +1 -0
- package/lib/chunks/request.D8T4MgGX.js +1 -0
- package/lib/index.js +1 -1
- package/package.json +3 -3
- package/es/BackBar.mjs +0 -49
- package/es/assets/AiboxTable.css +0 -1
- package/es/assets/index3.css +0 -1
- package/es/chunks/AiboxTable.feSxtxGI.js +0 -563
- package/es/chunks/BackBar.DE2EjQfI.js +0 -606
- package/es/chunks/index.CSPp4g5C.js +0 -303
- package/es/chunks/index.D1cu8OUn.js +0 -260
- package/es/chunks/index.Doax01RQ.js +0 -254
- package/lib/BackBar.js +0 -1
- package/lib/assets/AiboxTable.css +0 -1
- package/lib/assets/index3.css +0 -1
- package/lib/chunks/AiboxTable.DdCYg_mt.js +0 -1
- package/lib/chunks/BackBar.CpYFuBeN.js +0 -1
- package/lib/chunks/BackBar.DcGRWfNN.js +0 -1
- package/lib/chunks/index.6X8xsqRJ.js +0 -1
- package/lib/chunks/index.B_esKpWv.js +0 -1
- package/lib/chunks/index.CP9rhXZ5.js +0 -1
|
@@ -0,0 +1,2288 @@
|
|
|
1
|
+
import { w as Qe } from "./chunks/index.bCzIhWFw.js";
|
|
2
|
+
import { ref as te, onMounted as Ke, resolveComponent as we, createBlock as H, openBlock as g, unref as e, withCtx as A, createVNode as v, createCommentVNode as $, createTextVNode as q, toDisplayString as F, createElementVNode as j, computed as h, provide as Ze, inject as et, watch as pe, createElementBlock as W, Fragment as ae, renderList as Ie, mergeModels as ie, useModel as fe, normalizeClass as ee, nextTick as ve, createSlots as tt } from "vue";
|
|
3
|
+
import { ElIcon as Y, ElInput as Z, ElButton as oe, ElTooltip as Oe, ElSelect as Ae, ElOption as re, ElDatePicker as lt, ElTag as at, ElMessage as nt, ElCheckbox as Ue } from "element-plus";
|
|
4
|
+
import { IconUpload2 as he, Error as ge, IconScene as rt, IconAdd2 as ot, IconZuoCopyCopy as Se, IconZuoCopy as Be, IconDelete2 as it, IconAdd as st, IconTip as be } from "color-message-aibox-vue";
|
|
5
|
+
import { useDialog as ut, DialogContainer as dt } from "./DialogContainer.mjs";
|
|
6
|
+
import { AiboxTable as ke } from "./Table.mjs";
|
|
7
|
+
import { u as ne, g as X } from "./chunks/i18n.Bd7hh14j.js";
|
|
8
|
+
import { _ as ue } from "./chunks/_plugin-vue_export-helper.CHgC5LLL.js";
|
|
9
|
+
import { FileUploader as Le, getWarnTips as Ne, getAcceptType as Ce, UploadTypesEnum as Re } from "./FileUploader.mjs";
|
|
10
|
+
import { AutoShowTooltip as Pe } from "./AutoShowTooltip.mjs";
|
|
11
|
+
import './assets/ParameterTable.css';const ct = { class: "action-header" }, pt = { class: "dialog-footer" }, mt = {
|
|
12
|
+
__name: "OptionValue",
|
|
13
|
+
emits: ["createOption"],
|
|
14
|
+
setup(i, { expose: r, emit: a }) {
|
|
15
|
+
const { t: l } = ne(), { dialogRef: w, showDialog: f, hideDialog: p } = ut(), _ = te(1), C = te([
|
|
16
|
+
{
|
|
17
|
+
label: "",
|
|
18
|
+
value: ""
|
|
19
|
+
}
|
|
20
|
+
]), O = te([
|
|
21
|
+
{
|
|
22
|
+
label: l("COMMON_OPTIONVALUE.LABEL_INDEX"),
|
|
23
|
+
//序号
|
|
24
|
+
slot: "serialNumber"
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
label: l("COMMON_OPTIONVALUE.LABEL_API_VALUE"),
|
|
28
|
+
// api接口原值
|
|
29
|
+
slot: "value",
|
|
30
|
+
minWidth: 150
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
label: l("COMMON_OPTIONVALUE.LABEL_OPTION_DISPLAY_VALUE"),
|
|
34
|
+
//选项对应显示值
|
|
35
|
+
slot: "label",
|
|
36
|
+
minWidth: 200,
|
|
37
|
+
headerSlot: "nowValue"
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
label: l("COMMON_OPTIONVALUE.LABEL_OPERATION"),
|
|
41
|
+
slot: "action",
|
|
42
|
+
fixed: "right",
|
|
43
|
+
minWidth: 100,
|
|
44
|
+
headerSlot: "actionHeader"
|
|
45
|
+
}
|
|
46
|
+
]), m = te({}), P = () => {
|
|
47
|
+
C.value.push({
|
|
48
|
+
label: "",
|
|
49
|
+
value: ""
|
|
50
|
+
}), _.value = C.value.length;
|
|
51
|
+
}, D = (d) => {
|
|
52
|
+
console.log("option数据", d), m.value = d, d["extend-widget-item"] && d["extend-widget-item"] != "" ? C.value = JSON.parse(d["extend-widget-item"]) : C.value = [
|
|
53
|
+
{
|
|
54
|
+
label: "",
|
|
55
|
+
value: ""
|
|
56
|
+
}
|
|
57
|
+
], f();
|
|
58
|
+
}, T = () => {
|
|
59
|
+
p();
|
|
60
|
+
}, M = (d) => {
|
|
61
|
+
C.value.splice(d, 1);
|
|
62
|
+
}, b = a, L = () => {
|
|
63
|
+
const d = C.value.filter(
|
|
64
|
+
(o) => o.label.trim() !== "" || o.value.trim() !== ""
|
|
65
|
+
);
|
|
66
|
+
for (let o of d)
|
|
67
|
+
if (o.label.trim() === "" || o.value.trim() === "") {
|
|
68
|
+
ElMessage.error(l("COMMON_OPTIONVALUE.LABEL_OPTION_VALUE_REQUIRED"));
|
|
69
|
+
return;
|
|
70
|
+
}
|
|
71
|
+
if (d.length === 0) {
|
|
72
|
+
ElMessage.error(l("COMMON_OPTIONVALUE.LABEL_OPTION_VALUE_REQUIRED_TIP"));
|
|
73
|
+
return;
|
|
74
|
+
}
|
|
75
|
+
let u = {
|
|
76
|
+
uiid: m.value.uiid,
|
|
77
|
+
data: JSON.stringify(d)
|
|
78
|
+
};
|
|
79
|
+
b("createOption", u), p();
|
|
80
|
+
};
|
|
81
|
+
return r({ showOption: D, hideOption: T }), Ke(() => {
|
|
82
|
+
}), (d, u) => {
|
|
83
|
+
const o = we("IconQuery"), s = we("Error");
|
|
84
|
+
return g(), H(e(dt), {
|
|
85
|
+
title: e(l)("COMMON_OPTIONVALUE.LABEL_OPTION_VALUE_SETTING"),
|
|
86
|
+
width: "820px",
|
|
87
|
+
ref_key: "dialogRef",
|
|
88
|
+
ref: w
|
|
89
|
+
}, {
|
|
90
|
+
footer: A(() => [
|
|
91
|
+
j("div", pt, [
|
|
92
|
+
v(e(oe), { onClick: e(p) }, {
|
|
93
|
+
default: A(() => [
|
|
94
|
+
q(F(e(l)("COMMON_BUTTON.CANCEL_TEXT")), 1)
|
|
95
|
+
]),
|
|
96
|
+
_: 1
|
|
97
|
+
}, 8, ["onClick"]),
|
|
98
|
+
v(e(oe), {
|
|
99
|
+
type: "primary",
|
|
100
|
+
onClick: L
|
|
101
|
+
}, {
|
|
102
|
+
default: A(() => [
|
|
103
|
+
q(F(e(l)("COMMON_BUTTON.CONFIRM_AFFIRM")), 1)
|
|
104
|
+
]),
|
|
105
|
+
_: 1
|
|
106
|
+
})
|
|
107
|
+
])
|
|
108
|
+
]),
|
|
109
|
+
default: A(() => [
|
|
110
|
+
v(e(ke), {
|
|
111
|
+
columns: O.value,
|
|
112
|
+
data: C.value,
|
|
113
|
+
hasPage: !1,
|
|
114
|
+
total: _.value
|
|
115
|
+
}, {
|
|
116
|
+
nowValue: A(() => [
|
|
117
|
+
q(F(e(l)("COMMON_OPTIONVALUE.LABEL_OPTION_VALUE")) + " ", 1),
|
|
118
|
+
v(e(Oe), {
|
|
119
|
+
placement: "top",
|
|
120
|
+
"max-width": 50
|
|
121
|
+
}, {
|
|
122
|
+
content: A(() => [
|
|
123
|
+
q(F(e(l)("COMMON_OPTIONVALUE.LABEL_OPTION_VALUE_TIP")), 1),
|
|
124
|
+
u[0] || (u[0] = j("br", null, null, -1)),
|
|
125
|
+
q(" " + F(e(l)("COMMON_OPTIONVALUE.LABEL_OPTION_VALUE_EXAMPLE")), 1),
|
|
126
|
+
u[1] || (u[1] = j("br", null, null, -1)),
|
|
127
|
+
q(" " + F(e(l)("COMMON_OPTIONVALUE.LABEL_OPTION_EXAMPLE")), 1),
|
|
128
|
+
u[2] || (u[2] = j("br", null, null, -1)),
|
|
129
|
+
q(" " + F(e(l)("COMMON_OPTIONVALUE.LABEL_OPTION_EXAMPLE_2")), 1),
|
|
130
|
+
u[3] || (u[3] = j("br", null, null, -1))
|
|
131
|
+
]),
|
|
132
|
+
default: A(() => [
|
|
133
|
+
v(e(Y), { style: { "margin-left": "5px", cursor: "pointer" } }, {
|
|
134
|
+
default: A(() => [
|
|
135
|
+
v(o)
|
|
136
|
+
]),
|
|
137
|
+
_: 1
|
|
138
|
+
})
|
|
139
|
+
]),
|
|
140
|
+
_: 1
|
|
141
|
+
})
|
|
142
|
+
]),
|
|
143
|
+
actionHeader: A(() => [
|
|
144
|
+
j("div", ct, [
|
|
145
|
+
j("span", null, F(e(l)("COMMON_OPTIONVALUE.LABEL_OPERATION")), 1),
|
|
146
|
+
v(e(oe), {
|
|
147
|
+
type: "primary",
|
|
148
|
+
size: "small",
|
|
149
|
+
onClick: P,
|
|
150
|
+
icon: "IconAdd"
|
|
151
|
+
}, {
|
|
152
|
+
default: A(() => [
|
|
153
|
+
q(F(e(l)("COMMON_BUTTON.ADD_NEW_TEXT")), 1)
|
|
154
|
+
]),
|
|
155
|
+
_: 1
|
|
156
|
+
})
|
|
157
|
+
])
|
|
158
|
+
]),
|
|
159
|
+
serialNumber: A((E) => [
|
|
160
|
+
q(F(E.index + 1), 1)
|
|
161
|
+
]),
|
|
162
|
+
label: A((E) => [
|
|
163
|
+
v(e(Z), {
|
|
164
|
+
modelValue: E.row.label,
|
|
165
|
+
"onUpdate:modelValue": (N) => E.row.label = N,
|
|
166
|
+
style: { width: "100%" },
|
|
167
|
+
placeholder: e(l)("COMMON_DATA.PLACEHOLDER_INPUT")
|
|
168
|
+
}, null, 8, ["modelValue", "onUpdate:modelValue", "placeholder"])
|
|
169
|
+
]),
|
|
170
|
+
value: A((E) => [
|
|
171
|
+
v(e(Z), {
|
|
172
|
+
modelValue: E.row.value,
|
|
173
|
+
"onUpdate:modelValue": (N) => E.row.value = N,
|
|
174
|
+
style: { width: "100%" },
|
|
175
|
+
placeholder: e(l)("COMMON_DATA.PLACEHOLDER_INPUT")
|
|
176
|
+
}, null, 8, ["modelValue", "onUpdate:modelValue", "placeholder"])
|
|
177
|
+
]),
|
|
178
|
+
action: A((E) => [
|
|
179
|
+
C.value.length > 1 ? (g(), H(e(Y), {
|
|
180
|
+
key: 0,
|
|
181
|
+
style: { cursor: "pointer", color: "red" },
|
|
182
|
+
onClick: (N) => M(E.index)
|
|
183
|
+
}, {
|
|
184
|
+
default: A(() => [
|
|
185
|
+
v(s)
|
|
186
|
+
]),
|
|
187
|
+
_: 1
|
|
188
|
+
}, 8, ["onClick"])) : $("", !0)
|
|
189
|
+
]),
|
|
190
|
+
_: 1
|
|
191
|
+
}, 8, ["columns", "data", "total"])
|
|
192
|
+
]),
|
|
193
|
+
_: 1
|
|
194
|
+
}, 8, ["title"]);
|
|
195
|
+
};
|
|
196
|
+
}
|
|
197
|
+
}, At = /* @__PURE__ */ ue(mt, [["__scopeId", "data-v-2681e3ba"]]);
|
|
198
|
+
function yt(i) {
|
|
199
|
+
const r = h(() => i.isPluginMode), a = h(() => i.isDataType), l = h(() => i.justString), w = h(() => i.forceRequired), f = h(() => i.showMoreColumns), p = h(() => i.setType && i.setType.length === 1), _ = h(() => r.value && a.value), C = h(() => r.value && l.value), O = h(() => !r.value && a.value), m = h(() => !r.value && l.value), P = h(() => {
|
|
200
|
+
const T = r.value, M = a.value, b = i.customFieldName;
|
|
201
|
+
return b || (T && M ? {
|
|
202
|
+
name: "name",
|
|
203
|
+
type: "type",
|
|
204
|
+
value: "debugValue"
|
|
205
|
+
} : T ? {
|
|
206
|
+
name: "name",
|
|
207
|
+
type: "type",
|
|
208
|
+
value: "debugValue"
|
|
209
|
+
} : {
|
|
210
|
+
name: "dataName",
|
|
211
|
+
type: "dataType",
|
|
212
|
+
value: "debugValue"
|
|
213
|
+
});
|
|
214
|
+
});
|
|
215
|
+
return {
|
|
216
|
+
// 基础模式
|
|
217
|
+
isPluginMode: r,
|
|
218
|
+
isDataType: a,
|
|
219
|
+
isJustString: l,
|
|
220
|
+
isForceRequired: w,
|
|
221
|
+
showMoreColumns: f,
|
|
222
|
+
isSingleType: p,
|
|
223
|
+
// 组合模式
|
|
224
|
+
isPluginDataTypeMode: _,
|
|
225
|
+
isPluginJustStringMode: C,
|
|
226
|
+
isNormalDataTypeMode: O,
|
|
227
|
+
isNormalJustStringMode: m,
|
|
228
|
+
// 字段名策略
|
|
229
|
+
getFieldName: (T) => P.value[T] || T
|
|
230
|
+
};
|
|
231
|
+
}
|
|
232
|
+
const He = /* @__PURE__ */ Symbol("ParameterTableContext");
|
|
233
|
+
function ft(i) {
|
|
234
|
+
const {
|
|
235
|
+
props: r,
|
|
236
|
+
tableData: a,
|
|
237
|
+
emit: l,
|
|
238
|
+
getSnowFlakeId: w,
|
|
239
|
+
typeList: f,
|
|
240
|
+
isSingleType: p,
|
|
241
|
+
validationErrors: _,
|
|
242
|
+
focusFields: C,
|
|
243
|
+
tableRef: O
|
|
244
|
+
} = i, { t: m } = ne(), P = yt(r), D = P.getFieldName, b = {
|
|
245
|
+
// 基础配置
|
|
246
|
+
props: r,
|
|
247
|
+
tableData: a,
|
|
248
|
+
emit: l,
|
|
249
|
+
getSnowFlakeId: w,
|
|
250
|
+
typeList: f,
|
|
251
|
+
isSingleType: p,
|
|
252
|
+
// 状态管理
|
|
253
|
+
validationErrors: _,
|
|
254
|
+
focusFields: C,
|
|
255
|
+
tableRef: O,
|
|
256
|
+
// 模式策略管理器(统一模式判断逻辑)
|
|
257
|
+
modeStrategy: P,
|
|
258
|
+
// 字段映射(从 modeStrategy 获取)
|
|
259
|
+
getFieldName: D,
|
|
260
|
+
getFieldValue: (L, d) => {
|
|
261
|
+
const u = D(d);
|
|
262
|
+
return L[u];
|
|
263
|
+
},
|
|
264
|
+
setFieldValue: (L, d, u) => {
|
|
265
|
+
const o = D(d);
|
|
266
|
+
L[o] = u;
|
|
267
|
+
},
|
|
268
|
+
// 模式判断(从 modeStrategy 导出,保持向后兼容)
|
|
269
|
+
isPluginMode: P.isPluginMode,
|
|
270
|
+
isDataType: P.isDataType,
|
|
271
|
+
isJustString: P.isJustString,
|
|
272
|
+
isForceRequired: P.isForceRequired,
|
|
273
|
+
showMoreColumns: P.showMoreColumns,
|
|
274
|
+
// 组合模式判断
|
|
275
|
+
isPluginDataTypeMode: P.isPluginDataTypeMode,
|
|
276
|
+
isPluginJustStringMode: P.isPluginJustStringMode,
|
|
277
|
+
isNormalDataTypeMode: P.isNormalDataTypeMode,
|
|
278
|
+
isNormalJustStringMode: P.isNormalJustStringMode,
|
|
279
|
+
// 其他 props 相关的计算属性
|
|
280
|
+
disabled: h(() => r.disabled),
|
|
281
|
+
forceRequired: h(() => r.forceRequired),
|
|
282
|
+
location: h(() => r.location),
|
|
283
|
+
setType: h(() => r.setType),
|
|
284
|
+
disabledFields: h(() => r.disabledFields),
|
|
285
|
+
inputItemNamesArr: h(() => r.inputItemNamesArr),
|
|
286
|
+
// 工具方法
|
|
287
|
+
/**
|
|
288
|
+
* 触发表格数据响应式更新
|
|
289
|
+
*/
|
|
290
|
+
triggerTableUpdate: () => {
|
|
291
|
+
a.value = [...a.value];
|
|
292
|
+
},
|
|
293
|
+
/**
|
|
294
|
+
* 判断字段是否被禁用
|
|
295
|
+
* @param {String} fieldName - 字段名
|
|
296
|
+
* @returns {Boolean} 是否禁用
|
|
297
|
+
*/
|
|
298
|
+
isFieldDisabled: (L) => {
|
|
299
|
+
const d = r.disabledFields;
|
|
300
|
+
return !d || !Array.isArray(d) ? !1 : d.includes(L);
|
|
301
|
+
},
|
|
302
|
+
/**
|
|
303
|
+
* 判断是否可以新增行
|
|
304
|
+
* @returns {Boolean} 是否可以新增
|
|
305
|
+
*/
|
|
306
|
+
canAddRow: () => {
|
|
307
|
+
if (r.disabled) return !1;
|
|
308
|
+
const L = r.disabledFields;
|
|
309
|
+
return !L || !Array.isArray(L) ? !0 : !L.includes("add");
|
|
310
|
+
},
|
|
311
|
+
/**
|
|
312
|
+
* 判断是否可以删除行
|
|
313
|
+
* @returns {Boolean} 是否可以删除
|
|
314
|
+
*/
|
|
315
|
+
canDeleteRow: () => {
|
|
316
|
+
if (r.disabled) return !1;
|
|
317
|
+
const L = r.disabledFields;
|
|
318
|
+
return !L || !Array.isArray(L) ? !0 : !L.includes("delete");
|
|
319
|
+
}
|
|
320
|
+
};
|
|
321
|
+
return Ze(He, b), b;
|
|
322
|
+
}
|
|
323
|
+
function Ee() {
|
|
324
|
+
const i = et(He);
|
|
325
|
+
if (!i)
|
|
326
|
+
throw new Error(
|
|
327
|
+
t("COMMON_PARAMETERTABLE.ERROR_USE_PARAMETER_TABLE_CONTEXT") + t("COMMON_PARAMETERTABLE.ERROR_USE_PARAMETER_TEXT")
|
|
328
|
+
);
|
|
329
|
+
return i;
|
|
330
|
+
}
|
|
331
|
+
const Et = { class: "parameter-format-selector" }, _t = {
|
|
332
|
+
__name: "ParameterFormatSelector",
|
|
333
|
+
props: {
|
|
334
|
+
modelValue: {
|
|
335
|
+
type: String,
|
|
336
|
+
default: ""
|
|
337
|
+
},
|
|
338
|
+
disabled: {
|
|
339
|
+
type: Boolean,
|
|
340
|
+
default: !1
|
|
341
|
+
},
|
|
342
|
+
// 传入完整的行数据,用于编辑选项值
|
|
343
|
+
rowData: {
|
|
344
|
+
type: Object,
|
|
345
|
+
required: !0
|
|
346
|
+
}
|
|
347
|
+
},
|
|
348
|
+
emits: ["update:modelValue", "change", "optionCreated"],
|
|
349
|
+
setup(i, { emit: r }) {
|
|
350
|
+
const { t: a } = ne(), l = i, w = r, { getFieldName: f } = Ee(), p = [
|
|
351
|
+
{
|
|
352
|
+
label: a("COMMON_DATA.PLACEHOLDER_SINGLE_LINE_TEXT"),
|
|
353
|
+
//单行文本框
|
|
354
|
+
value: "input",
|
|
355
|
+
supportTypes: ["string", "integer", "number", "boolean"]
|
|
356
|
+
// 通用类型都支持
|
|
357
|
+
},
|
|
358
|
+
{
|
|
359
|
+
label: a("COMMON_DATA.PLACEHOLDER_MULTI_LINE_TEXT"),
|
|
360
|
+
//多行文本框
|
|
361
|
+
value: "multi-input",
|
|
362
|
+
supportTypes: ["string", "integer", "number", "boolean"]
|
|
363
|
+
// 只有 string 支持多行文本
|
|
364
|
+
},
|
|
365
|
+
{
|
|
366
|
+
label: a("COMMON_DATA.PLACEHOLDER_CHECKBOX"),
|
|
367
|
+
//多选框
|
|
368
|
+
value: "checkbox",
|
|
369
|
+
supportTypes: ["string"]
|
|
370
|
+
// 字符串和字符串数组
|
|
371
|
+
},
|
|
372
|
+
{
|
|
373
|
+
label: a("COMMON_DATA.PLACEHOLDER_RADIO_BUTTON"),
|
|
374
|
+
//单选框
|
|
375
|
+
value: "radio-button",
|
|
376
|
+
supportTypes: ["string", "integer", "number", "boolean"]
|
|
377
|
+
// 只有 string 支持单选
|
|
378
|
+
},
|
|
379
|
+
{
|
|
380
|
+
label: a("COMMON_DATA.PLACEHOLDER_TIME_DATETIME"),
|
|
381
|
+
//时间日期选择器
|
|
382
|
+
value: "datetime",
|
|
383
|
+
supportTypes: ["string"]
|
|
384
|
+
// 时间类型
|
|
385
|
+
},
|
|
386
|
+
{
|
|
387
|
+
label: a("COMMON_DATA.PLACEHOLDER_IMAGE"),
|
|
388
|
+
//图片
|
|
389
|
+
value: "image",
|
|
390
|
+
supportTypes: ["file"]
|
|
391
|
+
// 图片类型
|
|
392
|
+
},
|
|
393
|
+
{
|
|
394
|
+
label: a("COMMON_DATA.PLACEHOLDER_FILE"),
|
|
395
|
+
//文件
|
|
396
|
+
value: "file",
|
|
397
|
+
supportTypes: ["file"]
|
|
398
|
+
// 文件类型
|
|
399
|
+
}
|
|
400
|
+
], _ = te(l.modelValue), C = te(null), O = h(() => {
|
|
401
|
+
const M = l.rowData[f("type")];
|
|
402
|
+
return M ? p.filter((b) => b.supportTypes.includes(M)) : p;
|
|
403
|
+
}), m = h(() => _.value === "checkbox" || _.value === "radio-button");
|
|
404
|
+
pe(
|
|
405
|
+
() => l.modelValue,
|
|
406
|
+
(M) => {
|
|
407
|
+
_.value = M;
|
|
408
|
+
}
|
|
409
|
+
), pe(
|
|
410
|
+
() => l.rowData[f("type")],
|
|
411
|
+
(M) => {
|
|
412
|
+
if (M && _.value) {
|
|
413
|
+
const b = p.find(
|
|
414
|
+
(L) => L.value === _.value
|
|
415
|
+
);
|
|
416
|
+
b && !b.supportTypes.includes(M) && (_.value = "input", w("update:modelValue", "input"), w("change", "input", l.rowData));
|
|
417
|
+
}
|
|
418
|
+
}
|
|
419
|
+
);
|
|
420
|
+
const P = () => {
|
|
421
|
+
w("update:modelValue", _.value), w("change", _.value, l.rowData);
|
|
422
|
+
}, D = () => {
|
|
423
|
+
C.value && C.value.showOption(l.rowData);
|
|
424
|
+
}, T = (M) => {
|
|
425
|
+
w("optionCreated", M);
|
|
426
|
+
};
|
|
427
|
+
return (M, b) => {
|
|
428
|
+
const L = we("IconEdit2");
|
|
429
|
+
return g(), W("div", Et, [
|
|
430
|
+
v(e(Ae), {
|
|
431
|
+
modelValue: _.value,
|
|
432
|
+
"onUpdate:modelValue": b[0] || (b[0] = (d) => _.value = d),
|
|
433
|
+
disabled: i.disabled,
|
|
434
|
+
placeholder: e(a)("COMMON_DATA.PLACEHOLDER_SELECT"),
|
|
435
|
+
style: { width: "100%" },
|
|
436
|
+
onChange: P
|
|
437
|
+
}, {
|
|
438
|
+
default: A(() => [
|
|
439
|
+
(g(!0), W(ae, null, Ie(O.value, (d) => (g(), H(e(re), {
|
|
440
|
+
key: d.value,
|
|
441
|
+
label: d.label,
|
|
442
|
+
value: d.value
|
|
443
|
+
}, null, 8, ["label", "value"]))), 128))
|
|
444
|
+
]),
|
|
445
|
+
_: 1
|
|
446
|
+
}, 8, ["modelValue", "disabled", "placeholder"]),
|
|
447
|
+
m.value ? (g(), H(e(Y), {
|
|
448
|
+
key: 0,
|
|
449
|
+
class: "edit-icon",
|
|
450
|
+
onClick: D
|
|
451
|
+
}, {
|
|
452
|
+
default: A(() => [
|
|
453
|
+
v(L)
|
|
454
|
+
]),
|
|
455
|
+
_: 1
|
|
456
|
+
})) : $("", !0),
|
|
457
|
+
v(At, {
|
|
458
|
+
ref_key: "optionValueDialog",
|
|
459
|
+
ref: C,
|
|
460
|
+
onCreateOption: T
|
|
461
|
+
}, null, 512)
|
|
462
|
+
]);
|
|
463
|
+
};
|
|
464
|
+
}
|
|
465
|
+
}, vt = /* @__PURE__ */ ue(_t, [["__scopeId", "data-v-acb7ffce"]]), ye = [
|
|
466
|
+
{
|
|
467
|
+
label: "String",
|
|
468
|
+
value: "string",
|
|
469
|
+
example: ""
|
|
470
|
+
},
|
|
471
|
+
{
|
|
472
|
+
label: "Number",
|
|
473
|
+
value: "number",
|
|
474
|
+
example: 0
|
|
475
|
+
},
|
|
476
|
+
{
|
|
477
|
+
label: "Integer",
|
|
478
|
+
value: "integer",
|
|
479
|
+
example: 0
|
|
480
|
+
},
|
|
481
|
+
{
|
|
482
|
+
label: "Boolean",
|
|
483
|
+
value: "boolean",
|
|
484
|
+
example: !1
|
|
485
|
+
},
|
|
486
|
+
{
|
|
487
|
+
label: "File",
|
|
488
|
+
value: "file",
|
|
489
|
+
example: ""
|
|
490
|
+
},
|
|
491
|
+
{
|
|
492
|
+
label: "Object",
|
|
493
|
+
value: "object",
|
|
494
|
+
example: {}
|
|
495
|
+
},
|
|
496
|
+
{
|
|
497
|
+
label: "Array<String>",
|
|
498
|
+
value: "arrayString",
|
|
499
|
+
example: []
|
|
500
|
+
},
|
|
501
|
+
{
|
|
502
|
+
label: "Array<Number>",
|
|
503
|
+
value: "arrayNumber",
|
|
504
|
+
example: []
|
|
505
|
+
},
|
|
506
|
+
{
|
|
507
|
+
label: "Array<Integer>",
|
|
508
|
+
value: "arrayInteger",
|
|
509
|
+
example: []
|
|
510
|
+
},
|
|
511
|
+
{
|
|
512
|
+
label: "Array<Boolean>",
|
|
513
|
+
value: "arrayBoolean",
|
|
514
|
+
example: []
|
|
515
|
+
},
|
|
516
|
+
{
|
|
517
|
+
label: "Array<File>",
|
|
518
|
+
value: "arrayFile",
|
|
519
|
+
example: []
|
|
520
|
+
},
|
|
521
|
+
{
|
|
522
|
+
label: "Array<Object>",
|
|
523
|
+
value: "arrayObject",
|
|
524
|
+
example: []
|
|
525
|
+
}
|
|
526
|
+
], De = (() => {
|
|
527
|
+
const i = {};
|
|
528
|
+
return ye.forEach((r) => {
|
|
529
|
+
i[r.value] = r.label;
|
|
530
|
+
}), i;
|
|
531
|
+
})(), Ot = [
|
|
532
|
+
"arrayString",
|
|
533
|
+
"arrayFile",
|
|
534
|
+
"arrayInteger",
|
|
535
|
+
"arrayNumber",
|
|
536
|
+
"arrayObject",
|
|
537
|
+
"arrayBoolean",
|
|
538
|
+
"arrayImage"
|
|
539
|
+
], Tl = ["GET", "HEAD", "DELETE"], hl = [
|
|
540
|
+
{
|
|
541
|
+
value: "POST",
|
|
542
|
+
label: "POST"
|
|
543
|
+
},
|
|
544
|
+
{
|
|
545
|
+
value: "GET",
|
|
546
|
+
label: "GET"
|
|
547
|
+
},
|
|
548
|
+
{
|
|
549
|
+
value: "PUT",
|
|
550
|
+
label: "PUT"
|
|
551
|
+
},
|
|
552
|
+
{
|
|
553
|
+
value: "DELETE",
|
|
554
|
+
label: "DELETE"
|
|
555
|
+
},
|
|
556
|
+
{
|
|
557
|
+
value: "PATCH",
|
|
558
|
+
label: "PATCH"
|
|
559
|
+
},
|
|
560
|
+
{
|
|
561
|
+
value: "HEAD",
|
|
562
|
+
label: "HEAD"
|
|
563
|
+
}
|
|
564
|
+
], se = (i) => Ot.includes(i) || i === "array", ce = (i, r) => {
|
|
565
|
+
const { nameField: a, typeField: l, valueField: w } = r;
|
|
566
|
+
if (!i.children || i.children.length === 0)
|
|
567
|
+
return;
|
|
568
|
+
const f = i[l];
|
|
569
|
+
if (se(f)) {
|
|
570
|
+
const p = [];
|
|
571
|
+
return i.children.forEach((_) => {
|
|
572
|
+
if (_.children && _.children.length > 0)
|
|
573
|
+
p.push(ce(_, r));
|
|
574
|
+
else {
|
|
575
|
+
const C = _[w];
|
|
576
|
+
let O = C !== void 0 && C !== "" ? C : "";
|
|
577
|
+
const m = _[l];
|
|
578
|
+
m === "number" || m === "integer" ? O = O === "" ? 0 : Number(O) : m === "boolean" ? O = O === "" ? !1 : !!O : m === "object" && (O = ce(_, r) || {}), p.push(O);
|
|
579
|
+
}
|
|
580
|
+
}), p;
|
|
581
|
+
}
|
|
582
|
+
if (f === "object") {
|
|
583
|
+
const p = {};
|
|
584
|
+
return i.children.forEach((_) => {
|
|
585
|
+
const C = _[a];
|
|
586
|
+
if (!(!C || C === "[Array Item]"))
|
|
587
|
+
if (_.children && _.children.length > 0)
|
|
588
|
+
p[C] = ce(_, r);
|
|
589
|
+
else {
|
|
590
|
+
const O = _[w];
|
|
591
|
+
let m = O !== void 0 && O !== "" ? O : "";
|
|
592
|
+
const P = _[l];
|
|
593
|
+
P === "number" || P === "integer" ? m = m === "" ? 0 : Number(m) : P === "boolean" ? m = m === "" ? !1 : !!m : P === "object" ? m = ce(_, r) || {} : se(P) && (m = ce(_, r) || []), p[C] = m;
|
|
594
|
+
}
|
|
595
|
+
}), p;
|
|
596
|
+
}
|
|
597
|
+
}, Mt = { class: "value-cell" }, Tt = {
|
|
598
|
+
key: 2,
|
|
599
|
+
class: "filename-box"
|
|
600
|
+
}, ht = {
|
|
601
|
+
key: 4,
|
|
602
|
+
class: "filename-box"
|
|
603
|
+
}, gt = {
|
|
604
|
+
key: 1,
|
|
605
|
+
class: "filename-box"
|
|
606
|
+
}, bt = {
|
|
607
|
+
key: 1,
|
|
608
|
+
class: "error-message"
|
|
609
|
+
}, Lt = {
|
|
610
|
+
__name: "ValueCell",
|
|
611
|
+
props: /* @__PURE__ */ ie({
|
|
612
|
+
row: {
|
|
613
|
+
type: Object,
|
|
614
|
+
required: !0
|
|
615
|
+
}
|
|
616
|
+
}, {
|
|
617
|
+
value: {
|
|
618
|
+
type: [String, Number, Boolean, Object, Array],
|
|
619
|
+
default: ""
|
|
620
|
+
},
|
|
621
|
+
valueModifiers: {},
|
|
622
|
+
type: {
|
|
623
|
+
type: String,
|
|
624
|
+
default: "string"
|
|
625
|
+
},
|
|
626
|
+
typeModifiers: {}
|
|
627
|
+
}),
|
|
628
|
+
emits: ["update:value", "update:type"],
|
|
629
|
+
setup(i) {
|
|
630
|
+
const { t: r } = ne(), a = i, l = fe(i, "value"), w = fe(i, "type"), f = Ee(), {
|
|
631
|
+
isFieldDisabled: p,
|
|
632
|
+
props: _,
|
|
633
|
+
emit: C,
|
|
634
|
+
getFieldName: O,
|
|
635
|
+
validationErrors: m
|
|
636
|
+
} = f, P = h(() => _.isPluginMode), D = h(() => _.disabled), T = h(() => {
|
|
637
|
+
if (!P.value || !a.row.required) return null;
|
|
638
|
+
const R = a.row.uiid, y = O("value");
|
|
639
|
+
return m.value[R]?.[y];
|
|
640
|
+
}), M = h(() => !!T.value), b = h(() => D.value || a.row.disabled || p("value")), L = h(() => a.row.extendWidgetType === "file" || w.value === "file"), d = h(() => a.row[O("type")] === "image" || a.row[O("type")] === "file"), u = h(() => {
|
|
641
|
+
const R = a.row["extend-widget-item"];
|
|
642
|
+
if (!R) return [];
|
|
643
|
+
if (Array.isArray(R)) return R;
|
|
644
|
+
try {
|
|
645
|
+
return typeof R == "string" ? JSON.parse(R) : [];
|
|
646
|
+
} catch {
|
|
647
|
+
return [];
|
|
648
|
+
}
|
|
649
|
+
}), o = () => {
|
|
650
|
+
if (P.value && a.row.required) {
|
|
651
|
+
const R = a.row.uiid, y = O("value"), n = a.row[y];
|
|
652
|
+
n == null || n === "" || Array.isArray(n) && n.length === 0 || typeof n == "string" && !n.trim() ? m.value[R] = {
|
|
653
|
+
...m.value[R],
|
|
654
|
+
[y]: r("COMMON_DATA.REQUIRED_NULL")
|
|
655
|
+
} : m.value[R]?.[y] && (delete m.value[R][y], Object.keys(m.value[R]).length === 0 && delete m.value[R]);
|
|
656
|
+
}
|
|
657
|
+
}, s = () => {
|
|
658
|
+
o(), C("debugger-data-change");
|
|
659
|
+
}, E = (R) => {
|
|
660
|
+
l.value = R, s();
|
|
661
|
+
}, N = () => {
|
|
662
|
+
l.value = "", s();
|
|
663
|
+
};
|
|
664
|
+
return (R, y) => (g(), W("div", Mt, [
|
|
665
|
+
!e(se)(w.value) && w.value !== "object" && w.value !== "arrayObject" ? (g(), W(ae, { key: 0 }, [
|
|
666
|
+
P.value ? (g(), W(ae, { key: 0 }, [
|
|
667
|
+
i.row.extendWidgetType === "datetime" ? (g(), H(e(lt), {
|
|
668
|
+
key: 0,
|
|
669
|
+
modelValue: l.value,
|
|
670
|
+
"onUpdate:modelValue": y[0] || (y[0] = (n) => l.value = n),
|
|
671
|
+
type: "datetime",
|
|
672
|
+
disabled: b.value,
|
|
673
|
+
style: { width: "100%" },
|
|
674
|
+
placeholder: e(r)("COMMON_DATA.PLACEHOLDER_DATETIME"),
|
|
675
|
+
format: "YYYY-MM-DD HH:mm:ss",
|
|
676
|
+
"value-format": "YYYY-MM-DD HH:mm:ss",
|
|
677
|
+
class: ee({ "error-input": M.value }),
|
|
678
|
+
onChange: s
|
|
679
|
+
}, null, 8, ["modelValue", "disabled", "placeholder", "class"])) : i.row.extendWidgetType === "image" && !l.value ? (g(), H(e(Le), {
|
|
680
|
+
key: 1,
|
|
681
|
+
uploadType: e(Re).自定义,
|
|
682
|
+
acceptType: e(Ce)("image"),
|
|
683
|
+
multiple: !1,
|
|
684
|
+
limitSize: 1,
|
|
685
|
+
limitCount: 1,
|
|
686
|
+
warnTips: e(Ne)("image"),
|
|
687
|
+
onOnSuccess: E
|
|
688
|
+
}, {
|
|
689
|
+
"upload-box": A(() => [
|
|
690
|
+
v(e(oe), {
|
|
691
|
+
icon: e(he),
|
|
692
|
+
type: "primary"
|
|
693
|
+
}, {
|
|
694
|
+
default: A(() => [
|
|
695
|
+
q(F(e(r)("COMMON_BUTTON.UPLOAD_IMAGE_TEXT")), 1)
|
|
696
|
+
]),
|
|
697
|
+
_: 1
|
|
698
|
+
}, 8, ["icon"])
|
|
699
|
+
]),
|
|
700
|
+
_: 1
|
|
701
|
+
}, 8, ["uploadType", "acceptType", "warnTips"])) : i.row.extendWidgetType === "image" && l.value ? (g(), W("div", Tt, [
|
|
702
|
+
j("div", null, [
|
|
703
|
+
v(e(Pe), { content: l.value }, {
|
|
704
|
+
default: A(() => [
|
|
705
|
+
q(F(l.value.effectiveUrl), 1)
|
|
706
|
+
]),
|
|
707
|
+
_: 1
|
|
708
|
+
}, 8, ["content"])
|
|
709
|
+
]),
|
|
710
|
+
v(e(Y), {
|
|
711
|
+
class: "filename-icon",
|
|
712
|
+
onClick: N
|
|
713
|
+
}, {
|
|
714
|
+
default: A(() => [
|
|
715
|
+
v(e(ge))
|
|
716
|
+
]),
|
|
717
|
+
_: 1
|
|
718
|
+
})
|
|
719
|
+
])) : L.value && !l.value ? (g(), H(e(Le), {
|
|
720
|
+
key: 3,
|
|
721
|
+
uploadType: e(Re).自定义,
|
|
722
|
+
acceptType: e(Ce)("file"),
|
|
723
|
+
multiple: !1,
|
|
724
|
+
limitSize: 1,
|
|
725
|
+
limitCount: 1,
|
|
726
|
+
warnTips: e(Ne)("file"),
|
|
727
|
+
onOnSuccess: E
|
|
728
|
+
}, {
|
|
729
|
+
"upload-box": A(() => [
|
|
730
|
+
v(e(oe), {
|
|
731
|
+
icon: e(he),
|
|
732
|
+
type: "primary"
|
|
733
|
+
}, {
|
|
734
|
+
default: A(() => [
|
|
735
|
+
q(F(e(r)("COMMON_BUTTON.UPLOAD_FILE_TEXT")), 1)
|
|
736
|
+
]),
|
|
737
|
+
_: 1
|
|
738
|
+
}, 8, ["icon"])
|
|
739
|
+
]),
|
|
740
|
+
_: 1
|
|
741
|
+
}, 8, ["uploadType", "acceptType", "warnTips"])) : L.value && l.value ? (g(), W("div", ht, [
|
|
742
|
+
j("div", null, [
|
|
743
|
+
v(e(Pe), { content: l.value }, {
|
|
744
|
+
default: A(() => [
|
|
745
|
+
q(F(l.value.effectiveUrl), 1)
|
|
746
|
+
]),
|
|
747
|
+
_: 1
|
|
748
|
+
}, 8, ["content"])
|
|
749
|
+
]),
|
|
750
|
+
v(e(Y), {
|
|
751
|
+
class: "filename-icon",
|
|
752
|
+
onClick: N
|
|
753
|
+
}, {
|
|
754
|
+
default: A(() => [
|
|
755
|
+
v(e(ge))
|
|
756
|
+
]),
|
|
757
|
+
_: 1
|
|
758
|
+
})
|
|
759
|
+
])) : i.row.extendWidgetType === "checkbox" || i.row.extendWidgetType === "radio-button" ? (g(), H(e(Ae), {
|
|
760
|
+
key: 5,
|
|
761
|
+
modelValue: l.value,
|
|
762
|
+
"onUpdate:modelValue": y[1] || (y[1] = (n) => l.value = n),
|
|
763
|
+
multiple: i.row.extendWidgetType === "checkbox",
|
|
764
|
+
style: { width: "100%" },
|
|
765
|
+
disabled: b.value,
|
|
766
|
+
placeholder: e(r)("COMMON_DATA.PLACEHOLDER_SELECT"),
|
|
767
|
+
class: ee({ "error-select": M.value }),
|
|
768
|
+
onChange: s
|
|
769
|
+
}, {
|
|
770
|
+
default: A(() => [
|
|
771
|
+
(g(!0), W(ae, null, Ie(u.value, (n) => (g(), H(e(re), {
|
|
772
|
+
key: n.value,
|
|
773
|
+
label: n.label,
|
|
774
|
+
value: n.value
|
|
775
|
+
}, null, 8, ["label", "value"]))), 128))
|
|
776
|
+
]),
|
|
777
|
+
_: 1
|
|
778
|
+
}, 8, ["modelValue", "multiple", "disabled", "placeholder", "class"])) : i.row.extendWidgetType === "multi-input" ? (g(), H(e(Z), {
|
|
779
|
+
key: 6,
|
|
780
|
+
modelValue: l.value,
|
|
781
|
+
"onUpdate:modelValue": y[2] || (y[2] = (n) => l.value = n),
|
|
782
|
+
type: "textarea",
|
|
783
|
+
rows: 3,
|
|
784
|
+
onBlur: s,
|
|
785
|
+
disabled: b.value,
|
|
786
|
+
style: { width: "100%" },
|
|
787
|
+
placeholder: e(r)("COMMON_DATA.PLACEHOLDER_INPUT"),
|
|
788
|
+
class: ee({ "error-input": M.value })
|
|
789
|
+
}, null, 8, ["modelValue", "disabled", "placeholder", "class"])) : i.row[e(O)("type")] === "boolean" ? (g(), H(e(Ae), {
|
|
790
|
+
key: 7,
|
|
791
|
+
modelValue: l.value,
|
|
792
|
+
"onUpdate:modelValue": y[3] || (y[3] = (n) => l.value = n),
|
|
793
|
+
onChange: s,
|
|
794
|
+
disabled: b.value,
|
|
795
|
+
style: { width: "100%" },
|
|
796
|
+
placeholder: e(r)("COMMON_DATA.PLACEHOLDER_SELECT")
|
|
797
|
+
}, {
|
|
798
|
+
default: A(() => [
|
|
799
|
+
v(e(re), {
|
|
800
|
+
value: !0,
|
|
801
|
+
label: "true"
|
|
802
|
+
}),
|
|
803
|
+
v(e(re), {
|
|
804
|
+
value: !1,
|
|
805
|
+
label: "false"
|
|
806
|
+
})
|
|
807
|
+
]),
|
|
808
|
+
_: 1
|
|
809
|
+
}, 8, ["modelValue", "disabled", "placeholder"])) : i.row[e(O)("type")] === "number" || i.row[e(O)("type")] === "integer" ? (g(), H(e(Z), {
|
|
810
|
+
key: 8,
|
|
811
|
+
modelValue: l.value,
|
|
812
|
+
"onUpdate:modelValue": y[4] || (y[4] = (n) => l.value = n),
|
|
813
|
+
modelModifiers: { number: !0 },
|
|
814
|
+
type: "number",
|
|
815
|
+
class: "number-input-no-spinner",
|
|
816
|
+
onBlur: s,
|
|
817
|
+
disabled: b.value,
|
|
818
|
+
style: { width: "100%" },
|
|
819
|
+
placeholder: e(r)("COMMON_DATA.PLACEHOLDER_NUMBER")
|
|
820
|
+
}, null, 8, ["modelValue", "disabled", "placeholder"])) : (g(), H(e(Z), {
|
|
821
|
+
key: 9,
|
|
822
|
+
modelValue: l.value,
|
|
823
|
+
"onUpdate:modelValue": y[5] || (y[5] = (n) => l.value = n),
|
|
824
|
+
onBlur: s,
|
|
825
|
+
disabled: b.value,
|
|
826
|
+
style: { width: "100%" },
|
|
827
|
+
placeholder: e(r)("COMMON_DATA.PLACEHOLDER_INPUT"),
|
|
828
|
+
class: ee({ "error-input": M.value })
|
|
829
|
+
}, null, 8, ["modelValue", "disabled", "placeholder", "class"]))
|
|
830
|
+
], 64)) : (g(), W(ae, { key: 1 }, [
|
|
831
|
+
!l.value && d.value ? (g(), H(e(Le), {
|
|
832
|
+
key: 0,
|
|
833
|
+
uploadType: e(Re).自定义,
|
|
834
|
+
acceptType: e(Ce)(i.row[e(O)("type")]),
|
|
835
|
+
multiple: !1,
|
|
836
|
+
limitSize: 1,
|
|
837
|
+
limitCount: 1,
|
|
838
|
+
warnTips: e(Ne)(i.row[e(O)("type")]),
|
|
839
|
+
onOnSuccess: E
|
|
840
|
+
}, {
|
|
841
|
+
"upload-box": A(() => [
|
|
842
|
+
v(e(oe), {
|
|
843
|
+
icon: e(he),
|
|
844
|
+
type: "primary"
|
|
845
|
+
}, {
|
|
846
|
+
default: A(() => [
|
|
847
|
+
q(F(e(r)("COMMON_BUTTON.UPLOADING_TEXT")), 1)
|
|
848
|
+
]),
|
|
849
|
+
_: 1
|
|
850
|
+
}, 8, ["icon"])
|
|
851
|
+
]),
|
|
852
|
+
_: 1
|
|
853
|
+
}, 8, ["uploadType", "acceptType", "warnTips"])) : l.value && d.value ? (g(), W("div", gt, [
|
|
854
|
+
j("div", null, [
|
|
855
|
+
v(e(Pe), { content: l.value }, {
|
|
856
|
+
default: A(() => [
|
|
857
|
+
q(F(l.value.effectiveUrl), 1)
|
|
858
|
+
]),
|
|
859
|
+
_: 1
|
|
860
|
+
}, 8, ["content"])
|
|
861
|
+
]),
|
|
862
|
+
v(e(Y), {
|
|
863
|
+
class: "filename-icon",
|
|
864
|
+
onClick: N
|
|
865
|
+
}, {
|
|
866
|
+
default: A(() => [
|
|
867
|
+
v(e(ge))
|
|
868
|
+
]),
|
|
869
|
+
_: 1
|
|
870
|
+
})
|
|
871
|
+
])) : i.row[e(O)("type")] === "boolean" ? (g(), H(e(Ae), {
|
|
872
|
+
key: 2,
|
|
873
|
+
modelValue: l.value,
|
|
874
|
+
"onUpdate:modelValue": y[6] || (y[6] = (n) => l.value = n),
|
|
875
|
+
onChange: s,
|
|
876
|
+
disabled: b.value,
|
|
877
|
+
style: { width: "100%" },
|
|
878
|
+
placeholder: e(r)("COMMON_DATA.PLACEHOLDER_SELECT"),
|
|
879
|
+
class: ee({ "error-select": M.value })
|
|
880
|
+
}, {
|
|
881
|
+
default: A(() => [
|
|
882
|
+
v(e(re), {
|
|
883
|
+
value: !0,
|
|
884
|
+
label: "true"
|
|
885
|
+
}),
|
|
886
|
+
v(e(re), {
|
|
887
|
+
value: !1,
|
|
888
|
+
label: "false"
|
|
889
|
+
})
|
|
890
|
+
]),
|
|
891
|
+
_: 1
|
|
892
|
+
}, 8, ["modelValue", "disabled", "placeholder", "class"])) : i.row[e(O)("type")] === "number" || i.row[e(O)("type")] === "integer" ? (g(), H(e(Z), {
|
|
893
|
+
key: 3,
|
|
894
|
+
modelValue: l.value,
|
|
895
|
+
"onUpdate:modelValue": y[7] || (y[7] = (n) => l.value = n),
|
|
896
|
+
modelModifiers: { number: !0 },
|
|
897
|
+
type: "number",
|
|
898
|
+
class: ee(["number-input-no-spinner", { "error-input": M.value }]),
|
|
899
|
+
onBlur: s,
|
|
900
|
+
disabled: b.value,
|
|
901
|
+
style: { width: "100%" },
|
|
902
|
+
placeholder: e(r)("COMMON_DATA.PLACEHOLDER_NUMBER")
|
|
903
|
+
}, null, 8, ["modelValue", "class", "disabled", "placeholder"])) : (g(), H(e(Z), {
|
|
904
|
+
key: 4,
|
|
905
|
+
modelValue: l.value,
|
|
906
|
+
"onUpdate:modelValue": y[8] || (y[8] = (n) => l.value = n),
|
|
907
|
+
onBlur: s,
|
|
908
|
+
disabled: b.value,
|
|
909
|
+
style: { width: "100%" },
|
|
910
|
+
placeholder: e(r)("COMMON_DATA.PLACEHOLDER_INPUT"),
|
|
911
|
+
class: ee({ "error-input": M.value })
|
|
912
|
+
}, null, 8, ["modelValue", "disabled", "placeholder", "class"]))
|
|
913
|
+
], 64))
|
|
914
|
+
], 64)) : $("", !0),
|
|
915
|
+
T.value ? (g(), W("div", bt, F(T.value), 1)) : $("", !0)
|
|
916
|
+
]));
|
|
917
|
+
}
|
|
918
|
+
}, Nt = /* @__PURE__ */ ue(Lt, [["__scopeId", "data-v-1c48a62f"]]), Ct = { class: "name-input-container" }, Rt = {
|
|
919
|
+
key: 0,
|
|
920
|
+
class: "array-item-display"
|
|
921
|
+
}, Pt = {
|
|
922
|
+
key: 2,
|
|
923
|
+
class: "error-message"
|
|
924
|
+
}, wt = {
|
|
925
|
+
__name: "NameCell",
|
|
926
|
+
props: /* @__PURE__ */ ie({
|
|
927
|
+
row: {
|
|
928
|
+
type: Object,
|
|
929
|
+
required: !0
|
|
930
|
+
},
|
|
931
|
+
arrayItemIndex: {
|
|
932
|
+
type: Number,
|
|
933
|
+
default: 1
|
|
934
|
+
}
|
|
935
|
+
}, {
|
|
936
|
+
name: {
|
|
937
|
+
type: String,
|
|
938
|
+
default: ""
|
|
939
|
+
},
|
|
940
|
+
nameModifiers: {}
|
|
941
|
+
}),
|
|
942
|
+
emits: /* @__PURE__ */ ie(["focus", "blur"], ["update:name"]),
|
|
943
|
+
setup(i, { emit: r }) {
|
|
944
|
+
const a = i, l = fe(i, "name"), w = Ee(), {
|
|
945
|
+
getFieldName: f,
|
|
946
|
+
getFieldValue: p,
|
|
947
|
+
isFieldDisabled: _,
|
|
948
|
+
props: C,
|
|
949
|
+
validationErrors: O,
|
|
950
|
+
focusFields: m
|
|
951
|
+
} = w, P = r, D = f("name"), T = h(() => p(a.row, "name") === "[Array Item]" && (!C.isDataType || C.isPluginMode)), M = h(() => C.disabled || a.row.disabled || _("name")), b = h(() => a.arrayItemIndex), L = h(() => O.value[a.row.uiid]?.[D]), d = h(() => m.value[a.row.uiid]?.[D]), u = h(() => L.value && !d.value), o = () => {
|
|
952
|
+
m.value[a.row.uiid] || (m.value[a.row.uiid] = {}), m.value[a.row.uiid][D] = !0, P("focus", a.row.uiid, D);
|
|
953
|
+
}, s = () => {
|
|
954
|
+
m.value[a.row.uiid] && (m.value[a.row.uiid][D] = !1), P("blur", a.row, D);
|
|
955
|
+
};
|
|
956
|
+
return (E, N) => (g(), W("div", Ct, [
|
|
957
|
+
T.value ? (g(), W("div", Rt, [
|
|
958
|
+
v(e(at), {
|
|
959
|
+
type: "info",
|
|
960
|
+
size: "small",
|
|
961
|
+
class: "array-tag"
|
|
962
|
+
}, {
|
|
963
|
+
default: A(() => [
|
|
964
|
+
v(e(Y), null, {
|
|
965
|
+
default: A(() => [
|
|
966
|
+
v(e(rt))
|
|
967
|
+
]),
|
|
968
|
+
_: 1
|
|
969
|
+
}),
|
|
970
|
+
q(" " + F(E.t("COMMON_PLUGIN_TOOL.LABEL_PARAM_ARRAY_ITEM")) + " " + F(b.value), 1)
|
|
971
|
+
]),
|
|
972
|
+
_: 1
|
|
973
|
+
})
|
|
974
|
+
])) : (g(), H(e(Z), {
|
|
975
|
+
key: 1,
|
|
976
|
+
modelValue: l.value,
|
|
977
|
+
"onUpdate:modelValue": N[0] || (N[0] = (R) => l.value = R),
|
|
978
|
+
disabled: M.value,
|
|
979
|
+
onFocus: o,
|
|
980
|
+
onBlur: s,
|
|
981
|
+
style: { width: "100%" },
|
|
982
|
+
placeholder: E.t("COMMON_PLUGIN_TOOL.LABEL_PARAM_NAME_PLACEHOLDER"),
|
|
983
|
+
class: ee({ "error-input": u.value })
|
|
984
|
+
}, null, 8, ["modelValue", "disabled", "placeholder", "class"])),
|
|
985
|
+
u.value ? (g(), W("div", Pt, F(L.value), 1)) : $("", !0)
|
|
986
|
+
]));
|
|
987
|
+
}
|
|
988
|
+
}, Dt = /* @__PURE__ */ ue(wt, [["__scopeId", "data-v-9e2fd269"]]), It = { class: "type-select-container" }, Vt = { key: 1 }, Ut = {
|
|
989
|
+
key: 2,
|
|
990
|
+
class: "error-message"
|
|
991
|
+
}, St = {
|
|
992
|
+
__name: "TypeCell",
|
|
993
|
+
props: /* @__PURE__ */ ie({
|
|
994
|
+
row: {
|
|
995
|
+
type: Object,
|
|
996
|
+
required: !0
|
|
997
|
+
}
|
|
998
|
+
}, {
|
|
999
|
+
type: {
|
|
1000
|
+
type: String,
|
|
1001
|
+
default: "string"
|
|
1002
|
+
},
|
|
1003
|
+
typeModifiers: {}
|
|
1004
|
+
}),
|
|
1005
|
+
emits: /* @__PURE__ */ ie(["change"], ["update:type"]),
|
|
1006
|
+
setup(i, { emit: r }) {
|
|
1007
|
+
const a = i, l = fe(i, "type"), w = r, f = Ee(), {
|
|
1008
|
+
getFieldName: p,
|
|
1009
|
+
getFieldValue: _,
|
|
1010
|
+
isFieldDisabled: C,
|
|
1011
|
+
props: O,
|
|
1012
|
+
validationErrors: m,
|
|
1013
|
+
focusFields: P,
|
|
1014
|
+
typeList: D,
|
|
1015
|
+
isSingleType: T
|
|
1016
|
+
} = f, M = p("type");
|
|
1017
|
+
p("name");
|
|
1018
|
+
const b = h(() => !(O.justString || _(a.row, "name") === "[Array Item]" && !O.isDataType || T.value)), L = h(() => O.disabled || a.row.disabled || C("type") || a.row["extend-widget-type"] === "input" || a.row["extend-widget-type"] === "multi-input"), d = h(() => {
|
|
1019
|
+
const N = _(a.row, "name"), R = a.row[M];
|
|
1020
|
+
return N === "[Array Item]" ? De[R] || "String" : T.value && D.value.length > 0 ? D.value[0].label : O.isDataType && De[R] || "String";
|
|
1021
|
+
}), u = h(() => m.value[a.row.uiid]?.[M]), o = h(() => P.value[a.row.uiid]?.[M]), s = h(() => u.value && !o.value), E = () => {
|
|
1022
|
+
w("change", a.row);
|
|
1023
|
+
};
|
|
1024
|
+
return (N, R) => (g(), W("div", It, [
|
|
1025
|
+
b.value ? (g(), H(e(Ae), {
|
|
1026
|
+
key: 0,
|
|
1027
|
+
modelValue: l.value,
|
|
1028
|
+
"onUpdate:modelValue": R[0] || (R[0] = (y) => l.value = y),
|
|
1029
|
+
"data-uiid": i.row.uiid,
|
|
1030
|
+
disabled: L.value,
|
|
1031
|
+
placeholder: "Select",
|
|
1032
|
+
style: { width: "100%" },
|
|
1033
|
+
class: ee({ "error-select": s.value }),
|
|
1034
|
+
onChange: E
|
|
1035
|
+
}, {
|
|
1036
|
+
default: A(() => [
|
|
1037
|
+
(g(!0), W(ae, null, Ie(e(D), (y) => (g(), H(e(re), {
|
|
1038
|
+
key: y.value,
|
|
1039
|
+
label: y.label,
|
|
1040
|
+
value: y.value
|
|
1041
|
+
}, null, 8, ["label", "value"]))), 128))
|
|
1042
|
+
]),
|
|
1043
|
+
_: 1
|
|
1044
|
+
}, 8, ["modelValue", "data-uiid", "disabled", "class"])) : (g(), W("span", Vt, F(d.value), 1)),
|
|
1045
|
+
s.value ? (g(), W("div", Ut, F(u.value), 1)) : $("", !0)
|
|
1046
|
+
]));
|
|
1047
|
+
}
|
|
1048
|
+
}, Bt = /* @__PURE__ */ ue(St, [["__scopeId", "data-v-5f20943f"]]), Ft = {
|
|
1049
|
+
key: 0,
|
|
1050
|
+
class: "action-buttons"
|
|
1051
|
+
}, xt = {
|
|
1052
|
+
__name: "ActionCell",
|
|
1053
|
+
props: {
|
|
1054
|
+
row: {
|
|
1055
|
+
type: Object,
|
|
1056
|
+
required: !0
|
|
1057
|
+
},
|
|
1058
|
+
scope: {
|
|
1059
|
+
type: Object,
|
|
1060
|
+
required: !0
|
|
1061
|
+
}
|
|
1062
|
+
},
|
|
1063
|
+
emits: ["add-child", "move-up", "move-down", "delete"],
|
|
1064
|
+
setup(i, { emit: r }) {
|
|
1065
|
+
const { t: a } = ne(), l = i, w = r, f = Ee(), {
|
|
1066
|
+
getFieldName: p,
|
|
1067
|
+
getFieldValue: _,
|
|
1068
|
+
canAddRow: C,
|
|
1069
|
+
canDeleteRow: O,
|
|
1070
|
+
props: m
|
|
1071
|
+
} = f, P = h(() => m.disabled), D = h(() => l.row[p("type")]), T = h(() => _(l.row, "name")), M = h(() => m.isDataType ? D.value === "object" || D.value === "arrayObject" : se(D.value) || D.value === "object"), b = h(() => m.isDataType ? D.value === "object" || D.value === "arrayObject" ? a("COMMON_ACTIONCELL.LABEL_ADD_OBJECT_PROPERTY") : a("COMMON_ACTIONCELL.LABEL_ADD_CHILD") : se(D.value) ? D.value === "arrayObject" ? a("COMMON_ACTIONCELL.LABEL_ADD_OBJECT_TO_ARRAY") : a("COMMON_ACTIONCELL.LABEL_ADD_ARRAY_ITEM") : D.value === "object" ? a("COMMON_ACTIONCELL.LABEL_ADD_PROPERTY") : a("COMMON_ACTIONCELL.LABEL_ADD_CHILD")), L = h(() => M.value && C()), d = h(() => T.value === "[Array Item]" && !m.isDataType), u = h(() => m.isDataType && T.value !== "[Array Item]"), o = h(() => l.scope._canMoveUp || !1), s = h(() => l.scope._canMoveDown || !1), E = h(() => P.value || l.row.disabled ? !1 : l.scope._showDelete && O()), N = () => {
|
|
1072
|
+
w("add-child", l.scope);
|
|
1073
|
+
}, R = () => {
|
|
1074
|
+
w("move-up", l.row, "up");
|
|
1075
|
+
}, y = () => {
|
|
1076
|
+
w("move-down", l.row, "down");
|
|
1077
|
+
}, n = () => {
|
|
1078
|
+
w("delete", l.scope);
|
|
1079
|
+
};
|
|
1080
|
+
return (I, V) => P.value ? $("", !0) : (g(), W("div", Ft, [
|
|
1081
|
+
L.value ? (g(), H(e(Y), {
|
|
1082
|
+
key: 0,
|
|
1083
|
+
class: "table-form__add",
|
|
1084
|
+
onClick: N,
|
|
1085
|
+
title: b.value
|
|
1086
|
+
}, {
|
|
1087
|
+
default: A(() => [
|
|
1088
|
+
v(e(ot))
|
|
1089
|
+
]),
|
|
1090
|
+
_: 1
|
|
1091
|
+
}, 8, ["title"])) : $("", !0),
|
|
1092
|
+
d.value ? (g(), W(ae, { key: 1 }, [
|
|
1093
|
+
o.value ? (g(), H(e(Y), {
|
|
1094
|
+
key: 0,
|
|
1095
|
+
class: "table-form__action array-action",
|
|
1096
|
+
onClick: R,
|
|
1097
|
+
title: e(a)("COMMON_ACTIONCELL.LABEL_MOVE_UP")
|
|
1098
|
+
}, {
|
|
1099
|
+
default: A(() => [
|
|
1100
|
+
v(e(Se))
|
|
1101
|
+
]),
|
|
1102
|
+
_: 1
|
|
1103
|
+
}, 8, ["title"])) : $("", !0),
|
|
1104
|
+
s.value ? (g(), H(e(Y), {
|
|
1105
|
+
key: 1,
|
|
1106
|
+
class: "table-form__action array-action",
|
|
1107
|
+
onClick: y,
|
|
1108
|
+
title: e(a)("COMMON_ACTIONCELL.LABEL_MOVE_DOWN")
|
|
1109
|
+
}, {
|
|
1110
|
+
default: A(() => [
|
|
1111
|
+
v(e(Be))
|
|
1112
|
+
]),
|
|
1113
|
+
_: 1
|
|
1114
|
+
}, 8, ["title"])) : $("", !0)
|
|
1115
|
+
], 64)) : $("", !0),
|
|
1116
|
+
u.value ? (g(), W(ae, { key: 2 }, [
|
|
1117
|
+
o.value ? (g(), H(e(Y), {
|
|
1118
|
+
key: 0,
|
|
1119
|
+
class: "table-form__action array-action",
|
|
1120
|
+
onClick: R,
|
|
1121
|
+
title: e(a)("COMMON_ACTIONCELL.LABEL_MOVE_UP")
|
|
1122
|
+
}, {
|
|
1123
|
+
default: A(() => [
|
|
1124
|
+
v(e(Se))
|
|
1125
|
+
]),
|
|
1126
|
+
_: 1
|
|
1127
|
+
}, 8, ["title"])) : $("", !0),
|
|
1128
|
+
s.value ? (g(), H(e(Y), {
|
|
1129
|
+
key: 1,
|
|
1130
|
+
class: "table-form__action array-action",
|
|
1131
|
+
onClick: y,
|
|
1132
|
+
title: e(a)("COMMON_ACTIONCELL.LABEL_MOVE_DOWN")
|
|
1133
|
+
}, {
|
|
1134
|
+
default: A(() => [
|
|
1135
|
+
v(e(Be))
|
|
1136
|
+
]),
|
|
1137
|
+
_: 1
|
|
1138
|
+
}, 8, ["title"])) : $("", !0)
|
|
1139
|
+
], 64)) : $("", !0),
|
|
1140
|
+
E.value ? (g(), H(e(Y), {
|
|
1141
|
+
key: 3,
|
|
1142
|
+
class: "table-form__action",
|
|
1143
|
+
onClick: n,
|
|
1144
|
+
title: e(a)("COMMON_ACTIONCELL.LABEL_DELETE")
|
|
1145
|
+
}, {
|
|
1146
|
+
default: A(() => [
|
|
1147
|
+
v(e(it))
|
|
1148
|
+
]),
|
|
1149
|
+
_: 1
|
|
1150
|
+
}, 8, ["title"])) : $("", !0)
|
|
1151
|
+
]));
|
|
1152
|
+
}
|
|
1153
|
+
}, kt = /* @__PURE__ */ ue(xt, [["__scopeId", "data-v-d76e5a0b"]]), Ht = {
|
|
1154
|
+
// 参数名称列
|
|
1155
|
+
name: {
|
|
1156
|
+
get label() {
|
|
1157
|
+
return X("COMMON_PARAMETERTABLE.ARGUMENT_PARAM_NAME");
|
|
1158
|
+
},
|
|
1159
|
+
slot: "name",
|
|
1160
|
+
minWidth: 200,
|
|
1161
|
+
headerSlot: "keyHeader",
|
|
1162
|
+
required: !0
|
|
1163
|
+
},
|
|
1164
|
+
// 参数类型列
|
|
1165
|
+
type: {
|
|
1166
|
+
get label() {
|
|
1167
|
+
return X("COMMON_PARAMETERTABLE.ARGUMENT_PARAM_TYPE");
|
|
1168
|
+
},
|
|
1169
|
+
slot: "type",
|
|
1170
|
+
minWidth: 150,
|
|
1171
|
+
headerSlot: "typeHeader",
|
|
1172
|
+
required: !0
|
|
1173
|
+
},
|
|
1174
|
+
// 参数类型列(较窄,用于普通模式)
|
|
1175
|
+
typeNarrow: {
|
|
1176
|
+
get label() {
|
|
1177
|
+
return X("COMMON_PARAMETERTABLE.ARGUMENT_PARAM_TYPE");
|
|
1178
|
+
},
|
|
1179
|
+
slot: "type",
|
|
1180
|
+
minWidth: 100,
|
|
1181
|
+
headerSlot: "typeHeader"
|
|
1182
|
+
},
|
|
1183
|
+
// 参数描述列(必填)
|
|
1184
|
+
descriptionRequired: {
|
|
1185
|
+
get label() {
|
|
1186
|
+
return X("COMMON_PARAMETERTABLE.ARGUMENT_PARAM_DESC");
|
|
1187
|
+
},
|
|
1188
|
+
slot: "description",
|
|
1189
|
+
minWidth: 250,
|
|
1190
|
+
headerSlot: "descHeader",
|
|
1191
|
+
required: !0
|
|
1192
|
+
},
|
|
1193
|
+
// 参数描述列(非必填)
|
|
1194
|
+
description: {
|
|
1195
|
+
get label() {
|
|
1196
|
+
return X("COMMON_PARAMETERTABLE.ARGUMENT_PARAM_DESC");
|
|
1197
|
+
},
|
|
1198
|
+
slot: "description",
|
|
1199
|
+
minWidth: 150,
|
|
1200
|
+
headerSlot: "descHeader",
|
|
1201
|
+
required: !1
|
|
1202
|
+
},
|
|
1203
|
+
// 参数描述列(普通模式,较窄)
|
|
1204
|
+
descriptionNarrow: {
|
|
1205
|
+
get label() {
|
|
1206
|
+
return X("COMMON_PARAMETERTABLE.ARGUMENT_PARAM_DESC");
|
|
1207
|
+
},
|
|
1208
|
+
slot: "description",
|
|
1209
|
+
minWidth: 150
|
|
1210
|
+
},
|
|
1211
|
+
// 是否必填列
|
|
1212
|
+
required: {
|
|
1213
|
+
get label() {
|
|
1214
|
+
return X("COMMON_PARAMETERTABLE.ARGUMENT_PARAM_REQUIRED");
|
|
1215
|
+
},
|
|
1216
|
+
slot: "required",
|
|
1217
|
+
minWidth: 100
|
|
1218
|
+
},
|
|
1219
|
+
// 参数显示名列
|
|
1220
|
+
showName: {
|
|
1221
|
+
get label() {
|
|
1222
|
+
return X("COMMON_PARAMETERTABLE.ARGUMENT_PARAM_SHOW_NAME");
|
|
1223
|
+
},
|
|
1224
|
+
slot: "showName",
|
|
1225
|
+
minWidth: 200,
|
|
1226
|
+
headerSlot: "showNameHeader"
|
|
1227
|
+
},
|
|
1228
|
+
// 参数格式列(已注释,保留以备后用)
|
|
1229
|
+
// format: {
|
|
1230
|
+
// label: '参数格式',
|
|
1231
|
+
// slot: 'format',
|
|
1232
|
+
// minWidth: 200,
|
|
1233
|
+
// headerSlot: 'formatHeader'
|
|
1234
|
+
// },
|
|
1235
|
+
// 默认值列
|
|
1236
|
+
default: {
|
|
1237
|
+
get label() {
|
|
1238
|
+
return X("COMMON_PARAMETERTABLE.ARGUMENT_PARAM_DEFAULT_VALUE");
|
|
1239
|
+
},
|
|
1240
|
+
slot: "default",
|
|
1241
|
+
minWidth: 180
|
|
1242
|
+
},
|
|
1243
|
+
// 是否可见列
|
|
1244
|
+
isShow: {
|
|
1245
|
+
get label() {
|
|
1246
|
+
return X("COMMON_PARAMETERTABLE.ARGUMENT_PARAM_IS_SHOW");
|
|
1247
|
+
},
|
|
1248
|
+
slot: "isShow",
|
|
1249
|
+
minWidth: 150,
|
|
1250
|
+
headerSlot: "isShowHeader"
|
|
1251
|
+
},
|
|
1252
|
+
// 调试值列
|
|
1253
|
+
test: {
|
|
1254
|
+
get label() {
|
|
1255
|
+
return X("COMMON_PARAMETERTABLE.ARGUMENT_PARAM_TEST_VALUE");
|
|
1256
|
+
},
|
|
1257
|
+
slot: "test",
|
|
1258
|
+
minWidth: 180
|
|
1259
|
+
},
|
|
1260
|
+
// Mock值列(用于普通模式)
|
|
1261
|
+
mock: {
|
|
1262
|
+
get label() {
|
|
1263
|
+
return X("COMMON_PARAMETERTABLE.ARGUMENT_PARAM_MOCK_VALUE");
|
|
1264
|
+
},
|
|
1265
|
+
slot: "test",
|
|
1266
|
+
minWidth: 100
|
|
1267
|
+
},
|
|
1268
|
+
// Mock值列(较宽,用于 justString 模式)
|
|
1269
|
+
mockWide: {
|
|
1270
|
+
get label() {
|
|
1271
|
+
return X("COMMON_PARAMETERTABLE.ARGUMENT_PARAM_MOCK_VALUE");
|
|
1272
|
+
},
|
|
1273
|
+
slot: "test",
|
|
1274
|
+
minWidth: 180
|
|
1275
|
+
},
|
|
1276
|
+
// 操作列
|
|
1277
|
+
action: {
|
|
1278
|
+
get label() {
|
|
1279
|
+
return X("COMMON_PARAMETERTABLE.LABEL_OPERATION");
|
|
1280
|
+
},
|
|
1281
|
+
slot: "action",
|
|
1282
|
+
fixed: "right",
|
|
1283
|
+
width: 140,
|
|
1284
|
+
headerSlot: "actionHeader"
|
|
1285
|
+
}
|
|
1286
|
+
}, Fe = {
|
|
1287
|
+
// 插件模式 - 基础列
|
|
1288
|
+
plugin: ["name", "type", "descriptionRequired", "required", "test", "action"],
|
|
1289
|
+
// 插件模式 - 更多列
|
|
1290
|
+
pluginMore: [
|
|
1291
|
+
"name",
|
|
1292
|
+
"type",
|
|
1293
|
+
"descriptionRequired",
|
|
1294
|
+
"required",
|
|
1295
|
+
"showName",
|
|
1296
|
+
"default",
|
|
1297
|
+
"isShow",
|
|
1298
|
+
"test",
|
|
1299
|
+
"action"
|
|
1300
|
+
],
|
|
1301
|
+
// 插件模式 + 数据类型模式
|
|
1302
|
+
pluginDataType: ["name", "type", "description", "action"],
|
|
1303
|
+
// 插件模式 + justString - 基础列
|
|
1304
|
+
pluginJustString: [
|
|
1305
|
+
"name",
|
|
1306
|
+
"descriptionRequired",
|
|
1307
|
+
"required",
|
|
1308
|
+
"test",
|
|
1309
|
+
"action"
|
|
1310
|
+
],
|
|
1311
|
+
// 插件模式 + justString - 更多列
|
|
1312
|
+
pluginJustStringMore: [
|
|
1313
|
+
"name",
|
|
1314
|
+
"descriptionRequired",
|
|
1315
|
+
"required",
|
|
1316
|
+
"showName",
|
|
1317
|
+
"default",
|
|
1318
|
+
"isShow",
|
|
1319
|
+
"test",
|
|
1320
|
+
"action"
|
|
1321
|
+
],
|
|
1322
|
+
// 普通模式
|
|
1323
|
+
normal: ["name", "typeNarrow", "mock", "action"],
|
|
1324
|
+
// 普通模式 + 数据类型模式
|
|
1325
|
+
normalDataType: ["name", "typeNarrow", "descriptionNarrow", "action"],
|
|
1326
|
+
// 普通模式 + justString
|
|
1327
|
+
normalJustString: ["name", "mockWide", "action"]
|
|
1328
|
+
};
|
|
1329
|
+
function xe(i) {
|
|
1330
|
+
return i.map((r) => {
|
|
1331
|
+
const a = Ht[r];
|
|
1332
|
+
if (!a)
|
|
1333
|
+
return console.warn(`列配置 "${r}" 不存在`), null;
|
|
1334
|
+
const l = Object.create(Object.getPrototypeOf(a));
|
|
1335
|
+
return Object.defineProperties(
|
|
1336
|
+
l,
|
|
1337
|
+
Object.getOwnPropertyDescriptors(a)
|
|
1338
|
+
), l;
|
|
1339
|
+
}).filter(Boolean);
|
|
1340
|
+
}
|
|
1341
|
+
function jt(i) {
|
|
1342
|
+
return i.isPluginMode && i.isDataType ? "pluginDataType" : i.justString ? i.isPluginMode ? i.showMoreColumns ? "pluginJustStringMore" : "pluginJustString" : "normalJustString" : i.isPluginMode ? i.showMoreColumns ? "pluginMore" : "plugin" : i.isDataType ? "normalDataType" : "normal";
|
|
1343
|
+
}
|
|
1344
|
+
function qt(i) {
|
|
1345
|
+
return {
|
|
1346
|
+
columns: h(() => {
|
|
1347
|
+
const a = jt(i), l = Fe[a];
|
|
1348
|
+
return l ? xe(l) : (console.warn(`列预设 "${a}" 不存在,使用默认配置`), xe(Fe.normal));
|
|
1349
|
+
})
|
|
1350
|
+
};
|
|
1351
|
+
}
|
|
1352
|
+
function Wt(i, r = null) {
|
|
1353
|
+
const { t: a } = ne(), {
|
|
1354
|
+
getFieldName: l,
|
|
1355
|
+
tableData: w,
|
|
1356
|
+
validationErrors: f,
|
|
1357
|
+
focusFields: p,
|
|
1358
|
+
isDataType: _,
|
|
1359
|
+
inputItemNamesArr: C
|
|
1360
|
+
} = i, O = (u, o, s = null) => {
|
|
1361
|
+
for (const E of u) {
|
|
1362
|
+
if (E.uiid === o)
|
|
1363
|
+
return s;
|
|
1364
|
+
if (E.children) {
|
|
1365
|
+
const N = O(E.children, o, E);
|
|
1366
|
+
if (N) return N;
|
|
1367
|
+
}
|
|
1368
|
+
}
|
|
1369
|
+
return null;
|
|
1370
|
+
}, m = (u, o) => {
|
|
1371
|
+
for (const s of u) {
|
|
1372
|
+
if (s.uiid === o)
|
|
1373
|
+
return u;
|
|
1374
|
+
if (s.children && s.children.length > 0) {
|
|
1375
|
+
const E = m(s.children, o);
|
|
1376
|
+
if (E) return E;
|
|
1377
|
+
}
|
|
1378
|
+
}
|
|
1379
|
+
return null;
|
|
1380
|
+
}, P = (u, o, s = null, E = {}) => {
|
|
1381
|
+
const { checkEmpty: N = !1 } = E, R = /^[a-zA-Z][a-zA-Z0-9_-]*$/, y = s || l("name");
|
|
1382
|
+
if (N && !u)
|
|
1383
|
+
return f.value[o] = {
|
|
1384
|
+
...f.value[o],
|
|
1385
|
+
[y]: a("COMMON_PARAMETERTABLE.ERROR_PARAM_NAME_REQUIRED")
|
|
1386
|
+
}, !1;
|
|
1387
|
+
if (!u || !R.test(u))
|
|
1388
|
+
return f.value[o] = {
|
|
1389
|
+
...f.value[o],
|
|
1390
|
+
[y]: a("COMMON_PARAMETERTABLE.ERROR_PARAM_NAME_INVALID")
|
|
1391
|
+
}, !1;
|
|
1392
|
+
const n = m(w.value, o);
|
|
1393
|
+
return n && n.find(
|
|
1394
|
+
(x) => x[y] === u && x.uiid !== o && x[y] !== "[Array Item]"
|
|
1395
|
+
) ? (f.value[o] = {
|
|
1396
|
+
[y]: a(
|
|
1397
|
+
"COMMON_PARAMETERTABLE.ERROR_PARAM_NAME_DUPLICATE"
|
|
1398
|
+
)
|
|
1399
|
+
}, !1) : !O(w.value, o) && C.value && C.value.length > 0 && C.value.filter((k) => (k[y] || k.dataName || k.name) === u).find((k) => k.uiid !== o) ? (f.value[o] = {
|
|
1400
|
+
[y]: a(
|
|
1401
|
+
"COMMON_PARAMETERTABLE.ERROR_PARAM_NAME_DUPLICATE"
|
|
1402
|
+
)
|
|
1403
|
+
}, !1) : (f.value[o] && (delete f.value[o][y], Object.keys(f.value[o]).length === 0 && delete f.value[o]), !0);
|
|
1404
|
+
}, D = (u, o, s = null, E = {}) => {
|
|
1405
|
+
const { checkEmpty: N = !1, checkTypesMap: R = !1 } = E, y = s || l("type");
|
|
1406
|
+
return N && !u ? (f.value[o] = {
|
|
1407
|
+
...f.value[o],
|
|
1408
|
+
[y]: a("COMMON_PARAMETERTABLE.ERROR_PARAM_TYPE_REQUIRED")
|
|
1409
|
+
// '参数类型不能为空'
|
|
1410
|
+
}, !1) : u === "array" ? (f.value[o] = {
|
|
1411
|
+
...f.value[o],
|
|
1412
|
+
[y]: a("COMMON_PARAMETERTABLE.ERROR_ARRAY_TYPE_REQUIRED")
|
|
1413
|
+
//'请选择数组类型'
|
|
1414
|
+
}, !1) : R && u && !De[u] ? (f.value[o] = {
|
|
1415
|
+
...f.value[o],
|
|
1416
|
+
[y]: a("COMMON_PARAMETERTABLE.ERROR_PARAM_TYPE_INVALID")
|
|
1417
|
+
// '参数类型无效'
|
|
1418
|
+
}, !1) : (f.value[o] && (delete f.value[o][y], Object.keys(f.value[o]).length === 0 && delete f.value[o]), !0);
|
|
1419
|
+
}, T = (u) => {
|
|
1420
|
+
if (!Array.isArray(u))
|
|
1421
|
+
return;
|
|
1422
|
+
const o = l("type");
|
|
1423
|
+
u.forEach((s) => {
|
|
1424
|
+
const E = s[o];
|
|
1425
|
+
E === "array" && D(E, s.uiid, o), s.children && Array.isArray(s.children) && s.children.length > 0 && T(s.children);
|
|
1426
|
+
});
|
|
1427
|
+
};
|
|
1428
|
+
return {
|
|
1429
|
+
// 方法
|
|
1430
|
+
validateDataName: P,
|
|
1431
|
+
validateDataType: D,
|
|
1432
|
+
validateAllDataTypes: T,
|
|
1433
|
+
validateAllRows: (u = !1) => {
|
|
1434
|
+
let o = !1;
|
|
1435
|
+
const s = l("name"), E = l("type"), N = l("value"), R = [];
|
|
1436
|
+
r && r.value && r.value.forEach((n) => {
|
|
1437
|
+
n.required && n.slot && R.push(n.slot);
|
|
1438
|
+
});
|
|
1439
|
+
const y = (n) => {
|
|
1440
|
+
Array.isArray(n) && n.forEach((I) => {
|
|
1441
|
+
const V = I.uiid, x = I[s], k = I[E], K = x === "[Array Item]";
|
|
1442
|
+
if (K || R.forEach((J) => {
|
|
1443
|
+
let z = J;
|
|
1444
|
+
J === "name" ? z = s : J === "type" && (z = E);
|
|
1445
|
+
const Q = I[z];
|
|
1446
|
+
if (!Q || typeof Q == "string" && !Q.trim()) {
|
|
1447
|
+
let de = a("COMMON_PARAMETERTABLE.ERROR_PARAM_REQUIRED");
|
|
1448
|
+
z === s ? de = a("COMMON_PARAMETERTABLE.ERROR_PARAM_NAME_REQUIRED") : z === E ? de = a("COMMON_PARAMETERTABLE.ERROR_PARAM_TYPE_REQUIRED") : z === "description" && (de = a("COMMON_PARAMETERTABLE.ERROR_PARAM_DESC_REQUIRED")), f.value[V] = {
|
|
1449
|
+
...f.value[V],
|
|
1450
|
+
[z]: de
|
|
1451
|
+
}, o = !0;
|
|
1452
|
+
}
|
|
1453
|
+
}), K || P(x, V, s, {
|
|
1454
|
+
checkEmpty: !0
|
|
1455
|
+
}) || (o = !0), K || D(k, V, E, {
|
|
1456
|
+
checkEmpty: !0,
|
|
1457
|
+
checkTypesMap: _.value
|
|
1458
|
+
}) || (o = !0), u && !K && I.required) {
|
|
1459
|
+
const J = I[N];
|
|
1460
|
+
(!J || typeof J == "string" && !J.trim()) && (f.value[V] = {
|
|
1461
|
+
...f.value[V],
|
|
1462
|
+
[N]: a(
|
|
1463
|
+
"COMMON_PARAMETERTABLE.ERROR_PARAM_TEST_VALUE_REQUIRED"
|
|
1464
|
+
)
|
|
1465
|
+
// '调试值不能为空'
|
|
1466
|
+
}, o = !0);
|
|
1467
|
+
}
|
|
1468
|
+
if ((k === "object" || k === "arrayObject") && I.children && Array.isArray(I.children) && I.children.length > 0) {
|
|
1469
|
+
const J = [];
|
|
1470
|
+
I.children.forEach((z) => {
|
|
1471
|
+
const Q = z[s];
|
|
1472
|
+
Q && Q !== "[Array Item]" && J.includes(Q) ? (f.value[z.uiid] = {
|
|
1473
|
+
...f.value[z.uiid],
|
|
1474
|
+
[s]: a(
|
|
1475
|
+
"COMMON_PARAMETERTABLE.ERROR_PARAM_NAME_DUPLICATE"
|
|
1476
|
+
)
|
|
1477
|
+
// '参数名不能重复'
|
|
1478
|
+
}, o = !0) : Q && Q !== "[Array Item]" && J.push(Q);
|
|
1479
|
+
}), y(I.children);
|
|
1480
|
+
}
|
|
1481
|
+
});
|
|
1482
|
+
};
|
|
1483
|
+
return y(w.value), !o;
|
|
1484
|
+
},
|
|
1485
|
+
handleFocus: (u, o) => {
|
|
1486
|
+
p.value[u] || (p.value[u] = {}), p.value[u][o] = !0;
|
|
1487
|
+
},
|
|
1488
|
+
handleBlur: (u, o, s, E) => {
|
|
1489
|
+
const N = u.uiid;
|
|
1490
|
+
p.value[N] && (p.value[N][o] = !1);
|
|
1491
|
+
const R = u[o];
|
|
1492
|
+
P(R, N, o), s("data-name-validate"), E();
|
|
1493
|
+
},
|
|
1494
|
+
findParentNode: O,
|
|
1495
|
+
getSiblings: m,
|
|
1496
|
+
validateDescription: (u, o) => {
|
|
1497
|
+
const s = u.uiid;
|
|
1498
|
+
o && !u.description ? f.value[s] = {
|
|
1499
|
+
...f.value[s],
|
|
1500
|
+
description: a("COMMON_PARAMETERTABLE.ERROR_PARAM_DESC_REQUIRED")
|
|
1501
|
+
// '参数描述不能为空'
|
|
1502
|
+
} : f.value[s]?.description && delete f.value[s].description;
|
|
1503
|
+
}
|
|
1504
|
+
};
|
|
1505
|
+
}
|
|
1506
|
+
function $t(i, r, a, l, w, f) {
|
|
1507
|
+
const {
|
|
1508
|
+
tableData: p,
|
|
1509
|
+
getFieldName: _,
|
|
1510
|
+
emit: C,
|
|
1511
|
+
validationErrors: O,
|
|
1512
|
+
tableRef: m,
|
|
1513
|
+
props: P,
|
|
1514
|
+
isJustString: D,
|
|
1515
|
+
disabled: T
|
|
1516
|
+
} = i, M = te(1), b = () => {
|
|
1517
|
+
p.value = [...p.value];
|
|
1518
|
+
}, L = () => {
|
|
1519
|
+
const n = r(), I = _("name"), V = _("type");
|
|
1520
|
+
D.value && (n[V] = "string"), p.value = [...p.value, n], M.value = p.value.length, ve(() => {
|
|
1521
|
+
y(), p.value.forEach((x) => {
|
|
1522
|
+
const k = x[I];
|
|
1523
|
+
k && (w(k, x.uiid, I), C("data-name-validate"));
|
|
1524
|
+
}), f();
|
|
1525
|
+
});
|
|
1526
|
+
}, d = (n) => {
|
|
1527
|
+
u(p.value, n.row.uiid), O.value[n.row.uiid] && delete O.value[n.row.uiid], b(), M.value = p.value.length, f(), C("data-name-validate");
|
|
1528
|
+
}, u = (n, I) => {
|
|
1529
|
+
for (let V = 0; V < n.length; V++) {
|
|
1530
|
+
if (n[V].uiid === I)
|
|
1531
|
+
return n.splice(V, 1), !0;
|
|
1532
|
+
if (n[V].children && n[V].children.length > 0 && u(n[V].children, I))
|
|
1533
|
+
return !0;
|
|
1534
|
+
}
|
|
1535
|
+
return !1;
|
|
1536
|
+
}, o = (n) => {
|
|
1537
|
+
const I = _("type"), x = (n.row.deep || 1) + 1, k = a(n.row[I], x);
|
|
1538
|
+
n.row.children ? n.row.children.push(k) : n.row.children = [k], b(), ve(() => {
|
|
1539
|
+
y();
|
|
1540
|
+
});
|
|
1541
|
+
}, s = (n) => {
|
|
1542
|
+
const I = l(p.value, n.uiid);
|
|
1543
|
+
return I && I.children ? I.children.findIndex((x) => x.uiid === n.uiid) > 0 : !1;
|
|
1544
|
+
}, E = (n) => {
|
|
1545
|
+
const I = l(p.value, n.uiid);
|
|
1546
|
+
return I && I.children ? I.children.findIndex((x) => x.uiid === n.uiid) < I.children.length - 1 : !1;
|
|
1547
|
+
}, N = (n, I) => {
|
|
1548
|
+
const V = l(p.value, n.uiid);
|
|
1549
|
+
if (!V || !V.children) return;
|
|
1550
|
+
const x = V.children.findIndex((K) => K.uiid === n.uiid);
|
|
1551
|
+
if (x === -1) return;
|
|
1552
|
+
const k = I === "up" ? x - 1 : x + 1;
|
|
1553
|
+
if (k >= 0 && k < V.children.length) {
|
|
1554
|
+
const K = V.children.splice(x, 1)[0];
|
|
1555
|
+
V.children.splice(k, 0, K), b();
|
|
1556
|
+
}
|
|
1557
|
+
}, R = (n) => !(T.value || n.disabled);
|
|
1558
|
+
function y() {
|
|
1559
|
+
ve(() => {
|
|
1560
|
+
setTimeout(() => {
|
|
1561
|
+
if (!m.value) return;
|
|
1562
|
+
let n = null;
|
|
1563
|
+
if (m.value.$el) {
|
|
1564
|
+
const I = [
|
|
1565
|
+
".el-table__body-wrapper",
|
|
1566
|
+
".el-scrollbar__wrap",
|
|
1567
|
+
".aibox-table__body",
|
|
1568
|
+
".el-table__body",
|
|
1569
|
+
".table-body-wrapper",
|
|
1570
|
+
".el-scrollbar__view",
|
|
1571
|
+
'[class*="body-wrapper"]',
|
|
1572
|
+
'[class*="scrollbar"]',
|
|
1573
|
+
'[class*="table__body"]'
|
|
1574
|
+
];
|
|
1575
|
+
for (const V of I) {
|
|
1576
|
+
const x = m.value.$el.querySelectorAll(V);
|
|
1577
|
+
for (const k of x)
|
|
1578
|
+
if (k.scrollHeight > k.clientHeight) {
|
|
1579
|
+
n = k;
|
|
1580
|
+
break;
|
|
1581
|
+
}
|
|
1582
|
+
if (n) break;
|
|
1583
|
+
}
|
|
1584
|
+
}
|
|
1585
|
+
if (!n && m.value.$el) {
|
|
1586
|
+
const I = (V) => {
|
|
1587
|
+
if (V.scrollHeight > V.clientHeight && V.scrollHeight > 0)
|
|
1588
|
+
return V;
|
|
1589
|
+
for (const x of V.children || []) {
|
|
1590
|
+
const k = I(x);
|
|
1591
|
+
if (k) return k;
|
|
1592
|
+
}
|
|
1593
|
+
return null;
|
|
1594
|
+
};
|
|
1595
|
+
n = I(m.value.$el);
|
|
1596
|
+
}
|
|
1597
|
+
if (!n && m.value.$el && m.value.$el.scrollHeight > m.value.$el.clientHeight && (n = m.value.$el), n)
|
|
1598
|
+
try {
|
|
1599
|
+
n.scrollTo({
|
|
1600
|
+
top: n.scrollHeight,
|
|
1601
|
+
behavior: "smooth"
|
|
1602
|
+
});
|
|
1603
|
+
} catch {
|
|
1604
|
+
n.scrollTop = n.scrollHeight;
|
|
1605
|
+
}
|
|
1606
|
+
}, 50);
|
|
1607
|
+
}), C("scroll-to-bottom");
|
|
1608
|
+
}
|
|
1609
|
+
return {
|
|
1610
|
+
// 状态
|
|
1611
|
+
total: M,
|
|
1612
|
+
// 方法
|
|
1613
|
+
addNewRow: L,
|
|
1614
|
+
deleteLists: d,
|
|
1615
|
+
addLists: o,
|
|
1616
|
+
moveArrayItem: N,
|
|
1617
|
+
canMoveUp: s,
|
|
1618
|
+
canMoveDown: E,
|
|
1619
|
+
showDeleteButton: R,
|
|
1620
|
+
triggerTableUpdate: b
|
|
1621
|
+
};
|
|
1622
|
+
}
|
|
1623
|
+
function Gt(i) {
|
|
1624
|
+
const {
|
|
1625
|
+
getFieldName: r,
|
|
1626
|
+
getSnowFlakeId: a,
|
|
1627
|
+
props: l,
|
|
1628
|
+
typeList: w,
|
|
1629
|
+
isSingleType: f,
|
|
1630
|
+
isPluginMode: p,
|
|
1631
|
+
isDataType: _,
|
|
1632
|
+
isJustString: C,
|
|
1633
|
+
forceRequired: O,
|
|
1634
|
+
location: m
|
|
1635
|
+
} = i, P = (d = 1) => {
|
|
1636
|
+
const u = f.value ? w.value[0].value : "string", o = r("name"), s = r("type"), E = r("value"), N = {
|
|
1637
|
+
uiid: a(),
|
|
1638
|
+
[o]: "",
|
|
1639
|
+
[s]: u,
|
|
1640
|
+
[E]: "",
|
|
1641
|
+
description: ""
|
|
1642
|
+
};
|
|
1643
|
+
if (p.value) {
|
|
1644
|
+
const R = {
|
|
1645
|
+
required: !!O.value,
|
|
1646
|
+
extendName: "",
|
|
1647
|
+
extendWidgetType: "",
|
|
1648
|
+
extendDisplay: !0,
|
|
1649
|
+
defaultValue: ""
|
|
1650
|
+
};
|
|
1651
|
+
return _.value ? {
|
|
1652
|
+
...N,
|
|
1653
|
+
...R,
|
|
1654
|
+
deep: d
|
|
1655
|
+
} : {
|
|
1656
|
+
...N,
|
|
1657
|
+
...R
|
|
1658
|
+
};
|
|
1659
|
+
} else
|
|
1660
|
+
return {
|
|
1661
|
+
source: null,
|
|
1662
|
+
dataValue: "",
|
|
1663
|
+
...N,
|
|
1664
|
+
featAttr: {
|
|
1665
|
+
location: m.value,
|
|
1666
|
+
debugValue: "",
|
|
1667
|
+
description: ""
|
|
1668
|
+
}
|
|
1669
|
+
};
|
|
1670
|
+
}, D = (d, u = 1) => {
|
|
1671
|
+
const o = r("name"), s = r("type"), E = {
|
|
1672
|
+
debugValue: "",
|
|
1673
|
+
description: "",
|
|
1674
|
+
uiid: a(),
|
|
1675
|
+
disabled: !1
|
|
1676
|
+
}, N = p.value ? {
|
|
1677
|
+
required: !!O.value,
|
|
1678
|
+
extendName: "",
|
|
1679
|
+
extendWidgetType: "",
|
|
1680
|
+
extendDisplay: !0,
|
|
1681
|
+
defaultValue: ""
|
|
1682
|
+
} : {};
|
|
1683
|
+
p.value && _.value && (N.deep = u);
|
|
1684
|
+
const R = (y) => {
|
|
1685
|
+
switch (y) {
|
|
1686
|
+
case "arrayString":
|
|
1687
|
+
return "string";
|
|
1688
|
+
case "arrayInteger":
|
|
1689
|
+
return "integer";
|
|
1690
|
+
case "arrayNumber":
|
|
1691
|
+
return "number";
|
|
1692
|
+
case "arrayBoolean":
|
|
1693
|
+
return "boolean";
|
|
1694
|
+
case "arrayImage":
|
|
1695
|
+
return "image";
|
|
1696
|
+
case "arrayFile":
|
|
1697
|
+
return "file";
|
|
1698
|
+
case "arrayObject":
|
|
1699
|
+
return "object";
|
|
1700
|
+
default:
|
|
1701
|
+
return l.justString, "string";
|
|
1702
|
+
}
|
|
1703
|
+
};
|
|
1704
|
+
if (d === "object")
|
|
1705
|
+
return {
|
|
1706
|
+
...E,
|
|
1707
|
+
...N,
|
|
1708
|
+
[o]: "",
|
|
1709
|
+
[s]: (C.value, "string")
|
|
1710
|
+
};
|
|
1711
|
+
if (d === "arrayObject")
|
|
1712
|
+
return _.value ? {
|
|
1713
|
+
...E,
|
|
1714
|
+
...N,
|
|
1715
|
+
[o]: "",
|
|
1716
|
+
[s]: "string",
|
|
1717
|
+
hasChildren: !1
|
|
1718
|
+
} : {
|
|
1719
|
+
...E,
|
|
1720
|
+
...N,
|
|
1721
|
+
[o]: "[Array Item]",
|
|
1722
|
+
[s]: "object",
|
|
1723
|
+
hasChildren: !1
|
|
1724
|
+
// 新创建时没有 children,后续会根据实际情况更新
|
|
1725
|
+
};
|
|
1726
|
+
{
|
|
1727
|
+
const y = R(d);
|
|
1728
|
+
return {
|
|
1729
|
+
...E,
|
|
1730
|
+
...N,
|
|
1731
|
+
[o]: "[Array Item]",
|
|
1732
|
+
[s]: y,
|
|
1733
|
+
hasChildren: !1
|
|
1734
|
+
// 非 object 类型的数组子项,不显示展开收起符号
|
|
1735
|
+
};
|
|
1736
|
+
}
|
|
1737
|
+
}, T = (d) => {
|
|
1738
|
+
const u = r("name"), o = r("type"), s = r("value");
|
|
1739
|
+
return ce(d, {
|
|
1740
|
+
nameField: u,
|
|
1741
|
+
typeField: o,
|
|
1742
|
+
valueField: s
|
|
1743
|
+
});
|
|
1744
|
+
}, M = (d) => {
|
|
1745
|
+
const u = r("type"), o = r("value");
|
|
1746
|
+
d.forEach((s) => {
|
|
1747
|
+
if (s.children && s.children.length > 0) {
|
|
1748
|
+
M(s.children);
|
|
1749
|
+
const E = s[u];
|
|
1750
|
+
if (se(E) || E === "object") {
|
|
1751
|
+
const N = T(s);
|
|
1752
|
+
N !== void 0 && (s[o] = N);
|
|
1753
|
+
}
|
|
1754
|
+
}
|
|
1755
|
+
});
|
|
1756
|
+
};
|
|
1757
|
+
return {
|
|
1758
|
+
createEmptyInputParam: P,
|
|
1759
|
+
createArrayItem: D,
|
|
1760
|
+
convertChildrenToDebugValue: T,
|
|
1761
|
+
updateParentDebugValues: M,
|
|
1762
|
+
debuggerChangeValue: (d, u) => {
|
|
1763
|
+
M(d.value), u("debugger-data-change");
|
|
1764
|
+
},
|
|
1765
|
+
changeType: (d, u, o, s, E) => {
|
|
1766
|
+
const N = r("type"), R = r("value"), y = d[N];
|
|
1767
|
+
u(y, d.uiid, N), d.children && Array.isArray(d.children) && d.children.length > 0 && o(d.children);
|
|
1768
|
+
const n = ye.find((V) => V.value === y), I = n ? n.example : "";
|
|
1769
|
+
d[R] = I, d.children && delete d.children, s(), E();
|
|
1770
|
+
},
|
|
1771
|
+
isArrayType: se
|
|
1772
|
+
};
|
|
1773
|
+
}
|
|
1774
|
+
function Yt(i, r, a) {
|
|
1775
|
+
const { t: l } = ne(), { getFieldName: w, tableData: f } = i, p = (T) => {
|
|
1776
|
+
T.required && (T.extendDisplay = !0), r(), a();
|
|
1777
|
+
}, _ = (T, M) => {
|
|
1778
|
+
const b = w("type");
|
|
1779
|
+
M["extend-widget-item"] && delete M["extend-widget-item"], (T === "checkbox" || T === "radio-button") && (M[b] = "string", M.children && delete M.children), r(), a();
|
|
1780
|
+
}, C = (T, M, b, L) => {
|
|
1781
|
+
for (const d of T) {
|
|
1782
|
+
if (d.uiid === M)
|
|
1783
|
+
return d[b] = L, !0;
|
|
1784
|
+
if (d.children && d.children.length > 0 && C(d.children, M, b, L))
|
|
1785
|
+
return !0;
|
|
1786
|
+
}
|
|
1787
|
+
return !1;
|
|
1788
|
+
};
|
|
1789
|
+
return {
|
|
1790
|
+
handleRequiredChange: p,
|
|
1791
|
+
handleFormatChange: _,
|
|
1792
|
+
handleOptionCreated: (T) => {
|
|
1793
|
+
C(
|
|
1794
|
+
f.value,
|
|
1795
|
+
T.uiid,
|
|
1796
|
+
"extend-widget-item",
|
|
1797
|
+
T.data
|
|
1798
|
+
), r(), a();
|
|
1799
|
+
},
|
|
1800
|
+
parseWidgetItems: (T) => {
|
|
1801
|
+
if (!T) return [];
|
|
1802
|
+
if (Array.isArray(T)) return T;
|
|
1803
|
+
try {
|
|
1804
|
+
return typeof T == "string" ? JSON.parse(T) : [];
|
|
1805
|
+
} catch {
|
|
1806
|
+
return [];
|
|
1807
|
+
}
|
|
1808
|
+
},
|
|
1809
|
+
clearFiles: (T) => {
|
|
1810
|
+
const M = w("value");
|
|
1811
|
+
T[M] = "", r();
|
|
1812
|
+
},
|
|
1813
|
+
uploadSuccess: (T, M, b) => {
|
|
1814
|
+
nt.success(l("COMMON_PARAMETERTABLE.LABEL_UPLOAD_SUCCESS")), M[b] = T, r();
|
|
1815
|
+
}
|
|
1816
|
+
};
|
|
1817
|
+
}
|
|
1818
|
+
const Jt = {
|
|
1819
|
+
key: 0,
|
|
1820
|
+
style: { color: "red", "margin-right": "2px" }
|
|
1821
|
+
}, Xt = {
|
|
1822
|
+
key: 0,
|
|
1823
|
+
style: { color: "red", "margin-right": "2px" }
|
|
1824
|
+
}, zt = {
|
|
1825
|
+
key: 0,
|
|
1826
|
+
style: { color: "red", "margin-right": "2px" }
|
|
1827
|
+
}, Qt = { class: "table-header" }, Kt = { class: "header-text" }, Zt = { class: "tool-tip-column" }, el = { class: "table-header" }, tl = { class: "header-text" }, ll = { class: "tool-tip-column" }, al = { class: "table-header" }, nl = { class: "header-text" }, rl = { class: "tool-tip-column" }, ol = { class: "action-header" }, il = {
|
|
1828
|
+
key: 0,
|
|
1829
|
+
class: "error-message"
|
|
1830
|
+
}, sl = { class: "table-form__isshow" }, ul = { class: "table-form__isshow" }, dl = {
|
|
1831
|
+
__name: "ParameterTable",
|
|
1832
|
+
props: /* @__PURE__ */ ie({
|
|
1833
|
+
justString: {
|
|
1834
|
+
type: Boolean,
|
|
1835
|
+
default: !1
|
|
1836
|
+
},
|
|
1837
|
+
loadingTable: {
|
|
1838
|
+
type: Boolean,
|
|
1839
|
+
default: !1
|
|
1840
|
+
},
|
|
1841
|
+
maxHeight: {
|
|
1842
|
+
type: Number,
|
|
1843
|
+
default: 300
|
|
1844
|
+
},
|
|
1845
|
+
location: {
|
|
1846
|
+
type: String,
|
|
1847
|
+
default: "params"
|
|
1848
|
+
},
|
|
1849
|
+
setType: {
|
|
1850
|
+
type: Array,
|
|
1851
|
+
default: () => []
|
|
1852
|
+
},
|
|
1853
|
+
// 区分是设置数据类型还是具体值
|
|
1854
|
+
isDataType: {
|
|
1855
|
+
type: Boolean,
|
|
1856
|
+
default: !1
|
|
1857
|
+
},
|
|
1858
|
+
inputItemNamesArr: {
|
|
1859
|
+
type: Array,
|
|
1860
|
+
default: () => []
|
|
1861
|
+
},
|
|
1862
|
+
// 外部控制是否可编辑
|
|
1863
|
+
disabled: {
|
|
1864
|
+
type: Boolean,
|
|
1865
|
+
default: !1
|
|
1866
|
+
},
|
|
1867
|
+
// 插件模式标识
|
|
1868
|
+
isPluginMode: {
|
|
1869
|
+
type: Boolean,
|
|
1870
|
+
default: !1
|
|
1871
|
+
},
|
|
1872
|
+
// 是否显示更多列(插件模式专用)
|
|
1873
|
+
showMoreColumns: {
|
|
1874
|
+
type: Boolean,
|
|
1875
|
+
default: !1
|
|
1876
|
+
},
|
|
1877
|
+
// 强制必填(默认为true且不可修改)
|
|
1878
|
+
forceRequired: {
|
|
1879
|
+
type: Boolean,
|
|
1880
|
+
default: !1
|
|
1881
|
+
},
|
|
1882
|
+
// 禁用字段控制,格式:['字段名', 'add', 'delete']
|
|
1883
|
+
// 例如:['name', 'type', 'add', 'delete'] 表示 name 和 type 字段不可编辑,且不能新增和删除
|
|
1884
|
+
disabledFields: {
|
|
1885
|
+
type: Array,
|
|
1886
|
+
default: () => []
|
|
1887
|
+
},
|
|
1888
|
+
customFieldName: {
|
|
1889
|
+
type: Object,
|
|
1890
|
+
default: null
|
|
1891
|
+
},
|
|
1892
|
+
getSnowFlakeId: {
|
|
1893
|
+
type: Function,
|
|
1894
|
+
default: () => () => Date.now()
|
|
1895
|
+
}
|
|
1896
|
+
}, {
|
|
1897
|
+
tableData: {
|
|
1898
|
+
default: () => []
|
|
1899
|
+
},
|
|
1900
|
+
tableDataModifiers: {}
|
|
1901
|
+
}),
|
|
1902
|
+
emits: /* @__PURE__ */ ie([
|
|
1903
|
+
"debugger-data-change",
|
|
1904
|
+
"show-option",
|
|
1905
|
+
"scroll-to-bottom",
|
|
1906
|
+
"data-name-validate",
|
|
1907
|
+
"name-or-type-change-value"
|
|
1908
|
+
], ["update:tableData"]),
|
|
1909
|
+
setup(i, { expose: r, emit: a }) {
|
|
1910
|
+
const l = i, w = fe(i, "tableData"), f = a, { t: p } = ne(), _ = h(() => l.setType && l.setType.length ? ye.filter((B) => l.setType.includes(B.value)) : ye), C = h(() => l.setType && l.setType.length === 1), O = te(null), m = te({}), P = te({}), D = ft({
|
|
1911
|
+
props: l,
|
|
1912
|
+
tableData: w,
|
|
1913
|
+
emit: f,
|
|
1914
|
+
getSnowFlakeId: l.getSnowFlakeId,
|
|
1915
|
+
typeList: _,
|
|
1916
|
+
isSingleType: C,
|
|
1917
|
+
validationErrors: m,
|
|
1918
|
+
focusFields: P,
|
|
1919
|
+
tableRef: O
|
|
1920
|
+
}), { canAddRow: T, canDeleteRow: M, isFieldDisabled: b, getFieldName: L } = D, { columns: d } = qt(l), { createEmptyInputParam: u, createArrayItem: o, isArrayType: s } = Gt(D), {
|
|
1921
|
+
validateDataName: E,
|
|
1922
|
+
validateDataType: N,
|
|
1923
|
+
validateDescription: R,
|
|
1924
|
+
validateAllDataTypes: y,
|
|
1925
|
+
validateAllRows: n,
|
|
1926
|
+
handleFocus: I,
|
|
1927
|
+
findParentNode: V
|
|
1928
|
+
} = Wt(D, d), x = () => {
|
|
1929
|
+
f("name-or-type-change-value");
|
|
1930
|
+
}, {
|
|
1931
|
+
total: k,
|
|
1932
|
+
addNewRow: K,
|
|
1933
|
+
deleteLists: J,
|
|
1934
|
+
addLists: z,
|
|
1935
|
+
moveArrayItem: Q,
|
|
1936
|
+
canMoveUp: de,
|
|
1937
|
+
canMoveDown: je,
|
|
1938
|
+
showDeleteButton: qe,
|
|
1939
|
+
triggerTableUpdate: Ve
|
|
1940
|
+
} = $t(
|
|
1941
|
+
D,
|
|
1942
|
+
u,
|
|
1943
|
+
o,
|
|
1944
|
+
V,
|
|
1945
|
+
E,
|
|
1946
|
+
x
|
|
1947
|
+
), {
|
|
1948
|
+
handleRequiredChange: We,
|
|
1949
|
+
handleFormatChange: $e,
|
|
1950
|
+
handleOptionCreated: Ge
|
|
1951
|
+
// parseWidgetItems, clearFiles, uploadSuccess 已移至 ValueCell 组件
|
|
1952
|
+
} = Yt(D, Ve, x), Me = h(() => T() || M() ? d.value : d.value.filter((U) => U.slot !== "action")), Ye = (B) => B.uiid, Je = (B) => {
|
|
1953
|
+
const U = V(w.value, B.uiid);
|
|
1954
|
+
return U && U.children ? U.children.findIndex((S) => S.uiid === B.uiid) + 1 : 1;
|
|
1955
|
+
}, _e = (B) => Me.value && Me.value.find((c) => c.slot === B)?.required || !1, Xe = (B, U) => {
|
|
1956
|
+
const c = B.uiid;
|
|
1957
|
+
P.value[c] && (P.value[c][U] = !1);
|
|
1958
|
+
const S = B[U];
|
|
1959
|
+
E(S, c, U), f("data-name-validate"), x();
|
|
1960
|
+
}, ze = (B) => {
|
|
1961
|
+
const U = L("type"), c = L("value"), S = B[U];
|
|
1962
|
+
N(S, B.uiid, U), B.children && Array.isArray(B.children) && B.children.length > 0 && y(B.children);
|
|
1963
|
+
const G = ye.find((le) => le.value === S), me = G ? G.example : "";
|
|
1964
|
+
B[c] = me, B.children && delete B.children, B.hasChildren = !1, Ve(), x();
|
|
1965
|
+
}, Te = (B) => {
|
|
1966
|
+
Array.isArray(B) && B.forEach((U) => {
|
|
1967
|
+
const c = L("name"), S = L("type"), G = U[S], me = U[c], le = U.children && U.children.length > 0;
|
|
1968
|
+
me === "[Array Item]" ? (G === "object" || G === "arrayObject") && le ? (U.hasChildren = !0, Te(U.children)) : U.hasChildren = !1 : (s(G) || G === "object") && le ? (U.hasChildren = !0, Te(U.children)) : U.hasChildren = !1;
|
|
1969
|
+
});
|
|
1970
|
+
};
|
|
1971
|
+
return pe(
|
|
1972
|
+
() => w.value,
|
|
1973
|
+
(B) => {
|
|
1974
|
+
k.value = B.length, y(B), Te(B);
|
|
1975
|
+
},
|
|
1976
|
+
{ immediate: !0, deep: !0 }
|
|
1977
|
+
), pe(
|
|
1978
|
+
() => l.justString,
|
|
1979
|
+
(B) => {
|
|
1980
|
+
if (B) {
|
|
1981
|
+
const U = L("type"), c = (S) => {
|
|
1982
|
+
S.forEach((G) => {
|
|
1983
|
+
G[U] = "string", G.children && c(G.children);
|
|
1984
|
+
});
|
|
1985
|
+
};
|
|
1986
|
+
c(w.value);
|
|
1987
|
+
}
|
|
1988
|
+
},
|
|
1989
|
+
{ immediate: !0 }
|
|
1990
|
+
), pe(
|
|
1991
|
+
() => l.setType,
|
|
1992
|
+
(B) => {
|
|
1993
|
+
if (B && B.length === 1) {
|
|
1994
|
+
const U = _.value[0];
|
|
1995
|
+
if (U) {
|
|
1996
|
+
const c = L("name"), S = L("type"), G = (me) => {
|
|
1997
|
+
me.forEach((le) => {
|
|
1998
|
+
le[c] !== "[Array Item]" && (le[S] = U.value), le.children && G(le.children);
|
|
1999
|
+
});
|
|
2000
|
+
};
|
|
2001
|
+
G(w.value);
|
|
2002
|
+
}
|
|
2003
|
+
}
|
|
2004
|
+
},
|
|
2005
|
+
{ immediate: !0 }
|
|
2006
|
+
), pe(
|
|
2007
|
+
() => l.inputItemNamesArr,
|
|
2008
|
+
() => {
|
|
2009
|
+
Object.keys(m.value).length > 0 && ve(() => {
|
|
2010
|
+
n();
|
|
2011
|
+
});
|
|
2012
|
+
},
|
|
2013
|
+
{ deep: !0 }
|
|
2014
|
+
), r({
|
|
2015
|
+
validationErrors: m,
|
|
2016
|
+
validateAllRows: n
|
|
2017
|
+
}), (B, U) => (g(), H(e(ke), {
|
|
2018
|
+
ref_key: "tableRef",
|
|
2019
|
+
ref: O,
|
|
2020
|
+
columns: Me.value,
|
|
2021
|
+
data: w.value,
|
|
2022
|
+
onRowKey: Ye,
|
|
2023
|
+
hasPage: !1,
|
|
2024
|
+
total: e(k),
|
|
2025
|
+
"on-row-key": (c) => c.uiid,
|
|
2026
|
+
pages: {
|
|
2027
|
+
page: 1,
|
|
2028
|
+
size: 999
|
|
2029
|
+
},
|
|
2030
|
+
isLoading: i.loadingTable,
|
|
2031
|
+
"max-height": i.maxHeight,
|
|
2032
|
+
isSecondaryHeader: ""
|
|
2033
|
+
}, tt({
|
|
2034
|
+
keyHeader: A(() => [
|
|
2035
|
+
_e("name") ? (g(), W("span", Jt, "*")) : $("", !0),
|
|
2036
|
+
q(F(e(p)("COMMON_PLUGIN_TOOL.LABEL_PARAM_NAME")), 1)
|
|
2037
|
+
]),
|
|
2038
|
+
typeHeader: A(() => [
|
|
2039
|
+
_e("type") ? (g(), W("span", Xt, "*")) : $("", !0),
|
|
2040
|
+
q(F(e(p)("COMMON_PLUGIN_TOOL.LABEL_PARAM_TYPE")), 1)
|
|
2041
|
+
]),
|
|
2042
|
+
descHeader: A(() => [
|
|
2043
|
+
_e("description") ? (g(), W("span", zt, "*")) : $("", !0),
|
|
2044
|
+
q(F(e(p)("COMMON_PLUGIN_TOOL.LABEL_PARAM_DESC")), 1)
|
|
2045
|
+
]),
|
|
2046
|
+
showNameHeader: A(() => [
|
|
2047
|
+
j("div", Qt, [
|
|
2048
|
+
j("div", Kt, F(e(p)("COMMON_PLUGIN_TOOL.LABEL_PARAM_SHOW_NAME")), 1),
|
|
2049
|
+
v(e(Oe), { placement: "top" }, {
|
|
2050
|
+
content: A(() => [
|
|
2051
|
+
q(F(e(p)("COMMON_PLUGIN_TOOL.LABEL_PARAM_SHOW_NAME_TIP")), 1)
|
|
2052
|
+
]),
|
|
2053
|
+
default: A(() => [
|
|
2054
|
+
j("span", Zt, [
|
|
2055
|
+
v(e(Y), {
|
|
2056
|
+
class: "tool-tip-column__icon",
|
|
2057
|
+
size: "14px",
|
|
2058
|
+
color: "#999"
|
|
2059
|
+
}, {
|
|
2060
|
+
default: A(() => [
|
|
2061
|
+
v(e(be))
|
|
2062
|
+
]),
|
|
2063
|
+
_: 1
|
|
2064
|
+
})
|
|
2065
|
+
])
|
|
2066
|
+
]),
|
|
2067
|
+
_: 1
|
|
2068
|
+
})
|
|
2069
|
+
])
|
|
2070
|
+
]),
|
|
2071
|
+
formatHeader: A(() => [
|
|
2072
|
+
j("div", el, [
|
|
2073
|
+
j("div", tl, F(e(p)("COMMON_PLUGIN_TOOL.LABEL_PARAM_FORMAT")), 1),
|
|
2074
|
+
v(e(Oe), { placement: "top" }, {
|
|
2075
|
+
content: A(() => [
|
|
2076
|
+
q(F(e(p)("COMMON_PLUGIN_TOOL.LABEL_PARAM_FORMAT_TIP")), 1)
|
|
2077
|
+
]),
|
|
2078
|
+
default: A(() => [
|
|
2079
|
+
j("div", ll, [
|
|
2080
|
+
v(e(Y), {
|
|
2081
|
+
class: "tool-tip-column__icon",
|
|
2082
|
+
size: "14px",
|
|
2083
|
+
color: "#999"
|
|
2084
|
+
}, {
|
|
2085
|
+
default: A(() => [
|
|
2086
|
+
v(e(be))
|
|
2087
|
+
]),
|
|
2088
|
+
_: 1
|
|
2089
|
+
})
|
|
2090
|
+
])
|
|
2091
|
+
]),
|
|
2092
|
+
_: 1
|
|
2093
|
+
})
|
|
2094
|
+
])
|
|
2095
|
+
]),
|
|
2096
|
+
isShowHeader: A(() => [
|
|
2097
|
+
j("div", al, [
|
|
2098
|
+
j("div", nl, F(e(p)("COMMON_PLUGIN_TOOL.LABEL_PARAM_VISIBLE")), 1),
|
|
2099
|
+
v(e(Oe), {
|
|
2100
|
+
placement: "top",
|
|
2101
|
+
"popper-style": { width: "350px" }
|
|
2102
|
+
}, {
|
|
2103
|
+
content: A(() => [
|
|
2104
|
+
q(F(e(p)("COMMON_PLUGIN_TOOL.LABEL_PARAM_VISIBLE_TIP")), 1),
|
|
2105
|
+
U[2] || (U[2] = j("br", null, null, -1)),
|
|
2106
|
+
q("- " + F(e(p)("COMMON_PLUGIN_TOOL.LABEL_PARAM_VISIBLE_INVISIBLE")), 1),
|
|
2107
|
+
U[3] || (U[3] = j("br", null, null, -1)),
|
|
2108
|
+
q("- " + F(e(p)("COMMON_PLUGIN_TOOL.LABEL_PARAM_VISIBLE_INVISIBLE_DEFAULT")), 1)
|
|
2109
|
+
]),
|
|
2110
|
+
default: A(() => [
|
|
2111
|
+
j("div", rl, [
|
|
2112
|
+
v(e(Y), {
|
|
2113
|
+
class: "tool-tip-column__icon",
|
|
2114
|
+
size: "14px",
|
|
2115
|
+
color: "#999"
|
|
2116
|
+
}, {
|
|
2117
|
+
default: A(() => [
|
|
2118
|
+
v(e(be))
|
|
2119
|
+
]),
|
|
2120
|
+
_: 1
|
|
2121
|
+
})
|
|
2122
|
+
])
|
|
2123
|
+
]),
|
|
2124
|
+
_: 1
|
|
2125
|
+
})
|
|
2126
|
+
])
|
|
2127
|
+
]),
|
|
2128
|
+
actionHeader: A(() => [
|
|
2129
|
+
j("div", ol, [
|
|
2130
|
+
j("span", null, F(e(p)("COMMON_BUTTON.OPERATION_TEXT")), 1),
|
|
2131
|
+
e(T)() ? (g(), H(e(oe), {
|
|
2132
|
+
key: 0,
|
|
2133
|
+
type: "primary",
|
|
2134
|
+
size: "small",
|
|
2135
|
+
onClick: e(K),
|
|
2136
|
+
icon: e(st)
|
|
2137
|
+
}, {
|
|
2138
|
+
default: A(() => [
|
|
2139
|
+
q(F(e(p)("COMMON_BUTTON.ADD_NEW_TEXT")), 1)
|
|
2140
|
+
]),
|
|
2141
|
+
_: 1
|
|
2142
|
+
}, 8, ["onClick", "icon"])) : $("", !0)
|
|
2143
|
+
])
|
|
2144
|
+
]),
|
|
2145
|
+
name: A((c) => [
|
|
2146
|
+
v(Dt, {
|
|
2147
|
+
name: c.row[e(L)("name")],
|
|
2148
|
+
"onUpdate:name": (S) => c.row[e(L)("name")] = S,
|
|
2149
|
+
row: c.row,
|
|
2150
|
+
"array-item-index": Je(c.row),
|
|
2151
|
+
onFocus: e(I),
|
|
2152
|
+
onBlur: Xe
|
|
2153
|
+
}, null, 8, ["name", "onUpdate:name", "row", "array-item-index", "onFocus"])
|
|
2154
|
+
]),
|
|
2155
|
+
type: A((c) => [
|
|
2156
|
+
v(Bt, {
|
|
2157
|
+
type: c.row[e(L)("type")],
|
|
2158
|
+
"onUpdate:type": (S) => c.row[e(L)("type")] = S,
|
|
2159
|
+
row: c.row,
|
|
2160
|
+
onChange: ze
|
|
2161
|
+
}, null, 8, ["type", "onUpdate:type", "row"])
|
|
2162
|
+
]),
|
|
2163
|
+
description: A((c) => [
|
|
2164
|
+
v(e(Z), {
|
|
2165
|
+
modelValue: c.row.description,
|
|
2166
|
+
"onUpdate:modelValue": (S) => c.row.description = S,
|
|
2167
|
+
disabled: l.disabled || c.row.disabled || e(b)("description"),
|
|
2168
|
+
style: { width: "100%" },
|
|
2169
|
+
placeholder: e(p)("COMMON_PLUGIN_TOOL.LABEL_PARAM_DESC_PLACEHOLDER"),
|
|
2170
|
+
class: ee({
|
|
2171
|
+
"error-input": m.value[c.row.uiid]?.description
|
|
2172
|
+
}),
|
|
2173
|
+
onChange: (S) => e(R)(c.row, _e("description"))
|
|
2174
|
+
}, null, 8, ["modelValue", "onUpdate:modelValue", "disabled", "placeholder", "class", "onChange"]),
|
|
2175
|
+
m.value[c.row.uiid]?.description ? (g(), W("div", il, F(m.value[c.row.uiid]?.description), 1)) : $("", !0)
|
|
2176
|
+
]),
|
|
2177
|
+
test: A((c) => [
|
|
2178
|
+
v(Nt, {
|
|
2179
|
+
value: c.row[e(L)("value")],
|
|
2180
|
+
"onUpdate:value": (S) => c.row[e(L)("value")] = S,
|
|
2181
|
+
type: c.row[e(L)("type")],
|
|
2182
|
+
"onUpdate:type": (S) => c.row[e(L)("type")] = S,
|
|
2183
|
+
row: c.row
|
|
2184
|
+
}, null, 8, ["value", "onUpdate:value", "type", "onUpdate:type", "row"])
|
|
2185
|
+
]),
|
|
2186
|
+
action: A((c) => [
|
|
2187
|
+
v(kt, {
|
|
2188
|
+
row: c.row,
|
|
2189
|
+
scope: {
|
|
2190
|
+
...c,
|
|
2191
|
+
_canMoveUp: e(de)(c.row),
|
|
2192
|
+
_canMoveDown: e(je)(c.row),
|
|
2193
|
+
_showDelete: e(qe)(c.row)
|
|
2194
|
+
},
|
|
2195
|
+
onAddChild: e(z),
|
|
2196
|
+
onMoveUp: U[0] || (U[0] = (S, G) => e(Q)(S, G)),
|
|
2197
|
+
onMoveDown: U[1] || (U[1] = (S, G) => e(Q)(S, G)),
|
|
2198
|
+
onDelete: e(J)
|
|
2199
|
+
}, null, 8, ["row", "scope", "onAddChild", "onDelete"])
|
|
2200
|
+
]),
|
|
2201
|
+
_: 2
|
|
2202
|
+
}, [
|
|
2203
|
+
l.isPluginMode ? {
|
|
2204
|
+
name: "required",
|
|
2205
|
+
fn: A((c) => [
|
|
2206
|
+
j("div", sl, [
|
|
2207
|
+
v(e(Ue), {
|
|
2208
|
+
modelValue: c.row.required,
|
|
2209
|
+
"onUpdate:modelValue": (S) => c.row.required = S,
|
|
2210
|
+
disabled: l.disabled || c.row.disabled || l.forceRequired || e(b)("required"),
|
|
2211
|
+
label: "",
|
|
2212
|
+
size: "large",
|
|
2213
|
+
onChange: (S) => e(We)(c.row)
|
|
2214
|
+
}, null, 8, ["modelValue", "onUpdate:modelValue", "disabled", "onChange"])
|
|
2215
|
+
])
|
|
2216
|
+
]),
|
|
2217
|
+
key: "0"
|
|
2218
|
+
} : void 0,
|
|
2219
|
+
l.isPluginMode ? {
|
|
2220
|
+
name: "showName",
|
|
2221
|
+
fn: A((c) => [
|
|
2222
|
+
v(e(Z), {
|
|
2223
|
+
modelValue: c.row.extendName,
|
|
2224
|
+
"onUpdate:modelValue": (S) => c.row.extendName = S,
|
|
2225
|
+
disabled: l.disabled || c.row.disabled || e(b)("extendName"),
|
|
2226
|
+
style: { width: "100%" },
|
|
2227
|
+
placeholder: e(p)("COMMON_PLUGIN_TOOL.LABEL_PARAM_SHOW_NAME_PLACEHOLDER")
|
|
2228
|
+
}, null, 8, ["modelValue", "onUpdate:modelValue", "disabled", "placeholder"])
|
|
2229
|
+
]),
|
|
2230
|
+
key: "1"
|
|
2231
|
+
} : void 0,
|
|
2232
|
+
l.isPluginMode ? {
|
|
2233
|
+
name: "format",
|
|
2234
|
+
fn: A((c) => [
|
|
2235
|
+
v(vt, {
|
|
2236
|
+
modelValue: c.row.extendWidgetType,
|
|
2237
|
+
"onUpdate:modelValue": (S) => c.row.extendWidgetType = S,
|
|
2238
|
+
disabled: l.disabled || c.row.disabled || e(b)("extendWidgetType"),
|
|
2239
|
+
"row-data": c.row,
|
|
2240
|
+
onChange: e($e),
|
|
2241
|
+
onOptionCreated: e(Ge)
|
|
2242
|
+
}, null, 8, ["modelValue", "onUpdate:modelValue", "disabled", "row-data", "onChange", "onOptionCreated"])
|
|
2243
|
+
]),
|
|
2244
|
+
key: "2"
|
|
2245
|
+
} : void 0,
|
|
2246
|
+
l.isPluginMode ? {
|
|
2247
|
+
name: "default",
|
|
2248
|
+
fn: A((c) => [
|
|
2249
|
+
v(e(Z), {
|
|
2250
|
+
modelValue: c.row.defaultValue,
|
|
2251
|
+
"onUpdate:modelValue": (S) => c.row.defaultValue = S,
|
|
2252
|
+
disabled: l.disabled || c.row.disabled || e(b)("defaultValue"),
|
|
2253
|
+
style: { width: "100%" },
|
|
2254
|
+
placeholder: e(p)("COMMON_PLUGIN_TOOL.LABEL_PARAM_DEFAULT_VALUE_PLACEHOLDER")
|
|
2255
|
+
}, null, 8, ["modelValue", "onUpdate:modelValue", "disabled", "placeholder"])
|
|
2256
|
+
]),
|
|
2257
|
+
key: "3"
|
|
2258
|
+
} : void 0,
|
|
2259
|
+
l.isPluginMode ? {
|
|
2260
|
+
name: "isShow",
|
|
2261
|
+
fn: A((c) => [
|
|
2262
|
+
j("div", ul, [
|
|
2263
|
+
v(e(Ue), {
|
|
2264
|
+
modelValue: c.row.extendDisplay,
|
|
2265
|
+
"onUpdate:modelValue": (S) => c.row.extendDisplay = S,
|
|
2266
|
+
disabled: l.disabled || c.row.disabled || c.row.required || e(b)("extendDisplay"),
|
|
2267
|
+
checked: c.row.required,
|
|
2268
|
+
label: "",
|
|
2269
|
+
size: "large"
|
|
2270
|
+
}, null, 8, ["modelValue", "onUpdate:modelValue", "disabled", "checked"])
|
|
2271
|
+
])
|
|
2272
|
+
]),
|
|
2273
|
+
key: "4"
|
|
2274
|
+
} : void 0
|
|
2275
|
+
]), 1032, ["columns", "data", "total", "on-row-key", "isLoading", "max-height"]));
|
|
2276
|
+
}
|
|
2277
|
+
}, cl = /* @__PURE__ */ ue(dl, [["__scopeId", "data-v-676527c5"]]), gl = Qe(cl);
|
|
2278
|
+
export {
|
|
2279
|
+
Ot as ARRAYTYPES,
|
|
2280
|
+
hl as METHODSOPTIONS,
|
|
2281
|
+
Tl as NOBODYMETHOD,
|
|
2282
|
+
gl as ParameterTable,
|
|
2283
|
+
De as TYPESMAP,
|
|
2284
|
+
ye as TYPESOPTIONS,
|
|
2285
|
+
ce as convertChildrenToDebugValue,
|
|
2286
|
+
gl as default,
|
|
2287
|
+
se as isArrayType
|
|
2288
|
+
};
|