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.
Files changed (221) hide show
  1. package/.env.development +3 -0
  2. package/.env.production +3 -0
  3. package/.eslintrc-auto-import.json +77 -0
  4. package/.gitignore +27 -0
  5. package/.idea/.gitignore +5 -0
  6. package/.idea/MarsCodeWorkspaceAppSettings.xml +6 -0
  7. package/.idea/inspectionProfiles/Project_Default.xml +7 -0
  8. package/.idea/modules.xml +8 -0
  9. package/.idea/testcode.iml +12 -0
  10. package/.idea/vcs.xml +6 -0
  11. package/.idea/watcherTasks.xml +4 -0
  12. package/.idea/workspace.xml +207 -0
  13. package/.npmignore +21 -0
  14. package/.prettierignore +26 -0
  15. package/README.md +2 -0
  16. package/auto-imports.d.ts +137 -0
  17. package/components.d.ts +189 -0
  18. package/dist/assets/index.css +1 -1
  19. package/dist/index.es.js +941 -720
  20. package/dist/types/index.d.ts +8 -8
  21. package/eslint.config.js +37 -0
  22. package/index.html +14 -0
  23. package/package-lock.json +8276 -0
  24. package/package.json +6 -6
  25. package/prettier.config.js +20 -0
  26. package/public/logo.svg +660 -0
  27. package/src/App.vue +11 -0
  28. package/src/api/date_utils.ts +219 -0
  29. package/src/api/finger_utils.ts +71 -0
  30. package/src/api/form_utils.ts +281 -0
  31. package/src/api/jquery.min.js +2 -0
  32. package/src/api/pcas-code.json +1 -0
  33. package/src/api/settings.ts +81 -0
  34. package/src/api/star_horse_apis.ts +196 -0
  35. package/src/api/star_horse_utils.ts +797 -0
  36. package/src/api/system.ts +351 -0
  37. package/src/api/user_func.ts +147 -0
  38. package/src/api/valid_utils.ts +165 -0
  39. package/src/assets/css/index.scss +908 -0
  40. package/src/assets/icons.css +574 -0
  41. package/src/assets/star-horse-icons.woff +0 -0
  42. package/src/components/comp/ShDynamicForm.vue +160 -0
  43. package/src/components/comp/ShForm.vue +30 -0
  44. package/src/components/comp/ShTableListColumn.vue +61 -0
  45. package/src/components/comp/StarHorseDataSelector.vue +139 -0
  46. package/src/components/comp/StarHorseDataView.vue +110 -0
  47. package/src/components/comp/StarHorseDataViewItems.vue +61 -0
  48. package/src/components/comp/StarHorseDataViewTable.vue +102 -0
  49. package/src/components/comp/StarHorseDialog.vue +383 -0
  50. package/src/components/comp/StarHorseDraggable.vue +401 -0
  51. package/src/components/comp/StarHorseForm.vue +458 -0
  52. package/src/components/comp/StarHorseFormItem.vue +82 -0
  53. package/src/components/comp/StarHorseFormList.vue +516 -0
  54. package/src/components/comp/StarHorseFormTable.vue +56 -0
  55. package/src/components/comp/StarHorseIcon.vue +76 -0
  56. package/src/components/comp/StarHorseItem.vue +302 -0
  57. package/src/components/comp/StarHorseJsonEditor.vue +115 -0
  58. package/src/components/comp/StarHorsePopover.vue +66 -0
  59. package/src/components/comp/StarHorseSearchComp.vue +253 -0
  60. package/src/components/comp/StarHorseStaticTable.vue +395 -0
  61. package/src/components/comp/StarHorseTableColumn.vue +249 -0
  62. package/src/components/comp/StarHorseTableComp.vue +1193 -0
  63. package/src/components/comp/StarHorseTableViewColumn.vue +61 -0
  64. package/src/components/comp/StarHorseTree.vue +494 -0
  65. package/src/components/comp/index.ts +22 -0
  66. package/src/components/comp/items/UTableColumn.vue +65 -0
  67. package/src/components/comp/items/boxItem.vue +98 -0
  68. package/src/components/comp/items/callitem.ts +9 -0
  69. package/src/components/comp/items/cardItem.vue +152 -0
  70. package/src/components/comp/items/collapseItem.vue +134 -0
  71. package/src/components/comp/items/dytableItem.vue +135 -0
  72. package/src/components/comp/items/otherItem.vue +65 -0
  73. package/src/components/comp/items/tabItem.vue +155 -0
  74. package/src/components/comp/items/tabPanelItem.vue +110 -0
  75. package/src/components/comp/items/tableColumn.vue +129 -0
  76. package/src/components/comp/items/tableItem.vue +97 -0
  77. package/src/components/comp/items/tablebtn.vue +158 -0
  78. package/src/components/comp/items/viewBoxItem.vue +55 -0
  79. package/src/components/comp/items/viewCardItem.vue +47 -0
  80. package/src/components/comp/items/viewCollapseItem.vue +71 -0
  81. package/src/components/comp/items/viewDytableItem.vue +77 -0
  82. package/src/components/comp/items/viewOtherItem.vue +55 -0
  83. package/src/components/comp/items/viewTabItem.vue +77 -0
  84. package/src/components/comp/items/viewTabPanelItem.vue +54 -0
  85. package/src/components/comp/items/viewTableItem.vue +74 -0
  86. package/src/components/comp/selfcomp.ts +9 -0
  87. package/src/components/comp/utils/DataPicker.vue +302 -0
  88. package/src/components/comp/utils/DataTag.vue +51 -0
  89. package/src/components/cron/Crontab-Day.vue +230 -0
  90. package/src/components/cron/Crontab-Hour.vue +165 -0
  91. package/src/components/cron/Crontab-Min.vue +166 -0
  92. package/src/components/cron/Crontab-Month.vue +166 -0
  93. package/src/components/cron/Crontab-Result.vue +615 -0
  94. package/src/components/cron/Crontab-Second.vue +185 -0
  95. package/src/components/cron/Crontab-Week.vue +208 -0
  96. package/src/components/cron/Crontab-Year.vue +183 -0
  97. package/src/components/cron/Crontab.vue +474 -0
  98. package/src/components/enums/ModuleEnums.ts +10 -0
  99. package/src/components/enums/ServiceEnums.ts +18 -0
  100. package/src/components/formcomp/container/box-container.vue +162 -0
  101. package/src/components/formcomp/container/callitem.ts +9 -0
  102. package/src/components/formcomp/container/card-container.vue +170 -0
  103. package/src/components/formcomp/container/collapse-container.vue +133 -0
  104. package/src/components/formcomp/container/dytable-col.vue +448 -0
  105. package/src/components/formcomp/container/dytable-container.vue +57 -0
  106. package/src/components/formcomp/container/dytableUtils.ts +358 -0
  107. package/src/components/formcomp/container/group-box-container.vue +331 -0
  108. package/src/components/formcomp/container/index.ts +6 -0
  109. package/src/components/formcomp/container/tab-container.vue +153 -0
  110. package/src/components/formcomp/container/table-container.vue +249 -0
  111. package/src/components/formcomp/items/allitem.ts +9 -0
  112. package/src/components/formcomp/items/area-item.vue +116 -0
  113. package/src/components/formcomp/items/audio-item.vue +163 -0
  114. package/src/components/formcomp/items/autocomplete-item.vue +118 -0
  115. package/src/components/formcomp/items/barcode-item.vue +87 -0
  116. package/src/components/formcomp/items/base-json-item.vue +207 -0
  117. package/src/components/formcomp/items/button-item.vue +228 -0
  118. package/src/components/formcomp/items/cascade-item.vue +113 -0
  119. package/src/components/formcomp/items/checkbox-item.vue +97 -0
  120. package/src/components/formcomp/items/color-item.vue +70 -0
  121. package/src/components/formcomp/items/cron-item.vue +115 -0
  122. package/src/components/formcomp/items/datetime-item.vue +99 -0
  123. package/src/components/formcomp/items/depart-item.vue +51 -0
  124. package/src/components/formcomp/items/dialog-input-item.vue +207 -0
  125. package/src/components/formcomp/items/divider-item.vue +66 -0
  126. package/src/components/formcomp/items/html-item.vue +65 -0
  127. package/src/components/formcomp/items/htmleditor-item.vue +104 -0
  128. package/src/components/formcomp/items/icon-item.vue +195 -0
  129. package/src/components/formcomp/items/image-item.vue +247 -0
  130. package/src/components/formcomp/items/index.ts +44 -0
  131. package/src/components/formcomp/items/input-item.vue +150 -0
  132. package/src/components/formcomp/items/json-array-item.vue +67 -0
  133. package/src/components/formcomp/items/json-item.vue +66 -0
  134. package/src/components/formcomp/items/markdown-item.vue +77 -0
  135. package/src/components/formcomp/items/number-item.vue +94 -0
  136. package/src/components/formcomp/items/number-range-item.vue +278 -0
  137. package/src/components/formcomp/items/page-select-item.vue +407 -0
  138. package/src/components/formcomp/items/password-item.vue +71 -0
  139. package/src/components/formcomp/items/qrcode-item.vue +84 -0
  140. package/src/components/formcomp/items/radio-item.vue +112 -0
  141. package/src/components/formcomp/items/rate-item.vue +68 -0
  142. package/src/components/formcomp/items/select-item.vue +133 -0
  143. package/src/components/formcomp/items/signature-item.vue +216 -0
  144. package/src/components/formcomp/items/slider-item.vue +68 -0
  145. package/src/components/formcomp/items/starhorse-form-item.vue +334 -0
  146. package/src/components/formcomp/items/switch-item.vue +77 -0
  147. package/src/components/formcomp/items/tag-item.vue +77 -0
  148. package/src/components/formcomp/items/text-item.vue +75 -0
  149. package/src/components/formcomp/items/textarea-item.vue +85 -0
  150. package/src/components/formcomp/items/time-item.vue +77 -0
  151. package/src/components/formcomp/items/time-picker-item.vue +74 -0
  152. package/src/components/formcomp/items/transfer-item.vue +93 -0
  153. package/src/components/formcomp/items/tselect-item.vue +121 -0
  154. package/src/components/formcomp/items/unknown-item.vue +51 -0
  155. package/src/components/formcomp/items/upload-item.vue +189 -0
  156. package/src/components/formcomp/items/user-item.vue +177 -0
  157. package/src/components/formcomp/items/usercomp-item.vue +85 -0
  158. package/src/components/formcomp/items/view-markdown-item.vue +77 -0
  159. package/src/components/formcomp/utils/EditDataDialog.vue +67 -0
  160. package/src/components/formcomp/utils/FieldList.vue +125 -0
  161. package/src/components/formcomp/utils/ItemRelationEventUtils.ts +284 -0
  162. package/src/components/help.vue +31 -0
  163. package/src/components/menu/MenuItem.vue +95 -0
  164. package/src/components/menu/SubMenu.vue +68 -0
  165. package/src/components/menu/SubSystemMenu.vue +142 -0
  166. package/src/components/register.ts +24 -0
  167. package/src/components/system/ContentMenu.vue +260 -0
  168. package/src/components/system/StarHorseButtonList.vue +344 -0
  169. package/src/components/system/StarHorseMenu.vue +97 -0
  170. package/src/components/system/StarHorseSvg.vue +62 -0
  171. package/src/components/system/SystemComp.ts +9 -0
  172. package/src/components/system/index.ts +4 -0
  173. package/src/components/types/ApiUrls.ts +168 -0
  174. package/src/components/types/BtnAction.ts +51 -0
  175. package/src/components/types/BtnAuth.ts +43 -0
  176. package/src/components/types/CompInfo.ts +81 -0
  177. package/src/components/types/DialogProps.ts +55 -0
  178. package/src/components/types/DyCompField.ts +23 -0
  179. package/src/components/types/DynamicNode.ts +42 -0
  180. package/src/components/types/MenusInfo.ts +45 -0
  181. package/src/components/types/PageFieldInfo.ts +530 -0
  182. package/src/components/types/PageProps.ts +25 -0
  183. package/src/components/types/Params.ts +93 -0
  184. package/src/components/types/RuleType.ts +10 -0
  185. package/src/components/types/SearchProps.ts +42 -0
  186. package/src/components/types/ShortKey.ts +30 -0
  187. package/src/components/types/StarHorseType.ts +18 -0
  188. package/src/components/types/index.ts +15 -0
  189. package/src/config/element.ts +15 -0
  190. package/src/config/styles.ts +4 -0
  191. package/src/index.ts +98 -0
  192. package/src/install.ts +33 -0
  193. package/src/lang/en_US.ts +81 -0
  194. package/src/lang/index.ts +35 -0
  195. package/src/lang/zh_CN.ts +84 -0
  196. package/src/main.ts +57 -0
  197. package/src/plugins/AblesPlugin.ts +618 -0
  198. package/src/plugins/registerCompPlugin.ts +15 -0
  199. package/src/sample/test.vue +9 -0
  200. package/src/store/ButtonPermission.ts +101 -0
  201. package/src/store/ConsumerView.ts +52 -0
  202. package/src/store/ContinusConfig.ts +78 -0
  203. package/src/store/CopyerOperation.ts +74 -0
  204. package/src/store/DesignForm.ts +481 -0
  205. package/src/store/DesignPage.ts +59 -0
  206. package/src/store/DynamicForm.ts +241 -0
  207. package/src/store/GlobalConfig.ts +90 -0
  208. package/src/store/SelfOperation.ts +95 -0
  209. package/src/store/UserInfo.ts +88 -0
  210. package/src/store/index.ts +6 -0
  211. package/src/theme/localStorge.ts +16 -0
  212. package/src/theme/theme.ts +27 -0
  213. package/src/utils/FieldOperationUtils.ts +91 -0
  214. package/src/utils/auth.ts +83 -0
  215. package/src/utils/message.ts +69 -0
  216. package/src/utils/preview.ts +125 -0
  217. package/tsconfig.json +39 -0
  218. package/tsconfig.node.json +10 -0
  219. package/vite-env.d.ts +16 -0
  220. package/vite.config.ts +162 -0
  221. package/yarn.lock +4627 -0
