(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-af77c7ce"],{"1b81":function(t,e,n){},"24a5":function(t,e,n){"use strict";n.r(e);var a=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",[t.printDialogVisible?n("el-dialog",{attrs:{title:"北京电子医院口腔科病历",visible:t.printDialogVisible,width:"1100px","close-on-press-escape":!1,"close-on-click-modal":!1,"before-close":t.cancel},on:{"update:visible":function(e){t.printDialogVisible=e},close:t.cancel}},[n("div",{staticStyle:{"max-height":"70vh",overflow:"auto"}},[n("el-row",{staticClass:"row_box"},[n("el-col",{attrs:{span:8}},[n("span",[t._v(" 姓 "),n("i",{staticClass:"kong_box"}),t._v(" 名: "+t._s(t.tableData.patientName)+" ")])]),n("el-col",{attrs:{span:8}},[t._v(" 性 "),n("i",{staticClass:"kong_box"}),t._v(" 别: "+t._s(t.initSex(t.tableData.sex))+" ")]),n("el-col",{attrs:{span:8}},[t._v(" 年 "),n("i",{staticClass:"kong_box"}),t._v(" 龄: "+t._s(t.tableData.age)+" ")])],1),n("el-row",{staticClass:"row_box"},[n("el-col",{attrs:{span:8}},[n("span",[t._v(" 出生日期: "+t._s(t.tableData.birthday)+" ")])]),n("el-col",{attrs:{span:8}},[t._v(" 民 "),n("i",{staticClass:"kong_box"}),t._v(" 族: "+t._s(t.tableData.nationality)+" ")]),n("el-col",{attrs:{span:8}},[t._v(" 婚 "),n("i",{staticClass:"kong_box"}),t._v(" 姻: "+t._s(t.initMarriage(t.tableData.marriage))+" ")])],1),n("el-row",{staticClass:"row_box"},[n("el-col",{attrs:{span:8}},[n("span",[t._v(" 电 "),n("i",{staticClass:"kong_box"}),t._v(" 话: "+t._s(t.tableData.patientPhone)+" ")])]),n("el-col",{attrs:{span:8}},[t._v(" 工作单位: "+t._s(t.tableData.workUnit)+" ")]),n("el-col",{attrs:{span:8}},[t._v(" 职 "),n("i",{staticClass:"kong_box"}),t._v(" 业: "+t._s(t.tableData.occupation)+" ")])],1),n("el-row",{staticClass:"row_box"},[n("el-col",{attrs:{span:24}},[n("span",[t._v(" 现"),n("i",{staticStyle:{width:"5px",display:"inline-block"}}),t._v(" 住"),n("i",{staticStyle:{width:"5px",display:"inline-block"}}),t._v("址: "+t._s(t.tableData.homeAddress)+" ")])])],1),n("el-row",{staticClass:"row_box"},[n("el-col",{attrs:{span:8}},[n("span",[t._v(" 联系人电话: "+t._s(t.tableData.linkPhone)+" ")])]),n("el-col",{attrs:{span:16}},[t._v(" 联系人姓名(与患者关系): "+t._s(t.tableData.personalRelationship)+" ")])],1),n("el-divider"),t._l(t.tableData.listMap,(function(e,a,r){return n("div",{key:r,staticClass:"row_df_box"},[n("span",{staticStyle:{width:"120px"}},[t._v(" "+t._s(a)+" ")]),t.xianList.includes(a)?n("span",{staticStyle:{display:"flex",flex:"1","flex-direction":"column"}},[n("div",{staticStyle:{display:"flex","align-items":"center"}},[n("el-checkbox",{staticStyle:{"margin-right":"10px"},on:{change:function(e){return t.changeVal(t.tableData.listMap[a][0])}},model:{value:t.tableData.listMap[a][0].flagCheck,callback:function(e){t.$set(t.tableData.listMap[a][0],"flagCheck",e)},expression:"tableData.listMap[key][0].flagCheck"}}),n("span",[t._v(" "+t._s(t.initToothPosition(t.tableData.listMap[a][0].toothPosition))+" "+t._s(t.tableData.listMap[a][0].contentInfo)+" ")])],1)]):n("span",{staticStyle:{display:"flex",flex:"1","flex-direction":"column"}},t._l(t.tableData.listMap[a],(function(e,a){return n("div",{key:a},[n("el-checkbox",{staticStyle:{"margin-right":"10px"},on:{change:function(n){return t.changeVal(e)}},model:{value:e.flagCheck,callback:function(n){t.$set(e,"flagCheck",n)},expression:"x.flagCheck"}}),n("span",[t._v(" "+t._s(t.initToothPosition(e.toothPosition))+" "+t._s(e.contentInfo)+" ")])],1)})),0)])}))],2),n("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[n("el-button",{on:{click:t.cancel}},[t._v("取 消")]),n("el-button",{attrs:{type:"primary"},on:{click:t.dayin}},[t._v("打 印")])],1)]):t._e(),n("el-dialog",{attrs:{title:"预览附件",visible:t.previewAnnex,fullscreen:!0,"close-on-click-modal":!1,"destroy-on-close":!0},on:{"update:visible":function(e){t.previewAnnex=e}}},[n("preview-file",{attrs:{"preview-url":t.previewUrl,"preview-type":t.previewType},on:{handleDownload:t.handleDownload}}),n("div",{staticClass:"batch-dialog-footer",attrs:{slot:"footer"},slot:"footer"},[n("el-button",{attrs:{type:"primary"},on:{click:function(e){t.previewAnnex=!1}}},[t._v(" 关闭 ")])],1)],1)],1)},r=[],i=n("c7eb"),o=n("1da1"),c=(n("14d9"),n("ace4"),n("b64b"),n("d3b7"),n("ac1f"),n("3ca3"),n("466d"),n("5cc6"),n("907a"),n("9a8c"),n("a975"),n("735e"),n("c1ac"),n("d139"),n("3a7b"),n("986a"),n("1d02"),n("d5d6"),n("82f8"),n("e91f"),n("60bd"),n("5f96"),n("3280"),n("3fcc"),n("ca91"),n("25a1"),n("cd26"),n("3c5d"),n("2954"),n("649e"),n("219c"),n("170b"),n("b39a"),n("72f7"),n("1b3b"),n("3d71"),n("c6e3"),n("81b2"),n("159b"),n("ddb0"),n("0eb6"),n("b7ef"),n("8bd4"),n("2b3d"),n("bf19"),n("9861"),n("943d")),s=n("46f9"),l=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{},[["docx","xls","xlsx","txt"].includes(t.fileType)&&!t.isAudit?n("div",{staticClass:"button_download"},[n("el-button",{attrs:{type:"text"},on:{click:t.handleDownload}},[t._v(" 下载 ")])],1):t._e(),t.isAudit?n("div",{staticClass:"button_download"},[n("el-button",{attrs:{type:"primary"},on:{click:function(e){return t.$emit("pass")}}},[t._v(" 通过 ")]),n("el-button",{attrs:{type:"primary"},on:{click:function(e){return t.$emit("sendBack")}}},[t._v(" 退回 ")])],1):t._e(),n("div",{staticStyle:{width:"100%",height:"100%"}},[t.textValue?n("div",{attrs:{id:"textValue"},domProps:{innerHTML:t._s(t.textValue)}}):t._e(),t.imgUrl?n("el-image",{staticStyle:{width:"100%",height:"100%","min-height":"100vh"},attrs:{src:t.imgUrl,"preview-src-list":t.imgUrl.split()}}):t._e(),t.pdfUrl?n("iframe",{staticStyle:{width:"100%",height:"100%","min-height":"100vh"},attrs:{src:t.pdfUrl,frameborder:"0"}}):t._e(),t.videoUrl?n("video",{staticStyle:{width:"100%",height:"100%","max-height":"800px"},attrs:{src:t.videoUrl,controls:""}}):t._e(),n("div",{directives:[{name:"show",rawName:"v-show",value:t.docFile,expression:"docFile"}]},[n("div",{ref:"file"})]),t.xlsFile?n("div",{attrs:{id:"excel-view-container"}},[t.sheetNames&&t.sheetNames.length?n("el-tabs",{attrs:{type:"border-card"},on:{"tab-click":t.handleClick}},t._l(t.sheetNames,(function(e,a){return n("el-tab-pane",{key:a,attrs:{label:e}},[n("div",{attrs:{id:"excelView"},domProps:{innerHTML:t._s(t.excelView)}})])})),1):t._e()],1):t._e()],1)])},u=[],d=(n("a630"),n("fb6a"),n("5319"),n("376d")),p=n("25ca"),f=n("bc3a"),h=n.n(f),m={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(t){this.fileType=t},immediate:!0,deep:!0},previewUrl:{handler:function(t){this.data=t,this.sheetNames=null,this.workbooks=null,this.filePreviewPDF()},immediate:!0,deep:!0}},methods:{handleDownload:function(){this.$emit("handleDownload")},filePreviewPDF:function(){var t=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 e=window.URL.createObjectURL(this.data);h.a.get(e,{responseType:"text"}).then((function(e){var n=e.data.replace(/\r\n|\n|\r/g,"
");t.textValue=n}))}else if("pdf"===this.fileType)this.pdfUrl=window.URL.createObjectURL(this.data);else if("docx"===this.fileType)this.docFile=!0,this.$nextTick((function(){d["renderAsync"](t.data,t.$refs.file).then((function(t){return console.log("docx: finished",t)}))}));else if("xls"===this.fileType||"xlsx"===this.fileType){this.xlsFile=!0,this.XLSX=p;var n=new FileReader;n.readAsArrayBuffer(this.data),this.tabChange(0,n)}else"png"===this.fileType||"jpg"===this.fileType||"jpeg"===this.fileType?this.imgUrl=this.previewImgUrl:(this.handleClose(),this.$message.error("不支持此文件预览"))},handleClick:function(t){this.tabChange(t.index)},tabChange:function(t,e){this.excelView="";var n=this.XLSX,a=this;if(this.sheetNames){var r=this.workbooks.Sheets[this.sheetNames[t]];this.excelView=n.utils.sheet_to_html(r)}else e.onload=function(){var e=this.result;this.execlArraybufferData=e;var r=new Uint8Array(e),i=n.read(r,{type:"array"});a.workbooks=i;var o=i.SheetNames;a.sheetNames=o;var c=i.Sheets[o[t]];a.excelView=n.utils.sheet_to_html(c),a.$nextTick((function(){a.setStyle4ExcelHtml()}))}},setStyle4ExcelHtml:function(){var t=document.getElementById("excelView");if(t){var e=t.getElementsByTagName("td");if(e){var n=Array.prototype.slice.call(e);Object.keys(n).forEach((function(t){var e=n[t].id;if(e){var a=e.replace(/[^0-9]/gi,"");!a||"1"!==a&&1!==a||n[t].classList.add("class4Title"),!a||"2"!==a&&2!==a||n[t].classList.add("class4TableTh")}}))}}},handleClose:function(){this.$emit("closeDialog",!1)},print:function(){var t="";"docx"===this.fileType?t=Array.from(document.getElementsByClassName("docx"))[0].innerHTML:"xls"===this.fileType||"xlsx"===this.fileType?t=document.getElementById("excelView").innerHTML:"txt"===this.fileType&&(t=document.getElementById("textValue").innerHTML);var e=document.createElement("iframe");e.setAttribute("style","position:absolute;width:0px;height:0px;left:-500px;top:-500px;");var n='';document.body.appendChild(e),e.contentDocument.write(n+t),e.contentDocument.close(),e.contentWindow.onload=setTimeout((function(){e.contentWindow.focus(),e.contentWindow.print(),document.body.removeChild(e)}),0)}}},b=m,y=(n("ddb6"),n("2877")),g=Object(y["a"])(b,l,u,!1,null,"dfbb3f02",null),w=g.exports,v={name:"EitcErmPcPrintMedical",mixins:[s["a"]],components:{previewFile:w},props:{printDialogVisible:{type:Boolean,default:!1},medicalRecordId:{type:String,default:""}},watch:{medicalRecordId:function(t){t&&this.initList()}},data:function(){return{xianList:["主诉","现病史","既往史","家族史","过敏史"],tableData:{},previewAnnex:!1,previewUrl:"",previewType:"",filename:""}},mounted:function(){this.initList()},methods:{initList:function(){var t=this;return Object(o["a"])(Object(i["a"])().mark((function e(){var n;return Object(i["a"])().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,Object(c["x"])(t.medicalRecordId);case 2:n=e.sent,Object.keys(n.data.listMap).forEach((function(t,e,a){n.data.listMap[t].forEach((function(t){t.flagCheck=!0}))})),t.tableData=n.data;case 5:case"end":return e.stop()}}),e)})))()},cancel:function(){this.$emit("cancelAll","5")},changeVal:function(t){console.log(this.tableData.listMap)},dayin:function(){var t=this;return Object(o["a"])(Object(i["a"])().mark((function e(){var n,a,r,o;return Object(i["a"])().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return e.next=2,Object(c["y"])(t.tableData);case 2:n=e.sent,a=n,r=[],r.push(a),o=window.URL.createObjectURL(new Blob(r,{type:"application/pdf"})),window.open(o);case 8:case"end":return e.stop()}}),e)})))()},handleDownload:function(){var t=URL.createObjectURL(this.previewUrl);this.downloadFile(t,this.filename)},dataURLtoBlob:function(t){var e=t.split(","),n=e[0].match(/:(.*?);/)[1],a=atob(e[1]),r=a.length,i=new Uint8Array(r);while(r--)i[r]=a.charCodeAt(r);return new Blob([i],{type:n})},downloadFile:function(t,e){var n=document.createElement("a");n.setAttribute("href",t),n.setAttribute("download",e),n.setAttribute("target","_blank");var a=document.createEvent("MouseEvents");a.initEvent("click",!0,!0),n.dispatchEvent(a)}}},x=v,_=(n("79b4"),Object(y["a"])(x,a,r,!1,null,"70faf73f",null));e["default"]=_.exports},"46f9":function(t,e,n){"use strict";e["a"]={data:function(){return{}},methods:{initPatientSource:function(t){switch(t){case 1:return"自进医院";case 2:return"朋友介绍";default:return""}},initBloodGroup:function(t){switch(t){case 1:return"A型血";case 2:return"B型血";case 3:return"O型血";case 4:return"AB型血";case 5:return"RH型血";default:return""}},initSex:function(t){switch(t){case 1:return"男";case 2:return"女";default:return""}},initMarriage:function(t){switch(t){case 1:return"未婚";case 2:return"已婚";case 3:return"丧偶";case 4:return"离婚";default:return""}},initPatientType:function(t){switch(t){case 1:return"临时";case 2:return"普通";default:return""}},initPppointmentStatus:function(t){switch(t){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(t){switch(t){case"upLeft1":return"上左牙位8";case"upLeft2":return"上左牙位7";case"upLeft3":return"上左牙位6";case"upLeft4":return"上左牙位5";case"upLeft5":return"上左牙位4";case"upLeft6":return"上左牙位3";case"upLeft7":return"上左牙位2";case"upLeft8":return"上左牙位1";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"downLeft1":return"下左牙位2";case"downLeft1":return"下左牙位3";case"downLeft1":return"下左牙位4";case"downLeft1":return"下左牙位5";case"downLeft1":return"下左牙位6";case"downLeft1":return"下左牙位7";case"downLeft1":return"下左牙位8";case"downRigth1":return"下左牙位1";case"downRigth2":return"下左牙位2";case"downRigth3":return"下左牙位3";case"downRigth4":return"下左牙位4";case"downRigth5":return"下左牙位5";case"downRigth6":return"下左牙位6";case"downRigth7":return"下左牙位7";case"downRigth8":return"下左牙位8";default:return""}},initBgc:function(t){switch(t){case 1:return"#0077fa";case 2:return"#00f900";case 3:return"#4f9de7";case 4:return"#93d2f3";case 5:return"#fb881a";case 6:return"#1afb91";case 7:return"#8a8385";case 8:return"#cbcbcb";default:}}}}},4736:function(t,e,n){},"79b4":function(t,e,n){"use strict";n("1b81")},"943d":function(t,e,n){"use strict";n.d(e,"p",(function(){return r})),n.d(e,"g",(function(){return i})),n.d(e,"r",(function(){return o})),n.d(e,"f",(function(){return c})),n.d(e,"q",(function(){return s})),n.d(e,"c",(function(){return l})),n.d(e,"s",(function(){return u})),n.d(e,"h",(function(){return d})),n.d(e,"u",(function(){return p})),n.d(e,"A",(function(){return f})),n.d(e,"e",(function(){return h})),n.d(e,"t",(function(){return m})),n.d(e,"L",(function(){return b})),n.d(e,"v",(function(){return y})),n.d(e,"i",(function(){return g})),n.d(e,"z",(function(){return w})),n.d(e,"o",(function(){return v})),n.d(e,"d",(function(){return x})),n.d(e,"K",(function(){return _})),n.d(e,"P",(function(){return j})),n.d(e,"O",(function(){return O})),n.d(e,"N",(function(){return k})),n.d(e,"S",(function(){return T})),n.d(e,"M",(function(){return L})),n.d(e,"Q",(function(){return D})),n.d(e,"T",(function(){return C})),n.d(e,"U",(function(){return U})),n.d(e,"V",(function(){return R})),n.d(e,"R",(function(){return A})),n.d(e,"D",(function(){return S})),n.d(e,"G",(function(){return M})),n.d(e,"F",(function(){return P})),n.d(e,"E",(function(){return V})),n.d(e,"B",(function(){return E})),n.d(e,"H",(function(){return B})),n.d(e,"a",(function(){return F})),n.d(e,"m",(function(){return N})),n.d(e,"n",(function(){return I})),n.d(e,"J",(function(){return $})),n.d(e,"I",(function(){return H})),n.d(e,"b",(function(){return z})),n.d(e,"w",(function(){return W})),n.d(e,"C",(function(){return X})),n.d(e,"W",(function(){return J})),n.d(e,"j",(function(){return G})),n.d(e,"x",(function(){return q})),n.d(e,"y",(function(){return K})),n.d(e,"l",(function(){return Q})),n.d(e,"k",(function(){return Y}));var a=n("b775");function r(t){return Object(a["a"])({url:"/system/diagnosis-type/tree",method:"get",params:t})}function i(t){return Object(a["a"])({url:"/project/appointment-project/tree",method:"get",params:t})}function o(t){return Object(a["a"])({url:"/system/diagnosis-type/remove?ids=".concat(t.ids),method:"delete"})}function c(t){return Object(a["a"])({url:"/project/appointment-project/remove?ids=".concat(t.ids),method:"delete"})}function s(t){return Object(a["a"])({url:"/system/diagnosis-type",method:"post",data:t})}function l(t){return Object(a["a"])({url:"/project/appointment-project",method:"post",data:t})}function u(t){return Object(a["a"])({url:"/system/diagnosis-type",method:"put",data:t})}function d(t){return Object(a["a"])({url:"/project/appointment-project",method:"put",data:t})}function p(t){return Object(a["a"])({url:"/system/diagnosis-type-template/list",method:"get",params:t})}function f(t){return Object(a["a"])({url:"/system/diagnosis-type-template/listToPatientId",method:"get",params:t})}function h(t){return Object(a["a"])({url:"/project/appointment-project/list",method:"get",params:t})}function m(t){return Object(a["a"])({url:"/system/diagnosis-type-template",method:"post",data:t})}function b(){return Object(a["a"])({url:"/system/dict/data/type/erm_diagnosis_type_template_name",method:"get"})}function y(t){return Object(a["a"])({url:"/system/diagnosis-type-template",method:"put",data:t})}function g(t){return Object(a["a"])({url:"/project/appointment-project",method:"put",data:t})}function w(t){return Object(a["a"])({url:"/system/diagnosis-type-template/importTemplate",method:"post",data:t,responseType:"blob",timeOut:6e4})}function v(t){return Object(a["a"])({url:"/system/diagnosis-type/crumb",method:"get",params:t})}function x(t){return Object(a["a"])({url:"/project/appointment-project/crumb",method:"get",params:t})}function _(){return Object(a["a"])({url:"/system/dict/data/type/erm_citizenship",method:"get"})}function j(){return Object(a["a"])({url:"/system/dict/data/type/erm_occupation",method:"get"})}function O(){return Object(a["a"])({url:"/system/dict/data/type/erm_nationality",method:"get"})}function k(){return Object(a["a"])({url:"/system/dict/data/type/erm_marriage",method:"get"})}function T(){return Object(a["a"])({url:"/system/dict/data/type/erm_patient_source",method:"get"})}function L(){return Object(a["a"])({url:"/system/dict/data/type/erm_family_history",method:"get"})}function D(){return Object(a["a"])({url:"/system/dict/data/type/erm_past_history",method:"get"})}function C(){return Object(a["a"])({url:"/system/dict/data/type/erm_patient_tags",method:"get"})}function U(){return Object(a["a"])({url:"/system/dict/data/type/erm_personal_relationship",method:"get"})}function R(){return Object(a["a"])({url:"/system/dict/data/type/erm_reservation_status",method:"get"})}function A(){return Object(a["a"])({url:"/system/dict/data/type/erm_patient_blood",method:"get"})}function S(t){return Object(a["a"])({url:"/patient/patient",method:"post",data:t})}function M(){return Object(a["a"])({url:"/patient/patient/list",method:"get"})}function P(t){return Object(a["a"])({url:"/patient/patient/detail",method:"get",params:t})}function V(t){return Object(a["a"])({url:"/patientAppointment/patientAppointment-appointment/list",method:"get",params:t})}function E(t){return Object(a["a"])({url:"/patient/medical-record/list",method:"get",params:t})}function B(t){return Object(a["a"])({url:"/patient/medical-record",method:"post",data:t})}function F(){return Object(a["a"])({url:"/system/user/allList",method:"get"})}function N(){return Object(a["a"])({url:"/system/user/deptTree",method:"get"})}function I(t){return Object(a["a"])({url:"/system/user/deptTreeByName?deptName=".concat(t),method:"get"})}function $(t){return Object(a["a"])({url:"/patient/medical-record/detail?id=".concat(t),method:"get"})}function H(){return Object(a["a"])({url:"/project/appointment-project/list",method:"get"})}function z(t){return Object(a["a"])({url:"/patientAppointment/patientAppointment-appointment",method:"post",data:t})}function W(){return Object(a["a"])({url:"/doctor/list",method:"get"})}function X(t){return Object(a["a"])({url:"/patientAppointment/patientAppointment-appointment/modifyState",method:"post",data:t})}function J(t){return Object(a["a"])({url:"/patient/medical-record/teethListByPatientId",method:"get",params:t})}function G(t){return Object(a["a"])({url:"/system/business-dict-data/list?dictType=".concat(t),method:"get"})}function q(t){return Object(a["a"])({url:"/patient/medical-record/findMedicalInfo?medicalRecordId=".concat(t),method:"get"})}function K(t){return Object(a["a"])({url:"/patient/medical-record/html2Pdf",method:"post",responseType:"blob",data:t,timeout:3e5})}function Q(t){return Object(a["a"])({url:"/system/business-dict-data",method:"put",data:t})}function Y(t){return Object(a["a"])({url:"/system/business-dict-data",method:"post",data:t})}},ddb6:function(t,e,n){"use strict";n("4736")}}]);