@fecp/vue 1.1.7 → 1.1.8
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/packages/mobile/src/components/base/card/Card.vue.mjs +2 -2
- package/es/packages/vue/index.mjs +6 -0
- package/es/packages/vue/src/api/index.mjs +6 -0
- package/es/packages/vue/src/components/all.mjs +6 -0
- package/es/packages/vue/src/components/forms/area/Area.vue.mjs +92 -0
- package/es/packages/vue/src/components/forms/area/index.mjs +7 -0
- package/es/packages/vue/src/components/forms/cascader/Cascader.vue.mjs +168 -0
- package/es/packages/vue/src/components/forms/cascader/index.mjs +7 -0
- package/es/packages/vue/src/components/forms/form/Form.vue.mjs +22 -8
- package/es/packages/vue/src/components/forms/formItem/FormItem.vue.mjs +4 -24
- package/es/packages/vue/src/components/forms/index.mjs +40 -0
- package/es/packages/vue/src/components/forms/industry/Industry.vue.mjs +92 -0
- package/es/packages/vue/src/components/forms/industry/index.mjs +7 -0
- package/es/packages/vue/src/components/forms/number/Number.vue.mjs +27 -2
- package/es/packages/vue/src/components/forms/text/Text.vue.mjs +4 -3
- package/es/packages/vue/src/components/forms/text/index.mjs +2 -2
- package/es/packages/vue/src/components/forms/textarea/Textarea.vue.mjs +5 -2
- package/es/packages/vue/src/components/forms/textarea/index.mjs +2 -2
- package/es/packages/vue/src/components/table/Table.vue.mjs +3 -3
- package/es/packages/vue/src/components/table/TableColumn.vue.mjs +46 -30
- package/es/packages/vue/src/components/table/TableFilter.vue.mjs +3 -3
- package/es/packages/vue/src/utils/datasource.mjs +1 -1
- package/es/packages/vue/src/utils/eventFlow/actionHandlers.mjs +5 -1
- package/es/vue.css +71 -51
- package/lib/packages/mobile/src/components/base/card/Card.vue.js +2 -2
- package/lib/packages/vue/index.js +15 -9
- package/lib/packages/vue/src/api/index.js +6 -0
- package/lib/packages/vue/src/components/all.js +12 -6
- package/lib/packages/vue/src/components/forms/area/Area.vue.js +92 -0
- package/lib/packages/vue/src/components/forms/area/index.js +7 -0
- package/lib/packages/vue/src/components/forms/cascader/Cascader.vue.js +168 -0
- package/lib/packages/vue/src/components/forms/cascader/index.js +7 -0
- package/lib/packages/vue/src/components/forms/form/Form.vue.js +22 -8
- package/lib/packages/vue/src/components/forms/formItem/FormItem.vue.js +16 -36
- package/lib/packages/vue/src/components/forms/index.js +40 -0
- package/lib/packages/vue/src/components/forms/industry/Industry.vue.js +92 -0
- package/lib/packages/vue/src/components/forms/industry/index.js +7 -0
- package/lib/packages/vue/src/components/forms/number/Number.vue.js +26 -1
- package/lib/packages/vue/src/components/forms/text/Text.vue.js +3 -2
- package/lib/packages/vue/src/components/forms/textarea/Textarea.vue.js +5 -2
- package/lib/packages/vue/src/components/table/Table.vue.js +3 -3
- package/lib/packages/vue/src/components/table/TableColumn.vue.js +45 -29
- package/lib/packages/vue/src/components/table/TableFilter.vue.js +3 -3
- package/lib/packages/vue/src/utils/datasource.js +1 -1
- package/lib/packages/vue/src/utils/eventFlow/actionHandlers.js +5 -1
- package/lib/vue.css +71 -51
- package/package.json +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
|
|
3
3
|
const all = require("./src/components/all.js");
|
|
4
|
-
const index$
|
|
4
|
+
const index$o = require("../mobile/index.js");
|
|
5
5
|
const zhCn = require("../../node_modules/.pnpm/element-plus@2.13.2_vue@3.5.13_typescript@5.7.3_/node_modules/element-plus/es/locale/lang/zh-cn.js");
|
|
6
6
|
require("../../node_modules/.pnpm/element-plus@2.13.2_vue@3.5.13_typescript@5.7.3_/node_modules/element-plus/es/index.js");
|
|
7
7
|
const components = require("../../node_modules/.pnpm/vxe-pc-ui@4.12.28_vue@3.5.13_typescript@5.7.3_/node_modules/vxe-pc-ui/es/components.js");
|
|
@@ -25,17 +25,20 @@ const index$e = require("./src/components/forms/divider/index.js");
|
|
|
25
25
|
const index$f = require("./src/components/forms/h2/index.js");
|
|
26
26
|
const index$g = require("./src/components/forms/subForm/index.js");
|
|
27
27
|
const index$h = require("./src/components/forms/subTable/index.js");
|
|
28
|
-
const index$i = require("./src/components/
|
|
29
|
-
const index$j = require("./src/components/
|
|
30
|
-
const index$k = require("./src/components/
|
|
28
|
+
const index$i = require("./src/components/forms/cascader/index.js");
|
|
29
|
+
const index$j = require("./src/components/forms/area/index.js");
|
|
30
|
+
const index$k = require("./src/components/forms/industry/index.js");
|
|
31
|
+
const index$l = require("./src/components/details/header/index.js");
|
|
32
|
+
const index$m = require("./src/components/details/footer/index.js");
|
|
33
|
+
const index$n = require("./src/components/details/main/index.js");
|
|
31
34
|
const index = {
|
|
32
35
|
install: (app) => {
|
|
33
36
|
for (let c in all) {
|
|
34
37
|
app.use(all[c]);
|
|
35
38
|
}
|
|
36
|
-
for (let c in index$
|
|
39
|
+
for (let c in index$o) {
|
|
37
40
|
if (c.startsWith("Mobile")) {
|
|
38
|
-
app.use(index$
|
|
41
|
+
app.use(index$o[c]);
|
|
39
42
|
}
|
|
40
43
|
}
|
|
41
44
|
app.use(defaults.default, {
|
|
@@ -61,7 +64,10 @@ exports.Divider = index$e.Divider;
|
|
|
61
64
|
exports.H2 = index$f.H2;
|
|
62
65
|
exports.SubForm = index$g.SubForm;
|
|
63
66
|
exports.SubTable = index$h.SubTable;
|
|
64
|
-
exports.
|
|
65
|
-
exports.
|
|
66
|
-
exports.
|
|
67
|
+
exports.Cascader = index$i.Cascader;
|
|
68
|
+
exports.Area = index$j.Area;
|
|
69
|
+
exports.Industry = index$k.Industry;
|
|
70
|
+
exports.header = index$l.header;
|
|
71
|
+
exports.footer = index$m.footer;
|
|
72
|
+
exports.main = index$n.main;
|
|
67
73
|
exports.default = index;
|
|
@@ -3,6 +3,12 @@ Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toString
|
|
|
3
3
|
const api = {
|
|
4
4
|
findByTemplateKey: ($http, data) => {
|
|
5
5
|
return $http.post(`${$servers.base}/template/sysTemplate/findByTemplateKey`, data);
|
|
6
|
+
},
|
|
7
|
+
getDataDicArea4Cascader: ($http) => {
|
|
8
|
+
return $http.post(`${$servers.base}/parm/sysParmDic/getDataDicArea4Cascader`);
|
|
9
|
+
},
|
|
10
|
+
getDataDicTrade4Cascader: ($http) => {
|
|
11
|
+
return $http.post(`${$servers.base}/parm/sysParmDic/getDataDicTrade4Cascader`);
|
|
6
12
|
}
|
|
7
13
|
};
|
|
8
14
|
exports.default = api;
|
|
@@ -17,9 +17,12 @@ const index$d = require("./forms/divider/index.js");
|
|
|
17
17
|
const index$e = require("./forms/h2/index.js");
|
|
18
18
|
const index$f = require("./forms/subForm/index.js");
|
|
19
19
|
const index$g = require("./forms/subTable/index.js");
|
|
20
|
-
const index$h = require("./
|
|
21
|
-
const index$i = require("./
|
|
22
|
-
const index$j = require("./
|
|
20
|
+
const index$h = require("./forms/cascader/index.js");
|
|
21
|
+
const index$i = require("./forms/area/index.js");
|
|
22
|
+
const index$j = require("./forms/industry/index.js");
|
|
23
|
+
const index$k = require("./details/header/index.js");
|
|
24
|
+
const index$l = require("./details/footer/index.js");
|
|
25
|
+
const index$m = require("./details/main/index.js");
|
|
23
26
|
exports.Table = index.Table;
|
|
24
27
|
exports.Form = index$1.Form;
|
|
25
28
|
exports.FormItem = index$2.FormItem;
|
|
@@ -37,6 +40,9 @@ exports.Divider = index$d.Divider;
|
|
|
37
40
|
exports.H2 = index$e.H2;
|
|
38
41
|
exports.SubForm = index$f.SubForm;
|
|
39
42
|
exports.SubTable = index$g.SubTable;
|
|
40
|
-
exports.
|
|
41
|
-
exports.
|
|
42
|
-
exports.
|
|
43
|
+
exports.Cascader = index$h.Cascader;
|
|
44
|
+
exports.Area = index$i.Area;
|
|
45
|
+
exports.Industry = index$j.Industry;
|
|
46
|
+
exports.header = index$k.header;
|
|
47
|
+
exports.footer = index$l.footer;
|
|
48
|
+
exports.main = index$m.main;
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
|
|
3
|
+
const vue = require("vue");
|
|
4
|
+
const index$1 = require("../cascader/index.js");
|
|
5
|
+
const getInstance = require("../../../utils/getInstance.js");
|
|
6
|
+
const index = require("../../../api/index.js");
|
|
7
|
+
const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
8
|
+
inheritAttrs: false
|
|
9
|
+
}, {
|
|
10
|
+
__name: "Area",
|
|
11
|
+
props: {
|
|
12
|
+
config: {
|
|
13
|
+
type: Object,
|
|
14
|
+
required: true
|
|
15
|
+
},
|
|
16
|
+
modelValue: {
|
|
17
|
+
type: [String, Number, Array],
|
|
18
|
+
default: ""
|
|
19
|
+
},
|
|
20
|
+
placeholder: {
|
|
21
|
+
type: String,
|
|
22
|
+
default: "请选择"
|
|
23
|
+
},
|
|
24
|
+
disabled: {
|
|
25
|
+
type: Boolean,
|
|
26
|
+
default: false
|
|
27
|
+
},
|
|
28
|
+
readonly: {
|
|
29
|
+
type: Boolean,
|
|
30
|
+
default: false
|
|
31
|
+
},
|
|
32
|
+
multiple: {
|
|
33
|
+
type: Boolean,
|
|
34
|
+
default: false
|
|
35
|
+
},
|
|
36
|
+
showFullPath: {
|
|
37
|
+
type: Boolean,
|
|
38
|
+
default: true
|
|
39
|
+
},
|
|
40
|
+
maxLevel: {
|
|
41
|
+
type: Number,
|
|
42
|
+
default: 10
|
|
43
|
+
},
|
|
44
|
+
checkStrictly: {
|
|
45
|
+
type: Boolean,
|
|
46
|
+
default: false
|
|
47
|
+
}
|
|
48
|
+
},
|
|
49
|
+
emits: ["update:modelValue", "change"],
|
|
50
|
+
setup(__props, { emit: __emit }) {
|
|
51
|
+
const props = __props;
|
|
52
|
+
const emit = __emit;
|
|
53
|
+
const propsData = vue.ref({
|
|
54
|
+
value: "optCode",
|
|
55
|
+
label: "optName"
|
|
56
|
+
});
|
|
57
|
+
const ctx = getInstance.getCurrentVueInstance();
|
|
58
|
+
const inputValue = vue.computed({
|
|
59
|
+
get: () => {
|
|
60
|
+
return props.modelValue;
|
|
61
|
+
},
|
|
62
|
+
set: (val) => {
|
|
63
|
+
emit("update:modelValue", val);
|
|
64
|
+
emit("change", val);
|
|
65
|
+
}
|
|
66
|
+
});
|
|
67
|
+
const optionConfig = vue.ref({
|
|
68
|
+
idField: "dicId",
|
|
69
|
+
pidField: "pdicId"
|
|
70
|
+
});
|
|
71
|
+
index.default.getDataDicArea4Cascader(ctx.$http).then((data) => {
|
|
72
|
+
optionConfig.value.options = data;
|
|
73
|
+
});
|
|
74
|
+
return (_ctx, _cache) => {
|
|
75
|
+
return vue.openBlock(), vue.createBlock(vue.unref(index$1.Cascader), {
|
|
76
|
+
modelValue: vue.unref(inputValue),
|
|
77
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => vue.isRef(inputValue) ? inputValue.value = $event : null),
|
|
78
|
+
config: __props.config,
|
|
79
|
+
placeholder: __props.placeholder,
|
|
80
|
+
showFullPath: __props.showFullPath,
|
|
81
|
+
disabled: __props.disabled,
|
|
82
|
+
readonly: __props.readonly,
|
|
83
|
+
optionConfig: vue.unref(optionConfig),
|
|
84
|
+
multiple: __props.multiple,
|
|
85
|
+
maxLevel: __props.maxLevel,
|
|
86
|
+
propsData: vue.unref(propsData),
|
|
87
|
+
checkStrictly: __props.checkStrictly
|
|
88
|
+
}, null, 8, ["modelValue", "config", "placeholder", "showFullPath", "disabled", "readonly", "optionConfig", "multiple", "maxLevel", "propsData", "checkStrictly"]);
|
|
89
|
+
};
|
|
90
|
+
}
|
|
91
|
+
});
|
|
92
|
+
exports.default = _sfc_main;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
|
|
3
|
+
const Area$1 = require("./Area.vue.js");
|
|
4
|
+
const install = require("../../../utils/install.js");
|
|
5
|
+
const Area = install.default.withInstall("Area", Area$1.default);
|
|
6
|
+
exports.Area = Area;
|
|
7
|
+
exports.default = Area;
|
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
|
|
3
|
+
;/* empty css */
|
|
4
|
+
;/* empty css */
|
|
5
|
+
;/* empty css */
|
|
6
|
+
;/* empty css */
|
|
7
|
+
;/* empty css */
|
|
8
|
+
;/* empty css */
|
|
9
|
+
;/* empty css */
|
|
10
|
+
;/* empty css */
|
|
11
|
+
;/* empty css */
|
|
12
|
+
const vue = require("vue");
|
|
13
|
+
const index = require("../../../../../../node_modules/.pnpm/element-plus@2.13.2_vue@3.5.13_typescript@5.7.3_/node_modules/element-plus/es/components/cascader/index.js");
|
|
14
|
+
const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
15
|
+
inheritAttrs: false
|
|
16
|
+
}, {
|
|
17
|
+
__name: "Cascader",
|
|
18
|
+
props: {
|
|
19
|
+
config: {
|
|
20
|
+
type: Object,
|
|
21
|
+
required: true
|
|
22
|
+
},
|
|
23
|
+
modelValue: {
|
|
24
|
+
type: [String, Number, Array],
|
|
25
|
+
default: ""
|
|
26
|
+
},
|
|
27
|
+
placeholder: {
|
|
28
|
+
type: String,
|
|
29
|
+
default: "请选择"
|
|
30
|
+
},
|
|
31
|
+
disabled: {
|
|
32
|
+
type: Boolean,
|
|
33
|
+
default: false
|
|
34
|
+
},
|
|
35
|
+
readonly: {
|
|
36
|
+
type: Boolean,
|
|
37
|
+
default: false
|
|
38
|
+
},
|
|
39
|
+
optionConfig: {
|
|
40
|
+
type: Object,
|
|
41
|
+
default: () => ({})
|
|
42
|
+
},
|
|
43
|
+
multiple: {
|
|
44
|
+
type: Boolean,
|
|
45
|
+
default: false
|
|
46
|
+
},
|
|
47
|
+
showFullPath: {
|
|
48
|
+
type: Boolean,
|
|
49
|
+
default: true
|
|
50
|
+
},
|
|
51
|
+
maxLevel: {
|
|
52
|
+
type: Number,
|
|
53
|
+
default: 10
|
|
54
|
+
},
|
|
55
|
+
propsData: {
|
|
56
|
+
type: Object,
|
|
57
|
+
default: () => ({})
|
|
58
|
+
},
|
|
59
|
+
checkStrictly: {
|
|
60
|
+
type: Boolean,
|
|
61
|
+
default: false
|
|
62
|
+
}
|
|
63
|
+
},
|
|
64
|
+
emits: ["update:modelValue", "change"],
|
|
65
|
+
setup(__props, { emit: __emit }) {
|
|
66
|
+
const props = __props;
|
|
67
|
+
const formData = vue.inject("formData");
|
|
68
|
+
const emit = __emit;
|
|
69
|
+
const cascaderRef = vue.ref(null);
|
|
70
|
+
const propsDataValue = vue.computed(() => {
|
|
71
|
+
return {
|
|
72
|
+
...props.propsData,
|
|
73
|
+
multiple: props.multiple,
|
|
74
|
+
checkStrictly: props.checkStrictly
|
|
75
|
+
};
|
|
76
|
+
});
|
|
77
|
+
const inputValue = vue.computed({
|
|
78
|
+
get: () => {
|
|
79
|
+
return props.modelValue;
|
|
80
|
+
},
|
|
81
|
+
set: (val) => {
|
|
82
|
+
emit("update:modelValue", val);
|
|
83
|
+
emit("change", val);
|
|
84
|
+
}
|
|
85
|
+
});
|
|
86
|
+
vue.watch(inputValue, (val) => {
|
|
87
|
+
if (props.config.displayFieldName && val) {
|
|
88
|
+
vue.nextTick(() => {
|
|
89
|
+
const displayValue = getDisplayPath();
|
|
90
|
+
console.log("🚀 ~ displayValue:", displayValue);
|
|
91
|
+
formData.value[props.config.displayFieldName] = displayValue;
|
|
92
|
+
});
|
|
93
|
+
}
|
|
94
|
+
});
|
|
95
|
+
const getDisplayPath = () => {
|
|
96
|
+
let checkedNodes = cascaderRef.value.getCheckedNodes();
|
|
97
|
+
let textArr = [];
|
|
98
|
+
checkedNodes.forEach((item) => {
|
|
99
|
+
let label;
|
|
100
|
+
if (props.showFullPath) {
|
|
101
|
+
label = item.text;
|
|
102
|
+
} else {
|
|
103
|
+
let pathLabels = item.pathLabels;
|
|
104
|
+
label = pathLabels[pathLabels.length - 1];
|
|
105
|
+
}
|
|
106
|
+
if (label) {
|
|
107
|
+
textArr.push(label);
|
|
108
|
+
}
|
|
109
|
+
});
|
|
110
|
+
return textArr.join("|");
|
|
111
|
+
};
|
|
112
|
+
const options = vue.computed(() => {
|
|
113
|
+
if (!props.optionConfig) return [];
|
|
114
|
+
const optionList = props.optionConfig.options || [];
|
|
115
|
+
if (optionList.length > 0) {
|
|
116
|
+
return flatToTree(
|
|
117
|
+
optionList,
|
|
118
|
+
props.optionConfig.idField,
|
|
119
|
+
props.optionConfig.pidField,
|
|
120
|
+
props.maxLevel
|
|
121
|
+
);
|
|
122
|
+
}
|
|
123
|
+
return optionList;
|
|
124
|
+
});
|
|
125
|
+
function flatToTree(list, idKey = "id", pidKey = "pid", maxLevel = 10) {
|
|
126
|
+
const data = JSON.parse(JSON.stringify(list));
|
|
127
|
+
const nodeMap = {};
|
|
128
|
+
data.forEach((node) => {
|
|
129
|
+
nodeMap[node[idKey]] = node;
|
|
130
|
+
node.children = node.children || [];
|
|
131
|
+
node.level = 1;
|
|
132
|
+
});
|
|
133
|
+
const tree = [];
|
|
134
|
+
data.forEach((node) => {
|
|
135
|
+
const parentId = node[pidKey];
|
|
136
|
+
const parentNode = nodeMap[parentId];
|
|
137
|
+
if (parentNode && parentNode.level < maxLevel) {
|
|
138
|
+
node.level = parentNode.level + 1;
|
|
139
|
+
parentNode.children.push(node);
|
|
140
|
+
} else {
|
|
141
|
+
tree.push(node);
|
|
142
|
+
}
|
|
143
|
+
});
|
|
144
|
+
return tree;
|
|
145
|
+
}
|
|
146
|
+
return (_ctx, _cache) => {
|
|
147
|
+
const _component_el_cascader = index.ElCascader;
|
|
148
|
+
return vue.openBlock(), vue.createBlock(_component_el_cascader, vue.mergeProps({
|
|
149
|
+
modelValue: inputValue.value,
|
|
150
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => inputValue.value = $event)
|
|
151
|
+
}, vue.toHandlers(__props.config.eventHandlers), {
|
|
152
|
+
options: options.value,
|
|
153
|
+
props: propsDataValue.value,
|
|
154
|
+
ref_key: "cascaderRef",
|
|
155
|
+
ref: cascaderRef,
|
|
156
|
+
clearable: "",
|
|
157
|
+
filterable: "",
|
|
158
|
+
disabled: __props.disabled,
|
|
159
|
+
placeholder: __props.placeholder,
|
|
160
|
+
"show-all-levels": __props.showFullPath,
|
|
161
|
+
style: [{ "width": "100%" }, {
|
|
162
|
+
pointerEvents: __props.readonly ? "none" : "auto"
|
|
163
|
+
}]
|
|
164
|
+
}), null, 16, ["modelValue", "options", "props", "disabled", "placeholder", "show-all-levels", "style"]);
|
|
165
|
+
};
|
|
166
|
+
}
|
|
167
|
+
});
|
|
168
|
+
exports.default = _sfc_main;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
|
|
3
|
+
const Cascader$1 = require("./Cascader.vue.js");
|
|
4
|
+
const install = require("../../../utils/install.js");
|
|
5
|
+
const Cascader = install.default.withInstall("Cascader", Cascader$1.default);
|
|
6
|
+
exports.Cascader = Cascader;
|
|
7
|
+
exports.default = Cascader;
|
|
@@ -177,7 +177,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
177
177
|
const dictionaryKeys = /* @__PURE__ */ new Set();
|
|
178
178
|
for (const component of fields) {
|
|
179
179
|
const fieldType = component.fieldType;
|
|
180
|
-
if ((fieldType === "select" || fieldType === "multipleSelection" || fieldType === "radio" || fieldType === "checkbox") && component.optionConfig) {
|
|
180
|
+
if ((fieldType === "select" || fieldType === "multipleSelection" || fieldType === "radio" || fieldType === "checkbox" || fieldType === "cascader") && component.optionConfig) {
|
|
181
181
|
const { optionSource, dataSourceValue, dictionaryValue } = component.optionConfig;
|
|
182
182
|
if (optionSource === "dataSource" && dataSourceValue) {
|
|
183
183
|
fieldDataSources.add(dataSourceValue);
|
|
@@ -243,7 +243,9 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
243
243
|
dataSourceValue,
|
|
244
244
|
dictionaryValue,
|
|
245
245
|
displayField,
|
|
246
|
-
valueField
|
|
246
|
+
valueField,
|
|
247
|
+
idField,
|
|
248
|
+
pidField
|
|
247
249
|
} = component.optionConfig;
|
|
248
250
|
if (optionSource === "dataSource" && dataSourceOptions.value[dataSourceValue]) {
|
|
249
251
|
const rawOptions = dataSourceOptions.value[dataSourceValue];
|
|
@@ -252,7 +254,8 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
252
254
|
component.optionConfig.options = rawOptions.map((item) => ({
|
|
253
255
|
label: item[labelField],
|
|
254
256
|
value: item[keyField],
|
|
255
|
-
disabled: item.disabled || false
|
|
257
|
+
disabled: item.disabled || false,
|
|
258
|
+
...item
|
|
256
259
|
}));
|
|
257
260
|
} else if (optionSource === "dictionary" && dictionaryOptions.value[dictionaryValue]) {
|
|
258
261
|
const rawOptions = dictionaryOptions.value[dictionaryValue];
|
|
@@ -300,7 +303,11 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
300
303
|
let gridLayoutData = common.cloneDeep(localConfig.value.fieldsData || []);
|
|
301
304
|
gridLayoutData = gridLayoutData.map((item) => {
|
|
302
305
|
item.isResizable = false;
|
|
303
|
-
|
|
306
|
+
const component = item.component;
|
|
307
|
+
if (component.fieldType == "divider" || component.fieldType == "h2") {
|
|
308
|
+
item.y = item.y * 40;
|
|
309
|
+
item.h = item.h * 40;
|
|
310
|
+
} else if (!item.fixedH) {
|
|
304
311
|
item.y = item.y * 60;
|
|
305
312
|
item.h = item.h * 60;
|
|
306
313
|
}
|
|
@@ -462,7 +469,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
462
469
|
const fieldName = field.fieldName;
|
|
463
470
|
const fieldType = field.fieldType;
|
|
464
471
|
const value = result[fieldName];
|
|
465
|
-
if (fieldName && (fieldType === "checkbox" || fieldType === "multipleSelection")) {
|
|
472
|
+
if (fieldName && (fieldType === "checkbox" || fieldType === "multipleSelection" || fieldType === "cascader" || fieldType === "area" || fieldType === "industry")) {
|
|
466
473
|
if (Array.isArray(value)) {
|
|
467
474
|
result[fieldName] = value.join("|");
|
|
468
475
|
}
|
|
@@ -490,7 +497,7 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
490
497
|
const fieldName = field.fieldName;
|
|
491
498
|
const fieldType = field.fieldType;
|
|
492
499
|
const value = processedData[fieldName];
|
|
493
|
-
if (fieldName && (fieldType === "checkbox" || fieldType === "multipleSelection")) {
|
|
500
|
+
if (fieldName && (fieldType === "checkbox" || fieldType === "multipleSelection" || fieldType === "cascader" || fieldType === "area" || fieldType === "industry")) {
|
|
494
501
|
if (typeof value === "string" && value.includes("|")) {
|
|
495
502
|
processedData[fieldName] = value.split("|");
|
|
496
503
|
} else if (typeof value === "string" && value !== "") {
|
|
@@ -498,6 +505,12 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
498
505
|
} else if (value === "" || value === null || value === void 0) {
|
|
499
506
|
processedData[fieldName] = [];
|
|
500
507
|
}
|
|
508
|
+
processedData[fieldName] = processedData[fieldName].map((item) => {
|
|
509
|
+
if (item.indexOf(",") > -1) {
|
|
510
|
+
return item.split(",");
|
|
511
|
+
}
|
|
512
|
+
return item;
|
|
513
|
+
});
|
|
501
514
|
} else if (fieldName && fieldType === "date" && value) {
|
|
502
515
|
const valueFormat = valueFormatMap[field.dateType] || "YYYYMMDD";
|
|
503
516
|
const formValueFormat = formValueFormatMap[field.dateType] || "YYYY-MM-DD";
|
|
@@ -547,7 +560,8 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
547
560
|
class: "fec-form",
|
|
548
561
|
"data-id": localConfig.value.templateKey,
|
|
549
562
|
"data-name": localConfig.value.templateName,
|
|
550
|
-
"data-pkId": localConfig.value.pkId
|
|
563
|
+
"data-pkId": localConfig.value.pkId,
|
|
564
|
+
"data-version": "v5"
|
|
551
565
|
}, {
|
|
552
566
|
default: vue.withCtx(() => [
|
|
553
567
|
!configLoading.value && !__props.isSubForm ? (vue.openBlock(), vue.createBlock(vue.unref(index$1.header), {
|
|
@@ -616,5 +630,5 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
616
630
|
};
|
|
617
631
|
}
|
|
618
632
|
});
|
|
619
|
-
const _Form = /* @__PURE__ */ _pluginVue_exportHelper.default(_sfc_main, [["__scopeId", "data-v-
|
|
633
|
+
const _Form = /* @__PURE__ */ _pluginVue_exportHelper.default(_sfc_main, [["__scopeId", "data-v-caaa182c"]]);
|
|
620
634
|
exports.default = _Form;
|
|
@@ -6,24 +6,15 @@ require("../../../../../../node_modules/.pnpm/element-plus@2.13.2_vue@3.5.13_typ
|
|
|
6
6
|
;/* empty css */
|
|
7
7
|
const vue = require("vue");
|
|
8
8
|
const debounce = require("../form/debounce.js");
|
|
9
|
-
const index$
|
|
10
|
-
const index = require("../h2/index.js");
|
|
11
|
-
const index$
|
|
12
|
-
const index$
|
|
13
|
-
const
|
|
14
|
-
const Textarea = require("../textarea/Textarea.vue.js");
|
|
15
|
-
const Number$1 = require("../number/Number.vue.js");
|
|
16
|
-
const Date = require("../date/Date.vue.js");
|
|
17
|
-
const Select = require("../select/Select.vue.js");
|
|
18
|
-
const MultipleSelection = require("../multipleSelection/MultipleSelection.vue.js");
|
|
19
|
-
const Radio = require("../radio/Radio.vue.js");
|
|
20
|
-
const Checkbox = require("../checkbox/Checkbox.vue.js");
|
|
21
|
-
const Switch = require("../switch/Switch.vue.js");
|
|
22
|
-
const Upload = require("../upload/Upload.vue.js");
|
|
9
|
+
const index$2 = require("../divider/index.js");
|
|
10
|
+
const index$1 = require("../h2/index.js");
|
|
11
|
+
const index$3 = require("../subForm/index.js");
|
|
12
|
+
const index$4 = require("../subTable/index.js");
|
|
13
|
+
const index = require("../index.js");
|
|
23
14
|
;/* empty css */
|
|
24
15
|
const _pluginVue_exportHelper = require("../../../../../../_virtual/_plugin-vue_export-helper.js");
|
|
25
|
-
const index$
|
|
26
|
-
const index$
|
|
16
|
+
const index$5 = require("../../../../../../node_modules/.pnpm/element-plus@2.13.2_vue@3.5.13_typescript@5.7.3_/node_modules/element-plus/es/components/form/index.js");
|
|
17
|
+
const index$6 = require("../../../../../../node_modules/.pnpm/element-plus@2.13.2_vue@3.5.13_typescript@5.7.3_/node_modules/element-plus/es/components/tooltip/index.js");
|
|
27
18
|
const _hoisted_1 = {
|
|
28
19
|
key: 0,
|
|
29
20
|
class: "iconfont icon-iconZheng credit-icon"
|
|
@@ -65,20 +56,9 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
65
56
|
function handleChange(config, val) {
|
|
66
57
|
emit("change", config, val);
|
|
67
58
|
}
|
|
68
|
-
const componentMap = {
|
|
69
|
-
text: Text.default,
|
|
70
|
-
textarea: Textarea.default,
|
|
71
|
-
number: Number$1.default,
|
|
72
|
-
date: Date.default,
|
|
73
|
-
select: Select.default,
|
|
74
|
-
multipleSelection: MultipleSelection.default,
|
|
75
|
-
radio: Radio.default,
|
|
76
|
-
checkbox: Checkbox.default,
|
|
77
|
-
switch: Switch.default,
|
|
78
|
-
upload: Upload.default
|
|
79
|
-
};
|
|
80
59
|
const componentType = vue.computed(() => {
|
|
81
|
-
|
|
60
|
+
const key = props.config.fieldType.charAt(0).toUpperCase() + props.config.fieldType.slice(1);
|
|
61
|
+
return index[key];
|
|
82
62
|
});
|
|
83
63
|
const componentProps = vue.computed(() => {
|
|
84
64
|
const fieldProps = { ...props.config };
|
|
@@ -114,19 +94,19 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
114
94
|
}
|
|
115
95
|
});
|
|
116
96
|
return (_ctx, _cache) => {
|
|
117
|
-
const _component_el_tooltip = index$
|
|
118
|
-
const _component_el_form_item = index$
|
|
119
|
-
return __props.config.fieldType == "h2" ? (vue.openBlock(), vue.createBlock(vue.unref(index.H2), {
|
|
97
|
+
const _component_el_tooltip = index$6.ElTooltip;
|
|
98
|
+
const _component_el_form_item = index$5.ElFormItem;
|
|
99
|
+
return __props.config.fieldType == "h2" ? (vue.openBlock(), vue.createBlock(vue.unref(index$1.H2), {
|
|
120
100
|
key: 0,
|
|
121
101
|
config: __props.config
|
|
122
|
-
}, null, 8, ["config"])) : __props.config.fieldType == "divider" ? (vue.openBlock(), vue.createBlock(vue.unref(index$
|
|
102
|
+
}, null, 8, ["config"])) : __props.config.fieldType == "divider" ? (vue.openBlock(), vue.createBlock(vue.unref(index$2.Divider), {
|
|
123
103
|
key: 1,
|
|
124
104
|
config: __props.config
|
|
125
|
-
}, null, 8, ["config"])) : __props.config.fieldType == "subForm" ? (vue.openBlock(), vue.createBlock(vue.unref(index$
|
|
105
|
+
}, null, 8, ["config"])) : __props.config.fieldType == "subForm" ? (vue.openBlock(), vue.createBlock(vue.unref(index$3.SubForm), {
|
|
126
106
|
key: 2,
|
|
127
107
|
config: __props.config,
|
|
128
108
|
localConfig: __props.localConfig
|
|
129
|
-
}, null, 8, ["config", "localConfig"])) : __props.config.fieldType == "subTable" ? (vue.openBlock(), vue.createBlock(vue.unref(index$
|
|
109
|
+
}, null, 8, ["config", "localConfig"])) : __props.config.fieldType == "subTable" ? (vue.openBlock(), vue.createBlock(vue.unref(index$4.SubTable), {
|
|
130
110
|
key: 3,
|
|
131
111
|
config: __props.config,
|
|
132
112
|
localConfig: __props.localConfig
|
|
@@ -177,5 +157,5 @@ const _sfc_main = /* @__PURE__ */ Object.assign({
|
|
|
177
157
|
};
|
|
178
158
|
}
|
|
179
159
|
});
|
|
180
|
-
const _FormItem = /* @__PURE__ */ _pluginVue_exportHelper.default(_sfc_main, [["__scopeId", "data-v-
|
|
160
|
+
const _FormItem = /* @__PURE__ */ _pluginVue_exportHelper.default(_sfc_main, [["__scopeId", "data-v-7ba9115b"]]);
|
|
181
161
|
exports.default = _FormItem;
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const index = require("./form/index.js");
|
|
4
|
+
const index$1 = require("./formItem/index.js");
|
|
5
|
+
const index$2 = require("./text/index.js");
|
|
6
|
+
const index$3 = require("./textarea/index.js");
|
|
7
|
+
const index$4 = require("./number/index.js");
|
|
8
|
+
const index$5 = require("./date/index.js");
|
|
9
|
+
const index$6 = require("./select/index.js");
|
|
10
|
+
const index$7 = require("./multipleSelection/index.js");
|
|
11
|
+
const index$8 = require("./radio/index.js");
|
|
12
|
+
const index$9 = require("./checkbox/index.js");
|
|
13
|
+
const index$a = require("./switch/index.js");
|
|
14
|
+
const index$b = require("./upload/index.js");
|
|
15
|
+
const index$c = require("./divider/index.js");
|
|
16
|
+
const index$d = require("./h2/index.js");
|
|
17
|
+
const index$e = require("./subForm/index.js");
|
|
18
|
+
const index$f = require("./subTable/index.js");
|
|
19
|
+
const index$g = require("./cascader/index.js");
|
|
20
|
+
const index$h = require("./area/index.js");
|
|
21
|
+
const index$i = require("./industry/index.js");
|
|
22
|
+
exports.Form = index.Form;
|
|
23
|
+
exports.FormItem = index$1.FormItem;
|
|
24
|
+
exports.Text = index$2.Text;
|
|
25
|
+
exports.Textarea = index$3.Textarea;
|
|
26
|
+
exports.Number = index$4.Number;
|
|
27
|
+
exports.Date = index$5.Date;
|
|
28
|
+
exports.Select = index$6.Select;
|
|
29
|
+
exports.MultipleSelection = index$7.MultipleSelection;
|
|
30
|
+
exports.Radio = index$8.Radio;
|
|
31
|
+
exports.Checkbox = index$9.Checkbox;
|
|
32
|
+
exports.Switch = index$a.Switch;
|
|
33
|
+
exports.Upload = index$b.Upload;
|
|
34
|
+
exports.Divider = index$c.Divider;
|
|
35
|
+
exports.H2 = index$d.H2;
|
|
36
|
+
exports.SubForm = index$e.SubForm;
|
|
37
|
+
exports.SubTable = index$f.SubTable;
|
|
38
|
+
exports.Cascader = index$g.Cascader;
|
|
39
|
+
exports.Area = index$h.Area;
|
|
40
|
+
exports.Industry = index$i.Industry;
|