sun-biz 0.0.4-beta.9 → 0.0.4-pjw.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.
@@ -1,4 +1,4 @@
1
- import type { ConfigReqParams, SearchReqParams, AccessConfig, TPatient, BannerReqParams, BannerReqItem } from "./types.d";
1
+ import type { ConfigReqParams, SearchReqParams, AccessConfig, TPatient, BannerReqParams, BannerReqItem, BizTagInfo } from './types.d';
2
2
  /**
3
3
  * 1-10115-1 根据条件查询菜单的检索方式列表(业务态)
4
4
  * @param params
@@ -22,3 +22,12 @@ export declare const queryBizDataList: (params: SearchReqParams) => Promise<[imp
22
22
  * @returns
23
23
  */
24
24
  export declare const getBannerDataByBizId: (params: BannerReqParams) => Promise<[import("@sun-toolkit/request").SunApiResultData<null> | undefined, import("@sun-toolkit/request").SunApiResultData<BannerReqItem> | undefined]>;
25
+ /**
26
+ * [1-10475-1]根据条件查询标签列表
27
+ * @param params
28
+ * @returns
29
+ */
30
+ export declare const queryBizTagListByExample: (params: {
31
+ bizIdTypeCode: string;
32
+ bizId: string;
33
+ }) => Promise<[import("@sun-toolkit/request").SunApiResultData<null> | undefined, import("@sun-toolkit/request").SunApiResultData<BizTagInfo[]> | undefined]>;
@@ -0,0 +1,2 @@
1
+ export { default as ProAvatar } from './index.vue';
2
+ export { AVATAR_TYPE_CODE } from './utils';
@@ -0,0 +1,21 @@
1
+ export declare function useAvatarSize(width?: number | string, height?: number | string): {
2
+ currentWidth: import("vue").ComputedRef<string>;
3
+ currentHeight: import("vue").ComputedRef<string>;
4
+ };
5
+ /**
6
+ * 头像类型
7
+ */
8
+ export declare enum AVATAR_TYPE_CODE {
9
+ /**
10
+ * 男性
11
+ */
12
+ WOMAN = "woman",
13
+ /**
14
+ * 女性
15
+ */
16
+ MAN = "man",
17
+ /**
18
+ * 默认
19
+ */
20
+ DEFAULT = "default"
21
+ }
@@ -14,6 +14,7 @@ export interface FormDescItem {
14
14
  supportCopyAndTips?: boolean;
15
15
  type?: string;
16
16
  name: string;
17
+ radioComponent?: string;
17
18
  label?: string | (() => VNode | string);
18
19
  span?: number;
19
20
  width?: number | string;
@@ -0,0 +1 @@
1
+ export declare const OPERATION = "operation";
@@ -36,6 +36,7 @@ export type HeaderRenderScope<T> = {
36
36
  [key: string]: any;
37
37
  };
38
38
  export interface ColumnProps<T = any> extends Partial<Omit<TableColumnCtx<T>, 'type' | 'children' | 'renderCell' | 'renderHeader'>> {
39
+ isDraggable?: boolean;
39
40
  defaultDisplayFlag?: number;
40
41
  required?: boolean | undefined;
41
42
  autoFormatterNumber?: boolean;
@@ -88,3 +89,7 @@ export interface SortFieldObj {
88
89
  ascendFlag: number;
89
90
  sort: number;
90
91
  }
92
+ export type TableColumnProps = ColumnProps & {
93
+ displayFlag?: number;
94
+ sort?: number;
95
+ };
@@ -6,15 +6,15 @@
6
6
 
7
7
 
8
8
 
9
- [data-v-d83c7b5e] .el-menu-item {
9
+ [data-v-38d4eddb] .el-menu-item {
10
10
  height: 48px;
11
11
  line-height: 48px;
12
12
  }
13
- [data-v-d83c7b5e] .el-sub-menu__title {
13
+ [data-v-38d4eddb] .el-sub-menu__title {
14
14
  height: 48px;
15
15
  line-height: 48px;
16
16
  }
17
- [data-v-d83c7b5e] .el-menu-item.is-active {
17
+ [data-v-38d4eddb] .el-menu-item.is-active {
18
18
  color: inherit !important;
19
19
  background-color: #0000 !important;
20
20
  }
@@ -2,7 +2,7 @@ export { default as useRequest } from "./use-request/index.ts";
2
2
  export { default as useAppConfigData, MAIN_APP_CONFIG, } from "./use-app-config/index.ts";
3
3
  export type { PreferenceData } from "./use-app-config/index.ts";
4
4
  export { default as useDirectionSelect } from "./use-direction-select/index.ts";
5
- export { default as useFetchDataset, queryDataSetByCodeSystemCodes, type CodeSystem } from "./use-fetch-dataset/index.ts";
6
- export { default as useEditableTable } from './use-editable-table/index.ts';
7
- export { default as useDataChangeDetector } from './use-data-change-detector/index.ts';
5
+ export * from "./use-fetch-data/index.ts";
6
+ export { default as useEditableTable } from "./use-editable-table/index.ts";
7
+ export { default as useDataChangeDetector } from "./use-data-change-detector/index.ts";
8
8
  export { useColumnConfig, useFormConfig, } from "./use-column&form-config/index.ts";
@@ -4,7 +4,7 @@ import * as __WEBPACK_EXTERNAL_MODULE__sun_toolkit_enums__ from "@sun-toolkit/en
4
4
  import * as __WEBPACK_EXTERNAL_MODULE__sun_toolkit_shared__ from "@sun-toolkit/shared";
5
5
  import * as __WEBPACK_EXTERNAL_MODULE_element_sun__ from "element-sun";
6
6
  import * as __WEBPACK_EXTERNAL_MODULE_vue_router__ from "vue-router";
7
- import * as __WEBPACK_EXTERNAL_MODULE_i18next_vue__ from "i18next-vue";
7
+ import * as __WEBPACK_EXTERNAL_MODULE__sun_toolkit_micro_app__ from "@sun-toolkit/micro-app";
8
8
  /* eslint-disable @typescript-eslint/no-explicit-any */ // support refreshDeps & ready
9
9
  const useAutoRunPlugin = (fetchInstance, { manual, ready = true, refreshDeps = [], refreshDepsAction })=>{
10
10
  const hasAutoRun = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)(false);
@@ -364,7 +364,7 @@ function useRequest_useRequest(service, options, plugins) {
364
364
  return MAIN_APP_CONFIG;
365
365
  }({});
366
366
  function useAppConfigData(name) {
367
- const data = (0, __WEBPACK_EXTERNAL_MODULE_vue__.inject)('mainAppConfig');
367
+ const data = (0, __WEBPACK_EXTERNAL_MODULE_vue__.inject)("mainAppConfig");
368
368
  if (Array.isArray(name)) return name.reduce((acc, key)=>{
369
369
  if (data && key in data) acc[key] = data[key];
370
370
  return acc;
@@ -448,7 +448,7 @@ function useSelectByDirectionEvent(options) {
448
448
  * [1-10012-1]获取值域列表
449
449
  * @param data
450
450
  * @returns
451
- */ const queryDataSetByCodeSystemCodes = (params)=>(0, __WEBPACK_EXTERNAL_MODULE__sun_toolkit_request__.dictRequest)('/codeSystem/queryDataSetByCodeSystemCodes', params, {
451
+ */ const queryDataSetByCodeSystemCodes = (params)=>(0, __WEBPACK_EXTERNAL_MODULE__sun_toolkit_request__.dictRequest)("/codeSystem/queryDataSetByCodeSystemCodes", params, {
452
452
  cancel: false
453
453
  });
454
454
  function useFetchDataset(codeSystemCodes, enabledFlag) {
@@ -468,6 +468,42 @@ function useFetchDataset(codeSystemCodes, enabledFlag) {
468
468
  return list;
469
469
  }
470
470
  /* ESM default export */ const use_fetch_dataset = useFetchDataset;
471
+ /** 获取系统时间 */ async function getSystemTime() {
472
+ const [, res] = await (0, __WEBPACK_EXTERNAL_MODULE__sun_toolkit_request__.dictRequest)('/dictCommon/getSysTime');
473
+ if (res?.success) return res.data;
474
+ return (0, __WEBPACK_EXTERNAL_MODULE__sun_toolkit_shared__.getNowTime)();
475
+ }
476
+ /** 获取系统时间 */ function useFetchSystemTime() {
477
+ const time = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)();
478
+ (0, __WEBPACK_EXTERNAL_MODULE_vue__.onBeforeMount)(()=>{
479
+ getSystemTime().then((val)=>time.value = val);
480
+ });
481
+ return time;
482
+ }
483
+ /**
484
+ * [1-10012-1]获取值域列表
485
+ * @param data
486
+ * @returns
487
+ */ const queryParamListByNos = (params)=>(0, __WEBPACK_EXTERNAL_MODULE__sun_toolkit_request__.dictRequest)("/parameter/queryParamListByNos", params);
488
+ function useFetchParams(options) {
489
+ const { hospitalId, paramNos, callback } = options;
490
+ const paramsConfig = (0, __WEBPACK_EXTERNAL_MODULE_vue__.ref)({});
491
+ (0, __WEBPACK_EXTERNAL_MODULE_vue__.onBeforeMount)(async ()=>{
492
+ if (!hospitalId) return;
493
+ const [, res] = await queryParamListByNos({
494
+ hospitalId,
495
+ paramNos
496
+ });
497
+ if (res?.data) {
498
+ paramsConfig.value = res.data.reduce((acc, cur)=>{
499
+ acc[cur.paramNo] = cur.paramSettingList;
500
+ return acc;
501
+ }, {});
502
+ if (callback) callback(paramsConfig.value);
503
+ }
504
+ });
505
+ return paramsConfig;
506
+ }
471
507
  /**
472
508
  * 表格编辑功能
473
509
  */ function useEditableTable(options) {
@@ -630,18 +666,19 @@ function useDataChangeDetector(sources, options) {
630
666
  };
631
667
  }
632
668
  /* ESM default export */ const use_data_change_detector = useDataChangeDetector;
669
+ // import { useTranslation } from "i18next-vue";
633
670
  function useFormConfig(options) {
634
- const { t } = (0, __WEBPACK_EXTERNAL_MODULE_i18next_vue__.useTranslation)();
671
+ // const { t } = useTranslation();
635
672
  const { getData, dataSetCodes } = options;
636
- const dataSet = useFetchDataset(dataSetCodes);
637
- const data = (0, __WEBPACK_EXTERNAL_MODULE_vue__.computed)(()=>getData(t, dataSet));
673
+ const dataSet = use_fetch_dataset(dataSetCodes);
674
+ const data = (0, __WEBPACK_EXTERNAL_MODULE_vue__.computed)(()=>getData(__WEBPACK_EXTERNAL_MODULE__sun_toolkit_micro_app__.t, dataSet));
638
675
  return data;
639
676
  }
640
677
  function useColumnConfig(options) {
641
- const { t } = (0, __WEBPACK_EXTERNAL_MODULE_i18next_vue__.useTranslation)();
678
+ // const { t } = useTranslation();
642
679
  const { getData, dataSetCodes } = options;
643
- const dataSet = useFetchDataset(dataSetCodes);
644
- const data = (0, __WEBPACK_EXTERNAL_MODULE_vue__.computed)(()=>getData(t, dataSet));
680
+ const dataSet = use_fetch_dataset(dataSetCodes);
681
+ const data = (0, __WEBPACK_EXTERNAL_MODULE_vue__.computed)(()=>getData(__WEBPACK_EXTERNAL_MODULE__sun_toolkit_micro_app__.t, dataSet));
645
682
  return data;
646
683
  }
647
- export { use_app_config_MAIN_APP_CONFIG as MAIN_APP_CONFIG, queryDataSetByCodeSystemCodes, use_app_config as useAppConfigData, useColumnConfig, use_data_change_detector as useDataChangeDetector, use_direction_select as useDirectionSelect, use_editable_table as useEditableTable, use_fetch_dataset as useFetchDataset, useFormConfig, use_request as useRequest };
684
+ export { use_app_config_MAIN_APP_CONFIG as MAIN_APP_CONFIG, getSystemTime, queryDataSetByCodeSystemCodes, queryParamListByNos, use_app_config as useAppConfigData, useColumnConfig, use_data_change_detector as useDataChangeDetector, use_direction_select as useDirectionSelect, use_editable_table as useEditableTable, use_fetch_dataset as useFetchDataset, useFetchParams, useFetchSystemTime, useFormConfig, use_request as useRequest };
@@ -1,5 +1,5 @@
1
- import { AppConfigType } from './types';
2
- export type { PreferenceData } from './types';
1
+ import { AppConfigType } from "./types";
2
+ export type { PreferenceData } from "./types";
3
3
  /**
4
4
  * 获取主应用配置信息
5
5
  */
@@ -1,8 +1,8 @@
1
- import { Ref } from 'vue';
2
- import { TFunction } from 'i18next';
3
- import { CodeSystem } from '../use-fetch-dataset/types';
4
- import { FormDescItem } from '@/components/pro-form/typings/index';
5
- import { ColumnProps } from '@/components/pro-table/interface';
1
+ import { Ref } from "vue";
2
+ import { TFunction } from "i18next";
3
+ import { CodeSystem } from "../use-fetch-data/types";
4
+ import { FormDescItem } from "@/components/pro-form/typings/index";
5
+ import { ColumnProps } from "@/components/pro-table/interface";
6
6
  export interface ConfigOptions<T extends readonly string[] | undefined, U, R = undefined> {
7
7
  getData: (t: TFunction, data: Ref<(T extends readonly string[] ? {
8
8
  [P in T[number]]: CodeSystem[];
@@ -0,0 +1,3 @@
1
+ export { default as useFetchDataset, queryDataSetByCodeSystemCodes, type CodeSystem, } from './use-fetch-dataset';
2
+ export { getSystemTime, useFetchSystemTime } from './use-fetch-time';
3
+ export { useFetchParams, queryParamListByNos, type ParamSettingItem, type ParamResItem, } from './use-fetch-params';
@@ -1,4 +1,4 @@
1
- import type { CodeSystem } from './types.d';
1
+ import type { CodeSystem } from "./types.d";
2
2
  /**
3
3
  * [1-10012-1]获取值域列表
4
4
  * @param data
@@ -0,0 +1,24 @@
1
+ export interface ParamSettingItem {
2
+ paramSettingId: string;
3
+ paramValue: string;
4
+ }
5
+ export interface ParamResItem {
6
+ paramNo: string;
7
+ paramSettingList: ParamSettingItem[];
8
+ }
9
+ interface OptionType {
10
+ hospitalId: string;
11
+ paramNos: readonly string[];
12
+ callback?: (data: Record<string, ParamSettingItem[]>) => void;
13
+ }
14
+ /**
15
+ * [1-10012-1]获取值域列表
16
+ * @param data
17
+ * @returns
18
+ */
19
+ export declare const queryParamListByNos: (params: {
20
+ paramNos: readonly string[];
21
+ hospitalId: string;
22
+ }) => Promise<[import("@sun-toolkit/request").SunApiResultData<null> | undefined, import("@sun-toolkit/request").SunApiResultData<ParamResItem[]> | undefined]>;
23
+ export declare function useFetchParams(options: OptionType): import("vue").Ref<Record<string, ParamSettingItem[]>, Record<string, ParamSettingItem[]>>;
24
+ export default useFetchParams;
@@ -3,4 +3,4 @@ export declare function getSystemTime(): Promise<string | {
3
3
  data: string;
4
4
  }>;
5
5
  /** 获取系统时间 */
6
- export declare function useFetchSystemTiem(): import("vue").Ref<any, any>;
6
+ export declare function useFetchSystemTime(): import("vue").Ref<any, any>;
package/dist/index.d.ts CHANGED
@@ -1,26 +1,27 @@
1
1
  /** components **/
2
- export * from "./components/pro-table";
3
- export * from "./components/pro-table-v2";
4
- export * from "./components/patient-access/index.ts";
5
- export * from "./components/print/index.ts";
6
- export * from "./components/invoice/index.ts";
7
- export { Title } from "./components/title";
8
- export { DictSelect, FlagSelect, HospitalSelect, TagSelect, } from "./components/biz-select";
9
- export { CopyTextWithTooltip } from "./components/copy-text-with-tooltip";
10
- export { FormDesignRender } from "./components/form-design-render";
11
- export { ProDialog } from "./components/pro-dialog";
12
- export { AccessInfo } from "./components/access-info";
13
- export { ProForm, FormUnit, convertToWbNo, convertToSpellNo, type FormDescItem, } from "./components/pro-form";
14
- export { DmlButton } from "./components/dml-button/index.ts";
2
+ export * from './components/pro-table';
3
+ export * from './components/pro-table-v2';
4
+ export * from './components/patient-access/index.ts';
5
+ export * from './components/print/index.ts';
6
+ export * from './components/invoice/index.ts';
7
+ export { Title } from './components/title';
8
+ export { DictSelect, FlagSelect, HospitalSelect, TagSelect, UserSelect, BizUnitSelect, DepartmentSelect, WardSelect, } from './components/biz-select';
9
+ export type { TagGroupInfo } from './components/biz-select';
10
+ export { CopyTextWithTooltip } from './components/copy-text-with-tooltip';
11
+ export { FormDesignRender } from './components/form-design-render';
12
+ export { ProDialog } from './components/pro-dialog';
13
+ export { AccessInfo } from './components/access-info';
14
+ export { ProAvatar, AVATAR_TYPE_CODE } from './components/pro-avatar';
15
+ export { ProForm, FormUnit, convertToWbNo, convertToSpellNo, type FormDescItem, } from './components/pro-form';
16
+ export { DmlButton } from './components/dml-button/index.ts';
15
17
  /** hooks ** */
16
- export { default as useRequest } from "./hooks/use-request";
17
- export { default as useAppConfigData, MAIN_APP_CONFIG, } from "./hooks/use-app-config";
18
- export type { PreferenceData } from "./hooks/use-app-config";
19
- export { default as useDirectionSelect } from "./hooks/use-direction-select";
20
- export { default as useFetchDataset, queryDataSetByCodeSystemCodes, type CodeSystem, } from "./hooks/use-fetch-dataset";
21
- export { getSystemTime, useFetchSystemTiem, } from "./hooks/use-fetch-dataset/use-fetch-time";
22
- export { useEditableTable } from "./hooks/use-editable-table";
23
- export type { TableRef } from "./hooks/use-editable-table";
24
- export { useColumnConfig, useFormConfig } from "./hooks/use-column&form-config";
25
- export { useDataChangeDetector } from "./hooks/use-data-change-detector";
26
- export { debounce, isNumber, decimalCount, formatDecimalNumber } from "./utils";
18
+ export { default as useRequest } from './hooks/use-request';
19
+ export { default as useAppConfigData, MAIN_APP_CONFIG, } from './hooks/use-app-config';
20
+ export type { PreferenceData } from './hooks/use-app-config';
21
+ export { default as useDirectionSelect } from './hooks/use-direction-select';
22
+ export { useEditableTable } from './hooks/use-editable-table';
23
+ export type { TableRef } from './hooks/use-editable-table';
24
+ export * from './hooks/use-fetch-data/index.ts';
25
+ export { useColumnConfig, useFormConfig } from './hooks/use-column&form-config';
26
+ export { useDataChangeDetector } from './hooks/use-data-change-detector';
27
+ export { debounce, isNumber, decimalCount, formatDecimalNumber } from './utils';