1 |
- (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-38246c26","chunk-5b0e6fe2","chunk-2ab34744"],{"11e8":function(e,t,a){"use strict";a("843b")},3761:function(e,t,a){"use strict";a("7a30")},4353:function(e,t,a){"use strict";a.r(t);var n=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:{check:e.handleNodeClick},scopedSlots:e._u([{key:"default",fn:function(t){var n=t.node;t.data;return a("span",{staticClass:"custom-tree-node"},[a("el-tooltip",{staticClass:"item",attrs:{effect:"dark",content:n.label,placement:"top-start","open-delay":500}},[a("span",[e._v(" "+e._s(n.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:function(t){return e.addDiagnosticlassification("","新建")}}},[e._v("新建")])],1),a("el-col",{attrs:{span:1.5}},[a("el-button",{attrs:{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:{align:"center",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:{align:"center",label:"模版描述","show-overflow-tooltip":""},scopedSlots:e._u([{key:"default",fn:function(t){return[a("span",[e._v(e._s(t.row.templateDesc||"-"))])]}}])}),a("el-table-column",{attrs:{align:"center",label:"诊断名称","show-overflow-tooltip":""},scopedSlots:e._u([{key:"default",fn:function(t){return[a("span",[e._v(e._s(t.row.diagnosisManageName||"-"))])]}}])}),a("el-table-column",{attrs:{align:"center",label:"适用科室","show-overflow-tooltip":""},scopedSlots:e._u([{key:"default",fn:function(t){return[a("span",[e._v(e._s(t.row.applyDept||"-"))])]}}])}),a("el-table-column",{attrs:{align:"center",label:"就诊类型","show-overflow-tooltip":""},scopedSlots:e._u([{key:"default",fn:function(t){return[a("span",[e._v(e._s(1==t.row.visitType?"初诊":"复诊"))])]}}])}),a("el-table-column",{attrs:{align:"center",label:"状态","show-overflow-tooltip":""},scopedSlots:e._u([{key:"default",fn:function(t){return[a("el-switch",{attrs:{"active-color":"#13ce66","inactive-color":"#ff4949","active-value":1,"inactive-value":0},on:{change:function(a){return e.changeStatus(t.row)}},model:{value:t.row.enableStatus,callback:function(a){e.$set(t.row,"enableStatus",a)},expression:"scope.row.enableStatus"}})]}}])}),a("el-table-column",{attrs:{align:"center",label:"操作",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.addDiagnosticlassification(t.row.id,"编辑")}}},[e._v(" 修改 ")]),a("el-button",{staticStyle:{color:"red"},attrs:{type:"text",size:"mini"},on:{click:function(a){return e.hanldeDelete(t.row)}}},[e._v(" 删除 ")])]}}])})],1),a("pagination",{directives:[{name:"show",rawName:"v-show",value:e.total>0,expression:"total > 0"}],attrs:{total:e.total,page:e.pageNum,limit:e.pageSize},on:{"update:page":function(t){e.pageNum=t},"update:limit":function(t){e.pageSize=t},pagination:e.initList}})],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("uploadTemplateDialog",{ref:"uploadTemplateRef",attrs:{listInId:e.listInId}}),a("addTemplateDialog",{ref:"addTemplateDialogRef",attrs:{addTitle:e.addTitle,lookDetail:e.lookDetail,listInId:e.listInId,treeName:e.treeName}})],1)},r=[],i=a("5530"),s=a("c7eb"),o=a("1da1"),l=a("f1df"),c=a("aba5"),u=a("943d"),d={name:"medicalRecord",components:{uploadTemplateDialog:l["default"],addTemplateDialog:c["default"]},data:function(){return{tableDataObject:{},deptOptions:[],defaultProps:{children:"childrenList",label:"diagnosisName"},lookDetail:{},ids:"",listInId:"",ruleForm:{diagnosisName:""},rules:{diagnosisName:[{required:!0,message:"请输入诊断名称",trigger:"blur"}]},lookFlag:!0,treeName:"",title:"",addTitle:"",dialogVisible:!1,tableData:[],pageSize:10,pageNum:1,total:0}},mounted:function(){this.initAiagnosisTypeTree()},methods:{initAiagnosisTypeTree:function(){var e=this;return Object(o["a"])(Object(s["a"])().mark((function t(){var a;return Object(s["a"])().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,Object(u["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(o["a"])(Object(s["a"])().mark((function t(){var a;return Object(s["a"])().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,Object(u["X"])({diagnosisTypeId:e.listInId,pageSize:e.pageSize,pageNum:e.pageNum});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.rows,e.total=a.total;case 7:case"end":return t.stop()}}),t)})))()},handleNodeClick:function(e,t,a){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()},changeStatus:function(e){var t=this;return Object(o["a"])(Object(s["a"])().mark((function a(){var n,r;return Object(s["a"])().wrap((function(a){while(1)switch(a.prev=a.next){case 0:return n=Object(i["a"])({diagnosisTypeId:t.listInId},e),a.next=3,Object(u["Y"])(n);case 3:if(r=a.sent,200===r.code){a.next=6;break}return a.abrupt("return",t.$message.error(r.msg));case 6:t.$message.success("修改成功!");case 7:case"end":return a.stop()}}),a)})))()},add:function(){this.title="新建",this.ruleForm.diagnosisName="",this.dialogVisible=!0},addDiagnosticlassification:function(e,t){var a=this;return Object(o["a"])(Object(s["a"])().mark((function n(){var r,i;return Object(s["a"])().wrap((function(n){while(1)switch(n.prev=n.next){case 0:if(a.listInId){n.next=2;break}return n.abrupt("return",a.$message.info("请先选择诊断分类!"));case 2:return n.next=4,Object(u["O"])({id:a.listInId});case 4:if(r=n.sent,200===r.code){n.next=7;break}return n.abrupt("return",a.$message.error(r.msg));case 7:if(a.treeName=r.data,a.addTitle=t,"编辑"!=t){n.next=16;break}return n.next=12,Object(u["W"])({id:e});case 12:i=n.sent,a.lookDetail=i.data,n.next=17;break;case 16:a.lookDetail={templateName:"",diagnosisManageId:"",templateDesc:"",applyDeptList:[],visitType:1,enableStatus:1,chiefComplaintContent:"",inspectContent:"",treatmentPlanningContent:"",presentIllnessContent:"",disposeContent:"",note:""};case 17:a.$refs.addTemplateDialogRef.addTemplateDialogVisible=!0;case 18:case"end":return n.stop()}}),n)})))()},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(o["a"])(Object(s["a"])().mark((function t(a){var n,r;return Object(s["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(u["R"])({diagnosisName:e.ruleForm.diagnosisName,parentId:e.$refs.tree.getCheckedNodes().length>0?e.$refs.tree.getCheckedNodes()[0].id:0});case 4:if(n=t.sent,200===n.code){t.next=7;break}return t.abrupt("return",e.$message.error(n.msg));case 7:t.next=14;break;case 9:return t.next=11,Object(u["U"])({diagnosisName:e.ruleForm.diagnosisName,id:e.$refs.tree.getCheckedNodes().length>0?e.$refs.tree.getCheckedNodes()[0].id:0});case 11:if(r=t.sent,200===r.code){t.next=14;break}return t.abrupt("return",e.$message.error(r.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(o["a"])(Object(s["a"])().mark((function t(){var a;return Object(s["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(u["T"])({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(){}))},hanldeEdit:function(e){},hanldeDelete:function(e){var t=this;this.$confirm("此操作将永久删除该项, 是否继续?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(Object(o["a"])(Object(s["a"])().mark((function a(){return Object(s["a"])().wrap((function(a){while(1)switch(a.prev=a.next){case 0:return a.next=2,Object(u["P"])({ids:e.id});case 2:t.$message({type:"success",message:"删除成功!"}),t.initList();case 4:case"end":return a.stop()}}),a)})))).catch((function(){t.$message({type:"info",message:"已取消删除"})}))}}},p=d,m=a("2877"),f=Object(m["a"])(p,n,r,!1,null,null,null);t["default"]=f.exports},"7a30":function(e,t,a){},"843b":function(e,t,a){},aba5:function(e,t,a){"use strict";a.r(t);var n=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",[e.addTemplateDialogVisible?a("el-dialog",{attrs:{title:e.addTitle,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","margin-left":"20px"}},[a("el-col",{attrs:{span:24}},[e._v(" 所属目录: "+e._s(e.treeName)+" ")])],1),a("div",{staticStyle:{"max-height":"65vh",overflow:"auto"}},[a("el-form",{ref:"ruleFormRef",attrs:{model:e.ruleForm,rules:e.rules,inline:!0,"label-width":"100px"}},[a("el-form-item",{attrs:{label:"模板名称:",prop:"templateName"}},[a("el-input",{staticStyle:{width:"350px"},model:{value:e.ruleForm.templateName,callback:function(t){e.$set(e.ruleForm,"templateName",t)},expression:"ruleForm.templateName"}})],1),a("el-form-item",{attrs:{label:"诊断名称:",prop:"diagnosisManageId"}},[a("el-select",{directives:[{name:"lazy-load-dropdown",rawName:"v-lazy-load-dropdown",value:e.handleScrollDropdown,expression:"handleScrollDropdown"}],staticStyle:{width:"350px"},attrs:{filterable:"",remote:"","remote-method":e.handleRemota},model:{value:e.ruleForm.diagnosisManageId,callback:function(t){e.$set(e.ruleForm,"diagnosisManageId",t)},expression:"ruleForm.diagnosisManageId"}},e._l(e.diagnosisNameOptions,(function(e){return a("el-option",{key:e.id,attrs:{label:e.diagnosisName,value:e.id}})})),1)],1),a("el-form-item",{attrs:{label:"模板描述:",prop:"templateDesc"}},[a("el-input",{staticStyle:{width:"350px"},attrs:{type:"textarea",rows:4},model:{value:e.ruleForm.templateDesc,callback:function(t){e.$set(e.ruleForm,"templateDesc",t)},expression:"ruleForm.templateDesc"}})],1),a("el-form-item",{attrs:{label:"适用科室:",prop:"applyDeptList"}},[a("el-select",{staticStyle:{width:"350px"},attrs:{filterable:"",multiple:""},model:{value:e.ruleForm.applyDeptList,callback:function(t){e.$set(e.ruleForm,"applyDeptList",t)},expression:"ruleForm.applyDeptList"}},e._l(e.deptOptions,(function(e){return a("el-option",{key:e.id,attrs:{label:e.label,value:e.id}})})),1)],1),a("el-form-item",{attrs:{label:"就诊类型:",prop:"visitType"}},[a("el-radio-group",{staticStyle:{width:"350px"},model:{value:e.ruleForm.visitType,callback:function(t){e.$set(e.ruleForm,"visitType",t)},expression:"ruleForm.visitType"}},[a("el-radio",{attrs:{label:1}},[e._v("初诊")]),a("el-radio",{attrs:{label:2}},[e._v("复诊")])],1)],1),a("el-form-item",{attrs:{label:"启用状态:",prop:"enableStatus"}},[a("el-radio-group",{staticStyle:{width:"350px"},model:{value:e.ruleForm.enableStatus,callback:function(t){e.$set(e.ruleForm,"enableStatus",t)},expression:"ruleForm.enableStatus"}},[a("el-radio",{attrs:{label:1}},[e._v("启用")]),a("el-radio",{attrs:{label:0}},[e._v("禁用")])],1)],1),1===e.ruleForm.visitType?a("div",[a("el-form-item",{attrs:{label:"主诉:",prop:"chiefComplaintContent"}},[a("el-input",{staticStyle:{width:"350px"},attrs:{type:"textarea",rows:4},model:{value:e.ruleForm.chiefComplaintContent,callback:function(t){e.$set(e.ruleForm,"chiefComplaintContent",t)},expression:"ruleForm.chiefComplaintContent"}})],1),a("el-form-item",{attrs:{label:"现病史:",prop:"presentIllnessContent"}},[a("el-input",{staticStyle:{width:"350px"},attrs:{type:"textarea",rows:4},model:{value:e.ruleForm.presentIllnessContent,callback:function(t){e.$set(e.ruleForm,"presentIllnessContent",t)},expression:"ruleForm.presentIllnessContent"}})],1),a("el-form-item",{attrs:{label:"检查:",prop:"inspectContent"}},[a("el-input",{staticStyle:{width:"350px"},attrs:{type:"textarea",rows:4},model:{value:e.ruleForm.inspectContent,callback:function(t){e.$set(e.ruleForm,"inspectContent",t)},expression:"ruleForm.inspectContent"}})],1),a("el-form-item",{attrs:{label:"治疗计划:",prop:"treatmentPlanningContent"}},[a("el-input",{staticStyle:{width:"350px"},attrs:{type:"textarea",rows:4},model:{value:e.ruleForm.treatmentPlanningContent,callback:function(t){e.$set(e.ruleForm,"treatmentPlanningContent",t)},expression:"ruleForm.treatmentPlanningContent"}})],1),a("el-form-item",{attrs:{label:"处置:",prop:"disposeContent"}},[a("el-input",{staticStyle:{width:"350px"},attrs:{type:"textarea",rows:4},model:{value:e.ruleForm.disposeContent,callback:function(t){e.$set(e.ruleForm,"disposeContent",t)},expression:"ruleForm.disposeContent"}})],1),a("el-form-item",{attrs:{label:"便签:"}},[a("el-input",{staticStyle:{width:"350px"},attrs:{type:"textarea",rows:4},model:{value:e.ruleForm.noteContent,callback:function(t){e.$set(e.ruleForm,"noteContent",t)},expression:"ruleForm.noteContent"}})],1)],1):e._e(),2===e.ruleForm.visitType?a("div",[a("el-form-item",{attrs:{label:"复诊主诉:",prop:"chiefComplaintContent"}},[a("el-input",{staticStyle:{width:"350px"},attrs:{type:"textarea",rows:4},model:{value:e.ruleForm.chiefComplaintContent,callback:function(t){e.$set(e.ruleForm,"chiefComplaintContent",t)},expression:"ruleForm.chiefComplaintContent"}})],1),a("el-form-item",{attrs:{label:"检查:",prop:"inspectContent"}},[a("el-input",{staticStyle:{width:"350px"},attrs:{type:"textarea",rows:4},model:{value:e.ruleForm.inspectContent,callback:function(t){e.$set(e.ruleForm,"inspectContent",t)},expression:"ruleForm.inspectContent"}})],1),a("el-form-item",{attrs:{label:"治疗计划:",prop:"treatmentPlanningContent"}},[a("el-input",{staticStyle:{width:"350px"},attrs:{type:"textarea",rows:4},model:{value:e.ruleForm.treatmentPlanningContent,callback:function(t){e.$set(e.ruleForm,"treatmentPlanningContent",t)},expression:"ruleForm.treatmentPlanningContent"}})],1),a("el-form-item",{attrs:{label:"处置:",prop:"disposeContent"}},[a("el-input",{staticStyle:{width:"350px"},attrs:{type:"textarea",rows:4},model:{value:e.ruleForm.disposeContent,callback:function(t){e.$set(e.ruleForm,"disposeContent",t)},expression:"ruleForm.disposeContent"}})],1),a("el-form-item",{attrs:{label:"便签:"}},[a("el-input",{staticStyle:{width:"350px"},attrs:{type:"textarea",rows:4},model:{value:e.ruleForm.noteContent,callback:function(t){e.$set(e.ruleForm,"noteContent",t)},expression:"ruleForm.noteContent"}})],1)],1):e._e()],1)],1),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)},r=[],i=a("5530"),s=a("c7eb"),o=a("1da1"),l=a("943d"),c=a("c0c7"),u=a("ca17"),d=a.n(u),p={name:"EitcErmPcAddTemplateDialog",components:{Treeselect:d.a},props:{listInId:{type:String,default:""},treeName:{type:String,default:""},addTitle:{type:String,default:""},lookDetail:{type:Object,default:{}}},directives:{"lazy-load-dropdown":{bind:function(e,t){var a=e.querySelector(".el-select-dropdown .el-scrollbar__wrap");a.addEventListener("scroll",(function(){a.scrollTop+a.clientHeight>=a.scrollHeight&&t.value()}))}}},data:function(){return{addTemplateDialogVisible:!1,deptOptions:void 0,ruleForm:{templateName:"",diagnosisManageId:"",templateDesc:"",applyDeptList:[],visitType:1,enableStatus:1,chiefComplaintContent:"",inspectContent:"",treatmentPlanningContent:"",presentIllnessContent:"",disposeContent:"",noteContent:""},rules:{templateName:[{required:!0,message:"请输入模板名称",trigger:"blur"}],diagnosisManageId:[{required:!0,message:"请选择诊断名称",trigger:"change"}],templateDesc:[{required:!0,message:"请输入模板描述",trigger:"blur"}],applyDeptList:[{required:!0,message:"请选择适用科室",trigger:"change"}],visitType:[{required:!0,message:"请选择就诊类型",trigger:"change"}],enableStatus:[{required:!0,message:"请输入启用状态",trigger:"change"}],chiefComplaintContent:[{required:!0,message:"请输入主诉",trigger:"blur"}],presentIllnessContent:[{required:!0,message:"请输入现病史",trigger:"blur"}],inspectContent:[{required:!0,message:"请输入检查",trigger:"blur"}],treatmentPlanningContent:[{required:!0,message:"请输入治疗计划",trigger:"blur"}],disposeContent:[{required:!0,message:"请输入处置",trigger:"blur"}]},diagnosisParam:"",pageNum:1,pageSize:10,diagnosisNameOptions:[],total:0}},watch:{lookDetail:{handler:function(e){e&&(this.ruleForm=e)},deep:!0}},mounted:function(){this.initOptions(),this.getDeptTree()},methods:{handleScrollDropdown:function(){this.pageSize+=10,this.pageNum>this.pageSize||this.initOptions()},handleRemota:function(e){""!==e&&(this.diagnosisParam=e,this.initOptions())},initOptions:function(){var e=this;return Object(o["a"])(Object(s["a"])().mark((function t(){var a;return Object(s["a"])().wrap((function(t){while(1)switch(t.prev=t.next){case 0:return t.next=2,Object(l["H"])({pageSize:e.pageSize,pageNum:e.pageNum,diagnosisParam:e.diagnosisParam});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.diagnosisNameOptions=a.rows,e.total=a.total;case 7:case"end":return t.stop()}}),t)})))()},getDeptTree:function(){var e=this;Object(c["d"])().then((function(t){e.deptOptions=t.data[0].children}))},cancel:function(){this.addTemplateDialogVisible=!1},submit:function(){var e=this;this.$refs.ruleFormRef.validate(function(){var t=Object(o["a"])(Object(s["a"])().mark((function t(a){var n,r,o;return Object(s["a"])().wrap((function(t){while(1)switch(t.prev=t.next){case 0:if(!a){t.next=22;break}if(n=Object(i["a"])({diagnosisTypeId:e.listInId},e.ruleForm),e.ruleForm.diagnosisTypeId=e.listInId,"新建"!==e.addTitle){t.next=12;break}return t.next=6,Object(l["V"])(n);case 6:if(r=t.sent,200===r.code){t.next=9;break}return t.abrupt("return",e.$message.error(r.msg));case 9:e.$message.success("新建成功!"),t.next=18;break;case 12:return t.next=14,Object(l["Y"])(n);case 14:if(o=t.sent,200===o.code){t.next=17;break}return t.abrupt("return",e.$message.error(o.msg));case 17:e.$message.success("修改成功!");case 18:e.$parent.initList(),e.addTemplateDialogVisible=!1,t.next=23;break;case 22:return t.abrupt("return",!1);case 23:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}())}}},m=p,f=(a("11e8"),a("2877")),g=Object(f["a"])(m,n,r,!1,null,"03592596",null);t["default"]=g.exports},c0c7:function(e,t,a){"use strict";a.d(t,"h",(function(){return s})),a.d(t,"f",(function(){return o})),a.d(t,"a",(function(){return l})),a.d(t,"k",(function(){return c})),a.d(t,"c",(function(){return u})),a.d(t,"i",(function(){return d})),a.d(t,"b",(function(){return p})),a.d(t,"g",(function(){return m})),a.d(t,"l",(function(){return f})),a.d(t,"m",(function(){return g})),a.d(t,"o",(function(){return b})),a.d(t,"n",(function(){return h})),a.d(t,"e",(function(){return v})),a.d(t,"j",(function(){return w})),a.d(t,"d",(function(){return x}));a("e9c4");var n=a("b775"),r=a("c38a"),i=a("cbd8");function s(e){return Object(n["a"])({url:"/system/user/list",method:"get",params:e})}function o(e){return Object(n["a"])({url:"/system/user/"+Object(r["e"])(e),method:"get"})}function l(e){return Object(n["a"])({url:"/system/user",method:"post",data:i["a"].methods.encrypt(JSON.stringify(e))})}function c(e){return Object(n["a"])({url:"/system/user",method:"put",data:i["a"].methods.encrypt(JSON.stringify(e))})}function u(e){return Object(n["a"])({url:"/system/user/"+e,method:"delete"})}function d(e,t){var a={userId:e,password:t};return Object(n["a"])({url:"/system/user/resetPwd",method:"put",data:i["a"].methods.encrypt(JSON.stringify(a))})}function p(e,t){var a={userId:e,status:t};return Object(n["a"])({url:"/system/user/changeStatus",method:"put",data:i["a"].methods.encrypt(JSON.stringify(a))})}function m(){return Object(n["a"])({url:"/system/user/profile",method:"get"})}function f(e){return Object(n["a"])({url:"/system/user/profile",method:"put",data:i["a"].methods.encrypt(JSON.stringify(e))})}function g(e,t){var a={oldPassword:e,newPassword:t};return Object(n["a"])({url:"/system/user/profile/updatePwd",method:"put",params:a})}function b(e){return Object(n["a"])({url:"/system/user/profile/avatar",method:"post",data:i["a"].methods.encrypt(JSON.stringify(e))})}function h(e){return Object(n["a"])({url:"/common/upload",method:"post",data:e})}function v(e){return Object(n["a"])({url:"/system/user/authRole/"+e,method:"get"})}function w(e){return Object(n["a"])({url:"/system/user/authRole",method:"put",params:e})}function x(){return Object(n["a"])({url:"/system/user/deptTree",method:"get"})}},f1df:function(e,t,a){"use strict";a.r(t);var n=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)},r=[],i=a("c7eb"),s=a("1da1"),o=(a("caad"),a("14d9"),a("b0c0"),a("2532"),a("943d")),l=a("21a6"),c=a.n(l),u={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(s["a"])(Object(i["a"])().mark((function t(){var a,n;return Object(i["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(o["ob"])(e.formdata);case 4:a=t.sent,console.log(a,888),0!==(null===a||void 0===a?void 0:a.size)&&(n=new Blob([a]),c.a.saveAs(n,"错误信息.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)})))()}}},d=u,p=(a("3761"),a("2877")),m=Object(p["a"])(d,n,r,!1,null,"08455f49",null);t["default"]=m.exports}}]);
|