adtec-core-package 0.2.8 → 0.3.0

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 (54) hide show
  1. package/README.en.md +36 -36
  2. package/package.json +2 -2
  3. package/src/api/BasicApi.ts +17 -0
  4. package/src/api/DocumentApi.ts +18 -18
  5. package/src/api/SysDictCacheApi.ts +26 -28
  6. package/src/api/SysUserApi.ts +35 -0
  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/Search/ElSearch.vue +149 -132
  12. package/src/components/Table/ElTableColumnEdit.vue +218 -218
  13. package/src/components/Title/ElTitle.vue +49 -49
  14. package/src/components/autoToolTip/{index.vue → ElAutoToolTip.vue} +61 -61
  15. package/src/components/business/userSelect.vue +412 -0
  16. package/src/components/upload/FileView.vue +158 -158
  17. package/src/components/upload/FileViewComponents.vue +57 -57
  18. package/src/config/ElementPlusConfig.ts +95 -95
  19. package/src/css/elementUI/autocomplete.scss +89 -89
  20. package/src/css/elementUI/common/var.scss +1549 -1549
  21. package/src/css/elementUI/date-picker/picker.scss +219 -219
  22. package/src/css/elementUI/drawer.scss +164 -164
  23. package/src/css/elementUI/table.scss +694 -694
  24. package/src/css/elementUI/tabs.scss +659 -659
  25. package/src/directives/vKeydown.ts +93 -93
  26. package/src/hooks/useDictHooks.ts +77 -78
  27. package/src/hooks/useFileView.ts +34 -34
  28. package/src/hooks/useMessageHooks.ts +132 -132
  29. package/src/hooks/useResetRefHooks.ts +19 -19
  30. package/src/interface/BaseEntity.ts +28 -28
  31. package/src/interface/IMdmDept.ts +82 -0
  32. package/src/interface/IOrgDeptInfo.ts +12 -0
  33. package/src/interface/ISysDictDataCacheVo.ts +46 -46
  34. package/src/interface/ISysDictType.ts +37 -37
  35. package/src/interface/ISysMenuDataVo.ts +22 -22
  36. package/src/interface/ISysMenuInfoVo.ts +83 -83
  37. package/src/interface/ISysMenuOperationVo.ts +21 -21
  38. package/src/interface/ISysUploadFiles.ts +16 -16
  39. package/src/interface/ISysUserInfo.ts +70 -0
  40. package/src/interface/IUserPermissionVo.ts +34 -34
  41. package/src/interface/Message.ts +69 -69
  42. package/src/interface/PageData.ts +17 -17
  43. package/src/interface/ResponseData.ts +16 -16
  44. package/src/interface/dictMapType.ts +11 -0
  45. package/src/interface/enum/MessageEnum.ts +41 -41
  46. package/src/mixin/globalMixin.ts +7 -4
  47. package/src/packages/index.ts +18 -18
  48. package/src/packages/text.vue +13 -13
  49. package/src/plugins/plugins.ts +12 -12
  50. package/src/stores/dictStore.ts +27 -27
  51. package/src/stores/messageStore.ts +49 -49
  52. package/src/stores/storeConfig.ts +23 -23
  53. package/src/stores/userInfoStore.ts +31 -31
  54. package/src/utils/AxiosConfig.ts +216 -216
