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.
Files changed (220) hide show
  1. package/README.md +1 -0
  2. package/dist/assets/index.css +1 -1
  3. package/dist/index.es.js +491 -253
  4. package/package.json +1 -1
  5. package/.env.development +0 -3
  6. package/.env.production +0 -3
  7. package/.eslintrc-auto-import.json +0 -77
  8. package/.gitignore +0 -27
  9. package/.idea/.gitignore +0 -5
  10. package/.idea/MarsCodeWorkspaceAppSettings.xml +0 -6
  11. package/.idea/inspectionProfiles/Project_Default.xml +0 -7
  12. package/.idea/modules.xml +0 -8
  13. package/.idea/testcode.iml +0 -12
  14. package/.idea/vcs.xml +0 -6
  15. package/.idea/watcherTasks.xml +0 -4
  16. package/.idea/workspace.xml +0 -207
  17. package/.npmignore +0 -21
  18. package/.prettierignore +0 -26
  19. package/auto-imports.d.ts +0 -137
  20. package/components.d.ts +0 -189
  21. package/eslint.config.js +0 -37
  22. package/index.html +0 -14
  23. package/package-lock.json +0 -8276
  24. package/prettier.config.js +0 -20
  25. package/public/logo.svg +0 -660
  26. package/src/App.vue +0 -11
  27. package/src/api/date_utils.ts +0 -219
  28. package/src/api/finger_utils.ts +0 -71
  29. package/src/api/form_utils.ts +0 -281
  30. package/src/api/jquery.min.js +0 -2
  31. package/src/api/pcas-code.json +0 -1
  32. package/src/api/settings.ts +0 -81
  33. package/src/api/star_horse_apis.ts +0 -196
  34. package/src/api/star_horse_utils.ts +0 -797
  35. package/src/api/system.ts +0 -351
  36. package/src/api/user_func.ts +0 -147
  37. package/src/api/valid_utils.ts +0 -165
  38. package/src/assets/css/index.scss +0 -908
  39. package/src/assets/icons.css +0 -574
  40. package/src/assets/star-horse-icons.woff +0 -0
  41. package/src/components/comp/ShDynamicForm.vue +0 -160
  42. package/src/components/comp/ShForm.vue +0 -30
  43. package/src/components/comp/ShTableListColumn.vue +0 -61
  44. package/src/components/comp/StarHorseDataSelector.vue +0 -139
  45. package/src/components/comp/StarHorseDataView.vue +0 -110
  46. package/src/components/comp/StarHorseDataViewItems.vue +0 -61
  47. package/src/components/comp/StarHorseDataViewTable.vue +0 -102
  48. package/src/components/comp/StarHorseDialog.vue +0 -383
  49. package/src/components/comp/StarHorseDraggable.vue +0 -401
  50. package/src/components/comp/StarHorseForm.vue +0 -458
  51. package/src/components/comp/StarHorseFormItem.vue +0 -82
  52. package/src/components/comp/StarHorseFormList.vue +0 -516
  53. package/src/components/comp/StarHorseFormTable.vue +0 -56
  54. package/src/components/comp/StarHorseIcon.vue +0 -76
  55. package/src/components/comp/StarHorseItem.vue +0 -302
  56. package/src/components/comp/StarHorseJsonEditor.vue +0 -115
  57. package/src/components/comp/StarHorsePopover.vue +0 -66
  58. package/src/components/comp/StarHorseSearchComp.vue +0 -253
  59. package/src/components/comp/StarHorseStaticTable.vue +0 -395
  60. package/src/components/comp/StarHorseTableColumn.vue +0 -249
  61. package/src/components/comp/StarHorseTableComp.vue +0 -1193
  62. package/src/components/comp/StarHorseTableViewColumn.vue +0 -61
  63. package/src/components/comp/StarHorseTree.vue +0 -494
  64. package/src/components/comp/index.ts +0 -22
  65. package/src/components/comp/items/UTableColumn.vue +0 -65
  66. package/src/components/comp/items/boxItem.vue +0 -98
  67. package/src/components/comp/items/callitem.ts +0 -9
  68. package/src/components/comp/items/cardItem.vue +0 -152
  69. package/src/components/comp/items/collapseItem.vue +0 -134
  70. package/src/components/comp/items/dytableItem.vue +0 -135
  71. package/src/components/comp/items/otherItem.vue +0 -65
  72. package/src/components/comp/items/tabItem.vue +0 -155
  73. package/src/components/comp/items/tabPanelItem.vue +0 -110
  74. package/src/components/comp/items/tableColumn.vue +0 -129
  75. package/src/components/comp/items/tableItem.vue +0 -97
  76. package/src/components/comp/items/tablebtn.vue +0 -158
  77. package/src/components/comp/items/viewBoxItem.vue +0 -55
  78. package/src/components/comp/items/viewCardItem.vue +0 -47
  79. package/src/components/comp/items/viewCollapseItem.vue +0 -71
  80. package/src/components/comp/items/viewDytableItem.vue +0 -77
  81. package/src/components/comp/items/viewOtherItem.vue +0 -55
  82. package/src/components/comp/items/viewTabItem.vue +0 -77
  83. package/src/components/comp/items/viewTabPanelItem.vue +0 -54
  84. package/src/components/comp/items/viewTableItem.vue +0 -74
  85. package/src/components/comp/selfcomp.ts +0 -9
  86. package/src/components/comp/utils/DataPicker.vue +0 -302
  87. package/src/components/comp/utils/DataTag.vue +0 -51
  88. package/src/components/cron/Crontab-Day.vue +0 -230
  89. package/src/components/cron/Crontab-Hour.vue +0 -165
  90. package/src/components/cron/Crontab-Min.vue +0 -166
  91. package/src/components/cron/Crontab-Month.vue +0 -166
  92. package/src/components/cron/Crontab-Result.vue +0 -615
  93. package/src/components/cron/Crontab-Second.vue +0 -185
  94. package/src/components/cron/Crontab-Week.vue +0 -208
  95. package/src/components/cron/Crontab-Year.vue +0 -183
  96. package/src/components/cron/Crontab.vue +0 -474
  97. package/src/components/enums/ModuleEnums.ts +0 -10
  98. package/src/components/enums/ServiceEnums.ts +0 -18
  99. package/src/components/formcomp/container/box-container.vue +0 -162
  100. package/src/components/formcomp/container/callitem.ts +0 -9
  101. package/src/components/formcomp/container/card-container.vue +0 -170
  102. package/src/components/formcomp/container/collapse-container.vue +0 -133
  103. package/src/components/formcomp/container/dytable-col.vue +0 -448
  104. package/src/components/formcomp/container/dytable-container.vue +0 -57
  105. package/src/components/formcomp/container/dytableUtils.ts +0 -358
  106. package/src/components/formcomp/container/group-box-container.vue +0 -331
  107. package/src/components/formcomp/container/index.ts +0 -6
  108. package/src/components/formcomp/container/tab-container.vue +0 -153
  109. package/src/components/formcomp/container/table-container.vue +0 -249
  110. package/src/components/formcomp/items/allitem.ts +0 -9
  111. package/src/components/formcomp/items/area-item.vue +0 -116
  112. package/src/components/formcomp/items/audio-item.vue +0 -163
  113. package/src/components/formcomp/items/autocomplete-item.vue +0 -118
  114. package/src/components/formcomp/items/barcode-item.vue +0 -87
  115. package/src/components/formcomp/items/base-json-item.vue +0 -207
  116. package/src/components/formcomp/items/button-item.vue +0 -228
  117. package/src/components/formcomp/items/cascade-item.vue +0 -113
  118. package/src/components/formcomp/items/checkbox-item.vue +0 -97
  119. package/src/components/formcomp/items/color-item.vue +0 -70
  120. package/src/components/formcomp/items/cron-item.vue +0 -115
  121. package/src/components/formcomp/items/datetime-item.vue +0 -99
  122. package/src/components/formcomp/items/depart-item.vue +0 -51
  123. package/src/components/formcomp/items/dialog-input-item.vue +0 -207
  124. package/src/components/formcomp/items/divider-item.vue +0 -66
  125. package/src/components/formcomp/items/html-item.vue +0 -65
  126. package/src/components/formcomp/items/htmleditor-item.vue +0 -104
  127. package/src/components/formcomp/items/icon-item.vue +0 -195
  128. package/src/components/formcomp/items/image-item.vue +0 -247
  129. package/src/components/formcomp/items/index.ts +0 -44
  130. package/src/components/formcomp/items/input-item.vue +0 -150
  131. package/src/components/formcomp/items/json-array-item.vue +0 -67
  132. package/src/components/formcomp/items/json-item.vue +0 -66
  133. package/src/components/formcomp/items/markdown-item.vue +0 -77
  134. package/src/components/formcomp/items/number-item.vue +0 -94
  135. package/src/components/formcomp/items/number-range-item.vue +0 -278
  136. package/src/components/formcomp/items/page-select-item.vue +0 -407
  137. package/src/components/formcomp/items/password-item.vue +0 -71
  138. package/src/components/formcomp/items/qrcode-item.vue +0 -84
  139. package/src/components/formcomp/items/radio-item.vue +0 -112
  140. package/src/components/formcomp/items/rate-item.vue +0 -68
  141. package/src/components/formcomp/items/select-item.vue +0 -133
  142. package/src/components/formcomp/items/signature-item.vue +0 -216
  143. package/src/components/formcomp/items/slider-item.vue +0 -68
  144. package/src/components/formcomp/items/starhorse-form-item.vue +0 -334
  145. package/src/components/formcomp/items/switch-item.vue +0 -77
  146. package/src/components/formcomp/items/tag-item.vue +0 -77
  147. package/src/components/formcomp/items/text-item.vue +0 -75
  148. package/src/components/formcomp/items/textarea-item.vue +0 -85
  149. package/src/components/formcomp/items/time-item.vue +0 -77
  150. package/src/components/formcomp/items/time-picker-item.vue +0 -74
  151. package/src/components/formcomp/items/transfer-item.vue +0 -93
  152. package/src/components/formcomp/items/tselect-item.vue +0 -121
  153. package/src/components/formcomp/items/unknown-item.vue +0 -51
  154. package/src/components/formcomp/items/upload-item.vue +0 -189
  155. package/src/components/formcomp/items/user-item.vue +0 -177
  156. package/src/components/formcomp/items/usercomp-item.vue +0 -85
  157. package/src/components/formcomp/items/view-markdown-item.vue +0 -77
  158. package/src/components/formcomp/utils/EditDataDialog.vue +0 -67
  159. package/src/components/formcomp/utils/FieldList.vue +0 -125
  160. package/src/components/formcomp/utils/ItemRelationEventUtils.ts +0 -284
  161. package/src/components/help.vue +0 -31
  162. package/src/components/menu/MenuItem.vue +0 -95
  163. package/src/components/menu/SubMenu.vue +0 -68
  164. package/src/components/menu/SubSystemMenu.vue +0 -142
  165. package/src/components/register.ts +0 -24
  166. package/src/components/system/ContentMenu.vue +0 -260
  167. package/src/components/system/StarHorseButtonList.vue +0 -344
  168. package/src/components/system/StarHorseMenu.vue +0 -97
  169. package/src/components/system/StarHorseSvg.vue +0 -62
  170. package/src/components/system/SystemComp.ts +0 -9
  171. package/src/components/system/index.ts +0 -4
  172. package/src/components/types/ApiUrls.ts +0 -168
  173. package/src/components/types/BtnAction.ts +0 -51
  174. package/src/components/types/BtnAuth.ts +0 -43
  175. package/src/components/types/CompInfo.ts +0 -81
  176. package/src/components/types/DialogProps.ts +0 -55
  177. package/src/components/types/DyCompField.ts +0 -23
  178. package/src/components/types/DynamicNode.ts +0 -42
  179. package/src/components/types/MenusInfo.ts +0 -45
  180. package/src/components/types/PageFieldInfo.ts +0 -530
  181. package/src/components/types/PageProps.ts +0 -25
  182. package/src/components/types/Params.ts +0 -93
  183. package/src/components/types/RuleType.ts +0 -10
  184. package/src/components/types/SearchProps.ts +0 -42
  185. package/src/components/types/ShortKey.ts +0 -30
  186. package/src/components/types/StarHorseType.ts +0 -18
  187. package/src/components/types/index.ts +0 -15
  188. package/src/config/element.ts +0 -15
  189. package/src/config/styles.ts +0 -4
  190. package/src/index.ts +0 -98
  191. package/src/install.ts +0 -33
  192. package/src/lang/en_US.ts +0 -81
  193. package/src/lang/index.ts +0 -35
  194. package/src/lang/zh_CN.ts +0 -84
  195. package/src/main.ts +0 -57
  196. package/src/plugins/AblesPlugin.ts +0 -618
  197. package/src/plugins/registerCompPlugin.ts +0 -15
  198. package/src/sample/test.vue +0 -9
  199. package/src/store/ButtonPermission.ts +0 -101
  200. package/src/store/ConsumerView.ts +0 -52
  201. package/src/store/ContinusConfig.ts +0 -78
  202. package/src/store/CopyerOperation.ts +0 -74
  203. package/src/store/DesignForm.ts +0 -481
  204. package/src/store/DesignPage.ts +0 -59
  205. package/src/store/DynamicForm.ts +0 -241
  206. package/src/store/GlobalConfig.ts +0 -90
  207. package/src/store/SelfOperation.ts +0 -95
  208. package/src/store/UserInfo.ts +0 -88
  209. package/src/store/index.ts +0 -6
  210. package/src/theme/localStorge.ts +0 -16
  211. package/src/theme/theme.ts +0 -27
  212. package/src/utils/FieldOperationUtils.ts +0 -91
  213. package/src/utils/auth.ts +0 -83
  214. package/src/utils/message.ts +0 -69
  215. package/src/utils/preview.ts +0 -125
  216. package/tsconfig.json +0 -39
  217. package/tsconfig.node.json +0 -10
  218. package/vite-env.d.ts +0 -16
  219. package/vite.config.ts +0 -162
  220. package/yarn.lock +0 -4627
