sohelp-eleplus 1.1.1-8.beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +35 -0
- package/cache/DictCache.js +58 -0
- package/cache/ModuleCache.js +322 -0
- package/components.js +46 -0
- package/core-export.js +4 -0
- package/http/CrudHttp.js +115 -0
- package/http/DictHttp.js +12 -0
- package/http/ModuleHttp.js +68 -0
- package/http/SohelpHttp.js +125 -0
- package/index.js +6 -0
- package/installer.js +8 -0
- package/lang/en_US.js +4 -0
- package/lang/zh_CN.js +4 -0
- package/lang/zh_TW.js +4 -0
- package/package.json +9 -0
- package/sohelp-ace-editor/index.vue +198 -0
- package/sohelp-application-select/index.vue +15 -0
- package/sohelp-autocode/index.vue +53 -0
- package/sohelp-calendar-view/index.vue +11 -0
- package/sohelp-card-view/index.vue +11 -0
- package/sohelp-condition/index.vue +210 -0
- package/sohelp-cry-input/index.vue +64 -0
- package/sohelp-date/index.vue +27 -0
- package/sohelp-datetime/index.vue +44 -0
- package/sohelp-datetime-picker/index.vue +86 -0
- package/sohelp-datetime-range/index.vue +59 -0
- package/sohelp-dict/index.vue +206 -0
- package/sohelp-dict/props.js +68 -0
- package/sohelp-drawer/index.vue +50 -0
- package/sohelp-drop-card/index.vue +94 -0
- package/sohelp-drop-card/props.js +68 -0
- package/sohelp-dyn-select/index.vue +99 -0
- package/sohelp-dyn-select/props.js +67 -0
- package/sohelp-dyn-tree/index.vue +82 -0
- package/sohelp-dyn-tree-select/index.vue +114 -0
- package/sohelp-entity-form/index.vue +524 -0
- package/sohelp-entity-grid/index.vue +30 -0
- package/sohelp-file-upload/index.vue +218 -0
- package/sohelp-filter-scheme/components/condition.vue +102 -0
- package/sohelp-filter-scheme/components/filter.vue +45 -0
- package/sohelp-filter-scheme/components/keywords.vue +15 -0
- package/sohelp-filter-scheme/components/scheme.vue +49 -0
- package/sohelp-filter-scheme/index.vue +113 -0
- package/sohelp-grid/SohelpGridConfig.js~ +408 -0
- package/sohelp-grid/components/filter-condition-item.vue +298 -0
- package/sohelp-grid/index.vue +1965 -0
- package/sohelp-grid/js/ConditionType.js +101 -0
- package/sohelp-grid/js/DefaultGridOptions.js +145 -0
- package/sohelp-grid/js/DefaultProps.js +27 -0
- package/sohelp-grid/js/SohelpConfigFunction.js +0 -0
- package/sohelp-grid/js/SohelpGridConfig.js +101 -0
- package/sohelp-grid/js/useSohelpGridConfig.js +525 -0
- package/sohelp-grid-select/index.vue +245 -0
- package/sohelp-grid-view/filter/config/grid-filter-condition.vue +221 -0
- package/sohelp-grid-view/filter/config/grid-filter-config.vue +27 -0
- package/sohelp-grid-view/filter/config/grid-filter-field.vue +378 -0
- package/sohelp-grid-view/filter/config/grid-filter-keywords.vue +310 -0
- package/sohelp-grid-view/filter/config/grid-filter-list.vue +313 -0
- package/sohelp-grid-view/filter/config/grid-filter-scheme.vue +264 -0
- package/sohelp-grid-view/filter/config/grid-filter-sort.vue +310 -0
- package/sohelp-grid-view/filter/config/index.vue +206 -0
- package/sohelp-grid-view/filter/filter-form.vue +446 -0
- package/sohelp-grid-view/filter/filter-toolbar.vue +110 -0
- package/sohelp-grid-view/filter/index.vue +160 -0
- package/sohelp-grid-view/index.vue +379 -0
- package/sohelp-grid-view-select/index.vue +141 -0
- package/sohelp-group-view/index.vue +11 -0
- package/sohelp-icon-select/icons/AnalysisOutlined.vue +22 -0
- package/sohelp-icon-select/icons/ApplicationOutlined.vue +21 -0
- package/sohelp-icon-select/icons/AppstoreAddOutlined.vue +28 -0
- package/sohelp-icon-select/icons/AppstoreOutlined.vue +30 -0
- package/sohelp-icon-select/icons/ArrowDown.vue +21 -0
- package/sohelp-icon-select/icons/ArrowDownOutlined.vue +20 -0
- package/sohelp-icon-select/icons/ArrowLeft.vue +21 -0
- package/sohelp-icon-select/icons/ArrowLeftOutlined.vue +20 -0
- package/sohelp-icon-select/icons/ArrowRight.vue +21 -0
- package/sohelp-icon-select/icons/ArrowRightOutlined.vue +20 -0
- package/sohelp-icon-select/icons/ArrowUp.vue +21 -0
- package/sohelp-icon-select/icons/ArrowUpOutlined.vue +20 -0
- package/sohelp-icon-select/icons/BellOutlined.vue +21 -0
- package/sohelp-icon-select/icons/BookOutlined.vue +21 -0
- package/sohelp-icon-select/icons/CalendarOutlined.vue +19 -0
- package/sohelp-icon-select/icons/CaretDownFilled.vue +13 -0
- package/sohelp-icon-select/icons/CaretUpFilled.vue +13 -0
- package/sohelp-icon-select/icons/CheckCircleFilled.vue +15 -0
- package/sohelp-icon-select/icons/CheckCircleOutlined.vue +23 -0
- package/sohelp-icon-select/icons/CheckOutlined.vue +20 -0
- package/sohelp-icon-select/icons/CityOutlined.vue +22 -0
- package/sohelp-icon-select/icons/ClockCircleOutlined.vue +23 -0
- package/sohelp-icon-select/icons/CloseCircleFilled.vue +15 -0
- package/sohelp-icon-select/icons/CloseCircleOutlined.vue +22 -0
- package/sohelp-icon-select/icons/CloseOutlined.vue +20 -0
- package/sohelp-icon-select/icons/CloudUploadOutlined.vue +23 -0
- package/sohelp-icon-select/icons/ClusterOutlined.vue +21 -0
- package/sohelp-icon-select/icons/CodeOutlined.vue +22 -0
- package/sohelp-icon-select/icons/ColumnHeightOutlined.vue +18 -0
- package/sohelp-icon-select/icons/CompassOutlined.vue +22 -0
- package/sohelp-icon-select/icons/CompressOutlined.vue +23 -0
- package/sohelp-icon-select/icons/ConnectionOutlined.vue +24 -0
- package/sohelp-icon-select/icons/ControlOutlined.vue +27 -0
- package/sohelp-icon-select/icons/CopyOutlined.vue +22 -0
- package/sohelp-icon-select/icons/CpuOutlined.vue +22 -0
- package/sohelp-icon-select/icons/DashboardOutlined.vue +26 -0
- package/sohelp-icon-select/icons/DatabaseOutlined.vue +22 -0
- package/sohelp-icon-select/icons/DeleteOutlined.vue +22 -0
- package/sohelp-icon-select/icons/DesktopOutlined.vue +19 -0
- package/sohelp-icon-select/icons/DownloadOutlined.vue +21 -0
- package/sohelp-icon-select/icons/DragOutlined.vue +22 -0
- package/sohelp-icon-select/icons/EditOutlined.vue +21 -0
- package/sohelp-icon-select/icons/EllipsisOutlined.vue +15 -0
- package/sohelp-icon-select/icons/EnvironmentOutlined.vue +22 -0
- package/sohelp-icon-select/icons/ExclamationCircleFilled.vue +15 -0
- package/sohelp-icon-select/icons/ExpandOutlined.vue +23 -0
- package/sohelp-icon-select/icons/FileOutlined.vue +22 -0
- package/sohelp-icon-select/icons/FilterFilled.vue +15 -0
- package/sohelp-icon-select/icons/FolderAddOutlined.vue +20 -0
- package/sohelp-icon-select/icons/FolderOutlined.vue +19 -0
- package/sohelp-icon-select/icons/FormOutlined.vue +20 -0
- package/sohelp-icon-select/icons/FullscreenExitOutlined.vue +16 -0
- package/sohelp-icon-select/icons/FullscreenOutlined.vue +16 -0
- package/sohelp-icon-select/icons/FundOutlined.vue +20 -0
- package/sohelp-icon-select/icons/GlobalOutlined.vue +15 -0
- package/sohelp-icon-select/icons/HolderOutlined.vue +18 -0
- package/sohelp-icon-select/icons/HomeOutlined.vue +19 -0
- package/sohelp-icon-select/icons/IdcardOutlined.vue +25 -0
- package/sohelp-icon-select/icons/InfoCircleFilled.vue +15 -0
- package/sohelp-icon-select/icons/LinkOutlined.vue +15 -0
- package/sohelp-icon-select/icons/LoadingDotOutlined.vue +21 -0
- package/sohelp-icon-select/icons/LoadingOutlined.vue +19 -0
- package/sohelp-icon-select/icons/LockOutlined.vue +21 -0
- package/sohelp-icon-select/icons/LogOutlined.vue +22 -0
- package/sohelp-icon-select/icons/LogoutOutlined.vue +22 -0
- package/sohelp-icon-select/icons/MailOutlined.vue +19 -0
- package/sohelp-icon-select/icons/MenuFoldOutlined.vue +17 -0
- package/sohelp-icon-select/icons/MenuUnfoldOutlined.vue +17 -0
- package/sohelp-icon-select/icons/MessageOutlined.vue +22 -0
- package/sohelp-icon-select/icons/MinusCircleOutlined.vue +22 -0
- package/sohelp-icon-select/icons/MobileOutlined.vue +20 -0
- package/sohelp-icon-select/icons/MoonOutlined.vue +21 -0
- package/sohelp-icon-select/icons/MoreOutlined.vue +15 -0
- package/sohelp-icon-select/icons/PauseFilled.vue +14 -0
- package/sohelp-icon-select/icons/PieChartOutlined.vue +20 -0
- package/sohelp-icon-select/icons/PlayFilled.vue +13 -0
- package/sohelp-icon-select/icons/PlusCircleOutlined.vue +22 -0
- package/sohelp-icon-select/icons/PlusOutlined.vue +19 -0
- package/sohelp-icon-select/icons/ProtectOutlined.vue +21 -0
- package/sohelp-icon-select/icons/QuestionCircleFilled.vue +15 -0
- package/sohelp-icon-select/icons/QuestionCircleOutlined.vue +25 -0
- package/sohelp-icon-select/icons/ReloadOutlined.vue +22 -0
- package/sohelp-icon-select/icons/SearchOutlined.vue +21 -0
- package/sohelp-icon-select/icons/SettingOutlined.vue +24 -0
- package/sohelp-icon-select/icons/ShoppingOutlined.vue +19 -0
- package/sohelp-icon-select/icons/SortOutlined.vue +21 -0
- package/sohelp-icon-select/icons/StarFilled.vue +15 -0
- package/sohelp-icon-select/icons/StepBackwardFilled.vue +17 -0
- package/sohelp-icon-select/icons/StepForwardFilled.vue +17 -0
- package/sohelp-icon-select/icons/SuitcaseOutlined.vue +19 -0
- package/sohelp-icon-select/icons/SunOutlined.vue +29 -0
- package/sohelp-icon-select/icons/SwapOutlined.vue +21 -0
- package/sohelp-icon-select/icons/SyncOutlined.vue +21 -0
- package/sohelp-icon-select/icons/TableOutlined.vue +19 -0
- package/sohelp-icon-select/icons/TagOutlined.vue +20 -0
- package/sohelp-icon-select/icons/TimerOutlined.vue +22 -0
- package/sohelp-icon-select/icons/UndoOutlined.vue +22 -0
- package/sohelp-icon-select/icons/UnlockOutlined.vue +21 -0
- package/sohelp-icon-select/icons/UploadOutlined.vue +21 -0
- package/sohelp-icon-select/icons/UserOutlined.vue +21 -0
- package/sohelp-icon-select/icons/VerticalAlignMiddleOutlined.vue +15 -0
- package/sohelp-icon-select/icons/VerticalLeftOutlined.vue +13 -0
- package/sohelp-icon-select/icons/VerticalRightOutlined.vue +13 -0
- package/sohelp-icon-select/icons/WarningOutlined.vue +21 -0
- package/sohelp-icon-select/icons/ZoomInOutlined.vue +22 -0
- package/sohelp-icon-select/icons/ZoomOutOutlined.vue +22 -0
- package/sohelp-icon-select/icons/index.js +106 -0
- package/sohelp-icon-select/icons/index.ts +106 -0
- package/sohelp-icon-select/index.vue +95 -0
- package/sohelp-icon-select/vxeui-icon.js +90 -0
- package/sohelp-image-upload/index.vue +286 -0
- package/sohelp-input/index.vue +39 -0
- package/sohelp-modal/index.vue +72 -0
- package/sohelp-module/index.vue +54 -0
- package/sohelp-module/useModalManager.js +89 -0
- package/sohelp-module/useSohelpModule.js +64 -0
- package/sohelp-number-input/index.vue +32 -0
- package/sohelp-number-range/index.vue +135 -0
- package/sohelp-org-select/index.vue +30 -0
- package/sohelp-org-tree/index.vue +18 -0
- package/sohelp-org-tree-select/index.vue +93 -0
- package/sohelp-org-user-tree/index.vue +26 -0
- package/sohelp-org-user-tree-select/index.vue +11 -0
- package/sohelp-pagination/index.vue +11 -0
- package/sohelp-power/index.vue +105 -0
- package/sohelp-pro-form/components/pro-form-footer.vue +44 -0
- package/sohelp-pro-form/components/pro-form-item.vue +1133 -0
- package/sohelp-pro-form/index.vue +257 -0
- package/sohelp-pro-form/util.js +140 -0
- package/sohelp-pro-layout/index.vue +11 -0
- package/sohelp-pro-table/index.vue +14 -0
- package/sohelp-process/index.vue +216 -0
- package/sohelp-rate/index.vue +56 -0
- package/sohelp-rate/props.js +71 -0
- package/sohelp-relation/index.vue +11 -0
- package/sohelp-rich-text/index.vue +242 -0
- package/sohelp-rich-text/util.js +231 -0
- package/sohelp-richtext/index.vue +10 -0
- package/sohelp-role-select/index.vue +33 -0
- package/sohelp-search/components/search-config.vue +0 -0
- package/sohelp-search/index.vue +49 -0
- package/sohelp-search-pro-form/index.vue +11 -0
- package/sohelp-select/index.vue +120 -0
- package/sohelp-split-panel/index.vue +15 -0
- package/sohelp-switch/index.vue +56 -0
- package/sohelp-table/index.vue +151 -0
- package/sohelp-tenant-select/index.vue +128 -0
- package/sohelp-text/index.vue +14 -0
- package/sohelp-textarea-input/index.vue +36 -0
- package/sohelp-time/index.vue +10 -0
- package/sohelp-tree/index.vue +37 -0
- package/sohelp-tree-select/index.vue +18 -0
- package/sohelp-user-select/index.vue +44 -0
- package/sohelp-user-select/index.vue~ +53 -0
- package/sohelp-user-select/props.js +71 -0
- package/sohelp-user-tag/index.vue +12 -0
- package/sohelp-user-tree/index.vue +11 -0
- package/sohelp-vform-drawer/index.vue +40 -0
- package/sohelp-vform-eleplus/favicon.ico +0 -0
- package/sohelp-vform-eleplus/index.vue +297 -0
- package/sohelp-vform-eleplus/preview.html +91 -0
- package/sohelp-vform-eleplus/render.es.js +72433 -0
- package/sohelp-vform-eleplus/render.style.css +16 -0
- package/sohelp-vform-eleplus/render.umd.js +57 -0
- package/sohelp-vform-eleplus/tinymce/langs/zh_CN.js +462 -0
- package/sohelp-vform-eleplus/tinymce/langs/zh_TW.js +419 -0
- package/sohelp-vform-eleplus/tinymce/skins/content/dark/content.css +72 -0
- package/sohelp-vform-eleplus/tinymce/skins/content/dark/content.min.css +7 -0
- package/sohelp-vform-eleplus/tinymce/skins/content/default/content.css +67 -0
- package/sohelp-vform-eleplus/tinymce/skins/content/default/content.min.css +7 -0
- package/sohelp-vform-eleplus/tinymce/skins/content/document/content.css +72 -0
- package/sohelp-vform-eleplus/tinymce/skins/content/document/content.min.css +7 -0
- package/sohelp-vform-eleplus/tinymce/skins/content/writer/content.css +68 -0
- package/sohelp-vform-eleplus/tinymce/skins/content/writer/content.min.css +7 -0
- package/sohelp-vform-eleplus/tinymce/skins/ui/oxide/content.css +732 -0
- package/sohelp-vform-eleplus/tinymce/skins/ui/oxide/content.inline.css +726 -0
- package/sohelp-vform-eleplus/tinymce/skins/ui/oxide/content.inline.min.css +7 -0
- package/sohelp-vform-eleplus/tinymce/skins/ui/oxide/content.min.css +7 -0
- package/sohelp-vform-eleplus/tinymce/skins/ui/oxide/content.mobile.css +29 -0
- package/sohelp-vform-eleplus/tinymce/skins/ui/oxide/content.mobile.min.css +7 -0
- package/sohelp-vform-eleplus/tinymce/skins/ui/oxide/fonts/tinymce-mobile.woff +0 -0
- package/sohelp-vform-eleplus/tinymce/skins/ui/oxide/skin.css +3047 -0
- package/sohelp-vform-eleplus/tinymce/skins/ui/oxide/skin.min.css +7 -0
- package/sohelp-vform-eleplus/tinymce/skins/ui/oxide/skin.mobile.css +673 -0
- package/sohelp-vform-eleplus/tinymce/skins/ui/oxide/skin.mobile.min.css +7 -0
- package/sohelp-vform-eleplus/tinymce/skins/ui/oxide/skin.shadowdom.css +37 -0
- package/sohelp-vform-eleplus/tinymce/skins/ui/oxide/skin.shadowdom.min.css +7 -0
- package/sohelp-vform-eleplus/tinymce/skins/ui/oxide-dark/content.css +714 -0
- package/sohelp-vform-eleplus/tinymce/skins/ui/oxide-dark/content.inline.css +726 -0
- package/sohelp-vform-eleplus/tinymce/skins/ui/oxide-dark/content.inline.min.css +7 -0
- package/sohelp-vform-eleplus/tinymce/skins/ui/oxide-dark/content.min.css +7 -0
- package/sohelp-vform-eleplus/tinymce/skins/ui/oxide-dark/content.mobile.css +29 -0
- package/sohelp-vform-eleplus/tinymce/skins/ui/oxide-dark/content.mobile.min.css +7 -0
- package/sohelp-vform-eleplus/tinymce/skins/ui/oxide-dark/fonts/tinymce-mobile.woff +0 -0
- package/sohelp-vform-eleplus/tinymce/skins/ui/oxide-dark/skin.css +3047 -0
- package/sohelp-vform-eleplus/tinymce/skins/ui/oxide-dark/skin.min.css +7 -0
- package/sohelp-vform-eleplus/tinymce/skins/ui/oxide-dark/skin.mobile.css +673 -0
- package/sohelp-vform-eleplus/tinymce/skins/ui/oxide-dark/skin.mobile.min.css +7 -0
- package/sohelp-vform-eleplus/tinymce/skins/ui/oxide-dark/skin.shadowdom.css +37 -0
- package/sohelp-vform-eleplus/tinymce/skins/ui/oxide-dark/skin.shadowdom.min.css +7 -0
- package/sohelp-vform-modal/index.vue +41 -0
- package/sohelp-vform-select/index.vue +11 -0
- package/sohelp-vform-vant/favicon.ico +0 -0
- package/sohelp-vform-vant/render.es.js +14608 -0
- package/sohelp-vform-vant/render.style.css +1 -0
- package/sohelp-vform-vant/render.umd.js +22 -0
- package/sohelp-vxe-grid/DefaultGridOptions.js +90 -0
- package/sohelp-vxe-grid/DefaultProps.js +27 -0
- package/sohelp-vxe-grid/SohelpGridConfig.js +143 -0
- package/sohelp-vxe-grid/index.vue +475 -0
- package/sohelp-vxe-grid-select/index.vue +148 -0
- package/sohelp-vxe-table/index.vue +184 -0
- package/sohelp-workflow/index.vue +495 -0
- package/sohelp-workflow/nodeWrap.vue +53 -0
- package/sohelp-workflow/nodes/addNode.vue +27 -0
- package/sohelp-workflow/nodes/approver.vue +125 -0
- package/sohelp-workflow/nodes/branch.vue +434 -0
- package/sohelp-workflow/nodes/promoter.vue +80 -0
- package/sohelp-workflow/nodes/send.vue +95 -0
- package/sohelp-workflow-drawer/components/approval-modal.vue +182 -0
- package/sohelp-workflow-drawer/components/draw-box.vue +141 -0
- package/sohelp-workflow-drawer/components/form.vue +78 -0
- package/sohelp-workflow-drawer/components/table.vue +153 -0
- package/sohelp-workflow-drawer/components/timeline.vue +189 -0
- package/sohelp-workflow-drawer/components/workflow.vue +68 -0
- package/sohelp-workflow-drawer/index.vue +311 -0
- package/sohelp-workflow-drawer/js/index.js +119 -0
- package/utils/ProFormConvertUtil.js +76 -0
- package/utils/core.js +310 -0
- package/utils/use-form-data.js +48 -0
- package/utils/use-mobile.js +43 -0
|
@@ -0,0 +1,475 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="sohelp-vxe-grid">
|
|
3
|
+
<vxe-grid
|
|
4
|
+
v-bind="gridOptions"
|
|
5
|
+
row-id="id"
|
|
6
|
+
@page-change="pageChangeEvent"
|
|
7
|
+
ref="sohelpVxeGridRef"
|
|
8
|
+
@menuClick="menuEvents"
|
|
9
|
+
@toolbarButtonClick="onToolbarButtonClick"
|
|
10
|
+
@checkboxChange="onCheckboxChange"
|
|
11
|
+
@checkboxAll="onCheckboxAllChange"
|
|
12
|
+
@radioChange="onRadioChange"
|
|
13
|
+
@cellClick.stop="onCellClick"
|
|
14
|
+
>
|
|
15
|
+
<template #keywords>
|
|
16
|
+
<div class="search-wrap">
|
|
17
|
+
<div class="search-box">
|
|
18
|
+
<ele-tooltip content="请输入关键字按回车搜索." placement="top" :offset="3">
|
|
19
|
+
<sohelp-input
|
|
20
|
+
v-model="keywords"
|
|
21
|
+
clearable
|
|
22
|
+
@keyup.enter="reload(gridOptions.params)"
|
|
23
|
+
class="input-with-select"
|
|
24
|
+
>
|
|
25
|
+
<template #append>
|
|
26
|
+
<el-button :icon="Search" @click="reload(gridOptions.params)" size="small" />
|
|
27
|
+
</template>
|
|
28
|
+
</sohelp-input>
|
|
29
|
+
</ele-tooltip>
|
|
30
|
+
</div>
|
|
31
|
+
<slot name="toolbarRight"></slot>
|
|
32
|
+
</div>
|
|
33
|
+
</template>
|
|
34
|
+
|
|
35
|
+
<template #draggableDefault>
|
|
36
|
+
<span class="drag-btn">
|
|
37
|
+
<ele-text :icon="DragOutlined"></ele-text>
|
|
38
|
+
</span>
|
|
39
|
+
</template>
|
|
40
|
+
|
|
41
|
+
<!-- 编历插槽 -->
|
|
42
|
+
<template v-for="(_, name) in $slots" v-slot:[name]="slotData">
|
|
43
|
+
<slot :name="name" v-bind="slotData"></slot>
|
|
44
|
+
</template>
|
|
45
|
+
</vxe-grid>
|
|
46
|
+
</div>
|
|
47
|
+
</template>
|
|
48
|
+
|
|
49
|
+
<script setup>
|
|
50
|
+
import { EleMessage } from "@/components/ele-admin-plus/components";
|
|
51
|
+
import { DragOutlined } from "../sohelp-icon-select/icons";
|
|
52
|
+
import { nextTick, onMounted, reactive, ref, watch } from "vue";
|
|
53
|
+
import { merge,cloneDeep } from "lodash-es"; // 正确导入
|
|
54
|
+
import DefaultProps from "./DefaultProps";
|
|
55
|
+
import { Search } from "@element-plus/icons-vue";
|
|
56
|
+
import DefaultGridOptions from "./DefaultGridOptions";
|
|
57
|
+
|
|
58
|
+
/**判断配置是否初始化完毕*/
|
|
59
|
+
const emit = defineEmits([
|
|
60
|
+
"filter",
|
|
61
|
+
"reset",
|
|
62
|
+
"pageChange",
|
|
63
|
+
"checkboxAll",
|
|
64
|
+
"checkboxChange",
|
|
65
|
+
"toolbarButtonClick",
|
|
66
|
+
"menuClick",
|
|
67
|
+
"cellClick",
|
|
68
|
+
"pageChange",
|
|
69
|
+
"refresh",
|
|
70
|
+
"radioChange",
|
|
71
|
+
"update:value",
|
|
72
|
+
"update:value"
|
|
73
|
+
]);
|
|
74
|
+
|
|
75
|
+
const isPage = ref(false);
|
|
76
|
+
const selectedValue = ref([]);
|
|
77
|
+
const selectedData = ref([]);
|
|
78
|
+
const keywords = ref("");
|
|
79
|
+
const props = defineProps(cloneDeep(DefaultProps));
|
|
80
|
+
|
|
81
|
+
/**列表实例*/
|
|
82
|
+
const sohelpVxeGridRef = ref(null);
|
|
83
|
+
|
|
84
|
+
const gridOptions = reactive(cloneDeep(DefaultGridOptions));
|
|
85
|
+
if (props.gridOptions) {
|
|
86
|
+
merge(gridOptions, props.gridOptions);
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
/**根据URL动态加载数据**/
|
|
90
|
+
if (props.url) {
|
|
91
|
+
merge(gridOptions, {
|
|
92
|
+
proxyConfig: {
|
|
93
|
+
response: {
|
|
94
|
+
result: "result",
|
|
95
|
+
total: "page.total"
|
|
96
|
+
},
|
|
97
|
+
ajax: {
|
|
98
|
+
query: () => {
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
});
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
|
|
106
|
+
/**根据参数加载数据*/
|
|
107
|
+
const reload = async (param = {}) => {
|
|
108
|
+
emit("filter", param);
|
|
109
|
+
gridOptions.loading = true;
|
|
110
|
+
gridOptions.params = param;
|
|
111
|
+
//配置初始化完毕后,才可以执行刷新
|
|
112
|
+
|
|
113
|
+
const url = props.url;
|
|
114
|
+
if (!url) {
|
|
115
|
+
gridOptions.loading = false;
|
|
116
|
+
return { results: [], total: 0 };
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
let pageConfig = {};
|
|
120
|
+
// 是否分页
|
|
121
|
+
if (gridOptions.pagerConfig?.enabled) {
|
|
122
|
+
pageConfig.page = gridOptions.pagerConfig?.currentPage ?? 1;
|
|
123
|
+
pageConfig.limit = gridOptions.pagerConfig?.pageSize ?? 50;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
const res = await SohelpHttp.get(url, {
|
|
127
|
+
...param,
|
|
128
|
+
keywords: keywords.value,
|
|
129
|
+
...pageConfig
|
|
130
|
+
}).catch((e) => {
|
|
131
|
+
gridOptions.loading = false;
|
|
132
|
+
EleMessage.error(e);
|
|
133
|
+
});
|
|
134
|
+
|
|
135
|
+
gridOptions.loading = false;
|
|
136
|
+
if (!res.meta.success) {
|
|
137
|
+
EleMessage.error(res.meta.message);
|
|
138
|
+
return { results: [], total: 0 };
|
|
139
|
+
}
|
|
140
|
+
const $grid = sohelpVxeGridRef.value;
|
|
141
|
+
$grid.loadData(res.data.results || res.data);
|
|
142
|
+
if (gridOptions?.pagerConfig?.enabled) {
|
|
143
|
+
gridOptions.pagerConfig.total = res.data.total;
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
gridOptions.loading = false;
|
|
147
|
+
initValue();
|
|
148
|
+
};
|
|
149
|
+
|
|
150
|
+
|
|
151
|
+
/**实现分页事件*/
|
|
152
|
+
const pageChangeEvent = (page) => {
|
|
153
|
+
isPage.value = true;
|
|
154
|
+
gridOptions.pagerConfig.currentPage = page.currentPage;
|
|
155
|
+
gridOptions.pagerConfig.pageSize = page.pageSize;
|
|
156
|
+
emit("pageChange", page);
|
|
157
|
+
};
|
|
158
|
+
|
|
159
|
+
/**刷新数据*/
|
|
160
|
+
const refresh = () => {
|
|
161
|
+
if (!isPage.value) {
|
|
162
|
+
keywords.value = "";
|
|
163
|
+
if (gridOptions.pagerConfig && gridOptions.pagerConfig.enabled) {
|
|
164
|
+
gridOptions.pagerConfig.currentPage = 1;
|
|
165
|
+
} else {
|
|
166
|
+
gridOptions.pagerConfig = {
|
|
167
|
+
currentPage: 1
|
|
168
|
+
};
|
|
169
|
+
}
|
|
170
|
+
//清空选中
|
|
171
|
+
selectedValue.value = [];
|
|
172
|
+
sohelpVxeGridRef.value?.clearCheckboxRow();
|
|
173
|
+
emit("refresh");
|
|
174
|
+
}
|
|
175
|
+
isPage.value = false;
|
|
176
|
+
reload({ ...gridOptions.params });
|
|
177
|
+
};
|
|
178
|
+
|
|
179
|
+
/**
|
|
180
|
+
* grid事件
|
|
181
|
+
* @param param0
|
|
182
|
+
*/
|
|
183
|
+
const menuEvents = async ({ menu, row, column, rowIndex }) => {
|
|
184
|
+
const $grid = sohelpVxeGridRef.value;
|
|
185
|
+
if ($grid) {
|
|
186
|
+
$grid.setCurrentRow(row);
|
|
187
|
+
}
|
|
188
|
+
};
|
|
189
|
+
|
|
190
|
+
/**
|
|
191
|
+
* 工具栏点击事件
|
|
192
|
+
* @param params
|
|
193
|
+
*/
|
|
194
|
+
const onToolbarButtonClick = (params) => {
|
|
195
|
+
emit("toolbarButtonClick", params);
|
|
196
|
+
};
|
|
197
|
+
|
|
198
|
+
/**
|
|
199
|
+
* checkbox 点击
|
|
200
|
+
* @param params
|
|
201
|
+
*/
|
|
202
|
+
const onCheckboxChange = (params) => {
|
|
203
|
+
emit("checkboxChange", params);
|
|
204
|
+
if (props.multiple) {
|
|
205
|
+
setSelectedValue(params.row);
|
|
206
|
+
updateData();
|
|
207
|
+
}
|
|
208
|
+
};
|
|
209
|
+
|
|
210
|
+
/**
|
|
211
|
+
* 获取表格当前页数据
|
|
212
|
+
*/
|
|
213
|
+
const getTableData = () => {
|
|
214
|
+
return JSON.parse(JSON.stringify(sohelpVxeGridRef.value?.getTableData().tableData));
|
|
215
|
+
};
|
|
216
|
+
|
|
217
|
+
/**
|
|
218
|
+
* 全选、取消全选 更新value,data值
|
|
219
|
+
* @param param0
|
|
220
|
+
*/
|
|
221
|
+
const onCheckboxAllChange = (params) => {
|
|
222
|
+
const data = getTableData();
|
|
223
|
+
const ids = data.map((item) => item.id);
|
|
224
|
+
if (params.checked) {
|
|
225
|
+
selectedValue.value = [...new Set([...selectedValue.value, ...ids])];
|
|
226
|
+
selectedData.value = Array.from(
|
|
227
|
+
[...selectedData.value, ...data].reduce((map, item) => map.set(item.id, item), new Map()).values()
|
|
228
|
+
);
|
|
229
|
+
} else {
|
|
230
|
+
selectedValue.value = selectedValue.value.filter((item) => !ids.includes(item));
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
emit("checkboxAll", params);
|
|
234
|
+
updateData();
|
|
235
|
+
};
|
|
236
|
+
|
|
237
|
+
/**
|
|
238
|
+
* checkbox row click selectValue, selectedData设置是否选中
|
|
239
|
+
* @param row
|
|
240
|
+
*/
|
|
241
|
+
const setSelectedValue = (row) => {
|
|
242
|
+
let idx = selectedValue.value.findIndex((id) => id === row.id);
|
|
243
|
+
if (idx != -1) {
|
|
244
|
+
selectedValue.value.splice(idx, 1);
|
|
245
|
+
} else {
|
|
246
|
+
selectedValue.value.push(row.id);
|
|
247
|
+
let _idx = selectedData.value.findIndex((item) => item.id === row.id);
|
|
248
|
+
if (_idx === -1) {
|
|
249
|
+
selectedData.value.push({ ...row });
|
|
250
|
+
}
|
|
251
|
+
}
|
|
252
|
+
};
|
|
253
|
+
|
|
254
|
+
/**
|
|
255
|
+
* 行点击
|
|
256
|
+
* @param params
|
|
257
|
+
*/
|
|
258
|
+
const onCellClick = (params) => {
|
|
259
|
+
emit("cellClick", params);
|
|
260
|
+
};
|
|
261
|
+
|
|
262
|
+
/**
|
|
263
|
+
*
|
|
264
|
+
* @param params 单选框点击
|
|
265
|
+
*/
|
|
266
|
+
const onRadioChange = (params) => {
|
|
267
|
+
emit("radioChange", params);
|
|
268
|
+
if (!props.multiple) {
|
|
269
|
+
clear();
|
|
270
|
+
const row = sohelpVxeGridRef.value?.getRadioRecord();
|
|
271
|
+
if (row) {
|
|
272
|
+
selectedValue.value = [row.id];
|
|
273
|
+
selectedData.value = Array.from(
|
|
274
|
+
new Map([row, ...selectedData.value].map((item) => [item.id, item])).values()
|
|
275
|
+
);
|
|
276
|
+
} else {
|
|
277
|
+
selectedData.value = props.data;
|
|
278
|
+
selectedValue.value = [];
|
|
279
|
+
}
|
|
280
|
+
|
|
281
|
+
updateData();
|
|
282
|
+
}
|
|
283
|
+
};
|
|
284
|
+
|
|
285
|
+
/**
|
|
286
|
+
* 更新value,data
|
|
287
|
+
*/
|
|
288
|
+
const updateData = () => {
|
|
289
|
+
emit("update:value", [...selectedValue.value]);
|
|
290
|
+
emit("update:data", [...selectedData.value]);
|
|
291
|
+
};
|
|
292
|
+
|
|
293
|
+
/**grid 事件处理 */
|
|
294
|
+
const gridEvents = {
|
|
295
|
+
cellMenu({ row, rowIndex }) {
|
|
296
|
+
const $grid = sohelpVxeGridRef.value;
|
|
297
|
+
if ($grid) {
|
|
298
|
+
$grid.setCurrentRow(row);
|
|
299
|
+
}
|
|
300
|
+
},
|
|
301
|
+
menuClick({ menu, column, row, rowIndex }) {
|
|
302
|
+
const $grid = sohelpVxeGridRef.value;
|
|
303
|
+
if ($grid) {
|
|
304
|
+
switch (menu.code) {
|
|
305
|
+
case "insert":
|
|
306
|
+
// $grid.insert();
|
|
307
|
+
$grid.insertAt({}, rowIndex);
|
|
308
|
+
|
|
309
|
+
let _table = $grid.getTableData();
|
|
310
|
+
|
|
311
|
+
break;
|
|
312
|
+
case "copy":
|
|
313
|
+
break;
|
|
314
|
+
}
|
|
315
|
+
|
|
316
|
+
emit("menuClick", $grid, code);
|
|
317
|
+
}
|
|
318
|
+
}
|
|
319
|
+
};
|
|
320
|
+
|
|
321
|
+
const loadData = (data) => {
|
|
322
|
+
const $grid = sohelpVxeGridRef.value;
|
|
323
|
+
$grid.loadData(data);
|
|
324
|
+
};
|
|
325
|
+
|
|
326
|
+
/**
|
|
327
|
+
* 数据回显
|
|
328
|
+
*/
|
|
329
|
+
const initValue = () => {
|
|
330
|
+
nextTick(() => {
|
|
331
|
+
const $grid = sohelpVxeGridRef.value;
|
|
332
|
+
if ($grid && selectedValue.value.length) {
|
|
333
|
+
setTimeout(() => {
|
|
334
|
+
$grid.setCheckboxRowKey(selectedValue.value, true);
|
|
335
|
+
}, 100);
|
|
336
|
+
}
|
|
337
|
+
});
|
|
338
|
+
};
|
|
339
|
+
|
|
340
|
+
onMounted(() => {
|
|
341
|
+
if (props.autoLoad) {
|
|
342
|
+
reload({});
|
|
343
|
+
}
|
|
344
|
+
});
|
|
345
|
+
|
|
346
|
+
/**
|
|
347
|
+
* 清空
|
|
348
|
+
*/
|
|
349
|
+
const clear = () => {
|
|
350
|
+
const $grid = sohelpVxeGridRef.value;
|
|
351
|
+
$grid?.clearCheckboxReserve();
|
|
352
|
+
$grid?.clearCheckboxRow();
|
|
353
|
+
$grid.clearSelected();
|
|
354
|
+
};
|
|
355
|
+
|
|
356
|
+
const getSelection = () => {
|
|
357
|
+
return sohelpVxeGridRef.value?.getCheckboxRecords() || [];
|
|
358
|
+
};
|
|
359
|
+
|
|
360
|
+
watch(
|
|
361
|
+
() => props.value,
|
|
362
|
+
(val) => {
|
|
363
|
+
let arr = Array.isArray(val) ? val : val ? [val] : [];
|
|
364
|
+
selectedValue.value = props.multiple ? [...arr] : [arr[0]];
|
|
365
|
+
if (props.data && props.data?.length > 0) {
|
|
366
|
+
selectedData.value = [...props.data];
|
|
367
|
+
}
|
|
368
|
+
},
|
|
369
|
+
{
|
|
370
|
+
immediate: true
|
|
371
|
+
}
|
|
372
|
+
);
|
|
373
|
+
|
|
374
|
+
defineExpose({
|
|
375
|
+
$grid: sohelpVxeGridRef,
|
|
376
|
+
getSelection,
|
|
377
|
+
gridOptions,
|
|
378
|
+
loadData,
|
|
379
|
+
refresh,
|
|
380
|
+
reload,
|
|
381
|
+
pageChangeEvent,
|
|
382
|
+
gridEvents,
|
|
383
|
+
menuEvents,
|
|
384
|
+
onToolbarButtonClick,
|
|
385
|
+
onCheckboxChange,
|
|
386
|
+
onCellClick,
|
|
387
|
+
onCheckboxAllChange,
|
|
388
|
+
onRadioChange,
|
|
389
|
+
selectedData,
|
|
390
|
+
selectedValue,
|
|
391
|
+
updateData,
|
|
392
|
+
initValue,
|
|
393
|
+
clear,
|
|
394
|
+
getTableData,
|
|
395
|
+
keywords,
|
|
396
|
+
clearRadioRow: () => {
|
|
397
|
+
sohelpVxeGridRef.value.clearRadioRow();
|
|
398
|
+
}
|
|
399
|
+
});
|
|
400
|
+
</script>
|
|
401
|
+
<script>
|
|
402
|
+
export default {
|
|
403
|
+
name: "SohelpVxeGrid"
|
|
404
|
+
};
|
|
405
|
+
</script>
|
|
406
|
+
|
|
407
|
+
<style lang="scss" scoped>
|
|
408
|
+
.sohelp-vxe-grid {
|
|
409
|
+
width: 100%;
|
|
410
|
+
height: 100%;
|
|
411
|
+
box-sizing: border-box;
|
|
412
|
+
|
|
413
|
+
:deep(.vxe-grid) {
|
|
414
|
+
height: 100%;
|
|
415
|
+
width: 100%;
|
|
416
|
+
min-width: 100px;
|
|
417
|
+
|
|
418
|
+
.vxe-grid--layout-body-content-wrapper {
|
|
419
|
+
display: flex;
|
|
420
|
+
flex-direction: column;
|
|
421
|
+
|
|
422
|
+
.vxe-grid--toolbar-wrapper {
|
|
423
|
+
.vxe-toolbar {
|
|
424
|
+
box-sizing: border-box;
|
|
425
|
+
padding: 0 5px 5px 5px;
|
|
426
|
+
}
|
|
427
|
+
}
|
|
428
|
+
|
|
429
|
+
.vxe-grid--table-container {
|
|
430
|
+
flex: 1;
|
|
431
|
+
height: 100%;
|
|
432
|
+
|
|
433
|
+
.vxe-table {
|
|
434
|
+
height: 100%;
|
|
435
|
+
|
|
436
|
+
.vxe-table--render-wrapper {
|
|
437
|
+
height: 100%;
|
|
438
|
+
|
|
439
|
+
.vxe-table--layout-wrapper {
|
|
440
|
+
height: calc(100% - 10px);
|
|
441
|
+
|
|
442
|
+
.col--selected {
|
|
443
|
+
//去除单元格选中效果
|
|
444
|
+
box-shadow: none;
|
|
445
|
+
}
|
|
446
|
+
}
|
|
447
|
+
}
|
|
448
|
+
}
|
|
449
|
+
}
|
|
450
|
+
}
|
|
451
|
+
}
|
|
452
|
+
}
|
|
453
|
+
|
|
454
|
+
.drag-btn {
|
|
455
|
+
cursor: move;
|
|
456
|
+
font-size: 12px;
|
|
457
|
+
}
|
|
458
|
+
|
|
459
|
+
.vxe-body--row.sortable-ghost,
|
|
460
|
+
.vxe-body--row.sortable-chosen {
|
|
461
|
+
background-color: #dfecfb;
|
|
462
|
+
}
|
|
463
|
+
|
|
464
|
+
.search-wrap {
|
|
465
|
+
display: flex;
|
|
466
|
+
align-items: center;
|
|
467
|
+
justify-content: flex-start;
|
|
468
|
+
gap: 10px;
|
|
469
|
+
margin-right: 10px;
|
|
470
|
+
|
|
471
|
+
.search-box {
|
|
472
|
+
width: 200px;
|
|
473
|
+
}
|
|
474
|
+
}
|
|
475
|
+
</style>
|
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
<script setup>
|
|
2
|
+
import { computed, nextTick, ref } from "vue";
|
|
3
|
+
import SohelpVxeGrid from "../sohelp-vxe-grid/index.vue";
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* 组件属性定义
|
|
7
|
+
* @property {Array|String} modelValue - 当前绑定的值(支持单选或多选)
|
|
8
|
+
* @property {String} refid - 必填字段,标识引用ID
|
|
9
|
+
* @property {Boolean} multiple - 是否允许多选,默认为false
|
|
10
|
+
* @property {Object|Array} data - 已选中的数据对象或数组
|
|
11
|
+
* @property {String} labelField - 显示文本对应的字段名,默认"label"
|
|
12
|
+
* @property {String} valueField - 值字段名,默认"id"
|
|
13
|
+
*/
|
|
14
|
+
const props = defineProps({
|
|
15
|
+
modelValue: {
|
|
16
|
+
type: [String, Array],
|
|
17
|
+
default: () => []
|
|
18
|
+
},
|
|
19
|
+
gridOptions: Object,
|
|
20
|
+
multiple: {
|
|
21
|
+
type: Boolean,
|
|
22
|
+
default: false
|
|
23
|
+
},
|
|
24
|
+
data: [Object, Array],
|
|
25
|
+
labelField: {
|
|
26
|
+
type: String,
|
|
27
|
+
default: "label"
|
|
28
|
+
},
|
|
29
|
+
valueField: {
|
|
30
|
+
type: String,
|
|
31
|
+
default: "id"
|
|
32
|
+
},
|
|
33
|
+
title: {
|
|
34
|
+
type: String,
|
|
35
|
+
default: "选择数据"
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
});
|
|
39
|
+
/**
|
|
40
|
+
* 创建一个ref对象,用于存储表格视图组件的引用
|
|
41
|
+
*/
|
|
42
|
+
const tableRef = ref(null);
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* 定义事件发射器
|
|
46
|
+
* @event update:modelValue - 更新modelValue时触发
|
|
47
|
+
* @event update:data - 更新data时触发
|
|
48
|
+
* @event confirm - 用户确认选择时触发
|
|
49
|
+
*/
|
|
50
|
+
const emit = defineEmits(["update:modelValue", "update:data", "confirm", "show"]);
|
|
51
|
+
|
|
52
|
+
// 控制弹窗是否可见的状态变量
|
|
53
|
+
const visible = ref(false);
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* 打开对话框
|
|
57
|
+
*/
|
|
58
|
+
const showDialog = () => {
|
|
59
|
+
visible.value = true;
|
|
60
|
+
emit("show");
|
|
61
|
+
};
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
* 计算属性:处理传入的数据格式统一转换为数组形式
|
|
65
|
+
* @returns {Array} 返回标准化后的数组数据
|
|
66
|
+
*/
|
|
67
|
+
const _data = computed(() => {
|
|
68
|
+
return props.data?.constructor === Object ? [props.data] : props.data;
|
|
69
|
+
});
|
|
70
|
+
|
|
71
|
+
/**
|
|
72
|
+
* 关闭标签
|
|
73
|
+
* @param tag - 被关闭的标签项
|
|
74
|
+
*/
|
|
75
|
+
const handleClose = (tag) => {
|
|
76
|
+
if (props.multiple) {
|
|
77
|
+
props.data.splice(props.data.indexOf(tag), 1);
|
|
78
|
+
} else {
|
|
79
|
+
emit("update:modelValue", null);
|
|
80
|
+
emit("update:data", null);
|
|
81
|
+
}
|
|
82
|
+
};
|
|
83
|
+
|
|
84
|
+
/**
|
|
85
|
+
* 取消操作并关闭弹窗
|
|
86
|
+
*/
|
|
87
|
+
const cancel = () => {
|
|
88
|
+
visible.value = false;
|
|
89
|
+
};
|
|
90
|
+
|
|
91
|
+
/**
|
|
92
|
+
* 确认选择操作
|
|
93
|
+
* 根据multiple属性决定是单选还是多选模式,
|
|
94
|
+
* 并通过emit更新modelValue、data以及发送confirm事件
|
|
95
|
+
*/
|
|
96
|
+
const confirm = () => {
|
|
97
|
+
const rows = tableRef.value.getSelection();
|
|
98
|
+
if (props.multiple) {
|
|
99
|
+
let _data = [];
|
|
100
|
+
for (let i = 0; i < rows.length; i++) {
|
|
101
|
+
let obj = {};
|
|
102
|
+
obj[props.valueField] = rows[i][props.valueField];
|
|
103
|
+
obj[props.labelField] = rows[i][props.labelField];
|
|
104
|
+
_data.push(obj);
|
|
105
|
+
}
|
|
106
|
+
emit("update:modelValue", _data.map((item) => item[props.valueField]));
|
|
107
|
+
emit("update:data", _data);
|
|
108
|
+
emit("confirm", rows);
|
|
109
|
+
} else {
|
|
110
|
+
emit("update:modelValue", rows.length > 0 ? rows[0][props.valueField] : null);
|
|
111
|
+
emit("update:data", rows[0]);
|
|
112
|
+
emit("confirm", rows[0]);
|
|
113
|
+
}
|
|
114
|
+
visible.value = false;
|
|
115
|
+
|
|
116
|
+
};
|
|
117
|
+
|
|
118
|
+
defineExpose({ $grid: tableRef });
|
|
119
|
+
|
|
120
|
+
</script>
|
|
121
|
+
|
|
122
|
+
<template>
|
|
123
|
+
<!-- 输入框组件,用于展示已选中的标签项,并提供打开选择弹窗的按钮 -->
|
|
124
|
+
<el-input clearable placeholder="请选择">
|
|
125
|
+
<!-- 前缀插槽:显示当前已选中项的标签列表 -->
|
|
126
|
+
<template #prefix>
|
|
127
|
+
<el-tag v-for="item in _data" :key="item.id" closable @close="handleClose(item)">{{ item[labelField] }}</el-tag>
|
|
128
|
+
</template>
|
|
129
|
+
<!-- 后缀插槽:添加按钮,点击后打开数据选择弹窗 -->
|
|
130
|
+
<template #append>
|
|
131
|
+
<el-button icon="Plus" @click="showDialog" />
|
|
132
|
+
</template>
|
|
133
|
+
</el-input>
|
|
134
|
+
<!-- 数据选择弹窗组件 -->
|
|
135
|
+
<ele-modal :title="title" v-model="visible" maxable>
|
|
136
|
+
<!-- 表格视图组件,用于展示可选项 -->
|
|
137
|
+
<sohelp-vxe-grid ref="tableRef" :gridOptions="gridOptions" />
|
|
138
|
+
<!-- 弹窗底部操作按钮区域 -->
|
|
139
|
+
<template #footer>
|
|
140
|
+
<el-button @click="cancel">取消</el-button>
|
|
141
|
+
<el-button type="primary" @click="confirm">确定</el-button>
|
|
142
|
+
</template>
|
|
143
|
+
</ele-modal>
|
|
144
|
+
</template>
|
|
145
|
+
|
|
146
|
+
<style scoped lang="scss">
|
|
147
|
+
|
|
148
|
+
</style>
|