cnhis-design-vue 3.2.5-beta.2 → 3.2.5-beta.21
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/es/components/biunique-chat/src/components/ChatFooter.vue2.js +1 -1
- package/es/components/button-print/index.d.ts +22 -2
- package/es/components/button-print/src/ButtonPrint.vue.d.ts +22 -2
- package/es/components/button-print/src/ButtonPrint.vue2.js +1 -1
- package/es/components/button-print/src/components/NewPrintComponent.vue.d.ts +4 -1
- package/es/components/button-print/src/components/NewPrintComponent.vue2.js +1 -1
- package/es/components/button-print/src/components/OldPrintComponent.vue.d.ts +1 -1
- package/es/components/callback/src/components/render/popupMaps.d.ts +1535 -1
- package/es/components/card-reader-sdk/src/cardReaderSDK.js +1 -1
- package/es/components/card-reader-sdk/src/types/index.d.ts +1 -0
- package/es/components/classification/src/components/table-modal/index.vue.d.ts +3 -0
- package/es/components/classification/src/index.vue.d.ts +3 -0
- package/es/components/date-picker/src/DatePicker.vue2.js +1 -1
- package/es/components/default-page/src/index.vue2.js +1 -1
- package/es/components/default-page/style/index.css +1 -1
- package/es/components/fabric-chart/src/hooks/temperature/useTemperatureChart.js +1 -1
- package/es/components/field-set/src/FieldColor.vue.d.ts +3 -3
- package/es/components/field-set/src/FieldFilter.vue.d.ts +3 -3
- package/es/components/field-set/src/FieldSet.vue.d.ts +4 -4
- package/es/components/field-set/src/components/Row.vue.d.ts +3 -3
- package/es/components/form-config/index.d.ts +5 -0
- package/es/components/form-config/src/FormConfig.vue.d.ts +5 -0
- package/es/components/form-config/src/components/FormConfigEdit.vue.d.ts +5 -0
- package/es/components/form-config/src/hooks/useConfigurationField.js +1 -1
- package/es/components/form-config/src/types/index.d.ts +5 -0
- package/es/components/form-render/src/components/renderer/levelSearchCascader/index.js +1 -1
- package/es/components/form-render/src/components/renderer/select.js +1 -1
- package/es/components/form-render/src/components/renderer/switch.d.ts +1 -1
- package/es/components/form-render/src/components/renderer/switch.js +1 -1
- package/es/components/form-render/src/hooks/useFormContext.js +1 -1
- package/es/components/form-render/src/hooks/useFormRenderOptions.js +1 -1
- package/es/components/form-render/src/types/fieldItem.d.ts +1 -0
- package/es/components/iho-table/index.d.ts +1535 -1
- package/es/components/iho-table/src/IhoTable.vue.d.ts +1536 -2
- package/es/components/iho-table/src/IhoTable.vue2.js +1 -1
- package/es/components/iho-table/src/constants/index.d.ts +3 -1
- package/es/components/iho-table/src/constants/index.js +1 -1
- package/es/components/iho-table/src/hooks/tapHooks/index.d.ts +5 -2
- package/es/components/iho-table/src/hooks/tapHooks/index.js +1 -1
- package/es/components/iho-table/src/plugins/defaultConfigPlugin.js +1 -1
- package/es/components/iho-table/src/plugins/headerPlugin.js +1 -1
- package/es/components/iho-table/src/plugins/highLightSetPlugin.js +1 -1
- package/es/components/iho-table/src/plugins/index.js +1 -1
- package/es/components/iho-table/src/plugins/pagerScrollPlugin/index.js +1 -1
- package/es/components/iho-table/src/plugins/pagerScrollPlugin/utils.d.ts +0 -1
- package/es/components/iho-table/src/plugins/pagerScrollPlugin/utils.js +1 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/levelSearchCascadePlugin/levelSearchCascade.vue2.js +1 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/selectRendererPlugin/editSelect.js +1 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/widgets/checkRendererPlugin.js +1 -1
- package/es/components/iho-table/src/plugins/rowGroupSettingPlugin/index.js +1 -1
- package/es/components/iho-table/src/plugins/rowGroupSettingPlugin/rowGroupUtils.d.ts +1 -1
- package/es/components/iho-table/src/plugins/rowGroupSettingPlugin/rowGroupUtils.js +1 -1
- package/es/components/iho-table/src/plugins/stickyFixedPlugin.d.ts +1 -0
- package/es/components/iho-table/src/plugins/stickyFixedPlugin.js +1 -0
- package/es/components/iho-table/src/types/index.d.ts +10 -6
- package/es/components/iho-table/src/types/pluginType.d.ts +3 -1
- package/es/components/iho-table/src/utils/index.d.ts +5 -3
- package/es/components/iho-table/src/utils/index.js +1 -1
- package/es/components/iho-table/style/index.css +1 -1
- package/es/components/index.css +1 -1
- package/es/components/info-header/src/InfoHeader.vue2.js +1 -1
- package/es/components/select-person/src/SearchOrgAndStaff.vue2.js +1 -1
- package/es/components/shortcut-provider/src/ShortcutProvider.vue2.js +1 -1
- package/es/components/shortcut-setter/index.d.ts +1 -0
- package/es/components/shortcut-setter/src/ShortcutSetter.vue.d.ts +1 -0
- package/es/components/shortcut-setter/src/ShortcutSetter.vue2.js +1 -1
- package/es/components/step-notice/src/StepNotice.vue2.js +1 -1
- package/es/components/table-filter/src/hooks/useAdvanced.js +1 -1
- package/es/components/table-filter/src/types/enums.d.ts +4 -0
- package/es/components/table-filter/src/types/enums.js +1 -1
- package/es/components/table-filter/src/types/index.d.ts +1 -0
- package/es/components/time-picker/src/TimePicker.vue2.js +1 -1
- package/es/env.d.ts +25 -25
- package/es/shared/hooks/selectHooks/useOptionFiltered.js +1 -1
- package/es/shared/hooks/selectHooks/useSelectRenders.js +1 -1
- package/es/shared/hooks/useFormRequest/index.js +1 -1
- package/es/shared/hooks/useLevelSearchCascader.js +1 -1
- package/es/shared/hooks/useTheme.js +1 -1
- package/es/shared/package.json.js +1 -1
- package/es/shared/utils/index.js +1 -1
- package/package.json +2 -2
- package/es/components/iho-table/src/plugins/pagerScrollPlugin/pagerScroll.vue.d.ts +0 -26
- package/es/components/iho-table/src/plugins/pagerScrollPlugin/pagerScroll.vue.js +0 -1
- package/es/components/iho-table/src/plugins/pagerScrollPlugin/pagerScroll.vue2.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{isFunction as a}from"lodash-es";import{ensureUID2IdCard as t}from"./utils/ensureUID2IdCard.js";import{TRANS_CMD as e,defaultInsuranceParams as s}from"./constants/index.js";import r from"./insuranceSDK.js";import{ReadHealthCard as n}from"./utils/readHealthCard.js";let i=null;const c=class{constructor(a){if(this.options=a,this.loading=!1,this.readHealthCardDialog=new n,i)return i;i=this,this.insurance=new r}get basicParamsRes(){return a(this.options.basicParams)?this.options.basicParams():this.options.basicParams}static create(a={}){return new c(a)}static destroy(){null==i||i.destroy(),i=null}destroy(){this.insurance.destroy()}createParams(a,t){return{transcmd:a,...this.basicParamsRes,...t}}checkLoading(){if(this.loading)return Promise.reject("请勿重复操作")}async checkResCodeAndLoading(a){try{this.loading=!0;const t=await a;return 3===t.returncode||"3"===t.returncode?Promise.reject(`${t.returnmsg||"操作失败"}`):t.returndata}finally{this.loading=!1}}async readHealthCard(a,t){return await this.checkLoading(),this.readHealthCardDialog.show({instance:a,...t})}async readIdCard(a={},s){await this.checkLoading();const r=this.createParams(e.ID_CARD_READ,{transtype:"IDCARD",interfaceid:"0",...a,transdata:{readtype:"2",...a.transdata}}),n=await this.checkResCodeAndLoading(this.insurance.getInsuranceInfoPromise(r));return(null==n?void 0:n.cardinfo)&&s&&await t(n.cardinfo,s),n}async readMemberCard(a={}){await this.checkLoading();const t=this.createParams(e.MEMBER_CARD_READ,{transsystem:"10",transtype:"IDCARD",interfaceid:"0",...a,transdata:{readtype:"1",...a.transdata}});return this.checkResCodeAndLoading(this.insurance.getInsuranceInfoPromise(t))}async writeMemberCard(a={}){await this.checkLoading();const t=this.createParams(e.MEMBER_CARD_WRITE,{transsystem:"10",transtype:"IDCARD",interfaceid:"0",...a,transdata:{readtype:"1",...a.transdata}});return this.checkResCodeAndLoading(this.insurance.getInsuranceInfoPromise(t))}async readInsuranceCard(a={}){var t,r;await this.checkLoading();const n=this.createParams(e.NS_GETPERSONALINFO,{transchannel:"101",interfaceid:a.interfaceid,transtype:"YB0000",...a,transdata:{...a.transdata,iar1:{...s.iar1,...null==(t=a.transdata)?void 0:t.iar1},personinfo:{...s.personinfo,...null==(r=a.transdata)?void 0:r.personinfo}}});return this.checkResCodeAndLoading(this.insurance.getInsuranceInfoPromise(n))}async getCardType(){await this.checkLoading();const a=this.createParams(e.CARD_TYPE_READ,{transsystem:"10",transtype:"IDCARD",interfaceid:"0"});return this.checkResCodeAndLoading(this.insurance.getInsuranceInfoPromise(a))}async generalRequest(a={}){await this.checkLoading();const t=this.createParams(e.NS_GETPERSONALINFO,a);return this.checkResCodeAndLoading(this.insurance.getInsuranceInfoPromise(t))}};let o=c;o.version=1,o.TRANS_CMD=e;export{o as default};
|
|
1
|
+
import{isFunction as a}from"lodash-es";import{ensureUID2IdCard as t}from"./utils/ensureUID2IdCard.js";import{TRANS_CMD as e,defaultInsuranceParams as s}from"./constants/index.js";import r from"./insuranceSDK.js";import{ReadHealthCard as n}from"./utils/readHealthCard.js";let i=null;const c=class{constructor(a){if(this.options=a,this.loading=!1,this.readHealthCardDialog=new n,i)return i;i=this,this.insurance=new r({selfWindow:a.selfWindow})}get basicParamsRes(){return a(this.options.basicParams)?this.options.basicParams():this.options.basicParams}static create(a={}){return new c(a)}static destroy(){null==i||i.destroy(),i=null}destroy(){this.insurance.destroy()}createParams(a,t){return{transcmd:a,...this.basicParamsRes,...t}}checkLoading(){if(this.loading)return Promise.reject("请勿重复操作")}async checkResCodeAndLoading(a){try{this.loading=!0;const t=await a;return 3===t.returncode||"3"===t.returncode?Promise.reject(`${t.returnmsg||"操作失败"}`):t.returndata}finally{this.loading=!1}}async readHealthCard(a,t){return await this.checkLoading(),this.readHealthCardDialog.show({instance:a,...t})}async readIdCard(a={},s){await this.checkLoading();const r=this.createParams(e.ID_CARD_READ,{transtype:"IDCARD",interfaceid:"0",...a,transdata:{readtype:"2",...a.transdata}}),n=await this.checkResCodeAndLoading(this.insurance.getInsuranceInfoPromise(r));return(null==n?void 0:n.cardinfo)&&s&&await t(n.cardinfo,s),n}async readMemberCard(a={}){await this.checkLoading();const t=this.createParams(e.MEMBER_CARD_READ,{transsystem:"10",transtype:"IDCARD",interfaceid:"0",...a,transdata:{readtype:"1",...a.transdata}});return this.checkResCodeAndLoading(this.insurance.getInsuranceInfoPromise(t))}async writeMemberCard(a={}){await this.checkLoading();const t=this.createParams(e.MEMBER_CARD_WRITE,{transsystem:"10",transtype:"IDCARD",interfaceid:"0",...a,transdata:{readtype:"1",...a.transdata}});return this.checkResCodeAndLoading(this.insurance.getInsuranceInfoPromise(t))}async readInsuranceCard(a={}){var t,r;await this.checkLoading();const n=this.createParams(e.NS_GETPERSONALINFO,{transchannel:"101",interfaceid:a.interfaceid,transtype:"YB0000",...a,transdata:{...a.transdata,iar1:{...s.iar1,...null==(t=a.transdata)?void 0:t.iar1},personinfo:{...s.personinfo,...null==(r=a.transdata)?void 0:r.personinfo}}});return this.checkResCodeAndLoading(this.insurance.getInsuranceInfoPromise(n))}async getCardType(){await this.checkLoading();const a=this.createParams(e.CARD_TYPE_READ,{transsystem:"10",transtype:"IDCARD",interfaceid:"0"});return this.checkResCodeAndLoading(this.insurance.getInsuranceInfoPromise(a))}async generalRequest(a={}){await this.checkLoading();const t=this.createParams(e.NS_GETPERSONALINFO,a);return this.checkResCodeAndLoading(this.insurance.getInsuranceInfoPromise(t))}};let o=c;o.version=1,o.TRANS_CMD=e;export{o as default};
|
|
@@ -699,6 +699,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
699
699
|
handleInitConditions: () => Promise<void>;
|
|
700
700
|
validate: () => Promise<unknown>;
|
|
701
701
|
saveAdd: () => void;
|
|
702
|
+
/**
|
|
703
|
+
* 改变展示方式
|
|
704
|
+
*/
|
|
702
705
|
cancelSaveAdd: () => void;
|
|
703
706
|
checkActionList: () => boolean;
|
|
704
707
|
NSpin: any;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{defineComponent as e,useAttrs as t,ref as a,computed as l,watch as n,openBlock as o,createBlock as u,unref as r,isRef as i,createSlots as s,renderList as d,withCtx as c,renderSlot as f,nextTick as m}from"vue";import{NDatePicker as p}from"naive-ui";import"../../../shared/utils/index.js";import{
|
|
1
|
+
import{defineComponent as e,useAttrs as t,ref as a,computed as l,watch as n,openBlock as o,createBlock as u,unref as r,isRef as i,createSlots as s,renderList as d,withCtx as c,renderSlot as f,nextTick as m}from"vue";import{NDatePicker as p}from"naive-ui";import"../../../shared/utils/index.js";import{useDateTime as v,handleInputEvent as y}from"../../../shared/hooks/useDateTime.js";import{isArray as h,isEqual as g,isString as w}from"lodash-es";import"@vue/shared";import"@vueuse/shared";import"../../../shared/hooks/selectHooks/useSearchContent.js";import"@vicons/ionicons5";import{format as V,sub as k,startOfDay as R,endOfDay as D}from"date-fns";var I=e({__name:"DatePicker",props:{updateUnchangedValue:{type:Boolean},onConfirm:{type:Function},formattedValue:{type:[String,Array]},placeholder:{type:String},allowedInvalidValue:{type:String}},emits:["update:formatted-value"],setup(e,{expose:I,emit:S}){const C=e,M=t(),_=a(null),$=a(null),P=a();let U="";const b=l({get:()=>z(C.formattedValue)?null:C.formattedValue,set(e){h(e)&&h(U)&&g(U,e)||U===e||(S("update:formatted-value",e,w(e)?Date.parse(e):h(e)?[Date.parse(e[0]),Date.parse(e[1])]:null),U=e)}}),j=l((()=>{const e=Reflect.get(M,"type")||"";return["datetime","datetimerange"].includes(e)})),x=l((()=>{if(Reflect.get(M,"format"))return M.format;const e=M.type||"";return j.value?"yyyy-MM-dd HH:mm:ss":"month"===e?"yyyy-MM":"year"===e?"yyyy":"yyyy-MM-dd"})),H=l((()=>j.value?x.value.split(" "):"")),{focus:q,blur:A,handleConfirm:B}=v(_,{formatRef:x,attrs:M,emit:S,allowedInvalidValue:C.allowedInvalidValue});async function F(e){e&&j.value&&(await m(),async function e(t=0){var a;t>2||($.value=null==(a=_.value)?void 0:a.panelInstRef,$.value?v($,{formatRef:H,attrs:M,isPanel:!0}):(await m(),e(++t)))}())}async function T(...e){var t,a,l,n,o,u;const r=Reflect.get(M,"type")||"",i=null==(n=null==(l=null==(a=null==(t=_.value)?void 0:t.inputInstRef)?void 0:a.$el)?void 0:l.querySelector)?void 0:n.call(l,"input");if(r.includes("range")?null==(o=C.onConfirm)||o.call(C,...e):(await m(),i.focus(),B(i),i.blur(),null==(u=C.onConfirm)||u.call(C,Date.parse(i.value),i.value)),!(null==i?void 0:i.value)||!C.updateUnchangedValue||r.includes("range"))return;const s=i.value;y(i,V(new Date,x.value)),y(i,s)}function z(e){return C.allowedInvalidValue&&C.allowedInvalidValue===e}return n((()=>C.formattedValue),(e=>{P.value=z(e)?e:C.placeholder?C.placeholder:"选择日期时间",z(e)||(U=e)}),{immediate:!0}),I({$datePicker:_,focus:q,blur:A,setShortcutValue:async function(e){const t=Reflect.get(M,"type")||"";if(!t||!t.includes("range")||!_.value)return;const a=_.value.$el.querySelectorAll(".n-input__input-el");let l,n;const o=new Date;if("week"===e){const e=k(o,{weeks:1});l=V(R(e),x.value)}else{const e=k(o,{months:1});l=V(R(e),x.value)}n=V(D(o),x.value),y(a[0],l),await m(),y(a[1],n)}}),(e,t)=>(o(),u(r(p),{ref_key:"datePickerRef",ref:_,"onUpdate:show":F,onConfirm:T,placeholder:P.value,"formatted-value":r(b),"onUpdate:formatted-value":t[0]||(t[0]=e=>i(b)?b.value=e:null)},s({_:2},[d(e.$slots,((t,a)=>({name:a,fn:c((()=>[f(e.$slots,a)]))})))]),1032,["placeholder","formatted-value"]))}});export{I as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{defineComponent as t,computed as e,openBlock as s,createElementBlock as l,createCommentVNode as c,renderSlot as i,unref as n,Fragment as a,createElementVNode as o,toDisplayString as
|
|
1
|
+
import{defineComponent as t,computed as e,openBlock as s,createElementBlock as l,createCommentVNode as c,renderSlot as i,unref as n,Fragment as a,createElementVNode as o,createTextVNode as r,toDisplayString as p}from"vue";import{descriptionConfig as g}from"./constants/index.js";const f={class:"default-page-getter-block"},d={key:0,class:"wrapper"},u=["src","alt"],m=["src","alt"],y={class:"page-description"},v={class:"title"},k={class:"content"};var b=t({__name:"index",props:{type:{type:String,default:"1"},config:{type:Object,default:()=>({title:"",content:""})}},setup(t){const b=t,j=e((()=>{let t=g[b.type];return b.config&&Object.keys(b.config).length>0&&Object.keys(b.config).forEach((e=>{const s=b.config[e];s&&(t[e]=s)})),t}));return(e,g)=>(s(),l("div",f,[c(" 默认插槽,自定义缺省页 "),i(e.$slots,"default",{},(()=>[t.type?(s(),l("div",d,[c(" 针对小空间和表格的情况 "),"16"==t.type?(s(),l("img",{key:0,class:"img-table",src:n(j).img,alt:n(j).title},null,8,u)):(s(),l(a,{key:1},[c(" 普通缺省情况 "),o("img",{class:"img-default",src:n(j).img,alt:n(j).title},null,8,m)],2112)),o("div",y,[o("div",v,[c(" 标题插槽 "),i(e.$slots,"title",{},(()=>[r(p(n(j).title),1)]))]),o("div",k,[c(" 内容描述插槽 "),i(e.$slots,"content",{},(()=>[r(p(n(j).content),1)]))])])])):c("v-if",!0)]))]))}});export{b as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.default-page-getter-block,.default-page-getter-block .wrapper{align-items:center;display:flex;flex-direction:column;justify-content:center}.default-page-getter-block .wrapper .img-table{display:block;height:
|
|
1
|
+
.default-page-getter-block{box-sizing:border-box;max-height:100%;max-width:100%}.default-page-getter-block,.default-page-getter-block .wrapper{align-items:center;display:flex;flex-direction:column;height:100%;justify-content:center;width:100%}.default-page-getter-block .wrapper .img-table{display:block;max-height:60%;max-width:80%}.default-page-getter-block .wrapper .img-default{display:block;max-height:50%;max-width:80%}.default-page-getter-block .wrapper .page-description{align-items:center;display:flex;flex-direction:column;max-width:80%}.default-page-getter-block .wrapper .page-description .title{color:rgba(0,0,0,.8);font-size:16px;margin-top:8px}.default-page-getter-block .wrapper .page-description .content{color:#c2c2c2;font-size:14px;margin-top:4px;text-align:center}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{ref as e,computed as a,reactive as t,watch as l}from"vue";import{defaultBorderStyle as u}from"../useDraw.js";import"../../../../../shared/utils/fabricjs/index.js";import{useCumputedPoint as i}from"../useCumputedPoint.js";import{useCanvasEvent as
|
|
1
|
+
import{ref as e,computed as a,reactive as t,watch as l}from"vue";import{defaultBorderStyle as u}from"../useDraw.js";import"../../../../../shared/utils/fabricjs/index.js";import{useCumputedPoint as i}from"../useCumputedPoint.js";import{useCanvasEvent as n}from"../useEvent.js";import{setOtherType as r,getFloorNumber as o}from"../../utils/index.js";import{flatten as v}from"lodash-es";import{format as s,addDays as d}from"date-fns";import"naive-ui";import"@vueuse/core";import{useTop as c}from"./useTop.js";import{useLeft as p}from"./useLeft.js";import{useRight as h}from"./useRight.js";import{useCenter as g}from"./useCenter.js";import{useBottom as m}from"./useBottom.js";import{useOther as f}from"./useOther.js";function y(y,S,b,w,Y,C){const x=15,D=e(),j=e(),V=e(),H=a((()=>{const{painSurplusCell:e=[0,0]}=S.data.grid||{};return~ee.value?e:[0,0]})),X=a((()=>{var e,a;const t=(null==(a=null==(e=S.data.grid)?void 0:e.surplusCell)?void 0:a.slice())||[0,0,0,0];return 0===ee.value?t[0]=t[0]+H.value[0]:ee.value>0&&(t[2]=t[2]+H.value[1]),t})),L=a((()=>{const{top:e}=S.data;return e.date.show&&(e.date.height||x)||0})),I=a((()=>{var e;const{top:a}=S.data;return(null==(e=a.hospitalDays)?void 0:e.show)&&(a.hospitalDays.height||x)||0})),M=a((()=>{var e;const{top:a}=S.data;return(null==(e=a.operationDays)?void 0:e.show)&&(a.operationDays.height||x)||0})),P=a((()=>{var e,a,t;const{top:l}=S.data;return((null==(e=l.xScalevalue)?void 0:e.show)&&(l.xScalevalue.height||x)||0)+((null==(a=l.xScalevalue)?void 0:a.show)&&null!=(t=l.dayHeight)?t:0)})),N=a((()=>{var e;const{bottom:a}=S.data;return(null==(e=null==a?void 0:a.breathing)?void 0:e.show)&&(a.breathing.height||30)||0})),O=a((()=>{const{grid:e}=S.data;return e.mainXCell*e.subXCell+X.value[1]+X.value[3]})),W=a((()=>{const{grid:e}=S.data,a=ee.value>0?H.value[0]:0;return e.mainYCell*e.subYCell+X.value[0]+X.value[2]+a})),$=a((()=>{var e;const{width:a,right:t=null,top:l}=S.data;if(!t)return a;return a-(null!=(e=t.width)?e:0)})),k=a((()=>$.value-X.value[1]*A.value)),G=a((()=>{const{top:e,left:a}=S.data;return e.titleWidth+E.value})),R=a((()=>{const{bottom:e=null,height:a}=S.data;if(!e)return a;return a-(e.height||30)})),q=a((()=>R.value-X.value[2]*B.value)),z=a((()=>{var e;const{top:a}=S.data,t=a.xScalevalue.show&&(null!=(e=a.dayHeight)?e:0)||0,l=a.xScalevalue.show&&(a.xScalevalue.height||x)||0;return L.value+t+l+I.value+M.value})),T=a((()=>z.value+X.value[0]*B.value)),A=a((()=>($.value-G.value)/O.value)),B=a((()=>(R.value-z.value)/W.value)),E=a((()=>{var e,a;const{left:t}=S.data;return(null==(e=t.icons)?void 0:e.show)&&((null==(a=t.icons)?void 0:a.width)||100)||0})),F=a((()=>{var e,a;const{top:t,grid:l}=S.data,u=(null==(a=null==(e=t.date.list)?void 0:e.slice)?void 0:a.call(e,0,l.mainXCell))||[],i=t.xScalevalue.times;let n=G.value-A.value;const r=t.date.startDate||s(new Date,"yyyy-MM-dd"),o=u.reduce(((e,a,t)=>0===t?e.concat(r):e.concat(s(d(new Date(r.replace(/-/g,"/")),t),"yyyy-MM-dd"))),[]).map((e=>i.map((a=>{n+=A.value;const t=Date.parse(`${e} ${a.start}`),l=Date.parse(`${e} ${a.end}`);return{start:t,end:l,left:n,center:n+A.value/2,scaleCell:(l-t)/A.value}}))));return v(o)})),J=a((()=>re("breathe"))),K=a((()=>re("pulse"))),Q=a((()=>re("temperature"))),U=a((()=>re("pain"))),Z=a((()=>{var e;return(null==(e=S.data.grid)?void 0:e.event)||{selectable:!0,evented:!0,hovered:!0}})),_=a((()=>{const{left:e}=S.data;return v(e.yScaleValue.map((e=>e.dataList.filter((e=>e.show)).map(((a,t)=>({...a,bigType:r(a.title,e.type),unit:e.unit,dataIndex:t}))))))})),ee=a((()=>{var e,a;const{left:t}=S.data,l=t.yScaleValue.findIndex((e=>"pain"===e.type));return l>-1&&(null==(a=null==(e=t.yScaleValue[l].dataList)?void 0:e[0])?void 0:a.show)?l:-1})),ae=a((()=>{const{grid:e}=S.data;return-1===ee.value?0:B.value*e.subYCell})),te=a((()=>{const{left:e}=S.data,a={originY:T.value,endY:q.value};return 0===ee.value&&e.yScaleValue.length>1?a.endY=T.value+ae.value:ee.value===e.yScaleValue.length-1&&(a.originY=q.value-ae.value),a})),le=a((()=>{const{left:e}=S.data,a={originY:T.value,endY:q.value};return 0===ee.value&&e.yScaleValue.length>1?a.originY=T.value+ae.value+H.value[1]*B.value:ee.value===e.yScaleValue.length-1&&(a.endY=q.value-ae.value-H.value[1]*B.value),a})),ue=a((()=>{var e,a;const{top:t,grid:l}=S.data,u=[];for(const i in t)t[i].show&&u.push({...t[i],list:(null==(a=null==(e=t[i].list)?void 0:e.slice)?void 0:a.call(e,0,l.mainXCell))||[],key:i});return u.sort(((e,a)=>e.seq-a.seq))})),ie=a((()=>{var e;const{left:a,right:t}=S.data,l=a.yScaleValue.find((e=>"temperature"===e.type)),u=(null==t?void 0:t.yScaleValue)||{};if(null==(e=null==l?void 0:l.list)?void 0:e.length){const e=(null==u?void 0:u.showdetailedScale)?l.list.reduce((e=>{const a=e[e.length-1];return a?e.concat([a+1,a+2]):e.concat([92])}),[]):[],a=l.list.map((e=>o(1.8*e+32)));Object.assign(u,{list:a,detailedList:e,spaceGridNumber:l.spaceGridNumber})}return u})),ne=t({canvasWidth:S.data.width,canvasHeight:S.data.height,borderStyle:{...u,...S.data.borderStyle||{}},selectionStyle:S.data.selectionStyle||{},dateHeight:L.value,hospitalDaysHeight:I.value,operationDaysHeight:M.value,xScalevalueHeight:P.value,topList:ue.value,breathingHeight:N.value,hospitalizationDate:S.data.hospitalizationDate,grid:S.data.grid,top:S.data.top,left:S.data.left,right:S.data.right,bottom:S.data.bottom,other:S.data.other,painIndex:ee.value,painHeight:ae.value,painOriginY:te.value,vitalSignsOriginY:le.value,gridXNumber:O.value,gridYNumber:W.value,iconsWidth:E.value,originX:G.value,originY:z.value,originYLimit:T.value,endX:$.value,endXLimit:k.value,endY:R.value,xCellWidth:A.value,yCellHeight:B.value,xScaleList:F.value,breatheYCell:J.value,pulseYCell:K.value,temperatureYCell:Q.value,painYCell:U.value,event:Z.value,itemList:_.value,getRightInfo:ie.value,config:S.data.config||{},surplusCell:X.value,painSurplusCell:H.value});function re(e){const{yScaleValue:a}=S.data.left,t=a.find((a=>a.type===e)),l=(null==t?void 0:t.list)||[];return l.length?B.value/((l[1]-l[0])/t.spaceGridNumber):0}const{computedX:oe,computedY:ve,getXValue:se,getYValue:de}=i(ne);return l((()=>y.value),(e=>{e&&function(){c(y,ne);const{setPopup:e,isAddPoint:a,updateData:t,redrawPoints:l,clickMenu:u,gridPoints:i}=g(y,ne,b,oe,ve,se,de,S.addRenderItem,Y,C);j.value=l,V.value=u;const{drawScaleValue:r}=p(y,ne,b,e,Y,oe,ve,se,de,a,t,i);h(y,ne,r),m(y,ne),f(y,ne,b,oe);const{select:o}=n(y,ne,b);D.value=o}()}),{immediate:!0}),{propItems:ne,redrawPoints:j,select:D,clickMenu:V}}export{y as useTemperatureChart};
|
|
@@ -475,11 +475,11 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
475
475
|
hide: boolean;
|
|
476
476
|
}>;
|
|
477
477
|
draggable: boolean;
|
|
478
|
-
|
|
479
|
-
isFieldSet: boolean;
|
|
478
|
+
isHighlightRow: boolean;
|
|
480
479
|
idx: number;
|
|
481
480
|
isHighlight: boolean;
|
|
482
|
-
|
|
481
|
+
isFieldSet: boolean;
|
|
482
|
+
fieldDescribeMode: "column" | "tooltip";
|
|
483
483
|
}>;
|
|
484
484
|
EditDialog: import("vue").DefineComponent<{
|
|
485
485
|
visible: {
|
|
@@ -496,11 +496,11 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
496
496
|
hide: boolean;
|
|
497
497
|
}>;
|
|
498
498
|
draggable: boolean;
|
|
499
|
-
|
|
500
|
-
isFieldSet: boolean;
|
|
499
|
+
isHighlightRow: boolean;
|
|
501
500
|
idx: number;
|
|
502
501
|
isHighlight: boolean;
|
|
503
|
-
|
|
502
|
+
isFieldSet: boolean;
|
|
503
|
+
fieldDescribeMode: "column" | "tooltip";
|
|
504
504
|
}>;
|
|
505
505
|
setStyle: typeof setStyle;
|
|
506
506
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("close" | "save" | "reset")[], "close" | "save" | "reset", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
@@ -613,11 +613,11 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
613
613
|
hide: boolean;
|
|
614
614
|
}>;
|
|
615
615
|
draggable: boolean;
|
|
616
|
-
|
|
617
|
-
isFieldSet: boolean;
|
|
616
|
+
isHighlightRow: boolean;
|
|
618
617
|
idx: number;
|
|
619
618
|
isHighlight: boolean;
|
|
620
|
-
|
|
619
|
+
isFieldSet: boolean;
|
|
620
|
+
fieldDescribeMode: "column" | "tooltip";
|
|
621
621
|
}>;
|
|
622
622
|
isArray: {
|
|
623
623
|
(value?: any): value is any[];
|
|
@@ -725,10 +725,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
725
725
|
rowDraggable: boolean;
|
|
726
726
|
showSeq: boolean;
|
|
727
727
|
footerFlag: boolean;
|
|
728
|
+
fieldDescribeMode: "column" | "tooltip";
|
|
728
729
|
customColumns: FieldSetColumnItem[];
|
|
729
730
|
showSearch: boolean;
|
|
730
731
|
showSortPriority: boolean;
|
|
731
732
|
showHeadFilter: boolean;
|
|
732
|
-
fieldDescribeMode: "column" | "tooltip";
|
|
733
733
|
}>;
|
|
734
734
|
export default _default;
|
|
@@ -317,10 +317,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
317
317
|
hide: boolean;
|
|
318
318
|
}>;
|
|
319
319
|
draggable: boolean;
|
|
320
|
-
|
|
321
|
-
isFieldSet: boolean;
|
|
320
|
+
isHighlightRow: boolean;
|
|
322
321
|
idx: number;
|
|
323
322
|
isHighlight: boolean;
|
|
324
|
-
|
|
323
|
+
isFieldSet: boolean;
|
|
324
|
+
fieldDescribeMode: "column" | "tooltip";
|
|
325
325
|
}>;
|
|
326
326
|
export default _default;
|
|
@@ -1803,6 +1803,7 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
1803
1803
|
value?: any;
|
|
1804
1804
|
describe?: string | undefined;
|
|
1805
1805
|
} | undefined;
|
|
1806
|
+
requiredReminderContent?: string | undefined;
|
|
1806
1807
|
date_format?: string | undefined;
|
|
1807
1808
|
step_length?: string | number | undefined;
|
|
1808
1809
|
urlConfig?: {
|
|
@@ -3458,6 +3459,7 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
3458
3459
|
fold?: boolean | undefined;
|
|
3459
3460
|
required?: boolean | undefined;
|
|
3460
3461
|
requiredDisabled?: boolean | undefined;
|
|
3462
|
+
requiredReminderContent?: string | undefined;
|
|
3461
3463
|
editableDisabled?: boolean | undefined;
|
|
3462
3464
|
editable?: boolean | undefined;
|
|
3463
3465
|
notes?: string | undefined;
|
|
@@ -3473,6 +3475,7 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
3473
3475
|
fold?: boolean | undefined;
|
|
3474
3476
|
required?: boolean | undefined;
|
|
3475
3477
|
requiredDisabled?: boolean | undefined;
|
|
3478
|
+
requiredReminderContent?: string | undefined;
|
|
3476
3479
|
editableDisabled?: boolean | undefined;
|
|
3477
3480
|
editable?: boolean | undefined;
|
|
3478
3481
|
notes?: string | undefined;
|
|
@@ -3570,6 +3573,7 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
3570
3573
|
value?: any;
|
|
3571
3574
|
describe?: string | undefined;
|
|
3572
3575
|
} | undefined;
|
|
3576
|
+
requiredReminderContent?: string | undefined;
|
|
3573
3577
|
date_format?: string | undefined;
|
|
3574
3578
|
step_length?: string | number | undefined;
|
|
3575
3579
|
urlConfig?: {
|
|
@@ -5310,6 +5314,7 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
5310
5314
|
value?: any;
|
|
5311
5315
|
describe?: string | undefined;
|
|
5312
5316
|
} | undefined;
|
|
5317
|
+
requiredReminderContent?: string | undefined;
|
|
5313
5318
|
date_format?: string | undefined;
|
|
5314
5319
|
step_length?: string | number | undefined;
|
|
5315
5320
|
urlConfig?: {
|
|
@@ -1806,6 +1806,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
1806
1806
|
value?: any;
|
|
1807
1807
|
describe?: string | undefined;
|
|
1808
1808
|
} | undefined;
|
|
1809
|
+
requiredReminderContent?: string | undefined;
|
|
1809
1810
|
date_format?: string | undefined;
|
|
1810
1811
|
step_length?: string | number | undefined;
|
|
1811
1812
|
urlConfig?: {
|
|
@@ -3461,6 +3462,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
3461
3462
|
fold?: boolean | undefined;
|
|
3462
3463
|
required?: boolean | undefined;
|
|
3463
3464
|
requiredDisabled?: boolean | undefined;
|
|
3465
|
+
requiredReminderContent?: string | undefined;
|
|
3464
3466
|
editableDisabled?: boolean | undefined;
|
|
3465
3467
|
editable?: boolean | undefined;
|
|
3466
3468
|
notes?: string | undefined;
|
|
@@ -3476,6 +3478,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
3476
3478
|
fold?: boolean | undefined;
|
|
3477
3479
|
required?: boolean | undefined;
|
|
3478
3480
|
requiredDisabled?: boolean | undefined;
|
|
3481
|
+
requiredReminderContent?: string | undefined;
|
|
3479
3482
|
editableDisabled?: boolean | undefined;
|
|
3480
3483
|
editable?: boolean | undefined;
|
|
3481
3484
|
notes?: string | undefined;
|
|
@@ -3573,6 +3576,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
3573
3576
|
value?: any;
|
|
3574
3577
|
describe?: string | undefined;
|
|
3575
3578
|
} | undefined;
|
|
3579
|
+
requiredReminderContent?: string | undefined;
|
|
3576
3580
|
date_format?: string | undefined;
|
|
3577
3581
|
step_length?: string | number | undefined;
|
|
3578
3582
|
urlConfig?: {
|
|
@@ -5313,6 +5317,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
5313
5317
|
value?: any;
|
|
5314
5318
|
describe?: string | undefined;
|
|
5315
5319
|
} | undefined;
|
|
5320
|
+
requiredReminderContent?: string | undefined;
|
|
5316
5321
|
date_format?: string | undefined;
|
|
5317
5322
|
step_length?: string | number | undefined;
|
|
5318
5323
|
urlConfig?: {
|
|
@@ -326,6 +326,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
326
326
|
value?: any;
|
|
327
327
|
describe?: string | undefined;
|
|
328
328
|
} | undefined;
|
|
329
|
+
requiredReminderContent?: string | undefined;
|
|
329
330
|
date_format?: string | undefined;
|
|
330
331
|
step_length?: string | number | undefined;
|
|
331
332
|
urlConfig?: {
|
|
@@ -1981,6 +1982,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
1981
1982
|
fold?: boolean | undefined;
|
|
1982
1983
|
required?: boolean | undefined;
|
|
1983
1984
|
requiredDisabled?: boolean | undefined;
|
|
1985
|
+
requiredReminderContent?: string | undefined;
|
|
1984
1986
|
editableDisabled?: boolean | undefined;
|
|
1985
1987
|
editable?: boolean | undefined;
|
|
1986
1988
|
notes?: string | undefined;
|
|
@@ -1996,6 +1998,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
1996
1998
|
fold?: boolean | undefined;
|
|
1997
1999
|
required?: boolean | undefined;
|
|
1998
2000
|
requiredDisabled?: boolean | undefined;
|
|
2001
|
+
requiredReminderContent?: string | undefined;
|
|
1999
2002
|
editableDisabled?: boolean | undefined;
|
|
2000
2003
|
editable?: boolean | undefined;
|
|
2001
2004
|
notes?: string | undefined;
|
|
@@ -2093,6 +2096,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
2093
2096
|
value?: any;
|
|
2094
2097
|
describe?: string | undefined;
|
|
2095
2098
|
} | undefined;
|
|
2099
|
+
requiredReminderContent?: string | undefined;
|
|
2096
2100
|
date_format?: string | undefined;
|
|
2097
2101
|
step_length?: string | number | undefined;
|
|
2098
2102
|
urlConfig?: {
|
|
@@ -3833,6 +3837,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
3833
3837
|
value?: any;
|
|
3834
3838
|
describe?: string | undefined;
|
|
3835
3839
|
} | undefined;
|
|
3840
|
+
requiredReminderContent?: string | undefined;
|
|
3836
3841
|
date_format?: string | undefined;
|
|
3837
3842
|
step_length?: string | number | undefined;
|
|
3838
3843
|
urlConfig?: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{omit as e,pick as t}from"lodash-es";import{EditAbleField as l,widgetWidthOptionConfig as i,isShowOptionConfig as a,isNotFoldOptionConfig as
|
|
1
|
+
import{omit as e,pick as t}from"lodash-es";import{EditAbleField as l,widgetWidthOptionConfig as i,isShowOptionConfig as a,isNotFoldOptionConfig as o,isEditOptionConfig as _,isNullOptionConfig as n,isVisibleOptionConfig as m,rowsOptionConfig as r}from"../constants/index.js";import"../../../form-render/index.js";import{useFieldNormalize as s}from"../../../form-render/src/hooks/useFieldNormalize.js";const{FieldNormalizeWaterfallHook:d}=s();function E(){const s=new Map([[l.KEY,e=>({alias:"字段",elem_width:6,html_type:"TEXT",content:null==e?void 0:e.key,decoratorProps:{labelPlacement:"left"}})],[l.NAME,()=>({alias:"名称",elem_width:6,is_null:"0",html_type:"INPUT"})],[l.NOTES,()=>({alias:"问号提示",elem_width:6,html_type:"INPUT",is_empty:"0"})],[l.DEFAULT_VALUE,(l,i)=>{const a=d.call(Object.assign({},null==l?void 0:l.originalSetting,i),{});return{alias:"默认值",elem_width:6,html_type:"INPUT",is_empty:"0",componentProps:e(a.componentProps,["class","style","disabled"]),...t(a,["html_type","validate","option","multi_select","multi_select_value","wordbook","open","close","date_format","step_length","urlConfig","autograph","defined_error_msg","free_entry","validator","allowSlash","is_allow_check_mid","allow_check_mid_level"])}}],[l.LAYOUT_WIDTH_ENUM,()=>({alias:"宽度",fieldType:"number",html_type:"SELECT",elem_width:6,...i()})],[l.DESC,()=>({alias:"说明文本",elem_width:6,html_type:"INPUT",is_empty:"0",validate:{max_length:30}})],[l.DEFAULT_EXPAND,()=>({alias:"是否默认展开",html_type:"SWITCH",elem_width:6,...a()})],[l.FOLD,()=>({alias:"是否可折叠",html_type:"SWITCH",elem_width:6,...o()})],[l.EDITABLE,e=>({alias:"是否可编辑",html_type:"SWITCH",elem_width:6,is_edit:(null==e?void 0:e.editableDisabled)?"0":"1",..._()})],[l.REQUIRED,e=>({alias:"是否必填",html_type:"SWITCH",elem_width:6,is_edit:(null==e?void 0:e.requiredDisabled)?"0":"1",requiredReminderContent:null==e?void 0:e.requiredReminderContent,...n()})],[l.SHOW,e=>({alias:"是否显示",html_type:"SWITCH",elem_width:6,is_show:(null==e?void 0:e.__isCombinationChild)?"1":"0",...m()})],[l.ROWS,()=>({alias:"高度",elem_width:6,remark:"默认为3行高度,可调整为1-10行高度",default_val:3,is_empty:"0",html_type:"SELECT",...r()})]]);function E(e,t,l){return e.map((e=>{var i,a;return{...null!=(a=null==(i=s.get(e))?void 0:i(t,l))?a:{},val_key:e}}))}const p=new Map([["LINE_BAR",[l.KEY,l.NAME,l.LAYOUT_WIDTH_ENUM,l.NOTES,l.DEFAULT_EXPAND,l.FOLD]],["NEWLINE",[l.KEY,l.NAME]],...["COMPLEX","COMBINATION"].map((e=>[e,[l.KEY,l.NAME,l.LAYOUT_WIDTH_ENUM]]))]),h=[l.KEY,l.NAME,l.DEFAULT_VALUE,l.LAYOUT_WIDTH_ENUM,l.DESC,l.NOTES,l.EDITABLE,l.REQUIRED,l.SHOW];return{generateFieldListByKeys:E,generateFieldListByFormConfigItem:function(e,t){var i;const a=p.get(e.type)||h;return"TEXTAREA"===(t?t.html_type:null==(i=e.originalSetting)?void 0:i.html_type)&&a.splice(3,0,l.ROWS),E(a,e,t)}}}export{E as useConfigurationField};
|
|
@@ -34,6 +34,7 @@ export declare type FormConfigItem = {
|
|
|
34
34
|
fold: boolean;
|
|
35
35
|
required: boolean;
|
|
36
36
|
requiredDisabled: boolean;
|
|
37
|
+
requiredReminderContent: string;
|
|
37
38
|
editableDisabled: boolean;
|
|
38
39
|
editable: boolean;
|
|
39
40
|
notes: string;
|
|
@@ -62,4 +63,8 @@ interface FieldVisitorContext {
|
|
|
62
63
|
replace(f: FieldItem): void;
|
|
63
64
|
}
|
|
64
65
|
export declare type FormConfigVisitor = Record<string, (context: FieldVisitorContext) => void>;
|
|
66
|
+
export declare type FormConfigReminderConfig = Partial<{
|
|
67
|
+
enabled: boolean;
|
|
68
|
+
content: string;
|
|
69
|
+
}>;
|
|
65
70
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{defineComponent as e,inject as o,createVNode as a}from"vue";import t from"../../../../../../shared/components/no-data/NoData.vue.js";import"../../../../../../shared/utils/index.js";import"
|
|
1
|
+
import{defineComponent as e,inject as o,createVNode as a}from"vue";import t from"../../../../../../shared/components/no-data/NoData.vue.js";import"../../../../../../shared/utils/index.js";import"naive-ui";import"@vueuse/core";import"date-fns";import"lodash-es";import"@vue/shared";import{useLevelSearchCascader as r}from"../../../../../../shared/hooks/useLevelSearchCascader.js";import"@vueuse/shared";import"../../../../../../shared/hooks/selectHooks/useSearchContent.js";import"@vicons/ionicons5";import{connect as s,mapProps as u}from"@formily/vue";import"../../../../index.js";import{InjectionAsyncQueue as l,InjectionChangeContextCollector as i}from"../../../constants/index.js";import{useCommonInjection as n}from"../../../hooks/useCommonInjection.js";import d from"../../../../../search-cascader/index.js";import{assignUpdateValue as m}from"../../../utils/schema.js";import{useFormField as p}from"../../../hooks/useFormField.js";const v=s(e({name:"FormSearchCascade",props:{options:{type:Array,default:()=>[]},labelField:{type:String,default:"text"},valueField:{type:String,default:"value"},autograph:{type:String,required:!0},lazyRequest:{type:Boolean,default:!0},requestCache:{type:Boolean,default:!0},wordbook:{type:Object,required:!0},onChange:{},value:{type:[String,Array]}},emits:["update:value"],setup(e,{emit:s}){const u=o(l),{field:m,fieldKey:v}=p(),{valueRef:c,labelKey:f,valueKey:h,optionsRef:y,showRef:j,fetchData:C,menuWidth:F,searchCascaderRef:S}=r(e,s,{fieldKey:v,asyncQueue:u,getRequestPayload:()=>({field:m.value})});function g(){F.value=150}o(i).setContext(v.value,(()=>({labelField:f.value,valueField:h.value})));const{injectValueValidate:k,injectValueBindKey:x}=n();k(c);const K=x(c);return()=>a(d,{ref:S,value:c.value,"onUpdate:value":e=>c.value=e,show:j.value,"onUpdate:show":e=>j.value=e,options:y.value,key:K.value,labelKey:f.value,valueKey:h.value,search:C,onFocus:g,menuWidth:F.value},{empty:()=>a(t,null,null)})}}),u({dataSource:"options"},m));export{v as LEVEL_SEARCH_CASCADER};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{defineComponent as e,computed as o,inject as t,useAttrs as l,ref as a,createVNode as r,mergeProps as s,toRaw as n}from"vue";import{arrayed as u}from"../../../../../shared/utils/index.js";import{
|
|
1
|
+
import{defineComponent as e,computed as o,inject as t,useAttrs as l,ref as a,createVNode as r,mergeProps as s,toRaw as n}from"vue";import{arrayed as u}from"../../../../../shared/utils/index.js";import{NSelect as i}from"naive-ui";import"@vueuse/core";import"date-fns";import{cloneDeep as p,isArray as m,isObject as d,omit as c,xor as v}from"lodash-es";import"@vue/shared";import{useSelectAllowModify as y}from"../../../../../shared/hooks/selectHooks/useSelectAllowModify.js";import"../../../../../shared/hooks/selectHooks/useSearchContent.js";import{useSelectRenders as f}from"../../../../../shared/hooks/selectHooks/useSelectRenders.js";import{connect as h,mapProps as b}from"@formily/vue";import{useCommonInjection as j,useSelectOptionProps as S}from"../../hooks/useCommonInjection.js";import{useComplexOptions as k,useComplexOptionsSpan as g}from"../../hooks/useComplexOptions.js";import{InjectionChangeContextCollector as C,InjectionFormUUID as F}from"../../constants/index.js";import"@formily/path";import"@formily/core";import"@vicons/ionicons5";import{assignUpdateValue as B,assignClearBindVisited as w,createVisitedSetter as A}from"../../utils/schema.js";import"@formily/reactive";import"../../../index.js";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"./index.js";import"@vueuse/shared";import{useFormField as H}from"../../hooks/useFormField.js";import{useUrlConfigOptions as O,useAutographOptions as K,useRecommendOptions as R}from"../../hooks/useFormRenderOptions.js";import"../../hooks/useFormValidator.js";const x=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"},showField:{type:String},allowCreate:Boolean,shouldSave:Boolean,allowModify:Boolean,showCustomValue:Boolean,cursorPlacement:{type:String,default:"end"},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},useLoading:{type:Boolean,default:!0},multiple:{type:Boolean},deletable:{type:Boolean,default:!0},selectAll:{type:Boolean},searchByValue:{type:Boolean},wordSplitFilter:{}},emits:["update:value","postRecommend"],setup(e,{slots:h,emit:b}){const B=o({get:()=>e.value,async set(e){b("update:value",e),D(e)}}),{labelKey:w,valueKey:x,showKey:V,fetchData:L,searchContent:P,fullOptions:_,filterOptions:N,remoteOptions:I,loading:W}=e.urlConfig?O(e,B):K(e,B),{modifyEvent:q,modifyAbleRef:E,getOptionsWithCreated:z}=y(e,{searchContent:P,labelKey:w,valueKey:x,valueRef:B,fullOptions:_}),{renderComplexOption:M,hasComplexOption:T}=k(e,B),{getRecommend:U,postRecommend:D,sortedOptions:G}=R(e,N,b,w,x),{field:J,fieldKey:Q}=H();t(C).setContext(Q.value,(e=>({currentOption:p(function(e){const o=z(_.value);return m(e)?function(e){const t=o.reduce(((e,o)=>(e[o[x.value]]=o,e)),{});return e.map((e=>t[e]))}(e):(t=e,o.find((e=>e[x.value]===t)));var t}(e)),labelField:w.value,valueField:x.value})));const X=async e=>(P.value=e,Promise.allSettled([L(e),U(e)])),{injectValueValidate:Y,injectValueWatchFromEmpty:Z,injectValueBindKey:$}=j();Z(B,(()=>e.lazyRequest&&X())),Y(B);const ee=$(B),{menuProps:oe,nodeProps:te}=S(),{renderTag:le,renderLabel:ae,renderSelectAll:re,titleRef:se}=f(e,{labelKey:w,valueKey:x,valueRef:B,showKey:V,searchContent:P}),ne=o((()=>z(E.value?_.value:G.value))),ue=l(),ie=o((()=>{if(e.allowCreate||e.showCustomValue)return B.value;const o=e.multiple&&m(B.value);return _.value.find((e=>o?B.value.includes(e[x.value]):e[x.value]===B.value))?B.value:null})),pe=a(!1);async function me(e){e&&await X(),pe.value=e}async function de(e,o){await q.updateValue(e,o),I.value&&o&&u(o).forEach((e=>{if(!d(e))return;const o=e;o.created&&o.shouldSave&&I.value.push(c(n(o),["created","shouldSave"]))}))}const ce=t(F),{getSpan:ve}=g(),ye=A(J,q.focus);function fe(o){if(!e.multiple)return;const t=o?ne.value.map((e=>e[x.value])):[];v(t,e.value).length&&(B.value=t)}function he(o){let t=h;return e.multiple&&e.selectAll&&(t={action:()=>re(fe),...h}),r(i,s({title:se.value,key:ee.value,multiple:e.multiple,remote:!0,filterable:!0,loading:W.value,value:ie.value,onUpdateValue:de,"menu-props":oe,"node-props":te,labelField:w.value,valueField:x.value,options:ne.value,onSearch:X,show:pe.value,"onUpdate:show":me,onFocus:ye,onBlur:q.blur,renderLabel:ae,renderTag:le},o,ue),t)}return()=>{var e,o;if(!T.value)return he();const t=null!=(o=null==(e=J.value.decoratorProps)?void 0:e.span)?o:6,l=ve(ce,J.value.address);return r("section",{class:"form-render__selectChildField",style:{"--column":l+t}},[he({class:"form-render__selectChildFieldItem",style:{"--form-item-column":t}}),_.value.map((e=>M({option:e,value:B.value,valueKey:x.value,labelKey:w.value,childFieldStrategy:"checked",renderLabel:!1,attrs:{class:"form-render__selectChildFieldItem",style:{"--form-item-column":l}}})))])}}}),b({dataSource:"options"},B,w));export{x as SELECT};
|
|
@@ -16,7 +16,7 @@ export declare const SWITCH: import("vue").DefineComponent<{
|
|
|
16
16
|
default: string;
|
|
17
17
|
};
|
|
18
18
|
onChange: {};
|
|
19
|
-
}, () => JSX.Element | JSX.Element[], unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "update:value"[], "update:value", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
19
|
+
}, () => JSX.Element | (JSX.Element | null)[], unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "update:value"[], "update:value", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
20
20
|
value: {};
|
|
21
21
|
openDescription: {
|
|
22
22
|
type: PropType<Description>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{defineComponent as e,useAttrs as o,ref as t,computed as i,createVNode as
|
|
1
|
+
import{defineComponent as e,useAttrs as o,ref as t,computed as i,createVNode as l,mergeProps as r,createTextVNode as u}from"vue";import{NSwitch as n,NModal as a,NCheckbox as s}from"naive-ui";import"../../../../../shared/utils/index.js";import"@formily/core";import"@formily/path";import"@vicons/ionicons5";import"@vue/shared";import"@vueuse/core";import"lodash-es";import"date-fns";import{assignUpdateValue as v,assignValueBindKey as p}from"../../utils/schema.js";import{connect as d,mapProps as c}from"@formily/vue";import"../../../index.js";import{useFormField as m}from"../../hooks/useFormField.js";const h=d(e({name:"FormSwitch",props:{value:{},openDescription:{type:Object},closeDescription:{type:Object},showMode:{type:String,default:"SWITCH"},onChange:{}},emits:["update:value"],setup(e,{emit:v}){const p=o(),d=t(!1),{field:c,fieldKey:h}=m(),f=i((()=>{var e,o;return null==(o=null==(e=c.value.decoratorProps)?void 0:e.fieldItem)?void 0:o.requiredReminderContent})),y=i((()=>{var o,t;return null==(t=null==(o=e.openDescription)?void 0:o.value)||t})),w=i((()=>{var o,t;return null!=(t=null==(o=e.closeDescription)?void 0:o.value)&&t})),j=()=>{var o,t;return u(null!=(t=null==(o=e.openDescription)?void 0:o.describe)?t:"")},k=()=>{var o,t;return u(null!=(t=null==(o=e.closeDescription)?void 0:o.describe)?t:"")},C=i({get:()=>e.value===y.value,set(o){if(!f.value||"SWITCH"!==e.showMode||o)return v("update:value",o?y.value:w.value);d.value=!0}});function D(){v("update:value",w.value)}return()=>"SWITCH"===e.showMode?[l(n,r({value:C.value,"onUpdate:value":e=>C.value=e},p),{checked:j,unchecked:k}),f.value?l(a,{show:d.value,"onUpdate:show":e=>d.value=e,"display-directive":"show",preset:"dialog",title:"确认","positive-text":"确认","negative-text":"取消",content:f.value,onPositiveClick:D},null):null]:l(s,{checked:C.value,"onUpdate:checked":e=>C.value=e},{default:j})}}),c(v,p));export{h as SWITCH};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{uuidGenerator as e}from"../../../../shared/utils/index.js";import"
|
|
1
|
+
import{uuidGenerator as e}from"../../../../shared/utils/index.js";import"naive-ui";import{computed as o,provide as t,readonly as r}from"vue";import"@vueuse/core";import"date-fns";import"lodash-es";import{useFormAsyncQueue as s,presetRequestHandler as n}from"../../../../shared/hooks/useFormRequest/index.js";import"@vueuse/shared";import"../../../../shared/hooks/selectHooks/useSearchContent.js";import"@vicons/ionicons5";import{createSchemaField as i}from"@formily/vue";import{isObject as a}from"@vue/shared";import"../../index.js";import m from"../components/renderer/index.js";import{InjectionAsyncQueue as u,InjectionSchemaField as c,InjectionBusinessCollector as p,InjectionChangeContextCollector as l,InjectionFormItemDepsCollector as f,InjectionFormUUID as d,InjectionAnnotation as h,InjectionAnnotationShortcuts as j,InjectionFormGlobalProps as C,InjectionFormGlobalEmit as v}from"../constants/index.js";import{useFormRenderLifeCycle as x}from"./useFormRenderLifeCycle.js";import{usePresetScope as y}from"./usePresetScope.js";import{useBusinessBinding as q}from"./useBusinessBinding.js";import{useChangeContext as g}from"./useChangeContext.js";import{useFormItemDeps as F}from"./useFormItemDeps.js";function R(R,b){const{callLifeCycle:S}=x(R),D=s(o((()=>R.requestInstance)),o((()=>!!R.uniqueCacheData))).create(R.parallelism,{beforeRequest:(...e)=>S("beforeRequest",e)||e[1],afterRequest:(...e)=>S("afterRequest",e)||n(e[1])});t(u,D);const I=i({components:{...m,...R.components},scope:Object.assign({},y(),R.scope)}).SchemaField;t(c,I);const k=q().create(R.businessFormatter);t(p,k);const B=g().create();t(l,B);const L=F().create();t(f,L);const U=R.uuid||e();return t(d,U),t(h,o({get:()=>R.annotation?r(R.annotation):null,set(e){if(!a(R.annotation)||!a(e))return;const o=R.annotation[e.property];R.annotation[e.property]=e.value,b("annotationChange",{fieldKey:e.property,value:e.value,oldValue:o})}})),t(j,o((()=>R.annotationShortcuts))),t(C,R),t(v,b),{asyncQueue:D,SchemaField:I,businessCollector:k,changeContextCollector:B,formItemDepsCollector:L,formUUID:U}}export{R as useFormContext};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{arrayed as e,checkInSetupEnv as l,jsonParse as n}from"../../../../shared/utils/index.js";import{
|
|
1
|
+
import{arrayed as e,checkInSetupEnv as l,jsonParse as n}from"../../../../shared/utils/index.js";import"naive-ui";import{computed as o,inject as r,ref as t,watch as u,toRaw as a}from"vue";import"@vueuse/core";import"date-fns";import{uniqBy as i,isString as s,isEqual as c,omit as v,isFunction as d}from"lodash-es";import{useFormRequest as m}from"../../../../shared/hooks/useFormRequest/index.js";import"@vueuse/shared";import{useOptionFiltered as f}from"../../../../shared/hooks/selectHooks/useOptionFiltered.js";import{useSearchContent as y}from"../../../../shared/hooks/selectHooks/useSearchContent.js";import"@vicons/ionicons5";import"../../index.js";import{InjectionAsyncQueue as p,InjectionFormLifeCycleCaller as h,InjectionFormGlobalProps as g,InjectionFormItemDepsCollector as K}from"../constants/index.js";import{useFormField as k}from"./useFormField.js";import{traverseDependKey as w}from"../utils/schema.js";import{getAbsoluteKey as C,formRenderLog as b}from"../utils/index.js";function R(e,l){const n=t();return o({get:()=>n.value?n.value:e[l],set(e){n.value=e}})}function F(e,l,t,u,a){const s=R(e,"commonList"),c=R(e,"recentList"),{searchContent:f,optionSearchFilter:h}=y();function g(e){return n(e.itemObj)}const K=o((()=>{var e,l;return null!=(l=null==(e=s.value)?void 0:e.map(g))?l:[]})),w=o((()=>{var e,l;return null!=(l=null==(e=c.value)?void 0:e.map(g))?l:[]})),C=o((()=>{if(!e.recommend||!K.value.length&&!w.value.length)return l.value;const n=i(K.value.concat(w.value),(e=>e[a.value])),o=l.value.filter((e=>n.every((function(l){return l[a.value]!==e[a.value]}))));return[...h(n,u.value),...o]})),{getRecommendRequestInfo:b,getHttpInstance:F}=m();function O(l){const{url:n,getRecommendIds:o}=b(),r=d(o)?o():{},t=d(e.getRecommendInfo)?e.getRecommendInfo():{};return{url:n[l],info:Object.assign({},r,t)}}const{fieldKey:j,field:q}=k(),I=r(p);return{postRecommend:async function(l){if(!e.recommend)return;const n=F();if(!n)return;const{url:o,info:r}=O("post"),u=C.value.find((e=>e[a.value]===l));u&&t("postRecommend",await n.post(o,{...r,keyword:"",itemId:a.value,itemObj:JSON.stringify(u)}))},getRecommend:async function(l){if(!e.recommend)return;if(f.value=l,s.value&&c.value&&e.recommendCache)return;const n=await I.addAsync(function(l,n){const{url:o,info:r}=O("get");return{url:o,method:"get",key:l,cache:n,params:{...r,recNum:Math.max(e.commonNum,e.recentNum),keyword:""},payload:{field:q.value,labelKey:u.value,valueKey:a.value}}}(j.value,e.recommendCache)),{commonly:o,recently:r}=n.reduce(((e,l)=>("commonly"===l.type?e.commonly.push(v(l,["type"])):"recently"===l.type&&e.recently.push(v(l,["type"])),e)),{commonly:[],recently:[]});s.value=o.slice(0,e.commonNum),c.value=r.slice(0,e.recentNum)},sortedOptions:C}}function O(e,l,n){const r=o((()=>{var l,n,o;return null!=(o=null!=(n=null==(l=e.urlConfig)?void 0:l.nameKey)?n:e.labelField)?o:"text"})),t=o((()=>{var l,n,o;return null!=(o=null!=(n=null==(l=e.urlConfig)?void 0:l.valueKey)?n:e.valueField)?o:"value"})),u=o((()=>{var l,n;return null!=(n=null==(l=e.urlConfig)?void 0:l.showKey)?n:e.showField})),a=o((()=>{var l,n;return null!=(n=null==(l=e.urlConfig)?void 0:l.searchKey)?n:e.searchField})),{field:i}=k();return I({props:e,labelKey:r,valueKey:t,searchKey:a,showKey:u,hooks:n,valueRef:l,getConfig:()=>e.urlConfig,getParams:()=>{var l,n;const o=q(i.value,null==(l=e.urlConfig)?void 0:l.params,null==(n=e.urlConfig)?void 0:n.dependKey);return{...e.urlConfig,params:o}},getDependKeys:()=>{var l;return null==(l=e.urlConfig)?void 0:l.dependKey}})}function j(l,n,r){const t=o((()=>{var n;const o=e(null==(n=l.wordbook)?void 0:n.show_key)[0];return s(o)?o:null})),u=o((()=>{var e,n,o,r;const u=null==(n=null==(e=l.wordbook)?void 0:e.render_key)?void 0:n[0];return s(u)?u:null!=(r=null!=(o=t.value)?o:l.labelField)?r:"text"})),a=o((()=>{var e,n,o;return null!=(o=null!=(n=null==(e=l.wordbook)?void 0:e.value_key)?n:l.valueField)?o:"value"})),i=o((()=>{var e;return(null==(e=l.wordbook)?void 0:e.search_key)||[]})),c=o((()=>{var e;return null!=(e=t.value)?e:l.showField})),{field:v}=k(),{getSearchRequestInfo:d}=m();return I({props:l,labelKey:u,valueKey:a,searchKey:i,showKey:c,hooks:r,valueRef:n,getConfig:()=>l.wordbook,getParams:()=>{const{wordbook:e,autograph:n}=l,o=q(v.value,{autograph:n,wordbookId:e.id,wordbookType:e.type,fieldKeys:e.search_key,keyword:"",page:1},e.queryParams);return{...d(),params:o}},getDependKeys:()=>{var e;return null==(e=l.wordbook)?void 0:e.queryParams}})}function q(e,l,n){const o={...l};return n&&w(n,((l,n,r)=>{const t=C(l,e.path),u=e.form.getValuesIn(t);if((null==r?void 0:r.required)&&null==u)throw`缺少必须的参数=>${t}`;o[n]=u})),o}function I({labelKey:e,valueKey:n,searchKey:i,showKey:v,props:d,getConfig:m,getParams:y,getDependKeys:w,hooks:C,valueRef:R}){l();const F=r(p),O=r(h),j=r(g),{remoteOptions:q,filterOptions:I,fullOptions:x,searchContent:S}=f(d,{labelKey:e,valueKey:n,searchKey:i,wordSplitFilter:o((()=>{var e;return null!=(e=d.wordSplitFilter)?e:j.wordSplitFilter}))}),{field:D,fieldKey:N}=k(),P=t(!1),_=async function(l,o,r={avoidSearchContent:!0}){if(S.value=l,!m())return q.value=null;if(!r.avoidSearchContent||null==S.value)try{P.value=!0;const l={field:D.value,labelKey:e.value,valueKey:n.value},r={params:{...y().params,...o},key:N.value,cache:d.requestCache,payload:l},t=await F.addAsync(Object.assign({},y(),r));a(q.value)!==t&&(q.value=t,O("afterOptionInit",[N.value,q.value,l]))}catch(e){s(e)&&b(e)}finally{P.value=!1}},H=r(K);return u(m,((l,o)=>{if(c(l,o))return;if(q.value=null,!l)return q.value=null;const r={fetchData:_,labelKey:e.value,valueKey:n.value},{onRequestConfigChange:t,onDepsChange:u}=C||{};H.setDeps(D.value.path,w()||[],(async e=>{q.value=null,(null==e?void 0:e.keepValue)||(R.value=null),d.lazyRequest||(u?u(r):_())})),!R.value&&d.lazyRequest||(t?t(r):_())}),{immediate:!0}),{labelKey:e,loading:P,showKey:v,valueKey:n,remoteOptions:q,filterOptions:I,fullOptions:x,fetchData:_,searchContent:S}}export{j as useAutographOptions,F as useRecommendOptions,O as useUrlConfigOptions};
|
|
@@ -103,6 +103,7 @@ export declare type FieldItem = {
|
|
|
103
103
|
wordbook: LowCodeTypes.wordbook;
|
|
104
104
|
open: LowCodeTypes.switchProperty;
|
|
105
105
|
close: LowCodeTypes.switchProperty;
|
|
106
|
+
requiredReminderContent: string;
|
|
106
107
|
date_format: string;
|
|
107
108
|
step_length: string | number;
|
|
108
109
|
urlConfig: UrlConfig;
|