@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,494 @@
|
|
|
1
|
+
<script setup lang="tsx" name="JztLeftRightMode">
|
|
2
|
+
import { JztButtonList, JztEmpty, JztLabelTitle, JztQueryTable, JztSvgIcon } from '@jzt-spd/components'
|
|
3
|
+
import { default as CollapseButton } from './components/CollapseButton.vue'
|
|
4
|
+
import { default as LeftLayout } from './components/LeftLayout.vue'
|
|
5
|
+
import { default as RightLayout } from './components/RightLayout.vue'
|
|
6
|
+
|
|
7
|
+
import { isEmpty, removeEmpty } from '@jzt-spd/utils'
|
|
8
|
+
import { reactiveComputed, reactiveOmit, useElementSize, useVModel } from '@vueuse/core'
|
|
9
|
+
import { cloneDeep } from 'lodash-es'
|
|
10
|
+
import { computed, nextTick, ref, useSlots, watch } from 'vue'
|
|
11
|
+
import { useCollapse } from './hooks/useCollapse'
|
|
12
|
+
import { useLeftProps, useRightProps } from './hooks/useDefaultProps'
|
|
13
|
+
import { useMode } from './hooks/useMode'
|
|
14
|
+
import { usePrevNext } from './hooks/usePrevNext'
|
|
15
|
+
|
|
16
|
+
import { type ProTableInstance } from '../JztQueryTable/interface'
|
|
17
|
+
import { type Emits, type LeftLayoutInstance, type Props, type RightLayoutInstance } from './types/index'
|
|
18
|
+
|
|
19
|
+
const GUIDNoneValue = '00000000-0000-0000-0000-000000000000'
|
|
20
|
+
const props = withDefaults(defineProps<Props>(), {
|
|
21
|
+
mode: 'detail',
|
|
22
|
+
showHeader: true
|
|
23
|
+
})
|
|
24
|
+
const emits = defineEmits<Emits>()
|
|
25
|
+
const slots = useSlots()
|
|
26
|
+
|
|
27
|
+
const tableRef = ref<ProTableInstance>()
|
|
28
|
+
const leftLayoutRef = ref<LeftLayoutInstance | any>()
|
|
29
|
+
const rightLayoutRef = ref<RightLayoutInstance | any>()
|
|
30
|
+
const rightContainerRef = ref<HTMLDivElement>()
|
|
31
|
+
const loading = useVModel(props, 'loading', emits, { passive: true })
|
|
32
|
+
const rightData = useVModel(props, 'rightData', emits, { passive: true })
|
|
33
|
+
const tabActive = useVModel(props, 'tabActive', emits, { passive: true })
|
|
34
|
+
|
|
35
|
+
const leftWidth = computed(() => {
|
|
36
|
+
const { leftWidth = 360 } = props
|
|
37
|
+
if (Number.isNaN(Number(leftWidth))) {
|
|
38
|
+
return leftWidth
|
|
39
|
+
} else {
|
|
40
|
+
return `${leftWidth}px`
|
|
41
|
+
}
|
|
42
|
+
})
|
|
43
|
+
const showEmpty = computed(() => !leftLayoutRef.value?.list.length)
|
|
44
|
+
const tableProps = reactiveComputed(() => {
|
|
45
|
+
const { initParams, queryItems } = props?.searchProps ?? {}
|
|
46
|
+
const { columns, requestApi, headerButtonList = [], footerButtonList = [] } = props.leftProps ?? {}
|
|
47
|
+
return {
|
|
48
|
+
tableConfig: {
|
|
49
|
+
topList: [...headerButtonList, ...footerButtonList],
|
|
50
|
+
columns: columns ?? [],
|
|
51
|
+
queryItems: queryItems ?? []
|
|
52
|
+
},
|
|
53
|
+
requestApi: async (params: any) => {
|
|
54
|
+
return await requestApi?.({
|
|
55
|
+
...params,
|
|
56
|
+
...formatterForm({
|
|
57
|
+
...initParams,
|
|
58
|
+
...tableRef.value?.searchParam
|
|
59
|
+
})
|
|
60
|
+
})
|
|
61
|
+
},
|
|
62
|
+
initParam: initParams,
|
|
63
|
+
tabIsTop: true,
|
|
64
|
+
...reactiveOmit(props?.searchProps ?? ({} as any), ['initParams', 'queryItems'])
|
|
65
|
+
}
|
|
66
|
+
})
|
|
67
|
+
// 详情模式左侧布局组件 Props 定义
|
|
68
|
+
const computedLeftProps = reactiveComputed(() => {
|
|
69
|
+
const { initParams } = props?.searchProps ?? {}
|
|
70
|
+
const { backTopProps, showSelected, requestApi } = props.leftProps ?? {}
|
|
71
|
+
const yValue = showSelected || slots.leftFooter ? -60 : -20
|
|
72
|
+
return {
|
|
73
|
+
...useLeftProps(),
|
|
74
|
+
...props?.leftProps,
|
|
75
|
+
requestApi: async (params: any) => {
|
|
76
|
+
return await requestApi?.({
|
|
77
|
+
...params,
|
|
78
|
+
...formatterForm({
|
|
79
|
+
...initParams,
|
|
80
|
+
...tableRef.value?.searchParam
|
|
81
|
+
})
|
|
82
|
+
})
|
|
83
|
+
},
|
|
84
|
+
backTopProps: {
|
|
85
|
+
x: -20,
|
|
86
|
+
y: yValue,
|
|
87
|
+
size: 54,
|
|
88
|
+
threshold: 500,
|
|
89
|
+
container: '.left-aside',
|
|
90
|
+
scrollContainer: '.left-aside-scrollbar',
|
|
91
|
+
...(backTopProps ?? {})
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
})
|
|
95
|
+
// 详情模式右侧布局组件 Props 定义
|
|
96
|
+
const computedRightProps = reactiveComputed(() => {
|
|
97
|
+
const { rowKey } = computedLeftProps ?? {}
|
|
98
|
+
return {
|
|
99
|
+
...useRightProps(),
|
|
100
|
+
...props.rightProps,
|
|
101
|
+
showEmpty,
|
|
102
|
+
rowKey
|
|
103
|
+
}
|
|
104
|
+
})
|
|
105
|
+
|
|
106
|
+
const { modelMode, options, onChange: onModeChange } = useMode({ props, emits })
|
|
107
|
+
const { isCollapse, onCollapse } = useCollapse()
|
|
108
|
+
const { prevNextButtonList } = usePrevNext({
|
|
109
|
+
leftProps: computedLeftProps,
|
|
110
|
+
rightProps: computedRightProps,
|
|
111
|
+
leftLayoutRef,
|
|
112
|
+
rightLayoutRef,
|
|
113
|
+
emits
|
|
114
|
+
})
|
|
115
|
+
const { height } = useElementSize(rightContainerRef)
|
|
116
|
+
|
|
117
|
+
const formatterForm = form => {
|
|
118
|
+
let searchForm = cloneDeep(form)
|
|
119
|
+
props?.searchProps?.queryItems?.forEach(item => {
|
|
120
|
+
if (item?.search && item.search?.isSetEmptyData && isEmpty(searchForm[item.prop])) {
|
|
121
|
+
searchForm[item.prop] = item.search.emptyNullValue || GUIDNoneValue
|
|
122
|
+
}
|
|
123
|
+
if (item.search && item.search?.startField && item.search?.endField) {
|
|
124
|
+
const { startField, endField } = item.search
|
|
125
|
+
const timeList = searchForm[item.prop] || []
|
|
126
|
+
if (item?.search?.el !== 'JztNumericalRange' && item?.search?.el !== 'JztDateSelect') {
|
|
127
|
+
searchForm[startField] = timeList[0] ?? ''
|
|
128
|
+
searchForm[endField] = timeList[1] ?? ''
|
|
129
|
+
}
|
|
130
|
+
delete searchForm[item.prop]
|
|
131
|
+
}
|
|
132
|
+
})
|
|
133
|
+
const endFrom = removeEmpty(searchForm)
|
|
134
|
+
return endFrom
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
const onSearch = () => {
|
|
138
|
+
isCollapse.value = false
|
|
139
|
+
leftLayoutRef.value?.search()
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
const onReset = () => {
|
|
143
|
+
isCollapse.value = false
|
|
144
|
+
leftLayoutRef.value?.search()
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
const onTabChange = (val: string) => {
|
|
148
|
+
emits('tabChange', val)
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
const onCardClick = async (row: any, isInit = false) => {
|
|
152
|
+
rightData.value = row
|
|
153
|
+
await nextTick()
|
|
154
|
+
if (rightLayoutRef?.value) {
|
|
155
|
+
const { search } = rightLayoutRef?.value
|
|
156
|
+
await search?.()
|
|
157
|
+
}
|
|
158
|
+
emits('cardClick', row)
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
const onButtonClick = (fun: Function) => {
|
|
162
|
+
const searchParams = formatterForm({
|
|
163
|
+
...tableRef.value?.searchParam,
|
|
164
|
+
...props?.searchProps?.initParams
|
|
165
|
+
})
|
|
166
|
+
fun?.({ searchParams, leftData: { ...leftLayoutRef.value }, rightData: { ...rightLayoutRef.value } })
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
watch(
|
|
170
|
+
() => tableRef.value?.searchParam,
|
|
171
|
+
newVal => {
|
|
172
|
+
newVal && emits('update:searchData', newVal)
|
|
173
|
+
},
|
|
174
|
+
{ deep: true, immediate: true }
|
|
175
|
+
)
|
|
176
|
+
|
|
177
|
+
watch(
|
|
178
|
+
() => props.searchData,
|
|
179
|
+
newVal => {
|
|
180
|
+
Object.assign(tableRef?.value?.searchParam as any, newVal)
|
|
181
|
+
},
|
|
182
|
+
{ deep: true }
|
|
183
|
+
)
|
|
184
|
+
|
|
185
|
+
const expose = {
|
|
186
|
+
tableRef,
|
|
187
|
+
leftLayoutRef,
|
|
188
|
+
rightLayoutRef,
|
|
189
|
+
setLoading: (val: boolean) => (loading.value = val),
|
|
190
|
+
search: () => tableRef.value?.searchAndClear()
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
defineExpose(expose)
|
|
194
|
+
|
|
195
|
+
export type Expose = typeof expose
|
|
196
|
+
</script>
|
|
197
|
+
|
|
198
|
+
<template>
|
|
199
|
+
<div class="jzt-left-right-mode">
|
|
200
|
+
<jzt-query-table
|
|
201
|
+
ref="tableRef"
|
|
202
|
+
v-model:tab-active="tabActive"
|
|
203
|
+
v-bind="tableProps"
|
|
204
|
+
:table-loading="loading"
|
|
205
|
+
@search="onSearch"
|
|
206
|
+
@reset="onReset"
|
|
207
|
+
@tab-change="onTabChange"
|
|
208
|
+
>
|
|
209
|
+
<template v-if="mode === 'list'" #toolBtnRight="scope">
|
|
210
|
+
<slot name="tool-btn-right" v-bind="scope"></slot>
|
|
211
|
+
</template>
|
|
212
|
+
<template v-if="mode === 'list'" #tableTops>
|
|
213
|
+
<div v-if="showHeader" class="container-header">
|
|
214
|
+
<div class="container-header_left" :style="{ width: leftWidth }">
|
|
215
|
+
<jzt-label-title class="title" :title="title"></jzt-label-title>
|
|
216
|
+
<slot name="header-left">
|
|
217
|
+
<div v-show="!showEmpty" class="button-list">
|
|
218
|
+
<jzt-button-list
|
|
219
|
+
v-if="computedLeftProps?.headerButtonList"
|
|
220
|
+
:button-list="computedLeftProps.headerButtonList"
|
|
221
|
+
@onClick="onButtonClick"
|
|
222
|
+
></jzt-button-list>
|
|
223
|
+
</div>
|
|
224
|
+
</slot>
|
|
225
|
+
</div>
|
|
226
|
+
<div class="container-header_right">
|
|
227
|
+
<slot name="header-right"></slot>
|
|
228
|
+
<el-segmented v-if="showMode" v-model="modelMode" :options="options" @change="onModeChange">
|
|
229
|
+
<template #default="{ item }: { item: any }">
|
|
230
|
+
<el-space :size="2">
|
|
231
|
+
<el-icon size="16"><jzt-svg-icon :name="item.icon" /></el-icon>
|
|
232
|
+
<span>{{ item.label }}</span>
|
|
233
|
+
</el-space>
|
|
234
|
+
</template>
|
|
235
|
+
</el-segmented>
|
|
236
|
+
</div>
|
|
237
|
+
</div>
|
|
238
|
+
</template>
|
|
239
|
+
<div v-if="mode === 'detail'" v-loading="loading" class="container spd-card">
|
|
240
|
+
<div v-if="showHeader" class="container-header">
|
|
241
|
+
<div class="container-header_left" :style="{ width: leftWidth }">
|
|
242
|
+
<jzt-label-title class="title" :title="title"></jzt-label-title>
|
|
243
|
+
<slot name="header-left">
|
|
244
|
+
<div v-show="!showEmpty" class="button-list">
|
|
245
|
+
<jzt-button-list
|
|
246
|
+
v-if="computedLeftProps?.headerButtonList"
|
|
247
|
+
:button-list="computedLeftProps.headerButtonList"
|
|
248
|
+
@onClick="onButtonClick"
|
|
249
|
+
></jzt-button-list>
|
|
250
|
+
</div>
|
|
251
|
+
</slot>
|
|
252
|
+
</div>
|
|
253
|
+
<div class="container-header_right">
|
|
254
|
+
<slot name="header-right"></slot>
|
|
255
|
+
<el-segmented v-if="showMode" v-model="modelMode" :options="options" @change="onModeChange">
|
|
256
|
+
<template #default="{ item }: { item: any }">
|
|
257
|
+
<el-space :size="2">
|
|
258
|
+
<el-icon size="16"><jzt-svg-icon :name="item.icon" /></el-icon>
|
|
259
|
+
<span>{{ item.label }}</span>
|
|
260
|
+
</el-space>
|
|
261
|
+
</template>
|
|
262
|
+
</el-segmented>
|
|
263
|
+
</div>
|
|
264
|
+
</div>
|
|
265
|
+
<div class="container-content">
|
|
266
|
+
<div
|
|
267
|
+
v-show="!showEmpty"
|
|
268
|
+
class="container-left"
|
|
269
|
+
:class="{ 'is-collapse': isCollapse }"
|
|
270
|
+
:style="{ width: leftWidth }"
|
|
271
|
+
>
|
|
272
|
+
<transition name="el-fade-in-linear">
|
|
273
|
+
<div class="container-left__main" v-show="!isCollapse">
|
|
274
|
+
<slot name="left">
|
|
275
|
+
<left-layout
|
|
276
|
+
ref="leftLayoutRef"
|
|
277
|
+
v-model:loading="loading"
|
|
278
|
+
v-bind="computedLeftProps"
|
|
279
|
+
@load="emits('load', $event)"
|
|
280
|
+
@query="emits('query', $event)"
|
|
281
|
+
@reset="emits('reset', $event)"
|
|
282
|
+
@init="onCardClick($event, true)"
|
|
283
|
+
@card-click="onCardClick"
|
|
284
|
+
@card-selected="emits('cardSelected', $event)"
|
|
285
|
+
>
|
|
286
|
+
<template v-if="slots['left-header']" #header="scope">
|
|
287
|
+
<slot name="left-header" v-bind="scope"></slot>
|
|
288
|
+
</template>
|
|
289
|
+
<template v-if="slots['left-footer']" #footer="scope">
|
|
290
|
+
<slot name="left-footer" v-bind="scope"></slot>
|
|
291
|
+
</template>
|
|
292
|
+
<template v-if="computedLeftProps?.footerButtonList?.length" #footer-right="scope">
|
|
293
|
+
<slot name="left-footer-right" v-bind="scope">
|
|
294
|
+
<div class="button-list">
|
|
295
|
+
<jzt-button-list
|
|
296
|
+
:button-list="computedLeftProps.footerButtonList"
|
|
297
|
+
@onClick="onButtonClick"
|
|
298
|
+
></jzt-button-list>
|
|
299
|
+
</div>
|
|
300
|
+
</slot>
|
|
301
|
+
</template>
|
|
302
|
+
<template v-if="slots['left-card']" #card="scope">
|
|
303
|
+
<slot name="left-card" v-bind="scope"></slot>
|
|
304
|
+
</template>
|
|
305
|
+
<template v-if="slots['left-card-title-left']" #card-title-left="scope">
|
|
306
|
+
<slot name="left-card-title-left" v-bind="scope"></slot>
|
|
307
|
+
</template>
|
|
308
|
+
<template v-if="slots['left-card-title-center']" #card-title-center="scope">
|
|
309
|
+
<slot name="left-card-title-center" v-bind="scope"></slot>
|
|
310
|
+
</template>
|
|
311
|
+
<template v-if="slots['left-card-title-right']" #card-title-right="scope">
|
|
312
|
+
<slot name="left-card-title-right" v-bind="scope"></slot>
|
|
313
|
+
</template>
|
|
314
|
+
<template v-if="slots['left-card-footer']" #card-footer="scope">
|
|
315
|
+
<slot name="left-card-footer" v-bind="scope"></slot>
|
|
316
|
+
</template>
|
|
317
|
+
</left-layout>
|
|
318
|
+
</slot>
|
|
319
|
+
</div>
|
|
320
|
+
</transition>
|
|
321
|
+
<collapse-button :is-collapse="isCollapse" :text="collapseText" @click="onCollapse"></collapse-button>
|
|
322
|
+
</div>
|
|
323
|
+
<div v-if="!showEmpty" ref="rightContainerRef" class="container-right">
|
|
324
|
+
<slot name="right" :height="height">
|
|
325
|
+
<right-layout
|
|
326
|
+
ref="rightLayoutRef"
|
|
327
|
+
v-model="rightData"
|
|
328
|
+
v-bind="computedRightProps"
|
|
329
|
+
@right-reset="$emit('rightReset')"
|
|
330
|
+
>
|
|
331
|
+
<template #main-header="scope">
|
|
332
|
+
<slot name="right-main-header" v-bind="scope"></slot>
|
|
333
|
+
</template>
|
|
334
|
+
<template v-if="slots['right-table-main']" #table-main="scope">
|
|
335
|
+
<slot name="right-table-main" v-bind="scope"></slot>
|
|
336
|
+
</template>
|
|
337
|
+
<template #header-title="scope">
|
|
338
|
+
<slot name="right-header-title" v-bind="scope"></slot>
|
|
339
|
+
</template>
|
|
340
|
+
<template #table-header="scope">
|
|
341
|
+
<slot name="right-table-header" v-bind="scope"></slot>
|
|
342
|
+
</template>
|
|
343
|
+
<template #header-extra="scope">
|
|
344
|
+
<slot name="right-header-extra" v-bind="scope"></slot>
|
|
345
|
+
</template>
|
|
346
|
+
<template #descriptions="scope">
|
|
347
|
+
<slot name="descriptions" v-bind="scope"></slot>
|
|
348
|
+
</template>
|
|
349
|
+
<template #footer="scope">
|
|
350
|
+
<slot name="right-footer" v-bind="scope">
|
|
351
|
+
<div v-if="rightProps?.showFooter" class="container-right-footer">
|
|
352
|
+
<jzt-button-list
|
|
353
|
+
v-if="rightProps?.showPrevNext"
|
|
354
|
+
:button-list="prevNextButtonList"
|
|
355
|
+
@onClick="onButtonClick"
|
|
356
|
+
></jzt-button-list>
|
|
357
|
+
<jzt-button-list
|
|
358
|
+
v-if="rightProps?.buttonList"
|
|
359
|
+
:button-list="rightProps.buttonList"
|
|
360
|
+
@onClick="onButtonClick"
|
|
361
|
+
></jzt-button-list>
|
|
362
|
+
</div>
|
|
363
|
+
</slot>
|
|
364
|
+
</template>
|
|
365
|
+
</right-layout>
|
|
366
|
+
</slot>
|
|
367
|
+
<slot v-if="slots.right" name="right-footer">
|
|
368
|
+
<div v-if="rightProps?.showFooter" class="container-right-footer">
|
|
369
|
+
<jzt-button-list
|
|
370
|
+
v-if="rightProps?.showPrevNext"
|
|
371
|
+
:button-list="prevNextButtonList"
|
|
372
|
+
@onClick="onButtonClick"
|
|
373
|
+
></jzt-button-list>
|
|
374
|
+
<slot name="right-footer-right"></slot>
|
|
375
|
+
</div>
|
|
376
|
+
</slot>
|
|
377
|
+
</div>
|
|
378
|
+
<div v-show="showEmpty" class="container-empty">
|
|
379
|
+
<jzt-empty :empty-text="emptyText" />
|
|
380
|
+
<slot v-if="!loading" name="empty">
|
|
381
|
+
<jzt-button-list
|
|
382
|
+
v-if="leftProps?.headerButtonList?.length"
|
|
383
|
+
:button-list="leftProps.headerButtonList"
|
|
384
|
+
@onClick="onButtonClick"
|
|
385
|
+
></jzt-button-list>
|
|
386
|
+
</slot>
|
|
387
|
+
</div>
|
|
388
|
+
</div>
|
|
389
|
+
</div>
|
|
390
|
+
</jzt-query-table>
|
|
391
|
+
</div>
|
|
392
|
+
</template>
|
|
393
|
+
|
|
394
|
+
<style lang="scss" scoped>
|
|
395
|
+
.jzt-left-right-mode {
|
|
396
|
+
height: 100%;
|
|
397
|
+
}
|
|
398
|
+
.container {
|
|
399
|
+
flex: 1;
|
|
400
|
+
height: 100%;
|
|
401
|
+
overflow: hidden;
|
|
402
|
+
position: relative;
|
|
403
|
+
display: flex;
|
|
404
|
+
flex-direction: column;
|
|
405
|
+
padding: 8px !important;
|
|
406
|
+
box-sizing: border-box;
|
|
407
|
+
&-header {
|
|
408
|
+
display: flex;
|
|
409
|
+
align-items: center;
|
|
410
|
+
gap: 8px;
|
|
411
|
+
margin-bottom: 4px;
|
|
412
|
+
min-height: 30px;
|
|
413
|
+
&_left {
|
|
414
|
+
display: flex;
|
|
415
|
+
justify-content: space-between;
|
|
416
|
+
align-items: center;
|
|
417
|
+
}
|
|
418
|
+
&_right {
|
|
419
|
+
flex: 1;
|
|
420
|
+
display: flex;
|
|
421
|
+
justify-content: flex-end;
|
|
422
|
+
align-items: center;
|
|
423
|
+
}
|
|
424
|
+
:deep(.title) {
|
|
425
|
+
width: fit-content;
|
|
426
|
+
padding: 0;
|
|
427
|
+
}
|
|
428
|
+
}
|
|
429
|
+
&-content {
|
|
430
|
+
flex: 1;
|
|
431
|
+
display: flex;
|
|
432
|
+
overflow: hidden;
|
|
433
|
+
gap: 8px;
|
|
434
|
+
}
|
|
435
|
+
&-left {
|
|
436
|
+
box-sizing: border-box;
|
|
437
|
+
height: 100%;
|
|
438
|
+
border-radius: 8px;
|
|
439
|
+
border: 1px solid #dee2e6;
|
|
440
|
+
background: linear-gradient(180deg, #3475fa1a 7.000000000000001%, #3475fa03 100%);
|
|
441
|
+
flex-shrink: 0;
|
|
442
|
+
transition: width 0.3s ease-in-out;
|
|
443
|
+
position: relative;
|
|
444
|
+
overflow: hidden;
|
|
445
|
+
&__main {
|
|
446
|
+
height: 100%;
|
|
447
|
+
}
|
|
448
|
+
&.is-collapse {
|
|
449
|
+
width: 32px !important;
|
|
450
|
+
}
|
|
451
|
+
&:hover .collapse-button:not(.is-collapse) {
|
|
452
|
+
right: 8px;
|
|
453
|
+
}
|
|
454
|
+
}
|
|
455
|
+
&-right {
|
|
456
|
+
height: 100%;
|
|
457
|
+
border-radius: 8px;
|
|
458
|
+
border: 1px solid #dee2e6;
|
|
459
|
+
overflow: hidden;
|
|
460
|
+
display: flex;
|
|
461
|
+
flex-direction: column;
|
|
462
|
+
position: relative;
|
|
463
|
+
flex: 1;
|
|
464
|
+
&-footer {
|
|
465
|
+
display: flex;
|
|
466
|
+
justify-content: center;
|
|
467
|
+
padding: 0 12px 8px;
|
|
468
|
+
margin-top: -4px;
|
|
469
|
+
}
|
|
470
|
+
:deep(.table-main .el-table .el-scrollbar) {
|
|
471
|
+
min-height: auto !important;
|
|
472
|
+
}
|
|
473
|
+
}
|
|
474
|
+
&-empty {
|
|
475
|
+
position: absolute;
|
|
476
|
+
top: 50%;
|
|
477
|
+
left: 50%;
|
|
478
|
+
transform: translate(-50%, -50%);
|
|
479
|
+
display: flex;
|
|
480
|
+
flex-direction: column;
|
|
481
|
+
justify-content: center;
|
|
482
|
+
align-items: center;
|
|
483
|
+
gap: 8px;
|
|
484
|
+
}
|
|
485
|
+
}
|
|
486
|
+
|
|
487
|
+
.button-list {
|
|
488
|
+
display: flex;
|
|
489
|
+
gap: 8px;
|
|
490
|
+
:deep(.el-button) {
|
|
491
|
+
margin: 0;
|
|
492
|
+
}
|
|
493
|
+
}
|
|
494
|
+
</style>
|