@@ -0,0 +1,101 @@
1
+ import { defineStore } from "pinia";
2
+ import { ref, unref } from "vue";
3
+ import { RouteLocationNormalized } from "vue-router";
4
+ import { postRequest } from "@/api/star_horse_apis";
5
+ import { getUserInfo } from "@/utils/auth";
6
+ import { warning } from "@/utils/message";
7
+
8
+ /**
9
+ * 用户权限控制
10
+ */
11
+ export const useButtonPermissionStore = defineStore("buttonPermission", () => {
12
+ const pageBtnPermisson = ref<any>({});
13
+ const currentPermission = ref<any>({});
14
+ const permissionUrlPrefix = ref<string>(
15
+ "/system-config/system/resourcesEntity/permissionResources/",
16
+ );
17
+ const addRoute = async (route: RouteLocationNormalized) => {
18
+ //如果当前路由为空,则获取宿主的路由
19
+ let data: any =
20
+ route ?? (window.__hostRouter__?.currentRoute || window.__hostRouter__);
21
+ const meta: any = unref(data)?.meta;
22
+ return await getPagePermission(meta?.menuId);
23
+ };
24
+ const setPermissionUrl = (url: string) => {
25
+ permissionUrlPrefix.value = url;
26
+ };
27
+ /**
28
+ * 添加单个权限
29
+ * @param menuId
30
+ * @param data
31
+ */
32
+ const addPermission = (menuId: string, data: any) => {
33
+ pageBtnPermisson.value[menuId] = data;
34
+ };
35
+ /**
36
+ * 删除某个菜单权限
37
+ * @param menuId
38
+ */
39
+ const removePermission = (menuId: string) => {
40
+ delete pageBtnPermisson.value[menuId];
41
+ };
42
+ /**
43
+ *
44
+ * @param data
45
+ */
46
+ const addAllPermission = (data: any) => {
47
+ pageBtnPermisson.value = data;
48
+ };
49
+ /**
50
+ * 清空所有权限
51
+ */
52
+ const cleanPermission = () => {
53
+ pageBtnPermisson.value = {};
54
+ };
55
+ const getPagePermission = async (menuId: string) => {
56
+ currentPermission.value = [];
57
+ if (menuId) {
58
+ menuId = menuId.split("_")[1];
59
+ let permissons: any = [];
60
+ if (!permissons || permissons.length == 0) {
61
+ const userId = getUserInfo()?.idUsersinfo;
62
+ if (!userId) {
63
+ warning("Session 失效");
64
+ return;
65
+ }
66
+ //没拿到则到数据库中去取
67
+ await postRequest(
68
+ `${permissionUrlPrefix.value}${userId}/${menuId}`,
69
+ {},
70
+ ).then((res) => {
71
+ if (res.data.code) {
72
+ console.log(res.data.cnMessage);
73
+ return;
74
+ }
75
+ permissons = res.data.data;
76
+ });
77
+ if (permissons && permissons.length > 0) {
78
+ addPermission(menuId, permissons);
79
+ } else {
80
+ warning("没有页面按钮操作权限,请联系系统管理员授权");
81
+ }
82
+ }
83
+ const permission: any = {};
84
+ permissons?.forEach((item: any) => {
85
+ permission[item.resCode] = item.resCode;
86
+ });
87
+ currentPermission.value = permission;
88
+ }
89
+ return currentPermission.value;
90
+ };
91
+ return {
92
+ pageBtnPermisson,
93
+ currentPermission,
94
+ setPermissionUrl,
95
+ addPermission,
96
+ addAllPermission,
97
+ addRoute,
98
+ removePermission,
99
+ cleanPermission,
100
+ };
101
+ });
@@ -0,0 +1,52 @@
1
+ import { defineStore } from "pinia";
2
+ import { ref } from "vue";
3
+
4
+ export const useConsumerViewStore = defineStore(
5
+ "consumerView",
6
+ () => {
7
+ const tableList = ref<any>({});
8
+ const dbConfigId = ref<string>("");
9
+
10
+ /**
11
+ *赋值
12
+ * @param tableName 表名
13
+ * @param data 字典列表
14
+ */
15
+ const addTableInfo = (tableName: string, data: object | Array<any>) => {
16
+ tableList.value[tableName] = data;
17
+ };
18
+ /**
19
+ * 设置数据库配置id
20
+ *
21
+ * @param configId
22
+ */
23
+ const setDbConfigId = (configId: string) => {
24
+ dbConfigId.value = configId;
25
+ };
26
+ /**
27
+ * 根据表名获取字段信息
28
+ * @param tableName 表名
29
+ */
30
+ const getTableInfo = (tableName: string) => {
31
+ return tableList.value[tableName];
32
+ };
33
+ /**
34
+ * 清除所有Tab
35
+ */
36
+ const clearAll = () => {
37
+ tableList.value = {};
38
+ };
39
+
40
+ return {
41
+ tableList,
42
+ dbConfigId,
43
+ addTableInfo,
44
+ setDbConfigId,
45
+ getTableInfo,
46
+ clearAll,
47
+ };
48
+ },
49
+ {
50
+ persist: false,
51
+ },
52
+ );
@@ -0,0 +1,78 @@
1
+ import { defineStore } from "pinia";
2
+ import { ref } from "vue";
3
+
4
+ export const useContinusConfigStore = defineStore(
5
+ "continuousConfig",
6
+ () => {
7
+ /**
8
+ * 节点信息
9
+ */
10
+ const nodeInfo = ref<any>({});
11
+ const nodeFields = ref<any>({});
12
+
13
+ /**
14
+ * 添加节点数据
15
+ * @param nodeName
16
+ * @param data
17
+ */
18
+ const addNodeInfo = (nodeName: string, data: any) => {
19
+ if (nodeName) {
20
+ nodeInfo.value[nodeName] = data;
21
+ }
22
+ };
23
+ /**
24
+ * 添加节点属性
25
+ * @param formNo 表单编号
26
+ * @param data
27
+ */
28
+ const addNodeFields = (formNo: string, data: any) => {
29
+ if (formNo) {
30
+ nodeFields.value[formNo] = data;
31
+ }
32
+ };
33
+ /**
34
+ * 获取节点数据
35
+ * @param nodeName
36
+ */
37
+ const getNodeInfo = (nodeName: string) => {
38
+ return nodeInfo.value[nodeName];
39
+ };
40
+ /**
41
+ * 获取节点属性
42
+ * @param formNo
43
+ */
44
+ const getNodeFields = (formNo: string) => {
45
+ return nodeFields.value[formNo];
46
+ };
47
+ /**
48
+ * 移除节点数据
49
+ * @param nodeName
50
+ */
51
+ const removeNode = (nodeName: string) => {
52
+ delete nodeInfo.value[nodeName];
53
+ };
54
+
55
+ const removeNodeFields = (formNo: string) => {
56
+ delete nodeFields.value[formNo];
57
+ };
58
+ /**
59
+ * 清空节点数据
60
+ */
61
+ const clear = () => {
62
+ nodeInfo.value = {};
63
+ nodeFields.value = {};
64
+ };
65
+ return {
66
+ addNodeInfo,
67
+ addNodeFields,
68
+ getNodeFields,
69
+ removeNodeFields,
70
+ getNodeInfo,
71
+ removeNode,
72
+ clear,
73
+ nodeInfo,
74
+ nodeFields,
75
+ };
76
+ },
77
+ {},
78
+ );
@@ -0,0 +1,74 @@
1
+ import { defineStore } from "pinia";
2
+ import { ref } from "vue";
3
+ import { ModuleEnums } from "@/components/enums/ModuleEnums";
4
+ import { message } from "@/utils/message";
5
+
6
+ /**
7
+ * 用户自定义方法处理逻辑
8
+ */
9
+ export const useCopyerOperationStore = defineStore("copyerOperation", () => {
10
+ //执行的动作
11
+ const action = ref<string>("");
12
+ //模块
13
+ const module = ref<ModuleEnums>();
14
+ //父级容器
15
+ const parentContainer = ref<any>({});
16
+ //拷贝数据
17
+ const copyerData = ref<any>({});
18
+
19
+ const keyboardOperation = (
20
+ act: string,
21
+ m: ModuleEnums,
22
+ container: any,
23
+ data: any,
24
+ ) => {
25
+ operation(act, container, data);
26
+ module.value = m;
27
+ };
28
+ /**
29
+ * 执行操作
30
+ * @param act 操作动作
31
+ * @param container 父级容器
32
+ * @param data 数据
33
+ */
34
+ const operation = (act: string, container: any, data: any) => {
35
+ action.value = act;
36
+ parentContainer.value = container;
37
+ copyerData.value = data;
38
+ if (act == "copy") {
39
+ message("复制成功");
40
+ } else if (act == "cut") {
41
+ message("剪切成功");
42
+ }
43
+ };
44
+ //设置动作
45
+ const setAction = (act: string) => {
46
+ action.value = act;
47
+ };
48
+ //设置父级容器
49
+ const setParentContainer = (container: any) => {
50
+ parentContainer.value = container;
51
+ };
52
+ //设置拷贝数据
53
+ const setCopyerData = (data: any) => {
54
+ copyerData.value = data;
55
+ };
56
+ //清除所有数据
57
+ const clearAll = () => {
58
+ action.value = "";
59
+ parentContainer.value = {};
60
+ copyerData.value = {};
61
+ };
62
+
63
+ return {
64
+ action,
65
+ parentContainer,
66
+ copyerData,
67
+ keyboardOperation,
68
+ operation,
69
+ setAction,
70
+ setParentContainer,
71
+ setCopyerData,
72
+ clearAll,
73
+ };
74
+ });