1 |
- (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-6f32ca18"],{"24a5":function(e,t,a){"use strict";a.r(t);var i=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",[e.printDialogVisible?a("el-dialog",{attrs:{title:e.tableData.companyName,visible:e.printDialogVisible,width:"1100px","close-on-press-escape":!1,"close-on-click-modal":!1,"before-close":e.cancel},on:{"update:visible":function(t){e.printDialogVisible=t},close:e.cancel}},[a("div",{staticStyle:{"max-height":"70vh",overflow:"auto","padding-bottom":"20px"}},[a("el-row",{staticClass:"row_box"},[a("el-col",{attrs:{span:8}},[a("span",[e._v(" 姓 "),a("i",{staticClass:"kong_box"}),e._v(" 名: "+e._s(e.tableData.patientName)+" ")])]),a("el-col",{attrs:{span:8}},[e._v(" 性 "),a("i",{staticClass:"kong_box"}),e._v(" 别: "+e._s(e.initSex(e.tableData.sex))+" ")]),a("el-col",{attrs:{span:8}},[e._v(" 年 "),a("i",{staticClass:"kong_box"}),e._v(" 龄: "+e._s(e.tableData.age)+" ")])],1),a("el-row",{staticClass:"row_box"},[a("el-col",{attrs:{span:8}},[a("span",[e._v(" 出生日期: "+e._s(e.tableData.birthday)+" ")])]),a("el-col",{attrs:{span:8}},[e._v(" 民 "),a("i",{staticClass:"kong_box"}),e._v(" 族: "+e._s(e.tableData.nationality)+" ")]),a("el-col",{attrs:{span:8}},[e._v(" 婚 "),a("i",{staticClass:"kong_box"}),e._v(" 姻: "+e._s(e.initMarriage(e.tableData.marriage))+" ")])],1),a("el-row",{staticClass:"row_box"},[a("el-col",{attrs:{span:8}},[a("span",[e._v(" 电 "),a("i",{staticClass:"kong_box"}),e._v(" 话: "+e._s(e.tableData.patientPhone)+" ")])]),a("el-col",{attrs:{span:8}},[e._v(" 工作单位: "+e._s(e.tableData.workUnit)+" ")]),a("el-col",{attrs:{span:8}},[e._v(" 职 "),a("i",{staticClass:"kong_box"}),e._v(" 业: "+e._s(e.tableData.occupation)+" ")])],1),a("el-row",{staticClass:"row_box"},[a("el-col",{attrs:{span:24}},[a("span",[e._v(" 现"),a("i",{staticStyle:{width:"5px",display:"inline-block"}}),e._v(" 住"),a("i",{staticStyle:{width:"5px",display:"inline-block"}}),e._v("址: "+e._s(e.tableData.homeAddress)+" ")])])],1),a("el-row",{staticClass:"row_box"},[a("el-col",{attrs:{span:8}},[a("span",[e._v(" 联系人电话: "+e._s(e.tableData.linkPhone)+" ")])]),a("el-col",{attrs:{span:16}},[e._v(" 联系人姓名(与患者关系): "+e._s(e.tableData.personalRelationship)+" ")])],1),a("el-divider"),e._l(e.tableData.listMap,(function(t,i,n){return a("div",{key:n,staticClass:"row_df_box"},[a("span",{staticStyle:{width:"120px"}},[e._v(" "+e._s(i)+" ")]),e.xianList.includes(i)?a("span",{staticStyle:{display:"flex",flex:"1","flex-direction":"column"}},[a("div",{staticStyle:{display:"flex","align-items":"center"}},[a("el-checkbox",{staticStyle:{"margin-right":"10px"},on:{change:function(t){return e.changeVal(e.tableData.listMap[i][0])}},model:{value:e.tableData.listMap[i][0].flagCheck,callback:function(t){e.$set(e.tableData.listMap[i][0],"flagCheck",t)},expression:"tableData.listMap[key][0].flagCheck"}}),a("span",[e._v(" "+e._s(e.initToothPosition(e.tableData.listMap[i][0].toothPosition))+" "+e._s(e.tableData.listMap[i][0].contentInfo)+" ")])],1)]):a("span",{staticStyle:{display:"flex",flex:"1","flex-direction":"column"}},e._l(e.tableData.listMap[i],(function(t,i){return a("div",{key:i},[a("el-checkbox",{staticStyle:{"margin-right":"10px"},on:{change:function(a){return e.changeVal(t)}},model:{value:t.flagCheck,callback:function(a){e.$set(t,"flagCheck",a)},expression:"x.flagCheck"}}),a("span",[e._v(" "+e._s(e.initToothPosition(t.toothPosition))+" "+e._s(t.contentInfo)+" ")])],1)})),0)])})),a("vue-editor",{staticStyle:{"margin-top":"20px"},attrs:{id:"editor",disabled:!0,useCustomImageHandler:""},model:{value:e.protocolTemplateContent,callback:function(t){e.protocolTemplateContent=t},expression:"protocolTemplateContent"}})],2),a("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("el-button",{on:{click:e.cancel}},[e._v("取 消")]),a("el-button",{attrs:{type:"primary"},on:{click:e.dayin}},[e._v("打 印")])],1)]):e._e(),a("el-dialog",{attrs:{title:"预览附件",visible:e.previewAnnex,fullscreen:!0,"close-on-click-modal":!1,"destroy-on-close":!0},on:{"update:visible":function(t){e.previewAnnex=t}}},[a("preview-file",{attrs:{"preview-url":e.previewUrl,"preview-type":e.previewType},on:{handleDownload:e.handleDownload}}),a("div",{staticClass:"batch-dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("el-button",{attrs:{type:"primary"},on:{click:function(t){e.previewAnnex=!1}}},[e._v(" 关闭 ")])],1)],1)],1)},n=[],r=a("c7eb"),s=a("1da1"),l=(a("14d9"),a("ace4"),a("b64b"),a("d3b7"),a("ac1f"),a("3ca3"),a("466d"),a("5cc6"),a("907a"),a("9a8c"),a("a975"),a("735e"),a("c1ac"),a("d139"),a("3a7b"),a("986a"),a("1d02"),a("d5d6"),a("82f8"),a("e91f"),a("60bd"),a("5f96"),a("3280"),a("3fcc"),a("ca91"),a("25a1"),a("cd26"),a("3c5d"),a("2954"),a("649e"),a("219c"),a("170b"),a("b39a"),a("72f7"),a("1b3b"),a("3d71"),a("c6e3"),a("81b2"),a("159b"),a("ddb0"),a("0eb6"),a("b7ef"),a("8bd4"),a("2b3d"),a("bf19"),a("9861"),a("943d")),o=a("46f9"),c=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{},[["docx","xls","xlsx","txt"].includes(e.fileType)&&!e.isAudit?a("div",{staticClass:"button_download"},[a("el-button",{attrs:{type:"text"},on:{click:e.handleDownload}},[e._v(" 下载 ")])],1):e._e(),e.isAudit?a("div",{staticClass:"button_download"},[a("el-button",{attrs:{type:"primary"},on:{click:function(t){return e.$emit("pass")}}},[e._v(" 通过 ")]),a("el-button",{attrs:{type:"primary"},on:{click:function(t){return e.$emit("sendBack")}}},[e._v(" 退回 ")])],1):e._e(),a("div",{staticStyle:{width:"100%",height:"100%"}},[e.textValue?a("div",{attrs:{id:"textValue"},domProps:{innerHTML:e._s(e.textValue)}}):e._e(),e.imgUrl?a("el-image",{staticStyle:{width:"100%",height:"100%","min-height":"100vh"},attrs:{src:e.imgUrl,"preview-src-list":e.imgUrl.split()}}):e._e(),e.pdfUrl?a("iframe",{staticStyle:{width:"100%",height:"100%","min-height":"100vh"},attrs:{src:e.pdfUrl,frameborder:"0"}}):e._e(),e.videoUrl?a("video",{staticStyle:{width:"100%",height:"100%","max-height":"800px"},attrs:{src:e.videoUrl,controls:""}}):e._e(),a("div",{directives:[{name:"show",rawName:"v-show",value:e.docFile,expression:"docFile"}]},[a("div",{ref:"file"})]),e.xlsFile?a("div",{attrs:{id:"excel-view-container"}},[e.sheetNames&&e.sheetNames.length?a("el-tabs",{attrs:{type:"border-card"},on:{"tab-click":e.handleClick}},e._l(e.sheetNames,(function(t,i){return a("el-tab-pane",{key:i,attrs:{label:t}},[a("div",{attrs:{id:"excelView"},domProps:{innerHTML:e._s(e.excelView)}})])})),1):e._e()],1):e._e()],1)])},d=[],u=(a("a630"),a("fb6a"),a("5319"),a("376d")),p=a("25ca"),f=a("bc3a"),h=a.n(f),b={props:{previewType:{type:String,default:""},previewUrl:{type:Blob,default:""},previewImgUrl:{type:String,default:""},isAudit:{type:Boolean,default:!1}},data:function(){return{fileType:"",data:"",imgUrl:"",pdfUrl:"",videoUrl:"",excelView:"",docFile:!1,xlsFile:!1,execlArraybufferData:null,sheetNames:null,workbooks:null,textValue:""}},watch:{previewType:{handler:function(e){this.fileType=e},immediate:!0,deep:!0},previewUrl:{handler:function(e){this.data=e,this.sheetNames=null,this.workbooks=null,this.filePreviewPDF()},immediate:!0,deep:!0}},methods:{handleDownload:function(){this.$emit("handleDownload")},filePreviewPDF:function(){var e=this;if(this.pdfUrl="",this.docFile=!1,this.xlsFile=!1,"mp4"===this.fileType)this.videoUrl=window.URL.createObjectURL(this.data);else if("txt"===this.fileType){var t=window.URL.createObjectURL(this.data);h.a.get(t,{responseType:"text"}).then((function(t){var a=t.data.replace(/\r\n|\n|\r/g,"<br/>");e.textValue=a}))}else if("pdf"===this.fileType)this.pdfUrl=window.URL.createObjectURL(this.data);else if("docx"===this.fileType)this.docFile=!0,this.$nextTick((function(){u["renderAsync"](e.data,e.$refs.file).then((function(e){return console.log("docx: finished",e)}))}));else if("xls"===this.fileType||"xlsx"===this.fileType){this.xlsFile=!0,this.XLSX=p;var a=new FileReader;a.readAsArrayBuffer(this.data),this.tabChange(0,a)}else"png"===this.fileType||"jpg"===this.fileType||"jpeg"===this.fileType?this.imgUrl=this.previewImgUrl:(this.handleClose(),this.$message.error("不支持此文件预览"))},handleClick:function(e){this.tabChange(e.index)},tabChange:function(e,t){this.excelView="";var a=this.XLSX,i=this;if(this.sheetNames){var n=this.workbooks.Sheets[this.sheetNames[e]];this.excelView=a.utils.sheet_to_html(n)}else t.onload=function(){var t=this.result;this.execlArraybufferData=t;var n=new Uint8Array(t),r=a.read(n,{type:"array"});i.workbooks=r;var s=r.SheetNames;i.sheetNames=s;var l=r.Sheets[s[e]];i.excelView=a.utils.sheet_to_html(l),i.$nextTick((function(){i.setStyle4ExcelHtml()}))}},setStyle4ExcelHtml:function(){var e=document.getElementById("excelView");if(e){var t=e.getElementsByTagName("td");if(t){var a=Array.prototype.slice.call(t);Object.keys(a).forEach((function(e){var t=a[e].id;if(t){var i=t.replace(/[^0-9]/gi,"");!i||"1"!==i&&1!==i||a[e].classList.add("class4Title"),!i||"2"!==i&&2!==i||a[e].classList.add("class4TableTh")}}))}}},handleClose:function(){this.$emit("closeDialog",!1)},print:function(){var e="";"docx"===this.fileType?e=Array.from(document.getElementsByClassName("docx"))[0].innerHTML:"xls"===this.fileType||"xlsx"===this.fileType?e=document.getElementById("excelView").innerHTML:"txt"===this.fileType&&(e=document.getElementById("textValue").innerHTML);var t=document.createElement("iframe");t.setAttribute("style","position:absolute;width:0px;height:0px;left:-500px;top:-500px;");var a='<style>\n @page{margin:2cm 3cm;}\n .article-area{margin: 0 50px 0 50px;}\n .article-title{text-align: center;line-height: 42px;font-size: 22px;padding-top: 5px;font-family: "微软雅黑";color: #333333;min-height:55px;}\n .article-main {font-family: "微软雅黑";color: #333333;font-size: 15px;}\n table {\n color: #000 !important;\n width: 100%;\n border-collapse: collapse;\n border: solid 1px #000 !important;\n }\n tr,td,th {\n border: solid 1px #000 !important;\n text-align: center;\n padding: 10px;\n }\n </style>';document.body.appendChild(t),t.contentDocument.write(a+e),t.contentDocument.close(),t.contentWindow.onload=setTimeout((function(){t.contentWindow.focus(),t.contentWindow.print(),document.body.removeChild(t)}),0)}}},w=b,m=(a("ddb6"),a("2877")),v=Object(m["a"])(w,c,d,!1,null,"dfbb3f02",null),x=v.exports,g=a("5873"),y={name:"EitcErmPcPrintMedical",mixins:[o["a"]],components:{previewFile:x,VueEditor:g["a"]},props:{printDialogVisible:{type:Boolean,default:!1},medicalRecordId:{type:String,default:""},protocolTemplateId:{type:String,default:""},protocolTemplateContent:{type:String,default:""}},watch:{medicalRecordId:function(e){e&&this.initList()}},data:function(){return{xianList:["主诉","现病史","既往史","家族史","过敏史"],tableData:{},previewAnnex:!1,previewUrl:"",previewType:"",filename:""}},mounted:function(){this.initList()},methods:{initList:function(){var e=this;return Object(s["a"])(Object(r["a"])().mark((function t(){var a;return Object(r["a"])().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,Object(l["D"])({medicalRecordId:e.medicalRecordId,protocolTemplateId:e.protocolTemplateId});case 2:a=t.sent,Object.keys(a.data.listMap).forEach((function(e,t,i){a.data.listMap[e].forEach((function(e){e.flagCheck=!0}))})),e.tableData=a.data;case 5:case"end":return t.stop()}}),t)})))()},cancel:function(){this.$emit("cancelAll","5")},changeVal:function(e){console.log(this.tableData.listMap)},dayin:function(){var e=this;return Object(s["a"])(Object(r["a"])().mark((function t(){var a,i,n,s;return Object(r["a"])().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,Object(l["H"])(e.tableData);case 2:a=t.sent,i=a,n=[],n.push(i),s=window.URL.createObjectURL(new Blob(n,{type:"application/pdf"})),window.open(s);case 8:case"end":return t.stop()}}),t)})))()},handleDownload:function(){var e=URL.createObjectURL(this.previewUrl);this.downloadFile(e,this.filename)},dataURLtoBlob:function(e){var t=e.split(","),a=t[0].match(/:(.*?);/)[1],i=atob(t[1]),n=i.length,r=new Uint8Array(n);while(n--)r[n]=i.charCodeAt(n);return new Blob([r],{type:a})},downloadFile:function(e,t){var a=document.createElement("a");a.setAttribute("href",e),a.setAttribute("download",t),a.setAttribute("target","_blank");var i=document.createEvent("MouseEvents");i.initEvent("click",!0,!0),a.dispatchEvent(i)}}},_=y,k=(a("fd1d"),Object(m["a"])(_,i,n,!1,null,"c8456c14",null));t["default"]=k.exports},"46f9":function(e,t,a){"use strict";t["a"]={data:function(){return{}},methods:{initPatientSource:function(e){switch(e){case 1:return"朋友介绍";case 2:return"自进门店";default:return""}},initBloodGroup:function(e){switch(e){case 1:return"A型血";case 2:return"B型血";case 3:return"O型血";case 4:return"AB型血";case 5:return"RH型血";default:return""}},initSex:function(e){switch(e){case 1:return"男";case 2:return"女";default:return""}},initMarriage:function(e){switch(e){case 1:return"未婚";case 2:return"已婚";case 3:return"丧偶";case 4:return"离婚";default:return""}},initPatientType:function(e){switch(e){case 1:return"临时";case 2:return"普通";default:return""}},initPppointmentStatus:function(e){switch(e){case 1:return"预约";case 2:return"已确定";case 3:return"已到店";case 4:return"待复诊";case 5:return"治疗完成";case 6:return"已结账";case 7:return"已离开";case 8:return"已失约";default:return""}},initToothPosition:function(e){switch(e){case"upLeft1":return"上左牙位1";case"upLeft2":return"上左牙位2";case"upLeft3":return"上左牙位3";case"upLeft4":return"上左牙位4";case"upLeft5":return"上左牙位5";case"upLeft6":return"上左牙位6";case"upLeft7":return"上左牙位7";case"upLeft8":return"上左牙位8";case"upRight1":return"上右牙位1";case"upRight2":return"上右牙位2";case"upRight3":return"上右牙位3";case"upRight4":return"上右牙位4";case"upRight5":return"上右牙位5";case"upRight6":return"上右牙位6";case"upRight7":return"上右牙位7";case"upRight8":return"上右牙位8";case"downLeft1":return"下左牙位1";case"downLeft2":return"下左牙位2";case"downLeft3":return"下左牙位3";case"downLeft4":return"下左牙位4";case"downLeft5":return"下左牙位5";case"downLeft6":return"下左牙位6";case"downLeft7":return"下左牙位7";case"downLeft8":return"下左牙位8";case"downRight1":return"下左牙位1";case"downRight2":return"下左牙位2";case"downRight3":return"下左牙位3";case"downRight4":return"下左牙位4";case"downRight5":return"下左牙位5";case"downRight6":return"下左牙位6";case"downRight7":return"下左牙位7";case"downRight8":return"下左牙位8";default:return"-"}},initBgc:function(e){switch(e){case 1:return"#649aff";case 2:return"#00f900";case 3:return"#b6d8b3";case 4:return"#fdc86a";case 5:return"#74a863";case 6:return"#ff8683";case 7:return"#8a8385";case 8:return"#c7c7c7";default:}}}}},4736:function(e,t,a){},"48d9":function(e,t,a){},ddb6:function(e,t,a){"use strict";a("4736")},fd1d:function(e,t,a){"use strict";a("48d9")}}]);
|