1 |
- (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-6fb4c651","chunk-61aece38","chunk-2ab34744"],{3761:function(e,t,a){"use strict";a("7a30")},4353: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",{staticClass:"app-container"},[a("el-row",{attrs:{gutter:20}},[a("el-col",{attrs:{span:4,xs:24}},[a("div",{staticClass:"head-container"},[a("el-row",{staticClass:"mb8",attrs:{gutter:10}},[a("el-tooltip",{staticClass:"item",attrs:{effect:"dark",content:"新建","open-delay":500,placement:"top-start"}},[a("el-button",{attrs:{icon:"el-icon-circle-plus-outline",circle:"",size:"mini"},on:{click:e.add}})],1),a("el-tooltip",{staticClass:"item",attrs:{effect:"dark",content:"编辑","open-delay":500,placement:"top-start"}},[a("el-button",{attrs:{type:"primary",icon:"el-icon-edit",circle:"",size:"mini"},on:{click:e.edit}})],1),a("el-tooltip",{staticClass:"item",attrs:{effect:"dark",content:"删除","open-delay":500,placement:"top-start"}},[a("el-button",{attrs:{type:"danger",icon:"el-icon-delete",circle:"",size:"mini"},on:{click:e.del}})],1)],1)],1),a("div",{staticClass:"head-container",staticStyle:{"max-height":"calc(100vh - 160px)","overflow-y":"auto"}},[a("el-tree",{ref:"tree",attrs:{data:e.deptOptions,props:e.defaultProps,"check-on-click-node":!0,"expand-on-click-node":!1,"show-checkbox":"","node-key":"id","default-expand-all":"","highlight-current":"","check-strictly":!0},on:{"node-click":e.handleNodeClick,"check-change":e.handleNodeClick},scopedSlots:e._u([{key:"default",fn:function(t){var i=t.node;t.data;return a("span",{staticClass:"custom-tree-node"},[a("el-tooltip",{staticClass:"item",attrs:{effect:"dark",content:i.label,placement:"top-start","open-delay":500}},[a("span",[e._v(" "+e._s(i.label)+" ")])])],1)}}])})],1)]),a("el-col",{attrs:{span:20,xs:24}},[a("el-row",{staticClass:"mb8",attrs:{gutter:10}},[a("el-col",{attrs:{span:1.5}},[a("el-button",{attrs:{disabled:e.lookFlag,type:"primary",plain:"",icon:"el-icon-plus",size:"mini"},on:{click:e.addDiagnosticlassification}},[e._v("新建")])],1),a("el-col",{attrs:{span:1.5}},[a("el-button",{attrs:{disabled:e.lookFlag,plain:"",size:"mini"},on:{click:e.doUpload}},[e._v("模版导入")])],1)],1),a("el-table",{staticStyle:{width:"100%",height:"calc(100%-80vh)"},attrs:{data:e.tableData}},[a("el-table-column",{attrs:{label:"模版名称",width:"200","show-overflow-tooltip":""},scopedSlots:e._u([{key:"default",fn:function(t){return[a("span",[e._v(e._s(t.row.templateName||"-"))])]}}])}),a("el-table-column",{attrs:{label:"模版内容","show-overflow-tooltip":""},scopedSlots:e._u([{key:"default",fn:function(t){return[a("span",[e._v(e._s(t.row.templateExample||"-"))])]}}])}),a("el-table-column",{attrs:{label:"创建时间",width:"100","show-overflow-tooltip":""},scopedSlots:e._u([{key:"default",fn:function(t){return[a("span",[e._v(e._s(t.row.updateDate||"-"))])]}}])}),a("el-table-column",{attrs:{label:"操作",align:"center",width:"120",fixed:"right"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("el-button",{attrs:{type:"text",size:"mini"},on:{click:function(a){return e.editTableData(t.row)}}},[e._v(" 编辑 ")])]}}])})],1)],1)],1),a("el-dialog",{attrs:{title:e.title,visible:e.dialogVisible,width:"30%","close-on-press-escape":!1,"close-on-click-modal":!1},on:{"update:visible":function(t){e.dialogVisible=t},close:e.closeDialog}},[a("el-form",{ref:"ruleForm",staticClass:"demo-ruleForm",attrs:{model:e.ruleForm,rules:e.rules,"label-width":"100px"},nativeOn:{submit:function(e){e.preventDefault()}}},[a("el-form-item",{attrs:{label:"诊断名称:",prop:"diagnosisName"}},[a("el-input",{attrs:{placeholder:"请输入诊断名称"},model:{value:e.ruleForm.diagnosisName,callback:function(t){e.$set(e.ruleForm,"diagnosisName",t)},expression:"ruleForm.diagnosisName"}})],1)],1),a("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("el-button",{on:{click:e.closeDialog}},[e._v("取 消")]),a("el-button",{attrs:{type:"primary"},on:{click:e.submit}},[e._v("确 定")])],1)],1),a("el-dialog",{attrs:{title:"编辑",visible:e.TabledialogVisible,width:"30%","close-on-press-escape":!1,"close-on-click-modal":!1},on:{"update:visible":function(t){e.TabledialogVisible=t},close:e.closeDialog}},[a("div",{staticStyle:{display:"flex","align-items":"center"}},[a("div",{staticStyle:{width:"90px"}},[e._v(" 模版名称: ")]),a("span",[e._v(" "+e._s(e.tableDataObject.templateName)+" ")])]),a("div",{staticStyle:{display:"flex","align-items":"center","margin-top":"15px"}},[a("div",{staticStyle:{width:"100px"}},[e._v(" 模版内容: ")]),a("el-input",{attrs:{placeholder:"请输入模版内容",type:"textarea",rows:4},model:{value:e.tableDataObject.templateExample,callback:function(t){e.$set(e.tableDataObject,"templateExample",t)},expression:"tableDataObject.templateExample"}})],1),a("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("el-button",{on:{click:e.closeDialog}},[e._v("取 消")]),a("el-button",{attrs:{type:"primary"},on:{click:e.doSubmit}},[e._v("确 定")])],1)]),a("uploadTemplateDialog",{ref:"uploadTemplateRef",attrs:{listInId:e.listInId}}),a("addTemplateDialog",{ref:"addTemplateDialogRef",attrs:{listInId:e.listInId,treeName:e.treeName}})],1)},s=[],l=a("5530"),n=a("c7eb"),r=a("1da1"),o=a("f1df"),c=a("aba5"),d=a("943d"),u={name:"medicalRecord",components:{uploadTemplateDialog:o["default"],addTemplateDialog:c["default"]},data:function(){return{tableDataObject:{},TabledialogVisible:!1,deptOptions:[],defaultProps:{children:"childrenList",label:"diagnosisName"},ids:"",listInId:"",ruleForm:{diagnosisName:""},rules:{diagnosisName:[{required:!0,message:"请输入诊断名称",trigger:"blur"}]},lookFlag:!0,treeName:"",title:"",dialogVisible:!1,tableData:[]}},mounted:function(){this.initAiagnosisTypeTree()},methods:{initAiagnosisTypeTree:function(){var e=this;return Object(r["a"])(Object(n["a"])().mark((function t(){var a;return Object(n["a"])().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,Object(d["s"])();case 2:if(a=t.sent,200===a.code){t.next=5;break}return t.abrupt("return",e.$message.error(a.msg));case 5:e.deptOptions=a.data,e.deptOptions.length&&(e.listInId=e.deptOptions[0].id,e.deptOptions[0].childrenList.length?e.lookFlag=!0:e.lookFlag=!1,e.initList());case 7:case"end":return t.stop()}}),t)})))()},initList:function(){var e=this;return Object(r["a"])(Object(n["a"])().mark((function t(){var a;return Object(n["a"])().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,Object(d["x"])({diagnosisTypeId:e.listInId});case 2:if(a=t.sent,200===a.code){t.next=5;break}return t.abrupt("return",e.$message.error(a.msg));case 5:e.tableData=a.data;case 6:case"end":return t.stop()}}),t)})))()},handleNodeClick:function(e,t,a){console.log(e,"data"),e.childrenList.length?this.lookFlag=!0:this.lookFlag=!1,this.listInId=e.id,t&&this.$refs.tree.getCheckedNodes().length>1&&this.$refs.tree.setCheckedNodes([e]),this.initList()},add:function(){this.title="新建",this.ruleForm.diagnosisName="",this.dialogVisible=!0},addDiagnosticlassification:function(){var e=this;return Object(r["a"])(Object(n["a"])().mark((function t(){var a;return Object(n["a"])().wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(e.listInId){t.next=2;break}return t.abrupt("return",e.$message.info("请先选择诊断分类!"));case 2:return t.next=4,Object(d["q"])({id:e.listInId});case 4:if(a=t.sent,200===a.code){t.next=7;break}return t.abrupt("return",e.$message.error(a.msg));case 7:e.treeName=a.data,e.$refs.addTemplateDialogRef.addTemplateDialogVisible=!0;case 9:case"end":return t.stop()}}),t)})))()},doUpload:function(){if(!this.listInId)return this.$message.info("请先选择诊断分类!");this.$refs.uploadTemplateRef.templateDialogVisible=!0},edit:function(){if(!this.$refs.tree.getCheckedNodes().length)return this.$message.info("请选择需要编辑的选项");this.title="编辑",this.dialogVisible=!0,this.ruleForm.diagnosisName=this.$refs.tree.getCheckedNodes()[0].diagnosisName},closeDialog:function(){var e;this.ruleForm.diagnosisName="",null===(e=this.$refs.ruleForm)||void 0===e||e.resetFields(),this.dialogVisible=!1,this.initList(),this.TabledialogVisible=!1},submit:function(){var e=this;this.$refs.ruleForm.validate(function(){var t=Object(r["a"])(Object(n["a"])().mark((function t(a){var i,s;return Object(n["a"])().wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(!a){t.next=20;break}if("新建"!==e.title){t.next=9;break}return t.next=4,Object(d["t"])({diagnosisName:e.ruleForm.diagnosisName,parentId:e.$refs.tree.getCheckedNodes().length>0?e.$refs.tree.getCheckedNodes()[0].id:0});case 4:if(i=t.sent,200===i.code){t.next=7;break}return t.abrupt("return",e.$message.error(i.msg));case 7:t.next=14;break;case 9:return t.next=11,Object(d["v"])({diagnosisName:e.ruleForm.diagnosisName,id:e.$refs.tree.getCheckedNodes().length>0?e.$refs.tree.getCheckedNodes()[0].id:0});case 11:if(s=t.sent,200===s.code){t.next=14;break}return t.abrupt("return",e.$message.error(s.msg));case 14:e.$message.success("".concat(e.title,"成功!")),e.initList(),e.initAiagnosisTypeTree(),e.closeDialog(),t.next=22;break;case 20:return console.log("error submit!!"),t.abrupt("return",!1);case 22:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}())},del:function(){var e=this;if(!this.$refs.tree.getCheckedNodes().length)return this.$message.info("请选择需要删除的选项");this.$confirm("此操作将永久删除该项, 是否继续?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(Object(r["a"])(Object(n["a"])().mark((function t(){var a;return Object(n["a"])().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return e.ids=e.$refs.tree.getCheckedNodes()[0].id,t.next=3,Object(d["u"])({ids:e.ids});case 3:if(a=t.sent,200===a.code){t.next=6;break}return t.abrupt("return",e.$message.error(a.msg));case 6:e.$message.success("删除成功!"),e.initAiagnosisTypeTree();case 8:case"end":return t.stop()}}),t)})))).catch((function(){}))},editTableData:function(e){this.TabledialogVisible=!0,this.tableDataObject=Object(l["a"])({},e)},doSubmit:function(){var e=this;return Object(r["a"])(Object(n["a"])().mark((function t(){var a;return Object(n["a"])().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,Object(d["y"])({id:e.tableDataObject.id,diagnosisTypeId:e.tableDataObject.diagnosisTypeId,templateExample:e.tableDataObject.templateExample,templateName:e.tableDataObject.templateName});case 2:if(a=t.sent,200===a.code){t.next=5;break}return t.abrupt("return",e.$message.error(a.msg));case 5:e.$message.success("修改成功!"),e.closeDialog();case 7:case"end":return t.stop()}}),t)})))()}}},p=u,m=a("2877"),b=Object(m["a"])(p,i,s,!1,null,null,null);t["default"]=b.exports},"511e":function(e,t,a){},"7a30":function(e,t,a){},"95bf":function(e,t,a){"use strict";a("511e")},aba5: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.addTemplateDialogVisible?a("el-dialog",{attrs:{title:"新建",visible:e.addTemplateDialogVisible,width:"1000px","close-on-press-escape":!1,"close-on-click-modal":!1},on:{"update:visible":function(t){e.addTemplateDialogVisible=t},close:e.cancel}},[a("el-row",{staticStyle:{"margin-bottom":"15px"}},[a("el-col",{attrs:{span:24}},[e._v(" 所属目录: "+e._s(e.treeName)+" ")])],1),a("div",{staticStyle:{"max-height":"65vh",overflow:"auto"}},[a("div",{staticClass:"df_box"},e._l(e.diagnosisTypeTemplateList,(function(t){return a("div",{key:t.id,staticClass:"samll_box"},[a("span",[e._v(" 模版名称: ")]),a("div",{staticClass:"right_box"},[a("el-select",{staticStyle:{width:"100%"},attrs:{placeholder:"请选择",size:"mini"},model:{value:t.dictLabel,callback:function(a){e.$set(t,"dictLabel",a)},expression:"item.dictLabel"}},e._l([t.dictLabel],(function(e){return a("el-option",{key:e,attrs:{label:e,value:e}})})),1),a("el-input",{staticStyle:{width:"100%","margin-top":"5px"},attrs:{type:"textarea",rows:4},model:{value:t.templateExample,callback:function(a){e.$set(t,"templateExample",a)},expression:"item.templateExample"}})],1)])})),0)]),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.submit}},[e._v("确 定")])],1)],1):e._e()],1)},s=[],l=a("c7eb"),n=a("1da1"),r=(a("4de4"),a("d81d"),a("d3b7"),a("159b"),a("943d")),o={name:"EitcErmPcAddTemplateDialog",props:{listInId:{type:String,default:""},treeName:{type:String,default:""}},data:function(){return{addTemplateDialogVisible:!1,diagnosisTypeTemplateList:[]}},mounted:function(){this.initSysUserSexerm_diagnosis_type_template_name()},methods:{initSysUserSexerm_diagnosis_type_template_name:function(){var e=this;return Object(n["a"])(Object(l["a"])().mark((function t(){var a;return Object(l["a"])().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,Object(r["vb"])();case 2:if(a=t.sent,200===a.code){t.next=5;break}return t.abrupt("return",e.$message.error(a.msg));case 5:e.diagnosisTypeTemplateList=a.data.filter((function(e){return e.templateExample,e}));case 6:case"end":return t.stop()}}),t)})))()},cancel:function(){this.addTemplateDialogVisible=!1,this.initSysUserSexerm_diagnosis_type_template_name()},submit:function(){var e=this;return Object(n["a"])(Object(l["a"])().mark((function t(){var a,i;return Object(l["a"])().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return e.diagnosisTypeTemplateList.forEach((function(e){return e.templateName=e.dictValue})),a={diagnosisTypeId:e.listInId,diagnosisTypeTemplateList:e.diagnosisTypeTemplateList.map((function(e){return{templateName:e.dictValue,templateExample:e.templateExample||""}}))},t.next=4,Object(r["w"])(a);case 4:if(i=t.sent,200===i.code){t.next=7;break}return t.abrupt("return",e.$message.error(i.msg));case 7:e.$message.success("新建成功!"),e.$parent.initList(),e.cancel(),e.addTemplateDialogVisible=!1;case 11:case"end":return t.stop()}}),t)})))()}}},c=o,d=(a("95bf"),a("2877")),u=Object(d["a"])(c,i,s,!1,null,"7c447c92",null);t["default"]=u.exports},f1df: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",[a("el-dialog",{attrs:{title:"模板导入",visible:e.templateDialogVisible,width:"40%","close-on-press-escape":!1,"close-on-click-modal":!1},on:{"update:visible":function(t){e.templateDialogVisible=t},close:e.cancel}},[a("el-row",[a("el-col",{attrs:{span:24}},[a("el-form",{attrs:{inline:!0,"label-position":"right","label-width":"200px"}},[a("el-form-item",{attrs:{label:"导入文件:"}},[a("el-upload",{ref:"upload",staticClass:"upload-demo",attrs:{drag:"",action:"",multiple:"",limit:1,accept:".xls, .xlsx","file-list":e.fileList,"before-upload":e.beforeUpload,"http-request":e.uploadHttpRequest,"on-remove":e.removeContractAttachment}},[a("i",{staticClass:"el-icon-upload"}),a("div",{staticClass:"el-upload__text"},[e._v(" 将文件拖到此处,或"),a("em",[e._v("点击上传")])])])],1)],1)],1)],1),a("el-row",[a("span",{staticClass:"download",staticStyle:{cursor:"pointer",width:"100px","margin-left":"200px",color:"#0c80ea"},on:{click:e.downloadTel}},[e._v("下载模板")])]),a("div",{staticStyle:{"margin-top":"20px","margin-left":"200px",color:"#c7bd78"}},[e._v(" 提示:请先按照导出模版文件填写后进行上传 ")]),a("el-row",{staticStyle:{"text-align":"right","margin-top":"50px","padding-top":"10px"}},[a("el-button",{on:{click:e.cancel}},[e._v(" 取消 ")]),a("el-button",{staticStyle:{"margin-right":"10px"},attrs:{type:"primary"},on:{click:e.submit}},[e._v(" 确定 ")])],1)],1)],1)},s=[],l=a("c7eb"),n=a("1da1"),r=(a("caad"),a("14d9"),a("b0c0"),a("2532"),a("943d")),o=a("21a6"),c=a.n(o),d={name:"EitcErmPcUploadTemplateDialog",props:{listInId:{type:String,default:""}},data:function(){return{templateDialogVisible:!1,whiteList:["xlsx","xls"],formdata:{},fileList:[]}},mounted:function(){},methods:{downloadTel:function(){var e=encodeURI("/static/upload/病历模版.xlsx");window.location.href=e},beforeUpload:function(e){var t=e.name.split(".")[e.name.split(".").length-1];return!!this.whiteList.includes(t)||(this.$message.error("文件格式错误"),!1)},uploadHttpRequest:function(e){this.fileList.push({name:e.file.name});var t=new FormData;t.append("file",e.file),t.append("diagnosisTypeId",this.listInId),this.formdata=t},removeContractAttachment:function(e,t){this.fileList=t},cancel:function(){this.templateDialogVisible=!1,this.fileList=[]},submit:function(){var e=this;return Object(n["a"])(Object(l["a"])().mark((function t(){var a,i;return Object(l["a"])().wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(e.fileList.length){t.next=2;break}return t.abrupt("return",e.$message.info("文件不能为空!"));case 2:return t.next=4,Object(r["J"])(e.formdata);case 4:a=t.sent,console.log(a,888),0!==(null===a||void 0===a?void 0:a.size)&&(i=new Blob([a]),c.a.saveAs(i,"错误信息.xlsx")),0==(null===a||void 0===a?void 0:a.size)&&e.$message.success("导入成功"),e.templateDialogVisible=!1,e.$parent.initList();case 10:case"end":return t.stop()}}),t)})))()}}},u=d,p=(a("3761"),a("2877")),m=Object(p["a"])(u,i,s,!1,null,"08455f49",null);t["default"]=m.exports}}]);
|