cnhis-design-vue 3.2.6-beta.0 → 3.2.6-beta.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +87 -87
- package/es/components/bpmn-workflow/src/BpmnWorkflow.d.ts +0 -0
- package/es/components/bpmn-workflow/types/BpmnViewer.d.ts +1 -0
- package/es/components/bpmn-workflow/types/ModelingModule.d.ts +1 -0
- package/es/components/bpmn-workflow/types/MoveCanvasModule.d.ts +1 -0
- package/es/components/button-print/index.d.ts +30 -0
- package/es/components/button-print/src/ButtonPrint.vue.d.ts +30 -0
- package/es/components/button-print/src/ButtonPrint.vue2.js +1 -1
- package/es/components/button-print/src/components/NewPrintComponent.vue2.js +1 -1
- package/es/components/button-print/src/components/OldPrintComponent.vue.d.ts +13 -0
- package/es/components/button-print/src/components/OldPrintComponent.vue2.js +1 -1
- package/es/components/button-print/src/utils/print.js +1 -1
- package/es/components/callback/src/components/render/popupMaps.d.ts +6 -4
- package/es/components/classification/src/components/table-modal/index.vue.d.ts +0 -3
- package/es/components/default-page/index.d.ts +11 -3
- package/es/components/default-page/src/constants/index.d.ts +1 -0
- package/es/components/default-page/src/constants/index.js +1 -1
- package/es/components/default-page/src/index.vue.d.ts +11 -3
- package/es/components/default-page/src/index.vue2.js +1 -1
- package/es/components/default-page/style/index.css +1 -1
- package/es/components/fabric-chart/index.d.ts +1 -0
- package/es/components/fabric-chart/src/FabricChart.vue.d.ts +1 -0
- package/es/components/fabric-chart/src/FabricChart.vue2.js +1 -1
- package/es/components/fabric-chart/src/hooks/electrocardiogram/useElectrocardiogramChart.d.ts +1 -0
- package/es/components/fabric-chart/src/hooks/electrocardiogram/useElectrocardiogramChart.js +1 -1
- package/es/components/fabric-chart/src/hooks/electrocardiogram/useMeasureInstrument.d.ts +1 -0
- package/es/components/fabric-chart/src/hooks/electrocardiogram/useMeasureInstrument.js +1 -1
- package/es/components/fabric-chart/src/hooks/temperature/useOther.js +1 -1
- package/es/components/field-set/src/FieldSet.vue.d.ts +1 -1
- package/es/components/form-config/index.d.ts +12 -8
- package/es/components/form-config/src/FormConfig.vue.d.ts +12 -8
- package/es/components/form-config/src/components/FormConfigCreator.vue.d.ts +6 -4
- package/es/components/form-config/src/components/FormConfigEdit.vue.d.ts +6 -4
- package/es/components/form-render/index.d.ts +6 -4
- package/es/components/form-render/index.js +1 -1
- package/es/components/form-render/src/FormRender.vue.d.ts +5 -3
- package/es/components/form-render/src/FormRender.vue2.js +1 -1
- package/es/components/form-render/src/FormRenderWrapper.vue.d.ts +6 -4
- package/es/components/form-render/src/FormRenderWrapper.vue2.js +1 -1
- package/es/components/form-render/src/components/renderer/searchCascade.js +1 -1
- package/es/components/form-render/src/components/renderer/select.js +1 -1
- package/es/components/form-render/src/hooks/index.d.ts +0 -1
- package/es/components/form-render/src/hooks/index.js +1 -1
- package/es/components/form-render/src/hooks/useFieldListAdaptor.js +1 -1
- package/es/components/form-render/src/hooks/useFormEvent.d.ts +1 -1
- package/es/components/form-render/src/hooks/usePresetScope.d.ts +1 -0
- package/es/components/form-render/src/hooks/usePresetScope.js +1 -1
- package/es/components/form-render/src/types/index.d.ts +2 -1
- package/es/components/iho-chat/index.d.ts +57 -27
- package/es/components/iho-chat/src/Index.vue.d.ts +58 -27
- package/es/components/iho-chat/src/Index.vue2.js +1 -1
- package/es/components/iho-chat/src/api/index.js +1 -1
- package/es/components/iho-chat/src/components/ChatFile.vue.d.ts +1 -1
- package/es/components/iho-chat/src/components/ChatFooter.vue.d.ts +9 -26
- package/es/components/iho-chat/src/components/ChatFooter.vue2.js +1 -1
- package/es/components/iho-chat/src/components/ChatHeader.vue.d.ts +2 -2
- package/es/components/iho-chat/src/components/ChatHeader.vue2.js +1 -1
- package/es/components/iho-chat/src/components/ChatMain.vue.d.ts +3 -2
- package/es/components/iho-chat/src/components/ChatMain.vue2.js +1 -1
- package/es/components/iho-chat/src/components/ChatRecord.vue.d.ts +1 -1
- package/es/components/iho-chat/src/components/ChatSearch.vue.d.ts +10 -3
- package/es/components/iho-chat/src/components/ChatSearch.vue2.js +1 -1
- package/es/components/iho-chat/src/components/SiderList.vue2.js +1 -1
- package/es/components/iho-chat/src/components/Video.vue.d.ts +30 -25
- package/es/components/iho-chat/src/components/Video.vue.js +1 -0
- package/es/components/iho-chat/src/components/Video.vue2.js +1 -0
- package/es/components/iho-chat/src/hooks/useSession.js +1 -1
- package/es/components/iho-chat/src/types/index.d.ts +2 -0
- package/es/components/iho-chat/src/utils/index.d.ts +1 -1
- package/es/components/iho-chat/src/utils/index.js +1 -1
- package/es/components/iho-chat/style/index.css +1 -1
- package/es/components/index.css +1 -1
- package/es/components/index.js +1 -1
- package/es/components/info-header/index.d.ts +18 -14
- package/es/components/info-header/src/InfoHeader.vue.d.ts +18 -14
- package/es/components/info-header/src/components/infoDescription/DescriptionItem.vue.d.ts +6 -6
- package/es/components/info-header/src/components/infoDescription/DescriptionList.vue.d.ts +6 -6
- package/es/components/info-header/src/components/infoDescription/HiddenContent.vue.d.ts +3 -3
- package/es/components/info-header/src/components/infoDescription/InfoEllipsis.vue.d.ts +3 -3
- package/es/components/info-header/src/components/infoDescription/InfoEllipsis.vue2.js +1 -1
- package/es/components/info-header/src/components/infoDescription/index.vue.d.ts +12 -10
- package/es/components/info-header/src/components/patientInfo/index.vue.d.ts +6 -4
- package/es/components/scale-view/index.d.ts +29 -1
- package/es/components/scale-view/src/ScaleView.vue.d.ts +29 -1
- package/es/components/scale-view/src/ScaleView.vue2.js +1 -1
- package/es/components/scale-view/src/hooks/scaleview-computed.d.ts +3 -1
- package/es/components/scale-view/src/hooks/scaleview-computed.js +1 -1
- package/es/components/scale-view/src/hooks/scaleview-props.d.ts +8 -0
- package/es/components/scale-view/src/hooks/scaleview-props.js +1 -1
- package/es/components/select-label/src/LabelFormContent.vue2.js +1 -1
- package/es/components/shortcut-setter/index.d.ts +6 -4
- package/es/components/shortcut-setter/src/ShortcutSetter.vue.d.ts +6 -4
- package/es/env.d.ts +25 -25
- package/es/shared/assets/img/defaultCover/10review_successful.png.js +1 -1
- package/es/shared/assets/img/defaultCover/11review_fail.png.js +1 -1
- package/es/shared/assets/img/defaultCover/12no_setting.png.js +1 -1
- package/es/shared/assets/img/defaultCover/13no_menu_setting.png.js +1 -1
- package/es/shared/assets/img/defaultCover/14no_call_setting.png.js +1 -1
- package/es/shared/assets/img/defaultCover/15no_use_tag.png.js +1 -1
- package/es/shared/assets/img/defaultCover/16no_table_data.png.js +1 -1
- package/es/shared/assets/img/defaultCover/1location.png.js +1 -1
- package/es/shared/assets/img/defaultCover/2notfound.png.js +1 -1
- package/es/shared/assets/img/defaultCover/3loading.png.js +1 -1
- package/es/shared/assets/img/defaultCover/4no_permission.png.js +1 -1
- package/es/shared/assets/img/defaultCover/5no_data.png.js +1 -1
- package/es/shared/assets/img/defaultCover/6no_network.png.js +1 -1
- package/es/shared/assets/img/defaultCover/7no_doctor.png.js +1 -1
- package/es/shared/assets/img/defaultCover/8system_error.png.js +1 -1
- package/es/shared/assets/img/defaultCover/9system_upgrade.png.js +1 -1
- package/es/shared/assets/img/failure.png.js +1 -1
- package/es/shared/assets/img/no-permission.png.js +1 -1
- package/es/shared/assets/img/nodata.png.js +1 -1
- package/es/shared/assets/img/notfound.png.js +1 -1
- package/es/shared/assets/img/qr.png.js +1 -1
- package/es/shared/assets/img/success.png.js +1 -1
- package/es/shared/assets/img/table_style_2.png.js +1 -1
- package/es/shared/assets/img/video.png.js +1 -1
- package/es/shared/assets/img/video_default_cover.png.js +1 -1
- package/es/shared/assets/img/xb_big.png.js +1 -1
- package/es/shared/assets/img/xb_small.png.js +1 -1
- package/es/shared/components/VueDraggable/src/vuedraggable.d.ts +86 -0
- package/es/shared/hooks/useAsyncQueue/index.d.ts +3 -0
- package/es/shared/hooks/useAsyncQueue/index.js +1 -1
- package/es/shared/package.json.js +1 -1
- package/es/shared/utils/fabricjs/index.d.ts +6823 -0
- package/es/shared/utils/tapable/index.d.ts +139 -0
- package/package.json +2 -2
- package/es/components/form-render/src/hooks/useAutoHidden.d.ts +0 -4
- package/es/components/form-render/src/hooks/useAutoHidden.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import t from"axios";import{isArray as e}from"lodash-es";import{IdentityVerificationDialog as i,PreviewDialog as s}from"./dialog.js";import{getFileUrl as r,useBrowserPrint as n,isIReport as a}from"./browserPrint.js";import{getCurrentInstance as o}from"vue";import{uuidGenerator as l}from"../../../../shared/utils/index.js";import{format as c}from"date-fns";import{io as h}from"socket.io-client";const p=String(navigator.platform).toLowerCase().includes("linux"),d=t.create({timeout:6e4,withCredentials:!1}),m=`${window.location.protocol}//${window.location.host}`,u=`${m}/fdp-api/print/assembly/printIReport`,f=`${m}/bi-api/reprot/print/open/client/printIReportForBase64`,g=`${m}/bi-api/reprot/print/open/client/previewIReport`,w=`${m}/bi-api/reprot/print/open/client/getRemote`,y=`${m}/printService/file`;let v=null;class P{constructor(){var t,e,r;if(this.webview=null,this.dialog=new i,this.dialogPreview=new s,this.instance=null,this.downloadPath="",this.printOrigin="http://127.0.0.1:11111",this.isRemote=!1,this.CMonitor=null,this.queryServicesParams=null,this.isConnectHiPrint=!1,this.clientInfo=null,this.printerList=[],this.hiPrintSocket=null,this.base64Fragment="",this._successCallbackFn=null,this._errorCallbackFn=null,this._isHiprint=!1,this.messageHandlerQueue=[],this.getIReportFormatId=(t,e)=>t?e.split("_")[1]:e,v)return v;v=this,p&&this._isHiprint&&this._initDomesticSystem();const n=window;this.CMonitor=n.$CMonitor;try{this.webview=n.top?null==(t=n.top.chrome)?void 0:t.webview:null==(e=n.chrome)?void 0:e.webview}catch(t){console.log(t),this.webview=null==(r=n.chrome)?void 0:r.webview}if(this.webview){this.currentMessageHandler=this.messageHandler.bind(this),this.webview.addEventListener("message",this.currentMessageHandler);try{this.webview.postMessage({exec:"config",data:""})}catch(t){const e="当前浏览器版本不支持获取配置接口";this._handleMonitorNotify(e),console.log("非封装浏览器或者"+e)}}}messageHandler(t){var e;if(console.log("打印事件message",t),!t)return this._handleMonitorNotify("接收到空的浏览器事件,"+t),console.log("当前回执",t,"接收到空的浏览器事件");let i;try{i=JSON.parse(t.data||"{}")}catch(e){console.log("解析e.data失败,"+e),this._handleMonitorNotify("解析e.data失败,"+t)}if(["print","pdf","resetprint"].includes(null==i?void 0:i.cmd)){console.log("打印命令执行了",i);const e=this.messageHandlerQueue.shift();if(!e)return console.log("当前回执",t,"没有可用的handler");const{resolve:s,reject:r}=e;try{if("resetprint"===(null==i?void 0:i.cmd))return void s({result:(null==i?void 0:i.res)?"success":"fail"});s(i.res||"")}catch(t){r(t)}}else"config"===(null==i?void 0:i.exec)&&(this.downloadPath=(null==(e=i.res)?void 0:e.downloadpath)||"")}_initDomesticSystem(){try{this.hiPrintSocket=h("http://127.0.0.1:17521",{reconnectionAttempts:3,transports:["websocket"],auth:{token:"no-use-vue-plugin-hiprint"}}),this.hiPrintSocket&&(this.hiPrintSocket.on("connect",(()=>{this.isConnectHiPrint=!0})),this.hiPrintSocket.on("disconnect",(()=>{this.isConnectHiPrint=!1,this.hiPrintSocket=null})),this.hiPrintSocket.on("clientInfo",(t=>{console.log("获取到客户端信息>>>>>",t),t.clientUrl&&(this.clientInfo=t)})),this.hiPrintSocket.on("printerList",(t=>{this.printerList=t,console.log("获取到打印机列表信息>>>>>",t)})),this.hiPrintSocket.on("success",(t=>{console.log("打印成功>>>>>",t),this.base64Fragment="",this._successCallbackFn&&this._successCallbackFn(t)})),this.hiPrintSocket.on("replayPrinterTemplate",(t=>{console.log("获取到数据的回复>>>>>",t),t&&this.hiPrintSocket.emit("news",t)})),this.hiPrintSocket.on("error",(t=>{console.log("打印失败>>>>>",t),this.base64Fragment="",this._errorCallbackFn&&this._errorCallbackFn(t)})))}catch(t){console.log("hiprint系统连接失败",t)}}async getPicAndUpload(t){try{const e=t=>"[object Object]"===Object.prototype.toString.call(t);if("success"===(null==t?void 0:t.result)&&"Y"==(null==t?void 0:t.uploadTemplateFlag)&&!(null==t?void 0:t.filebase64)&&this.queryServicesParams){const t=e(this.queryServicesParams.params)?this.queryServicesParams.params:JSON.parse(this.queryServicesParams.params);t.uploadTemplateFlag="Y",this.queryServicesParams.params=JSON.stringify(t),this.queryServicesParams.cmdid="7",this.queryServicesParams.print={print:1,type:6,zip:0},this.queryServicesParams.paramsArr=[{params:JSON.stringify(t)}];await this._queryBase64ServicesPrint(this.queryServicesParams)}}catch(t){console.log(t)}finally{this.queryServicesParams=null}}async postMessage(t,e=0){if(!this.webview)return Promise.reject();const i=l();return e&&e>0?this.messageCollectAndNotifyFail(i,t,e):this.messageCollect(i,t)}messageCollect(t,e){return new Promise(((i,s)=>{this.messageHandlerQueue.push({resolve:i,reject:s,id:t}),this.webview.postMessage(e)}))}messageCollectAndNotifyFail(t,e,i){return Promise.race([new Promise(((i,s)=>{this.messageHandlerQueue.push({resolve:i,reject:s,id:t}),this.webview.postMessage(e)})),new Promise(((e,s)=>{setTimeout((()=>{const e=this.messageHandlerQueue.findIndex((e=>e.id===t));e>-1&&this.messageHandlerQueue.splice(e,1),s({type:"timeout"})}),i)}))])}destroy(){}show(...t){return this.dialog.show(...t)}showPreview(...t){return this.dialogPreview.show(...t)}_testConnection(){return this.webview?Promise.resolve(!0):new Promise((t=>{d({url:`${this.printOrigin}/test`,method:"get",withCredentials:!1,params:{inputdata:{result:"success"}}}).then((({data:e})=>{"success"===e.result?t(!0):t(!1)})).catch((e=>{t(!1)}))}))}resetPrinter(t){return this.webview?this.postMessage({exec:"resetprint",data:{formatID:t}}):d({url:`${this.printOrigin}/services/printset`,method:"get",withCredentials:!1,params:{inputdata:t}}).then((({data:t})=>t))}_queryServicesPrint(e){return this.webview?this.postMessage({exec:"print",data:{inputData:e}},null==e?void 0:e.messageTimeout):t({url:this.printOrigin+"/services/print",method:"get",params:{inputData:JSON.stringify(e)}}).then((({data:t})=>t))}_queryBase64ServicesPrint(t){return this.webview?this.postMessage({exec:"print",data:{inputData:t}}):d({url:"/services/Printqueue",method:"get",params:{inputData:JSON.stringify(t)}}).then((({data:t})=>t))}_callPrintWithFile(t){const e={cmdid:"7",flag:"1"},i={inputData:JSON.stringify(Object.assign({},e,t))};return this.webview?this.postMessage({exec:"print",data:s(i)}):d({url:this.printOrigin+"/PrintLocal",method:"post",data:i,transformRequest:[s]}).then((({data:t})=>t));function s(t){let e="";for(const i in t)e+=encodeURIComponent(i)+"="+encodeURIComponent(t[i])+"&";return e=e.slice(0,-1),e}}_handleMonitorNotify(t){var e,i;null==(i=null==(e=this.CMonitor)?void 0:e.notify)||i.call(e,{name:"custom_info",message:t,businessName:"打印sdk"})}_handleResult(t,e,i){if(!t){const t="打印命令返回空数据";return this._handleMonitorNotify(""),null==e||e({type:"printError",message:t,result:!1,errinfo:t}),!1}if("success"!==t.result){const s=t.message||t.Message;this._handleMonitorNotify(s);const r={type:"printError",message:s,result:t.result,errinfo:t.errinfo};return"cancel"==t.result?(i&&i({type:"printCancel",message:s,result:t.result,errinfo:t.errinfo}),!1):(null==e||e(r),!1)}return t}_handleResultTest(t,e){return!!t||(console.log("notInstalledApp"),null==e||e({type:"notInstalledApp",message:"请打开打印服务器插件"}),!1)}async _handleEventQueryPrintData(t,e,i,s,r){const n={templateId:t,formatId:e,params:i,cmdid:"7",messageTimeout:s},a=await this._queryServicesPrint(n);return this._handleQueryPrintDataResult(a,e,r)}_handleQueryPrintDataResult(t,e,i){if(!(null==t?void 0:t.file)){try{const e=t.message||t.Message;console.log(e),null==i||i({type:"queryPrintDataFailure",message:e})}catch(t){console.log(t)}return!1}return{file:t.file,printerName:t.defprinter,pageCount:t.pagecount,formatId:e}}async _handleEventDirect({templateId:t,formatId:e,params:i,paramsArr:s,cmdid:r,print:n,signature:a,copies:o=1,printdlgshow:l="0",nobillnode:h="1",btnprint:p="1",messageTimeout:d=0}){const m={templateId:t,formatId:e,params:i,cmdid:r,nobillnode:h,printdlgshow:l,btnprint:p,copies:o,messageTimeout:d,...a?{signature:a}:{}};if(s&&(m.paramsArr=s),n){try{n=JSON.parse(n)}catch(t){}m.print=n}else if(this.isRemote){const t=c(new Date,"yyyyMMddHHmmss");m.print={print:"1",type:"1",zip:"0",filename:`F:\\WorkSpace\\crmweb\\web\\${t}\\${t}`}}return this.queryServicesParams=m,await this._queryServicesPrint(m)}async _handleEventEditFormat({templateId:t,formatId:e="",params:i="",token:s,messageTimeout:r=0}){const n={};let a={};try{a=Object.assign({},n,JSON.parse(i))}catch(t){a=n}const o={templateId:t,formatId:e,cmdid:"9",token:s,params:JSON.stringify(a),messageTimeout:r};return await this._queryServicesPrint(o)}async _queryProxyOrigin(){if(this.isRemote)return;const{data:t}=await d({method:"get",url:w})||{},{map:e={}}=t;e.isRemote&&(this.printOrigin=m+"/printService",this.isRemote=!0)}async _queryPrintFile(t,e=""){const{data:i}=await d({method:"post",url:u,responseType:"blob",params:{formatId:t.split("_")[1],params:e}})||{};return i}paramsSerializer(t){return Object.keys(t).forEach((e=>{const i=t[e];t[e]=i,"biParams"==e&&(t[e]=encodeURIComponent(i))})),t}async _queryPrintForBase64(t,e,i="",s){const r="object"==typeof i?i:JSON.parse(i),{data:n}=await d({method:"post",url:f,params:{id:t,formatId:e,params:this.paramsSerializer(r),authorizationKey:s}})||{};return n}async _queryPrintForPdf(t,e,i="",s){const r="object"==typeof i?i:JSON.parse(i),{data:n}=await d({method:"post",url:g,responseType:"blob",params:{id:t,formatId:e,params:this.paramsSerializer(r),authorizationKey:s}})||{};return n}async _browserPrint(t,e){if(this.isRemote){const{filedir:i}=t,s=JSON.parse(i)[0].replace(/\\/g,"/").split("/"),a=s[s.length-2],o=s[s.length-1],l=await r(`${y}/${a}/${o}`),c=n(null,e,l);if("preview"===e)return c}}_base64ToBlob(t,e){const i=window.atob(t);let s=i.length;const r=new Uint8Array(s);for(;s--;)r[s]=i.charCodeAt(s);return new Blob([r],{type:e})}async preview({templateId:t,formatId:e,params:i="",paramsArr:s,authorizationKey:r,signature:l,btnprint:c,messageTimeout:h=0},d,m){const u=a(e);if(e=this.getIReportFormatId(u,e),u&&p&&this._isHiprint){const s=await this._queryPrintForPdf(t,e,i,r);if(!s)return null==m?void 0:m("获取文件失败!");const a=n(s,"preview");return this.instance||(this.instance=o()),this.showPreview(this.instance,a),null==d?void 0:d({file:s})}await this._queryProxyOrigin();const f=await this._testConnection();if(!this._handleResultTest(f,m))return!1;try{const r=await this._handleEventDirect({templateId:t,formatId:e,params:i,paramsArr:s,cmdid:this.isRemote?"7":"8",signature:l,btnprint:c,messageTimeout:h}),n=this._handleResult(r,m);if(!n)return!1;if(this.isRemote){const t=await this._browserPrint(n,"preview");this.instance||(this.instance=o()),this.showPreview(this.instance,t)}await this.getPicAndUpload(n),null==d||d(n)}catch(t){const e="预览失败",i="timeout"===(null==t?void 0:t.type)?{...t,message:e}:{message:e};null==m||m(i),this._handleMonitorNotify(i)}}async printSync(t,e,i){const s=t.map((t=>{const e={params:"",printdlgshow:"0",nobillnode:"1",btnprint:"1",...t,cmdid:"7",...t.signature?{signature:t.signature}:{}};if(e.print)try{e.print=JSON.parse(e.print)}catch(t){}return{inputData:e}}));try{const t=l(),r=await this.messageCollect(t,{exec:"printA",data:s});if(r&&Array.isArray(r)){r.some((t=>"success"===t.res.result))?null==e||e(r):(null==i||i(r),this._handleMonitorNotify(r))}else{const t="打印命令返回无效数据";this._handleMonitorNotify(r||""),null==i||i({type:"printError",message:t,result:!1,errinfo:t})}}catch(t){const e={error:t,message:"打印失败"};null==i||i(e),this._handleMonitorNotify(e)}}async printDirect({templateId:t,formatId:e,params:i="",paramsArr:s,authorizationKey:r,print:n,signature:o,printdlgshow:l,nobillnode:c,copies:h=1,isDownloadFile:d=!0,messageTimeout:m=0},u,f,g,w="printDirect"){const y=a(e);if(e=this.getIReportFormatId(y,e),y&&p&&this._isHiprint){if(!this.isConnectHiPrint)return void f({message:"请连接hiPrint客户端"});const s=await this._queryPrintForBase64(t,e,i,r);if(!s.success)return f({message:s.resultMsg});const{base64:n,formatId:a}=s.map;return this.base64Fragment=n,this._successCallbackFn=u,this._errorCallbackFn=f,void this.hiPrintSocket.emit("news",{printerList:this.printerList,type:"askPrinterTemplate",markTemplateId:a,pdf_stream:this.base64Fragment})}await this._queryProxyOrigin();const v=await this._testConnection();if(!this._handleResultTest(v,f))return!1;try{const r=await this._handleEventDirect({templateId:t,formatId:e,params:i,paramsArr:s,cmdid:"7",print:n,signature:o,printdlgshow:l,nobillnode:c,copies:h,messageTimeout:m}),a=this._handleResult(r,f,g);if(!a)return!1;d&&["downloadPDF"].includes(w)&&await this._browserPrint(a,w),null==u||u(a)}catch(t){const e="printDirect"===w?"打印失败":"下载失败",i="timeout"===(null==t?void 0:t.type)?{...t,message:e}:{message:e};null==f||f(i),this._handleMonitorNotify(i)}}_downloadPDF(t){return this.webview?this.postMessage({exec:"pdf",data:{file:t}}):d.get(this.printOrigin+"/download",{params:{inputData:t}}).then((({data:t})=>t))}async downloadPDF(t,i,s){if(this.webview&&this.downloadPath&&(Reflect.has(t,"print")||Reflect.set(t,"print",{print:"1",type:"1"}),!t.print.filename)){const e=c(new Date,"yyyy-MM-dd"),i=l(),s=c(new Date,"yyyyMMddHHmmss")+i;t.print.filename=`${this.downloadPath}/${e}/${s}/${s}`.replace(/\\/g,"/")}const r=a(t.formatId);if(t.formatId=this.getIReportFormatId(r,t.formatId),r&&p&&this._isHiprint){const e=await this._queryPrintForPdf(t.templateId||"",t.formatId,t.params||"",t.authorizationKey);return e?(n(e,"downloadPDF"),i({file:e})):null==s?void 0:s("获取文件失败!")}this.printDirect(t,(async t=>{t||s(null);const r=this,n=await async function(t){const i=[],s=JSON.parse(t);if(!e(s))return await r._downloadPDF("");if(1===s.length)return await r._downloadPDF(s[0]||"");for(let t=0,e=s.length;t<e;t++)i.push(await r._downloadPDF(s[t]||""));return i}(t.filedir);i(n,t)}),(t=>s(t)),(t=>{console.log(t)}),"downloadPDF")}async print({templateId:t,formatId:e,params:i="",messageTimeout:s=0},r,n){const a=await this._testConnection();if(!this._handleResultTest(a,n))return!1;const o=await this.queryPrintData({templateId:t,formatId:e,params:i,messageTimeout:s},void 0,n);if(!o)return!1;const l=this.printFileData({formatId:e,file:o.file,printerName:o.printerName},void 0,n);if(!l)return!1;r&&r(l)}async queryPrintData({templateId:t,formatId:e,params:i="",messageTimeout:s=0},r,n){const a=await this._testConnection();if(!this._handleResultTest(a,n))return!1;const o=await this._handleEventQueryPrintData(t,e,i,s,n);return!!o&&(r&&r(o),o)}async printFileData({formatId:t,file:e,printerName:i="Default"},s,r){const n=await this._testConnection();if(!this._handleResultTest(n,r))return!1;const a=await this._callPrintWithFile({formatId:t,printname:i,file:e}),o=this._handleResult(a,r);return!!o&&(s&&s(o),o)}async editPrintFormat({templateId:t,formatId:e,params:i,token:s,messageTimeout:r=0},n,a){const o=await this._testConnection();if(!this._handleResultTest(o,a))return!1;const l=await this._handleEventEditFormat({templateId:t,formatId:e,params:i,token:s,messageTimeout:r}),c=this._handleResult(l,a);if(!c)return!1;n&&n(c)}async addPrintFormat({templateId:t,params:e,token:i},s,r){const n=await this._testConnection();if(!this._handleResultTest(n,r))return!1;const a=await this._handleEventEditFormat({templateId:t,params:e,token:i}),o=this._handleResult(a,r);if(!o)return!1;s&&s(o)}}export{P as Print};
|
|
1
|
+
import t from"axios";import{isArray as e}from"lodash-es";import{IdentityVerificationDialog as i,PreviewDialog as s}from"./dialog.js";import{getFileUrl as r,useBrowserPrint as n,isIReport as a}from"./browserPrint.js";import{getCurrentInstance as o}from"vue";import{uuidGenerator as l}from"../../../../shared/utils/index.js";import{format as c}from"date-fns";import{io as h}from"socket.io-client";const d=String(navigator.platform).toLowerCase().includes("linux"),m=t.create({timeout:6e4,withCredentials:!1}),p=`${window.location.protocol}//${window.location.host}`,u=`${p}/fdp-api/print/assembly/printIReport`,f=`${p}/bi-api/reprot/print/open/client/printIReportForBase64`,g=`${p}/bi-api/reprot/print/open/client/previewIReport`,w=`${p}/bi-api/reprot/print/open/client/getRemote`,y=`${p}/printService/file`;let v=null;class P{constructor(){var t,e,r;if(this.webview=null,this.dialog=new i,this.dialogPreview=new s,this.instance=null,this.downloadPath="",this.printOrigin="http://127.0.0.1:11111",this.isRemote=!1,this.CMonitor=null,this.queryServicesParams=null,this.isConnectHiPrint=!1,this.clientInfo=null,this.printerList=[],this.hiPrintSocket=null,this.base64Fragment="",this._successCallbackFn=null,this._errorCallbackFn=null,this._isHiprint=!1,this.messageHandlerQueue=[],this.getIReportFormatId=(t,e)=>t?e.split("_")[1]:e,v)return v;v=this,d&&this._isHiprint&&this._initDomesticSystem();const n=window;this.CMonitor=n.$CMonitor;try{this.webview=n.top?null==(t=n.top.chrome)?void 0:t.webview:null==(e=n.chrome)?void 0:e.webview}catch(t){console.log(t),this.webview=null==(r=n.chrome)?void 0:r.webview}if(this.webview){this.currentMessageHandler=this.messageHandler.bind(this),this.webview.addEventListener("message",this.currentMessageHandler);try{this.webview.postMessage({exec:"config",data:""})}catch(t){const e="当前浏览器版本不支持获取配置接口";this._handleMonitorNotify(e),console.log("非封装浏览器或者"+e)}}}messageHandler(t){var e;if(console.log("打印事件message",t),!t)return this._handleMonitorNotify("接收到空的浏览器事件,"+t),console.log("当前回执",t,"接收到空的浏览器事件");let i;try{i=JSON.parse(t.data||"{}")}catch(e){console.log("解析e.data失败,"+e),this._handleMonitorNotify("解析e.data失败,"+t)}if(["print","pdf","resetprint"].includes(null==i?void 0:i.cmd)){console.log("打印命令执行了",i);const e=this.messageHandlerQueue.shift();if(!e)return console.log("当前回执",t,"没有可用的handler");const{resolve:s,reject:r}=e;try{if("resetprint"===(null==i?void 0:i.cmd))return void s({result:(null==i?void 0:i.res)?"success":"fail"});s(i.res||"")}catch(t){r(t)}}else if("config"===(null==i?void 0:i.exec))this.downloadPath=(null==(e=i.res)?void 0:e.downloadpath)||"";else{const e=this.messageHandlerQueue.shift();if(!e)return console.log("当前回执11",t,"没有可用的handler11");const{resolve:i,reject:s}=e;s({message:"不支持当前命令"})}}_initDomesticSystem(){try{this.hiPrintSocket=h("http://127.0.0.1:17521",{reconnectionAttempts:3,transports:["websocket"],auth:{token:"no-use-vue-plugin-hiprint"}}),this.hiPrintSocket&&(this.hiPrintSocket.on("connect",(()=>{this.isConnectHiPrint=!0})),this.hiPrintSocket.on("disconnect",(()=>{this.isConnectHiPrint=!1,this.hiPrintSocket=null})),this.hiPrintSocket.on("clientInfo",(t=>{console.log("获取到客户端信息>>>>>",t),t.clientUrl&&(this.clientInfo=t)})),this.hiPrintSocket.on("printerList",(t=>{this.printerList=t,console.log("获取到打印机列表信息>>>>>",t)})),this.hiPrintSocket.on("success",(t=>{console.log("打印成功>>>>>",t),this.base64Fragment="",this._successCallbackFn&&this._successCallbackFn(t)})),this.hiPrintSocket.on("replayPrinterTemplate",(t=>{console.log("获取到数据的回复>>>>>",t),t&&this.hiPrintSocket.emit("news",t)})),this.hiPrintSocket.on("error",(t=>{console.log("打印失败>>>>>",t),this.base64Fragment="",this._errorCallbackFn&&this._errorCallbackFn(t)})))}catch(t){console.log("hiprint系统连接失败",t)}}async getPicAndUpload(t){try{const e=t=>"[object Object]"===Object.prototype.toString.call(t);if("success"===(null==t?void 0:t.result)&&"Y"==(null==t?void 0:t.uploadTemplateFlag)&&!(null==t?void 0:t.filebase64)&&this.queryServicesParams){const t=e(this.queryServicesParams.params)?this.queryServicesParams.params:JSON.parse(this.queryServicesParams.params);t.uploadTemplateFlag="Y",this.queryServicesParams.params=JSON.stringify(t),this.queryServicesParams.cmdid="7",this.queryServicesParams.print={print:1,type:6,zip:0},this.queryServicesParams.paramsArr=[{params:JSON.stringify(t)}];await this._queryBase64ServicesPrint(this.queryServicesParams)}}catch(t){console.log(t)}finally{this.queryServicesParams=null}}async postMessage(t,e=0){if(!this.webview)return Promise.reject();const i=l();return e&&e>0?this.messageCollectAndNotifyFail(i,t,e):this.messageCollect(i,t)}messageCollect(t,e){return new Promise(((i,s)=>{this.messageHandlerQueue.push({resolve:i,reject:s,id:t}),this.webview.postMessage(e)}))}messageCollectAndNotifyFail(t,e,i){return Promise.race([new Promise(((i,s)=>{this.messageHandlerQueue.push({resolve:i,reject:s,id:t}),this.webview.postMessage(e)})),new Promise(((e,s)=>{setTimeout((()=>{const e=this.messageHandlerQueue.findIndex((e=>e.id===t));e>-1&&this.messageHandlerQueue.splice(e,1),s({type:"timeout"})}),i)}))])}destroy(){}show(...t){return this.dialog.show(...t)}showPreview(...t){return this.dialogPreview.show(...t)}_testConnection(){return this.webview?Promise.resolve(!0):new Promise((t=>{m({url:`${this.printOrigin}/test`,method:"get",withCredentials:!1,params:{inputdata:{result:"success"}}}).then((({data:e})=>{"success"===e.result?t(!0):t(!1)})).catch((e=>{t(!1)}))}))}resetPrinter(t){return this.webview?this.postMessage({exec:"resetprint",data:{formatID:t}}):m({url:`${this.printOrigin}/services/printset`,method:"get",withCredentials:!1,params:{inputdata:t}}).then((({data:t})=>t))}_queryServicesPrint(e){return this.webview?this.postMessage({exec:"print",data:{inputData:e}},null==e?void 0:e.messageTimeout):t({url:this.printOrigin+"/services/print",method:"get",params:{inputData:JSON.stringify(e)}}).then((({data:t})=>t))}_queryBase64ServicesPrint(t){return this.webview?this.postMessage({exec:"print",data:{inputData:t}}):m({url:"/services/Printqueue",method:"get",params:{inputData:JSON.stringify(t)}}).then((({data:t})=>t))}_callPrintWithFile(t){const e={cmdid:"7",flag:"1"},i={inputData:JSON.stringify(Object.assign({},e,t))};return this.webview?this.postMessage({exec:"print",data:s(i)}):m({url:this.printOrigin+"/PrintLocal",method:"post",data:i,transformRequest:[s]}).then((({data:t})=>t));function s(t){let e="";for(const i in t)e+=encodeURIComponent(i)+"="+encodeURIComponent(t[i])+"&";return e=e.slice(0,-1),e}}_handleMonitorNotify(t){var e,i;null==(i=null==(e=this.CMonitor)?void 0:e.notify)||i.call(e,{name:"custom_info",message:t,businessName:"打印sdk"})}_handleResult(t,e,i){if(!t){const t="打印命令返回空数据";return this._handleMonitorNotify(""),null==e||e({type:"printError",message:t,result:!1,errinfo:t}),!1}if("success"!==t.result){const s=t.message||t.Message;this._handleMonitorNotify(s);const r={type:"printError",message:s,result:t.result,errinfo:t.errinfo};return"cancel"==t.result?(i&&i({type:"printCancel",message:s,result:t.result,errinfo:t.errinfo}),!1):(null==e||e(r),!1)}return t}_handleResultTest(t,e){return!!t||(console.log("notInstalledApp"),null==e||e({type:"notInstalledApp",message:"请打开打印服务器插件"}),!1)}async _handleEventQueryPrintData(t,e,i,s,r){const n={templateId:t,formatId:e,params:i,cmdid:"7",messageTimeout:s},a=await this._queryServicesPrint(n);return this._handleQueryPrintDataResult(a,e,r)}_handleQueryPrintDataResult(t,e,i){if(!(null==t?void 0:t.file)){try{const e=t.message||t.Message;console.log(e),null==i||i({type:"queryPrintDataFailure",message:e})}catch(t){console.log(t)}return!1}return{file:t.file,printerName:t.defprinter,pageCount:t.pagecount,formatId:e}}async _handleEventDirect({templateId:t,formatId:e,params:i,paramsArr:s,cmdid:r,print:n,signature:a,copies:o=1,printdlgshow:l="0",nobillnode:h="1",btnprint:d="1",messageTimeout:m=0}){const p={templateId:t,formatId:e,params:i,cmdid:r,nobillnode:h,printdlgshow:l,btnprint:d,copies:o,messageTimeout:m,...a?{signature:a}:{}};if(s&&(p.paramsArr=s),n){try{n=JSON.parse(n)}catch(t){}p.print=n}else if(this.isRemote){const t=c(new Date,"yyyyMMddHHmmss");p.print={print:"1",type:"1",zip:"0",filename:`F:\\WorkSpace\\crmweb\\web\\${t}\\${t}`}}return this.queryServicesParams=p,await this._queryServicesPrint(p)}async _handleEventEditFormat({templateId:t,formatId:e="",params:i="",token:s,messageTimeout:r=0}){const n={};let a={};try{a=Object.assign({},n,JSON.parse(i))}catch(t){a=n}const o={templateId:t,formatId:e,cmdid:"9",token:s,params:JSON.stringify(a),messageTimeout:r};return await this._queryServicesPrint(o)}async _queryProxyOrigin(){if(this.isRemote)return;const{data:t}=await m({method:"get",url:w})||{},{map:e={}}=t;e.isRemote&&(this.printOrigin=p+"/printService",this.isRemote=!0)}async _queryPrintFile(t,e=""){const{data:i}=await m({method:"post",url:u,responseType:"blob",params:{formatId:t.split("_")[1],params:e}})||{};return i}paramsSerializer(t){return Object.keys(t).forEach((e=>{const i=t[e];t[e]=i,"biParams"==e&&(t[e]=encodeURIComponent(i))})),t}async _queryPrintForBase64(t,e,i="",s){const r="object"==typeof i?i:JSON.parse(i),{data:n}=await m({method:"post",url:f,params:{id:t,formatId:e,params:this.paramsSerializer(r),authorizationKey:s}})||{};return n}async _queryPrintForPdf(t,e,i="",s){const r="object"==typeof i?i:JSON.parse(i),{data:n}=await m({method:"post",url:g,responseType:"blob",params:{id:t,formatId:e,params:this.paramsSerializer(r),authorizationKey:s}})||{};return n}async _browserPrint(t,e){if(this.isRemote){const{filedir:i}=t,s=JSON.parse(i)[0].replace(/\\/g,"/").split("/"),a=s[s.length-2],o=s[s.length-1],l=await r(`${y}/${a}/${o}`),c=n(null,e,l);if("preview"===e)return c}}_base64ToBlob(t,e){const i=window.atob(t);let s=i.length;const r=new Uint8Array(s);for(;s--;)r[s]=i.charCodeAt(s);return new Blob([r],{type:e})}async preview({templateId:t,formatId:e,params:i="",paramsArr:s,authorizationKey:r,signature:l,btnprint:c,messageTimeout:h=0},m,p){const u=a(e);if(e=this.getIReportFormatId(u,e),u&&d&&this._isHiprint){const s=await this._queryPrintForPdf(t,e,i,r);if(!s)return null==p?void 0:p("获取文件失败!");const a=n(s,"preview");return this.instance||(this.instance=o()),this.showPreview(this.instance,a),null==m?void 0:m({file:s})}await this._queryProxyOrigin();const f=await this._testConnection();if(!this._handleResultTest(f,p))return!1;try{const r=await this._handleEventDirect({templateId:t,formatId:e,params:i,paramsArr:s,cmdid:this.isRemote?"7":"8",signature:l,btnprint:c,messageTimeout:h}),n=this._handleResult(r,p);if(!n)return!1;if(this.isRemote){const t=await this._browserPrint(n,"preview");this.instance||(this.instance=o()),this.showPreview(this.instance,t)}await this.getPicAndUpload(n),null==m||m(n)}catch(t){const e="预览失败",i="timeout"===(null==t?void 0:t.type)?{...t,message:e}:{message:e};null==p||p(i),this._handleMonitorNotify(i)}}async printSync(t,e,i){const s=t.map((t=>{const e={params:"",printdlgshow:"0",nobillnode:"1",btnprint:"1",...t,cmdid:"7",...t.signature?{signature:t.signature}:{}};if(e.print)try{e.print=JSON.parse(e.print)}catch(t){}return{inputData:e}}));try{const t=l(),r=await this.messageCollect(t,{exec:"printA",data:s});if(r&&Array.isArray(r)){r.some((t=>"success"===t.res.result))?null==e||e(r):(null==i||i(r),this._handleMonitorNotify(r))}else{const t="打印命令返回无效数据";this._handleMonitorNotify(r||""),null==i||i({type:"printError",message:t,result:!1,errinfo:t})}}catch(t){const e={error:t,message:"打印失败"};null==i||i(e),this._handleMonitorNotify(e)}}async printDirect({templateId:t,formatId:e,params:i="",paramsArr:s,authorizationKey:r,print:n,signature:o,printdlgshow:l,nobillnode:c,copies:h=1,isDownloadFile:m=!0,messageTimeout:p=0},u,f,g,w="printDirect"){const y=a(e);if(e=this.getIReportFormatId(y,e),y&&d&&this._isHiprint){if(!this.isConnectHiPrint)return void f({message:"请连接hiPrint客户端"});const s=await this._queryPrintForBase64(t,e,i,r);if(!s.success)return f({message:s.resultMsg});const{base64:n,formatId:a}=s.map;return this.base64Fragment=n,this._successCallbackFn=u,this._errorCallbackFn=f,void this.hiPrintSocket.emit("news",{printerList:this.printerList,type:"askPrinterTemplate",markTemplateId:a,pdf_stream:this.base64Fragment})}await this._queryProxyOrigin();const v=await this._testConnection();if(!this._handleResultTest(v,f))return!1;try{const r=await this._handleEventDirect({templateId:t,formatId:e,params:i,paramsArr:s,cmdid:"7",print:n,signature:o,printdlgshow:l,nobillnode:c,copies:h,messageTimeout:p}),a=this._handleResult(r,f,g);if(!a)return!1;m&&["downloadPDF"].includes(w)&&await this._browserPrint(a,w),null==u||u(a)}catch(t){const e="printDirect"===w?"打印失败":"下载失败",i="timeout"===(null==t?void 0:t.type)?{...t,message:e}:{message:e};null==f||f(i),this._handleMonitorNotify(i)}}_downloadPDF(t){return this.webview?this.postMessage({exec:"pdf",data:{file:t}}):m.get(this.printOrigin+"/download",{params:{inputData:t}}).then((({data:t})=>t))}async downloadPDF(t,i,s){if(this.webview&&this.downloadPath&&(Reflect.has(t,"print")||Reflect.set(t,"print",{print:"1",type:"1"}),!t.print.filename)){const e=c(new Date,"yyyy-MM-dd"),i=l(),s=c(new Date,"yyyyMMddHHmmss")+i;t.print.filename=`${this.downloadPath}/${e}/${s}/${s}`.replace(/\\/g,"/")}const r=a(t.formatId);if(t.formatId=this.getIReportFormatId(r,t.formatId),r&&d&&this._isHiprint){const e=await this._queryPrintForPdf(t.templateId||"",t.formatId,t.params||"",t.authorizationKey);return e?(n(e,"downloadPDF"),i({file:e})):null==s?void 0:s("获取文件失败!")}this.printDirect(t,(async t=>{t||s(null);const r=this,n=await async function(t){const i=[],s=JSON.parse(t);if(!e(s))return await r._downloadPDF("");if(1===s.length)return await r._downloadPDF(s[0]||"");for(let t=0,e=s.length;t<e;t++)i.push(await r._downloadPDF(s[t]||""));return i}(t.filedir);i(n,t)}),(t=>s(t)),(t=>{console.log(t)}),"downloadPDF")}async print({templateId:t,formatId:e,params:i="",messageTimeout:s=0},r,n){const a=await this._testConnection();if(!this._handleResultTest(a,n))return!1;const o=await this.queryPrintData({templateId:t,formatId:e,params:i,messageTimeout:s},void 0,n);if(!o)return!1;const l=this.printFileData({formatId:e,file:o.file,printerName:o.printerName},void 0,n);if(!l)return!1;r&&r(l)}async queryPrintData({templateId:t,formatId:e,params:i="",messageTimeout:s=0},r,n){const a=await this._testConnection();if(!this._handleResultTest(a,n))return!1;const o=await this._handleEventQueryPrintData(t,e,i,s,n);return!!o&&(r&&r(o),o)}async printFileData({formatId:t,file:e,printerName:i="Default"},s,r){const n=await this._testConnection();if(!this._handleResultTest(n,r))return!1;const a=await this._callPrintWithFile({formatId:t,printname:i,file:e}),o=this._handleResult(a,r);return!!o&&(s&&s(o),o)}async editPrintFormat({templateId:t,formatId:e,params:i,token:s,messageTimeout:r=0},n,a){const o=await this._testConnection();if(!this._handleResultTest(o,a))return!1;const l=await this._handleEventEditFormat({templateId:t,formatId:e,params:i,token:s,messageTimeout:r}),c=this._handleResult(l,a);if(!c)return!1;n&&n(c)}async addPrintFormat({templateId:t,params:e,token:i},s,r){const n=await this._testConnection();if(!this._handleResultTest(n,r))return!1;const a=await this._handleEventEditFormat({templateId:t,params:e,token:i}),o=this._handleResult(a,r);if(!o)return!1;s&&s(o)}}export{P as Print};
|
|
@@ -3,7 +3,7 @@ export declare const CallbackMaps: Map<string, {
|
|
|
3
3
|
formRenderRef: import("vue").Ref<import("../../../../../components/form-render").FormRenderExpose | undefined>;
|
|
4
4
|
key: import("vue").Ref<number>;
|
|
5
5
|
reload: () => Promise<void>;
|
|
6
|
-
formRenderExposeKeyList: readonly ["validate", "getFormValues", "setFormValues", "setFieldState", "resetFields", "queryWidget", "getFieldList", "applySelectedSetting", "getTextFormValues"];
|
|
6
|
+
formRenderExposeKeyList: readonly ["validate", "getFormValues", "setFormValues", "setFieldState", "resetFields", "queryWidget", "getFieldList", "applySelectedSetting", "getTextFormValues", "optionInited"];
|
|
7
7
|
exposed: Partial<import("../../../../../components/form-render").FormRenderExpose>;
|
|
8
8
|
FormRender: import("vue").DefineComponent<{
|
|
9
9
|
fieldList: {
|
|
@@ -412,6 +412,10 @@ export declare const CallbackMaps: Map<string, {
|
|
|
412
412
|
businessCollector: import("../../../../../components/form-render").BusinessCollector;
|
|
413
413
|
formItemDepsCollector: import("../../../../../components/form-render").FormItemDepsCollector;
|
|
414
414
|
changeContextCollector: import("../../../../../components/form-render").ContextCollector;
|
|
415
|
+
asyncQueue: import("../../../../../shared/hooks").AsyncQueue<import("../../../../../shared/hooks").FormRequestDefine.AsyncQueueItem, any, {
|
|
416
|
+
label: string;
|
|
417
|
+
value: unknown;
|
|
418
|
+
}[]>;
|
|
415
419
|
formUUID: string;
|
|
416
420
|
anchorBarRef: import("vue").Ref<{
|
|
417
421
|
syncBarPosition: import("../../../../../shared/types").AnyFn;
|
|
@@ -443,13 +447,11 @@ export declare const CallbackMaps: Map<string, {
|
|
|
443
447
|
afterRequest(fieldKey: string, res?: any, payload?: import("../../../../../shared/types").AnyObject | undefined): import("../../../../../shared/types").AnyObject[] | Promise<import("../../../../../shared/types").AnyObject[]>;
|
|
444
448
|
afterOptionInit(fieldKey: string, options: import("../../../../../shared/types").AnyObject[], payload?: import("../../../../../shared/types").AnyObject | undefined): void;
|
|
445
449
|
}>>[T]>>;
|
|
446
|
-
triggerAutoHidden: (field: import("@formily/core").GeneralField, includeLinebar?: boolean) => Promise<void>;
|
|
447
450
|
observeFormGraph: Record<string, import("@formily/core").GeneralField>;
|
|
448
451
|
setGraph: (field: import("@formily/core").GeneralField) => void;
|
|
449
452
|
removeGraph: (field: import("@formily/core").GeneralField) => void;
|
|
450
453
|
lowCodeEventTrigger: (field: import("@formily/core").GeneralField) => void;
|
|
451
454
|
emitFormChange: import("vue").Ref<boolean>;
|
|
452
|
-
isReady: boolean;
|
|
453
455
|
formModel: import("@formily/core").Form<{
|
|
454
456
|
[x: string]: any;
|
|
455
457
|
}>;
|
|
@@ -739,7 +741,7 @@ export declare const CallbackMaps: Map<string, {
|
|
|
739
741
|
startIncrementalRender: () => void;
|
|
740
742
|
onKeydown: (event: KeyboardEvent) => Promise<void>;
|
|
741
743
|
clearSpan: (uuid: string) => void;
|
|
742
|
-
exposeEvent: Omit<import("../../../../../components/form-render").FormRenderExpose, "getFieldList" | "formModel" | "reload">;
|
|
744
|
+
exposeEvent: Omit<import("../../../../../components/form-render").FormRenderExpose, "getFieldList" | "optionInited" | "formModel" | "reload">;
|
|
743
745
|
useVersion: typeof import("../../../../../shared/hooks").useVersion;
|
|
744
746
|
FormConsumer: import("vue").DefineComponent<{}, () => any, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
|
745
747
|
FormProvider: import("vue").DefineComponent<Record<"form", any>, unknown, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<Record<"form", any>>>, {
|
|
@@ -24,13 +24,19 @@ declare const DefaultPage: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
24
24
|
content: string;
|
|
25
25
|
};
|
|
26
26
|
};
|
|
27
|
-
}>> & {
|
|
27
|
+
}>> & {
|
|
28
|
+
onReloadPage?: ((...args: any[]) => any) | undefined;
|
|
29
|
+
}>>;
|
|
30
|
+
emit: (event: "reloadPage", ...args: any[]) => void;
|
|
28
31
|
configResult: import("vue").ComputedRef<{
|
|
29
32
|
title: string;
|
|
30
33
|
content: string;
|
|
31
34
|
img: string;
|
|
32
35
|
}>;
|
|
33
|
-
|
|
36
|
+
reloadPage: () => void;
|
|
37
|
+
NIcon: any;
|
|
38
|
+
Refresh: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
|
39
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "reloadPage"[], "reloadPage", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
34
40
|
type: {
|
|
35
41
|
type: StringConstructor;
|
|
36
42
|
default: string;
|
|
@@ -42,7 +48,9 @@ declare const DefaultPage: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
42
48
|
content: string;
|
|
43
49
|
};
|
|
44
50
|
};
|
|
45
|
-
}
|
|
51
|
+
}>> & {
|
|
52
|
+
onReloadPage?: ((...args: any[]) => any) | undefined;
|
|
53
|
+
}, {
|
|
46
54
|
type: string;
|
|
47
55
|
config: import("../../shared/types").AnyObject;
|
|
48
56
|
}>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import t from"../../../../shared/assets/img/defaultCover/1location.png.js";import e from"../../../../shared/assets/img/defaultCover/2notfound.png.js";import s from"../../../../shared/assets/img/defaultCover/3loading.png.js";import o from"../../../../shared/assets/img/defaultCover/4no_permission.png.js";import i from"../../../../shared/assets/img/defaultCover/5no_data.png.js";import r from"../../../../shared/assets/img/defaultCover/6no_network.png.js";import
|
|
1
|
+
import t from"../../../../shared/assets/img/defaultCover/1location.png.js";import e from"../../../../shared/assets/img/defaultCover/2notfound.png.js";import s from"../../../../shared/assets/img/defaultCover/3loading.png.js";import o from"../../../../shared/assets/img/defaultCover/4no_permission.png.js";import i from"../../../../shared/assets/img/defaultCover/5no_data.png.js";import r from"../../../../shared/assets/img/defaultCover/6no_network.png.js";import n from"../../../../shared/assets/img/defaultCover/7no_doctor.png.js";import m from"../../../../shared/assets/img/defaultCover/8system_error.png.js";import a from"../../../../shared/assets/img/defaultCover/9system_upgrade.png.js";import g from"../../../../shared/assets/img/defaultCover/10review_successful.png.js";import l from"../../../../shared/assets/img/defaultCover/11review_fail.png.js";import E from"../../../../shared/assets/img/defaultCover/12no_setting.png.js";import N from"../../../../shared/assets/img/defaultCover/13no_menu_setting.png.js";import O from"../../../../shared/assets/img/defaultCover/14no_call_setting.png.js";import d from"../../../../shared/assets/img/defaultCover/15no_use_tag.png.js";import f from"../../../../shared/assets/img/defaultCover/16no_table_data.png.js";const p={LOCATION:"1",NOTFOUND:"2",LOADING:"3",NOPERMISSION:"4",NODATA:"5",NONETWORK:"6",NODOCTOR:"7",SYSTEMERROR:"8",SYSTEMUPGRADE:"9",REVIEWSUCCESSFUL:"10",REVIEWFAIL:"11",NOSETTING:"12",NOMENUSETTING:"13",NOCALLSETTING:"14",NOUSETAG:"15",NOTABLEDATA:"16",REFRESHNOTICE:"17"},T={[p.LOCATION]:{title:"位置访问失败 ",content:"",img:t},[p.NOTFOUND]:{title:"找不到页面",content:"",img:e},[p.LOADING]:{title:"正在拼命加载中...",content:"请稍后",img:s},[p.NOPERMISSION]:{title:"你没有访问权限",content:"",img:o},[p.NODATA]:{title:"暂无数据",content:"",img:i},[p.NONETWORK]:{title:"请检查网络连接情况",content:"",img:r},[p.NODOCTOR]:{title:"暂无医生排班",content:"",img:n},[p.SYSTEMERROR]:{title:"系统错误",content:"请稍后再试",img:m},[p.SYSTEMUPGRADE]:{title:"系统正在升级中...",content:"",img:a},[p.REVIEWSUCCESSFUL]:{title:"审核成功",content:"",img:g},[p.REVIEWFAIL]:{title:"审核失败",content:"",img:l},[p.NOSETTING]:{title:"视图未配置",content:"",img:E},[p.NOMENUSETTING]:{title:"你还没有进行菜单设置哟~",content:"设置后可自定义调整菜单的顺序/结构,不设置使用系统默认菜单",img:N},[p.NOCALLSETTING]:{title:"呼叫中心未配置",content:"",img:O},[p.NOUSETAG]:{title:"无可选标签 ",content:"",img:d},[p.NOTABLEDATA]:{title:"暂无数据 ",content:"",img:f},[p.REFRESHNOTICE]:{title:"更新提示",content:"系统有新内容更新,请点击按钮重载页面,以确保系统功能正常",img:s}};export{p as defaultPageTypeConfig,T as descriptionConfig};
|
|
@@ -25,13 +25,19 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
25
25
|
content: string;
|
|
26
26
|
};
|
|
27
27
|
};
|
|
28
|
-
}>> & {
|
|
28
|
+
}>> & {
|
|
29
|
+
onReloadPage?: ((...args: any[]) => any) | undefined;
|
|
30
|
+
}>>;
|
|
31
|
+
emit: (event: "reloadPage", ...args: any[]) => void;
|
|
29
32
|
configResult: import("vue").ComputedRef<{
|
|
30
33
|
title: string;
|
|
31
34
|
content: string;
|
|
32
35
|
img: string;
|
|
33
36
|
}>;
|
|
34
|
-
|
|
37
|
+
reloadPage: () => void;
|
|
38
|
+
NIcon: any;
|
|
39
|
+
Refresh: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
|
40
|
+
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "reloadPage"[], "reloadPage", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
35
41
|
type: {
|
|
36
42
|
type: StringConstructor;
|
|
37
43
|
default: string;
|
|
@@ -43,7 +49,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
43
49
|
content: string;
|
|
44
50
|
};
|
|
45
51
|
};
|
|
46
|
-
}
|
|
52
|
+
}>> & {
|
|
53
|
+
onReloadPage?: ((...args: any[]) => any) | undefined;
|
|
54
|
+
}, {
|
|
47
55
|
type: string;
|
|
48
56
|
config: AnyObject;
|
|
49
57
|
}>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{defineComponent as t,computed as e,openBlock as s,createElementBlock as
|
|
1
|
+
import{defineComponent as t,computed as e,openBlock as s,createElementBlock as i,createCommentVNode as l,renderSlot as n,unref as o,Fragment as a,createElementVNode as c,createTextVNode as r,toDisplayString as p,createVNode as g}from"vue";import{descriptionConfig as m}from"./constants/index.js";import{NIcon as d}from"naive-ui";import{Refresh as f}from"@vicons/ionicons5";const u={class:"default-page-getter-block"},y={key:0,class:"wrapper"},v=["src","alt"],k=["src","alt"],x={class:"page-description"},b={class:"title"},j={key:0,class:"reload-page"},h=c("span",{style:{margin:"0 6px"}},"|",-1),O=c("span",null,"重载页面",-1),$={class:"content"};var P=t({__name:"index",props:{type:{type:String,default:"1"},config:{type:Object,default:()=>({title:"",content:""})}},emits:["reloadPage"],setup(t,{emit:P}){const _=t,w=e((()=>{let t=m[_.type];return _.config&&Object.keys(_.config).length>0&&Object.keys(_.config).forEach((e=>{const s=_.config[e];s&&(t[e]=s)})),t}));function z(){P("reloadPage")}return(e,m)=>(s(),i("div",u,[l(" 默认插槽,自定义缺省页 "),n(e.$slots,"default",{},(()=>[t.type?(s(),i("div",y,[l(" 针对小空间和表格的情况 "),"16"==t.type?(s(),i("img",{key:0,class:"img-table",src:o(w).img,alt:o(w).title},null,8,v)):(s(),i(a,{key:1},[l(" 普通缺省情况 "),c("img",{class:"img-default",src:o(w).img,alt:o(w).title},null,8,k)],2112)),c("div",x,[c("div",b,[l(" 标题插槽 "),n(e.$slots,"title",{},(()=>[r(p(o(w).title)+" ",1),"17"==t.type?(s(),i("div",j,[h,c("span",{class:"reload-text",onClick:z},[g(o(d),{component:o(f),size:"16",style:{"margin-right":"3px"}},null,8,["component"]),O])])):l("v-if",!0)]))]),c("div",$,[l(" 内容描述插槽 "),n(e.$slots,"content",{},(()=>[r(p(o(w).content),1)]))])])])):l("v-if",!0)]))]))}});export{P as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.default-page-getter-block{box-sizing:border-box;max-height:100%;max-width:100%}.default-page-getter-block,.default-page-getter-block .wrapper{align-items:center;display:flex;flex-direction:column;height:100%;justify-content:center;width:100%}.default-page-getter-block .wrapper .img-table{display:block;max-height:60%;max-width:80%}.default-page-getter-block .wrapper .img-default{display:block;max-height:50%;max-width:80%}.default-page-getter-block .wrapper .page-description{align-items:center;display:flex;flex-direction:column;max-width:80%}.default-page-getter-block .wrapper .page-description .title{color:rgba(0,0,0,.8);font-size:16px;margin-top:8px}.default-page-getter-block .wrapper .page-description .content{color:#c2c2c2;font-size:14px;margin-top:4px;text-align:center}
|
|
1
|
+
.default-page-getter-block{box-sizing:border-box;max-height:100%;max-width:100%}.default-page-getter-block,.default-page-getter-block .wrapper{align-items:center;display:flex;flex-direction:column;height:100%;justify-content:center;width:100%}.default-page-getter-block .wrapper .img-table{display:block;max-height:60%;max-width:80%}.default-page-getter-block .wrapper .img-default{display:block;max-height:50%;max-width:80%}.default-page-getter-block .wrapper .page-description{align-items:center;display:flex;flex-direction:column;max-width:80%}.default-page-getter-block .wrapper .page-description .title{align-items:center;color:rgba(0,0,0,.8);display:flex;font-size:16px;margin-top:8px}.default-page-getter-block .wrapper .page-description .title .reload-page{align-items:center;display:flex;font-size:14px;line-height:1}.default-page-getter-block .wrapper .page-description .title .reload-page .reload-text{align-items:center;color:#2463f4;cursor:pointer;display:flex}.default-page-getter-block .wrapper .page-description .content{color:#c2c2c2;font-size:14px;margin-top:4px;text-align:center}
|
|
@@ -90,6 +90,7 @@ declare const FabricChart: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
90
90
|
useMeasureRuler: any;
|
|
91
91
|
useCaliper: any;
|
|
92
92
|
useCaliperRuler: any;
|
|
93
|
+
useRectRuler: any;
|
|
93
94
|
updatePolyline: any;
|
|
94
95
|
getGridInfo: any;
|
|
95
96
|
init: () => import("../../shared/types").AnyObject;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{defineComponent as e,ref as r,reactive as t,computed as o,onMounted as s,onBeforeUnmount as a,openBlock as i,createElementBlock as
|
|
1
|
+
import{defineComponent as e,ref as r,reactive as t,computed as o,onMounted as s,onBeforeUnmount as a,openBlock as i,createElementBlock as u,normalizeStyle as l,unref as p,createElementVNode as n,Fragment as c,createVNode as h,mergeProps as d,createCommentVNode as m}from"vue";import{fabric as f}from"../../../shared/utils/fabricjs/index.js";import v from"./components/PopupTip.vue.js";import g from"./components/PopupMenu.js";import"./hooks/useDraw.js";import"date-fns";import"lodash-es";import"./hooks/useEvent.js";import{useBirthProcessChart as w}from"./hooks/birthProcess/useBirthProcessChart.js";import{useTemperatureChart as C}from"./hooks/temperature/useTemperatureChart.js";import{useSurgicalAnesthesiaChart as k}from"./hooks/surgicalAnesthesia/useSurgicalAnesthesiaChart.js";import{useElectrocardiogramChart as R}from"./hooks/electrocardiogram/useElectrocardiogramChart.js";import{useNewBirthProcessChart as y}from"./hooks/newBirthProcess/useNewBirthProcessChart.js";var j=e({__name:"FabricChart",props:{type:{type:String,default:"temperature"},data:{type:Object,required:!0},popupTipRender:{type:Function},addRenderItem:{type:Function}},emits:["change","add","remove","select","add:prevent","click:grid","eventClick"],setup(e,{expose:j,emit:P}){const b=e,x=r(null),I=r(),T=t({show:!1,point:{x:0,y:0},list:[],movable:!1,sourceData:[],isTarget:!1}),M=t({show:!1,point:{x:0,y:0},list:[],target:null}),B=o((()=>{var e;return null==(e=I.value)?void 0:e.wrapperEl})),A=o((()=>({width:`${b.data.width||800}px`,height:`${b.data.height||500}px`}))),{propItems:E,redrawPoints:F,select:S,clickMenu:_,useMeasureRuler:D,useCaliper:G,useCaliperRuler:$,useRectRuler:q,updatePolyline:H,getGridInfo:N}=function(){const e=[I,b,P,x,T,M];switch(b.type){case"birthProcess":return w(...e);case"surgicalAnesthesia":return k(...e,!!b.popupTipRender);case"electrocardiogram":return R(...e);case"newBirthProcess":return y(...e);default:return C(...e)}}();return s((()=>{I.value=new f.Canvas(x.value,{width:E.canvasWidth,height:E.canvasHeight,backgroundColor:"#fff",selection:!1,stopContextMenu:!0,fireRightClick:!0,allowTouchScrolling:!0})})),a((()=>{var e,r,t,o;null==(r=null==(e=I.value)?void 0:e.off)||r.call(e),null==(o=null==(t=I.value)?void 0:t.clear)||o.call(t)})),j({redrawPoints:F,select:S,canvas:I,useMeasureRuler:D,useCaliper:G,useCaliperRuler:$,useRectRuler:q,updatePolyline:H,getGridInfo:N}),(r,t)=>(i(),u("div",{class:"c-fabric-chart",style:l(p(A))},[n("canvas",{ref_key:"canvasRef",ref:x},null,512),p(B)?(i(),u(c,{key:0},[h(v,d({popupTipRender:e.popupTipRender,...T},{propItems:p(E)}),null,16,["propItems"]),h(p(g),d({propItems:p(E)},M,{show:M.show,"onUpdate:show":t[0]||(t[0]=e=>M.show=e),onClickMenu:p(_)}),null,16,["propItems","show","onClickMenu"])],64)):m("v-if",!0)],4))}});export{j as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{ref as e,computed as a,reactive as t,unref as u,watch as r}from"vue";import{defaultBorderStyle as l,defaultLineStyle as i,defaultTextStyle as n}from"../useDraw.js";import"../../../../../shared/utils/fabricjs/index.js";import"date-fns";import{cloneDeep as o,isNumber as d,last as v}from"lodash-es";import"../useEvent.js";import"../temperature/useShadow.js";import{ECG as
|
|
1
|
+
import{ref as e,computed as a,reactive as t,unref as u,watch as r}from"vue";import{defaultBorderStyle as l,defaultLineStyle as i,defaultTextStyle as n}from"../useDraw.js";import"../../../../../shared/utils/fabricjs/index.js";import"date-fns";import{cloneDeep as o,isNumber as d,last as v}from"lodash-es";import"../useEvent.js";import"../temperature/useShadow.js";import{ECG as s}from"../../constants/index.js";import"@vueuse/shared";import"naive-ui";import"@vueuse/core";import{useElectrocardiogram as m}from"./useElectrocardiogram.js";import{useMeasureInstrument as c}from"./useMeasureInstrument.js";function g(g,h,f,p,N,b){const M=e(),y=e(),L=e(),x=e(),C=e(),R=a((()=>h.data.width)),S=a((()=>h.data.height)),w=a((()=>{const{dataList:e=[],config:a={}}=h.data,t=o(e),u=t.find((e=>a.lastDataKey&&e.key===a.lastDataKey));return u?[...t,u]:t})),E=a((()=>(R.value-0)/Y.value)),X=a((()=>(S.value-0)/j.value)),Y=a((()=>{var e,a,t;const{config:u,grid:r}=h.data;if(d(r.gridXNumber))return r.gridXNumber;const l=(null!=(t=null==(a=null==(e=v(w.value))?void 0:e.data)?void 0:a.length)?t:0)/u.hz;return Math.ceil(l/u.mainXCellValue)})),j=a((()=>{const{config:e,grid:a}=h.data;if(d(a.gridYNumber))return a.gridYNumber;const t=w.value.length;return Math.ceil(I.value*t*2/e.mainYCellValue)})),I=a((()=>{var e;const{config:a}=h.data,t=null==(e=v(w.value))?void 0:e.data,u=Math.max(...t)-Math.min(...t);return"uv"===a.valueUnit?.001*u:"v"===a.valueUnit?1e3*u:u})),U=a((()=>{var e;return(null==(e=h.data.grid)?void 0:e.event)||{selectable:!0,evented:!0}})),A=a((()=>{const{mode:e="2-6"}=h.data,[a,t]=e.split("-").map((e=>+e));return{columnNumber:a,rowNumber:t}})),B=a((()=>{const{rowNumber:e}=A.value,a=w.value.length;return Math.round(j.value/(e+(a===s.MAXLINENUMBER?1:0)))})),H=a((()=>{const{width:e,config:a,grid:t}=h.data,{columnNumber:u,rowNumber:r}=A.value,l=e/u,i=w.value.length,n=Math.ceil(B.value/2),o=function(){const{valueUnit:e,mainYCellValue:t}=a,r=w.value[0].data,l=o(Math.max(...r));if(2!==u)return l;const i=w.value[6].data,n=o(Math.max(...i));return Math.max(l,n);function o(a){return("uv"===e?.001*a:"v"===e?1e3*a:a)/t*X.value}}(),d=X.value*n,v=1===u||d<o?X.value*Math.ceil(o/X.value):d,m=4===u?0:E.value;return w.value.map(((e,a)=>{const t=s.MAXLINENUMBER===i&&a===i-1?r:a%r;return{...e,origin:{x:(s.MAXLINENUMBER===i&&a===i-1?0:Math.floor(a/r))*l+m,y:t*(X.value*B.value)+v,rowIdx:t}}}))})),V=a((()=>{var e;const{calibrationLineGridYNumber:a,mainYCellValue:t}=(null==(e=h.data)?void 0:e.config)||{};return a?X.value*a:t?X.value/t:X.value})),D=t({canvasWidth:h.data.width,canvasHeight:h.data.height,borderStyle:{...l,...h.data.borderStyle},lineStyle:{...i,...h.data.lineStyle},titleStyle:{...n,...h.data.titleStyle},measureLineStyle:{...i,...h.data.measureLineStyle},measureTextStyle:{...n,...h.data.measureTextStyle},grid:h.data.grid,originX:0,endX:R.value,originY:0,endY:S.value,xCellWidth:E.value,yCellHeight:X.value,gridXNumber:Y.value,gridYNumber:j.value,event:U.value,dataList:H.value,columnNumber:u(A).columnNumber,rowNumber:u(A).rowNumber,config:h.data.config,calibrationLineHeight:u(V)});return r((()=>g.value),(e=>{e&&function(){const{useMeasureRuler:e,flag:a,useCaliper:t,useCaliperRuler:u,useRectRuler:r}=c(g,D),{updatePolyline:l}=m(g,D,a);y.value=e,L.value=t,x.value=u,M.value=l,C.value=r}()}),{immediate:!0}),{propItems:D,updatePolyline:M,useMeasureRuler:y,useCaliper:L,useCaliperRuler:x,useRectRuler:C,getGridInfo:function(){return{cellWidth:E.value,cellHeight:X.value,smallCellNumber:s.SMALLCELLNUMBER}}}}export{g as useElectrocardiogramChart};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{ref as e}from"vue";import{fabric as t}from"../../../../../shared/utils/fabricjs/index.js";import{drawLine as o,drawText as r}from"../useDraw.js";import{useElectrocardiogramCumputedPoint as
|
|
1
|
+
import{ref as e}from"vue";import{fabric as t}from"../../../../../shared/utils/fabricjs/index.js";import{drawLine as o,drawText as r}from"../useDraw.js";import{useElectrocardiogramCumputedPoint as l}from"../useCumputedPoint.js";import"../useEvent.js";import{isNumber as n}from"lodash-es";import"date-fns";import"../temperature/useShadow.js";import"@vueuse/shared";import"naive-ui";import"@vueuse/core";function i(i,s){const{getXValue:u,getYValue:c}=l(s),{yCellHeight:a,xCellWidth:d,measureLineStyle:h,measureTextStyle:f}=s,p=e(!1),v={origin:{x:0,y:0},line:null,rendering:!1},x={origin:{x:300,y:10},caliper:{width:4*d,height:60,rect:null},caliperRuler:{width:6*d,height:120,rect:null},rectRuler:{width:12*d,height:120,rect:null}};function m(e){C();const{width:o,height:l,rect:n}=x[e];if(n)return;let s;const{x:u,y:c}=x.origin,a=c+x.caliper.height,d=["caliper","rectRuler"].includes(e);x[e].rect=new t.Rect({left:u,top:c,width:o,height:l,strokeWidth:0,fill:"transparent",hasControls:!1,hasBorders:!1,hoverCursor:"move"});const p={...h,hasControls:!1,hasBorders:!1,hoverCursor:"e-resize",strokeWidth:2,__type:e,evented:!0,selectable:!0},v=new t.Line([u,c,u,c+l],{...p,lockMovementY:!0,originX:"center"}),m=new t.Line([u+o,c,u+o,c+l],{...p,lockMovementY:!0,originX:"center"}),L=new t.Line([u,a,u+o,a],{...p,lockMovementX:!0,evented:d,hoverCursor:d?"n-resize":"default",originY:"center"});let b=g({x1:L.x1,x2:L.x2}).millisecond;if("rectRuler"===e){const{millivolt:e,millisecond:r,bpm:n}=g({x1:u+o,x2:u,y1:c+l,y2:c});b=`测量幅度:${e}\n测试时间:${r}\n瞬时心率:${n}`,L.set({y1:c,y2:c}),s=new t.Line([u,c+l,u+o,c+l],{...p,lockMovementX:!0,evented:!0,hoverCursor:"n-resize",originY:"center"})}const w=r([u,("rectRuler"===e?s.top:L.top)+10],{value:b,...f,originX:"left",originY:"top",backgroundColor:"#fff"});v.rect=x[e].rect,m.rect=x[e].rect,L.rect=x[e].rect,s&&(s.rect=x[e].rect),Object.assign(x[e].rect,{leftLine:v,rightLine:m,horizontalLine:L,horizontalLine2:s,text:w}),function(e,t){e.on("moving",(()=>{const{leftLine:o,rightLine:r,horizontalLine:l,horizontalLine2:n,text:i}=e;null==o||o.setCoords().set({x1:e.left,y1:e.top,x2:e.left,y2:e.top+e.height}),null==r||r.setCoords().set({x1:e.left+e.width,y1:e.top,x2:e.left+e.width,y2:e.top+e.height});const s=["caliper","rectRuler"].includes(t)?e.top+e.height:e.top+e.height/2;i.setCoords().set({left:e.left,top:s+10}),"rectRuler"===t?(null==l||l.setCoords().set({x1:e.left,x2:e.left+e.width,y1:e.top,y2:e.top}),null==n||n.setCoords().set({x1:e.left,y1:s,x2:e.left+e.width,y2:s})):null==l||l.setCoords().set({x1:e.left,y1:s,x2:e.left+e.width,y2:s})})),e.on("mouseup",(t=>{var o;1===t.button&&(i.value.discardActiveObject(),e.leftLine.bringToFront(),e.rightLine.bringToFront(),e.horizontalLine.bringToFront(),null==(o=e.horizontalLine2)||o.bringToFront())}))}(x[e].rect,e),y(v,"left"),y(m,"right"),d&&y(L,"horizontal"),s&&y(s,"horizontal2");const z=[x[e].rect,v,m,L,s,w].filter((e=>!!e));i.value.add(...z)}function g({x1:e,x2:t,y1:o,y2:r}){const l=(1e3*u(Math.abs(t-e))).toFixed(3);return{millisecond:`${l}ms`,millivolt:`${n(o)&&n(r)?c(Math.abs(r-o)).toFixed(3):0}mv`,bpm:`${(6e4/+l).toFixed(3)}bpm`}}function y(e,t){e.on("moving",(()=>{const{rect:o}=e;if(!o)return;const{leftLine:r,rightLine:l,horizontalLine:n,horizontalLine2:i,text:s}=o;if(("horizontal"===t&&!i||"horizontal2"===t)&&(e.top<=o.top?e.setCoords().set({y1:o.top,y2:o.top}):e.setCoords().set({y1:e.top,y2:e.top}),o.setCoords().set({height:e.top-o.top}),null==r||r.setCoords().set({y2:e.top}),null==l||l.setCoords().set({y2:e.top}),s.setCoords().set({top:e.top+10}),!i))return;"horizontal"===t&&i&&(e.top>=i.top?e.setCoords().set({y1:i.top,y2:i.top}):e.setCoords().set({y1:e.top,y2:e.top}),o.setCoords().set({top:e.top,height:i.top-e.top}),null==r||r.setCoords().set({y1:e.top}),null==l||l.setCoords().set({y1:e.top}),s.setCoords().set({top:i.top+10})),"left"===t&&(e.left>=l.left?e.setCoords().set({x1:l.left,x2:l.left}):e.setCoords().set({x1:e.left,x2:e.left}),o.setCoords().set({left:e.left,width:l.left-e.left}),n.setCoords().set({x1:e.left}),null==i||i.setCoords().set({x1:e.left}),s.setCoords().set({left:e.left})),"right"===t&&(e.left<=r.left?e.setCoords().set({x1:r.left,x2:r.left}):e.setCoords().set({x1:e.left,x2:e.left}),o.setCoords().set({width:e.left-r.left}),n.setCoords().set({x2:e.left}),null==i||i.setCoords().set({x2:e.left}));const{millivolt:u,millisecond:c,bpm:a}=g({x1:n.x1,x2:n.x2,y1:r.y1,y2:r.y2}),d=i?`测量幅度:${u}\n测试时间:${c}\n瞬时心率:${a}`:c;s.set("text",d)}))}function C(){Object.values(x).forEach((e=>{const{rect:t}=e;t&&(i.value.remove(t),t.leftLine&&i.value.remove(t.leftLine),t.rightLine&&i.value.remove(t.rightLine),t.horizontalLine&&i.value.remove(t.horizontalLine),t.horizontalLine2&&i.value.remove(t.horizontalLine2),t.text&&i.value.remove(t.text),e.rect=null)})),v.line&&(i.value.remove(v.line),v.line.text&&i.value.remove(v.line.text),v.line=null)}return i.value.on("mouse:down",(e=>{if(1===e.button&&p.value){const{x:t=0,y:o=0}=e.pointer||{};v.origin={x:t,y:o},v.rendering=!0}})),i.value.on("mouse:up",(e=>{const{button:t}=e;1===t&&p.value&&setTimeout((()=>{p.value=!1,v.rendering=!1})),3===t&&C()})),i.value.on("mouse:move",(e=>{var t;if(1===e.button&&p.value&&v.rendering){const{x:l=0,y:n=0}=e.pointer||{};v.line&&i.value.remove(v.line),(null==(t=v.line)?void 0:t.text)&&i.value.remove(v.line.text);const{x:s,y:u}=v.origin;v.line=o([s,u,l,n],h);const{millivolt:c,millisecond:d}=g({x1:s,x2:l,y1:u,y2:n}),p=r([l,n+2*a],{value:`${c}\n${d}`,...f});v.line.text=p,i.value.add(v.line,p)}})),{flag:p,useMeasureRuler:function(){p.value||(p.value=!0)},useCaliper:function(){m("caliper")},useCaliperRuler:function(){m("caliperRuler")},useRectRuler:function(){m("rectRuler")}}}export{i as useMeasureInstrument};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{fabric as e}from"../../../../../shared/utils/fabricjs/index.js";import{defaultStyle as t}from"../useDraw.js";import"date-fns";import{last as i}from"lodash-es";import"../useEvent.js";import"vue";import"./useShadow.js";import"@vueuse/shared";import"naive-ui";import"@vueuse/core";function
|
|
1
|
+
import{fabric as e}from"../../../../../shared/utils/fabricjs/index.js";import{defaultStyle as t}from"../useDraw.js";import"date-fns";import{last as i}from"lodash-es";import"../useEvent.js";import"vue";import"./useShadow.js";import"@vueuse/shared";import"naive-ui";import"@vueuse/core";function l(l,n,o,r,u){const{left:s,other:h,vitalSignsOriginY:a,xCellWidth:f,yCellHeight:c,endX:g}=n;let v=0;function p(i,n,r,u=!1){const s=[],a=u&&i.fixed&&i.fixedValue?i.fixedValue:i.value;String(a).split("").forEach(((l,n)=>{const o=new e.Text(l,{left:0,top:c*n,originX:"center",...t,objectCaching:!1,...i.style||{}});v=(c-(o.height||0))/2,s.push(o)}));const g=new e.Rect({left:0,top:0,width:f,height:c*s.length,fill:"transparent",originX:"center",...t}),{eventHighlight:p=!1}=h||{},d={originX:"center",left:n,top:r+v,baseTop:(i.baseTop||0)*c,trueLeft:n,trueHeight:s.length*c,objectCaching:!1,hoverCursor:"pointer",highlightObject:g,originData:i,selectable:!1,evented:p},m=new e.Group([g,...s],d);return function(e){const{highlightColor:t="#ffff00"}=h||{};e.on("mouseover",(()=>{e.highlightObject.set("fill",t),l.value.requestRenderAll()})),e.on("mouseout",(()=>{e.highlightObject.set("fill","transparent"),l.value.requestRenderAll()})),e.on("mousedown",(function(){o("eventClick",e.originData)}))}(m),l.value.add(m),m}!function(){var e,t;if(!(null==h?void 0:h.list))return!1;const l=[],n=[];h.list.forEach(((e,t)=>{const i=0===t?"vertical":e.align||"vertical",l=r(e.time,!0);if(l>g)return;const o=n.find((e=>e.left==l));if(o)o[i].push(e);else{const t={left:l,vertical:[],horizontal:[]};t[i].push(e),n.push(t)}}));const o=null==(t=null==(e=s.yScaleValue)?void 0:e.find((e=>"temperature"===e.type)))?void 0:t.list,v=(null==o?void 0:o.length)?u("temperature",o,35):0,d=e=>e.fixed&&v&&String(e.value).length;n.forEach((e=>{let t=a.originY,n=e.left,o=0,r=v;e.vertical.forEach(((u,s)=>{var h,g,v,m,b;const j=(u.baseTop||0)*c,x=(null==(h=i(l))?void 0:h.left)||0;0===s&&e.left<=x&&(n=x+f);if(l.filter((e=>e.trueLeft===n)).length){const e=String(u.value).length;t+=o,t+e*c+j>a.endY&&(t=a.originY,n+=f)}t+=j,String(u.value).length&&(l.push(p(u,n,t)),o=null!=(v=null==(g=i(l))?void 0:g.trueHeight)?v:0),d(u)&&(l.push(p(u,n,r,!0)),r+=null!=(b=null==(m=i(l))?void 0:m.trueHeight)?b:0)})),e.horizontal.forEach(((t,o)=>{var u,s,h;const g=a.originY+(t.baseTop||0)*c,v=(null==(u=i(l))?void 0:u.left)||0;e.left<=v&&(n=v+f),String(t.value).length&&l.push(p(t,n,g)),d(t)&&(l.push(p(t,n,r,!0)),r+=null!=(h=null==(s=i(l))?void 0:s.trueHeight)?h:0)}))}))}()}export{l as useOther};
|
|
@@ -725,8 +725,8 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
725
725
|
showSeq: boolean;
|
|
726
726
|
footerFlag: boolean;
|
|
727
727
|
fieldDescribeMode: "column" | "tooltip";
|
|
728
|
-
customColumns: FieldSetColumnItem[];
|
|
729
728
|
showSearch: boolean;
|
|
729
|
+
customColumns: FieldSetColumnItem[];
|
|
730
730
|
showSortPriority: boolean;
|
|
731
731
|
showHeadFilter: boolean;
|
|
732
732
|
}>;
|
|
@@ -406,7 +406,7 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
406
406
|
formRenderRef: import("vue").Ref<import("..").FormRenderExpose | undefined>;
|
|
407
407
|
key: import("vue").Ref<number>;
|
|
408
408
|
reload: () => Promise<void>;
|
|
409
|
-
formRenderExposeKeyList: readonly ["validate", "getFormValues", "setFormValues", "setFieldState", "resetFields", "queryWidget", "getFieldList", "applySelectedSetting", "getTextFormValues"];
|
|
409
|
+
formRenderExposeKeyList: readonly ["validate", "getFormValues", "setFormValues", "setFieldState", "resetFields", "queryWidget", "getFieldList", "applySelectedSetting", "getTextFormValues", "optionInited"];
|
|
410
410
|
exposed: Partial<import("..").FormRenderExpose>;
|
|
411
411
|
FormRender: import("vue").DefineComponent<{
|
|
412
412
|
fieldList: {
|
|
@@ -815,6 +815,10 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
815
815
|
businessCollector: import("..").BusinessCollector;
|
|
816
816
|
formItemDepsCollector: import("..").FormItemDepsCollector;
|
|
817
817
|
changeContextCollector: import("..").ContextCollector;
|
|
818
|
+
asyncQueue: import("../../shared/hooks").AsyncQueue<import("../../shared/hooks").FormRequestDefine.AsyncQueueItem, any, {
|
|
819
|
+
label: string;
|
|
820
|
+
value: unknown;
|
|
821
|
+
}[]>;
|
|
818
822
|
formUUID: string;
|
|
819
823
|
anchorBarRef: import("vue").Ref<{
|
|
820
824
|
syncBarPosition: import("../../shared/types").AnyFn;
|
|
@@ -846,13 +850,11 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
846
850
|
afterRequest(fieldKey: string, res?: any, payload?: import("../../shared/types").AnyObject | undefined): import("../../shared/types").AnyObject[] | Promise<import("../../shared/types").AnyObject[]>;
|
|
847
851
|
afterOptionInit(fieldKey: string, options: import("../../shared/types").AnyObject[], payload?: import("../../shared/types").AnyObject | undefined): void;
|
|
848
852
|
}>>[T_2]>>;
|
|
849
|
-
triggerAutoHidden: (field: import("@formily/core").GeneralField, includeLinebar?: boolean) => Promise<void>;
|
|
850
853
|
observeFormGraph: Record<string, import("@formily/core").GeneralField>;
|
|
851
854
|
setGraph: (field: import("@formily/core").GeneralField) => void;
|
|
852
855
|
removeGraph: (field: import("@formily/core").GeneralField) => void;
|
|
853
856
|
lowCodeEventTrigger: (field: import("@formily/core").GeneralField) => void;
|
|
854
857
|
emitFormChange: import("vue").Ref<boolean>;
|
|
855
|
-
isReady: boolean;
|
|
856
858
|
formModel: import("@formily/core").Form<{
|
|
857
859
|
[x: string]: any;
|
|
858
860
|
}>;
|
|
@@ -1142,7 +1144,7 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
1142
1144
|
startIncrementalRender: () => void;
|
|
1143
1145
|
onKeydown: (event: KeyboardEvent) => Promise<void>;
|
|
1144
1146
|
clearSpan: (uuid: string) => void;
|
|
1145
|
-
exposeEvent: Omit<import("..").FormRenderExpose, "getFieldList" | "formModel" | "reload">;
|
|
1147
|
+
exposeEvent: Omit<import("..").FormRenderExpose, "getFieldList" | "optionInited" | "formModel" | "reload">;
|
|
1146
1148
|
useVersion: typeof import("../../shared/hooks").useVersion;
|
|
1147
1149
|
FormConsumer: import("vue").DefineComponent<{}, () => any, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
|
1148
1150
|
FormProvider: import("vue").DefineComponent<Record<"form", any>, unknown, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<Record<"form", any>>>, {
|
|
@@ -2419,7 +2421,7 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
2419
2421
|
formRenderRef: import("vue").Ref<import("..").FormRenderExpose | undefined>;
|
|
2420
2422
|
key: import("vue").Ref<number>;
|
|
2421
2423
|
reload: () => Promise<void>;
|
|
2422
|
-
formRenderExposeKeyList: readonly ["validate", "getFormValues", "setFormValues", "setFieldState", "resetFields", "queryWidget", "getFieldList", "applySelectedSetting", "getTextFormValues"];
|
|
2424
|
+
formRenderExposeKeyList: readonly ["validate", "getFormValues", "setFormValues", "setFieldState", "resetFields", "queryWidget", "getFieldList", "applySelectedSetting", "getTextFormValues", "optionInited"];
|
|
2423
2425
|
exposed: Partial<import("..").FormRenderExpose>;
|
|
2424
2426
|
FormRender: import("vue").DefineComponent<{
|
|
2425
2427
|
fieldList: {
|
|
@@ -2828,6 +2830,10 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
2828
2830
|
businessCollector: import("..").BusinessCollector;
|
|
2829
2831
|
formItemDepsCollector: import("..").FormItemDepsCollector;
|
|
2830
2832
|
changeContextCollector: import("..").ContextCollector;
|
|
2833
|
+
asyncQueue: import("../../shared/hooks").AsyncQueue<import("../../shared/hooks").FormRequestDefine.AsyncQueueItem, any, {
|
|
2834
|
+
label: string;
|
|
2835
|
+
value: unknown;
|
|
2836
|
+
}[]>;
|
|
2831
2837
|
formUUID: string;
|
|
2832
2838
|
anchorBarRef: import("vue").Ref<{
|
|
2833
2839
|
syncBarPosition: import("../../shared/types").AnyFn;
|
|
@@ -2859,13 +2865,11 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
2859
2865
|
afterRequest(fieldKey: string, res?: any, payload?: import("../../shared/types").AnyObject | undefined): import("../../shared/types").AnyObject[] | Promise<import("../../shared/types").AnyObject[]>;
|
|
2860
2866
|
afterOptionInit(fieldKey: string, options: import("../../shared/types").AnyObject[], payload?: import("../../shared/types").AnyObject | undefined): void;
|
|
2861
2867
|
}>>[T_2]>>;
|
|
2862
|
-
triggerAutoHidden: (field: import("@formily/core").GeneralField, includeLinebar?: boolean) => Promise<void>;
|
|
2863
2868
|
observeFormGraph: Record<string, import("@formily/core").GeneralField>;
|
|
2864
2869
|
setGraph: (field: import("@formily/core").GeneralField) => void;
|
|
2865
2870
|
removeGraph: (field: import("@formily/core").GeneralField) => void;
|
|
2866
2871
|
lowCodeEventTrigger: (field: import("@formily/core").GeneralField) => void;
|
|
2867
2872
|
emitFormChange: import("vue").Ref<boolean>;
|
|
2868
|
-
isReady: boolean;
|
|
2869
2873
|
formModel: import("@formily/core").Form<{
|
|
2870
2874
|
[x: string]: any;
|
|
2871
2875
|
}>;
|
|
@@ -3155,7 +3159,7 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
3155
3159
|
startIncrementalRender: () => void;
|
|
3156
3160
|
onKeydown: (event: KeyboardEvent) => Promise<void>;
|
|
3157
3161
|
clearSpan: (uuid: string) => void;
|
|
3158
|
-
exposeEvent: Omit<import("..").FormRenderExpose, "getFieldList" | "formModel" | "reload">;
|
|
3162
|
+
exposeEvent: Omit<import("..").FormRenderExpose, "getFieldList" | "optionInited" | "formModel" | "reload">;
|
|
3159
3163
|
useVersion: typeof import("../../shared/hooks").useVersion;
|
|
3160
3164
|
FormConsumer: import("vue").DefineComponent<{}, () => any, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
|
3161
3165
|
FormProvider: import("vue").DefineComponent<Record<"form", any>, unknown, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<Record<"form", any>>>, {
|
|
@@ -409,7 +409,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
409
409
|
formRenderRef: Ref<FormRenderExpose | undefined>;
|
|
410
410
|
key: Ref<number>;
|
|
411
411
|
reload: () => Promise<void>;
|
|
412
|
-
formRenderExposeKeyList: readonly ["validate", "getFormValues", "setFormValues", "setFieldState", "resetFields", "queryWidget", "getFieldList", "applySelectedSetting", "getTextFormValues"];
|
|
412
|
+
formRenderExposeKeyList: readonly ["validate", "getFormValues", "setFormValues", "setFieldState", "resetFields", "queryWidget", "getFieldList", "applySelectedSetting", "getTextFormValues", "optionInited"];
|
|
413
413
|
exposed: Partial<FormRenderExpose>;
|
|
414
414
|
FormRender: import("vue").DefineComponent<{
|
|
415
415
|
fieldList: {
|
|
@@ -818,6 +818,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
818
818
|
businessCollector: import("../../../components/form-render").BusinessCollector;
|
|
819
819
|
formItemDepsCollector: import("../../../components/form-render").FormItemDepsCollector;
|
|
820
820
|
changeContextCollector: import("../../../components/form-render").ContextCollector;
|
|
821
|
+
asyncQueue: import("../../../shared/hooks").AsyncQueue<import("../../../shared/hooks").FormRequestDefine.AsyncQueueItem, any, {
|
|
822
|
+
label: string;
|
|
823
|
+
value: unknown;
|
|
824
|
+
}[]>;
|
|
821
825
|
formUUID: string;
|
|
822
826
|
anchorBarRef: Ref<{
|
|
823
827
|
syncBarPosition: AnyFn;
|
|
@@ -849,13 +853,11 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
849
853
|
afterRequest(fieldKey: string, res?: any, payload?: import("../../../shared/types").AnyObject | undefined): import("../../../shared/types").AnyObject[] | Promise<import("../../../shared/types").AnyObject[]>;
|
|
850
854
|
afterOptionInit(fieldKey: string, options: import("../../../shared/types").AnyObject[], payload?: import("../../../shared/types").AnyObject | undefined): void;
|
|
851
855
|
}>>[T_2]>>;
|
|
852
|
-
triggerAutoHidden: (field: import("@formily/core").GeneralField, includeLinebar?: boolean) => Promise<void>;
|
|
853
856
|
observeFormGraph: Record<string, import("@formily/core").GeneralField>;
|
|
854
857
|
setGraph: (field: import("@formily/core").GeneralField) => void;
|
|
855
858
|
removeGraph: (field: import("@formily/core").GeneralField) => void;
|
|
856
859
|
lowCodeEventTrigger: (field: import("@formily/core").GeneralField) => void;
|
|
857
860
|
emitFormChange: Ref<boolean>;
|
|
858
|
-
isReady: boolean;
|
|
859
861
|
formModel: import("@formily/core").Form<{
|
|
860
862
|
[x: string]: any;
|
|
861
863
|
}>;
|
|
@@ -1145,7 +1147,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
1145
1147
|
startIncrementalRender: () => void;
|
|
1146
1148
|
onKeydown: (event: KeyboardEvent) => Promise<void>;
|
|
1147
1149
|
clearSpan: (uuid: string) => void;
|
|
1148
|
-
exposeEvent: Omit<FormRenderExpose, "getFieldList" | "formModel" | "reload">;
|
|
1150
|
+
exposeEvent: Omit<FormRenderExpose, "getFieldList" | "optionInited" | "formModel" | "reload">;
|
|
1149
1151
|
useVersion: typeof useVersion;
|
|
1150
1152
|
FormConsumer: import("vue").DefineComponent<{}, () => any, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
|
1151
1153
|
FormProvider: import("vue").DefineComponent<Record<"form", any>, unknown, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<Record<"form", any>>>, {
|
|
@@ -2422,7 +2424,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
2422
2424
|
formRenderRef: Ref<FormRenderExpose | undefined>;
|
|
2423
2425
|
key: Ref<number>;
|
|
2424
2426
|
reload: () => Promise<void>;
|
|
2425
|
-
formRenderExposeKeyList: readonly ["validate", "getFormValues", "setFormValues", "setFieldState", "resetFields", "queryWidget", "getFieldList", "applySelectedSetting", "getTextFormValues"];
|
|
2427
|
+
formRenderExposeKeyList: readonly ["validate", "getFormValues", "setFormValues", "setFieldState", "resetFields", "queryWidget", "getFieldList", "applySelectedSetting", "getTextFormValues", "optionInited"];
|
|
2426
2428
|
exposed: Partial<FormRenderExpose>;
|
|
2427
2429
|
FormRender: import("vue").DefineComponent<{
|
|
2428
2430
|
fieldList: {
|
|
@@ -2831,6 +2833,10 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
2831
2833
|
businessCollector: import("../../../components/form-render").BusinessCollector;
|
|
2832
2834
|
formItemDepsCollector: import("../../../components/form-render").FormItemDepsCollector;
|
|
2833
2835
|
changeContextCollector: import("../../../components/form-render").ContextCollector;
|
|
2836
|
+
asyncQueue: import("../../../shared/hooks").AsyncQueue<import("../../../shared/hooks").FormRequestDefine.AsyncQueueItem, any, {
|
|
2837
|
+
label: string;
|
|
2838
|
+
value: unknown;
|
|
2839
|
+
}[]>;
|
|
2834
2840
|
formUUID: string;
|
|
2835
2841
|
anchorBarRef: Ref<{
|
|
2836
2842
|
syncBarPosition: AnyFn;
|
|
@@ -2862,13 +2868,11 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
2862
2868
|
afterRequest(fieldKey: string, res?: any, payload?: import("../../../shared/types").AnyObject | undefined): import("../../../shared/types").AnyObject[] | Promise<import("../../../shared/types").AnyObject[]>;
|
|
2863
2869
|
afterOptionInit(fieldKey: string, options: import("../../../shared/types").AnyObject[], payload?: import("../../../shared/types").AnyObject | undefined): void;
|
|
2864
2870
|
}>>[T_2]>>;
|
|
2865
|
-
triggerAutoHidden: (field: import("@formily/core").GeneralField, includeLinebar?: boolean) => Promise<void>;
|
|
2866
2871
|
observeFormGraph: Record<string, import("@formily/core").GeneralField>;
|
|
2867
2872
|
setGraph: (field: import("@formily/core").GeneralField) => void;
|
|
2868
2873
|
removeGraph: (field: import("@formily/core").GeneralField) => void;
|
|
2869
2874
|
lowCodeEventTrigger: (field: import("@formily/core").GeneralField) => void;
|
|
2870
2875
|
emitFormChange: Ref<boolean>;
|
|
2871
|
-
isReady: boolean;
|
|
2872
2876
|
formModel: import("@formily/core").Form<{
|
|
2873
2877
|
[x: string]: any;
|
|
2874
2878
|
}>;
|
|
@@ -3158,7 +3162,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
3158
3162
|
startIncrementalRender: () => void;
|
|
3159
3163
|
onKeydown: (event: KeyboardEvent) => Promise<void>;
|
|
3160
3164
|
clearSpan: (uuid: string) => void;
|
|
3161
|
-
exposeEvent: Omit<FormRenderExpose, "getFieldList" | "formModel" | "reload">;
|
|
3165
|
+
exposeEvent: Omit<FormRenderExpose, "getFieldList" | "optionInited" | "formModel" | "reload">;
|
|
3162
3166
|
useVersion: typeof useVersion;
|
|
3163
3167
|
FormConsumer: import("vue").DefineComponent<{}, () => any, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
|
|
3164
3168
|
FormProvider: import("vue").DefineComponent<Record<"form", any>, unknown, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<Record<"form", any>>>, {
|