cnhis-design-vue 3.1.48-beta.12 → 3.1.48-beta.14
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 +87 -87
- package/es/components/bpmn-workflow/src/BpmnWorkflow.d.ts +0 -0
- package/es/components/bpmn-workflow/types/BpmnViewer.d.ts +1 -0
- package/es/components/bpmn-workflow/types/ModelingModule.d.ts +1 -0
- package/es/components/bpmn-workflow/types/MoveCanvasModule.d.ts +1 -0
- package/es/components/card-reader-sdk/src/cardReaderSDK.d.ts +23 -20
- package/es/components/card-reader-sdk/src/cardReaderSDK.js +1 -1
- package/es/components/card-reader-sdk/src/constants/index.d.ts +60 -168
- package/es/components/card-reader-sdk/src/constants/index.js +1 -1
- package/es/components/card-reader-sdk/src/insuranceSDK.d.ts +1 -6
- package/es/components/card-reader-sdk/src/insuranceSDK.js +1 -1
- package/es/components/card-reader-sdk/src/types/index.d.ts +10 -10
- package/es/components/card-reader-sdk/src/utils/index.d.ts +1 -1
- package/es/components/card-reader-sdk/src/utils/index.js +1 -1
- package/es/components/form-render/src/components/renderer/select.js +1 -1
- package/es/components/form-render/src/hooks/useBusinessBinding.d.ts +1 -1
- package/es/components/form-render/src/hooks/useBusinessBinding.js +1 -1
- package/es/components/form-render/src/hooks/useFormRenderOptions.d.ts +2 -0
- package/es/components/form-render/src/hooks/useFormRenderOptions.js +1 -1
- package/es/components/form-render/src/types/index.d.ts +1 -0
- package/es/components/iho-table/src/plugins/rowGroupSettingPlugin/rowGroupUtils.js +1 -1
- package/es/components/index.css +1 -1
- package/es/components/info-header/style/index.css +1 -1
- package/es/components/scale-view/src/ScaleView.vue2.js +1 -1
- package/es/components/select-label/src/LabelFormContent.vue2.js +1 -1
- package/es/components/select-person/src/SearchMultiple.vue.d.ts +0 -6
- package/es/components/table-export-field/src/components/ExportModal.vue.d.ts +3 -0
- package/es/env.d.ts +25 -25
- package/es/shared/assets/img/failure.png.js +1 -1
- package/es/shared/assets/img/no-permission.png.js +1 -1
- package/es/shared/assets/img/nodata.png.js +1 -1
- package/es/shared/assets/img/notfound.png.js +1 -1
- package/es/shared/assets/img/qr.png.js +1 -1
- package/es/shared/assets/img/success.png.js +1 -1
- package/es/shared/assets/img/video.png.js +1 -1
- package/es/shared/assets/img/video_default_cover.png.js +1 -1
- package/es/shared/assets/img/xb_big.png.js +1 -1
- package/es/shared/assets/img/xb_small.png.js +1 -1
- package/es/shared/components/VueDraggable/src/vuedraggable.d.ts +86 -0
- package/es/shared/package.json.js +1 -1
- package/es/shared/utils/fabricjs/index.d.ts +6823 -0
- package/es/shared/utils/tapable/index.d.ts +139 -0
- package/es/shared/utils/tapableLess.d.ts +28 -0
- package/es/shared/utils/tapableLess.js +1 -0
- package/package.json +2 -2
|
@@ -5,5 +5,5 @@ export declare function getTranstime(): string;
|
|
|
5
5
|
export declare function pad2(n: number): string | number;
|
|
6
6
|
export declare function generateTimeRequestNumber(): string;
|
|
7
7
|
export declare function insuranceLog(...messages: any[]): any;
|
|
8
|
-
export declare function getErrorMessageByType(
|
|
8
|
+
export declare function getErrorMessageByType(code?: number): string;
|
|
9
9
|
export declare function getDataMessageByData(_data: string | AnyObject, configMap?: typeof CONFIG_MAP): any;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import{jsonParse as e}from"../../../../shared/utils/index.js";import{isString as t}from"lodash-es";import{TRANS_CMD as n}from"../constants/index.js";function r(){function e(){return(65536*(1+Math.random())|0).toString(16).substring(1)}return e()+e()+"-"+e()+"-"+e()+"-"+e()+"-"+e()+e()+e()}function o(){return d()+parseInt(1e3*Math.random()+"")}function a(e){return e<10?"0"+e:e}function d(){const e=new Date;return e.getFullYear().toString()+a(e.getMonth()+1)+a(e.getDate())+a(e.getHours())+a(e.getMinutes())+a(e.getSeconds())}function i(...e){return console.log("[INSURANCE-SDK]: ",...e),e.reduce(((e,t)=>e+t))}const s={[n.ID_CARD_READ]:"身份证读卡接口服务异常",[n.MEMBER_CARD_READ]:"会员读卡接口服务异常",[n.FAST_REPORT_OR_POS]:"打印或pos接口服务异常"};function u(e){return e&&s[e]||"请检查医保服务是否正常"}function c(r,o){var a;t(r)&&(r=JSON.parse(r));const d=r,{transcmd:i=n.NS_GETPERSONALINFO}=o||{};if(["0","1"].includes(null!=(a=d.returncode)?a:"")){if(i===n.NS_GETPERSONALINFO)return d.returndata.cardinfo&&d.returndata.cardinfo.cardno?d.returndata.cardinfo:Promise.reject("未获取到卡号");if(i===n.ID_CARD_READ){const n=t(d.returndata)?e(d.returndata).cardinfo:d.returndata.cardinfo;return Object.assign(n,{Sex:n.sex,Sex_Code:n.sex_code,Name:n.name,Age:n.age,Age_Code:n.age_code,Age_Name:n.age_name,BirthDate:n.birthdate,Nation_Name:n.nation_name,Nation_Code:n.nation_code,Address:n.address,CardNo:n.cardno,HasPhoto:n.hasphoto}),n}return d}return Promise.reject(d.returnmsg)}export{d as generateTimeRequestNumber,c as getDataMessageByData,u as getErrorMessageByType,r as getSerialNumber,o as getTranstime,i as insuranceLog,a as pad2};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{defineComponent as e,computed as t,inject as o,
|
|
1
|
+
import{defineComponent as e,computed as t,inject as o,useAttrs as a,createVNode as l}from"vue";import{useDebounceFn as r}from"@vueuse/core";import{cloneDeep as u,isArray as n,isString as s}from"lodash-es";import{useCommonInjection as i,useSelectOptionProps as p}from"../../hooks/useCommonInjection.js";import{InjectionChangeContextCollector as m}from"../../constants/index.js";import"../../../../../shared/utils/index.js";import"../../../index.js";import"@formily/core";import"@formily/path";import"@vue/shared";import"date-fns";import{assignUpdateValue as c,assignClearBindVisited as d,createVisitedSetter as v}from"../../utils/schema.js";import{useFormField as y}from"../../hooks/useFormField.js";import{NSelect as f}from"naive-ui";import"../../../../../shared/utils/tapable/SyncHook.js";import"../../../../../shared/utils/tapable/SyncBailHook.js";import"../../../../../shared/utils/tapable/SyncWaterfallHook.js";import"../../../../../shared/utils/tapable/SyncLoopHook.js";import"../../../../../shared/utils/tapable/AsyncParallelHook.js";import"../../../../../shared/utils/tapable/AsyncParallelBailHook.js";import"../../../../../shared/utils/tapable/AsyncSeriesHook.js";import"../../../../../shared/utils/tapable/AsyncSeriesBailHook.js";import"../../../../../shared/utils/tapable/AsyncSeriesLoopHook.js";import"../../../../../shared/utils/tapable/AsyncSeriesWaterfallHook.js";import"../../hooks/useFormValidator.js";import{connect as h,mapProps as j}from"@formily/vue";import"./index.js";import{useUrlConfigOptions as b,useAutographOptions as k,useRecommendOptions as S,searchContentMatcher as g}from"../../hooks/useFormRenderOptions.js";const F=h(e({name:"FormSelect",props:{value:{type:[String,Array,Number]},lazyRequest:{type:Boolean,default:!0},requestCache:{type:Boolean,default:!0},options:{type:Array,default:()=>[]},onChange:{},labelField:{type:String,default:"text"},valueField:{type:String,default:"value"},allowCreate:Boolean,urlConfig:{type:Object},autograph:{type:String},wordbook:{type:Object},recommend:{type:Boolean,default:!1},commonList:{type:Array},recentList:{type:Array},getRecommendInfo:{type:Function},commonNum:{type:Number,default:10},recentNum:{type:Number,default:10},recommendCache:{type:Boolean,default:!1}},emits:["update:value","postRecommend"],setup(e,{slots:c,emit:d}){const h=t({get:()=>e.value,async set(e){d("update:value",e),O(e)}}),{labelKey:j,valueKey:F,fetchData:C,searchContent:A,fullOptions:H,filterOptions:B}=e.urlConfig?b(e,h):k(e,h),{getRecommend:x,postRecommend:O,sortedOptions:R}=S(e,B,d,j,F),{field:V,fieldKey:w}=y();o(m).setContext(w.value,(e=>{return{currentOption:u((t=e,n(t)?function(e){const t=H.value.reduce(((e,t)=>(e[t[F.value]]=t,e)),{});return e.map((e=>t[e]))}(t):(o=t,H.value.find((e=>e[F.value]===o)))))};var t,o}));const L=r((async(e="")=>{A.value=e,C(e),x(e)}),300),{injectValueValidate:N,injectValueWatchFromEmpty:K,injectValueBindKey:P}=i();K(h,L),N(h);const W=P(h),{menuProps:q,nodeProps:I}=p();function U(e){const t=e[j.value];if(!t||!s(t))return"";const o=A.value?g(A.value,t):null;return o?l("section",null,[o.map(((e,t)=>0!==t&&e?l("span",{style:{color:t%2==0?"var(--n-option-text-color-active)":""}},[e]):null))]):t}const z=t((()=>R.value.length||!e.allowCreate?R.value:A.value?[{[j.value]:A.value,[F.value]:A.value},...R.value]:R.value)),D=a(),E=t((()=>{if(e.allowCreate)return h.value;const t=D.multiple&&n(h.value);return z.value.find((e=>t?h.value.includes(e[F.value]):e[F.value]===h.value))?h.value:null}));function G(e){if(e)return L();A.value=""}return()=>l(f,{key:W.value,remote:!0,filterable:!0,value:E.value,onUpdateValue:e=>h.value=e,"menu-props":q,"node-props":I,labelField:j.value,valueField:F.value,options:z.value,onSearch:L,"onUpdate:show":G,onFocus:v(V),renderLabel:U},c)}}),j({dataSource:"options"},c,d));export{F as SELECT};
|
|
@@ -15,7 +15,7 @@ export declare class BusinessCollector {
|
|
|
15
15
|
private getType;
|
|
16
16
|
private getValueByField;
|
|
17
17
|
getValueByType(formModel: Form, type: FIELD_BUSINESS_TYPE): unknown;
|
|
18
|
-
setValueByType(formModel: Form, type: FIELD_BUSINESS_TYPE, value: unknown): void;
|
|
18
|
+
setValueByType(formModel: Form, type: FIELD_BUSINESS_TYPE, value: unknown, from: FIELD_BUSINESS_TYPE): void;
|
|
19
19
|
registerChangeBusiness(type: FIELD_BUSINESS_TYPE, handler: (formModel: Form) => void): this;
|
|
20
20
|
private changeHandlerMap;
|
|
21
21
|
trigger(formModel: Form, fieldName: string, triggerType?: 'change' | 'blur'): Map<FIELD_BUSINESS_TYPE, number> | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{isField as e}from"@formily/core";import{isString as t}from"@vueuse/core";import{format as s}from"date-fns";import{isFunction as i,isNumber as r}from"lodash-es";import{FIELD_BUSINESS_TYPE as n}from"../constants/index.js";import"vue";import"../../../../shared/utils/index.js";import"@formily/path";import"@vue/shared";import"../../index.js";import{isIdCard as a,parseIdCard as l,parseAgeFromContext as o,parseBirthday as u,parseAge2Birthday as h}from"../utils/business.js";class y{constructor(e){this.businessFormatter=e,this.triggerLock=!1,this.typeLockMap=new Map,this.typeCollector=new Map,this.fieldNameCollector=new Map,this.changeHandlerMap=new Map([])}formatter(...e){return i(this.businessFormatter)?this.businessFormatter(...e):e[0].value}collect(e,t){this.typeCollector.set(e,t),this.fieldNameCollector.set(t.val_key,e)}getField(e){return this.typeCollector.get(e)}getFieldInstanceByType(e,t){const s=this.getField(t);return s?e.query(s.val_key).take():null}getType(e){return this.fieldNameCollector.get(e)}getValueByField(t,s){const i=t.query(s).take();return e(i)?i.value:null}getValueByType(e,t){const s=this.getField(t);return s?this.getValueByField(e,s.val_key):null}setValueByType(e,t,s){const
|
|
1
|
+
import{isField as e}from"@formily/core";import{isString as t}from"@vueuse/core";import{format as s}from"date-fns";import{isFunction as i,isNumber as r}from"lodash-es";import{FIELD_BUSINESS_TYPE as n}from"../constants/index.js";import"vue";import"../../../../shared/utils/index.js";import"@formily/path";import"@vue/shared";import"../../index.js";import{isIdCard as a,parseIdCard as l,parseAgeFromContext as o,parseBirthday as u,parseAge2Birthday as h}from"../utils/business.js";class y{constructor(e){this.businessFormatter=e,this.triggerLock=!1,this.typeLockMap=new Map,this.typeCollector=new Map,this.fieldNameCollector=new Map,this.changeHandlerMap=new Map([])}formatter(...e){return i(this.businessFormatter)?this.businessFormatter(...e):e[0].value}collect(e,t){this.typeCollector.set(e,t),this.fieldNameCollector.set(t.val_key,e)}getField(e){return this.typeCollector.get(e)}getFieldInstanceByType(e,t){const s=this.getField(t);return s?e.query(s.val_key).take():null}getType(e){return this.fieldNameCollector.get(e)}getValueByField(t,s){const i=t.query(s).take();return e(i)?i.value:null}getValueByType(e,t){const s=this.getField(t);return s?this.getValueByField(e,s.val_key):null}setValueByType(e,t,s,i){const n=this.getField(t);n&&e.setFieldState(n.val_key,(e=>{if(e.value===s)return;const a=this.typeLockMap.get(t);this.typeLockMap.set(t,r(a)?a+1:1),e.value=this.formatter({value:s,type:t,fieldKey:n.val_key,from:i})}))}registerChangeBusiness(e,t){return this.changeHandlerMap.set(e,t),this}trigger(e,t,s="change"){var i;if(this.triggerLock)return;const r=this.getType(t);if(!r)return;if("change"===s&&this.typeLockMap.get(r)>0)return this.typeLockMap.set(r,this.typeLockMap.get(r)-1);const n="change"===s?this.changeHandlerMap:null;n&&(null==(i=n.get(r))||i.call(this,e))}}function c(){function e(){var e;const t=this.getField(n.BIRTHDAY);return null!=(e=null==t?void 0:t.date_format)?e:"yyyy-MM-dd HH:mm"}function i(i){const r=this.getValueByType(i,n.ID_CARD);if(!r||!t(r)||!a(r))return;const u=l(r),{age:h,ageUnit:y}=o(u);this.setValueByType(i,n.AGE_UNIT,y,n.ID_CARD),this.setValueByType(i,n.AGE,h,n.ID_CARD),this.setValueByType(i,n.SEX,u.sex,n.ID_CARD),this.setValueByType(i,n.BIRTHDAY,s(new Date(u.birthday),e.call(this)),n.ID_CARD)}function c(e){const s=this.getValueByType(e,n.BIRTHDAY);if(!t(s))return;const{age:i,ageUnit:r}=o(u(s));this.setValueByType(e,n.AGE_UNIT,r,n.BIRTHDAY),this.setValueByType(e,n.AGE,i,n.BIRTHDAY)}function p(s){return function(i){const a=this.getValueByType(i,n.AGE),l=this.getValueByType(i,n.AGE_UNIT);(t(a)||r(a))&&""!==a&&t(l)&&""!==l&&this.setValueByType(i,n.BIRTHDAY,h(+a,l,e.call(this)),s)}}return{create:function(e){return new y(e).registerChangeBusiness(n.ID_CARD,i).registerChangeBusiness(n.AGE_UNIT,p(n.AGE_UNIT)).registerChangeBusiness(n.AGE,p(n.AGE)).registerChangeBusiness(n.BIRTHDAY,c)}}}export{y as BusinessCollector,c as useBusinessBinding};
|
|
@@ -29,6 +29,7 @@ export declare function useUrlConfigOptions(props: {
|
|
|
29
29
|
filterOptions: import("vue").ComputedRef<AnyObject[]>;
|
|
30
30
|
fullOptions: import("vue").ComputedRef<AnyObject[]>;
|
|
31
31
|
fetchData: (content?: string) => Promise<null | undefined>;
|
|
32
|
+
searchContent: Ref<string | undefined>;
|
|
32
33
|
};
|
|
33
34
|
export declare function useAutographOptions(props: Partial<{
|
|
34
35
|
labelField: string;
|
|
@@ -44,4 +45,5 @@ export declare function useAutographOptions(props: Partial<{
|
|
|
44
45
|
filterOptions: import("vue").ComputedRef<AnyObject[]>;
|
|
45
46
|
fullOptions: import("vue").ComputedRef<AnyObject[]>;
|
|
46
47
|
fetchData: (content?: string) => Promise<null | undefined>;
|
|
48
|
+
searchContent: Ref<string | undefined>;
|
|
47
49
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{checkInSetupEnv as e,jsonParse as n,keywordMatcher as t}from"../../../../shared/utils/index.js";import{useForm as l}from"@formily/vue";import{useMemoize as u,useDebounceFn as o}from"@vueuse/core";import{identity as r,uniqBy as a,isString as i,isEqual as c,isArray as s,omit as v,isFunction as m}from"lodash-es";import{computed as f,inject as d,ref as y,toRaw as p,watch as h}from"vue";import"../../index.js";import{InjectionAsyncQueue as g,InjectionFormLifeCycleCaller as w,InjectionFormItemDepsCollector as k}from"../constants/index.js";import{useFormField as b}from"./useFormField.js";import{createUrlConfigParams as
|
|
1
|
+
import{checkInSetupEnv as e,jsonParse as n,keywordMatcher as t}from"../../../../shared/utils/index.js";import{useForm as l}from"@formily/vue";import{useMemoize as u,useDebounceFn as o}from"@vueuse/core";import{identity as r,uniqBy as a,isString as i,isEqual as c,isArray as s,omit as v,isFunction as m}from"lodash-es";import{computed as f,inject as d,ref as y,toRaw as p,watch as h}from"vue";import"../../index.js";import{InjectionAsyncQueue as g,InjectionFormLifeCycleCaller as w,InjectionFormItemDepsCollector as k}from"../constants/index.js";import{useFormField as b}from"./useFormField.js";import{createUrlConfigParams as C,formRenderLog as R}from"../utils/index.js";import{useFormRequest as F}from"./useFormRequest.js";function K(e,n){const t=y();return f({get:()=>t.value?t.value:e[n],set(e){t.value=e}})}const q=(()=>{const e=u((e=>new RegExp(`(.*)${e.split("").map((e=>`(${function(e){return e.match(/[()\[\]{}$^\/]/)?"\\"+e:e}(e)})`)).join("(.*)")}(.*)`)),{getKey:r});return(n,t)=>t.match(e(n))})();function O(){const e=y();return{searchContent:e,optionSearchFilter:function(n,l,u){if(!e.value)return n;const o=s(u)?u.filter((e=>e&&i(e))):[];return n.filter((n=>function(n,l,u){if(!e.value)return!0;const o=n?n[l]:"";return!!i(o)&&(!!q(e.value,o)||!!t(e.value,n.keyword)||!!u.length&&u.some((t=>i(n[t])&&n[t].includes(e.value))))}(n,l,o)))}}}function j(e,t,l,u,o){const r=K(e,"commonList"),i=K(e,"recentList"),{searchContent:c,optionSearchFilter:s}=O();function y(e){return n(e.itemObj)}const p=f((()=>{var e,n;return null!=(n=null==(e=r.value)?void 0:e.map(y))?n:[]})),h=f((()=>{var e,n;return null!=(n=null==(e=i.value)?void 0:e.map(y))?n:[]})),w=f((()=>{if(!e.recommend||!p.value.length&&!h.value.length)return t.value;const n=a(p.value.concat(h.value),(e=>e[o.value])),l=t.value.filter((e=>n.every((function(n){return n[o.value]!==e[o.value]}))));return[...s(n,u.value),...l]})),{getRecommendRequestInfo:k,getHttpInstance:C}=F();function R(n){const{url:t,getRecommendIds:l}=k(),u=m(l)?l():{},o=m(e.getRecommendInfo)?e.getRecommendInfo():{};return{url:t[n],info:Object.assign({},u,o)}}const{fieldKey:q}=b(),j=d(g);return{postRecommend:async function(n){if(!e.recommend)return;const t=C();if(!t)return;const{url:u,info:r}=R("post"),a=w.value.find((e=>e[o.value]===n));a&&l("postRecommend",await t.post(u,{...r,keyword:"",itemId:o.value,itemObj:JSON.stringify(a)}))},getRecommend:async function(n){if(!e.recommend)return;if(c.value=n,r.value&&i.value&&e.recommendCache)return;const t=await j.addAsync(function(n,t){const{url:l,info:u}=R("get");return{url:l,method:"get",key:n,cache:t,params:{...u,recNum:Math.max(e.commonNum,e.recentNum),keyword:""}}}(q.value,e.recommendCache)),{commonly:l,recently:u}=t.reduce(((e,n)=>("commonly"===n.type?e.commonly.push(v(n,["type"])):"recently"===n.type&&e.recently.push(v(n,["type"])),e)),{commonly:[],recently:[]});r.value=l.slice(0,e.commonNum),i.value=u.slice(0,e.recentNum)},sortedOptions:w}}function I(n,t){e();const l=d(g),u=d(w),r=f((()=>{var e,t,l;return null!=(l=null!=(t=null==(e=n.urlConfig)?void 0:e.nameKey)?t:n.labelField)?l:"text"})),a=f((()=>{var e,t,l;return null!=(l=null!=(t=null==(e=n.urlConfig)?void 0:e.valueKey)?t:n.valueField)?l:"value"})),{searchContent:s,optionSearchFilter:v}=O(),m=y(null),{field:F,fieldKey:K}=b(),q=o((async function(e){if(s.value=e||"",!n.urlConfig)return m.value=null;try{const e=await l.addAsync(await C({config:n.urlConfig,cache:n.requestCache,field:F.value}));p(m.value)!==e&&(m.value=e,u("afterOptionInit",[K.value,m.value]))}catch(e){i(e)&&R(e)}}),300),j=f((()=>m.value?v(m.value,r.value):Array.isArray(n.options)?v(n.options,r.value):[])),I=f((()=>m.value||n.options||[])),x=d(k);return h((()=>n.urlConfig),((e,l)=>{if(!c(e,l)){if(m.value=null,!e)return m.value=null;x.setDeps(K.value,e.dependKey||[],(async()=>{m.value=null,t.value=null,!n.lazyRequest&&await q()})),(t.value||!n.lazyRequest)&&q()}}),{immediate:!0}),{labelKey:r,valueKey:a,filterOptions:j,fullOptions:I,fetchData:q,searchContent:s}}function x(n,t){e();const u=d(g),r=d(w),a=l(),v=f((()=>{var e,t,l,u;const o=null==(t=null==(e=n.wordbook)?void 0:e.render_key)?void 0:t[0];if(i(o))return o;let r=null==(l=n.wordbook)?void 0:l.show_key;return s(r)&&(r=r[0]),i(r)?r:null!=(u=n.labelField)?u:"text"})),m=f((()=>{var e,t,l;return null!=(l=null!=(t=null==(e=n.wordbook)?void 0:e.value_key)?t:n.valueField)?l:"value"})),C=f((()=>{var e;return(null==(e=n.wordbook)?void 0:e.search_key)||[]})),{searchContent:K,optionSearchFilter:q}=O(),j=y(null),{fieldKey:I}=b(),{getSearchRequestInfo:x}=F(),A=o((async function(e){if(K.value=e||"",!n.autograph||!n.wordbook)return j.value=null;try{const e=await u.addAsync(function(e,t,l){var u,o,r;const i={autograph:t,wordbookId:e.id,wordbookType:e.type,fieldKeys:e.search_key,keyword:"",page:1};if(null==(u=e.queryParams)?void 0:u.length){const n=null!=(r=null==(o=a.value)?void 0:o.getFormState().values)?r:{};e.queryParams.forEach((e=>{i[e]=n[e]}))}return console.log(i),{...x(),params:i,key:l,cache:n.requestCache}}(n.wordbook,n.autograph,I.value));p(j.value)!==e&&(j.value=e,r("afterOptionInit",[I.value,j.value]))}catch(e){i(e)&&R(e)}}),300),S=f((()=>j.value?q(j.value,v.value,C.value):Array.isArray(n.options)?q(n.options,v.value):[])),N=f((()=>j.value||n.options||[])),_=d(k);return h((()=>n.wordbook),((e,l)=>{if(!c(e,l)){if(j.value=null,!e)return j.value=null;_.setDeps(I.value,e.queryParams||[],(async()=>{j.value=null,A()})),(t.value||!n.lazyRequest)&&A()}}),{immediate:!0}),{labelKey:v,valueKey:m,filterOptions:S,fullOptions:N,fetchData:A,searchContent:K}}export{q as searchContentMatcher,x as useAutographOptions,j as useRecommendOptions,I as useUrlConfigOptions};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{isObject as e}from"@vue/shared";import{isArray as n,isString as t}from"lodash-es";import{IhoTableRowGroupSequence as r}from"../../constants/index.js";function i(t,i,o=(e=>e.field)){const s=i.map((e=>o(e)));return r.some((r=>{const i=t[r];if(!n(i))return!0;i.forEach((t=>{if(!n(t.list)||!t.list.length)return;const r=[];let i=null;t.list.forEach(((n,
|
|
1
|
+
import{isObject as e}from"@vue/shared";import{isArray as n,isString as t}from"lodash-es";import{IhoTableRowGroupSequence as r}from"../../constants/index.js";function i(t,i,o=(e=>e.field)){const s=i.map((e=>o(e)));return r.some((r=>{const i=t[r];if(!n(i))return!0;i.forEach((t=>{if(!n(t.list)||!t.list.length)return;const r=[];let i=null,o=0;t.list.forEach(((n,c)=>{const l=function(n,t,r){return t.findIndex((t=>t!==r&&(e(t)?t.fieldName:t)===n))}(n,s,i);~l?(r.push(s[l]),c===o?s.splice(l,1,i={fieldName:t.title,children:r}):s.splice(l,1)):c===o&&o++}))}))})),s}function o(n,r){return n.reduce(((n,i)=>{if(t(i)){const e=r(i);e&&n.push(e)}if(e(i)&&i.children){const e=r(i.fieldName,!0);e&&(e.children=o(i.children,r),n.push(e))}return n}),[])}export{i as createRowGroupList,o as groupTraverser};
|