1 |
- (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-fe1ac506"],{5814:function(t,e,i){},aeec:function(t,e,i){"use strict";i.r(e);var a=function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",[t.addMedicalTreeDialogFlag?i("el-dialog",{attrs:{title:"选择模版",visible:t.addMedicalTreeDialogFlag,width:"1100px","close-on-press-escape":!1,"close-on-click-modal":!1,"before-close":t.beforeClose},on:{"update:visible":function(e){t.addMedicalTreeDialogFlag=e}}},[i("div",{staticStyle:{border:"1px solid #c1c1c1",padding:"5px",display:"flex"}},[i("div",{staticStyle:{width:"700px","border-right":"1px solid #c1c1c1"}},[i("el-row",{staticStyle:{display:"flex","align-items":"center"}},[i("el-input",{staticStyle:{width:"300px","margin-right":"20px"},attrs:{placeholder:"输入关键字或者首字母"},on:{input:t.initAiagnosisTypeTree},model:{value:t.filterText,callback:function(e){t.filterText=e},expression:"filterText"}}),i("span",[t._v("类型:")]),i("el-checkbox-group",{on:{change:t.initAiagnosisTypeTree},model:{value:t.checkList,callback:function(e){t.checkList=e},expression:"checkList"}},[i("el-checkbox",{attrs:{label:1}},[t._v("初诊")]),i("el-checkbox",{attrs:{label:2}},[t._v("复诊")])],1)],1),i("el-table",{staticStyle:{width:"100%","margin-bottom":"20px","margin-top":"10px","max-height":"60vh",overflow:"auto"},attrs:{data:t.deptOptions,"row-key":"id","default-expand-all":"","tree-props":{children:"childrenList"}},on:{"row-click":t.handleRowClick}},[i("el-table-column",{attrs:{"show-overflow-tooltip":"",label:"模板名称"},scopedSlots:t._u([{key:"default",fn:function(e){var a=e.row;return[a.templateDesc?t._e():i("span",[i("i",{staticClass:"el-icon-folder"}),t._v(" "+t._s(a.diagnosisName)+" ")]),a.templateDesc?i("span",[i("i",{staticClass:"el-icon-document"}),t._v(" "+t._s(a.diagnosisName)+" ")]):t._e()]}}],null,!1,3483711050)}),i("el-table-column",{attrs:{prop:"templateDesc","show-overflow-tooltip":"",label:"描述"}}),i("el-table-column",{attrs:{prop:"diagnosisNamePinyinFirstLetter","show-overflow-tooltip":"",label:"首字母",width:"120"}}),i("el-table-column",{attrs:{label:"类型",width:"80"},scopedSlots:t._u([{key:"default",fn:function(e){var a=e.row;return[1==a.visitType?i("span",[t._v(" 初诊 ")]):t._e(),2==a.visitType?i("span",[t._v(" 复诊 ")]):t._e()]}}],null,!1,4138859649)})],1)],1),i("div",{staticStyle:{flex:"1",padding:"5px"}},[i("h2",{staticStyle:{margin:"5px","font-weight":"700",color:"#000"}},[t._v(" 已选模版 "),i("el-tooltip",{staticClass:"item",attrs:{effect:"dark",content:"选中的项目为主诊断",placement:"top-start"}},[i("i",{staticClass:"el-icon-question"})])],1),i("el-radio-group",{staticClass:"radio-group",attrs:{size:"medium"},model:{value:t.mainDiagnosis,callback:function(e){t.mainDiagnosis=e},expression:"mainDiagnosis"}},t._l(t.dataList,(function(e,a){return i("el-radio",{key:a,class:{radio_box:t.mainDiagnosis===e.id},attrs:{id:"radio_box",border:"",label:e.id}},[i("span",[t._v(" "+t._s(e.diagnosisName)+" - "+t._s(e.templateDesc)+" ")]),i("i",{staticClass:"el-icon-close",on:{click:function(e){return e.stopPropagation(),t.doDel(a)}}})])})),1)],1)]),i("span",{staticClass:"dialog-footer",staticStyle:{display:"flex","justify-content":"space-between"},attrs:{slot:"footer"},slot:"footer"},[i("span",{staticStyle:{"text-align":"left"}},[t._v(" 说明:主诉、处置等信息会调用“主诊断”对应模板。 ")]),i("span",[i("el-button",{on:{click:t.cancel}},[t._v("取 消")]),i("el-button",{attrs:{type:"primary"},on:{click:t.doSubmit}},[t._v("确 定")])],1)])]):t._e()],1)},s=[],n=i("c7eb"),o=i("1da1"),l=(i("4de4"),i("c740"),i("a15b"),i("d81d"),i("14d9"),i("a434"),i("d3b7"),i("943d")),r={name:"EitcErmPcAddMedicalTreeDialog",props:{addMedicalTreeDialogFlag:{type:Boolean,default:!1},ids:{type:String,default:""},yaKey:{tKype:String,default:""}},data:function(){return{deptOptions:[],checkList:[1,2],filterText:"",defaultProps:{children:"childrenList",label:"diagnosisName"},tableData:{},listArr:[],dataList:[],mainDiagnosis:"",visitType:null,searchParam:null}},watch:{dataList:function(t){this.mainDiagnosis||(this.mainDiagnosis=t[0].id)}},mounted:function(){this.initAiagnosisTypeTree()},methods:{handleRowClick:function(t,e,i){t.templateDesc&&(-1!==this.dataList.findIndex((function(e){return e.diagnosisName===t.diagnosisName}))&&this.dataList.splice(this.dataList.findIndex((function(e){return e.diagnosisName===t.diagnosisName})),1),this.dataList.unshift(t))},doDel:function(t){this.dataList.splice(t,1),console.log(this.mainDiagnosis,213123)},initAiagnosisTypeTree:function(){var t=this;return Object(o["a"])(Object(n["a"])().mark((function e(){var i,a;return Object(n["a"])().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return i="",i=2===t.checkList.length?"":0===t.checkList.length?3:t.checkList.join(),e.next=4,Object(l["Q"])({searchParam:t.filterText,visitType:i});case 4:if(a=e.sent,200===a.code){e.next=7;break}return e.abrupt("return",t.$message.error(a.msg));case 7:t.deptOptions=a.data,t.originalData=a.data;case 9:case"end":return e.stop()}}),e)})))()},beforeClose:function(){this.mainDiagnosis="",this.dataList=[],this.$emit("cancelAll","3")},cancel:function(){this.mainDiagnosis="",this.dataList=[],this.$emit("cancelAll","3")},doSubmit:function(){var t=this;return Object(o["a"])(Object(n["a"])().mark((function e(){var i,a,s;return Object(n["a"])().wrap((function(e){while(1)switch(e.prev=e.next){case 0:if(t.mainDiagnosis){e.next=2;break}return e.abrupt("return",t.$message.error("至少需要一个主诊断!"));case 2:return i=t.dataList.filter((function(e){return e.id!==t.mainDiagnosis})).map((function(t){return t.id})),e.next=5,Object(l["ib"])({patientId:t.ids,diagnosisTypeTemplateId:t.mainDiagnosis,otherDiagnosisTypeTemplateIdList:i});case 5:if(a=e.sent,200===a.code){e.next=8;break}return e.abrupt("return",t.$message.error(a.msg));case 8:return t.tableData=a.data,e.next=11,Object(l["n"])({toothPosition:t.yaKey,patientId:t.ids});case 11:s=e.sent,t.listArr.push(s.data),t.listArr.some((function(t){return!1===t}))?t.$emit("changeVisitType",1):t.$emit("changeVisitType",2),t.mainDiagnosis="",t.dataList=[],t.checkList=[1,2],t.filterText="",t.initAiagnosisTypeTree(),t.$emit("cancelAll","3"),t.$emit("addYaList",t.tableData);case 21:case"end":return e.stop()}}),e)})))()}}},c=r,d=(i("e3ce"),i("2877")),p=Object(d["a"])(c,a,s,!1,null,"4314f65d",null);e["default"]=p.exports},e3ce:function(t,e,i){"use strict";i("5814")}}]);
|