@fecp/designer 5.6.29 → 5.6.31
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es/_virtual/_commonjsHelpers.mjs +25 -0
- package/es/_virtual/index.mjs +4 -4
- package/es/_virtual/index2.mjs +2 -5
- package/es/_virtual/index3.mjs +5 -3
- package/es/_virtual/index4.mjs +5 -2
- package/es/_virtual/index5.mjs +3 -2
- package/es/_virtual/index6.mjs +4 -0
- package/es/_virtual/index7.mjs +4 -0
- package/es/config-dev.js +2 -0
- package/es/designer/package.json.mjs +1 -1
- package/es/designer/src/axios/config.mjs +10 -3
- package/es/designer/src/axios/crypto.mjs +1 -5
- package/es/designer/src/packages/aiForm/AiDiffTable.vue.mjs +152 -0
- package/es/designer/src/packages/aiForm/api.mjs +21 -0
- package/es/designer/src/packages/aiForm/apply.mjs +153 -0
- package/es/designer/src/packages/aiForm/compressConfig.mjs +69 -0
- package/es/designer/src/packages/aiForm/constants.mjs +184 -0
- package/es/designer/src/packages/aiForm/diff.mjs +140 -0
- package/es/designer/src/packages/aiForm/index.vue.mjs +301 -0
- package/es/designer/src/packages/aiForm/normalizeFieldList.mjs +138 -0
- package/es/designer/src/packages/aiForm/parseAiResult.mjs +245 -0
- package/es/designer/src/packages/aiForm/prompt.mjs +130 -0
- package/es/designer/src/packages/aiForm/useAiFormDrawer.mjs +16 -0
- package/es/designer/src/packages/dataSource/dataSource.vue.mjs +45 -30
- package/es/designer/src/packages/form/headerBtn.vue.mjs +4 -1
- package/es/designer/src/packages/form/index.vue.mjs +16 -2
- package/es/designer/src/packages/utils/datasource.mjs +14 -1
- package/es/designer.css +523 -232
- package/es/node_modules/@braintree/sanitize-url/dist/index.mjs +1 -1
- package/es/node_modules/diagram-js/lib/model/index.mjs +1 -1
- package/es/node_modules/element-plus/es/utils/vue/icon.mjs +1 -1
- package/es/node_modules/highlight.js/es/index.mjs +1 -1
- package/es/node_modules/mermaid/dist/chunks/mermaid.core/c4Diagram-LMCZKHZV.mjs +1 -1
- package/es/node_modules/mermaid/dist/chunks/mermaid.core/chunk-32BRIVSS.mjs +1 -1
- package/es/node_modules/mermaid/dist/chunks/mermaid.core/chunk-ICXQ74PX.mjs +1 -1
- package/es/node_modules/mermaid/dist/chunks/mermaid.core/classDiagram-OUVF2IWQ.mjs +1 -1
- package/es/node_modules/mermaid/dist/chunks/mermaid.core/classDiagram-v2-EOCWNBFH.mjs +1 -1
- package/es/node_modules/mermaid/dist/chunks/mermaid.core/flowDiagram-23GEKE2U.mjs +1 -1
- package/es/node_modules/mermaid/dist/chunks/mermaid.core/ganttDiagram-NO4QXBWP.mjs +1 -1
- package/es/node_modules/mermaid/dist/chunks/mermaid.core/sequenceDiagram-DBY2YBRQ.mjs +1 -1
- package/es/node_modules/mermaid/dist/chunks/mermaid.core/stateDiagram-2N3HPSRC.mjs +1 -1
- package/es/node_modules/mermaid/dist/chunks/mermaid.core/stateDiagram-v2-6OUMAXLB.mjs +1 -1
- package/es/node_modules/mermaid/dist/chunks/mermaid.core/swimlanesDiagram-G3AALYLV.mjs +1 -1
- package/es/node_modules/object-refs/index.mjs +1 -1
- package/es/packages/mobile/src/axios/config.mjs +8 -4
- package/es/packages/mobile/src/components/ai/MarkdownRenderer/MarkdownRenderer.vue.mjs +1 -1
- package/es/packages/mobile/src/components/custom/approvalBar/ApprovalBar.vue.mjs +53 -13
- package/es/packages/mobile/src/components/custom/approvalBar/FlowUserSelect.vue.mjs +215 -0
- package/es/packages/mobile/src/components/dataDisplay/cardList/CardList.vue.mjs +19 -15
- package/es/packages/mobile/src/utils/datasource.mjs +14 -1
- package/es/packages/mobile/src/utils/formatterUtil.mjs +24 -12
- package/es/packages/vue/src/components/dialog/DialogRenderer.vue2.mjs +75 -8
- package/es/packages/vue/src/components/dialog/index.mjs +2 -1
- package/es/packages/vue/src/components/forms/form/Form.vue.mjs +10 -49
- package/es/packages/vue/src/components/forms/formItem/FormItem.vue.mjs +2 -12
- package/es/packages/vue/src/components/forms/roleSelect/RoleSelect.vue.mjs +9 -3
- package/es/packages/vue/src/components/forms/userSelect/UserSelect.vue.mjs +9 -3
- package/es/packages/vue/src/components/table/Table.vue.mjs +119 -11
- package/es/packages/vue/src/utils/datasource.mjs +14 -1
- package/lib/_virtual/_commonjsHelpers.js +25 -0
- package/lib/_virtual/index.js +4 -4
- package/lib/_virtual/index2.js +3 -6
- package/lib/_virtual/index3.js +6 -4
- package/lib/_virtual/index4.js +6 -3
- package/lib/_virtual/index5.js +3 -2
- package/lib/_virtual/index6.js +4 -0
- package/lib/_virtual/index7.js +4 -0
- package/lib/config-dev.js +2 -0
- package/lib/designer/package.json.js +1 -1
- package/lib/designer/src/axios/config.js +10 -3
- package/lib/designer/src/axios/crypto.js +0 -4
- package/lib/designer/src/packages/aiForm/AiDiffTable.vue.js +152 -0
- package/lib/designer/src/packages/aiForm/api.js +21 -0
- package/lib/designer/src/packages/aiForm/apply.js +153 -0
- package/lib/designer/src/packages/aiForm/compressConfig.js +69 -0
- package/lib/designer/src/packages/aiForm/constants.js +184 -0
- package/lib/designer/src/packages/aiForm/diff.js +140 -0
- package/lib/designer/src/packages/aiForm/index.vue.js +301 -0
- package/lib/designer/src/packages/aiForm/normalizeFieldList.js +138 -0
- package/lib/designer/src/packages/aiForm/parseAiResult.js +245 -0
- package/lib/designer/src/packages/aiForm/prompt.js +130 -0
- package/lib/designer/src/packages/aiForm/useAiFormDrawer.js +16 -0
- package/lib/designer/src/packages/dataSource/dataSource.vue.js +44 -29
- package/lib/designer/src/packages/form/headerBtn.vue.js +4 -1
- package/lib/designer/src/packages/form/index.vue.js +15 -1
- package/lib/designer/src/packages/utils/datasource.js +14 -1
- package/lib/designer.css +523 -232
- package/lib/node_modules/@braintree/sanitize-url/dist/index.js +1 -1
- package/lib/node_modules/diagram-js/lib/model/index.js +1 -1
- package/lib/node_modules/highlight.js/es/index.js +1 -1
- package/lib/node_modules/mermaid/dist/chunks/mermaid.core/c4Diagram-LMCZKHZV.js +1 -1
- package/lib/node_modules/mermaid/dist/chunks/mermaid.core/chunk-32BRIVSS.js +1 -1
- package/lib/node_modules/mermaid/dist/chunks/mermaid.core/chunk-ICXQ74PX.js +1 -1
- package/lib/node_modules/mermaid/dist/chunks/mermaid.core/classDiagram-OUVF2IWQ.js +1 -1
- package/lib/node_modules/mermaid/dist/chunks/mermaid.core/classDiagram-v2-EOCWNBFH.js +1 -1
- package/lib/node_modules/mermaid/dist/chunks/mermaid.core/flowDiagram-23GEKE2U.js +1 -1
- package/lib/node_modules/mermaid/dist/chunks/mermaid.core/ganttDiagram-NO4QXBWP.js +1 -1
- package/lib/node_modules/mermaid/dist/chunks/mermaid.core/sequenceDiagram-DBY2YBRQ.js +1 -1
- package/lib/node_modules/mermaid/dist/chunks/mermaid.core/stateDiagram-2N3HPSRC.js +1 -1
- package/lib/node_modules/mermaid/dist/chunks/mermaid.core/stateDiagram-v2-6OUMAXLB.js +1 -1
- package/lib/node_modules/mermaid/dist/chunks/mermaid.core/swimlanesDiagram-G3AALYLV.js +1 -1
- package/lib/node_modules/object-refs/index.js +1 -1
- package/lib/packages/mobile/src/axios/config.js +8 -4
- package/lib/packages/mobile/src/components/ai/MarkdownRenderer/MarkdownRenderer.vue.js +1 -1
- package/lib/packages/mobile/src/components/custom/approvalBar/ApprovalBar.vue.js +52 -12
- package/lib/packages/mobile/src/components/custom/approvalBar/FlowUserSelect.vue.js +215 -0
- package/lib/packages/mobile/src/components/dataDisplay/cardList/CardList.vue.js +19 -15
- package/lib/packages/mobile/src/utils/datasource.js +14 -1
- package/lib/packages/mobile/src/utils/formatterUtil.js +24 -12
- package/lib/packages/vue/src/components/dialog/DialogRenderer.vue2.js +75 -8
- package/lib/packages/vue/src/components/dialog/index.js +2 -1
- package/lib/packages/vue/src/components/forms/form/Form.vue.js +9 -48
- package/lib/packages/vue/src/components/forms/formItem/FormItem.vue.js +1 -11
- package/lib/packages/vue/src/components/forms/roleSelect/RoleSelect.vue.js +9 -3
- package/lib/packages/vue/src/components/forms/userSelect/UserSelect.vue.js +9 -3
- package/lib/packages/vue/src/components/table/Table.vue.js +118 -10
- package/lib/packages/vue/src/utils/datasource.js +14 -1
- package/package.json +1 -1
|
@@ -5,7 +5,7 @@ import "../../../../../node_modules/element-plus/es/index.mjs";
|
|
|
5
5
|
/* empty css */
|
|
6
6
|
/* empty css */
|
|
7
7
|
/* empty css */
|
|
8
|
-
import { ref, getCurrentInstance, computed,
|
|
8
|
+
import { ref, getCurrentInstance, computed, watch, reactive, onMounted, onUnmounted, createBlock, openBlock, normalizeClass, withCtx, createElementBlock, createCommentVNode, createElementVNode, Fragment, createVNode, unref, createSlots, renderList, renderSlot, normalizeProps, guardReactiveProps, nextTick } from "vue";
|
|
9
9
|
import { VxeTable } from "vxe-table";
|
|
10
10
|
import XEUtils from "xe-utils";
|
|
11
11
|
/* empty css */
|
|
@@ -116,6 +116,12 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
116
116
|
default: "",
|
|
117
117
|
validator: (value) => ["", "none", "single", "multiple"].includes(value)
|
|
118
118
|
},
|
|
119
|
+
// 打开时回显已选项:{ field: 列表字段名, values: [真实值...] }
|
|
120
|
+
// 仅在弹层等"打开即勾中已保存项"的场景传入;为 null 时不回显
|
|
121
|
+
initialSelected: {
|
|
122
|
+
type: Object,
|
|
123
|
+
default: null
|
|
124
|
+
},
|
|
119
125
|
initHiddenData: {
|
|
120
126
|
type: Object,
|
|
121
127
|
default: {}
|
|
@@ -547,20 +553,97 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
547
553
|
emit("page-change", { pageNo, pageSize });
|
|
548
554
|
};
|
|
549
555
|
const selectedRows = ref([]);
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
556
|
+
let userInteracted = false;
|
|
557
|
+
const handleCheckboxChange = () => {
|
|
558
|
+
userInteracted = true;
|
|
559
|
+
selectedRows.value = collectSelectionWithBaseline();
|
|
560
|
+
emit("selection-change", selectedRows.value);
|
|
553
561
|
};
|
|
554
|
-
const handleCheckboxAll = (
|
|
555
|
-
|
|
556
|
-
|
|
562
|
+
const handleCheckboxAll = () => {
|
|
563
|
+
userInteracted = true;
|
|
564
|
+
selectedRows.value = collectSelectionWithBaseline();
|
|
565
|
+
emit("selection-change", selectedRows.value);
|
|
557
566
|
};
|
|
558
567
|
const handleRadioChange = (checked) => {
|
|
568
|
+
userInteracted = true;
|
|
559
569
|
emit("selection-change", [checked.row]);
|
|
560
570
|
};
|
|
571
|
+
const appliedInitialValues = /* @__PURE__ */ new Set();
|
|
572
|
+
const renderedKeys = /* @__PURE__ */ new Set();
|
|
573
|
+
function mergeRowsByKey(primary, extra, keyOf) {
|
|
574
|
+
const merged = [];
|
|
575
|
+
const seen = /* @__PURE__ */ new Set();
|
|
576
|
+
primary.forEach((row) => {
|
|
577
|
+
const key = keyOf(row);
|
|
578
|
+
if (seen.has(key)) return;
|
|
579
|
+
seen.add(key);
|
|
580
|
+
merged.push(row);
|
|
581
|
+
});
|
|
582
|
+
extra.forEach((row) => {
|
|
583
|
+
const key = keyOf(row);
|
|
584
|
+
if (seen.has(key)) return;
|
|
585
|
+
seen.add(key);
|
|
586
|
+
merged.push(row);
|
|
587
|
+
});
|
|
588
|
+
return merged;
|
|
589
|
+
}
|
|
590
|
+
function collectSelectionWithBaseline() {
|
|
591
|
+
const checked = collectCheckboxSelection();
|
|
592
|
+
const cfg = props.initialSelected;
|
|
593
|
+
if (!(cfg == null ? void 0 : cfg.field) || !Array.isArray(cfg.rows) || cfg.rows.length === 0) {
|
|
594
|
+
return checked;
|
|
595
|
+
}
|
|
596
|
+
const keyOf = (row) => String((row == null ? void 0 : row[cfg.field]) ?? "");
|
|
597
|
+
const allowed = new Set((cfg.values || []).map((v) => String(v)));
|
|
598
|
+
const unseen = cfg.rows.filter(
|
|
599
|
+
(row) => allowed.has(keyOf(row)) && !renderedKeys.has(keyOf(row))
|
|
600
|
+
);
|
|
601
|
+
return mergeRowsByKey(checked, unseen, keyOf);
|
|
602
|
+
}
|
|
603
|
+
function applyInitialSelected() {
|
|
604
|
+
var _a;
|
|
605
|
+
const cfg = props.initialSelected;
|
|
606
|
+
const $table = tableRef.value;
|
|
607
|
+
if (!$table || userInteracted) return;
|
|
608
|
+
if (!(cfg == null ? void 0 : cfg.field) || !Array.isArray(cfg.values) || cfg.values.length === 0)
|
|
609
|
+
return;
|
|
610
|
+
const mode = props.selectMode || ((_a = localConfig.value) == null ? void 0 : _a.selectMode);
|
|
611
|
+
if (mode !== "single" && mode !== "multiple") return;
|
|
612
|
+
const keyOf = (row) => String((row == null ? void 0 : row[cfg.field]) ?? "");
|
|
613
|
+
displayData.value.forEach((row) => {
|
|
614
|
+
const key = keyOf(row);
|
|
615
|
+
if (key) renderedKeys.add(key);
|
|
616
|
+
});
|
|
617
|
+
const pendingValues = cfg.values.map((v) => String(v)).filter((v) => !appliedInitialValues.has(v));
|
|
618
|
+
const rows = pendingValues.length ? displayData.value.filter((row) => pendingValues.includes(keyOf(row))) : [];
|
|
619
|
+
if (rows.length > 0) {
|
|
620
|
+
rows.forEach((row) => appliedInitialValues.add(keyOf(row)));
|
|
621
|
+
}
|
|
622
|
+
if (mode === "single") {
|
|
623
|
+
if (rows.length === 0) return;
|
|
624
|
+
$table.setRadioRow(rows[0]);
|
|
625
|
+
selectedRows.value = [rows[0]];
|
|
626
|
+
} else {
|
|
627
|
+
if (rows.length > 0) $table.setCheckboxRow(rows, true);
|
|
628
|
+
selectedRows.value = collectSelectionWithBaseline();
|
|
629
|
+
}
|
|
630
|
+
if (selectedRows.value.length > 0) {
|
|
631
|
+
emit("selection-change", selectedRows.value);
|
|
632
|
+
}
|
|
633
|
+
}
|
|
634
|
+
watch(
|
|
635
|
+
() => props.initialSelected,
|
|
636
|
+
() => {
|
|
637
|
+
appliedInitialValues.clear();
|
|
638
|
+
renderedKeys.clear();
|
|
639
|
+
userInteracted = false;
|
|
640
|
+
},
|
|
641
|
+
{ deep: true }
|
|
642
|
+
);
|
|
561
643
|
const handleInitRendered = ({ visibleColumn, visibleData, $event }) => {
|
|
562
644
|
const offsetHeight = fecTableContainerRef.value.$el.offsetHeight;
|
|
563
645
|
emit("height-loaded", localConfig.value, offsetHeight);
|
|
646
|
+
applyInitialSelected();
|
|
564
647
|
if ((visibleData == null ? void 0 : visibleData.length) > 0) {
|
|
565
648
|
emitter.emit("onSubTableDataLoaded", {
|
|
566
649
|
subTableConfig: props.subTableConfig,
|
|
@@ -576,6 +659,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
576
659
|
}) => {
|
|
577
660
|
const offsetHeight = fecTableContainerRef.value.$el.offsetHeight;
|
|
578
661
|
emit("height-loaded", localConfig.value, offsetHeight);
|
|
662
|
+
applyInitialSelected();
|
|
579
663
|
if ((visibleData == null ? void 0 : visibleData.length) > 0) {
|
|
580
664
|
emitter.emit("onSubTableDataLoaded", {
|
|
581
665
|
subTableConfig: props.subTableConfig,
|
|
@@ -741,9 +825,26 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
741
825
|
isHover: true
|
|
742
826
|
};
|
|
743
827
|
});
|
|
828
|
+
function collectCheckboxSelection() {
|
|
829
|
+
var _a, _b;
|
|
830
|
+
const $table = tableRef.value;
|
|
831
|
+
if (!$table) return [];
|
|
832
|
+
const current = ((_a = $table.getCheckboxRecords) == null ? void 0 : _a.call($table)) || [];
|
|
833
|
+
const reserve = ((_b = $table.getCheckboxReserveRecords) == null ? void 0 : _b.call($table)) || [];
|
|
834
|
+
const keyField = rowConfig.value.keyField;
|
|
835
|
+
if (!keyField) return [...current, ...reserve];
|
|
836
|
+
const seen = /* @__PURE__ */ new Set();
|
|
837
|
+
return [...current, ...reserve].filter((row) => {
|
|
838
|
+
const key = String((row == null ? void 0 : row[keyField]) ?? "");
|
|
839
|
+
if (seen.has(key)) return false;
|
|
840
|
+
seen.add(key);
|
|
841
|
+
return true;
|
|
842
|
+
});
|
|
843
|
+
}
|
|
744
844
|
const radioConfig = ref({
|
|
745
845
|
trigger: "row",
|
|
746
|
-
highlight: true
|
|
846
|
+
highlight: true,
|
|
847
|
+
reserve: true
|
|
747
848
|
});
|
|
748
849
|
const checkboxConfig = ref({
|
|
749
850
|
showHeader: true,
|
|
@@ -768,8 +869,15 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
768
869
|
currentMode.value = modeKey;
|
|
769
870
|
};
|
|
770
871
|
const getSelection = () => {
|
|
771
|
-
|
|
772
|
-
|
|
872
|
+
var _a, _b, _c;
|
|
873
|
+
const $table = tableRef.value;
|
|
874
|
+
if (!$table) return [];
|
|
875
|
+
const mode = props.selectMode || ((_a = localConfig.value) == null ? void 0 : _a.selectMode);
|
|
876
|
+
if (mode === "single") {
|
|
877
|
+
const row = ((_b = $table.getRadioRecord) == null ? void 0 : _b.call($table)) || ((_c = $table.getRadioReserveRecord) == null ? void 0 : _c.call($table));
|
|
878
|
+
return row ? [row] : [];
|
|
879
|
+
}
|
|
880
|
+
return collectSelectionWithBaseline();
|
|
773
881
|
};
|
|
774
882
|
const clearSelection = () => {
|
|
775
883
|
if (tableRef.value) {
|
|
@@ -1030,7 +1138,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
1030
1138
|
};
|
|
1031
1139
|
}
|
|
1032
1140
|
});
|
|
1033
|
-
const _Table = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
1141
|
+
const _Table = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-63047ad0"]]);
|
|
1034
1142
|
export {
|
|
1035
1143
|
_Table as default
|
|
1036
1144
|
};
|
|
@@ -98,7 +98,7 @@ class DataSourceManager {
|
|
|
98
98
|
const currentDs = this.getCurrentDataSource();
|
|
99
99
|
if (!currentDs) return {};
|
|
100
100
|
const config = {
|
|
101
|
-
url:
|
|
101
|
+
url: buildRequestUrl(currentDs),
|
|
102
102
|
method: currentDs.method
|
|
103
103
|
};
|
|
104
104
|
if (currentDs.contentType === "formData") {
|
|
@@ -340,11 +340,24 @@ class DataSourceManager {
|
|
|
340
340
|
this.events.error = [];
|
|
341
341
|
}
|
|
342
342
|
}
|
|
343
|
+
function resolveServerBase(serverName) {
|
|
344
|
+
const servers = typeof window !== "undefined" && window.$servers || {};
|
|
345
|
+
return servers[serverName] ?? serverName ?? "";
|
|
346
|
+
}
|
|
347
|
+
function buildRequestUrl(dataSource) {
|
|
348
|
+
const base = resolveServerBase(dataSource == null ? void 0 : dataSource.serverName).replace(/\/+$/, "");
|
|
349
|
+
const url = (dataSource == null ? void 0 : dataSource.url) || "";
|
|
350
|
+
if (/^https?:\/\//i.test(url)) return url;
|
|
351
|
+
if (/^https?:\/\//i.test(base)) return `${base}/${url.replace(/^\/+/, "")}`;
|
|
352
|
+
if (!base) return url;
|
|
353
|
+
return `/${base}${url}`;
|
|
354
|
+
}
|
|
343
355
|
function createDataSource(options = {}) {
|
|
344
356
|
return new DataSourceManager(options);
|
|
345
357
|
}
|
|
346
358
|
export {
|
|
347
359
|
DataSourceManager,
|
|
360
|
+
buildRequestUrl,
|
|
348
361
|
createDataSource,
|
|
349
362
|
DataSourceManager as default
|
|
350
363
|
};
|
|
@@ -4,5 +4,30 @@ var commonjsGlobal = typeof globalThis !== "undefined" ? globalThis : typeof win
|
|
|
4
4
|
function getDefaultExportFromCjs(x) {
|
|
5
5
|
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, "default") ? x["default"] : x;
|
|
6
6
|
}
|
|
7
|
+
function getAugmentedNamespace(n) {
|
|
8
|
+
if (n.__esModule) return n;
|
|
9
|
+
var f = n.default;
|
|
10
|
+
if (typeof f == "function") {
|
|
11
|
+
var a = function a2() {
|
|
12
|
+
if (this instanceof a2) {
|
|
13
|
+
return Reflect.construct(f, arguments, this.constructor);
|
|
14
|
+
}
|
|
15
|
+
return f.apply(this, arguments);
|
|
16
|
+
};
|
|
17
|
+
a.prototype = f.prototype;
|
|
18
|
+
} else a = {};
|
|
19
|
+
Object.defineProperty(a, "__esModule", { value: true });
|
|
20
|
+
Object.keys(n).forEach(function(k) {
|
|
21
|
+
var d = Object.getOwnPropertyDescriptor(n, k);
|
|
22
|
+
Object.defineProperty(a, k, d.get ? d : {
|
|
23
|
+
enumerable: true,
|
|
24
|
+
get: function() {
|
|
25
|
+
return n[k];
|
|
26
|
+
}
|
|
27
|
+
});
|
|
28
|
+
});
|
|
29
|
+
return a;
|
|
30
|
+
}
|
|
7
31
|
exports.commonjsGlobal = commonjsGlobal;
|
|
32
|
+
exports.getAugmentedNamespace = getAugmentedNamespace;
|
|
8
33
|
exports.getDefaultExportFromCjs = getDefaultExportFromCjs;
|
package/lib/_virtual/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
|
|
3
3
|
const _commonjsHelpers = require("./_commonjsHelpers.js");
|
|
4
|
-
const index = require("../node_modules/
|
|
5
|
-
var
|
|
6
|
-
const
|
|
7
|
-
exports.default =
|
|
4
|
+
const index = require("../node_modules/crypto-js/index.js");
|
|
5
|
+
var cryptoJsExports = index.__require();
|
|
6
|
+
const CryptoJS = /* @__PURE__ */ _commonjsHelpers.getDefaultExportFromCjs(cryptoJsExports);
|
|
7
|
+
exports.default = CryptoJS;
|
package/lib/_virtual/index2.js
CHANGED
|
@@ -1,7 +1,4 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
Object.
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
var objectRefsExports = index.__require();
|
|
6
|
-
const Refs = /* @__PURE__ */ _commonjsHelpers.getDefaultExportFromCjs(objectRefsExports);
|
|
7
|
-
exports.default = Refs;
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
var cryptoJs = { exports: {} };
|
|
4
|
+
exports.__module = cryptoJs;
|
package/lib/_virtual/index3.js
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
Object.
|
|
3
|
-
const
|
|
4
|
-
|
|
5
|
-
|
|
2
|
+
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
|
|
3
|
+
const _commonjsHelpers = require("./_commonjsHelpers.js");
|
|
4
|
+
const index = require("../node_modules/highlight.js/lib/index.js");
|
|
5
|
+
var libExports = /* @__PURE__ */ index.__require();
|
|
6
|
+
const HighlightJS = /* @__PURE__ */ _commonjsHelpers.getDefaultExportFromCjs(libExports);
|
|
7
|
+
exports.default = HighlightJS;
|
package/lib/_virtual/index4.js
CHANGED
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
Object.
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
|
|
3
|
+
const _commonjsHelpers = require("./_commonjsHelpers.js");
|
|
4
|
+
const index = require("../node_modules/object-refs/index.js");
|
|
5
|
+
var objectRefsExports = index.__require();
|
|
6
|
+
const Refs = /* @__PURE__ */ _commonjsHelpers.getDefaultExportFromCjs(objectRefsExports);
|
|
7
|
+
exports.default = Refs;
|
package/lib/_virtual/index5.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
-
|
|
4
|
-
|
|
3
|
+
const index = require("../node_modules/@braintree/sanitize-url/dist/index.js");
|
|
4
|
+
var distExports = index.__require();
|
|
5
|
+
exports.distExports = distExports;
|
package/lib/config-dev.js
CHANGED
|
@@ -18,16 +18,19 @@ const service = axios.default.create({
|
|
|
18
18
|
baseURL: env.default.api_base_url,
|
|
19
19
|
timeout: env.default.api_timeout
|
|
20
20
|
});
|
|
21
|
+
const isExternalUrl = (url) => /^https?:\/\//i.test(url || "");
|
|
21
22
|
service.interceptors.request.use(
|
|
22
23
|
(config) => {
|
|
23
24
|
removePending(config);
|
|
24
25
|
addPending(config);
|
|
25
|
-
if (config.url != "/login") {
|
|
26
|
+
if (!isExternalUrl(config.url) && config.url != "/login") {
|
|
26
27
|
config.headers.token = window.$store.getters.token;
|
|
27
28
|
config.headers.refreshToken = window.$store.getters.refreshToken;
|
|
28
29
|
}
|
|
29
|
-
config.
|
|
30
|
-
|
|
30
|
+
if (!isExternalUrl(config.url)) {
|
|
31
|
+
config.headers.crypto = env.default.data_crypto || false;
|
|
32
|
+
config.headers.sig = env.default.data_verify_sign || false;
|
|
33
|
+
}
|
|
31
34
|
return config;
|
|
32
35
|
},
|
|
33
36
|
(error) => {
|
|
@@ -36,7 +39,11 @@ service.interceptors.request.use(
|
|
|
36
39
|
);
|
|
37
40
|
service.interceptors.response.use(
|
|
38
41
|
(response) => {
|
|
42
|
+
var _a;
|
|
39
43
|
removePending(response.config);
|
|
44
|
+
if (isExternalUrl((_a = response.config) == null ? void 0 : _a.url)) {
|
|
45
|
+
return response.data;
|
|
46
|
+
}
|
|
40
47
|
const refreshToken = response.headers["refresh-token"];
|
|
41
48
|
const token = response.headers["token"];
|
|
42
49
|
if (token && refreshToken) {
|
|
@@ -31,8 +31,4 @@ const aes = {
|
|
|
31
31
|
en: (data) => getAesString(data, KP.key, KP.iv),
|
|
32
32
|
de: (data) => getDAesString(data, KP.key, KP.iv)
|
|
33
33
|
};
|
|
34
|
-
const sha256 = (data) => {
|
|
35
|
-
return index.default.SHA256(data).toString(index.default.enc.Hex);
|
|
36
|
-
};
|
|
37
34
|
exports.aes = aes;
|
|
38
|
-
exports.sha256 = sha256;
|
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
|
|
3
|
+
require("../../../../node_modules/element-plus/es/index.js");
|
|
4
|
+
;/* empty css */
|
|
5
|
+
;/* empty css */
|
|
6
|
+
const Vue = require("vue");
|
|
7
|
+
const constants = require("./constants.js");
|
|
8
|
+
;/* empty css */
|
|
9
|
+
const _pluginVue_exportHelper = require("../../../../_virtual/_plugin-vue_export-helper.js");
|
|
10
|
+
const index = require("../../../../node_modules/element-plus/es/components/link/index.js");
|
|
11
|
+
const _hoisted_1 = {
|
|
12
|
+
key: 0,
|
|
13
|
+
class: "ai-diff-empty"
|
|
14
|
+
};
|
|
15
|
+
const _hoisted_2 = {
|
|
16
|
+
key: 1,
|
|
17
|
+
class: "ai-diff"
|
|
18
|
+
};
|
|
19
|
+
const _hoisted_3 = { class: "diff-body" };
|
|
20
|
+
const _hoisted_4 = { class: "sign" };
|
|
21
|
+
const _hoisted_5 = { class: "group-name" };
|
|
22
|
+
const _hoisted_6 = { class: "count" };
|
|
23
|
+
const _hoisted_7 = { class: "diff-list" };
|
|
24
|
+
const _hoisted_8 = { class: "row" };
|
|
25
|
+
const _hoisted_9 = { class: "name" };
|
|
26
|
+
const _hoisted_10 = { class: "extra" };
|
|
27
|
+
const _hoisted_11 = {
|
|
28
|
+
key: 0,
|
|
29
|
+
class: "change-list"
|
|
30
|
+
};
|
|
31
|
+
const _hoisted_12 = { class: "change-prop" };
|
|
32
|
+
const _hoisted_13 = ["title"];
|
|
33
|
+
const _hoisted_14 = ["title"];
|
|
34
|
+
const _hoisted_15 = {
|
|
35
|
+
key: 0,
|
|
36
|
+
class: "more-tip"
|
|
37
|
+
};
|
|
38
|
+
const _hoisted_16 = {
|
|
39
|
+
key: 0,
|
|
40
|
+
class: "diff-more"
|
|
41
|
+
};
|
|
42
|
+
const LIMIT = 8;
|
|
43
|
+
const _sfc_main = {
|
|
44
|
+
__name: "AiDiffTable",
|
|
45
|
+
props: {
|
|
46
|
+
model: { type: Object, default: () => null }
|
|
47
|
+
},
|
|
48
|
+
setup(__props) {
|
|
49
|
+
const props = __props;
|
|
50
|
+
const GROUPS = [
|
|
51
|
+
{ kind: "add", name: "新增", sign: "+", key: "adds" },
|
|
52
|
+
{ kind: "modify", name: "修改", sign: "~", key: "modifies" },
|
|
53
|
+
{ kind: "remove", name: "删除", sign: "-", key: "removes" }
|
|
54
|
+
];
|
|
55
|
+
const showAll = Vue.ref(false);
|
|
56
|
+
const allGroups = Vue.computed(
|
|
57
|
+
() => GROUPS.map((g) => {
|
|
58
|
+
var _a;
|
|
59
|
+
const list = ((_a = props.model) == null ? void 0 : _a[g.key]) || [];
|
|
60
|
+
return { ...g, list, total: list.length };
|
|
61
|
+
}).filter((g) => g.total > 0)
|
|
62
|
+
);
|
|
63
|
+
const total = Vue.computed(() => allGroups.value.reduce((n, g) => n + g.total, 0));
|
|
64
|
+
const overflow = Vue.computed(() => total.value > LIMIT);
|
|
65
|
+
const hasAny = Vue.computed(() => allGroups.value.length > 0);
|
|
66
|
+
const groups = Vue.computed(() => {
|
|
67
|
+
if (showAll.value) return allGroups.value;
|
|
68
|
+
let remain = LIMIT;
|
|
69
|
+
return allGroups.value.map((g) => {
|
|
70
|
+
const slice = g.list.slice(0, Math.max(0, remain));
|
|
71
|
+
remain -= slice.length;
|
|
72
|
+
return { ...g, list: slice, hidden: g.total - slice.length };
|
|
73
|
+
});
|
|
74
|
+
});
|
|
75
|
+
Vue.watch(
|
|
76
|
+
() => props.model,
|
|
77
|
+
() => {
|
|
78
|
+
showAll.value = false;
|
|
79
|
+
}
|
|
80
|
+
);
|
|
81
|
+
const nameOf = (it) => (it == null ? void 0 : it.label) || (it == null ? void 0 : it.fieldName) || "(未命名)";
|
|
82
|
+
const typeOf = (t) => {
|
|
83
|
+
var _a;
|
|
84
|
+
return ((_a = constants.AI_FIELD_TYPES[t]) == null ? void 0 : _a.label) || t || "";
|
|
85
|
+
};
|
|
86
|
+
const textOf = (v) => v === void 0 || v === null || v === "" ? "(空)" : String(v);
|
|
87
|
+
return (_ctx, _cache) => {
|
|
88
|
+
const _component_el_link = index.ElLink;
|
|
89
|
+
return !hasAny.value ? (Vue.openBlock(), Vue.createElementBlock("div", _hoisted_1, "本次没有产生变更")) : (Vue.openBlock(), Vue.createElementBlock("div", _hoisted_2, [
|
|
90
|
+
Vue.createElementVNode("div", _hoisted_3, [
|
|
91
|
+
(Vue.openBlock(true), Vue.createElementBlock(Vue.Fragment, null, Vue.renderList(groups.value, (g) => {
|
|
92
|
+
return Vue.openBlock(), Vue.createElementBlock("div", {
|
|
93
|
+
key: g.kind,
|
|
94
|
+
class: "diff-group"
|
|
95
|
+
}, [
|
|
96
|
+
Vue.createElementVNode("div", {
|
|
97
|
+
class: Vue.normalizeClass(["group-head", g.kind])
|
|
98
|
+
}, [
|
|
99
|
+
Vue.createElementVNode("span", _hoisted_4, Vue.toDisplayString(g.sign), 1),
|
|
100
|
+
Vue.createElementVNode("span", _hoisted_5, Vue.toDisplayString(g.name), 1),
|
|
101
|
+
Vue.createElementVNode("span", _hoisted_6, Vue.toDisplayString(g.total), 1)
|
|
102
|
+
], 2),
|
|
103
|
+
Vue.createElementVNode("ul", _hoisted_7, [
|
|
104
|
+
(Vue.openBlock(true), Vue.createElementBlock(Vue.Fragment, null, Vue.renderList(g.list, (it, i) => {
|
|
105
|
+
return Vue.openBlock(), Vue.createElementBlock("li", {
|
|
106
|
+
key: `${g.kind}-${i}`
|
|
107
|
+
}, [
|
|
108
|
+
Vue.createElementVNode("div", _hoisted_8, [
|
|
109
|
+
Vue.createElementVNode("span", _hoisted_9, Vue.toDisplayString(nameOf(it)), 1),
|
|
110
|
+
Vue.createElementVNode("span", _hoisted_10, Vue.toDisplayString(typeOf(it.fieldType)), 1)
|
|
111
|
+
]),
|
|
112
|
+
g.kind === "modify" ? (Vue.openBlock(), Vue.createElementBlock("ul", _hoisted_11, [
|
|
113
|
+
(Vue.openBlock(true), Vue.createElementBlock(Vue.Fragment, null, Vue.renderList(it.changes, (c, ci) => {
|
|
114
|
+
return Vue.openBlock(), Vue.createElementBlock("li", { key: ci }, [
|
|
115
|
+
Vue.createElementVNode("span", _hoisted_12, Vue.toDisplayString(Vue.unref(constants.getPropLabel)(c.prop)), 1),
|
|
116
|
+
Vue.createElementVNode("span", {
|
|
117
|
+
class: "val old",
|
|
118
|
+
title: textOf(c.oldValue)
|
|
119
|
+
}, Vue.toDisplayString(textOf(c.oldValue)), 9, _hoisted_13),
|
|
120
|
+
_cache[1] || (_cache[1] = Vue.createElementVNode("span", { class: "arrow" }, "→", -1)),
|
|
121
|
+
Vue.createElementVNode("span", {
|
|
122
|
+
class: "val new",
|
|
123
|
+
title: textOf(c.newValue)
|
|
124
|
+
}, Vue.toDisplayString(textOf(c.newValue)), 9, _hoisted_14)
|
|
125
|
+
]);
|
|
126
|
+
}), 128))
|
|
127
|
+
])) : Vue.createCommentVNode("", true)
|
|
128
|
+
]);
|
|
129
|
+
}), 128)),
|
|
130
|
+
g.hidden ? (Vue.openBlock(), Vue.createElementBlock("li", _hoisted_15, "…另有 " + Vue.toDisplayString(g.hidden) + " 项", 1)) : Vue.createCommentVNode("", true)
|
|
131
|
+
])
|
|
132
|
+
]);
|
|
133
|
+
}), 128))
|
|
134
|
+
]),
|
|
135
|
+
overflow.value ? (Vue.openBlock(), Vue.createElementBlock("div", _hoisted_16, [
|
|
136
|
+
Vue.createVNode(_component_el_link, {
|
|
137
|
+
type: "primary",
|
|
138
|
+
underline: false,
|
|
139
|
+
onClick: _cache[0] || (_cache[0] = ($event) => showAll.value = !showAll.value)
|
|
140
|
+
}, {
|
|
141
|
+
default: Vue.withCtx(() => [
|
|
142
|
+
Vue.createTextVNode(Vue.toDisplayString(showAll.value ? "收起" : `展开全部(共 ${total.value} 项)`), 1)
|
|
143
|
+
]),
|
|
144
|
+
_: 1
|
|
145
|
+
})
|
|
146
|
+
])) : Vue.createCommentVNode("", true)
|
|
147
|
+
]));
|
|
148
|
+
};
|
|
149
|
+
}
|
|
150
|
+
};
|
|
151
|
+
const AiDiffTable = /* @__PURE__ */ _pluginVue_exportHelper.default(_sfc_main, [["__scopeId", "data-v-582082a6"]]);
|
|
152
|
+
exports.default = AiDiffTable;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var _a, _b;
|
|
3
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
4
|
+
const config = require("../../axios/config.js");
|
|
5
|
+
const env = require("../../utils/env.js");
|
|
6
|
+
const SERVER_PREFIX = ((_b = (_a = env.default) == null ? void 0 : _a.servers) == null ? void 0 : _b.base) || "base-server";
|
|
7
|
+
const FORM_CONFIG_GEN_API = `/${SERVER_PREFIX}/formConfig/generate`;
|
|
8
|
+
const GEN_TIMEOUT = 18e4;
|
|
9
|
+
async function generateFormConfig(params) {
|
|
10
|
+
const data = await config.default.post(FORM_CONFIG_GEN_API, params, {
|
|
11
|
+
timeout: GEN_TIMEOUT
|
|
12
|
+
});
|
|
13
|
+
const raw = (data == null ? void 0 : data.raw) ?? "";
|
|
14
|
+
const json = (data == null ? void 0 : data.json) ?? null;
|
|
15
|
+
if (!json && !raw.includes("```")) {
|
|
16
|
+
throw new Error(raw || "AI 未返回有效内容,请稍后重试");
|
|
17
|
+
}
|
|
18
|
+
return { raw, json };
|
|
19
|
+
}
|
|
20
|
+
exports.FORM_CONFIG_GEN_API = FORM_CONFIG_GEN_API;
|
|
21
|
+
exports.generateFormConfig = generateFormConfig;
|