@jzt-packages/components 1.0.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.
- package/package.json +68 -0
- package/src/JztBackTop/index.vue +255 -0
- package/src/JztButtonList/index.vue +88 -0
- package/src/JztChart/index.vue +95 -0
- package/src/JztCharts/index.vue +317 -0
- package/src/JztClassTabs/index.vue +156 -0
- package/src/JztDateSelect/dateSelect.vue +186 -0
- package/src/JztDateSelect/dateType.vue +54 -0
- package/src/JztDateSelect/index.ts +135 -0
- package/src/JztDateSelect/interface/index.ts +13 -0
- package/src/JztDialog/index.vue +249 -0
- package/src/JztEllipsisTooltip/index.vue +61 -0
- package/src/JztEmpty/index.vue +45 -0
- package/src/JztErrorPage/403.vue +30 -0
- package/src/JztErrorPage/404.vue +19 -0
- package/src/JztErrorPage/500.vue +18 -0
- package/src/JztErrorPage/assets/401.png +0 -0
- package/src/JztErrorPage/assets/403.png +0 -0
- package/src/JztErrorPage/assets/404.png +0 -0
- package/src/JztErrorPage/assets/500.png +0 -0
- package/src/JztErrorPage/index.scss +35 -0
- package/src/JztErrorPage/index.vue +35 -0
- package/src/JztFilePreview/components/pdfViewer.vue +221 -0
- package/src/JztFilePreview/hooks/useImageMethod.ts +256 -0
- package/src/JztFilePreview/index.scss +171 -0
- package/src/JztFilePreview/index.vue +68 -0
- package/src/JztFilePreview/interface/index.ts +18 -0
- package/src/JztFilePreview/previewFile.vue +371 -0
- package/src/JztFormGrid/README.md +520 -0
- package/src/JztFormGrid/components/formItem.vue +209 -0
- package/src/JztFormGrid/components/formItemValue.vue +384 -0
- package/src/JztFormGrid/components/showDetailForm.vue +172 -0
- package/src/JztFormGrid/index.scss +60 -0
- package/src/JztFormGrid/index.vue +513 -0
- package/src/JztFormGrid/interface/index.ts +106 -0
- package/src/JztGrid/components/GridItem.vue +68 -0
- package/src/JztGrid/index.vue +179 -0
- package/src/JztGrid/interface/index.ts +6 -0
- package/src/JztImportExcel/assets/delete.png +0 -0
- package/src/JztImportExcel/index.scss +46 -0
- package/src/JztImportExcel/index.vue +430 -0
- package/src/JztImportExcel/interface/index.ts +25 -0
- package/src/JztLabelTitle/index.vue +65 -0
- package/src/JztLeftRightMode/components/CollapseButton.vue +80 -0
- package/src/JztLeftRightMode/components/LeftCard.vue +203 -0
- package/src/JztLeftRightMode/components/LeftLayout.vue +173 -0
- package/src/JztLeftRightMode/components/RightHeader.vue +186 -0
- package/src/JztLeftRightMode/components/RightLayout.vue +235 -0
- package/src/JztLeftRightMode/components/RightTableHeader.vue +43 -0
- package/src/JztLeftRightMode/hooks/useCollapse.ts +17 -0
- package/src/JztLeftRightMode/hooks/useDefaultProps.ts +19 -0
- package/src/JztLeftRightMode/hooks/useLeftLayout.ts +201 -0
- package/src/JztLeftRightMode/hooks/useMode.ts +20 -0
- package/src/JztLeftRightMode/hooks/usePrevNext.ts +60 -0
- package/src/JztLeftRightMode/hooks/useRightLayout.ts +215 -0
- package/src/JztLeftRightMode/hooks/useSlots.ts +15 -0
- package/src/JztLeftRightMode/index.ts +3 -0
- package/src/JztLeftRightMode/index.vue +494 -0
- package/src/JztLeftRightMode/types/index.ts +457 -0
- package/src/JztLoading/fullScreen.ts +45 -0
- package/src/JztLoading/index.scss +67 -0
- package/src/JztLoading/index.vue +18 -0
- package/src/JztLogin/components/LoginFooter.vue +17 -0
- package/src/JztLogin/components/LoginForm.vue +99 -0
- package/src/JztLogin/hooks/useLogin.ts +186 -0
- package/src/JztLogin/index.scss +142 -0
- package/src/JztLogin/index.vue +31 -0
- package/src/JztLogin/interface/index.ts +47 -0
- package/src/JztNumericalRange/index.vue +81 -0
- package/src/JztPageCard/comm/datePicker.vue +151 -0
- package/src/JztPageCard/comm/details.vue +60 -0
- package/src/JztPageCard/comm/export.vue +24 -0
- package/src/JztPageCard/comm/tabs.vue +94 -0
- package/src/JztPageCard/comm/tooltip.vue +31 -0
- package/src/JztPageCard/index.vue +287 -0
- package/src/JztPagination/index.vue +70 -0
- package/src/JztProductInfo/components/imagePreview.vue +275 -0
- package/src/JztProductInfo/components/qxUnique.vue +101 -0
- package/src/JztProductInfo/components/records.vue +265 -0
- package/src/JztProductInfo/hooks/useParams.ts +143 -0
- package/src/JztProductInfo/hooks/useQxUnique.tsx +466 -0
- package/src/JztProductInfo/images/defaultProduct.png +0 -0
- package/src/JztProductInfo/index.ts +116 -0
- package/src/JztProductInfo/index.vue +108 -0
- package/src/JztProductInfo/interface/index.ts +15 -0
- package/src/JztQueryDetailTable/index.scss +100 -0
- package/src/JztQueryDetailTable/index.vue +400 -0
- package/src/JztQueryDetailTable/interface/index.ts +10 -0
- package/src/JztQueryTable/QueryTable /345/212/237/350/203/275.md" +1580 -0
- package/src/JztQueryTable/README.md +567 -0
- package/src/JztQueryTable/components/ColSetting.vue +67 -0
- package/src/JztQueryTable/components/ColumnsSetting.vue +404 -0
- package/src/JztQueryTable/components/ColumnsSetting1.vue +220 -0
- package/src/JztQueryTable/components/DeployToAccountLevelSetting.vue +351 -0
- package/src/JztQueryTable/components/Pagination.vue +54 -0
- package/src/JztQueryTable/components/TableColumn.vue +109 -0
- package/src/JztQueryTable/const.ts +1 -0
- package/src/JztQueryTable/hooks/useQueryTable.ts +194 -0
- package/src/JztQueryTable/hooks/useSelection.ts +47 -0
- package/src/JztQueryTable/hooks/useTableSetting.ts +197 -0
- package/src/JztQueryTable/hooks/useTemplate.ts +127 -0
- package/src/JztQueryTable/index.scss +91 -0
- package/src/JztQueryTable/index.vue +1445 -0
- package/src/JztQueryTable/interface/index.ts +185 -0
- package/src/JztRegionSelect/index.vue +134 -0
- package/src/JztSearchForm/components/SearchFormItem.vue +473 -0
- package/src/JztSearchForm/index.vue +530 -0
- package/src/JztSearchForm/interface/index.ts +100 -0
- package/src/JztSelectFilter/index.scss +63 -0
- package/src/JztSelectFilter/index.vue +110 -0
- package/src/JztSelectTable/index.vue +257 -0
- package/src/JztTable/index.scss +72 -0
- package/src/JztTable/index.vue +353 -0
- package/src/JztTable/interface/index.ts +1 -0
- package/src/JztTime/comm/agencySelect.vue +112 -0
- package/src/JztTime/comm/collapseRow.vue +132 -0
- package/src/JztTime/comm/dateSelect.vue +292 -0
- package/src/JztTime/comm/deptSelect.vue +193 -0
- package/src/JztTime/comm/typeSelect.vue +97 -0
- package/src/JztTime/index.ts +216 -0
- package/src/JztTime/index.vue +303 -0
- package/src/JztTime/interface/index.ts +23 -0
- package/src/JztTreeFilter/index.scss +44 -0
- package/src/JztTreeFilter/index.vue +177 -0
- package/src/JztUploadFile/interface/index.ts +21 -0
- package/src/JztUploadFile/multiple.scss +215 -0
- package/src/JztUploadFile/multiple.vue +318 -0
- package/src/JztUploadFile/single.scss +226 -0
- package/src/JztUploadFile/single.vue +274 -0
- package/src/JztUploadImg/Img.vue +294 -0
- package/src/JztUploadImg/Imgs.vue +411 -0
- package/src/JztUploadImg/index.scss +138 -0
- package/src/JztUploadImg/interface/index.ts +22 -0
- package/src/SelectIcon/index.scss +39 -0
- package/src/SelectIcon/index.vue +106 -0
- package/src/SvgIcon/index.vue +22 -0
- package/src/hooks/useAuthButtons.ts +58 -0
- package/src/hooks/useFormByUserType.ts +90 -0
- package/src/hooks/useTableEvents.ts +30 -0
- package/src/hooks/useUploadFileHook.ts +262 -0
- package/src/index.ts +91 -0
- package/src/typings/global.d.ts +101 -0
- package/src/utils/index.ts +107 -0
- package/src/utils/tree.ts +57 -0
- package/tsconfig.json +45 -0
|
@@ -0,0 +1,457 @@
|
|
|
1
|
+
import { JztFormGrid, JztQueryTable } from '@jzt-spd/components'
|
|
2
|
+
|
|
3
|
+
import { type Props as BackTopProps } from '../../JztBackTop/index.vue'
|
|
4
|
+
import { type TableConfigProps, type TopButtonProps } from '../../JztQueryTable/interface'
|
|
5
|
+
|
|
6
|
+
export type Mode = 'list' | 'detail'
|
|
7
|
+
/**
|
|
8
|
+
* 左侧布局组件实例
|
|
9
|
+
*/
|
|
10
|
+
export { type Expose as LeftLayoutInstance } from '../components/LeftLayout.vue'
|
|
11
|
+
/**
|
|
12
|
+
* 右侧布局组件实例
|
|
13
|
+
*/
|
|
14
|
+
export { type Expose as RightLayoutInstance } from '../components/RightLayout.vue'
|
|
15
|
+
/**
|
|
16
|
+
* 左右布局组件实例
|
|
17
|
+
*/
|
|
18
|
+
export { type Expose as LeftRightModeInstance } from '../index.vue'
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* 左右布局组件 Props 定义
|
|
22
|
+
*/
|
|
23
|
+
export type Props = {
|
|
24
|
+
/**
|
|
25
|
+
* 加载中
|
|
26
|
+
*/
|
|
27
|
+
loading?: boolean
|
|
28
|
+
/**
|
|
29
|
+
* 标题
|
|
30
|
+
*/
|
|
31
|
+
title?: string
|
|
32
|
+
/**
|
|
33
|
+
* 当前tab
|
|
34
|
+
*/
|
|
35
|
+
tabActive?: string
|
|
36
|
+
/**
|
|
37
|
+
* 当前模式
|
|
38
|
+
* @default list
|
|
39
|
+
*/
|
|
40
|
+
mode?: Mode
|
|
41
|
+
/**
|
|
42
|
+
* 是否显示空状态
|
|
43
|
+
*/
|
|
44
|
+
showEmpty?: boolean
|
|
45
|
+
/**
|
|
46
|
+
* 是否显示模式选择
|
|
47
|
+
*/
|
|
48
|
+
showMode?: boolean
|
|
49
|
+
/**
|
|
50
|
+
* 是否显示头部
|
|
51
|
+
* @default true
|
|
52
|
+
*/
|
|
53
|
+
showHeader?: boolean
|
|
54
|
+
/**
|
|
55
|
+
* 空状态文本
|
|
56
|
+
*/
|
|
57
|
+
emptyText?: string
|
|
58
|
+
/**
|
|
59
|
+
* 折叠按钮文本
|
|
60
|
+
* @default 主单详细
|
|
61
|
+
*/
|
|
62
|
+
collapseText?: string
|
|
63
|
+
/**
|
|
64
|
+
* 搜索表单属性
|
|
65
|
+
*/
|
|
66
|
+
searchProps: SearchProps
|
|
67
|
+
/**
|
|
68
|
+
* 搜索数据
|
|
69
|
+
*/
|
|
70
|
+
searchData?: any
|
|
71
|
+
/**
|
|
72
|
+
* 左侧布局属性
|
|
73
|
+
*/
|
|
74
|
+
leftProps: LeftLayoutProps
|
|
75
|
+
/**
|
|
76
|
+
* 宽度
|
|
77
|
+
* @default 360
|
|
78
|
+
*/
|
|
79
|
+
leftWidth?: number | string
|
|
80
|
+
/**
|
|
81
|
+
* 右侧布局属性
|
|
82
|
+
*/
|
|
83
|
+
rightProps: RightLayoutProps
|
|
84
|
+
/**
|
|
85
|
+
* 右侧布局数据
|
|
86
|
+
*/
|
|
87
|
+
rightData?: any
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
/**
|
|
91
|
+
* 左右布局组件 Emits 定义
|
|
92
|
+
*/
|
|
93
|
+
export interface Emits extends LeftLayoutEmits<any> {
|
|
94
|
+
/**
|
|
95
|
+
* 点击右侧卡片
|
|
96
|
+
*/
|
|
97
|
+
(e: 'update:searchData', value: any): void
|
|
98
|
+
/** 更新右侧数据 */
|
|
99
|
+
(e: 'update:rightData', value: any): void
|
|
100
|
+
/** 更新加载中 */
|
|
101
|
+
(e: 'update:loading', value: boolean): void
|
|
102
|
+
/** 更新tabActive */
|
|
103
|
+
(e: 'update:tabActive', value: string): void
|
|
104
|
+
/** 左侧数据切换前 */
|
|
105
|
+
(e: 'nextPrev-before'): void
|
|
106
|
+
/** 左侧数据切换后 */
|
|
107
|
+
(e: 'nextPrev-after', { row, index }: { row: any; index: number }): void
|
|
108
|
+
/** 重置列表时触发 */
|
|
109
|
+
(e: 'rightReset'): void
|
|
110
|
+
/** 切换tab时触发 */
|
|
111
|
+
(e: 'tabChange', value: string): void
|
|
112
|
+
/** 切换模式时触发 */
|
|
113
|
+
(e: 'modeChange', value: Mode): void
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
/**
|
|
117
|
+
* 左右布局组件 SearchProps 定义
|
|
118
|
+
*/
|
|
119
|
+
export type SearchProps = {
|
|
120
|
+
/**
|
|
121
|
+
* 查询表单列
|
|
122
|
+
*/
|
|
123
|
+
queryItems: Array<TableConfigProps['queryItems'] | any>
|
|
124
|
+
/**
|
|
125
|
+
* 搜索默认参数
|
|
126
|
+
*/
|
|
127
|
+
initParams?: { [key: string]: any }
|
|
128
|
+
/**
|
|
129
|
+
* 搜索列数
|
|
130
|
+
*/
|
|
131
|
+
searchCol?: number | Record<'xs' | 'sm' | 'md' | 'lg' | 'xl' | 'xxl', number>
|
|
132
|
+
/**
|
|
133
|
+
* 是否允许折叠
|
|
134
|
+
*/
|
|
135
|
+
allowCollapsed?: boolean
|
|
136
|
+
/**
|
|
137
|
+
* 查询表单默认是否折叠
|
|
138
|
+
*/
|
|
139
|
+
collapsed?: boolean
|
|
140
|
+
/**
|
|
141
|
+
* 是否展示查询重构按钮
|
|
142
|
+
*/
|
|
143
|
+
showQueryBtn?: boolean
|
|
144
|
+
/**
|
|
145
|
+
* 是否展示重置按钮
|
|
146
|
+
*/
|
|
147
|
+
showResetBtn?: boolean
|
|
148
|
+
/**
|
|
149
|
+
* 是否自定义表单
|
|
150
|
+
*/
|
|
151
|
+
customForm?: boolean
|
|
152
|
+
/**
|
|
153
|
+
* 按钮是否总是在最后(不跟随)
|
|
154
|
+
*/
|
|
155
|
+
suffix?: boolean
|
|
156
|
+
/**
|
|
157
|
+
* 是否需要card样式,某下弹框不需要的话 设置false
|
|
158
|
+
*/
|
|
159
|
+
isCard?: boolean
|
|
160
|
+
/**
|
|
161
|
+
* 搜索方法
|
|
162
|
+
*/
|
|
163
|
+
search?: (params: any) => void
|
|
164
|
+
/**
|
|
165
|
+
* 重置方法
|
|
166
|
+
*/
|
|
167
|
+
reset?: (params: any) => void
|
|
168
|
+
} & Pick<TableProps, 'tabIsTop' | 'tabsList'>
|
|
169
|
+
|
|
170
|
+
/**
|
|
171
|
+
* 左侧布局组件 Props 定义
|
|
172
|
+
*/
|
|
173
|
+
export type LeftLayoutProps = {
|
|
174
|
+
/**
|
|
175
|
+
* 加载动画实例
|
|
176
|
+
*/
|
|
177
|
+
loading?: boolean
|
|
178
|
+
/**
|
|
179
|
+
* 数据请求接口
|
|
180
|
+
* @param params 查询参数(包含搜索参数、分页参数)
|
|
181
|
+
* @default 无默认值
|
|
182
|
+
*/
|
|
183
|
+
requestApi?: (params: Record<string, any>) => Promise<{ result: Array<any | never>; totalCount: number } | any>
|
|
184
|
+
/**
|
|
185
|
+
* 行唯一标识字段
|
|
186
|
+
* @default id
|
|
187
|
+
*/
|
|
188
|
+
rowKey?: string
|
|
189
|
+
/**
|
|
190
|
+
* 是否展示选择框
|
|
191
|
+
* @default false
|
|
192
|
+
*/
|
|
193
|
+
showSelected?: boolean
|
|
194
|
+
/**
|
|
195
|
+
* 是否展示回到顶部按钮
|
|
196
|
+
* @default true
|
|
197
|
+
*/
|
|
198
|
+
showBackTop?: boolean
|
|
199
|
+
/**
|
|
200
|
+
* 是否展示状态标签
|
|
201
|
+
* @default true
|
|
202
|
+
*/
|
|
203
|
+
showStatus?: boolean
|
|
204
|
+
/**
|
|
205
|
+
* 回到顶部按钮配置
|
|
206
|
+
* @default {}
|
|
207
|
+
*/
|
|
208
|
+
backTopProps?: BackTopProps
|
|
209
|
+
/**
|
|
210
|
+
* 卡片配置项
|
|
211
|
+
* @default { title: [], subTitle: [], content: [] }
|
|
212
|
+
*/
|
|
213
|
+
cardProps?: {
|
|
214
|
+
/** 标题字段 */
|
|
215
|
+
title?: string
|
|
216
|
+
/** 内容配置数组 */
|
|
217
|
+
content: Array<{
|
|
218
|
+
/** 内容字段数组 */
|
|
219
|
+
props: string | Array<string>
|
|
220
|
+
/** 内容标签 */
|
|
221
|
+
label?: string
|
|
222
|
+
/** 宽度 */
|
|
223
|
+
width?: string
|
|
224
|
+
/** 标签颜色 */
|
|
225
|
+
labelColor?: string
|
|
226
|
+
/** 值颜色 */
|
|
227
|
+
valueColor?: (params: any) => void
|
|
228
|
+
}>
|
|
229
|
+
}
|
|
230
|
+
/**
|
|
231
|
+
* 防抖时间
|
|
232
|
+
* @default 100
|
|
233
|
+
*/
|
|
234
|
+
debounceTime?: number
|
|
235
|
+
/**
|
|
236
|
+
* 状态字段名
|
|
237
|
+
*/
|
|
238
|
+
statusProp?: string
|
|
239
|
+
/**
|
|
240
|
+
* 状态枚举
|
|
241
|
+
*/
|
|
242
|
+
statusEnum?: StatusEnum
|
|
243
|
+
/**
|
|
244
|
+
* 操作按钮配置数组
|
|
245
|
+
*/
|
|
246
|
+
headerButtonList?: Array<TopButtonProps>
|
|
247
|
+
/**
|
|
248
|
+
* 操作按钮配置数组
|
|
249
|
+
*/
|
|
250
|
+
footerButtonList?: Array<TopButtonProps>
|
|
251
|
+
/**
|
|
252
|
+
* 表格列
|
|
253
|
+
*/
|
|
254
|
+
columns?: Array<TableConfigProps['columns'] | any>
|
|
255
|
+
}
|
|
256
|
+
/**
|
|
257
|
+
* 左侧布局组件 Emits 定义
|
|
258
|
+
*/
|
|
259
|
+
export type LeftLayoutEmits<T> = {
|
|
260
|
+
/** 更新加载状态 */
|
|
261
|
+
(e: 'update:loading', value: boolean): void
|
|
262
|
+
/** 加载更多数据时触发 */
|
|
263
|
+
(e: 'load', value: T): void
|
|
264
|
+
/** 重置列表时触发 */
|
|
265
|
+
(e: 'reset', value: T): void
|
|
266
|
+
/** 查询列表时触发 */
|
|
267
|
+
(e: 'query', value: T): void
|
|
268
|
+
/** 卡片点击时触发 */
|
|
269
|
+
(e: 'cardClick', value: any): void
|
|
270
|
+
/** 卡片选择时触发 */
|
|
271
|
+
(e: 'cardSelected', value: any): void
|
|
272
|
+
/** 初始化时触发 */
|
|
273
|
+
(e: 'init', value: any): void
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
/**
|
|
277
|
+
* 颜色类型
|
|
278
|
+
*/
|
|
279
|
+
export type ColorType = 'primary' | 'danger' | 'success' | 'info' | 'warning'
|
|
280
|
+
|
|
281
|
+
/**
|
|
282
|
+
* 状态枚举
|
|
283
|
+
*/
|
|
284
|
+
export type StatusEnum = Array<{
|
|
285
|
+
/** 状态值 */
|
|
286
|
+
value: number | string | any
|
|
287
|
+
/** 状态名称 */
|
|
288
|
+
name?: string | number | any
|
|
289
|
+
/** 状态名称 */
|
|
290
|
+
label?: string | number | any
|
|
291
|
+
/** 状态类型 */
|
|
292
|
+
type: ColorType & any
|
|
293
|
+
}>
|
|
294
|
+
|
|
295
|
+
/**
|
|
296
|
+
* 表格配置属性
|
|
297
|
+
*/
|
|
298
|
+
export type TableProps = InstanceType<typeof JztQueryTable>['$props'] & Partial<TotalData>
|
|
299
|
+
|
|
300
|
+
/**
|
|
301
|
+
* 合计数据
|
|
302
|
+
*/
|
|
303
|
+
export type TotalData = {
|
|
304
|
+
/** 数量 */
|
|
305
|
+
count: number | string
|
|
306
|
+
/** 金额 */
|
|
307
|
+
amount: number | string
|
|
308
|
+
}
|
|
309
|
+
|
|
310
|
+
/**
|
|
311
|
+
* 合计配置数组(按数组顺序显示)
|
|
312
|
+
*/
|
|
313
|
+
export type TotalProps = Array<{
|
|
314
|
+
/** 类型:数量/金额 */
|
|
315
|
+
type: 'count' | 'amount'
|
|
316
|
+
/** 是否显示 */
|
|
317
|
+
show?: boolean
|
|
318
|
+
/** 标签文字 */
|
|
319
|
+
label?: string
|
|
320
|
+
/** 值字段名 */
|
|
321
|
+
valueKey?: string
|
|
322
|
+
/** 单位 */
|
|
323
|
+
unit?: string
|
|
324
|
+
/** 颜色 */
|
|
325
|
+
color?: string
|
|
326
|
+
}>
|
|
327
|
+
|
|
328
|
+
/**
|
|
329
|
+
* 右侧布局组件 Props 定义
|
|
330
|
+
*/
|
|
331
|
+
export type RightLayoutProps = {
|
|
332
|
+
/**
|
|
333
|
+
* 加载动画实例
|
|
334
|
+
*/
|
|
335
|
+
loading?: boolean
|
|
336
|
+
/**
|
|
337
|
+
* 组件唯一标识字段
|
|
338
|
+
* @default id
|
|
339
|
+
*/
|
|
340
|
+
rowKey?: string
|
|
341
|
+
/**
|
|
342
|
+
* 右侧布局数据
|
|
343
|
+
*/
|
|
344
|
+
modelValue?: any
|
|
345
|
+
/**
|
|
346
|
+
* 是否同步背景颜色
|
|
347
|
+
* @default false
|
|
348
|
+
*/
|
|
349
|
+
showSyncBg?: boolean
|
|
350
|
+
/**
|
|
351
|
+
* 是否展示背景颜色
|
|
352
|
+
* @default true
|
|
353
|
+
*/
|
|
354
|
+
showBgColor?: boolean
|
|
355
|
+
/**
|
|
356
|
+
* 是否展示空状态
|
|
357
|
+
* @default false
|
|
358
|
+
*/
|
|
359
|
+
showEmpty?: boolean
|
|
360
|
+
/**
|
|
361
|
+
* 是否展示折叠模块
|
|
362
|
+
* @default true
|
|
363
|
+
*/
|
|
364
|
+
showCollapse?: boolean
|
|
365
|
+
/**
|
|
366
|
+
* 是否展示头部模块
|
|
367
|
+
* @default true
|
|
368
|
+
*/
|
|
369
|
+
showHeader?: boolean
|
|
370
|
+
/**
|
|
371
|
+
* 是否展示描述模块
|
|
372
|
+
* @default true
|
|
373
|
+
*/
|
|
374
|
+
showDescriptions?: boolean
|
|
375
|
+
/**
|
|
376
|
+
* 是否展示状态栏
|
|
377
|
+
* @default false
|
|
378
|
+
*/
|
|
379
|
+
showStatus?: boolean
|
|
380
|
+
/**
|
|
381
|
+
* 是否展示驳回原因
|
|
382
|
+
* @default false
|
|
383
|
+
*/
|
|
384
|
+
showReason?: boolean
|
|
385
|
+
/**
|
|
386
|
+
* 是否展示底部栏
|
|
387
|
+
* @default true
|
|
388
|
+
*/
|
|
389
|
+
showFooter?: boolean
|
|
390
|
+
/**
|
|
391
|
+
* 是否展示校验提示
|
|
392
|
+
* @default true
|
|
393
|
+
*/
|
|
394
|
+
showValidate?: boolean
|
|
395
|
+
/**
|
|
396
|
+
* 是否展示上/下一个按钮
|
|
397
|
+
* @default false
|
|
398
|
+
*/
|
|
399
|
+
showPrevNext?: boolean
|
|
400
|
+
/**
|
|
401
|
+
* 是否展示滚动动画
|
|
402
|
+
* @default true
|
|
403
|
+
*/
|
|
404
|
+
showScrollAnimation?: boolean
|
|
405
|
+
/**
|
|
406
|
+
* 表格配置属性
|
|
407
|
+
*/
|
|
408
|
+
tableProps?: TableProps & {
|
|
409
|
+
/** 表格标题 */
|
|
410
|
+
title?: string
|
|
411
|
+
/** 合计配置数组(按数组顺序显示) */
|
|
412
|
+
totalProps?: TotalProps
|
|
413
|
+
/** 是否隐藏合计栏 */
|
|
414
|
+
isHideTotal?: boolean
|
|
415
|
+
}
|
|
416
|
+
/**
|
|
417
|
+
* 头部配置属性
|
|
418
|
+
* @default 无默认值
|
|
419
|
+
*/
|
|
420
|
+
headerProps?: {
|
|
421
|
+
/** 头部背景色类型 */
|
|
422
|
+
bgType?: ColorType & any
|
|
423
|
+
/** 头部标题 */
|
|
424
|
+
titleProp?: string
|
|
425
|
+
/** 子标题 */
|
|
426
|
+
subTitleProp?: string
|
|
427
|
+
/** 状态标签值 */
|
|
428
|
+
statusProp?: string
|
|
429
|
+
/** 状态标签类型 */
|
|
430
|
+
statusEnum?: StatusEnum
|
|
431
|
+
/** 驳回原因字段名 */
|
|
432
|
+
reasonProp?: string
|
|
433
|
+
/** 详情查询接口 */
|
|
434
|
+
requestApi?: (params?: any) => Promise<{ result?: Record<string, unknown> }>
|
|
435
|
+
}
|
|
436
|
+
/** 描述配置列 */
|
|
437
|
+
descriptionsProps?: InstanceType<typeof JztFormGrid>['$props']
|
|
438
|
+
/**
|
|
439
|
+
* 滚动超限高度(展示展开按钮)
|
|
440
|
+
* @default 400
|
|
441
|
+
*/
|
|
442
|
+
overHeight?: number
|
|
443
|
+
/** 操作按钮配置数组 */
|
|
444
|
+
buttonList?: Array<TopButtonProps>
|
|
445
|
+
}
|
|
446
|
+
|
|
447
|
+
/**
|
|
448
|
+
* 右侧布局组件 Emits 定义
|
|
449
|
+
*/
|
|
450
|
+
export type RightLayoutEmits = {
|
|
451
|
+
/** 详情置顶回调 */
|
|
452
|
+
(e: 'update:modelValue', value: any): void
|
|
453
|
+
/** 加载动画实例回调 */
|
|
454
|
+
(e: 'update:loading', value: boolean): void
|
|
455
|
+
/** 重置列表时触发 */
|
|
456
|
+
(e: 'rightReset'): void
|
|
457
|
+
}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { ElLoading } from 'element-plus'
|
|
2
|
+
|
|
3
|
+
/* 全局请求 loading */
|
|
4
|
+
let loadingInstance: ReturnType<typeof ElLoading.service>
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* @description 开启 Loading
|
|
8
|
+
* */
|
|
9
|
+
const startLoading = () => {
|
|
10
|
+
loadingInstance = ElLoading.service({
|
|
11
|
+
fullscreen: true,
|
|
12
|
+
lock: true,
|
|
13
|
+
text: 'Loading',
|
|
14
|
+
background: 'rgba(0, 0, 0, 0.7)'
|
|
15
|
+
})
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* @description 结束 Loading
|
|
20
|
+
* */
|
|
21
|
+
const endLoading = () => {
|
|
22
|
+
loadingInstance.close()
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* @description 显示全屏加载
|
|
27
|
+
* */
|
|
28
|
+
let needLoadingRequestCount = 0
|
|
29
|
+
export const showFullScreenLoading = () => {
|
|
30
|
+
if (needLoadingRequestCount === 0) {
|
|
31
|
+
startLoading()
|
|
32
|
+
}
|
|
33
|
+
needLoadingRequestCount++
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* @description 隐藏全屏加载
|
|
38
|
+
* */
|
|
39
|
+
export const tryHideFullScreenLoading = () => {
|
|
40
|
+
if (needLoadingRequestCount <= 0) return
|
|
41
|
+
needLoadingRequestCount--
|
|
42
|
+
if (needLoadingRequestCount === 0) {
|
|
43
|
+
endLoading()
|
|
44
|
+
}
|
|
45
|
+
}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
.loading-box {
|
|
2
|
+
display: flex;
|
|
3
|
+
flex-direction: column;
|
|
4
|
+
align-items: center;
|
|
5
|
+
justify-content: center;
|
|
6
|
+
width: 100%;
|
|
7
|
+
height: 100%;
|
|
8
|
+
.loading-wrap {
|
|
9
|
+
display: flex;
|
|
10
|
+
align-items: center;
|
|
11
|
+
justify-content: center;
|
|
12
|
+
padding: 98px;
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
.dot {
|
|
16
|
+
position: relative;
|
|
17
|
+
box-sizing: border-box;
|
|
18
|
+
display: inline-block;
|
|
19
|
+
width: 32px;
|
|
20
|
+
height: 32px;
|
|
21
|
+
font-size: 32px;
|
|
22
|
+
transform: rotate(45deg);
|
|
23
|
+
animation: ant-rotate 1.2s infinite linear;
|
|
24
|
+
}
|
|
25
|
+
.dot i {
|
|
26
|
+
position: absolute;
|
|
27
|
+
display: block;
|
|
28
|
+
width: 14px;
|
|
29
|
+
height: 14px;
|
|
30
|
+
background-color: var(--el-color-primary);
|
|
31
|
+
border-radius: 100%;
|
|
32
|
+
opacity: 0.3;
|
|
33
|
+
transform: scale(0.75);
|
|
34
|
+
transform-origin: 50% 50%;
|
|
35
|
+
animation: ant-spin-move 1s infinite linear alternate;
|
|
36
|
+
}
|
|
37
|
+
.dot i:nth-child(1) {
|
|
38
|
+
top: 0;
|
|
39
|
+
left: 0;
|
|
40
|
+
}
|
|
41
|
+
.dot i:nth-child(2) {
|
|
42
|
+
top: 0;
|
|
43
|
+
right: 0;
|
|
44
|
+
animation-delay: 0.4s;
|
|
45
|
+
}
|
|
46
|
+
.dot i:nth-child(3) {
|
|
47
|
+
right: 0;
|
|
48
|
+
bottom: 0;
|
|
49
|
+
animation-delay: 0.8s;
|
|
50
|
+
}
|
|
51
|
+
.dot i:nth-child(4) {
|
|
52
|
+
bottom: 0;
|
|
53
|
+
left: 0;
|
|
54
|
+
animation-delay: 1.2s;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
@keyframes ant-rotate {
|
|
58
|
+
to {
|
|
59
|
+
transform: rotate(405deg);
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
@keyframes ant-spin-move {
|
|
64
|
+
to {
|
|
65
|
+
opacity: 1;
|
|
66
|
+
}
|
|
67
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="loading-box">
|
|
3
|
+
<div class="loading-wrap">
|
|
4
|
+
<span class="dot dot-spin">
|
|
5
|
+
<i></i>
|
|
6
|
+
<i></i>
|
|
7
|
+
<i></i>
|
|
8
|
+
<i></i>
|
|
9
|
+
</span>
|
|
10
|
+
</div>
|
|
11
|
+
</div>
|
|
12
|
+
</template>
|
|
13
|
+
|
|
14
|
+
<script setup lang="ts" name="Loading"></script>
|
|
15
|
+
|
|
16
|
+
<style scoped lang="scss">
|
|
17
|
+
@use './index';
|
|
18
|
+
</style>
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="login-footer">
|
|
3
|
+
Copyright © 2022 九州通医疗信息科技(武汉)有限公司|授权类型:开发授权|授权项目:数据采集平台
|
|
4
|
+
</div>
|
|
5
|
+
</template>
|
|
6
|
+
<style scoped lang="scss">
|
|
7
|
+
.login-footer {
|
|
8
|
+
position: absolute;
|
|
9
|
+
bottom: 5%;
|
|
10
|
+
left: 0;
|
|
11
|
+
right: 0;
|
|
12
|
+
margin: 0 auto;
|
|
13
|
+
font-size: 14px;
|
|
14
|
+
color: rgba(153, 153, 153, 1);
|
|
15
|
+
text-align: center;
|
|
16
|
+
}
|
|
17
|
+
</style>
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<el-form ref="loginFormRef" :model="loginForm" :rules="loginRules" size="large">
|
|
3
|
+
<el-form-item prop="phone">
|
|
4
|
+
<el-input v-model="loginForm.phone" placeholder="请输入手机号或用户名" />
|
|
5
|
+
</el-form-item>
|
|
6
|
+
<el-form-item class="login-form-password" prop="password">
|
|
7
|
+
<el-input
|
|
8
|
+
v-model="loginForm.password"
|
|
9
|
+
type="password"
|
|
10
|
+
placeholder="请输入密码"
|
|
11
|
+
show-password
|
|
12
|
+
autocomplete="new-password"
|
|
13
|
+
/>
|
|
14
|
+
</el-form-item>
|
|
15
|
+
<el-form-item v-if="loginMode !== '0'" class="login-form-password" prop="code">
|
|
16
|
+
<el-input v-model="loginForm.code" placeholder="请输入验证码" maxlength="6">
|
|
17
|
+
<template #append>
|
|
18
|
+
<div v-if="loginMode === '1'" class="SmsCode" @click="getSmsCode">
|
|
19
|
+
<el-button type="primary" :loading="sendLoading" :disabled="loading" :btnDisabled="sendDisabled">
|
|
20
|
+
{{ second ? `${second}秒后重新获取` : '发送验证码' }}
|
|
21
|
+
</el-button>
|
|
22
|
+
</div>
|
|
23
|
+
<img
|
|
24
|
+
v-else-if="loginMode === '2'"
|
|
25
|
+
:src="`data:image/png;base64,${graphicCodeUrl}`"
|
|
26
|
+
class="login-graphic-img"
|
|
27
|
+
@click="getCaptchaImg"
|
|
28
|
+
/>
|
|
29
|
+
</template>
|
|
30
|
+
</el-input>
|
|
31
|
+
</el-form-item>
|
|
32
|
+
<div>常用密码: JZTeya0 JZT600998@</div>
|
|
33
|
+
<el-form-item>
|
|
34
|
+
<el-checkbox v-model="savePassword" label="记住密码一个月" style="font-size: 16px; margin-top: 20px" />
|
|
35
|
+
</el-form-item>
|
|
36
|
+
</el-form>
|
|
37
|
+
<div class="login-btn">
|
|
38
|
+
<el-button size="large" :loading="loading" @click="handleLogin()">立即登录</el-button>
|
|
39
|
+
</div>
|
|
40
|
+
<div class="err-msg">{{ errMsg }}</div>
|
|
41
|
+
</template>
|
|
42
|
+
|
|
43
|
+
<script setup lang="ts">
|
|
44
|
+
import type { ElForm } from 'element-plus'
|
|
45
|
+
import { onBeforeUnmount, onMounted, ref } from 'vue'
|
|
46
|
+
import { useEvents, useParams, loginServer } from '../hooks/useLogin'
|
|
47
|
+
const {
|
|
48
|
+
loginRules,
|
|
49
|
+
loginForm,
|
|
50
|
+
loginMode,
|
|
51
|
+
sendLoading,
|
|
52
|
+
second,
|
|
53
|
+
graphicCodeUrl,
|
|
54
|
+
sendDisabled,
|
|
55
|
+
savePassword,
|
|
56
|
+
loading,
|
|
57
|
+
errMsg
|
|
58
|
+
} = useParams()
|
|
59
|
+
const { getLoginSetting, getSmsCode, getCaptchaImg } = useEvents()
|
|
60
|
+
|
|
61
|
+
export interface LoginProps {
|
|
62
|
+
// loginApi: (params: any) => Promise<any>; // 请求表格数据的 api ==> 必传
|
|
63
|
+
loginCallBack?: (params: any) => Promise<any>
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
// 接受父组件参数,配置默认值
|
|
67
|
+
const props = withDefaults(defineProps<LoginProps>(), {})
|
|
68
|
+
|
|
69
|
+
const loginFormRef = ref<InstanceType<typeof ElForm>>()
|
|
70
|
+
// const errMsg = ref<string>("");
|
|
71
|
+
// login
|
|
72
|
+
const handleLogin = () => {
|
|
73
|
+
// errMsg.value = "";
|
|
74
|
+
if (!loginFormRef.value) return
|
|
75
|
+
loginFormRef.value.validate(async valid => {
|
|
76
|
+
if (!valid) return
|
|
77
|
+
loginServer(props.loginCallBack)
|
|
78
|
+
})
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
onMounted(() => {
|
|
82
|
+
getLoginSetting()
|
|
83
|
+
// 监听 enter 事件(调用登录)
|
|
84
|
+
document.onkeydown = (e: KeyboardEvent) => {
|
|
85
|
+
if (e.code === 'Enter' || e.code === 'enter' || e.code === 'NumpadEnter') {
|
|
86
|
+
if (loading.value) return
|
|
87
|
+
handleLogin()
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
})
|
|
91
|
+
|
|
92
|
+
onBeforeUnmount(() => {
|
|
93
|
+
document.onkeydown = null
|
|
94
|
+
})
|
|
95
|
+
</script>
|
|
96
|
+
|
|
97
|
+
<style scoped lang="scss">
|
|
98
|
+
@use '../index';
|
|
99
|
+
</style>
|