star-horse-lowcode 2.7.65 → 2.7.67
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 +3 -0
- package/dist/assets/index.css +1 -1
- package/dist/index.es.js +597 -188
- package/dist/types/index.d.ts +30 -0
- package/package.json +3 -3
- 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,113 +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-cascader
|
|
11
|
-
:fid="field.fieldName"
|
|
12
|
-
v-bind="field.preps"
|
|
13
|
-
:disabled="checkIsDisabled(props)"
|
|
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 { nextTick, onMounted, PropType, watch } from "vue";
|
|
21
|
-
import { compDynamicData, isJson } from "@/api/star_horse_utils";
|
|
22
|
-
import {
|
|
23
|
-
allAction,
|
|
24
|
-
checkIsDisabled,
|
|
25
|
-
initCompCallEvent,
|
|
26
|
-
} from "@/components/formcomp/utils/ItemRelationEventUtils";
|
|
27
|
-
import { getDynamicEvents } from "@/api/system";
|
|
28
|
-
|
|
29
|
-
const props = defineProps({
|
|
30
|
-
isDesign: {
|
|
31
|
-
type: Boolean,
|
|
32
|
-
default: false,
|
|
33
|
-
},
|
|
34
|
-
disabled: {
|
|
35
|
-
type: Boolean,
|
|
36
|
-
default: false,
|
|
37
|
-
},
|
|
38
|
-
showFormItem: {
|
|
39
|
-
type: Boolean,
|
|
40
|
-
default: false,
|
|
41
|
-
},
|
|
42
|
-
bareFlag: {
|
|
43
|
-
type: Boolean,
|
|
44
|
-
default: false,
|
|
45
|
-
},
|
|
46
|
-
isSearch: {
|
|
47
|
-
type: Boolean,
|
|
48
|
-
default: false,
|
|
49
|
-
},
|
|
50
|
-
field: {
|
|
51
|
-
type: Object as PropType<any>,
|
|
52
|
-
required: true,
|
|
53
|
-
},
|
|
54
|
-
parentField: {
|
|
55
|
-
type: Object as PropType<any>,
|
|
56
|
-
},
|
|
57
|
-
formInfo: {
|
|
58
|
-
type: Object as PropType<any>,
|
|
59
|
-
},
|
|
60
|
-
});
|
|
61
|
-
const emits = defineEmits(["selfFunc", "selectItem"]);
|
|
62
|
-
const formData = defineModel("formData");
|
|
63
|
-
const itemAction = (prep: any) => {
|
|
64
|
-
allAction(props, emits, formData, prep);
|
|
65
|
-
};
|
|
66
|
-
const initData = async () => {
|
|
67
|
-
await nextTick();
|
|
68
|
-
const dataa = await compDynamicData(props.field);
|
|
69
|
-
if (dataa?.length) {
|
|
70
|
-
props.field.preps["options"] = dataa;
|
|
71
|
-
}
|
|
72
|
-
let data: any = formData.value[props.field.fieldName];
|
|
73
|
-
if (isJson(data)) {
|
|
74
|
-
formData.value[props.field.fieldName] = JSON.parse(data);
|
|
75
|
-
} else {
|
|
76
|
-
//解决加载慢问题,导致数据没法回显
|
|
77
|
-
setTimeout(() => {
|
|
78
|
-
let data: any = formData.value[props.field.fieldName];
|
|
79
|
-
formData.value[props.field.fieldName] = isJson(data)
|
|
80
|
-
? JSON.parse(data)
|
|
81
|
-
: [];
|
|
82
|
-
}, 200);
|
|
83
|
-
}
|
|
84
|
-
};
|
|
85
|
-
onMounted(() => {
|
|
86
|
-
if (!props.field.preps) {
|
|
87
|
-
props.field.preps = {};
|
|
88
|
-
}
|
|
89
|
-
props.field.preps["props"] = {
|
|
90
|
-
label: "name",
|
|
91
|
-
multiple: props.field?.multiple,
|
|
92
|
-
checkStrictly: true,
|
|
93
|
-
};
|
|
94
|
-
initData();
|
|
95
|
-
initCompCallEvent(props, emits, formData);
|
|
96
|
-
});
|
|
97
|
-
watch(
|
|
98
|
-
() => formData.value[props.field.fieldName + "OptionList"],
|
|
99
|
-
(val) => {
|
|
100
|
-
if (val?.length > 0) {
|
|
101
|
-
props.field.preps["options"] = val;
|
|
102
|
-
}
|
|
103
|
-
},
|
|
104
|
-
{
|
|
105
|
-
immediate: true,
|
|
106
|
-
},
|
|
107
|
-
);
|
|
108
|
-
</script>
|
|
109
|
-
<style lang="scss" scoped>
|
|
110
|
-
:deep(.el-cascader) {
|
|
111
|
-
width: 100%;
|
|
112
|
-
}
|
|
113
|
-
</style>
|
|
@@ -1,97 +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-checkbox-group
|
|
11
|
-
:fid="field.fieldName"
|
|
12
|
-
:disabled="checkIsDisabled(props)"
|
|
13
|
-
:readonly="field.preps?.readonly ?? false"
|
|
14
|
-
v-on="getDynamicEvents(props, itemAction)"
|
|
15
|
-
v-model="formData[field.fieldName]"
|
|
16
|
-
>
|
|
17
|
-
<el-checkbox
|
|
18
|
-
:border="item['border'] ?? true"
|
|
19
|
-
:checked="item['checked']"
|
|
20
|
-
:disabled="item['disabled'] ?? false"
|
|
21
|
-
:label="item[field.preps?.props?.label || 'name']"
|
|
22
|
-
:value="item[field.preps?.props?.value || 'value']"
|
|
23
|
-
v-for="item in field.preps?.values"
|
|
24
|
-
/>
|
|
25
|
-
</el-checkbox-group>
|
|
26
|
-
</starhorse-form-item>
|
|
27
|
-
</template>
|
|
28
|
-
<script setup lang="ts">
|
|
29
|
-
import { onMounted, PropType, watch } from "vue";
|
|
30
|
-
import {
|
|
31
|
-
allAction,
|
|
32
|
-
checkIsDisabled,
|
|
33
|
-
} from "@/components/formcomp/utils/ItemRelationEventUtils";
|
|
34
|
-
import { compDynamicData } from "@/api/star_horse_utils";
|
|
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 itemAction = () => {
|
|
72
|
-
allAction(props, emits, formData, "change");
|
|
73
|
-
};
|
|
74
|
-
const initData = async () => {
|
|
75
|
-
const dataa = await compDynamicData(props.field);
|
|
76
|
-
if (dataa?.length) {
|
|
77
|
-
props.field.preps["values"] = dataa;
|
|
78
|
-
}
|
|
79
|
-
};
|
|
80
|
-
onMounted(() => {
|
|
81
|
-
if (!props.field.preps) {
|
|
82
|
-
props.field.preps = {};
|
|
83
|
-
}
|
|
84
|
-
initData();
|
|
85
|
-
allAction(props, emits, formData, "change", true);
|
|
86
|
-
});
|
|
87
|
-
watch(
|
|
88
|
-
() => formData.value[props.field.fieldName + "OptionList"],
|
|
89
|
-
(val) => {
|
|
90
|
-
if (val?.length > 0) {
|
|
91
|
-
props.field.preps["values"] = val;
|
|
92
|
-
}
|
|
93
|
-
},
|
|
94
|
-
{ immediate: true },
|
|
95
|
-
);
|
|
96
|
-
</script>
|
|
97
|
-
<style scoped></style>
|
|
@@ -1,70 +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-color-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
|
-
|
|
63
|
-
const itemAction = (prep: any) => {
|
|
64
|
-
allAction(props, emits, formData, prep);
|
|
65
|
-
};
|
|
66
|
-
onMounted(() => {
|
|
67
|
-
initCompCallEvent(props, emits, formData);
|
|
68
|
-
});
|
|
69
|
-
</script>
|
|
70
|
-
<style scoped></style>
|
|
@@ -1,115 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<star-horse-dialog
|
|
3
|
-
:title="'Crontab 配置器'"
|
|
4
|
-
box-width="50%"
|
|
5
|
-
:self-func="true"
|
|
6
|
-
@resetForm="resetForm"
|
|
7
|
-
@closeAction="close"
|
|
8
|
-
@merge="submit"
|
|
9
|
-
:dialog-visible="cronVisible"
|
|
10
|
-
>
|
|
11
|
-
<el-scrollbar>
|
|
12
|
-
<Crontab ref="cronTabRef" v-model="cronDataValue" />
|
|
13
|
-
</el-scrollbar>
|
|
14
|
-
</star-horse-dialog>
|
|
15
|
-
<starhorse-form-item
|
|
16
|
-
:showFormItem="showFormItem"
|
|
17
|
-
:isDesign="isDesign"
|
|
18
|
-
:disabled="disabled"
|
|
19
|
-
:bareFlag="bareFlag"
|
|
20
|
-
:formItem="field"
|
|
21
|
-
:parentField="parentField"
|
|
22
|
-
>
|
|
23
|
-
<el-input
|
|
24
|
-
:fid="field.fieldName"
|
|
25
|
-
v-on="getDynamicEvents(props, itemAction)"
|
|
26
|
-
v-model="formData[field.fieldName]"
|
|
27
|
-
>
|
|
28
|
-
<template #append>
|
|
29
|
-
<el-button
|
|
30
|
-
icon="Clock"
|
|
31
|
-
@click="open"
|
|
32
|
-
:disabled="checkIsDisabled(props)"
|
|
33
|
-
/>
|
|
34
|
-
</template>
|
|
35
|
-
</el-input>
|
|
36
|
-
</starhorse-form-item>
|
|
37
|
-
</template>
|
|
38
|
-
<script setup lang="ts">
|
|
39
|
-
import { onMounted, PropType, ref } from "vue";
|
|
40
|
-
import Crontab from "@/components/cron/Crontab.vue";
|
|
41
|
-
import {
|
|
42
|
-
allAction,
|
|
43
|
-
checkIsDisabled,
|
|
44
|
-
initCompCallEvent,
|
|
45
|
-
} from "@/components/formcomp/utils/ItemRelationEventUtils";
|
|
46
|
-
import { getDynamicEvents } from "@/api/system";
|
|
47
|
-
|
|
48
|
-
const props = defineProps({
|
|
49
|
-
isDesign: {
|
|
50
|
-
type: Boolean,
|
|
51
|
-
default: false,
|
|
52
|
-
},
|
|
53
|
-
disabled: {
|
|
54
|
-
type: Boolean,
|
|
55
|
-
default: false,
|
|
56
|
-
},
|
|
57
|
-
showFormItem: {
|
|
58
|
-
type: Boolean,
|
|
59
|
-
default: false,
|
|
60
|
-
},
|
|
61
|
-
bareFlag: {
|
|
62
|
-
type: Boolean,
|
|
63
|
-
default: false,
|
|
64
|
-
},
|
|
65
|
-
isSearch: {
|
|
66
|
-
type: Boolean,
|
|
67
|
-
default: false,
|
|
68
|
-
},
|
|
69
|
-
field: {
|
|
70
|
-
type: Object as PropType<any>,
|
|
71
|
-
required: true,
|
|
72
|
-
},
|
|
73
|
-
parentField: {
|
|
74
|
-
type: Object as PropType<any>,
|
|
75
|
-
},
|
|
76
|
-
formInfo: {
|
|
77
|
-
type: Object as PropType<any>,
|
|
78
|
-
},
|
|
79
|
-
});
|
|
80
|
-
const emits = defineEmits(["selfFunc", "selectItem"]);
|
|
81
|
-
const formData = defineModel("formData");
|
|
82
|
-
|
|
83
|
-
let cronDataValue = ref<any>("");
|
|
84
|
-
let cronVisible = ref(false);
|
|
85
|
-
const cronTabRef = ref();
|
|
86
|
-
const itemAction = (prep: any) => {
|
|
87
|
-
allAction(props, emits, formData, prep);
|
|
88
|
-
};
|
|
89
|
-
const resetForm = () => {
|
|
90
|
-
// formData[field.fieldName] = defaultExpress;
|
|
91
|
-
if (cronTabRef.value) {
|
|
92
|
-
cronTabRef.value.clearCron();
|
|
93
|
-
}
|
|
94
|
-
};
|
|
95
|
-
const close = () => {
|
|
96
|
-
cronVisible.value = false;
|
|
97
|
-
};
|
|
98
|
-
const open = () => {
|
|
99
|
-
cronDataValue.value = formData.value[props.field.fieldName];
|
|
100
|
-
cronVisible.value = true;
|
|
101
|
-
};
|
|
102
|
-
const submit = () => {
|
|
103
|
-
formData.value[props.field.fieldName] = cronDataValue.value;
|
|
104
|
-
close();
|
|
105
|
-
};
|
|
106
|
-
resetForm();
|
|
107
|
-
onMounted(() => {
|
|
108
|
-
initCompCallEvent(props, emits, formData);
|
|
109
|
-
});
|
|
110
|
-
</script>
|
|
111
|
-
<style lang="scss" scoped>
|
|
112
|
-
:deep(.el-input-group__append) {
|
|
113
|
-
padding: 0 20px !important;
|
|
114
|
-
}
|
|
115
|
-
</style>
|
|
@@ -1,99 +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-date-picker
|
|
11
|
-
:fid="field.fieldName"
|
|
12
|
-
:disabled="checkIsDisabled(props)"
|
|
13
|
-
v-bind="field.preps"
|
|
14
|
-
:format="field.preps?.format || 'YYYY-MM-DD HH:mm:ss'"
|
|
15
|
-
:value-format="field.preps?.valueFormat"
|
|
16
|
-
date-format="YYYY-MM-DD"
|
|
17
|
-
time-format="HH:mm"
|
|
18
|
-
v-on="getDynamicEvents(props, itemAction)"
|
|
19
|
-
@change="itemAction('change')"
|
|
20
|
-
v-model="formData[field.fieldName]"
|
|
21
|
-
></el-date-picker>
|
|
22
|
-
</starhorse-form-item>
|
|
23
|
-
</template>
|
|
24
|
-
<script setup lang="ts">
|
|
25
|
-
import { onBeforeMount, onMounted, PropType, shallowRef } from "vue";
|
|
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 disabledDate = shallowRef<any>([]);
|
|
68
|
-
const itemAction = (prep: any) => {
|
|
69
|
-
if (prep == "change" && props.field.preps["type"]?.includes("range")) {
|
|
70
|
-
let val = formData.value[props.field.fieldName];
|
|
71
|
-
if (props.field.preps["needSplitName"]) {
|
|
72
|
-
formData.value[props.field.fieldName + "Start"] = val[0];
|
|
73
|
-
formData.value[props.field.fieldName + "End"] = val[1];
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
allAction(props, emits, formData, prep);
|
|
77
|
-
};
|
|
78
|
-
onBeforeMount(() => {
|
|
79
|
-
if (!props.field.preps) {
|
|
80
|
-
props.field.preps = {};
|
|
81
|
-
}
|
|
82
|
-
props.field.preps["type"] =
|
|
83
|
-
props.field.preps["type"] || props.field.type || "date";
|
|
84
|
-
disabledDate.value = props.field.preps["disabledDate"]?.split(";") || [];
|
|
85
|
-
delete props.field.preps["disabledDate"];
|
|
86
|
-
});
|
|
87
|
-
onMounted(() => {
|
|
88
|
-
//后面增加判断规则
|
|
89
|
-
props.field.preps["disabledDate"] = (date: Date) => {
|
|
90
|
-
return disabledDate.value.includes(date.getDate().toString());
|
|
91
|
-
};
|
|
92
|
-
initCompCallEvent(props, emits, formData);
|
|
93
|
-
});
|
|
94
|
-
</script>
|
|
95
|
-
<style lang="scss" scoped>
|
|
96
|
-
:deep(.el-input) {
|
|
97
|
-
width: unset !important;
|
|
98
|
-
}
|
|
99
|
-
</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>
|