@oinone/kunlun-vue-admin-base 7.1.0 → 7.2.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/dist/oinone-kunlun-vue-admin-base.css +1 -1
- package/dist/oinone-kunlun-vue-admin-base.esm.js +18 -18
- package/dist/oinone-kunlun-vue-admin-base.scss +1 -1
- package/dist/types/src/action/component/action-bar/ActionBarWidget.d.ts +1 -0
- package/dist/types/src/action/component/action-bar/DefaultActionBar.vue.d.ts +12 -6
- package/dist/types/src/action/view-actions/biz-audit/BizAuditRecordDetail.vue.d.ts +1 -1
- package/dist/types/src/action/view-actions/biz-audit/BizAuditRecordDetailFieldValue.vue.d.ts +1 -1
- package/dist/types/src/action/view-actions/biz-audit/service.d.ts +1 -1
- package/dist/types/src/basic/field/complex/select/SelectFieldWidget.d.ts +1 -0
- package/dist/types/src/basic/form/DefaultForm.vue.d.ts +10 -1
- package/dist/types/src/basic/table/BaseTableWidget.d.ts +2 -2
- package/dist/types/src/basic/table-column/BaseTableColumnWidget.d.ts +5 -0
- package/dist/types/src/basic/table-column/BaseTableFieldWidget.d.ts +0 -5
- package/dist/types/src/basic/token/BaseFieldWidget.d.ts +2 -1
- package/dist/types/src/components/select/base/BaseSelect.vue.d.ts +2 -1
- package/dist/types/src/components/select/base/index.d.ts +1 -0
- package/dist/types/src/components/select/base/useSelectId.d.ts +1 -0
- package/dist/types/src/components/select/department-select/DepartmentModal.vue.d.ts +3 -3
- package/dist/types/src/components/select/department-select/DepartmentTree.vue.d.ts +1 -1
- package/dist/types/src/components/select/modal-select/ModalSelect.vue.d.ts +2 -0
- package/dist/types/src/components/select/organizational-structure-tree/OrganizationalStructureTree.vue.d.ts +5 -2
- package/dist/types/src/components/sortable-group/SortableGroup.vue.d.ts +1 -1
- package/dist/types/src/field/businees-audit/FormBizAuditField.vue.d.ts +1 -1
- package/dist/types/src/field/cascader/DefaultCascader.vue.d.ts +1 -1
- package/dist/types/src/field/detail/date/DetailWeekPickerFieldWidget.d.ts +3 -0
- package/dist/types/src/field/detail/date/index.d.ts +1 -0
- package/dist/types/src/field/detail/index.d.ts +1 -1
- package/dist/types/src/field/detail/m2m/table/DetailM2MTableFieldWidget.d.ts +1 -0
- package/dist/types/src/field/detail/number/DetailFloatFieldWidget.d.ts +3 -0
- package/dist/types/src/field/detail/number/DetailIntegerFieldWidget.d.ts +3 -0
- package/dist/types/src/field/detail/number/DetailMoneyFieldWidget.d.ts +3 -0
- package/dist/types/src/field/detail/number/index.d.ts +4 -0
- package/dist/types/src/field/detail/o2m/table/DetailO2MTableFieldWidget.d.ts +1 -0
- package/dist/types/src/field/form/abstract/department/AbstractFormDepartmentFieldWidget.d.ts +4 -0
- package/dist/types/src/field/form/abstract/employee/AbstractFormEmployeeFieldWidget.d.ts +4 -0
- package/dist/types/src/field/form/abstract/radio/FormRelationFieldRadioWidget.d.ts +2 -1
- package/dist/types/src/field/form/abstract/role/AbstractFormRoleFieldWidget.d.ts +4 -0
- package/dist/types/src/field/form/abstract/select/DefaultMultipleSelect.vue.d.ts +2 -1
- package/dist/types/src/field/form/abstract/select/DefaultSingleSelect.vue.d.ts +2 -1
- package/dist/types/src/field/form/date/DefaultDatePicker.vue.d.ts +1 -1
- package/dist/types/src/field/form/date/DefaultDateTimePicker.vue.d.ts +1 -1
- package/dist/types/src/field/form/date/DefaultTimePicker.vue.d.ts +1 -1
- package/dist/types/src/field/form/date/DefaultYearPicker.vue.d.ts +1 -1
- package/dist/types/src/field/form/date/range/DefaultDateRangePicker.vue.d.ts +1 -1
- package/dist/types/src/field/form/date/range/DefaultDateTimeRangePicker.vue.d.ts +1 -1
- package/dist/types/src/field/form/date/range/DefaultTimeRangePicker.vue.d.ts +1 -1
- package/dist/types/src/field/form/date/range/DefaultYearRangePicker.vue.d.ts +1 -1
- package/dist/types/src/field/form/enum/select/multi/MultiEnumSelect.vue.d.ts +1 -1
- package/dist/types/src/field/form/enum/select/single/EnumSelect.vue.d.ts +1 -1
- package/dist/types/src/field/form/enum/thumbnail/FormEnumThumbnail.vue.d.ts +2 -1
- package/dist/types/src/field/form/string/expression/model-field-select/modelFieldSelectControlWidget.d.ts +2 -0
- package/dist/types/src/field/form/text/DomainExpGenerator/DomainExpGenerator.vue.d.ts +1 -1
- package/dist/types/src/field/form/text/DomainExpGenerator/ExpItem.vue.d.ts +4 -0
- package/dist/types/src/field/form/text/DomainExpGenerator/ExpRight.vue.d.ts +1 -1
- package/dist/types/src/field/gallery/number/GalleryFloatFieldWidget.d.ts +3 -0
- package/dist/types/src/field/gallery/number/GalleryIntegerFieldWidget.d.ts +3 -0
- package/dist/types/src/field/gallery/number/GalleryMoneyFieldWidget.d.ts +3 -0
- package/dist/types/src/field/gallery/number/index.d.ts +3 -0
- package/dist/types/src/field/prop/RelationSelectProps.d.ts +1 -0
- package/dist/types/src/field/resource/language-badge/FormResourceLangBadge.vue.d.ts +2 -1
- package/dist/types/src/field/search/enum/TabSelect.vue.d.ts +1 -1
- package/dist/types/src/field/search/enum/TagSelect.vue.d.ts +1 -1
- package/dist/types/src/field/table/date/TableWeekPickerFieldWidget.d.ts +3 -0
- package/dist/types/src/field/table/date/index.d.ts +1 -0
- package/dist/types/src/field/table/date/range/editor/DefaultEditorDateRangePicker.vue.d.ts +1 -1
- package/dist/types/src/field/table/date/range/editor/DefaultEditorDateTimeRangePicker.vue.d.ts +1 -1
- package/dist/types/src/field/table/date/range/editor/DefaultEditorTimeRangePicker.vue.d.ts +1 -1
- package/dist/types/src/field/table/date/range/editor/DefaultEditorYearRangePicker.vue.d.ts +1 -1
- package/dist/types/src/field/table/html/TableRichText.vue.d.ts +1 -1
- package/dist/types/src/field/table/number/TableFloatFieldWidget.d.ts +3 -0
- package/dist/types/src/field/table/number/TableIntegerFieldWidget.d.ts +3 -0
- package/dist/types/src/field/table/number/index.d.ts +2 -0
- package/dist/types/src/field/table-layout-column/TableLayoutColumnWidget.d.ts +8 -5
- package/dist/types/src/field/table-operation-column/TableOperationColumn.vue.d.ts +1 -1
- package/dist/types/src/field/tree-select/DefaultTreeSelect.vue.d.ts +1 -1
- package/dist/types/src/permission/permission/field/FieldPermission.vue.d.ts +1 -1
- package/dist/types/src/permission/permission/field/index.d.ts +0 -2
- package/dist/types/src/permission/permission/index.d.ts +0 -1
- package/dist/types/src/permission/system-permission/field/permission-field/FieldPermission.vue.d.ts +1 -1
- package/dist/types/src/permission/system-permission/field/permission-user/UserPermission.vue.d.ts +1 -1
- package/dist/types/src/permission/system-permission/service/index.d.ts +3 -0
- package/dist/types/src/util/jumpDesignerPage.d.ts +0 -9
- package/dist/types/src/view/application-screen/apps-business-screen/components/Card.vue.d.ts +1 -1
- package/dist/types/src/view/application-screen/apps-business-screen/components/CardList.vue.d.ts +1 -1
- package/dist/types/src/view/application-screen/gallery/AppsGalleryWidget.d.ts +0 -2
- package/dist/types/src/view/application-screen/gallery/Gallery.vue.d.ts +1 -1
- package/dist/types/src/view/detail/DefaultDetail.vue.d.ts +9 -0
- package/dist/types/src/view/detail/DetailWidget.d.ts +1 -0
- package/dist/types/src/view/gallery/GalleryWidget.d.ts +2 -2
- package/dist/types/src/view/homepage-setting/components/MultiSelect.vue.d.ts +2 -1
- package/dist/types/src/view/homepage-setting/components/SingleSelect.vue.d.ts +2 -1
- package/dist/types/src/view/homepage-setting/field/HomepageSettingFieldWidget.d.ts +1 -1
- package/dist/types/src/view/homepage-setting/view/advanced-homepage-setting/AdvancedHomepageSetting.vue.d.ts +84 -0
- package/dist/types/src/view/iframe-view/menu/Menu.vue.d.ts +73 -1
- package/dist/types/src/view/index.d.ts +0 -2
- package/dist/types/src/view/login/BaseLoginWidget.d.ts +3 -2
- package/dist/types/src/view/login/LoginWidget.d.ts +0 -1
- package/dist/types/src/view/reset-password/FirstResetPassword.vue.d.ts +1 -1
- package/dist/types/src/view/reset-password/ForgetPassword.vue.d.ts +1 -1
- package/dist/types/src/view/search/SearchPrefer.vue.d.ts +1 -1
- package/dist/types/src/view/table/DefaultTable.vue.d.ts +28 -1
- package/dist/types/src/view/table/TableWidget.d.ts +3 -1
- package/dist/types/src/view/view/DetailView.d.ts +1 -0
- package/dist/types/src/view/workbench/Workbench.vue.d.ts +1 -1
- package/package.json +22 -22
- package/src/action/client-actions/SaveDraftActionWidget.ts +42 -27
- package/src/action/component/action/ActionWidget.ts +4 -4
- package/src/action/component/action/DefaultAction.vue +6 -1
- package/src/action/component/action-bar/ActionBarWidget.ts +13 -0
- package/src/action/component/action-bar/DefaultActionBar.vue +27 -9
- package/src/action/component/action-bar/DefaultMoreActionItem.vue +2 -2
- package/src/action/component/action-bar/style/index.scss +16 -0
- package/src/action/server-actions/ServerActionWidget.ts +2 -2
- package/src/action/url-actions/UrlActionWidget.ts +1 -1
- package/src/action/view-actions/BackActionWidget.ts +2 -3
- package/src/action/view-actions/biz-audit/RegisterDetail.ts +2 -2
- package/src/action/view-actions/biz-audit/service.ts +1 -1
- package/src/action/view-actions/popup/util.ts +1 -1
- package/src/basic/element/BaseElementListViewWidget.ts +4 -1
- package/src/basic/element/BaseElementObjectViewWidget.ts +4 -1
- package/src/basic/field/complex/select/SelectFieldWidget.ts +9 -0
- package/src/basic/form/DefaultForm.vue +17 -2
- package/src/basic/form-item/DefaultFormItem.vue +4 -4
- package/src/basic/form-item/style/index.scss +2 -2
- package/src/basic/table/BaseTableWidget.ts +8 -12
- package/src/basic/table-column/BaseTableColumnWidget.ts +86 -2
- package/src/basic/table-column/BaseTableFieldWidget.ts +1 -86
- package/src/basic/table-column/DefaultGroupCell.vue +21 -31
- package/src/basic/token/BaseFieldWidget.ts +32 -1
- package/src/basic/token/BaseView.ts +1 -0
- package/src/components/index.scss +1 -0
- package/src/components/oio-manage-group/OioManageGroup.vue +3 -2
- package/src/components/select/base/BaseSelect.vue +44 -8
- package/src/components/select/base/index.ts +1 -0
- package/src/components/select/base/useSelectId.ts +7 -0
- package/src/components/select/company-select/CompanySelect.vue +1 -0
- package/src/components/select/department-select/DepartmentModal.vue +7 -5
- package/src/components/select/department-select/DepartmentTree.vue +2 -2
- package/src/components/select/employee-select/DepartmentEmployeeSelectPanel.vue +0 -1
- package/src/components/select/modal-select/ModalSelect.vue +50 -6
- package/src/components/select/modal-select/style/index.scss +5 -0
- package/src/components/select/organizational-structure-tree/OrganizationalStructureTree.vue +31 -5
- package/src/components/select/table-select/TableSelect.vue +10 -1
- package/src/components/sortable-group/SortableGroup.vue +1 -1
- package/src/components/upload/UploadDraggable.vue +1 -1
- package/src/components/user-prefer/SimpleUserPreferSetting.vue +2 -1
- package/src/container/collapse/DefaultCollapsePanel.vue +1 -0
- package/src/container/group/DefaultGroup.vue +3 -4
- package/src/container/tabs/DefaultTabWidget.ts +2 -1
- package/src/field/detail/date/DetailWeekPickerFieldWidget.ts +13 -0
- package/src/field/detail/date/index.ts +1 -0
- package/src/field/detail/date/range/use-date-time-range-picker.ts +1 -1
- package/src/field/detail/date/use-date-time-picker.ts +1 -1
- package/src/field/detail/index.ts +1 -1
- package/src/field/detail/m2m/table/DetailM2MTableFieldWidget.ts +16 -0
- package/src/field/detail/number/DetailFloatFieldWidget.ts +12 -0
- package/src/field/detail/number/DetailIntegerFieldWidget.ts +12 -0
- package/src/field/detail/number/DetailMoneyFieldWidget.ts +12 -0
- package/src/field/detail/number/DetailNumberWidget.ts +0 -9
- package/src/field/detail/number/index.ts +4 -0
- package/src/field/detail/o2m/table/DetailO2MTableFieldWidget.ts +16 -0
- package/src/field/detail/string/color/DefaultColorPicker.vue +2 -3
- package/src/field/form/abstract/department/AbstractFormDepartmentFieldWidget.ts +11 -0
- package/src/field/form/abstract/employee/AbstractFormEmployeeFieldWidget.ts +11 -0
- package/src/field/form/abstract/radio/FormRelationFieldRadioWidget.ts +3 -1
- package/src/field/form/abstract/role/AbstractFormRoleFieldWidget.ts +11 -0
- package/src/field/form/abstract/select/DefaultMultipleSelect.vue +1 -0
- package/src/field/form/abstract/select/DefaultSingleSelect.vue +1 -0
- package/src/field/form/enum/thumbnail/FormEnumThumbnail.vue +15 -3
- package/src/field/form/integer/FormIntegerSliderFieldWidget.ts +1 -1
- package/src/field/form/m2m/upload/FormM2MUploadDraggableFieldWidget.ts +3 -3
- package/src/field/form/m2o/upload/FormM2OUploadDraggableFieldWidget.ts +3 -3
- package/src/field/form/o2m/upload/FormO2MUploadDraggableFieldWidget.ts +3 -3
- package/src/field/form/o2o/upload/FormO2OUploadDraggableFieldWidget.ts +3 -3
- package/src/field/form/string/color/DefaultColorPicker.vue +2 -3
- package/src/field/form/string/download/FormStringDownloadFieldWidget.ts +2 -2
- package/src/field/form/string/expression/model-field-select/modelFieldSelectControlWidget.ts +3 -0
- package/src/field/form/string/upload/FormStringUploadDraggableFieldWidget.ts +2 -2
- package/src/field/form/text/DomainExpGenerator/ExpRight.vue +2 -2
- package/src/field/gallery/number/GalleryFloatFieldWidget.ts +12 -0
- package/src/field/gallery/number/GalleryIntegerFieldWidget.ts +12 -0
- package/src/field/gallery/number/GalleryMoneyFieldWidget.ts +12 -0
- package/src/field/gallery/number/GalleryNumberWidget.ts +0 -9
- package/src/field/gallery/number/index.ts +3 -0
- package/src/field/prop/RelationSelectProps.ts +34 -0
- package/src/field/resource/resource-date-time-format/constant.ts +4 -4
- package/src/field/resource/resource-date-time-format/resource-date-format/FormResourceDateFormat.vue +61 -1
- package/src/field/table/date/TableWeekPickerFieldWidget.ts +13 -0
- package/src/field/table/date/TableYearFieldWidget.ts +1 -1
- package/src/field/table/date/index.ts +1 -0
- package/src/field/table/date/range/TableDateTimeRangeFieldWidget.ts +1 -1
- package/src/field/table/enum/TableEnum.vue +3 -3
- package/src/field/table/number/TableFloatFieldWidget.ts +12 -0
- package/src/field/table/number/TableIntegerFieldWidget.ts +12 -0
- package/src/field/table/number/TableNumberWidget.ts +1 -9
- package/src/field/table/number/index.ts +2 -0
- package/src/field/table-layout-column/TableLayoutColumnWidget.ts +37 -17
- package/src/file/excel/service/ExcelExportService.ts +1 -1
- package/src/file/print/service/PrintService.ts +1 -1
- package/src/icon-manage/view/search/IconSearch.vue +29 -35
- package/src/icon-manage/view/search/style/IconSearch.scss +37 -33
- package/src/main-view/DefaultMetadataMainViewWidget.ts +1 -1
- package/src/permission/permission/field/FieldPermissionWidget.ts +2 -4
- package/src/permission/permission/field/index.ts +0 -2
- package/src/permission/permission/index.ts +0 -1
- package/src/permission/system-permission/PermissionWidget.ts +12 -11
- package/src/permission/system-permission/components/Config.vue +17 -7
- package/src/permission/system-permission/components/Empty.vue +1 -1
- package/src/permission/system-permission/components/RoleDialog.vue +4 -4
- package/src/permission/system-permission/service/index.ts +77 -60
- package/src/plugins/translate.ts +6 -3
- package/src/shim-translate.d.ts +4 -1
- package/src/style/antdComponents/All.scss +0 -27
- package/src/style/root.scss +1 -1
- package/src/tags/context/runtime-context-helper.ts +6 -6
- package/src/tags/resolve/internal/widget-resolve.ts +5 -1
- package/src/util/collection-actions.ts +1 -1
- package/src/util/jumpDesignerPage.ts +11 -24
- package/src/view/application-screen/apps-business-screen/components/Card.vue +2 -2
- package/src/view/application-screen/apps-business-screen/components/RelationGraph.vue +2 -2
- package/src/view/application-screen/gallery/AppsGalleryWidget.ts +108 -133
- package/src/view/application-screen/gallery/Gallery.vue +2 -2
- package/src/view/company-setting/CompanySetting.vue +16 -14
- package/src/view/detail/DefaultDetail.vue +6 -5
- package/src/view/detail/DetailWidget.ts +12 -1
- package/src/view/gallery/GalleryWidget.ts +3 -3
- package/src/view/homepage-setting/field/HomepageSettingFieldWidget.ts +5 -5
- package/src/view/homepage-setting/hook/useHomepageSetting.ts +1 -1
- package/src/view/index.ts +0 -2
- package/src/view/login/BaseLoginWidget.ts +12 -6
- package/src/view/login/LoginWidget.ts +0 -2
- package/src/view/login/SSOLoginWidget.ts +1 -3
- package/src/view/login-page-setting/LoginPageSetting.vue +6 -7
- package/src/view/paas-install/PaaSInstall.vue +2 -2
- package/src/view/paas-manager/PaaSManager.vue +2 -2
- package/src/view/popup/PopupWidget.ts +2 -2
- package/src/view/quick-fill/Excel.vue +2 -1
- package/src/view/quick-fill/QuickFill.vue +9 -10
- package/src/view/system-style/localData.ts +8 -8
- package/src/view/table/DefaultTable.vue +81 -43
- package/src/view/table/DefaultTableFooterOperator.vue +2 -2
- package/src/view/table/TableUserPrefer.vue +1 -1
- package/src/view/table/TableWidget.ts +16 -5
- package/src/view/table/style/index.scss +6 -0
- package/src/view/unauthorized/Unauthorized.vue +1 -1
- package/src/view/view/DetailView.ts +12 -0
- package/src/view/view-control/card-col-control/DefaultCardColControl.vue +2 -2
- package/src/view/view-control/group-control/DefaultGroupControl.vue +2 -2
- package/src/view/view-control/sort-control/DefaultSortControl.vue +2 -2
- package/src/view/workbench/Workbench.vue +2 -2
- package/dist/types/src/permission/permission/action/PermissionSubmitActionWidget.d.ts +0 -7
- package/dist/types/src/permission/permission/action/index.d.ts +0 -1
- package/dist/types/src/permission/permission/field/ActionPermissionWidget.d.ts +0 -65
- package/dist/types/src/permission/permission/field/DataPermissionWidget.d.ts +0 -19
- package/dist/types/src/view/paas-install/PaaSInstall.d.ts +0 -6
- package/dist/types/src/view/paas-install/PaaSInstall.vue.d.ts +0 -22
- package/dist/types/src/view/paas-install/field/custom-table/CodeFoucsTable.vue.d.ts +0 -24
- package/dist/types/src/view/paas-install/field/custom-table/CustomTable.d.ts +0 -13
- package/dist/types/src/view/paas-install/field/index.d.ts +0 -2
- package/dist/types/src/view/paas-install/field/upload-and-select/UploadAndSelect.d.ts +0 -6
- package/dist/types/src/view/paas-install/field/upload-and-select/UploadAndSelect.vue.d.ts +0 -65
- package/dist/types/src/view/paas-install/index.d.ts +0 -2
- package/dist/types/src/view/paas-install/service.d.ts +0 -2
- package/dist/types/src/view/paas-manager/PaaSManager.d.ts +0 -6
- package/dist/types/src/view/paas-manager/PaaSManager.vue.d.ts +0 -23
- package/dist/types/src/view/paas-manager/service.d.ts +0 -2
- package/src/permission/permission/action/PermissionSubmitActionWidget.ts +0 -161
- package/src/permission/permission/action/index.ts +0 -1
- package/src/permission/permission/field/ActionPermissionWidget.ts +0 -472
- package/src/permission/permission/field/DataPermissionWidget.ts +0 -135
- package/src/view/login/view.vue +0 -7
- package/src/view/paas-install/PaaSInstall.ts +0 -23
- package/src/view/paas-install/README.md +0 -1
- package/src/view/paas-install/field/custom-table/CodeFoucsTable.vue +0 -115
- package/src/view/paas-install/field/custom-table/CustomTable.ts +0 -166
- package/src/view/paas-install/field/index.ts +0 -2
- package/src/view/paas-install/field/upload-and-select/UploadAndSelect.ts +0 -29
- package/src/view/paas-install/field/upload-and-select/UploadAndSelect.vue +0 -157
- package/src/view/paas-install/index.ts +0 -2
- package/src/view/paas-install/service.ts +0 -37
- package/src/view/paas-manager/PaaSManager.ts +0 -23
- package/src/view/paas-manager/service.ts +0 -37
|
@@ -12,9 +12,8 @@ import { isEmptyValue, ViewMode, ViewType } from '@oinone/kunlun-meta';
|
|
|
12
12
|
import { BooleanHelper, Optional, StringHelper } from '@oinone/kunlun-shared';
|
|
13
13
|
import { DEFAULT_PREFIX } from '@oinone/kunlun-theme';
|
|
14
14
|
import type { ActiveEditorContext, RenderCellContext, RowContext } from '@oinone/kunlun-vue-ui';
|
|
15
|
-
import { StyleHelper } from '@oinone/kunlun-vue-ui-common';
|
|
16
15
|
import { type ActiveRecordsWidgetProps, InnerWidgetType, Widget } from '@oinone/kunlun-vue-widget';
|
|
17
|
-
import { isBoolean, isFunction, isNaN, isNil,
|
|
16
|
+
import { isBoolean, isFunction, isNaN, isNil, isPlainObject, isString, toString } from 'lodash-es';
|
|
18
17
|
import { createVNode, type VNode, withModifiers } from 'vue';
|
|
19
18
|
import type { VxeTableDefines } from 'vxe-table';
|
|
20
19
|
import { ActionWidget } from '../../action/component/action/ActionWidget';
|
|
@@ -22,12 +21,6 @@ import type { RowActionBarWidget } from '../../action/component/action-bar/RowAc
|
|
|
22
21
|
import { EditorField } from '../../tags/internal';
|
|
23
22
|
import type { UserTablePrefer } from '../../typing';
|
|
24
23
|
import { getTableColumnFixed, getTableColumnWidth } from '../../util';
|
|
25
|
-
import {
|
|
26
|
-
defaultTableColumnMinWidthCompute,
|
|
27
|
-
defaultTableColumnMinWidthComputeContext,
|
|
28
|
-
getTableThemeConfig,
|
|
29
|
-
type TableColumnMinWidthComputeConfigContext
|
|
30
|
-
} from '../theme';
|
|
31
24
|
import { BaseTableQuickOperationColumnWidget } from './BaseTableQuickOperationColumnWidget';
|
|
32
25
|
import DefaultGroupCell from './DefaultGroupCell.vue';
|
|
33
26
|
|
|
@@ -83,12 +76,6 @@ export class BaseTableFieldWidget<
|
|
|
83
76
|
return super.columnType;
|
|
84
77
|
}
|
|
85
78
|
|
|
86
|
-
@Widget.Inject()
|
|
87
|
-
protected cellWidth: number | undefined;
|
|
88
|
-
|
|
89
|
-
@Widget.Inject()
|
|
90
|
-
protected cellMinWidth: number | undefined;
|
|
91
|
-
|
|
92
79
|
@Widget.Reactive()
|
|
93
80
|
public get minWidth() {
|
|
94
81
|
return Optional.ofNullable(this.getDsl().minWidth).orElseGet(() => this.computeDefaultMinWidth());
|
|
@@ -115,78 +102,6 @@ export class BaseTableFieldWidget<
|
|
|
115
102
|
return this.expandOperationField === this.itemData;
|
|
116
103
|
}
|
|
117
104
|
|
|
118
|
-
protected getTableAutoWidth() {
|
|
119
|
-
const firstWidth = super.width || this.cellWidth;
|
|
120
|
-
if (firstWidth === 'auto') {
|
|
121
|
-
const { label, sortable } = this;
|
|
122
|
-
const themeConfig = getTableThemeConfig();
|
|
123
|
-
let rest = { ...defaultTableColumnMinWidthComputeContext, sortable };
|
|
124
|
-
if (themeConfig) {
|
|
125
|
-
rest = {
|
|
126
|
-
...rest,
|
|
127
|
-
...themeConfig
|
|
128
|
-
};
|
|
129
|
-
}
|
|
130
|
-
rest.min = this.cellMinWidth || rest.min;
|
|
131
|
-
return defaultTableColumnMinWidthCompute(label, rest);
|
|
132
|
-
}
|
|
133
|
-
}
|
|
134
|
-
|
|
135
|
-
protected getTableForCellMinWidth() {
|
|
136
|
-
const autoCellWidth = this.getTableAutoWidth();
|
|
137
|
-
if (!isNil(this.cellMinWidth) && autoCellWidth) {
|
|
138
|
-
return Math.max(this.cellMinWidth, autoCellWidth);
|
|
139
|
-
}
|
|
140
|
-
if (!isNil(this.cellMinWidth)) {
|
|
141
|
-
return this.cellMinWidth;
|
|
142
|
-
}
|
|
143
|
-
if (autoCellWidth) {
|
|
144
|
-
return autoCellWidth;
|
|
145
|
-
}
|
|
146
|
-
return undefined;
|
|
147
|
-
}
|
|
148
|
-
|
|
149
|
-
protected computeDefaultMinWidth(): string | number | undefined {
|
|
150
|
-
const tableForCellMinWidth = this.getTableForCellMinWidth();
|
|
151
|
-
if (tableForCellMinWidth) {
|
|
152
|
-
return tableForCellMinWidth;
|
|
153
|
-
}
|
|
154
|
-
let minWidthConfig = getTableThemeConfig()?.column?.minWidth;
|
|
155
|
-
if (minWidthConfig == null) {
|
|
156
|
-
return defaultTableColumnMinWidthComputeContext.min;
|
|
157
|
-
}
|
|
158
|
-
if (isBoolean(minWidthConfig)) {
|
|
159
|
-
if (!minWidthConfig) {
|
|
160
|
-
return defaultTableColumnMinWidthComputeContext.min;
|
|
161
|
-
}
|
|
162
|
-
minWidthConfig = undefined;
|
|
163
|
-
}
|
|
164
|
-
if (isString(minWidthConfig) || isNumber(minWidthConfig)) {
|
|
165
|
-
return StyleHelper.px(minWidthConfig);
|
|
166
|
-
}
|
|
167
|
-
const { label, sortable } = this;
|
|
168
|
-
if (isFunction(minWidthConfig)) {
|
|
169
|
-
return minWidthConfig(label, {
|
|
170
|
-
...defaultTableColumnMinWidthComputeContext,
|
|
171
|
-
sortable
|
|
172
|
-
});
|
|
173
|
-
}
|
|
174
|
-
let autoComputeMinWidthConfigContext: TableColumnMinWidthComputeConfigContext;
|
|
175
|
-
if (minWidthConfig == null) {
|
|
176
|
-
autoComputeMinWidthConfigContext = {
|
|
177
|
-
...defaultTableColumnMinWidthComputeContext,
|
|
178
|
-
sortable
|
|
179
|
-
};
|
|
180
|
-
} else {
|
|
181
|
-
autoComputeMinWidthConfigContext = {
|
|
182
|
-
...defaultTableColumnMinWidthComputeContext,
|
|
183
|
-
...minWidthConfig,
|
|
184
|
-
sortable
|
|
185
|
-
};
|
|
186
|
-
}
|
|
187
|
-
return defaultTableColumnMinWidthCompute(label, autoComputeMinWidthConfigContext);
|
|
188
|
-
}
|
|
189
|
-
|
|
190
105
|
@Widget.Method()
|
|
191
106
|
public className(context: RenderCellContext): string | string[] | undefined {
|
|
192
107
|
const { field } = this;
|
|
@@ -235,53 +235,43 @@ export default defineComponent({
|
|
|
235
235
|
const convertStatisticsValue = (value: string | number): string => {
|
|
236
236
|
switch (selectValue.value) {
|
|
237
237
|
case GroupStatisticsEnum.COUNT:
|
|
238
|
-
|
|
239
|
-
return `${value} ${translateValueByKey('条记录')}`;
|
|
238
|
+
return translateValueByKey('${value} 条记录', { value });
|
|
240
239
|
case GroupStatisticsEnum.NOT_NULL:
|
|
241
|
-
|
|
242
|
-
return `${translateValueByKey('已填写')} ${value}`;
|
|
240
|
+
return translateValueByKey('已填写 ${value}', { value });
|
|
243
241
|
case GroupStatisticsEnum.NULL:
|
|
244
|
-
|
|
245
|
-
return `${translateValueByKey('未填写')} ${value}`;
|
|
242
|
+
return translateValueByKey('未填写 ${value}', { value });
|
|
246
243
|
case GroupStatisticsEnum.UNIQUE:
|
|
247
|
-
|
|
248
|
-
return `${translateValueByKey('唯一值')} ${value}`;
|
|
244
|
+
return translateValueByKey('唯一值 ${value}', { value });
|
|
249
245
|
case GroupStatisticsEnum.NOT_NULL_PERCENT:
|
|
250
|
-
|
|
251
|
-
return `${translateValueByKey('已填写占比')} ${value}%`;
|
|
246
|
+
return translateValueByKey('已填写占比 ${value}%', { value });
|
|
252
247
|
case GroupStatisticsEnum.NULL_PERCENT:
|
|
253
|
-
|
|
254
|
-
return `${translateValueByKey('未填写占比')} ${value}%`;
|
|
248
|
+
return translateValueByKey('未填写占比 ${value}%', { value });
|
|
255
249
|
case GroupStatisticsEnum.UNIQUE_PERCENT:
|
|
256
|
-
|
|
257
|
-
return `${translateValueByKey('唯一值占比')} ${value}%`;
|
|
250
|
+
return translateValueByKey('唯一值占比 ${value}%', { value });
|
|
258
251
|
case GroupStatisticsEnum.EARLIEST_TIME: {
|
|
259
|
-
const
|
|
260
|
-
return
|
|
252
|
+
const val = dayjs(normalizeDateTime(value)).format(dateFormat.value);
|
|
253
|
+
return translateValueByKey('最早时间 ${value}', { value: val });
|
|
254
|
+
}
|
|
255
|
+
case GroupStatisticsEnum.LATEST_TIME: {
|
|
256
|
+
const val = dayjs(normalizeDateTime(value)).format(dateFormat.value);
|
|
257
|
+
return translateValueByKey('最晚时间 ${value}', { value: val });
|
|
261
258
|
}
|
|
262
|
-
case GroupStatisticsEnum.LATEST_TIME:
|
|
263
|
-
return `${translateValueByKey('最晚时间')} ${dayjs(normalizeDateTime(value)).format(dateFormat.value)}`;
|
|
264
259
|
case GroupStatisticsEnum.TIME_RANGE_DAY:
|
|
265
|
-
return
|
|
260
|
+
return translateValueByKey('时间范围 ${value} 天', { value });
|
|
266
261
|
case GroupStatisticsEnum.TIME_RANGE_MONTH:
|
|
267
|
-
return
|
|
262
|
+
return translateValueByKey('时间范围 ${value} 月', { value });
|
|
268
263
|
case GroupStatisticsEnum.TIME_RANGE_YEAR:
|
|
269
|
-
return
|
|
264
|
+
return translateValueByKey('时间范围 ${value} 年', { value });
|
|
270
265
|
case GroupStatisticsEnum.SUM:
|
|
271
|
-
|
|
272
|
-
return `${translateValueByKey('求和')} ${value}`;
|
|
266
|
+
return translateValueByKey('求和 ${value}', { value });
|
|
273
267
|
case GroupStatisticsEnum.AVERAGE:
|
|
274
|
-
|
|
275
|
-
return `${translateValueByKey('平均值')} ${value}`;
|
|
268
|
+
return translateValueByKey('平均值 ${value}', { value });
|
|
276
269
|
case GroupStatisticsEnum.MEDIAN:
|
|
277
|
-
|
|
278
|
-
return `${translateValueByKey('中位数')} ${value}`;
|
|
270
|
+
return translateValueByKey('中位数 ${value}', { value });
|
|
279
271
|
case GroupStatisticsEnum.MAX:
|
|
280
|
-
|
|
281
|
-
return `${translateValueByKey('最大值')} ${value}`;
|
|
272
|
+
return translateValueByKey('最大值 ${value}', { value });
|
|
282
273
|
case GroupStatisticsEnum.MIN:
|
|
283
|
-
|
|
284
|
-
return `${translateValueByKey('最小值')} ${value}`;
|
|
274
|
+
return translateValueByKey('最小值 ${value}', { value });
|
|
285
275
|
default:
|
|
286
276
|
return translateValueByKey('统计');
|
|
287
277
|
}
|
|
@@ -1,8 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
|
+
type ActiveRecord,
|
|
2
3
|
CommonPatternMap,
|
|
3
4
|
type FieldPattern,
|
|
5
|
+
isRelation2OField,
|
|
4
6
|
type RuntimeModelField,
|
|
7
|
+
RuntimeRelationField,
|
|
5
8
|
SubmitHandler,
|
|
9
|
+
SubmitRelationHandler,
|
|
6
10
|
SubmitRelationValue,
|
|
7
11
|
SubmitValue,
|
|
8
12
|
translateValueByKey
|
|
@@ -187,7 +191,34 @@ export class BaseFieldWidget<
|
|
|
187
191
|
@Widget.Method()
|
|
188
192
|
public change(val: Value | null | undefined) {
|
|
189
193
|
super.change(val);
|
|
190
|
-
this.
|
|
194
|
+
if (isRelation2OField(this.field) && (val == null || isPlainObject(val))) {
|
|
195
|
+
this.updateX2OValue(val as ActiveRecord).then(() => {
|
|
196
|
+
this.notify(LifeCycleTypes.ON_FIELD_CHANGE);
|
|
197
|
+
});
|
|
198
|
+
} else {
|
|
199
|
+
this.notify(LifeCycleTypes.ON_FIELD_CHANGE);
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
protected async updateX2OValue(selectedValue: ActiveRecord | null | undefined) {
|
|
204
|
+
const submitValue = new SubmitValue({
|
|
205
|
+
[this.itemData]: selectedValue
|
|
206
|
+
});
|
|
207
|
+
const { field, itemName, viewMode, submitCache, submitType, relationUpdateType } = this;
|
|
208
|
+
const updateValue = await SubmitRelationHandler.M2O(
|
|
209
|
+
field as unknown as RuntimeRelationField,
|
|
210
|
+
itemName,
|
|
211
|
+
submitValue,
|
|
212
|
+
selectedValue,
|
|
213
|
+
viewMode,
|
|
214
|
+
submitCache,
|
|
215
|
+
submitType,
|
|
216
|
+
relationUpdateType
|
|
217
|
+
);
|
|
218
|
+
if (updateValue instanceof SubmitRelationValue) {
|
|
219
|
+
return;
|
|
220
|
+
}
|
|
221
|
+
Object.assign(this.formData, updateValue);
|
|
191
222
|
}
|
|
192
223
|
|
|
193
224
|
@Widget.Method()
|
|
@@ -296,6 +296,7 @@ export abstract class BaseView<Props extends BaseViewProps = BaseViewProps> exte
|
|
|
296
296
|
const { globalState, createViewState } = useOioState(this.currentHandle);
|
|
297
297
|
const state = createViewState();
|
|
298
298
|
state.viewType = this.viewType!;
|
|
299
|
+
this.globalState = globalState;
|
|
299
300
|
this.viewState = state;
|
|
300
301
|
if (!this.inline && this.viewType && this.viewType !== ViewType.Search) {
|
|
301
302
|
globalState.mainViewHandle = this.currentHandle;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
@import './common/countdown/style/index.scss';
|
|
2
2
|
@import './common/inline-form/style/index.scss';
|
|
3
3
|
@import './common/inline-table/style/index.scss';
|
|
4
|
+
@import './select/modal-select/style/index.scss';
|
|
4
5
|
@import './oio-manage-group/style/index.scss';
|
|
5
6
|
@import './user-prefer/style/index.scss';
|
|
@@ -111,6 +111,7 @@
|
|
|
111
111
|
</template>
|
|
112
112
|
<script lang="ts">
|
|
113
113
|
import { PlusOutlined } from '@ant-design/icons-vue';
|
|
114
|
+
import { translateValueByKey } from '@oinone/kunlun-engine';
|
|
114
115
|
import { OioButton, OioModal, OioNotification } from '@oinone/kunlun-vue-ui-antd';
|
|
115
116
|
import { OioIcon } from '@oinone/kunlun-vue-ui-common';
|
|
116
117
|
import { computed, defineComponent, nextTick, ref, type Ref, watch } from 'vue';
|
|
@@ -223,7 +224,7 @@ export default defineComponent({
|
|
|
223
224
|
const handleModifyGroup = async (paramGroup) => {
|
|
224
225
|
try {
|
|
225
226
|
if (!paramGroup.refName) {
|
|
226
|
-
OioNotification.error('失败', '分组名称不能为空');
|
|
227
|
+
OioNotification.error(translateValueByKey('失败'), translateValueByKey('分组名称不能为空'));
|
|
227
228
|
} else {
|
|
228
229
|
if (paramGroup.refName !== (paramGroup.displayName || paramGroup.name)) {
|
|
229
230
|
if (!props.onModifyGroup || typeof props.onModifyGroup !== 'function') {
|
|
@@ -256,7 +257,7 @@ export default defineComponent({
|
|
|
256
257
|
groupTagcreateInputValue.value = '';
|
|
257
258
|
// detectShowModal();
|
|
258
259
|
} else {
|
|
259
|
-
OioNotification.error('失败', '分组名称不能为空');
|
|
260
|
+
OioNotification.error(translateValueByKey('失败'), translateValueByKey('分组名称不能为空'));
|
|
260
261
|
}
|
|
261
262
|
addGroupInputVisible.value = false;
|
|
262
263
|
};
|
|
@@ -27,6 +27,7 @@ import {
|
|
|
27
27
|
} from 'vue';
|
|
28
28
|
import { useMetadataProps } from '../../../basic';
|
|
29
29
|
import { BaseSelectProps } from './props';
|
|
30
|
+
import { useSelectId } from './useSelectId';
|
|
30
31
|
|
|
31
32
|
interface SelectedOption {
|
|
32
33
|
key: string;
|
|
@@ -51,6 +52,7 @@ export default defineComponent({
|
|
|
51
52
|
}
|
|
52
53
|
},
|
|
53
54
|
setup(props, { emit }) {
|
|
55
|
+
const id = useSelectId();
|
|
54
56
|
const origin = ref();
|
|
55
57
|
const dropdownInputRef = ref();
|
|
56
58
|
const formContext = useInjectOioDefaultFormContext();
|
|
@@ -245,7 +247,37 @@ export default defineComponent({
|
|
|
245
247
|
e.preventDefault();
|
|
246
248
|
};
|
|
247
249
|
|
|
250
|
+
const $$onClear = () => {
|
|
251
|
+
props.change?.(null);
|
|
252
|
+
props.search?.('');
|
|
253
|
+
};
|
|
254
|
+
|
|
248
255
|
const onGlobalMouseDown = (e: MouseEvent) => {
|
|
256
|
+
let antSelectClearDom: HTMLElement | undefined;
|
|
257
|
+
let target = e.target as HTMLElement | null | undefined;
|
|
258
|
+
if (target) {
|
|
259
|
+
for (let i = 0; i < 5; i++) {
|
|
260
|
+
if (target.nodeType && target.classList.contains('ant-select-clear')) {
|
|
261
|
+
antSelectClearDom = target;
|
|
262
|
+
break;
|
|
263
|
+
}
|
|
264
|
+
target = target.parentElement;
|
|
265
|
+
if (!target) {
|
|
266
|
+
break;
|
|
267
|
+
}
|
|
268
|
+
}
|
|
269
|
+
}
|
|
270
|
+
if (
|
|
271
|
+
antSelectClearDom &&
|
|
272
|
+
document
|
|
273
|
+
.querySelector(`#${id}`)
|
|
274
|
+
?.parentElement?.parentElement?.parentElement?.getElementsByClassName('ant-select-clear')
|
|
275
|
+
.item(0) === antSelectClearDom
|
|
276
|
+
) {
|
|
277
|
+
e.preventDefault();
|
|
278
|
+
e.stopPropagation();
|
|
279
|
+
$$onClear();
|
|
280
|
+
}
|
|
249
281
|
focusSearchInput = e.target === dropdownInputRef.value?.originInput?.input;
|
|
250
282
|
};
|
|
251
283
|
|
|
@@ -259,6 +291,7 @@ export default defineComponent({
|
|
|
259
291
|
|
|
260
292
|
return {
|
|
261
293
|
...useMaxTagPlaceholder(),
|
|
294
|
+
id,
|
|
262
295
|
origin,
|
|
263
296
|
dropdownInputRef,
|
|
264
297
|
readonly,
|
|
@@ -287,6 +320,7 @@ export default defineComponent({
|
|
|
287
320
|
$slots,
|
|
288
321
|
$attrs,
|
|
289
322
|
|
|
323
|
+
id,
|
|
290
324
|
mode,
|
|
291
325
|
value,
|
|
292
326
|
options,
|
|
@@ -319,13 +353,15 @@ export default defineComponent({
|
|
|
319
353
|
onSearchInputKeydown,
|
|
320
354
|
onClickStop
|
|
321
355
|
} = this;
|
|
322
|
-
const selectClassNames = ['oio-select', 'oio-
|
|
356
|
+
const selectClassNames = ['oio-select', 'oio-base-select'];
|
|
323
357
|
const props: Record<string, unknown> = {
|
|
324
358
|
ref: 'origin',
|
|
359
|
+
id,
|
|
325
360
|
class: selectClassNames,
|
|
326
|
-
dropdownClassName: StringHelper.append(
|
|
327
|
-
' '
|
|
328
|
-
|
|
361
|
+
dropdownClassName: StringHelper.append(
|
|
362
|
+
['oio-select-dropdown oio-base-select-dropdown vxe-table--ignore-clear'],
|
|
363
|
+
dropdownClassName
|
|
364
|
+
).join(' '),
|
|
329
365
|
labelInValue: true,
|
|
330
366
|
filterOption: false,
|
|
331
367
|
defaultActiveFirstOption: false,
|
|
@@ -471,7 +507,7 @@ export default defineComponent({
|
|
|
471
507
|
slotNames.push('default');
|
|
472
508
|
}
|
|
473
509
|
const selectVNode = createVNode(ASelect, props, PropRecordHelper.collectionSlots($slots, slotNames));
|
|
474
|
-
const classNames = ['oio-
|
|
510
|
+
const classNames = ['oio-base-select-wrapper'];
|
|
475
511
|
if (prefix || suffix) {
|
|
476
512
|
return createVNode(OioInputGroup, PropRecordHelper.collectionBasicProps($attrs, classNames), {
|
|
477
513
|
default: () => {
|
|
@@ -492,15 +528,15 @@ export default defineComponent({
|
|
|
492
528
|
});
|
|
493
529
|
</script>
|
|
494
530
|
<style lang="scss">
|
|
495
|
-
.oio-
|
|
531
|
+
.oio-base-select-wrapper {
|
|
496
532
|
&.oio-input-group {
|
|
497
|
-
.oio-
|
|
533
|
+
.oio-base-select {
|
|
498
534
|
flex: 1;
|
|
499
535
|
}
|
|
500
536
|
}
|
|
501
537
|
}
|
|
502
538
|
|
|
503
|
-
.oio-
|
|
539
|
+
.oio-base-select-dropdown {
|
|
504
540
|
.oio-select-dropdown-spin {
|
|
505
541
|
height: 28px;
|
|
506
542
|
padding: 5px 12px;
|
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
import {
|
|
3
3
|
OrganizationalStructureType,
|
|
4
4
|
type PamirsDepartment,
|
|
5
|
-
type PamirsDepartmentService,
|
|
6
5
|
type PamirsOrganizationalStructure,
|
|
6
|
+
type PamirsOrganizationalStructureService,
|
|
7
7
|
QueryWrapper
|
|
8
8
|
} from '@oinone/kunlun-engine';
|
|
9
9
|
import {
|
|
@@ -142,13 +142,14 @@ export default defineComponent({
|
|
|
142
142
|
});
|
|
143
143
|
|
|
144
144
|
const load = async (
|
|
145
|
-
res: TreeState<
|
|
146
|
-
service:
|
|
145
|
+
res: TreeState<PamirsOrganizationalStructure>,
|
|
146
|
+
service: PamirsOrganizationalStructureService,
|
|
147
147
|
queryWrapper: QueryWrapper
|
|
148
148
|
) => {
|
|
149
149
|
try {
|
|
150
150
|
return await service.queryListByFilter({
|
|
151
151
|
model: props.model,
|
|
152
|
+
companyModel: props.companyModel,
|
|
152
153
|
rsql: queryWrapper.rsql,
|
|
153
154
|
departmentCodes: props.departmentCodes,
|
|
154
155
|
userCompanyDept: props.userCompanyDept,
|
|
@@ -190,8 +191,8 @@ export default defineComponent({
|
|
|
190
191
|
});
|
|
191
192
|
|
|
192
193
|
const userDepartmentTreeLoad = async (
|
|
193
|
-
res: TreeState<
|
|
194
|
-
service:
|
|
194
|
+
res: TreeState<PamirsOrganizationalStructure>,
|
|
195
|
+
service: PamirsOrganizationalStructureService,
|
|
195
196
|
queryWrapper: QueryWrapper
|
|
196
197
|
) => {
|
|
197
198
|
try {
|
|
@@ -203,6 +204,7 @@ export default defineComponent({
|
|
|
203
204
|
}
|
|
204
205
|
return await service.queryListByFilter({
|
|
205
206
|
model: props.model,
|
|
207
|
+
companyModel: props.companyModel,
|
|
206
208
|
rsql: queryWrapper.rsql,
|
|
207
209
|
userCompanyDept,
|
|
208
210
|
userDept,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
-
import
|
|
2
|
+
import { PamirsDepartment, translateValueByKey } from '@oinone/kunlun-engine';
|
|
3
3
|
import type { OioTreeNode } from '@oinone/kunlun-shared';
|
|
4
4
|
import { OioCheckbox, OioIcon, OioTree, SelectMode } from '@oinone/kunlun-vue-ui-antd';
|
|
5
5
|
import { Radio as ARadio } from 'ant-design-vue';
|
|
@@ -211,7 +211,7 @@ export default defineComponent({
|
|
|
211
211
|
if (!!filterData.length && selectMode === SelectMode.multiple && showCheckedAll) {
|
|
212
212
|
return createVNode('div', { class: `${mainClassName}-wrapper oio-scrollbar` }, [
|
|
213
213
|
createVNode('div', { class: `${mainClassName}-node ${mainClassName}-node-checked-all` }, [
|
|
214
|
-
createVNode('div', { class: `${mainClassName}-node-title` }, '全选'),
|
|
214
|
+
createVNode('div', { class: `${mainClassName}-node-title` }, translateValueByKey('全选')),
|
|
215
215
|
createVNode(OioCheckbox, {
|
|
216
216
|
checked: checkedAll,
|
|
217
217
|
indeterminate: halfCheckedAll,
|
|
@@ -2,6 +2,12 @@
|
|
|
2
2
|
<div class="oio-modal-select-wrapper">
|
|
3
3
|
<DefaultSelect v-bind="selectProps" />
|
|
4
4
|
<oio-modal v-bind="modalProps">
|
|
5
|
+
<oio-input-search
|
|
6
|
+
:value="searchValue"
|
|
7
|
+
:placeholder="$translate('搜索')"
|
|
8
|
+
allow-clear
|
|
9
|
+
@update:value="onUpdateSearchValue"
|
|
10
|
+
/>
|
|
5
11
|
<oio-table v-bind="tableProps">
|
|
6
12
|
<oio-column v-if="checkbox" type="checkbox" width="50" />
|
|
7
13
|
<oio-column v-else type="radio" width="50" />
|
|
@@ -13,8 +19,10 @@
|
|
|
13
19
|
<script lang="ts">
|
|
14
20
|
import { ActiveRecordExtendKeys, ActiveRecords } from '@oinone/kunlun-engine';
|
|
15
21
|
import { CheckedChangeEvent, OioColumn, OioTable, RadioChangeEvent } from '@oinone/kunlun-vue-ui';
|
|
16
|
-
import { OioModal, PropRecordHelper, SelectMode, StringHelper } from '@oinone/kunlun-vue-ui-antd';
|
|
17
|
-
import {
|
|
22
|
+
import { OioInputSearch, OioModal, PropRecordHelper, SelectMode, StringHelper } from '@oinone/kunlun-vue-ui-antd';
|
|
23
|
+
import { WritableComputedRef } from '@vue/reactivity';
|
|
24
|
+
import { debounce } from 'lodash-es';
|
|
25
|
+
import { computed, defineComponent, nextTick, reactive, ref, Ref } from 'vue';
|
|
18
26
|
import { DefaultSelect, DefaultSelectProps } from '../base';
|
|
19
27
|
import { DefaultTableSelectProps } from '../table-select';
|
|
20
28
|
|
|
@@ -28,7 +36,8 @@ export default defineComponent({
|
|
|
28
36
|
DefaultSelect,
|
|
29
37
|
OioModal,
|
|
30
38
|
OioTable,
|
|
31
|
-
OioColumn
|
|
39
|
+
OioColumn,
|
|
40
|
+
OioInputSearch
|
|
32
41
|
},
|
|
33
42
|
inheritAttrs: false,
|
|
34
43
|
props: {
|
|
@@ -37,7 +46,7 @@ export default defineComponent({
|
|
|
37
46
|
type: String
|
|
38
47
|
}
|
|
39
48
|
},
|
|
40
|
-
setup(props, { attrs }) {
|
|
49
|
+
setup(props, { attrs, emit }) {
|
|
41
50
|
const state: State = reactive({
|
|
42
51
|
visible: false
|
|
43
52
|
});
|
|
@@ -80,6 +89,7 @@ export default defineComponent({
|
|
|
80
89
|
notFoundContent: null,
|
|
81
90
|
loadMoreLoading: null,
|
|
82
91
|
onClick: () => {
|
|
92
|
+
searchValue.value = undefined;
|
|
83
93
|
state.records = null;
|
|
84
94
|
state.visible = true;
|
|
85
95
|
}
|
|
@@ -150,8 +160,17 @@ export default defineComponent({
|
|
|
150
160
|
state.records = newRecord;
|
|
151
161
|
};
|
|
152
162
|
|
|
163
|
+
/**
|
|
164
|
+
* 当 vxe-table 加载数据数量过多,scrollHeight 达到一定高度时,会出现 bodyHeight === scrollHeight 参数异常的问题
|
|
165
|
+
* 此参数用于保留第一次滚动的有效值
|
|
166
|
+
*/
|
|
167
|
+
let bodyHeight: number | undefined;
|
|
168
|
+
|
|
153
169
|
const onScroll = (e: { scrollHeight: number; scrollTop: number; bodyHeight: number }) => {
|
|
154
|
-
const { scrollHeight, scrollTop
|
|
170
|
+
const { scrollHeight, scrollTop } = e;
|
|
171
|
+
if (bodyHeight == null) {
|
|
172
|
+
bodyHeight = e.bodyHeight;
|
|
173
|
+
}
|
|
155
174
|
if (scrollHeight - scrollTop - 1 <= bodyHeight) {
|
|
156
175
|
if (props.loadCompleted) {
|
|
157
176
|
return;
|
|
@@ -160,12 +179,37 @@ export default defineComponent({
|
|
|
160
179
|
}
|
|
161
180
|
};
|
|
162
181
|
|
|
182
|
+
const $$searchValue: Ref<string | undefined> = ref();
|
|
183
|
+
const searchValue: WritableComputedRef<string | undefined> = computed({
|
|
184
|
+
get() {
|
|
185
|
+
if (props.searchValue === undefined) {
|
|
186
|
+
return $$searchValue.value;
|
|
187
|
+
}
|
|
188
|
+
return props.searchValue;
|
|
189
|
+
},
|
|
190
|
+
set(val) {
|
|
191
|
+
$$searchValue.value = val;
|
|
192
|
+
emit('update:search-value', val);
|
|
193
|
+
props.onUpdateSearchValue?.(val);
|
|
194
|
+
}
|
|
195
|
+
});
|
|
196
|
+
|
|
197
|
+
const onUpdateSearchValue = (keyword: string) => {
|
|
198
|
+
searchValue.value = keyword;
|
|
199
|
+
onSearch(keyword);
|
|
200
|
+
};
|
|
201
|
+
|
|
202
|
+
const onSearch = debounce(async (keyword: string) => {
|
|
203
|
+
await props.search?.(keyword);
|
|
204
|
+
}, 300);
|
|
205
|
+
|
|
163
206
|
return {
|
|
164
207
|
state,
|
|
165
208
|
selectProps,
|
|
166
209
|
modalProps,
|
|
167
210
|
tableProps,
|
|
168
|
-
checkbox
|
|
211
|
+
checkbox,
|
|
212
|
+
onUpdateSearchValue
|
|
169
213
|
};
|
|
170
214
|
}
|
|
171
215
|
});
|