@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,172 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<!-- <el-col :span="item.span || 12" :class="border ? 'border-col' : ''"> -->
|
|
3
|
+
<!-- <div v-if="item?.outerRender" class="mb13">
|
|
4
|
+
<component :is="item?.outerRender" />
|
|
5
|
+
</div> -->
|
|
6
|
+
<div class="form-item-content">
|
|
7
|
+
<div class="form-label flx-left-center">
|
|
8
|
+
<component v-if="item?.labelRender" :is="item?.labelRender" :form="ruleForm" />
|
|
9
|
+
<div v-else-if="item.label" class="flx-left-center" style="height: 100%">
|
|
10
|
+
<div class="label-text">
|
|
11
|
+
{{ `${item.label}` }}
|
|
12
|
+
</div>
|
|
13
|
+
</div>
|
|
14
|
+
<el-tooltip
|
|
15
|
+
v-if="tooltipProps?.content"
|
|
16
|
+
:effect="tooltipProps?.effect"
|
|
17
|
+
:placement="tooltipProps?.placement"
|
|
18
|
+
:content="tooltipProps?.content"
|
|
19
|
+
>
|
|
20
|
+
<el-icon :color="tooltipProps?.content" class="ml5"><Warning /></el-icon>
|
|
21
|
+
</el-tooltip>
|
|
22
|
+
<div class="ml2">:</div>
|
|
23
|
+
</div>
|
|
24
|
+
<div class="form-value">
|
|
25
|
+
<span v-if="item.slotName">
|
|
26
|
+
<slot :name="item.slotName" />
|
|
27
|
+
</span>
|
|
28
|
+
<template v-else-if="item.render || item.showRender">
|
|
29
|
+
<component v-if="item.showRender" :is="item.showRender" :form="ruleForm" />
|
|
30
|
+
<component v-else :is="item.render" :form="ruleForm" />
|
|
31
|
+
</template>
|
|
32
|
+
<template v-else-if="item.el && item.el.includes('JztUpload')">
|
|
33
|
+
<component
|
|
34
|
+
:is="CusComponent[item.el]"
|
|
35
|
+
v-model:image-url="ruleForm[item?.prop]"
|
|
36
|
+
v-model:file-list="ruleForm[item?.prop]"
|
|
37
|
+
v-bind="{
|
|
38
|
+
...handleProps,
|
|
39
|
+
listType: handleProps?.listType
|
|
40
|
+
}"
|
|
41
|
+
:isShow="true"
|
|
42
|
+
:disabled="true"
|
|
43
|
+
@getOcrData="handleProps?.getOcrData"
|
|
44
|
+
>
|
|
45
|
+
<template #upload-left>
|
|
46
|
+
<component #upload-left :is="handleProps.uploadLeftRender" />
|
|
47
|
+
</template>
|
|
48
|
+
<template #tip v-if="handleProps?.tipsRender">
|
|
49
|
+
<component #tip :is="handleProps?.tipsRender" />
|
|
50
|
+
</template>
|
|
51
|
+
</component>
|
|
52
|
+
</template>
|
|
53
|
+
<template
|
|
54
|
+
v-else-if="
|
|
55
|
+
(item.el && ['JztNumericalRange', 'jzt-numerical-range'].includes(item.el)) ||
|
|
56
|
+
(item.el == 'el-date-picker' && ['daterange', 'datetimerange'].includes(handleProps?.type))
|
|
57
|
+
"
|
|
58
|
+
>
|
|
59
|
+
<div>
|
|
60
|
+
<span>{{ ruleForm?.[startField] }}</span>
|
|
61
|
+
<span class="ml6 mr6">{{ handleProps?.rangeSeparator ?? '-' }}</span>
|
|
62
|
+
<span>{{ ruleForm?.[endField] }}</span>
|
|
63
|
+
</div>
|
|
64
|
+
</template>
|
|
65
|
+
<template v-else>
|
|
66
|
+
<div class="flx-left-center">
|
|
67
|
+
<component v-if="item?.valueLeftRender" :is="item?.valueLeftRender" :form="ruleForm" />
|
|
68
|
+
<JztEllipsisTooltip
|
|
69
|
+
v-if="item?.detailProps?.showOverflowTooltip ?? showOverflowTooltip"
|
|
70
|
+
:isEllipsis="false"
|
|
71
|
+
:content="formatValue(ruleForm[showField])"
|
|
72
|
+
/>
|
|
73
|
+
<div v-else class="break-word">{{ formatValue(ruleForm[showField]) }}</div>
|
|
74
|
+
<component v-if="item?.valueRightRender" :is="item?.valueRightRender" :form="ruleForm" />
|
|
75
|
+
</div>
|
|
76
|
+
</template>
|
|
77
|
+
</div>
|
|
78
|
+
</div>
|
|
79
|
+
<!-- </el-col> -->
|
|
80
|
+
</template>
|
|
81
|
+
<script setup lang="ts" name="SearchForm">
|
|
82
|
+
import { formatValue } from '@jzt-spd/utils'
|
|
83
|
+
import { computed, defineComponent, ref } from 'vue'
|
|
84
|
+
import JztEllipsisTooltip from '../../JztEllipsisTooltip/index.vue'
|
|
85
|
+
import JztNumericalRange from '../../JztNumericalRange/index.vue'
|
|
86
|
+
import JztTable from '../../JztTable/index.vue'
|
|
87
|
+
import JztUploadMultipleFiles from '../../JztUploadFile/multiple.vue'
|
|
88
|
+
import JztUploadSingleFile from '../../JztUploadFile/single.vue'
|
|
89
|
+
import JztUploadImg from '../../JztUploadImg/Img.vue'
|
|
90
|
+
import JztUploadMultipleImgs from '../../JztUploadImg/Imgs.vue'
|
|
91
|
+
import { FormItemsProps } from '../interface/index'
|
|
92
|
+
|
|
93
|
+
const CusComponent = defineComponent({
|
|
94
|
+
JztUploadImg: JztUploadImg,
|
|
95
|
+
JztUploadMultipleImgs: JztUploadMultipleImgs,
|
|
96
|
+
JztUploadMultipleFiles: JztUploadMultipleFiles,
|
|
97
|
+
JztUploadSingleFile: JztUploadSingleFile,
|
|
98
|
+
JztTable: JztTable,
|
|
99
|
+
JztNumericalRange: JztNumericalRange
|
|
100
|
+
// JztRegionSelect
|
|
101
|
+
})
|
|
102
|
+
|
|
103
|
+
interface ProTableProps {
|
|
104
|
+
showOverflowTooltip?: boolean // 是否显示超出部分提示
|
|
105
|
+
item: FormItemsProps // 搜索参数
|
|
106
|
+
ruleForm?: { [key: string]: any } // 搜索参数
|
|
107
|
+
// isShow?: boolean // 是否是查看模式
|
|
108
|
+
// disabled?: boolean // 是否表单禁用
|
|
109
|
+
// formProps?: Record<string, any>
|
|
110
|
+
infoEmptyText?: string
|
|
111
|
+
border?: boolean // 是否显示边框
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
const tooltipProps = computed(() => {
|
|
115
|
+
const tooltip = (props?.item as any)?.tooltipProps || {}
|
|
116
|
+
return {
|
|
117
|
+
content: tooltip.content || '',
|
|
118
|
+
placement: tooltip.placement || 'top',
|
|
119
|
+
iconColor: tooltip.iconColor || 'red',
|
|
120
|
+
effect: tooltip.effect || 'dark'
|
|
121
|
+
}
|
|
122
|
+
})
|
|
123
|
+
|
|
124
|
+
// 默认值
|
|
125
|
+
const props = withDefaults(defineProps<ProTableProps>(), {
|
|
126
|
+
ruleForm: () => ({}),
|
|
127
|
+
// isShow: false, // 是否是查看模式
|
|
128
|
+
infoEmptyText: '-'
|
|
129
|
+
// border: false
|
|
130
|
+
})
|
|
131
|
+
|
|
132
|
+
const startField = ref(props.item?.startField || 'label')
|
|
133
|
+
const endField = ref(props.item?.startField || 'value')
|
|
134
|
+
|
|
135
|
+
const showField = computed<string>(() => {
|
|
136
|
+
const showProp = (props?.item as any)?.detailProps?.showProp
|
|
137
|
+
return (showProp ?? props?.item?.prop ?? '') as string
|
|
138
|
+
})
|
|
139
|
+
// props.item?.props
|
|
140
|
+
const handleProps = computed(() => {
|
|
141
|
+
const itemProps = props.item?.props ?? {}
|
|
142
|
+
return itemProps
|
|
143
|
+
})
|
|
144
|
+
</script>
|
|
145
|
+
|
|
146
|
+
<style lang="scss" scoped>
|
|
147
|
+
.form-item-content {
|
|
148
|
+
font-size: 13px;
|
|
149
|
+
// margin: 2px 5px;
|
|
150
|
+
padding: 5px 8px;
|
|
151
|
+
display: flex;
|
|
152
|
+
justify-content: flex-start;
|
|
153
|
+
align-items: stretch;
|
|
154
|
+
line-height: 20px;
|
|
155
|
+
|
|
156
|
+
.form-label {
|
|
157
|
+
height: 100%;
|
|
158
|
+
// height: 20px;
|
|
159
|
+
color: #999999;
|
|
160
|
+
// margin-right: 10px;
|
|
161
|
+
flex-shrink: 0;
|
|
162
|
+
max-width: 200px;
|
|
163
|
+
flex-wrap: wrap;
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
.form-value {
|
|
167
|
+
flex: 1;
|
|
168
|
+
min-width: 0;
|
|
169
|
+
color: #333333;
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
</style>
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
.show-form-content {
|
|
2
|
+
:deep(.el-form-item) {
|
|
3
|
+
margin-bottom: 8px !important;
|
|
4
|
+
}
|
|
5
|
+
:deep(.el-space__item) {
|
|
6
|
+
height: 100% !important;
|
|
7
|
+
}
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
.form_card_content {
|
|
11
|
+
// padding: 0 8px;
|
|
12
|
+
width: 100%;
|
|
13
|
+
box-sizing: border-box;
|
|
14
|
+
.form_child_card_content {
|
|
15
|
+
width: 100%;
|
|
16
|
+
box-sizing: border-box;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
.form_card {
|
|
20
|
+
width: 100%;
|
|
21
|
+
border-radius: 4px;
|
|
22
|
+
margin-bottom: 12px;
|
|
23
|
+
.collapse-title {
|
|
24
|
+
flex: 1;
|
|
25
|
+
font-weight: 500;
|
|
26
|
+
font-size: 14px;
|
|
27
|
+
color: var(--el-text-color-primary);
|
|
28
|
+
text-align: left;
|
|
29
|
+
.label {
|
|
30
|
+
display: inline-block;
|
|
31
|
+
width: 4px;
|
|
32
|
+
height: 16px;
|
|
33
|
+
background: var(--el-color-primary);
|
|
34
|
+
margin-right: 8px;
|
|
35
|
+
border-radius: 4px;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
.noTitle_card {
|
|
41
|
+
.group-header {
|
|
42
|
+
width: 100%;
|
|
43
|
+
padding: 6px;
|
|
44
|
+
margin-bottom: 8px;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.group_card {
|
|
49
|
+
border: 1px solid #e9e9e9;
|
|
50
|
+
.group-header {
|
|
51
|
+
width: 100%;
|
|
52
|
+
padding: 6px 12px;
|
|
53
|
+
margin-bottom: 8px;
|
|
54
|
+
background: var(--el-fill-color-light);
|
|
55
|
+
border-bottom: 1px solid #ebeef5;
|
|
56
|
+
.label {
|
|
57
|
+
display: none;
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
}
|