@fecp/designer 5.5.7 → 5.5.9
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 +0 -27
- package/es/designer/package.json.mjs +1 -1
- package/es/designer/src/packages/dataLinkage/index.vue.mjs +0 -1
- package/es/designer/src/packages/dataSource/dataSource.vue.mjs +7 -6
- package/es/designer/src/packages/dialogGlobal/index.vue.mjs +0 -1
- package/es/designer/src/packages/table/headerBtn.vue.mjs +0 -1
- package/es/designer/src/packages/utils/datasource.mjs +1 -2
- package/es/designer/src/utils/optionLoader.mjs +10 -9
- package/es/designer.css +79 -77
- package/es/node_modules/element-plus/es/utils/vue/icon.mjs +1 -1
- package/es/packages/vue/src/components/table/DynamicQuery.vue.mjs +1 -1
- package/es/packages/vue/src/components/table/TableFilter.vue.mjs +2 -2
- package/lib/_virtual/_commonjsHelpers.js +0 -27
- package/lib/designer/package.json.js +1 -1
- package/lib/designer/src/packages/dataLinkage/index.vue.js +0 -1
- package/lib/designer/src/packages/dataSource/dataSource.vue.js +6 -5
- package/lib/designer/src/packages/dialogGlobal/index.vue.js +0 -1
- package/lib/designer/src/packages/table/headerBtn.vue.js +0 -1
- package/lib/designer/src/packages/utils/datasource.js +6 -7
- package/lib/designer/src/utils/optionLoader.js +10 -9
- package/lib/designer.css +79 -77
- package/lib/packages/vue/src/components/table/DynamicQuery.vue.js +1 -1
- package/lib/packages/vue/src/components/table/TableFilter.vue.js +2 -2
- package/package.json +1 -1
|
@@ -1,33 +1,6 @@
|
|
|
1
|
-
var commonjsGlobal = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {};
|
|
2
1
|
function getDefaultExportFromCjs(x) {
|
|
3
2
|
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, "default") ? x["default"] : x;
|
|
4
3
|
}
|
|
5
|
-
function getAugmentedNamespace(n) {
|
|
6
|
-
if (n.__esModule) return n;
|
|
7
|
-
var f = n.default;
|
|
8
|
-
if (typeof f == "function") {
|
|
9
|
-
var a = function a2() {
|
|
10
|
-
if (this instanceof a2) {
|
|
11
|
-
return Reflect.construct(f, arguments, this.constructor);
|
|
12
|
-
}
|
|
13
|
-
return f.apply(this, arguments);
|
|
14
|
-
};
|
|
15
|
-
a.prototype = f.prototype;
|
|
16
|
-
} else a = {};
|
|
17
|
-
Object.defineProperty(a, "__esModule", { value: true });
|
|
18
|
-
Object.keys(n).forEach(function(k) {
|
|
19
|
-
var d = Object.getOwnPropertyDescriptor(n, k);
|
|
20
|
-
Object.defineProperty(a, k, d.get ? d : {
|
|
21
|
-
enumerable: true,
|
|
22
|
-
get: function() {
|
|
23
|
-
return n[k];
|
|
24
|
-
}
|
|
25
|
-
});
|
|
26
|
-
});
|
|
27
|
-
return a;
|
|
28
|
-
}
|
|
29
4
|
export {
|
|
30
|
-
commonjsGlobal,
|
|
31
|
-
getAugmentedNamespace,
|
|
32
5
|
getDefaultExportFromCjs
|
|
33
6
|
};
|
|
@@ -31,7 +31,6 @@ import "../../../../node_modules/element-plus/theme-chalk/el-date-picker.css.mjs
|
|
|
31
31
|
/* empty css */
|
|
32
32
|
import _export_sfc from "../../../../_virtual/_plugin-vue_export-helper.mjs";
|
|
33
33
|
/* empty css */
|
|
34
|
-
import "../../axios/config.mjs";
|
|
35
34
|
/* empty css */
|
|
36
35
|
/* empty css */
|
|
37
36
|
/* empty css */
|
|
@@ -14,13 +14,12 @@ import "../../../../node_modules/element-plus/theme-chalk/el-tab-pane.css.mjs";
|
|
|
14
14
|
/* empty css */
|
|
15
15
|
/* empty css */
|
|
16
16
|
/* empty css */
|
|
17
|
-
import { ref, watch, createElementBlock, openBlock, createVNode, unref, isRef, withCtx, createElementVNode, Fragment, renderList, createBlock, createTextVNode, createCommentVNode, toDisplayString } from "vue";
|
|
17
|
+
import { getCurrentInstance, ref, watch, createElementBlock, openBlock, createVNode, unref, isRef, withCtx, createElementVNode, Fragment, renderList, createBlock, createTextVNode, createCommentVNode, toDisplayString } from "vue";
|
|
18
18
|
import { VideoPlay as video_play_default, CopyDocument as copy_document_default, Document as document_default } from "../../../../node_modules/@element-plus/icons-vue/dist/index.mjs";
|
|
19
19
|
import ParamsConfig from "../../components/ParamsConfig.vue2.mjs";
|
|
20
20
|
import "../../store/index.mjs";
|
|
21
21
|
import { JsonViewer as Q } from "../../../../node_modules/vue3-json-viewer/dist/vue3-json-viewer.mjs";
|
|
22
22
|
/* empty css */
|
|
23
|
-
import { get, post, postForm } from "../../axios/index.mjs";
|
|
24
23
|
import envConfig from "../../utils/env.mjs";
|
|
25
24
|
/* empty css */
|
|
26
25
|
/* empty css */
|
|
@@ -64,6 +63,8 @@ const _sfc_main = {
|
|
|
64
63
|
requestConfigData: Object
|
|
65
64
|
},
|
|
66
65
|
setup(__props) {
|
|
66
|
+
const currentInstance = getCurrentInstance();
|
|
67
|
+
const ctx = currentInstance.proxy;
|
|
67
68
|
const props = __props;
|
|
68
69
|
const activeName = ref("requestConfig");
|
|
69
70
|
const loading = ref(false);
|
|
@@ -111,12 +112,12 @@ const _sfc_main = {
|
|
|
111
112
|
if (requestConfig.method === "get") {
|
|
112
113
|
const queryString = new URLSearchParams(params).toString();
|
|
113
114
|
const url = queryString ? `${fullUrl}?${queryString}` : fullUrl;
|
|
114
|
-
res = await get(url, loading.value);
|
|
115
|
+
res = await ctx.$http.get(url, loading.value);
|
|
115
116
|
} else {
|
|
116
117
|
if (requestConfig.contentType === "json") {
|
|
117
|
-
res = await post(fullUrl, params, loading.value);
|
|
118
|
+
res = await ctx.$http.post(fullUrl, params, loading.value);
|
|
118
119
|
} else {
|
|
119
|
-
res = await postForm(fullUrl, params, loading.value);
|
|
120
|
+
res = await ctx.$http.postForm(fullUrl, params, loading.value);
|
|
120
121
|
}
|
|
121
122
|
}
|
|
122
123
|
responseData.value = {
|
|
@@ -380,7 +381,7 @@ const _sfc_main = {
|
|
|
380
381
|
};
|
|
381
382
|
}
|
|
382
383
|
};
|
|
383
|
-
const DataSource = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-
|
|
384
|
+
const DataSource = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-5c11127e"]]);
|
|
384
385
|
export {
|
|
385
386
|
DataSource as default
|
|
386
387
|
};
|
|
@@ -92,7 +92,6 @@ import "../../../../node_modules/element-plus/theme-chalk/el-tab-pane.css.mjs";
|
|
|
92
92
|
/* empty css */
|
|
93
93
|
/* empty css */
|
|
94
94
|
import "../../../../node_modules/element-plus/theme-chalk/el-date-picker.css.mjs";
|
|
95
|
-
import "../../axios/config.mjs";
|
|
96
95
|
/* empty css */
|
|
97
96
|
/* empty css */
|
|
98
97
|
/* empty css */
|
|
@@ -91,7 +91,6 @@ import { useAdvancedFilterDialog } from "../advancedFilter/useAdvancedFilterDial
|
|
|
91
91
|
/* empty css */
|
|
92
92
|
/* empty css */
|
|
93
93
|
import "../../../../node_modules/element-plus/theme-chalk/el-date-picker.css.mjs";
|
|
94
|
-
import "../../axios/config.mjs";
|
|
95
94
|
/* empty css */
|
|
96
95
|
/* empty css */
|
|
97
96
|
/* empty css */
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import service from "../../axios/config.mjs";
|
|
2
1
|
import { reactive } from "vue";
|
|
3
2
|
import "../../../../node_modules/element-plus/es/index.mjs";
|
|
4
3
|
/* empty css */
|
|
@@ -7,7 +6,7 @@ import "../../../../node_modules/element-plus/es/index.mjs";
|
|
|
7
6
|
import { ElMessage } from "../../../../node_modules/element-plus/es/components/message/index.mjs";
|
|
8
7
|
class DataSourceManager {
|
|
9
8
|
constructor(options = {}) {
|
|
10
|
-
this.http =
|
|
9
|
+
this.http = options.http;
|
|
11
10
|
this.params = options.params || {};
|
|
12
11
|
this.dataSources = options.dataSources || [];
|
|
13
12
|
this.currentDataSourceId = options.currentDataSourceId;
|
|
@@ -3,7 +3,7 @@ import { createDataSource } from "../packages/utils/datasource.mjs";
|
|
|
3
3
|
import { getEditConfigDataSources } from "../packages/utils/common.mjs";
|
|
4
4
|
import { getDataSourceWithConcurrencyControl, getDictionaryWithConcurrencyControl } from "./simpleCache.mjs";
|
|
5
5
|
import api from "../api/index.mjs";
|
|
6
|
-
async function loadOptions(
|
|
6
|
+
async function loadOptions(ctx, config, callback) {
|
|
7
7
|
const { fieldType, optionConfig = {} } = config;
|
|
8
8
|
if (fieldType !== "select" && fieldType !== "multipleSelection" && fieldType !== "cascader" && fieldType !== "area" && fieldType !== "industry" && fieldType !== "radio" && fieldType !== "checkbox") {
|
|
9
9
|
const result = optionConfig.options || [];
|
|
@@ -13,7 +13,7 @@ async function loadOptions(ctx2, config, callback) {
|
|
|
13
13
|
const rawData = await getDataSourceWithConcurrencyControl(
|
|
14
14
|
"sysArea",
|
|
15
15
|
async () => {
|
|
16
|
-
const data = await api.getDataDicArea4Cascader(
|
|
16
|
+
const data = await api.getDataDicArea4Cascader(ctx.$http);
|
|
17
17
|
return data;
|
|
18
18
|
}
|
|
19
19
|
);
|
|
@@ -22,7 +22,7 @@ async function loadOptions(ctx2, config, callback) {
|
|
|
22
22
|
const rawData = await getDataSourceWithConcurrencyControl(
|
|
23
23
|
"sysIndustry",
|
|
24
24
|
async () => {
|
|
25
|
-
const data = await api.getDataDicTrade4Cascader(
|
|
25
|
+
const data = await api.getDataDicTrade4Cascader(ctx.$http);
|
|
26
26
|
return data;
|
|
27
27
|
}
|
|
28
28
|
);
|
|
@@ -42,6 +42,7 @@ async function loadOptions(ctx2, config, callback) {
|
|
|
42
42
|
try {
|
|
43
43
|
if (optionSource === "dataSource" && dataSourceValue) {
|
|
44
44
|
const result = await loadDataSourceOptions(
|
|
45
|
+
ctx,
|
|
45
46
|
dataSourceValue,
|
|
46
47
|
displayField,
|
|
47
48
|
valueField,
|
|
@@ -52,7 +53,7 @@ async function loadOptions(ctx2, config, callback) {
|
|
|
52
53
|
}
|
|
53
54
|
if (optionSource === "dictionary" && dictionaryValue) {
|
|
54
55
|
const result = await loadDictionaryOptions(
|
|
55
|
-
|
|
56
|
+
ctx,
|
|
56
57
|
dictionaryValue,
|
|
57
58
|
staticOptions
|
|
58
59
|
);
|
|
@@ -66,7 +67,7 @@ async function loadOptions(ctx2, config, callback) {
|
|
|
66
67
|
return staticOptions;
|
|
67
68
|
}
|
|
68
69
|
}
|
|
69
|
-
async function loadDataSourceOptions(dataSourceValue, displayField, valueField, fallbackOptions = []) {
|
|
70
|
+
async function loadDataSourceOptions(ctx, dataSourceValue, displayField, valueField, fallbackOptions = []) {
|
|
70
71
|
var _a, _b;
|
|
71
72
|
try {
|
|
72
73
|
const dataSources = getEditConfigDataSources();
|
|
@@ -105,11 +106,11 @@ async function loadDataSourceOptions(dataSourceValue, displayField, valueField,
|
|
|
105
106
|
return fallbackOptions;
|
|
106
107
|
}
|
|
107
108
|
}
|
|
108
|
-
async function loadDictionaryOptions(
|
|
109
|
+
async function loadDictionaryOptions(ctx, dictionaryValue, fallbackOptions = []) {
|
|
109
110
|
try {
|
|
110
111
|
const dictData = await getDictionaryWithConcurrencyControl(
|
|
111
112
|
dictionaryValue,
|
|
112
|
-
() => api.getDicDataByKey(
|
|
113
|
+
() => api.getDicDataByKey(ctx.$http, dictionaryValue)
|
|
113
114
|
);
|
|
114
115
|
const result = [];
|
|
115
116
|
for (const key in dictData) {
|
|
@@ -124,7 +125,7 @@ async function loadDictionaryOptions(ctx2, dictionaryValue, fallbackOptions = []
|
|
|
124
125
|
return fallbackOptions;
|
|
125
126
|
}
|
|
126
127
|
}
|
|
127
|
-
function useOptions(
|
|
128
|
+
function useOptions(ctx, config) {
|
|
128
129
|
const options = ref([]);
|
|
129
130
|
const loading = ref(false);
|
|
130
131
|
const configRef = isRef(config) ? config : ref(config);
|
|
@@ -135,7 +136,7 @@ function useOptions(ctx2, config) {
|
|
|
135
136
|
if (!newConfig) return;
|
|
136
137
|
loading.value = true;
|
|
137
138
|
try {
|
|
138
|
-
const result = await loadOptions(
|
|
139
|
+
const result = await loadOptions(ctx, newConfig);
|
|
139
140
|
options.value = result;
|
|
140
141
|
} catch (error) {
|
|
141
142
|
console.error("加载选项失败:", error);
|