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,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-time-select
|
|
11
|
-
:fid="field.fieldName"
|
|
12
|
-
:disabled="checkIsDisabled(props)"
|
|
13
|
-
:start="field.preps?.start || '00:00'"
|
|
14
|
-
:end="field.preps?.end || '24:00'"
|
|
15
|
-
:step="field.preps?.step || '00:05'"
|
|
16
|
-
v-bind="field.preps"
|
|
17
|
-
v-on="getDynamicEvents(props, itemAction)"
|
|
18
|
-
v-model="formData[field.fieldName]"
|
|
19
|
-
/>
|
|
20
|
-
</starhorse-form-item>
|
|
21
|
-
</template>
|
|
22
|
-
<script setup lang="ts">
|
|
23
|
-
import { onMounted, PropType } from "vue";
|
|
24
|
-
import {
|
|
25
|
-
allAction,
|
|
26
|
-
checkIsDisabled,
|
|
27
|
-
initCompCallEvent,
|
|
28
|
-
} from "@/components/formcomp/utils/ItemRelationEventUtils";
|
|
29
|
-
import { getDynamicEvents } from "@/api/system";
|
|
30
|
-
|
|
31
|
-
const props = defineProps({
|
|
32
|
-
isDesign: {
|
|
33
|
-
type: Boolean,
|
|
34
|
-
default: false,
|
|
35
|
-
},
|
|
36
|
-
disabled: {
|
|
37
|
-
type: Boolean,
|
|
38
|
-
default: false,
|
|
39
|
-
},
|
|
40
|
-
showFormItem: {
|
|
41
|
-
type: Boolean,
|
|
42
|
-
default: false,
|
|
43
|
-
},
|
|
44
|
-
bareFlag: {
|
|
45
|
-
type: Boolean,
|
|
46
|
-
default: false,
|
|
47
|
-
},
|
|
48
|
-
isSearch: {
|
|
49
|
-
type: Boolean,
|
|
50
|
-
default: false,
|
|
51
|
-
},
|
|
52
|
-
field: {
|
|
53
|
-
type: Object as PropType<any>,
|
|
54
|
-
required: true,
|
|
55
|
-
},
|
|
56
|
-
parentField: {
|
|
57
|
-
type: Object as PropType<any>,
|
|
58
|
-
},
|
|
59
|
-
formInfo: {
|
|
60
|
-
type: Object as PropType<any>,
|
|
61
|
-
},
|
|
62
|
-
});
|
|
63
|
-
const emits = defineEmits(["selfFunc", "selectItem"]);
|
|
64
|
-
const formData = defineModel("formData");
|
|
65
|
-
const itemAction = (prep: string) => {
|
|
66
|
-
allAction(props, emits, formData, prep);
|
|
67
|
-
};
|
|
68
|
-
onMounted(() => {
|
|
69
|
-
initCompCallEvent(props, emits, formData);
|
|
70
|
-
});
|
|
71
|
-
</script>
|
|
72
|
-
<style lang="scss" scoped>
|
|
73
|
-
.el-time-picker,
|
|
74
|
-
.el-date-editor {
|
|
75
|
-
width: unset;
|
|
76
|
-
}
|
|
77
|
-
</style>
|
|
@@ -1,74 +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-time-picker
|
|
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: string) => {
|
|
63
|
-
allAction(props, emits, formData, prep);
|
|
64
|
-
};
|
|
65
|
-
onMounted(() => {
|
|
66
|
-
initCompCallEvent(props, emits, formData);
|
|
67
|
-
});
|
|
68
|
-
</script>
|
|
69
|
-
<style lang="scss" scoped>
|
|
70
|
-
.el-time-picker,
|
|
71
|
-
.el-date-editor {
|
|
72
|
-
width: unset;
|
|
73
|
-
}
|
|
74
|
-
</style>
|
|
@@ -1,93 +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-transfer
|
|
11
|
-
:fid="field?.preps['name']"
|
|
12
|
-
v-bind="field.preps"
|
|
13
|
-
v-on="getDynamicEvents(props, itemAction)"
|
|
14
|
-
v-model="formData[field.fieldName]"
|
|
15
|
-
/>
|
|
16
|
-
</starhorse-form-item>
|
|
17
|
-
</template>
|
|
18
|
-
<script setup lang="ts">
|
|
19
|
-
import { onMounted, PropType, shallowRef, watch } from "vue";
|
|
20
|
-
import { compDynamicData } from "@/api/star_horse_utils";
|
|
21
|
-
import { SelectOption } from "@/components/types/SearchProps";
|
|
22
|
-
import {
|
|
23
|
-
allAction,
|
|
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
|
-
let bakeData = shallowRef<SelectOption[]>([]);
|
|
63
|
-
const itemAction = (prep: string) => {
|
|
64
|
-
allAction(props, emits, formData, prep);
|
|
65
|
-
};
|
|
66
|
-
const initData = async () => {
|
|
67
|
-
const dataa = await compDynamicData(props.field);
|
|
68
|
-
if (dataa?.length) {
|
|
69
|
-
props.field.preps["data"] = dataa;
|
|
70
|
-
}
|
|
71
|
-
bakeData.value = JSON.parse(JSON.stringify(props.field?.preps["data"] ?? []));
|
|
72
|
-
};
|
|
73
|
-
|
|
74
|
-
onMounted(() => {
|
|
75
|
-
if (!props.field.preps) {
|
|
76
|
-
props.field.preps = {};
|
|
77
|
-
}
|
|
78
|
-
initData();
|
|
79
|
-
initCompCallEvent(props, emits, formData);
|
|
80
|
-
});
|
|
81
|
-
watch(
|
|
82
|
-
() => formData.value[props.field.fieldName + "OptionList"],
|
|
83
|
-
(val) => {
|
|
84
|
-
if (val?.length > 0) {
|
|
85
|
-
props.field.preps["data"] = val;
|
|
86
|
-
}
|
|
87
|
-
},
|
|
88
|
-
{
|
|
89
|
-
immediate: true,
|
|
90
|
-
},
|
|
91
|
-
);
|
|
92
|
-
</script>
|
|
93
|
-
<style scoped></style>
|
|
@@ -1,121 +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-tree-select
|
|
11
|
-
:fid="field.fieldName"
|
|
12
|
-
:disabled="checkIsDisabled(props)"
|
|
13
|
-
:default-expand-all="true"
|
|
14
|
-
v-bind="field.preps"
|
|
15
|
-
:filter-node-method="filterNodeMethod"
|
|
16
|
-
:render-content="renderContent"
|
|
17
|
-
v-on="getDynamicEvents(props, itemAction)"
|
|
18
|
-
v-model="formData[field.fieldName]"
|
|
19
|
-
>
|
|
20
|
-
</el-tree-select>
|
|
21
|
-
</starhorse-form-item>
|
|
22
|
-
</template>
|
|
23
|
-
<script setup lang="ts">
|
|
24
|
-
import { onMounted, PropType, watch } from "vue";
|
|
25
|
-
import { compDynamicData } from "@/api/star_horse_utils";
|
|
26
|
-
import {
|
|
27
|
-
allAction,
|
|
28
|
-
checkIsDisabled,
|
|
29
|
-
initCompCallEvent,
|
|
30
|
-
} from "@/components/formcomp/utils/ItemRelationEventUtils";
|
|
31
|
-
import { getDynamicEvents } from "@/api/system";
|
|
32
|
-
|
|
33
|
-
const props = defineProps({
|
|
34
|
-
isDesign: {
|
|
35
|
-
type: Boolean,
|
|
36
|
-
default: false,
|
|
37
|
-
},
|
|
38
|
-
disabled: {
|
|
39
|
-
type: Boolean,
|
|
40
|
-
default: false,
|
|
41
|
-
},
|
|
42
|
-
showFormItem: {
|
|
43
|
-
type: Boolean,
|
|
44
|
-
default: false,
|
|
45
|
-
},
|
|
46
|
-
bareFlag: {
|
|
47
|
-
type: Boolean,
|
|
48
|
-
default: false,
|
|
49
|
-
},
|
|
50
|
-
isSearch: {
|
|
51
|
-
type: Boolean,
|
|
52
|
-
default: false,
|
|
53
|
-
},
|
|
54
|
-
field: {
|
|
55
|
-
type: Object as PropType<any>,
|
|
56
|
-
required: true,
|
|
57
|
-
},
|
|
58
|
-
parentField: {
|
|
59
|
-
type: Object as PropType<any>,
|
|
60
|
-
},
|
|
61
|
-
formInfo: {
|
|
62
|
-
type: Object as PropType<any>,
|
|
63
|
-
},
|
|
64
|
-
});
|
|
65
|
-
const emits = defineEmits(["selfFunc", "selectItem"]);
|
|
66
|
-
const formData = defineModel("formData");
|
|
67
|
-
const itemAction = (prep: any) => {
|
|
68
|
-
allAction(props, emits, formData, prep);
|
|
69
|
-
};
|
|
70
|
-
const filterNodeMethod = (value: any, data: any) => {
|
|
71
|
-
let name: any = props.field.preps["props"]?.label || "label";
|
|
72
|
-
return data[name].includes(value);
|
|
73
|
-
};
|
|
74
|
-
const renderContent = (_h: Function, data: any) => {
|
|
75
|
-
let labelName = props.field.preps.props?.label || "label";
|
|
76
|
-
if (props.field.preps["showCode"]) {
|
|
77
|
-
let codeName =
|
|
78
|
-
props.field.preps.props?.code ||
|
|
79
|
-
props.field.preps.props?.value ||
|
|
80
|
-
"value";
|
|
81
|
-
return `${data.data[labelName]}(${data.data["code"] || data.data[codeName] || ""})`;
|
|
82
|
-
}
|
|
83
|
-
return data.data[labelName];
|
|
84
|
-
};
|
|
85
|
-
/**
|
|
86
|
-
* 动态获取数据
|
|
87
|
-
*/
|
|
88
|
-
const initData = async () => {
|
|
89
|
-
const dataa = await compDynamicData(props.field);
|
|
90
|
-
if (dataa?.length) {
|
|
91
|
-
props.field.preps["data"] = dataa;
|
|
92
|
-
}
|
|
93
|
-
};
|
|
94
|
-
onMounted(() => {
|
|
95
|
-
if (!props.field.preps) {
|
|
96
|
-
props.field.preps = {};
|
|
97
|
-
}
|
|
98
|
-
props.field.preps["remote"] =
|
|
99
|
-
props.field.preps["remote"] || props.field.preps["dataSource"] == "url";
|
|
100
|
-
props.field.preps["filterable"] = true;
|
|
101
|
-
props.field.preps["collapseTags"] = true;
|
|
102
|
-
props.field.preps["props"] = props.field.preps["props"] || {
|
|
103
|
-
label: "name",
|
|
104
|
-
value: "value",
|
|
105
|
-
};
|
|
106
|
-
initData();
|
|
107
|
-
initCompCallEvent(props, emits, formData);
|
|
108
|
-
});
|
|
109
|
-
watch(
|
|
110
|
-
() => formData.value[props.field.fieldName + "OptionList"],
|
|
111
|
-
(val) => {
|
|
112
|
-
if (val?.length > 0) {
|
|
113
|
-
props.field.preps["data"] = val;
|
|
114
|
-
}
|
|
115
|
-
},
|
|
116
|
-
{
|
|
117
|
-
immediate: true,
|
|
118
|
-
},
|
|
119
|
-
);
|
|
120
|
-
</script>
|
|
121
|
-
<style scoped></style>
|
|
@@ -1,51 +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
|
-
未知组件。。。。。。。。。。。。。。。
|
|
11
|
-
</starhorse-form-item>
|
|
12
|
-
</template>
|
|
13
|
-
<script setup lang="ts">
|
|
14
|
-
import { PropType } from "vue";
|
|
15
|
-
|
|
16
|
-
defineProps({
|
|
17
|
-
isDesign: {
|
|
18
|
-
type: Boolean,
|
|
19
|
-
default: false,
|
|
20
|
-
},
|
|
21
|
-
disabled: {
|
|
22
|
-
type: Boolean,
|
|
23
|
-
default: false,
|
|
24
|
-
},
|
|
25
|
-
showFormItem: {
|
|
26
|
-
type: Boolean,
|
|
27
|
-
default: false,
|
|
28
|
-
},
|
|
29
|
-
bareFlag: {
|
|
30
|
-
type: Boolean,
|
|
31
|
-
default: false,
|
|
32
|
-
},
|
|
33
|
-
isSearch: {
|
|
34
|
-
type: Boolean,
|
|
35
|
-
default: false,
|
|
36
|
-
},
|
|
37
|
-
field: {
|
|
38
|
-
type: Object as PropType<any>,
|
|
39
|
-
required: true,
|
|
40
|
-
},
|
|
41
|
-
parentField: {
|
|
42
|
-
type: Object as PropType<any>,
|
|
43
|
-
},
|
|
44
|
-
formInfo: {
|
|
45
|
-
type: Object as PropType<any>,
|
|
46
|
-
},
|
|
47
|
-
});
|
|
48
|
-
const emits = defineEmits(["selfFunc", "selectItem"]);
|
|
49
|
-
// const formData = defineModel("formData");
|
|
50
|
-
</script>
|
|
51
|
-
<style scoped></style>
|
|
@@ -1,189 +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-upload
|
|
11
|
-
:fid="field.fieldName"
|
|
12
|
-
:disabled="checkIsDisabled(props)"
|
|
13
|
-
:headers="headers"
|
|
14
|
-
v-bind="field.preps"
|
|
15
|
-
:on-change="
|
|
16
|
-
(uploadFile: any, uploadFiles: any) =>
|
|
17
|
-
selfAction('change', uploadFile, uploadFiles)
|
|
18
|
-
"
|
|
19
|
-
:on-error="
|
|
20
|
-
(error: any, uploadFile: any, uploadFiles: any) =>
|
|
21
|
-
selfAction('error', uploadFile, uploadFiles, error)
|
|
22
|
-
"
|
|
23
|
-
:on-exceed="
|
|
24
|
-
(files: any, uploadFiles: any) =>
|
|
25
|
-
selfAction('exceed', files, uploadFiles)
|
|
26
|
-
"
|
|
27
|
-
:on-preview="(uploadFile: any) => selfAction('preview', uploadFile)"
|
|
28
|
-
:on-progress="
|
|
29
|
-
(evt: any, uploadFile: any, uploadFiles: any) =>
|
|
30
|
-
selfAction('progress', uploadFile, uploadFiles, evt)
|
|
31
|
-
"
|
|
32
|
-
:on-remove="
|
|
33
|
-
(uploadFile: any, uploadFiles: any) =>
|
|
34
|
-
selfAction('remove', uploadFile, uploadFiles)
|
|
35
|
-
"
|
|
36
|
-
:on-success="
|
|
37
|
-
(response: any, uploadFile: any, uploadFiles: any) =>
|
|
38
|
-
selfAction('success', uploadFile, uploadFiles, response)
|
|
39
|
-
"
|
|
40
|
-
style="
|
|
41
|
-
width: 100% !important;
|
|
42
|
-
display: flex;
|
|
43
|
-
align-items: center;
|
|
44
|
-
position: relative;
|
|
45
|
-
"
|
|
46
|
-
v-model:file-list="dataField"
|
|
47
|
-
>
|
|
48
|
-
<el-icon class="el-icon--upload" v-if="field.preps['drag']">
|
|
49
|
-
<upload-filled />
|
|
50
|
-
</el-icon>
|
|
51
|
-
<div class="el-upload__text" v-if="field.preps['drag']">
|
|
52
|
-
将文件拖到此处 或 <em>点击上传</em>
|
|
53
|
-
</div>
|
|
54
|
-
<template #tip v-if="field.preps['maxSize']">
|
|
55
|
-
<div class="el-upload__tip">
|
|
56
|
-
文件大小不能超过{{ field.preps["maxSize"] }}
|
|
57
|
-
</div>
|
|
58
|
-
</template>
|
|
59
|
-
<star-horse-icon
|
|
60
|
-
v-if="!field.preps['drag']"
|
|
61
|
-
icon-class="plus"
|
|
62
|
-
color="var(--star-horse-style)"
|
|
63
|
-
/>
|
|
64
|
-
</el-upload>
|
|
65
|
-
</starhorse-form-item>
|
|
66
|
-
</template>
|
|
67
|
-
<script setup lang="ts">
|
|
68
|
-
import { nextTick, onMounted, PropType, ref, shallowRef, watch } from "vue";
|
|
69
|
-
import { getToken } from "@/utils/auth";
|
|
70
|
-
import { checkIsDisabled } from "@/components/formcomp/utils/ItemRelationEventUtils";
|
|
71
|
-
|
|
72
|
-
const props = defineProps({
|
|
73
|
-
isDesign: {
|
|
74
|
-
type: Boolean,
|
|
75
|
-
default: false,
|
|
76
|
-
},
|
|
77
|
-
disabled: {
|
|
78
|
-
type: Boolean,
|
|
79
|
-
default: false,
|
|
80
|
-
},
|
|
81
|
-
showFormItem: {
|
|
82
|
-
type: Boolean,
|
|
83
|
-
default: false,
|
|
84
|
-
},
|
|
85
|
-
bareFlag: {
|
|
86
|
-
type: Boolean,
|
|
87
|
-
default: false,
|
|
88
|
-
},
|
|
89
|
-
isSearch: {
|
|
90
|
-
type: Boolean,
|
|
91
|
-
default: false,
|
|
92
|
-
},
|
|
93
|
-
field: {
|
|
94
|
-
type: Object as PropType<any>,
|
|
95
|
-
default: {},
|
|
96
|
-
},
|
|
97
|
-
formFieldList: {
|
|
98
|
-
type: Object,
|
|
99
|
-
default: {},
|
|
100
|
-
},
|
|
101
|
-
parentField: {
|
|
102
|
-
type: Object,
|
|
103
|
-
default: {},
|
|
104
|
-
},
|
|
105
|
-
formInfo: {
|
|
106
|
-
type: Object,
|
|
107
|
-
default: {},
|
|
108
|
-
},
|
|
109
|
-
});
|
|
110
|
-
const emits = defineEmits(["selfFunc", "selectItem"]);
|
|
111
|
-
const formData = defineModel("formData");
|
|
112
|
-
let dataField = shallowRef([]);
|
|
113
|
-
let headers = ref<any>({});
|
|
114
|
-
const selfAction = (
|
|
115
|
-
prep: any,
|
|
116
|
-
uploadFile: any,
|
|
117
|
-
uploadFiles: any = [],
|
|
118
|
-
param: any = {},
|
|
119
|
-
) => {
|
|
120
|
-
if (prep == "success") {
|
|
121
|
-
let result = param.data;
|
|
122
|
-
formData.value[props.field.fieldName] = result.path;
|
|
123
|
-
//默认将上传成功的属性存入数据对象
|
|
124
|
-
Object.entries(result).forEach(([key, value]) => {
|
|
125
|
-
formData.value[key] = value;
|
|
126
|
-
});
|
|
127
|
-
}
|
|
128
|
-
console.log(prep, uploadFile, uploadFiles, param);
|
|
129
|
-
emits("selfFunc", prep, uploadFile, uploadFiles, param);
|
|
130
|
-
};
|
|
131
|
-
onMounted(async () => {
|
|
132
|
-
if (!props.field.preps) {
|
|
133
|
-
props.field.preps = {};
|
|
134
|
-
}
|
|
135
|
-
props.field.preps["action"] =
|
|
136
|
-
props.field.preps["action"] || "/system-config/annex/upload/commonFiles";
|
|
137
|
-
await nextTick();
|
|
138
|
-
let datas = formData.value[props.field.fieldName];
|
|
139
|
-
if (datas) {
|
|
140
|
-
dataField.value.push({
|
|
141
|
-
url: (props.field.preps["context"] || "/system-config") + datas,
|
|
142
|
-
});
|
|
143
|
-
}
|
|
144
|
-
let temp = props.field.preps?.headers;
|
|
145
|
-
if (temp && Object.keys(temp).length > 0) {
|
|
146
|
-
headers.value = temp;
|
|
147
|
-
}
|
|
148
|
-
headers.value["token"] = getToken();
|
|
149
|
-
});
|
|
150
|
-
watch(
|
|
151
|
-
() => props.formFieldList,
|
|
152
|
-
(val: any) => {
|
|
153
|
-
if (val && Object.keys(val).includes(props.field.fieldName)) {
|
|
154
|
-
dataField.value = [
|
|
155
|
-
{
|
|
156
|
-
url:
|
|
157
|
-
(props.field.preps["context"] || "/system-config") +
|
|
158
|
-
val[props.field.fieldName],
|
|
159
|
-
},
|
|
160
|
-
];
|
|
161
|
-
}
|
|
162
|
-
},
|
|
163
|
-
{ immediate: true, deep: true },
|
|
164
|
-
);
|
|
165
|
-
</script>
|
|
166
|
-
<style lang="scss" scoped>
|
|
167
|
-
:deep(.el-upload) {
|
|
168
|
-
width: 100% !important;
|
|
169
|
-
}
|
|
170
|
-
|
|
171
|
-
:deep(.el-upload--text) {
|
|
172
|
-
justify-content: left !important;
|
|
173
|
-
}
|
|
174
|
-
|
|
175
|
-
:deep(.el-upload-list--picture-card) {
|
|
176
|
-
width: 100% !important;
|
|
177
|
-
|
|
178
|
-
.is-drag {
|
|
179
|
-
height: 100% !important;
|
|
180
|
-
width: 100% !important;
|
|
181
|
-
}
|
|
182
|
-
}
|
|
183
|
-
|
|
184
|
-
:deep(.el-upload-list) {
|
|
185
|
-
position: absolute;
|
|
186
|
-
top: 0;
|
|
187
|
-
right: 0;
|
|
188
|
-
}
|
|
189
|
-
</style>
|