@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,275 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="imagePreview column-top-center">
|
|
3
|
+
<div v-if="imgSrcList.length" class="preview">
|
|
4
|
+
<el-image
|
|
5
|
+
style="width: 100%; height: 100%"
|
|
6
|
+
:src="imgSrcList[activeIndex]"
|
|
7
|
+
:preview-src-list="imgSrcList"
|
|
8
|
+
show-progress
|
|
9
|
+
:initial-index="activeIndex"
|
|
10
|
+
fit="scale-down"
|
|
11
|
+
/>
|
|
12
|
+
<!-- PDF 文件:显示封面,点击打开 PDF -->
|
|
13
|
+
<div v-if="isCurrentPdf" class="pdf-overlay flx-center" @click="openPdf">
|
|
14
|
+
<el-icon :size="40" color="#fff"><View /></el-icon>
|
|
15
|
+
<span class="pdf-hint">点击查看 PDF</span>
|
|
16
|
+
</div>
|
|
17
|
+
|
|
18
|
+
<div
|
|
19
|
+
v-if="imgSrcList.length > 1"
|
|
20
|
+
class="circle flx-center previous"
|
|
21
|
+
title="上一张"
|
|
22
|
+
@click="onPrevious(activeIndex)"
|
|
23
|
+
>
|
|
24
|
+
<el-icon :size="18"><ArrowLeftBold /></el-icon>
|
|
25
|
+
</div>
|
|
26
|
+
<div v-if="imgSrcList.length > 1" class="circle flx-center next" title="下一张" @click="onNext(activeIndex)">
|
|
27
|
+
<el-icon :size="18"><ArrowRightBold /></el-icon>
|
|
28
|
+
</div>
|
|
29
|
+
</div>
|
|
30
|
+
<div v-else class="empty-box">
|
|
31
|
+
<el-image :src="defaultProduct" class="defaultProduct" fit="scale-down" />
|
|
32
|
+
<span class="empty">暂无图片</span>
|
|
33
|
+
<span class="empty2">No Picture</span>
|
|
34
|
+
</div>
|
|
35
|
+
<div v-if="imgSrcList && imgSrcList.length" class="scroll-thumbnail flx-left-center" ref="scrollBox">
|
|
36
|
+
<div
|
|
37
|
+
v-for="(itemSrc, index) in imgSrcList"
|
|
38
|
+
class="thumbnail-item"
|
|
39
|
+
:id="`thumbnail_${index}`"
|
|
40
|
+
:key="`thumbnail_${index}`"
|
|
41
|
+
:ref="el => setItemRef(el, index + 1)"
|
|
42
|
+
:class="{ active: index === activeIndex }"
|
|
43
|
+
@click="activeIndex = index"
|
|
44
|
+
>
|
|
45
|
+
<el-image style="width: 100%; height: 100%" :src="itemSrc" fit="scale-down" />
|
|
46
|
+
</div>
|
|
47
|
+
</div>
|
|
48
|
+
<div v-if="imgSrcList && imgSrcList.length" class="paging">{{ activeIndex + 1 }} / {{ imgSrcList.length }}</div>
|
|
49
|
+
</div>
|
|
50
|
+
</template>
|
|
51
|
+
|
|
52
|
+
<script setup lang="tsx" name="JztFilePreview">
|
|
53
|
+
import pdfCover from '../../../../spd-common-lib/styles//src/assets/images/pdfCover.png'
|
|
54
|
+
import { isPdfSuffix } from '../../../../spd-common-lib/utils/src/utils/is'
|
|
55
|
+
import { ref, onMounted, computed } from 'vue'
|
|
56
|
+
import { View } from '@element-plus/icons-vue'
|
|
57
|
+
import { useUploadFileHook } from '../../hooks/useUploadFileHook'
|
|
58
|
+
import defaultProduct from '../images/defaultProduct.png'
|
|
59
|
+
|
|
60
|
+
const { getFullUrl, getFileShowList } = useUploadFileHook()
|
|
61
|
+
|
|
62
|
+
const props = withDefaults(defineProps<ProductInfo>(), {
|
|
63
|
+
srcList: () => []
|
|
64
|
+
})
|
|
65
|
+
|
|
66
|
+
const activeIndex = ref(0)
|
|
67
|
+
|
|
68
|
+
// const srcList = ref<string[]>([
|
|
69
|
+
// 'https://fuss10.elemecdn.com/a/3f/3302e58f9a181d2509f3dc0fa68b0jpeg.jpeg',
|
|
70
|
+
// 'https://fuss10.elemecdn.com/1/34/19aa98b1fcb2781c4fba33d850549jpeg.jpeg',
|
|
71
|
+
// 'https://fuss10.elemecdn.com/0/6f/e35ff375812e6b0020b6b4e8f9583jpeg.jpeg',
|
|
72
|
+
// 'https://fuss10.elemecdn.com/9/bb/e27858e973f5d7d3904835f46abbdjpeg.jpeg',
|
|
73
|
+
// 'https://fuss10.elemecdn.com/d/e6/c4d93a3805b3ce3f323f7974e6f78jpeg.jpeg',
|
|
74
|
+
// 'https://fuss10.elemecdn.com/3/28/bbf893f792f03a54408b3b7a7ebf0jpeg.jpeg',
|
|
75
|
+
// 'https://mozilla.github.io/pdf.js/web/compressed.tracemonkey-pldi-09.pdf'
|
|
76
|
+
// ])
|
|
77
|
+
|
|
78
|
+
// 当前项是否为 PDF
|
|
79
|
+
const isCurrentPdf = computed(() => isPdfSuffix(originalSrcList.value[activeIndex.value]))
|
|
80
|
+
|
|
81
|
+
// 打开当前 PDF
|
|
82
|
+
const openPdf = () => {
|
|
83
|
+
const url = originalSrcList.value[activeIndex.value]
|
|
84
|
+
if (url) window.open(url, '_blank')
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
const scrollBox = ref<HTMLDivElement | null>(null)
|
|
88
|
+
const itemRefs = ref<(HTMLDivElement | null)[]>([])
|
|
89
|
+
|
|
90
|
+
function setItemRef(el: HTMLDivElement | null, index: number) {
|
|
91
|
+
itemRefs.value[index] = el
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
export interface ProductInfo {
|
|
95
|
+
srcList: string[]
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
// 原始完整 URL 列表
|
|
99
|
+
const originalSrcList = computed(() => props.srcList.map(url => getFullUrl(url)))
|
|
100
|
+
|
|
101
|
+
// 图片 URL 列表 已经替换了PDF 方便预览
|
|
102
|
+
const imgSrcList = computed(() => {
|
|
103
|
+
return props.srcList.map(url => {
|
|
104
|
+
const fullUrl = getFullUrl(url)
|
|
105
|
+
return isPdfSuffix(fullUrl) ? pdfCover : fullUrl
|
|
106
|
+
})
|
|
107
|
+
})
|
|
108
|
+
|
|
109
|
+
const onScrollTo = (index: number) => {
|
|
110
|
+
const container = scrollBox.value
|
|
111
|
+
const target = itemRefs.value[index]
|
|
112
|
+
if (!container || !target) return
|
|
113
|
+
container.scrollTo({
|
|
114
|
+
left: target.offsetLeft + 20,
|
|
115
|
+
behavior: 'smooth'
|
|
116
|
+
})
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
const onScrollToBoth = (inline, index = 1) => {
|
|
120
|
+
const target = itemRefs.value[index]
|
|
121
|
+
if (target) {
|
|
122
|
+
target.scrollIntoView({
|
|
123
|
+
behavior: 'smooth', // 平滑滚动
|
|
124
|
+
inline: inline, // ⬅️ 滚动到容器最左边
|
|
125
|
+
block: 'nearest' // 垂直方向不动
|
|
126
|
+
})
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
// 切换上一张图片
|
|
131
|
+
const onPrevious = (index: number) => {
|
|
132
|
+
const len = imgSrcList.value?.length || 0
|
|
133
|
+
if (len <= 0) return
|
|
134
|
+
if (index > 0) {
|
|
135
|
+
activeIndex.value--
|
|
136
|
+
onScrollTo(activeIndex.value)
|
|
137
|
+
} else {
|
|
138
|
+
activeIndex.value = len - 1
|
|
139
|
+
onScrollToBoth('end', len)
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
// 切换下一张图片
|
|
143
|
+
const onNext = (index: number) => {
|
|
144
|
+
const len = imgSrcList.value?.length || 0
|
|
145
|
+
if (len <= 0) return
|
|
146
|
+
if (index >= len - 1) {
|
|
147
|
+
activeIndex.value = 0
|
|
148
|
+
onScrollToBoth('start', 1)
|
|
149
|
+
} else {
|
|
150
|
+
activeIndex.value++
|
|
151
|
+
onScrollTo(activeIndex.value)
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
</script>
|
|
155
|
+
<style lang="scss" scoped>
|
|
156
|
+
.imagePreview {
|
|
157
|
+
width: 100%;
|
|
158
|
+
height: 100%;
|
|
159
|
+
overflow: hidden;
|
|
160
|
+
flex-shrink: 0;
|
|
161
|
+
.empty-box {
|
|
162
|
+
display: flex;
|
|
163
|
+
flex-direction: column;
|
|
164
|
+
justify-content: center;
|
|
165
|
+
align-items: center;
|
|
166
|
+
width: 100%;
|
|
167
|
+
height: 100%;
|
|
168
|
+
max-height: 350px;
|
|
169
|
+
color: #d1d2d2;
|
|
170
|
+
background: #f6f7f9;
|
|
171
|
+
border-radius: 8px;
|
|
172
|
+
.defaultProduct {
|
|
173
|
+
width: 120px;
|
|
174
|
+
height: 120px;
|
|
175
|
+
}
|
|
176
|
+
.empty {
|
|
177
|
+
font-size: 28px;
|
|
178
|
+
}
|
|
179
|
+
.empty2 {
|
|
180
|
+
font-size: 16px;
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
.preview {
|
|
185
|
+
flex: 1;
|
|
186
|
+
position: relative;
|
|
187
|
+
width: 100%;
|
|
188
|
+
height: 100%;
|
|
189
|
+
border-radius: 6px;
|
|
190
|
+
background: #f6f7f9;
|
|
191
|
+
padding: 8px;
|
|
192
|
+
overflow: hidden;
|
|
193
|
+
img {
|
|
194
|
+
width: 100%;
|
|
195
|
+
height: 100%;
|
|
196
|
+
object-fit: scale-down;
|
|
197
|
+
}
|
|
198
|
+
.circle {
|
|
199
|
+
width: 48px;
|
|
200
|
+
height: 48px;
|
|
201
|
+
border-radius: 50%;
|
|
202
|
+
opacity: 0.8;
|
|
203
|
+
border: 1px solid #bbbfc2;
|
|
204
|
+
background: #ffffffcc;
|
|
205
|
+
}
|
|
206
|
+
.previous {
|
|
207
|
+
position: absolute;
|
|
208
|
+
left: 24px;
|
|
209
|
+
top: 50%;
|
|
210
|
+
transform: translateY(-50%);
|
|
211
|
+
z-index: 10;
|
|
212
|
+
cursor: pointer;
|
|
213
|
+
}
|
|
214
|
+
.next {
|
|
215
|
+
position: absolute;
|
|
216
|
+
right: 24px;
|
|
217
|
+
top: 50%;
|
|
218
|
+
transform: translateY(-50%);
|
|
219
|
+
z-index: 10;
|
|
220
|
+
cursor: pointer;
|
|
221
|
+
}
|
|
222
|
+
&:hover .pdf-overlay {
|
|
223
|
+
opacity: 1;
|
|
224
|
+
}
|
|
225
|
+
.pdf-overlay {
|
|
226
|
+
position: absolute;
|
|
227
|
+
inset: 0;
|
|
228
|
+
background: rgba(0, 0, 0, 0.45);
|
|
229
|
+
opacity: 0;
|
|
230
|
+
transition: opacity 0.2s;
|
|
231
|
+
flex-direction: column;
|
|
232
|
+
gap: 8px;
|
|
233
|
+
.pdf-hint {
|
|
234
|
+
color: #fff;
|
|
235
|
+
font-size: 14px;
|
|
236
|
+
}
|
|
237
|
+
}
|
|
238
|
+
}
|
|
239
|
+
.scroll-thumbnail {
|
|
240
|
+
width: 100%;
|
|
241
|
+
height: 120px;
|
|
242
|
+
overflow-x: auto;
|
|
243
|
+
overflow-y: hidden;
|
|
244
|
+
scroll-behavior: smooth; /* 平滑滚动 */
|
|
245
|
+
white-space: nowrap; /* 禁止换行 */
|
|
246
|
+
flex-wrap: nowrap;
|
|
247
|
+
.thumbnail-item {
|
|
248
|
+
flex-shrink: 0;
|
|
249
|
+
width: 150px;
|
|
250
|
+
height: 92px;
|
|
251
|
+
margin-right: 15px;
|
|
252
|
+
border-radius: 4px;
|
|
253
|
+
border: 2px solid #dee2e6;
|
|
254
|
+
user-select: none;
|
|
255
|
+
&.active {
|
|
256
|
+
border: 2px solid var(--el-color-primary);
|
|
257
|
+
}
|
|
258
|
+
}
|
|
259
|
+
}
|
|
260
|
+
.paging {
|
|
261
|
+
color: #333333;
|
|
262
|
+
font-size: 14px;
|
|
263
|
+
font-weight: 500;
|
|
264
|
+
width: 100%;
|
|
265
|
+
height: 35px;
|
|
266
|
+
text-align: center;
|
|
267
|
+
line-height: 35px;
|
|
268
|
+
}
|
|
269
|
+
</style>
|
|
270
|
+
|
|
271
|
+
<style>
|
|
272
|
+
::-webkit-scrollbar {
|
|
273
|
+
height: 8px; /* 设置滚动条高度 */
|
|
274
|
+
}
|
|
275
|
+
</style>
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="qxUnique-container">
|
|
3
|
+
<!-- 产品标识基本信息 -->
|
|
4
|
+
<JztFormGrid
|
|
5
|
+
v-for="(item, index) in uniqueForm"
|
|
6
|
+
ref="ruleFormRef"
|
|
7
|
+
:key="'JztFormGrid' + index"
|
|
8
|
+
:query-items="item"
|
|
9
|
+
:rule-form="productInfo"
|
|
10
|
+
:is-show="true"
|
|
11
|
+
border
|
|
12
|
+
/>
|
|
13
|
+
<!-- 产品标识基本信息 -->
|
|
14
|
+
<!-- <JztFormGrid
|
|
15
|
+
ref="ruleFormRef"
|
|
16
|
+
:query-items="baseSignFrom"
|
|
17
|
+
:rule-form="productInfo"
|
|
18
|
+
:is-show="true"
|
|
19
|
+
border
|
|
20
|
+
/> -->
|
|
21
|
+
<!-- 产品基本信息 -->
|
|
22
|
+
<!-- <JztFormGrid
|
|
23
|
+
ref="ruleFormRef"
|
|
24
|
+
:query-items="basicInfoFrom"
|
|
25
|
+
:rule-form="productInfo"
|
|
26
|
+
:is-show="true"
|
|
27
|
+
border
|
|
28
|
+
/> -->
|
|
29
|
+
<!-- 生产标识信息 -->
|
|
30
|
+
<!-- <JztFormGrid
|
|
31
|
+
ref="ruleFormRef"
|
|
32
|
+
:query-items="productSignInfo"
|
|
33
|
+
:rule-form="productInfo"
|
|
34
|
+
:is-show="true"
|
|
35
|
+
border
|
|
36
|
+
/> -->
|
|
37
|
+
<!-- 包装标识信息 -->
|
|
38
|
+
<!-- <JztFormGrid
|
|
39
|
+
ref="ruleFormRef"
|
|
40
|
+
:query-items="packageInfo"
|
|
41
|
+
:rule-form="productInfo"
|
|
42
|
+
:is-show="true"
|
|
43
|
+
border
|
|
44
|
+
>
|
|
45
|
+
</JztFormGrid> -->
|
|
46
|
+
<!-- 存储或操作信息 -->
|
|
47
|
+
<!-- 临床使用尺寸信息 -->
|
|
48
|
+
<!-- 版本信息 -->
|
|
49
|
+
<!-- <JztFormGrid
|
|
50
|
+
ref="ruleFormRef"
|
|
51
|
+
:query-items="versionInfo"
|
|
52
|
+
:rule-form="productInfo"
|
|
53
|
+
:is-show="true"
|
|
54
|
+
border
|
|
55
|
+
/> -->
|
|
56
|
+
<!-- 纠错信息 -->
|
|
57
|
+
<!-- <JztFormGrid
|
|
58
|
+
ref="ruleFormRef"
|
|
59
|
+
:query-items="errorInfo"
|
|
60
|
+
:rule-form="productInfo"
|
|
61
|
+
:is-show="true"
|
|
62
|
+
border
|
|
63
|
+
/> -->
|
|
64
|
+
<!-- 企业联系信息 -->
|
|
65
|
+
</div>
|
|
66
|
+
</template>
|
|
67
|
+
|
|
68
|
+
<script setup lang="tsx" name="JztFilePreview">
|
|
69
|
+
import { watchEffect, ref, onMounted } from "vue";
|
|
70
|
+
import JztFormGrid from "../../JztFormGrid/index.vue";
|
|
71
|
+
import type { JztFormInstance } from "../../JztFormGrid/interface";
|
|
72
|
+
import { useParams } from "../hooks/useQxUnique.tsx";
|
|
73
|
+
|
|
74
|
+
export interface ProductInfo {
|
|
75
|
+
productInfo: Object;
|
|
76
|
+
}
|
|
77
|
+
const props = withDefaults(defineProps<ProductInfo>(), {
|
|
78
|
+
productInfo: {},
|
|
79
|
+
});
|
|
80
|
+
const { uniqueForm } = useParams();
|
|
81
|
+
|
|
82
|
+
const ruleFormRef = ref<JztFormInstance>();
|
|
83
|
+
onMounted(() => {
|
|
84
|
+
console.log("qxUnique");
|
|
85
|
+
// getShowImgApi();
|
|
86
|
+
});
|
|
87
|
+
</script>
|
|
88
|
+
<style lang="scss" scoped>
|
|
89
|
+
.qxUnique-container {
|
|
90
|
+
height: 100%;
|
|
91
|
+
overflow-y: auto;
|
|
92
|
+
overflow-x: hidden;
|
|
93
|
+
padding-top: 10px;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
:deep(.is-fullHeight) {
|
|
97
|
+
.qxUnique-container {
|
|
98
|
+
height: calc(100vh - 95px);
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
</style>
|
|
@@ -0,0 +1,265 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="records flx-left-top">
|
|
3
|
+
<div class="left" :class="{ open: openFold }">
|
|
4
|
+
<div class="title" :class="{ 'flx-between-center': openFold }" @click="changeFold">
|
|
5
|
+
<div v-if="openFold" class="title-text flx-left-center">
|
|
6
|
+
<span class="label"></span>
|
|
7
|
+
<span class="text">产品图片</span>
|
|
8
|
+
</div>
|
|
9
|
+
<el-icon class="collapse-icon" :size="16">
|
|
10
|
+
<component :is="!openFold ? 'ArrowRightBold' : 'ArrowLeftBold'"></component>
|
|
11
|
+
</el-icon>
|
|
12
|
+
<div v-if="!openFold" class="title-text">产品图片</div>
|
|
13
|
+
</div>
|
|
14
|
+
<div class="preview-content">
|
|
15
|
+
<imagePreview :srcList="srcList" v-if="openFold" />
|
|
16
|
+
</div>
|
|
17
|
+
</div>
|
|
18
|
+
<div class="right">
|
|
19
|
+
<JztFormGrid
|
|
20
|
+
ref="ruleFormRef"
|
|
21
|
+
:query-items="queryItems"
|
|
22
|
+
:rule-form="productInfo"
|
|
23
|
+
:is-show="true"
|
|
24
|
+
border
|
|
25
|
+
:showCollapsed="false"
|
|
26
|
+
/>
|
|
27
|
+
</div>
|
|
28
|
+
</div>
|
|
29
|
+
</template>
|
|
30
|
+
|
|
31
|
+
<script setup lang="tsx" name="JztFilePreview">
|
|
32
|
+
import { computed, ref, reactive, onBeforeMount } from 'vue'
|
|
33
|
+
import JztFormGrid from '../../JztFormGrid/index.vue'
|
|
34
|
+
import type { JztFormInstance, FormItemsProps } from '../../JztFormGrid/interface'
|
|
35
|
+
import imagePreview from './imagePreview.vue'
|
|
36
|
+
import { CommFn } from '../../../../spd-common-lib/hooks/src/index'
|
|
37
|
+
const { getAppendixInfo } = CommFn()
|
|
38
|
+
export interface ProductInfo {
|
|
39
|
+
productInfo: any
|
|
40
|
+
srcList: string[]
|
|
41
|
+
openFold: boolean
|
|
42
|
+
medicalType: string //是否医共体环境
|
|
43
|
+
}
|
|
44
|
+
const props = withDefaults(defineProps<ProductInfo>(), {
|
|
45
|
+
productInfo: () => {},
|
|
46
|
+
srcList: () => [],
|
|
47
|
+
openFold: false,
|
|
48
|
+
medicalType: ''
|
|
49
|
+
})
|
|
50
|
+
const ruleFormRef = ref<JztFormInstance>()
|
|
51
|
+
const colSpan = 12
|
|
52
|
+
const appendixInfo = ref({})
|
|
53
|
+
// 是否医共体环境
|
|
54
|
+
const isMedical = computed(() => props.medicalType === 'medical')
|
|
55
|
+
const queryItems = reactive<FormItemsProps[]>([
|
|
56
|
+
{
|
|
57
|
+
groupTitle: '产品信息',
|
|
58
|
+
prop: 'group',
|
|
59
|
+
children: [
|
|
60
|
+
{
|
|
61
|
+
label: '产品编码',
|
|
62
|
+
prop: 'productCode',
|
|
63
|
+
el: 'el-input',
|
|
64
|
+
span: colSpan
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
label: '产品大类',
|
|
68
|
+
prop: 'productClassName',
|
|
69
|
+
el: 'el-input',
|
|
70
|
+
span: colSpan
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
label: '产品外码',
|
|
74
|
+
prop: 'productOutCode',
|
|
75
|
+
hideFun: () => isMedical.value, // 医共体不展示
|
|
76
|
+
el: 'el-input',
|
|
77
|
+
span: colSpan
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
label: '产品小类',
|
|
81
|
+
prop: 'productMinClassName',
|
|
82
|
+
hideFun: () => isMedical.value, // 医共体不展示
|
|
83
|
+
el: 'el-input',
|
|
84
|
+
span: colSpan
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
label: '产品名称',
|
|
88
|
+
prop: 'productName',
|
|
89
|
+
el: 'el-input',
|
|
90
|
+
span: colSpan
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
label: '产品通用名',
|
|
94
|
+
prop: 'otherName',
|
|
95
|
+
el: 'el-input',
|
|
96
|
+
span: colSpan
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
label: '规格',
|
|
100
|
+
prop: 'specification',
|
|
101
|
+
el: 'el-input',
|
|
102
|
+
span: colSpan
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
label: '存储方式',
|
|
106
|
+
prop: 'savingMode',
|
|
107
|
+
el: 'el-select',
|
|
108
|
+
enum: computed(() => appendixInfo.value['15']),
|
|
109
|
+
fieldNames: { value: 'key', label: 'value' },
|
|
110
|
+
span: colSpan
|
|
111
|
+
},
|
|
112
|
+
{
|
|
113
|
+
label: '注册证号',
|
|
114
|
+
prop: 'registeredCardCode',
|
|
115
|
+
el: 'el-input',
|
|
116
|
+
span: colSpan
|
|
117
|
+
},
|
|
118
|
+
{
|
|
119
|
+
label: '生产厂商',
|
|
120
|
+
prop: 'manufactureName',
|
|
121
|
+
el: 'el-input',
|
|
122
|
+
span: colSpan
|
|
123
|
+
},
|
|
124
|
+
{
|
|
125
|
+
label: '采购单价',
|
|
126
|
+
prop: 'purcPrice',
|
|
127
|
+
el: 'el-input',
|
|
128
|
+
span: colSpan
|
|
129
|
+
},
|
|
130
|
+
{
|
|
131
|
+
label: '销售单价',
|
|
132
|
+
prop: 'sellPrice',
|
|
133
|
+
el: 'el-input',
|
|
134
|
+
span: colSpan
|
|
135
|
+
},
|
|
136
|
+
{
|
|
137
|
+
label: '计量单位',
|
|
138
|
+
prop: 'minPackUnit', // useUnit
|
|
139
|
+
el: 'el-input',
|
|
140
|
+
span: colSpan
|
|
141
|
+
},
|
|
142
|
+
{
|
|
143
|
+
label: '是否计费',
|
|
144
|
+
prop: 'isCharging',
|
|
145
|
+
el: 'el-select',
|
|
146
|
+
span: colSpan,
|
|
147
|
+
enum: [
|
|
148
|
+
{
|
|
149
|
+
label: '是',
|
|
150
|
+
value: 1
|
|
151
|
+
},
|
|
152
|
+
{
|
|
153
|
+
label: '否',
|
|
154
|
+
value: 0
|
|
155
|
+
}
|
|
156
|
+
]
|
|
157
|
+
},
|
|
158
|
+
{
|
|
159
|
+
label: '默认供应商名称',
|
|
160
|
+
prop: 'supplierName',
|
|
161
|
+
el: 'el-input',
|
|
162
|
+
span: colSpan * 2
|
|
163
|
+
},
|
|
164
|
+
{
|
|
165
|
+
label: '经销商',
|
|
166
|
+
prop: 'agentName',
|
|
167
|
+
el: 'el-input',
|
|
168
|
+
span: colSpan * 2
|
|
169
|
+
}
|
|
170
|
+
]
|
|
171
|
+
}
|
|
172
|
+
])
|
|
173
|
+
const getAppendixInfoFn = async () => {
|
|
174
|
+
// 获取附录信息
|
|
175
|
+
const res = await getAppendixInfo(['15'])
|
|
176
|
+
appendixInfo.value = res || {}
|
|
177
|
+
}
|
|
178
|
+
onBeforeMount(() => {
|
|
179
|
+
getAppendixInfoFn()
|
|
180
|
+
})
|
|
181
|
+
|
|
182
|
+
// 定义 emit 事件
|
|
183
|
+
const emit = defineEmits<{
|
|
184
|
+
'update:openFold': [boolean]
|
|
185
|
+
}>()
|
|
186
|
+
const isOpenFold = computed({
|
|
187
|
+
get() {
|
|
188
|
+
return props.openFold
|
|
189
|
+
},
|
|
190
|
+
set(val: boolean) {
|
|
191
|
+
emit('update:openFold', val)
|
|
192
|
+
}
|
|
193
|
+
})
|
|
194
|
+
const changeFold = () => {
|
|
195
|
+
isOpenFold.value = !isOpenFold.value
|
|
196
|
+
}
|
|
197
|
+
</script>
|
|
198
|
+
<style lang="scss" scoped>
|
|
199
|
+
.records {
|
|
200
|
+
height: 100%;
|
|
201
|
+
overflow: hidden;
|
|
202
|
+
box-sizing: border-box;
|
|
203
|
+
}
|
|
204
|
+
.left {
|
|
205
|
+
width: 40px;
|
|
206
|
+
// flex: 1;
|
|
207
|
+
height: 100%;
|
|
208
|
+
margin-right: 20px;
|
|
209
|
+
&.open {
|
|
210
|
+
width: 40%;
|
|
211
|
+
min-width: 250px;
|
|
212
|
+
max-width: 400px;
|
|
213
|
+
}
|
|
214
|
+
:deep(.is-fullscreen) {
|
|
215
|
+
.preview-content {
|
|
216
|
+
height: 100vh;
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
.preview-content {
|
|
220
|
+
display: flex;
|
|
221
|
+
flex-direction: column;
|
|
222
|
+
align-items: flex-start;
|
|
223
|
+
overflow: hidden;
|
|
224
|
+
// height: calc(100% - 20px);
|
|
225
|
+
height: calc(75vh - 100px);
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
.title {
|
|
229
|
+
padding: 10px 12px 10px 0;
|
|
230
|
+
height: 42px;
|
|
231
|
+
line-height: 22px;
|
|
232
|
+
}
|
|
233
|
+
.title-text {
|
|
234
|
+
font-size: 15px;
|
|
235
|
+
font-weight: 600;
|
|
236
|
+
color: var(--el-text-color-primary);
|
|
237
|
+
.label {
|
|
238
|
+
display: inline-block;
|
|
239
|
+
width: 4px;
|
|
240
|
+
height: 16px;
|
|
241
|
+
background: var(--el-color-primary);
|
|
242
|
+
margin-right: 8px;
|
|
243
|
+
border-radius: 4px;
|
|
244
|
+
}
|
|
245
|
+
}
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
.right {
|
|
249
|
+
flex: 1;
|
|
250
|
+
height: 100%;
|
|
251
|
+
min-width: 400px;
|
|
252
|
+
overflow-y: auto;
|
|
253
|
+
padding-top: 10px;
|
|
254
|
+
|
|
255
|
+
.el-scrollbar {
|
|
256
|
+
width: 100%;
|
|
257
|
+
}
|
|
258
|
+
}
|
|
259
|
+
</style>
|
|
260
|
+
|
|
261
|
+
<style>
|
|
262
|
+
::-webkit-scrollbar {
|
|
263
|
+
height: 8px; /* 设置滚动条高度 */
|
|
264
|
+
}
|
|
265
|
+
</style>
|