@@ -1,132 +1,149 @@
1
- <template>
2
- <el-flex
3
- @keypress="keypress"
4
- :height="height"
5
- style="background: #ffffff; /*border-radius: 4px;*/ padding: 15px 10px 15px 15px;"
6
- >
7
- <el-flex style="overflow: hidden">
8
- <div ref="ref_content" style="width: 100%; overflow: hidden" :style="{ height: height }">
9
- <div ref="ref_div">
10
- <slot></slot>
11
- </div>
12
- </div>
13
- </el-flex>
14
-
15
- <el-flex
16
- width="240px"
17
- justify="flex-end"
18
- align="flex-start"
19
- style="padding-top: 30px"
20
- >
21
- <el-button @click="reset">重置</el-button>
22
- <el-button type="primary" @click="search" :class="getRouteName + '_search'">查询</el-button>
23
- <el-button type="text" @click="retract" v-show="is_retract">
24
- <el-icon
25
- ><ArrowDown v-show="retractval === '展开'" /><ArrowUp
26
- v-show="retractval === '收起'" /></el-icon
27
- >{{ retractval }}</el-button
28
- >
29
- </el-flex>
30
- </el-flex>
31
- </template>
32
- <script setup lang="ts">
33
- import { computed, inject, nextTick, onMounted, ref, watch } from 'vue'
34
- import { useWindowSize } from '@vueuse/core'
35
- import { useRouter } from 'vue-router'
36
- import ElFlex from '../ElFlex/ElFlex.vue'
37
- import { ArrowDown, ArrowUp } from '@element-plus/icons-vue'
38
-
39
- const router = useRouter()
40
- const getRouteName = computed(() => {
41
- return router.currentRoute.value.name as string
42
- })
43
- const ref_content = ref()
44
- const retractval = ref('展开')
45
- const height = ref('95px')
46
- const is_retract = ref(false)
47
- const ref_div = ref()
48
- const windowContent = useWindowSize()
49
- const collapsed = inject<boolean>('collapsed')
50
- // eslint-disable-next-line @typescript-eslint/ban-ts-comment
51
- //@ts-expect-error
52
- watch(collapsed, () => {
53
- calculation()
54
- })
55
- watch(windowContent.width, () => {
56
- calculation()
57
- })
58
- const calculation = () => {
59
- setTimeout(() => {
60
- if (!(ref_div.value.offsetHeight > 95)) {
61
- if (ref_div.value.offsetHeight !== 0) {
62
- is_retract.value = false
63
- height.value = ref_div.value.offsetHeight + 15 + 'px'
64
- retractval.value = '收起'
65
- } else {
66
- calculation()
67
- }
68
- } else {
69
- is_retract.value = true
70
- height.value = '95px'
71
- retractval.value = '展开'
72
- }
73
- }, 100)
74
- }
75
- watch(windowContent.height, () => {
76
- calculation()
77
- })
78
- const retract = () => {
79
- if (height.value === '95px') {
80
- height.value = ref_content.value.children[0].scrollHeight + 15 + 'px'
81
- retractval.value = '收起'
82
- } else {
83
- height.value = '95px'
84
- retractval.value = '展开'
85
- }
86
- }
87
- const reset = () => {
88
- emit('reset')
89
- }
90
- const search = () => {
91
- emit('search')
92
- }
93
- const keypress = () => {
94
- // if (e.key === 'Enter') {
95
- // emit('search')
96
- // }
97
- }
98
- const emit = defineEmits<{
99
- (event: 'reset'): void
100
- (event: 'search'): void
101
- }>()
102
- onMounted(() => {
103
- nextTick(() => {
104
- if (!(ref_content.value.children[0].scrollHeight > 95)) {
105
- is_retract.value = false
106
- height.value = ref_content.value.children[0].scrollHeight + 15 + 'px'
107
- retractval.value = '收起'
108
- } else {
109
- is_retract.value = true
110
- height.value = '95px'
111
- retractval.value = '展开'
112
- }
113
- })
114
- })
115
-
116
- // onKeyStroke(['d', 'D', 'ArrowRight'], () => {
117
- // translateX.value += 10
118
- // }, { dedupe: true })
119
- </script>
120
- <style scoped lang="scss">
121
- .elementSelect {
122
- border: 2px dashed #1a67f8 !important;
123
- }
124
-
125
- .demo-form-inline .el-input {
126
- --el-input-width: 220px;
127
- }
128
-
129
- .demo-form-inline .el-select {
130
- --el-select-width: 220px;
131
- }
132
- </style>
1
+ <template>
2
+ <el-flex
3
+ @keypress="keypress"
4
+ :height="height"
5
+ style="background: #ffffff; /*border-radius: 4px;*/ padding: 15px 10px 15px 15px;"
6
+ >
7
+ <el-flex style="overflow: hidden">
8
+ <div ref="ref_content" style="width: 100%; overflow: hidden" :style="{ height: height }">
9
+ <div ref="ref_div">
10
+ <slot></slot>
11
+ </div>
12
+ </div>
13
+ </el-flex>
14
+ <el-flex
15
+ width="240px"
16
+ justify="flex-end"
17
+ align="flex-start"
18
+ style="padding-top: 30px"
19
+ >
20
+ <el-button @click="reset">重置</el-button>
21
+ <el-button type="primary" @click="search" :class="getRouteName + '_search'">查询</el-button>
22
+ <el-button type="text" @click="retract" v-show="is_retract">
23
+ <el-icon
24
+ ><ArrowDown v-show="retractval === '展开'" /><ArrowUp
25
+ v-show="retractval === '收起'" /></el-icon
26
+ >{{ retractval }}</el-button
27
+ >
28
+ </el-flex>
29
+ </el-flex>
30
+ </template>
31
+ <script setup lang="ts">
32
+ import { computed, inject, nextTick, onMounted, onUnmounted, ref, watch } from 'vue'
33
+ import { useWindowSize } from '@vueuse/core'
34
+ import { useRouter } from 'vue-router'
35
+ import { ArrowDown, ArrowUp } from '@element-plus/icons-vue'
36
+ import ElFlex from '../ElFlex/ElFlex.vue'
37
+ const router = useRouter()
38
+ const getRouteName = computed(() => {
39
+ return router.currentRoute.value.name as string
40
+ })
41
+ const ref_content = ref()
42
+ const retractval = ref('展开')
43
+ const height = ref('95px')
44
+ const is_retract = ref(false)
45
+ const ref_div = ref()
46
+ const windowContent = useWindowSize()
47
+ const collapsed = inject<boolean>('collapsed')
48
+ const collapsedSearch=ref<boolean|undefined>(false)
49
+ // eslint-disable-next-line @typescript-eslint/ban-ts-comment
50
+ //@ts-expect-error
51
+ watch(collapsed, () => {
52
+ collapsedSearch.value = collapsed
53
+ })
54
+ watch(collapsedSearch, () => {
55
+ calculation()
56
+ })
57
+ watch(windowContent.width, () => {
58
+ calculation()
59
+ })
60
+ const calculation = () => {
61
+ nextTick(()=>{
62
+ setTimeout(() => {
63
+ if(ref_div.value.children.length>0) {
64
+ if (!(ref_div.value.children[0].offsetHeight > 95)) {
65
+ if (ref_div.value.children[0].offsetHeight !== 0) {
66
+ is_retract.value = false
67
+ height.value = ref_div.value.children[0].offsetHeight + 15 + 'px'
68
+ retractval.value = '收起'
69
+ } else {
70
+ calculation()
71
+ }
72
+ }else if(ref_div.value.children[0].offsetHeight<=95){
73
+ is_retract.value = false
74
+ }
75
+ else {
76
+ is_retract.value = true
77
+ height.value = '95px'
78
+ retractval.value = '展开'
79
+ }
80
+ }
81
+ }, 200)
82
+ })
83
+ }
84
+ watch(windowContent.height, () => {
85
+ calculation()
86
+ })
87
+ const retract = () => {
88
+ if (height.value === '95px') {
89
+ height.value = ref_content.value.children[0].scrollHeight + 15 + 'px'
90
+ retractval.value = '收起'
91
+ } else {
92
+ height.value = '95px'
93
+ retractval.value = '展开'
94
+ }
95
+ }
96
+ const reset = () => {
97
+ emit('reset')
98
+ }
99
+ const search = () => {
100
+ emit('search')
101
+ }
102
+ const keypress = () => {
103
+ // if (e.key === 'Enter') {
104
+ // emit('search')
105
+ // }
106
+ }
107
+ const emit = defineEmits<{
108
+ (event: 'reset'): void
109
+ (event: 'search'): void
110
+ }>()
111
+ onMounted(() => {
112
+ collapsedSearch.value = collapsed
113
+ //@ts-ignore
114
+ window.$wujie?.bus.$on("collapsedChangeBus", (val:boolean) => {
115
+ collapsedSearch.value=val
116
+ });
117
+ nextTick(() => {
118
+ if (!(ref_content.value.children[0].scrollHeight > 95)) {
119
+ is_retract.value = false
120
+ height.value = ref_content.value.children[0].scrollHeight + 15 + 'px'
121
+ retractval.value = '收起'
122
+ } else {
123
+ is_retract.value = true
124
+ height.value = '95px'
125
+ retractval.value = '展开'
126
+ }
127
+ })
128
+ })
129
+ onUnmounted(()=>{
130
+ //@ts-ignore
131
+ window.$wujie?.bus.$off("collapsedChangeBus")
132
+ })
133
+ // onKeyStroke(['d', 'D', 'ArrowRight'], () => {
134
+ // translateX.value += 10
135
+ // }, { dedupe: true })
136
+ </script>
137
+ <style scoped lang="scss">
138
+ .elementSelect {
139
+ border: 2px dashed #1a67f8 !important;
140
+ }
141
+
142
+ .demo-form-inline .el-input {
143
+ --el-input-width: 220px;
144
+ }
145
+
146
+ .demo-form-inline .el-select {
147
+ --el-select-width: 220px;
148
+ }
149
+ </style>