cnhis-design-vue 3.2.5-beta.9 → 3.2.5-release.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.
Files changed (35) hide show
  1. package/es/components/button-print/index.d.ts +2 -0
  2. package/es/components/button-print/src/ButtonPrint.vue.d.ts +2 -0
  3. package/es/components/button-print/src/components/NewPrintComponent.vue2.js +1 -1
  4. package/es/components/button-print/src/components/OldPrintComponent.vue.d.ts +2 -0
  5. package/es/components/button-print/src/components/OldPrintComponent.vue2.js +1 -1
  6. package/es/components/callback/src/components/render/popupMaps.d.ts +1527 -1
  7. package/es/components/card-reader-sdk/src/cardReaderSDK.js +1 -1
  8. package/es/components/card-reader-sdk/src/types/index.d.ts +1 -0
  9. package/es/components/fabric-chart/src/hooks/temperature/useTemperatureChart.js +1 -1
  10. package/es/components/form-config/index.d.ts +5 -0
  11. package/es/components/form-config/src/FormConfig.vue.d.ts +5 -0
  12. package/es/components/form-config/src/components/FormConfigEdit.vue.d.ts +5 -0
  13. package/es/components/form-config/src/hooks/useConfigurationField.js +1 -1
  14. package/es/components/form-config/src/types/index.d.ts +5 -0
  15. package/es/components/form-render/src/components/renderer/levelSearchCascader/index.js +1 -1
  16. package/es/components/form-render/src/components/renderer/switch.d.ts +1 -1
  17. package/es/components/form-render/src/components/renderer/switch.js +1 -1
  18. package/es/components/form-render/src/types/fieldItem.d.ts +1 -0
  19. package/es/components/iho-table/index.d.ts +1527 -1
  20. package/es/components/iho-table/src/IhoTable.vue.d.ts +1527 -1
  21. package/es/components/iho-table/src/IhoTable.vue2.js +1 -1
  22. package/es/components/iho-table/src/hooks/tapHooks/index.d.ts +3 -2
  23. package/es/components/iho-table/src/hooks/tapHooks/index.js +1 -1
  24. package/es/components/iho-table/src/plugins/pagerScrollPlugin/index.js +1 -1
  25. package/es/components/iho-table/src/plugins/stickyFixedPlugin.js +1 -1
  26. package/es/components/iho-table/src/types/index.d.ts +1 -0
  27. package/es/components/iho-table/src/types/pluginType.d.ts +2 -1
  28. package/es/components/iho-table/style/index.css +1 -1
  29. package/es/components/index.css +1 -1
  30. package/es/components/select-person/src/SearchOrgAndStaff.vue2.js +1 -1
  31. package/es/components/shortcut-setter/index.d.ts +1 -0
  32. package/es/components/shortcut-setter/src/ShortcutSetter.vue.d.ts +1 -0
  33. package/es/shared/package.json.js +1 -1
  34. package/es/shared/utils/index.js +1 -1
  35. package/package.json +2 -2
@@ -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};
@@ -57,6 +57,7 @@ export declare namespace InsuranceType {
57
57
  }>;
58
58
  export type CardReadOptions = Partial<{
59
59
  basicParams: CardReadParams | (() => CardReadParams);
60
+ selfWindow: any;
60
61
  }>;
61
62
  export {};
62
63
  }
