adtec-core-package 0.4.2 → 0.4.3

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 (61) hide show
  1. package/README.en.md +36 -36
  2. package/package.json +59 -59
  3. package/src/api/BasicApi.ts +17 -17
  4. package/src/api/DocumentApi.ts +27 -27
  5. package/src/api/SysDictCacheApi.ts +26 -26
  6. package/src/api/SysUserApi.ts +35 -35
  7. package/src/api/framework.ts +12 -12
  8. package/src/assets/style/ant.scss +19 -19
  9. package/src/assets/style/index.less +180 -180
  10. package/src/components/ElFlex/ElFlex.vue +297 -297
  11. package/src/components/OperationAuth/operationAuth.vue +26 -26
  12. package/src/components/Search/ElIconSearch.vue +260 -260
  13. package/src/components/Search/ElSearch.vue +154 -154
  14. package/src/components/Table/ElTableColumnEdit.vue +218 -218
  15. package/src/components/Title/ElTitle.vue +49 -49
  16. package/src/components/autoToolTip/ElAutoToolTip.vue +61 -61
  17. package/src/components/baseEcharts/index.vue +48 -48
  18. package/src/components/business/userSelect.vue +412 -412
  19. package/src/components/upload/ElUploads.vue +286 -286
  20. package/src/components/upload/FileView.vue +158 -158
  21. package/src/components/upload/FileViewComponents.vue +57 -57
  22. package/src/config/ElementPlusConfig.ts +95 -95
  23. package/src/css/elementUI/autocomplete.scss +89 -89
  24. package/src/css/elementUI/common/var.scss +1549 -1549
  25. package/src/css/elementUI/date-picker/picker.scss +219 -219
  26. package/src/css/elementUI/drawer.scss +164 -164
  27. package/src/css/elementUI/table.scss +694 -694
  28. package/src/css/elementUI/tabs.scss +659 -659
  29. package/src/directives/vKeydown.ts +93 -93
  30. package/src/hooks/useDictHooks.ts +78 -79
  31. package/src/hooks/useEcharts.ts +58 -58
  32. package/src/hooks/useFileView.ts +34 -34
  33. package/src/hooks/useMessageHooks.ts +132 -132
  34. package/src/hooks/useResetRefHooks.ts +18 -18
  35. package/src/interface/BaseEntity.ts +28 -28
  36. package/src/interface/IMdmDept.ts +82 -82
  37. package/src/interface/IOrgDeptInfo.ts +12 -12
  38. package/src/interface/ISysDictDataCacheVo.ts +46 -46
  39. package/src/interface/ISysDictType.ts +37 -37
  40. package/src/interface/ISysMenuDataVo.ts +22 -22
  41. package/src/interface/ISysMenuInfoVo.ts +83 -83
  42. package/src/interface/ISysMenuOperationVo.ts +21 -21
  43. package/src/interface/ISysUploadFiles.ts +16 -16
  44. package/src/interface/ISysUserInfo.ts +70 -70
  45. package/src/interface/IUserPermissionVo.ts +34 -34
  46. package/src/interface/Message.ts +69 -69
  47. package/src/interface/PageData.ts +17 -17
  48. package/src/interface/ResponseData.ts +16 -16
  49. package/src/interface/dictMapType.ts +11 -11
  50. package/src/interface/enum/MessageEnum.ts +41 -41
  51. package/src/mixin/globalMixin.ts +37 -37
  52. package/src/packages/index.ts +18 -18
  53. package/src/packages/text.vue +13 -13
  54. package/src/plugins/echartsConfig.ts +73 -73
  55. package/src/plugins/plugins.ts +12 -12
  56. package/src/stores/dictStore.ts +27 -27
  57. package/src/stores/messageStore.ts +49 -49
  58. package/src/stores/permissionStore.ts +108 -108
  59. package/src/stores/storeConfig.ts +23 -23
  60. package/src/stores/userInfoStore.ts +31 -31
  61. package/src/utils/AxiosConfig.ts +216 -216
