(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-415ac7ee"],{"37a2":function(t,e,i){"use strict";i("a0d1")},"3be5":function(t,e,i){"use strict";var s=function(){var t=this,e=t._self._c;return e("div",{},[e("el-drawer",{attrs:{title:t.title,visible:t.addVisible,"with-header":!0,"show-close":!0,direction:"rtl",size:500},on:{"update:visible":function(e){t.addVisible=e}}},[e("div",{staticStyle:{padding:"20px"}},[e("el-descriptions",{attrs:{title:t.$t("warrantyCard116"),column:1}},[e("el-descriptions-item",{attrs:{label:t.$t("warrantyCard39")}},[t._v(t._s(t.templateName))]),e("el-descriptions-item",{attrs:{label:t.$t("warrantyCard41")}},[t._v(t._s(t.templateValue))]),e("el-descriptions-item",{attrs:{label:t.$t("warrantyCard48")}},[t._v(t._s(t.templateTime))])],1),e("el-divider"),e("el-descriptions",{attrs:{title:t.$t("warrantyCard49")}}),e("span",[t._v(t._s(t.templateCont))])],1)])],1)},a=[],l={data(){return{title:"查看",addVisible:!1,templateName:"",templateValue:"",templateTime:"",templateOptions:[{value:1,label:"治疗建议"},{value:2,label:"信息同步"},{value:3,label:"睡眠分析"}],templateCont:""}},mounted(){},methods:{viewDailog(t){this.addVisible=!0,this.title=this.$t("warrantyCard46"),this.templateName=t.templateName,1==t.followType&&(this.templateValue=this.$t("common.date14")),2==t.followType&&(this.templateValue=this.$t("patientManage.patient101")),this.templateCont=t.followDesc,this.templateTime=null!=t.addTime?this.$dateFmtFun(t.addTime)+" UTC"+this.$zoneId:"/"},addClose(){this.addVisible=!1}}},o=l,n=(i("c4b6"),i("2877")),r=Object(n["a"])(o,s,a,!1,null,"0dd46a13",null);e["a"]=r.exports},"457d":function(t,e,i){},"47c0":function(t,e,i){"use strict";i("457d")},"48f2":function(t,e,i){"use strict";i.r(e);var s=function(){var t=this,e=t._self._c;return e("div",[e("div",{staticClass:"content follow-patient"},[e("div",{staticClass:"searchContainer",staticStyle:{display:"inline-block"}},[e("form",{attrs:{id:"business-common-form"}},[e("div",{staticClass:"left"},[e("label",{staticClass:"label"},[t._v(t._s(t.$t("warrantyCard39")))]),e("el-input",{staticClass:"search-item",attrs:{placeholder:t.$t("tips.input")},model:{value:t.search.templateName,callback:function(e){t.$set(t.search,"templateName",e)},expression:"search.templateName"}}),e("label",{staticClass:"label"},[t._v(t._s(t.$t("warrantyCard49")))]),e("el-input",{staticClass:"search-item",attrs:{placeholder:t.$t("tips.input")},model:{value:t.search.templateContent,callback:function(e){t.$set(t.search,"templateContent",e)},expression:"search.templateContent"}}),e("label",{staticClass:"label"},[t._v(t._s(t.$t("warrantyCard41")))]),e("el-select",{staticClass:"search-item",attrs:{placeholder:t.$t("tips.select")},model:{value:t.search.followType,callback:function(e){t.$set(t.search,"followType",e)},expression:"search.followType"}},t._l(t.followOptions,(function(t){return e("el-option",{key:t.value,attrs:{label:t.label,value:t.value}})})),1)],1),e("div",{staticClass:"right"},[e("el-button",{attrs:{icon:"el-icon-search",type:"primary"},on:{click:t.searchBtn}},[t._v(t._s(t.$t("buttons.btn1")))]),e("el-button",{attrs:{icon:"el-icon-refresh",type:"primary"},on:{click:t.resetBtn}},[t._v(t._s(t.$t("buttons.btn25")))])],1)])]),2==t.userInfo.userType?e("div",{staticStyle:{width:"100%","font-size":"18px",color:"#333","margin-top":"20px",cursor:"pointer",overflow:"hidden"}},[e("span",{class:1==t.active?"follow-active":"",on:{click:function(e){return t.navBtn(1)}}},[t._v(t._s(t.$t("warrantyCard51")))]),e("el-divider",{attrs:{direction:"vertical"}}),e("span",{class:2==t.active?"follow-active":"",on:{click:function(e){return t.navBtn(2)}}},[t._v(t._s(t.$t("warrantyCard52")))]),e("el-button",{staticStyle:{float:"right","margin-left":"10px"},attrs:{type:"primary",icon:"el-icon-plus",size:"small"},on:{click:function(e){return t.batchImport()}}},[t._v(t._s(t.$t("warrantyCard43")))]),1==t.active?e("el-button",{staticStyle:{float:"right"},attrs:{type:"primary",icon:"el-icon-plus",size:"small"},on:{click:function(e){return t.addOpen()}}},[t._v(t._s(t.$t("warrantyCard42")))]):t._e()],1):t._e(),4==t.userInfo.userType?e("div",{staticStyle:{width:"100%","font-size":"18px",color:"#333","margin-top":"20px",cursor:"pointer",overflow:"hidden"}},[e("span",{class:2==t.active?"follow-active":""},[t._v(t._s(t.$t("warrantyCard44")))]),e("el-button",{staticStyle:{float:"right","margin-left":"10px"},attrs:{type:"primary",icon:"el-icon-plus",size:"small"},on:{click:function(e){return t.batchImport()}}},[t._v(t._s(t.$t("warrantyCard43")))]),e("el-button",{staticStyle:{float:"right"},attrs:{type:"primary",icon:"el-icon-plus",size:"small"},on:{click:function(e){return t.addOpen()}}},[t._v(t._s(t.$t("warrantyCard42")))]),e("i",{staticClass:"el-icon-refresh",staticStyle:{float:"right","margin-top":"2px",color:"#0052CC","font-size":"30px"},on:{click:function(e){return t.refresh()}}})],1):t._e(),t.laoding?e("div",{staticClass:"follow-ul"},[e("span",{staticClass:"follow-load"},[e("i",{staticClass:"el-icon-loading"}),t._v(" "+t._s(t.$t("newAdd.new44"))+"... ")])]):t._e(),t.tableData.length>0?e("div",{staticClass:"follow-ul"},t._l(t.tableData,(function(i,s){return e("el-card",{key:s,staticClass:"box-card follow-li"},[e("div",{staticClass:"clearfix",attrs:{slot:"header"},slot:"header"},[e("span",{staticStyle:{display:"inline-block","font-size":"20px","font-weight":"600",width:"70%",overflow:"hidden","white-space":"nowrap","text-overflow":"ellipsis"}},[t._v(t._s(i.templateName))]),e("span",{staticStyle:{width:"28%",float:"right",padding:"3px 0",color:"#0052CC",overflow:"hidden","white-space":"nowrap","text-overflow":"ellipsis"}},[1==i.followType?e("span",[t._v(t._s(t.$t("common.date14")))]):t._e(),2==i.followType?e("span",[t._v(t._s(t.$t("patientManage.patient101")))]):t._e()])]),e("h3",{staticStyle:{"font-size":"16px","font-weight":"600"}},[t._v(t._s(t.$t("warrantyCard49")))]),e("div",{staticClass:"ellipsis-multiline",staticStyle:{"font-size":"14px",color:"#666","margin-top":"10px","min-height":"60px"}},[t._v(t._s(i.followDesc))]),2==t.userInfo.userType?e("div",{staticStyle:{width:"100%",overflow:"hidden","margin-top":"10px"}},[1!=i.type&&1==t.active?e("el-button",{staticStyle:{float:"left",height:"30px",color:"red"},attrs:{type:"text"},on:{click:function(e){return t.deleteBtn(i)}}},[t._v(t._s(t.$t("permissions.menu_auth_delete")))]):t._e(),e("span",{staticStyle:{float:"right"}},[e("el-button",{attrs:{round:""},on:{click:function(e){return t.viewBtn(i)}}},[t._v(t._s(t.$t("account.account25")))]),1!=i.type&&1==t.active?e("el-button",{attrs:{type:"primary",round:""},on:{click:function(e){return t.editOpen(i)}}},[t._v(t._s(t.$t("permissions.menu_auth_update")))]):t._e()],1)],1):t._e(),4==t.userInfo.userType?e("div",{staticStyle:{width:"100%",overflow:"hidden","margin-top":"10px"}},[1!=i.type&&1==t.active?e("el-button",{staticStyle:{float:"left",height:"30px",color:"red"},attrs:{type:"text"},on:{click:function(e){return t.deleteBtn(i)}}},[t._v(t._s(t.$t("permissions.menu_auth_delete")))]):t._e(),e("span",{staticStyle:{float:"right"}},[e("el-button",{attrs:{round:""},on:{click:function(e){return t.viewBtn(i)}}},[t._v(t._s(t.$t("account.account25")))]),1!=i.type?e("el-button",{attrs:{type:"primary",round:""},on:{click:function(e){return t.editOpen(i)}}},[t._v(t._s(t.$t("permissions.menu_auth_update")))]):t._e()],1)],1):t._e(),1==t.userInfo.userType?e("div",{staticStyle:{width:"100%",overflow:"hidden","margin-top":"10px"}},[e("span",{staticStyle:{float:"right"}},[e("el-button",{attrs:{round:""},on:{click:function(e){return t.viewBtn(i)}}},[t._v(t._s(t.$t("account.account25")))])],1)]):t._e()])})),1):t._e(),!t.laoding&&t.tableData.length<=0?e("el-empty",{staticClass:"follow-ul",attrs:{description:t.$t("warrantyCard50")}}):t._e(),e("div",{staticStyle:{width:"100%","text-align":"right","margin-top":"50px",float:"left"}},[e("el-pagination",{attrs:{"current-page":t.currentPage,"page-sizes":[8,15,50,100,200],"page-size":t.pageSize,layout:"total, sizes, prev, pager, next, jumper",total:t.totalResult},on:{"size-change":t.handleSizeChange,"current-change":t.handleCurrentChange}})],1)],1),e("templateAdd",{ref:"templateAdd",on:{refresh:t.refreshBtn}}),e("templateView",{ref:"templateView"}),e("el-dialog",{attrs:{width:"600px",title:t.$t("ventilator.dialogTile2"),visible:t.dialogVisible1},on:{close:function(e){return t.resetForm()},"update:visible":function(e){t.dialogVisible1=e}}},[e("div",[e("el-upload",{ref:"upload",staticClass:"upload-demo",staticStyle:{"margin-left":"5rem"},attrs:{drag:"","file-list":t.fileList,name:"excel",limit:1,"on-exceed":t.onExceed,"auto-upload":!1,"on-error":t.errorFile,"on-success":t.successFile,"on-change":t.onChange,"on-remove":t.onRemove,data:t.ExcelObj,headers:t.uploadHeaders,"before-upload":t.beforeUpload,action:t.action}},[e("i",{staticClass:"el-icon-upload"}),e("div",{staticClass:"el-upload__text"},[t._v(" "+t._s(t.$t("versionLibrary.uploadText"))),e("em",[t._v(t._s(t.$t("versionLibrary.uploadTextTow")))])]),e("div",{staticClass:"el-upload__tip",attrs:{slot:"tip"},slot:"tip"},[t._v(" "+t._s(t.$t("ventilator.uploadTips"))+" ")])])],1),e("div",{staticStyle:{padding:"10px","text-align":"right","margin-top":"10px"}},[e("el-button",{attrs:{type:"primary"},on:{click:t.importExcel}},[t._v(t._s(t.$t("tips.import")))]),e("el-button",{on:{click:t.resetForm}},[t._v(t._s(t.$t("tips.cancel")))]),e("el-button",{attrs:{type:"primary"},on:{click:t.downBtn}},[t._v(t._s(t.$t("ventilator.buttonTitle")))])],1)])],1)},a=[],l=i("fd03"),o=i("cf73"),n=i("3be5"),r={components:{templateAdd:o["a"],templateView:n["a"]},data(){return{dialogVisible:!1,dialogVisible1:!1,active:1,tableData:[],currentPage:1,pageSize:8,totalResult:0,userInfo:{},followUserId:"",followInstitutionId:"",laoding:!1,fileupdate:!1,action:"",fileList:[],uploadHeaders:{"authentication-info":window.localStorage.getItem("token"),language:this.$i18n.locale},ExcelObj:{},userInfo:{},followOptions:[{label:this.$t("tips.option1"),value:""},{label:this.$t("patientManage.patient101"),value:2},{label:this.$t("common.date14"),value:1}],search:{templateName:"",templateContent:"",followType:""}}},mounted(){this.userInfo=JSON.parse(localStorage.getItem("userInfo")),2==this.userInfo.userType&&(this.followUserId=this.userInfo.id),4==this.userInfo.userType&&(this.followInstitutionId=this.userInfo.id),-1!=window.location.pathname.indexOf("web1")?this.action="/web-server1/api/follow/readFollowExcel":this.action="/web-server/api/follow/readFollowExcel",this.list()},methods:{refresh(){this.currentPage=1,this.list()},resetForm(){this.dialogVisible1=!1},downBtn(){this.fileupdate=!0,Object(l["Kb"])({},{headers:{"Content-Type":"application/octet-stream"},responseType:"blob"}).then(t=>{const e=new Blob([t.data],{type:"application/vnd.ms-excel"}),i="FollowTemplate.xls";if("download"in document.createElement("a")){const t=document.createElement("a");t.download=decodeURIComponent(i),t.style.display="none",t.href=URL.createObjectURL(e),document.body.appendChild(t),t.click(),URL.revokeObjectURL(t.href),document.body.removeChild(t)}else navigator.msSaveBlob(e,i)}),this.fileupdate=!1},successFile(t,e,i){if(this.fileupdate=!1,this.dialogVisible=!1,"00000"!==t.status){if("A0096"==t.status&&1!=this.userInfo.authorityGroupId){let e=this.$t("newAdd.new209");t.data.forEach(t=>{e+="<br/>row:"+t.rowNum+" "+t.deviceId+" "+t.error.join(",")}),this.$alert(e,this.$t("ventilator.uploadFail"),{confirmButtonText:this.$t("tips.sure"),dangerouslyUseHTMLString:!0})}if("A0096"==t.status&&1==this.userInfo.authorityGroupId){let e=t.data?t.data:"",i="<br/>"+e.join("<br/>");this.$alert(i,this.$t("ventilator.uploadFail"),{confirmButtonText:this.$t("tips.sure"),dangerouslyUseHTMLString:!0})}if("A0001"==t.status){let e=this.$t("newAdd.new209");t.data.forEach(t=>{e+="<br/>row:"+t.rowNum+" "+t.error.join(",")}),this.$alert(e,this.$t("ventilator.uploadFail"),{confirmButtonText:this.$t("tips.sure"),dangerouslyUseHTMLString:!0})}if("B0001"==t.status){let e=t.data?t.data:"",i="<br/>"+e.join("<br/>");this.$alert(i,this.$t("ventilator.uploadFail"),{confirmButtonText:this.$t("tips.sure"),dangerouslyUseHTMLString:!0})}this.$nextTick(()=>{this.fileList=[]}),this.$emit("initTable")}else this.$message.success(this.$t("tips.successUpload")),setTimeout(()=>{this.dialogVisible1=!1,this.fileList=[]},300),this.currentPage=1,this.list()},errorFile(t,e,i){this.fileupdate=!1,this.$message.error(this.$t("tips.errorUpload"))},onExceed(t,e){this.$message({message:this.$t("ventilator.uploadTips1"),type:"warning"})},onRemove(){this.fileList=[]},onChange(t,e){let i=t.name.split(".")[1];if("xlsx"!=i&&"xls"!=i){this.$message.error(this.$t("ventilator.uploadTips2")),this.fileList=[];const e=t.size/1024/1024<1;if(!e)return this.$message.error(this.$t("ventilator.uploadTips3")),this.fileList=[],!1}else this.fileList=e},importExcel(){if(this.ExcelObj={},0===this.fileList.length)return this.$message.warning(this.$t("ventilator.uploadTips4"));this.$nextTick(()=>{this.$refs.upload.submit()})},beforeUpload(t){let e=t.name.split(".")[1];if("xlsx"!=e&&"xls"!=e)return this.$message.warning(this.$t("ventilator.uploadTips4"));const i=t.size/1024/1024<1;return i?void 0:(this.$message.error(this.$t("ventilator.uploadTips3")),!1)},batchImport(){this.dialogVisible1=!0},refreshBtn(){this.currentPage=1,this.list()},navBtn(t){this.active=t,1==this.active&&(this.followUserId=this.userInfo.id,this.followInstitutionId=""),2==this.active&&(this.followUserId="",this.followInstitutionId=this.userInfo.currentUserInsId),this.list()},searchBtn(){this.currentPage=1,this.list()},resetBtn(){this.search={templateName:"",templateContent:"",followType:""},this.currentPage=1,this.list()},timeChange(){},list(){this.tableData=[],this.laoding=!0;let t={templateName:this.search.templateName,followDesc:this.search.templateContent,followType:this.search.followType,followUserId:this.followUserId,followInstitutionId:this.followInstitutionId,page:{currentPage:this.currentPage,showCount:this.pageSize}};Object(l["zh"])(this.$newMd5(t)).then(t=>{setTimeout(()=>{this.laoding=!1,this.tableData=t.data.data,this.totalResult=t.data.page.totalResult},1e3)})},openDailog(t){this.dialogVisible=!0,2==this.userInfo.userType&&(this.followUserId=this.userInfo.id),4==this.userInfo.userType&&(this.followInstitutionId=this.userInfo.id),this.list()},handleSizeChange(t){this.pageSize=t,this.list()},handleCurrentChange(t){this.currentPage=t,this.list()},handleChange(t){},closeDialog(){this.dialogVisible=!1},addOpen(){this.$refs.templateAdd.openDailog()},viewBtn(t){this.$refs.templateView.viewDailog(t)},editOpen(t){this.$refs.templateAdd.editDailog(t)},deleteBtn(t){this.$confirm("是否删除该随访模板？","",{confirmButtonText:this.$t("tips.sure"),cancelButtonText:this.$t("tips.cancel"),type:"error"}).then(()=>{let e={id:t.id,isDel:1};Object(l["ki"])(this.$newMd5(e)).then(t=>{200==t.errCode?(this.$message({type:"success",message:this.$t("alert.DeleteSuccessfully")}),this.currentPage=1,this.list()):this.$message({type:"error",message:t.errMsg})})}).catch(()=>{this.$message({type:"info",message:this.$t("orderManagement.optionsTitle3")})})}}},c=r,p=(i("47c0"),i("2877")),d=Object(p["a"])(c,s,a,!1,null,"5d85d92d",null);e["default"]=d.exports},"793f":function(t,e,i){},a0d1:function(t,e,i){},c4b6:function(t,e,i){"use strict";i("793f")},cf73:function(t,e,i){"use strict";var s=function(){var t=this,e=t._self._c;return e("div",{},[e("el-drawer",{attrs:{title:t.title,visible:t.addVisible,"with-header":!0,"show-close":!0,direction:"rtl",size:500,"before-close":t.addClose},on:{"update:visible":function(e){t.addVisible=e}}},[e("div",{staticStyle:{padding:"20px"}},[e("el-descriptions",{attrs:{title:"模板名称"}}),e("el-input",{staticStyle:{width:"300px","margin-bottom":"20px"},attrs:{placeholder:t.$t("tips.input"),maxlength:"50","show-word-limit":""},model:{value:t.templateName,callback:function(e){t.templateName=e},expression:"templateName"}}),e("el-descriptions",{attrs:{title:t.$t("warrantyCard41")}}),e("el-select",{staticStyle:{"margin-bottom":"20px",width:"300px"},attrs:{placeholder:t.$t("tips.select")},model:{value:t.templateValue,callback:function(e){t.templateValue=e},expression:"templateValue"}},t._l(t.templateOptions,(function(t){return e("el-option",{key:t.value,attrs:{label:t.label,value:t.value}})})),1),e("el-descriptions",{attrs:{title:t.$t("warrantyCard49")}}),e("el-input",{staticStyle:{width:"100%"},attrs:{type:"textarea",rows:8,maxlength:"500","show-word-limit":"",placeholder:t.$t("tips.input")},model:{value:t.templateCont,callback:function(e){t.templateCont=e},expression:"templateCont"}})],1),e("div",{staticClass:"add-btn",staticStyle:{padding:"20px","text-align":"right"}},[""!=t.id?e("el-button",{attrs:{type:"primary",round:""},on:{click:function(e){return t.editBtn()}}},[t._v("保存")]):e("el-button",{attrs:{type:"primary",round:""},on:{click:function(e){return t.sureBtn()}}},[t._v("保存")]),e("el-button",{attrs:{round:""},on:{click:function(e){return t.addClose()}}},[t._v("取消")])],1)])],1)},a=[],l=i("fd03"),o={data(){return{title:"",id:"",addVisible:!1,templateName:"",templateValue:"2",templateOptions:[{label:this.$t("patientManage.patient101"),value:"2"},{label:this.$t("common.date14"),value:"1"}],templateCont:"",userInfo:JSON.parse(localStorage.getItem("userInfo"))}},mounted(){},methods:{openDailog(t){this.addVisible=!0,this.id="",this.templateName="",this.templateValue="2",this.templateCont="",this.title="新增模版"},editDailog(t){this.addVisible=!0,this.title="编辑模版",this.id=t.id,this.templateName=t.templateName,this.templateValue=t.followType.toString(),this.templateCont=t.followDesc},addClose(){this.$confirm("是否取消？已输入的内容将不会保存。","",{confirmButtonText:this.$t("tips.sure"),cancelButtonText:this.$t("tips.cancel"),type:"error"}).then(()=>{this.addVisible=!1,this.id="",this.templateName="",this.templateValue="2",this.templateCont=""}).catch(()=>{this.$message({type:"info",message:this.$t("orderManagement.optionsTitle3")})})},editBtn(){let t=this;""!=t.templateName?""!=t.templateCont?t.$confirm("是否确认，原先内容将被覆盖？","",{confirmButtonText:this.$t("tips.sure"),cancelButtonText:this.$t("tips.cancel"),type:"error"}).then(()=>{let e={id:t.id,followType:t.templateValue,followUserId:t.userInfo.id,templateName:t.templateName,followDesc:t.templateCont};Object(l["ki"])(this.$newMd5(e)).then(e=>{200==e.errCode?(t.$message({type:"success",message:"编辑模版成功"}),t.addVisible=!1,t.$emit("refresh")):(t.$message({type:"error",message:e.errMsg}),t.addVisible=!1)})}).catch(()=>{t.$message({type:"info",message:this.$t("orderManagement.optionsTitle3")})}):t.$message({type:"error",message:"请输入模版内容"}):t.$message({type:"error",message:"请输入模版名称"})},sureBtn(){let t=this;""!=t.templateName?""!=t.templateCont?t.$confirm("是否确认，添加随访模板？","",{confirmButtonText:this.$t("tips.sure"),cancelButtonText:this.$t("tips.cancel"),type:"error"}).then(()=>{let e={followType:t.templateValue,followUserId:t.userInfo.id,templateName:t.templateName,followDesc:t.templateCont};Object(l["m"])(this.$newMd5(e)).then(e=>{200==e.errCode?(t.$message({type:"success",message:"新增模版成功"}),t.addVisible=!1,t.$emit("refresh")):(t.$message({type:"error",message:e.errMsg}),t.addVisible=!1)})}).catch(()=>{t.$message({type:"info",message:this.$t("orderManagement.optionsTitle3")})}):t.$message({type:"error",message:"请输入模版内容"}):t.$message({type:"error",message:"请输入模版名称"})}}},n=o,r=(i("37a2"),i("2877")),c=Object(r["a"])(n,s,a,!1,null,"473c3489",null);e["a"]=c.exports}}]);