bm-admin-ui 1.0.22-alpha → 1.0.24-alpha
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/components/button/index.d.ts +307 -0
- package/es/components/button/src/button.d.ts +12 -0
- package/es/components/button/src/button.vue.d.ts +308 -0
- package/es/components/feedback/index.d.ts +1037 -0
- package/es/components/feedback/index.js +1306 -25
- package/es/components/feedback/src/bmAlert.vue.d.ts +193 -0
- package/es/components/feedback/src/bmModal.vue.d.ts +839 -0
- package/es/components/float-table/index.d.ts +70 -0
- package/es/components/float-table/index.js +28 -37
- package/es/components/float-table/src/float-table.vue.d.ts +69 -0
- package/es/components/flow-designer/index.d.ts +7 -0
- package/es/components/flow-designer/src/flow-designer.vue.d.ts +6 -0
- package/es/components/form-designer/index.d.ts +9 -0
- package/es/components/form-designer/index.js +9 -4178
- package/es/components/form-designer/src/form-designer.vue.d.ts +8 -0
- package/es/components/index.d.ts +13 -0
- package/es/components/index.js +0 -1
- package/es/components/input-tags-display/index.d.ts +113 -0
- package/es/components/input-tags-display/index.js +1187 -27
- package/es/components/input-tags-display/src/input-tags-display.vue.d.ts +110 -0
- package/es/components/multi-cascader-compose/index.d.ts +164 -0
- package/es/components/multi-cascader-compose/index.js +1199 -31
- package/es/components/multi-cascader-compose/src/multi-cascader-compose.vue.d.ts +164 -0
- package/es/components/multi-cascader-compose/src/props.d.ts +40 -0
- package/es/components/multi-cascader-compose/types.d.ts +10 -0
- package/es/components/over-tooltips/index.d.ts +35 -0
- package/es/components/over-tooltips/index.js +20 -27
- package/es/components/over-tooltips/src/over-tooltips.vue.d.ts +34 -0
- package/es/components/search-filter/index.d.ts +222 -0
- package/es/components/search-filter/index.js +1269 -57
- package/es/components/search-filter/src/search-filter.d.ts +77 -0
- package/es/components/search-filter/src/search-filter.vue.d.ts +221 -0
- package/es/components/search-filter/src/search-reset-btn.vue.d.ts +89 -0
- package/es/components/shops-filter/index.d.ts +99 -0
- package/es/components/shops-filter/index.js +1182 -24
- package/es/components/shops-filter/src/shops-filter.d.ts +25 -0
- package/es/components/shops-filter/src/shops-filter.vue.d.ts +98 -0
- package/es/components/staffs-selector/index.d.ts +109 -0
- package/es/components/staffs-selector/index.js +1241 -131
- package/es/components/staffs-selector/src/multipleCmp.vue.d.ts +97 -0
- package/es/components/staffs-selector/src/radioCmp.vue.d.ts +31 -0
- package/es/components/staffs-selector/src/staffs-selector.vue.d.ts +108 -0
- package/es/components/staffs-selector/src/variedCmp.vue.d.ts +62 -0
- package/es/components/timeline/index.d.ts +107 -0
- package/es/components/timeline/index.js +6 -6
- package/es/components/timeline/src/props.d.ts +24 -0
- package/es/components/timeline/src/timeline-item.vue.d.ts +65 -0
- package/es/components/timeline/src/timeline.vue.d.ts +42 -0
- package/es/components/upload/index.d.ts +136 -0
- package/es/components/upload/index.js +1336 -101
- package/es/components/upload/src/icons.d.ts +13 -0
- package/es/components/upload/src/upload.vue.d.ts +135 -0
- package/es/components/upload/utils/index.d.ts +7 -0
- package/es/index.d.ts +6 -0
- package/es/utils/bm-admin-ui-resolver.d.ts +9 -0
- package/es/utils/vxe-table.d.ts +6 -0
- package/es/utils/vxe-table.js +3 -4
- package/es/utils/with-install.d.ts +3 -0
- package/index.esm.js +47062 -0
- package/index.js +47092 -0
- package/lib/components/button/index.d.ts +307 -0
- package/lib/components/button/src/button.d.ts +12 -0
- package/lib/components/button/src/button.vue.d.ts +308 -0
- package/lib/components/feedback/index.d.ts +1037 -0
- package/lib/components/feedback/index.js +1304 -23
- package/lib/components/feedback/src/bmAlert.vue.d.ts +193 -0
- package/lib/components/feedback/src/bmModal.vue.d.ts +839 -0
- package/lib/components/float-table/index.d.ts +70 -0
- package/lib/components/float-table/index.js +28 -37
- package/lib/components/float-table/src/float-table.vue.d.ts +69 -0
- package/lib/components/flow-designer/index.d.ts +7 -0
- package/lib/components/flow-designer/src/flow-designer.vue.d.ts +6 -0
- package/lib/components/form-designer/index.d.ts +9 -0
- package/lib/components/form-designer/index.js +8 -4183
- package/lib/components/form-designer/src/form-designer.vue.d.ts +8 -0
- package/lib/components/index.d.ts +13 -0
- package/lib/components/index.js +0 -7
- package/lib/components/input-tags-display/index.d.ts +113 -0
- package/lib/components/input-tags-display/index.js +1187 -27
- package/lib/components/input-tags-display/src/input-tags-display.vue.d.ts +110 -0
- package/lib/components/multi-cascader-compose/index.d.ts +164 -0
- package/lib/components/multi-cascader-compose/index.js +1198 -30
- package/lib/components/multi-cascader-compose/src/multi-cascader-compose.vue.d.ts +164 -0
- package/lib/components/multi-cascader-compose/src/props.d.ts +40 -0
- package/lib/components/multi-cascader-compose/types.d.ts +10 -0
- package/lib/components/over-tooltips/index.d.ts +35 -0
- package/lib/components/over-tooltips/index.js +20 -27
- package/lib/components/over-tooltips/src/over-tooltips.vue.d.ts +34 -0
- package/lib/components/search-filter/index.d.ts +222 -0
- package/lib/components/search-filter/index.js +1268 -56
- package/lib/components/search-filter/src/search-filter.d.ts +77 -0
- package/lib/components/search-filter/src/search-filter.vue.d.ts +221 -0
- package/lib/components/search-filter/src/search-reset-btn.vue.d.ts +89 -0
- package/lib/components/shops-filter/index.d.ts +99 -0
- package/lib/components/shops-filter/index.js +1181 -23
- package/lib/components/shops-filter/src/shops-filter.d.ts +25 -0
- package/lib/components/shops-filter/src/shops-filter.vue.d.ts +98 -0
- package/lib/components/staffs-selector/index.d.ts +109 -0
- package/lib/components/staffs-selector/index.js +1240 -130
- package/lib/components/staffs-selector/src/multipleCmp.vue.d.ts +97 -0
- package/lib/components/staffs-selector/src/radioCmp.vue.d.ts +31 -0
- package/lib/components/staffs-selector/src/staffs-selector.vue.d.ts +108 -0
- package/lib/components/staffs-selector/src/variedCmp.vue.d.ts +62 -0
- package/lib/components/timeline/index.d.ts +107 -0
- package/lib/components/timeline/index.js +6 -6
- package/lib/components/timeline/src/props.d.ts +24 -0
- package/lib/components/timeline/src/timeline-item.vue.d.ts +65 -0
- package/lib/components/timeline/src/timeline.vue.d.ts +42 -0
- package/lib/components/upload/index.d.ts +136 -0
- package/lib/components/upload/index.js +1335 -100
- package/lib/components/upload/src/icons.d.ts +13 -0
- package/lib/components/upload/src/upload.vue.d.ts +135 -0
- package/lib/components/upload/utils/index.d.ts +7 -0
- package/lib/index.d.ts +6 -0
- package/lib/utils/bm-admin-ui-resolver.d.ts +9 -0
- package/lib/utils/vxe-table.d.ts +6 -0
- package/lib/utils/vxe-table.js +2 -3
- package/lib/utils/with-install.d.ts +3 -0
- package/package.json +4 -9
- package/theme-chalk/button.css +1 -1
- package/theme-chalk/feedback.css +1 -1
- package/theme-chalk/float-table.css +1 -1
- package/theme-chalk/floating-vue.css +1 -1
- package/theme-chalk/flow-designer.css +1 -1
- package/theme-chalk/index.css +1 -1
- package/theme-chalk/input-tags-display.css +1 -1
- package/theme-chalk/modal.css +1 -1
- package/theme-chalk/multi-cascader-compose.css +1 -1
- package/theme-chalk/over-tooltips.css +1 -1
- package/theme-chalk/search-filter.css +1 -1
- package/theme-chalk/staffs-selector.css +1 -1
- package/theme-chalk/timeline.css +1 -1
- package/theme-chalk/upload.css +1 -1
- package/types/components/button/index.d.ts +307 -0
- package/types/components/button/src/button.d.ts +12 -0
- package/types/components/button/src/button.vue.d.ts +308 -0
- package/types/components/feedback/index.d.ts +1037 -0
- package/types/components/feedback/src/bmAlert.vue.d.ts +193 -0
- package/types/components/feedback/src/bmModal.vue.d.ts +839 -0
- package/types/components/float-table/index.d.ts +70 -0
- package/types/components/float-table/src/float-table.vue.d.ts +69 -0
- package/types/components/flow-designer/index.d.ts +7 -0
- package/types/components/flow-designer/src/flow-designer.vue.d.ts +6 -0
- package/types/components/form-designer/index.d.ts +9 -0
- package/types/components/form-designer/src/form-designer.vue.d.ts +8 -0
- package/types/components/index.d.ts +13 -0
- package/types/components/input-tags-display/index.d.ts +113 -0
- package/types/components/input-tags-display/src/input-tags-display.vue.d.ts +110 -0
- package/types/components/multi-cascader-compose/index.d.ts +164 -0
- package/types/components/multi-cascader-compose/src/multi-cascader-compose.vue.d.ts +164 -0
- package/types/components/multi-cascader-compose/src/props.d.ts +40 -0
- package/types/components/multi-cascader-compose/types.d.ts +10 -0
- package/types/components/over-tooltips/index.d.ts +35 -0
- package/types/components/over-tooltips/src/over-tooltips.vue.d.ts +34 -0
- package/types/components/search-filter/index.d.ts +222 -0
- package/types/components/search-filter/src/search-filter.d.ts +77 -0
- package/types/components/search-filter/src/search-filter.vue.d.ts +221 -0
- package/types/components/search-filter/src/search-reset-btn.vue.d.ts +89 -0
- package/types/components/shops-filter/index.d.ts +99 -0
- package/types/components/shops-filter/src/shops-filter.d.ts +25 -0
- package/types/components/shops-filter/src/shops-filter.vue.d.ts +98 -0
- package/types/components/staffs-selector/index.d.ts +109 -0
- package/types/components/staffs-selector/src/multipleCmp.vue.d.ts +97 -0
- package/types/components/staffs-selector/src/radioCmp.vue.d.ts +31 -0
- package/types/components/staffs-selector/src/staffs-selector.vue.d.ts +108 -0
- package/types/components/staffs-selector/src/variedCmp.vue.d.ts +62 -0
- package/types/components/timeline/index.d.ts +107 -0
- package/types/components/timeline/src/props.d.ts +24 -0
- package/types/components/timeline/src/timeline-item.vue.d.ts +65 -0
- package/types/components/timeline/src/timeline.vue.d.ts +42 -0
- package/types/components/upload/index.d.ts +136 -0
- package/types/components/upload/src/icons.d.ts +13 -0
- package/types/components/upload/src/upload.vue.d.ts +135 -0
- package/types/components/upload/utils/index.d.ts +7 -0
- package/types/index.d.ts +6 -0
- package/types/utils/bm-admin-ui-resolver.d.ts +9 -0
- package/types/utils/vxe-table.d.ts +6 -0
- package/types/utils/with-install.d.ts +3 -0
- package/es/components/form-create/index.js +0 -2769
- package/es/utils/uniqueId.js +0 -5
- package/lib/components/form-create/index.js +0 -2781
- package/lib/utils/uniqueId.js +0 -8
- package/theme-chalk/form-create.css +0 -1
- package/theme-chalk/form-designer.css +0 -1
|
@@ -1,64 +1,5 @@
|
|
|
1
1
|
import { withInstall } from 'bm-admin-ui/es/utils/with-install';
|
|
2
|
-
import { defineComponent,
|
|
3
|
-
import uniqueId from 'bm-admin-ui/es/utils/uniqueId';
|
|
4
|
-
import Draggable from 'vuedraggable';
|
|
5
|
-
import { Tooltip, FormItemRest, Input, Button, RadioGroup, Radio, DatePicker, Checkbox, Tabs, TabPane, Row, Col, Dropdown, Menu, CheckboxGroup, MenuItem, Divider, Switch, Select, Layout, LayoutSider, LayoutContent, message } from 'ant-design-vue';
|
|
6
|
-
import { HolderOutlined, EditOutlined, PlusOutlined, QuestionCircleOutlined, InfoCircleFilled, ExclamationCircleFilled } from '@ant-design/icons-vue';
|
|
7
|
-
import { BmUpload } from 'bm-admin-ui/es/components';
|
|
8
|
-
import { cloneDeep, merge } from 'lodash-es';
|
|
9
|
-
import FC from '@form-create/ant-design-vue';
|
|
10
|
-
|
|
11
|
-
var WidgetType;
|
|
12
|
-
(function (WidgetType) {
|
|
13
|
-
WidgetType["RowWidget"] = "RowWidget";
|
|
14
|
-
WidgetType["TableWidget"] = "TableWidget";
|
|
15
|
-
WidgetType["UploadFile"] = "UploadFile";
|
|
16
|
-
})(WidgetType || (WidgetType = {}));
|
|
17
|
-
function getFieldRatioRule(rule, parentRule) {
|
|
18
|
-
let defaultValue = rule.config.fieldRatio;
|
|
19
|
-
const propRule = {
|
|
20
|
-
type: 'radio',
|
|
21
|
-
title: '字段占比',
|
|
22
|
-
options: [],
|
|
23
|
-
props: {
|
|
24
|
-
optionType: 'button',
|
|
25
|
-
buttonStyle: 'solid',
|
|
26
|
-
},
|
|
27
|
-
};
|
|
28
|
-
switch (parentRule === null || parentRule === void 0 ? void 0 : parentRule.type) {
|
|
29
|
-
case WidgetType.RowWidget:
|
|
30
|
-
defaultValue = defaultValue || 12;
|
|
31
|
-
propRule.options = [
|
|
32
|
-
{ value: 6, label: '25%' },
|
|
33
|
-
{ value: 12, label: '50%' },
|
|
34
|
-
{ value: 18, label: '75%' },
|
|
35
|
-
{ value: 24, label: '100%' },
|
|
36
|
-
];
|
|
37
|
-
propRule.value = defaultValue;
|
|
38
|
-
break;
|
|
39
|
-
case WidgetType.TableWidget:
|
|
40
|
-
defaultValue = defaultValue || '140px';
|
|
41
|
-
propRule.title = '子字段宽度';
|
|
42
|
-
propRule.options = [
|
|
43
|
-
{ value: '140px', label: '小' },
|
|
44
|
-
{ value: '212px', label: '中' },
|
|
45
|
-
{ value: '392px', label: '大' },
|
|
46
|
-
{ value: '572px', label: '超大 ' },
|
|
47
|
-
];
|
|
48
|
-
propRule.value = defaultValue;
|
|
49
|
-
break;
|
|
50
|
-
default:
|
|
51
|
-
defaultValue = defaultValue || '100%';
|
|
52
|
-
propRule.options = [
|
|
53
|
-
{ value: '25%', label: '25%' },
|
|
54
|
-
{ value: '50%', label: '50%' },
|
|
55
|
-
{ value: '75%', label: '75%' },
|
|
56
|
-
{ value: '100%', label: '100%' },
|
|
57
|
-
];
|
|
58
|
-
propRule.value = defaultValue;
|
|
59
|
-
}
|
|
60
|
-
return propRule;
|
|
61
|
-
}
|
|
2
|
+
import { defineComponent, resolveComponent, openBlock, createBlock } from 'vue';
|
|
62
3
|
|
|
63
4
|
var _export_sfc = (sfc, props) => {
|
|
64
5
|
const target = sfc.__vccOpts || sfc;
|
|
@@ -68,4132 +9,22 @@ var _export_sfc = (sfc, props) => {
|
|
|
68
9
|
return target;
|
|
69
10
|
};
|
|
70
11
|
|
|
71
|
-
const _sfc_main$i = /* @__PURE__ */ defineComponent({
|
|
72
|
-
__name: "widget-instruction",
|
|
73
|
-
props: ["rule"],
|
|
74
|
-
setup(__props) {
|
|
75
|
-
return (_ctx, _cache) => {
|
|
76
|
-
return openBlock(), createElementBlock("div", {
|
|
77
|
-
style: normalizeStyle({ minHeight: "22px", color: __props.rule.style.color })
|
|
78
|
-
}, toDisplayString(__props.rule.value), 5);
|
|
79
|
-
};
|
|
80
|
-
}
|
|
81
|
-
});
|
|
82
|
-
var WidgetInstruction = /* @__PURE__ */ _export_sfc(_sfc_main$i, [["__file", "widget-instruction.vue"]]);
|
|
83
|
-
|
|
84
|
-
const _hoisted_1$g = {
|
|
85
|
-
key: 2,
|
|
86
|
-
class: "bm-drag-tool-mask"
|
|
87
|
-
};
|
|
88
|
-
const _hoisted_2$d = /* @__PURE__ */ createTextVNode("\u590D\u5236");
|
|
89
|
-
const _hoisted_3$b = /* @__PURE__ */ createTextVNode("\u5220\u9664");
|
|
90
|
-
const _sfc_main$h = /* @__PURE__ */ defineComponent({
|
|
91
|
-
__name: "drag-tool",
|
|
92
|
-
props: ["rule", "activeRule", "parentRule"],
|
|
93
|
-
emits: [
|
|
94
|
-
"copy",
|
|
95
|
-
"delete",
|
|
96
|
-
"mouseenter",
|
|
97
|
-
"mouseleave",
|
|
98
|
-
"setActiveRule",
|
|
99
|
-
"widgetAdd"
|
|
100
|
-
],
|
|
101
|
-
setup(__props, { emit: emits }) {
|
|
102
|
-
const props = __props;
|
|
103
|
-
const isActive = computed(() => props.rule.field === props.activeRule?.field);
|
|
104
|
-
const option = computed(() => ({
|
|
105
|
-
form: {
|
|
106
|
-
layout: "vertical"
|
|
107
|
-
},
|
|
108
|
-
submitBtn: {
|
|
109
|
-
show: false
|
|
110
|
-
},
|
|
111
|
-
parentType: props.parentRule?.type,
|
|
112
|
-
childRules: props.parentRule?.config?.childRules
|
|
113
|
-
}));
|
|
114
|
-
function emitCopyEvt(rule, parentRule = void 0) {
|
|
115
|
-
emits("copy", rule, parentRule);
|
|
116
|
-
}
|
|
117
|
-
function emitDeleteEvt(rule, parentRule = void 0) {
|
|
118
|
-
emits("delete", rule, parentRule);
|
|
119
|
-
}
|
|
120
|
-
function handleCopy() {
|
|
121
|
-
emitCopyEvt(props.rule);
|
|
122
|
-
}
|
|
123
|
-
function handleDelete() {
|
|
124
|
-
emitDeleteEvt(props.rule);
|
|
125
|
-
}
|
|
126
|
-
function handleMouseenter() {
|
|
127
|
-
props.rule.config.isHover = true;
|
|
128
|
-
emits("mouseenter");
|
|
129
|
-
}
|
|
130
|
-
function handleMouseleave() {
|
|
131
|
-
props.rule.config.isHover = false;
|
|
132
|
-
emits("mouseleave");
|
|
133
|
-
}
|
|
134
|
-
function handleRowWidgetMouseenter() {
|
|
135
|
-
props.rule.config.isHover = false;
|
|
136
|
-
}
|
|
137
|
-
function handleRowWidgetMouseleave() {
|
|
138
|
-
props.rule.config.isHover = true;
|
|
139
|
-
}
|
|
140
|
-
function handleRowWidgetSetActiveRule(element) {
|
|
141
|
-
emits("setActiveRule", element, props.rule);
|
|
142
|
-
}
|
|
143
|
-
function handleRowWidgetCopy(rule) {
|
|
144
|
-
emitCopyEvt(rule, props.rule);
|
|
145
|
-
}
|
|
146
|
-
function handleRowWidgetDelete(rule) {
|
|
147
|
-
emitDeleteEvt(rule, props.rule);
|
|
148
|
-
}
|
|
149
|
-
function handleRowWidgetAdd(rule) {
|
|
150
|
-
emits("widgetAdd", rule, props.rule);
|
|
151
|
-
}
|
|
152
|
-
return (_ctx, _cache) => {
|
|
153
|
-
const _component_FormCreate = resolveComponent("FormCreate");
|
|
154
|
-
const _component_Copy = resolveComponent("Copy");
|
|
155
|
-
const _component_ACol = resolveComponent("ACol");
|
|
156
|
-
const _component_Delete = resolveComponent("Delete");
|
|
157
|
-
const _component_ARow = resolveComponent("ARow");
|
|
158
|
-
return openBlock(), createElementBlock("div", {
|
|
159
|
-
class: normalizeClass([
|
|
160
|
-
"bm-drag-tool",
|
|
161
|
-
__props.rule.type === unref(WidgetType).RowWidget ? "is-row" : "",
|
|
162
|
-
unref(isActive) ? "is-active" : "",
|
|
163
|
-
__props.rule?.config?.putDisabled ? "is-put-disabled" : ""
|
|
164
|
-
]),
|
|
165
|
-
onMouseenter: handleMouseenter,
|
|
166
|
-
onMouseleave: handleMouseleave
|
|
167
|
-
}, [
|
|
168
|
-
__props.rule.type ? (openBlock(), createBlock(_component_FormCreate, {
|
|
169
|
-
key: 0,
|
|
170
|
-
option: unref(option),
|
|
171
|
-
rule: [__props.rule],
|
|
172
|
-
onNestMouseenter: handleRowWidgetMouseenter,
|
|
173
|
-
onNestMouseleave: handleRowWidgetMouseleave,
|
|
174
|
-
onNestSetActiveRule: handleRowWidgetSetActiveRule,
|
|
175
|
-
onNestCopy: handleRowWidgetCopy,
|
|
176
|
-
onNestDelete: handleRowWidgetDelete,
|
|
177
|
-
onNestAdd: handleRowWidgetAdd
|
|
178
|
-
}, null, 8, ["option", "rule"])) : (openBlock(), createBlock(WidgetInstruction, {
|
|
179
|
-
key: 1,
|
|
180
|
-
rule: __props.rule
|
|
181
|
-
}, null, 8, ["rule"])),
|
|
182
|
-
__props.rule.type !== unref(WidgetType).RowWidget && __props.rule.type !== unref(WidgetType).TableWidget ? (openBlock(), createElementBlock("div", _hoisted_1$g)) : createCommentVNode("v-if", true),
|
|
183
|
-
__props.rule.config.isHover || unref(isActive) ? (openBlock(), createBlock(_component_ARow, {
|
|
184
|
-
key: 3,
|
|
185
|
-
class: "bm-drag-tool-btn",
|
|
186
|
-
gutter: [16, 0]
|
|
187
|
-
}, {
|
|
188
|
-
default: withCtx(() => [
|
|
189
|
-
createVNode(_component_ACol, { class: "bm-drag-tool-btn-col" }, {
|
|
190
|
-
default: withCtx(() => [
|
|
191
|
-
createVNode(unref(Tooltip), { placement: "top" }, {
|
|
192
|
-
title: withCtx(() => [
|
|
193
|
-
_hoisted_2$d
|
|
194
|
-
]),
|
|
195
|
-
default: withCtx(() => [
|
|
196
|
-
createVNode(_component_Copy, {
|
|
197
|
-
class: "bm-drag-tool-btn-icon is-copy",
|
|
198
|
-
onClick: withModifiers(handleCopy, ["stop"])
|
|
199
|
-
}, null, 8, ["onClick"])
|
|
200
|
-
]),
|
|
201
|
-
_: 1
|
|
202
|
-
})
|
|
203
|
-
]),
|
|
204
|
-
_: 1
|
|
205
|
-
}),
|
|
206
|
-
createVNode(_component_ACol, { class: "bm-drag-tool-btn-col" }, {
|
|
207
|
-
default: withCtx(() => [
|
|
208
|
-
createVNode(unref(Tooltip), { placement: "top" }, {
|
|
209
|
-
title: withCtx(() => [
|
|
210
|
-
_hoisted_3$b
|
|
211
|
-
]),
|
|
212
|
-
default: withCtx(() => [
|
|
213
|
-
createVNode(_component_Delete, {
|
|
214
|
-
class: "bm-drag-tool-btn-icon is-delete",
|
|
215
|
-
onClick: withModifiers(handleDelete, ["stop"])
|
|
216
|
-
}, null, 8, ["onClick"])
|
|
217
|
-
]),
|
|
218
|
-
_: 1
|
|
219
|
-
})
|
|
220
|
-
]),
|
|
221
|
-
_: 1
|
|
222
|
-
})
|
|
223
|
-
]),
|
|
224
|
-
_: 1
|
|
225
|
-
})) : createCommentVNode("v-if", true)
|
|
226
|
-
], 34);
|
|
227
|
-
};
|
|
228
|
-
}
|
|
229
|
-
});
|
|
230
|
-
var DragTool = /* @__PURE__ */ _export_sfc(_sfc_main$h, [["__file", "drag-tool.vue"]]);
|
|
231
|
-
|
|
232
|
-
const _hoisted_1$f = { class: "bm-drag-placeholder" };
|
|
233
|
-
const _sfc_main$g = /* @__PURE__ */ defineComponent({
|
|
234
|
-
__name: "drag-placeholder",
|
|
235
|
-
props: {},
|
|
236
|
-
setup(__props) {
|
|
237
|
-
return (_ctx, _cache) => {
|
|
238
|
-
return openBlock(), createElementBlock("div", _hoisted_1$f);
|
|
239
|
-
};
|
|
240
|
-
}
|
|
241
|
-
});
|
|
242
|
-
var DragPlaceholder = /* @__PURE__ */ _export_sfc(_sfc_main$g, [["__file", "drag-placeholder.vue"]]);
|
|
243
|
-
|
|
244
|
-
const _hoisted_1$e = { class: "bm-widget-row-wrap" };
|
|
245
|
-
const _hoisted_2$c = {
|
|
246
|
-
key: 0,
|
|
247
|
-
class: "bm-widget-row-tip"
|
|
248
|
-
};
|
|
249
|
-
const _sfc_main$f = /* @__PURE__ */ defineComponent({
|
|
250
|
-
__name: "widget-row",
|
|
251
|
-
props: ["activeRule", "formCreateInject"],
|
|
252
|
-
emits: [
|
|
253
|
-
"mouseenter",
|
|
254
|
-
"mouseleave",
|
|
255
|
-
"set-active-rule",
|
|
256
|
-
"copy",
|
|
257
|
-
"delete",
|
|
258
|
-
"add"
|
|
259
|
-
],
|
|
260
|
-
setup(__props, { emit: emits }) {
|
|
261
|
-
const props = __props;
|
|
262
|
-
const childRules = computed(() => props.formCreateInject.rule.config.childRules);
|
|
263
|
-
function handleMouseenter() {
|
|
264
|
-
emits("mouseenter");
|
|
265
|
-
}
|
|
266
|
-
function handleMouseleave() {
|
|
267
|
-
emits("mouseleave");
|
|
268
|
-
}
|
|
269
|
-
function emitSetActiveRuleEvt(rule) {
|
|
270
|
-
emits("set-active-rule", rule);
|
|
271
|
-
}
|
|
272
|
-
function handleClick(element) {
|
|
273
|
-
emitSetActiveRuleEvt(element);
|
|
274
|
-
}
|
|
275
|
-
function handleRowWidgetAdd({ newIndex }) {
|
|
276
|
-
emits("add", childRules.value[newIndex]);
|
|
277
|
-
}
|
|
278
|
-
function handleRowWidgetUpdate({ newIndex }) {
|
|
279
|
-
const rule = childRules.value[newIndex];
|
|
280
|
-
if (rule)
|
|
281
|
-
emitSetActiveRuleEvt(rule);
|
|
282
|
-
}
|
|
283
|
-
function handleCopy(rule) {
|
|
284
|
-
emits("copy", rule);
|
|
285
|
-
}
|
|
286
|
-
function handleDelete(rule) {
|
|
287
|
-
emits("delete", rule);
|
|
288
|
-
}
|
|
289
|
-
return (_ctx, _cache) => {
|
|
290
|
-
const _component_ACol = resolveComponent("ACol");
|
|
291
|
-
return openBlock(), createElementBlock("div", _hoisted_1$e, [
|
|
292
|
-
!unref(childRules).length ? (openBlock(), createElementBlock("div", _hoisted_2$c, " \u53EF\u62D6\u5165\u591A\u4E2A\u63A7\u4EF6 ")) : createCommentVNode("v-if", true),
|
|
293
|
-
createVNode(unref(Draggable), {
|
|
294
|
-
"component-data": {
|
|
295
|
-
field: __props.formCreateInject.rule.field,
|
|
296
|
-
type: unref(WidgetType).RowWidget
|
|
297
|
-
},
|
|
298
|
-
class: "bm-widget-row",
|
|
299
|
-
tag: "ARow",
|
|
300
|
-
group: {
|
|
301
|
-
name: "rowWidget",
|
|
302
|
-
pull: true,
|
|
303
|
-
put: ["widget", "rowWidget", "formWidget"]
|
|
304
|
-
},
|
|
305
|
-
"ghost-class": unref(childRules).length ? "row-drag-ghost" : "row-drag-ghost__is-empty",
|
|
306
|
-
list: unref(childRules),
|
|
307
|
-
"force-fallback": true,
|
|
308
|
-
delay: 50,
|
|
309
|
-
"item-key": "field",
|
|
310
|
-
direction: "vertical",
|
|
311
|
-
onAdd: handleRowWidgetAdd,
|
|
312
|
-
onUpdate: handleRowWidgetUpdate
|
|
313
|
-
}, {
|
|
314
|
-
item: withCtx(({ element }) => [
|
|
315
|
-
createVNode(_component_ACol, {
|
|
316
|
-
span: element.config.fieldRatio
|
|
317
|
-
}, {
|
|
318
|
-
default: withCtx(() => [
|
|
319
|
-
createVNode(DragTool, {
|
|
320
|
-
rule: element,
|
|
321
|
-
"active-rule": __props.activeRule,
|
|
322
|
-
"parent-rule": __props.formCreateInject.rule,
|
|
323
|
-
onMouseenter: handleMouseenter,
|
|
324
|
-
onMouseleave: handleMouseleave,
|
|
325
|
-
onClick: withModifiers(($event) => handleClick(element), ["stop"]),
|
|
326
|
-
onCopy: handleCopy,
|
|
327
|
-
onDelete: handleDelete
|
|
328
|
-
}, null, 8, ["rule", "active-rule", "parent-rule", "onClick"]),
|
|
329
|
-
createVNode(DragPlaceholder)
|
|
330
|
-
]),
|
|
331
|
-
_: 2
|
|
332
|
-
}, 1032, ["span"])
|
|
333
|
-
]),
|
|
334
|
-
_: 1
|
|
335
|
-
}, 8, ["component-data", "ghost-class", "list"])
|
|
336
|
-
]);
|
|
337
|
-
};
|
|
338
|
-
}
|
|
339
|
-
});
|
|
340
|
-
var WidgetRow = /* @__PURE__ */ _export_sfc(_sfc_main$f, [["__file", "widget-row.vue"]]);
|
|
341
|
-
|
|
342
|
-
const label$h = '分栏';
|
|
343
|
-
const fieldsMap$h = {
|
|
344
|
-
'title.title': 'title.title',
|
|
345
|
-
'config.title': 'config.title',
|
|
346
|
-
'config.showTitle': 'config.showTitle',
|
|
347
|
-
};
|
|
348
|
-
function handleTitle(title) {
|
|
349
|
-
return title + '(该标题不会显示在表单)';
|
|
350
|
-
}
|
|
351
|
-
const name$h = 'row';
|
|
352
|
-
var row = {
|
|
353
|
-
icon: 'RowIcon',
|
|
354
|
-
name: name$h,
|
|
355
|
-
label: label$h,
|
|
356
|
-
rule() {
|
|
357
|
-
return {
|
|
358
|
-
type: WidgetType.RowWidget,
|
|
359
|
-
component: WidgetRow,
|
|
360
|
-
title: {
|
|
361
|
-
title: label$h,
|
|
362
|
-
},
|
|
363
|
-
field: uniqueId(),
|
|
364
|
-
props: {
|
|
365
|
-
field: '',
|
|
366
|
-
list: [],
|
|
367
|
-
activeRule: {},
|
|
368
|
-
},
|
|
369
|
-
emit: [
|
|
370
|
-
'mouseenter',
|
|
371
|
-
'mouseleave',
|
|
372
|
-
'set-active-rule',
|
|
373
|
-
'copy',
|
|
374
|
-
'delete',
|
|
375
|
-
'add',
|
|
376
|
-
],
|
|
377
|
-
emitPrefix: 'nest',
|
|
378
|
-
config: {
|
|
379
|
-
title: label$h,
|
|
380
|
-
showTitle: true,
|
|
381
|
-
childRules: [],
|
|
382
|
-
propsFields: Object.values(fieldsMap$h),
|
|
383
|
-
},
|
|
384
|
-
};
|
|
385
|
-
},
|
|
386
|
-
props(rule) {
|
|
387
|
-
return [
|
|
388
|
-
{
|
|
389
|
-
type: 'input',
|
|
390
|
-
title: '标题',
|
|
391
|
-
field: fieldsMap$h['config.title'],
|
|
392
|
-
value: rule.config.title,
|
|
393
|
-
effect: {
|
|
394
|
-
required: '请输入标题',
|
|
395
|
-
},
|
|
396
|
-
props: {
|
|
397
|
-
placeholder: '请输入',
|
|
398
|
-
maxlength: 10,
|
|
399
|
-
},
|
|
400
|
-
inject: true,
|
|
401
|
-
on: {
|
|
402
|
-
change({ api, self }, $event) {
|
|
403
|
-
const showTitle = rule.config.showTitle;
|
|
404
|
-
let title = $event.target.value;
|
|
405
|
-
if (!showTitle) {
|
|
406
|
-
title = handleTitle(title);
|
|
407
|
-
}
|
|
408
|
-
api.emit('change', 'title.title', title, self, api, true);
|
|
409
|
-
},
|
|
410
|
-
},
|
|
411
|
-
},
|
|
412
|
-
{
|
|
413
|
-
type: 'switch',
|
|
414
|
-
title: '是否显示标题',
|
|
415
|
-
field: fieldsMap$h['config.showTitle'],
|
|
416
|
-
value: rule.config.showTitle,
|
|
417
|
-
inject: true,
|
|
418
|
-
on: {
|
|
419
|
-
change({ api, self }, value) {
|
|
420
|
-
let title = rule.config.title;
|
|
421
|
-
if (!value) {
|
|
422
|
-
title = handleTitle(title);
|
|
423
|
-
}
|
|
424
|
-
api.emit('change', 'title.title', title, self, api, true);
|
|
425
|
-
},
|
|
426
|
-
},
|
|
427
|
-
},
|
|
428
|
-
];
|
|
429
|
-
},
|
|
430
|
-
parse(rule) {
|
|
431
|
-
return {
|
|
432
|
-
name: name$h,
|
|
433
|
-
field: rule.field,
|
|
434
|
-
title: {
|
|
435
|
-
title: rule.title.title,
|
|
436
|
-
},
|
|
437
|
-
config: {
|
|
438
|
-
title: rule.config.title,
|
|
439
|
-
showTitle: rule.config.showTitle,
|
|
440
|
-
},
|
|
441
|
-
};
|
|
442
|
-
},
|
|
443
|
-
};
|
|
444
|
-
|
|
445
|
-
const label$g = '单行输入框';
|
|
446
|
-
const fieldsMap$g = {
|
|
447
|
-
'title.title': 'title.title',
|
|
448
|
-
'props.placeholder': 'props.placeholder',
|
|
449
|
-
value: 'value',
|
|
450
|
-
'config.fieldRatio': 'config.fieldRatio',
|
|
451
|
-
'effect.required': 'effect.required',
|
|
452
|
-
};
|
|
453
|
-
const name$g = 'input';
|
|
454
|
-
var input = {
|
|
455
|
-
icon: 'InputIcon',
|
|
456
|
-
name: name$g,
|
|
457
|
-
label: label$g,
|
|
458
|
-
rule() {
|
|
459
|
-
return {
|
|
460
|
-
type: 'input',
|
|
461
|
-
field: uniqueId(),
|
|
462
|
-
title: {
|
|
463
|
-
title: label$g,
|
|
464
|
-
style: {
|
|
465
|
-
overflow: 'hidden',
|
|
466
|
-
textOverflow: 'ellipsis',
|
|
467
|
-
whiteSpace: 'nowrap',
|
|
468
|
-
},
|
|
469
|
-
},
|
|
470
|
-
effect: {
|
|
471
|
-
required: true,
|
|
472
|
-
formRule: 'formRule',
|
|
473
|
-
},
|
|
474
|
-
props: {
|
|
475
|
-
maxlength: 200,
|
|
476
|
-
placeholder: '请输入',
|
|
477
|
-
},
|
|
478
|
-
config: {
|
|
479
|
-
propsFields: Object.values(fieldsMap$g),
|
|
480
|
-
},
|
|
481
|
-
};
|
|
482
|
-
},
|
|
483
|
-
props(rule, parentRule) {
|
|
484
|
-
return [
|
|
485
|
-
{
|
|
486
|
-
type: 'input',
|
|
487
|
-
title: '标题',
|
|
488
|
-
field: fieldsMap$g['title.title'],
|
|
489
|
-
value: rule.title.title,
|
|
490
|
-
effect: {
|
|
491
|
-
required: '请输入标题',
|
|
492
|
-
},
|
|
493
|
-
props: {
|
|
494
|
-
placeholder: '请输入',
|
|
495
|
-
maxlength: 10,
|
|
496
|
-
},
|
|
497
|
-
},
|
|
498
|
-
{
|
|
499
|
-
type: 'input',
|
|
500
|
-
title: '提示文字',
|
|
501
|
-
field: fieldsMap$g['props.placeholder'],
|
|
502
|
-
props: {
|
|
503
|
-
placeholder: '请输入',
|
|
504
|
-
},
|
|
505
|
-
value: rule.props.placeholder,
|
|
506
|
-
},
|
|
507
|
-
{
|
|
508
|
-
type: 'input',
|
|
509
|
-
title: '默认值',
|
|
510
|
-
field: fieldsMap$g['value'],
|
|
511
|
-
props: {
|
|
512
|
-
placeholder: '请输入',
|
|
513
|
-
},
|
|
514
|
-
value: rule.value,
|
|
515
|
-
},
|
|
516
|
-
Object.assign({ field: fieldsMap$g['config.fieldRatio'] }, getFieldRatioRule(rule, parentRule)),
|
|
517
|
-
{
|
|
518
|
-
type: 'switch',
|
|
519
|
-
title: '是否必填',
|
|
520
|
-
field: fieldsMap$g['effect.required'],
|
|
521
|
-
value: rule.effect.required,
|
|
522
|
-
},
|
|
523
|
-
];
|
|
524
|
-
},
|
|
525
|
-
parse(rule) {
|
|
526
|
-
return {
|
|
527
|
-
name: name$g,
|
|
528
|
-
field: rule.field,
|
|
529
|
-
title: {
|
|
530
|
-
title: rule.title.title,
|
|
531
|
-
},
|
|
532
|
-
props: {
|
|
533
|
-
placeholder: rule.props.placeholder,
|
|
534
|
-
},
|
|
535
|
-
value: rule.value,
|
|
536
|
-
config: {
|
|
537
|
-
fieldRatio: rule.config.fieldRatio,
|
|
538
|
-
},
|
|
539
|
-
effect: {
|
|
540
|
-
required: rule.effect.required,
|
|
541
|
-
},
|
|
542
|
-
};
|
|
543
|
-
},
|
|
544
|
-
};
|
|
545
|
-
|
|
546
|
-
const label$f = '多行输入框';
|
|
547
|
-
const fieldsMap$f = {
|
|
548
|
-
'title.title': 'title.title',
|
|
549
|
-
'props.placeholder': 'props.placeholder',
|
|
550
|
-
value: 'value',
|
|
551
|
-
'config.fieldRatio': 'config.fieldRatio',
|
|
552
|
-
'effect.required': 'effect.required',
|
|
553
|
-
};
|
|
554
|
-
const name$f = 'textarea';
|
|
555
|
-
var textarea = {
|
|
556
|
-
icon: 'TextareaIcon',
|
|
557
|
-
name: name$f,
|
|
558
|
-
label: label$f,
|
|
559
|
-
rule() {
|
|
560
|
-
return {
|
|
561
|
-
type: 'input',
|
|
562
|
-
field: uniqueId(),
|
|
563
|
-
title: {
|
|
564
|
-
title: label$f,
|
|
565
|
-
style: {
|
|
566
|
-
overflow: 'hidden',
|
|
567
|
-
textOverflow: 'ellipsis',
|
|
568
|
-
whiteSpace: 'nowrap',
|
|
569
|
-
},
|
|
570
|
-
},
|
|
571
|
-
effect: {
|
|
572
|
-
required: true,
|
|
573
|
-
formRule: 'formRule',
|
|
574
|
-
},
|
|
575
|
-
props: {
|
|
576
|
-
type: 'textarea',
|
|
577
|
-
placeholder: '请输入',
|
|
578
|
-
maxlength: 5000,
|
|
579
|
-
},
|
|
580
|
-
config: {
|
|
581
|
-
propsFields: Object.values(fieldsMap$f),
|
|
582
|
-
},
|
|
583
|
-
};
|
|
584
|
-
},
|
|
585
|
-
props(rule, parentRule) {
|
|
586
|
-
return [
|
|
587
|
-
{
|
|
588
|
-
type: 'input',
|
|
589
|
-
title: '标题',
|
|
590
|
-
field: fieldsMap$f['title.title'],
|
|
591
|
-
value: rule.title.title,
|
|
592
|
-
effect: {
|
|
593
|
-
required: '请输入标题',
|
|
594
|
-
},
|
|
595
|
-
props: {
|
|
596
|
-
placeholder: '请输入',
|
|
597
|
-
maxlength: 10,
|
|
598
|
-
},
|
|
599
|
-
},
|
|
600
|
-
{
|
|
601
|
-
type: 'input',
|
|
602
|
-
title: '提示文字',
|
|
603
|
-
field: fieldsMap$f['props.placeholder'],
|
|
604
|
-
props: {
|
|
605
|
-
placeholder: '请输入',
|
|
606
|
-
},
|
|
607
|
-
value: rule.props.placeholder,
|
|
608
|
-
},
|
|
609
|
-
{
|
|
610
|
-
type: 'input',
|
|
611
|
-
title: '默认值',
|
|
612
|
-
field: fieldsMap$f['value'],
|
|
613
|
-
props: {
|
|
614
|
-
placeholder: '请输入',
|
|
615
|
-
},
|
|
616
|
-
value: rule.value,
|
|
617
|
-
},
|
|
618
|
-
Object.assign({ field: fieldsMap$f['config.fieldRatio'] }, getFieldRatioRule(rule, parentRule)),
|
|
619
|
-
{
|
|
620
|
-
type: 'switch',
|
|
621
|
-
title: '是否必填',
|
|
622
|
-
field: fieldsMap$f['effect.required'],
|
|
623
|
-
value: rule.effect.required,
|
|
624
|
-
},
|
|
625
|
-
];
|
|
626
|
-
},
|
|
627
|
-
parse(rule) {
|
|
628
|
-
return {
|
|
629
|
-
name: name$f,
|
|
630
|
-
field: rule.field,
|
|
631
|
-
title: {
|
|
632
|
-
title: rule.title.title,
|
|
633
|
-
},
|
|
634
|
-
props: {
|
|
635
|
-
placeholder: rule.props.placeholder,
|
|
636
|
-
},
|
|
637
|
-
value: rule.value,
|
|
638
|
-
config: {
|
|
639
|
-
fieldRatio: rule.config.fieldRatio,
|
|
640
|
-
},
|
|
641
|
-
effect: {
|
|
642
|
-
required: rule.effect.required,
|
|
643
|
-
},
|
|
644
|
-
};
|
|
645
|
-
},
|
|
646
|
-
};
|
|
647
|
-
|
|
648
|
-
const label$e = '数字输入框';
|
|
649
|
-
const fieldsMap$e = {
|
|
650
|
-
'title.title': 'title.title',
|
|
651
|
-
'props.placeholder': 'props.placeholder',
|
|
652
|
-
value: 'value',
|
|
653
|
-
'config.fieldRatio': 'config.fieldRatio',
|
|
654
|
-
'config.count': 'config.count',
|
|
655
|
-
'effect.required': 'effect.required',
|
|
656
|
-
};
|
|
657
|
-
const name$e = 'numInput';
|
|
658
|
-
var numInput = {
|
|
659
|
-
icon: 'NumInput',
|
|
660
|
-
name: name$e,
|
|
661
|
-
label: label$e,
|
|
662
|
-
rule() {
|
|
663
|
-
return {
|
|
664
|
-
type: 'inputNumber',
|
|
665
|
-
field: uniqueId(),
|
|
666
|
-
title: {
|
|
667
|
-
title: label$e,
|
|
668
|
-
style: {
|
|
669
|
-
overflow: 'hidden',
|
|
670
|
-
textOverflow: 'ellipsis',
|
|
671
|
-
whiteSpace: 'nowrap',
|
|
672
|
-
},
|
|
673
|
-
},
|
|
674
|
-
effect: {
|
|
675
|
-
required: true,
|
|
676
|
-
formRule: 'formRule',
|
|
677
|
-
},
|
|
678
|
-
props: {
|
|
679
|
-
placeholder: '请输入',
|
|
680
|
-
},
|
|
681
|
-
config: {
|
|
682
|
-
propsFields: Object.values(fieldsMap$e),
|
|
683
|
-
},
|
|
684
|
-
style: {
|
|
685
|
-
width: '100%',
|
|
686
|
-
},
|
|
687
|
-
};
|
|
688
|
-
},
|
|
689
|
-
props(rule, parentRule) {
|
|
690
|
-
return [
|
|
691
|
-
{
|
|
692
|
-
type: 'input',
|
|
693
|
-
title: '标题',
|
|
694
|
-
field: fieldsMap$e['title.title'],
|
|
695
|
-
value: rule.title.title,
|
|
696
|
-
effect: {
|
|
697
|
-
required: '请输入标题',
|
|
698
|
-
},
|
|
699
|
-
props: {
|
|
700
|
-
placeholder: '请输入',
|
|
701
|
-
maxlength: 10,
|
|
702
|
-
},
|
|
703
|
-
},
|
|
704
|
-
{
|
|
705
|
-
type: 'input',
|
|
706
|
-
title: '提示文字',
|
|
707
|
-
field: fieldsMap$e['props.placeholder'],
|
|
708
|
-
props: {
|
|
709
|
-
placeholder: '请输入',
|
|
710
|
-
},
|
|
711
|
-
value: rule.props.placeholder,
|
|
712
|
-
},
|
|
713
|
-
{
|
|
714
|
-
type: 'input',
|
|
715
|
-
title: '默认值',
|
|
716
|
-
field: fieldsMap$e['value'],
|
|
717
|
-
props: {
|
|
718
|
-
placeholder: '请输入',
|
|
719
|
-
},
|
|
720
|
-
value: rule.value,
|
|
721
|
-
},
|
|
722
|
-
Object.assign({ field: fieldsMap$e['config.fieldRatio'] }, getFieldRatioRule(rule, parentRule)),
|
|
723
|
-
{
|
|
724
|
-
type: 'switch',
|
|
725
|
-
title: '统计总数',
|
|
726
|
-
info: '仅当该控件结合“表格”控件使用时应用',
|
|
727
|
-
field: fieldsMap$e['config.count'],
|
|
728
|
-
value: rule.config.count,
|
|
729
|
-
props: {
|
|
730
|
-
disabled: (parentRule === null || parentRule === void 0 ? void 0 : parentRule.type) !== WidgetType.TableWidget,
|
|
731
|
-
},
|
|
732
|
-
},
|
|
733
|
-
{
|
|
734
|
-
type: 'switch',
|
|
735
|
-
title: '是否必填',
|
|
736
|
-
field: fieldsMap$e['effect.required'],
|
|
737
|
-
value: rule.effect.required,
|
|
738
|
-
info: '勾选后可作为流程条件',
|
|
739
|
-
},
|
|
740
|
-
];
|
|
741
|
-
},
|
|
742
|
-
parse(rule) {
|
|
743
|
-
return {
|
|
744
|
-
name: name$e,
|
|
745
|
-
field: rule.field,
|
|
746
|
-
title: {
|
|
747
|
-
title: rule.title.title,
|
|
748
|
-
},
|
|
749
|
-
props: {
|
|
750
|
-
placeholder: rule.props.placeholder,
|
|
751
|
-
},
|
|
752
|
-
value: rule.value,
|
|
753
|
-
config: {
|
|
754
|
-
count: rule.config.count,
|
|
755
|
-
fieldRatio: rule.config.fieldRatio,
|
|
756
|
-
},
|
|
757
|
-
effect: {
|
|
758
|
-
required: rule.effect.required,
|
|
759
|
-
},
|
|
760
|
-
};
|
|
761
|
-
},
|
|
762
|
-
};
|
|
763
|
-
|
|
764
|
-
const _hoisted_1$d = { class: "bm-handle-options" };
|
|
765
|
-
const _hoisted_2$b = {
|
|
766
|
-
key: 0,
|
|
767
|
-
class: "bm-handle-options__error-tip"
|
|
768
|
-
};
|
|
769
|
-
const _hoisted_3$a = /* @__PURE__ */ createTextVNode(" \u6279\u91CF\u7F16\u8F91 ");
|
|
770
|
-
const _hoisted_4$7 = /* @__PURE__ */ createTextVNode(" \u6DFB\u52A0\u9009\u9879 ");
|
|
771
|
-
const _hoisted_5$4 = /* @__PURE__ */ createTextVNode(" \u6BCF\u884C\u5BF9\u5E94\u4E00\u4E2A\u9009\u9879 ");
|
|
772
|
-
const _sfc_main$e = /* @__PURE__ */ defineComponent({
|
|
773
|
-
__name: "handle-options",
|
|
774
|
-
props: ["options"],
|
|
775
|
-
emits: ["setValue"],
|
|
776
|
-
setup(__props, { emit: emits }) {
|
|
777
|
-
const props = __props;
|
|
778
|
-
const handleClass = "bm-handle-options__drag-icon";
|
|
779
|
-
const visible = ref(false);
|
|
780
|
-
const text = ref("");
|
|
781
|
-
const repeatOption = ref([]);
|
|
782
|
-
function edit() {
|
|
783
|
-
visible.value = true;
|
|
784
|
-
text.value = makeText(props.options);
|
|
785
|
-
}
|
|
786
|
-
function add() {
|
|
787
|
-
const index = props.options.length;
|
|
788
|
-
const value = `\u9009\u9879${index + 1}`;
|
|
789
|
-
props.options.push({ value, label: value });
|
|
790
|
-
}
|
|
791
|
-
function makeText(options) {
|
|
792
|
-
return options.reduce((pre, cur) => {
|
|
793
|
-
if (!pre) {
|
|
794
|
-
return cur.label;
|
|
795
|
-
} else {
|
|
796
|
-
return pre + "\n" + cur.label;
|
|
797
|
-
}
|
|
798
|
-
}, "");
|
|
799
|
-
}
|
|
800
|
-
function handleOk() {
|
|
801
|
-
const options = text.value.split("\n").reduce((pre, cur) => {
|
|
802
|
-
if (cur) {
|
|
803
|
-
pre.push({ value: cur, label: cur });
|
|
804
|
-
}
|
|
805
|
-
return pre;
|
|
806
|
-
}, []);
|
|
807
|
-
props.options.splice(0, props.options.length);
|
|
808
|
-
props.options.push(...options);
|
|
809
|
-
visible.value = false;
|
|
810
|
-
}
|
|
811
|
-
function handleBlur(element) {
|
|
812
|
-
element.value = element.label;
|
|
813
|
-
}
|
|
814
|
-
function handleRepeatOption(val) {
|
|
815
|
-
repeatOption.value = [];
|
|
816
|
-
const cache = {};
|
|
817
|
-
val.forEach(({ value }) => {
|
|
818
|
-
if (!cache[value]) {
|
|
819
|
-
cache[value] = 1;
|
|
820
|
-
} else {
|
|
821
|
-
cache[value]++;
|
|
822
|
-
if (cache[value] === 2) {
|
|
823
|
-
repeatOption.value.push(value);
|
|
824
|
-
}
|
|
825
|
-
}
|
|
826
|
-
});
|
|
827
|
-
}
|
|
828
|
-
function emitSetValue(val) {
|
|
829
|
-
emits("setValue", val);
|
|
830
|
-
}
|
|
831
|
-
watch(
|
|
832
|
-
props.options,
|
|
833
|
-
(val) => {
|
|
834
|
-
handleRepeatOption(val);
|
|
835
|
-
emitSetValue(val);
|
|
836
|
-
},
|
|
837
|
-
{ deep: true }
|
|
838
|
-
);
|
|
839
|
-
return (_ctx, _cache) => {
|
|
840
|
-
const _component_Delete = resolveComponent("Delete");
|
|
841
|
-
const _component_ARow = resolveComponent("ARow");
|
|
842
|
-
const _component_a_textarea = resolveComponent("a-textarea");
|
|
843
|
-
const _component_a_modal = resolveComponent("a-modal");
|
|
844
|
-
return openBlock(), createElementBlock("div", null, [
|
|
845
|
-
createVNode(unref(Draggable), {
|
|
846
|
-
tag: "transition-group",
|
|
847
|
-
"component-data": {
|
|
848
|
-
name: "flip-list"
|
|
849
|
-
},
|
|
850
|
-
animation: 200,
|
|
851
|
-
list: __props.options,
|
|
852
|
-
handle: `.${handleClass}`,
|
|
853
|
-
"force-fallback": true
|
|
854
|
-
}, {
|
|
855
|
-
item: withCtx(({ element, index }) => [
|
|
856
|
-
createElementVNode("div", _hoisted_1$d, [
|
|
857
|
-
createVNode(_component_ARow, { align: "middle" }, {
|
|
858
|
-
default: withCtx(() => [
|
|
859
|
-
createVNode(unref(HolderOutlined), {
|
|
860
|
-
class: normalizeClass([handleClass])
|
|
861
|
-
}, null, 8, ["class"]),
|
|
862
|
-
createVNode(unref(FormItemRest), null, {
|
|
863
|
-
default: withCtx(() => [
|
|
864
|
-
createVNode(unref(Input), {
|
|
865
|
-
value: element.label,
|
|
866
|
-
"onUpdate:value": ($event) => element.label = $event,
|
|
867
|
-
class: normalizeClass([
|
|
868
|
-
"bm-handle-options__input",
|
|
869
|
-
repeatOption.value.length && repeatOption.value.includes(element.value) ? "is-error" : ""
|
|
870
|
-
]),
|
|
871
|
-
onBlur: ($event) => handleBlur(element)
|
|
872
|
-
}, null, 8, ["value", "onUpdate:value", "class", "onBlur"])
|
|
873
|
-
]),
|
|
874
|
-
_: 2
|
|
875
|
-
}, 1024),
|
|
876
|
-
createVNode(_component_Delete, {
|
|
877
|
-
class: "bm-handle-options__del-icon",
|
|
878
|
-
onClick: ($event) => __props.options.splice(index, 1)
|
|
879
|
-
}, null, 8, ["onClick"])
|
|
880
|
-
]),
|
|
881
|
-
_: 2
|
|
882
|
-
}, 1024),
|
|
883
|
-
repeatOption.value.length && repeatOption.value.includes(element.value) ? (openBlock(), createElementBlock("div", _hoisted_2$b, " \u8BF7\u66F4\u6539\u91CD\u590D\u9009\u9879 ")) : createCommentVNode("v-if", true)
|
|
884
|
-
])
|
|
885
|
-
]),
|
|
886
|
-
_: 1
|
|
887
|
-
}, 8, ["list", "handle"]),
|
|
888
|
-
createVNode(unref(Button), {
|
|
889
|
-
style: { "margin-left": "24px", "margin-top": "8px" },
|
|
890
|
-
onClick: edit
|
|
891
|
-
}, {
|
|
892
|
-
icon: withCtx(() => [
|
|
893
|
-
createVNode(unref(EditOutlined))
|
|
894
|
-
]),
|
|
895
|
-
default: withCtx(() => [
|
|
896
|
-
_hoisted_3$a
|
|
897
|
-
]),
|
|
898
|
-
_: 1
|
|
899
|
-
}),
|
|
900
|
-
createVNode(unref(Button), {
|
|
901
|
-
style: { "margin-left": "8px", "margin-top": "8px" },
|
|
902
|
-
onClick: add
|
|
903
|
-
}, {
|
|
904
|
-
icon: withCtx(() => [
|
|
905
|
-
createVNode(unref(PlusOutlined))
|
|
906
|
-
]),
|
|
907
|
-
default: withCtx(() => [
|
|
908
|
-
_hoisted_4$7
|
|
909
|
-
]),
|
|
910
|
-
_: 1
|
|
911
|
-
}),
|
|
912
|
-
createVNode(_component_a_modal, {
|
|
913
|
-
visible: visible.value,
|
|
914
|
-
"onUpdate:visible": _cache[1] || (_cache[1] = ($event) => visible.value = $event),
|
|
915
|
-
title: "\u9009\u9879\u6279\u91CF\u7F16\u8F91",
|
|
916
|
-
onOk: handleOk
|
|
917
|
-
}, {
|
|
918
|
-
default: withCtx(() => [
|
|
919
|
-
_hoisted_5$4,
|
|
920
|
-
createVNode(_component_a_textarea, {
|
|
921
|
-
value: text.value,
|
|
922
|
-
"onUpdate:value": _cache[0] || (_cache[0] = ($event) => text.value = $event),
|
|
923
|
-
style: { "margin-top": "8px" },
|
|
924
|
-
placeholder: "\u8BF7\u8F93\u5165",
|
|
925
|
-
"auto-size": { minRows: 8 }
|
|
926
|
-
}, null, 8, ["value"])
|
|
927
|
-
]),
|
|
928
|
-
_: 1
|
|
929
|
-
}, 8, ["visible"])
|
|
930
|
-
]);
|
|
931
|
-
};
|
|
932
|
-
}
|
|
933
|
-
});
|
|
934
|
-
var HandleOptionsCom = /* @__PURE__ */ _export_sfc(_sfc_main$e, [["__file", "handle-options.vue"]]);
|
|
935
|
-
|
|
936
|
-
const label$d = '单选框';
|
|
937
|
-
const ruleType$1 = {
|
|
938
|
-
checkedValue: 'radio',
|
|
939
|
-
unCheckedValue: 'select',
|
|
940
|
-
};
|
|
941
|
-
const fieldsMap$d = {
|
|
942
|
-
'title.title': 'title.title',
|
|
943
|
-
'props.placeholder': 'props.placeholder',
|
|
944
|
-
options: 'options',
|
|
945
|
-
type: 'type',
|
|
946
|
-
'config.fieldRatio': 'config.fieldRatio',
|
|
947
|
-
'effect.required': 'effect.required',
|
|
948
|
-
};
|
|
949
|
-
const name$d = 'radio';
|
|
950
|
-
var radio = {
|
|
951
|
-
icon: 'RadioIcon',
|
|
952
|
-
name: name$d,
|
|
953
|
-
label: label$d,
|
|
954
|
-
rule() {
|
|
955
|
-
return {
|
|
956
|
-
type: ruleType$1.unCheckedValue,
|
|
957
|
-
field: uniqueId(),
|
|
958
|
-
title: {
|
|
959
|
-
title: label$d,
|
|
960
|
-
style: {
|
|
961
|
-
overflow: 'hidden',
|
|
962
|
-
textOverflow: 'ellipsis',
|
|
963
|
-
whiteSpace: 'nowrap',
|
|
964
|
-
},
|
|
965
|
-
},
|
|
966
|
-
effect: {
|
|
967
|
-
required: true,
|
|
968
|
-
formRule: 'formRule',
|
|
969
|
-
},
|
|
970
|
-
options: [
|
|
971
|
-
{
|
|
972
|
-
value: '选项1',
|
|
973
|
-
label: '选项1',
|
|
974
|
-
},
|
|
975
|
-
{
|
|
976
|
-
value: '选项2',
|
|
977
|
-
label: '选项2',
|
|
978
|
-
},
|
|
979
|
-
{
|
|
980
|
-
value: '选项3',
|
|
981
|
-
label: '选项3',
|
|
982
|
-
},
|
|
983
|
-
],
|
|
984
|
-
props: {
|
|
985
|
-
placeholder: '请选择',
|
|
986
|
-
},
|
|
987
|
-
config: {
|
|
988
|
-
propsFields: Object.values(fieldsMap$d),
|
|
989
|
-
},
|
|
990
|
-
};
|
|
991
|
-
},
|
|
992
|
-
props(rule, parentRule) {
|
|
993
|
-
return [
|
|
994
|
-
{
|
|
995
|
-
type: 'input',
|
|
996
|
-
title: '标题',
|
|
997
|
-
field: fieldsMap$d['title.title'],
|
|
998
|
-
value: rule.title.title,
|
|
999
|
-
effect: {
|
|
1000
|
-
required: '请输入标题',
|
|
1001
|
-
},
|
|
1002
|
-
props: {
|
|
1003
|
-
placeholder: '请输入',
|
|
1004
|
-
maxlength: 10,
|
|
1005
|
-
},
|
|
1006
|
-
},
|
|
1007
|
-
{
|
|
1008
|
-
type: 'input',
|
|
1009
|
-
title: '提示文字',
|
|
1010
|
-
field: fieldsMap$d['props.placeholder'],
|
|
1011
|
-
props: {
|
|
1012
|
-
placeholder: '请输入',
|
|
1013
|
-
},
|
|
1014
|
-
value: rule.props.placeholder,
|
|
1015
|
-
},
|
|
1016
|
-
{
|
|
1017
|
-
type: 'HandleOptions',
|
|
1018
|
-
component: HandleOptionsCom,
|
|
1019
|
-
title: '选项',
|
|
1020
|
-
field: fieldsMap$d['options'],
|
|
1021
|
-
props: {
|
|
1022
|
-
options: rule.options,
|
|
1023
|
-
},
|
|
1024
|
-
value: rule.options,
|
|
1025
|
-
inject: true,
|
|
1026
|
-
on: {
|
|
1027
|
-
setValue(inject, options) {
|
|
1028
|
-
const rule = inject.self;
|
|
1029
|
-
const api = inject.api;
|
|
1030
|
-
api.changeValue(rule.field, options);
|
|
1031
|
-
api.emit('change', rule.field, rule.value, rule, api, true);
|
|
1032
|
-
},
|
|
1033
|
-
},
|
|
1034
|
-
},
|
|
1035
|
-
{
|
|
1036
|
-
hidden: (parentRule === null || parentRule === void 0 ? void 0 : parentRule.type) === WidgetType.TableWidget,
|
|
1037
|
-
type: 'switch',
|
|
1038
|
-
title: '选项平铺',
|
|
1039
|
-
field: fieldsMap$d['type'],
|
|
1040
|
-
value: rule.type,
|
|
1041
|
-
props: Object.assign({}, ruleType$1),
|
|
1042
|
-
},
|
|
1043
|
-
Object.assign({ field: fieldsMap$d['config.fieldRatio'] }, getFieldRatioRule(rule, parentRule)),
|
|
1044
|
-
{
|
|
1045
|
-
type: 'switch',
|
|
1046
|
-
title: '是否必填',
|
|
1047
|
-
field: fieldsMap$d['effect.required'],
|
|
1048
|
-
value: rule.effect.required,
|
|
1049
|
-
},
|
|
1050
|
-
];
|
|
1051
|
-
},
|
|
1052
|
-
parse(rule) {
|
|
1053
|
-
return {
|
|
1054
|
-
name: name$d,
|
|
1055
|
-
field: rule.field,
|
|
1056
|
-
type: rule.type,
|
|
1057
|
-
title: {
|
|
1058
|
-
title: rule.title.title,
|
|
1059
|
-
},
|
|
1060
|
-
props: {
|
|
1061
|
-
placeholder: rule.props.placeholder,
|
|
1062
|
-
},
|
|
1063
|
-
options: rule.options,
|
|
1064
|
-
config: {
|
|
1065
|
-
fieldRatio: rule.config.fieldRatio,
|
|
1066
|
-
},
|
|
1067
|
-
effect: {
|
|
1068
|
-
required: rule.effect.required,
|
|
1069
|
-
},
|
|
1070
|
-
};
|
|
1071
|
-
},
|
|
1072
|
-
};
|
|
1073
|
-
|
|
1074
|
-
const label$c = '多选框';
|
|
1075
|
-
const ruleType = {
|
|
1076
|
-
checkedValue: 'checkbox',
|
|
1077
|
-
unCheckedValue: 'select',
|
|
1078
|
-
};
|
|
1079
|
-
const fieldsMap$c = {
|
|
1080
|
-
'title.title': 'title.title',
|
|
1081
|
-
'props.placeholder': 'props.placeholder',
|
|
1082
|
-
options: 'options',
|
|
1083
|
-
type: 'type',
|
|
1084
|
-
'config.fieldRatio': 'config.fieldRatio',
|
|
1085
|
-
'effect.required': 'effect.required',
|
|
1086
|
-
};
|
|
1087
|
-
const name$c = 'checkbox';
|
|
1088
|
-
var checkbox = {
|
|
1089
|
-
icon: 'CheckboxIcon',
|
|
1090
|
-
name: name$c,
|
|
1091
|
-
label: label$c,
|
|
1092
|
-
rule() {
|
|
1093
|
-
return {
|
|
1094
|
-
type: ruleType.unCheckedValue,
|
|
1095
|
-
field: uniqueId(),
|
|
1096
|
-
title: {
|
|
1097
|
-
title: label$c,
|
|
1098
|
-
style: {
|
|
1099
|
-
overflow: 'hidden',
|
|
1100
|
-
textOverflow: 'ellipsis',
|
|
1101
|
-
whiteSpace: 'nowrap',
|
|
1102
|
-
},
|
|
1103
|
-
},
|
|
1104
|
-
effect: {
|
|
1105
|
-
required: true,
|
|
1106
|
-
formRule: 'formRule',
|
|
1107
|
-
},
|
|
1108
|
-
options: [
|
|
1109
|
-
{
|
|
1110
|
-
value: '选项1',
|
|
1111
|
-
label: '选项1',
|
|
1112
|
-
},
|
|
1113
|
-
{
|
|
1114
|
-
value: '选项2',
|
|
1115
|
-
label: '选项2',
|
|
1116
|
-
},
|
|
1117
|
-
{
|
|
1118
|
-
value: '选项3',
|
|
1119
|
-
label: '选项3',
|
|
1120
|
-
},
|
|
1121
|
-
],
|
|
1122
|
-
props: {
|
|
1123
|
-
placeholder: '请选择',
|
|
1124
|
-
},
|
|
1125
|
-
config: {
|
|
1126
|
-
propsFields: Object.values(fieldsMap$c),
|
|
1127
|
-
},
|
|
1128
|
-
};
|
|
1129
|
-
},
|
|
1130
|
-
props(rule, parentRule) {
|
|
1131
|
-
return [
|
|
1132
|
-
{
|
|
1133
|
-
type: 'input',
|
|
1134
|
-
title: '标题',
|
|
1135
|
-
field: fieldsMap$c['title.title'],
|
|
1136
|
-
value: rule.title.title,
|
|
1137
|
-
effect: {
|
|
1138
|
-
required: '请输入标题',
|
|
1139
|
-
},
|
|
1140
|
-
props: {
|
|
1141
|
-
placeholder: '请输入',
|
|
1142
|
-
maxlength: 10,
|
|
1143
|
-
},
|
|
1144
|
-
},
|
|
1145
|
-
{
|
|
1146
|
-
type: 'input',
|
|
1147
|
-
title: '提示文字',
|
|
1148
|
-
field: fieldsMap$c['props.placeholder'],
|
|
1149
|
-
props: {
|
|
1150
|
-
placeholder: '请输入',
|
|
1151
|
-
},
|
|
1152
|
-
value: rule.props.placeholder,
|
|
1153
|
-
},
|
|
1154
|
-
{
|
|
1155
|
-
type: 'HandleOptions',
|
|
1156
|
-
component: HandleOptionsCom,
|
|
1157
|
-
title: '选项',
|
|
1158
|
-
field: fieldsMap$c['options'],
|
|
1159
|
-
props: {
|
|
1160
|
-
options: rule.options,
|
|
1161
|
-
},
|
|
1162
|
-
value: rule.options,
|
|
1163
|
-
inject: true,
|
|
1164
|
-
on: {
|
|
1165
|
-
setValue(inject, options) {
|
|
1166
|
-
const rule = inject.self;
|
|
1167
|
-
const api = inject.api;
|
|
1168
|
-
api.changeValue(rule.field, options);
|
|
1169
|
-
api.emit('change', rule.field, rule.value, rule, api, true);
|
|
1170
|
-
},
|
|
1171
|
-
},
|
|
1172
|
-
},
|
|
1173
|
-
{
|
|
1174
|
-
hidden: (parentRule === null || parentRule === void 0 ? void 0 : parentRule.type) === WidgetType.TableWidget,
|
|
1175
|
-
type: 'switch',
|
|
1176
|
-
title: '选项平铺',
|
|
1177
|
-
field: fieldsMap$c['type'],
|
|
1178
|
-
value: rule.type,
|
|
1179
|
-
props: Object.assign({}, ruleType),
|
|
1180
|
-
},
|
|
1181
|
-
Object.assign({ field: fieldsMap$c['config.fieldRatio'] }, getFieldRatioRule(rule, parentRule)),
|
|
1182
|
-
{
|
|
1183
|
-
type: 'switch',
|
|
1184
|
-
title: '是否必填',
|
|
1185
|
-
field: fieldsMap$c['effect.required'],
|
|
1186
|
-
value: rule.effect.required,
|
|
1187
|
-
},
|
|
1188
|
-
];
|
|
1189
|
-
},
|
|
1190
|
-
parse(rule) {
|
|
1191
|
-
return {
|
|
1192
|
-
name: name$c,
|
|
1193
|
-
field: rule.field,
|
|
1194
|
-
type: rule.type,
|
|
1195
|
-
title: {
|
|
1196
|
-
title: rule.title.title,
|
|
1197
|
-
},
|
|
1198
|
-
props: {
|
|
1199
|
-
placeholder: rule.props.placeholder,
|
|
1200
|
-
},
|
|
1201
|
-
options: rule.options,
|
|
1202
|
-
config: {
|
|
1203
|
-
fieldRatio: rule.config.fieldRatio,
|
|
1204
|
-
},
|
|
1205
|
-
effect: {
|
|
1206
|
-
required: rule.effect.required,
|
|
1207
|
-
},
|
|
1208
|
-
};
|
|
1209
|
-
},
|
|
1210
|
-
};
|
|
1211
|
-
|
|
1212
|
-
const _hoisted_1$c = { class: "bm-default-date" };
|
|
1213
|
-
const _hoisted_2$a = /* @__PURE__ */ createTextVNode(" \u5F53\u524D\u65F6\u95F4(\u5E74/\u6708/\u65E5) ");
|
|
1214
|
-
const _hoisted_3$9 = /* @__PURE__ */ createTextVNode(" \u83B7\u53D6\u7528\u6237\u5B9E\u9645\u586B\u5199\u65F6\u7684\u65F6\u95F4 ");
|
|
1215
|
-
const _hoisted_4$6 = /* @__PURE__ */ createTextVNode("\u81EA\u5B9A\u4E49");
|
|
1216
|
-
const _sfc_main$d = /* @__PURE__ */ defineComponent({
|
|
1217
|
-
__name: "default-date",
|
|
1218
|
-
props: ["defaultRadioValue", "defalueDateValue"],
|
|
1219
|
-
emits: ["change"],
|
|
1220
|
-
setup(__props, { emit: emits }) {
|
|
1221
|
-
const props = __props;
|
|
1222
|
-
const radioValue = ref(props.defaultRadioValue);
|
|
1223
|
-
const dateValue = ref(props.defalueDateValue);
|
|
1224
|
-
function emitChange(dateValue2) {
|
|
1225
|
-
emits("change", radioValue.value, dateValue2);
|
|
1226
|
-
}
|
|
1227
|
-
function handleRadioChange(evt) {
|
|
1228
|
-
radioValue.value = evt.target.value;
|
|
1229
|
-
dateValue.value = "";
|
|
1230
|
-
emitChange("");
|
|
1231
|
-
}
|
|
1232
|
-
function handleDateChange(date) {
|
|
1233
|
-
dateValue.value = date;
|
|
1234
|
-
emitChange(date);
|
|
1235
|
-
}
|
|
1236
|
-
return (_ctx, _cache) => {
|
|
1237
|
-
return openBlock(), createElementBlock("div", _hoisted_1$c, [
|
|
1238
|
-
createVNode(unref(FormItemRest), null, {
|
|
1239
|
-
default: withCtx(() => [
|
|
1240
|
-
createVNode(unref(RadioGroup), {
|
|
1241
|
-
value: radioValue.value,
|
|
1242
|
-
onChange: handleRadioChange
|
|
1243
|
-
}, {
|
|
1244
|
-
default: withCtx(() => [
|
|
1245
|
-
createVNode(unref(Radio), { value: 0 }, {
|
|
1246
|
-
default: withCtx(() => [
|
|
1247
|
-
_hoisted_2$a,
|
|
1248
|
-
createVNode(unref(Tooltip), null, {
|
|
1249
|
-
title: withCtx(() => [
|
|
1250
|
-
_hoisted_3$9
|
|
1251
|
-
]),
|
|
1252
|
-
default: withCtx(() => [
|
|
1253
|
-
createVNode(unref(QuestionCircleOutlined), { style: { "color": "#babac1" } })
|
|
1254
|
-
]),
|
|
1255
|
-
_: 1
|
|
1256
|
-
})
|
|
1257
|
-
]),
|
|
1258
|
-
_: 1
|
|
1259
|
-
}),
|
|
1260
|
-
createVNode(unref(Radio), { value: 1 }, {
|
|
1261
|
-
default: withCtx(() => [
|
|
1262
|
-
_hoisted_4$6
|
|
1263
|
-
]),
|
|
1264
|
-
_: 1
|
|
1265
|
-
})
|
|
1266
|
-
]),
|
|
1267
|
-
_: 1
|
|
1268
|
-
}, 8, ["value"]),
|
|
1269
|
-
radioValue.value === 1 ? (openBlock(), createBlock(unref(DatePicker), {
|
|
1270
|
-
key: 0,
|
|
1271
|
-
style: { width: "100%", marginTop: "8px" },
|
|
1272
|
-
value: dateValue.value,
|
|
1273
|
-
format: "YYYY-MM-DD",
|
|
1274
|
-
"value-format": "YYYY-MM-DD",
|
|
1275
|
-
placeholder: "\u8BF7\u9009\u62E9",
|
|
1276
|
-
onChange: handleDateChange
|
|
1277
|
-
}, null, 8, ["value"])) : createCommentVNode("v-if", true)
|
|
1278
|
-
]),
|
|
1279
|
-
_: 1
|
|
1280
|
-
})
|
|
1281
|
-
]);
|
|
1282
|
-
};
|
|
1283
|
-
}
|
|
1284
|
-
});
|
|
1285
|
-
var DefaultDate = /* @__PURE__ */ _export_sfc(_sfc_main$d, [["__file", "default-date.vue"]]);
|
|
1286
|
-
|
|
1287
|
-
const label$b = '日期';
|
|
1288
|
-
const fieldsMap$b = {
|
|
1289
|
-
'title.title': 'title.title',
|
|
1290
|
-
'props.format': 'props.format',
|
|
1291
|
-
'props.placeholder': 'props.placeholder',
|
|
1292
|
-
value: 'value',
|
|
1293
|
-
'config.defaultValue': 'config.defaultValue',
|
|
1294
|
-
'config.fieldRatio': 'config.fieldRatio',
|
|
1295
|
-
'effect.required': 'effect.required',
|
|
1296
|
-
};
|
|
1297
|
-
const name$b = 'date';
|
|
1298
|
-
var date = {
|
|
1299
|
-
icon: 'Date',
|
|
1300
|
-
name: name$b,
|
|
1301
|
-
label: label$b,
|
|
1302
|
-
rule() {
|
|
1303
|
-
return {
|
|
1304
|
-
type: 'datePicker',
|
|
1305
|
-
field: uniqueId(),
|
|
1306
|
-
title: {
|
|
1307
|
-
title: label$b,
|
|
1308
|
-
style: {
|
|
1309
|
-
overflow: 'hidden',
|
|
1310
|
-
textOverflow: 'ellipsis',
|
|
1311
|
-
whiteSpace: 'nowrap',
|
|
1312
|
-
},
|
|
1313
|
-
},
|
|
1314
|
-
effect: {
|
|
1315
|
-
required: true,
|
|
1316
|
-
formRule: 'formRule',
|
|
1317
|
-
},
|
|
1318
|
-
props: {
|
|
1319
|
-
placeholder: '请选择',
|
|
1320
|
-
format: 'YYYY-MM',
|
|
1321
|
-
},
|
|
1322
|
-
config: {
|
|
1323
|
-
propsFields: Object.values(fieldsMap$b),
|
|
1324
|
-
defaultValue: 1,
|
|
1325
|
-
},
|
|
1326
|
-
style: {
|
|
1327
|
-
width: '100%',
|
|
1328
|
-
},
|
|
1329
|
-
};
|
|
1330
|
-
},
|
|
1331
|
-
props(rule, parentRule) {
|
|
1332
|
-
return [
|
|
1333
|
-
{
|
|
1334
|
-
type: 'input',
|
|
1335
|
-
title: '标题',
|
|
1336
|
-
field: fieldsMap$b['title.title'],
|
|
1337
|
-
value: rule.title.title,
|
|
1338
|
-
effect: {
|
|
1339
|
-
required: '请输入标题',
|
|
1340
|
-
},
|
|
1341
|
-
props: {
|
|
1342
|
-
placeholder: '请输入',
|
|
1343
|
-
maxlength: 10,
|
|
1344
|
-
},
|
|
1345
|
-
},
|
|
1346
|
-
{
|
|
1347
|
-
type: 'select',
|
|
1348
|
-
title: '日期类型',
|
|
1349
|
-
field: fieldsMap$b['props.format'],
|
|
1350
|
-
effect: {
|
|
1351
|
-
required: '请选择日期类型',
|
|
1352
|
-
},
|
|
1353
|
-
props: {
|
|
1354
|
-
placeholder: '请选择',
|
|
1355
|
-
},
|
|
1356
|
-
options: [
|
|
1357
|
-
{
|
|
1358
|
-
value: 'YYYY-MM',
|
|
1359
|
-
label: '年-月',
|
|
1360
|
-
},
|
|
1361
|
-
{
|
|
1362
|
-
value: 'YYYY-MM-DD',
|
|
1363
|
-
label: '年-月-日',
|
|
1364
|
-
},
|
|
1365
|
-
{
|
|
1366
|
-
value: 'YYYY-MM-DD HH:mm',
|
|
1367
|
-
label: '年-月-日 时:分',
|
|
1368
|
-
},
|
|
1369
|
-
],
|
|
1370
|
-
value: rule.props.format,
|
|
1371
|
-
},
|
|
1372
|
-
{
|
|
1373
|
-
type: 'input',
|
|
1374
|
-
title: '提示文字',
|
|
1375
|
-
field: fieldsMap$b['props.placeholder'],
|
|
1376
|
-
props: {
|
|
1377
|
-
placeholder: '请输入',
|
|
1378
|
-
},
|
|
1379
|
-
value: rule.props.placeholder,
|
|
1380
|
-
},
|
|
1381
|
-
{
|
|
1382
|
-
type: 'DefaultDate',
|
|
1383
|
-
component: DefaultDate,
|
|
1384
|
-
title: '默认值',
|
|
1385
|
-
field: fieldsMap$b['config.defaultValue'],
|
|
1386
|
-
props: {
|
|
1387
|
-
defaultRadioValue: rule.config.defaultValue,
|
|
1388
|
-
defalueDateValue: rule.value,
|
|
1389
|
-
},
|
|
1390
|
-
inject: true,
|
|
1391
|
-
on: {
|
|
1392
|
-
change({ api, self }, radioValue, dateValue) {
|
|
1393
|
-
self.props.defaultRadioValue = radioValue;
|
|
1394
|
-
self.props.defalueDateValue = dateValue;
|
|
1395
|
-
api.emit('change', 'config.defaultValue', radioValue, self, api, true);
|
|
1396
|
-
api.emit('change', 'value', dateValue, self, api, true);
|
|
1397
|
-
},
|
|
1398
|
-
},
|
|
1399
|
-
},
|
|
1400
|
-
Object.assign({ field: fieldsMap$b['config.fieldRatio'] }, getFieldRatioRule(rule, parentRule)),
|
|
1401
|
-
{
|
|
1402
|
-
type: 'switch',
|
|
1403
|
-
title: '是否必填',
|
|
1404
|
-
field: fieldsMap$b['effect.required'],
|
|
1405
|
-
value: rule.effect.required,
|
|
1406
|
-
},
|
|
1407
|
-
];
|
|
1408
|
-
},
|
|
1409
|
-
parse(rule) {
|
|
1410
|
-
return {
|
|
1411
|
-
name: name$b,
|
|
1412
|
-
field: rule.field,
|
|
1413
|
-
title: {
|
|
1414
|
-
title: rule.title.title,
|
|
1415
|
-
},
|
|
1416
|
-
props: {
|
|
1417
|
-
format: rule.props.format,
|
|
1418
|
-
placeholder: rule.props.placeholder,
|
|
1419
|
-
},
|
|
1420
|
-
value: rule.value,
|
|
1421
|
-
config: {
|
|
1422
|
-
defaultValue: rule.config.defaultValue,
|
|
1423
|
-
fieldRatio: rule.config.fieldRatio,
|
|
1424
|
-
},
|
|
1425
|
-
effect: {
|
|
1426
|
-
required: rule.effect.required,
|
|
1427
|
-
},
|
|
1428
|
-
};
|
|
1429
|
-
},
|
|
1430
|
-
};
|
|
1431
|
-
|
|
1432
|
-
const label$a = '日期区间';
|
|
1433
|
-
const fieldsMap$a = {
|
|
1434
|
-
'title.title': 'title.title',
|
|
1435
|
-
'props.format': 'props.format',
|
|
1436
|
-
'props.placeholder.0': 'props.placeholder.0',
|
|
1437
|
-
'props.placeholder.1': 'props.placeholder.1',
|
|
1438
|
-
'config.fieldRatio': 'config.fieldRatio',
|
|
1439
|
-
'effect.required': 'effect.required',
|
|
1440
|
-
};
|
|
1441
|
-
const name$a = 'dateRange';
|
|
1442
|
-
var dateRange = {
|
|
1443
|
-
icon: 'DateRange',
|
|
1444
|
-
name: name$a,
|
|
1445
|
-
label: label$a,
|
|
1446
|
-
rule() {
|
|
1447
|
-
return {
|
|
1448
|
-
type: 'datePicker',
|
|
1449
|
-
field: uniqueId(),
|
|
1450
|
-
title: {
|
|
1451
|
-
title: label$a,
|
|
1452
|
-
style: {
|
|
1453
|
-
overflow: 'hidden',
|
|
1454
|
-
textOverflow: 'ellipsis',
|
|
1455
|
-
whiteSpace: 'nowrap',
|
|
1456
|
-
},
|
|
1457
|
-
},
|
|
1458
|
-
effect: {
|
|
1459
|
-
required: true,
|
|
1460
|
-
formRule: 'formRule',
|
|
1461
|
-
},
|
|
1462
|
-
props: {
|
|
1463
|
-
range: true,
|
|
1464
|
-
placeholder: ['开始日期', '结束日期'],
|
|
1465
|
-
format: 'YYYY-MM',
|
|
1466
|
-
separator: '~',
|
|
1467
|
-
},
|
|
1468
|
-
config: {
|
|
1469
|
-
propsFields: Object.values(fieldsMap$a),
|
|
1470
|
-
defaultValue: 1,
|
|
1471
|
-
},
|
|
1472
|
-
style: {
|
|
1473
|
-
width: '100%',
|
|
1474
|
-
},
|
|
1475
|
-
};
|
|
1476
|
-
},
|
|
1477
|
-
props(rule, parentRule) {
|
|
1478
|
-
return [
|
|
1479
|
-
{
|
|
1480
|
-
type: 'input',
|
|
1481
|
-
title: '标题',
|
|
1482
|
-
field: fieldsMap$a['title.title'],
|
|
1483
|
-
value: rule.title.title,
|
|
1484
|
-
effect: {
|
|
1485
|
-
required: '请输入标题',
|
|
1486
|
-
},
|
|
1487
|
-
props: {
|
|
1488
|
-
placeholder: '请输入',
|
|
1489
|
-
maxlength: 10,
|
|
1490
|
-
},
|
|
1491
|
-
},
|
|
1492
|
-
{
|
|
1493
|
-
type: 'select',
|
|
1494
|
-
title: '日期类型',
|
|
1495
|
-
field: fieldsMap$a['props.format'],
|
|
1496
|
-
effect: {
|
|
1497
|
-
required: '请选择日期类型',
|
|
1498
|
-
},
|
|
1499
|
-
props: {
|
|
1500
|
-
placeholder: '请选择',
|
|
1501
|
-
},
|
|
1502
|
-
options: [
|
|
1503
|
-
{
|
|
1504
|
-
value: 'YYYY-MM',
|
|
1505
|
-
label: '年-月',
|
|
1506
|
-
},
|
|
1507
|
-
{
|
|
1508
|
-
value: 'YYYY-MM-DD',
|
|
1509
|
-
label: '年-月-日',
|
|
1510
|
-
},
|
|
1511
|
-
{
|
|
1512
|
-
value: 'YYYY-MM-DD HH:mm',
|
|
1513
|
-
label: '年-月-日 时:分',
|
|
1514
|
-
},
|
|
1515
|
-
],
|
|
1516
|
-
value: rule.props.format,
|
|
1517
|
-
},
|
|
1518
|
-
{
|
|
1519
|
-
type: 'input',
|
|
1520
|
-
title: '提示文字1',
|
|
1521
|
-
field: fieldsMap$a['props.placeholder.0'],
|
|
1522
|
-
props: {
|
|
1523
|
-
placeholder: '请输入',
|
|
1524
|
-
},
|
|
1525
|
-
value: rule.props.placeholder[0],
|
|
1526
|
-
},
|
|
1527
|
-
{
|
|
1528
|
-
type: 'input',
|
|
1529
|
-
title: '提示文字2',
|
|
1530
|
-
field: fieldsMap$a['props.placeholder.1'],
|
|
1531
|
-
props: {
|
|
1532
|
-
placeholder: '请输入',
|
|
1533
|
-
},
|
|
1534
|
-
value: rule.props.placeholder[1],
|
|
1535
|
-
},
|
|
1536
|
-
Object.assign({ field: fieldsMap$a['config.fieldRatio'] }, getFieldRatioRule(rule, parentRule)),
|
|
1537
|
-
{
|
|
1538
|
-
type: 'switch',
|
|
1539
|
-
title: '是否必填',
|
|
1540
|
-
field: fieldsMap$a['effect.required'],
|
|
1541
|
-
value: rule.effect.required,
|
|
1542
|
-
},
|
|
1543
|
-
];
|
|
1544
|
-
},
|
|
1545
|
-
parse(rule) {
|
|
1546
|
-
return {
|
|
1547
|
-
name: name$a,
|
|
1548
|
-
field: rule.field,
|
|
1549
|
-
title: {
|
|
1550
|
-
title: rule.title.title,
|
|
1551
|
-
},
|
|
1552
|
-
props: {
|
|
1553
|
-
format: rule.props.format,
|
|
1554
|
-
placeholder: rule.props.placeholder,
|
|
1555
|
-
},
|
|
1556
|
-
config: {
|
|
1557
|
-
fieldRatio: rule.config.fieldRatio,
|
|
1558
|
-
},
|
|
1559
|
-
effect: {
|
|
1560
|
-
required: rule.effect.required,
|
|
1561
|
-
},
|
|
1562
|
-
};
|
|
1563
|
-
},
|
|
1564
|
-
};
|
|
1565
|
-
|
|
1566
|
-
const label$9 = '说明文字';
|
|
1567
|
-
const fieldsMap$9 = {
|
|
1568
|
-
value: 'value',
|
|
1569
|
-
'style.color': 'style.color',
|
|
1570
|
-
};
|
|
1571
|
-
const name$9 = 'instruction';
|
|
1572
|
-
var Colors;
|
|
1573
|
-
(function (Colors) {
|
|
1574
|
-
Colors["Black"] = "#242633";
|
|
1575
|
-
Colors["Blue"] = "#2F4EED";
|
|
1576
|
-
})(Colors || (Colors = {}));
|
|
1577
|
-
var instruction = {
|
|
1578
|
-
icon: 'Instruction',
|
|
1579
|
-
name: name$9,
|
|
1580
|
-
label: label$9,
|
|
1581
|
-
rule() {
|
|
1582
|
-
return {
|
|
1583
|
-
field: uniqueId(),
|
|
1584
|
-
config: {
|
|
1585
|
-
propsFields: Object.values(fieldsMap$9),
|
|
1586
|
-
},
|
|
1587
|
-
style: {
|
|
1588
|
-
color: Colors.Black,
|
|
1589
|
-
},
|
|
1590
|
-
value: '请输入说明文字',
|
|
1591
|
-
};
|
|
1592
|
-
},
|
|
1593
|
-
props(rule, parentRule) {
|
|
1594
|
-
return [
|
|
1595
|
-
{
|
|
1596
|
-
type: 'input',
|
|
1597
|
-
props: {
|
|
1598
|
-
type: 'textarea',
|
|
1599
|
-
autoSize: {
|
|
1600
|
-
minRows: 5,
|
|
1601
|
-
},
|
|
1602
|
-
},
|
|
1603
|
-
title: label$9,
|
|
1604
|
-
field: fieldsMap$9.value,
|
|
1605
|
-
value: rule.value,
|
|
1606
|
-
prefix: {
|
|
1607
|
-
type: 'TextColor',
|
|
1608
|
-
props: {
|
|
1609
|
-
rule,
|
|
1610
|
-
},
|
|
1611
|
-
},
|
|
1612
|
-
},
|
|
1613
|
-
];
|
|
1614
|
-
},
|
|
1615
|
-
parse(rule) {
|
|
1616
|
-
return {
|
|
1617
|
-
name: name$9,
|
|
1618
|
-
field: rule.field,
|
|
1619
|
-
value: rule.value,
|
|
1620
|
-
style: {
|
|
1621
|
-
color: rule.style.color,
|
|
1622
|
-
},
|
|
1623
|
-
};
|
|
1624
|
-
},
|
|
1625
|
-
};
|
|
1626
|
-
|
|
1627
|
-
const label$8 = '图片';
|
|
1628
|
-
const fieldsMap$8 = {
|
|
1629
|
-
'title.title': 'title.title',
|
|
1630
|
-
'props.extraProps.maxCount': 'props.extraProps.maxCount',
|
|
1631
|
-
'effect.required': 'effect.required',
|
|
1632
|
-
};
|
|
1633
|
-
const name$8 = 'picture';
|
|
1634
|
-
var picture = {
|
|
1635
|
-
icon: 'Picture',
|
|
1636
|
-
name: name$8,
|
|
1637
|
-
label: label$8,
|
|
1638
|
-
rule() {
|
|
1639
|
-
return {
|
|
1640
|
-
type: 'UploadPicture',
|
|
1641
|
-
component: BmUpload,
|
|
1642
|
-
field: uniqueId(),
|
|
1643
|
-
title: {
|
|
1644
|
-
title: label$8,
|
|
1645
|
-
style: {
|
|
1646
|
-
overflow: 'hidden',
|
|
1647
|
-
textOverflow: 'ellipsis',
|
|
1648
|
-
whiteSpace: 'nowrap',
|
|
1649
|
-
},
|
|
1650
|
-
},
|
|
1651
|
-
effect: {
|
|
1652
|
-
required: true,
|
|
1653
|
-
formRule: 'formRule',
|
|
1654
|
-
},
|
|
1655
|
-
props: {
|
|
1656
|
-
uploadProps: {
|
|
1657
|
-
listType: 'picture-card',
|
|
1658
|
-
text: '请选择',
|
|
1659
|
-
},
|
|
1660
|
-
extraProps: {
|
|
1661
|
-
maxCount: 9,
|
|
1662
|
-
},
|
|
1663
|
-
},
|
|
1664
|
-
config: {
|
|
1665
|
-
propsFields: Object.values(fieldsMap$8),
|
|
1666
|
-
},
|
|
1667
|
-
};
|
|
1668
|
-
},
|
|
1669
|
-
props(rule, parentRule) {
|
|
1670
|
-
return [
|
|
1671
|
-
{
|
|
1672
|
-
type: 'input',
|
|
1673
|
-
title: '标题',
|
|
1674
|
-
field: fieldsMap$8['title.title'],
|
|
1675
|
-
value: rule.title.title,
|
|
1676
|
-
effect: {
|
|
1677
|
-
required: '请输入标题',
|
|
1678
|
-
},
|
|
1679
|
-
props: {
|
|
1680
|
-
placeholder: '请输入',
|
|
1681
|
-
maxlength: 10,
|
|
1682
|
-
},
|
|
1683
|
-
},
|
|
1684
|
-
{
|
|
1685
|
-
type: 'radio',
|
|
1686
|
-
field: 'props.extraProps.maxCount',
|
|
1687
|
-
title: '图片上传限制',
|
|
1688
|
-
info: '单张图片的大小需在10M以内',
|
|
1689
|
-
options: [
|
|
1690
|
-
{
|
|
1691
|
-
label: '最多可上传9张',
|
|
1692
|
-
value: 9,
|
|
1693
|
-
},
|
|
1694
|
-
{
|
|
1695
|
-
label: '仅允许上传1张图片',
|
|
1696
|
-
value: 1,
|
|
1697
|
-
},
|
|
1698
|
-
],
|
|
1699
|
-
value: rule.props.extraProps.maxCount,
|
|
1700
|
-
className: 'form-designer-props-radio-label',
|
|
1701
|
-
inject: true,
|
|
1702
|
-
on: {
|
|
1703
|
-
change({ api, self }, { target }) {
|
|
1704
|
-
const value = target.value;
|
|
1705
|
-
self.value = value;
|
|
1706
|
-
api.emit('change', self.field, value, self, api, true);
|
|
1707
|
-
},
|
|
1708
|
-
},
|
|
1709
|
-
},
|
|
1710
|
-
{
|
|
1711
|
-
type: 'switch',
|
|
1712
|
-
title: '是否必填',
|
|
1713
|
-
field: fieldsMap$8['effect.required'],
|
|
1714
|
-
value: rule.effect.required,
|
|
1715
|
-
},
|
|
1716
|
-
];
|
|
1717
|
-
},
|
|
1718
|
-
parse(rule) {
|
|
1719
|
-
return {
|
|
1720
|
-
name: name$8,
|
|
1721
|
-
field: rule.field,
|
|
1722
|
-
title: {
|
|
1723
|
-
title: rule.title.title,
|
|
1724
|
-
},
|
|
1725
|
-
props: {
|
|
1726
|
-
extraProps: {
|
|
1727
|
-
maxCount: rule.props.extraProps.maxCount,
|
|
1728
|
-
},
|
|
1729
|
-
},
|
|
1730
|
-
effect: {
|
|
1731
|
-
required: rule.effect.required,
|
|
1732
|
-
},
|
|
1733
|
-
};
|
|
1734
|
-
},
|
|
1735
|
-
};
|
|
1736
|
-
|
|
1737
|
-
const _hoisted_1$b = { class: "bm-widget-table-wrap" };
|
|
1738
|
-
const _hoisted_2$9 = { class: "bm-widget-table-top-bar" };
|
|
1739
|
-
const _hoisted_3$8 = /* @__PURE__ */ createTextVNode(" \u65B0\u589E ");
|
|
1740
|
-
const _hoisted_4$5 = /* @__PURE__ */ createTextVNode(" \u6279\u91CF\u5220\u9664 ");
|
|
1741
|
-
const _hoisted_5$3 = /* @__PURE__ */ createTextVNode(" \u6279\u91CF\u5BFC\u5165 ");
|
|
1742
|
-
const _hoisted_6$3 = /* @__PURE__ */ createTextVNode(" \u4E0B\u8F7D\u5BFC\u5165\u6A21\u677F ");
|
|
1743
|
-
const _hoisted_7$2 = { class: "bm-widget-table-outer" };
|
|
1744
|
-
const _hoisted_8$2 = { class: "bm-widget-table" };
|
|
1745
|
-
const _hoisted_9$1 = {
|
|
1746
|
-
key: 0,
|
|
1747
|
-
class: "bm-widget-table__virtual"
|
|
1748
|
-
};
|
|
1749
|
-
const _hoisted_10 = /* @__PURE__ */ createElementVNode("div", { class: "bm-widget-table__virtual__head" }, null, -1);
|
|
1750
|
-
const _hoisted_11 = /* @__PURE__ */ createElementVNode("div", { class: "bm-widget-table__virtual__content" }, null, -1);
|
|
1751
|
-
const _hoisted_12 = [
|
|
1752
|
-
_hoisted_10,
|
|
1753
|
-
_hoisted_11
|
|
1754
|
-
];
|
|
1755
|
-
const _hoisted_13 = {
|
|
1756
|
-
key: 1,
|
|
1757
|
-
class: "bm-widget-table__tip"
|
|
1758
|
-
};
|
|
1759
|
-
const _hoisted_14 = {
|
|
1760
|
-
key: 0,
|
|
1761
|
-
class: "bm-widget-table__checkbox"
|
|
1762
|
-
};
|
|
1763
|
-
const _hoisted_15 = { class: "bm-widget-table__checkbox__head" };
|
|
1764
|
-
const _hoisted_16 = { class: "bm-widget-table__checkbox__content" };
|
|
1765
|
-
const _hoisted_17 = { class: "bm-widget-table__operateColumn" };
|
|
1766
|
-
const _hoisted_18 = /* @__PURE__ */ createElementVNode("div", { class: "bm-widget-table__operateColumn__head" }, "\u64CD\u4F5C", -1);
|
|
1767
|
-
const _hoisted_19 = { class: "bm-widget-table__operateColumn__content" };
|
|
1768
|
-
const _hoisted_20 = /* @__PURE__ */ createElementVNode("a", null, "\u590D\u5236", -1);
|
|
1769
|
-
const _hoisted_21 = /* @__PURE__ */ createElementVNode("span", null, null, -1);
|
|
1770
|
-
const _hoisted_22 = /* @__PURE__ */ createElementVNode("a", null, "\u5220\u9664", -1);
|
|
1771
|
-
const _sfc_main$c = /* @__PURE__ */ defineComponent({
|
|
1772
|
-
__name: "widget-table",
|
|
1773
|
-
props: ["formCreateInject", "activeRule"],
|
|
1774
|
-
emits: [
|
|
1775
|
-
"add",
|
|
1776
|
-
"mouseenter",
|
|
1777
|
-
"mouseleave",
|
|
1778
|
-
"set-active-rule",
|
|
1779
|
-
"copy",
|
|
1780
|
-
"delete"
|
|
1781
|
-
],
|
|
1782
|
-
setup(__props, { emit: emits }) {
|
|
1783
|
-
const props = __props;
|
|
1784
|
-
const rule = computed(() => props.formCreateInject.rule);
|
|
1785
|
-
const childRules = computed(() => rule.value.config.childRules);
|
|
1786
|
-
const showDelete = computed(() => showFeature("delete"));
|
|
1787
|
-
const showImport = computed(() => showFeature("import"));
|
|
1788
|
-
const showCopy = computed(() => showFeature("copy"));
|
|
1789
|
-
function showFeature(featureId) {
|
|
1790
|
-
return rule.value.config.tableAdvancedFeatures.includes(featureId);
|
|
1791
|
-
}
|
|
1792
|
-
function handleAdd({ newIndex }) {
|
|
1793
|
-
emits("add", childRules.value[newIndex]);
|
|
1794
|
-
}
|
|
1795
|
-
function handleMouseenter() {
|
|
1796
|
-
emits("mouseenter");
|
|
1797
|
-
}
|
|
1798
|
-
function handleMouseleave() {
|
|
1799
|
-
emits("mouseleave");
|
|
1800
|
-
}
|
|
1801
|
-
function emitSetActiveRuleEvt(rule2) {
|
|
1802
|
-
emits("set-active-rule", rule2);
|
|
1803
|
-
}
|
|
1804
|
-
function handleClick(element) {
|
|
1805
|
-
emitSetActiveRuleEvt(element);
|
|
1806
|
-
}
|
|
1807
|
-
function handleUpdate({ newIndex }) {
|
|
1808
|
-
emitSetActiveRuleEvt(childRules.value[newIndex]);
|
|
1809
|
-
}
|
|
1810
|
-
function handleCopy(rule2) {
|
|
1811
|
-
emits("copy", rule2);
|
|
1812
|
-
}
|
|
1813
|
-
function handleDelete(rule2) {
|
|
1814
|
-
emits("delete", rule2);
|
|
1815
|
-
}
|
|
1816
|
-
return (_ctx, _cache) => {
|
|
1817
|
-
return openBlock(), createElementBlock("div", _hoisted_1$b, [
|
|
1818
|
-
createElementVNode("div", _hoisted_2$9, [
|
|
1819
|
-
createVNode(unref(Button), { type: "primary" }, {
|
|
1820
|
-
icon: withCtx(() => [
|
|
1821
|
-
createVNode(unref(PlusOutlined))
|
|
1822
|
-
]),
|
|
1823
|
-
default: withCtx(() => [
|
|
1824
|
-
_hoisted_3$8
|
|
1825
|
-
]),
|
|
1826
|
-
_: 1
|
|
1827
|
-
}),
|
|
1828
|
-
unref(showDelete) ? (openBlock(), createBlock(unref(Button), { key: 0 }, {
|
|
1829
|
-
default: withCtx(() => [
|
|
1830
|
-
_hoisted_4$5
|
|
1831
|
-
]),
|
|
1832
|
-
_: 1
|
|
1833
|
-
})) : createCommentVNode("v-if", true),
|
|
1834
|
-
unref(showImport) ? (openBlock(), createBlock(unref(Button), { key: 1 }, {
|
|
1835
|
-
default: withCtx(() => [
|
|
1836
|
-
_hoisted_5$3
|
|
1837
|
-
]),
|
|
1838
|
-
_: 1
|
|
1839
|
-
})) : createCommentVNode("v-if", true),
|
|
1840
|
-
unref(showImport) ? (openBlock(), createBlock(unref(Button), { key: 2 }, {
|
|
1841
|
-
default: withCtx(() => [
|
|
1842
|
-
_hoisted_6$3
|
|
1843
|
-
]),
|
|
1844
|
-
_: 1
|
|
1845
|
-
})) : createCommentVNode("v-if", true)
|
|
1846
|
-
]),
|
|
1847
|
-
createElementVNode("div", _hoisted_7$2, [
|
|
1848
|
-
createElementVNode("div", {
|
|
1849
|
-
class: "bm-widget-table-inner",
|
|
1850
|
-
style: normalizeStyle({
|
|
1851
|
-
paddingLeft: unref(showDelete) ? "32px" : 0,
|
|
1852
|
-
paddingRight: unref(showCopy) ? "81px" : "60px"
|
|
1853
|
-
})
|
|
1854
|
-
}, [
|
|
1855
|
-
createElementVNode("div", _hoisted_8$2, [
|
|
1856
|
-
unref(childRules).length ? (openBlock(), createElementBlock("div", _hoisted_9$1, _hoisted_12)) : (openBlock(), createElementBlock("div", _hoisted_13, "\u53EF\u62D6\u5165\u591A\u4E2A\u63A7\u4EF6")),
|
|
1857
|
-
createVNode(unref(Draggable), {
|
|
1858
|
-
"component-data": {
|
|
1859
|
-
field: unref(rule).field,
|
|
1860
|
-
type: unref(WidgetType).TableWidget
|
|
1861
|
-
},
|
|
1862
|
-
class: "bm-widget-table__drag-content",
|
|
1863
|
-
group: {
|
|
1864
|
-
name: "tableWidget",
|
|
1865
|
-
pull: true,
|
|
1866
|
-
put: ["widget", "tableWidget"]
|
|
1867
|
-
},
|
|
1868
|
-
list: unref(childRules),
|
|
1869
|
-
"ghost-class": unref(childRules).length ? "table-drag-ghost" : "table-drag-ghost__is-empty",
|
|
1870
|
-
"item-key": "field",
|
|
1871
|
-
direction: "vertical",
|
|
1872
|
-
"force-fallback": true,
|
|
1873
|
-
"scroll-sensitivity": 100,
|
|
1874
|
-
delay: 50,
|
|
1875
|
-
onAdd: handleAdd,
|
|
1876
|
-
onUpdate: handleUpdate
|
|
1877
|
-
}, {
|
|
1878
|
-
item: withCtx(({ element }) => [
|
|
1879
|
-
createElementVNode("div", {
|
|
1880
|
-
class: "bm-widget-table__drag-item",
|
|
1881
|
-
style: normalizeStyle({ width: element.config.fieldRatio })
|
|
1882
|
-
}, [
|
|
1883
|
-
createVNode(DragTool, {
|
|
1884
|
-
rule: element,
|
|
1885
|
-
"active-rule": __props.activeRule,
|
|
1886
|
-
"parent-rule": __props.formCreateInject.rule,
|
|
1887
|
-
onMouseenter: handleMouseenter,
|
|
1888
|
-
onMouseleave: handleMouseleave,
|
|
1889
|
-
onClick: withModifiers(($event) => handleClick(element), ["stop"]),
|
|
1890
|
-
onCopy: handleCopy,
|
|
1891
|
-
onDelete: handleDelete
|
|
1892
|
-
}, null, 8, ["rule", "active-rule", "parent-rule", "onClick"]),
|
|
1893
|
-
createVNode(DragPlaceholder)
|
|
1894
|
-
], 4)
|
|
1895
|
-
]),
|
|
1896
|
-
_: 1
|
|
1897
|
-
}, 8, ["component-data", "list", "ghost-class"])
|
|
1898
|
-
])
|
|
1899
|
-
], 4),
|
|
1900
|
-
unref(showDelete) ? (openBlock(), createElementBlock("div", _hoisted_14, [
|
|
1901
|
-
createElementVNode("div", _hoisted_15, [
|
|
1902
|
-
createVNode(unref(FormItemRest), null, {
|
|
1903
|
-
default: withCtx(() => [
|
|
1904
|
-
createVNode(unref(Checkbox))
|
|
1905
|
-
]),
|
|
1906
|
-
_: 1
|
|
1907
|
-
})
|
|
1908
|
-
]),
|
|
1909
|
-
createElementVNode("div", _hoisted_16, [
|
|
1910
|
-
createVNode(unref(FormItemRest), null, {
|
|
1911
|
-
default: withCtx(() => [
|
|
1912
|
-
createVNode(unref(Checkbox))
|
|
1913
|
-
]),
|
|
1914
|
-
_: 1
|
|
1915
|
-
})
|
|
1916
|
-
])
|
|
1917
|
-
])) : createCommentVNode("v-if", true),
|
|
1918
|
-
createElementVNode("div", _hoisted_17, [
|
|
1919
|
-
_hoisted_18,
|
|
1920
|
-
createElementVNode("div", _hoisted_19, [
|
|
1921
|
-
unref(showCopy) ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
1922
|
-
_hoisted_20,
|
|
1923
|
-
_hoisted_21
|
|
1924
|
-
], 64)) : createCommentVNode("v-if", true),
|
|
1925
|
-
_hoisted_22
|
|
1926
|
-
])
|
|
1927
|
-
])
|
|
1928
|
-
])
|
|
1929
|
-
]);
|
|
1930
|
-
};
|
|
1931
|
-
}
|
|
1932
|
-
});
|
|
1933
|
-
var WidgetTable = /* @__PURE__ */ _export_sfc(_sfc_main$c, [["__file", "widget-table.vue"]]);
|
|
1934
|
-
|
|
1935
|
-
const label$7 = '表格';
|
|
1936
|
-
const fieldsMap$7 = {
|
|
1937
|
-
'title.title': 'title.title',
|
|
1938
|
-
'config.childRules': 'config.childRules',
|
|
1939
|
-
'config.tableAdvancedFeatures': 'config.tableAdvancedFeatures',
|
|
1940
|
-
};
|
|
1941
|
-
const name$7 = 'table';
|
|
1942
|
-
var table = {
|
|
1943
|
-
icon: 'Table',
|
|
1944
|
-
name: name$7,
|
|
1945
|
-
label: label$7,
|
|
1946
|
-
rule() {
|
|
1947
|
-
const childRules = [];
|
|
1948
|
-
return {
|
|
1949
|
-
type: WidgetType.TableWidget,
|
|
1950
|
-
component: WidgetTable,
|
|
1951
|
-
field: uniqueId(),
|
|
1952
|
-
title: {
|
|
1953
|
-
type: 'TableHeadCount',
|
|
1954
|
-
title: label$7,
|
|
1955
|
-
props: {
|
|
1956
|
-
childRules,
|
|
1957
|
-
},
|
|
1958
|
-
style: {
|
|
1959
|
-
overflow: 'hidden',
|
|
1960
|
-
textOverflow: 'ellipsis',
|
|
1961
|
-
whiteSpace: 'nowrap',
|
|
1962
|
-
},
|
|
1963
|
-
},
|
|
1964
|
-
effect: {
|
|
1965
|
-
formRule: 'formRule',
|
|
1966
|
-
},
|
|
1967
|
-
config: {
|
|
1968
|
-
childRules,
|
|
1969
|
-
tableAdvancedFeatures: ['copy', 'delete', 'import'],
|
|
1970
|
-
propsFields: Object.values(fieldsMap$7),
|
|
1971
|
-
},
|
|
1972
|
-
emit: [
|
|
1973
|
-
'mouseenter',
|
|
1974
|
-
'mouseleave',
|
|
1975
|
-
'set-active-rule',
|
|
1976
|
-
'copy',
|
|
1977
|
-
'delete',
|
|
1978
|
-
'add',
|
|
1979
|
-
],
|
|
1980
|
-
emitPrefix: 'nest',
|
|
1981
|
-
};
|
|
1982
|
-
},
|
|
1983
|
-
props(rule) {
|
|
1984
|
-
return [
|
|
1985
|
-
{
|
|
1986
|
-
type: 'input',
|
|
1987
|
-
title: '标题',
|
|
1988
|
-
field: fieldsMap$7['title.title'],
|
|
1989
|
-
value: rule.title.title,
|
|
1990
|
-
effect: {
|
|
1991
|
-
required: '请输入标题',
|
|
1992
|
-
},
|
|
1993
|
-
props: {
|
|
1994
|
-
placeholder: '请输入',
|
|
1995
|
-
maxlength: 10,
|
|
1996
|
-
},
|
|
1997
|
-
},
|
|
1998
|
-
{
|
|
1999
|
-
type: 'TableColumn',
|
|
2000
|
-
title: '子字段设置',
|
|
2001
|
-
field: fieldsMap$7['config.childRules'],
|
|
2002
|
-
effect: {
|
|
2003
|
-
required: true,
|
|
2004
|
-
},
|
|
2005
|
-
value: rule.config.childRules,
|
|
2006
|
-
},
|
|
2007
|
-
{
|
|
2008
|
-
type: 'checkbox',
|
|
2009
|
-
title: '表格的高级操作',
|
|
2010
|
-
field: fieldsMap$7['config.tableAdvancedFeatures'],
|
|
2011
|
-
value: rule.config.tableAdvancedFeatures,
|
|
2012
|
-
options: [
|
|
2013
|
-
{
|
|
2014
|
-
value: 'copy',
|
|
2015
|
-
label: '复制行',
|
|
2016
|
-
},
|
|
2017
|
-
{
|
|
2018
|
-
value: 'delete',
|
|
2019
|
-
label: '批量删除',
|
|
2020
|
-
},
|
|
2021
|
-
{
|
|
2022
|
-
value: 'import',
|
|
2023
|
-
label: '批量导入',
|
|
2024
|
-
},
|
|
2025
|
-
],
|
|
2026
|
-
className: 'bfd-sider-right__form__table-checkbox',
|
|
2027
|
-
},
|
|
2028
|
-
];
|
|
2029
|
-
},
|
|
2030
|
-
parse(rule) {
|
|
2031
|
-
return {
|
|
2032
|
-
name: name$7,
|
|
2033
|
-
field: rule.field,
|
|
2034
|
-
title: {
|
|
2035
|
-
title: rule.title.title,
|
|
2036
|
-
},
|
|
2037
|
-
config: {
|
|
2038
|
-
tableAdvancedFeatures: rule.config.tableAdvancedFeatures,
|
|
2039
|
-
},
|
|
2040
|
-
};
|
|
2041
|
-
},
|
|
2042
|
-
};
|
|
2043
|
-
|
|
2044
|
-
const label$6 = '附件';
|
|
2045
|
-
const fieldsMap$6 = {
|
|
2046
|
-
'title.title': 'title.title',
|
|
2047
|
-
'effect.required': 'effect.required',
|
|
2048
|
-
};
|
|
2049
|
-
const name$6 = 'file';
|
|
2050
|
-
var file = {
|
|
2051
|
-
icon: 'File',
|
|
2052
|
-
name: name$6,
|
|
2053
|
-
label: label$6,
|
|
2054
|
-
rule() {
|
|
2055
|
-
return {
|
|
2056
|
-
type: WidgetType.UploadFile,
|
|
2057
|
-
component: BmUpload,
|
|
2058
|
-
field: uniqueId(),
|
|
2059
|
-
title: {
|
|
2060
|
-
title: label$6,
|
|
2061
|
-
style: {
|
|
2062
|
-
overflow: 'hidden',
|
|
2063
|
-
textOverflow: 'ellipsis',
|
|
2064
|
-
whiteSpace: 'nowrap',
|
|
2065
|
-
},
|
|
2066
|
-
},
|
|
2067
|
-
effect: {
|
|
2068
|
-
required: true,
|
|
2069
|
-
formRule: 'formRule',
|
|
2070
|
-
},
|
|
2071
|
-
config: {
|
|
2072
|
-
propsFields: Object.values(fieldsMap$6),
|
|
2073
|
-
},
|
|
2074
|
-
};
|
|
2075
|
-
},
|
|
2076
|
-
props(rule, parentRule) {
|
|
2077
|
-
return [
|
|
2078
|
-
{
|
|
2079
|
-
type: 'input',
|
|
2080
|
-
title: '标题',
|
|
2081
|
-
field: fieldsMap$6['title.title'],
|
|
2082
|
-
value: rule.title.title,
|
|
2083
|
-
effect: {
|
|
2084
|
-
required: '请输入标题',
|
|
2085
|
-
},
|
|
2086
|
-
props: {
|
|
2087
|
-
placeholder: '请输入',
|
|
2088
|
-
maxlength: 10,
|
|
2089
|
-
},
|
|
2090
|
-
},
|
|
2091
|
-
{
|
|
2092
|
-
type: 'switch',
|
|
2093
|
-
title: '是否必填',
|
|
2094
|
-
field: fieldsMap$6['effect.required'],
|
|
2095
|
-
value: rule.effect.required,
|
|
2096
|
-
},
|
|
2097
|
-
];
|
|
2098
|
-
},
|
|
2099
|
-
parse(rule) {
|
|
2100
|
-
return {
|
|
2101
|
-
name: name$6,
|
|
2102
|
-
field: rule.field,
|
|
2103
|
-
title: {
|
|
2104
|
-
title: rule.title.title,
|
|
2105
|
-
},
|
|
2106
|
-
effect: {
|
|
2107
|
-
required: rule.effect.required,
|
|
2108
|
-
},
|
|
2109
|
-
};
|
|
2110
|
-
},
|
|
2111
|
-
};
|
|
2112
|
-
|
|
2113
|
-
const label$5 = '员工';
|
|
2114
|
-
const fieldsMap$5 = {
|
|
2115
|
-
'title.title': 'title.title',
|
|
2116
|
-
'props.placeholder': 'props.placeholder',
|
|
2117
|
-
'props.limit': 'props.limit',
|
|
2118
|
-
'config.fieldRatio': 'config.fieldRatio',
|
|
2119
|
-
'effect.required': 'effect.required',
|
|
2120
|
-
};
|
|
2121
|
-
const name$5 = 'people';
|
|
2122
|
-
var people = {
|
|
2123
|
-
icon: 'People',
|
|
2124
|
-
name: name$5,
|
|
2125
|
-
label: label$5,
|
|
2126
|
-
rule() {
|
|
2127
|
-
return {
|
|
2128
|
-
type: 'select',
|
|
2129
|
-
field: uniqueId(),
|
|
2130
|
-
title: {
|
|
2131
|
-
title: label$5,
|
|
2132
|
-
style: {
|
|
2133
|
-
overflow: 'hidden',
|
|
2134
|
-
textOverflow: 'ellipsis',
|
|
2135
|
-
whiteSpace: 'nowrap',
|
|
2136
|
-
},
|
|
2137
|
-
},
|
|
2138
|
-
effect: {
|
|
2139
|
-
required: true,
|
|
2140
|
-
formRule: 'formRule',
|
|
2141
|
-
},
|
|
2142
|
-
props: {
|
|
2143
|
-
limit: 0,
|
|
2144
|
-
placeholder: '请选择',
|
|
2145
|
-
},
|
|
2146
|
-
config: {
|
|
2147
|
-
propsFields: Object.values(fieldsMap$5),
|
|
2148
|
-
},
|
|
2149
|
-
};
|
|
2150
|
-
},
|
|
2151
|
-
props(rule, parentRule) {
|
|
2152
|
-
return [
|
|
2153
|
-
{
|
|
2154
|
-
type: 'input',
|
|
2155
|
-
title: '标题',
|
|
2156
|
-
field: fieldsMap$5['title.title'],
|
|
2157
|
-
value: rule.title.title,
|
|
2158
|
-
effect: {
|
|
2159
|
-
required: '请输入标题',
|
|
2160
|
-
},
|
|
2161
|
-
props: {
|
|
2162
|
-
placeholder: '请输入',
|
|
2163
|
-
maxlength: 10,
|
|
2164
|
-
},
|
|
2165
|
-
},
|
|
2166
|
-
{
|
|
2167
|
-
type: 'input',
|
|
2168
|
-
title: '提示文字',
|
|
2169
|
-
field: fieldsMap$5['props.placeholder'],
|
|
2170
|
-
props: {
|
|
2171
|
-
placeholder: '请输入',
|
|
2172
|
-
},
|
|
2173
|
-
value: rule.props.placeholder,
|
|
2174
|
-
},
|
|
2175
|
-
{
|
|
2176
|
-
type: 'radio',
|
|
2177
|
-
title: '选项',
|
|
2178
|
-
field: fieldsMap$5['props.limit'],
|
|
2179
|
-
options: [
|
|
2180
|
-
{
|
|
2181
|
-
value: 1,
|
|
2182
|
-
label: '只能选择一人',
|
|
2183
|
-
},
|
|
2184
|
-
{
|
|
2185
|
-
value: 0,
|
|
2186
|
-
label: '可同时选择多人',
|
|
2187
|
-
},
|
|
2188
|
-
],
|
|
2189
|
-
value: rule.props.limit,
|
|
2190
|
-
effect: {
|
|
2191
|
-
required: true,
|
|
2192
|
-
},
|
|
2193
|
-
inject: true,
|
|
2194
|
-
on: {
|
|
2195
|
-
change({ api, self }, { target }) {
|
|
2196
|
-
const value = target.value;
|
|
2197
|
-
self.value = value;
|
|
2198
|
-
api.emit('change', self.field, value, self, api, true);
|
|
2199
|
-
},
|
|
2200
|
-
},
|
|
2201
|
-
className: 'form-designer-props-radio-label',
|
|
2202
|
-
},
|
|
2203
|
-
Object.assign({ field: fieldsMap$5['config.fieldRatio'] }, getFieldRatioRule(rule, parentRule)),
|
|
2204
|
-
{
|
|
2205
|
-
type: 'switch',
|
|
2206
|
-
title: '是否必填',
|
|
2207
|
-
info: '勾选后可作为流程条件',
|
|
2208
|
-
field: fieldsMap$5['effect.required'],
|
|
2209
|
-
value: rule.effect.required,
|
|
2210
|
-
},
|
|
2211
|
-
];
|
|
2212
|
-
},
|
|
2213
|
-
parse(rule) {
|
|
2214
|
-
return {
|
|
2215
|
-
name: name$5,
|
|
2216
|
-
field: rule.field,
|
|
2217
|
-
title: {
|
|
2218
|
-
title: rule.title.title,
|
|
2219
|
-
},
|
|
2220
|
-
props: {
|
|
2221
|
-
placeholder: rule.props.placeholder,
|
|
2222
|
-
limit: rule.props.limit,
|
|
2223
|
-
},
|
|
2224
|
-
config: {
|
|
2225
|
-
fieldRatio: rule.config.fieldRatio,
|
|
2226
|
-
},
|
|
2227
|
-
effect: {
|
|
2228
|
-
required: rule.effect.required,
|
|
2229
|
-
},
|
|
2230
|
-
};
|
|
2231
|
-
},
|
|
2232
|
-
};
|
|
2233
|
-
|
|
2234
|
-
const label$4 = '部门';
|
|
2235
|
-
const fieldsMap$4 = {
|
|
2236
|
-
'title.title': 'title.title',
|
|
2237
|
-
'props.placeholder': 'props.placeholder',
|
|
2238
|
-
'props.limit': 'props.limit',
|
|
2239
|
-
'config.fieldRatio': 'config.fieldRatio',
|
|
2240
|
-
'effect.required': 'effect.required',
|
|
2241
|
-
};
|
|
2242
|
-
const name$4 = 'department';
|
|
2243
|
-
var department = {
|
|
2244
|
-
icon: 'Department',
|
|
2245
|
-
name: name$4,
|
|
2246
|
-
label: label$4,
|
|
2247
|
-
rule() {
|
|
2248
|
-
return {
|
|
2249
|
-
type: 'select',
|
|
2250
|
-
field: uniqueId(),
|
|
2251
|
-
title: {
|
|
2252
|
-
title: label$4,
|
|
2253
|
-
style: {
|
|
2254
|
-
overflow: 'hidden',
|
|
2255
|
-
textOverflow: 'ellipsis',
|
|
2256
|
-
whiteSpace: 'nowrap',
|
|
2257
|
-
},
|
|
2258
|
-
},
|
|
2259
|
-
effect: {
|
|
2260
|
-
required: true,
|
|
2261
|
-
formRule: 'formRule',
|
|
2262
|
-
},
|
|
2263
|
-
props: {
|
|
2264
|
-
limit: 0,
|
|
2265
|
-
placeholder: '请选择',
|
|
2266
|
-
},
|
|
2267
|
-
config: {
|
|
2268
|
-
propsFields: Object.values(fieldsMap$4),
|
|
2269
|
-
},
|
|
2270
|
-
};
|
|
2271
|
-
},
|
|
2272
|
-
props(rule, parentRule) {
|
|
2273
|
-
return [
|
|
2274
|
-
{
|
|
2275
|
-
type: 'input',
|
|
2276
|
-
title: '标题',
|
|
2277
|
-
field: fieldsMap$4['title.title'],
|
|
2278
|
-
value: rule.title.title,
|
|
2279
|
-
effect: {
|
|
2280
|
-
required: '请输入标题',
|
|
2281
|
-
},
|
|
2282
|
-
props: {
|
|
2283
|
-
placeholder: '请输入',
|
|
2284
|
-
maxlength: 10,
|
|
2285
|
-
},
|
|
2286
|
-
},
|
|
2287
|
-
{
|
|
2288
|
-
type: 'input',
|
|
2289
|
-
title: '提示文字',
|
|
2290
|
-
field: fieldsMap$4['props.placeholder'],
|
|
2291
|
-
props: {
|
|
2292
|
-
placeholder: '请输入',
|
|
2293
|
-
},
|
|
2294
|
-
value: rule.props.placeholder,
|
|
2295
|
-
},
|
|
2296
|
-
{
|
|
2297
|
-
type: 'radio',
|
|
2298
|
-
title: '选项',
|
|
2299
|
-
field: fieldsMap$4['props.limit'],
|
|
2300
|
-
options: [
|
|
2301
|
-
{
|
|
2302
|
-
value: 1,
|
|
2303
|
-
label: '只能选择一部门',
|
|
2304
|
-
},
|
|
2305
|
-
{
|
|
2306
|
-
value: 0,
|
|
2307
|
-
label: '可同时选择多个部门',
|
|
2308
|
-
},
|
|
2309
|
-
],
|
|
2310
|
-
value: rule.props.limit,
|
|
2311
|
-
effect: {
|
|
2312
|
-
required: true,
|
|
2313
|
-
},
|
|
2314
|
-
inject: true,
|
|
2315
|
-
on: {
|
|
2316
|
-
change({ api, self }, { target }) {
|
|
2317
|
-
const value = target.value;
|
|
2318
|
-
self.value = value;
|
|
2319
|
-
api.emit('change', self.field, value, self, api, true);
|
|
2320
|
-
},
|
|
2321
|
-
},
|
|
2322
|
-
className: 'form-designer-props-radio-label',
|
|
2323
|
-
},
|
|
2324
|
-
Object.assign({ field: fieldsMap$4['config.fieldRatio'] }, getFieldRatioRule(rule, parentRule)),
|
|
2325
|
-
{
|
|
2326
|
-
type: 'switch',
|
|
2327
|
-
title: '是否必填',
|
|
2328
|
-
info: '勾选后可作为流程条件',
|
|
2329
|
-
field: fieldsMap$4['effect.required'],
|
|
2330
|
-
value: rule.effect.required,
|
|
2331
|
-
},
|
|
2332
|
-
];
|
|
2333
|
-
},
|
|
2334
|
-
parse(rule) {
|
|
2335
|
-
return {
|
|
2336
|
-
name: name$4,
|
|
2337
|
-
field: rule.field,
|
|
2338
|
-
title: {
|
|
2339
|
-
title: rule.title.title,
|
|
2340
|
-
},
|
|
2341
|
-
props: {
|
|
2342
|
-
placeholder: rule.props.placeholder,
|
|
2343
|
-
limit: rule.props.limit,
|
|
2344
|
-
},
|
|
2345
|
-
config: {
|
|
2346
|
-
fieldRatio: rule.config.fieldRatio,
|
|
2347
|
-
},
|
|
2348
|
-
effect: {
|
|
2349
|
-
required: rule.effect.required,
|
|
2350
|
-
},
|
|
2351
|
-
};
|
|
2352
|
-
},
|
|
2353
|
-
};
|
|
2354
|
-
|
|
2355
|
-
const _hoisted_1$a = { style: { "margin-top": "16px", "line-height": "32px" } };
|
|
2356
|
-
const _hoisted_2$8 = /* @__PURE__ */ createTextVNode(" \u660E\u7EC6\u5217\u8868 ");
|
|
2357
|
-
const _hoisted_3$7 = { style: { "float": "right" } };
|
|
2358
|
-
const _hoisted_4$4 = /* @__PURE__ */ createTextVNode(" \u4E0B\u8F7D\u5BFC\u5165\u6A21\u677F ");
|
|
2359
|
-
const _hoisted_5$2 = /* @__PURE__ */ createTextVNode(" \u5BFC\u5165\u660E\u7EC6 ");
|
|
2360
|
-
const _hoisted_6$2 = /* @__PURE__ */ createTextVNode(" \u6279\u91CF\u5220\u9664 ");
|
|
2361
|
-
const _hoisted_7$1 = /* @__PURE__ */ createTextVNode(" \u65B0\u589E ");
|
|
2362
|
-
const _hoisted_8$1 = /* @__PURE__ */ createElementVNode("div", { class: "bm-material-temp__table-tip" }, "\u7CFB\u7EDF\u81EA\u52A8\u83B7\u53D6\u8868\u683C\u5B57\u6BB5", -1);
|
|
2363
|
-
const _hoisted_9 = { class: "bm-material-temp__add" };
|
|
2364
|
-
const _sfc_main$b = /* @__PURE__ */ defineComponent({
|
|
2365
|
-
__name: "widget-material-temp",
|
|
2366
|
-
props: ["formCreateInject"],
|
|
2367
|
-
setup(__props) {
|
|
2368
|
-
const props = __props;
|
|
2369
|
-
const panes = [
|
|
2370
|
-
{
|
|
2371
|
-
key: "\u7D20\u67501",
|
|
2372
|
-
title: "\u7D20\u67501"
|
|
2373
|
-
}
|
|
2374
|
-
];
|
|
2375
|
-
let activeKey = "\u7D20\u67501";
|
|
2376
|
-
const option = {
|
|
2377
|
-
form: {
|
|
2378
|
-
layout: "vertical"
|
|
2379
|
-
},
|
|
2380
|
-
submitBtn: {
|
|
2381
|
-
show: false
|
|
2382
|
-
},
|
|
2383
|
-
row: {
|
|
2384
|
-
gutter: [24, 24]
|
|
2385
|
-
},
|
|
2386
|
-
col: {
|
|
2387
|
-
span: 12
|
|
2388
|
-
}
|
|
2389
|
-
};
|
|
2390
|
-
const uploadPicField = "uploadPicture";
|
|
2391
|
-
const rules = reactive([
|
|
2392
|
-
{
|
|
2393
|
-
type: "button",
|
|
2394
|
-
field: "materialTemp",
|
|
2395
|
-
title: "\u7D20\u6750\u6A21\u677F",
|
|
2396
|
-
effect: {
|
|
2397
|
-
required: true
|
|
2398
|
-
},
|
|
2399
|
-
children: [
|
|
2400
|
-
{
|
|
2401
|
-
type: "PlusOutlined",
|
|
2402
|
-
component: PlusOutlined
|
|
2403
|
-
},
|
|
2404
|
-
"\u9009\u62E9\u6A21\u677F"
|
|
2405
|
-
]
|
|
2406
|
-
},
|
|
2407
|
-
{
|
|
2408
|
-
type: "span",
|
|
2409
|
-
field: "materialType",
|
|
2410
|
-
title: "\u7D20\u6750\u7C7B\u578B",
|
|
2411
|
-
children: ["\u7CFB\u7EDF\u81EA\u52A8\u83B7\u53D6"],
|
|
2412
|
-
style: {
|
|
2413
|
-
color: "#9393A3"
|
|
2414
|
-
}
|
|
2415
|
-
},
|
|
2416
|
-
{
|
|
2417
|
-
type: "span",
|
|
2418
|
-
field: "size",
|
|
2419
|
-
title: "\u5C3A\u5BF8",
|
|
2420
|
-
children: ["\u7CFB\u7EDF\u81EA\u52A8\u83B7\u53D6"],
|
|
2421
|
-
style: {
|
|
2422
|
-
color: "#9393A3"
|
|
2423
|
-
}
|
|
2424
|
-
},
|
|
2425
|
-
{
|
|
2426
|
-
type: "span",
|
|
2427
|
-
field: "coverPicture",
|
|
2428
|
-
title: "\u5C01\u9762\u56FE",
|
|
2429
|
-
children: ["\u7CFB\u7EDF\u81EA\u52A8\u83B7\u53D6"],
|
|
2430
|
-
style: {
|
|
2431
|
-
color: "#9393A3"
|
|
2432
|
-
}
|
|
2433
|
-
},
|
|
2434
|
-
{
|
|
2435
|
-
type: "span",
|
|
2436
|
-
field: "templateStructureDiagram",
|
|
2437
|
-
title: "\u6A21\u677F\u7ED3\u6784\u56FE",
|
|
2438
|
-
children: ["\u7CFB\u7EDF\u81EA\u52A8\u83B7\u53D6"],
|
|
2439
|
-
style: {
|
|
2440
|
-
color: "#9393A3"
|
|
2441
|
-
}
|
|
2442
|
-
},
|
|
2443
|
-
{
|
|
2444
|
-
type: "UploadPicture",
|
|
2445
|
-
component: BmUpload,
|
|
2446
|
-
field: uploadPicField,
|
|
2447
|
-
title: "\u4E0A\u4F20\u53C2\u8003\u56FE",
|
|
2448
|
-
effect: {
|
|
2449
|
-
required: false
|
|
2450
|
-
},
|
|
2451
|
-
props: {
|
|
2452
|
-
uploadProps: {
|
|
2453
|
-
listType: "picture-card",
|
|
2454
|
-
text: "\u4E0A\u4F20\u7167\u7247"
|
|
2455
|
-
},
|
|
2456
|
-
extraProps: {
|
|
2457
|
-
maxSize: 9
|
|
2458
|
-
}
|
|
2459
|
-
}
|
|
2460
|
-
}
|
|
2461
|
-
]);
|
|
2462
|
-
const uploadPicRule = computed(
|
|
2463
|
-
() => rules.find((rule) => rule.field === uploadPicField)
|
|
2464
|
-
);
|
|
2465
|
-
function handleUploadPicRule(uploadPictureRule) {
|
|
2466
|
-
uploadPicRule.value.effect.required = uploadPictureRule.required;
|
|
2467
|
-
uploadPicRule.value.hidden = uploadPictureRule.hidden;
|
|
2468
|
-
}
|
|
2469
|
-
watch(
|
|
2470
|
-
() => props.formCreateInject.rule.config.uploadPictureRule,
|
|
2471
|
-
handleUploadPicRule,
|
|
2472
|
-
{
|
|
2473
|
-
deep: true
|
|
2474
|
-
}
|
|
2475
|
-
);
|
|
2476
|
-
return (_ctx, _cache) => {
|
|
2477
|
-
const _component_FormCreate = resolveComponent("FormCreate");
|
|
2478
|
-
return openBlock(), createBlock(unref(Tabs), {
|
|
2479
|
-
activeKey: unref(activeKey),
|
|
2480
|
-
"onUpdate:activeKey": _cache[0] || (_cache[0] = ($event) => isRef(activeKey) ? activeKey.value = $event : activeKey = $event),
|
|
2481
|
-
class: "bm-material-temp",
|
|
2482
|
-
type: "editable-card",
|
|
2483
|
-
"hide-add": "",
|
|
2484
|
-
size: "small"
|
|
2485
|
-
}, {
|
|
2486
|
-
rightExtra: withCtx(() => [
|
|
2487
|
-
createElementVNode("span", _hoisted_9, [
|
|
2488
|
-
createVNode(unref(PlusOutlined))
|
|
2489
|
-
])
|
|
2490
|
-
]),
|
|
2491
|
-
default: withCtx(() => [
|
|
2492
|
-
(openBlock(), createElementBlock(Fragment, null, renderList(panes, (pane) => {
|
|
2493
|
-
return createVNode(unref(TabPane), {
|
|
2494
|
-
key: pane.key,
|
|
2495
|
-
tab: pane.title
|
|
2496
|
-
}, {
|
|
2497
|
-
default: withCtx(() => [
|
|
2498
|
-
createVNode(_component_FormCreate, {
|
|
2499
|
-
option,
|
|
2500
|
-
rule: rules
|
|
2501
|
-
}, null, 8, ["rule"]),
|
|
2502
|
-
createElementVNode("div", _hoisted_1$a, [
|
|
2503
|
-
_hoisted_2$8,
|
|
2504
|
-
createElementVNode("div", _hoisted_3$7, [
|
|
2505
|
-
createVNode(unref(Button), null, {
|
|
2506
|
-
default: withCtx(() => [
|
|
2507
|
-
_hoisted_4$4
|
|
2508
|
-
]),
|
|
2509
|
-
_: 1
|
|
2510
|
-
}),
|
|
2511
|
-
createVNode(unref(Button), null, {
|
|
2512
|
-
default: withCtx(() => [
|
|
2513
|
-
_hoisted_5$2
|
|
2514
|
-
]),
|
|
2515
|
-
_: 1
|
|
2516
|
-
}),
|
|
2517
|
-
createVNode(unref(Button), null, {
|
|
2518
|
-
default: withCtx(() => [
|
|
2519
|
-
_hoisted_6$2
|
|
2520
|
-
]),
|
|
2521
|
-
_: 1
|
|
2522
|
-
}),
|
|
2523
|
-
createVNode(unref(Button), { type: "primary" }, {
|
|
2524
|
-
default: withCtx(() => [
|
|
2525
|
-
createVNode(unref(PlusOutlined)),
|
|
2526
|
-
_hoisted_7$1
|
|
2527
|
-
]),
|
|
2528
|
-
_: 1
|
|
2529
|
-
})
|
|
2530
|
-
])
|
|
2531
|
-
]),
|
|
2532
|
-
_hoisted_8$1
|
|
2533
|
-
]),
|
|
2534
|
-
_: 2
|
|
2535
|
-
}, 1032, ["tab"]);
|
|
2536
|
-
}), 64))
|
|
2537
|
-
]),
|
|
2538
|
-
_: 1
|
|
2539
|
-
}, 8, ["activeKey"]);
|
|
2540
|
-
};
|
|
2541
|
-
}
|
|
2542
|
-
});
|
|
2543
|
-
var WidgetMaterialTemp = /* @__PURE__ */ _export_sfc(_sfc_main$b, [["__file", "widget-material-temp.vue"]]);
|
|
2544
|
-
|
|
2545
|
-
const _hoisted_1$9 = { class: "bm-use-instruction" };
|
|
2546
|
-
const _hoisted_2$7 = { class: "bm-use-instruction__title" };
|
|
2547
|
-
const _hoisted_3$6 = /* @__PURE__ */ createTextVNode(" \u4F7F\u7528\u8BF4\u660E ");
|
|
2548
|
-
const _sfc_main$a = /* @__PURE__ */ defineComponent({
|
|
2549
|
-
__name: "use-instruction",
|
|
2550
|
-
setup(__props) {
|
|
2551
|
-
return (_ctx, _cache) => {
|
|
2552
|
-
return openBlock(), createElementBlock("div", _hoisted_1$9, [
|
|
2553
|
-
createElementVNode("div", _hoisted_2$7, [
|
|
2554
|
-
createVNode(unref(InfoCircleFilled), { class: "bm-use-instruction__title__icon" }),
|
|
2555
|
-
_hoisted_3$6
|
|
2556
|
-
]),
|
|
2557
|
-
renderSlot(_ctx.$slots, "default")
|
|
2558
|
-
]);
|
|
2559
|
-
};
|
|
2560
|
-
}
|
|
2561
|
-
});
|
|
2562
|
-
var UseInstruction = /* @__PURE__ */ _export_sfc(_sfc_main$a, [["__file", "use-instruction.vue"]]);
|
|
2563
|
-
|
|
2564
|
-
const label$3 = '素材模板';
|
|
2565
|
-
const fieldsMap$3 = {
|
|
2566
|
-
'config.uploadPictureRule.required': 'config.uploadPictureRule.required',
|
|
2567
|
-
'config.uploadPictureRule.hidden': 'config.uploadPictureRule.hidden',
|
|
2568
|
-
};
|
|
2569
|
-
const name$3 = 'materialTemp';
|
|
2570
|
-
var materialTemp = {
|
|
2571
|
-
icon: 'MaterialTemp',
|
|
2572
|
-
name: name$3,
|
|
2573
|
-
label: label$3,
|
|
2574
|
-
rule() {
|
|
2575
|
-
return {
|
|
2576
|
-
type: 'WidgetMaterialTemp',
|
|
2577
|
-
component: WidgetMaterialTemp,
|
|
2578
|
-
title: {
|
|
2579
|
-
title: label$3,
|
|
2580
|
-
},
|
|
2581
|
-
field: uniqueId(),
|
|
2582
|
-
config: {
|
|
2583
|
-
propsFields: Object.values(fieldsMap$3),
|
|
2584
|
-
uploadPictureRule: {
|
|
2585
|
-
required: false,
|
|
2586
|
-
hidden: false,
|
|
2587
|
-
},
|
|
2588
|
-
},
|
|
2589
|
-
};
|
|
2590
|
-
},
|
|
2591
|
-
props(rule) {
|
|
2592
|
-
return [
|
|
2593
|
-
{
|
|
2594
|
-
type: 'UseInstruction',
|
|
2595
|
-
component: UseInstruction,
|
|
2596
|
-
children: [
|
|
2597
|
-
{
|
|
2598
|
-
type: 'span',
|
|
2599
|
-
children: [
|
|
2600
|
-
'·该套件打通店铺与素材模板的数据关联,可根据店铺获取该店铺可用的素材模板。',
|
|
2601
|
-
],
|
|
2602
|
-
},
|
|
2603
|
-
{
|
|
2604
|
-
type: 'span',
|
|
2605
|
-
children: [
|
|
2606
|
-
'·满足一个素材申请单可使用多个素材类型对应的素材模板申请素材。',
|
|
2607
|
-
],
|
|
2608
|
-
style: {
|
|
2609
|
-
display: 'inline-block',
|
|
2610
|
-
marginTop: '8px',
|
|
2611
|
-
},
|
|
2612
|
-
},
|
|
2613
|
-
],
|
|
2614
|
-
style: {
|
|
2615
|
-
marginBottom: '24px',
|
|
2616
|
-
},
|
|
2617
|
-
},
|
|
2618
|
-
{
|
|
2619
|
-
type: 'span',
|
|
2620
|
-
title: '素材模板',
|
|
2621
|
-
field: 'materialTemp',
|
|
2622
|
-
children: [
|
|
2623
|
-
'用于选择对应可用的素材模板信息(编号、名称、尺寸、封面图、结构图)。此项必填并获取所选择的模板的编号及名称显示。',
|
|
2624
|
-
],
|
|
2625
|
-
style: {
|
|
2626
|
-
color: '#505259',
|
|
2627
|
-
},
|
|
2628
|
-
},
|
|
2629
|
-
{
|
|
2630
|
-
type: 'span',
|
|
2631
|
-
title: '素材类型/尺寸/封面图/结构图',
|
|
2632
|
-
field: 'systemGeneration',
|
|
2633
|
-
children: ['通过所选模板,系统自动获取此模板对应的相关内容。'],
|
|
2634
|
-
style: {
|
|
2635
|
-
color: '#505259',
|
|
2636
|
-
},
|
|
2637
|
-
},
|
|
2638
|
-
{
|
|
2639
|
-
type: 'span',
|
|
2640
|
-
title: '上传参考图',
|
|
2641
|
-
field: 'uploadPicture',
|
|
2642
|
-
prefix: {
|
|
2643
|
-
type: 'CheckboxSwitch',
|
|
2644
|
-
props: {
|
|
2645
|
-
rule,
|
|
2646
|
-
},
|
|
2647
|
-
},
|
|
2648
|
-
children: ['用于上传当次申请的素材参考的图片。可最多上传9张图。'],
|
|
2649
|
-
style: {
|
|
2650
|
-
color: '#505259',
|
|
2651
|
-
},
|
|
2652
|
-
},
|
|
2653
|
-
{
|
|
2654
|
-
type: 'span',
|
|
2655
|
-
title: '明细列表',
|
|
2656
|
-
field: 'detailList',
|
|
2657
|
-
children: [
|
|
2658
|
-
'根据所选的素材模板,系统自动获取该模板需填写的内容字段列表以及批量导入的模板。列表允许操作:下载所选素材模板的导入模板、批量导入明细、新增、编辑、删除。',
|
|
2659
|
-
],
|
|
2660
|
-
style: {
|
|
2661
|
-
color: '#505259',
|
|
2662
|
-
},
|
|
2663
|
-
},
|
|
2664
|
-
];
|
|
2665
|
-
},
|
|
2666
|
-
parse(rule) {
|
|
2667
|
-
return {
|
|
2668
|
-
name: name$3,
|
|
2669
|
-
field: rule.field,
|
|
2670
|
-
config: {
|
|
2671
|
-
uploadPictureRule: {
|
|
2672
|
-
hidden: rule.config.uploadPictureRule.hidden,
|
|
2673
|
-
required: rule.config.uploadPictureRule.required,
|
|
2674
|
-
},
|
|
2675
|
-
},
|
|
2676
|
-
};
|
|
2677
|
-
},
|
|
2678
|
-
};
|
|
2679
|
-
|
|
2680
|
-
const _hoisted_1$8 = /* @__PURE__ */ createElementVNode("div", { class: "bm-product-info-item__title" }, "\u5546\u54C1\u7F16\u53F7", -1);
|
|
2681
|
-
const _hoisted_2$6 = { class: "bm-product-info-item__content" };
|
|
2682
|
-
const _hoisted_3$5 = { class: "bm-product-info-item__title" };
|
|
2683
|
-
const _hoisted_4$3 = /* @__PURE__ */ createElementVNode("div", { class: "bm-product-info-item__content" }, "\u7CFB\u7EDF\u81EA\u52A8\u5E26\u51FA", -1);
|
|
2684
|
-
const _sfc_main$9 = /* @__PURE__ */ defineComponent({
|
|
2685
|
-
__name: "product-info",
|
|
2686
|
-
props: ["formCreateInject"],
|
|
2687
|
-
setup(__props) {
|
|
2688
|
-
return (_ctx, _cache) => {
|
|
2689
|
-
return openBlock(), createBlock(unref(Row), null, {
|
|
2690
|
-
default: withCtx(() => [
|
|
2691
|
-
createVNode(unref(Col), {
|
|
2692
|
-
class: "bm-product-info-item",
|
|
2693
|
-
span: 12
|
|
2694
|
-
}, {
|
|
2695
|
-
default: withCtx(() => [
|
|
2696
|
-
_hoisted_1$8,
|
|
2697
|
-
createElementVNode("div", _hoisted_2$6, [
|
|
2698
|
-
createVNode(unref(Input), { placeholder: "\u8BF7\u8F93\u5165\u5546\u54C1\u7F16\u53F7" })
|
|
2699
|
-
])
|
|
2700
|
-
]),
|
|
2701
|
-
_: 1
|
|
2702
|
-
}),
|
|
2703
|
-
(openBlock(true), createElementBlock(Fragment, null, renderList(__props.formCreateInject.rule.config.associatedFields, (item) => {
|
|
2704
|
-
return openBlock(), createBlock(unref(Col), {
|
|
2705
|
-
key: item.value,
|
|
2706
|
-
class: "bm-product-info-item",
|
|
2707
|
-
span: 12
|
|
2708
|
-
}, {
|
|
2709
|
-
default: withCtx(() => [
|
|
2710
|
-
createElementVNode("div", _hoisted_3$5, toDisplayString(item.label), 1),
|
|
2711
|
-
_hoisted_4$3
|
|
2712
|
-
]),
|
|
2713
|
-
_: 2
|
|
2714
|
-
}, 1024);
|
|
2715
|
-
}), 128))
|
|
2716
|
-
]),
|
|
2717
|
-
_: 1
|
|
2718
|
-
});
|
|
2719
|
-
};
|
|
2720
|
-
}
|
|
2721
|
-
});
|
|
2722
|
-
var ProductInfo = /* @__PURE__ */ _export_sfc(_sfc_main$9, [["__file", "product-info.vue"]]);
|
|
2723
|
-
|
|
2724
|
-
const _hoisted_1$7 = /* @__PURE__ */ createElementVNode("div", { class: "bm-associated-fields-item" }, [
|
|
2725
|
-
/* @__PURE__ */ createElementVNode("span", { class: "bm-associated-fields-item__content" }, "\u5546\u54C1\u7F16\u53F7")
|
|
2726
|
-
], -1);
|
|
2727
|
-
const _hoisted_2$5 = { class: "bm-associated-fields-item__content" };
|
|
2728
|
-
const _hoisted_3$4 = /* @__PURE__ */ createTextVNode(" \u6DFB\u52A0\u5B50\u5B57\u6BB5 ");
|
|
2729
|
-
const _hoisted_4$2 = { style: { "text-align": "right", "margin": "6px 0 4px", "padding-right": "8px" } };
|
|
2730
|
-
const _hoisted_5$1 = /* @__PURE__ */ createTextVNode("\u53D6\u6D88");
|
|
2731
|
-
const _hoisted_6$1 = /* @__PURE__ */ createTextVNode("\u786E\u5B9A");
|
|
2732
|
-
const _sfc_main$8 = /* @__PURE__ */ defineComponent({
|
|
2733
|
-
__name: "associated-fields",
|
|
2734
|
-
props: ["rule"],
|
|
2735
|
-
emits: ["change"],
|
|
2736
|
-
setup(__props, { emit: emits }) {
|
|
2737
|
-
const props = __props;
|
|
2738
|
-
const visible = ref(false);
|
|
2739
|
-
const checkList = ref([]);
|
|
2740
|
-
const options = [
|
|
2741
|
-
{
|
|
2742
|
-
value: "\u5546\u54C1\u540D\u79F0",
|
|
2743
|
-
label: "\u5546\u54C1\u540D\u79F0"
|
|
2744
|
-
},
|
|
2745
|
-
{
|
|
2746
|
-
value: "\u5546\u54C1\u7B80\u79F0",
|
|
2747
|
-
label: "\u5546\u54C1\u7B80\u79F0"
|
|
2748
|
-
},
|
|
2749
|
-
{
|
|
2750
|
-
value: "\u5546\u54C1\u56FE\u7247",
|
|
2751
|
-
label: "\u5546\u54C1\u56FE\u7247"
|
|
2752
|
-
},
|
|
2753
|
-
{
|
|
2754
|
-
value: "\u5EFA\u8BAE\u96F6\u552E\u4EF7",
|
|
2755
|
-
label: "\u5EFA\u8BAE\u96F6\u552E\u4EF7"
|
|
2756
|
-
},
|
|
2757
|
-
{
|
|
2758
|
-
value: "\u5546\u54C1\u7BB1\u89C4",
|
|
2759
|
-
label: "\u5546\u54C1\u7BB1\u89C4"
|
|
2760
|
-
},
|
|
2761
|
-
{
|
|
2762
|
-
value: "\u5546\u54C1\u5355\u4F4D",
|
|
2763
|
-
label: "\u5546\u54C1\u5355\u4F4D"
|
|
2764
|
-
}
|
|
2765
|
-
];
|
|
2766
|
-
function emitChangeEvt() {
|
|
2767
|
-
emits(
|
|
2768
|
-
"change",
|
|
2769
|
-
options.filter((op) => checkList.value.includes(op.value))
|
|
2770
|
-
);
|
|
2771
|
-
}
|
|
2772
|
-
function handOk() {
|
|
2773
|
-
visible.value = false;
|
|
2774
|
-
emitChangeEvt();
|
|
2775
|
-
}
|
|
2776
|
-
function init() {
|
|
2777
|
-
checkList.value = props.rule.config.associatedFields.map((item) => item.value);
|
|
2778
|
-
}
|
|
2779
|
-
function visibleChange(visible2) {
|
|
2780
|
-
if (visible2) {
|
|
2781
|
-
init();
|
|
2782
|
-
}
|
|
2783
|
-
}
|
|
2784
|
-
function handleDel(value) {
|
|
2785
|
-
checkList.value = checkList.value.filter((cl) => cl !== value);
|
|
2786
|
-
emitChangeEvt();
|
|
2787
|
-
}
|
|
2788
|
-
init();
|
|
2789
|
-
watch(visible, (val) => {
|
|
2790
|
-
visibleChange(val);
|
|
2791
|
-
});
|
|
2792
|
-
return (_ctx, _cache) => {
|
|
2793
|
-
const _component_Delete = resolveComponent("Delete");
|
|
2794
|
-
return openBlock(), createElementBlock("div", null, [
|
|
2795
|
-
_hoisted_1$7,
|
|
2796
|
-
(openBlock(true), createElementBlock(Fragment, null, renderList(__props.rule.config.associatedFields, (item) => {
|
|
2797
|
-
return openBlock(), createElementBlock("div", {
|
|
2798
|
-
key: item.value,
|
|
2799
|
-
class: "bm-associated-fields-item"
|
|
2800
|
-
}, [
|
|
2801
|
-
createElementVNode("span", _hoisted_2$5, toDisplayString(item.label), 1),
|
|
2802
|
-
createVNode(_component_Delete, {
|
|
2803
|
-
class: "bm-associated-fields-item__icon",
|
|
2804
|
-
onClick: ($event) => handleDel(item.value)
|
|
2805
|
-
}, null, 8, ["onClick"])
|
|
2806
|
-
]);
|
|
2807
|
-
}), 128)),
|
|
2808
|
-
createVNode(unref(Dropdown), {
|
|
2809
|
-
visible: visible.value,
|
|
2810
|
-
"onUpdate:visible": _cache[2] || (_cache[2] = ($event) => visible.value = $event),
|
|
2811
|
-
trigger: ["click"]
|
|
2812
|
-
}, {
|
|
2813
|
-
overlay: withCtx(() => [
|
|
2814
|
-
createVNode(unref(Menu), null, {
|
|
2815
|
-
default: withCtx(() => [
|
|
2816
|
-
createVNode(unref(FormItemRest), null, {
|
|
2817
|
-
default: withCtx(() => [
|
|
2818
|
-
createVNode(unref(CheckboxGroup), {
|
|
2819
|
-
value: checkList.value,
|
|
2820
|
-
"onUpdate:value": _cache[0] || (_cache[0] = ($event) => checkList.value = $event),
|
|
2821
|
-
style: { "width": "100%" }
|
|
2822
|
-
}, {
|
|
2823
|
-
default: withCtx(() => [
|
|
2824
|
-
(openBlock(), createElementBlock(Fragment, null, renderList(options, (item) => {
|
|
2825
|
-
return createVNode(unref(MenuItem), {
|
|
2826
|
-
key: item.value
|
|
2827
|
-
}, {
|
|
2828
|
-
default: withCtx(() => [
|
|
2829
|
-
createVNode(unref(Checkbox), {
|
|
2830
|
-
value: item.value,
|
|
2831
|
-
style: { "width": "100%" }
|
|
2832
|
-
}, {
|
|
2833
|
-
default: withCtx(() => [
|
|
2834
|
-
createTextVNode(toDisplayString(item.label), 1)
|
|
2835
|
-
]),
|
|
2836
|
-
_: 2
|
|
2837
|
-
}, 1032, ["value"])
|
|
2838
|
-
]),
|
|
2839
|
-
_: 2
|
|
2840
|
-
}, 1024);
|
|
2841
|
-
}), 64))
|
|
2842
|
-
]),
|
|
2843
|
-
_: 1
|
|
2844
|
-
}, 8, ["value"])
|
|
2845
|
-
]),
|
|
2846
|
-
_: 1
|
|
2847
|
-
}),
|
|
2848
|
-
createVNode(unref(Divider), { style: { "margin": "0" } }),
|
|
2849
|
-
createElementVNode("div", _hoisted_4$2, [
|
|
2850
|
-
createVNode(unref(Button), {
|
|
2851
|
-
onClick: _cache[1] || (_cache[1] = ($event) => visible.value = false)
|
|
2852
|
-
}, {
|
|
2853
|
-
default: withCtx(() => [
|
|
2854
|
-
_hoisted_5$1
|
|
2855
|
-
]),
|
|
2856
|
-
_: 1
|
|
2857
|
-
}),
|
|
2858
|
-
createVNode(unref(Button), {
|
|
2859
|
-
type: "primary",
|
|
2860
|
-
style: { "margin-left": "8px" },
|
|
2861
|
-
onClick: handOk
|
|
2862
|
-
}, {
|
|
2863
|
-
default: withCtx(() => [
|
|
2864
|
-
_hoisted_6$1
|
|
2865
|
-
]),
|
|
2866
|
-
_: 1
|
|
2867
|
-
})
|
|
2868
|
-
])
|
|
2869
|
-
]),
|
|
2870
|
-
_: 1
|
|
2871
|
-
})
|
|
2872
|
-
]),
|
|
2873
|
-
default: withCtx(() => [
|
|
2874
|
-
createVNode(unref(Button), {
|
|
2875
|
-
style: { "margin-top": "8px" },
|
|
2876
|
-
block: ""
|
|
2877
|
-
}, {
|
|
2878
|
-
default: withCtx(() => [
|
|
2879
|
-
createVNode(unref(PlusOutlined)),
|
|
2880
|
-
_hoisted_3$4
|
|
2881
|
-
]),
|
|
2882
|
-
_: 1
|
|
2883
|
-
})
|
|
2884
|
-
]),
|
|
2885
|
-
_: 1
|
|
2886
|
-
}, 8, ["visible"])
|
|
2887
|
-
]);
|
|
2888
|
-
};
|
|
2889
|
-
}
|
|
2890
|
-
});
|
|
2891
|
-
var AssociatedFields = /* @__PURE__ */ _export_sfc(_sfc_main$8, [["__file", "associated-fields.vue"]]);
|
|
2892
|
-
|
|
2893
|
-
const _hoisted_1$6 = /* @__PURE__ */ createElementVNode("div", { style: { "margin": "18px 0 6px" } }, "\u4EC5\u83B7\u53D6", -1);
|
|
2894
|
-
const _hoisted_2$4 = /* @__PURE__ */ createElementVNode("div", { style: { "margin-top": "7px" } }, "\u4E2D\u53EF\u5206\u9500\u7684\u5546\u54C1\u6570\u636E", -1);
|
|
2895
|
-
const _hoisted_3$3 = /* @__PURE__ */ createTextVNode("\u8BF7\u5148\u6DFB\u52A0\u5173\u8054\u8868\u5355\u4E2D\u7684\u5E97\u94FA\u7EC4\u4EF6");
|
|
2896
|
-
const _sfc_main$7 = /* @__PURE__ */ defineComponent({
|
|
2897
|
-
__name: "shop-data-filter",
|
|
2898
|
-
props: ["widgetFormRules", "defaultSelectValue"],
|
|
2899
|
-
emits: ["change"],
|
|
2900
|
-
setup(__props, { emit: emits }) {
|
|
2901
|
-
const props = __props;
|
|
2902
|
-
const checkedValue = ref(false);
|
|
2903
|
-
const selectValue = ref(props.defaultSelectValue);
|
|
2904
|
-
const shopRules = computed(
|
|
2905
|
-
() => props.widgetFormRules.reduce((pre, cur) => {
|
|
2906
|
-
const name = cur.config.config.name;
|
|
2907
|
-
if (name === "row" || name === "table") {
|
|
2908
|
-
cur.config.childRules.forEach((rule) => {
|
|
2909
|
-
getShop(rule, pre);
|
|
2910
|
-
});
|
|
2911
|
-
} else {
|
|
2912
|
-
getShop(cur, pre);
|
|
2913
|
-
}
|
|
2914
|
-
return pre;
|
|
2915
|
-
}, [])
|
|
2916
|
-
);
|
|
2917
|
-
const shops = computed(() => {
|
|
2918
|
-
return shopRules.value.map((shopRule) => ({
|
|
2919
|
-
value: shopRule.field,
|
|
2920
|
-
label: shopRule.title.title
|
|
2921
|
-
}));
|
|
2922
|
-
});
|
|
2923
|
-
function getShop(rule, target) {
|
|
2924
|
-
if (rule.config.config.name === "shop")
|
|
2925
|
-
target.push(rule);
|
|
2926
|
-
}
|
|
2927
|
-
function checkedValueChange(val) {
|
|
2928
|
-
if (!val)
|
|
2929
|
-
selectValue.value = void 0;
|
|
2930
|
-
}
|
|
2931
|
-
function selectValueChange(val) {
|
|
2932
|
-
if (val) {
|
|
2933
|
-
checkedValue.value = true;
|
|
2934
|
-
}
|
|
2935
|
-
}
|
|
2936
|
-
function handleChange(val) {
|
|
2937
|
-
emits("change", val);
|
|
2938
|
-
}
|
|
2939
|
-
function shopLinkProduct(newField, oldField) {
|
|
2940
|
-
shopRules.value.forEach((shop) => {
|
|
2941
|
-
if (shop.field === oldField) {
|
|
2942
|
-
shop.config.linkProductCount--;
|
|
2943
|
-
}
|
|
2944
|
-
if (shop.field === newField) {
|
|
2945
|
-
if (!shop.config.linkProductCount) {
|
|
2946
|
-
shop.config.linkProductCount = 0;
|
|
2947
|
-
}
|
|
2948
|
-
shop.config.linkProductCount++;
|
|
2949
|
-
}
|
|
2950
|
-
});
|
|
2951
|
-
}
|
|
2952
|
-
watch(checkedValue, (checkedValue2) => {
|
|
2953
|
-
checkedValueChange(checkedValue2);
|
|
2954
|
-
});
|
|
2955
|
-
watch(
|
|
2956
|
-
selectValue,
|
|
2957
|
-
(selectValue2, oldSelectValue) => {
|
|
2958
|
-
selectValueChange(selectValue2);
|
|
2959
|
-
shopLinkProduct(selectValue2, oldSelectValue);
|
|
2960
|
-
},
|
|
2961
|
-
{
|
|
2962
|
-
immediate: true
|
|
2963
|
-
}
|
|
2964
|
-
);
|
|
2965
|
-
return (_ctx, _cache) => {
|
|
2966
|
-
const _component_a_tooltip = resolveComponent("a-tooltip");
|
|
2967
|
-
return openBlock(), createBlock(unref(FormItemRest), null, {
|
|
2968
|
-
default: withCtx(() => [
|
|
2969
|
-
unref(shops).length ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
2970
|
-
createVNode(unref(Switch), {
|
|
2971
|
-
checked: checkedValue.value,
|
|
2972
|
-
"onUpdate:checked": _cache[0] || (_cache[0] = ($event) => checkedValue.value = $event)
|
|
2973
|
-
}, null, 8, ["checked"]),
|
|
2974
|
-
checkedValue.value ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
2975
|
-
_hoisted_1$6,
|
|
2976
|
-
createVNode(unref(Select), {
|
|
2977
|
-
value: selectValue.value,
|
|
2978
|
-
"onUpdate:value": _cache[1] || (_cache[1] = ($event) => selectValue.value = $event),
|
|
2979
|
-
options: unref(shops),
|
|
2980
|
-
placeholder: "\u8BF7\u9009\u62E9",
|
|
2981
|
-
onChange: handleChange
|
|
2982
|
-
}, null, 8, ["value", "options"]),
|
|
2983
|
-
_hoisted_2$4
|
|
2984
|
-
], 64)) : createCommentVNode("v-if", true)
|
|
2985
|
-
], 64)) : (openBlock(), createBlock(_component_a_tooltip, {
|
|
2986
|
-
key: 1,
|
|
2987
|
-
placement: "bottomLeft"
|
|
2988
|
-
}, {
|
|
2989
|
-
title: withCtx(() => [
|
|
2990
|
-
_hoisted_3$3
|
|
2991
|
-
]),
|
|
2992
|
-
default: withCtx(() => [
|
|
2993
|
-
createVNode(unref(Switch), { disabled: "" })
|
|
2994
|
-
]),
|
|
2995
|
-
_: 1
|
|
2996
|
-
}))
|
|
2997
|
-
]),
|
|
2998
|
-
_: 1
|
|
2999
|
-
});
|
|
3000
|
-
};
|
|
3001
|
-
}
|
|
3002
|
-
});
|
|
3003
|
-
var ShopDataFilter = /* @__PURE__ */ _export_sfc(_sfc_main$7, [["__file", "shop-data-filter.vue"]]);
|
|
3004
|
-
|
|
3005
|
-
const label$2 = '商品';
|
|
3006
|
-
const fieldsMap$2 = {
|
|
3007
|
-
'effect.required': 'effect.required',
|
|
3008
|
-
'config.associatedFields': 'config.associatedFields',
|
|
3009
|
-
'config.dataFiltering': 'config.dataFiltering',
|
|
3010
|
-
};
|
|
3011
|
-
const name$2 = 'product';
|
|
3012
|
-
var product = {
|
|
3013
|
-
icon: 'Product',
|
|
3014
|
-
name: name$2,
|
|
3015
|
-
label: label$2,
|
|
3016
|
-
rule() {
|
|
3017
|
-
return {
|
|
3018
|
-
type: 'ProductInfo',
|
|
3019
|
-
component: ProductInfo,
|
|
3020
|
-
field: uniqueId(),
|
|
3021
|
-
title: {
|
|
3022
|
-
title: label$2,
|
|
3023
|
-
style: {
|
|
3024
|
-
overflow: 'hidden',
|
|
3025
|
-
textOverflow: 'ellipsis',
|
|
3026
|
-
whiteSpace: 'nowrap',
|
|
3027
|
-
},
|
|
3028
|
-
},
|
|
3029
|
-
effect: {
|
|
3030
|
-
required: true,
|
|
3031
|
-
formRule: 'formRule',
|
|
3032
|
-
},
|
|
3033
|
-
config: {
|
|
3034
|
-
propsFields: Object.values(fieldsMap$2),
|
|
3035
|
-
associatedFields: [],
|
|
3036
|
-
},
|
|
3037
|
-
};
|
|
3038
|
-
},
|
|
3039
|
-
props(rule, parentRule, widgetFormRules) {
|
|
3040
|
-
return [
|
|
3041
|
-
{
|
|
3042
|
-
type: 'AssociatedFields',
|
|
3043
|
-
component: AssociatedFields,
|
|
3044
|
-
title: '关联字段',
|
|
3045
|
-
field: fieldsMap$2['config.associatedFields'],
|
|
3046
|
-
props: {
|
|
3047
|
-
rule,
|
|
3048
|
-
},
|
|
3049
|
-
effect: {
|
|
3050
|
-
required: true,
|
|
3051
|
-
},
|
|
3052
|
-
inject: true,
|
|
3053
|
-
on: {
|
|
3054
|
-
change({ api, self }, list) {
|
|
3055
|
-
api.emit('change', self.field, list, self, api, true);
|
|
3056
|
-
},
|
|
3057
|
-
},
|
|
3058
|
-
},
|
|
3059
|
-
{
|
|
3060
|
-
type: 'ShopDataFilter',
|
|
3061
|
-
component: ShopDataFilter,
|
|
3062
|
-
title: '数据过滤',
|
|
3063
|
-
field: fieldsMap$2['config.dataFiltering'],
|
|
3064
|
-
info: '1.开启后,可以与当前表单的“店铺”控件关联进行商品数据过滤,在填写表单时满足仅可选择所选店铺下的可分销商品。' +
|
|
3065
|
-
'2.若不启用数据过滤,则不进行店铺限制,用户填写表单时可选择所有未冻结的商品数据。' +
|
|
3066
|
-
'3.开启前,请确认当前表单中已存在“店铺”控件。',
|
|
3067
|
-
props: {
|
|
3068
|
-
widgetFormRules: widgetFormRules,
|
|
3069
|
-
defaultSelectValue: rule.config.dataFiltering,
|
|
3070
|
-
},
|
|
3071
|
-
inject: true,
|
|
3072
|
-
on: {
|
|
3073
|
-
change({ api, self }, value) {
|
|
3074
|
-
self.props.defaultSelectValue = value;
|
|
3075
|
-
api.emit('change', self.field, value, self, api, true);
|
|
3076
|
-
},
|
|
3077
|
-
},
|
|
3078
|
-
},
|
|
3079
|
-
{
|
|
3080
|
-
type: 'switch',
|
|
3081
|
-
title: '是否必填',
|
|
3082
|
-
field: fieldsMap$2['effect.required'],
|
|
3083
|
-
value: rule.effect.required,
|
|
3084
|
-
},
|
|
3085
|
-
];
|
|
3086
|
-
},
|
|
3087
|
-
parse(rule) {
|
|
3088
|
-
return {
|
|
3089
|
-
name: name$2,
|
|
3090
|
-
field: rule.field,
|
|
3091
|
-
effect: {
|
|
3092
|
-
required: rule.effect.required,
|
|
3093
|
-
},
|
|
3094
|
-
config: {
|
|
3095
|
-
associatedFields: rule.config.associatedFields,
|
|
3096
|
-
dataFiltering: rule.config.dataFiltering,
|
|
3097
|
-
},
|
|
3098
|
-
};
|
|
3099
|
-
},
|
|
3100
|
-
};
|
|
3101
|
-
|
|
3102
|
-
const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
3103
|
-
__name: "shop-associated-fields",
|
|
3104
|
-
setup(__props) {
|
|
3105
|
-
const associatedFields = [
|
|
3106
|
-
{
|
|
3107
|
-
value: "\u5E97\u94FA\u7F16\u53F7",
|
|
3108
|
-
label: "\u5E97\u94FA\u7F16\u53F7"
|
|
3109
|
-
},
|
|
3110
|
-
{
|
|
3111
|
-
value: "\u5E97\u94FA\u540D\u79F0",
|
|
3112
|
-
label: "\u5E97\u94FA\u540D\u79F0"
|
|
3113
|
-
}
|
|
3114
|
-
];
|
|
3115
|
-
return (_ctx, _cache) => {
|
|
3116
|
-
return openBlock(), createElementBlock("div", null, [
|
|
3117
|
-
(openBlock(), createElementBlock(Fragment, null, renderList(associatedFields, (item) => {
|
|
3118
|
-
return createElementVNode("span", {
|
|
3119
|
-
key: item.value,
|
|
3120
|
-
class: "bm-shop-associated-fields-item"
|
|
3121
|
-
}, toDisplayString(item.label), 1);
|
|
3122
|
-
}), 64))
|
|
3123
|
-
]);
|
|
3124
|
-
};
|
|
3125
|
-
}
|
|
3126
|
-
});
|
|
3127
|
-
var ShopAssociatedFields = /* @__PURE__ */ _export_sfc(_sfc_main$6, [["__file", "shop-associated-fields.vue"]]);
|
|
3128
|
-
|
|
3129
|
-
let i = 0;
|
|
3130
|
-
const label$1 = '店铺';
|
|
3131
|
-
const fieldsMap$1 = {
|
|
3132
|
-
'effect.required': 'effect.required',
|
|
3133
|
-
'config.dataFiltering': 'config.dataFiltering',
|
|
3134
|
-
'config.isMain': 'config.isMain',
|
|
3135
|
-
};
|
|
3136
|
-
const name$1 = 'shop';
|
|
3137
|
-
var shop = {
|
|
3138
|
-
icon: 'Shop',
|
|
3139
|
-
name: name$1,
|
|
3140
|
-
label: label$1,
|
|
3141
|
-
rule() {
|
|
3142
|
-
return {
|
|
3143
|
-
type: 'Select',
|
|
3144
|
-
field: uniqueId(),
|
|
3145
|
-
title: {
|
|
3146
|
-
title: label$1 + ++i,
|
|
3147
|
-
style: {
|
|
3148
|
-
overflow: 'hidden',
|
|
3149
|
-
textOverflow: 'ellipsis',
|
|
3150
|
-
whiteSpace: 'nowrap',
|
|
3151
|
-
},
|
|
3152
|
-
},
|
|
3153
|
-
effect: {
|
|
3154
|
-
required: true,
|
|
3155
|
-
formRule: 'formRule',
|
|
3156
|
-
},
|
|
3157
|
-
props: {
|
|
3158
|
-
placeholder: '请选择',
|
|
3159
|
-
},
|
|
3160
|
-
config: {
|
|
3161
|
-
propsFields: Object.values(fieldsMap$1),
|
|
3162
|
-
},
|
|
3163
|
-
};
|
|
3164
|
-
},
|
|
3165
|
-
props(rule, parentRule) {
|
|
3166
|
-
return [
|
|
3167
|
-
{
|
|
3168
|
-
type: 'ShopAssociatedFields',
|
|
3169
|
-
component: ShopAssociatedFields,
|
|
3170
|
-
title: '关联字段',
|
|
3171
|
-
field: 'config.associatedFields',
|
|
3172
|
-
effect: {
|
|
3173
|
-
required: true,
|
|
3174
|
-
},
|
|
3175
|
-
},
|
|
3176
|
-
{
|
|
3177
|
-
type: 'checkbox',
|
|
3178
|
-
title: '数据过滤',
|
|
3179
|
-
field: fieldsMap$1['config.dataFiltering'],
|
|
3180
|
-
options: [
|
|
3181
|
-
{
|
|
3182
|
-
value: true,
|
|
3183
|
-
label: '当前节点操作人所负责的店铺',
|
|
3184
|
-
},
|
|
3185
|
-
],
|
|
3186
|
-
value: [rule.config.dataFiltering],
|
|
3187
|
-
inject: true,
|
|
3188
|
-
on: {
|
|
3189
|
-
change({ api, self }, value) {
|
|
3190
|
-
api.emit('change', self.field, value[0], self, api, true);
|
|
3191
|
-
},
|
|
3192
|
-
},
|
|
3193
|
-
},
|
|
3194
|
-
{
|
|
3195
|
-
type: 'switch',
|
|
3196
|
-
title: '设为主控件',
|
|
3197
|
-
info: '店铺控件在流程流转过程中涉及数据权限的控制,当表单中设置了多个店铺控件时,需设置其中1个店铺控件作为主控件。被设为主控件的店铺控件,流程流转过程中将以此店铺控件输入的数据作为数据权限判断依据。',
|
|
3198
|
-
field: fieldsMap$1['config.isMain'],
|
|
3199
|
-
value: rule.config.isMain,
|
|
3200
|
-
hidden: !!parentRule,
|
|
3201
|
-
},
|
|
3202
|
-
{
|
|
3203
|
-
type: 'switch',
|
|
3204
|
-
title: '是否必填',
|
|
3205
|
-
field: fieldsMap$1['effect.required'],
|
|
3206
|
-
value: rule.effect.required,
|
|
3207
|
-
},
|
|
3208
|
-
];
|
|
3209
|
-
},
|
|
3210
|
-
parse(rule) {
|
|
3211
|
-
return {
|
|
3212
|
-
name: name$1,
|
|
3213
|
-
field: rule.field,
|
|
3214
|
-
title: {
|
|
3215
|
-
title: rule.title.title,
|
|
3216
|
-
},
|
|
3217
|
-
effect: {
|
|
3218
|
-
required: rule.effect.required,
|
|
3219
|
-
},
|
|
3220
|
-
config: {
|
|
3221
|
-
dataFiltering: rule.config.dataFiltering,
|
|
3222
|
-
isMain: rule.config.isMain,
|
|
3223
|
-
},
|
|
3224
|
-
};
|
|
3225
|
-
},
|
|
3226
|
-
};
|
|
3227
|
-
function resetIndex() {
|
|
3228
|
-
i = 0;
|
|
3229
|
-
}
|
|
3230
|
-
|
|
3231
|
-
const label = '素材类型';
|
|
3232
|
-
const fieldsMap = {
|
|
3233
|
-
'effect.required': 'effect.required',
|
|
3234
|
-
'config.format': 'config.format',
|
|
3235
|
-
'props.multiple': 'props.multiple',
|
|
3236
|
-
};
|
|
3237
|
-
const name = 'materialType';
|
|
3238
|
-
var materialType = {
|
|
3239
|
-
icon: 'MaterialType',
|
|
3240
|
-
name,
|
|
3241
|
-
label,
|
|
3242
|
-
rule() {
|
|
3243
|
-
return {
|
|
3244
|
-
type: 'Select',
|
|
3245
|
-
field: uniqueId(),
|
|
3246
|
-
title: {
|
|
3247
|
-
title: label,
|
|
3248
|
-
style: {
|
|
3249
|
-
overflow: 'hidden',
|
|
3250
|
-
textOverflow: 'ellipsis',
|
|
3251
|
-
whiteSpace: 'nowrap',
|
|
3252
|
-
},
|
|
3253
|
-
},
|
|
3254
|
-
effect: {
|
|
3255
|
-
required: true,
|
|
3256
|
-
formRule: 'formRule',
|
|
3257
|
-
},
|
|
3258
|
-
props: {
|
|
3259
|
-
placeholder: '请选择',
|
|
3260
|
-
multiple: false,
|
|
3261
|
-
},
|
|
3262
|
-
config: {
|
|
3263
|
-
propsFields: Object.values(fieldsMap),
|
|
3264
|
-
format: 1,
|
|
3265
|
-
},
|
|
3266
|
-
};
|
|
3267
|
-
},
|
|
3268
|
-
props(rule, parentRule) {
|
|
3269
|
-
return [
|
|
3270
|
-
{
|
|
3271
|
-
type: 'radio',
|
|
3272
|
-
title: '格式',
|
|
3273
|
-
field: fieldsMap['config.format'],
|
|
3274
|
-
effect: {
|
|
3275
|
-
required: true,
|
|
3276
|
-
},
|
|
3277
|
-
options: [
|
|
3278
|
-
{
|
|
3279
|
-
value: 1,
|
|
3280
|
-
label: '一级分类',
|
|
3281
|
-
},
|
|
3282
|
-
{
|
|
3283
|
-
value: 2,
|
|
3284
|
-
label: '一级分类-二级分类',
|
|
3285
|
-
},
|
|
3286
|
-
{
|
|
3287
|
-
value: 3,
|
|
3288
|
-
label: '一级分类-二级分类-三级分类',
|
|
3289
|
-
},
|
|
3290
|
-
],
|
|
3291
|
-
value: rule.config.format,
|
|
3292
|
-
className: 'form-designer-props-radio-label',
|
|
3293
|
-
},
|
|
3294
|
-
{
|
|
3295
|
-
type: 'radio',
|
|
3296
|
-
title: '选项',
|
|
3297
|
-
field: fieldsMap['props.multiple'],
|
|
3298
|
-
effect: {
|
|
3299
|
-
required: true,
|
|
3300
|
-
},
|
|
3301
|
-
options: [
|
|
3302
|
-
{
|
|
3303
|
-
value: false,
|
|
3304
|
-
label: '只能选择一种类型',
|
|
3305
|
-
},
|
|
3306
|
-
{
|
|
3307
|
-
value: true,
|
|
3308
|
-
label: '可同时选择多种类型',
|
|
3309
|
-
},
|
|
3310
|
-
],
|
|
3311
|
-
value: rule.props.multiple,
|
|
3312
|
-
className: 'form-designer-props-radio-label',
|
|
3313
|
-
},
|
|
3314
|
-
{
|
|
3315
|
-
type: 'switch',
|
|
3316
|
-
title: '是否必填',
|
|
3317
|
-
info: '勾选后可作为流程条件',
|
|
3318
|
-
field: fieldsMap['effect.required'],
|
|
3319
|
-
value: rule.effect.required,
|
|
3320
|
-
},
|
|
3321
|
-
];
|
|
3322
|
-
},
|
|
3323
|
-
parse(rule) {
|
|
3324
|
-
return {
|
|
3325
|
-
name,
|
|
3326
|
-
field: rule.field,
|
|
3327
|
-
props: {
|
|
3328
|
-
multiple: rule.props.multiple,
|
|
3329
|
-
},
|
|
3330
|
-
config: {
|
|
3331
|
-
format: rule.config.format,
|
|
3332
|
-
},
|
|
3333
|
-
effect: {
|
|
3334
|
-
required: rule.effect.required,
|
|
3335
|
-
},
|
|
3336
|
-
};
|
|
3337
|
-
},
|
|
3338
|
-
};
|
|
3339
|
-
|
|
3340
|
-
function createTab() {
|
|
3341
|
-
return [
|
|
3342
|
-
{
|
|
3343
|
-
key: 'controlLibrary',
|
|
3344
|
-
tab: '控件库',
|
|
3345
|
-
menuList: [
|
|
3346
|
-
{
|
|
3347
|
-
name: 'layout',
|
|
3348
|
-
title: '布局控件',
|
|
3349
|
-
list: [row],
|
|
3350
|
-
},
|
|
3351
|
-
{
|
|
3352
|
-
name: 'basic',
|
|
3353
|
-
title: '基础控件',
|
|
3354
|
-
list: [
|
|
3355
|
-
input,
|
|
3356
|
-
textarea,
|
|
3357
|
-
numInput,
|
|
3358
|
-
radio,
|
|
3359
|
-
checkbox,
|
|
3360
|
-
date,
|
|
3361
|
-
dateRange,
|
|
3362
|
-
instruction,
|
|
3363
|
-
],
|
|
3364
|
-
},
|
|
3365
|
-
{
|
|
3366
|
-
name: 'enhance',
|
|
3367
|
-
title: '增强控件',
|
|
3368
|
-
list: [picture, table, file, people, department],
|
|
3369
|
-
},
|
|
3370
|
-
],
|
|
3371
|
-
},
|
|
3372
|
-
{
|
|
3373
|
-
key: 'kit',
|
|
3374
|
-
tab: '套件',
|
|
3375
|
-
menuList: [
|
|
3376
|
-
{
|
|
3377
|
-
name: 'materialKit',
|
|
3378
|
-
title: '素材套件',
|
|
3379
|
-
list: [materialTemp],
|
|
3380
|
-
},
|
|
3381
|
-
],
|
|
3382
|
-
},
|
|
3383
|
-
{
|
|
3384
|
-
key: 'associatedForm',
|
|
3385
|
-
tab: '关联表单',
|
|
3386
|
-
menuList: [
|
|
3387
|
-
{
|
|
3388
|
-
name: 'dataForm',
|
|
3389
|
-
title: '数据表单',
|
|
3390
|
-
list: [product, shop, materialType],
|
|
3391
|
-
},
|
|
3392
|
-
],
|
|
3393
|
-
},
|
|
3394
|
-
];
|
|
3395
|
-
}
|
|
3396
|
-
|
|
3397
|
-
const _hoisted_1$5 = {
|
|
3398
|
-
style: { "vertical-align": "middle" },
|
|
3399
|
-
width: "199px",
|
|
3400
|
-
height: "107px",
|
|
3401
|
-
viewBox: "0 0 199 107",
|
|
3402
|
-
xmlns: "http://www.w3.org/2000/svg"
|
|
3403
|
-
};
|
|
3404
|
-
const _hoisted_2$3 = /* @__PURE__ */ createStaticVNode('<g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd"><g transform="translate(-826.000000, -249.000000)"><g transform="translate(667.000000, 71.000000)"><g transform="translate(159.000000, 178.000000)"><path d="M2,0 L197,0 C198.104569,-6.46995335e-16 199,0.8954305 199,2 L199,105 C199,106.104569 198.104569,107 197,107 L2,107 C0.8954305,107 1.3527075e-16,106.104569 0,105 L0,2 C-1.3527075e-16,0.8954305 0.8954305,2.02906125e-16 2,0 Z" fill="#F9FBFF"></path><path d="M41,6 C41.5522847,6 42,6.44771525 42,7 L42,100 C42,100.552285 41.5522847,101 41,101 L7,101 C6.44771525,101 6,100.552285 6,100 L6,7 C6,6.44771525 6.44771525,6 7,6 L41,6 Z M192,6 C192.552285,6 193,6.44771525 193,7 L193,100 C193,100.552285 192.552285,101 192,101 L159,101 C158.447715,101 158,100.552285 158,100 L158,7 C158,6.44771525 158.447715,6 159,6 L192,6 Z M151,35 C151.552285,35 152,35.4477153 152,36 L152,100 C152,100.552285 151.552285,101 151,101 L49,101 C48.4477153,101 48,100.552285 48,100 L48,36 C48,35.4477153 48.4477153,35 49,35 L151,35 Z M151,6 C151.552285,6 152,6.44771525 152,7 L152,30 C152,30.5522847 151.552285,31 151,31 L49,31 C48.4477153,31 48,30.5522847 48,30 L48,7 C48,6.44771525 48.4477153,6 49,6 L151,6 Z" fill="#EFF3FF"></path><rect stroke="#8FAAFF" fill="#D0DCFF" x="12.5" y="17.5" width="23" height="13" rx="0.5"></rect><rect fill="#E4E8F7" x="12" y="47" width="24" height="14" rx="0.5"></rect><rect fill="#E4E8F7" x="12" y="75" width="24" height="14" rx="0.5"></rect><use stroke="#AEC2FF" mask="url(#mask-2)" stroke-width="2" fill-opacity="0.26" fill="#AFC3FF" stroke-dasharray="2" xlink:href="#path-1"></use><path d="M33.5,20 C35.9852814,20 38,22.0147186 38,24.5 C38,26.9852814 35.9852814,29 33.5,29 C31.0147186,29 29,26.9852814 29,24.5 C29,22.0147186 31.0147186,20 33.5,20 Z M33.5,22 C32.1192881,22 31,23.1192881 31,24.5 C31,25.8807119 32.1192881,27 33.5,27 C34.8807119,27 36,25.8807119 36,24.5 C36,23.1192881 34.8807119,22 33.5,22 Z" fill="#2F4EED"></path><circle fill="#F9FBFF" cx="33.5" cy="24.5" r="2.5"></circle><path d="M42.5,22 C65.8354499,22 85.7454723,36.6659986 93.5155164,57.2834451 L93.7801465,55.3991118 C93.8570096,54.8522019 94.3626777,54.4711537 94.9095876,54.5480169 C95.4564976,54.6248801 95.8375458,55.1305481 95.7606826,55.677458 L94.925644,61.6190665 C94.8487808,62.1659764 94.3431128,62.5470246 93.7962028,62.4701614 L93.7673315,62.4658857 C93.5875459,62.4468789 93.4107192,62.3789077 93.2577621,62.2594045 L88.5296976,58.5654356 C88.0944913,58.2254152 88.0173279,57.5969697 88.3573483,57.1617634 C88.6973688,56.7265571 89.3258142,56.6493937 89.7610205,56.9894141 L91.887337,58.6494477 C84.582156,38.4419045 65.2276218,24 42.5,24 C40.4254117,24 38.3789284,24.1203318 36.367149,24.3543965 L36.022518,22.3809268 C38.1466458,22.1293826 40.3082134,22 42.5,22 Z" fill="#2F4EED"></path></g></g></g></g>', 1);
|
|
3405
|
-
const _hoisted_3$2 = [
|
|
3406
|
-
_hoisted_2$3
|
|
3407
|
-
];
|
|
3408
|
-
const _hoisted_4$1 = /* @__PURE__ */ createElementVNode("div", { style: { "line-height": "20px", "margin-top": "12px", "color": "#505259" } }, " \u8BF7\u62D6\u62FD\u6216\u70B9\u51FB\u5DE6\u4FA7\u5B57\u6BB5\u521B\u5EFA\u8868\u5355 ", -1);
|
|
3409
|
-
const _sfc_main$5 = /* @__PURE__ */ defineComponent({
|
|
3410
|
-
__name: "no-data-tip",
|
|
3411
|
-
props: {},
|
|
3412
|
-
setup(__props) {
|
|
3413
|
-
return (_ctx, _cache) => {
|
|
3414
|
-
return openBlock(), createElementBlock("div", null, [
|
|
3415
|
-
(openBlock(), createElementBlock("svg", _hoisted_1$5, _hoisted_3$2)),
|
|
3416
|
-
_hoisted_4$1
|
|
3417
|
-
]);
|
|
3418
|
-
};
|
|
3419
|
-
}
|
|
3420
|
-
});
|
|
3421
|
-
var NoDataTip = /* @__PURE__ */ _export_sfc(_sfc_main$5, [["__file", "no-data-tip.vue"]]);
|
|
3422
|
-
|
|
3423
|
-
const formDesignerProps = {
|
|
3424
|
-
formRules: {
|
|
3425
|
-
type: Array,
|
|
3426
|
-
default() {
|
|
3427
|
-
return [];
|
|
3428
|
-
},
|
|
3429
|
-
},
|
|
3430
|
-
presetRules: {
|
|
3431
|
-
type: Array,
|
|
3432
|
-
default() {
|
|
3433
|
-
return [];
|
|
3434
|
-
},
|
|
3435
|
-
},
|
|
3436
|
-
flowCondition: {
|
|
3437
|
-
type: Object,
|
|
3438
|
-
default() {
|
|
3439
|
-
return {};
|
|
3440
|
-
},
|
|
3441
|
-
},
|
|
3442
|
-
};
|
|
3443
|
-
|
|
3444
|
-
const _hoisted_1$4 = {
|
|
3445
|
-
key: 0,
|
|
3446
|
-
style: { "font-weight": "normal" }
|
|
3447
|
-
};
|
|
3448
|
-
const _sfc_main$4 = /* @__PURE__ */ defineComponent({
|
|
3449
|
-
__name: "table-head-count",
|
|
3450
|
-
props: ["childRules"],
|
|
3451
|
-
setup(__props) {
|
|
3452
|
-
const props = __props;
|
|
3453
|
-
const text = computed(
|
|
3454
|
-
() => props.childRules.filter((rule) => rule.type === "inputNumber" && rule.config.count).reduce((pre, item, index) => {
|
|
3455
|
-
if (index > 0)
|
|
3456
|
-
pre += "\u3001";
|
|
3457
|
-
return pre + `${item.title.title}: 0`;
|
|
3458
|
-
}, "")
|
|
3459
|
-
);
|
|
3460
|
-
return (_ctx, _cache) => {
|
|
3461
|
-
return openBlock(), createElementBlock("div", null, [
|
|
3462
|
-
renderSlot(_ctx.$slots, "default"),
|
|
3463
|
-
unref(text) ? (openBlock(), createElementBlock("span", _hoisted_1$4, "\uFF08" + toDisplayString(unref(text)) + "\uFF09", 1)) : createCommentVNode("v-if", true)
|
|
3464
|
-
]);
|
|
3465
|
-
};
|
|
3466
|
-
}
|
|
3467
|
-
});
|
|
3468
|
-
var TableHeadCount = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["__file", "table-head-count.vue"]]);
|
|
3469
|
-
|
|
3470
|
-
const _hoisted_1$3 = { style: { "position": "absolute", "right": "0", "top": "-30px", "display": "flex", "align-items": "center" } };
|
|
3471
|
-
const _hoisted_2$2 = /* @__PURE__ */ createTextVNode("\u5FC5\u586B");
|
|
3472
|
-
const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
3473
|
-
__name: "checkbox-switch",
|
|
3474
|
-
props: ["rule"],
|
|
3475
|
-
setup(__props) {
|
|
3476
|
-
return (_ctx, _cache) => {
|
|
3477
|
-
return openBlock(), createElementBlock("span", _hoisted_1$3, [
|
|
3478
|
-
createVNode(unref(FormItemRest), null, {
|
|
3479
|
-
default: withCtx(() => [
|
|
3480
|
-
createVNode(unref(Checkbox), {
|
|
3481
|
-
checked: __props.rule.config.uploadPictureRule.required,
|
|
3482
|
-
"onUpdate:checked": _cache[0] || (_cache[0] = ($event) => __props.rule.config.uploadPictureRule.required = $event)
|
|
3483
|
-
}, {
|
|
3484
|
-
default: withCtx(() => [
|
|
3485
|
-
_hoisted_2$2
|
|
3486
|
-
]),
|
|
3487
|
-
_: 1
|
|
3488
|
-
}, 8, ["checked"]),
|
|
3489
|
-
createVNode(unref(Switch), {
|
|
3490
|
-
checked: __props.rule.config.uploadPictureRule.hidden,
|
|
3491
|
-
"onUpdate:checked": _cache[1] || (_cache[1] = ($event) => __props.rule.config.uploadPictureRule.hidden = $event),
|
|
3492
|
-
style: { "margin-left": "8px" },
|
|
3493
|
-
"checked-children": "\u5F00",
|
|
3494
|
-
"un-checked-children": "\u5173",
|
|
3495
|
-
"checked-value": false,
|
|
3496
|
-
"un-checked-value": true
|
|
3497
|
-
}, null, 8, ["checked"])
|
|
3498
|
-
]),
|
|
3499
|
-
_: 1
|
|
3500
|
-
})
|
|
3501
|
-
]);
|
|
3502
|
-
};
|
|
3503
|
-
}
|
|
3504
|
-
});
|
|
3505
|
-
var CheckboxSwitch = /* @__PURE__ */ _export_sfc(_sfc_main$3, [["__file", "checkbox-switch.vue"]]);
|
|
3506
|
-
|
|
3507
|
-
const widgetsTableAccept = {
|
|
3508
|
-
[input.name]: input,
|
|
3509
|
-
[textarea.name]: textarea,
|
|
3510
|
-
[numInput.name]: numInput,
|
|
3511
|
-
[radio.name]: radio,
|
|
3512
|
-
[checkbox.name]: checkbox,
|
|
3513
|
-
[date.name]: date,
|
|
3514
|
-
[dateRange.name]: dateRange,
|
|
3515
|
-
[people.name]: people,
|
|
3516
|
-
[department.name]: department,
|
|
3517
|
-
[product.name]: product,
|
|
3518
|
-
[shop.name]: shop,
|
|
3519
|
-
[materialType.name]: materialType,
|
|
3520
|
-
};
|
|
3521
|
-
const widgetNamesRowAccept = [
|
|
3522
|
-
input.name,
|
|
3523
|
-
textarea.name,
|
|
3524
|
-
numInput.name,
|
|
3525
|
-
radio.name,
|
|
3526
|
-
checkbox.name,
|
|
3527
|
-
date.name,
|
|
3528
|
-
dateRange.name,
|
|
3529
|
-
picture.name,
|
|
3530
|
-
table.name,
|
|
3531
|
-
file.name,
|
|
3532
|
-
people.name,
|
|
3533
|
-
department.name,
|
|
3534
|
-
product.name,
|
|
3535
|
-
shop.name,
|
|
3536
|
-
materialType.name,
|
|
3537
|
-
];
|
|
3538
|
-
var ruleList = {
|
|
3539
|
-
[row.name]: row,
|
|
3540
|
-
[input.name]: input,
|
|
3541
|
-
[textarea.name]: textarea,
|
|
3542
|
-
[numInput.name]: numInput,
|
|
3543
|
-
[radio.name]: radio,
|
|
3544
|
-
[checkbox.name]: checkbox,
|
|
3545
|
-
[date.name]: date,
|
|
3546
|
-
[dateRange.name]: dateRange,
|
|
3547
|
-
[instruction.name]: instruction,
|
|
3548
|
-
[picture.name]: picture,
|
|
3549
|
-
[table.name]: table,
|
|
3550
|
-
[file.name]: file,
|
|
3551
|
-
[people.name]: people,
|
|
3552
|
-
[department.name]: department,
|
|
3553
|
-
[materialTemp.name]: materialTemp,
|
|
3554
|
-
[product.name]: product,
|
|
3555
|
-
[shop.name]: shop,
|
|
3556
|
-
[materialType.name]: materialType,
|
|
3557
|
-
};
|
|
3558
|
-
|
|
3559
|
-
const _hoisted_1$2 = { class: "bm-table-column__main" };
|
|
3560
|
-
const _hoisted_2$1 = { class: "bm-table-column-btn-wrap" };
|
|
3561
|
-
const _hoisted_3$1 = /* @__PURE__ */ createTextVNode(" \u6DFB\u52A0\u5B50\u5B57\u6BB5 ");
|
|
3562
|
-
const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
3563
|
-
__name: "table-column",
|
|
3564
|
-
props: ["formCreateInject"],
|
|
3565
|
-
setup(__props) {
|
|
3566
|
-
const props = __props;
|
|
3567
|
-
const handleClass = "bm-table-column__drag-icon";
|
|
3568
|
-
const btnCom = ref();
|
|
3569
|
-
const open = ref(false);
|
|
3570
|
-
const childRules = computed(() => props.formCreateInject.rule.value);
|
|
3571
|
-
const api = computed(() => props.formCreateInject.api);
|
|
3572
|
-
const options = computed(() => Object.values(widgetsTableAccept));
|
|
3573
|
-
function handleEdit(rule) {
|
|
3574
|
-
api.value.emit("setActive", rule);
|
|
3575
|
-
}
|
|
3576
|
-
function add() {
|
|
3577
|
-
open.value = true;
|
|
3578
|
-
}
|
|
3579
|
-
function handleSelect(value, config) {
|
|
3580
|
-
api.value.emit("addChildRule", config);
|
|
3581
|
-
open.value = false;
|
|
3582
|
-
btnCom.value.$el.blur();
|
|
3583
|
-
}
|
|
3584
|
-
return (_ctx, _cache) => {
|
|
3585
|
-
const _component_Delete = resolveComponent("Delete");
|
|
3586
|
-
const _component_ARow = resolveComponent("ARow");
|
|
3587
|
-
return openBlock(), createElementBlock("div", null, [
|
|
3588
|
-
createVNode(unref(Draggable), {
|
|
3589
|
-
tag: "transition-group",
|
|
3590
|
-
"component-data": {
|
|
3591
|
-
name: "flip-list"
|
|
3592
|
-
},
|
|
3593
|
-
animation: 200,
|
|
3594
|
-
list: unref(childRules),
|
|
3595
|
-
handle: `.${handleClass}`,
|
|
3596
|
-
"force-fallback": true
|
|
3597
|
-
}, {
|
|
3598
|
-
item: withCtx(({ element, index }) => [
|
|
3599
|
-
createVNode(_component_ARow, {
|
|
3600
|
-
class: "bm-table-column",
|
|
3601
|
-
align: "middle"
|
|
3602
|
-
}, {
|
|
3603
|
-
default: withCtx(() => [
|
|
3604
|
-
createVNode(unref(HolderOutlined), {
|
|
3605
|
-
class: normalizeClass([handleClass])
|
|
3606
|
-
}, null, 8, ["class"]),
|
|
3607
|
-
createElementVNode("div", _hoisted_1$2, toDisplayString(element.title.title), 1),
|
|
3608
|
-
createVNode(unref(EditOutlined), {
|
|
3609
|
-
class: "bm-table-column__icon is-edit",
|
|
3610
|
-
onClick: ($event) => handleEdit(element)
|
|
3611
|
-
}, null, 8, ["onClick"]),
|
|
3612
|
-
createVNode(_component_Delete, {
|
|
3613
|
-
class: "bm-table-column__icon is-del",
|
|
3614
|
-
onClick: ($event) => unref(childRules).splice(index, 1)
|
|
3615
|
-
}, null, 8, ["onClick"])
|
|
3616
|
-
]),
|
|
3617
|
-
_: 2
|
|
3618
|
-
}, 1024)
|
|
3619
|
-
]),
|
|
3620
|
-
_: 1
|
|
3621
|
-
}, 8, ["list", "handle"]),
|
|
3622
|
-
createElementVNode("div", _hoisted_2$1, [
|
|
3623
|
-
createVNode(unref(FormItemRest), null, {
|
|
3624
|
-
default: withCtx(() => [
|
|
3625
|
-
createVNode(unref(Select), {
|
|
3626
|
-
value: "",
|
|
3627
|
-
class: "bm-table-column__select",
|
|
3628
|
-
options: unref(options),
|
|
3629
|
-
"field-names": { value: "name" },
|
|
3630
|
-
open: open.value,
|
|
3631
|
-
placeholder: "\u8BF7\u9009\u62E9",
|
|
3632
|
-
onSelect: handleSelect
|
|
3633
|
-
}, null, 8, ["options", "open"])
|
|
3634
|
-
]),
|
|
3635
|
-
_: 1
|
|
3636
|
-
}),
|
|
3637
|
-
createVNode(unref(Button), {
|
|
3638
|
-
ref_key: "btnCom",
|
|
3639
|
-
ref: btnCom,
|
|
3640
|
-
class: "bm-table-column__btn",
|
|
3641
|
-
block: "",
|
|
3642
|
-
onClick: add
|
|
3643
|
-
}, {
|
|
3644
|
-
icon: withCtx(() => [
|
|
3645
|
-
createVNode(unref(PlusOutlined))
|
|
3646
|
-
]),
|
|
3647
|
-
default: withCtx(() => [
|
|
3648
|
-
_hoisted_3$1
|
|
3649
|
-
]),
|
|
3650
|
-
_: 1
|
|
3651
|
-
}, 512)
|
|
3652
|
-
])
|
|
3653
|
-
]);
|
|
3654
|
-
};
|
|
3655
|
-
}
|
|
3656
|
-
});
|
|
3657
|
-
var TableColumn = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__file", "table-column.vue"]]);
|
|
3658
|
-
|
|
3659
|
-
const _hoisted_1$1 = /* @__PURE__ */ createTextVNode("change");
|
|
3660
|
-
const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
3661
|
-
__name: "text-color",
|
|
3662
|
-
props: ["rule"],
|
|
3663
|
-
setup(__props) {
|
|
3664
|
-
const props = __props;
|
|
3665
|
-
function handleClick() {
|
|
3666
|
-
const rule = props.rule;
|
|
3667
|
-
rule.style.color = rule.style.color === Colors.Black ? Colors.Blue : Colors.Black;
|
|
3668
|
-
}
|
|
3669
|
-
return (_ctx, _cache) => {
|
|
3670
|
-
const _component_ColorPanel = resolveComponent("ColorPanel");
|
|
3671
|
-
return openBlock(), createBlock(_component_ColorPanel, {
|
|
3672
|
-
style: normalizeStyle({
|
|
3673
|
-
position: "absolute",
|
|
3674
|
-
top: "-29px",
|
|
3675
|
-
right: 0,
|
|
3676
|
-
width: "1em",
|
|
3677
|
-
height: "1em",
|
|
3678
|
-
fontSize: "20px",
|
|
3679
|
-
color: __props.rule.style.color,
|
|
3680
|
-
cursor: "pointer"
|
|
3681
|
-
}),
|
|
3682
|
-
onClick: withModifiers(handleClick, ["prevent", "stop"])
|
|
3683
|
-
}, {
|
|
3684
|
-
default: withCtx(() => [
|
|
3685
|
-
_hoisted_1$1
|
|
3686
|
-
]),
|
|
3687
|
-
_: 1
|
|
3688
|
-
}, 8, ["style", "onClick"]);
|
|
3689
|
-
};
|
|
3690
|
-
}
|
|
3691
|
-
});
|
|
3692
|
-
var TextColor = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__file", "text-color.vue"]]);
|
|
3693
|
-
|
|
3694
|
-
const _hoisted_1 = { class: "bm-menu-title" };
|
|
3695
|
-
const _hoisted_2 = ["onClick"];
|
|
3696
|
-
const _hoisted_3 = { class: "bfd-main__warp" };
|
|
3697
|
-
const _hoisted_4 = { class: "bm-widget-form-item" };
|
|
3698
|
-
const _hoisted_5 = {
|
|
3699
|
-
key: 0,
|
|
3700
|
-
class: "bfd-sider-right__title"
|
|
3701
|
-
};
|
|
3702
|
-
const _hoisted_6 = /* @__PURE__ */ createTextVNode(" \u5355\u4E2A\u6587\u4EF6\u5927\u5C0F\u9700\u572820M\u4EE5\u5185 ");
|
|
3703
|
-
const _hoisted_7 = { class: "bfd-sider-right__form" };
|
|
3704
|
-
const _hoisted_8 = {
|
|
3705
|
-
key: 0,
|
|
3706
|
-
class: "bfd-sider-right__form__flow-releated"
|
|
3707
|
-
};
|
|
3708
12
|
const __default__ = {
|
|
3709
13
|
name: "BmFormDesigner"
|
|
3710
14
|
};
|
|
3711
15
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
3712
16
|
...__default__,
|
|
3713
|
-
|
|
3714
|
-
|
|
3715
|
-
const props = __props;
|
|
3716
|
-
FC.component("TableHeadCount", TableHeadCount);
|
|
3717
|
-
FC.component("TableColumn", TableColumn);
|
|
3718
|
-
FC.component("TextColor", TextColor);
|
|
3719
|
-
FC.component("CheckboxSwitch", CheckboxSwitch);
|
|
3720
|
-
FC.register({
|
|
3721
|
-
name: "formRule",
|
|
3722
|
-
init(effect, rule, api) {
|
|
3723
|
-
const config = api.config;
|
|
3724
|
-
const parentType = config.parentType;
|
|
3725
|
-
if (!rule.config.fieldRatio) {
|
|
3726
|
-
resetFieldRatio(rule, parentType);
|
|
3727
|
-
}
|
|
3728
|
-
if (rule?.props?.type === "textarea" && parentType === WidgetType.TableWidget) {
|
|
3729
|
-
rule.props.autoSize = true;
|
|
3730
|
-
}
|
|
3731
|
-
if (rule.config.config.name === "product" && parentType === WidgetType.TableWidget) {
|
|
3732
|
-
rule.type = "input";
|
|
3733
|
-
delete rule.component;
|
|
3734
|
-
rule.title.title = "\u5546\u54C1\u7F16\u53F7";
|
|
3735
|
-
rule.props = {};
|
|
3736
|
-
rule.props.placeholder = "\u8BF7\u8F93\u5165";
|
|
3737
|
-
}
|
|
3738
|
-
}
|
|
3739
|
-
});
|
|
3740
|
-
const showDragTip = ref(true);
|
|
3741
|
-
const tabData = createTab();
|
|
3742
|
-
const activeKey = ref("controlLibrary");
|
|
3743
|
-
const widgetFormRules = reactive([]);
|
|
3744
|
-
const activeRule = ref({});
|
|
3745
|
-
const cacheProps = reactive({});
|
|
3746
|
-
const fApi = ref();
|
|
3747
|
-
const activeParentRule = ref();
|
|
3748
|
-
const menuList = computed(
|
|
3749
|
-
() => tabData.find((tab) => tab.key === activeKey.value).menuList
|
|
3750
|
-
);
|
|
3751
|
-
const activeProps = computed(() => cacheProps[activeRule.value.field]);
|
|
3752
|
-
const activeRuleInList = computed(
|
|
3753
|
-
() => activeParentRule.value?.config?.childRules || widgetFormRules
|
|
3754
|
-
);
|
|
3755
|
-
function hideShowDragTip() {
|
|
3756
|
-
showDragTip.value = false;
|
|
3757
|
-
}
|
|
3758
|
-
function handleTabChange(key) {
|
|
3759
|
-
activeKey.value = key;
|
|
3760
|
-
}
|
|
3761
|
-
function cloneMenuItem(original) {
|
|
3762
|
-
return makeRule(original);
|
|
3763
|
-
}
|
|
3764
|
-
function checkDragMove(evt) {
|
|
3765
|
-
const draggedData = evt.dragged._underlying_vm_ || {};
|
|
3766
|
-
const toComponentData = evt.to.__draggable_component__.componentData || {};
|
|
3767
|
-
const widgetNameDragged = draggedData?.config?.config?.name;
|
|
3768
|
-
if (toComponentData.type === WidgetType.RowWidget && !widgetNamesRowAccept.includes(widgetNameDragged) || toComponentData.type === WidgetType.TableWidget && !Object.keys(widgetsTableAccept).includes(widgetNameDragged)) {
|
|
3769
|
-
widgetFormRules.forEach((rule) => {
|
|
3770
|
-
rule.config.putDisabled = rule.field === toComponentData.field;
|
|
3771
|
-
});
|
|
3772
|
-
return false;
|
|
3773
|
-
} else {
|
|
3774
|
-
widgetFormRules.forEach((rule) => {
|
|
3775
|
-
rule.config.putDisabled = false;
|
|
3776
|
-
});
|
|
3777
|
-
}
|
|
3778
|
-
}
|
|
3779
|
-
function moveMenuItem(evt) {
|
|
3780
|
-
return checkDragMove(evt);
|
|
3781
|
-
}
|
|
3782
|
-
function moveFormItem(evt) {
|
|
3783
|
-
return checkDragMove(evt);
|
|
3784
|
-
}
|
|
3785
|
-
function handleMenuItemDragStart(evt) {
|
|
3786
|
-
const item = evt.item.children[0];
|
|
3787
|
-
const cloneItem = evt.clone.children[0];
|
|
3788
|
-
item.style.opacity = 0.3;
|
|
3789
|
-
cloneItem.style.opacity = 0.3;
|
|
3790
|
-
item.style.color = "#2F4EED";
|
|
3791
|
-
cloneItem.style.color = "#2F4EED";
|
|
3792
|
-
}
|
|
3793
|
-
function resetPutDisabled() {
|
|
3794
|
-
widgetFormRules.forEach((rule) => {
|
|
3795
|
-
rule.config.putDisabled = false;
|
|
3796
|
-
});
|
|
3797
|
-
}
|
|
3798
|
-
function handleMenuItemDragEnd(evt) {
|
|
3799
|
-
evt.item.children[0].style.opacity = "";
|
|
3800
|
-
evt.item.children[0].style.color = "";
|
|
3801
|
-
resetPutDisabled();
|
|
3802
|
-
}
|
|
3803
|
-
function handleMenuItemClick(config) {
|
|
3804
|
-
const rule = makeRule(config);
|
|
3805
|
-
const activeParentRuleName = activeParentRule.value?.config?.config?.name;
|
|
3806
|
-
if (!widgetNamesRowAccept.includes(config.name) && activeParentRuleName === "row" || !Object.keys(widgetsTableAccept).includes(config.name) && activeParentRuleName === "table") {
|
|
3807
|
-
disabledTip(activeParentRule.value.config.config.name);
|
|
3808
|
-
} else {
|
|
3809
|
-
const index = activeRuleInList.value.findIndex(
|
|
3810
|
-
(item) => item.field === activeRule.value.field
|
|
3811
|
-
);
|
|
3812
|
-
activeRuleInList.value.splice(index + 1, 0, rule);
|
|
3813
|
-
setActiveRule(rule, activeParentRule.value);
|
|
3814
|
-
hideShowDragTip();
|
|
3815
|
-
}
|
|
3816
|
-
}
|
|
3817
|
-
function makeRule(config) {
|
|
3818
|
-
const rule = config.rule();
|
|
3819
|
-
rule.config.config = config;
|
|
3820
|
-
return rule;
|
|
3821
|
-
}
|
|
3822
|
-
function disabledTip(name) {
|
|
3823
|
-
message.warning({
|
|
3824
|
-
content: name === "table" ? "\u8BE5\u63A7\u4EF6\u6682\u4E0D\u652F\u6301\u62D6\u5165\u8868\u683C\u4E2D" : "\u8BE5\u63A7\u4EF6\u6682\u4E0D\u652F\u6301\u5206\u680F",
|
|
3825
|
-
class: "bm-form-designer__message-warning"
|
|
3826
|
-
});
|
|
3827
|
-
}
|
|
3828
|
-
function putDisabledTip() {
|
|
3829
|
-
const targetRule = widgetFormRules.find((rule) => rule.config.putDisabled);
|
|
3830
|
-
if (targetRule) {
|
|
3831
|
-
disabledTip(targetRule.config.config.name);
|
|
3832
|
-
}
|
|
3833
|
-
}
|
|
3834
|
-
function dragAdd(rule, parentRule = void 0) {
|
|
3835
|
-
resetFieldRatio(rule, parentRule?.type);
|
|
3836
|
-
if (cacheProps[rule.field])
|
|
3837
|
-
delete cacheProps[rule.field];
|
|
3838
|
-
setActiveRule(rule, parentRule);
|
|
3839
|
-
putDisabledTip();
|
|
3840
|
-
}
|
|
3841
|
-
function handleFormItemAdd({ newIndex }) {
|
|
3842
|
-
const rule = widgetFormRules[newIndex];
|
|
3843
|
-
dragAdd(rule);
|
|
3844
|
-
hideShowDragTip();
|
|
3845
|
-
}
|
|
3846
|
-
function handleFormItemUpdate({ newIndex }) {
|
|
3847
|
-
const rule = widgetFormRules[newIndex];
|
|
3848
|
-
if (rule)
|
|
3849
|
-
setActiveRule(widgetFormRules[newIndex]);
|
|
3850
|
-
}
|
|
3851
|
-
function handleFormItemDragEnd() {
|
|
3852
|
-
putDisabledTip();
|
|
3853
|
-
resetPutDisabled();
|
|
3854
|
-
}
|
|
3855
|
-
function handleFormItemClick(rule) {
|
|
3856
|
-
setActiveRule(rule);
|
|
3857
|
-
}
|
|
3858
|
-
function makeChildRules(ruleList2) {
|
|
3859
|
-
return ruleList2.map((rule) => makeRule(rule.config.config));
|
|
3860
|
-
}
|
|
3861
|
-
function handleFormItemCopy(rule, parentRule) {
|
|
3862
|
-
const newRule = makeRule(rule.config.config);
|
|
3863
|
-
const list = parentRule?.config?.childRules || widgetFormRules;
|
|
3864
|
-
const index = list.findIndex((ruleItem) => ruleItem.field === rule.field);
|
|
3865
|
-
if (rule.config.childRules?.length) {
|
|
3866
|
-
newRule.config.childRules.push(...makeChildRules(rule.config.childRules));
|
|
3867
|
-
}
|
|
3868
|
-
list.splice(index + 1, 0, newRule);
|
|
3869
|
-
copyPropValue(rule, newRule);
|
|
3870
|
-
setActiveRule(newRule, parentRule);
|
|
3871
|
-
}
|
|
3872
|
-
function handleFormItemDelete(targetRule, parentRule) {
|
|
3873
|
-
if (targetRule.config.linkProductCount > 0) {
|
|
3874
|
-
message.error("\u8BE5\u63A7\u4EF6\u5DF2\u88AB\u8BBE\u4E3A\u6570\u636E\u8FC7\u6EE4\u6761\u4EF6\uFF0C\u4E0D\u53EF\u5220\u9664\u3002");
|
|
3875
|
-
return;
|
|
3876
|
-
}
|
|
3877
|
-
const parentList = parentRule?.config?.childRules || widgetFormRules;
|
|
3878
|
-
const index = parentList.findIndex((rule) => rule.field === targetRule.field);
|
|
3879
|
-
parentList.splice(index, 1);
|
|
3880
|
-
delete cacheProps[targetRule.field];
|
|
3881
|
-
if (targetRule.field === activeRule.value.field) {
|
|
3882
|
-
const newIndex = Math.min(parentList.length - 1, index);
|
|
3883
|
-
if (newIndex >= 0) {
|
|
3884
|
-
setActiveRule(parentList[newIndex]);
|
|
3885
|
-
} else if (parentRule) {
|
|
3886
|
-
setActiveRule(parentRule);
|
|
3887
|
-
} else {
|
|
3888
|
-
activeRule.value = {};
|
|
3889
|
-
}
|
|
3890
|
-
} else if (targetRule?.config?.childRules?.some(
|
|
3891
|
-
(rule) => rule.field === activeRule.value.field
|
|
3892
|
-
)) {
|
|
3893
|
-
const newIndex = Math.min(parentList.length - 1, index);
|
|
3894
|
-
if (newIndex >= 0) {
|
|
3895
|
-
setActiveRule(parentList[newIndex]);
|
|
3896
|
-
} else {
|
|
3897
|
-
activeRule.value = {};
|
|
3898
|
-
activeParentRule.value = widgetFormRules;
|
|
3899
|
-
}
|
|
3900
|
-
}
|
|
3901
|
-
}
|
|
3902
|
-
function makePropRule(rule, parentRule) {
|
|
3903
|
-
return rule.config.config.props(rule, parentRule, widgetFormRules);
|
|
3904
|
-
}
|
|
3905
|
-
function setActiveRule(rule, parentRule = void 0) {
|
|
3906
|
-
activeRule.value = rule;
|
|
3907
|
-
activeParentRule.value = parentRule;
|
|
3908
|
-
widgetFormRules.forEach((item) => {
|
|
3909
|
-
if (item.type === WidgetType.RowWidget || item.type === WidgetType.TableWidget) {
|
|
3910
|
-
nextTick(() => {
|
|
3911
|
-
item.props.activeRule = rule;
|
|
3912
|
-
});
|
|
3913
|
-
}
|
|
3914
|
-
});
|
|
3915
|
-
if (!cacheProps[rule.field]) {
|
|
3916
|
-
cacheProps[rule.field] = makePropRule(rule, parentRule);
|
|
3917
|
-
}
|
|
3918
|
-
}
|
|
3919
|
-
function propChange(field, value) {
|
|
3920
|
-
setRulePropValue(field, value, activeRule.value);
|
|
3921
|
-
}
|
|
3922
|
-
function setRulePropValue(field, value, rule) {
|
|
3923
|
-
field.split(".").reduce((pre, cur, index, arr) => {
|
|
3924
|
-
if (index === arr.length - 1) {
|
|
3925
|
-
pre[cur] = value;
|
|
3926
|
-
} else {
|
|
3927
|
-
if (!pre[cur]) {
|
|
3928
|
-
pre[cur] = {};
|
|
3929
|
-
}
|
|
3930
|
-
}
|
|
3931
|
-
return pre[cur];
|
|
3932
|
-
}, rule);
|
|
3933
|
-
}
|
|
3934
|
-
function copyPropValue(oldRule, newRule) {
|
|
3935
|
-
newRule.config.propsFields.forEach((field) => {
|
|
3936
|
-
if (field !== "config.childRules")
|
|
3937
|
-
setRulePropValue(field, cloneDeep(getValue(field, oldRule)), newRule);
|
|
3938
|
-
});
|
|
3939
|
-
if (newRule.config.childRules?.length) {
|
|
3940
|
-
newRule.config.childRules.forEach((rule, index) => {
|
|
3941
|
-
copyPropValue(oldRule.config.childRules[index], rule);
|
|
3942
|
-
});
|
|
3943
|
-
}
|
|
3944
|
-
}
|
|
3945
|
-
function handleWidgetAdd(rule, parentRule) {
|
|
3946
|
-
dragAdd(rule, parentRule);
|
|
3947
|
-
}
|
|
3948
|
-
function handlePropsSetActive(rule) {
|
|
3949
|
-
setActiveRule(rule, activeRule.value);
|
|
3950
|
-
}
|
|
3951
|
-
function handleAddChildRule(config) {
|
|
3952
|
-
const rule = makeRule(config);
|
|
3953
|
-
activeRule.value.config.childRules.push(rule);
|
|
3954
|
-
}
|
|
3955
|
-
function getValue(field, oldRule) {
|
|
3956
|
-
return field.split(".").reduce((pre, cur) => {
|
|
3957
|
-
return pre[cur];
|
|
3958
|
-
}, oldRule);
|
|
3959
|
-
}
|
|
3960
|
-
function resetFieldRatio(rule, parentRuleType) {
|
|
3961
|
-
if (!parentRuleType) {
|
|
3962
|
-
rule.config.fieldRatio = "100%";
|
|
3963
|
-
} else if (parentRuleType === WidgetType.RowWidget) {
|
|
3964
|
-
const ruleName = rule.config.config.name;
|
|
3965
|
-
rule.config.fieldRatio = ruleName === "table" || ruleName === "product" ? 24 : 12;
|
|
3966
|
-
} else if (parentRuleType === WidgetType.TableWidget) {
|
|
3967
|
-
rule.config.fieldRatio = "140px";
|
|
3968
|
-
}
|
|
3969
|
-
}
|
|
3970
|
-
function getFormRule() {
|
|
3971
|
-
return widgetFormRules.map((rule) => {
|
|
3972
|
-
const ruleParsed = parseRule(rule);
|
|
3973
|
-
const childRules = rule?.config?.childRules;
|
|
3974
|
-
if (childRules?.length) {
|
|
3975
|
-
const childRulesParsed = ruleParsed.config.childRules = [];
|
|
3976
|
-
childRules.forEach((ruleItem) => {
|
|
3977
|
-
childRulesParsed.push(parseRule(ruleItem));
|
|
3978
|
-
});
|
|
3979
|
-
}
|
|
3980
|
-
return ruleParsed;
|
|
3981
|
-
});
|
|
3982
|
-
}
|
|
3983
|
-
function parseRule(rule) {
|
|
3984
|
-
return rule.config.config.parse(rule);
|
|
3985
|
-
}
|
|
3986
|
-
function edit(formRules) {
|
|
3987
|
-
formRules.forEach((item) => {
|
|
3988
|
-
const rule = makeRule(ruleList[item.name]);
|
|
3989
|
-
delete item.name;
|
|
3990
|
-
if (item?.config?.childRules?.length) {
|
|
3991
|
-
rule.config.childRules = item.config.childRules.map((childItem) => {
|
|
3992
|
-
const childRule = makeRule(ruleList[childItem.name]);
|
|
3993
|
-
delete childItem.name;
|
|
3994
|
-
return childRule;
|
|
3995
|
-
});
|
|
3996
|
-
}
|
|
3997
|
-
merge(rule, item);
|
|
3998
|
-
widgetFormRules.push(rule);
|
|
3999
|
-
});
|
|
4000
|
-
}
|
|
4001
|
-
function getRule(name) {
|
|
4002
|
-
return makeRule(ruleList[name]);
|
|
4003
|
-
}
|
|
4004
|
-
watch(
|
|
4005
|
-
() => props.presetRules,
|
|
4006
|
-
(presetRules) => {
|
|
4007
|
-
widgetFormRules.push(...presetRules);
|
|
4008
|
-
},
|
|
4009
|
-
{
|
|
4010
|
-
immediate: true
|
|
4011
|
-
}
|
|
4012
|
-
);
|
|
4013
|
-
watch(
|
|
4014
|
-
() => props.formRules,
|
|
4015
|
-
(formRules) => {
|
|
4016
|
-
edit(formRules);
|
|
4017
|
-
},
|
|
17
|
+
setup(__props) {
|
|
18
|
+
const rule = [
|
|
4018
19
|
{
|
|
4019
|
-
|
|
20
|
+
type: "input",
|
|
21
|
+
title: "\u5546\u54C1\u540D\u79F0",
|
|
22
|
+
field: "goods_name"
|
|
4020
23
|
}
|
|
4021
|
-
|
|
4022
|
-
onBeforeUnmount(() => {
|
|
4023
|
-
resetIndex();
|
|
4024
|
-
});
|
|
4025
|
-
expose({
|
|
4026
|
-
getFormRule,
|
|
4027
|
-
getRule
|
|
4028
|
-
});
|
|
24
|
+
];
|
|
4029
25
|
return (_ctx, _cache) => {
|
|
4030
|
-
const
|
|
4031
|
-
|
|
4032
|
-
const _component_FormCreate = resolveComponent("FormCreate");
|
|
4033
|
-
return openBlock(), createBlock(unref(Layout), { class: "bm-form-designer" }, {
|
|
4034
|
-
default: withCtx(() => [
|
|
4035
|
-
createVNode(unref(LayoutSider), {
|
|
4036
|
-
class: "bfd-sider-left",
|
|
4037
|
-
width: "260"
|
|
4038
|
-
}, {
|
|
4039
|
-
default: withCtx(() => [
|
|
4040
|
-
createVNode(_component_ARow, { class: "bm-tabs" }, {
|
|
4041
|
-
default: withCtx(() => [
|
|
4042
|
-
(openBlock(true), createElementBlock(Fragment, null, renderList(unref(tabData), (item) => {
|
|
4043
|
-
return openBlock(), createBlock(_component_ACol, {
|
|
4044
|
-
key: item.key,
|
|
4045
|
-
class: normalizeClass(["bm-tabs-item", activeKey.value === item.key ? "active" : ""]),
|
|
4046
|
-
onClick: ($event) => handleTabChange(item.key)
|
|
4047
|
-
}, {
|
|
4048
|
-
default: withCtx(() => [
|
|
4049
|
-
createTextVNode(toDisplayString(item.tab), 1)
|
|
4050
|
-
]),
|
|
4051
|
-
_: 2
|
|
4052
|
-
}, 1032, ["class", "onClick"]);
|
|
4053
|
-
}), 128))
|
|
4054
|
-
]),
|
|
4055
|
-
_: 1
|
|
4056
|
-
}),
|
|
4057
|
-
(openBlock(true), createElementBlock(Fragment, null, renderList(unref(menuList), (item, index) => {
|
|
4058
|
-
return openBlock(), createElementBlock("div", { key: index }, [
|
|
4059
|
-
createElementVNode("div", _hoisted_1, toDisplayString(item.title), 1),
|
|
4060
|
-
createVNode(unref(Draggable), {
|
|
4061
|
-
class: "bm-menu-wrap",
|
|
4062
|
-
list: item.list,
|
|
4063
|
-
group: { name: "widget", pull: "clone", put: false },
|
|
4064
|
-
"item-key": "name",
|
|
4065
|
-
sort: false,
|
|
4066
|
-
clone: cloneMenuItem,
|
|
4067
|
-
move: moveMenuItem,
|
|
4068
|
-
"force-fallback": true,
|
|
4069
|
-
"scroll-sensitivity": 100,
|
|
4070
|
-
delay: 50,
|
|
4071
|
-
onStart: handleMenuItemDragStart,
|
|
4072
|
-
onEnd: handleMenuItemDragEnd
|
|
4073
|
-
}, {
|
|
4074
|
-
item: withCtx(({ element }) => [
|
|
4075
|
-
createElementVNode("div", {
|
|
4076
|
-
style: normalizeStyle({ flexBasis: item.name === "dataForm" ? "100%" : "50%" }),
|
|
4077
|
-
class: "bm-menu-item-wrap"
|
|
4078
|
-
}, [
|
|
4079
|
-
createElementVNode("div", {
|
|
4080
|
-
class: "bm-menu-item",
|
|
4081
|
-
onClick: ($event) => handleMenuItemClick(element)
|
|
4082
|
-
}, [
|
|
4083
|
-
(openBlock(), createBlock(resolveDynamicComponent(element.icon), { class: "bm-menu-icon" })),
|
|
4084
|
-
createTextVNode(" " + toDisplayString(element.label), 1)
|
|
4085
|
-
], 8, _hoisted_2),
|
|
4086
|
-
createVNode(DragPlaceholder)
|
|
4087
|
-
], 4)
|
|
4088
|
-
]),
|
|
4089
|
-
_: 2
|
|
4090
|
-
}, 1032, ["list"])
|
|
4091
|
-
]);
|
|
4092
|
-
}), 128))
|
|
4093
|
-
]),
|
|
4094
|
-
_: 1
|
|
4095
|
-
}),
|
|
4096
|
-
createVNode(unref(LayoutContent), { class: "bfd-main" }, {
|
|
4097
|
-
default: withCtx(() => [
|
|
4098
|
-
createElementVNode("div", _hoisted_3, [
|
|
4099
|
-
createVNode(unref(Draggable), {
|
|
4100
|
-
list: widgetFormRules,
|
|
4101
|
-
class: "bm-widget-form",
|
|
4102
|
-
group: {
|
|
4103
|
-
name: "formWidget",
|
|
4104
|
-
pull: true,
|
|
4105
|
-
put: ["widget", "formWidget", "rowWidget"]
|
|
4106
|
-
},
|
|
4107
|
-
"item-key": "field",
|
|
4108
|
-
"ghost-class": "form-item-drag-ghost",
|
|
4109
|
-
move: moveFormItem,
|
|
4110
|
-
"force-fallback": true,
|
|
4111
|
-
delay: 50,
|
|
4112
|
-
onAdd: handleFormItemAdd,
|
|
4113
|
-
onUpdate: handleFormItemUpdate,
|
|
4114
|
-
onEnd: handleFormItemDragEnd
|
|
4115
|
-
}, {
|
|
4116
|
-
item: withCtx(({ element }) => [
|
|
4117
|
-
createElementVNode("div", _hoisted_4, [
|
|
4118
|
-
createVNode(DragTool, {
|
|
4119
|
-
rule: element,
|
|
4120
|
-
"active-rule": activeRule.value,
|
|
4121
|
-
style: normalizeStyle({
|
|
4122
|
-
width: element.config.fieldRatio
|
|
4123
|
-
}),
|
|
4124
|
-
onCopy: handleFormItemCopy,
|
|
4125
|
-
onDelete: handleFormItemDelete,
|
|
4126
|
-
onClick: ($event) => handleFormItemClick(element),
|
|
4127
|
-
onSetActiveRule: setActiveRule,
|
|
4128
|
-
onWidgetAdd: handleWidgetAdd
|
|
4129
|
-
}, null, 8, ["rule", "active-rule", "style", "onClick"]),
|
|
4130
|
-
createVNode(DragPlaceholder)
|
|
4131
|
-
])
|
|
4132
|
-
]),
|
|
4133
|
-
_: 1
|
|
4134
|
-
}, 8, ["list"]),
|
|
4135
|
-
showDragTip.value && !_ctx.formRules.length ? (openBlock(), createBlock(NoDataTip, {
|
|
4136
|
-
key: 0,
|
|
4137
|
-
class: "bm-no-data-tip"
|
|
4138
|
-
})) : createCommentVNode("v-if", true)
|
|
4139
|
-
])
|
|
4140
|
-
]),
|
|
4141
|
-
_: 1
|
|
4142
|
-
}),
|
|
4143
|
-
createVNode(unref(LayoutSider), {
|
|
4144
|
-
class: "bfd-sider-right",
|
|
4145
|
-
width: "288"
|
|
4146
|
-
}, {
|
|
4147
|
-
default: withCtx(() => [
|
|
4148
|
-
activeRule.value.field ? (openBlock(), createElementBlock("div", _hoisted_5, [
|
|
4149
|
-
(openBlock(), createBlock(resolveDynamicComponent(activeRule.value.config?.config.icon))),
|
|
4150
|
-
createTextVNode(" " + toDisplayString(activeRule.value.config?.config.label) + " ", 1),
|
|
4151
|
-
activeRule.value.type === unref(WidgetType).UploadFile ? (openBlock(), createBlock(unref(Tooltip), { key: 0 }, {
|
|
4152
|
-
title: withCtx(() => [
|
|
4153
|
-
_hoisted_6
|
|
4154
|
-
]),
|
|
4155
|
-
default: withCtx(() => [
|
|
4156
|
-
createVNode(unref(QuestionCircleOutlined), { style: { "color": "#babac1", "font-size": "14px", "margin-left": "5px" } })
|
|
4157
|
-
]),
|
|
4158
|
-
_: 1
|
|
4159
|
-
})) : createCommentVNode("v-if", true)
|
|
4160
|
-
])) : createCommentVNode("v-if", true),
|
|
4161
|
-
createElementVNode("div", _hoisted_7, [
|
|
4162
|
-
_ctx.flowCondition[activeRule.value.field] ? (openBlock(), createElementBlock("div", _hoisted_8, [
|
|
4163
|
-
createVNode(unref(ExclamationCircleFilled), { style: { "color": "#2f4eed" } }),
|
|
4164
|
-
createTextVNode(" \u8BE5\u7EC4\u4EF6\u5728\u201C" + toDisplayString(_ctx.flowCondition[activeRule.value.field]) + "\u201D\u5DF2\u88AB\u8BBE\u4E3A\u5BA1\u6279\u6761\u4EF6\uFF0C\u9664\u201C\u5FC5\u586B\u3001\u9009\u9879\u201D\u8BBE\u7F6E\u4E0D\u53EF\u4FEE\u6539\uFF0C\u5176\u4ED6\u4FE1\u606F\u53EF\u4FEE\u6539 ", 1)
|
|
4165
|
-
])) : createCommentVNode("v-if", true),
|
|
4166
|
-
createVNode(_component_FormCreate, {
|
|
4167
|
-
api: fApi.value,
|
|
4168
|
-
"onUpdate:api": _cache[0] || (_cache[0] = ($event) => fApi.value = $event),
|
|
4169
|
-
option: {
|
|
4170
|
-
form: {
|
|
4171
|
-
layout: "vertical"
|
|
4172
|
-
},
|
|
4173
|
-
submitBtn: {
|
|
4174
|
-
show: false
|
|
4175
|
-
},
|
|
4176
|
-
info: {
|
|
4177
|
-
type: "tooltip",
|
|
4178
|
-
align: "left",
|
|
4179
|
-
arrowPointAtCenter: true,
|
|
4180
|
-
overlayStyle: {
|
|
4181
|
-
width: "184px"
|
|
4182
|
-
}
|
|
4183
|
-
}
|
|
4184
|
-
},
|
|
4185
|
-
rule: unref(activeProps),
|
|
4186
|
-
onChange: propChange,
|
|
4187
|
-
onSetActive: handlePropsSetActive,
|
|
4188
|
-
onAddChildRule: handleAddChildRule
|
|
4189
|
-
}, null, 8, ["api", "rule"])
|
|
4190
|
-
])
|
|
4191
|
-
]),
|
|
4192
|
-
_: 1
|
|
4193
|
-
})
|
|
4194
|
-
]),
|
|
4195
|
-
_: 1
|
|
4196
|
-
});
|
|
26
|
+
const _component_form_create = resolveComponent("form-create");
|
|
27
|
+
return openBlock(), createBlock(_component_form_create, { rule });
|
|
4197
28
|
};
|
|
4198
29
|
}
|
|
4199
30
|
});
|