@@ -1,260 +1,260 @@
1
- <!--创建人 丁盼-->
2
- <!--说明: ELIconSearch-->
3
- <!--创建时间: 2024/11/25 上午10:17-->
4
- <!--修改时间: 2024/11/25 上午10:17-->
5
- <template>
6
- <el-popover
7
- :popper-options="{
8
- modifiers: [
9
- {
10
- name: 'offset',
11
- options: {
12
- offset: elementType === 'button' ? [0 - 15, 20] : [0 - 15, 12],
13
- },
14
- },
15
- ],
16
- }"
17
- @hide="visible = false"
18
- :popper-style="{ paddingTop: 0 }"
19
- ref="popoverRef"
20
- :virtual-ref="buttonRef"
21
- placement="right-end"
22
- :width="width"
23
- trigger="click"
24
- :teleported="false"
25
- :visible="visible"
26
- >
27
- <template #reference>
28
- <el-tooltip :content="tip" placement="top" style="cursor: pointer">
29
- <el-button v-if="elementType === 'button'" style="padding: 8px 10px; margin-left: 4px" @click="iconClick">
30
- <el-icon
31
- ref="buttonRef"
32
- :model-value="iconName"
33
- :style="style"
34
- :tip="tip"
35
-
36
- :class="getClass"
37
- >
38
- <svg v-if="selcomp" aria-hidden="true">
39
- <use :href="'#' + iconName"></use>
40
- </svg>
41
- <component v-else :is="iconName"></component>
42
- </el-icon>
43
- </el-button>
44
- <el-icon
45
- ref="buttonRef"
46
- v-else
47
- :model-value="iconName"
48
- :style="style"
49
- :tip="tip"
50
- @click="iconClick"
51
- class="icon-btn"
52
- :class="getClass"
53
- >
54
- <svg v-if="selcomp" class="icon" aria-hidden="true">
55
- <use :href="'#' + iconName"></use>
56
- </svg>
57
- <component v-else :is="iconName"></component>
58
- </el-icon>
59
- </el-tooltip>
60
- </template>
61
- <el-flex :vertical="true" @keypress="keypress">
62
- <el-flex
63
- height="45px"
64
- style="border-bottom: var(--border); margin-bottom: 10px"
65
- align="center"
66
- >
67
- <el-flex>
68
- <el-text style="font-size: 16px">{{ title }}</el-text>
69
- </el-flex>
70
- <el-flex align="center" justify="flex-end">
71
- <el-icons
72
- model-value="Close"
73
- style="font-size: 16px; cursor: pointer"
74
- @click="visible = false"
75
- ></el-icons>
76
- </el-flex>
77
- </el-flex>
78
- <slot></slot>
79
- <el-flex align="flex-end" justify="flex-end" height="40px" style="border-top: var(--border)">
80
- <el-button @click="reset">重置</el-button>
81
- <el-button type="primary" @click="search">查询</el-button>
82
- </el-flex>
83
- </el-flex>
84
- </el-popover>
85
- </template>
86
- <script setup lang="ts">
87
- // 定义Props类型
88
- import { useMousePressed, useVModel } from '@vueuse/core'
89
- import { computed, ref, unref, watch } from 'vue'
90
- const { pressed } = useMousePressed()
91
- const iconClick = () => {
92
- unref(popoverRef).popperRef?.delayHide?.()
93
- visible.value = !visible.value
94
- }
95
- watch(pressed, () => {
96
- if (pressed.value) {
97
- //@ts-ignore
98
- if (!hasParentWithStyle(event.target, 'el-popper')) {
99
- visible.value = false
100
- }
101
- }
102
- })
103
- function hasParentWithStyle(element: any, styleSelector: string) {
104
- let currentElement = element.parentNode
105
- let i = 0
106
- while (currentElement && i < 15) {
107
- if (currentElement?.tagName !== 'BODY') {
108
- if (currentElement.className?.indexOf(styleSelector) > -1) {
109
- return true
110
- }
111
- currentElement = currentElement.parentNode
112
- i++
113
- } else {
114
- return false
115
- }
116
- }
117
- return false
118
- }
119
- const keypress = (e: KeyboardEvent) => {
120
- if (e.key === 'Enter') {
121
- visible.value = false
122
- setTimeout(() => {
123
- emit('search')
124
- }, 200)
125
- }
126
- }
127
- const search = () => {
128
- visible.value = false
129
- setTimeout(() => {
130
- emit('search')
131
- }, 200)
132
- }
133
- const reset = () => {
134
- emit('reset')
135
- }
136
- const visible = ref(false)
137
- const buttonRef = ref()
138
- const popoverRef = ref()
139
- const props = defineProps({
140
- /**
141
- * @type Object
142
- * @default {}
143
- * @description 样式对象
144
- */
145
- style: {
146
- type: Object,
147
- default: () => ({}),
148
- },
149
- /**
150
- * @type string
151
- * @default ''
152
- * @description 提示文字
153
- */
154
- tip: {
155
- type: String,
156
- default: '高级筛选',
157
- },
158
- /**
159
- * @type number
160
- * @default 400
161
- * @description 宽度
162
- */
163
- width: {
164
- type: Number,
165
- default: 350,
166
- },
167
- title: {
168
- type: String,
169
- default: '高级筛选',
170
- },
171
- modelValue: {
172
- type: String,
173
- default: 'adtec-filter',
174
- },
175
- /**
176
- * @type {'small'|'default'|'large'}
177
- * @default 'default'
178
- * @description 图标大小
179
- */
180
- size: {
181
- type: String,
182
- default: 'default',
183
- // 注意:在`<script setup>`中,直接使用函数进行验证,JSDoc辅助IDE提示
184
- validator: (value: string) => ['large', 'default', 'small'].includes(value),
185
- },
186
- /**
187
- * @type {"default" | "success" | "warning" | "info" | "primary" | "danger"}
188
- * @default 'default'
189
- * @description 图标类型
190
- */
191
- type: {
192
- type: String,
193
- default: 'default',
194
- validator: (value: string) =>
195
- ['default', 'success', 'warning', 'info', 'primary', 'danger'].includes(value),
196
- },
197
- /**
198
- * @type {"icon" | "button"}
199
- * @default 'icon'
200
- * @description 元素类型
201
- */
202
- elementType: {
203
- type: String,
204
- default: 'icon',
205
- },
206
- disabled: {
207
- type: Boolean,
208
- default: false,
209
- },
210
- })
211
-
212
- const getClass = computed(() => {
213
- let className = 'icon-btn--' + props.type
214
- if (props.disabled) {
215
- className += ' icon-btn--disabled'
216
- }
217
- className += ' icon-btn--size-' + props.size
218
- return className
219
- })
220
- const emit = defineEmits(['update:modelValue', 'click', 'search', 'reset'])
221
- const iconName = useVModel(props, 'modelValue', emit)
222
-
223
- const selcomp = computed(() => {
224
- if (iconName.value?.includes('adtec')) {
225
- return true
226
- } else {
227
- return false
228
- }
229
- })
230
- </script>
231
- <style scoped lang="scss">
232
- .icon-btn {
233
- margin-right: 5px;
234
- cursor: pointer;
235
- --el-button-hover-bg-color: var(--el-color-primary-light-3);
236
- &:hover {
237
- color: var(--el-button-hover-bg-color);
238
- }
239
- &--disabled {
240
- color: var(--el-color-disabled-text-color);
241
- cursor: not-allowed !important;
242
- }
243
- &--size-large {
244
- font-size: var(--el-font-size-large);
245
- }
246
- &--size-default {
247
- font-size: var(--el-font-size-base);
248
- }
249
- &--size-small {
250
- font-size: var(--el-font-size-small);
251
- }
252
- @each $type in (primary, success, warning, danger, info) {
253
- &--#{$type} {
254
- --el-button-hover-bg-color: var(--el-color-#{$type}-light-3);
255
- --el-button-disabled-bg-color: var(--el-color-#{$type}-light-5);
256
- color: var(--el-color-#{$type});
257
- }
258
- }
259
- }
260
- </style>
1
+ <!--创建人 丁盼-->
2
+ <!--说明: ELIconSearch-->
3
+ <!--创建时间: 2024/11/25 上午10:17-->
4
+ <!--修改时间: 2024/11/25 上午10:17-->
5
+ <template>
6
+ <el-popover
7
+ :popper-options="{
8
+ modifiers: [
9
+ {
10
+ name: 'offset',
11
+ options: {
12
+ offset: elementType === 'button' ? [0 - 15, 20] : [0 - 15, 12],
13
+ },
14
+ },
15
+ ],
16
+ }"
17
+ @hide="visible = false"
18
+ :popper-style="{ paddingTop: 0 }"
19
+ ref="popoverRef"
20
+ :virtual-ref="buttonRef"
21
+ placement="right-end"
22
+ :width="width"
23
+ trigger="click"
24
+ :teleported="false"
25
+ :visible="visible"
26
+ >
27
+ <template #reference>
28
+ <el-tooltip :content="tip" placement="top" style="cursor: pointer">
29
+ <el-button v-if="elementType === 'button'" style="padding: 8px 10px; margin-left: 4px" @click="iconClick">
30
+ <el-icon
31
+ ref="buttonRef"
32
+ :model-value="iconName"
33
+ :style="style"
34
+ :tip="tip"
35
+
36
+ :class="getClass"
37
+ >
38
+ <svg v-if="selcomp" aria-hidden="true">
39
+ <use :href="'#' + iconName"></use>
40
+ </svg>
41
+ <component v-else :is="iconName"></component>
42
+ </el-icon>
43
+ </el-button>
44
+ <el-icon
45
+ ref="buttonRef"
46
+ v-else
47
+ :model-value="iconName"
48
+ :style="style"
49
+ :tip="tip"
50
+ @click="iconClick"
51
+ class="icon-btn"
52
+ :class="getClass"
53
+ >
54
+ <svg v-if="selcomp" class="icon" aria-hidden="true">
55
+ <use :href="'#' + iconName"></use>
56
+ </svg>
57
+ <component v-else :is="iconName"></component>
58
+ </el-icon>
59
+ </el-tooltip>
60
+ </template>
61
+ <el-flex :vertical="true" @keypress="keypress">
62
+ <el-flex
63
+ height="45px"
64
+ style="border-bottom: var(--border); margin-bottom: 10px"
65
+ align="center"
66
+ >
67
+ <el-flex>
68
+ <el-text style="font-size: 16px">{{ title }}</el-text>
69
+ </el-flex>
70
+ <el-flex align="center" justify="flex-end">
71
+ <el-icons
72
+ model-value="Close"
73
+ style="font-size: 16px; cursor: pointer"
74
+ @click="visible = false"
75
+ ></el-icons>
76
+ </el-flex>
77
+ </el-flex>
78
+ <slot></slot>
79
+ <el-flex align="flex-end" justify="flex-end" height="40px" style="border-top: var(--border)">
80
+ <el-button @click="reset">重置</el-button>
81
+ <el-button type="primary" @click="search">查询</el-button>
82
+ </el-flex>
83
+ </el-flex>
84
+ </el-popover>
85
+ </template>
86
+ <script setup lang="ts">
87
+ // 定义Props类型
88
+ import { useMousePressed, useVModel } from '@vueuse/core'
89
+ import { computed, ref, unref, watch } from 'vue'
90
+ const { pressed } = useMousePressed()
91
+ const iconClick = () => {
92
+ unref(popoverRef).popperRef?.delayHide?.()
93
+ visible.value = !visible.value
94
+ }
95
+ watch(pressed, () => {
96
+ if (pressed.value) {
97
+ //@ts-ignore
98
+ if (!hasParentWithStyle(event.target, 'el-popper')) {
99
+ visible.value = false
100
+ }
101
+ }
102
+ })
103
+ function hasParentWithStyle(element: any, styleSelector: string) {
104
+ let currentElement = element.parentNode
105
+ let i = 0
106
+ while (currentElement && i < 15) {
107
+ if (currentElement?.tagName !== 'BODY') {
108
+ if (currentElement.className?.indexOf(styleSelector) > -1) {
109
+ return true
110
+ }
111
+ currentElement = currentElement.parentNode
112
+ i++
113
+ } else {
114
+ return false
115
+ }
116
+ }
117
+ return false
118
+ }
119
+ const keypress = (e: KeyboardEvent) => {
120
+ if (e.key === 'Enter') {
121
+ visible.value = false
122
+ setTimeout(() => {
123
+ emit('search')
124
+ }, 200)
125
+ }
126
+ }
127
+ const search = () => {
128
+ visible.value = false
129
+ setTimeout(() => {
130
+ emit('search')
131
+ }, 200)
132
+ }
133
+ const reset = () => {
134
+ emit('reset')
135
+ }
136
+ const visible = ref(false)
137
+ const buttonRef = ref()
138
+ const popoverRef = ref()
139
+ const props = defineProps({
140
+ /**
141
+ * @type Object
142
+ * @default {}
143
+ * @description 样式对象
144
+ */
145
+ style: {
146
+ type: Object,
147
+ default: () => ({}),
148
+ },
149
+ /**
150
+ * @type string
151
+ * @default ''
152
+ * @description 提示文字
153
+ */
154
+ tip: {
155
+ type: String,
156
+ default: '高级筛选',
157
+ },
158
+ /**
159
+ * @type number
160
+ * @default 400
161
+ * @description 宽度
162
+ */
163
+ width: {
164
+ type: Number,
165
+ default: 350,
166
+ },
167
+ title: {
168
+ type: String,
169
+ default: '高级筛选',
170
+ },
171
+ modelValue: {
172
+ type: String,
173
+ default: 'adtec-filter',
174
+ },
175
+ /**
176
+ * @type {'small'|'default'|'large'}
177
+ * @default 'default'
178
+ * @description 图标大小
179
+ */
180
+ size: {
181
+ type: String,
182
+ default: 'default',
183
+ // 注意:在`<script setup>`中,直接使用函数进行验证,JSDoc辅助IDE提示
184
+ validator: (value: string) => ['large', 'default', 'small'].includes(value),
185
+ },
186
+ /**
187
+ * @type {"default" | "success" | "warning" | "info" | "primary" | "danger"}
188
+ * @default 'default'
189
+ * @description 图标类型
190
+ */
191
+ type: {
192
+ type: String,
193
+ default: 'default',
194
+ validator: (value: string) =>
195
+ ['default', 'success', 'warning', 'info', 'primary', 'danger'].includes(value),
196
+ },
197
+ /**
198
+ * @type {"icon" | "button"}
199
+ * @default 'icon'
200
+ * @description 元素类型
201
+ */
202
+ elementType: {
203
+ type: String,
204
+ default: 'icon',
205
+ },
206
+ disabled: {
207
+ type: Boolean,
208
+ default: false,
209
+ },
210
+ })
211
+
212
+ const getClass = computed(() => {
213
+ let className = 'icon-btn--' + props.type
214
+ if (props.disabled) {
215
+ className += ' icon-btn--disabled'
216
+ }
217
+ className += ' icon-btn--size-' + props.size
218
+ return className
219
+ })
220
+ const emit = defineEmits(['update:modelValue', 'click', 'search', 'reset'])
221
+ const iconName = useVModel(props, 'modelValue', emit)
222
+
223
+ const selcomp = computed(() => {
224
+ if (iconName.value?.includes('adtec')) {
225
+ return true
226
+ } else {
227
+ return false
228
+ }
229
+ })
230
+ </script>
231
+ <style scoped lang="scss">
232
+ .icon-btn {
233
+ margin-right: 5px;
234
+ cursor: pointer;
235
+ --el-button-hover-bg-color: var(--el-color-primary-light-3);
236
+ &:hover {
237
+ color: var(--el-button-hover-bg-color);
238
+ }
239
+ &--disabled {
240
+ color: var(--el-color-disabled-text-color);
241
+ cursor: not-allowed !important;
242
+ }
243
+ &--size-large {
244
+ font-size: var(--el-font-size-large);
245
+ }
246
+ &--size-default {
247
+ font-size: var(--el-font-size-base);
248
+ }
249
+ &--size-small {
250
+ font-size: var(--el-font-size-small);
251
+ }
252
+ @each $type in (primary, success, warning, danger, info) {
253
+ &--#{$type} {
254
+ --el-button-hover-bg-color: var(--el-color-#{$type}-light-3);
255
+ --el-button-disabled-bg-color: var(--el-color-#{$type}-light-5);
256
+ color: var(--el-color-#{$type});
257
+ }
258
+ }
259
+ }
260
+ </style>