cnhis-design-vue 3.2.11-release.3 → 3.2.12-release.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es/components/ai-chat/index.d.ts +36 -1
- package/es/components/ai-chat/src/Index.vue.d.ts +37 -2
- package/es/components/ai-chat/src/Index.vue2.js +1 -1
- package/es/components/ai-chat/src/components/ChatFooter.vue.d.ts +28 -1
- package/es/components/ai-chat/src/components/ChatFooter.vue2.js +1 -1
- package/es/components/ai-chat/src/components/ChatMain.js +1 -1
- package/es/components/ai-chat/src/types/index.d.ts +7 -0
- package/es/components/ai-chat/style/index.css +1 -1
- package/es/components/button-print/index.d.ts +3 -0
- package/es/components/button-print/src/ButtonPrint.vue.d.ts +3 -0
- package/es/components/button-print/src/components/IdentityVerification.vue2.js +1 -1
- package/es/components/button-print/src/components/NewPrintComponent.vue.d.ts +1 -0
- package/es/components/button-print/src/components/NewPrintComponent.vue2.js +1 -1
- package/es/components/button-print/src/components/OldPrintComponent.vue.d.ts +2 -0
- package/es/components/button-print/src/components/OldPrintComponent.vue2.js +1 -1
- package/es/components/callback/src/components/render/popupMaps.d.ts +4 -0
- package/es/components/fabric-chart/src/hooks/birthProcess/useBirthProcess.js +1 -1
- package/es/components/fabric-chart/src/hooks/birthProcess/useBirthProcessChart.js +1 -1
- package/es/components/fabric-chart/src/hooks/useDraw.js +1 -1
- package/es/components/field-set/src/FieldColor.vue.d.ts +1 -1
- package/es/components/field-set/src/components/edit-dialog.vue.d.ts +1 -1
- package/es/components/form-config/index.d.ts +233 -0
- package/es/components/form-config/src/FormConfig.vue.d.ts +233 -0
- package/es/components/form-config/src/components/FormConfigEdit.vue.d.ts +319 -85
- package/es/components/form-config/src/components/FormConfigEdit.vue2.js +1 -1
- package/es/components/form-config/src/types/index.d.ts +4 -0
- package/es/components/iho-table/index.d.ts +4 -0
- package/es/components/iho-table/src/IhoTable.vue.d.ts +4 -0
- package/es/components/iho-table/src/constants/index.d.ts +4 -0
- package/es/components/iho-table/src/constants/index.js +1 -1
- package/es/components/iho-table/src/plugins/defaultConfigPlugin.js +1 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/separateRendererPlugin/index.js +1 -1
- package/es/components/iho-table/src/types/index.d.ts +14 -0
- 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/scale-view/src/hooks/use-component.d.ts +2 -7
- package/es/components/select-label/index.d.ts +2 -7
- package/es/components/select-label/src/ihoLabel/IhoLabelFormContent.vue.d.ts +2 -7
- package/es/components/select-label/src/ihoLabel/IhoSelectLabel.vue.d.ts +2 -7
- package/es/components/select-label/src/ihoLabel/IhoSelectLabel.vue2.js +1 -1
- package/es/components/select-label/src/ihoLabel/iho-label-classify.vue.d.ts +2 -7
- package/es/components/select-label/src/ihoLabel/iho-label-classify.vue2.js +1 -1
- package/es/components/select-label/src/index.vue.d.ts +2 -7
- package/es/components/select-label/src/types/index.d.ts +2 -1
- package/es/shared/package.json.js +1 -1
- package/package.json +2 -2
@@ -1 +1 @@
|
|
1
|
-
import{defineComponent as t,useAttrs as e,inject as n,ref as r,reactive as i,computed as a,onMounted as o,watch as l,openBlock as s,createElementBlock as p,Fragment as d,createVNode as u,unref as m,withCtx as c,renderSlot as f,withModifiers as v,createTextVNode as y,toDisplayString as g,mergeProps as b}from"vue";import{isObject as I}from"@vue/shared";import{useMessage as h,NDropdown as P,NButton as w,NIcon as F}from"naive-ui";import{ChevronDown as k}from"@vicons/ionicons5";import{InjectionButtonPrintEmits as x}from"../constants/index.js";import{Print as T}from"../utils/print.js";import{isIReport as S}from"../utils/browserPrint.js";import E from"./IdentityVerification.vue.js";import{format as j}from"date-fns";import{savePrivateFormatApi as M,getPrivateFormatApi as O}from"../api.js";var L=t({__name:"OldPrintComponent",props:{printParams:{type:Array},params:{default:()=>[],type:Array},btnText:{default:"打印",type:String},printText:{default:"直接打印",type:String},previewText:{default:"打印预览",type:String},pdfLoadText:{default:"下载pdf",type:String},formatEditText:{default:"格式编辑",type:String},prevFn:{default:()=>Promise.resolve(),type:Function},queryPrintFormatByNumber:{default:()=>Promise.resolve({}),type:Function},queryTemplateParams:{default:()=>Promise.resolve({}),type:Function},strategy:{default:"MULTI",type:String},clickPrevFn:{default:()=>Promise.resolve(!0),type:Function},noDataMsg:{default:"请选中需要打印的数据",type:String},noDefaultFormatMsg:{default:"获取打印格式失败,请联系管理员!",type:String},token:{type:String},printdlgshow:{default:"0",type:String},btnprint:{type:String,default:"1"},directPrint:{type:Boolean,default:!1},externalOptionConfig:{type:Object,default:()=>({})},signature:{type:String},showLoading:{type:Boolean,default:!0},hideButtons:{type:Array,default:()=>[]},printCopies:{type:Number},resolution:{type:Number},printCustomProps:{type:Object,default:()=>({})},placement:{type:String},svrUpdateIp:{type:String}},setup(t,{expose:L}){var D;const R=t,C=e(),N=h();let V;const U=n(x),B={},z=r(""),A=i({spinning:!1,visible:!1,formatList:[],templateParams:{},printParams:[],currentFormatId:"",identityVerification:{visible:!1},isInited:!1,watchPrintParamsReformatFn:null,spinTimer:null,iReportExecuteMode:1});let J=r([{label:R.printText,key:"printText"},{label:R.previewText,key:"previewText"},{label:R.pdfLoadText,key:"downloadPdf"},{label:R.formatEditText,key:"formatEditText"},...(null==(D=R.externalOptionConfig)?void 0:D.options)||[]]);const q=a((()=>{if(!A.currentFormatId)return{};let t=A.currentFormatId;return A.formatList.find((e=>e.id===t))})),K=a((()=>{var t;return(null==(t=q.value)?void 0:t.name)||"格式选择"})),_=a((()=>{let t=A.formatList.find((t=>t.id===A.currentFormatId));return null==t?void 0:t.templateId})),G=async t=>{if(R.directPrint){if(A.spinning)return;return"button"===t?void await ut():st()}return st()},H=t=>u("span",{class:{active:t.key===A.currentFormatId}},[t.label]),Y=(t,e)=>{A.spinning=!1;let n={type:e,formatId:A.currentFormatId,templateId:_.value};U("success",t,n)},$=t=>{A.spinning=!1,U("error",t),I(t)&&"notInstalledApp"===t.type&&N.error(t.message)},Q=t=>{A.spinning=!1,U("cancel",t)},W=t=>{U("error",{message:"前置条件执行错误",type:t,preExecution:!0})},X=(t=0)=>{var e;const n=(null==(e=R.printParams)?void 0:e.length)?R.printParams[t]:A.printParams[t];return JSON.stringify({...n||{},...R.token?{token:R.token}:{},...R.printCustomProps||{}})},Z=()=>{var t,e;let n={},r={};if(null==(t=A.templateParams.customizeDataset)?void 0:t.length){const t=(null==(e=Object.keys(A.printParams[0].datasetData||{}))?void 0:e[0])||"",n=JSON.stringify(A.printParams.map((e=>JSON.parse(e.datasetData[t]))));r={datasetData:{}},r.datasetData[t]=n}else Object.keys(A.printParams[0]).forEach((t=>{r[t]=[],A.printParams.forEach((e=>{r[t].includes(e[t])||r[t].push(e[t])})),r[t]=r[t].join(",")}));return n=Object.assign({},JSON.parse(X(0)),r),JSON.stringify(n)},tt=((t,e,n=!0)=>{let r=null;return function(...i){r&&clearTimeout(r),n&&!r&&t.apply(null,i),r=setTimeout((()=>{r=null,!n&&t.apply(null,i)}),e)}})((()=>{let t=A.printParams.length;const e=async e=>{try{--t<=0&&Y(e,"print")}catch(t){console.log("error",t)}};R.showLoading&&A.spinning||(A.spinning=!0,R.prevFn("print",{formatId:A.currentFormatId,templateId:_.value}).then((()=>{const t={iReportExecuteMode:A.iReportExecuteMode,formatId:A.currentFormatId,templateId:_.value,authorizationKey:z.value,printdlgshow:R.printdlgshow,signature:R.signature,copies:R.printCopies,svrUpdateIp:R.svrUpdateIp};if("MULTI"===R.strategy)for(let n=0;n<A.printParams.length;n++)n>0&&(t.printdlgshow="0"),V.printDirect({...t,params:X(n)},e,$,Q);else V.printDirect({...t,params:Z()},(t=>{Y(t,"print")}),$,Q)})).catch((()=>{W("print"),A.spinning=!1})).finally((()=>{A.visible=!1})))}),800,!0),et=async(t,e)=>{var n,r;switch(t){case"printText":tt();break;case"previewText":(async()=>{R.showLoading&&A.spinning||(A.spinning=!0,R.prevFn("preview",{formatId:A.currentFormatId,templateId:_.value}).then((()=>{const t="MULTI"===R.strategy?X():Z(),e={formatId:A.currentFormatId,iReportExecuteMode:A.iReportExecuteMode,templateId:_.value,authorizationKey:z.value,params:t,btnprint:R.btnprint,signature:R.signature};V.preview(e,(t=>{Y(t,"preview")}),$)})).catch((()=>{W("preview"),A.spinning=!1})).finally((()=>{A.visible=!1})))})();break;case"formatEditText":R.showLoading&&A.spinning||(A.spinning=!0,R.prevFn("edit",{formatId:A.currentFormatId,templateId:_.value}).then((()=>{A.identityVerification.visible=!0})).catch((()=>{W("edit")})).finally((()=>{A.visible=!1,A.spinning=!1})));break;case"downloadPdf":(async()=>{R.showLoading&&A.spinning||(A.spinning=!0,R.prevFn("download",{formatId:A.currentFormatId,templateId:_.value}).then((()=>{const t="MULTI"===R.strategy?X():Z(),e={formatId:A.currentFormatId,iReportExecuteMode:A.iReportExecuteMode,templateId:_.value,authorizationKey:z.value,print:{print:"1",type:"1",resolution:null==R?void 0:R.resolution},params:t,signature:R.signature};V.downloadPDF(e,(t=>Y(t,"preview")),$)})).catch((()=>{W("download"),A.spinning=!1})).finally((()=>{A.visible=!1})))})();break;default:{A.visible=!1;const i=A.formatList.find((e=>e.id===t))||{};if(Object.keys(i).length>0){A.currentFormatId=t;const[e]=J.value;e.label=(null==i?void 0:i.name)||e.label,await M({formatForms:[{...i}],name:B.name||i.templateName,number:B.number||i.number,templateId:B.templateId||i.templateId,...B.id?{id:B.id}:{}},{token:R.token})}else null==(r=null==(n=R.externalOptionConfig)?void 0:n.onSelect)||r.call(n,t,e);break}}},nt=()=>{A.visible=!1,U("clickoutside")},rt=()=>(A.isInited=!1,A.spinning=!1,setTimeout((()=>{A.visible=!1}),0),!1),it=(t,e,n)=>{const r={};return e.forEach((e=>{let i=((t,e)=>{const n={DATE:"yyyy-MM-dd",DATETIME:"yyyy-MM-dd HH:mm:ss"};let r=e;return Object.keys(n).includes(t.type)&&e&&e instanceof Date&&(r=j(e,n[t.type])),(null==t?void 0:t.defaultValue)||r})(e,t[e[n]]);t[e[n]]&&i&&(r[e[n]]=i)})),r},at=({customizeDataset:t=[],param:e=[]},n=[])=>n.map((n=>{let r={};return t.forEach((t=>{const e=t.dataSetting[0].selectFieldList;r.datasetData={[t.name]:JSON.stringify(it(n,e,"fieldName"))}})),r=Object.assign({},r,it(n,e,"key")),r})),ot=async t=>{var e,n;if(A.formatList=t?(t=>{let e=[];return t&&t.forEach((t=>{if(!t.format)return!1;e.push(...t.format.map((e=>Object.assign({},e,{templateName:t.name}))))})),e})(t.obj):[],A.iReportExecuteMode=(null==(e=null==t?void 0:t.obj)?void 0:e.length)>0&&t.obj[0].iReportExecuteMode||1,A.currentFormatId=await(async(t,e)=>{var n;if(!(null==t?void 0:t.length))return"";if(!C.isDoc){const{data:e}=await O({templateId:t[0].templateId},{token:R.token});if("SUCCESS"===e.result){const{formatForms:r=[]}=e.map||{};Object.assign(B,e.map||{});const i=null==(n=null==r?void 0:r[0])?void 0:n.id;if(i&&t.map((t=>t.id)).includes(i))return i}}const r=t.find((t=>1==t[e]));return(null==r?void 0:r.id)||t[0].id})(A.formatList,"defaultFlag"),!A.currentFormatId)return J.value=[],N.error(R.noDefaultFormatMsg),rt();(()=>{var t;const e=A.formatList.map((t=>({label:t.name,key:t.id})));J.value.unshift({label:K.value,key:"format",children:e}),R.hideButtons.length>0&&(J.value=J.value.filter((t=>!R.hideButtons.includes(t.key))));const n=sessionStorage.getItem("portal");if(n){const e=JSON.parse(n),r=(null==(t=null==e?void 0:e.user)?void 0:t.currentRoleResourceObj)||{},i=Object.keys(r);i.includes("RY7.2.21.1.M2.G94181E")||(J.value=J.value.filter((t=>"downloadPdf"!=t.key))),i.includes("RY7.2.21.1.M2.G33633A")||(J.value=J.value.filter((t=>"formatEditText"!=t.key)))}})();let r=null==(n=await R.queryTemplateParams())?void 0:n.obj;if(!r||!_.value)return N.error("获取打印模板失败,请联系管理员!"),rt();A.templateParams=r,A.printParams=at(A.templateParams,R.params)},lt=async()=>{var t;if(A.isInited)return!0;A.isInited=!0,A.spinning=!0,(()=>{if(V)return!1;V=new T})();const e=await R.queryPrintFormatByNumber();return await ot(e),(null==(t=e.obj)?void 0:t.length)>0&&(z.value=e.obj[0].authorizationKey||""),A.spinning=!1,!0},st=async(t=!0)=>{var e,n;if(await R.clickPrevFn())if((null==(e=R.params)?void 0:e.length)||(null==(n=R.printParams)?void 0:n.length)){if(!A.visible){if(!await lt())return!1}t&&(A.visible=!A.visible)}else N.warning(R.noDataMsg)},pt=()=>{A.watchPrintParamsReformatFn&&A.watchPrintParamsReformatFn(),A.isInited?A.printParams=at(A.templateParams,R.params):A.watchPrintParamsReformatFn=()=>l((()=>A.isInited),(t=>{if(!t)return!1;pt()}))},dt=t=>{if(A.identityVerification.visible=!1,S(A.currentFormatId))return Y(null,"edit");const e={formatId:A.currentFormatId,templateId:_.value,params:X(),token:t};V.editPrintFormat(e,(t=>{Y(t,"edit")}),$)};async function ut(){await st(!1),tt()}return o((()=>{A.isInited=!1})),l((()=>R.params),(t=>{if(!(null==t?void 0:t.length))return!1;pt()}),{deep:!0}),L({directPrint:ut}),(e,n)=>(s(),p(d,null,[u(m(P),{class:"c-dropdown",placement:t.placement,trigger:"click",show:A.visible,onClickoutside:nt,options:m(J),onSelect:et,"render-label":H},{default:c((()=>[f(e.$slots,"button",{handleClickPrintBtn:st,printSpinning:A.spinning,printbtnText:t.btnText,printVisible:A.visible},(()=>[u(m(w),{class:"dropdown-button",loading:t.showLoading&&A.spinning,onClick:n[1]||(n[1]=v((()=>G("button")),["stop"]))},{default:c((()=>[y(g(t.btnText)+" ",1),u(m(F),{component:m(k),size:"18",style:{"margin-left":"5px"},onClick:n[0]||(n[0]=v((()=>G("icon")),["stop"]))},null,8,["component"])])),_:1},8,["loading"])]))])),_:3},8,["placement","show","options"]),u(E,b(m(C),{modelValue:A.identityVerification.visible,"onUpdate:modelValue":n[2]||(n[2]=t=>A.identityVerification.visible=t),formatId:A.currentFormatId,templateId:m(_),onSuccess:dt}),null,16,["modelValue","formatId","templateId"])],64))}});export{L as default};
|
1
|
+
import{defineComponent as t,useAttrs as e,inject as n,ref as r,reactive as i,computed as a,onMounted as o,watch as l,openBlock as s,createElementBlock as p,Fragment as d,createVNode as u,unref as m,withCtx as c,renderSlot as f,withModifiers as v,createTextVNode as y,toDisplayString as g,mergeProps as b}from"vue";import{isObject as I}from"@vue/shared";import{useMessage as h,NDropdown as P,NButton as w,NIcon as F}from"naive-ui";import{ChevronDown as x}from"@vicons/ionicons5";import{InjectionButtonPrintEmits as k}from"../constants/index.js";import{Print as T}from"../utils/print.js";import{isIReport as S}from"../utils/browserPrint.js";import E from"./IdentityVerification.vue.js";import{format as M}from"date-fns";import{savePrivateFormatApi as j,getPrivateFormatApi as O}from"../api.js";import{cloneDeep as L}from"lodash";var R=t({__name:"OldPrintComponent",props:{printParams:{type:Array},params:{default:()=>[],type:Array},btnText:{default:"打印",type:String},printText:{default:"直接打印",type:String},previewText:{default:"打印预览",type:String},pdfLoadText:{default:"下载pdf",type:String},formatEditText:{default:"格式编辑",type:String},prevFn:{default:()=>Promise.resolve(),type:Function},queryPrintFormatByNumber:{default:()=>Promise.resolve({}),type:Function},queryTemplateParams:{default:()=>Promise.resolve({}),type:Function},strategy:{default:"MULTI",type:String},clickPrevFn:{default:()=>Promise.resolve(!0),type:Function},noDataMsg:{default:"请选中需要打印的数据",type:String},noDefaultFormatMsg:{default:"获取打印格式失败,请联系管理员!",type:String},token:{type:String},printdlgshow:{default:"0",type:String},btnprint:{type:String,default:"1"},directPrint:{type:Boolean,default:!1},externalOptionConfig:{type:Object,default:()=>({})},signature:{type:String},showLoading:{type:Boolean,default:!0},hideButtons:{type:Array,default:()=>[]},printCopies:{type:Number},resolution:{type:Number},printCustomProps:{type:Object,default:()=>({})},placement:{type:String},svrUpdateIp:{type:String}},setup(t,{expose:R}){var D;const C=t,N=e(),V=h();let U;const B=String(navigator.platform).toLowerCase().includes("linux"),z=n(k),A={},J=r(""),q=i({spinning:!1,visible:!1,formatList:[],templateParams:{},printParams:[],currentFormatId:"",identityVerification:{visible:!1},isInited:!1,watchPrintParamsReformatFn:null,spinTimer:null,iReportExecuteMode:1});let K=r([{label:C.printText,key:"printText"},{label:C.previewText,key:"previewText"},{label:C.pdfLoadText,key:"downloadPdf"},{label:C.formatEditText,key:"formatEditText"},...(null==(D=C.externalOptionConfig)?void 0:D.options)||[]]);const _=r([]),G=a((()=>{if(!q.currentFormatId)return{};let t=q.currentFormatId;return q.formatList.find((e=>e.id===t))})),H=a((()=>{var t;return(null==(t=G.value)?void 0:t.name)||"格式选择"})),Y=a((()=>{let t=q.formatList.find((t=>t.id===q.currentFormatId));return null==t?void 0:t.templateId})),$=async t=>{if(C.directPrint){if(q.spinning)return;return"button"===t?void await ft():ut()}return ut()},Q=t=>u("span",{class:{active:t.key===q.currentFormatId}},[t.label]),W=(t,e)=>{q.spinning=!1;let n={type:e,formatId:q.currentFormatId,templateId:Y.value};z("success",t,n)},X=t=>{q.spinning=!1,z("error",t),I(t)&&"notInstalledApp"===t.type&&V.error(t.message)},Z=t=>{q.spinning=!1,z("cancel",t)},tt=t=>{z("error",{message:"前置条件执行错误",type:t,preExecution:!0})},et=(t=0)=>{var e;const n=(null==(e=C.printParams)?void 0:e.length)?C.printParams[t]:q.printParams[t];return JSON.stringify({...n||{},...C.token?{token:C.token}:{},...C.printCustomProps||{}})},nt=()=>{var t,e;let n={},r={};if(null==(t=q.templateParams.customizeDataset)?void 0:t.length){const t=(null==(e=Object.keys(q.printParams[0].datasetData||{}))?void 0:e[0])||"",n=JSON.stringify(q.printParams.map((e=>JSON.parse(e.datasetData[t]))));r={datasetData:{}},r.datasetData[t]=n}else Object.keys(q.printParams[0]).forEach((t=>{r[t]=[],q.printParams.forEach((e=>{r[t].includes(e[t])||r[t].push(e[t])})),r[t]=r[t].join(",")}));return n=Object.assign({},JSON.parse(et(0)),r),JSON.stringify(n)},rt=((t,e,n=!0)=>{let r=null;return function(...i){r&&clearTimeout(r),n&&!r&&t.apply(null,i),r=setTimeout((()=>{r=null,!n&&t.apply(null,i)}),e)}})((()=>{let t=q.printParams.length;const e=async e=>{try{--t<=0&&W(e,"print")}catch(t){console.log("error",t)}};C.showLoading&&q.spinning||(q.spinning=!0,C.prevFn("print",{formatId:q.currentFormatId,templateId:Y.value}).then((()=>{const t={iReportExecuteMode:q.iReportExecuteMode,formatId:q.currentFormatId,templateId:Y.value,authorizationKey:J.value,printdlgshow:C.printdlgshow,signature:C.signature,copies:C.printCopies,svrUpdateIp:C.svrUpdateIp};if("MULTI"===C.strategy)for(let n=0;n<q.printParams.length;n++)n>0&&(t.printdlgshow="0"),U.printDirect({...t,params:et(n)},e,X,Z);else U.printDirect({...t,params:nt()},(t=>{W(t,"print")}),X,Z)})).catch((()=>{tt("print"),q.spinning=!1})).finally((()=>{q.visible=!1})))}),800,!0),it=async(t,e)=>{var n,r;switch(t){case"printText":rt();break;case"previewText":(async()=>{C.showLoading&&q.spinning||(q.spinning=!0,C.prevFn("preview",{formatId:q.currentFormatId,templateId:Y.value}).then((()=>{const t="MULTI"===C.strategy?et():nt(),e={formatId:q.currentFormatId,iReportExecuteMode:q.iReportExecuteMode,templateId:Y.value,authorizationKey:J.value,params:t,btnprint:C.btnprint,signature:C.signature};U.preview(e,(t=>{W(t,"preview")}),X)})).catch((()=>{tt("preview"),q.spinning=!1})).finally((()=>{q.visible=!1})))})();break;case"formatEditText":C.showLoading&&q.spinning||(q.spinning=!0,C.prevFn("edit",{formatId:q.currentFormatId,templateId:Y.value}).then((()=>{q.identityVerification.visible=!0})).catch((()=>{tt("edit")})).finally((()=>{q.visible=!1,q.spinning=!1})));break;case"downloadPdf":(async()=>{C.showLoading&&q.spinning||(q.spinning=!0,C.prevFn("download",{formatId:q.currentFormatId,templateId:Y.value}).then((()=>{const t="MULTI"===C.strategy?et():nt(),e={formatId:q.currentFormatId,iReportExecuteMode:q.iReportExecuteMode,templateId:Y.value,authorizationKey:J.value,print:{print:"1",type:"1",resolution:null==C?void 0:C.resolution},params:t,signature:C.signature};U.downloadPDF(e,(t=>W(t,"preview")),X)})).catch((()=>{tt("download"),q.spinning=!1})).finally((()=>{q.visible=!1})))})();break;default:{q.visible=!1;const i=q.formatList.find((e=>e.id===t))||{};if(Object.keys(i).length>0){S(t)&&(B||2==q.iReportExecuteMode)?K.value=_.value.filter((t=>"formatEditText"!=t.key)):K.value=_.value,q.currentFormatId=t;const[e]=K.value;e.label=(null==i?void 0:i.name)||e.label,await j({formatForms:[{...i}],name:A.name||i.templateName,number:A.number||i.number,templateId:A.templateId||i.templateId,...A.id?{id:A.id}:{}},{token:C.token})}else null==(r=null==(n=C.externalOptionConfig)?void 0:n.onSelect)||r.call(n,t,e);break}}},at=()=>{q.visible=!1,z("clickoutside")},ot=()=>(q.isInited=!1,q.spinning=!1,setTimeout((()=>{q.visible=!1}),0),!1),lt=(t,e,n)=>{const r={};return e.forEach((e=>{let i=((t,e)=>{const n={DATE:"yyyy-MM-dd",DATETIME:"yyyy-MM-dd HH:mm:ss"};let r=e;return Object.keys(n).includes(t.type)&&e&&e instanceof Date&&(r=M(e,n[t.type])),(null==t?void 0:t.defaultValue)||r})(e,t[e[n]]);t[e[n]]&&i&&(r[e[n]]=i)})),r},st=({customizeDataset:t=[],param:e=[]},n=[])=>n.map((n=>{let r={};return t.forEach((t=>{const e=t.dataSetting[0].selectFieldList;r.datasetData={[t.name]:JSON.stringify(lt(n,e,"fieldName"))}})),r=Object.assign({},r,lt(n,e,"key")),r})),pt=async t=>{var e,n;if(q.formatList=t?(t=>{let e=[];return t&&t.forEach((t=>{if(!t.format)return!1;e.push(...t.format.map((e=>Object.assign({},e,{templateName:t.name}))))})),e})(t.obj):[],q.iReportExecuteMode=(null==(e=null==t?void 0:t.obj)?void 0:e.length)>0&&t.obj[0].iReportExecuteMode||1,q.currentFormatId=await(async(t,e)=>{var n;if(!(null==t?void 0:t.length))return"";if(!N.isDoc){const{data:e}=await O({templateId:t[0].templateId},{token:C.token});if("SUCCESS"===e.result){const{formatForms:r=[]}=e.map||{};Object.assign(A,e.map||{});const i=null==(n=null==r?void 0:r[0])?void 0:n.id;if(i&&t.map((t=>t.id)).includes(i))return i}}const r=t.find((t=>1==t[e]));return(null==r?void 0:r.id)||t[0].id})(q.formatList,"defaultFlag"),!q.currentFormatId)return K.value=[],V.error(C.noDefaultFormatMsg),ot();(()=>{var t;const e=q.formatList.map((t=>({label:t.name,key:t.id})));K.value.unshift({label:H.value,key:"format",children:e}),C.hideButtons.length>0&&(K.value=K.value.filter((t=>!C.hideButtons.includes(t.key))));const n=sessionStorage.getItem("portal");if(n){const e=JSON.parse(n),r=(null==(t=null==e?void 0:e.user)?void 0:t.currentRoleResourceObj)||{},i=Object.keys(r);i.includes("RY7.2.21.1.M2.G94181E")||(K.value=K.value.filter((t=>"downloadPdf"!=t.key))),i.includes("RY7.2.21.1.M2.G33633A")||(K.value=K.value.filter((t=>"formatEditText"!=t.key)))}_.value=L(K.value),S(q.currentFormatId)&&(B||2==q.iReportExecuteMode)&&(K.value=_.value.filter((t=>"formatEditText"!=t.key)))})();let r=null==(n=await C.queryTemplateParams())?void 0:n.obj;if(!r||!Y.value)return V.error("获取打印模板失败,请联系管理员!"),ot();q.templateParams=r,q.printParams=st(q.templateParams,C.params)},dt=async()=>{var t;if(q.isInited)return!0;q.isInited=!0,q.spinning=!0,(()=>{if(U)return!1;U=new T})();const e=await C.queryPrintFormatByNumber();return await pt(e),(null==(t=e.obj)?void 0:t.length)>0&&(J.value=e.obj[0].authorizationKey||""),q.spinning=!1,!0},ut=async(t=!0)=>{var e,n;if(await C.clickPrevFn())if((null==(e=C.params)?void 0:e.length)||(null==(n=C.printParams)?void 0:n.length)){if(!q.visible){if(!await dt())return!1}t&&(q.visible=!q.visible)}else V.warning(C.noDataMsg)},mt=()=>{q.watchPrintParamsReformatFn&&q.watchPrintParamsReformatFn(),q.isInited?q.printParams=st(q.templateParams,C.params):q.watchPrintParamsReformatFn=()=>l((()=>q.isInited),(t=>{if(!t)return!1;mt()}))},ct=t=>{if(q.identityVerification.visible=!1,S(q.currentFormatId))return W(null,"edit");const e={formatId:q.currentFormatId,templateId:Y.value,params:et(),token:t};U.editPrintFormat(e,(t=>{W(t,"edit")}),X)};async function ft(){await ut(!1),rt()}return o((()=>{q.isInited=!1})),l((()=>C.params),(t=>{if(!(null==t?void 0:t.length))return!1;mt()}),{deep:!0}),R({directPrint:ft}),(e,n)=>(s(),p(d,null,[u(m(P),{class:"c-dropdown",placement:t.placement,trigger:"click",show:q.visible,onClickoutside:at,options:m(K),onSelect:it,"render-label":Q},{default:c((()=>[f(e.$slots,"button",{handleClickPrintBtn:ut,printSpinning:q.spinning,printbtnText:t.btnText,printVisible:q.visible},(()=>[u(m(w),{class:"dropdown-button",loading:t.showLoading&&q.spinning,onClick:n[1]||(n[1]=v((()=>$("button")),["stop"]))},{default:c((()=>[y(g(t.btnText)+" ",1),u(m(F),{component:m(x),size:"18",style:{"margin-left":"5px"},onClick:n[0]||(n[0]=v((()=>$("icon")),["stop"]))},null,8,["component"])])),_:1},8,["loading"])]))])),_:3},8,["placement","show","options"]),u(E,b(m(N),{modelValue:q.identityVerification.visible,"onUpdate:modelValue":n[2]||(n[2]=t=>q.identityVerification.visible=t),formatId:q.currentFormatId,templateId:m(Y),onSuccess:ct}),null,16,["modelValue","formatId","templateId"])],64))}});export{R as default};
|
@@ -4236,6 +4236,8 @@ export declare const CallbackMaps: Map<string, {
|
|
4236
4236
|
stickyFixedConfig?: {
|
4237
4237
|
enable?: boolean | undefined;
|
4238
4238
|
} | undefined;
|
4239
|
+
tableRowHeight?: string | number | undefined;
|
4240
|
+
tableHeaderRowHeight?: string | number | undefined;
|
4239
4241
|
onFormChange?: ((payload_0: import("../../../../../components/iho-table").IhoTableFormChangePayload) => void) | undefined;
|
4240
4242
|
onScroll?: ((params: import("vxe-table").VxeTableDefines.ScrollEventParams) => void) | undefined;
|
4241
4243
|
onKeydown?: ((params: import("vxe-table").VxeTableDefines.KeydownEventParams) => void) | undefined;
|
@@ -7812,6 +7814,8 @@ export declare const CallbackMaps: Map<string, {
|
|
7812
7814
|
stickyFixedConfig?: {
|
7813
7815
|
enable?: boolean | undefined;
|
7814
7816
|
} | undefined;
|
7817
|
+
tableRowHeight?: string | number | undefined;
|
7818
|
+
tableHeaderRowHeight?: string | number | undefined;
|
7815
7819
|
onFormChange?: ((payload_0: import("../../../../../components/iho-table").IhoTableFormChangePayload) => void) | undefined;
|
7816
7820
|
onSettingClick?: (() => void) | undefined;
|
7817
7821
|
onFormClick?: ((payload_0: import("../../../../../components/iho-table").IhoTableFormChangePayload) => void) | undefined;
|
@@ -1 +1 @@
|
|
1
|
-
import{fabric as t}from"../../../../../shared/utils/fabricjs/index.js";import{drawLine as e,drawArrow as n,drawPoint as i,defaultStyle as o,drawText as r,defaultTextStyle as l,drawTextAndIconGroup as s,defaultRectStyle as a}from"../useDraw.js";import{useGrid as c}from"../useGrid.js";import{useBirthProcessCumputedPoint as u}from"../useCumputedPoint.js";import"../useEvent.js";import{getScaleInfo as d,drawScaleNumber as h,drawScaleLine as f}from"../useScaleColumn.js";import{useCommon as p}from"../useCommon.js";import"vue";import{getIndex as g,isEffectiveNode as m,getTime as v,getScaleNumberList as y}from"../../utils/index.js";import{cloneDeep as k,last as b,range as x}from"lodash-es";import"../temperature/useShadow.js";import"@vueuse/shared";import{format as w}from"date-fns";import"naive-ui";import"@vueuse/core";function S(S,C,j,P,I){const{computedX:E,computedY:T,getXValue:X,getYValue:A}=u(C),{getEqualXTypes:L,handleAddPrevent:Y,isGridLimit:M,setPrevAndNextPoint:H,getPointEventProps:z}=p(S,j,C),{xAxis:G,grid:W,originX:D,originY:N,xCellWidth:O,endY:R,startTime:V,leftAddAreaWidth:B,leftScales:F,rightScales:$,yCellHeight:q,endX:J,scaleValues:K,canvasWidth:Q,borderStyle:U,rightAddAreaWidth:Z,event:_,originYCervix:tt,other:et,canvasHeight:nt,scalebarBorder:it}=C,ot=k(K),rt=new Set;function lt(){ot.filter((({showData:t=!0})=>t)).forEach(((t,s)=>{var a;const c=[],u=[],d=[];null==(a=t.data)||a.forEach(((a,h)=>{!function(a,h,f){let p,g;const{pointAttr:m={},lineAttr:v={},title:y="",key:k,type:b="circle",childbirthStyle:x={}}=t,w=t.data[f+1],C=dt(w,t);if(a&&C&&!h.breakpoint)g=e([...a,...C],{...v});else if(a&&!C&&!h.breakpoint){const n=dt(w,t);g=n?e([...a,...n],{...v}):null}let I,E;if(h.childbirth){const{type:t="arrow",style:e={}}=x;if("arrow"===t){const t=a[1]+q;I=n([a[0],a[1],t],e)}else I=i(t,{left:a[0],top:a[1],...e,...o,hoverCursor:"default"});E=r([a[0]+O/2,a[1]+q/2],{value:String(h.childbirth),...l,originX:"left",originY:"center",fill:e.stroke||e.fill,fontSize:e.fontSize||l.fontSize}),I&&d.push(I),d.push(E)}const T=u[f-1],L={origin:{data:h,title:y,key:k||"",dataIndex:s,index:f},leftLine:T,rightLine:g,childbirthIcon:I,childbirthText:E,...m,...z()};a&&(T||(L.leftLine=null),p=i(b,{left:a[0],top:a[1],...L}));u.push(g),p&&(!function(t){_.hovered&&(t.on("mouseover",(()=>{ut(t,"hover")})),t.on("mouseout",(()=>{P.show=!1})));if(t.lockMovementX&&t.lockMovementY)return;t.on("moving",(()=>{ct(t),function(t){var e,n,i,o;null==(e=t.leftLine)||e.setCoords().set({x2:t.left,y2:t.top}),null==(n=t.rightLine)||n.setCoords().set({x1:t.left,y1:t.top}),null==(i=t.childbirthIcon)||i.setCoords().set({left:t.left,top:t.top}),null==(o=t.childbirthText)||o.setCoords().set({left:t.left+O/2,top:t.top+q/2})}(t),_.hovered&&ut(t)})),t.on("mouseup",(e=>{if(P.show=!1,1===e.button){const{key:e}=t.origin,n={...t.origin,data:{...t.origin.data,time:X(t.left),value:A(e,t.top)}};S.value.discardActiveObject(),j("change",n),st(n,"change")}}))}(p),c.push(p),rt.add(p))}(dt(a,t),a,h)})),Promise.all(c).then((t=>{const e=u.filter((t=>t));H(t),Promise.all(d).then((n=>{S.value.add(...e,...t,...n),t.forEach((t=>{null==t||t.bringToFront();const{childbirthIcon:e}=t;e&&Reflect.has(e,"zIndex")&&e.zIndex>0&&e.bringToFront()}))}))}))}))}function st(t,e="add"){const{dataIndex:n,data:i,index:o,key:r}=t,l=ot.find((t=>t.key===r));switch(e){case"remove":l.data.splice(o,1);break;case"change":l.data[o]=i;break;default:{const t=g(i.time,l.data);l.data.splice(t,0,i);break}}at()}function at(){var t;rt.size&&(null==(t=S.value)||t.remove(...function(t){const e=[];return t.forEach((t=>{t&&e.push(t),(null==t?void 0:t.leftLine)&&e.push(null==t?void 0:t.leftLine),(null==t?void 0:t.rightLine)&&e.push(null==t?void 0:t.rightLine),(null==t?void 0:t.childbirthIcon)&&e.push(null==t?void 0:t.childbirthIcon),(null==t?void 0:t.childbirthText)&&e.push(null==t?void 0:t.childbirthText)})),e}([...rt]))),rt.clear(),lt()}function ct(t){const e=t.prevPoint?t.prevPoint.left:D,n=t.nextPoint?t.nextPoint.left:J;t.setCoords(),["cervix","fetalPresentation"].includes(t.origin.key)&&t.top<tt&&t.set("top",tt),t.top<N&&t.set("top",N),t.top>R&&t.set("top",R),t.left<e&&t.set("left",e),t.left>n&&t.set("left",n)}function ut(t,e="moving"){const{title:n,key:i,data:o}=t.origin;P.point={x:t.left,y:t.top},P.list=[`${n} ${"hover"===e?o.value:A(i,t.top)}`,`时间 ${X(t.left).slice(-5)}`],P.show=!0}function dt(t,e){if(m(t)&&function(t){const e=V+864e5,n=v(t);return n>=V&&n<=e}(t.time)){const n=E(t.time),i=T(e.key,e.range,t.value);return[n,i<N?N:i>R?R:i]}}function ht(t,e){return t+1>e[1]?e[0]:t+1}return c(S,C),function(){const e=it?{width:Q-B-Z-1,left:B}:{width:J-D-($.length?0:1),left:D},n=new t.Rect({...U,height:R-1,top:0,fill:"transparent",...e});S.value.add(n)}(),function(){function e(e,n="left"){let i="left"===n?B:J;e.forEach(((e,n)=>{const{range:s,spaceValue:c,width:u,title:p,titleStyle:g,key:m,position:v="center",spaceGridNumber:k=1,showNumber:b,showMaxMinNumber:x}=e,w=[],C=[],j=i+u/2,P=y(s,c),I=P.length,{lineXMain:E,lineXSub:T,textLeft:X}=d(v,i,u);P.forEach(((t,n)=>{const i=R-n*q*k,o=0===n?R-8:n!==P.length-1||N||tt&&"FHR"!==m?i:N+8;!b||(0===n||n===I-1)&&!x||w.push(h(String(t),e,X,o)),C.push(...f(e,n,E,T,i,q,N,I,1))}));const A=[],L=it?new t.Rect({...a,strokeWidth:.5,width:u,height:R,left:j,top:R/2}):null;L&&A.push(L);const Y=r([j,N>0?N-q/2:q/2],{value:String(p),...l,...g});Y&&A.push(Y);const M=new t.Group([...C,...w,...A],{objectCaching:!1,...o});S.value.add(M),M.sendToBack(),i+=u}))}e(F),e($,"right")}(),function(){const{show:e,startTime:n,range:i=[0,23],position:s="top",style:a}=G.time,{show:c,range:u=[0,23],position:d,style:h={}}=G.processTime;if(e||c){const f=[],p=x(u[0],u[1]+1),g=[],m=[],v=q/2;for(let t=0;t<W.mainXCell;t++){if(e){const{textAlign:e="center"}=a,o=D+("center"===e?O/2:0),c=0===t&&"center"!==e?o+5:o,u=0===t?+n.slice(11,13):ht(b(f),i);f.push(u);const d="top"===s?N-v:R+v;g.push(r([c+t*O,d],{value:String(u),...l,...a})),t===W.mainXCell-1&&"center"!==e&&g.push(r([J-1,d],{value:String(ht(b(f),i)),...l,...a,originX:"center"!==e?"right":"center"}))}if(c&&t<=p.length){const{textAlign:e="center"}=h,n=D+("center"===e?O/2:0),i=0===t&&"center"!==e?n+5:n,o="top"===d?v:nt-v;m.push(r([i+t*O,o],{value:String(p[t]),...l,...h})),t===W.mainXCell-1&&"center"!==e&&m.push(r([J-1,o],{value:String(b(p)),...l,...a,originX:"center"!==e?"right":"center"}))}}const y=new t.Group([...g,...m],{objectCaching:!1,...o});S.value.add(y),S.value.sendToBack(y)}}(),function(){var t;const n=Object.values(et),i=[],o={},r=ot.find((t=>"cervix"===t.key&&t.show)),l=null==(t=null==r?void 0:r.data)?void 0:t.find((t=>3==+t.value));function s(t,e){const{key:n,range:i}=r||{},o=T(n,i,10),l=[0,e],s=[-e/t,0],a=[(R-o-e)/t,R-o],c=[J-D,t*(J-D)+e];let u=[],d=[];function h([n,i]){return Math.abs(i-t*n-e)<=1}function f([t,e]){const[n,i]=[...p([t,e])];return n>=D&&n<=J&&i>=o&&i<=R}function p([t,e]){return[D+t,R-e]}return h(l)&&f(l)&&(u=p(l)),h(s)&&f(s)&&(u=p(s)),h(a)&&f(a)&&(d=p(a)),h(c)&&f(c)&&(d=p(c)),[...u,...d]}n.forEach((t=>{if(!t.show)return;const{key:n}=t;switch(n){case"fetalPresentation":{const{range:o,show:r}=ot.find((t=>t.key===n));if(r){const r=T(n,o,0);i.push(e([D,r,J,r],{...t}))}break}case"alert":if(l){const{key:n,range:a}=r||{},c=216e5,u={time:w(new Date(v(l.time)+c),"yyyy-MM-dd HH:mm"),value:10},[d,h]=[E(l.time)-D,R-T(n,a,l.value)],[f,p]=[E(u.time)-D,R-T(n,a,u.value)],g=(p-h)/(f-d),m=h-d*g,y=s(g,m);y.length>0&&(i.push(e(y,{...t})),Object.assign(o,{k:g,b:m}))}break;case"handling":if(l){const{k:n,b:r}=o,a=144e5,c=s(n,r-(E(w(new Date(v(l.time)+a),"yyyy-MM-dd HH:mm"))-E(l.time))*n);c.length>0&&i.push(e(c,{...t}))}}})),S.value.add(...i)}(),lt(),function(){function t(t,e){const n=ot.findIndex((e=>e.key===t.key));return{renderItem:()=>t.title,origin:{title:t.title,unit:t.unit,dataIndex:n,key:t.key},pointer:e}}C.event.evented&&S.value.on("mouse:up",(e=>{if(3===e.button){const{x:n=0,y:i=0}=e.pointer||{};n>=D&&n<=J&&i>=N&&i<=R&&(I.point={x:n,y:i},I.show=!0,e.target?(I.target=e.target,I.list=["删除节点"],[...rt].forEach((t=>{t.origin&&t.left===e.target.left&&t.top===e.target.top&&I.list.push({renderItem:()=>t.origin.title,origin:{...t.origin},mode:"remove",pointer:e.pointer})}))):(I.target=null,I.list=["新增节点"],ot.filter((t=>t.show)).forEach((o=>{if(!L([...rt],n,"key").includes(o.key)){if(["cervix","fetalPresentation"].includes(o.key)&&i<tt)return;I.list.push(t(o,e.pointer))}})),1===I.list.length&&(I.show=!1,Y("repeat"),console.log("当前时间段内无可新增节点"))))}}))}(),function(){const t=Q-Z/2;function e(t,e){if(!t.length)return;let i=N;const o=[];t.forEach((t=>{const n=t.title.split("").join("\n"),r=K.findIndex((e=>e.key===t.key)),{text:l,icon:a}=s(n,t,{text:{originY:"top",left:e,top:i},icon:{left:e,topY:i,originY:"top",origin:{type:t.type,dataIndex:r},...C.event}},"vertical");var c;i+=l.height+a.height+15,(c=a).on("moving",(()=>{c.set("originY","center"),M(c)?(ct(c),ut(c)):P.show=!1})),c.on("mouseup:before",(t=>{if(P.show=!1,0===t.e.button&&M(c))if(L([...rt],c.left,"key").includes(c.origin.key))Y("repeat");else{const t={data:{time:X(c.left),value:A(c.origin.key,c.top)},...c.origin};j("add",t),st(t)}!function(t){t.setCoords().set({originY:"top",left:t.originLeft,top:t.originTop})}(c)})),o.push(l,a)})),n(o),S.value.add(...o)}function n(t){const e=b(t),n=(R-N)/2,i=(e.height+e.top-N)/2;t.forEach((t=>{const e=t.top+n-i;t.set({top:e,originTop:e})}))}e(F,B/2),e($,t)}(),{clickMenu:function({item:t,target:e}){const n={...t.origin};"remove"===t.mode?(j("remove",n),st(n,"remove")):(Object.assign(n,{data:{time:X(t.pointer.x),value:A(t.origin.key,t.pointer.y)}}),j("add",n),st(n))},redrawPoints:at}}export{S as useBirthProcess};
|
1
|
+
import{fabric as e}from"../../../../../shared/utils/fabricjs/index.js";import{drawLine as t,drawArrow as o,drawPoint as n,defaultStyle as i,drawText as r,defaultTextStyle as l,drawTextAndIconGroup as s,defaultRectStyle as a}from"../useDraw.js";import{useGrid as c}from"../useGrid.js";import{useBirthProcessCumputedPoint as u}from"../useCumputedPoint.js";import"../useEvent.js";import{getScaleInfo as f,drawScaleNumber as d,drawScaleLine as h}from"../useScaleColumn.js";import{useCommon as p}from"../useCommon.js";import"vue";import{getIndex as g,isEffectiveNode as v,getTime as m,getScaleNumberList as y}from"../../utils/index.js";import{cloneDeep as b,last as k,range as j}from"lodash-es";import"../temperature/useShadow.js";import"@vueuse/shared";import{format as w}from"date-fns";import"naive-ui";import"@vueuse/core";function x(x,S,C,P,E){const{computedX:X,computedY:O,getXValue:A,getYValue:L}=u(S),{getEqualXTypes:M,handleAddPrevent:Y,isGridLimit:H,setPrevAndNextPoint:T,getPointEventProps:I}=p(x,C,S),{xAxis:D,grid:G,originX:N,originY:W,xCellWidth:z,endY:V,startTime:B,leftAddAreaWidth:F,leftScales:R,rightScales:$,yCellHeight:q,endX:J,scaleValues:K,canvasWidth:Q,borderStyle:U,rightAddAreaWidth:Z,event:_,originYCervix:ee,other:te,canvasHeight:oe,scalebarBorder:ne,padding:ie}=S,re=b(K),le=new Set;function se(){re.filter((({showData:e=!0})=>e)).forEach(((e,s)=>{var a;const c=[],u=[],f=[],{pointAttr:d={},lineAttr:h={},title:p="",key:g,type:v="circle",childbirthStyle:m={},surgicalDeliveryStyle:y={},dystociaStyle:b={}}=e;function k(r,l,s,a){if(l[s]){const{type:c="circle",style:u={},arrowStyle:d={}}=e[s+"Style"],p=X(l[s]),g=t([...r,p,r[1]],{...h,strokeDashArray:[4,2],...i}),v=n(c,{left:p,top:r[1],...u,...i}),m=r[1]+v.height/2,y="dystocia"===s?o([p,m+q,m],h,"up"):null;g&&(f.push(g),a[s+"Line"]={obj:g,type:"line",left:p-r[0]}),v&&(f.push(v),a[s]={obj:v,left:p-r[0]}),y&&(f.push(y),a[s+"Arrow"]={obj:y,left:p-r[0],moveHide:!0})}}null==(a=e.data)||a.forEach(((a,y)=>{!function(a,y,b){let j,S;const E=e.data[b+1],X=de(E,e);if(a&&X&&!y.breakpoint)S=t([...a,...X],{...h});else if(a&&!X&&!y.breakpoint){const o=de(E,e);S=o?t([...a,...o],{...h}):null}const O={};if("cervix"===g){let e,t;if(y.childbirth){const{type:s="arrow",style:c={}}=m;if("arrow"===s){const t=a[1]+q;e=o([a[0],a[1],t],c)}else e=n(s,{left:a[0],top:a[1],...c,...i,hoverCursor:"default"});t=r([a[0]+z/2,a[1]+q/2],{value:String(y.childbirth),...l,originX:"left",originY:"center",fill:c.stroke||c.fill,fontSize:c.fontSize||l.fontSize}),e&&(f.push(e),Object.assign(O,{childbirthIcon:{obj:e,type:s}})),t&&(f.push(t),Object.assign(O,{childbirthText:{obj:t,left:z/2,top:q/2}}))}}"fetalPresentation"===g&&(k(a,y,"surgicalDelivery",O),k(a,y,"dystocia",O));const M=u[b-1],Y={origin:{data:y,title:p,key:g||"",dataIndex:s,index:b},leftLine:M,rightLine:S,otherObj:O,...d,...I()};a&&(M||(Y.leftLine=null),j=n(v,{left:a[0],top:a[1],...Y}));u.push(S),j&&(!function(e){_.hovered&&(e.on("mouseover",(()=>{fe(e,"hover")})),e.on("mouseout",(()=>{P.show=!1})));if(e.lockMovementX&&e.lockMovementY)return;e.on("moving",(()=>{ue(e),function(e){var t,o;null==(t=e.leftLine)||t.setCoords().set({x2:e.left,y2:e.top}),null==(o=e.rightLine)||o.setCoords().set({x1:e.left,y1:e.top}),Object.values(e.otherObj).forEach((t=>{const{obj:o,top:n=0,left:i=0,type:r="",moveHide:l}=t||{};o&&("line"===r?o.setCoords().set({x1:e.left,y1:e.top,x2:e.left+i,y2:e.top}):o.setCoords().set({left:e.left+i,top:e.top+n}),l&&(x.value.remove(o),delete e.otherObj.obj))}))}(e),_.hovered&&fe(e)})),e.on("mouseup",(t=>{if(P.show=!1,1===t.button){const{key:t}=e.origin,o={...e.origin,data:{...e.origin.data,time:A(e.left),value:L(t,e.top)}};["surgicalDelivery","dystocia"].some((t=>{var n;(null==(n=e.otherObj[t])?void 0:n.obj)&&(o.data[t]=w(new Date(A(e.left+e.otherObj[t].left)),"yyyy-MM-dd HH:mm"))})),x.value.discardActiveObject(),C("change",o),ae(o,"change")}}))}(j),c.push(j),le.add(j))}(de(a,e),a,y)})),Promise.all(c).then((e=>{const t=u.filter((e=>e));T(e),Promise.all(f).then((o=>{x.value.add(...t,...e,...o),e.forEach((e=>{null==e||e.bringToFront();const{childbirthIcon:t}=e.otherObj||{};(null==t?void 0:t.obj)&&"arrow"!==(null==t?void 0:t.type)&&t.obj.bringToFront()}))}))}))}))}function ae(e,t="add"){const{dataIndex:o,data:n,index:i,key:r}=e,l=re.find((e=>e.key===r));switch(t){case"remove":l.data.splice(i,1);break;case"change":l.data[i]=n;break;default:{const e=g(n.time,l.data);l.data.splice(e,0,n);break}}ce()}function ce(){var e;le.size&&(null==(e=x.value)||e.remove(...function(e){const t=[];return e.forEach((e=>{e&&t.push(e),(null==e?void 0:e.leftLine)&&t.push(null==e?void 0:e.leftLine),(null==e?void 0:e.rightLine)&&t.push(null==e?void 0:e.rightLine),Object.values((null==e?void 0:e.otherObj)||{}).forEach((e=>{(null==e?void 0:e.obj)&&t.push(null==e?void 0:e.obj)}))})),t}([...le]))),le.clear(),se()}function ue(e){const t=e.prevPoint?e.prevPoint.left:N,o=e.nextPoint?e.nextPoint.left:J;e.setCoords(),["cervix","fetalPresentation"].includes(e.origin.key)&&e.top<ee&&e.set("top",ee),e.top<W&&e.set("top",W),e.top>V&&e.set("top",V),e.left<t&&e.set("left",t),e.left>o&&e.set("left",o)}function fe(e,t="moving"){const{title:o,key:n,data:i}=e.origin;P.point={x:e.left,y:e.top},P.list=[`${o} ${"hover"===t?i.value:L(n,e.top)}`,`时间 ${A(e.left).slice(-5)}`],P.show=!0}function de(e,t){if(v(e)&&function(e){const t=B+864e5,o=m(e);return o>=B&&o<=t}(e.time)){const o=X(e.time),n=O(t.key,t.range,e.value);return[o,n<W?W:n>V?V:n]}}function he(e,t){return e+1>t[1]?t[0]:e+1}return c(x,S),function(){const t=ne?{width:Q-F-Z-1,left:F}:{width:J-N-($.length?0:1),left:N},o=new e.Rect({...U,height:V-ie[0]-1,top:ie[0],fill:"transparent",...t});x.value.add(o)}(),function(){function t(t,o="left"){let n="left"===o?F:J;t.forEach(((t,o)=>{const{range:s,spaceValue:c,width:u,title:p,titleStyle:g,key:v,position:m="center",spaceGridNumber:b=1,showNumber:k=!0,showMaxMinNumber:j=!0,showName:w=!0}=t,S=[],C=[],P=n+u/2,E=y(s,c),X=E.length,{lineXMain:O,lineXSub:A,textLeft:L}=f(m,n,u);E.forEach(((e,o)=>{const n=V-o*q*b,i=0===o?V-8:o!==E.length-1||!ie[0]||ee&&"FHR"!==v?n:W+8;!k||(0===o||o===X-1)&&!j||S.push(d(String(e),t,L,i)),C.push(...h(t,o,O,A,n,q,W,X,1))}));const M=[],Y=ne?new e.Rect({...a,strokeWidth:.5,width:u,height:V-ie[0],left:P,top:ie[0]+(V-ie[0])/2}):null;if(Y&&M.push(Y),w){const e=r([P,W-ie[0]>0?W-q/2:q/2],{value:String(p),...l,...g});e&&M.push(e)}const H=new e.Group([...C,...S,...M],{objectCaching:!1,...i});x.value.add(H),H.sendToBack(),n+=u}))}t(R),t($,"right")}(),function(){const{show:t,startTime:o,range:n=[0,23],position:s="top",style:a}=D.time,{show:c,range:u=[0,23],position:f,style:d={}}=D.processTime;if(t||c){const h=[],p=j(u[0],u[1]+1),g=[],v=[],m=q/2;for(let e=0;e<G.mainXCell;e++){if(t){const{textAlign:t="center"}=a,i=N+("center"===t?z/2:0),c=0===e&&"center"!==t?i+5:i,u=0===e?+o.slice(11,13):he(k(h),n);h.push(u);const f="top"===s?W-m:V+m;g.push(r([c+e*z,f],{value:String(u),...l,...a})),e===G.mainXCell-1&&"center"!==t&&g.push(r([J-1,f],{value:String(he(k(h),n)),...l,...a,originX:"center"!==t?"right":"center"}))}if(c&&e<=p.length){const{textAlign:t="center"}=d,o=N+("center"===t?z/2:0),n=0===e&&"center"!==t?o+5:o,i="top"===f?m:oe-m;v.push(r([n+e*z,i],{value:String(p[e]),...l,...d})),e===G.mainXCell-1&&"center"!==t&&v.push(r([J-1,i],{value:String(k(p)),...l,...a,originX:"center"!==t?"right":"center"}))}}const y=new e.Group([...g,...v],{objectCaching:!1,...i});x.value.add(y),x.value.sendToBack(y)}}(),function(){var e;const o=Object.values(te),n=[],i={},r=re.find((e=>"cervix"===e.key&&e.show)),l=null==(e=null==r?void 0:r.data)?void 0:e.find((e=>3==+e.value));function s(e,t){const{key:o,range:n}=r||{},i=O(o,n,10),l=[0,t],s=[-t/e,0],a=[(V-i-t)/e,V-i],c=[J-N,e*(J-N)+t];let u=[],f=[];function d([o,n]){return Math.abs(n-e*o-t)<=1}function h([e,t]){const[o,n]=[...p([e,t])];return o>=N&&o<=J&&n>=i&&n<=V}function p([e,t]){return[N+e,V-t]}return d(l)&&h(l)&&(u=p(l)),d(s)&&h(s)&&(u=p(s)),d(a)&&h(a)&&(f=p(a)),d(c)&&h(c)&&(f=p(c)),[...u,...f]}o.forEach((e=>{if(!e.show)return;const{key:o}=e;switch(o){case"fetalPresentation":{const{range:i,show:r}=re.find((e=>e.key===o));if(r){const r=O(o,i,0);n.push(t([N,r,J,r],{...e}))}break}case"alert":if(l){const{key:o,range:a}=r||{},c=216e5,u={time:w(new Date(m(l.time)+c),"yyyy-MM-dd HH:mm"),value:10},[f,d]=[X(l.time)-N,V-O(o,a,l.value)],[h,p]=[X(u.time)-N,V-O(o,a,u.value)],g=(p-d)/(h-f),v=d-f*g,y=s(g,v);y.length>0&&(n.push(t(y,{...e})),Object.assign(i,{k:g,b:v}))}break;case"handling":if(l){const{k:o,b:r}=i,a=144e5,c=s(o,r-(X(w(new Date(m(l.time)+a),"yyyy-MM-dd HH:mm"))-X(l.time))*o);c.length>0&&n.push(t(c,{...e}))}}})),x.value.add(...n)}(),se(),function(){function e(e,t){const o=re.findIndex((t=>t.key===e.key));return{renderItem:()=>e.title,origin:{title:e.title,unit:e.unit,dataIndex:o,key:e.key},pointer:t}}S.event.evented&&x.value.on("mouse:up",(t=>{if(3===t.button){const{x:o=0,y:n=0}=t.pointer||{};o>=N&&o<=J&&n>=W&&n<=V&&(E.point={x:o,y:n},E.show=!0,t.target?(E.target=t.target,E.list=["删除节点"],[...le].forEach((e=>{e.origin&&e.left===t.target.left&&e.top===t.target.top&&E.list.push({renderItem:()=>e.origin.title,origin:{...e.origin},mode:"remove",pointer:t.pointer})}))):(E.target=null,E.list=["新增节点"],re.filter((e=>e.show)).forEach((i=>{if(!M([...le],o,"key").includes(i.key)){if(["cervix","fetalPresentation"].includes(i.key)&&n<ee)return;E.list.push(e(i,t.pointer))}})),1===E.list.length&&(E.show=!1,Y("repeat"),console.log("当前时间段内无可新增节点"))))}}))}(),function(){const e=Q-Z/2;function t(e,t){if(!e.length)return;let n=W;const i=[];e.forEach((e=>{const o=(e.alias||e.title).split("").join("\n"),a=K.findIndex((t=>t.key===e.key));if(e.alias){const s=r([t,n],{value:o,...l,originY:"top",...e.titleStyle});o&&(n+=s.height+15,i.push(s))}else{const{text:r,icon:l}=s(o,e,{text:{originX:"center",originY:"top",left:t,top:n},icon:{left:t,topY:n,originX:"center",originY:"top",origin:{type:e.type,dataIndex:a},...S.event}},"vertical");n+=r.height+l.height+15,(c=l).on("moving",(()=>{c.set("originY","center"),H(c)?(ue(c),fe(c)):P.show=!1})),c.on("mouseup:before",(e=>{if(P.show=!1,0===e.e.button&&H(c))if(M([...le],c.left,"key").includes(c.origin.key))Y("repeat");else{const e={data:{time:A(c.left),value:L(c.origin.key,c.top)},...c.origin};C("add",e),ae(e)}!function(e){e.setCoords().set({originY:"top",left:e.originLeft,top:e.originTop})}(c)})),i.push(r,l)}var c})),o(i),x.value.add(...i)}function o(e){const t=k(e),o=(V-W)/2,n=(t.height+t.top-W)/2;e.forEach((e=>{const t=e.top+o-n;e.set({top:t,originTop:t})}))}t(R,F/2),t($,e)}(),{clickMenu:function({item:e,target:t}){const o={...e.origin};"remove"===e.mode?(C("remove",o),ae(o,"remove")):(Object.assign(o,{data:{time:A(e.pointer.x),value:L(e.origin.key,e.pointer.y)}}),C("add",o),ae(o))},redrawPoints:ce}}export{x as useBirthProcess};
|
@@ -1 +1 @@
|
|
1
|
-
import{reactive as e,computed as a,watch as t,toRefs as l}from"vue";import{defaultBorderStyle as r}from"../useDraw.js";import"../../../../../shared/utils/fabricjs/index.js";import"date-fns";import{getTime as u}from"../../utils/index.js";import"lodash-es";import"../useEvent.js";import"../temperature/useShadow.js";import"@vueuse/shared";import"naive-ui";import"@vueuse/core";import{useBirthProcess as i}from"./useBirthProcess.js";function
|
1
|
+
import{reactive as e,computed as a,watch as t,toRefs as l}from"vue";import{defaultBorderStyle as r}from"../useDraw.js";import"../../../../../shared/utils/fabricjs/index.js";import"date-fns";import{getTime as u}from"../../utils/index.js";import"lodash-es";import"../useEvent.js";import"../temperature/useShadow.js";import"@vueuse/shared";import"naive-ui";import"@vueuse/core";import{useBirthProcess as i}from"./useBirthProcess.js";function n(n,d,s,o,v,c){const h=e({select:null,redrawPoints:null,clickMenu:null}),m=a((()=>d.data.scaleValues.map((e=>{var a;return{...e,width:null!=(a=e.width)?a:60}})).filter((({layout:e="left",show:a=!0})=>"left"===e&&a)))),f=a((()=>d.data.scaleValues.map((e=>{var a;return{...e,width:null!=(a=e.width)?a:60}})).filter((({layout:e="left",show:a=!0})=>"right"===e&&a)))),p=a((()=>{var e;return(null==(e=f.value)?void 0:e.length)?30:0})),g=a((()=>{var e;return 30+(null==(e=m.value)?void 0:e.reduce(((e,a)=>e+=a.width),0))})),w=a((()=>{var e;const{width:a}=d.data,t=null==(e=f.value)?void 0:e.reduce(((e,a)=>e+=a.width),0);return a-p.value-t})),x=a((()=>d.data.grid.mainXCell)),y=a((()=>{const e=d.data.grid.mainYCell||14;return d.data.scaleValues.find((e=>e.show&&"FHR"===e.key))||14!==e?e:10})),V=a((()=>(w.value-g.value)/x.value)),b=a((()=>[B("top")?0:5,B("bottom")?0:5])),k=a((()=>{const{height:e}=d.data,a=B();return(e-b.value.reduce(((e,a)=>e+a),0))/(y.value+a)})),C=a((()=>{const e=B("top");return k.value*e+b.value[0]})),j=a((()=>{var e;const{scaleValues:a}=d.data;if(!(null==(e=a.find((e=>"FHR"===e.key)))?void 0:e.show)&&!C.value)return C.value;const t=a.find((e=>"cervix"===e.key)),[,l]=(null==t?void 0:t.range)||[0,10],r=(null==t?void 0:t.spaceValue)||1;return A.value-b.value[0]-l*r*k.value})),A=a((()=>{const{height:e}=d.data,a=B("bottom");return e-k.value*a-b.value[1]})),Y=a((()=>u(d.data.xAxis.time.startTime))),S=a((()=>36e5/V.value)),H=a((()=>{const{scaleValues:e}=d.data,a=e.find((e=>"cervix"===e.key));return k.value/((null==a?void 0:a.spaceValue)||1)})),P=a((()=>{const{scaleValues:e}=d.data,a=e.find((e=>"FHR"===e.key));return k.value/((null==a?void 0:a.spaceValue)||10)})),R=a((()=>{const{scaleValues:e}=d.data,a=e.find((e=>"fetalPresentation"===e.key));return k.value/((null==a?void 0:a.spaceValue)||1)})),X=a((()=>{var e;return(null==(e=d.data.grid)?void 0:e.event)||{selectable:!0,evented:!0,hovered:!0}}));function B(e){const{xAxis:a}=d.data;return Object.values(a).reduce(((a,t)=>(t.show&&(!e||e&&t.position===e)&&a++,a)),0)}const F=e({canvasWidth:d.data.width,canvasHeight:d.data.height,borderStyle:{...r,...d.data.borderStyle||{}},selectionStyle:d.data.selectionStyle||{},grid:d.data.grid,other:d.data.other,originX:g.value,endX:w.value,originY:C.value,endY:A.value,xCellWidth:V.value,yCellHeight:k.value,gridXNumber:x.value,gridYNumber:y.value,xAxis:d.data.xAxis,leftScales:m.value,rightScales:f.value,leftAddAreaWidth:30,rightAddAreaWidth:p.value,startTime:Y.value,timeXCell:S.value,cervixYCell:H.value,FHRYCell:P.value,fetalPresentationYCell:R.value,scaleValues:d.data.scaleValues,event:X.value,originYCervix:j.value,scalebarBorder:!Reflect.has(d.data,"scalebarBorder")||d.data.scalebarBorder,padding:b.value});return t((()=>n.value),(e=>{e&&function(){const{clickMenu:e,redrawPoints:a}=i(n,F,s,v,c);h.redrawPoints=a,h.clickMenu=e}()}),{immediate:!0}),{propItems:F,...l(h)}}export{n as useBirthProcessChart};
|
@@ -1 +1 @@
|
|
1
|
-
import{fabric as e}from"../../../../shared/utils/fabricjs/index.js";const t={evented:!1,selectable:!1},i={stroke:"#000",strokeWidth:1,strokeUniform:!0,...t},n={stroke:"#000",strokeWidth:1,strokeDashArray:[0,0],strokeUniform:!0,...t},r={fill:"transparent",stroke:"#000",strokeWidth:1,originX:"center",originY:"center",objectCaching:!1,strokeUniform:!0,...t},o={fontFamily:"微软雅黑",fontSize:12,fill:"#000",centeredRotation:!0,originX:"center",originY:"center",lineHeight:1,objectCaching:!1,strokeUniform:!0,...t};function c(t,i){return new e.Line(t,{...n,...i})}function l([t,i],n){return new e.Text(String(n.value),{...o,left:t,top:i,...n})}function s([i,n,r],o,s="down"){const a=c([i,n,i,r],{strokeWidth:1,stroke:o.fill}),g=l([i+.5,"up"===s?r-3:r+3],{value:"v",originX:"center",originY:"bottom",fontSize:16,angle:"up"===s?180:0,objectCaching:!1,...o});return new e.Group([a,g],{...t,originX:"center",originY:"top",objectCaching:!1})}function a(i,n,c,l=!1){const s=new e.Rect({...r,...i,...l?{}:{stroke:"transparent"}}),{value:a="标题",textAlign:g="center",verticalAlign:u="center"}=n,f=i.width/2,h=i.height/2,d=new e.Text(String(a),{...o,...n,..."left"==g||"right"==g?{originX:g,left:"left"==g?-f:f}:{},..."top"==u||"bottom"==u?{originY:u,top:"top"==u?-h:h}:{}});return new e.Group([s,d],{objectCaching:!1,...t,...c})}function g(t){return new e.Circle({objectCaching:!1,strokeWidth:t.strokeWidth||1,stroke:t.stroke||"red",radius:t.radius||5,fill:"#fff"})}function u(t="circle",i){var n;const r={originX:"center",originY:"center",hasControls:!1,hasBorders:!1,hoverCursor:"pointer",objectCaching:!1,scale:1,...i},o=i.radius?(i.radius||5)+(i.strokeWidth||1):null!=(n=i.width)?n:0;switch(t){case"triangle":return new e.Triangle({width:20,height:20,strokeWidth:1,...r});case"circle":return new e.Circle({objectCaching:!1,strokeWidth:1,radius:5,...r});case"image":return new e.Image(i.element,r);case"yemai":{const t=()=>{const t=2*o,n={stroke:i.strokeX||"blue",strokeWidth:i.strokeWidthX||1,originX:"center",originY:"center"},r=new e.Line([0,o,t,o],n),c=new e.Line([o,0,o,t],n);return new e.Group([r,c])};return new e.Group([g(i),t()],r)}case"koumai":{const t=new e.Circle({objectCaching:!1,radius:i.radiusCircle||2,fill:i.fillCircle||"#000",originX:"center",originY:"center",left:o-.5,top:o-.5});return new e.Group([g(i),t],r)}case"circleAndText":{const t=new e.Text(String(i.text),{fontFamily:"微软雅黑",fontSize:r.fontSize||12,originX:"center",originY:"center",fill:i.stroke,left:o-.5,top:o-1,fontWeight:i.fontWeight||500,objectCaching:!1});return new e.Group([g(i),t],r)}default:return i&&Reflect.deleteProperty(i,"stroke"),new e.Text(String(t),{fontFamily:"微软雅黑",scale:1,fontSize:14,fill:"#000",...r})}}function f(i,n,r,o="horizontal"){const c=new e.Text(String(i),{...t,objectCaching:!1,...n.titleStyle||{},originX:"left",originY:"bottom",lineHeight:1,fontSize:12,...r.text}),{top:l,topY:s,left:a,leftX:g}=r.icon,f=null!=l?l:"horizontal"===o?s-(c.height||30)/2-1:s+c.height+3,h=null!=a?a:g+c.width+5;return{text:c,icon:u(n.type,{...n.pointAttr,originY:"center",originX:"left",originLeft:h,originTop:f,...r.icon,origin:{title:n.title,unit:n.unit,type:n.bigType,dataIndex:n.dataIndex,key:n.key,isMenu:!0,...r.icon.origin},left:h,top:f})}}export{i as defaultBorderStyle,n as defaultLineStyle,r as defaultRectStyle,t as defaultStyle,o as defaultTextStyle,s as drawArrow,c as drawLine,u as drawPoint,l as drawText,f as drawTextAndIconGroup,a as drawTextGroup};
|
1
|
+
import{fabric as e}from"../../../../shared/utils/fabricjs/index.js";const t={evented:!1,selectable:!1},i={stroke:"#000",strokeWidth:1,strokeUniform:!0,...t},n={stroke:"#000",strokeWidth:1,strokeDashArray:[0,0],strokeUniform:!0,...t},r={fill:"transparent",stroke:"#000",strokeWidth:1,originX:"center",originY:"center",objectCaching:!1,strokeUniform:!0,...t},o={fontFamily:"微软雅黑",fontSize:12,fill:"#000",centeredRotation:!0,originX:"center",originY:"center",lineHeight:1,objectCaching:!1,strokeUniform:!0,...t};function c(t,i){return new e.Line(t,{...n,...i})}function l([t,i],n){return new e.Text(String(n.value),{...o,left:t,top:i,...n})}function s([i,n,r],o,s="down"){const a=c([i,n,i,r],{strokeWidth:o.strokeWidth||1,stroke:o.fill||o.stroke}),g=l([i+.5,"up"===s?r-3:r+3],{value:"v",originX:"center",originY:"bottom",fontSize:16,angle:"up"===s?180:0,objectCaching:!1,...o});return new e.Group([a,g],{...t,originX:"center",originY:"top",objectCaching:!1})}function a(i,n,c,l=!1){const s=new e.Rect({...r,...i,...l?{}:{stroke:"transparent"}}),{value:a="标题",textAlign:g="center",verticalAlign:u="center"}=n,f=i.width/2,h=i.height/2,d=new e.Text(String(a),{...o,...n,..."left"==g||"right"==g?{originX:g,left:"left"==g?-f:f}:{},..."top"==u||"bottom"==u?{originY:u,top:"top"==u?-h:h}:{}});return new e.Group([s,d],{objectCaching:!1,...t,...c})}function g(t){return new e.Circle({objectCaching:!1,strokeWidth:t.strokeWidth||1,stroke:t.stroke||"red",radius:t.radius||5,fill:"#fff"})}function u(t="circle",i){var n;const r={originX:"center",originY:"center",hasControls:!1,hasBorders:!1,hoverCursor:"pointer",objectCaching:!1,scale:1,...i},o=i.radius?(i.radius||5)+(i.strokeWidth||1):null!=(n=i.width)?n:0;switch(t){case"triangle":return new e.Triangle({width:20,height:20,strokeWidth:1,...r});case"circle":return new e.Circle({objectCaching:!1,strokeWidth:1,radius:5,...r});case"image":return new e.Image(i.element,r);case"yemai":{const t=()=>{const t=2*o,n={stroke:i.strokeX||"blue",strokeWidth:i.strokeWidthX||1,originX:"center",originY:"center"},r=new e.Line([0,o,t,o],n),c=new e.Line([o,0,o,t],n);return new e.Group([r,c])};return new e.Group([g(i),t()],r)}case"koumai":{const t=new e.Circle({objectCaching:!1,radius:i.radiusCircle||2,fill:i.fillCircle||"#000",originX:"center",originY:"center",left:o-.5,top:o-.5});return new e.Group([g(i),t],r)}case"circleAndText":{const t=new e.Text(String(i.text),{fontFamily:"微软雅黑",fontSize:r.fontSize||12,originX:"center",originY:"center",fill:i.stroke,left:o-.5,top:o-1,fontWeight:i.fontWeight||500,objectCaching:!1});return new e.Group([g(i),t],r)}case"circleAndCircle":return u("koumai",i);default:return i&&Reflect.deleteProperty(i,"stroke"),new e.Text(String(t),{fontFamily:"微软雅黑",scale:1,fontSize:14,fill:"#000",...r})}}function f(i,n,r,o="horizontal"){const c=new e.Text(String(i),{...t,objectCaching:!1,...n.titleStyle||{},originX:"left",originY:"bottom",lineHeight:1,fontSize:12,...r.text}),{top:l,topY:s,left:a,leftX:g}=r.icon,f=null!=l?l:"horizontal"===o?s-(c.height||30)/2-1:s+c.height+3,h=null!=a?a:g+c.width+5;return{text:c,icon:u(n.type,{...n.pointAttr,originY:"center",originX:"left",originLeft:h,originTop:f,...r.icon,origin:{title:n.title,unit:n.unit,type:n.bigType,dataIndex:n.dataIndex,key:n.key,isMenu:!0,...r.icon.origin},left:h,top:f})}}export{i as defaultBorderStyle,n as defaultLineStyle,r as defaultRectStyle,t as defaultStyle,o as defaultTextStyle,s as drawArrow,c as drawLine,u as drawPoint,l as drawText,f as drawTextAndIconGroup,a as drawTextGroup};
|
@@ -598,7 +598,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
598
598
|
formRef: import("vue").Ref<any>;
|
599
599
|
conditionRef: import("vue").Ref<any>;
|
600
600
|
filterVisible: import("vue").Ref<boolean>;
|
601
|
-
title: import("vue").ComputedRef<"复制" | "
|
601
|
+
title: import("vue").ComputedRef<"复制" | "修改" | "新增" | "过滤条件">;
|
602
602
|
model: {
|
603
603
|
name: string;
|
604
604
|
color: string;
|
@@ -60,7 +60,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
60
60
|
formRef: import("vue").Ref<any>;
|
61
61
|
conditionRef: import("vue").Ref<any>;
|
62
62
|
filterVisible: import("vue").Ref<boolean>;
|
63
|
-
title: import("vue").ComputedRef<"复制" | "
|
63
|
+
title: import("vue").ComputedRef<"复制" | "修改" | "新增" | "过滤条件">;
|
64
64
|
model: {
|
65
65
|
name: string;
|
66
66
|
color: string;
|
@@ -2210,6 +2210,10 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
|
|
2210
2210
|
} | undefined;
|
2211
2211
|
}[] | undefined;
|
2212
2212
|
} | undefined;
|
2213
|
+
optionAliasList?: {
|
2214
|
+
text: string;
|
2215
|
+
value: string;
|
2216
|
+
}[] | undefined;
|
2213
2217
|
__new?: boolean | undefined;
|
2214
2218
|
__isCombinationChild?: boolean | undefined;
|
2215
2219
|
__extra?: boolean | undefined;
|
@@ -2429,6 +2433,10 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
|
|
2429
2433
|
} | undefined;
|
2430
2434
|
}[] | undefined;
|
2431
2435
|
} | undefined;
|
2436
|
+
optionAliasList?: {
|
2437
|
+
text: string;
|
2438
|
+
value: string;
|
2439
|
+
}[] | undefined;
|
2432
2440
|
__new?: boolean | undefined;
|
2433
2441
|
__isCombinationChild?: boolean | undefined;
|
2434
2442
|
__extra?: boolean | undefined;
|
@@ -2438,7 +2446,232 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
|
|
2438
2446
|
onPositiveClick: () => Promise<void>;
|
2439
2447
|
prevOldField: null;
|
2440
2448
|
onFormChange: ({ fieldKey, value }: import("..").FormChangePayload) => void;
|
2449
|
+
createLabelRender: (originOptions?: import("../../shared/types").AnyObject[] | undefined) => (label: string) => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
2450
|
+
[key: string]: any;
|
2451
|
+
}>;
|
2452
|
+
applyOptionAlias: (options?: import("../../shared/types").AnyObject[] | undefined) => import("../../shared/types").AnyObject[] | undefined;
|
2453
|
+
visitor: import("..").FieldVisitor;
|
2454
|
+
showOptionModal: import("vue").Ref<boolean>;
|
2455
|
+
editOptions: import("vue").Ref<{
|
2456
|
+
[x: string]: any;
|
2457
|
+
keyword?: string | undefined;
|
2458
|
+
disabled?: boolean | undefined;
|
2459
|
+
children?: any[] | undefined;
|
2460
|
+
childrenFields?: {
|
2461
|
+
[x: string]: any;
|
2462
|
+
val_key: string;
|
2463
|
+
html_type: "LINEBAR" | ({} & string) | "INPUT" | "TEXTAREA" | "SELECT" | "LINE_BREAKS" | "INPUT_NUMBER" | "REMOTE_SEARCH" | "DATE" | "LEVEL_SEARCH_CASCADER" | "SEARCH_CASCADER" | "COMBINATION" | "RADIO" | "CHECKBOX" | "SWITCH" | "SLIDER" | "COMPLEX" | "SEARCH" | "PHONE_TYPE" | "IDCARD_TYPE" | "SEARCH_MORE" | "DIGITAL" | "CHECKBOX_BLOCK" | "RADIO_BLOCK" | "DATE-INPUT" | "DATETIME-INPUT" | "SWITCH_COMPONENT" | "SLIDER_COMPONENT" | "LEVEL_SEARCH_CASCADE" | "SEARCH_CASCADE";
|
2464
|
+
annotation?: boolean | undefined;
|
2465
|
+
val_key_unit?: string | undefined;
|
2466
|
+
is_edit?: import("..").FormCommonState | undefined;
|
2467
|
+
elem_width?: number | undefined;
|
2468
|
+
is_show?: import("..").FormCommonState | undefined;
|
2469
|
+
is_null?: import("..").FormCommonState | undefined;
|
2470
|
+
name?: string | undefined;
|
2471
|
+
alias?: string | undefined;
|
2472
|
+
default_val?: any;
|
2473
|
+
is_empty?: import("..").FormCommonState | undefined;
|
2474
|
+
hide_title?: import("..").FormCommonState | undefined;
|
2475
|
+
placeholder?: string | undefined;
|
2476
|
+
validate?: {
|
2477
|
+
[x: string]: any;
|
2478
|
+
obj_type?: ("password" | "sex" | "age" | "email" | "birthday" | "id_card" | "age_unit" | "mobile" | "telephone" | "bank_card" | "website" | "gestational_weeks" | "gestational_stage" | "customer_name") | undefined;
|
2479
|
+
vali_obj?: string | undefined;
|
2480
|
+
max_value?: string | number | undefined;
|
2481
|
+
min_value?: string | number | undefined;
|
2482
|
+
min_date?: string | undefined;
|
2483
|
+
max_date?: string | undefined;
|
2484
|
+
min_length?: string | number | undefined;
|
2485
|
+
max_length?: string | number | undefined;
|
2486
|
+
decimal_length?: string | number | undefined;
|
2487
|
+
regular_expression?: string | {
|
2488
|
+
exec: (string: string) => RegExpExecArray | null;
|
2489
|
+
test: (string: string) => boolean;
|
2490
|
+
readonly source: string;
|
2491
|
+
readonly global: boolean;
|
2492
|
+
readonly ignoreCase: boolean;
|
2493
|
+
readonly multiline: boolean;
|
2494
|
+
lastIndex: number;
|
2495
|
+
compile: (pattern: string, flags?: string | undefined) => RegExp;
|
2496
|
+
readonly flags: string;
|
2497
|
+
readonly sticky: boolean;
|
2498
|
+
readonly unicode: boolean;
|
2499
|
+
readonly dotAll: boolean;
|
2500
|
+
[Symbol.match]: (string: string) => RegExpMatchArray | null;
|
2501
|
+
[Symbol.replace]: {
|
2502
|
+
(string: string, replaceValue: string): string;
|
2503
|
+
(string: string, replacer: (substring: string, ...args: any[]) => string): string;
|
2504
|
+
};
|
2505
|
+
[Symbol.search]: (string: string) => number;
|
2506
|
+
[Symbol.split]: (string: string, limit?: number | undefined) => string[];
|
2507
|
+
[Symbol.matchAll]: (str: string) => IterableIterator<RegExpMatchArray>;
|
2508
|
+
} | undefined;
|
2509
|
+
regular_error_tip?: string | undefined;
|
2510
|
+
message?: string | undefined;
|
2511
|
+
} | undefined;
|
2512
|
+
option?: any[] | undefined;
|
2513
|
+
multi_select?: import("..").FormCommonState | undefined;
|
2514
|
+
multi_select_value?: string | number | undefined;
|
2515
|
+
wordbook?: {
|
2516
|
+
level_num?: number | undefined;
|
2517
|
+
id?: string | undefined;
|
2518
|
+
name?: string | undefined;
|
2519
|
+
render_key?: string[] | undefined;
|
2520
|
+
search_key?: string[] | undefined;
|
2521
|
+
value_key?: string | undefined;
|
2522
|
+
queryParams?: string[] | undefined;
|
2523
|
+
primary_key?: string | undefined;
|
2524
|
+
type?: string | undefined;
|
2525
|
+
level_key?: string | undefined;
|
2526
|
+
link_key?: string | undefined;
|
2527
|
+
link_key_split?: string | undefined;
|
2528
|
+
show_key?: string | string[] | undefined;
|
2529
|
+
conObj?: import("../../shared/types").AnyObject[] | undefined;
|
2530
|
+
conObjFirstLevel?: import("../../shared/types").AnyObject[] | undefined;
|
2531
|
+
setting?: {
|
2532
|
+
cascading?: {
|
2533
|
+
'form.name': string;
|
2534
|
+
value: string;
|
2535
|
+
}[] | undefined;
|
2536
|
+
} | undefined;
|
2537
|
+
} | undefined;
|
2538
|
+
open?: {
|
2539
|
+
value?: any;
|
2540
|
+
describe?: string | undefined;
|
2541
|
+
} | undefined;
|
2542
|
+
close?: {
|
2543
|
+
value?: any;
|
2544
|
+
describe?: string | undefined;
|
2545
|
+
} | undefined;
|
2546
|
+
requiredReminderContent?: string | undefined;
|
2547
|
+
date_format?: string | undefined;
|
2548
|
+
step_length?: string | number | undefined;
|
2549
|
+
urlConfig?: {
|
2550
|
+
[x: string]: any;
|
2551
|
+
url: string;
|
2552
|
+
method?: import("../../shared/hooks").FormRequestDefine.RequestType | undefined;
|
2553
|
+
nameKey?: string | undefined;
|
2554
|
+
valueKey?: string | undefined;
|
2555
|
+
showKey?: string | undefined;
|
2556
|
+
searchKey?: string[] | undefined;
|
2557
|
+
params?: import("../../shared/types").AnyObject | undefined;
|
2558
|
+
dependKey?: string | Record<string, string> | (string | {
|
2559
|
+
paramName: string;
|
2560
|
+
paramValue?: string | undefined;
|
2561
|
+
required?: boolean | undefined;
|
2562
|
+
keepValue?: boolean | undefined;
|
2563
|
+
})[] | undefined;
|
2564
|
+
} | undefined;
|
2565
|
+
suffixConfig?: any | any[] | undefined;
|
2566
|
+
prefixConfig?: any | any[] | undefined;
|
2567
|
+
autograph?: string | undefined;
|
2568
|
+
defined_error_msg?: string | undefined;
|
2569
|
+
extendKey?: string | undefined;
|
2570
|
+
is_not_fold?: string | undefined;
|
2571
|
+
remark?: string | undefined;
|
2572
|
+
free_entry?: import("..").FormCommonState | undefined;
|
2573
|
+
save_free_entry?: import("..").FormCommonState | undefined;
|
2574
|
+
initialize_high?: number | undefined;
|
2575
|
+
bindEventSetting?: {
|
2576
|
+
[x: string]: unknown;
|
2577
|
+
event_type: import("../../shared/types").LowCodeTypes.EVENT_TYPE;
|
2578
|
+
event_field?: string | undefined;
|
2579
|
+
params?: {
|
2580
|
+
p_value?: string | undefined;
|
2581
|
+
p_name: string;
|
2582
|
+
p_select: import("../../shared/types").LowCodeTypes.VALUE_RELATION;
|
2583
|
+
}[] | undefined;
|
2584
|
+
results?: {
|
2585
|
+
p_value: string;
|
2586
|
+
p_name: string;
|
2587
|
+
}[] | undefined;
|
2588
|
+
compareMap?: {
|
2589
|
+
NULL?: ((v1: any, v2: any) => boolean) | undefined;
|
2590
|
+
EQ?: ((v1: any, v2: any) => boolean) | undefined;
|
2591
|
+
BIG?: ((v1: any, v2: any) => boolean) | undefined;
|
2592
|
+
LESS?: ((v1: any, v2: any) => boolean) | undefined;
|
2593
|
+
BIGEQ?: ((v1: any, v2: any) => boolean) | undefined;
|
2594
|
+
LESSEQ?: ((v1: any, v2: any) => boolean) | undefined;
|
2595
|
+
CL?: ((v1: any, v2: any) => boolean) | undefined;
|
2596
|
+
NC?: ((v1: any, v2: any) => boolean) | undefined;
|
2597
|
+
NEQ?: ((v1: any, v2: any) => boolean) | undefined;
|
2598
|
+
NOT_NULL?: ((v1: any, v2: any) => boolean) | undefined;
|
2599
|
+
} | undefined;
|
2600
|
+
}[] | undefined;
|
2601
|
+
show_mode?: import("../../shared/types").LowCodeTypes.showModeType | undefined;
|
2602
|
+
is_allow_check_mid?: import("..").FormCommonState | undefined;
|
2603
|
+
allow_check_mid_level?: "1" | "2" | "3" | "4" | undefined;
|
2604
|
+
prefix?: string | import("../../shared/types").AnyObject | (() => any) | undefined;
|
2605
|
+
suffix?: string | import("../../shared/types").AnyObject | (() => any) | undefined;
|
2606
|
+
allowSlash?: string | boolean | undefined;
|
2607
|
+
allowModify?: import("..").FormCommonState | undefined;
|
2608
|
+
show_key?: string | undefined;
|
2609
|
+
whiteList?: string[] | undefined;
|
2610
|
+
bordered?: string | boolean | undefined;
|
2611
|
+
displayMode?: "form" | "table" | undefined;
|
2612
|
+
editor_title?: string | undefined;
|
2613
|
+
editor_title_mode?: "EMBEDDED_FORM" | "HOVER_TOOLTIP" | "POPUP_ALERT" | undefined;
|
2614
|
+
linebarWidth?: string | undefined;
|
2615
|
+
linebarDirection?: "horizontal" | "vertical" | undefined;
|
2616
|
+
linebarTextDirection?: "horizontal" | "vertical" | undefined;
|
2617
|
+
labelColor?: string | undefined;
|
2618
|
+
fieldType?: import("@formily/json-schema").SchemaTypes | undefined;
|
2619
|
+
content?: string | import("..").FormRenderer | Record<string, import("..").FormRenderer> | undefined;
|
2620
|
+
lazyRequest?: boolean | undefined;
|
2621
|
+
requestCache?: boolean | undefined;
|
2622
|
+
maxGroupNum?: number | undefined;
|
2623
|
+
minGroupNum?: number | undefined;
|
2624
|
+
jsonCombination?: boolean | undefined;
|
2625
|
+
combinationItemDeletable?: boolean | import("..").CombinationItemDeletableFn | undefined;
|
2626
|
+
children?: any[] | undefined;
|
2627
|
+
properties?: any[] | undefined;
|
2628
|
+
componentProps?: import("../../shared/types").AnyObject | undefined;
|
2629
|
+
decoratorProps?: import("../../shared/types").AnyObject | undefined;
|
2630
|
+
noDecorator?: {
|
2631
|
+
valueOf: () => boolean;
|
2632
|
+
} | undefined;
|
2633
|
+
display?: "flex" | "grid" | undefined;
|
2634
|
+
slots?: Record<string, (...args: unknown[]) => unknown> | undefined;
|
2635
|
+
wrapperStyle?: Record<string, string | number> | undefined;
|
2636
|
+
childFieldStrategy?: "checked" | "all" | undefined;
|
2637
|
+
childWidthMode?: "inner" | "outer" | undefined;
|
2638
|
+
validator?: ((value: unknown, fieldItem: import("..").FieldItem, field: import("@formily/core").Field<any, any, any, any>) => string | void) | undefined;
|
2639
|
+
reactions?: {
|
2640
|
+
[x: string]: any;
|
2641
|
+
dependencies?: string[] | undefined;
|
2642
|
+
target?: string | undefined;
|
2643
|
+
effects?: import("@formily/json-schema").SchemaEffectTypes[] | undefined;
|
2644
|
+
when?: string | boolean | undefined;
|
2645
|
+
fulfill?: {
|
2646
|
+
state?: import("../../shared/types").AnyObject | undefined;
|
2647
|
+
run?: string | undefined;
|
2648
|
+
} | undefined;
|
2649
|
+
otherwise?: {
|
2650
|
+
state?: import("../../shared/types").AnyObject | undefined;
|
2651
|
+
run?: string | undefined;
|
2652
|
+
} | undefined;
|
2653
|
+
} | {
|
2654
|
+
[x: string]: any;
|
2655
|
+
dependencies?: string[] | undefined;
|
2656
|
+
target?: string | undefined;
|
2657
|
+
effects?: import("@formily/json-schema").SchemaEffectTypes[] | undefined;
|
2658
|
+
when?: string | boolean | undefined;
|
2659
|
+
fulfill?: {
|
2660
|
+
state?: import("../../shared/types").AnyObject | undefined;
|
2661
|
+
run?: string | undefined;
|
2662
|
+
} | undefined;
|
2663
|
+
otherwise?: {
|
2664
|
+
state?: import("../../shared/types").AnyObject | undefined;
|
2665
|
+
run?: string | undefined;
|
2666
|
+
} | undefined;
|
2667
|
+
}[] | undefined;
|
2668
|
+
}[] | undefined;
|
2669
|
+
}[]>;
|
2670
|
+
onOptionModalCancel: () => void;
|
2671
|
+
onOptionModalConfirm: () => void;
|
2441
2672
|
NModal: any;
|
2673
|
+
NSpace: any;
|
2674
|
+
NInput: any;
|
2442
2675
|
CFormRender: SFCWithInstall<import("vue").DefineComponent<{}, {
|
2443
2676
|
formRenderRef: import("vue").Ref<import("..").FormRenderExpose | undefined>;
|
2444
2677
|
key: import("vue").Ref<number>;
|