@@ -1,155 +0,0 @@
1
- <script setup lang="ts">
2
- import { ModelRef, onMounted, PropType } from "vue";
3
- import { ApiUrls } from "@/components/types/ApiUrls";
4
- import { FieldInfo } from "@/components/types/PageFieldInfo";
5
- import StarHorseFormTable from "@/components/comp/StarHorseFormTable.vue";
6
- import { Config } from "@/api/settings";
7
- import { compKey } from "@/api/system";
8
-
9
- const props = defineProps({
10
- compUrl: { type: Object as PropType<ApiUrls> },
11
- item: { type: Array as PropType<any>, required: true },
12
- objectName: { type: String },
13
- // 数据索引
14
- dataIndex: { type: Number, default: -1 },
15
- // 父节点名称
16
- propPrefix: { type: String, default: "" },
17
- parentPreps: { type: Object, default: {} },
18
- subFormFlag: { type: String, default: "N" },
19
- batchName: { type: String, default: "batchDataList" },
20
- batchFieldName: { type: String, default: "batchFieldList" },
21
- primaryKey: { type: [String, Object] as PropType<string | any> },
22
- rules: { type: Object },
23
- compSize: { type: String, default: Config.compSize },
24
- source: { type: Number, default: 1 },
25
- });
26
- const emits = defineEmits(["addRow", "removeRow"]);
27
- const dataForm: ModelRef<any> = defineModel("dataForm");
28
-
29
- /**
30
- * 列表添加行数据
31
- * @param row
32
- */
33
- const addRow = (row: any) => {
34
- emits("addRow", row);
35
- };
36
- const closeOperation = (tabName: any) => {
37
- props.item.tabList?.forEach((item: any, index: number) => {
38
- if (item.tabName == tabName) {
39
- props.item.tabList.splice(index, 1);
40
- props.item.fieldName = props.item.tabList[0]?.tabName;
41
- let closeAction = props.item.closeAction;
42
- closeAction && closeAction(item);
43
- return false;
44
- }
45
- });
46
- };
47
- /**
48
- * 列表删除行数据
49
- * @param row
50
- */
51
- const removeRow = (row: any) => {
52
- emits("removeRow", row);
53
- };
54
- const init = () => {};
55
- onMounted(() => {
56
- init();
57
- });
58
- </script>
59
-
60
- <template>
61
- <template v-if="item.tabList?.length > 0">
62
- <el-tabs
63
- v-model="item.fieldName"
64
- :type="item.type || ''"
65
- @tabRemove="closeOperation"
66
- :closable="item.closable"
67
- :addable="item.addable"
68
- @tabChange="item.actions"
69
- @tabAdd="item.addActions"
70
- >
71
- <template
72
- v-for="(tabItem, key) in item.tabList"
73
- :key="compKey(tabItem, key)"
74
- >
75
- <tabPanelItem
76
- :item="tabItem"
77
- :dataIndex="dataIndex"
78
- :itemKey="key"
79
- :source="source"
80
- parentType="tab"
81
- :compUrl="compUrl"
82
- :compSize="compSize"
83
- :propPrefix="propPrefix"
84
- @addRow="addRow"
85
- v-model:dataForm="dataForm"
86
- @removeRow="removeRow"
87
- :rules="rules"
88
- />
89
- </template>
90
- </el-tabs>
91
- </template>
92
- <template v-else-if="item.batchFieldList?.length > 0">
93
- <template
94
- v-if="
95
- item.batchFieldList.length > 1 &&
96
- (!item.displayStyle || item.displayStyle == 'tab')
97
- "
98
- >
99
- <el-tabs v-model="item.fieldName" :type="item.type || ''">
100
- <template
101
- v-for="(sitem, key) in item.batchFieldList"
102
- :key="compKey(sitem, key)"
103
- >
104
- <tabPanelItem
105
- :item="sitem"
106
- :dataIndex="dataIndex"
107
- :itemKey="key"
108
- :source="source"
109
- :compUrl="compUrl"
110
- :compSize="compSize"
111
- parentType="batch"
112
- :propPrefix="propPrefix"
113
- @addRow="addRow"
114
- v-model:dataForm="dataForm"
115
- @removeRow="removeRow"
116
- :rules="rules"
117
- />
118
- </template>
119
- </el-tabs>
120
- </template>
121
- <template
122
- v-else
123
- v-for="(temp, key) in item.batchFieldList"
124
- :key="compKey(temp, key)"
125
- >
126
- <star-horse-form-table
127
- :rules="rules"
128
- :size="compSize"
129
- :item="temp"
130
- @addRow="addRow"
131
- @removeRow="removeRow"
132
- v-if="Object.keys(temp).length > 0"
133
- v-model:dataForm="dataForm"
134
- />
135
- </template>
136
- </template>
137
- </template>
138
-
139
- <style scoped lang="scss">
140
- :deep(.el-tabs__content) {
141
- height: 100% !important;
142
- flex: 1;
143
- overflow: auto;
144
- }
145
-
146
- :deep(.el-scrollbar__view) {
147
- display: flex;
148
- flex-direction: column;
149
- height: 100%;
150
- }
151
-
152
- :deep(.el-tabs) {
153
- overflow: auto !important;
154
- }
155
- </style>
@@ -1,110 +0,0 @@
1
- <script setup lang="ts">
2
- import { ModelRef, onMounted, PropType } from "vue";
3
- import { ApiUrls } from "@/components/types/ApiUrls";
4
- import { FieldInfo } from "@/components/types/PageFieldInfo";
5
- import { Config } from "@/api/settings";
6
- import { getDataIndex, getFormData, getPrefix } from "@/api/form_utils";
7
- defineProps({
8
- compUrl: { type: Object as PropType<ApiUrls> },
9
- item: { type: Array as PropType<Array<FieldInfo> | any>, required: true },
10
- // 数据索引
11
- dataIndex: { type: Number, default: -1 },
12
- itemKey: { type: [Number, String], default: 0 },
13
- // 父节点名称
14
- propPrefix: { type: String, default: "" },
15
- rules: { type: Object },
16
- compSize: { type: String, default: Config.compSize },
17
- source: { type: Number, default: 1 },
18
- parentType: { type: String, default: "" },
19
- });
20
- const emits = defineEmits(["addRow", "removeRow"]);
21
- const dataForm: ModelRef<any> = defineModel("dataForm");
22
-
23
- /**
24
- * 列表添加行数据
25
- * @param row
26
- */
27
- const addRow = (row: any) => {
28
- emits("addRow", row);
29
- };
30
- /**
31
- * 列表删除行数据
32
- * @param row
33
- */
34
- const removeRow = (row: any) => {
35
- emits("removeRow", row);
36
- };
37
- const init = () => {};
38
- onMounted(() => {
39
- init();
40
- });
41
- </script>
42
-
43
- <template>
44
- <el-tab-pane
45
- v-if="item['disVisible'] ?? Object.keys(item).length > 0"
46
- :label="item['title']"
47
- :name="item.tabName || 'tab' + itemKey"
48
- :disabled="item.disabled"
49
- class="h-full flex flex-col"
50
- >
51
- <template #label>
52
- <div class="custom-tabs-label">
53
- <star-horse-icon :icon-class="item.icon" v-if="item.icon" />
54
- <span>{{ item.title }}</span>
55
- </div>
56
- </template>
57
- <template
58
- v-if="
59
- (parentType == 'tab' && item.tableFlag != 'Y') || item.formFlag == 'Y'
60
- "
61
- >
62
- <el-scrollbar height="100%">
63
- <star-horse-form-item
64
- :source="source"
65
- :compUrl="compUrl"
66
- :compSize="compSize"
67
- @addRow="addRow"
68
- @removeRow="removeRow"
69
- :objectName="item.objectName"
70
- :dataForm="
71
- getFormData(item, dataForm, propPrefix, dataIndex, itemKey)
72
- "
73
- :dataIndex="getDataIndex(item, propPrefix, dataIndex, itemKey)"
74
- :propPrefix="getPrefix(item, propPrefix, dataIndex, itemKey)"
75
- :fieldList="{ ...item }"
76
- :rules="rules"
77
- :subFormFlag="item.subFormFlag"
78
- :primaryKey="item.primaryKey"
79
- />
80
- </el-scrollbar>
81
- </template>
82
- <star-horse-form-table
83
- v-else-if="parentType == 'batch' || item.tableFlag == 'Y'"
84
- :size="compSize"
85
- @addRow="addRow"
86
- @removeRow="removeRow"
87
- :rules="rules"
88
- :item="item"
89
- v-model:dataForm="dataForm"
90
- />
91
- </el-tab-pane>
92
- </template>
93
-
94
- <style scoped lang="scss">
95
- :deep(.el-tabs__content) {
96
- height: 100% !important;
97
- flex: 1;
98
- overflow: auto;
99
- }
100
-
101
- :deep(.el-scrollbar__view) {
102
- display: flex;
103
- flex-direction: column;
104
- height: 100%;
105
- }
106
-
107
- :deep(.el-tabs) {
108
- overflow: auto !important;
109
- }
110
- </style>
@@ -1,129 +0,0 @@
1
- <script setup lang="ts">
2
- import { PropType } from "vue";
3
- import { ApiUrls } from "@/components/types/ApiUrls";
4
- import { Config } from "@/api/settings";
5
- import { compKey } from "@/api/system";
6
-
7
- defineProps({
8
- //url地址
9
- compUrl: { type: Object as PropType<ApiUrls>, required: true },
10
- //列名
11
- fieldList: { type: Object, required: true },
12
- //格式化方法
13
- dataFormat: { type: Function, default: null },
14
- //是否显示排序
15
- sortable: { type: Boolean, default: true },
16
- //是否显示批量属性
17
- showBatchField: { type: Boolean, default: false },
18
- compSize: { type: String, default: Config.compSize },
19
- //全局配置,动态页面使用
20
- globalConfig: { type: Object as PropType<any>, required: false },
21
- //是否动态页面
22
- isDynamic: { type: Boolean, default: false },
23
- });
24
- </script>
25
- <template>
26
- <template
27
- v-for="(item, index) in fieldList?.fieldList"
28
- :key="compKey(item, index)"
29
- >
30
- <template v-if="Array.isArray(item)">
31
- <star-horse-table-column
32
- :data-format="dataFormat"
33
- :cellEditable="fieldList['cellEditable']"
34
- :item="sitem"
35
- :globalConfig="globalConfig"
36
- :isDynamic="isDynamic"
37
- :sortable="sortable"
38
- :compSize="compSize"
39
- :compUrl="compUrl"
40
- :key="compKey(sitem, key)"
41
- v-for="(sitem, key) in item"
42
- />
43
- </template>
44
- <template v-else-if="item.tabList?.length > 0">
45
- <template
46
- v-for="(tabItems, key) in item.tabList"
47
- :key="compKey(tabItems, key)"
48
- >
49
- <star-horse-table-column
50
- :data-format="dataFormat"
51
- :cellEditable="fieldList['cellEditable']"
52
- :item="sitem"
53
- :globalConfig="globalConfig"
54
- :isDynamic="isDynamic"
55
- :sortable="sortable"
56
- :compSize="compSize"
57
- :compUrl="compUrl"
58
- :key="compKey(sitem, skey)"
59
- v-for="(sitem, skey) in tabItems.fieldList"
60
- />
61
- </template>
62
- </template>
63
- <template v-else-if="item.dytableList?.length > 0">
64
- <template
65
- v-for="(tabItems, key) in item.dytableList"
66
- :key="compKey(tabItems, key)"
67
- >
68
- <star-horse-table-column
69
- :data-format="dataFormat"
70
- :cellEditable="fieldList['cellEditable']"
71
- :item="sitem"
72
- :globalConfig="globalConfig"
73
- :isDynamic="isDynamic"
74
- :sortable="sortable"
75
- :compSize="compSize"
76
- :compUrl="compUrl"
77
- :key="compKey(sitem, skey)"
78
- v-for="(sitem, skey) in tabItems"
79
- />
80
- </template>
81
- </template>
82
- <template v-else-if="item.batchFieldList?.length > 0">
83
- <template
84
- v-for="(batchItems, key) in item.batchFieldList"
85
- :key="compKey(batchItems, key)"
86
- >
87
- <star-horse-table-column
88
- :data-format="dataFormat"
89
- :cellEditable="fieldList['cellEditable']"
90
- :item="sitem"
91
- :globalConfig="globalConfig"
92
- :isDynamic="isDynamic"
93
- :sortable="sortable"
94
- :compSize="compSize"
95
- :compUrl="compUrl"
96
- :key="compKey(sitem, skey)"
97
- v-for="(sitem, skey) in batchItems.fieldList"
98
- />
99
- </template>
100
- </template>
101
- <star-horse-table-column
102
- v-else
103
- :compUrl="compUrl"
104
- :cellEditable="fieldList['cellEditable']"
105
- :globalConfig="globalConfig"
106
- :isDynamic="isDynamic"
107
- :data-format="dataFormat"
108
- :sortable="sortable"
109
- :compSize="compSize"
110
- :item="item"
111
- />
112
- </template>
113
- <template
114
- v-if="showBatchField"
115
- v-for="item in fieldList['batchFieldList']"
116
- :key="compKey(item, item.batchName)"
117
- >
118
- <star-horse-table-column
119
- :data-format="dataFormat"
120
- :compSize="compSize"
121
- :globalConfig="globalConfig"
122
- :isDynamic="isDynamic"
123
- :sortable="sortable"
124
- :item="item"
125
- />
126
- </template>
127
- </template>
128
-
129
- <style scoped lang="scss"></style>
@@ -1,97 +0,0 @@
1
- <script setup lang="ts">
2
- import { ModelRef, onMounted, PropType } from "vue";
3
- import { ApiUrls } from "@/components/types/ApiUrls";
4
- import { PageFieldInfo } from "@/components/types/PageFieldInfo";
5
- import StarHorseFormTable from "@/components/comp/StarHorseFormTable.vue";
6
- import { Config } from "@/api/settings";
7
- import { compKey } from "@/api/system";
8
-
9
- const props = defineProps({
10
- compUrl: { type: Object as PropType<ApiUrls> },
11
- item: { type: Object as PropType<PageFieldInfo | any>, required: true },
12
- objectName: { type: String },
13
- // 数据索引
14
- dataIndex: { type: Number, default: -1 },
15
- subFormFlag: { type: String, default: "N" },
16
- batchName: { type: String, default: "batchDataList" },
17
- batchFieldName: { type: String, default: "batchFieldList" },
18
- primaryKey: {
19
- type: [String, Object] as PropType<string | any>,
20
- required: true,
21
- },
22
- rules: { type: Object },
23
- compSize: { type: String, default: Config.compSize },
24
- source: { type: Number, default: 1 },
25
- });
26
- const emits = defineEmits(["addRow", "removeRow"]);
27
- const dataForm: ModelRef<any> = defineModel("dataForm");
28
- const init = () => {};
29
- /**
30
- * 列表添加行数据
31
- * @param row
32
- */
33
- const addRow = (row: any) => {
34
- emits("addRow", row);
35
- };
36
- /**
37
- * 列表删除行数据
38
- * @param row
39
- */
40
- const removeRow = (row: any) => {
41
- emits("removeRow", row);
42
- };
43
- onMounted(() => {
44
- init();
45
- });
46
- </script>
47
-
48
- <template>
49
- <template
50
- v-if="
51
- item[batchFieldName]?.length > 1 &&
52
- (!item.displayStyle || item.displayStyle == 'tab')
53
- "
54
- >
55
- <el-tabs v-model="item.fieldName">
56
- <template
57
- v-for="(temp, key) in item[batchFieldName]"
58
- :key="compKey(temp, key)"
59
- >
60
- <el-tab-pane
61
- :label="temp['title']"
62
- v-if="
63
- Object.keys(temp).includes('disVisible') ? temp['disVisible'] : true
64
- "
65
- :name="temp.tabName || 'sub_tab' + key"
66
- :disabled="temp.disabled"
67
- class="h-full flex flex-col"
68
- >
69
- <star-horse-form-table
70
- :size="compSize"
71
- @addRow="addRow"
72
- @removeRow="removeRow"
73
- :rules="rules"
74
- :item="temp"
75
- v-model:dataForm="dataForm"
76
- />
77
- </el-tab-pane>
78
- </template>
79
- </el-tabs>
80
- </template>
81
- <template
82
- v-else
83
- v-for="(temp, key) in item[batchFieldName]"
84
- :key="compKey(temp, key)"
85
- >
86
- <star-horse-form-table
87
- :size="compSize"
88
- :rules="rules"
89
- @addRow="addRow"
90
- @removeRow="removeRow"
91
- :item="temp"
92
- v-model:dataForm="dataForm"
93
- />
94
- </template>
95
- </template>
96
-
97
- <style scoped lang="scss"></style>
@@ -1,158 +0,0 @@
1
- <script setup lang="ts">
2
- import { nextTick, onMounted, PropType, ref } from "vue";
3
- import { UserFuncInfo } from "@/components/types/PageFieldInfo";
4
- import { BtnHideCondition } from "@/components/types/Params";
5
- import { Config } from "@/api/settings";
6
- import { compKey } from "@/api/system";
7
-
8
- const props = defineProps({
9
- //按钮列表
10
- buttonList: { type: Array as PropType<UserFuncInfo[]>, required: true },
11
- //权限
12
- permissions: { type: Object as PropType<Permissions>, required: true },
13
- //数据
14
- row: { type: Object, required: true },
15
- //按钮隐藏条件
16
- hideBtnCondition: {
17
- type: Array as PropType<BtnHideCondition[]>,
18
- default: [],
19
- },
20
- //按钮大小
21
- compSize: { type: String, default: Config.compSize },
22
- //按钮默认显示限制,超出按钮个数则折叠显示
23
- showLimit: { type: Number, default: 3 },
24
- });
25
- let validButtonList = ref<UserFuncInfo[] | any>([]);
26
- /**
27
- * 过滤掉需要隐藏的按钮
28
- */
29
- const init = () => {
30
- let btnList: UserFuncInfo[] = props.buttonList;
31
- validButtonList.value = [];
32
- for (let i in btnList) {
33
- let temp: UserFuncInfo = btnList[i];
34
- if (
35
- btnHideCheck(temp.authority, props.row) &&
36
- Object.keys(props.permissions).includes(temp.authority!)
37
- ) {
38
- validButtonList.value.push(temp);
39
- }
40
- }
41
- };
42
-
43
- /**
44
- * 判断按钮是否需要隐藏
45
- * @param btn
46
- * @param row
47
- */
48
- const btnHideCheck = (btn: string, row: any) => {
49
- let cond = props.hideBtnCondition;
50
- if (!cond || cond.length == 0) {
51
- return true;
52
- }
53
- let flag = false,
54
- hasBtn = false;
55
- for (let i in cond) {
56
- let temp = cond[i];
57
- if (temp.btnName.includes(btn)) {
58
- hasBtn = true;
59
- if (Array.isArray(temp.value)) {
60
- if (!temp.value.includes(row[temp.fieldName])) {
61
- flag = true;
62
- break;
63
- }
64
- } else if (row[temp.fieldName] != temp.value) {
65
- flag = true;
66
- break;
67
- }
68
- }
69
- }
70
- return hasBtn ? flag : true;
71
- };
72
- onMounted(() => {
73
- nextTick(() => {
74
- init();
75
- });
76
- });
77
- </script>
78
-
79
- <template>
80
- <template v-if="validButtonList.length > 3">
81
- <el-tooltip
82
- :content="item.btnName"
83
- v-for="(item, key) in validButtonList.slice(0, 3)"
84
- :key="compKey(item, key)"
85
- >
86
- <star-horse-icon
87
- v-if="permissions[item.authority!]"
88
- @click="item.funcName!(row)"
89
- :icon-class="item.icon || 'edit'"
90
- style="cursor: pointer"
91
- :color="
92
- item.authority == 'delete'
93
- ? 'var(--el-color-danger)'
94
- : 'var(--star-horse-style)'
95
- "
96
- />
97
- </el-tooltip>
98
- <el-dropdown>
99
- <span class="el-dropdown-link">
100
- <star-horse-icon
101
- icon-class="ellipsis"
102
- style="color: var(--star-horse-style)"
103
- />
104
- </span>
105
- <template #dropdown>
106
- <el-dropdown-menu>
107
- <el-dropdown-item
108
- v-for="(auth, key) in validButtonList.slice(
109
- 3,
110
- validButtonList.length,
111
- )"
112
- :key="compKey(auth, key)"
113
- :v-if="permissions[auth.authority!]"
114
- >
115
- <el-button
116
- @click="auth.funcName(row)"
117
- link
118
- title=""
119
- style="cursor: pointer; color: var(--star-horse-style)"
120
- :size="compSize"
121
- >
122
- <star-horse-icon
123
- :icon-class="auth.icon || 'edit'"
124
- :color="
125
- auth.authority == 'delete'
126
- ? 'var(--el-color-danger)'
127
- : 'var(--star-horse-style)'
128
- "
129
- />
130
- {{ auth["btnName"] }}
131
- </el-button>
132
- </el-dropdown-item>
133
- </el-dropdown-menu>
134
- </template>
135
- </el-dropdown>
136
- </template>
137
- <template v-else>
138
- <el-tooltip
139
- :content="item.btnName"
140
- v-for="(item, key) in validButtonList"
141
- :key="compKey(item, key)"
142
- >
143
- <star-horse-icon
144
- v-if="permissions[item.authority]"
145
- @click="item.funcName(row)"
146
- :icon-class="item.icon || 'edit'"
147
- style="cursor: pointer"
148
- :color="
149
- item.authority == 'delete'
150
- ? 'var(--el-color-danger)'
151
- : 'var(--star-horse-style)'
152
- "
153
- />
154
- </el-tooltip>
155
- </template>
156
- </template>
157
-
158
- <style scoped lang="scss"></style>
@@ -1,55 +0,0 @@
1
- <script setup lang="ts">
2
- import { ModelRef, onMounted, PropType, unref } 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 tempForm = unref(dataForm);
14
- if (!tempForm) {
15
- return "--";
16
- }
17
- let val = tempForm[name];
18
- try {
19
- return props.commonFormat(name, val, tempForm);
20
- } catch (e) {
21
- return val || "--";
22
- }
23
- };
24
- const init = () => {};
25
- onMounted(() => {
26
- init();
27
- });
28
- </script>
29
-
30
- <template>
31
- <el-row v-if="Array.isArray(item)" :gutter="0">
32
- <el-col
33
- :span="sitem.colspan || sitem.preps?.colspan || 24 / item.length"
34
- v-for="(sitem, ind) in item"
35
- :key="compKey(sitem, ind)"
36
- >
37
- <div
38
- class="item"
39
- v-if="sitem.formVisible || sitem.listVisible || sitem.viewVisible"
40
- >
41
- <label>{{ sitem.label }} :</label>
42
- <div class="content">
43
- <pre v-if="sitem.type == 'textarea' || sitem.type == 'markdown'">{{
44
- dataFormat(sitem)
45
- }}</pre>
46
- <el-tooltip :content="dataFormat(sitem)" v-else>
47
- {{ dataFormat(sitem) }}
48
- </el-tooltip>
49
- </div>
50
- </div>
51
- </el-col>
52
- </el-row>
53
- </template>
54
-
55
- <style scoped lang="scss"></style>