adtec-core-package 0.3.9 → 0.4.1

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "adtec-core-package",
3
- "version": "0.3.9",
3
+ "version": "0.4.1",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "scripts": {
@@ -12,7 +12,16 @@ export default {
12
12
  getUpLoadFilesVoById(id: string): Promise<ISysUploadFiles> {
13
13
  return request.get(basePath + 'getUpLoadFilesVoById/' + id)
14
14
  },
15
+ getUpLoadFilesByBussinessIds(bussinessIds: string[]): Promise<ISysUploadFiles[]> {
16
+ return request.post(basePath + 'getUpLoadFilesByBussinessIds', bussinessIds)
17
+ },
15
18
  delSysUploadFile(id: string) {
16
19
  return request.get(basePath + 'delSysUploadFile/' + id)
20
+ },
21
+ getBusinessDocuments(business: string, businessId: string): Promise<ISysUploadFiles[]> {
22
+ return request.get(basePath + 'getBusinessDocuments/' + business + '/' + businessId)
23
+ },
24
+ fileStatusConfirmation(ids: string[]): Promise<ISysUploadFiles[]> {
25
+ return request.post(basePath + 'fileStatusConfirmation', ids)
17
26
  }
18
27
  }
@@ -1,239 +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">
30
- <el-icon
31
- ref="buttonRef"
32
- :model-value="iconName"
33
- :style="style"
34
- :tip="tip"
35
- @click="iconClick"
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
80
- align="flex-end"
81
- justify="flex-end"
82
- height="40px"
83
- style="border-top: var(--border)"
84
- >
85
- <el-button @click="reset">重置</el-button>
86
- <el-button type="primary" @click="search">查询</el-button>
87
- </el-flex>
88
- </el-flex>
89
- </el-popover>
90
- </template>
91
- <script setup lang="ts">
92
- // 定义Props类型
93
- import { useVModel } from '@vueuse/core'
94
- import { computed, ref, unref } from 'vue'
95
- import ElFlex from '../ElFlex/ElFlex.vue'
96
- import ElIcons from '../icon/ElIcons.vue'
97
-
98
- const iconClick = () => {
99
- unref(popoverRef).popperRef?.delayHide?.()
100
- visible.value = !visible.value
101
- }
102
- const keypress = (e: KeyboardEvent) => {
103
- if (e.key === 'Enter') {
104
- visible.value = false
105
- emit('search')
106
- }
107
- }
108
- const search = () => {
109
- visible.value = false
110
- emit('search')
111
- }
112
- const reset = () => {
113
- emit('reset')
114
- }
115
- const visible = ref(false)
116
- const buttonRef = ref()
117
- const popoverRef = ref()
118
- const props = defineProps({
119
- /**
120
- * @type Object
121
- * @default {}
122
- * @description 样式对象
123
- */
124
- style: {
125
- type: Object,
126
- default: () => ({}),
127
- },
128
- /**
129
- * @type string
130
- * @default ''
131
- * @description 提示文字
132
- */
133
- tip: {
134
- type: String,
135
- default: '高级筛选',
136
- },
137
- /**
138
- * @type number
139
- * @default 400
140
- * @description 宽度
141
- */
142
- width: {
143
- type: Number,
144
- default: 350,
145
- },
146
- title: {
147
- type: String,
148
- default: '高级筛选',
149
- },
150
- modelValue: {
151
- type: String,
152
- default: 'adtec-filter',
153
- },
154
- /**
155
- * @type {'small'|'default'|'large'}
156
- * @default 'default'
157
- * @description 图标大小
158
- */
159
- size: {
160
- type: String,
161
- default: 'default',
162
- // 注意:在`<script setup>`中,直接使用函数进行验证,JSDoc辅助IDE提示
163
- validator: (value: string) => ['large', 'default', 'small'].includes(value),
164
- },
165
- /**
166
- * @type {"default" | "success" | "warning" | "info" | "primary" | "danger"}
167
- * @default 'default'
168
- * @description 图标类型
169
- */
170
- type: {
171
- type: String,
172
- default: 'default',
173
- validator: (value: string) =>
174
- ['default', 'success', 'warning', 'info', 'primary', 'danger'].includes(value),
175
- },
176
- /**
177
- * @type {"icon" | "button"}
178
- * @default 'icon'
179
- * @description 元素类型
180
- */
181
- elementType: {
182
- type: String,
183
- default: 'icon',
184
- },
185
- disabled: {
186
- type: Boolean,
187
- default: false,
188
- },
189
- })
190
-
191
- const getClass = computed(() => {
192
- let className = 'icon-btn--' + props.type
193
- if (props.disabled) {
194
- className += ' icon-btn--disabled'
195
- }
196
- className += ' icon-btn--size-' + props.size
197
- return className
198
- })
199
- const emit = defineEmits(['update:modelValue', 'click', 'search', 'reset'])
200
- const iconName = useVModel(props, 'modelValue', emit)
201
-
202
- const selcomp = computed(() => {
203
- if (iconName.value?.includes('adtec')) {
204
- return true
205
- } else {
206
- return false
207
- }
208
- })
209
- </script>
210
- <style scoped lang="scss">
211
- .icon-btn {
212
- margin-right: 5px;
213
- cursor: pointer;
214
- --el-button-hover-bg-color: var(--el-color-primary-light-3);
215
- &:hover {
216
- color: var(--el-button-hover-bg-color);
217
- }
218
- &--disabled {
219
- color: var(--el-color-disabled-text-color);
220
- cursor: not-allowed !important;
221
- }
222
- &--size-large {
223
- font-size: var(--el-font-size-large);
224
- }
225
- &--size-default {
226
- font-size: var(--el-font-size-base);
227
- }
228
- &--size-small {
229
- font-size: var(--el-font-size-small);
230
- }
231
- @each $type in (primary, success, warning, danger, info) {
232
- &--#{$type} {
233
- --el-button-hover-bg-color: var(--el-color-#{$type}-light-3);
234
- --el-button-disabled-bg-color: var(--el-color-#{$type}-light-5);
235
- color: var(--el-color-#{$type});
236
- }
237
- }
238
- }
239
- </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">
30
+ <el-icon
31
+ ref="buttonRef"
32
+ :model-value="iconName"
33
+ :style="style"
34
+ :tip="tip"
35
+ @click="iconClick"
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>