star-horse-lowcode 2.7.62 → 2.7.65
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/.env.development +3 -0
- package/.env.production +3 -0
- package/.eslintrc-auto-import.json +77 -0
- package/.gitignore +27 -0
- package/.idea/.gitignore +5 -0
- package/.idea/MarsCodeWorkspaceAppSettings.xml +6 -0
- package/.idea/inspectionProfiles/Project_Default.xml +7 -0
- package/.idea/modules.xml +8 -0
- package/.idea/testcode.iml +12 -0
- package/.idea/vcs.xml +6 -0
- package/.idea/watcherTasks.xml +4 -0
- package/.idea/workspace.xml +207 -0
- package/.npmignore +21 -0
- package/.prettierignore +26 -0
- package/README.md +2 -0
- package/auto-imports.d.ts +137 -0
- package/components.d.ts +189 -0
- package/dist/assets/index.css +1 -1
- package/dist/index.es.js +941 -720
- package/dist/types/index.d.ts +8 -8
- package/eslint.config.js +37 -0
- package/index.html +14 -0
- package/package-lock.json +8276 -0
- package/package.json +6 -6
- package/prettier.config.js +20 -0
- package/public/logo.svg +660 -0
- package/src/App.vue +11 -0
- package/src/api/date_utils.ts +219 -0
- package/src/api/finger_utils.ts +71 -0
- package/src/api/form_utils.ts +281 -0
- package/src/api/jquery.min.js +2 -0
- package/src/api/pcas-code.json +1 -0
- package/src/api/settings.ts +81 -0
- package/src/api/star_horse_apis.ts +196 -0
- package/src/api/star_horse_utils.ts +797 -0
- package/src/api/system.ts +351 -0
- package/src/api/user_func.ts +147 -0
- package/src/api/valid_utils.ts +165 -0
- package/src/assets/css/index.scss +908 -0
- package/src/assets/icons.css +574 -0
- package/src/assets/star-horse-icons.woff +0 -0
- package/src/components/comp/ShDynamicForm.vue +160 -0
- package/src/components/comp/ShForm.vue +30 -0
- package/src/components/comp/ShTableListColumn.vue +61 -0
- package/src/components/comp/StarHorseDataSelector.vue +139 -0
- package/src/components/comp/StarHorseDataView.vue +110 -0
- package/src/components/comp/StarHorseDataViewItems.vue +61 -0
- package/src/components/comp/StarHorseDataViewTable.vue +102 -0
- package/src/components/comp/StarHorseDialog.vue +383 -0
- package/src/components/comp/StarHorseDraggable.vue +401 -0
- package/src/components/comp/StarHorseForm.vue +458 -0
- package/src/components/comp/StarHorseFormItem.vue +82 -0
- package/src/components/comp/StarHorseFormList.vue +516 -0
- package/src/components/comp/StarHorseFormTable.vue +56 -0
- package/src/components/comp/StarHorseIcon.vue +76 -0
- package/src/components/comp/StarHorseItem.vue +302 -0
- package/src/components/comp/StarHorseJsonEditor.vue +115 -0
- package/src/components/comp/StarHorsePopover.vue +66 -0
- package/src/components/comp/StarHorseSearchComp.vue +253 -0
- package/src/components/comp/StarHorseStaticTable.vue +395 -0
- package/src/components/comp/StarHorseTableColumn.vue +249 -0
- package/src/components/comp/StarHorseTableComp.vue +1193 -0
- package/src/components/comp/StarHorseTableViewColumn.vue +61 -0
- package/src/components/comp/StarHorseTree.vue +494 -0
- package/src/components/comp/index.ts +22 -0
- package/src/components/comp/items/UTableColumn.vue +65 -0
- package/src/components/comp/items/boxItem.vue +98 -0
- package/src/components/comp/items/callitem.ts +9 -0
- package/src/components/comp/items/cardItem.vue +152 -0
- package/src/components/comp/items/collapseItem.vue +134 -0
- package/src/components/comp/items/dytableItem.vue +135 -0
- package/src/components/comp/items/otherItem.vue +65 -0
- package/src/components/comp/items/tabItem.vue +155 -0
- package/src/components/comp/items/tabPanelItem.vue +110 -0
- package/src/components/comp/items/tableColumn.vue +129 -0
- package/src/components/comp/items/tableItem.vue +97 -0
- package/src/components/comp/items/tablebtn.vue +158 -0
- package/src/components/comp/items/viewBoxItem.vue +55 -0
- package/src/components/comp/items/viewCardItem.vue +47 -0
- package/src/components/comp/items/viewCollapseItem.vue +71 -0
- package/src/components/comp/items/viewDytableItem.vue +77 -0
- package/src/components/comp/items/viewOtherItem.vue +55 -0
- package/src/components/comp/items/viewTabItem.vue +77 -0
- package/src/components/comp/items/viewTabPanelItem.vue +54 -0
- package/src/components/comp/items/viewTableItem.vue +74 -0
- package/src/components/comp/selfcomp.ts +9 -0
- package/src/components/comp/utils/DataPicker.vue +302 -0
- package/src/components/comp/utils/DataTag.vue +51 -0
- package/src/components/cron/Crontab-Day.vue +230 -0
- package/src/components/cron/Crontab-Hour.vue +165 -0
- package/src/components/cron/Crontab-Min.vue +166 -0
- package/src/components/cron/Crontab-Month.vue +166 -0
- package/src/components/cron/Crontab-Result.vue +615 -0
- package/src/components/cron/Crontab-Second.vue +185 -0
- package/src/components/cron/Crontab-Week.vue +208 -0
- package/src/components/cron/Crontab-Year.vue +183 -0
- package/src/components/cron/Crontab.vue +474 -0
- package/src/components/enums/ModuleEnums.ts +10 -0
- package/src/components/enums/ServiceEnums.ts +18 -0
- package/src/components/formcomp/container/box-container.vue +162 -0
- package/src/components/formcomp/container/callitem.ts +9 -0
- package/src/components/formcomp/container/card-container.vue +170 -0
- package/src/components/formcomp/container/collapse-container.vue +133 -0
- package/src/components/formcomp/container/dytable-col.vue +448 -0
- package/src/components/formcomp/container/dytable-container.vue +57 -0
- package/src/components/formcomp/container/dytableUtils.ts +358 -0
- package/src/components/formcomp/container/group-box-container.vue +331 -0
- package/src/components/formcomp/container/index.ts +6 -0
- package/src/components/formcomp/container/tab-container.vue +153 -0
- package/src/components/formcomp/container/table-container.vue +249 -0
- package/src/components/formcomp/items/allitem.ts +9 -0
- package/src/components/formcomp/items/area-item.vue +116 -0
- package/src/components/formcomp/items/audio-item.vue +163 -0
- package/src/components/formcomp/items/autocomplete-item.vue +118 -0
- package/src/components/formcomp/items/barcode-item.vue +87 -0
- package/src/components/formcomp/items/base-json-item.vue +207 -0
- package/src/components/formcomp/items/button-item.vue +228 -0
- package/src/components/formcomp/items/cascade-item.vue +113 -0
- package/src/components/formcomp/items/checkbox-item.vue +97 -0
- package/src/components/formcomp/items/color-item.vue +70 -0
- package/src/components/formcomp/items/cron-item.vue +115 -0
- package/src/components/formcomp/items/datetime-item.vue +99 -0
- package/src/components/formcomp/items/depart-item.vue +51 -0
- package/src/components/formcomp/items/dialog-input-item.vue +207 -0
- package/src/components/formcomp/items/divider-item.vue +66 -0
- package/src/components/formcomp/items/html-item.vue +65 -0
- package/src/components/formcomp/items/htmleditor-item.vue +104 -0
- package/src/components/formcomp/items/icon-item.vue +195 -0
- package/src/components/formcomp/items/image-item.vue +247 -0
- package/src/components/formcomp/items/index.ts +44 -0
- package/src/components/formcomp/items/input-item.vue +150 -0
- package/src/components/formcomp/items/json-array-item.vue +67 -0
- package/src/components/formcomp/items/json-item.vue +66 -0
- package/src/components/formcomp/items/markdown-item.vue +77 -0
- package/src/components/formcomp/items/number-item.vue +94 -0
- package/src/components/formcomp/items/number-range-item.vue +278 -0
- package/src/components/formcomp/items/page-select-item.vue +407 -0
- package/src/components/formcomp/items/password-item.vue +71 -0
- package/src/components/formcomp/items/qrcode-item.vue +84 -0
- package/src/components/formcomp/items/radio-item.vue +112 -0
- package/src/components/formcomp/items/rate-item.vue +68 -0
- package/src/components/formcomp/items/select-item.vue +133 -0
- package/src/components/formcomp/items/signature-item.vue +216 -0
- package/src/components/formcomp/items/slider-item.vue +68 -0
- package/src/components/formcomp/items/starhorse-form-item.vue +334 -0
- package/src/components/formcomp/items/switch-item.vue +77 -0
- package/src/components/formcomp/items/tag-item.vue +77 -0
- package/src/components/formcomp/items/text-item.vue +75 -0
- package/src/components/formcomp/items/textarea-item.vue +85 -0
- package/src/components/formcomp/items/time-item.vue +77 -0
- package/src/components/formcomp/items/time-picker-item.vue +74 -0
- package/src/components/formcomp/items/transfer-item.vue +93 -0
- package/src/components/formcomp/items/tselect-item.vue +121 -0
- package/src/components/formcomp/items/unknown-item.vue +51 -0
- package/src/components/formcomp/items/upload-item.vue +189 -0
- package/src/components/formcomp/items/user-item.vue +177 -0
- package/src/components/formcomp/items/usercomp-item.vue +85 -0
- package/src/components/formcomp/items/view-markdown-item.vue +77 -0
- package/src/components/formcomp/utils/EditDataDialog.vue +67 -0
- package/src/components/formcomp/utils/FieldList.vue +125 -0
- package/src/components/formcomp/utils/ItemRelationEventUtils.ts +284 -0
- package/src/components/help.vue +31 -0
- package/src/components/menu/MenuItem.vue +95 -0
- package/src/components/menu/SubMenu.vue +68 -0
- package/src/components/menu/SubSystemMenu.vue +142 -0
- package/src/components/register.ts +24 -0
- package/src/components/system/ContentMenu.vue +260 -0
- package/src/components/system/StarHorseButtonList.vue +344 -0
- package/src/components/system/StarHorseMenu.vue +97 -0
- package/src/components/system/StarHorseSvg.vue +62 -0
- package/src/components/system/SystemComp.ts +9 -0
- package/src/components/system/index.ts +4 -0
- package/src/components/types/ApiUrls.ts +168 -0
- package/src/components/types/BtnAction.ts +51 -0
- package/src/components/types/BtnAuth.ts +43 -0
- package/src/components/types/CompInfo.ts +81 -0
- package/src/components/types/DialogProps.ts +55 -0
- package/src/components/types/DyCompField.ts +23 -0
- package/src/components/types/DynamicNode.ts +42 -0
- package/src/components/types/MenusInfo.ts +45 -0
- package/src/components/types/PageFieldInfo.ts +530 -0
- package/src/components/types/PageProps.ts +25 -0
- package/src/components/types/Params.ts +93 -0
- package/src/components/types/RuleType.ts +10 -0
- package/src/components/types/SearchProps.ts +42 -0
- package/src/components/types/ShortKey.ts +30 -0
- package/src/components/types/StarHorseType.ts +18 -0
- package/src/components/types/index.ts +15 -0
- package/src/config/element.ts +15 -0
- package/src/config/styles.ts +4 -0
- package/src/index.ts +98 -0
- package/src/install.ts +33 -0
- package/src/lang/en_US.ts +81 -0
- package/src/lang/index.ts +35 -0
- package/src/lang/zh_CN.ts +84 -0
- package/src/main.ts +57 -0
- package/src/plugins/AblesPlugin.ts +618 -0
- package/src/plugins/registerCompPlugin.ts +15 -0
- package/src/sample/test.vue +9 -0
- package/src/store/ButtonPermission.ts +101 -0
- package/src/store/ConsumerView.ts +52 -0
- package/src/store/ContinusConfig.ts +78 -0
- package/src/store/CopyerOperation.ts +74 -0
- package/src/store/DesignForm.ts +481 -0
- package/src/store/DesignPage.ts +59 -0
- package/src/store/DynamicForm.ts +241 -0
- package/src/store/GlobalConfig.ts +90 -0
- package/src/store/SelfOperation.ts +95 -0
- package/src/store/UserInfo.ts +88 -0
- package/src/store/index.ts +6 -0
- package/src/theme/localStorge.ts +16 -0
- package/src/theme/theme.ts +27 -0
- package/src/utils/FieldOperationUtils.ts +91 -0
- package/src/utils/auth.ts +83 -0
- package/src/utils/message.ts +69 -0
- package/src/utils/preview.ts +125 -0
- package/tsconfig.json +39 -0
- package/tsconfig.node.json +10 -0
- package/vite-env.d.ts +16 -0
- package/vite.config.ts +162 -0
- package/yarn.lock +4627 -0
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { ModelRef, onMounted, PropType } from "vue";
|
|
3
|
+
import { FieldInfo } from "@/components/types/PageFieldInfo";
|
|
4
|
+
import { compKey } from "@/api/system";
|
|
5
|
+
|
|
6
|
+
const props = defineProps({
|
|
7
|
+
item: { type: Array as PropType<Array<FieldInfo> | any>, required: true },
|
|
8
|
+
primaryKey: { type: [String, Object] as PropType<string | any> },
|
|
9
|
+
commonFormat: { type: Function, required: true },
|
|
10
|
+
});
|
|
11
|
+
const dataForm: ModelRef<any> = defineModel("dataForm");
|
|
12
|
+
const init = () => {};
|
|
13
|
+
onMounted(() => {
|
|
14
|
+
init();
|
|
15
|
+
});
|
|
16
|
+
</script>
|
|
17
|
+
|
|
18
|
+
<template>
|
|
19
|
+
<template
|
|
20
|
+
v-for="(cardItem, key) in item.cardList"
|
|
21
|
+
:key="compKey(cardItem, key)"
|
|
22
|
+
>
|
|
23
|
+
<el-card shadow="hover" v-if="Object.keys(cardItem).length > 0">
|
|
24
|
+
<template #header>
|
|
25
|
+
<div class="card-header">
|
|
26
|
+
<span>{{ cardItem.title || cardItem.tabName }}</span>
|
|
27
|
+
</div>
|
|
28
|
+
</template>
|
|
29
|
+
<star-horse-data-view-items
|
|
30
|
+
:objectName="cardItem.objectName"
|
|
31
|
+
:subFormFlag="cardItem.subFormFlag"
|
|
32
|
+
v-model:data-form="dataForm"
|
|
33
|
+
:commonFormat="commonFormat"
|
|
34
|
+
:primaryKey="primaryKey"
|
|
35
|
+
:fieldList="{
|
|
36
|
+
...cardItem,
|
|
37
|
+
}"
|
|
38
|
+
/>
|
|
39
|
+
</el-card>
|
|
40
|
+
</template>
|
|
41
|
+
</template>
|
|
42
|
+
|
|
43
|
+
<style scoped lang="scss">
|
|
44
|
+
.el-card:nth-child(n + 1) {
|
|
45
|
+
margin-top: 10px;
|
|
46
|
+
}
|
|
47
|
+
</style>
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { ModelRef, onMounted, PropType } from "vue";
|
|
3
|
+
import { FieldInfo } from "@/components/types/PageFieldInfo";
|
|
4
|
+
import { checkObject } from "@/api/form_utils";
|
|
5
|
+
import { compKey } from "@/api/system";
|
|
6
|
+
|
|
7
|
+
defineProps({
|
|
8
|
+
item: { type: Array as PropType<Array<FieldInfo> | any>, required: true },
|
|
9
|
+
objectName: { type: String },
|
|
10
|
+
dataIndex: { type: Number, default: -1 },
|
|
11
|
+
subFormFlag: { type: String, default: "N" },
|
|
12
|
+
batchName: { type: String, default: "batchDataList" },
|
|
13
|
+
batchFieldName: { type: String, default: "batchFieldList" },
|
|
14
|
+
commonFormat: { type: Function, required: true },
|
|
15
|
+
});
|
|
16
|
+
const dataForm: ModelRef<any> = defineModel("dataForm");
|
|
17
|
+
const init = () => {};
|
|
18
|
+
onMounted(() => {
|
|
19
|
+
init();
|
|
20
|
+
});
|
|
21
|
+
</script>
|
|
22
|
+
|
|
23
|
+
<template>
|
|
24
|
+
<template v-if="item.collapseList?.length > 0">
|
|
25
|
+
<el-collapse v-model="item.fieldName">
|
|
26
|
+
<template
|
|
27
|
+
v-for="(collapseItem, key) in item.collapseList"
|
|
28
|
+
:key="compKey(collapseItem, key)"
|
|
29
|
+
>
|
|
30
|
+
<el-collapse-item
|
|
31
|
+
v-if="Object.keys(collapseItem).length > 0"
|
|
32
|
+
:title="collapseItem.title"
|
|
33
|
+
:name="collapseItem.tabName || key"
|
|
34
|
+
:index="checkObject(dataForm, collapseItem, key, dataIndex, '')"
|
|
35
|
+
>
|
|
36
|
+
<el-scrollbar height="95%">
|
|
37
|
+
<star-horse-data-view-items
|
|
38
|
+
v-model:dataForm="dataForm[collapseItem.objectName]"
|
|
39
|
+
:objectName="collapseItem.objectName"
|
|
40
|
+
:commonFormat="commonFormat"
|
|
41
|
+
:fieldList="{
|
|
42
|
+
...collapseItem,
|
|
43
|
+
}"
|
|
44
|
+
:subFormFlag="collapseItem.subFormFlag"
|
|
45
|
+
/>
|
|
46
|
+
</el-scrollbar>
|
|
47
|
+
</el-collapse-item>
|
|
48
|
+
</template>
|
|
49
|
+
</el-collapse>
|
|
50
|
+
</template>
|
|
51
|
+
</template>
|
|
52
|
+
|
|
53
|
+
<style scoped lang="scss">
|
|
54
|
+
.el-collapse {
|
|
55
|
+
:deep(.el-collapse-item__header) {
|
|
56
|
+
border: 1px solid var(--star-horse-style);
|
|
57
|
+
margin-top: 5px;
|
|
58
|
+
height: 40px;
|
|
59
|
+
padding-left: 15px;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
:deep(.el-collapse-item__content) {
|
|
63
|
+
padding: 5px 10px;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
:deep(.el-collapse-item__wrap) {
|
|
67
|
+
margin-top: 10px;
|
|
68
|
+
border: unset;
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
</style>
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { ModelRef, onMounted, PropType } from "vue";
|
|
3
|
+
import { FieldInfo } from "@/components/types/PageFieldInfo";
|
|
4
|
+
import { compKey } from "@/api/system";
|
|
5
|
+
|
|
6
|
+
const props = defineProps({
|
|
7
|
+
item: { type: Array as PropType<Array<FieldInfo> | any>, required: true },
|
|
8
|
+
commonFormat: { type: Function, required: true },
|
|
9
|
+
});
|
|
10
|
+
const dataForm: ModelRef<any> = defineModel("dataForm");
|
|
11
|
+
const dataFormat = (item: any) => {
|
|
12
|
+
let name = item["hideName"] || item["fieldName"];
|
|
13
|
+
let val = dataForm.value[name];
|
|
14
|
+
try {
|
|
15
|
+
return props.commonFormat(name, val, dataForm.value);
|
|
16
|
+
} catch (e) {
|
|
17
|
+
return val || "--";
|
|
18
|
+
}
|
|
19
|
+
};
|
|
20
|
+
const init = () => {};
|
|
21
|
+
onMounted(() => {
|
|
22
|
+
init();
|
|
23
|
+
});
|
|
24
|
+
</script>
|
|
25
|
+
|
|
26
|
+
<template>
|
|
27
|
+
<template v-if="item.dytableList?.length > 0">
|
|
28
|
+
<table
|
|
29
|
+
ref="containerTableRef"
|
|
30
|
+
:class="{ 'dynamic-table': true, 'instance-table': true }"
|
|
31
|
+
>
|
|
32
|
+
<tbody>
|
|
33
|
+
<tr
|
|
34
|
+
v-for="(row, rowIndex) in item.dytableList"
|
|
35
|
+
:key="compKey(row, rowIndex)"
|
|
36
|
+
class="dy-tr"
|
|
37
|
+
>
|
|
38
|
+
<td
|
|
39
|
+
v-for="(sitem, colIndex) in row"
|
|
40
|
+
:key="compKey(sitem, colIndex)"
|
|
41
|
+
:colspan="sitem.preps?.colspan || 1"
|
|
42
|
+
:rowspan="sitem.preps?.rowspan || 1"
|
|
43
|
+
:style="{
|
|
44
|
+
width: sitem.preps?.colWidth + '% !important' || '',
|
|
45
|
+
height: sitem.preps?.colHeight + '% !important' || '',
|
|
46
|
+
'word-break': !!sitem.preps?.wordBreak ? 'break-all' : 'normal',
|
|
47
|
+
}"
|
|
48
|
+
>
|
|
49
|
+
<div
|
|
50
|
+
class="item"
|
|
51
|
+
v-if="sitem.formVisible || sitem.listVisible || sitem.viewVisible"
|
|
52
|
+
>
|
|
53
|
+
<label>{{ sitem.label }} :</label>
|
|
54
|
+
<div class="content">
|
|
55
|
+
<el-tooltip :content="dataFormat(sitem)">
|
|
56
|
+
{{ dataFormat(sitem) }}
|
|
57
|
+
</el-tooltip>
|
|
58
|
+
</div>
|
|
59
|
+
</div>
|
|
60
|
+
</td>
|
|
61
|
+
</tr>
|
|
62
|
+
</tbody>
|
|
63
|
+
</table>
|
|
64
|
+
</template>
|
|
65
|
+
</template>
|
|
66
|
+
|
|
67
|
+
<style scoped lang="scss">
|
|
68
|
+
.instance-table {
|
|
69
|
+
margin-top: 5px;
|
|
70
|
+
|
|
71
|
+
td {
|
|
72
|
+
line-height: 40px;
|
|
73
|
+
height: 40px;
|
|
74
|
+
padding: 0 10px 0 0;
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
</style>
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { ModelRef, onMounted, PropType, unref } from "vue";
|
|
3
|
+
import { FieldInfo } from "@/components/types/PageFieldInfo";
|
|
4
|
+
|
|
5
|
+
const props = defineProps({
|
|
6
|
+
item: { type: Object as PropType<FieldInfo>, required: true },
|
|
7
|
+
commonFormat: { type: Function, required: true },
|
|
8
|
+
});
|
|
9
|
+
const dataForm: ModelRef<any> = defineModel("dataForm");
|
|
10
|
+
const dataFormat = (item: any) => {
|
|
11
|
+
let name = item["hideName"] || item["fieldName"];
|
|
12
|
+
let tempForm = unref(dataForm);
|
|
13
|
+
if (!tempForm) {
|
|
14
|
+
return "--";
|
|
15
|
+
}
|
|
16
|
+
let val = tempForm[name];
|
|
17
|
+
try {
|
|
18
|
+
return props.commonFormat(name, val, tempForm);
|
|
19
|
+
} catch (e) {
|
|
20
|
+
return val || "--";
|
|
21
|
+
}
|
|
22
|
+
};
|
|
23
|
+
const init = () => {};
|
|
24
|
+
onMounted(() => {
|
|
25
|
+
init();
|
|
26
|
+
});
|
|
27
|
+
</script>
|
|
28
|
+
|
|
29
|
+
<template>
|
|
30
|
+
<template v-if="item.type == 'usercomp' || item.type == 'button'">
|
|
31
|
+
<star-horse-item
|
|
32
|
+
v-if="item.formVisible || item.listVisible || item.viewVisible"
|
|
33
|
+
:primaryKey="'id'"
|
|
34
|
+
v-model:dataForm="dataForm"
|
|
35
|
+
:item="item"
|
|
36
|
+
:source="3"
|
|
37
|
+
/>
|
|
38
|
+
</template>
|
|
39
|
+
<div
|
|
40
|
+
class="item"
|
|
41
|
+
v-if="item.formVisible || item.listVisible || item.viewVisible"
|
|
42
|
+
>
|
|
43
|
+
<label>{{ item.label }} :</label>
|
|
44
|
+
<div class="content">
|
|
45
|
+
<pre v-if="item.type == 'textarea' || item.type == 'markdown'">{{
|
|
46
|
+
dataFormat(item)
|
|
47
|
+
}}</pre>
|
|
48
|
+
<el-tooltip :content="dataFormat(item)" v-else>
|
|
49
|
+
{{ dataFormat(item) }}
|
|
50
|
+
</el-tooltip>
|
|
51
|
+
</div>
|
|
52
|
+
</div>
|
|
53
|
+
</template>
|
|
54
|
+
|
|
55
|
+
<style scoped lang="scss"></style>
|
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { ModelRef, onMounted, PropType, ref } from "vue";
|
|
3
|
+
import { FieldInfo } from "@/components/types/PageFieldInfo";
|
|
4
|
+
import { compKey } from "@/api/system";
|
|
5
|
+
|
|
6
|
+
defineProps({
|
|
7
|
+
item: { type: Array as PropType<Array<FieldInfo> | any>, required: true },
|
|
8
|
+
commonFormat: { type: Function, required: true },
|
|
9
|
+
});
|
|
10
|
+
const dataForm: ModelRef<any> = defineModel("dataForm");
|
|
11
|
+
const normalTabList = ref<string>("tab0");
|
|
12
|
+
const init = () => {};
|
|
13
|
+
onMounted(() => {
|
|
14
|
+
init();
|
|
15
|
+
});
|
|
16
|
+
</script>
|
|
17
|
+
|
|
18
|
+
<template>
|
|
19
|
+
<template v-if="item.tabList?.length > 0">
|
|
20
|
+
<el-tabs v-model="item.fieldName" type="border-card" class="view-tab">
|
|
21
|
+
<template
|
|
22
|
+
v-for="(tabItem, key) in item.tabList"
|
|
23
|
+
:key="compKey(tabItem, key)"
|
|
24
|
+
>
|
|
25
|
+
<view-tab-panel-item
|
|
26
|
+
:item="tabItem"
|
|
27
|
+
:commonFormat="commonFormat"
|
|
28
|
+
:dataKey="key"
|
|
29
|
+
parentType="tab"
|
|
30
|
+
v-model:dataForm="dataForm"
|
|
31
|
+
/>
|
|
32
|
+
</template>
|
|
33
|
+
</el-tabs>
|
|
34
|
+
</template>
|
|
35
|
+
<template v-else-if="item.batchFieldList?.length > 0">
|
|
36
|
+
<template
|
|
37
|
+
v-if="
|
|
38
|
+
item.batchFieldList.length > 1 &&
|
|
39
|
+
(!item.displayStyle || item.displayStyle == 'tab')
|
|
40
|
+
"
|
|
41
|
+
>
|
|
42
|
+
<el-tabs v-model="normalTabList">
|
|
43
|
+
<template
|
|
44
|
+
v-for="(sitem, key) in item.batchFieldList"
|
|
45
|
+
:key="compKey(sitem, key)"
|
|
46
|
+
>
|
|
47
|
+
<view-tab-panel-item
|
|
48
|
+
:item="sitem"
|
|
49
|
+
:commonFormat="commonFormat"
|
|
50
|
+
:dataKey="key"
|
|
51
|
+
parentType="batch"
|
|
52
|
+
v-model:dataForm="dataForm"
|
|
53
|
+
/>
|
|
54
|
+
</template>
|
|
55
|
+
</el-tabs>
|
|
56
|
+
</template>
|
|
57
|
+
<template
|
|
58
|
+
v-else
|
|
59
|
+
v-for="(sitem, key) in item.batchFieldList"
|
|
60
|
+
:key="compKey(sitem, key)"
|
|
61
|
+
>
|
|
62
|
+
<star-horse-data-view-table
|
|
63
|
+
v-if="Object.keys(sitem).length > 0"
|
|
64
|
+
:item="sitem"
|
|
65
|
+
:commonFormat="commonFormat"
|
|
66
|
+
:batchName="sitem['batchName']"
|
|
67
|
+
v-model:dataForm="dataForm"
|
|
68
|
+
/>
|
|
69
|
+
</template>
|
|
70
|
+
</template>
|
|
71
|
+
</template>
|
|
72
|
+
|
|
73
|
+
<style scoped lang="scss">
|
|
74
|
+
.view-tab {
|
|
75
|
+
margin-top: 5px;
|
|
76
|
+
}
|
|
77
|
+
</style>
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { ModelRef, onMounted, PropType, ref } from "vue";
|
|
3
|
+
import { FieldInfo } from "@/components/types/PageFieldInfo";
|
|
4
|
+
|
|
5
|
+
defineProps({
|
|
6
|
+
item: { type: Array as PropType<Array<FieldInfo> | any>, required: true },
|
|
7
|
+
commonFormat: { type: Function, required: true },
|
|
8
|
+
dataKey: { type: Number, default: 0 },
|
|
9
|
+
parentType: { type: String, default: "" },
|
|
10
|
+
});
|
|
11
|
+
const dataForm: ModelRef<any> = defineModel("dataForm");
|
|
12
|
+
const init = () => {};
|
|
13
|
+
onMounted(() => {
|
|
14
|
+
init();
|
|
15
|
+
});
|
|
16
|
+
</script>
|
|
17
|
+
|
|
18
|
+
<template>
|
|
19
|
+
<el-tab-pane
|
|
20
|
+
v-if="Object.keys(item).length > 0"
|
|
21
|
+
:label="item.title || item.tabName"
|
|
22
|
+
:name="item.tabName || dataKey"
|
|
23
|
+
>
|
|
24
|
+
<template
|
|
25
|
+
v-if="
|
|
26
|
+
(parentType == 'tab' && item.tableFlag != 'Y') || item.formFlag == 'Y'
|
|
27
|
+
"
|
|
28
|
+
>
|
|
29
|
+
<star-horse-data-view-items
|
|
30
|
+
:objectName="item.objectName"
|
|
31
|
+
:subFormFlag="item.subFormFlag"
|
|
32
|
+
v-model:dataForm="dataForm[item.objectName]"
|
|
33
|
+
:commonFormat="commonFormat"
|
|
34
|
+
primaryKey="id"
|
|
35
|
+
:fieldList="{
|
|
36
|
+
...item,
|
|
37
|
+
}"
|
|
38
|
+
/>
|
|
39
|
+
</template>
|
|
40
|
+
<star-horse-data-view-table
|
|
41
|
+
v-else-if="parentType == 'batch' || item.tableFlag == 'Y'"
|
|
42
|
+
:batchName="item['batchName']"
|
|
43
|
+
:commonFormat="commonFormat"
|
|
44
|
+
:item="item"
|
|
45
|
+
v-model:dataForm="dataForm"
|
|
46
|
+
/>
|
|
47
|
+
</el-tab-pane>
|
|
48
|
+
</template>
|
|
49
|
+
|
|
50
|
+
<style scoped lang="scss">
|
|
51
|
+
.view-tab {
|
|
52
|
+
margin-top: 5px;
|
|
53
|
+
}
|
|
54
|
+
</style>
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { ModelRef, onMounted, PropType, ref } from "vue";
|
|
3
|
+
import { PageFieldInfo } from "@/components/types/PageFieldInfo";
|
|
4
|
+
import { compKey } from "@/api/system";
|
|
5
|
+
|
|
6
|
+
const props = defineProps({
|
|
7
|
+
item: { type: Object as PropType<PageFieldInfo | any>, required: true },
|
|
8
|
+
batchFieldName: { type: String, default: "batchFieldList" },
|
|
9
|
+
commonFormat: { type: Function, required: true },
|
|
10
|
+
});
|
|
11
|
+
const dataForm: ModelRef<any> = defineModel("dataForm");
|
|
12
|
+
let tabModel = ref<string>("");
|
|
13
|
+
const init = () => {
|
|
14
|
+
if (props.item && props.item[props.batchFieldName]?.length > 1) {
|
|
15
|
+
tabModel.value = props.item[props.batchFieldName][0].tabName;
|
|
16
|
+
}
|
|
17
|
+
};
|
|
18
|
+
onMounted(() => {
|
|
19
|
+
init();
|
|
20
|
+
});
|
|
21
|
+
</script>
|
|
22
|
+
|
|
23
|
+
<template>
|
|
24
|
+
<template
|
|
25
|
+
v-if="
|
|
26
|
+
item[batchFieldName]?.length > 1 &&
|
|
27
|
+
(!item.displayStyle || item.displayStyle == 'tab')
|
|
28
|
+
"
|
|
29
|
+
>
|
|
30
|
+
<el-tabs v-model="tabModel">
|
|
31
|
+
<template
|
|
32
|
+
v-for="(sitem, key) in item.batchFieldList"
|
|
33
|
+
:key="compKey(sitem, key)"
|
|
34
|
+
>
|
|
35
|
+
<el-tab-pane
|
|
36
|
+
v-if="Object.keys(sitem).length > 0"
|
|
37
|
+
:label="sitem['title']"
|
|
38
|
+
:name="sitem.tabName || 'tab' + key"
|
|
39
|
+
:disabled="sitem.disabled"
|
|
40
|
+
>
|
|
41
|
+
<star-horse-data-view-table
|
|
42
|
+
:commonFormat="commonFormat"
|
|
43
|
+
:item="sitem"
|
|
44
|
+
:batchName="sitem['batchName']"
|
|
45
|
+
v-model:dataForm="dataForm"
|
|
46
|
+
/>
|
|
47
|
+
</el-tab-pane>
|
|
48
|
+
</template>
|
|
49
|
+
</el-tabs>
|
|
50
|
+
</template>
|
|
51
|
+
<template
|
|
52
|
+
v-else
|
|
53
|
+
v-for="(temp, key) in item[batchFieldName]"
|
|
54
|
+
:key="compKey(temp, key)"
|
|
55
|
+
>
|
|
56
|
+
<star-horse-data-view-table
|
|
57
|
+
v-if="Object.keys(temp).length > 0"
|
|
58
|
+
:item="temp"
|
|
59
|
+
:commonFormat="commonFormat"
|
|
60
|
+
v-model:dataForm="dataForm"
|
|
61
|
+
:batchName="temp['batchName']"
|
|
62
|
+
/>
|
|
63
|
+
</template>
|
|
64
|
+
</template>
|
|
65
|
+
|
|
66
|
+
<style scoped lang="scss">
|
|
67
|
+
:deep(.el-table__cell) {
|
|
68
|
+
padding: 0;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
:deep(th.el-table__cell:first-child) {
|
|
72
|
+
padding: 5px 0;
|
|
73
|
+
}
|
|
74
|
+
</style>
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { App, defineAsyncComponent } from "vue";
|
|
2
|
+
|
|
3
|
+
const items = import.meta.glob("@/components/comp/*.vue");
|
|
4
|
+
export default function install(app: App<Element>) {
|
|
5
|
+
for (const [key, value] of Object.entries(items)) {
|
|
6
|
+
const name = key.slice(key.lastIndexOf("/") + 1, key.lastIndexOf("."));
|
|
7
|
+
app.component(name, defineAsyncComponent(value as any));
|
|
8
|
+
}
|
|
9
|
+
}
|