element-less 0.0.73 → 0.0.75
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/custom/dynamic/common/aiSystemPrompt.d.ts +6 -0
- package/custom/dynamic/common/propertys/checkbox.d.ts +3 -0
- package/custom/dynamic/common/propertys/radio.d.ts +9 -0
- package/custom/dynamic/common/propertys/select.d.ts +9 -0
- package/custom/dynamic/common/propertys/table.d.ts +145 -17
- package/custom/dynamic/designerView/index.d.ts +76 -0
- package/custom/dynamic/designerView/src/designerView.d.ts +24 -0
- package/custom/dynamic/designerView/src/designerView.vue.d.ts +48 -0
- package/element-less.cjs +1 -1
- package/element-less.iife.js +1 -1
- package/element-less.js +1 -1
- package/element-less.umd.cjs +1 -1
- package/index-BXQfXTR9.cjs +1 -0
- package/{index-C0SJ8qh4.js → index-CIeuUxxh.js} +889 -182
- package/inner-DYivJRIm.cjs +1 -0
- package/{inner-BVkvNO8N.js → inner-PWU9A8AN.js} +3 -3
- package/{innerItem-DQulGWbl.cjs → innerItem-DigBLlBQ.cjs} +1 -1
- package/{innerItem-COru-kKY.js → innerItem-DxZoiM2C.js} +1 -1
- package/{mode-csharp-CFYsL6uB.cjs → mode-csharp-ChMU2For.cjs} +1 -1
- package/{mode-csharp-D6MaIFhw.js → mode-csharp-ujSwp4Ss.js} +1 -1
- package/{mode-css-Dy8BzF_i.js → mode-css-BE9lm-IQ.js} +1 -1
- package/{mode-css-BgjQCLpV.cjs → mode-css-Dk67woe6.cjs} +1 -1
- package/{mode-javascript-8sxvp2xm.js → mode-javascript-BA7c9L6f.js} +1 -1
- package/{mode-javascript-BvlHrr1N.cjs → mode-javascript-BIhFLOZe.cjs} +1 -1
- package/{mode-json-BHDlkzCk.cjs → mode-json-DpuB5uMN.cjs} +1 -1
- package/{mode-json-DoxC9nzJ.js → mode-json-DvMBn-gb.js} +1 -1
- package/{mode-mysql-B7vGuPt6.js → mode-mysql-68NS3DBE.js} +1 -1
- package/{mode-mysql-Bg657uIn.cjs → mode-mysql-DCU8AKMn.cjs} +1 -1
- package/package.json +1 -1
- package/style.css +1 -1
- package/index-BaFF5Gyj.cjs +0 -1
- package/inner-AI6AnYRd.cjs +0 -1
|
@@ -31349,7 +31349,7 @@ const useFormValidation = (props2, attrs) => {
|
|
|
31349
31349
|
};
|
|
31350
31350
|
function useSelect(props2 = {}, defaultEmits, formNode, componentName) {
|
|
31351
31351
|
const { setValue } = useProps(props2);
|
|
31352
|
-
const { $codeField, $messageField, $dataField, $success } = utils.getApiConfig();
|
|
31352
|
+
const { $codeField: $codeField2, $messageField: $messageField2, $dataField: $dataField2, $success: $success2 } = utils.getApiConfig();
|
|
31353
31353
|
const {
|
|
31354
31354
|
currModelValue,
|
|
31355
31355
|
returnModelValue
|
|
@@ -31660,16 +31660,16 @@ function useSelect(props2 = {}, defaultEmits, formNode, componentName) {
|
|
|
31660
31660
|
let currUrl = ((_b = props2.url) == null ? void 0 : _b.replacePowerUrl()) ?? "";
|
|
31661
31661
|
return new Promise((resolve2, reject) => {
|
|
31662
31662
|
currUrl.postWithCancel(queryData, readDataCancel).then((res) => {
|
|
31663
|
-
if (res[$
|
|
31663
|
+
if (res[$codeField2] == $success2) {
|
|
31664
31664
|
options2.length = 0;
|
|
31665
|
-
const resData = res[$
|
|
31665
|
+
const resData = res[$dataField2];
|
|
31666
31666
|
initData(resData);
|
|
31667
31667
|
initSelectValue();
|
|
31668
31668
|
initAbsendData();
|
|
31669
31669
|
initSelectIndex();
|
|
31670
31670
|
defaultEmits("readdataed", options2);
|
|
31671
31671
|
} else {
|
|
31672
|
-
ProxyElsMessage.error(res[$
|
|
31672
|
+
ProxyElsMessage.error(res[$messageField2]);
|
|
31673
31673
|
}
|
|
31674
31674
|
remoteLoading.value = false;
|
|
31675
31675
|
resolve2(true);
|
|
@@ -31806,7 +31806,7 @@ function useSelect(props2 = {}, defaultEmits, formNode, componentName) {
|
|
|
31806
31806
|
};
|
|
31807
31807
|
}
|
|
31808
31808
|
function useTree(props2 = {}, dataTree, defaultEmits, componentName) {
|
|
31809
|
-
const { $codeField, $messageField, $dataField, $success } = utils.getApiConfig();
|
|
31809
|
+
const { $codeField: $codeField2, $messageField: $messageField2, $dataField: $dataField2, $success: $success2 } = utils.getApiConfig();
|
|
31810
31810
|
const {
|
|
31811
31811
|
currModelValue,
|
|
31812
31812
|
returnModelValue
|
|
@@ -32091,13 +32091,13 @@ function useTree(props2 = {}, dataTree, defaultEmits, componentName) {
|
|
|
32091
32091
|
}
|
|
32092
32092
|
remoteLoading.value = true;
|
|
32093
32093
|
currUrl.post({}).then((res) => {
|
|
32094
|
-
if (res[$
|
|
32095
|
-
optionData.value = res[$
|
|
32094
|
+
if (res[$codeField2] == $success2) {
|
|
32095
|
+
optionData.value = res[$dataField2];
|
|
32096
32096
|
options2.value = [];
|
|
32097
32097
|
toTreeData();
|
|
32098
32098
|
initSelectValue();
|
|
32099
32099
|
} else {
|
|
32100
|
-
ProxyElsMessage.error(res[$
|
|
32100
|
+
ProxyElsMessage.error(res[$messageField2]);
|
|
32101
32101
|
}
|
|
32102
32102
|
remoteLoading.value = false;
|
|
32103
32103
|
resolve2(true);
|
|
@@ -40860,7 +40860,7 @@ const _sfc_main$1_ = /* @__PURE__ */ defineComponent({
|
|
|
40860
40860
|
var _a;
|
|
40861
40861
|
return ((_a = container == null ? void 0 : container.$transferParams) == null ? void 0 : _a.value) || {};
|
|
40862
40862
|
});
|
|
40863
|
-
const { $codeField, $messageField, $dataField, $success } = utils.getApiConfig();
|
|
40863
|
+
const { $codeField: $codeField2, $messageField: $messageField2, $dataField: $dataField2, $success: $success2 } = utils.getApiConfig();
|
|
40864
40864
|
const { $idField, $actionField } = utils.getMenuConfig();
|
|
40865
40865
|
const { $pageDataField, $menuField, $pageSizeField, $currentPageField, $totalField, $pageCountField, $avgDayField } = utils.getTableConfig();
|
|
40866
40866
|
const { getValue: getValue2, setValue, attrProps } = useProps(props2);
|
|
@@ -41557,8 +41557,8 @@ const _sfc_main$1_ = /* @__PURE__ */ defineComponent({
|
|
|
41557
41557
|
tableData.forEach((ele) => {
|
|
41558
41558
|
ele.saveDataLoading = false;
|
|
41559
41559
|
});
|
|
41560
|
-
if (res[$
|
|
41561
|
-
ElMessage.error(res[$
|
|
41560
|
+
if (res[$codeField2] != "0") {
|
|
41561
|
+
ElMessage.error(res[$messageField2]);
|
|
41562
41562
|
} else {
|
|
41563
41563
|
if (!res.EventActionData) {
|
|
41564
41564
|
ElMessage.success("保存成功");
|
|
@@ -41663,8 +41663,8 @@ const _sfc_main$1_ = /* @__PURE__ */ defineComponent({
|
|
|
41663
41663
|
}
|
|
41664
41664
|
function handleTableRowMoveHere(url) {
|
|
41665
41665
|
url.post({ selectID: sortSelectRow[dataKey.value], moveID: rowData[dataKey.value] }).then((res) => {
|
|
41666
|
-
if (!res || res[$
|
|
41667
|
-
ElMessage.error(res[$
|
|
41666
|
+
if (!res || res[$codeField2] != "0") {
|
|
41667
|
+
ElMessage.error(res[$messageField2]);
|
|
41668
41668
|
} else {
|
|
41669
41669
|
ElMessage.success("移动成功");
|
|
41670
41670
|
readData();
|
|
@@ -41673,8 +41673,8 @@ const _sfc_main$1_ = /* @__PURE__ */ defineComponent({
|
|
|
41673
41673
|
}
|
|
41674
41674
|
function handleTableRowExchangeMove(url) {
|
|
41675
41675
|
url.post({ selectID: sortSelectRow[dataKey.value], moveID: rowData[dataKey.value] }).then((res) => {
|
|
41676
|
-
if (!res || res[$
|
|
41677
|
-
ElMessage.error(res[$
|
|
41676
|
+
if (!res || res[$codeField2] != "0") {
|
|
41677
|
+
ElMessage.error(res[$messageField2]);
|
|
41678
41678
|
} else {
|
|
41679
41679
|
ElMessage.success("移动成功");
|
|
41680
41680
|
readData();
|
|
@@ -41924,19 +41924,19 @@ const _sfc_main$1_ = /* @__PURE__ */ defineComponent({
|
|
|
41924
41924
|
let currQueryData = utils.getQueryParameters(searchQueryData);
|
|
41925
41925
|
const requestUrl = props2.url.setPowerPublicQuery().setTransferParams(transferParams.value);
|
|
41926
41926
|
return requestUrl.postWithCancel(currQueryData, readDataCancel).then((res) => {
|
|
41927
|
-
if (res[$
|
|
41928
|
-
if (res[$
|
|
41927
|
+
if (res[$codeField2] === $success2) {
|
|
41928
|
+
if (res[$dataField2][$pageSizeField] != void 0) {
|
|
41929
41929
|
sourceTableData.length = 0;
|
|
41930
|
-
sourceTableData.push(...res[$
|
|
41930
|
+
sourceTableData.push(...res[$dataField2][$pageDataField]);
|
|
41931
41931
|
if (!props2.isClientPage) {
|
|
41932
|
-
currPageSize.value = res[$
|
|
41932
|
+
currPageSize.value = res[$dataField2][$pageSizeField];
|
|
41933
41933
|
}
|
|
41934
|
-
currPageIndex.value = res[$
|
|
41935
|
-
currRecourdCount.value = res[$
|
|
41936
|
-
currPageTotal.value = res[$
|
|
41934
|
+
currPageIndex.value = res[$dataField2][$currentPageField] + 1;
|
|
41935
|
+
currRecourdCount.value = res[$dataField2][$totalField];
|
|
41936
|
+
currPageTotal.value = res[$dataField2][$pageCountField];
|
|
41937
41937
|
} else {
|
|
41938
41938
|
sourceTableData.length = 0;
|
|
41939
|
-
sourceTableData.push(...res[$
|
|
41939
|
+
sourceTableData.push(...res[$dataField2]);
|
|
41940
41940
|
}
|
|
41941
41941
|
if (props2.isClientSearch || props2.isClientPage) {
|
|
41942
41942
|
clientTableData();
|
|
@@ -41945,11 +41945,11 @@ const _sfc_main$1_ = /* @__PURE__ */ defineComponent({
|
|
|
41945
41945
|
tableData.push(...sourceTableData);
|
|
41946
41946
|
}
|
|
41947
41947
|
editSourceTableData = utils.cloneObj(sourceTableData);
|
|
41948
|
-
if ($avgDayField && res[$
|
|
41949
|
-
provideData.avgDay = res[$
|
|
41948
|
+
if ($avgDayField && res[$dataField2][$avgDayField]) {
|
|
41949
|
+
provideData.avgDay = res[$dataField2][$avgDayField];
|
|
41950
41950
|
}
|
|
41951
41951
|
} else {
|
|
41952
|
-
ElMessage.error(res[$
|
|
41952
|
+
ElMessage.error(res[$messageField2]);
|
|
41953
41953
|
}
|
|
41954
41954
|
dataLoading.value = false;
|
|
41955
41955
|
if (props2.afterReadData) {
|
|
@@ -42373,12 +42373,12 @@ const _sfc_main$1_ = /* @__PURE__ */ defineComponent({
|
|
|
42373
42373
|
background: "rgba(0, 0, 0, 0.7)"
|
|
42374
42374
|
});
|
|
42375
42375
|
currUrl.post(currQueryData).then((res) => {
|
|
42376
|
-
if (res[$
|
|
42376
|
+
if (res[$codeField2] === "0") {
|
|
42377
42377
|
tableData.length = 0;
|
|
42378
|
-
if (res[$
|
|
42379
|
-
tableData.push(...res[$
|
|
42378
|
+
if (res[$dataField2][$pageSizeField] != void 0) {
|
|
42379
|
+
tableData.push(...res[$dataField2][$pageDataField]);
|
|
42380
42380
|
} else {
|
|
42381
|
-
tableData.push(...res[$
|
|
42381
|
+
tableData.push(...res[$dataField2]);
|
|
42382
42382
|
}
|
|
42383
42383
|
nextTick(() => {
|
|
42384
42384
|
exportDataHtml();
|
|
@@ -42387,7 +42387,7 @@ const _sfc_main$1_ = /* @__PURE__ */ defineComponent({
|
|
|
42387
42387
|
});
|
|
42388
42388
|
} else {
|
|
42389
42389
|
exportLoading.close();
|
|
42390
|
-
ElMessage.error(res[$
|
|
42390
|
+
ElMessage.error(res[$messageField2]);
|
|
42391
42391
|
}
|
|
42392
42392
|
}).catch((action) => {
|
|
42393
42393
|
exportLoading.close();
|
|
@@ -42503,6 +42503,13 @@ const _sfc_main$1_ = /* @__PURE__ */ defineComponent({
|
|
|
42503
42503
|
tableData.push(newRow);
|
|
42504
42504
|
emits2("update:editStatus", true);
|
|
42505
42505
|
}
|
|
42506
|
+
function handleEditCellChange(column, row, val) {
|
|
42507
|
+
const syncTo = column.syncTo;
|
|
42508
|
+
if (syncTo && (!row[syncTo] || row[syncTo] === row[column.prop])) {
|
|
42509
|
+
row[syncTo] = val;
|
|
42510
|
+
}
|
|
42511
|
+
row[column.prop] = val;
|
|
42512
|
+
}
|
|
42506
42513
|
setValue({
|
|
42507
42514
|
"menuClick": handleMenuCommand,
|
|
42508
42515
|
setEditData,
|
|
@@ -42633,7 +42640,7 @@ const _sfc_main$1_ = /* @__PURE__ */ defineComponent({
|
|
|
42633
42640
|
requiredMessage: column.requiredMessage,
|
|
42634
42641
|
prop: column.prop,
|
|
42635
42642
|
modelValue: slotProps.row[column.prop],
|
|
42636
|
-
"onUpdate:modelValue": (
|
|
42643
|
+
"onUpdate:modelValue": (val) => handleEditCellChange(column, slotProps.row, val)
|
|
42637
42644
|
}, { ref_for: true }, (column.editComponent || {}).props || {}, {
|
|
42638
42645
|
aIndex: slotProps.$index
|
|
42639
42646
|
}), null, 16, ["required", "requiredMessage", "prop", "modelValue", "onUpdate:modelValue", "aIndex"]))
|
|
@@ -42812,7 +42819,7 @@ const _sfc_main$1_ = /* @__PURE__ */ defineComponent({
|
|
|
42812
42819
|
};
|
|
42813
42820
|
}
|
|
42814
42821
|
});
|
|
42815
|
-
const Table$1 = /* @__PURE__ */ _export_sfc$1(_sfc_main$1_, [["__scopeId", "data-v-
|
|
42822
|
+
const Table$1 = /* @__PURE__ */ _export_sfc$1(_sfc_main$1_, [["__scopeId", "data-v-b7ccc2a8"]]);
|
|
42816
42823
|
const ElsTable = withInstall$1(Table$1);
|
|
42817
42824
|
const treeProps = buildProps({
|
|
42818
42825
|
...formItemProps$1,
|
|
@@ -43288,7 +43295,7 @@ const _sfc_main$1X = /* @__PURE__ */ defineComponent({
|
|
|
43288
43295
|
const emits2 = __emit;
|
|
43289
43296
|
const props2 = __props;
|
|
43290
43297
|
const { setValue, attrProps } = useProps(props2);
|
|
43291
|
-
const { $codeField, $messageField, $dataField, $success } = utils.getApiConfig();
|
|
43298
|
+
const { $codeField: $codeField2, $messageField: $messageField2, $dataField: $dataField2, $success: $success2 } = utils.getApiConfig();
|
|
43292
43299
|
const searchKey = ref("");
|
|
43293
43300
|
const isCollapse = ref(props2.collapse);
|
|
43294
43301
|
let hiddenMenuIds = ref([]);
|
|
@@ -43391,12 +43398,12 @@ const _sfc_main$1X = /* @__PURE__ */ defineComponent({
|
|
|
43391
43398
|
function readData() {
|
|
43392
43399
|
if (props2.url) {
|
|
43393
43400
|
props2.url.post({}).then((res) => {
|
|
43394
|
-
if (res[$
|
|
43401
|
+
if (res[$codeField2] == $success2) {
|
|
43395
43402
|
optionData.length = 0;
|
|
43396
|
-
optionData.push(...res[$
|
|
43403
|
+
optionData.push(...res[$dataField2]);
|
|
43397
43404
|
converToData();
|
|
43398
43405
|
} else {
|
|
43399
|
-
ElMessage.error(res[$
|
|
43406
|
+
ElMessage.error(res[$messageField2]);
|
|
43400
43407
|
}
|
|
43401
43408
|
});
|
|
43402
43409
|
}
|
|
@@ -44097,10 +44104,10 @@ class Autocomplete extends TBaseFormItem {
|
|
|
44097
44104
|
pcRender() {
|
|
44098
44105
|
var _a;
|
|
44099
44106
|
const {
|
|
44100
|
-
$codeField,
|
|
44101
|
-
$messageField,
|
|
44102
|
-
$dataField,
|
|
44103
|
-
$success
|
|
44107
|
+
$codeField: $codeField2,
|
|
44108
|
+
$messageField: $messageField2,
|
|
44109
|
+
$dataField: $dataField2,
|
|
44110
|
+
$success: $success2
|
|
44104
44111
|
} = utils.getApiConfig();
|
|
44105
44112
|
const queryMethod = (searchValue, cb) => {
|
|
44106
44113
|
if (this._props.fetchSuggestions) {
|
|
@@ -44121,11 +44128,11 @@ class Autocomplete extends TBaseFormItem {
|
|
|
44121
44128
|
return new Promise((resolve2) => {
|
|
44122
44129
|
if (this._props.url) {
|
|
44123
44130
|
this._props.url.post(this.queryData).then((res) => {
|
|
44124
|
-
if (res[$
|
|
44131
|
+
if (res[$codeField2] == $success2) {
|
|
44125
44132
|
this.tableData.length = 0;
|
|
44126
|
-
this.tableData.push(...res[$
|
|
44133
|
+
this.tableData.push(...res[$dataField2]);
|
|
44127
44134
|
} else {
|
|
44128
|
-
ProxyElsMessage.error(res[$
|
|
44135
|
+
ProxyElsMessage.error(res[$messageField2]);
|
|
44129
44136
|
}
|
|
44130
44137
|
});
|
|
44131
44138
|
} else {
|
|
@@ -44467,7 +44474,7 @@ const _sfc_main$1P = /* @__PURE__ */ defineComponent({
|
|
|
44467
44474
|
emits: ["update:modelValue"],
|
|
44468
44475
|
setup(__props, { expose: __expose, emit: __emit }) {
|
|
44469
44476
|
const emits2 = __emit;
|
|
44470
|
-
const { $codeField, $success } = utils.getApiConfig();
|
|
44477
|
+
const { $codeField: $codeField2, $success: $success2 } = utils.getApiConfig();
|
|
44471
44478
|
const slots = useSlots();
|
|
44472
44479
|
const props2 = __props;
|
|
44473
44480
|
const { getValue: getValue2 } = useProps(props2);
|
|
@@ -44510,7 +44517,7 @@ const _sfc_main$1P = /* @__PURE__ */ defineComponent({
|
|
|
44510
44517
|
if (action === "confirm") {
|
|
44511
44518
|
if (props2.confirm) {
|
|
44512
44519
|
props2.confirm().then((res) => {
|
|
44513
|
-
if (res === true || res[$
|
|
44520
|
+
if (res === true || res[$codeField2] == $success2) {
|
|
44514
44521
|
resolve2(true);
|
|
44515
44522
|
} else {
|
|
44516
44523
|
resolve2(false);
|
|
@@ -44522,7 +44529,7 @@ const _sfc_main$1P = /* @__PURE__ */ defineComponent({
|
|
|
44522
44529
|
} else {
|
|
44523
44530
|
if (props2.cancel) {
|
|
44524
44531
|
props2.cancel().then((res) => {
|
|
44525
|
-
if (res === true || res[$
|
|
44532
|
+
if (res === true || res[$codeField2] == $success2) {
|
|
44526
44533
|
resolve2(true);
|
|
44527
44534
|
} else {
|
|
44528
44535
|
resolve2(false);
|
|
@@ -44544,7 +44551,7 @@ const _sfc_main$1P = /* @__PURE__ */ defineComponent({
|
|
|
44544
44551
|
if (props2.cancel) {
|
|
44545
44552
|
cancelLoading.value = true;
|
|
44546
44553
|
props2.cancel().then((res) => {
|
|
44547
|
-
if (res === true || res[$
|
|
44554
|
+
if (res === true || res[$codeField2] == $success2) {
|
|
44548
44555
|
dialogVisible.value = false;
|
|
44549
44556
|
}
|
|
44550
44557
|
cancelLoading.value = false;
|
|
@@ -44557,7 +44564,7 @@ const _sfc_main$1P = /* @__PURE__ */ defineComponent({
|
|
|
44557
44564
|
if (props2.confirm) {
|
|
44558
44565
|
confirmLoading.value = true;
|
|
44559
44566
|
props2.confirm().then((res) => {
|
|
44560
|
-
if (res === true || res[$
|
|
44567
|
+
if (res === true || res[$codeField2] == $success2) {
|
|
44561
44568
|
dialogVisible.value = false;
|
|
44562
44569
|
}
|
|
44563
44570
|
confirmLoading.value = false;
|
|
@@ -44712,7 +44719,7 @@ const _sfc_main$1O = /* @__PURE__ */ defineComponent({
|
|
|
44712
44719
|
const emits2 = __emit;
|
|
44713
44720
|
const slots = useSlots();
|
|
44714
44721
|
const props2 = __props;
|
|
44715
|
-
const { $codeField, $success } = utils.getApiConfig();
|
|
44722
|
+
const { $codeField: $codeField2, $success: $success2 } = utils.getApiConfig();
|
|
44716
44723
|
const cancelLoading = ref(false);
|
|
44717
44724
|
const confirmLoading = ref(false);
|
|
44718
44725
|
const tagID = "less_drawer_" + utils.shortid();
|
|
@@ -44738,7 +44745,7 @@ const _sfc_main$1O = /* @__PURE__ */ defineComponent({
|
|
|
44738
44745
|
if (props2.cancel) {
|
|
44739
44746
|
cancelLoading.value = true;
|
|
44740
44747
|
props2.cancel().then((res) => {
|
|
44741
|
-
if (res === true || res[$
|
|
44748
|
+
if (res === true || res[$codeField2] == $success2) {
|
|
44742
44749
|
drawerVisible.value = false;
|
|
44743
44750
|
}
|
|
44744
44751
|
cancelLoading.value = false;
|
|
@@ -44751,7 +44758,7 @@ const _sfc_main$1O = /* @__PURE__ */ defineComponent({
|
|
|
44751
44758
|
if (props2.confirm) {
|
|
44752
44759
|
confirmLoading.value = true;
|
|
44753
44760
|
props2.confirm().then((res) => {
|
|
44754
|
-
if (res === true || res[$
|
|
44761
|
+
if (res === true || res[$codeField2] == $success2) {
|
|
44755
44762
|
drawerVisible.value = false;
|
|
44756
44763
|
}
|
|
44757
44764
|
confirmLoading.value = false;
|
|
@@ -45356,7 +45363,7 @@ let Upload$2 = class Upload extends TBaseFormItem {
|
|
|
45356
45363
|
__publicField(this, "handleSuccess", (res, file, fileList) => {
|
|
45357
45364
|
const apiConfig = utils.getApiConfig();
|
|
45358
45365
|
const {
|
|
45359
|
-
$dataField,
|
|
45366
|
+
$dataField: $dataField2,
|
|
45360
45367
|
$pathField,
|
|
45361
45368
|
$md5Field
|
|
45362
45369
|
} = utils.getUploadConfig();
|
|
@@ -45372,8 +45379,8 @@ let Upload$2 = class Upload extends TBaseFormItem {
|
|
|
45372
45379
|
file.message = "上传成功";
|
|
45373
45380
|
let currUrl = "";
|
|
45374
45381
|
let currRes = res[apiConfig.$dataField];
|
|
45375
|
-
if ($
|
|
45376
|
-
currRes = res[apiConfig.$dataField][$
|
|
45382
|
+
if ($dataField2) {
|
|
45383
|
+
currRes = res[apiConfig.$dataField][$dataField2];
|
|
45377
45384
|
}
|
|
45378
45385
|
currUrl = currRes[$pathField];
|
|
45379
45386
|
if (this._props.hasMd5Parameter) {
|
|
@@ -48380,7 +48387,7 @@ const _sfc_main$1v = /* @__PURE__ */ defineComponent({
|
|
|
48380
48387
|
const getFormLabelPosition = getValue2("getFormLabelPosition", () => "");
|
|
48381
48388
|
const getFormLabelWidth = getValue2("getFormLabelWidth", () => "");
|
|
48382
48389
|
const getFormLabelSuffix = getValue2("getFormLabelSuffix", () => "");
|
|
48383
|
-
const { $codeField, $messageField, $dataField, $success } = utils.getApiConfig();
|
|
48390
|
+
const { $codeField: $codeField2, $messageField: $messageField2, $dataField: $dataField2, $success: $success2 } = utils.getApiConfig();
|
|
48384
48391
|
const modelValue = useModel$1(__props, "modelValue");
|
|
48385
48392
|
const loading = ref(false);
|
|
48386
48393
|
const sseAbort = ref(null);
|
|
@@ -48469,14 +48476,14 @@ const _sfc_main$1v = /* @__PURE__ */ defineComponent({
|
|
|
48469
48476
|
}
|
|
48470
48477
|
function handleResponse(res) {
|
|
48471
48478
|
const append2 = props2.requestMethod === "SSE";
|
|
48472
|
-
if (res && res[$
|
|
48473
|
-
if (res[$
|
|
48474
|
-
ProxyElsMessage.error(res[$
|
|
48479
|
+
if (res && res[$codeField2] !== void 0) {
|
|
48480
|
+
if (res[$codeField2] != $success2) {
|
|
48481
|
+
ProxyElsMessage.error(res[$messageField2]);
|
|
48475
48482
|
setResult(res, "error", append2);
|
|
48476
48483
|
emit("error", res);
|
|
48477
48484
|
return;
|
|
48478
48485
|
}
|
|
48479
|
-
const data = res[$
|
|
48486
|
+
const data = res[$dataField2];
|
|
48480
48487
|
applyResult(data);
|
|
48481
48488
|
setResult(res, "success", append2);
|
|
48482
48489
|
emit("success", data);
|
|
@@ -48490,7 +48497,7 @@ const _sfc_main$1v = /* @__PURE__ */ defineComponent({
|
|
|
48490
48497
|
}
|
|
48491
48498
|
function extractErrorMessage(err) {
|
|
48492
48499
|
var _a, _b, _c;
|
|
48493
|
-
return ((_a = err == null ? void 0 : err.data) == null ? void 0 : _a[$
|
|
48500
|
+
return ((_a = err == null ? void 0 : err.data) == null ? void 0 : _a[$messageField2]) || ((_c = (_b = err == null ? void 0 : err.response) == null ? void 0 : _b.data) == null ? void 0 : _c[$messageField2]) || (err == null ? void 0 : err.message) || "请求失败";
|
|
48494
48501
|
}
|
|
48495
48502
|
function normalizeError(err) {
|
|
48496
48503
|
var _a;
|
|
@@ -51808,6 +51815,7 @@ const property_radio = [
|
|
|
51808
51815
|
"id": "label",
|
|
51809
51816
|
"label": "Label",
|
|
51810
51817
|
"prop": "label",
|
|
51818
|
+
"syncTo": "value",
|
|
51811
51819
|
"width": "",
|
|
51812
51820
|
"showSummary": false,
|
|
51813
51821
|
"sortable": false,
|
|
@@ -52014,6 +52022,7 @@ const property_radio = [
|
|
|
52014
52022
|
"id": "label",
|
|
52015
52023
|
"label": "Label",
|
|
52016
52024
|
"prop": "label",
|
|
52025
|
+
"syncTo": "value",
|
|
52017
52026
|
"width": "",
|
|
52018
52027
|
"showSummary": false,
|
|
52019
52028
|
"sortable": false,
|
|
@@ -52219,6 +52228,7 @@ const property_radio = [
|
|
|
52219
52228
|
"id": "label",
|
|
52220
52229
|
"label": "Label",
|
|
52221
52230
|
"prop": "label",
|
|
52231
|
+
"syncTo": "value",
|
|
52222
52232
|
"width": "",
|
|
52223
52233
|
"showSummary": false,
|
|
52224
52234
|
"sortable": false,
|
|
@@ -52840,6 +52850,7 @@ const property_checkbox = [
|
|
|
52840
52850
|
{
|
|
52841
52851
|
"label": "Label",
|
|
52842
52852
|
"prop": "label",
|
|
52853
|
+
"syncTo": "value",
|
|
52843
52854
|
"width": "",
|
|
52844
52855
|
"showSummary": false,
|
|
52845
52856
|
"sortable": false,
|
|
@@ -53341,6 +53352,7 @@ const property_select = [
|
|
|
53341
53352
|
"id": "label",
|
|
53342
53353
|
"label": "Label",
|
|
53343
53354
|
"prop": "label",
|
|
53355
|
+
"syncTo": "value",
|
|
53344
53356
|
"width": "",
|
|
53345
53357
|
"showSummary": false,
|
|
53346
53358
|
"sortable": false,
|
|
@@ -53547,6 +53559,7 @@ const property_select = [
|
|
|
53547
53559
|
"id": "label",
|
|
53548
53560
|
"label": "Label",
|
|
53549
53561
|
"prop": "label",
|
|
53562
|
+
"syncTo": "value",
|
|
53550
53563
|
"width": "",
|
|
53551
53564
|
"showSummary": false,
|
|
53552
53565
|
"sortable": false,
|
|
@@ -53752,6 +53765,7 @@ const property_select = [
|
|
|
53752
53765
|
"id": "label",
|
|
53753
53766
|
"label": "Label",
|
|
53754
53767
|
"prop": "label",
|
|
53768
|
+
"syncTo": "value",
|
|
53755
53769
|
"width": "",
|
|
53756
53770
|
"showSummary": false,
|
|
53757
53771
|
"sortable": false,
|
|
@@ -67138,45 +67152,109 @@ const property_table = [
|
|
|
67138
67152
|
"name": "default",
|
|
67139
67153
|
"children": [
|
|
67140
67154
|
{
|
|
67141
|
-
"keyID": "
|
|
67155
|
+
"keyID": "key_data_tip_nocolumns",
|
|
67156
|
+
"keyName": "",
|
|
67157
|
+
"keyCode": "",
|
|
67158
|
+
"children": [],
|
|
67159
|
+
"dataType": "None",
|
|
67160
|
+
"dataTypeName": "None",
|
|
67161
|
+
"arrayDataTypeName": "",
|
|
67162
|
+
"arrayDataType": "",
|
|
67163
|
+
"componentGroup": "Show",
|
|
67164
|
+
"componentTypeLabel": "页面提示",
|
|
67165
|
+
"componentTypeName": "Tip",
|
|
67166
|
+
"componentName": "ElsTip",
|
|
67167
|
+
"componentType": "Tip",
|
|
67168
|
+
"formItem": false,
|
|
67169
|
+
"componentShow": true,
|
|
67170
|
+
"icon": "tips",
|
|
67171
|
+
"slots": [],
|
|
67172
|
+
"config": {
|
|
67173
|
+
"formConfig": {},
|
|
67174
|
+
"baseConfig": {
|
|
67175
|
+
"title": "请先配置列",
|
|
67176
|
+
"content": "请先在「列配置」中添加列,然后再配置数据列表"
|
|
67177
|
+
},
|
|
67178
|
+
"advancedConfig": {
|
|
67179
|
+
"style": "",
|
|
67180
|
+
"vif": "!globalData._parentGlobalData?.config?.baseConfig?.columns?.length",
|
|
67181
|
+
"disabled": "",
|
|
67182
|
+
"eventChange": ""
|
|
67183
|
+
},
|
|
67184
|
+
"arrayConfig": {}
|
|
67185
|
+
}
|
|
67186
|
+
},
|
|
67187
|
+
{
|
|
67188
|
+
"keyID": "key_data_table",
|
|
67142
67189
|
"keyName": "数据列表",
|
|
67143
67190
|
"keyCode": "default",
|
|
67144
67191
|
"children": [],
|
|
67145
|
-
"dataType": "
|
|
67146
|
-
"dataTypeName": "
|
|
67192
|
+
"dataType": "Array",
|
|
67193
|
+
"dataTypeName": "Array",
|
|
67147
67194
|
"arrayDataTypeName": "",
|
|
67148
67195
|
"arrayDataType": "",
|
|
67149
|
-
"componentGroup": "
|
|
67150
|
-
"componentTypeLabel": "
|
|
67151
|
-
"componentTypeName": "
|
|
67152
|
-
"componentName": "
|
|
67153
|
-
"componentType": "
|
|
67196
|
+
"componentGroup": "Show",
|
|
67197
|
+
"componentTypeLabel": "Table表格",
|
|
67198
|
+
"componentTypeName": "Table",
|
|
67199
|
+
"componentName": "ElsTable",
|
|
67200
|
+
"componentType": "Table",
|
|
67154
67201
|
"formItem": true,
|
|
67155
67202
|
"componentShow": true,
|
|
67156
|
-
"icon": "
|
|
67203
|
+
"icon": "table",
|
|
67157
67204
|
"slots": [],
|
|
67158
67205
|
"config": {
|
|
67159
|
-
"formConfig": {
|
|
67160
|
-
|
|
67161
|
-
"
|
|
67162
|
-
"
|
|
67163
|
-
"
|
|
67164
|
-
"
|
|
67165
|
-
"
|
|
67166
|
-
"
|
|
67167
|
-
"
|
|
67168
|
-
"
|
|
67169
|
-
"
|
|
67206
|
+
"formConfig": {},
|
|
67207
|
+
"baseConfig": {
|
|
67208
|
+
"rowKey": "_id",
|
|
67209
|
+
"columns": [],
|
|
67210
|
+
"re_columns": ":globalData._parentGlobalData?.config?.baseConfig?.columns?.map(c=>({label:c.label,prop:c.prop,isEdit:true,editComponent:{name:'els-input',props:{}}}))||[]",
|
|
67211
|
+
"height": "",
|
|
67212
|
+
"maxHeight": "400",
|
|
67213
|
+
"align": "center",
|
|
67214
|
+
"isEdit": true,
|
|
67215
|
+
"dragRow": true,
|
|
67216
|
+
"hasPage": false
|
|
67170
67217
|
},
|
|
67218
|
+
"advancedConfig": {
|
|
67219
|
+
"style": "",
|
|
67220
|
+
"vif": "globalData._parentGlobalData?.config?.baseConfig?.columns?.length",
|
|
67221
|
+
"disabled": "",
|
|
67222
|
+
"eventChange": ""
|
|
67223
|
+
},
|
|
67224
|
+
"arrayConfig": {}
|
|
67225
|
+
},
|
|
67226
|
+
"value": []
|
|
67227
|
+
},
|
|
67228
|
+
{
|
|
67229
|
+
"keyID": "key_data_addrow_btn",
|
|
67230
|
+
"keyName": "Button按钮",
|
|
67231
|
+
"keyCode": "",
|
|
67232
|
+
"children": [],
|
|
67233
|
+
"dataType": "None",
|
|
67234
|
+
"dataTypeName": "None",
|
|
67235
|
+
"arrayDataTypeName": "",
|
|
67236
|
+
"arrayDataType": "",
|
|
67237
|
+
"componentGroup": "Show",
|
|
67238
|
+
"componentTypeLabel": "Button按钮",
|
|
67239
|
+
"componentTypeName": "Button",
|
|
67240
|
+
"componentName": "ElButton",
|
|
67241
|
+
"componentType": "Button",
|
|
67242
|
+
"formItem": false,
|
|
67243
|
+
"componentShow": true,
|
|
67244
|
+
"icon": "button",
|
|
67245
|
+
"slots": [],
|
|
67246
|
+
"config": {
|
|
67247
|
+
"formConfig": {},
|
|
67171
67248
|
"baseConfig": {
|
|
67172
|
-
"
|
|
67173
|
-
"
|
|
67174
|
-
"
|
|
67175
|
-
"
|
|
67249
|
+
"innerContent": "新增行",
|
|
67250
|
+
"type": "info",
|
|
67251
|
+
"text": true,
|
|
67252
|
+
"bg": true,
|
|
67253
|
+
"eventClick": "const cols=globalData._parentGlobalData?.config?.baseConfig?.columns||[];const row={_id:utils.shortid()};cols.forEach(c=>{row[c.prop]=''});refs['key_data_table']?.addRow(row)"
|
|
67176
67254
|
},
|
|
67177
67255
|
"advancedConfig": {
|
|
67178
|
-
"style": "
|
|
67179
|
-
"vif": "",
|
|
67256
|
+
"style": "margin-top:8px",
|
|
67257
|
+
"vif": "globalData._parentGlobalData?.config?.baseConfig?.columns?.length",
|
|
67180
67258
|
"disabled": "",
|
|
67181
67259
|
"eventChange": ""
|
|
67182
67260
|
},
|
|
@@ -67215,7 +67293,8 @@ const property_table = [
|
|
|
67215
67293
|
"bg": true,
|
|
67216
67294
|
"type": "info"
|
|
67217
67295
|
},
|
|
67218
|
-
"function_confirm": ""
|
|
67296
|
+
"function_confirm": "const rows=slotValue?.default?.default;if(Array.isArray(rows)){globalData.config.baseConfig.data=rows.map(({_id:_,...r})=>r)}return Promise.resolve(true)",
|
|
67297
|
+
"function_open": "if(slotValue)slotValue['default']={default:(globalData.config.baseConfig.data||[]).map(r=>({...r,_id:utils.shortid()}))}"
|
|
67219
67298
|
},
|
|
67220
67299
|
"advancedConfig": {},
|
|
67221
67300
|
"arrayConfig": {
|
|
@@ -67273,6 +67352,7 @@ const property_table = [
|
|
|
67273
67352
|
"id": "label",
|
|
67274
67353
|
"label": "列名称",
|
|
67275
67354
|
"prop": "label",
|
|
67355
|
+
"syncTo": "prop",
|
|
67276
67356
|
"width": "",
|
|
67277
67357
|
"showSummary": false,
|
|
67278
67358
|
"sortable": false,
|
|
@@ -73949,7 +74029,7 @@ const _sfc_main$1n = /* @__PURE__ */ defineComponent({
|
|
|
73949
74029
|
const { setContainer } = useProps(props2);
|
|
73950
74030
|
const tagID = "els-container" + utils.shortid();
|
|
73951
74031
|
const { ctx } = getCurrentInstance();
|
|
73952
|
-
const { $codeField, $messageField, $success, $eventData } = utils.getApiConfig();
|
|
74032
|
+
const { $codeField: $codeField2, $messageField: $messageField2, $success: $success2, $eventData } = utils.getApiConfig();
|
|
73953
74033
|
const { $actionTypeField, $confirmField, $confirmPasswordField, $urlField, $nameField } = utils.getMenuConfig();
|
|
73954
74034
|
const elsPageStore = ref({
|
|
73955
74035
|
validates: [],
|
|
@@ -74245,7 +74325,7 @@ const _sfc_main$1n = /* @__PURE__ */ defineComponent({
|
|
|
74245
74325
|
menu.IsLoading = false;
|
|
74246
74326
|
resolve2({ menu, res: true });
|
|
74247
74327
|
if (!res) return;
|
|
74248
|
-
if (res[$
|
|
74328
|
+
if (res[$codeField2] == "0") {
|
|
74249
74329
|
var currUrl = res.Data;
|
|
74250
74330
|
if (currUrl.indexOf("txt") > -1) {
|
|
74251
74331
|
utils.downLoadTxt(currUrl);
|
|
@@ -74253,7 +74333,7 @@ const _sfc_main$1n = /* @__PURE__ */ defineComponent({
|
|
|
74253
74333
|
window.location.href = currUrl;
|
|
74254
74334
|
}
|
|
74255
74335
|
} else {
|
|
74256
|
-
ElMessage.error(res[$
|
|
74336
|
+
ElMessage.error(res[$messageField2]);
|
|
74257
74337
|
}
|
|
74258
74338
|
});
|
|
74259
74339
|
} else {
|
|
@@ -74279,11 +74359,11 @@ const _sfc_main$1n = /* @__PURE__ */ defineComponent({
|
|
|
74279
74359
|
if (!res) {
|
|
74280
74360
|
return;
|
|
74281
74361
|
}
|
|
74282
|
-
if (!res[$eventData.data] && res[$
|
|
74283
|
-
ElMessage.success(res[$
|
|
74362
|
+
if (!res[$eventData.data] && res[$codeField2] == $success2) {
|
|
74363
|
+
ElMessage.success(res[$messageField2]);
|
|
74284
74364
|
return;
|
|
74285
|
-
} else if (!res[$eventData.data] && res[$
|
|
74286
|
-
ElMessage.error(res[$
|
|
74365
|
+
} else if (!res[$eventData.data] && res[$codeField2] != $success2) {
|
|
74366
|
+
ElMessage.error(res[$messageField2]);
|
|
74287
74367
|
return;
|
|
74288
74368
|
}
|
|
74289
74369
|
res[$eventData.data].forEach((action) => {
|
|
@@ -74975,7 +75055,7 @@ const _sfc_main$1l = /* @__PURE__ */ defineComponent({
|
|
|
74975
75055
|
emits: /* @__PURE__ */ mergeModels(["removeItem"], ["update:children"]),
|
|
74976
75056
|
setup(__props, { emit: __emit }) {
|
|
74977
75057
|
const DynamicDesignerInnerItem = defineAsyncComponent(() => {
|
|
74978
|
-
return import("./innerItem-
|
|
75058
|
+
return import("./innerItem-DxZoiM2C.js");
|
|
74979
75059
|
});
|
|
74980
75060
|
const { getValue: getValue2 } = useProps();
|
|
74981
75061
|
const tagID = getValue2("tagID");
|
|
@@ -75443,7 +75523,7 @@ const _sfc_main$1k = /* @__PURE__ */ defineComponent({
|
|
|
75443
75523
|
props: designerProps,
|
|
75444
75524
|
emits: ["update:modelValue", "update:templateValue"],
|
|
75445
75525
|
setup(__props, { expose: __expose, emit: __emit }) {
|
|
75446
|
-
const { $codeField, $messageField, $success } = utils.getApiConfig();
|
|
75526
|
+
const { $codeField: $codeField2, $messageField: $messageField2, $success: $success2 } = utils.getApiConfig();
|
|
75447
75527
|
const props2 = __props;
|
|
75448
75528
|
const emits2 = __emit;
|
|
75449
75529
|
const { setValue, formNodeProps } = useProps(props2);
|
|
@@ -75672,7 +75752,7 @@ const _sfc_main$1k = /* @__PURE__ */ defineComponent({
|
|
|
75672
75752
|
data: JSON.stringify(data)
|
|
75673
75753
|
}).then((res) => {
|
|
75674
75754
|
var _a, _b, _c;
|
|
75675
|
-
if (res[$
|
|
75755
|
+
if (res[$codeField2] == $success2) {
|
|
75676
75756
|
if ((_a = res.Data) == null ? void 0 : _a.ID) {
|
|
75677
75757
|
data.id = (_b = res.Data) == null ? void 0 : _b.ID;
|
|
75678
75758
|
data.componentType.id = (_c = res.Data) == null ? void 0 : _c.ID;
|
|
@@ -75696,7 +75776,7 @@ const _sfc_main$1k = /* @__PURE__ */ defineComponent({
|
|
|
75696
75776
|
currComponentTypes.value.push(data.componentType);
|
|
75697
75777
|
resolve2(true);
|
|
75698
75778
|
} else {
|
|
75699
|
-
ProxyElsMessage.warning(res[$
|
|
75779
|
+
ProxyElsMessage.warning(res[$messageField2]);
|
|
75700
75780
|
resolve2(false);
|
|
75701
75781
|
}
|
|
75702
75782
|
}).catch((res) => {
|
|
@@ -76013,10 +76093,10 @@ const _sfc_main$1j = /* @__PURE__ */ defineComponent({
|
|
|
76013
76093
|
emits: ["update:modelValue"],
|
|
76014
76094
|
setup(__props, { expose: __expose, emit: __emit }) {
|
|
76015
76095
|
const DynamicRenderInner = defineAsyncComponent(() => {
|
|
76016
|
-
return import("./inner-
|
|
76096
|
+
return import("./inner-PWU9A8AN.js").then((n) => n.i);
|
|
76017
76097
|
});
|
|
76018
76098
|
const DynamicRenderForm = defineAsyncComponent(() => {
|
|
76019
|
-
return import("./inner-
|
|
76099
|
+
return import("./inner-PWU9A8AN.js").then((n) => n.f);
|
|
76020
76100
|
});
|
|
76021
76101
|
const props2 = __props;
|
|
76022
76102
|
const { getValue: getValue2, setValue, formNodeProps } = useProps(props2);
|
|
@@ -76256,10 +76336,10 @@ const _sfc_main$1i = /* @__PURE__ */ defineComponent({
|
|
|
76256
76336
|
emits: ["update:modelValue"],
|
|
76257
76337
|
setup(__props, { expose: __expose, emit: __emit }) {
|
|
76258
76338
|
const DynamicRenderInnerAsync = defineAsyncComponent(() => {
|
|
76259
|
-
return import("./inner-
|
|
76339
|
+
return import("./inner-PWU9A8AN.js").then((n) => n.i);
|
|
76260
76340
|
});
|
|
76261
76341
|
const DynamicRenderFormAsync = defineAsyncComponent(() => {
|
|
76262
|
-
return import("./inner-
|
|
76342
|
+
return import("./inner-PWU9A8AN.js").then((n) => n.f);
|
|
76263
76343
|
});
|
|
76264
76344
|
const props2 = __props;
|
|
76265
76345
|
const { getValue: getValue2, setValue, formNodeProps } = useProps(props2);
|
|
@@ -78630,6 +78710,9 @@ const _sfc_main$z = /* @__PURE__ */ defineComponent({
|
|
|
78630
78710
|
});
|
|
78631
78711
|
const setSlotVisible = getValue2("setSlotVisible", () => {
|
|
78632
78712
|
});
|
|
78713
|
+
const triggerAiGenerate = getValue2("triggerAiGenerate", () => {
|
|
78714
|
+
});
|
|
78715
|
+
const aiUrl = getValue2("aiUrl", "");
|
|
78633
78716
|
const slotVisible = ref();
|
|
78634
78717
|
function handleRemove(item) {
|
|
78635
78718
|
removeItem(item);
|
|
@@ -78639,21 +78722,34 @@ const _sfc_main$z = /* @__PURE__ */ defineComponent({
|
|
|
78639
78722
|
setSlotVisible();
|
|
78640
78723
|
slotVisible.value = !slotVisible.value;
|
|
78641
78724
|
}
|
|
78725
|
+
const arrayTypeLabelMap = {
|
|
78726
|
+
String: "字符串数组",
|
|
78727
|
+
Number: "数字数组",
|
|
78728
|
+
Bool: "Bool数组",
|
|
78729
|
+
Object: "对象数组"
|
|
78730
|
+
};
|
|
78731
|
+
function formatDataTypeLabel(item) {
|
|
78732
|
+
if (item.dataTypeName === "Array") {
|
|
78733
|
+
return item.arrayDataTypeName ? arrayTypeLabelMap[item.arrayDataTypeName] || `${item.arrayDataTypeName}数组` : "数组";
|
|
78734
|
+
}
|
|
78735
|
+
if (item.dataTypeName === "Object") return "对象表单";
|
|
78736
|
+
return item.dataTypeName;
|
|
78737
|
+
}
|
|
78642
78738
|
return (_ctx, _cache) => {
|
|
78643
78739
|
const _component_View = resolveComponent("View");
|
|
78644
78740
|
const _component_el_icon = resolveComponent("el-icon");
|
|
78645
78741
|
const _component_ArrowDown = resolveComponent("ArrowDown");
|
|
78646
78742
|
const _component_ArrowUp = resolveComponent("ArrowUp");
|
|
78743
|
+
const _component_MagicStick = resolveComponent("MagicStick");
|
|
78647
78744
|
const _component_Delete = resolveComponent("Delete");
|
|
78648
78745
|
const _component_Rank = resolveComponent("Rank");
|
|
78649
78746
|
return openBlock(), createElementBlock(Fragment$1, null, [
|
|
78650
78747
|
!__props.nodeItem.excludeFromResult && (__props.nodeItem.componentGroup == "Form" || __props.nodeItem.formItem && __props.nodeItem.keyCode) ? (openBlock(), createElementBlock("span", _hoisted_1$l, [
|
|
78651
78748
|
createElementVNode("span", null, toDisplayString(__props.nodeItem.keyCode), 1),
|
|
78652
|
-
createElementVNode("span", null, toDisplayString(__props.nodeItem
|
|
78653
|
-
<${__props.nodeItem.arrayDataTypeName ? __props.nodeItem.arrayDataTypeName : "T"}>` : __props.nodeItem.dataTypeName), 1)
|
|
78749
|
+
createElementVNode("span", null, toDisplayString(formatDataTypeLabel(__props.nodeItem)), 1)
|
|
78654
78750
|
])) : createCommentVNode("", true),
|
|
78655
78751
|
createElementVNode("span", _hoisted_2$e, [
|
|
78656
|
-
__props.nodeItem.componentTypeLabel != "
|
|
78752
|
+
__props.nodeItem.componentTypeLabel != "对象表单" && __props.nodeItem.componentTypeLabel != "数组" ? (openBlock(), createElementBlock("span", _hoisted_3$d, toDisplayString(__props.nodeItem.componentTypeLabel), 1)) : createCommentVNode("", true),
|
|
78657
78753
|
__props.nodeItem.config.advancedConfig.vif ? (openBlock(), createBlock(_component_el_icon, {
|
|
78658
78754
|
key: 1,
|
|
78659
78755
|
title: "v-if:" + __props.nodeItem.config.advancedConfig.vif
|
|
@@ -78667,7 +78763,7 @@ const _sfc_main$z = /* @__PURE__ */ defineComponent({
|
|
|
78667
78763
|
key: 2,
|
|
78668
78764
|
onClick: handleSetSlotVisible
|
|
78669
78765
|
}, [
|
|
78670
|
-
_cache[
|
|
78766
|
+
_cache[2] || (_cache[2] = createTextVNode("插槽", -1)),
|
|
78671
78767
|
!slotVisible.value ? (openBlock(), createBlock(_component_el_icon, { key: 0 }, {
|
|
78672
78768
|
default: withCtx(() => [
|
|
78673
78769
|
createVNode(_component_ArrowDown)
|
|
@@ -78680,9 +78776,19 @@ const _sfc_main$z = /* @__PURE__ */ defineComponent({
|
|
|
78680
78776
|
_: 1
|
|
78681
78777
|
}))
|
|
78682
78778
|
])) : createCommentVNode("", true),
|
|
78779
|
+
unref(aiUrl) && __props.nodeItem.componentGroup === "Container" ? (openBlock(), createBlock(_component_el_icon, {
|
|
78780
|
+
key: 3,
|
|
78781
|
+
onClick: _cache[0] || (_cache[0] = ($event) => unref(triggerAiGenerate)(__props.nodeItem)),
|
|
78782
|
+
title: "AI生成"
|
|
78783
|
+
}, {
|
|
78784
|
+
default: withCtx(() => [
|
|
78785
|
+
createVNode(_component_MagicStick)
|
|
78786
|
+
]),
|
|
78787
|
+
_: 1
|
|
78788
|
+
})) : createCommentVNode("", true),
|
|
78683
78789
|
createVNode(_component_el_icon, {
|
|
78684
78790
|
class: "el-icon-remove",
|
|
78685
|
-
onClick: _cache[
|
|
78791
|
+
onClick: _cache[1] || (_cache[1] = ($event) => handleRemove(__props.nodeItem))
|
|
78686
78792
|
}, {
|
|
78687
78793
|
default: withCtx(() => [
|
|
78688
78794
|
createVNode(_component_Delete)
|
|
@@ -78700,7 +78806,7 @@ const _sfc_main$z = /* @__PURE__ */ defineComponent({
|
|
|
78700
78806
|
};
|
|
78701
78807
|
}
|
|
78702
78808
|
});
|
|
78703
|
-
const DynamicDesignerViewOperate = /* @__PURE__ */ _export_sfc$1(_sfc_main$z, [["__scopeId", "data-v-
|
|
78809
|
+
const DynamicDesignerViewOperate = /* @__PURE__ */ _export_sfc$1(_sfc_main$z, [["__scopeId", "data-v-5b4a8315"]]);
|
|
78704
78810
|
const _hoisted_1$k = { key: 1 };
|
|
78705
78811
|
const _sfc_main$y = /* @__PURE__ */ defineComponent({
|
|
78706
78812
|
__name: "wrap",
|
|
@@ -79074,7 +79180,7 @@ const _sfc_main$w = /* @__PURE__ */ defineComponent({
|
|
|
79074
79180
|
default: withCtx(() => [
|
|
79075
79181
|
createElementVNode("div", _hoisted_2$d, [
|
|
79076
79182
|
createElementVNode("div", _hoisted_3$c, [
|
|
79077
|
-
createVNode(
|
|
79183
|
+
createVNode(DynamicDesignerViewBody, {
|
|
79078
79184
|
renderData: slot.children,
|
|
79079
79185
|
minHeight: "100",
|
|
79080
79186
|
isMobile: unref(isMobile)
|
|
@@ -79212,7 +79318,7 @@ const _sfc_main$v = /* @__PURE__ */ defineComponent({
|
|
|
79212
79318
|
}, {
|
|
79213
79319
|
default: withCtx(() => [
|
|
79214
79320
|
createVNode(unref(draggable), mergeProps({
|
|
79215
|
-
class: [{ "els-dynamic-designer-empty": nodeItem.value.children.length == 0 }],
|
|
79321
|
+
class: [{ "els-dynamic-designer-empty": nodeItem.value.children.length == 0 && nodeItem.value.componentTypeName !== "Form" }, { "els-dynamic-array-undetermined": nodeItem.value.dataTypeName === "Array" && !nodeItem.value.arrayDataTypeName }],
|
|
79216
79322
|
list: nodeItem.value.children
|
|
79217
79323
|
}, { group: "dragGroup", ghostClass: "ghost", animation: 300 }, {
|
|
79218
79324
|
style: [{ "min-height": "50px" }],
|
|
@@ -79239,7 +79345,7 @@ const _sfc_main$v = /* @__PURE__ */ defineComponent({
|
|
|
79239
79345
|
};
|
|
79240
79346
|
}
|
|
79241
79347
|
});
|
|
79242
|
-
const DynamicDesignerViewForm = /* @__PURE__ */ _export_sfc$1(_sfc_main$v, [["__scopeId", "data-v-
|
|
79348
|
+
const DynamicDesignerViewForm = /* @__PURE__ */ _export_sfc$1(_sfc_main$v, [["__scopeId", "data-v-d658c3e9"]]);
|
|
79243
79349
|
const _sfc_main$u = /* @__PURE__ */ defineComponent({
|
|
79244
79350
|
__name: "body",
|
|
79245
79351
|
props: /* @__PURE__ */ mergeModels({
|
|
@@ -79331,6 +79437,7 @@ const _sfc_main$u = /* @__PURE__ */ defineComponent({
|
|
|
79331
79437
|
};
|
|
79332
79438
|
}
|
|
79333
79439
|
});
|
|
79440
|
+
const DynamicDesignerViewBody = /* @__PURE__ */ _export_sfc$1(_sfc_main$u, [["__scopeId", "data-v-82f9f850"]]);
|
|
79334
79441
|
const designerViewProps = buildProps({
|
|
79335
79442
|
...formItemProps$1,
|
|
79336
79443
|
/**
|
|
@@ -79427,6 +79534,14 @@ const designerViewProps = buildProps({
|
|
|
79427
79534
|
toolbar: {
|
|
79428
79535
|
type: Array
|
|
79429
79536
|
},
|
|
79537
|
+
/** AI 生成接口地址,有值时显示 AI 按钮 */
|
|
79538
|
+
aiUrl: { type: String },
|
|
79539
|
+
/** AI 系统提示词(不传则用内置默认) */
|
|
79540
|
+
aiSystemPrompt: { type: String },
|
|
79541
|
+
/** 自定义 AI 请求体构造 (systemPrompt, userPrompt) => body */
|
|
79542
|
+
aiBuildRequest: { type: Function },
|
|
79543
|
+
/** 自定义 AI 响应提取 (responseData) => string */
|
|
79544
|
+
aiPickResponse: { type: Function },
|
|
79430
79545
|
/**
|
|
79431
79546
|
* @description 左侧宽度
|
|
79432
79547
|
*/
|
|
@@ -79469,6 +79584,502 @@ const designerViewProps = buildProps({
|
|
|
79469
79584
|
default: () => []
|
|
79470
79585
|
}
|
|
79471
79586
|
});
|
|
79587
|
+
const { $codeField, $messageField, $success, $dataField } = utils.getApiConfig();
|
|
79588
|
+
const AI_SYSTEM_PROMPT = `你是一个低代码表单配置生成器。根据用户描述,输出符合以下格式的 JSON 数组。只输出 JSON,不要有任何额外文字、注释或代码块标记。
|
|
79589
|
+
|
|
79590
|
+
# 节点结构
|
|
79591
|
+
|
|
79592
|
+
每个节点必须包含以下字段:
|
|
79593
|
+
- keyID: 唯一ID,格式 "key_" + 6位数字(如 "key_123456")
|
|
79594
|
+
- keyName: 显示名称(中文)
|
|
79595
|
+
- keyCode: 字段名(小驼峰,容器类节点为空字符串"")
|
|
79596
|
+
- componentType: 组件类型(见下方清单;Object/Array 数据节点不填此字段)
|
|
79597
|
+
- dataType: 数据类型(String/Number/Bool/Object/Array/None)
|
|
79598
|
+
- arrayDataType: 数组元素类型,仅当 dataType="Array" 时填写(Object/String/Number/Bool)
|
|
79599
|
+
- children: 子节点数组(叶子节点为 [])
|
|
79600
|
+
- config: 包含 formConfig、baseConfig、advancedConfig、arrayConfig 四个对象
|
|
79601
|
+
|
|
79602
|
+
不要输出 componentName、componentGroup、dataTypeName、formItem 等字段(由系统自动填充)。
|
|
79603
|
+
|
|
79604
|
+
# 组件清单
|
|
79605
|
+
|
|
79606
|
+
## 表单组件(有字段值输出,需填 keyCode)
|
|
79607
|
+
|
|
79608
|
+
| componentType | dataType | 说明 | 常用 baseConfig |
|
|
79609
|
+
|---|---|---|---|
|
|
79610
|
+
| Input | String | 单行输入框 | placeholder, clearable, maxlength, showWordLimit, isTrim, width, prefixIcon, suffixIcon |
|
|
79611
|
+
| Textarea | String | 多行文本 | placeholder, rows, maxlength, clearable, resize, width |
|
|
79612
|
+
| InputNumber | Number | 数字输入框 | min, max, step, precision, controls-position, width |
|
|
79613
|
+
| Slider | Number | 滑块 | min, max, step, showInput |
|
|
79614
|
+
| Switch | Bool/String/Number | 开关 | active-text, inactive-text, active-value, inactive-value |
|
|
79615
|
+
| Select | String/Number/Bool | 下拉选择 | data[{label,value}], multiple, filterable, clearable, placeholder, width, url, labelField, valueField |
|
|
79616
|
+
| Radio | String/Number/Bool | 单选 | type(radio/button), data[{label,value}], width, url |
|
|
79617
|
+
| Checkbox | String | 多选 | type(checkbox/button), data[{label,value}], width, url |
|
|
79618
|
+
| Cascader | String | 级联选择 | url, labelField, valueField, childrenField, clearable, multiple |
|
|
79619
|
+
| Datepicker | String/Number | 日期选择 | type(date/daterange/datetime/datetimerange/year/month/monthrange), format, valueFormat, clearable, width |
|
|
79620
|
+
| Timepicker | String/Number | 时间选择 | format, valueFormat, clearable, width |
|
|
79621
|
+
| Switch | Bool | 开关 | active-text, inactive-text |
|
|
79622
|
+
| Tree | String/Number | 树形选择 | url, labelField, valueField, clearable, multiple |
|
|
79623
|
+
| ColorPicker | String | 取色器 | showAlpha |
|
|
79624
|
+
| UploadPic | String | 上传图片 | width, height, limit |
|
|
79625
|
+
| UploadMutiPic | String | 上传图集(多图)| width, height, limit |
|
|
79626
|
+
| UploadFile | String | 上传文件 | accept, limit |
|
|
79627
|
+
| WangEditor | String | 富文本编辑器 | height |
|
|
79628
|
+
| AceEditor | String | 代码编辑器 | mode(javascript/json/html/css/python/sql), height |
|
|
79629
|
+
| JsonEditor | String/Object | JSON 编辑器 | height |
|
|
79630
|
+
| DataModal | String/Object/Array | 弹窗选择 | title, width, buttonLabel |
|
|
79631
|
+
| Caption | None/String | 分隔描述(formItem:true)| title, description, type(primary/success/warning/danger) |
|
|
79632
|
+
| Table | Array | 数据表格(formItem:true)| columns[{label,prop,width,sortable}], data, hasPage, maxHeight, url |
|
|
79633
|
+
|
|
79634
|
+
## 容器组件(不含字段值,keyCode 为 "",dataType 为 None)
|
|
79635
|
+
|
|
79636
|
+
| componentType | 说明 | 主要 baseConfig |
|
|
79637
|
+
|---|---|---|
|
|
79638
|
+
| Row | 栅格行,子节点必须是 Col | gutter(默认10), justify(start/end/center/space-between/space-around), align(top/middle/bottom) |
|
|
79639
|
+
| Col | 栅格列,必须在 Row 内 | span(1-24,合计24), offset |
|
|
79640
|
+
| Card | 卡片容器 | header, shadow(always/hover/never) |
|
|
79641
|
+
| Collapse | 折叠面板,子节点是 CollapseItem | accordion |
|
|
79642
|
+
| CollapseItem | 折叠节点,必须在 Collapse 内 | title, name |
|
|
79643
|
+
| Tabs | 标签页,子节点是 TabPane | type(border-card/card), tabPosition(top/right/bottom/left) |
|
|
79644
|
+
| TabPane | 标签选项,必须在 Tabs 内 | label, name |
|
|
79645
|
+
| Dialog | 对话框 | title, width, fullscreen |
|
|
79646
|
+
| Drawer | 抽屉 | title, size, direction(rtl/ltr/ttb/btt) |
|
|
79647
|
+
| Html | 通用 div | display(flex), flex-wrap, justify-content, align-items, width, height, padding, background |
|
|
79648
|
+
| FormItem | 表单项容器 | label, labelWidth |
|
|
79649
|
+
| FormQuery | 查询表单(Object类型) | labelWidth |
|
|
79650
|
+
| RequestForm | 接口请求表单 | url, method(GET/POST), buttonLabel |
|
|
79651
|
+
|
|
79652
|
+
## 展示组件(不含字段值,keyCode 为 "")
|
|
79653
|
+
|
|
79654
|
+
| componentType | 说明 | 主要 baseConfig |
|
|
79655
|
+
|---|---|---|
|
|
79656
|
+
| Button | 普通按钮 | innerContent, type(primary/success/warning/danger/info), plain, text, round, eventClick |
|
|
79657
|
+
| ButtonSearch | 查询按钮 | innerContent |
|
|
79658
|
+
| ButtonExport | 导出按钮 | innerContent |
|
|
79659
|
+
| Tip | 提示块 | title, content, type(primary/warning) |
|
|
79660
|
+
| Alert | 警告提示 | title, type(success/warning/info/error), description, closable |
|
|
79661
|
+
| Tag | 标签 | innerContent, type(success/info/warning/danger) |
|
|
79662
|
+
| Link | 链接 | innerContent, href, type, underline |
|
|
79663
|
+
| Text | 文本 | innerContent, type, size |
|
|
79664
|
+
| Image | 图片 | src, width, height, fit(fill/contain/cover/none) |
|
|
79665
|
+
| Tooltip | 文字提示 | content, placement(top/bottom/left/right), effect(dark/light) |
|
|
79666
|
+
|
|
79667
|
+
## Object/Array 数据节点(无 componentType,由 dataType 驱动)
|
|
79668
|
+
|
|
79669
|
+
- dataType="Object":对象节点,children 放子字段,输出 {keyCode: {子字段...}}
|
|
79670
|
+
- dataType="Array" + arrayDataType="Object":对象数组节点(不含 componentType),children 定义数组元素的字段结构,每个子节点就是一行数据的字段
|
|
79671
|
+
- dataType="Array" + arrayDataType="String/Number":简单值数组
|
|
79672
|
+
- 这类节点没有 componentType 字段
|
|
79673
|
+
|
|
79674
|
+
## Table 可编辑表格(推荐用于对象数组)
|
|
79675
|
+
|
|
79676
|
+
当需要让用户在表格中编辑多行数据时,使用 componentType="Table",dataType="Array"。
|
|
79677
|
+
Table 通过 baseConfig.columns 定义列,每列需要 id(随机字符串)、label(列标题)、prop(字段名)、editComponent(编辑组件)。
|
|
79678
|
+
设置 isEdit:true 开启行内编辑,canAddRow:true 允许新增行。
|
|
79679
|
+
|
|
79680
|
+
Table 节点的 slots 数组中每个 slot 对应一列的编辑插槽(name 格式为 "edit-{列id}"),slot.children 为空时使用 editComponent 默认编辑器,也可以在 children 中放入自定义组件。
|
|
79681
|
+
|
|
79682
|
+
Table 节点格式:
|
|
79683
|
+
\`\`\`json
|
|
79684
|
+
{
|
|
79685
|
+
"keyID": "key_xxxxxx",
|
|
79686
|
+
"keyCode": "列表字段名",
|
|
79687
|
+
"keyName": "显示名称",
|
|
79688
|
+
"dataType": "Array",
|
|
79689
|
+
"arrayDataType": "",
|
|
79690
|
+
"componentType": "Table",
|
|
79691
|
+
"children": [],
|
|
79692
|
+
"slots": [
|
|
79693
|
+
{ "name": "edit-{列id1}", "label": "{列1标题} 编辑", "children": [] },
|
|
79694
|
+
{ "name": "edit-{列id2}", "label": "{列2标题} 编辑", "children": [] }
|
|
79695
|
+
],
|
|
79696
|
+
"config": {
|
|
79697
|
+
"formConfig": {},
|
|
79698
|
+
"baseConfig": {
|
|
79699
|
+
"rowKey": "",
|
|
79700
|
+
"url": "",
|
|
79701
|
+
"data": {},
|
|
79702
|
+
"columns": [
|
|
79703
|
+
{ "id": "{列id1}", "label": "{列1标题}", "prop": "{字段名1}", "type": "default", "width": "", "editComponent": { "name": "els-input", "props": {} } },
|
|
79704
|
+
{ "id": "{列id2}", "label": "{列2标题}", "prop": "{字段名2}", "type": "default", "width": "", "editComponent": { "name": "els-input", "props": {} } }
|
|
79705
|
+
],
|
|
79706
|
+
"align": "center",
|
|
79707
|
+
"isEdit": true,
|
|
79708
|
+
"canAddRow": true,
|
|
79709
|
+
"hasPage": false,
|
|
79710
|
+
"maxHeight": ""
|
|
79711
|
+
},
|
|
79712
|
+
"advancedConfig": {},
|
|
79713
|
+
"arrayConfig": {}
|
|
79714
|
+
}
|
|
79715
|
+
}
|
|
79716
|
+
\`\`\`
|
|
79717
|
+
列 id 使用8位随机字母数字串,slot name 格式必须与列 id 保持一致("edit-" + 列id)。
|
|
79718
|
+
|
|
79719
|
+
# 配置说明
|
|
79720
|
+
|
|
79721
|
+
## formConfig(字段级表单配置)
|
|
79722
|
+
- re_required: 必填表达式("" 不必填,"true" 始终必填,"currNode['field']?.value=='A'" 条件必填)
|
|
79723
|
+
- requiredMessage: 必填提示文字
|
|
79724
|
+
- validType: 内置验证(email/phone/idcard/url)
|
|
79725
|
+
- validExpression: 自定义验证表达式
|
|
79726
|
+
- validMessage: 验证失败提示
|
|
79727
|
+
- tip: 字段提示文字
|
|
79728
|
+
- tipPosition: 提示位置(left/right/top)
|
|
79729
|
+
|
|
79730
|
+
## advancedConfig(高级配置,所有组件均支持)
|
|
79731
|
+
- vif: 条件显示表达式(true显示,false隐藏)。访问其他字段用 currNode['keyCode'].value
|
|
79732
|
+
- disabled: 禁用表达式,同上
|
|
79733
|
+
- eventChange: 值变化时触发的 JS 代码
|
|
79734
|
+
- style: 动态样式字符串
|
|
79735
|
+
|
|
79736
|
+
# 配置案例
|
|
79737
|
+
|
|
79738
|
+
## 案例1 - 基本表单
|
|
79739
|
+
\`\`\`json
|
|
79740
|
+
[
|
|
79741
|
+
{
|
|
79742
|
+
"keyID": "key_001001",
|
|
79743
|
+
"keyCode": "username",
|
|
79744
|
+
"keyName": "用户名",
|
|
79745
|
+
"componentType": "Input",
|
|
79746
|
+
"dataType": "String",
|
|
79747
|
+
"arrayDataType": "",
|
|
79748
|
+
"children": [],
|
|
79749
|
+
"config": {
|
|
79750
|
+
"formConfig": { "re_required": "true", "requiredMessage": "请输入用户名" },
|
|
79751
|
+
"baseConfig": { "placeholder": "请输入用户名", "clearable": true, "maxlength": "50" },
|
|
79752
|
+
"advancedConfig": { "style": "", "vif": "", "disabled": "", "eventChange": "" },
|
|
79753
|
+
"arrayConfig": {}
|
|
79754
|
+
}
|
|
79755
|
+
},
|
|
79756
|
+
{
|
|
79757
|
+
"keyID": "key_001002",
|
|
79758
|
+
"keyCode": "gender",
|
|
79759
|
+
"keyName": "性别",
|
|
79760
|
+
"componentType": "Radio",
|
|
79761
|
+
"dataType": "String",
|
|
79762
|
+
"arrayDataType": "",
|
|
79763
|
+
"children": [],
|
|
79764
|
+
"config": {
|
|
79765
|
+
"formConfig": {},
|
|
79766
|
+
"baseConfig": { "type": "radio", "data": [{"label": "男", "value": "male"}, {"label": "女", "value": "female"}] },
|
|
79767
|
+
"advancedConfig": { "style": "", "vif": "", "disabled": "", "eventChange": "" },
|
|
79768
|
+
"arrayConfig": {}
|
|
79769
|
+
}
|
|
79770
|
+
},
|
|
79771
|
+
{
|
|
79772
|
+
"keyID": "key_001003",
|
|
79773
|
+
"keyCode": "role",
|
|
79774
|
+
"keyName": "角色",
|
|
79775
|
+
"componentType": "Select",
|
|
79776
|
+
"dataType": "String",
|
|
79777
|
+
"arrayDataType": "",
|
|
79778
|
+
"children": [],
|
|
79779
|
+
"config": {
|
|
79780
|
+
"formConfig": {},
|
|
79781
|
+
"baseConfig": { "data": [{"label": "管理员", "value": "admin"}, {"label": "普通用户", "value": "user"}], "placeholder": "请选择角色", "clearable": true },
|
|
79782
|
+
"advancedConfig": { "style": "", "vif": "", "disabled": "", "eventChange": "" },
|
|
79783
|
+
"arrayConfig": {}
|
|
79784
|
+
}
|
|
79785
|
+
}
|
|
79786
|
+
]
|
|
79787
|
+
\`\`\`
|
|
79788
|
+
|
|
79789
|
+
## 案例2 - 栅格布局(Row + Col)
|
|
79790
|
+
\`\`\`json
|
|
79791
|
+
[
|
|
79792
|
+
{
|
|
79793
|
+
"keyID": "row_002001",
|
|
79794
|
+
"keyCode": "",
|
|
79795
|
+
"keyName": "栅格行",
|
|
79796
|
+
"componentType": "Row",
|
|
79797
|
+
"dataType": "None",
|
|
79798
|
+
"arrayDataType": "",
|
|
79799
|
+
"children": [
|
|
79800
|
+
{
|
|
79801
|
+
"keyID": "col_002001",
|
|
79802
|
+
"keyCode": "",
|
|
79803
|
+
"keyName": "左列",
|
|
79804
|
+
"componentType": "Col",
|
|
79805
|
+
"dataType": "None",
|
|
79806
|
+
"arrayDataType": "",
|
|
79807
|
+
"children": [
|
|
79808
|
+
{
|
|
79809
|
+
"keyID": "key_002001",
|
|
79810
|
+
"keyCode": "startDate",
|
|
79811
|
+
"keyName": "开始日期",
|
|
79812
|
+
"componentType": "Datepicker",
|
|
79813
|
+
"dataType": "String",
|
|
79814
|
+
"arrayDataType": "",
|
|
79815
|
+
"children": [],
|
|
79816
|
+
"config": { "formConfig": {}, "baseConfig": { "type": "date", "valueFormat": "YYYY-MM-DD", "clearable": true }, "advancedConfig": { "style": "", "vif": "", "disabled": "", "eventChange": "" }, "arrayConfig": {} }
|
|
79817
|
+
}
|
|
79818
|
+
],
|
|
79819
|
+
"config": { "formConfig": {}, "baseConfig": { "span": 12 }, "advancedConfig": {}, "arrayConfig": {} }
|
|
79820
|
+
},
|
|
79821
|
+
{
|
|
79822
|
+
"keyID": "col_002002",
|
|
79823
|
+
"keyCode": "",
|
|
79824
|
+
"keyName": "右列",
|
|
79825
|
+
"componentType": "Col",
|
|
79826
|
+
"dataType": "None",
|
|
79827
|
+
"arrayDataType": "",
|
|
79828
|
+
"children": [
|
|
79829
|
+
{
|
|
79830
|
+
"keyID": "key_002002",
|
|
79831
|
+
"keyCode": "endDate",
|
|
79832
|
+
"keyName": "结束日期",
|
|
79833
|
+
"componentType": "Datepicker",
|
|
79834
|
+
"dataType": "String",
|
|
79835
|
+
"arrayDataType": "",
|
|
79836
|
+
"children": [],
|
|
79837
|
+
"config": { "formConfig": {}, "baseConfig": { "type": "date", "valueFormat": "YYYY-MM-DD", "clearable": true }, "advancedConfig": { "style": "", "vif": "", "disabled": "", "eventChange": "" }, "arrayConfig": {} }
|
|
79838
|
+
}
|
|
79839
|
+
],
|
|
79840
|
+
"config": { "formConfig": {}, "baseConfig": { "span": 12 }, "advancedConfig": {}, "arrayConfig": {} }
|
|
79841
|
+
}
|
|
79842
|
+
],
|
|
79843
|
+
"config": { "formConfig": {}, "baseConfig": { "gutter": 10 }, "advancedConfig": {}, "arrayConfig": {} }
|
|
79844
|
+
}
|
|
79845
|
+
]
|
|
79846
|
+
\`\`\`
|
|
79847
|
+
|
|
79848
|
+
## 案例3 - Object 嵌套对象
|
|
79849
|
+
\`\`\`json
|
|
79850
|
+
[
|
|
79851
|
+
{
|
|
79852
|
+
"keyID": "key_003001",
|
|
79853
|
+
"keyCode": "address",
|
|
79854
|
+
"keyName": "地址",
|
|
79855
|
+
"dataType": "Object",
|
|
79856
|
+
"arrayDataType": "",
|
|
79857
|
+
"children": [
|
|
79858
|
+
{
|
|
79859
|
+
"keyID": "key_003002",
|
|
79860
|
+
"keyCode": "province",
|
|
79861
|
+
"keyName": "省份",
|
|
79862
|
+
"componentType": "Input",
|
|
79863
|
+
"dataType": "String",
|
|
79864
|
+
"arrayDataType": "",
|
|
79865
|
+
"children": [],
|
|
79866
|
+
"config": { "formConfig": {}, "baseConfig": { "placeholder": "请输入省份" }, "advancedConfig": { "style": "", "vif": "", "disabled": "", "eventChange": "" }, "arrayConfig": {} }
|
|
79867
|
+
},
|
|
79868
|
+
{
|
|
79869
|
+
"keyID": "key_003003",
|
|
79870
|
+
"keyCode": "city",
|
|
79871
|
+
"keyName": "城市",
|
|
79872
|
+
"componentType": "Input",
|
|
79873
|
+
"dataType": "String",
|
|
79874
|
+
"arrayDataType": "",
|
|
79875
|
+
"children": [],
|
|
79876
|
+
"config": { "formConfig": {}, "baseConfig": { "placeholder": "请输入城市" }, "advancedConfig": { "style": "", "vif": "", "disabled": "", "eventChange": "" }, "arrayConfig": {} }
|
|
79877
|
+
}
|
|
79878
|
+
],
|
|
79879
|
+
"config": { "formConfig": {}, "baseConfig": {}, "advancedConfig": {}, "arrayConfig": {} }
|
|
79880
|
+
}
|
|
79881
|
+
]
|
|
79882
|
+
\`\`\`
|
|
79883
|
+
|
|
79884
|
+
## 案例4 - 普通对象数组(无 componentType,dataType=Array + arrayDataType=Object)
|
|
79885
|
+
|
|
79886
|
+
这种方式生成嵌套表单,每行数据是一个对象,children 定义每个对象的字段:
|
|
79887
|
+
\`\`\`json
|
|
79888
|
+
[
|
|
79889
|
+
{
|
|
79890
|
+
"keyID": "key_arr001",
|
|
79891
|
+
"keyCode": "members",
|
|
79892
|
+
"keyName": "成员列表",
|
|
79893
|
+
"dataType": "Array",
|
|
79894
|
+
"arrayDataType": "Object",
|
|
79895
|
+
"children": [
|
|
79896
|
+
{
|
|
79897
|
+
"keyID": "key_arr002",
|
|
79898
|
+
"keyCode": "name",
|
|
79899
|
+
"keyName": "姓名",
|
|
79900
|
+
"componentType": "Input",
|
|
79901
|
+
"dataType": "String",
|
|
79902
|
+
"arrayDataType": "",
|
|
79903
|
+
"children": [],
|
|
79904
|
+
"config": { "formConfig": {}, "baseConfig": { "placeholder": "请输入姓名" }, "advancedConfig": { "style": "", "vif": "", "disabled": "", "eventChange": "" }, "arrayConfig": {} }
|
|
79905
|
+
},
|
|
79906
|
+
{
|
|
79907
|
+
"keyID": "key_arr003",
|
|
79908
|
+
"keyCode": "age",
|
|
79909
|
+
"keyName": "年龄",
|
|
79910
|
+
"componentType": "InputNumber",
|
|
79911
|
+
"dataType": "Number",
|
|
79912
|
+
"arrayDataType": "",
|
|
79913
|
+
"children": [],
|
|
79914
|
+
"config": { "formConfig": {}, "baseConfig": { "min": "0", "max": "150" }, "advancedConfig": { "style": "", "vif": "", "disabled": "", "eventChange": "" }, "arrayConfig": {} }
|
|
79915
|
+
}
|
|
79916
|
+
],
|
|
79917
|
+
"config": { "formConfig": {}, "baseConfig": {}, "advancedConfig": {}, "arrayConfig": {} }
|
|
79918
|
+
}
|
|
79919
|
+
]
|
|
79920
|
+
\`\`\`
|
|
79921
|
+
|
|
79922
|
+
## 案例5 - Table 可编辑表格(推荐,比对象数组更直观)
|
|
79923
|
+
|
|
79924
|
+
Table 表格适合需要用户编辑多行数据的场景,isEdit:true 开启行内编辑,canAddRow:true 允许新增行:
|
|
79925
|
+
\`\`\`json
|
|
79926
|
+
[
|
|
79927
|
+
{
|
|
79928
|
+
"keyID": "key_tbl001",
|
|
79929
|
+
"keyCode": "users",
|
|
79930
|
+
"keyName": "用户列表",
|
|
79931
|
+
"dataType": "Array",
|
|
79932
|
+
"arrayDataType": "",
|
|
79933
|
+
"componentType": "Table",
|
|
79934
|
+
"children": [],
|
|
79935
|
+
"slots": [
|
|
79936
|
+
{ "name": "edit-AbC12345", "label": "姓名 编辑", "children": [] },
|
|
79937
|
+
{ "name": "edit-DeF67890", "label": "年龄 编辑", "children": [] },
|
|
79938
|
+
{ "name": "edit-GhI11223", "label": "部门 编辑", "children": [] }
|
|
79939
|
+
],
|
|
79940
|
+
"config": {
|
|
79941
|
+
"formConfig": {},
|
|
79942
|
+
"baseConfig": {
|
|
79943
|
+
"rowKey": "",
|
|
79944
|
+
"url": "",
|
|
79945
|
+
"data": {},
|
|
79946
|
+
"columns": [
|
|
79947
|
+
{ "id": "AbC12345", "label": "姓名", "prop": "name", "type": "default", "width": "", "editComponent": { "name": "els-input", "props": {} } },
|
|
79948
|
+
{ "id": "DeF67890", "label": "年龄", "prop": "age", "type": "default", "width": "100", "editComponent": { "name": "els-input-number", "props": { "min": 0 } } },
|
|
79949
|
+
{ "id": "GhI11223", "label": "部门", "prop": "dept", "type": "default", "width": "", "editComponent": { "name": "els-input", "props": {} } }
|
|
79950
|
+
],
|
|
79951
|
+
"align": "center",
|
|
79952
|
+
"isEdit": true,
|
|
79953
|
+
"canAddRow": true,
|
|
79954
|
+
"hasPage": false,
|
|
79955
|
+
"maxHeight": ""
|
|
79956
|
+
},
|
|
79957
|
+
"advancedConfig": {},
|
|
79958
|
+
"arrayConfig": {}
|
|
79959
|
+
}
|
|
79960
|
+
}
|
|
79961
|
+
]
|
|
79962
|
+
\`\`\`
|
|
79963
|
+
|
|
79964
|
+
## 案例6 - 条件显示/禁用(advancedConfig.vif / disabled)
|
|
79965
|
+
\`\`\`json
|
|
79966
|
+
[
|
|
79967
|
+
{
|
|
79968
|
+
"keyID": "key_004001",
|
|
79969
|
+
"keyCode": "isVip",
|
|
79970
|
+
"keyName": "是否VIP",
|
|
79971
|
+
"componentType": "Switch",
|
|
79972
|
+
"dataType": "Bool",
|
|
79973
|
+
"arrayDataType": "",
|
|
79974
|
+
"children": [],
|
|
79975
|
+
"config": {
|
|
79976
|
+
"formConfig": {},
|
|
79977
|
+
"baseConfig": { "active-text": "是", "inactive-text": "否" },
|
|
79978
|
+
"advancedConfig": { "style": "", "vif": "", "disabled": "", "eventChange": "" },
|
|
79979
|
+
"arrayConfig": {}
|
|
79980
|
+
}
|
|
79981
|
+
},
|
|
79982
|
+
{
|
|
79983
|
+
"keyID": "key_004002",
|
|
79984
|
+
"keyCode": "vipLevel",
|
|
79985
|
+
"keyName": "VIP等级",
|
|
79986
|
+
"componentType": "Select",
|
|
79987
|
+
"dataType": "String",
|
|
79988
|
+
"arrayDataType": "",
|
|
79989
|
+
"children": [],
|
|
79990
|
+
"config": {
|
|
79991
|
+
"formConfig": {},
|
|
79992
|
+
"baseConfig": { "data": [{"label": "黄金", "value": "gold"}, {"label": "铂金", "value": "platinum"}, {"label": "钻石", "value": "diamond"}], "placeholder": "请选择VIP等级" },
|
|
79993
|
+
"advancedConfig": { "style": "", "vif": "currNode['isVip']?.value == true", "disabled": "", "eventChange": "" },
|
|
79994
|
+
"arrayConfig": {}
|
|
79995
|
+
}
|
|
79996
|
+
},
|
|
79997
|
+
{
|
|
79998
|
+
"keyID": "key_004003",
|
|
79999
|
+
"keyCode": "country",
|
|
80000
|
+
"keyName": "国家",
|
|
80001
|
+
"componentType": "Select",
|
|
80002
|
+
"dataType": "String",
|
|
80003
|
+
"arrayDataType": "",
|
|
80004
|
+
"children": [],
|
|
80005
|
+
"config": {
|
|
80006
|
+
"formConfig": {},
|
|
80007
|
+
"baseConfig": { "data": [{"label": "中国", "value": "CN"}, {"label": "美国", "value": "US"}], "clearable": true, "placeholder": "请选择国家" },
|
|
80008
|
+
"advancedConfig": { "style": "", "vif": "", "disabled": "", "eventChange": "" },
|
|
80009
|
+
"arrayConfig": {}
|
|
80010
|
+
}
|
|
80011
|
+
},
|
|
80012
|
+
{
|
|
80013
|
+
"keyID": "key_004004",
|
|
80014
|
+
"keyCode": "province",
|
|
80015
|
+
"keyName": "省份",
|
|
80016
|
+
"componentType": "Input",
|
|
80017
|
+
"dataType": "String",
|
|
80018
|
+
"arrayDataType": "",
|
|
80019
|
+
"children": [],
|
|
80020
|
+
"config": {
|
|
80021
|
+
"formConfig": { "re_required": "currNode['country']?.value == 'CN'", "requiredMessage": "请输入省份" },
|
|
80022
|
+
"baseConfig": { "placeholder": "请输入省份" },
|
|
80023
|
+
"advancedConfig": { "style": "", "vif": "currNode['country']?.value == 'CN'", "disabled": "", "eventChange": "" },
|
|
80024
|
+
"arrayConfig": {}
|
|
80025
|
+
}
|
|
80026
|
+
}
|
|
80027
|
+
]
|
|
80028
|
+
\`\`\`
|
|
80029
|
+
|
|
80030
|
+
## 案例5 - 必填验证与格式校验
|
|
80031
|
+
\`\`\`json
|
|
80032
|
+
[
|
|
80033
|
+
{
|
|
80034
|
+
"keyID": "key_005001",
|
|
80035
|
+
"keyCode": "email",
|
|
80036
|
+
"keyName": "邮箱",
|
|
80037
|
+
"componentType": "Input",
|
|
80038
|
+
"dataType": "String",
|
|
80039
|
+
"arrayDataType": "",
|
|
80040
|
+
"children": [],
|
|
80041
|
+
"config": {
|
|
80042
|
+
"formConfig": { "re_required": "true", "requiredMessage": "请输入邮箱", "validType": "email", "validMessage": "请输入正确的邮箱格式", "tip": "用于接收通知", "tipPosition": "right" },
|
|
80043
|
+
"baseConfig": { "placeholder": "请输入邮箱地址", "clearable": true },
|
|
80044
|
+
"advancedConfig": { "style": "", "vif": "", "disabled": "", "eventChange": "" },
|
|
80045
|
+
"arrayConfig": {}
|
|
80046
|
+
}
|
|
80047
|
+
},
|
|
80048
|
+
{
|
|
80049
|
+
"keyID": "key_005002",
|
|
80050
|
+
"keyCode": "phone",
|
|
80051
|
+
"keyName": "手机号",
|
|
80052
|
+
"componentType": "Input",
|
|
80053
|
+
"dataType": "String",
|
|
80054
|
+
"arrayDataType": "",
|
|
80055
|
+
"children": [],
|
|
80056
|
+
"config": {
|
|
80057
|
+
"formConfig": { "re_required": "true", "requiredMessage": "请输入手机号", "validType": "phone", "validMessage": "请输入正确的11位手机号" },
|
|
80058
|
+
"baseConfig": { "placeholder": "请输入手机号", "maxlength": "11" },
|
|
80059
|
+
"advancedConfig": { "style": "", "vif": "", "disabled": "", "eventChange": "" },
|
|
80060
|
+
"arrayConfig": {}
|
|
80061
|
+
}
|
|
80062
|
+
}
|
|
80063
|
+
]
|
|
80064
|
+
\`\`\``;
|
|
80065
|
+
async function callAI(url, userPrompt, options2) {
|
|
80066
|
+
const sys = (options2 == null ? void 0 : options2.systemPrompt) || AI_SYSTEM_PROMPT;
|
|
80067
|
+
const body = (options2 == null ? void 0 : options2.buildRequest) ? options2.buildRequest(sys, userPrompt) : { system: sys, user: userPrompt };
|
|
80068
|
+
const res = await url.post(body);
|
|
80069
|
+
if (res[$codeField] != $success) {
|
|
80070
|
+
ProxyElsMessage.warning(`${res[$messageField]}`);
|
|
80071
|
+
return [];
|
|
80072
|
+
}
|
|
80073
|
+
let text = (options2 == null ? void 0 : options2.pickResponse) ? options2.pickResponse(res[$dataField]) : res[$dataField];
|
|
80074
|
+
text = text.replace(/^```(?:json)?\s*/i, "").replace(/\s*```\s*$/, "").trim();
|
|
80075
|
+
try {
|
|
80076
|
+
const data = JSON.parse(text);
|
|
80077
|
+
return Array.isArray(data) ? data : [data];
|
|
80078
|
+
} catch {
|
|
80079
|
+
ProxyElsMessage.warning("AI 返回格式无效,请重试");
|
|
80080
|
+
return [];
|
|
80081
|
+
}
|
|
80082
|
+
}
|
|
79472
80083
|
const useDesign = defineStore("dynamic-design", () => {
|
|
79473
80084
|
const queue = ref([]);
|
|
79474
80085
|
const pointer = ref(-1);
|
|
@@ -79694,7 +80305,7 @@ const _sfc_main$t = /* @__PURE__ */ defineComponent({
|
|
|
79694
80305
|
const objectData = ref([
|
|
79695
80306
|
{
|
|
79696
80307
|
keyID: "id_" + utils.randomNumber().toString(),
|
|
79697
|
-
keyName: "
|
|
80308
|
+
keyName: "对象表单",
|
|
79698
80309
|
keyCode: "key_" + utils.randomNumber().toString(),
|
|
79699
80310
|
children: [],
|
|
79700
80311
|
dataType: (_a = currDynamicDataType.value.find((cele) => cele.type == "Object")) == null ? void 0 : _a.value,
|
|
@@ -79703,7 +80314,7 @@ const _sfc_main$t = /* @__PURE__ */ defineComponent({
|
|
|
79703
80314
|
arrayDataType: "",
|
|
79704
80315
|
componentGroup: "Form",
|
|
79705
80316
|
componentTypeName: "",
|
|
79706
|
-
componentTypeLabel: "
|
|
80317
|
+
componentTypeLabel: "对象表单",
|
|
79707
80318
|
componentName: "",
|
|
79708
80319
|
componentType: "",
|
|
79709
80320
|
formItem: true,
|
|
@@ -79722,14 +80333,14 @@ const _sfc_main$t = /* @__PURE__ */ defineComponent({
|
|
|
79722
80333
|
},
|
|
79723
80334
|
{
|
|
79724
80335
|
keyID: "id_" + utils.randomNumber().toString(),
|
|
79725
|
-
keyName: "
|
|
80336
|
+
keyName: "数组",
|
|
79726
80337
|
keyCode: "key_" + utils.randomNumber().toString(),
|
|
79727
80338
|
children: [],
|
|
79728
80339
|
dataType: (_b = currDynamicDataType.value.find((cele) => cele.type == "Array")) == null ? void 0 : _b.value,
|
|
79729
80340
|
dataTypeName: "Array",
|
|
79730
80341
|
componentGroup: "Form",
|
|
79731
80342
|
componentTypeName: "",
|
|
79732
|
-
componentTypeLabel: "
|
|
80343
|
+
componentTypeLabel: "数组",
|
|
79733
80344
|
componentName: "",
|
|
79734
80345
|
componentType: "",
|
|
79735
80346
|
arrayDataTypeName: "",
|
|
@@ -80364,8 +80975,46 @@ const _sfc_main$t = /* @__PURE__ */ defineComponent({
|
|
|
80364
80975
|
const parentSiblings = ((parentCtx == null ? void 0 : parentCtx.siblings) || []).filter(isFormField).map(toFieldItem);
|
|
80365
80976
|
const parentSelf = isFormField(ctx.parent) ? [toFieldItem(ctx.parent)] : [];
|
|
80366
80977
|
return [...parentSelf, ...parentSiblings];
|
|
80978
|
+
},
|
|
80979
|
+
triggerAiGenerate: (targetNode) => handleAiGenerate(targetNode),
|
|
80980
|
+
get aiUrl() {
|
|
80981
|
+
return props2.aiUrl;
|
|
80982
|
+
}
|
|
80983
|
+
});
|
|
80984
|
+
const aiPrompt = ref("");
|
|
80985
|
+
const aiGenerating = ref(false);
|
|
80986
|
+
const showAiDialog = ref(false);
|
|
80987
|
+
const aiTargetNode = ref(null);
|
|
80988
|
+
function handleAiGenerate(targetNode) {
|
|
80989
|
+
aiTargetNode.value = targetNode;
|
|
80990
|
+
showAiDialog.value = true;
|
|
80991
|
+
}
|
|
80992
|
+
async function confirmAiGenerate() {
|
|
80993
|
+
if (!aiPrompt.value.trim()) return;
|
|
80994
|
+
aiGenerating.value = true;
|
|
80995
|
+
try {
|
|
80996
|
+
const nodes = await callAI(props2.aiUrl, aiPrompt.value, {
|
|
80997
|
+
systemPrompt: props2.aiSystemPrompt,
|
|
80998
|
+
buildRequest: props2.aiBuildRequest,
|
|
80999
|
+
pickResponse: props2.aiPickResponse
|
|
81000
|
+
});
|
|
81001
|
+
const processed = dynamicHandler.compatibleVersion(nodes);
|
|
81002
|
+
dynamicHandler.initConfig(processed);
|
|
81003
|
+
dynamicHandler.initConfigType(processed);
|
|
81004
|
+
if (aiTargetNode.value) {
|
|
81005
|
+
aiTargetNode.value.children.push(...processed);
|
|
81006
|
+
} else {
|
|
81007
|
+
renderData.value.length = 0;
|
|
81008
|
+
renderData.value.push(...processed);
|
|
81009
|
+
}
|
|
81010
|
+
showAiDialog.value = false;
|
|
81011
|
+
aiPrompt.value = "";
|
|
81012
|
+
} catch (e) {
|
|
81013
|
+
ProxyElsMessage.error("AI 生成失败,请检查接口地址或重试");
|
|
81014
|
+
} finally {
|
|
81015
|
+
aiGenerating.value = false;
|
|
80367
81016
|
}
|
|
80368
|
-
}
|
|
81017
|
+
}
|
|
80369
81018
|
function handleMenuCommand(menu) {
|
|
80370
81019
|
if (menu.Action === "copy") {
|
|
80371
81020
|
handleCopyNode();
|
|
@@ -80398,6 +81047,7 @@ const _sfc_main$t = /* @__PURE__ */ defineComponent({
|
|
|
80398
81047
|
const _component_el_icon = resolveComponent("el-icon");
|
|
80399
81048
|
const _component_el_link = resolveComponent("el-link");
|
|
80400
81049
|
const _component_Delete = resolveComponent("Delete");
|
|
81050
|
+
const _component_MagicStick = resolveComponent("MagicStick");
|
|
80401
81051
|
const _component_ElsJsonEditor = resolveComponent("ElsJsonEditor");
|
|
80402
81052
|
const _component_els_data_modal = resolveComponent("els-data-modal");
|
|
80403
81053
|
const _component_View = resolveComponent("View");
|
|
@@ -80414,6 +81064,8 @@ const _sfc_main$t = /* @__PURE__ */ defineComponent({
|
|
|
80414
81064
|
const _component_ElsJsonViewer = resolveComponent("ElsJsonViewer");
|
|
80415
81065
|
const _component_els_dialog = resolveComponent("els-dialog");
|
|
80416
81066
|
const _component_els_menu_context = resolveComponent("els-menu-context");
|
|
81067
|
+
const _component_el_input = resolveComponent("el-input");
|
|
81068
|
+
const _component_el_dialog = resolveComponent("el-dialog");
|
|
80417
81069
|
return openBlock(), createElementBlock(Fragment$1, null, [
|
|
80418
81070
|
createElementVNode("div", mergeProps({
|
|
80419
81071
|
ref_key: "designer",
|
|
@@ -80761,13 +81413,13 @@ const _sfc_main$t = /* @__PURE__ */ defineComponent({
|
|
|
80761
81413
|
}, {
|
|
80762
81414
|
default: withCtx(() => [
|
|
80763
81415
|
createVNode(_component_els_option, null, {
|
|
80764
|
-
default: withCtx(() => [..._cache[
|
|
81416
|
+
default: withCtx(() => [..._cache[25] || (_cache[25] = [
|
|
80765
81417
|
createTextVNode("PC", -1)
|
|
80766
81418
|
])]),
|
|
80767
81419
|
_: 1
|
|
80768
81420
|
}),
|
|
80769
81421
|
createVNode(_component_els_option, null, {
|
|
80770
|
-
default: withCtx(() => [..._cache[
|
|
81422
|
+
default: withCtx(() => [..._cache[26] || (_cache[26] = [
|
|
80771
81423
|
createTextVNode("H5", -1)
|
|
80772
81424
|
])]),
|
|
80773
81425
|
_: 1
|
|
@@ -80789,7 +81441,7 @@ const _sfc_main$t = /* @__PURE__ */ defineComponent({
|
|
|
80789
81441
|
]),
|
|
80790
81442
|
_: 1
|
|
80791
81443
|
}),
|
|
80792
|
-
_cache[
|
|
81444
|
+
_cache[27] || (_cache[27] = createTextVNode("返回 ", -1))
|
|
80793
81445
|
]),
|
|
80794
81446
|
_: 1
|
|
80795
81447
|
})) : createCommentVNode("", true),
|
|
@@ -80805,12 +81457,28 @@ const _sfc_main$t = /* @__PURE__ */ defineComponent({
|
|
|
80805
81457
|
]),
|
|
80806
81458
|
_: 1
|
|
80807
81459
|
}),
|
|
80808
|
-
_cache[
|
|
81460
|
+
_cache[28] || (_cache[28] = createTextVNode("清空 ", -1))
|
|
80809
81461
|
]),
|
|
80810
81462
|
_: 1
|
|
80811
81463
|
})) : createCommentVNode("", true),
|
|
80812
|
-
!_ctx.toolbar || _ctx.toolbar.includes("
|
|
81464
|
+
props2.aiUrl && (!_ctx.toolbar || _ctx.toolbar.includes("ai")) ? (openBlock(), createBlock(_component_el_link, {
|
|
80813
81465
|
key: 2,
|
|
81466
|
+
type: "primary",
|
|
81467
|
+
onClick: _cache[3] || (_cache[3] = ($event) => handleAiGenerate(null))
|
|
81468
|
+
}, {
|
|
81469
|
+
default: withCtx(() => [
|
|
81470
|
+
createVNode(_component_el_icon, null, {
|
|
81471
|
+
default: withCtx(() => [
|
|
81472
|
+
createVNode(_component_MagicStick)
|
|
81473
|
+
]),
|
|
81474
|
+
_: 1
|
|
81475
|
+
}),
|
|
81476
|
+
_cache[29] || (_cache[29] = createTextVNode("AI生成 ", -1))
|
|
81477
|
+
]),
|
|
81478
|
+
_: 1
|
|
81479
|
+
})) : createCommentVNode("", true),
|
|
81480
|
+
!_ctx.toolbar || _ctx.toolbar.includes("import") ? (openBlock(), createBlock(_component_els_data_modal, {
|
|
81481
|
+
key: 3,
|
|
80814
81482
|
title: "导入配置",
|
|
80815
81483
|
open: handleOpenImport,
|
|
80816
81484
|
componentName: "el-link",
|
|
@@ -80823,16 +81491,16 @@ const _sfc_main$t = /* @__PURE__ */ defineComponent({
|
|
|
80823
81491
|
default: withCtx(() => [
|
|
80824
81492
|
createVNode(_component_ElsJsonEditor, {
|
|
80825
81493
|
modelValue: importJSON.value,
|
|
80826
|
-
"onUpdate:modelValue": _cache[
|
|
81494
|
+
"onUpdate:modelValue": _cache[4] || (_cache[4] = ($event) => importJSON.value = $event),
|
|
80827
81495
|
style: { "height": "500px" }
|
|
80828
81496
|
}, null, 8, ["modelValue"])
|
|
80829
81497
|
]),
|
|
80830
81498
|
_: 1
|
|
80831
81499
|
})) : createCommentVNode("", true),
|
|
80832
81500
|
!_ctx.toolbar || _ctx.toolbar.includes("preview") ? (openBlock(), createBlock(_component_el_link, {
|
|
80833
|
-
key:
|
|
81501
|
+
key: 4,
|
|
80834
81502
|
type: "primary",
|
|
80835
|
-
onClick: _cache[
|
|
81503
|
+
onClick: _cache[5] || (_cache[5] = ($event) => viewPriview.value = !viewPriview.value)
|
|
80836
81504
|
}, {
|
|
80837
81505
|
default: withCtx(() => [
|
|
80838
81506
|
createVNode(_component_el_icon, null, {
|
|
@@ -80841,12 +81509,12 @@ const _sfc_main$t = /* @__PURE__ */ defineComponent({
|
|
|
80841
81509
|
]),
|
|
80842
81510
|
_: 1
|
|
80843
81511
|
}),
|
|
80844
|
-
_cache[
|
|
81512
|
+
_cache[30] || (_cache[30] = createTextVNode("预览 ", -1))
|
|
80845
81513
|
]),
|
|
80846
81514
|
_: 1
|
|
80847
81515
|
})) : createCommentVNode("", true),
|
|
80848
81516
|
_ctx.onSave && (!_ctx.toolbar || _ctx.toolbar.includes("save")) ? (openBlock(), createBlock(_component_el_link, {
|
|
80849
|
-
key:
|
|
81517
|
+
key: 5,
|
|
80850
81518
|
type: "primary",
|
|
80851
81519
|
onClick: handleSave
|
|
80852
81520
|
}, {
|
|
@@ -80857,7 +81525,7 @@ const _sfc_main$t = /* @__PURE__ */ defineComponent({
|
|
|
80857
81525
|
]),
|
|
80858
81526
|
_: 1
|
|
80859
81527
|
}),
|
|
80860
|
-
_cache[
|
|
81528
|
+
_cache[31] || (_cache[31] = createTextVNode("保存 ", -1))
|
|
80861
81529
|
]),
|
|
80862
81530
|
_: 1
|
|
80863
81531
|
})) : createCommentVNode("", true)
|
|
@@ -80886,15 +81554,15 @@ const _sfc_main$t = /* @__PURE__ */ defineComponent({
|
|
|
80886
81554
|
})
|
|
80887
81555
|
]),
|
|
80888
81556
|
createElementVNode("div", _hoisted_15$2, [
|
|
80889
|
-
_cache[
|
|
81557
|
+
_cache[33] || (_cache[33] = createElementVNode("div", null, "页面已有Form表单", -1)),
|
|
80890
81558
|
createElementVNode("div", null, [
|
|
80891
81559
|
createVNode(_component_el_button, {
|
|
80892
81560
|
type: "info",
|
|
80893
|
-
onClick: _cache[
|
|
81561
|
+
onClick: _cache[6] || (_cache[6] = ($event) => {
|
|
80894
81562
|
startCreate.value = true;
|
|
80895
81563
|
})
|
|
80896
81564
|
}, {
|
|
80897
|
-
default: withCtx(() => [..._cache[
|
|
81565
|
+
default: withCtx(() => [..._cache[32] || (_cache[32] = [
|
|
80898
81566
|
createTextVNode("直接进入", -1)
|
|
80899
81567
|
])]),
|
|
80900
81568
|
_: 1
|
|
@@ -80915,13 +81583,13 @@ const _sfc_main$t = /* @__PURE__ */ defineComponent({
|
|
|
80915
81583
|
})
|
|
80916
81584
|
]),
|
|
80917
81585
|
createElementVNode("div", _hoisted_17$1, [
|
|
80918
|
-
_cache[
|
|
81586
|
+
_cache[35] || (_cache[35] = createElementVNode("div", null, " 没有Form表单创建一个 ", -1)),
|
|
80919
81587
|
createElementVNode("div", null, [
|
|
80920
81588
|
createVNode(_component_el_button, {
|
|
80921
81589
|
type: "primary",
|
|
80922
81590
|
onClick: createRootForm
|
|
80923
81591
|
}, {
|
|
80924
|
-
default: withCtx(() => [..._cache[
|
|
81592
|
+
default: withCtx(() => [..._cache[34] || (_cache[34] = [
|
|
80925
81593
|
createTextVNode("创建表单", -1)
|
|
80926
81594
|
])]),
|
|
80927
81595
|
_: 1
|
|
@@ -80934,17 +81602,17 @@ const _sfc_main$t = /* @__PURE__ */ defineComponent({
|
|
|
80934
81602
|
])
|
|
80935
81603
|
])
|
|
80936
81604
|
])) : (openBlock(), createElementBlock("div", _hoisted_18$1, [
|
|
80937
|
-
deviceType.value == "H5" ? (openBlock(), createBlock(
|
|
81605
|
+
deviceType.value == "H5" ? (openBlock(), createBlock(DynamicDesignerViewBody, {
|
|
80938
81606
|
key: 0,
|
|
80939
81607
|
isMobile: true,
|
|
80940
81608
|
renderData: renderData.value
|
|
80941
|
-
}, null, 8, ["renderData"])) : (openBlock(), createBlock(
|
|
81609
|
+
}, null, 8, ["renderData"])) : (openBlock(), createBlock(DynamicDesignerViewBody, {
|
|
80942
81610
|
key: 1,
|
|
80943
81611
|
type: deviceType.value,
|
|
80944
81612
|
renderData: renderData.value
|
|
80945
81613
|
}, null, 8, ["type", "renderData"])),
|
|
80946
81614
|
!renderData.value.length || renderData.value.length && renderData.value[0].componentType === "Form" && !renderData.value[0].children.length ? (openBlock(), createBlock(_component_el_empty, { key: 2 }, {
|
|
80947
|
-
description: withCtx(() => [..._cache[
|
|
81615
|
+
description: withCtx(() => [..._cache[36] || (_cache[36] = [
|
|
80948
81616
|
createTextVNode("请点击拖动", -1),
|
|
80949
81617
|
createElementVNode("span", { class: "txt-red" }, "左侧", -1),
|
|
80950
81618
|
createTextVNode("组件到此处", -1)
|
|
@@ -80960,7 +81628,7 @@ const _sfc_main$t = /* @__PURE__ */ defineComponent({
|
|
|
80960
81628
|
key: 0,
|
|
80961
81629
|
stretch: "",
|
|
80962
81630
|
modelValue: selectProperty.value,
|
|
80963
|
-
"onUpdate:modelValue": _cache[
|
|
81631
|
+
"onUpdate:modelValue": _cache[12] || (_cache[12] = ($event) => selectProperty.value = $event)
|
|
80964
81632
|
}, {
|
|
80965
81633
|
default: withCtx(() => [
|
|
80966
81634
|
!_ctx.rightToolbar || _ctx.rightToolbar.includes("base") ? (openBlock(), createBlock(_component_el_tab_pane, {
|
|
@@ -80995,7 +81663,7 @@ const _sfc_main$t = /* @__PURE__ */ defineComponent({
|
|
|
80995
81663
|
default: withCtx(() => [
|
|
80996
81664
|
createVNode(DynamicRenderAsync, {
|
|
80997
81665
|
modelValue: currSelectItem.value.config.baseConfig,
|
|
80998
|
-
"onUpdate:modelValue": _cache[
|
|
81666
|
+
"onUpdate:modelValue": _cache[7] || (_cache[7] = ($event) => currSelectItem.value.config.baseConfig = $event),
|
|
80999
81667
|
globalData: currSelectItem.value,
|
|
81000
81668
|
defaultValueConfig: { "Number": void 0, "Bool": void 0 },
|
|
81001
81669
|
isMobile: false,
|
|
@@ -81022,7 +81690,7 @@ const _sfc_main$t = /* @__PURE__ */ defineComponent({
|
|
|
81022
81690
|
default: withCtx(() => [
|
|
81023
81691
|
createVNode(DynamicRenderAsync, {
|
|
81024
81692
|
modelValue: currSelectItem.value.config.arrayConfig,
|
|
81025
|
-
"onUpdate:modelValue": _cache[
|
|
81693
|
+
"onUpdate:modelValue": _cache[8] || (_cache[8] = ($event) => currSelectItem.value.config.arrayConfig = $event),
|
|
81026
81694
|
defaultValueConfig: { "Number": void 0, "Bool": void 0 },
|
|
81027
81695
|
isMobile: false,
|
|
81028
81696
|
config: unref(property_array),
|
|
@@ -81047,7 +81715,7 @@ const _sfc_main$t = /* @__PURE__ */ defineComponent({
|
|
|
81047
81715
|
default: withCtx(() => [
|
|
81048
81716
|
createVNode(DynamicRenderAsync, {
|
|
81049
81717
|
modelValue: currSelectItem.value.config.formConfig,
|
|
81050
|
-
"onUpdate:modelValue": _cache[
|
|
81718
|
+
"onUpdate:modelValue": _cache[9] || (_cache[9] = ($event) => currSelectItem.value.config.formConfig = $event),
|
|
81051
81719
|
defaultValueConfig: { "Number": void 0, "Bool": void 0 },
|
|
81052
81720
|
isMobile: false,
|
|
81053
81721
|
config: unref(property_formItem),
|
|
@@ -81073,12 +81741,12 @@ const _sfc_main$t = /* @__PURE__ */ defineComponent({
|
|
|
81073
81741
|
default: withCtx(() => [
|
|
81074
81742
|
createVNode(SpacingEditor, {
|
|
81075
81743
|
modelValue: currSelectItem.value.config.advancedConfig,
|
|
81076
|
-
"onUpdate:modelValue": _cache[
|
|
81744
|
+
"onUpdate:modelValue": _cache[10] || (_cache[10] = ($event) => currSelectItem.value.config.advancedConfig = $event)
|
|
81077
81745
|
}, null, 8, ["modelValue"]),
|
|
81078
81746
|
createVNode(_component_el_divider, { style: { "margin": "4px 0 8px" } }),
|
|
81079
81747
|
createVNode(DynamicRenderAsync, {
|
|
81080
81748
|
modelValue: currSelectItem.value.config.advancedConfig,
|
|
81081
|
-
"onUpdate:modelValue": _cache[
|
|
81749
|
+
"onUpdate:modelValue": _cache[11] || (_cache[11] = (v) => Object.assign(currSelectItem.value.config.advancedConfig, v)),
|
|
81082
81750
|
isMobile: false,
|
|
81083
81751
|
config: unref(property_advanced),
|
|
81084
81752
|
appendComponentTypes: conditionBuilderTypes,
|
|
@@ -81104,10 +81772,10 @@ const _sfc_main$t = /* @__PURE__ */ defineComponent({
|
|
|
81104
81772
|
], 16),
|
|
81105
81773
|
createVNode(_component_els_dialog, {
|
|
81106
81774
|
modelValue: viewPriview.value,
|
|
81107
|
-
"onUpdate:modelValue": _cache[
|
|
81775
|
+
"onUpdate:modelValue": _cache[19] || (_cache[19] = ($event) => viewPriview.value = $event),
|
|
81108
81776
|
class: "preview-dialog",
|
|
81109
81777
|
"destroy-on-close": "",
|
|
81110
|
-
onClose: _cache[
|
|
81778
|
+
onClose: _cache[20] || (_cache[20] = ($event) => {
|
|
81111
81779
|
formValue.value = {};
|
|
81112
81780
|
}),
|
|
81113
81781
|
width: deviceType.value == "PC" ? "1300" : "500px",
|
|
@@ -81117,11 +81785,11 @@ const _sfc_main$t = /* @__PURE__ */ defineComponent({
|
|
|
81117
81785
|
}, {
|
|
81118
81786
|
header: withCtx(() => [
|
|
81119
81787
|
createElementVNode("div", _hoisted_20$1, [
|
|
81120
|
-
_cache[
|
|
81788
|
+
_cache[39] || (_cache[39] = createElementVNode("div", null, null, -1)),
|
|
81121
81789
|
createElementVNode("div", _hoisted_21$1, [
|
|
81122
81790
|
createElementVNode("div", {
|
|
81123
81791
|
class: normalizeClass(["tab-item", { active: previewTab.value === "preview" }]),
|
|
81124
|
-
onClick: _cache[
|
|
81792
|
+
onClick: _cache[13] || (_cache[13] = ($event) => previewTab.value = "preview")
|
|
81125
81793
|
}, [
|
|
81126
81794
|
createVNode(_component_el_icon, null, {
|
|
81127
81795
|
default: withCtx(() => [
|
|
@@ -81129,11 +81797,11 @@ const _sfc_main$t = /* @__PURE__ */ defineComponent({
|
|
|
81129
81797
|
]),
|
|
81130
81798
|
_: 1
|
|
81131
81799
|
}),
|
|
81132
|
-
_cache[
|
|
81800
|
+
_cache[37] || (_cache[37] = createTextVNode(" 效果预览 ", -1))
|
|
81133
81801
|
], 2),
|
|
81134
81802
|
createElementVNode("div", {
|
|
81135
81803
|
class: normalizeClass(["tab-item", { active: previewTab.value === "properties" }]),
|
|
81136
|
-
onClick: _cache[
|
|
81804
|
+
onClick: _cache[14] || (_cache[14] = ($event) => previewTab.value = "properties")
|
|
81137
81805
|
}, [
|
|
81138
81806
|
createVNode(_component_el_icon, null, {
|
|
81139
81807
|
default: withCtx(() => [
|
|
@@ -81141,10 +81809,10 @@ const _sfc_main$t = /* @__PURE__ */ defineComponent({
|
|
|
81141
81809
|
]),
|
|
81142
81810
|
_: 1
|
|
81143
81811
|
}),
|
|
81144
|
-
_cache[
|
|
81812
|
+
_cache[38] || (_cache[38] = createTextVNode(" 数据模型 ", -1))
|
|
81145
81813
|
], 2)
|
|
81146
81814
|
]),
|
|
81147
|
-
_cache[
|
|
81815
|
+
_cache[40] || (_cache[40] = createElementVNode("div", { class: "header-actions" }, null, -1))
|
|
81148
81816
|
])
|
|
81149
81817
|
]),
|
|
81150
81818
|
default: withCtx(() => [
|
|
@@ -81155,8 +81823,8 @@ const _sfc_main$t = /* @__PURE__ */ defineComponent({
|
|
|
81155
81823
|
withDirectives(createElementVNode("div", _hoisted_23, [
|
|
81156
81824
|
deviceType.value === "H5" ? (openBlock(), createElementBlock("div", _hoisted_24, [
|
|
81157
81825
|
createElementVNode("div", _hoisted_25, [
|
|
81158
|
-
_cache[
|
|
81159
|
-
_cache[
|
|
81826
|
+
_cache[41] || (_cache[41] = createElementVNode("span", { class: "time" }, "10:40", -1)),
|
|
81827
|
+
_cache[42] || (_cache[42] = createElementVNode("div", { class: "camera" }, null, -1)),
|
|
81160
81828
|
createElementVNode("div", _hoisted_26, [
|
|
81161
81829
|
createVNode(_component_el_icon, null, {
|
|
81162
81830
|
default: withCtx(() => [
|
|
@@ -81177,9 +81845,9 @@ const _sfc_main$t = /* @__PURE__ */ defineComponent({
|
|
|
81177
81845
|
default: withCtx(() => [
|
|
81178
81846
|
createVNode(DynamicRender, {
|
|
81179
81847
|
modelValue: formValue.value,
|
|
81180
|
-
"onUpdate:modelValue": _cache[
|
|
81848
|
+
"onUpdate:modelValue": _cache[15] || (_cache[15] = ($event) => formValue.value = $event),
|
|
81181
81849
|
"label-value": labelValue.value,
|
|
81182
|
-
"onUpdate:labelValue": _cache[
|
|
81850
|
+
"onUpdate:labelValue": _cache[16] || (_cache[16] = ($event) => labelValue.value = $event),
|
|
81183
81851
|
defaultValueConfig: { "Number": void 0, "Bool": void 0 },
|
|
81184
81852
|
config: renderData.value,
|
|
81185
81853
|
isMobile: true
|
|
@@ -81188,7 +81856,7 @@ const _sfc_main$t = /* @__PURE__ */ defineComponent({
|
|
|
81188
81856
|
_: 1
|
|
81189
81857
|
})
|
|
81190
81858
|
]),
|
|
81191
|
-
_cache[
|
|
81859
|
+
_cache[43] || (_cache[43] = createElementVNode("div", { class: "mobile-home-bar" }, null, -1))
|
|
81192
81860
|
])) : (openBlock(), createElementBlock("div", _hoisted_28, [
|
|
81193
81861
|
createElementVNode("div", _hoisted_29, [
|
|
81194
81862
|
createVNode(_component_el_scrollbar, null, {
|
|
@@ -81196,9 +81864,9 @@ const _sfc_main$t = /* @__PURE__ */ defineComponent({
|
|
|
81196
81864
|
createElementVNode("div", _hoisted_30, [
|
|
81197
81865
|
createVNode(DynamicRender, {
|
|
81198
81866
|
modelValue: formValue.value,
|
|
81199
|
-
"onUpdate:modelValue": _cache[
|
|
81867
|
+
"onUpdate:modelValue": _cache[17] || (_cache[17] = ($event) => formValue.value = $event),
|
|
81200
81868
|
"label-value": labelValue.value,
|
|
81201
|
-
"onUpdate:labelValue": _cache[
|
|
81869
|
+
"onUpdate:labelValue": _cache[18] || (_cache[18] = ($event) => labelValue.value = $event),
|
|
81202
81870
|
defaultValueConfig: { "Number": void 0, "Bool": void 0 },
|
|
81203
81871
|
config: renderData.value,
|
|
81204
81872
|
isMobile: false
|
|
@@ -81234,16 +81902,55 @@ const _sfc_main$t = /* @__PURE__ */ defineComponent({
|
|
|
81234
81902
|
ref: "contentMenu",
|
|
81235
81903
|
data: unref(contextMenus),
|
|
81236
81904
|
modelValue: unref(contextMenuVisible),
|
|
81237
|
-
"onUpdate:modelValue": _cache[
|
|
81905
|
+
"onUpdate:modelValue": _cache[21] || (_cache[21] = ($event) => isRef(contextMenuVisible) ? contextMenuVisible.value = $event : contextMenuVisible = $event),
|
|
81238
81906
|
positionLeft: unref(contextMenuPositionLeft),
|
|
81239
81907
|
positionTop: unref(contextMenuPositionTop),
|
|
81240
81908
|
onClick: handleMenuCommand
|
|
81241
|
-
}, null, 8, ["data", "modelValue", "positionLeft", "positionTop"])
|
|
81909
|
+
}, null, 8, ["data", "modelValue", "positionLeft", "positionTop"]),
|
|
81910
|
+
createVNode(_component_el_dialog, {
|
|
81911
|
+
modelValue: showAiDialog.value,
|
|
81912
|
+
"onUpdate:modelValue": _cache[24] || (_cache[24] = ($event) => showAiDialog.value = $event),
|
|
81913
|
+
title: "AI 生成表单",
|
|
81914
|
+
width: "500px",
|
|
81915
|
+
"close-on-click-modal": false,
|
|
81916
|
+
"append-to-body": ""
|
|
81917
|
+
}, {
|
|
81918
|
+
footer: withCtx(() => [
|
|
81919
|
+
createVNode(_component_el_button, {
|
|
81920
|
+
onClick: _cache[23] || (_cache[23] = ($event) => showAiDialog.value = false)
|
|
81921
|
+
}, {
|
|
81922
|
+
default: withCtx(() => [..._cache[44] || (_cache[44] = [
|
|
81923
|
+
createTextVNode("取消", -1)
|
|
81924
|
+
])]),
|
|
81925
|
+
_: 1
|
|
81926
|
+
}),
|
|
81927
|
+
createVNode(_component_el_button, {
|
|
81928
|
+
type: "primary",
|
|
81929
|
+
loading: aiGenerating.value,
|
|
81930
|
+
onClick: confirmAiGenerate
|
|
81931
|
+
}, {
|
|
81932
|
+
default: withCtx(() => [..._cache[45] || (_cache[45] = [
|
|
81933
|
+
createTextVNode("生成", -1)
|
|
81934
|
+
])]),
|
|
81935
|
+
_: 1
|
|
81936
|
+
}, 8, ["loading"])
|
|
81937
|
+
]),
|
|
81938
|
+
default: withCtx(() => [
|
|
81939
|
+
createVNode(_component_el_input, {
|
|
81940
|
+
modelValue: aiPrompt.value,
|
|
81941
|
+
"onUpdate:modelValue": _cache[22] || (_cache[22] = ($event) => aiPrompt.value = $event),
|
|
81942
|
+
type: "textarea",
|
|
81943
|
+
rows: 5,
|
|
81944
|
+
placeholder: "描述要生成的表单,例如:用户注册表单,包含姓名、手机号、邮箱、密码字段,其中手机号和邮箱必填"
|
|
81945
|
+
}, null, 8, ["modelValue"])
|
|
81946
|
+
]),
|
|
81947
|
+
_: 1
|
|
81948
|
+
}, 8, ["modelValue"])
|
|
81242
81949
|
], 64);
|
|
81243
81950
|
};
|
|
81244
81951
|
}
|
|
81245
81952
|
});
|
|
81246
|
-
const DesignerView = /* @__PURE__ */ _export_sfc$1(_sfc_main$t, [["__scopeId", "data-v-
|
|
81953
|
+
const DesignerView = /* @__PURE__ */ _export_sfc$1(_sfc_main$t, [["__scopeId", "data-v-4d6c4873"]]);
|
|
81247
81954
|
const ElsDesignerView = withInstall$1(DesignerView);
|
|
81248
81955
|
(function(Prism2) {
|
|
81249
81956
|
var string = /(?:"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"|'(?:\\(?:\r\n|[\s\S])|[^'\\\r\n])*')/;
|
|
@@ -81982,31 +82689,31 @@ let AceEditor$1 = class AceEditor extends TBaseFormItem {
|
|
|
81982
82689
|
__publicField(this, "editor", ref());
|
|
81983
82690
|
onMounted(() => {
|
|
81984
82691
|
if (props2.language === "json") {
|
|
81985
|
-
const currModule = import("./mode-json-
|
|
82692
|
+
const currModule = import("./mode-json-DvMBn-gb.js").then((n) => n.m);
|
|
81986
82693
|
currModule.then((res) => {
|
|
81987
82694
|
ace.config.setModuleUrl("ace/mode/json", res);
|
|
81988
82695
|
this.init();
|
|
81989
82696
|
});
|
|
81990
82697
|
} else if (props2.language === "javascript") {
|
|
81991
|
-
const currModule = import("./mode-javascript-
|
|
82698
|
+
const currModule = import("./mode-javascript-BA7c9L6f.js").then((n) => n.m);
|
|
81992
82699
|
currModule.then((res) => {
|
|
81993
82700
|
ace.config.setModuleUrl("ace/mode/javascript", res);
|
|
81994
82701
|
this.init();
|
|
81995
82702
|
});
|
|
81996
82703
|
} else if (props2.language === "csharp") {
|
|
81997
|
-
const currModule = import("./mode-csharp-
|
|
82704
|
+
const currModule = import("./mode-csharp-ujSwp4Ss.js").then((n) => n.m);
|
|
81998
82705
|
currModule.then((res) => {
|
|
81999
82706
|
ace.config.setModuleUrl("ace/mode/csharp", res);
|
|
82000
82707
|
this.init();
|
|
82001
82708
|
});
|
|
82002
82709
|
} else if (props2.language === "mysql") {
|
|
82003
|
-
const currModule = import("./mode-mysql-
|
|
82710
|
+
const currModule = import("./mode-mysql-68NS3DBE.js").then((n) => n.m);
|
|
82004
82711
|
currModule.then((res) => {
|
|
82005
82712
|
ace.config.setModuleUrl("ace/mode/mysql", res);
|
|
82006
82713
|
this.init();
|
|
82007
82714
|
});
|
|
82008
82715
|
} else if (props2.language === "css") {
|
|
82009
|
-
const currModule = import("./mode-css-
|
|
82716
|
+
const currModule = import("./mode-css-BE9lm-IQ.js").then((n) => n.m);
|
|
82010
82717
|
currModule.then((res) => {
|
|
82011
82718
|
ace.config.setModuleUrl("ace/mode/css", res);
|
|
82012
82719
|
this.init();
|
|
@@ -82141,7 +82848,7 @@ class MdEditor extends TBaseFormItem {
|
|
|
82141
82848
|
__publicField(this, "uploadImg", async (files, callback) => {
|
|
82142
82849
|
const apiConfig = utils.getApiConfig();
|
|
82143
82850
|
const {
|
|
82144
|
-
$dataField,
|
|
82851
|
+
$dataField: $dataField2,
|
|
82145
82852
|
$pathField
|
|
82146
82853
|
} = utils.getUploadConfig();
|
|
82147
82854
|
const urls = await Promise.all(files.map((file) => {
|
|
@@ -82153,7 +82860,7 @@ class MdEditor extends TBaseFormItem {
|
|
|
82153
82860
|
return "";
|
|
82154
82861
|
}
|
|
82155
82862
|
let currRes = res[apiConfig.$dataField];
|
|
82156
|
-
if ($
|
|
82863
|
+
if ($dataField2) currRes = currRes[$dataField2];
|
|
82157
82864
|
return currRes[$pathField] ?? "";
|
|
82158
82865
|
});
|
|
82159
82866
|
}));
|
|
@@ -82464,12 +83171,12 @@ let WangEditor$1 = class WangEditor extends TBaseFormItem {
|
|
|
82464
83171
|
this.serverUrl.value = this.serverUrl.value.addUrlParameter("ResourceCode", props2.resourceCode).addUrlParameter("RestrictCode", props2.restrictCode);
|
|
82465
83172
|
}
|
|
82466
83173
|
const {
|
|
82467
|
-
$codeField,
|
|
82468
|
-
$success,
|
|
83174
|
+
$codeField: $codeField2,
|
|
83175
|
+
$success: $success2,
|
|
82469
83176
|
$dataField: apiDataField
|
|
82470
83177
|
} = utils.getApiConfig();
|
|
82471
83178
|
const {
|
|
82472
|
-
$dataField,
|
|
83179
|
+
$dataField: $dataField2,
|
|
82473
83180
|
$pathField
|
|
82474
83181
|
} = utils.getUploadConfig();
|
|
82475
83182
|
this.editorConfig.value = {
|
|
@@ -82498,8 +83205,8 @@ let WangEditor$1 = class WangEditor extends TBaseFormItem {
|
|
|
82498
83205
|
console.log(`${file.name} 上传出错`, err, res);
|
|
82499
83206
|
},
|
|
82500
83207
|
customInsert(res, insertFn) {
|
|
82501
|
-
if (res[$
|
|
82502
|
-
insertFn(res[apiDataField][$
|
|
83208
|
+
if (res[$codeField2] === $success2) {
|
|
83209
|
+
insertFn(res[apiDataField][$dataField2][$pathField], "");
|
|
82503
83210
|
}
|
|
82504
83211
|
}
|
|
82505
83212
|
}
|
|
@@ -84364,7 +85071,7 @@ const _sfc_main$i = /* @__PURE__ */ defineComponent({
|
|
|
84364
85071
|
aindex: {}
|
|
84365
85072
|
},
|
|
84366
85073
|
setup(__props) {
|
|
84367
|
-
const { $dataField } = utils.getApiConfig();
|
|
85074
|
+
const { $dataField: $dataField2 } = utils.getApiConfig();
|
|
84368
85075
|
const props2 = __props;
|
|
84369
85076
|
const { getValue: getValue2 } = useProps(props2);
|
|
84370
85077
|
const formValidate = ref(true);
|
|
@@ -84413,8 +85120,8 @@ const _sfc_main$i = /* @__PURE__ */ defineComponent({
|
|
|
84413
85120
|
}
|
|
84414
85121
|
if (currInputs.AssignedPrincipal) {
|
|
84415
85122
|
userUrl.post({ idString: currInputs.AssignedPrincipal }).then((res) => {
|
|
84416
|
-
if (res[$
|
|
84417
|
-
currInputs.AssignedPrincipal = res[$
|
|
85123
|
+
if (res[$dataField2]) {
|
|
85124
|
+
currInputs.AssignedPrincipal = res[$dataField2].toString();
|
|
84418
85125
|
itemContent.value = getDynamicAttrContent(props2.item.data.StepType, currInputs);
|
|
84419
85126
|
}
|
|
84420
85127
|
});
|
|
@@ -85065,7 +85772,7 @@ const _sfc_main$f = /* @__PURE__ */ defineComponent({
|
|
|
85065
85772
|
props: workFlowProps,
|
|
85066
85773
|
emits: ["update:modelValue"],
|
|
85067
85774
|
setup(__props, { expose: __expose, emit: __emit }) {
|
|
85068
|
-
const { $codeField, $dataField, $success } = utils.getApiConfig();
|
|
85775
|
+
const { $codeField: $codeField2, $dataField: $dataField2, $success: $success2 } = utils.getApiConfig();
|
|
85069
85776
|
let bgColors = ref(["87, 106, 149", "255, 148, 62", "50, 150, 250"]);
|
|
85070
85777
|
const props2 = __props;
|
|
85071
85778
|
const { setValue } = useProps(props2);
|
|
@@ -85106,9 +85813,9 @@ const _sfc_main$f = /* @__PURE__ */ defineComponent({
|
|
|
85106
85813
|
initLoading.value = true;
|
|
85107
85814
|
if (props2.configUrl) {
|
|
85108
85815
|
props2.configUrl.post({}).then((res) => {
|
|
85109
|
-
if (res[$
|
|
85816
|
+
if (res[$codeField2] == $success2) {
|
|
85110
85817
|
configData.value.length = 0;
|
|
85111
|
-
configData.value.push(...res[$
|
|
85818
|
+
configData.value.push(...res[$dataField2]);
|
|
85112
85819
|
initLoading.value = false;
|
|
85113
85820
|
}
|
|
85114
85821
|
});
|
|
@@ -90583,7 +91290,7 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
|
|
|
90583
91290
|
props: waterFallProps,
|
|
90584
91291
|
emits: ["loadMore", "changePage", "changeSize"],
|
|
90585
91292
|
setup(__props, { expose: __expose, emit: __emit }) {
|
|
90586
|
-
const { $codeField, $messageField, $dataField, $success } = utils.getApiConfig();
|
|
91293
|
+
const { $codeField: $codeField2, $messageField: $messageField2, $dataField: $dataField2, $success: $success2 } = utils.getApiConfig();
|
|
90587
91294
|
const { $pageDataField, $menuField, $pageSizeField, $currentPageField, $totalField, $pageCountField, $avgDayField } = utils.getTableConfig();
|
|
90588
91295
|
const emits2 = __emit;
|
|
90589
91296
|
const props2 = __props;
|
|
@@ -90637,8 +91344,8 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
|
|
|
90637
91344
|
if (props2.nextPageType === "page" || currPageIndex.value === 1) {
|
|
90638
91345
|
wallfallData.value.length = 0;
|
|
90639
91346
|
}
|
|
90640
|
-
if (res[$
|
|
90641
|
-
const dataField = res[$
|
|
91347
|
+
if (res[$codeField2] === $success2) {
|
|
91348
|
+
const dataField = res[$dataField2];
|
|
90642
91349
|
if (dataField[$pageSizeField] !== void 0) {
|
|
90643
91350
|
if (dataField[$pageDataField]) {
|
|
90644
91351
|
wallfallData.value.push(...dataField[$pageDataField]);
|
|
@@ -90664,7 +91371,7 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
|
|
|
90664
91371
|
wallfallData.value = props2.afterReadData(wallfallData.value);
|
|
90665
91372
|
}
|
|
90666
91373
|
} else {
|
|
90667
|
-
ProxyElsMessage.error(res[$
|
|
91374
|
+
ProxyElsMessage.error(res[$messageField2]);
|
|
90668
91375
|
}
|
|
90669
91376
|
remoteLoading.value = false;
|
|
90670
91377
|
resolve2(true);
|