(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-a15c907c"],{"0cfb":function(e,t,i){"use strict";var r=i("2ad9");e.exports=/MSIE|Trident/.test(r)},"134f":function(e,t,i){"use strict";var r=i("037d"),o=i("a67a"),a=i("a143"),l=i("ba03"),s=i("4e61"),n=i("5cb2"),c=i("0900"),p=i("0761"),u=i("b697"),m=i("ee33"),d=i("22f9"),f=i("0cfb"),v=i("3404"),b=i("8055"),h=[],g=o(h.sort),y=o(h.push),x=p((function(){h.sort(void 0)})),T=p((function(){h.sort(null)})),k=m("sort"),w=!p((function(){if(v)return v<70;if(!(d&&d>3)){if(f)return!0;if(b)return b<603;var e,t,i,r,o="";for(e=65;e<76;e++){switch(t=String.fromCharCode(e),e){case 66:case 69:case 70:case 72:i=3;break;case 68:case 71:i=4;break;default:i=2}for(r=0;r<47;r++)h.push({k:t+r,v:i})}for(h.sort((function(e,t){return t.v-e.v})),r=0;rc(i)?1:-1}};r({target:"Array",proto:!0,forced:F},{sort:function(e){void 0!==e&&a(e);var t=l(this);if(w)return void 0===e?g(t):g(t,e);var i,r,o=[],c=s(t);for(r=0;r0)e[s]=e[--s];s!==n++&&(e[s]=l)}}else{var c=o(i/2),p=a(r(e,0,c),t),u=a(r(e,c),t),m=p.length,d=u.length,f=0,v=0;while(f10},remaining:function(){return this.illnesslist.length-10}},methods:{getIndexInArray:function(e,t){return e.indexOf(t)},processElement:function(e){return Object(a["a"])(Object(a["a"])({},e),{},{isoperation:0})},RoutingDataProcessing:function(){this.id=this.$route.query.id,this.task=this.$route.query.task,this.queryParamsdept.tempid=this.id},getDeptTree:function(){var e=this;Object(d["e"])().then((function(t){e.deptOptions=t.data,e.flatArray=e.flattenArray(t.data)}))},flattenArray:function(e){var t=[];function i(e){if(e.children&&e.children.length>0)e.children.forEach((function(e){return i(e)}));else{var r=JSON.parse(JSON.stringify(e));t.push(r)}}return e.forEach((function(e){return i(e)})),t},getvFollowup:function(){var e=this;this.id?(Object(p["Eb"])(this.id).then((function(t){200==t.code&&(console.log(t,"任务模板"),e.ruleForm=t.data,e.ruleForm.deptNames&&(e.ruleForm.suitway=e.ruleForm.suitway.split(",")),e.ruleForm.campus&&(e.ruleForm.campus=e.ruleForm.campus.split(",")),e.ruleForm.submoduleID=e.ruleForm.submoduleID.split(","),console.log(e.ruleForm.submoduleID,"submoduleID"),e.ruleForm.submoduleID=e.ruleForm.submoduleID.map((function(e){return Number(e)})),e.dynamicTags=e.ruleForm.ivrLibaTemplateTagList,e.ruleForm.ivrLibaTemplateTagList&&(e.dynamicTags=e.ruleForm.ivrLibaTemplateTagList.map(e.processElement)),e.sortFn())})),Object(p["Ub"])({outid:this.id,type:3}).then((function(t){e.illnesslist=t.rows,e.illnesslist.forEach((function(e){e.icdname=e.icd10name}))}))):(this.ruleForm={templateName:"",ivrLibaTemplateTagList:[],ivrTaskTemplateScriptVOList:[],tempDetpRelevances:[]},this.deptOptions=[],this.optionsillness=[],this.illnesslistapi=[],this.illnesslist=[],this.dynamicTags=[],this.tempDetpRelevanceslist=[])},auxiliary:function(){var e=this;Object(p["wb"])({}).then((function(t){e.indexAssortlist=t.rows})),this.tempDetpRelevanceslist=[],this.tempbelongWards=[],this.id&&Object(p["kb"])(this.queryParamsdept).then((function(t){if(200==t.code){var i=t.rows;console.log(i,"arr"),i.forEach((function(t){1==t.deptType?(console.log(e.deptlist,"11"),e.deptlist.push(t),console.log("22"),e.tempDetpRelevanceslist.push(t.deptCode)):2==t.deptType&&(e.hosplist.push(t),e.tempbelongWards.push(t.deptCode),console.log("33"))}))}})),Object(p["Vb"])({pageNum:1,pageSize:100}).then((function(t){e.optionsillness=t.rows})),Object(p["Rb"])({pageNum:1,pageSize:100}).then((function(t){e.generallist=t.rows}))},branchFlagfn:function(e){1==this.topicobj.branchFlag&&0!=this.topicobj.nextScriptno&&(this.topicobj.nextScriptno=this.topicobj.ivrTaskScriptTargetoptionList[0].nextQuestion)},submitForm:function(e){var t=this;this.ruleForm.id?this.ruleForm.isoperation=2:this.ruleForm.isoperation=1,this.ruleForm.assortid||(this.ruleForm.assortid=-1),this.ruleForm.labelInfo=JSON.stringify(this.dynamicTags),Array.isArray(this.ruleForm.suitway)&&(this.ruleForm.suitway=this.ruleForm.suitway.join(",")),Array.isArray(this.ruleForm.campus)&&(this.ruleForm.campus=this.ruleForm.campus.join(",")),Array.isArray(this.ruleForm.submoduleID)&&(this.ruleForm.submoduleID=this.ruleForm.submoduleID.join(",")),this.ruleForm.ivrTaskTemplateScriptVOList.forEach((function(e){e.isoperation||(e.isoperation=2),e.ivrTaskScriptTargetoptionList=e.ivrTaskScriptTargetoptionList.map((function(e){return e.isoperation||(e.isoperation=2,e.templateID=t.ruleForm.id),e}))})),this.delScriptVOList.forEach((function(e){t.ruleForm.ivrTaskTemplateScriptVOList.push(e)})),this.id?(this.ruleForm.isoperation=2,this.ruleForm.tempDetpRelevances=[],Object(p["o"])(this.ruleForm).then((function(e){200==e.code?(t.$modal.msgSuccess("修改成功"),t.confirmillness(),t.putbelongDepts(t.id),t.$modal.closeLoading(),t.$router.go(-1)):t.$modal.closeLoading()}))):(this.ruleForm.isoperation=1,this.ruleForm.version=this.ruleForm.version?this.ruleForm.version:"1.0",this.ruleForm.tempDetpRelevances=[],Object(p["o"])(this.ruleForm).then((function(e){200==e.code?(t.$modal.msgSuccess("新增成功"),t.confirmillness(e.data),t.putbelongDepts(e.data),t.$modal.closeLoading(),t.$router.go(-1)):t.$modal.closeLoading()})))},confirmillness:function(e){var t=this;this.illnesslist.forEach((function(i,r){e?i.outid=e:(console.log(t.ruleForm),i.outid=t.ruleForm.id),i.icd10name=i.icdname,i.icd10code=i.icdcode,i.type=3,i.id||Object(p["D"])(i).then((function(e){}))})),this.illnessVisible=!1,this.$modal.msgSuccess("编辑成功")},Departmenttreatment:function(){var e=this;this.$modal.loading("正在修正保存数据,请稍候..."),this.tempDetpRelevanceslist.forEach((function(t){var i=e.deptlist.some((function(e){return e.deptCode==t}));i||e.tempDetpRelevanceslistform.push({deptType:1,longTemp:e.ruleForm.longTemp,deptCode:t,tempid:e.id,type:2})})),this.tempbelongWards.forEach((function(t){var i=e.hosplist.some((function(e){return e.deptCode==t}));i||e.tempbelongWardsform.push({deptType:2,longTemp:e.ruleForm.longTemp,deptCode:t,tempid:e.id,type:2})})),setTimeout((function(){e.submitForm()}),1e3)},putbelongDepts:function(e){var t=this;this.tempDetpRelevanceslistform.forEach((function(t){t.tempid||(t.tempid=e)})),this.tempbelongWardsform.forEach((function(t){t.tempid||(t.tempid=e)})),this.tempDetpRelevanceslistform.length>0&&Object(p["ib"])(this.tempDetpRelevanceslistform).then((function(e){200==e.code&&t.$modal.msgSuccess("科室新增成功")})),this.tempbelongWardsform.length>0&&Object(p["ib"])(this.tempbelongWardsform).then((function(e){200==e.code&&t.$modal.msgSuccess("院区新增成功")}))},nextstep:function(){if(this.Editprogress<=2)return this.Editprogress++},laststep:function(){this.Editprogress=this.Editprogress-1},closeFm:function(){var e=this;this.$confirm("退出不会保留页面内容更改, 是否继续?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){var t={path:"/knowledge/templateku/"};e.$tab.closeOpenPage(t)})).catch((function(){e.$message({type:"info",message:"已取消"})}))},handleChange:function(e,t,i){console.log(e),console.log(i),1==i?this.indexform.ivrVoice=e.url:2==i?this.indexform.nomatchvoice=e.url:3==i?this.indexform.sliencevoice=e.url:4==i&&(this.indexform.noclearlyvoice=e.url),this.$forceUpdate()},handleChanges:function(e,t,i){console.log(e),console.log(i),1==i?this.topicobj.ivrVoice=e.url:2==i?this.topicobj.nomatchvoice=e.url:3==i?this.topicobj.sliencevoice=e.url:4==i&&(this.topicobj.noclearlyvoice=e.url),this.$forceUpdate()},handleExceed:function(e,t){this.$message.warning("当前限制选择 1 个文件,本次选择了 ".concat(e.length," 个文件,共选择了 ").concat(e.length+t.length," 个文件"))},gettabList:function(){var e=this,t={pageNum:1,pageSize:1e3,tagcategoryid:"0"};Object(s["f"])(t).then((function(t){e.optionstag=t.rows}))},handleClosetag:function(e){var t=this.dynamicTags.indexOf(e);this.dynamicTags.splice(this.dynamicTags.indexOf(e),1),this.ruleForm.ivrLibaTemplateTagList[t].isoperation=3},handleInputConfirm:function(){var e=this,t={},i=this.inputValue;i&&Object(s["f"])({pageNum:1,pageSize:1e3,tagcategoryid:"0",tagname:i}).then((function(r){r.rows[0]?(t=r.rows[0],t.isoperation=1):t={tagname:i,isoperation:1};var o=e.dynamicTags.some((function(e){return e.tagname===i}));o?e.$modal.msgError("标签重复"):(e.ruleForm.ivrLibaTemplateTagList.push(t),e.dynamicTags.push(t))})),this.inputVisible=!1,this.inputValue=""},remoteMethodtag:function(e){var t=this;""!==e?(this.loading=!0,setTimeout((function(){t.loading=!1,Object(s["f"])({tagname:e,tagcategoryid:"0"}).then((function(e){t.optionstag=e.rows}))}),200)):this.optionstag=[]},showInput:function(){this.inputVisible=!0},addzbiao:function(){},resetQuery:function(){this.queryParams={pageNum:1,pageSize:10},this.getaddtopiclist()},getaddtopiclist:function(){var e=this;this.drawer=!0,Object(p["ic"])(this.queryParams).then((function(t){e.loading=!1,e.userList=t.rows,e.total=t.total,console.log(e.userList)}))},addtopic:function(e){var t=this;this.ruleForm.ivrTaskTemplateScriptVOList.some((function(t){return t.scriptTopic==e.scriptTopic}))?this.$modal.msgError("该题目已存在"):Object(p["hc"])({id:e.id}).then((function(e){console.log(e,"详情"),e.data.isoperation=1,e.data.pid=t.ruleForm.id,e.data.ivrTaskScriptTargetoptionList.forEach((function(e){e.isoperation=1})),t.ruleForm.ivrTaskTemplateScriptVOList.push(e.data),t.sortFn(),t.$modal.msgSuccess("添加成功")}))},handleDelete:function(e){var t=this;this.$modal.confirm('是否确认删除问题:"'+e.scriptTopic+'"?').then((function(){t.ruleForm.ivrTaskTemplateScriptVOList.splice(t.ruleForm.ivrTaskTemplateScriptVOList.indexOf(e),1),e.isoperation=3,e.id&&t.delScriptVOList.push(e),t.sortFn(),t.$modal.msgSuccess("已删除,保存模板生效")})).catch((function(){}))},handleUpdate:function(e){var t=this;console.log(e,"单体数据"),this.optionIndex=this.ruleForm.ivrTaskTemplateScriptVOList.indexOf(e),e.ivrTaskScriptTargetoptionList.length?(this.topicobj=e,this.topicobj.valueType=e.valueType):Object(p["hc"])({id:e.id}).then((function(i){i.data?(t.topicobj=i.data,console.log(i.data,"topicobj")):(t.topicobj=e,console.log("没找到选项,请查看问题库是否正确配置"))}))},syioption:function(e){var t=this.getIndexInArray(this.ruleForm.ivrTaskTemplateScriptVOList,e),i=this.ruleForm.ivrTaskTemplateScriptVOList.splice(t,1)[0];this.ruleForm.ivrTaskTemplateScriptVOList.splice(t-1,0,i),this.sortFn()},xiayioption:function(e){var t=this.getIndexInArray(this.ruleForm.ivrTaskTemplateScriptVOList,e),i=this.ruleForm.ivrTaskTemplateScriptVOList.splice(t,1)[0];this.ruleForm.ivrTaskTemplateScriptVOList.splice(t+1,0,i),this.sortFn()},sortFn:function(){var e=this;console.log(this.ruleForm.ivrTaskTemplateScriptVOList),this.ruleForm.ivrTaskTemplateScriptVOList.forEach((function(t,i){t.sort=Number(i)+1,console.log(e.ruleForm.ivrTaskTemplateScriptVOList.length),console.log(t.sort),t.sort==e.ruleForm.ivrTaskTemplateScriptVOList.length?t.nextScriptno=0:t.nextScriptno=t.sort+1,t.ivrTaskScriptTargetoptionList&&!t.branchFlag&&t.ivrTaskScriptTargetoptionList.forEach((function(e){e.nextQuestion=Number(t.sort)+1}))})),this.$forceUpdate(),console.log(this.ruleForm.ivrTaskTemplateScriptVOList)},deloption:function(e){var t=this.topicobj.ivrTaskScriptTargetoptionList.indexOf(e);-1!=t?e.id?(console.log(e,"chunz"),e.isoperation=3,console.log(this.topicobj.ivrTaskScriptTargetoptionList),this.$forceUpdate()):this.topicobj.ivrTaskScriptTargetoptionList.splice(t,1):console.log("未找到该对象")},Submittopicobj:function(){var e=this;this.$modal.confirm('是否确认新增名称为"'+this.indexform.scriptTopic+'"的问题数据?').then((function(){e.indexform.isoperation=1,e.indexform.pid=e.ruleForm.id,e.indexform.ivrTaskScriptTargetoptionList.forEach((function(e){e.isoperation=1})),e.ruleForm.ivrTaskTemplateScriptVOList.push(e.indexform),e.indexform={ivrTaskScriptTargetoptionList:[]},e.drawer=!1,e.sortFn(),e.$modal.msgSuccess("题目新增成功,保存模板生效")}))},resetForm:function(e){this.$refs[e].resetFields()},removetag:function(e){var t=this.deptlist.filter((function(t){return t.deptCode==e})).map((function(e){return e.id}));console.log(t.length),t.length&&Object(p["jb"])(t).then((function(e){e.code}))},removehpsp:function(e){var t=this.hosplist.filter((function(t){return t.deptCode==e})).map((function(e){return e.id}));t.length&&Object(p["jb"])(t).then((function(e){e.code}))},preview:function(){console.log(this.ruleForm),this.valssu=this.ruleForm.ivrTaskTemplateScriptVOList,this.Editprogress=3},measurement:function(){var e=this;this.$modal.confirm("即将前往模板测试页面,请确认模板数据已保存。").then((function(t){e.$router.push({path:"/knowledge/templateku/configurat/measurement",query:{id:e.id,name:e.ruleForm.templateName,timeout:e.ruleForm.silencetime}})})).catch((function(){}))},typeselection:function(e){1!=e||this.indexform.ivrTaskScriptTargetoptionList.length||this.indexform.ivrTaskScriptTargetoptionList.push({guid:1,isoperation:1,targetvalue:"",targetregex:"",targetregex2:"",dynamiccruxs:[],nodynamiccruxs:[],dynamiccruxsJson:"",nodynamiccruxsJson:""}),this.$forceUpdate()},addoptionson:function(){this.indexform.ivrTaskScriptTargetoptionList.push({guid:1,isoperation:1,targetvalue:"",targetregex:"",targetregex2:"",dynamiccruxs:[],nodynamiccruxs:[],dynamiccruxsJson:"",nodynamiccruxsJson:""})}}},v=f,b=(i("4fec"),i("1805")),h=Object(b["a"])(v,r,o,!1,null,"71d23e82",null);t["default"]=h.exports},fcb7:function(e,t,i){"use strict";i.d(t,"d",(function(){return o})),i.d(t,"e",(function(){return a})),i.d(t,"c",(function(){return l})),i.d(t,"a",(function(){return s})),i.d(t,"f",(function(){return n})),i.d(t,"b",(function(){return c}));var r=i("b775");function o(e){return Object(r["a"])({url:"/system/dept/list",method:"get",params:e})}function a(e){return Object(r["a"])({url:"/system/dept/list/exclude/"+e,method:"get"})}function l(e){return Object(r["a"])({url:"/system/dept/getInfo/"+e,method:"get"})}function s(e){return Object(r["a"])({url:"/system/dept",method:"post",data:e})}function n(e){return Object(r["a"])({url:"/system/dept/edit",method:"post",data:e})}function c(e){return Object(r["a"])({url:"/system/dept/remove/"+e,method:"get"})}}}]);