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,302 +0,0 @@
|
|
|
1
|
-
<script setup lang="ts" name="StarHorseItem">
|
|
2
|
-
import { computed, inject, ModelRef, onMounted, PropType, ref } from "vue";
|
|
3
|
-
import { useSelfOperationStore } from "@/store/SelfOperation";
|
|
4
|
-
import piniaInstance from "@/store";
|
|
5
|
-
import {
|
|
6
|
-
compKey,
|
|
7
|
-
dateCompList,
|
|
8
|
-
fieldPlaceholder,
|
|
9
|
-
inputCompList,
|
|
10
|
-
selectCompList,
|
|
11
|
-
uuid,
|
|
12
|
-
} from "@/api/system";
|
|
13
|
-
import { Config } from "@/api/settings";
|
|
14
|
-
import { checkVisible, filterProperties } from "@/api/form_utils";
|
|
15
|
-
import Help from "@/components/help.vue";
|
|
16
|
-
|
|
17
|
-
const props = defineProps({
|
|
18
|
-
item: { type: Object as PropType<any>, required: true },
|
|
19
|
-
column: { type: Object as PropType<any> },
|
|
20
|
-
primaryKey: { type: Object as PropType<any> },
|
|
21
|
-
// 数据索引
|
|
22
|
-
dataIndex: { type: Number, default: -1 },
|
|
23
|
-
bareFlag: { type: Boolean, default: false },
|
|
24
|
-
batchName: { type: String, default: "" },
|
|
25
|
-
compSize: { type: String, default: Config.compSize },
|
|
26
|
-
showLabel: { type: Boolean, default: true }, //是否显示标签
|
|
27
|
-
source: { type: Number, default: 1 },
|
|
28
|
-
});
|
|
29
|
-
let userOperation = useSelfOperationStore(piniaInstance);
|
|
30
|
-
const dataForm: ModelRef<any> = defineModel("dataForm");
|
|
31
|
-
const itemType = ref<string>("input");
|
|
32
|
-
const emit = defineEmits(["dataSearch", "focus", "blur"]);
|
|
33
|
-
const formFields: any = inject("formFields", {});
|
|
34
|
-
// const actionName = ref();
|
|
35
|
-
const componentRef = ref();
|
|
36
|
-
const isDragging = ref(false);
|
|
37
|
-
const startX = ref(0);
|
|
38
|
-
const startWidth = ref(0);
|
|
39
|
-
const dragWidth = ref<string | null>(null);
|
|
40
|
-
const bareStyle = computed(() => ({
|
|
41
|
-
height: itemType.value != "button" ? "100%" : "inherit",
|
|
42
|
-
minWidth: props.source == 4 ? "200px" : "unset",
|
|
43
|
-
maxHeight: props.source == 4 ? "500px" : "unset",
|
|
44
|
-
width:
|
|
45
|
-
props.source == 4
|
|
46
|
-
? dragWidth.value || props.item.minWidth || "inherit"
|
|
47
|
-
: "100%",
|
|
48
|
-
position: "relative" as const,
|
|
49
|
-
}));
|
|
50
|
-
/**
|
|
51
|
-
* 组件派发事件
|
|
52
|
-
* @param act
|
|
53
|
-
* @param params
|
|
54
|
-
*/
|
|
55
|
-
const actionDispatcher = (act: string, ...params: any[]) => {
|
|
56
|
-
if (props.source == 4) {
|
|
57
|
-
if (!act) {
|
|
58
|
-
return;
|
|
59
|
-
}
|
|
60
|
-
emit("dataSearch", params);
|
|
61
|
-
} else {
|
|
62
|
-
let actions: Record<string, Function> = props.item.actions;
|
|
63
|
-
const eventNames: Array<string> = Object.keys(actions || {});
|
|
64
|
-
if (
|
|
65
|
-
eventNames?.length > 0 &&
|
|
66
|
-
eventNames.includes(act) &&
|
|
67
|
-
typeof actions[act] == "function"
|
|
68
|
-
) {
|
|
69
|
-
actions[act](dataForm.value, params);
|
|
70
|
-
}
|
|
71
|
-
if (act == "focus") {
|
|
72
|
-
emit("focus", props.column, params);
|
|
73
|
-
} else if (act == "blur" || (act == "change" && props.source == 5)) {
|
|
74
|
-
emit("blur", props.column, params);
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
};
|
|
78
|
-
|
|
79
|
-
const fieldType = () => {
|
|
80
|
-
const inputList = inputCompList();
|
|
81
|
-
const dateNameList = dateCompList();
|
|
82
|
-
const selectNameList = selectCompList();
|
|
83
|
-
itemType.value = props.item?.type || props.item?.fieldType || "input";
|
|
84
|
-
if (dateNameList.includes(itemType.value)) {
|
|
85
|
-
itemType.value = "datetime";
|
|
86
|
-
//日期默认以时间戳赋值
|
|
87
|
-
}
|
|
88
|
-
if (!props.item.actions) {
|
|
89
|
-
props.item["actions"] = {};
|
|
90
|
-
}
|
|
91
|
-
const keys = Object.keys(props.item.actions);
|
|
92
|
-
if (props.source == 4) {
|
|
93
|
-
const actionKey = inputList.includes(itemType.value)
|
|
94
|
-
? "keyup.enter"
|
|
95
|
-
: "change";
|
|
96
|
-
if (!keys.includes(actionKey)) {
|
|
97
|
-
props.item.actions[actionKey] = actionKey;
|
|
98
|
-
}
|
|
99
|
-
} else if (props.source == 5) {
|
|
100
|
-
//列表组件动态增加blur 和change 事件
|
|
101
|
-
const actionKey = inputList.includes(itemType.value)
|
|
102
|
-
? "blur"
|
|
103
|
-
: selectNameList.includes(itemType.value)
|
|
104
|
-
? "change"
|
|
105
|
-
: null;
|
|
106
|
-
if (actionKey && !keys.includes(actionKey)) {
|
|
107
|
-
props.item.actions[actionKey] = actionKey;
|
|
108
|
-
}
|
|
109
|
-
}
|
|
110
|
-
};
|
|
111
|
-
const exclusions = [
|
|
112
|
-
"name",
|
|
113
|
-
"id",
|
|
114
|
-
"label",
|
|
115
|
-
"itemNameLabel",
|
|
116
|
-
"autocomplete",
|
|
117
|
-
"maxLength",
|
|
118
|
-
];
|
|
119
|
-
const init = () => {
|
|
120
|
-
fieldType();
|
|
121
|
-
if (!props.item["id"]) {
|
|
122
|
-
props.item["id"] = props.item.preps?.id ?? uuid();
|
|
123
|
-
}
|
|
124
|
-
if (!props.item.fieldName) {
|
|
125
|
-
props.item["fieldName"] = props.item.preps?.name ?? props.item.id;
|
|
126
|
-
}
|
|
127
|
-
fieldPlaceholder(props.item, itemType.value);
|
|
128
|
-
if (props.item.preps) {
|
|
129
|
-
//防止name 与Vue重名,导致渲染异常
|
|
130
|
-
filterProperties(props.item.preps, exclusions);
|
|
131
|
-
props.item.preps["readonly"] = props.item?.readonly || props.source == 3;
|
|
132
|
-
props.item.preps["starHorseFieldSource"] = props.source;
|
|
133
|
-
let keys = Object.keys(props.item.preps);
|
|
134
|
-
for (let key in keys) {
|
|
135
|
-
let val = props.item.preps[key];
|
|
136
|
-
if (val == "Y" || val == "N") {
|
|
137
|
-
props.item.preps[key] = val == "Y";
|
|
138
|
-
} else if (val == "true" || val == "false") {
|
|
139
|
-
props.item.preps[key] = val == "true";
|
|
140
|
-
}
|
|
141
|
-
}
|
|
142
|
-
}
|
|
143
|
-
compPreps();
|
|
144
|
-
};
|
|
145
|
-
const compPreps = () => {
|
|
146
|
-
fieldType();
|
|
147
|
-
//过滤掉查询表单的信息
|
|
148
|
-
if (props.source != 4 && formFields) {
|
|
149
|
-
let fieldName = props.item.fieldName;
|
|
150
|
-
//如果数据来源于列表
|
|
151
|
-
if (props.batchName) {
|
|
152
|
-
let batchFields = formFields[props.batchName];
|
|
153
|
-
if (!batchFields) {
|
|
154
|
-
formFields[props.batchName] = [];
|
|
155
|
-
}
|
|
156
|
-
let row = formFields[props.batchName][dataForm.value["xh"] - 1];
|
|
157
|
-
if (!row) {
|
|
158
|
-
formFields[props.batchName].push([]);
|
|
159
|
-
} else {
|
|
160
|
-
row.push(props.item);
|
|
161
|
-
}
|
|
162
|
-
} else {
|
|
163
|
-
formFields[fieldName] = props.item;
|
|
164
|
-
}
|
|
165
|
-
}
|
|
166
|
-
//将表单属性存储起来
|
|
167
|
-
if (props.source != 4) {
|
|
168
|
-
userOperation.addFormItem(props.item);
|
|
169
|
-
}
|
|
170
|
-
/**
|
|
171
|
-
* 组件初始化时赋值默认值,
|
|
172
|
-
* 在表单操作过程中,不再进行默认值的处理
|
|
173
|
-
*/
|
|
174
|
-
if (!dataForm.value[props.item?.fieldName] && props.item?.defaultValue) {
|
|
175
|
-
dataForm.value[props.item?.fieldName] = props.item?.defaultValue;
|
|
176
|
-
}
|
|
177
|
-
};
|
|
178
|
-
|
|
179
|
-
const startDrag = (e: MouseEvent) => {
|
|
180
|
-
isDragging.value = true;
|
|
181
|
-
startX.value = e.clientX;
|
|
182
|
-
const compInfo = (e.target as HTMLElement).parentElement;
|
|
183
|
-
if (compInfo) {
|
|
184
|
-
startWidth.value = compInfo.offsetWidth;
|
|
185
|
-
}
|
|
186
|
-
document.body.style.userSelect = "none";
|
|
187
|
-
};
|
|
188
|
-
|
|
189
|
-
const onDrag = (e: MouseEvent) => {
|
|
190
|
-
if (!isDragging.value) return;
|
|
191
|
-
const delta = e.clientX - startX.value;
|
|
192
|
-
const newWidth = startWidth.value + delta;
|
|
193
|
-
if (newWidth > 100) {
|
|
194
|
-
// 最小宽度限制
|
|
195
|
-
dragWidth.value = `${newWidth}px`;
|
|
196
|
-
}
|
|
197
|
-
};
|
|
198
|
-
|
|
199
|
-
const stopDrag = () => {
|
|
200
|
-
if (isDragging.value) {
|
|
201
|
-
isDragging.value = false;
|
|
202
|
-
document.body.style.userSelect = "";
|
|
203
|
-
}
|
|
204
|
-
};
|
|
205
|
-
const checkClassName = () => {
|
|
206
|
-
if (props.bareFlag || props.item.preps?.headerFlag) {
|
|
207
|
-
return "bare-comp";
|
|
208
|
-
} else {
|
|
209
|
-
return "comp-info";
|
|
210
|
-
}
|
|
211
|
-
};
|
|
212
|
-
onMounted(() => {
|
|
213
|
-
init();
|
|
214
|
-
});
|
|
215
|
-
</script>
|
|
216
|
-
<template>
|
|
217
|
-
<div
|
|
218
|
-
:class="checkClassName()"
|
|
219
|
-
:style="bareStyle"
|
|
220
|
-
@mousemove="onDrag"
|
|
221
|
-
@mouseup="stopDrag"
|
|
222
|
-
@mouseleave="stopDrag"
|
|
223
|
-
>
|
|
224
|
-
<div
|
|
225
|
-
class="drag-handle"
|
|
226
|
-
@mousedown.prevent="startDrag"
|
|
227
|
-
v-if="itemType != 'button' && source == 4"
|
|
228
|
-
></div>
|
|
229
|
-
<help :message="item.helpMsg" v-if="item.helpMsg" />
|
|
230
|
-
<component
|
|
231
|
-
:key="item.id"
|
|
232
|
-
:is="
|
|
233
|
-
((dataForm && dataForm['_' + item.fieldName + 'Type']) || itemType) +
|
|
234
|
-
'-item'
|
|
235
|
-
"
|
|
236
|
-
@selfFunc="actionDispatcher"
|
|
237
|
-
ref="componentRef"
|
|
238
|
-
:isSearch="source == 4"
|
|
239
|
-
:bareFlag="bareFlag"
|
|
240
|
-
:field="item"
|
|
241
|
-
v-model:formData="dataForm"
|
|
242
|
-
/>
|
|
243
|
-
<div v-if="item.brotherNodes" style="width: 15px" />
|
|
244
|
-
<template
|
|
245
|
-
v-for="(temp, key) in item.brotherNodes"
|
|
246
|
-
:key="compKey(temp, key)"
|
|
247
|
-
>
|
|
248
|
-
<star-horse-item
|
|
249
|
-
v-if="checkVisible(temp, dataForm)"
|
|
250
|
-
:primaryKey="primaryKey"
|
|
251
|
-
:compSize="compSize"
|
|
252
|
-
v-model:dataForm="dataForm"
|
|
253
|
-
:item="temp"
|
|
254
|
-
:dataIndex="dataIndex"
|
|
255
|
-
:bareFlag="true"
|
|
256
|
-
:source="source"
|
|
257
|
-
/>
|
|
258
|
-
</template>
|
|
259
|
-
</div>
|
|
260
|
-
</template>
|
|
261
|
-
<style lang="scss" scoped>
|
|
262
|
-
:deep(.el-cascader) {
|
|
263
|
-
width: 100%;
|
|
264
|
-
}
|
|
265
|
-
|
|
266
|
-
.drag-handle {
|
|
267
|
-
position: absolute;
|
|
268
|
-
right: -4px;
|
|
269
|
-
top: 0;
|
|
270
|
-
bottom: 0;
|
|
271
|
-
width: 8px;
|
|
272
|
-
cursor: col-resize;
|
|
273
|
-
z-index: 100;
|
|
274
|
-
|
|
275
|
-
&:hover {
|
|
276
|
-
background: rgba(64, 158, 255, 0.2);
|
|
277
|
-
}
|
|
278
|
-
}
|
|
279
|
-
|
|
280
|
-
.comp-info {
|
|
281
|
-
display: flex;
|
|
282
|
-
justify-content: left;
|
|
283
|
-
flex: 1;
|
|
284
|
-
align-items: center;
|
|
285
|
-
margin: 0 auto;
|
|
286
|
-
}
|
|
287
|
-
|
|
288
|
-
.bare-comp {
|
|
289
|
-
flex: 1;
|
|
290
|
-
display: flex;
|
|
291
|
-
align-items: center;
|
|
292
|
-
width: 100%;
|
|
293
|
-
margin: 5px;
|
|
294
|
-
}
|
|
295
|
-
|
|
296
|
-
.brother-node {
|
|
297
|
-
margin-left: 5px;
|
|
298
|
-
display: flex;
|
|
299
|
-
align-items: center;
|
|
300
|
-
flex: 1;
|
|
301
|
-
}
|
|
302
|
-
</style>
|
|
@@ -1,115 +0,0 @@
|
|
|
1
|
-
<script setup lang="ts">
|
|
2
|
-
import { ModelRef, onBeforeUnmount, onMounted, PropType, ref } from "vue";
|
|
3
|
-
import JsonEditor from "vue3-ts-jsoneditor";
|
|
4
|
-
|
|
5
|
-
defineProps({
|
|
6
|
-
options: { type: Object as PropType<any> },
|
|
7
|
-
currentMode: {
|
|
8
|
-
type: String,
|
|
9
|
-
default: "code",
|
|
10
|
-
},
|
|
11
|
-
modeList: {
|
|
12
|
-
type: Array,
|
|
13
|
-
default: () => ["tree", "code", "form", "text", "view"],
|
|
14
|
-
},
|
|
15
|
-
// en, es zh-CN, pt-BR, tr, ja, fr-FR, de, ru, ko
|
|
16
|
-
language: {
|
|
17
|
-
type: String,
|
|
18
|
-
default: "zh-CN",
|
|
19
|
-
},
|
|
20
|
-
});
|
|
21
|
-
|
|
22
|
-
const json: ModelRef<any> = defineModel("modelValue", {
|
|
23
|
-
default: {},
|
|
24
|
-
});
|
|
25
|
-
// const jsonEditorRef = ref();
|
|
26
|
-
// 'javascript' | 'lodash' | 'jmespath' | 'jsonquery' | 'jsonpath'
|
|
27
|
-
const queryLanguages: Array<any> = [
|
|
28
|
-
"javascript",
|
|
29
|
-
"lodash",
|
|
30
|
-
"jmespath",
|
|
31
|
-
"jsonquery",
|
|
32
|
-
"jsonpath",
|
|
33
|
-
];
|
|
34
|
-
|
|
35
|
-
// 全屏处理
|
|
36
|
-
let editor = ref(null);
|
|
37
|
-
|
|
38
|
-
const setEditorContent = (value) => {};
|
|
39
|
-
const init = () => {};
|
|
40
|
-
onMounted(() => {
|
|
41
|
-
init();
|
|
42
|
-
setEditorContent(json.value);
|
|
43
|
-
});
|
|
44
|
-
onBeforeUnmount(() => {
|
|
45
|
-
editor.value = null;
|
|
46
|
-
});
|
|
47
|
-
defineExpose({
|
|
48
|
-
editor,
|
|
49
|
-
setEditorContent,
|
|
50
|
-
});
|
|
51
|
-
</script>
|
|
52
|
-
<template>
|
|
53
|
-
<json-editor
|
|
54
|
-
ref="editor"
|
|
55
|
-
mode="text"
|
|
56
|
-
v-model:json="json"
|
|
57
|
-
:queryLanguagesIds="queryLanguages"
|
|
58
|
-
class="json-editor"
|
|
59
|
-
/>
|
|
60
|
-
</template>
|
|
61
|
-
|
|
62
|
-
<style scoped lang="scss">
|
|
63
|
-
.container {
|
|
64
|
-
position: relative;
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
.full-screen-container {
|
|
68
|
-
position: fixed;
|
|
69
|
-
top: 0;
|
|
70
|
-
left: 0;
|
|
71
|
-
right: 0;
|
|
72
|
-
bottom: 0;
|
|
73
|
-
z-index: 999999999999;
|
|
74
|
-
width: auto !important;
|
|
75
|
-
height: auto !important;
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
.json-editor {
|
|
79
|
-
width: 100%;
|
|
80
|
-
height: 100%;
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
code {
|
|
84
|
-
background-color: #f5f5f5;
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
.full-screen {
|
|
88
|
-
position: absolute;
|
|
89
|
-
display: none;
|
|
90
|
-
top: 8px;
|
|
91
|
-
right: 110px;
|
|
92
|
-
width: 22px;
|
|
93
|
-
height: 22px;
|
|
94
|
-
border-radius: 2px;
|
|
95
|
-
cursor: pointer;
|
|
96
|
-
background-size: cover;
|
|
97
|
-
background-image: url("data:image/svg+xml,%3Csvg t='1635416254060' viewBox='0 0 1024 1024' version='1.1' xmlns='http://www.w3.org/2000/svg' p-id='42247' width='128' height='128'%3E%3Cpath d='M240.8 196l178.4 178.4-45.6 45.6-177.6-179.2-68 68V128h180.8l-68 68z m133.6 408.8L196 783.2 128 715.2V896h180.8l-68-68 178.4-178.4-44.8-44.8zM715.2 128l68 68-178.4 178.4 45.6 45.6 178.4-178.4 68 68V128H715.2z m-65.6 476.8l-45.6 45.6 178.4 178.4-68 68H896V715.2l-68 68-178.4-178.4z' p-id='42248' fill='%23ffffff'%3E%3C/path%3E%3C/svg%3E");
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
.full-screen-container .full-screen {
|
|
101
|
-
background-image: url("data:image/svg+xml,%3Csvg t='1635416420969' viewBox='0 0 1024 1024' version='1.1' xmlns='http://www.w3.org/2000/svg' p-id='42490' width='128' height='128'%3E%3Cpath d='M142.4 96.8l-44.8 44.8 173.6 174.4-68 68H384V203.2l-67.2 67.2zM752.8 316l173.6-174.4-44.8-44.8-174.4 173.6-67.2-67.2V384h180.8zM270.4 707.2l-169.6 170.4 44.8 49.6 170.4-174.4 68 68V640H203.2zM820.8 640H640v180.8l68-68 170.4 174.4 44.8-49.6-169.6-170.4z' p-id='42491' fill='%23ffffff'%3E%3C/path%3E%3C/svg%3E");
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
.show {
|
|
105
|
-
display: block;
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
.right {
|
|
109
|
-
right: 15px;
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
.full-screen:hover {
|
|
113
|
-
border: 1px solid #d7e6fe;
|
|
114
|
-
}
|
|
115
|
-
</style>
|
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
<script lang="ts" setup name="StarHorsePopover">
|
|
2
|
-
import { onMounted, ref } from "vue";
|
|
3
|
-
import { postRequest } from "@/api/star_horse_apis";
|
|
4
|
-
import { warning } from "@/utils/message";
|
|
5
|
-
import { compKey } from "@/api/system";
|
|
6
|
-
|
|
7
|
-
const props = defineProps({
|
|
8
|
-
menuIcon: { type: String },
|
|
9
|
-
iconUrl: { type: String },
|
|
10
|
-
iconSize: { type: Number, default: 48 },
|
|
11
|
-
icons: { type: Array, default: () => [] },
|
|
12
|
-
});
|
|
13
|
-
const emits = defineEmits(["selectIcon"]);
|
|
14
|
-
let iconList = ref<Array<any>>([]);
|
|
15
|
-
const menuIconSelect = (corn: any) => {
|
|
16
|
-
emits("selectIcon", corn);
|
|
17
|
-
};
|
|
18
|
-
const init = () => {
|
|
19
|
-
if (props.iconUrl) {
|
|
20
|
-
postRequest(props.iconUrl, {}).then((res) => {
|
|
21
|
-
const resData = res.data;
|
|
22
|
-
if (resData.code) {
|
|
23
|
-
warning(resData.cnMessage);
|
|
24
|
-
return;
|
|
25
|
-
}
|
|
26
|
-
iconList.value = resData.data;
|
|
27
|
-
});
|
|
28
|
-
} else {
|
|
29
|
-
iconList.value = props.icons;
|
|
30
|
-
}
|
|
31
|
-
};
|
|
32
|
-
onMounted(() => {
|
|
33
|
-
init();
|
|
34
|
-
});
|
|
35
|
-
</script>
|
|
36
|
-
<template>
|
|
37
|
-
<el-popover
|
|
38
|
-
placement="bottom"
|
|
39
|
-
:popper-style="{ width: 'unset !important' }"
|
|
40
|
-
trigger="click"
|
|
41
|
-
>
|
|
42
|
-
<template #reference>
|
|
43
|
-
<slot></slot>
|
|
44
|
-
</template>
|
|
45
|
-
<ul class="system-icon">
|
|
46
|
-
<li
|
|
47
|
-
v-for="(sdata, key) in iconList"
|
|
48
|
-
:key="compKey(sdata, key)"
|
|
49
|
-
@click="menuIconSelect(sdata.menuIcon)"
|
|
50
|
-
:class="menuIcon == sdata.menuIcon ? 'icon-active' : ''"
|
|
51
|
-
>
|
|
52
|
-
<el-tooltip :content="sdata.label">
|
|
53
|
-
<star-horse-icon
|
|
54
|
-
:icon-class="sdata.menuIcon"
|
|
55
|
-
style="
|
|
56
|
-
color: var(--star-horse-style);
|
|
57
|
-
vertical-align: middle;
|
|
58
|
-
font-size: 48px;
|
|
59
|
-
"
|
|
60
|
-
/>
|
|
61
|
-
</el-tooltip>
|
|
62
|
-
</li>
|
|
63
|
-
</ul>
|
|
64
|
-
</el-popover>
|
|
65
|
-
</template>
|
|
66
|
-
<style scoped></style>
|