star-horse-lowcode 2.7.65 → 2.7.66
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/README.md +1 -0
- package/dist/assets/index.css +1 -1
- package/dist/index.es.js +491 -253
- package/package.json +1 -1
- package/.env.development +0 -3
- package/.env.production +0 -3
- package/.eslintrc-auto-import.json +0 -77
- package/.gitignore +0 -27
- package/.idea/.gitignore +0 -5
- package/.idea/MarsCodeWorkspaceAppSettings.xml +0 -6
- package/.idea/inspectionProfiles/Project_Default.xml +0 -7
- package/.idea/modules.xml +0 -8
- package/.idea/testcode.iml +0 -12
- package/.idea/vcs.xml +0 -6
- package/.idea/watcherTasks.xml +0 -4
- package/.idea/workspace.xml +0 -207
- package/.npmignore +0 -21
- package/.prettierignore +0 -26
- package/auto-imports.d.ts +0 -137
- package/components.d.ts +0 -189
- package/eslint.config.js +0 -37
- package/index.html +0 -14
- package/package-lock.json +0 -8276
- package/prettier.config.js +0 -20
- package/public/logo.svg +0 -660
- package/src/App.vue +0 -11
- package/src/api/date_utils.ts +0 -219
- package/src/api/finger_utils.ts +0 -71
- package/src/api/form_utils.ts +0 -281
- package/src/api/jquery.min.js +0 -2
- package/src/api/pcas-code.json +0 -1
- package/src/api/settings.ts +0 -81
- package/src/api/star_horse_apis.ts +0 -196
- package/src/api/star_horse_utils.ts +0 -797
- package/src/api/system.ts +0 -351
- package/src/api/user_func.ts +0 -147
- package/src/api/valid_utils.ts +0 -165
- package/src/assets/css/index.scss +0 -908
- package/src/assets/icons.css +0 -574
- package/src/assets/star-horse-icons.woff +0 -0
- package/src/components/comp/ShDynamicForm.vue +0 -160
- package/src/components/comp/ShForm.vue +0 -30
- package/src/components/comp/ShTableListColumn.vue +0 -61
- package/src/components/comp/StarHorseDataSelector.vue +0 -139
- package/src/components/comp/StarHorseDataView.vue +0 -110
- package/src/components/comp/StarHorseDataViewItems.vue +0 -61
- package/src/components/comp/StarHorseDataViewTable.vue +0 -102
- package/src/components/comp/StarHorseDialog.vue +0 -383
- package/src/components/comp/StarHorseDraggable.vue +0 -401
- package/src/components/comp/StarHorseForm.vue +0 -458
- package/src/components/comp/StarHorseFormItem.vue +0 -82
- package/src/components/comp/StarHorseFormList.vue +0 -516
- package/src/components/comp/StarHorseFormTable.vue +0 -56
- package/src/components/comp/StarHorseIcon.vue +0 -76
- package/src/components/comp/StarHorseItem.vue +0 -302
- package/src/components/comp/StarHorseJsonEditor.vue +0 -115
- package/src/components/comp/StarHorsePopover.vue +0 -66
- package/src/components/comp/StarHorseSearchComp.vue +0 -253
- package/src/components/comp/StarHorseStaticTable.vue +0 -395
- package/src/components/comp/StarHorseTableColumn.vue +0 -249
- package/src/components/comp/StarHorseTableComp.vue +0 -1193
- package/src/components/comp/StarHorseTableViewColumn.vue +0 -61
- package/src/components/comp/StarHorseTree.vue +0 -494
- package/src/components/comp/index.ts +0 -22
- package/src/components/comp/items/UTableColumn.vue +0 -65
- package/src/components/comp/items/boxItem.vue +0 -98
- package/src/components/comp/items/callitem.ts +0 -9
- package/src/components/comp/items/cardItem.vue +0 -152
- package/src/components/comp/items/collapseItem.vue +0 -134
- package/src/components/comp/items/dytableItem.vue +0 -135
- package/src/components/comp/items/otherItem.vue +0 -65
- package/src/components/comp/items/tabItem.vue +0 -155
- package/src/components/comp/items/tabPanelItem.vue +0 -110
- package/src/components/comp/items/tableColumn.vue +0 -129
- package/src/components/comp/items/tableItem.vue +0 -97
- package/src/components/comp/items/tablebtn.vue +0 -158
- package/src/components/comp/items/viewBoxItem.vue +0 -55
- package/src/components/comp/items/viewCardItem.vue +0 -47
- package/src/components/comp/items/viewCollapseItem.vue +0 -71
- package/src/components/comp/items/viewDytableItem.vue +0 -77
- package/src/components/comp/items/viewOtherItem.vue +0 -55
- package/src/components/comp/items/viewTabItem.vue +0 -77
- package/src/components/comp/items/viewTabPanelItem.vue +0 -54
- package/src/components/comp/items/viewTableItem.vue +0 -74
- package/src/components/comp/selfcomp.ts +0 -9
- package/src/components/comp/utils/DataPicker.vue +0 -302
- package/src/components/comp/utils/DataTag.vue +0 -51
- package/src/components/cron/Crontab-Day.vue +0 -230
- package/src/components/cron/Crontab-Hour.vue +0 -165
- package/src/components/cron/Crontab-Min.vue +0 -166
- package/src/components/cron/Crontab-Month.vue +0 -166
- package/src/components/cron/Crontab-Result.vue +0 -615
- package/src/components/cron/Crontab-Second.vue +0 -185
- package/src/components/cron/Crontab-Week.vue +0 -208
- package/src/components/cron/Crontab-Year.vue +0 -183
- package/src/components/cron/Crontab.vue +0 -474
- package/src/components/enums/ModuleEnums.ts +0 -10
- package/src/components/enums/ServiceEnums.ts +0 -18
- package/src/components/formcomp/container/box-container.vue +0 -162
- package/src/components/formcomp/container/callitem.ts +0 -9
- package/src/components/formcomp/container/card-container.vue +0 -170
- package/src/components/formcomp/container/collapse-container.vue +0 -133
- package/src/components/formcomp/container/dytable-col.vue +0 -448
- package/src/components/formcomp/container/dytable-container.vue +0 -57
- package/src/components/formcomp/container/dytableUtils.ts +0 -358
- package/src/components/formcomp/container/group-box-container.vue +0 -331
- package/src/components/formcomp/container/index.ts +0 -6
- package/src/components/formcomp/container/tab-container.vue +0 -153
- package/src/components/formcomp/container/table-container.vue +0 -249
- package/src/components/formcomp/items/allitem.ts +0 -9
- package/src/components/formcomp/items/area-item.vue +0 -116
- package/src/components/formcomp/items/audio-item.vue +0 -163
- package/src/components/formcomp/items/autocomplete-item.vue +0 -118
- package/src/components/formcomp/items/barcode-item.vue +0 -87
- package/src/components/formcomp/items/base-json-item.vue +0 -207
- package/src/components/formcomp/items/button-item.vue +0 -228
- package/src/components/formcomp/items/cascade-item.vue +0 -113
- package/src/components/formcomp/items/checkbox-item.vue +0 -97
- package/src/components/formcomp/items/color-item.vue +0 -70
- package/src/components/formcomp/items/cron-item.vue +0 -115
- package/src/components/formcomp/items/datetime-item.vue +0 -99
- package/src/components/formcomp/items/depart-item.vue +0 -51
- package/src/components/formcomp/items/dialog-input-item.vue +0 -207
- package/src/components/formcomp/items/divider-item.vue +0 -66
- package/src/components/formcomp/items/html-item.vue +0 -65
- package/src/components/formcomp/items/htmleditor-item.vue +0 -104
- package/src/components/formcomp/items/icon-item.vue +0 -195
- package/src/components/formcomp/items/image-item.vue +0 -247
- package/src/components/formcomp/items/index.ts +0 -44
- package/src/components/formcomp/items/input-item.vue +0 -150
- package/src/components/formcomp/items/json-array-item.vue +0 -67
- package/src/components/formcomp/items/json-item.vue +0 -66
- package/src/components/formcomp/items/markdown-item.vue +0 -77
- package/src/components/formcomp/items/number-item.vue +0 -94
- package/src/components/formcomp/items/number-range-item.vue +0 -278
- package/src/components/formcomp/items/page-select-item.vue +0 -407
- package/src/components/formcomp/items/password-item.vue +0 -71
- package/src/components/formcomp/items/qrcode-item.vue +0 -84
- package/src/components/formcomp/items/radio-item.vue +0 -112
- package/src/components/formcomp/items/rate-item.vue +0 -68
- package/src/components/formcomp/items/select-item.vue +0 -133
- package/src/components/formcomp/items/signature-item.vue +0 -216
- package/src/components/formcomp/items/slider-item.vue +0 -68
- package/src/components/formcomp/items/starhorse-form-item.vue +0 -334
- package/src/components/formcomp/items/switch-item.vue +0 -77
- package/src/components/formcomp/items/tag-item.vue +0 -77
- package/src/components/formcomp/items/text-item.vue +0 -75
- package/src/components/formcomp/items/textarea-item.vue +0 -85
- package/src/components/formcomp/items/time-item.vue +0 -77
- package/src/components/formcomp/items/time-picker-item.vue +0 -74
- package/src/components/formcomp/items/transfer-item.vue +0 -93
- package/src/components/formcomp/items/tselect-item.vue +0 -121
- package/src/components/formcomp/items/unknown-item.vue +0 -51
- package/src/components/formcomp/items/upload-item.vue +0 -189
- package/src/components/formcomp/items/user-item.vue +0 -177
- package/src/components/formcomp/items/usercomp-item.vue +0 -85
- package/src/components/formcomp/items/view-markdown-item.vue +0 -77
- package/src/components/formcomp/utils/EditDataDialog.vue +0 -67
- package/src/components/formcomp/utils/FieldList.vue +0 -125
- package/src/components/formcomp/utils/ItemRelationEventUtils.ts +0 -284
- package/src/components/help.vue +0 -31
- package/src/components/menu/MenuItem.vue +0 -95
- package/src/components/menu/SubMenu.vue +0 -68
- package/src/components/menu/SubSystemMenu.vue +0 -142
- package/src/components/register.ts +0 -24
- package/src/components/system/ContentMenu.vue +0 -260
- package/src/components/system/StarHorseButtonList.vue +0 -344
- package/src/components/system/StarHorseMenu.vue +0 -97
- package/src/components/system/StarHorseSvg.vue +0 -62
- package/src/components/system/SystemComp.ts +0 -9
- package/src/components/system/index.ts +0 -4
- package/src/components/types/ApiUrls.ts +0 -168
- package/src/components/types/BtnAction.ts +0 -51
- package/src/components/types/BtnAuth.ts +0 -43
- package/src/components/types/CompInfo.ts +0 -81
- package/src/components/types/DialogProps.ts +0 -55
- package/src/components/types/DyCompField.ts +0 -23
- package/src/components/types/DynamicNode.ts +0 -42
- package/src/components/types/MenusInfo.ts +0 -45
- package/src/components/types/PageFieldInfo.ts +0 -530
- package/src/components/types/PageProps.ts +0 -25
- package/src/components/types/Params.ts +0 -93
- package/src/components/types/RuleType.ts +0 -10
- package/src/components/types/SearchProps.ts +0 -42
- package/src/components/types/ShortKey.ts +0 -30
- package/src/components/types/StarHorseType.ts +0 -18
- package/src/components/types/index.ts +0 -15
- package/src/config/element.ts +0 -15
- package/src/config/styles.ts +0 -4
- package/src/index.ts +0 -98
- package/src/install.ts +0 -33
- package/src/lang/en_US.ts +0 -81
- package/src/lang/index.ts +0 -35
- package/src/lang/zh_CN.ts +0 -84
- package/src/main.ts +0 -57
- package/src/plugins/AblesPlugin.ts +0 -618
- package/src/plugins/registerCompPlugin.ts +0 -15
- package/src/sample/test.vue +0 -9
- package/src/store/ButtonPermission.ts +0 -101
- package/src/store/ConsumerView.ts +0 -52
- package/src/store/ContinusConfig.ts +0 -78
- package/src/store/CopyerOperation.ts +0 -74
- package/src/store/DesignForm.ts +0 -481
- package/src/store/DesignPage.ts +0 -59
- package/src/store/DynamicForm.ts +0 -241
- package/src/store/GlobalConfig.ts +0 -90
- package/src/store/SelfOperation.ts +0 -95
- package/src/store/UserInfo.ts +0 -88
- package/src/store/index.ts +0 -6
- package/src/theme/localStorge.ts +0 -16
- package/src/theme/theme.ts +0 -27
- package/src/utils/FieldOperationUtils.ts +0 -91
- package/src/utils/auth.ts +0 -83
- package/src/utils/message.ts +0 -69
- package/src/utils/preview.ts +0 -125
- package/tsconfig.json +0 -39
- package/tsconfig.node.json +0 -10
- package/vite-env.d.ts +0 -16
- package/vite.config.ts +0 -162
- package/yarn.lock +0 -4627
|
@@ -1,334 +0,0 @@
|
|
|
1
|
-
<script setup lang="ts" name="starhorse-form-item">
|
|
2
|
-
import { computed, onMounted, PropType, ref } from "vue";
|
|
3
|
-
import { useDesignFormStore } from "@/store/DesignForm";
|
|
4
|
-
import piniaInstance from "@/store/index";
|
|
5
|
-
import StarHorseDialog from "@/components/comp/StarHorseDialog.vue";
|
|
6
|
-
import FieldList from "@/components/formcomp/utils/FieldList.vue";
|
|
7
|
-
import {
|
|
8
|
-
dynamicFormContextMenuData,
|
|
9
|
-
getParentComp,
|
|
10
|
-
moveDownItem,
|
|
11
|
-
moveUpItem,
|
|
12
|
-
removeItem,
|
|
13
|
-
} from "@/plugins/AblesPlugin";
|
|
14
|
-
|
|
15
|
-
const props = defineProps({
|
|
16
|
-
parentField: { type: Object as PropType<any> },
|
|
17
|
-
parentId: { type: Object as PropType<any> },
|
|
18
|
-
formItem: { type: Object as PropType<any>, required: true },
|
|
19
|
-
isDesign: { type: Boolean, default: false },
|
|
20
|
-
showFormItem: { type: Boolean, default: false },
|
|
21
|
-
disabled: { type: Boolean, default: false },
|
|
22
|
-
//是否需要css 修饰
|
|
23
|
-
bareFlag: { type: Boolean, default: false },
|
|
24
|
-
});
|
|
25
|
-
let designForm = useDesignFormStore(piniaInstance);
|
|
26
|
-
let isEdit = computed(() => props.isDesign);
|
|
27
|
-
let currentItemId = computed(() => designForm.currentItemId);
|
|
28
|
-
const isDisabled = computed(() => props.disabled);
|
|
29
|
-
|
|
30
|
-
let componentVisible = computed(() => {
|
|
31
|
-
return (
|
|
32
|
-
designForm.componentVisible &&
|
|
33
|
-
currentItemId.value == props.formItem?.preps.id
|
|
34
|
-
);
|
|
35
|
-
});
|
|
36
|
-
const selectParentContainer = () => {
|
|
37
|
-
if (!isEdit.value || isDisabled.value) return;
|
|
38
|
-
designForm.selectItem(props.parentField, "", "container");
|
|
39
|
-
};
|
|
40
|
-
const selectData = (data: any) => {
|
|
41
|
-
if (!isEdit.value || isDisabled.value) return;
|
|
42
|
-
designForm.selectItem(
|
|
43
|
-
props.formItem,
|
|
44
|
-
data.itemType,
|
|
45
|
-
getParentComp(props.parentField),
|
|
46
|
-
);
|
|
47
|
-
};
|
|
48
|
-
|
|
49
|
-
const exchangeItem = () => {
|
|
50
|
-
designForm.setComponentVisible(true);
|
|
51
|
-
};
|
|
52
|
-
const close = () => {
|
|
53
|
-
designForm.setComponentVisible(false);
|
|
54
|
-
};
|
|
55
|
-
const changeItem = (item: any) => {
|
|
56
|
-
props.formItem["itemType"] = item["itemType"];
|
|
57
|
-
if (item.category == 2) {
|
|
58
|
-
props.formItem["compType"] = "container";
|
|
59
|
-
}
|
|
60
|
-
props.formItem["preps"] = {
|
|
61
|
-
...props.formItem["preps"],
|
|
62
|
-
itemNameLabel: item.itemName,
|
|
63
|
-
};
|
|
64
|
-
close();
|
|
65
|
-
selectData(props.formItem);
|
|
66
|
-
};
|
|
67
|
-
const itemContextMenuRef = ref();
|
|
68
|
-
const itemContextMenu = (evt: MouseEvent | any) => {
|
|
69
|
-
if (!isEdit.value || isDisabled.value) return;
|
|
70
|
-
evt.stopPropagation();
|
|
71
|
-
evt.preventDefault();
|
|
72
|
-
evt.props = props;
|
|
73
|
-
itemContextMenuRef.value?.show(evt);
|
|
74
|
-
};
|
|
75
|
-
onMounted(() => {});
|
|
76
|
-
</script>
|
|
77
|
-
<template>
|
|
78
|
-
<star-horse-dialog
|
|
79
|
-
box-width="450px"
|
|
80
|
-
:source="3"
|
|
81
|
-
:full-screen="false"
|
|
82
|
-
title="更换组件"
|
|
83
|
-
:self-func="true"
|
|
84
|
-
:dialog-visible="componentVisible"
|
|
85
|
-
@closeAction="close"
|
|
86
|
-
>
|
|
87
|
-
<template #footer>
|
|
88
|
-
<el-button type="primary" size="default" @click="close">确定</el-button>
|
|
89
|
-
</template>
|
|
90
|
-
<field-list @selectData="changeItem" />
|
|
91
|
-
</star-horse-dialog>
|
|
92
|
-
<div
|
|
93
|
-
class="w-fill"
|
|
94
|
-
:class="{ 'item-info': formItem.preps?.itemType != 'usercomp' }"
|
|
95
|
-
:style="{
|
|
96
|
-
margin: formItem.preps?.itemType == 'button' ? '5px auto' : 'unset',
|
|
97
|
-
}"
|
|
98
|
-
v-if="bareFlag === true"
|
|
99
|
-
>
|
|
100
|
-
<help :message="formItem.preps?.helpMsg" v-if="formItem.preps?.helpMsg" />
|
|
101
|
-
<slot></slot>
|
|
102
|
-
</div>
|
|
103
|
-
<div v-else class="form-item-operation">
|
|
104
|
-
<div
|
|
105
|
-
class="w-fill"
|
|
106
|
-
:class="{
|
|
107
|
-
'design-star-horse': isEdit && !disabled,
|
|
108
|
-
'field-item': true,
|
|
109
|
-
'active-item':
|
|
110
|
-
currentItemId == formItem?.preps.id && isEdit && !disabled,
|
|
111
|
-
}"
|
|
112
|
-
v-if="showFormItem"
|
|
113
|
-
@click="selectData(formItem)"
|
|
114
|
-
@contextmenu="itemContextMenu"
|
|
115
|
-
>
|
|
116
|
-
<el-form-item
|
|
117
|
-
:size="formItem?.preps['size'] || 'default'"
|
|
118
|
-
v-if="
|
|
119
|
-
parentField?.itemType != 'table' &&
|
|
120
|
-
formItem.preps?.itemType != 'divider' &&
|
|
121
|
-
formItem?.preps['headerFlag'] != 'Y'
|
|
122
|
-
"
|
|
123
|
-
:style="{
|
|
124
|
-
marginBottom: isEdit && !disabled ? '1px' : '18px',
|
|
125
|
-
}"
|
|
126
|
-
:label="formItem?.preps['hideLabel'] ? '' : formItem?.preps['label']"
|
|
127
|
-
:prop="formItem?.preps['name']"
|
|
128
|
-
:required="formItem?.preps['required']"
|
|
129
|
-
:rules="
|
|
130
|
-
formItem?.preps['required']
|
|
131
|
-
? [{ required: true, trigger: 'blur', message: '必须项不能为空' }]
|
|
132
|
-
: []
|
|
133
|
-
"
|
|
134
|
-
>
|
|
135
|
-
<help
|
|
136
|
-
:message="formItem.preps?.helpMsg"
|
|
137
|
-
v-if="formItem.preps?.helpMsg"
|
|
138
|
-
/>
|
|
139
|
-
<slot></slot>
|
|
140
|
-
</el-form-item>
|
|
141
|
-
<div
|
|
142
|
-
class="w-fill"
|
|
143
|
-
v-else
|
|
144
|
-
:class="{
|
|
145
|
-
'bare-item': true,
|
|
146
|
-
'item-info': formItem.preps?.itemType != 'usercomp',
|
|
147
|
-
}"
|
|
148
|
-
:style="{
|
|
149
|
-
margin: formItem?.itemType == 'button' ? '5px auto' : 'unset',
|
|
150
|
-
}"
|
|
151
|
-
@click.stop="selectData(formItem)"
|
|
152
|
-
>
|
|
153
|
-
<help
|
|
154
|
-
:message="formItem.preps?.helpMsg"
|
|
155
|
-
v-if="formItem.preps?.helpMsg"
|
|
156
|
-
/>
|
|
157
|
-
<slot></slot>
|
|
158
|
-
</div>
|
|
159
|
-
<div
|
|
160
|
-
class="field-action"
|
|
161
|
-
v-if="isEdit && !disabled && currentItemId == formItem?.preps.id"
|
|
162
|
-
>
|
|
163
|
-
<el-tooltip content="选择父容器" v-if="parentField?.itemType">
|
|
164
|
-
<star-horse-icon
|
|
165
|
-
@click.stop="selectParentContainer()"
|
|
166
|
-
icon-class="select-parent"
|
|
167
|
-
cursor="pointer"
|
|
168
|
-
style="color: var(--star-horse-white)"
|
|
169
|
-
/>
|
|
170
|
-
</el-tooltip>
|
|
171
|
-
<el-tooltip content="更换组件">
|
|
172
|
-
<star-horse-icon
|
|
173
|
-
@click.stop="exchangeItem"
|
|
174
|
-
icon-class="exchange"
|
|
175
|
-
cursor="pointer"
|
|
176
|
-
style="color: var(--star-horse-white)"
|
|
177
|
-
/>
|
|
178
|
-
</el-tooltip>
|
|
179
|
-
<el-tooltip content="上移" v-if="parentField?.itemType != 'table'">
|
|
180
|
-
<star-horse-icon
|
|
181
|
-
@click.stop="moveUpItem(isEdit, formItem?.preps, parentField)"
|
|
182
|
-
icon-class="move-up"
|
|
183
|
-
cursor="pointer"
|
|
184
|
-
style="color: var(--star-horse-white)"
|
|
185
|
-
/>
|
|
186
|
-
</el-tooltip>
|
|
187
|
-
<el-tooltip content="下移" v-if="parentField?.itemType != 'table'">
|
|
188
|
-
<star-horse-icon
|
|
189
|
-
@click.stop="moveDownItem(isEdit, formItem?.preps, parentField)"
|
|
190
|
-
icon-class="move-down"
|
|
191
|
-
cursor="pointer"
|
|
192
|
-
style="color: var(--star-horse-white)"
|
|
193
|
-
/>
|
|
194
|
-
</el-tooltip>
|
|
195
|
-
<el-tooltip content="删除组件">
|
|
196
|
-
<star-horse-icon
|
|
197
|
-
@click.stop="removeItem(isEdit, formItem?.preps, parentField)"
|
|
198
|
-
icon-class="clear-all"
|
|
199
|
-
cursor="pointer"
|
|
200
|
-
style="color: var(--star-horse-white)"
|
|
201
|
-
/>
|
|
202
|
-
</el-tooltip>
|
|
203
|
-
</div>
|
|
204
|
-
<div
|
|
205
|
-
class="drag-handler"
|
|
206
|
-
v-if="isEdit && currentItemId == formItem?.preps.id"
|
|
207
|
-
>
|
|
208
|
-
<el-tooltip content="拖动">
|
|
209
|
-
<star-horse-icon
|
|
210
|
-
icon-class="drag"
|
|
211
|
-
style="cursor: move; color: var(--star-horse-white)"
|
|
212
|
-
/>
|
|
213
|
-
</el-tooltip>
|
|
214
|
-
|
|
215
|
-
<el-tooltip :content="formItem?.preps['itemNameLabel']">
|
|
216
|
-
<span
|
|
217
|
-
style="color: var(--star-horse-white); cursor: pointer"
|
|
218
|
-
@click="selectData(formItem)"
|
|
219
|
-
>{{ formItem?.preps["itemNameLabel"] }}</span
|
|
220
|
-
>
|
|
221
|
-
</el-tooltip>
|
|
222
|
-
</div>
|
|
223
|
-
</div>
|
|
224
|
-
<div
|
|
225
|
-
class="item-info"
|
|
226
|
-
:style="{
|
|
227
|
-
margin: formItem.preps?.itemType == 'button' ? '5px auto' : 'unset',
|
|
228
|
-
}"
|
|
229
|
-
v-else
|
|
230
|
-
>
|
|
231
|
-
<help :message="formItem.preps?.helpMsg" v-if="formItem.preps?.helpMsg" />
|
|
232
|
-
<slot></slot>
|
|
233
|
-
</div>
|
|
234
|
-
<Teleport to="body">
|
|
235
|
-
<ContentMenu
|
|
236
|
-
ref="itemContextMenuRef"
|
|
237
|
-
:menu-data="dynamicFormContextMenuData(formItem, parentField, 'item')"
|
|
238
|
-
/>
|
|
239
|
-
</Teleport>
|
|
240
|
-
</div>
|
|
241
|
-
</template>
|
|
242
|
-
<style lang="scss" scoped>
|
|
243
|
-
.form-item-operation {
|
|
244
|
-
display: flex;
|
|
245
|
-
width: 100%;
|
|
246
|
-
flex: 1;
|
|
247
|
-
}
|
|
248
|
-
|
|
249
|
-
.item-info {
|
|
250
|
-
display: flex;
|
|
251
|
-
width: 100%;
|
|
252
|
-
flex: 1;
|
|
253
|
-
justify-content: start;
|
|
254
|
-
}
|
|
255
|
-
|
|
256
|
-
.active-item {
|
|
257
|
-
border: 1px dashed var(--star-horse-style);
|
|
258
|
-
}
|
|
259
|
-
|
|
260
|
-
.design-star-horse {
|
|
261
|
-
width: 100%;
|
|
262
|
-
display: flex;
|
|
263
|
-
justify-content: center;
|
|
264
|
-
vertical-align: middle;
|
|
265
|
-
align-items: center;
|
|
266
|
-
min-height: 50px;
|
|
267
|
-
z-index: 0;
|
|
268
|
-
}
|
|
269
|
-
|
|
270
|
-
.el-form-item {
|
|
271
|
-
//margin-bottom: 0 !important;
|
|
272
|
-
//margin-bottom: 6px;
|
|
273
|
-
//margin-top: 2px;
|
|
274
|
-
position: relative;
|
|
275
|
-
|
|
276
|
-
:deep(.el-form-item__label) {
|
|
277
|
-
white-space: nowrap;
|
|
278
|
-
text-overflow: ellipsis;
|
|
279
|
-
}
|
|
280
|
-
|
|
281
|
-
span.custom-label i {
|
|
282
|
-
margin: 0 3px;
|
|
283
|
-
}
|
|
284
|
-
|
|
285
|
-
/* 隐藏Chrome浏览器中el-input数字输入框右侧的上下调整小箭头 */
|
|
286
|
-
:deep(.hide-spin-button) input::-webkit-outer-spin-button,
|
|
287
|
-
:deep(.hide-spin-button) input::-webkit-inner-spin-button {
|
|
288
|
-
-webkit-appearance: none !important;
|
|
289
|
-
}
|
|
290
|
-
|
|
291
|
-
/* 隐藏Firefox浏览器中el-input数字输入框右侧的上下调整小箭头 */
|
|
292
|
-
:deep(.hide-spin-button) input[type="number"] {
|
|
293
|
-
-moz-appearance: textfield;
|
|
294
|
-
}
|
|
295
|
-
}
|
|
296
|
-
|
|
297
|
-
.required :deep(.el-form-item__label)::before {
|
|
298
|
-
content: "*";
|
|
299
|
-
color: #f56c6c;
|
|
300
|
-
margin-right: 4px;
|
|
301
|
-
}
|
|
302
|
-
|
|
303
|
-
.static-content-item {
|
|
304
|
-
min-height: 20px;
|
|
305
|
-
display: flex;
|
|
306
|
-
/* 垂直居中 */
|
|
307
|
-
align-items: center;
|
|
308
|
-
|
|
309
|
-
/* 垂直居中 */
|
|
310
|
-
:deep(.el-divider--horizontal) {
|
|
311
|
-
margin: 0;
|
|
312
|
-
}
|
|
313
|
-
}
|
|
314
|
-
|
|
315
|
-
.el-form-item.selected,
|
|
316
|
-
.static-content-item.selected {
|
|
317
|
-
outline: 2px solid var(--star-horse-style);
|
|
318
|
-
}
|
|
319
|
-
|
|
320
|
-
:deep(.label-left-align) .el-form-item__label {
|
|
321
|
-
text-align: left;
|
|
322
|
-
justify-content: flex-start !important;
|
|
323
|
-
}
|
|
324
|
-
|
|
325
|
-
:deep(.label-center-align) .el-form-item__label {
|
|
326
|
-
text-align: center;
|
|
327
|
-
justify-content: center !important;
|
|
328
|
-
}
|
|
329
|
-
|
|
330
|
-
:deep(.label-right-align) .el-form-item__label {
|
|
331
|
-
text-align: right;
|
|
332
|
-
justify-content: flex-end !important;
|
|
333
|
-
}
|
|
334
|
-
</style>
|
|
@@ -1,77 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<starhorse-form-item
|
|
3
|
-
:showFormItem="showFormItem"
|
|
4
|
-
:isDesign="isDesign"
|
|
5
|
-
:disabled="disabled"
|
|
6
|
-
:bareFlag="bareFlag"
|
|
7
|
-
:formItem="field"
|
|
8
|
-
:parentField="parentField"
|
|
9
|
-
>
|
|
10
|
-
<el-switch
|
|
11
|
-
:fid="field.fieldName"
|
|
12
|
-
:disabled="checkIsDisabled(props)"
|
|
13
|
-
v-bind="field.preps"
|
|
14
|
-
v-on="getDynamicEvents(props, itemAction)"
|
|
15
|
-
v-model="formData[field.fieldName]"
|
|
16
|
-
/>
|
|
17
|
-
</starhorse-form-item>
|
|
18
|
-
</template>
|
|
19
|
-
<script setup lang="ts">
|
|
20
|
-
import { onMounted, PropType } from "vue";
|
|
21
|
-
import {
|
|
22
|
-
allAction,
|
|
23
|
-
checkIsDisabled,
|
|
24
|
-
initCompCallEvent,
|
|
25
|
-
} from "@/components/formcomp/utils/ItemRelationEventUtils";
|
|
26
|
-
import { getDynamicEvents } from "@/api/system";
|
|
27
|
-
|
|
28
|
-
const props = defineProps({
|
|
29
|
-
isDesign: {
|
|
30
|
-
type: Boolean,
|
|
31
|
-
default: false,
|
|
32
|
-
},
|
|
33
|
-
disabled: {
|
|
34
|
-
type: Boolean,
|
|
35
|
-
default: false,
|
|
36
|
-
},
|
|
37
|
-
showFormItem: {
|
|
38
|
-
type: Boolean,
|
|
39
|
-
default: false,
|
|
40
|
-
},
|
|
41
|
-
bareFlag: {
|
|
42
|
-
type: Boolean,
|
|
43
|
-
default: false,
|
|
44
|
-
},
|
|
45
|
-
isSearch: {
|
|
46
|
-
type: Boolean,
|
|
47
|
-
default: false,
|
|
48
|
-
},
|
|
49
|
-
field: {
|
|
50
|
-
type: Object as PropType<any>,
|
|
51
|
-
required: true,
|
|
52
|
-
},
|
|
53
|
-
parentField: {
|
|
54
|
-
type: Object as PropType<any>,
|
|
55
|
-
},
|
|
56
|
-
formInfo: {
|
|
57
|
-
type: Object as PropType<any>,
|
|
58
|
-
},
|
|
59
|
-
});
|
|
60
|
-
const emits = defineEmits(["selfFunc", "selectItem"]);
|
|
61
|
-
const formData = defineModel("formData");
|
|
62
|
-
const itemAction = (prep: any) => {
|
|
63
|
-
allAction(props, emits, formData, prep);
|
|
64
|
-
};
|
|
65
|
-
onMounted(() => {
|
|
66
|
-
if (!props.field.preps) {
|
|
67
|
-
props.field.preps = {};
|
|
68
|
-
}
|
|
69
|
-
props.field.preps["activeText"] = props.field.preps["activeText"] ?? "是";
|
|
70
|
-
props.field.preps["inactiveText"] = props.field.preps["inactiveText"] ?? "否";
|
|
71
|
-
props.field.preps["activeValue"] = props.field.preps["activeValue"] ?? true;
|
|
72
|
-
props.field.preps["inactiveValue"] =
|
|
73
|
-
props.field.preps["inactiveValue"] ?? false;
|
|
74
|
-
initCompCallEvent(props, emits, formData);
|
|
75
|
-
});
|
|
76
|
-
</script>
|
|
77
|
-
<style scoped></style>
|
|
@@ -1,77 +0,0 @@
|
|
|
1
|
-
<script setup lang="ts">
|
|
2
|
-
import { PropType } from "vue";
|
|
3
|
-
import { allAction } from "@/components/formcomp/utils/ItemRelationEventUtils";
|
|
4
|
-
|
|
5
|
-
const props = defineProps({
|
|
6
|
-
isDesign: {
|
|
7
|
-
type: Boolean,
|
|
8
|
-
default: false,
|
|
9
|
-
},
|
|
10
|
-
disabled: {
|
|
11
|
-
type: Boolean,
|
|
12
|
-
default: false,
|
|
13
|
-
},
|
|
14
|
-
showFormItem: {
|
|
15
|
-
type: Boolean,
|
|
16
|
-
default: false,
|
|
17
|
-
},
|
|
18
|
-
bareFlag: {
|
|
19
|
-
type: Boolean,
|
|
20
|
-
default: false,
|
|
21
|
-
},
|
|
22
|
-
isSearch: {
|
|
23
|
-
type: Boolean,
|
|
24
|
-
default: false,
|
|
25
|
-
},
|
|
26
|
-
field: {
|
|
27
|
-
type: Object as PropType<any>,
|
|
28
|
-
required: true,
|
|
29
|
-
},
|
|
30
|
-
parentField: {
|
|
31
|
-
type: Object as PropType<any>,
|
|
32
|
-
},
|
|
33
|
-
formInfo: {
|
|
34
|
-
type: Object as PropType<any>,
|
|
35
|
-
},
|
|
36
|
-
callBack: {
|
|
37
|
-
type: Function,
|
|
38
|
-
},
|
|
39
|
-
});
|
|
40
|
-
const emits = defineEmits(["selfFunc", "selectItem"]);
|
|
41
|
-
const formData = defineModel("formData");
|
|
42
|
-
const itemAction = (prep: any) => {
|
|
43
|
-
allAction(props, emits, formData, prep);
|
|
44
|
-
};
|
|
45
|
-
const tagType = (val: any) => {
|
|
46
|
-
let tagMap = props.field?.preps?.tagMap;
|
|
47
|
-
if (tagMap && Object.keys(tagMap).length > 0) {
|
|
48
|
-
return tagMap[val] || "primary";
|
|
49
|
-
}
|
|
50
|
-
return props.field?.preps?.tagType || "primary";
|
|
51
|
-
};
|
|
52
|
-
</script>
|
|
53
|
-
<template>
|
|
54
|
-
<starhorse-form-item
|
|
55
|
-
:showFormItem="showFormItem"
|
|
56
|
-
:isDesign="isDesign"
|
|
57
|
-
:disabled="disabled"
|
|
58
|
-
:bareFlag="bareFlag"
|
|
59
|
-
:formItem="field"
|
|
60
|
-
:parentField="parentField"
|
|
61
|
-
>
|
|
62
|
-
<el-tag
|
|
63
|
-
v-bind="field.preps"
|
|
64
|
-
:type="tagType(formData[field.fieldName])"
|
|
65
|
-
@click="itemAction('click')"
|
|
66
|
-
class="relative"
|
|
67
|
-
>
|
|
68
|
-
{{
|
|
69
|
-
(callBack && callBack()) ||
|
|
70
|
-
formData[field.fieldName] ||
|
|
71
|
-
field.preps?.placeholder ||
|
|
72
|
-
"请赋值" + field.label
|
|
73
|
-
}}
|
|
74
|
-
</el-tag>
|
|
75
|
-
</starhorse-form-item>
|
|
76
|
-
</template>
|
|
77
|
-
<style lang="scss" scoped></style>
|
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
<script setup lang="ts">
|
|
2
|
-
import { PropType } from "vue";
|
|
3
|
-
import { allAction } from "@/components/formcomp/utils/ItemRelationEventUtils";
|
|
4
|
-
|
|
5
|
-
const props = defineProps({
|
|
6
|
-
isDesign: {
|
|
7
|
-
type: Boolean,
|
|
8
|
-
default: false,
|
|
9
|
-
},
|
|
10
|
-
disabled: {
|
|
11
|
-
type: Boolean,
|
|
12
|
-
default: false,
|
|
13
|
-
},
|
|
14
|
-
showFormItem: {
|
|
15
|
-
type: Boolean,
|
|
16
|
-
default: false,
|
|
17
|
-
},
|
|
18
|
-
bareFlag: {
|
|
19
|
-
type: Boolean,
|
|
20
|
-
default: false,
|
|
21
|
-
},
|
|
22
|
-
isSearch: {
|
|
23
|
-
type: Boolean,
|
|
24
|
-
default: false,
|
|
25
|
-
},
|
|
26
|
-
field: {
|
|
27
|
-
type: Object as PropType<any>,
|
|
28
|
-
required: true,
|
|
29
|
-
},
|
|
30
|
-
parentField: {
|
|
31
|
-
type: Object as PropType<any>,
|
|
32
|
-
},
|
|
33
|
-
formInfo: {
|
|
34
|
-
type: Object as PropType<any>,
|
|
35
|
-
},
|
|
36
|
-
});
|
|
37
|
-
const emits = defineEmits(["selfFunc", "selectItem"]);
|
|
38
|
-
const formData = defineModel<any>("formData");
|
|
39
|
-
const itemAction = (prep: any) => {
|
|
40
|
-
allAction(props, emits, formData, prep);
|
|
41
|
-
};
|
|
42
|
-
</script>
|
|
43
|
-
<template>
|
|
44
|
-
<starhorse-form-item
|
|
45
|
-
:showFormItem="showFormItem"
|
|
46
|
-
:isDesign="isDesign"
|
|
47
|
-
:disabled="disabled"
|
|
48
|
-
:bareFlag="bareFlag"
|
|
49
|
-
:formItem="field"
|
|
50
|
-
:parentField="parentField"
|
|
51
|
-
>
|
|
52
|
-
<div class="h-full w-full" @click="itemAction('click')">
|
|
53
|
-
<div
|
|
54
|
-
class="flex"
|
|
55
|
-
:style="{
|
|
56
|
-
verticalAlign: field.preps?.verticalAlign ?? 'middle',
|
|
57
|
-
justifyContent: field.preps?.justifyContent ?? 'left',
|
|
58
|
-
alignItems: field.preps?.alignItems ?? 'left',
|
|
59
|
-
wordBreak: field.preps?.wordBreak ?? 'normal',
|
|
60
|
-
width: field.preps?.width ?? '100%',
|
|
61
|
-
height: field.preps?.height ?? '100%',
|
|
62
|
-
fontWeight: field.preps?.fontWeight ?? '600',
|
|
63
|
-
color: field.preps?.color ?? 'inherit',
|
|
64
|
-
backgroundColor: field.preps?.backgroundColor ?? 'none',
|
|
65
|
-
borderRadius: field.preps?.fontWeight ?? 'none',
|
|
66
|
-
border: field.preps?.border ?? 'none',
|
|
67
|
-
margin: ' 0 5px',
|
|
68
|
-
}"
|
|
69
|
-
>
|
|
70
|
-
{{ field.preps?.textContent || field.preps?.placeholder }}
|
|
71
|
-
</div>
|
|
72
|
-
</div>
|
|
73
|
-
</starhorse-form-item>
|
|
74
|
-
</template>
|
|
75
|
-
<style lang="scss" scoped></style>
|
|
@@ -1,85 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<EditDataDialog
|
|
3
|
-
v-model="editorDialogVisible"
|
|
4
|
-
:disabled="checkIsDisabled(props)"
|
|
5
|
-
:initial-content="formData[field.fieldName]"
|
|
6
|
-
@confirm="handleContentConfirm"
|
|
7
|
-
/>
|
|
8
|
-
<starhorse-form-item
|
|
9
|
-
:showFormItem="showFormItem"
|
|
10
|
-
:isDesign="isDesign"
|
|
11
|
-
:disabled="disabled"
|
|
12
|
-
:bareFlag="bareFlag"
|
|
13
|
-
:formItem="field"
|
|
14
|
-
:parentField="parentField"
|
|
15
|
-
>
|
|
16
|
-
<el-input
|
|
17
|
-
@dblclick="maxEdit"
|
|
18
|
-
:disabled="checkIsDisabled(props)"
|
|
19
|
-
:fid="field.fieldName"
|
|
20
|
-
v-bind="field.preps"
|
|
21
|
-
type="textarea"
|
|
22
|
-
v-on="getDynamicEvents(props, itemAction)"
|
|
23
|
-
v-model="formData[field.fieldName]"
|
|
24
|
-
/>
|
|
25
|
-
</starhorse-form-item>
|
|
26
|
-
</template>
|
|
27
|
-
<script setup lang="ts">
|
|
28
|
-
import { onMounted, PropType, shallowRef } from "vue";
|
|
29
|
-
import {
|
|
30
|
-
allAction,
|
|
31
|
-
checkIsDisabled,
|
|
32
|
-
initCompCallEvent,
|
|
33
|
-
} from "@/components/formcomp/utils/ItemRelationEventUtils";
|
|
34
|
-
import EditDataDialog from "@/components/formcomp/utils/EditDataDialog.vue";
|
|
35
|
-
import { getDynamicEvents } from "@/api/system";
|
|
36
|
-
|
|
37
|
-
const props = defineProps({
|
|
38
|
-
isDesign: {
|
|
39
|
-
type: Boolean,
|
|
40
|
-
default: false,
|
|
41
|
-
},
|
|
42
|
-
disabled: {
|
|
43
|
-
type: Boolean,
|
|
44
|
-
default: false,
|
|
45
|
-
},
|
|
46
|
-
showFormItem: {
|
|
47
|
-
type: Boolean,
|
|
48
|
-
default: false,
|
|
49
|
-
},
|
|
50
|
-
bareFlag: {
|
|
51
|
-
type: Boolean,
|
|
52
|
-
default: false,
|
|
53
|
-
},
|
|
54
|
-
isSearch: {
|
|
55
|
-
type: Boolean,
|
|
56
|
-
default: false,
|
|
57
|
-
},
|
|
58
|
-
field: {
|
|
59
|
-
type: Object as PropType<any>,
|
|
60
|
-
required: true,
|
|
61
|
-
},
|
|
62
|
-
parentField: {
|
|
63
|
-
type: Object as PropType<any>,
|
|
64
|
-
},
|
|
65
|
-
formInfo: {
|
|
66
|
-
type: Object as PropType<any>,
|
|
67
|
-
},
|
|
68
|
-
});
|
|
69
|
-
const emits = defineEmits(["selfFunc", "selectItem"]);
|
|
70
|
-
const formData = defineModel("formData");
|
|
71
|
-
const editorDialogVisible = shallowRef(false);
|
|
72
|
-
const itemAction = (prep: any) => {
|
|
73
|
-
allAction(props, emits, formData, prep);
|
|
74
|
-
};
|
|
75
|
-
const maxEdit = () => {
|
|
76
|
-
editorDialogVisible.value = true;
|
|
77
|
-
};
|
|
78
|
-
const handleContentConfirm = (newContent: string) => {
|
|
79
|
-
formData.value[props.field.fieldName] = newContent;
|
|
80
|
-
};
|
|
81
|
-
onMounted(() => {
|
|
82
|
-
initCompCallEvent(props, emits, formData);
|
|
83
|
-
});
|
|
84
|
-
</script>
|
|
85
|
-
<style scoped></style>
|