@@ -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 r}from"../useEvent.js";import{setOtherType as n,getFloorNumber as o}from"../../utils/index.js";import{flatten as s}from"lodash-es";import{format as v,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((()=>{const{surplusCell:e=[0,0,0,0]}=S.data.grid||{};return 0===ee.value?e[0]=e[0]+H.value[0]:ee.value>0&&(e[2]=e[2]+H.value[1]),e})),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 r=G.value-A.value;const n=t.date.startDate||v(new Date,"yyyy-MM-dd"),o=u.reduce(((e,a,t)=>0===t?e.concat(n):e.concat(v(d(new Date(n.replace(/-/g,"/")),t),"yyyy-MM-dd"))),[]).map((e=>i.map((a=>{r+=A.value;const t=Date.parse(`${e} ${a.start}`),l=Date.parse(`${e} ${a.end}`);return{start:t,end:l,left:r,center:r+A.value/2,scaleCell:(l-t)/A.value}}))));return s(o)})),J=a((()=>ne("breathe"))),K=a((()=>ne("pulse"))),Q=a((()=>ne("temperature"))),U=a((()=>ne("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 s(e.yScaleValue.map((e=>e.dataList.filter((e=>e.show)).map(((a,t)=>({...a,bigType:n(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})),re=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 ne(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:se,getXValue:ve,getYValue:de}=i(re);return l((()=>y.value),(e=>{e&&function(){c(y,re);const{setPopup:e,isAddPoint:a,updateData:t,redrawPoints:l,clickMenu:u,gridPoints:i}=g(y,re,b,oe,se,ve,de,S.addRenderItem,Y,C);j.value=l,V.value=u;const{drawScaleValue:n}=p(y,re,b,e,Y,oe,se,ve,de,a,t,i);h(y,re,n),m(y,re),f(y,re,b,oe);const{select:o}=r(y,re,b);D.value=o}()}),{immediate:!0}),{propItems:re,redrawPoints:j,select:D,clickMenu:V}}export{y as useTemperatureChart};
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};
@@ -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 _,isEditOptionConfig as o,isNullOptionConfig as m,isVisibleOptionConfig as s,rowsOptionConfig as n}from"../constants/index.js";import"../../../form-render/index.js";import{useFieldNormalize as r}from"../../../form-render/src/hooks/useFieldNormalize.js";const{FieldNormalizeWaterfallHook:d}=r();function E(){const r=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,..._()})],[l.EDITABLE,e=>({alias:"是否可编辑",html_type:"SWITCH",elem_width:6,is_edit:(null==e?void 0:e.editableDisabled)?"0":"1",...o()})],[l.REQUIRED,e=>({alias:"是否必填",html_type:"SWITCH",elem_width:6,is_edit:(null==e?void 0:e.requiredDisabled)?"0":"1",...m()})],[l.SHOW,e=>({alias:"是否显示",html_type:"SWITCH",elem_width:6,is_show:(null==e?void 0:e.__isCombinationChild)?"1":"0",...s()})],[l.ROWS,()=>({alias:"高度",elem_width:6,remark:"默认为3行高度,可调整为1-10行高度",default_val:3,is_empty:"0",html_type:"SELECT",...n()})]]);function E(e,t,l){return e.map((e=>{var i,a;return{...null!=(a=null==(i=r.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};
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"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
+ 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})}),g=o(i),k=f.value,x=h.value;function K(){F.value=150}g.setContext(v.value,(()=>({labelField:k,valueField:x})));const{injectValueValidate:b,injectValueBindKey:R}=n();b(c);const q=R(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:q.value,labelKey:f.value,valueKey:h.value,search:C,onFocus:K,menuWidth:F.value},{empty:()=>a(t,null,null)})}}),u({dataSource:"options"},m));export{v as LEVEL_SEARCH_CASCADER};
@@ -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 r,mergeProps as l,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 p,assignValueBindKey as v}from"../../utils/schema.js";import{connect as c,mapProps as d}from"@formily/vue";import"../../../index.js";import{useFormField as m}from"../../hooks/useFormField.js";const h=c(e({name:"FormSwitch",props:{value:{},openDescription:{type:Object},closeDescription:{type:Object},showMode:{type:String,default:"SWITCH"},onChange:{}},emits:["update:value"],setup(e,{emit:p}){const v=o(),c=t(!1),{fieldKey:d}=m(),h=i((()=>{var o,t;return null==(t=null==(o=e.openDescription)?void 0:o.value)||t})),f=i((()=>{var o,t;return null!=(t=null==(o=e.closeDescription)?void 0:o.value)&&t})),y=()=>{var o,t;return u(null!=(t=null==(o=e.openDescription)?void 0:o.describe)?t:"")},w=()=>{var o,t;return u(null!=(t=null==(o=e.closeDescription)?void 0:o.describe)?t:"")},j=i({get:()=>e.value===h.value,set(o){if("SWITCH"!==e.showMode||"required"!==d.value||o)return p("update:value",o?h.value:f.value);c.value=!0}});function k(){p("update:value",f.value)}return()=>"SWITCH"===e.showMode?[r(n,l({value:j.value,"onUpdate:value":e=>j.value=e},v),{checked:y,unchecked:w}),r(a,{show:c.value,"onUpdate:show":e=>c.value=e,"display-directive":"show",preset:"dialog",title:"确认",content:"是否确认由必填改为非必填?","positive-text":"确认","negative-text":"取消",onPositiveClick:k},null)]:r(s,{checked:j.value,"onUpdate:checked":e=>j.value=e},{default:y})}}),d(p,v));export{h as SWITCH};
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};
@@ -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;