text: (window.webpackJsonp=window.webpackJsonp||[]).push([["chunk-ee04"],{"/z6J":function(e,t,a){"use strict";var r=a("Gke8");a.n(r).a},Gke8:function(e,t,a){},"Rnp/":function(e,t,a){var r=a("Bhyg");e.exports={render:function(e){return e("div",{attrs:{style:"height: "+(this.height?this.px(this.height):"100%")+"; width: "+(this.width?this.px(this.width):"100%")}})},props:{value:{type:String,required:!0},lang:String,theme:String,height:!0,width:!0,options:Object,change:{type:Function,require:!1},param:{type:Object,require:!1}},data:function(){return{editor:null,contentBackup:""}},methods:{px:function(e){return/^\d*$/.test(e)?e+"px":e}},watch:{value:function(e){this.contentBackup!==e&&(this.editor.setValue(e,1),this.contentBackup=e)},theme:function(e){this.editor.setTheme("ace/theme/"+e)},lang:function(e){this.editor.getSession().setMode("ace/mode/"+e)},options:function(e){this.editor.setOptions(e)},height:function(){this.$nextTick(function(){this.editor.resize()})},width:function(){this.$nextTick(function(){this.editor.resize()})}},beforeDestroy:function(){this.editor.destroy(),this.editor.container.remove()},mounted:function(){var e=this,t=this.lang||"text",n=this.theme||"chrome";a("s3h0");var i=e.editor=r.edit(this.$el);this.$emit("init",i),i.$blockScrolling=1/0,i.setOption("enableEmmet",!0),i.getSession().setMode("ace/mode/"+t),i.setTheme("ace/theme/"+n),i.setValue(this.value,1),this.contentBackup=this.value,i.on("change",function(){var t=i.getValue();e.$emit("input",t),e.contentBackup=t,e.param&&(e.param.value=t),e.change&&e.change(e.param)}),e.options&&i.setOptions(e.options)}}},XVP5:function(e,t,a){"use strict";var r=a("pKJk");a.n(r).a},pKJk:function(e,t,a){},qT3E:function(e,t,a){"use strict";var r=a("P2sY"),n=a.n(r),i=a("m1cH"),c=a.n(i),s=a("gDS+"),o=a.n(s),l=a("4d7F"),d=a.n(l),u=a("sk9p"),p=a.n(u),h=a("QbLZ"),m=a.n(h),y=a("14Xm"),f=a.n(y),b=a("D3Ub"),v=a.n(b),_=a("t3Un"),k=function(){var e=v()(f.a.mark(function e(){var t,a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return f.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(_.a)({url:"/interface_http/insert",method:"post",param:a});case 2:return t=e.sent,e.abrupt("return",t||{});case 4:case"end":return e.stop()}},e,this)}));return function(){return e.apply(this,arguments)}}(),$=function(){var e=v()(f.a.mark(function e(){var t,a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return f.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(_.a)({url:"/interface_http/selectById",method:"post",param:a});case 2:return t=e.sent,e.abrupt("return",t||{});case 4:case"end":return e.stop()}},e,this)}));return function(){return e.apply(this,arguments)}}(),x=function(){var e=v()(f.a.mark(function e(){var t,a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return f.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(_.a)({url:"/interface_http/update",method:"post",param:a});case 2:return t=e.sent,e.abrupt("return",t||{});case 4:case"end":return e.stop()}},e,this)}));return function(){return e.apply(this,arguments)}}(),S=function(){var e=v()(f.a.mark(function e(){var t,a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return f.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(_.a)({url:"/host_info/core",method:"post",param:a});case 2:return t=e.sent,e.abrupt("return",t||{});case 4:case"end":return e.stop()}},e,this)}));return function(){return e.apply(this,arguments)}}(),g=function(){var e=v()(f.a.mark(function e(){var t,a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return f.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Object(_.a)({url:"/interface_http/conflictDetection",method:"post",param:a});case 2:return t=e.sent,e.abrupt("return",t||{});case 4:case"end":return e.stop()}},e,this)}));return function(){return e.apply(this,arguments)}}(),F={components:{editor:a("Rnp/")},data:function(){var e=this;return{activeKey:"1",submitDisabled:!1,submitLoading:!1,submitText:"立即创建",isUpdate:parseInt(this.$route.params.id)>0,ip_info:"http://hostname",ruleForm:{spaceData:{data:[],path:[],props:{value:"id",label:"label",children:"children"}},request_method_type:{activeIndex:"",asyncActiveIndex:"",list:[{type:"GET",text:"GET"},{type:"POST",text:"POST"}]},interface_url:"",async_interface_url:"",interface_type:{activeIndex:"0",list:[{type:"0",text:"静态文本"},{type:"1",text:"Groovy"},{type:"2",text:"Groovy(预设switch/case)"}]},start_async_callback:!1,start_interface:!0,name:"",sync_delay_time:"",async_delay_time:"",responseBody:"",callbackRequestBody:"",syncScript:"",asyncScript:"",branchJumpScript:""},header:{columns:[{title:"Key",dataIndex:"name",scopedSlots:{customRender:"name"}},{title:"Value",dataIndex:"value",scopedSlots:{customRender:"value"}},{title:"操作",dataIndex:"operation",width:150,scopedSlots:{customRender:"operation"}}],data:[{key:(new Date).getTime().toString(),name:"",value:""}],asyncData:[{key:(new Date).getTime().toString(),name:"",value:""}],cacheData:[],asyncCacheData:[]},branchScriptList:{columns:[],tmpColumns:[{title:"case",dataIndex:"name",width:150,scopedSlots:{customRender:"name"}},{title:"同步脚本",dataIndex:"syncScript",scopedSlots:{customRender:"syncScript"}},{title:"操作",dataIndex:"operation",width:150,scopedSlots:{customRender:"operation"}}],asyncTmpColumns:[{title:"case",dataIndex:"name",width:150,scopedSlots:{customRender:"name"}},{title:"同步脚本",dataIndex:"syncScript",scopedSlots:{customRender:"syncScript"}},{title:"异步脚本",dataIndex:"asyncScript",scopedSlots:{customRender:"asyncScript"}},{title:"操作",dataIndex:"operation",width:150,scopedSlots:{customRender:"operation"}}],data:[{id:(new Date).getTime().toString(),name:"",syncScript:"",asyncScript:""}],cacheData:[]},rules:{name:[{required:!0,validator:function(e,t,a){0===t.length?a(new Error("请输入接口名称")):a()}}],"spaceData.path":[{required:!0,validator:function(e,t,a){0===t.length?a(new Error("请选择空间")):a()}}],"request_method_type.activeIndex":[{required:!0,validator:function(e,t,a){t?a():a(new Error("请选择请求方法类型"))}}],interface_url:[{required:!0,validator:function(){var t=v()(f.a.mark(function t(a,r,n){var i,c;return f.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(r){t.next=4;break}n(new Error("请补全URL")),t.next=13;break;case 4:if(!(r&&r.length>0&&("/"!==r[0]||r.length<4))){t.next=8;break}n(new Error("URL首字符位 ‘/’开始,长度为大于3位")),t.next=13;break;case 8:return t.next=10,g({id:e.$route.params.id,uri:r,method:e.$data.ruleForm.request_method_type.activeIndex});case 10:i=t.sent,(c=i.data).detectable&&c.conflict?n("url 已存在，请重新输入"):n();case 13:case"end":return t.stop()}},t,e)}));return function(e,a,r){return t.apply(this,arguments)}}()}],async_interface_url:[{required:!0,validator:function(e,t,a){t?t&&!/[a-zA-z]+:\/[^\s]*/.test(t)?a(new Error("请输入正确URL格式:http://ip:port/interface_url")):a():a(new Error("请输异步URL"))}}],"request_method_type.asyncActiveIndex":[{required:!0,validator:function(e,t,a){t?a():a(new Error("请求方法类型"))}}],"interface_type.activeIndex":[{required:!0,validator:function(e,t,a){t?a():a(new Error("请选择配置模式"))}}],branchJumpScript:[{required:!0,validator:function(t,a,r){a&&"2"===e.$data.ruleForm.request_method_type.activeIndex&&a.length>0?r(new Error("请输入switch脚本")):r()}}]}}},computed:{},watch:{"ruleForm.start_async_callback":function(e,t){this.$data.branchScriptList.columns=e?this.$data.branchScriptList.asyncTmpColumns:this.$data.branchScriptList.tmpColumns}},mounted:function(){var e=this;return v()(f.a.mark(function t(){var a,r,n,i,c,s,l;return f.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return a=e,e.$data.header.cacheData=e.$data.header.data.map(function(e){return m()({},e)}),e.$data.header.asyncCacheData=e.$data.header.asyncData.map(function(e){return m()({},e)}),t.next=5,d.a.all([S(),e.$store.dispatch("getSpaceTree",{})]);case 5:if(r=t.sent,n=p()(r,2),i=n[0],c=n[1],e.$data.ip_info=function(){var e=i.data;if(e.urlPrefix)return[e.urlPrefix].join("")}(),e.$data.ruleForm.spaceData.data=function(){var e=[];try{e=JSON.parse(o()(c.data))}catch(t){e=[]}return function e(t){t.map(function(a,r){a.children&&0===a.children.length&&delete a.children,a.allowCreateInterface||a.children&&0!==a.children.length||delete t[r],a.children&&a.children.length>0&&e(a.children)})}(e),a.$data.isUpdate?e:e.filter(function(e){if(e.variable)return e})}(),!e.$data.isUpdate){t.next=36;break}return t.next=14,$({id:e.$route.params.id});case 14:s=t.sent,l=s.data&&s.data||[],e.$data.ruleForm.interface_url=l.requestUri,e.$data.ruleForm.request_method_type.activeIndex=l.requestMethod,e.$data.ruleForm.name=l.name,e.$data.ruleForm.start_async_callback=l.needAsyncCallback,e.$data.ruleForm.interface_type.activeIndex=function(){var e=0;return"TEXT"===l.configMode&&(e="0"),"GROOVY"===l.configMode&&(e="1"),"GROOVY_TEMPLATE_SWITCH_CASE"===l.configMode&&(e="2"),e}(),l.responseHeaderList.length>0&&(l.responseHeaderList.map(function(e,t){e.key=t,e.editable=!0}),e.$data.header.data=l.responseHeaderList),e.$data.ruleForm.responseBody=l.responseBody,e.$data.ruleForm.async_interface_url=l.callbackRequestUrl,e.$data.ruleForm.request_method_type.asyncActiveIndex=l.callbackRequestMethod,l.callbackRequestHeaderList.length>0&&(l.callbackRequestHeaderList.map(function(e,t){e.key=t,e.editable=!0}),e.$data.header.asyncData=l.callbackRequestHeaderList),e.$data.ruleForm.callbackRequestBody=l.callbackRequestBody,e.$data.ruleForm.branchJumpScript=l.branchJumpScript,e.$data.ruleForm.syncScript=l.syncScript,e.$data.ruleForm.asyncScript=l.asyncScript,e.$data.ruleForm.sync_delay_time=l.syncDelay,e.$data.ruleForm.async_delay_time=l.asyncDelay,e.$data.ruleForm.start_interface=l.start,e.$data.ruleForm.spaceData.path=l.path,l.branchScriptList.length>0&&(l.branchScriptList.map(function(e,t){e.key=t,e.editable=!0}),e.$data.branchScriptList.data=l.branchScriptList),l.variable?e.$data.submitText="立即更新":(e.$data.submitText="示例禁止修改",e.$data.submitDisabled=!0);case 36:e.$data.ruleForm.start_async_callback?e.$data.branchScriptList.columns=e.$data.branchScriptList.asyncTmpColumns:e.$data.branchScriptList.columns=e.$data.branchScriptList.tmpColumns,e.$data.branchScriptList.cacheData=e.$data.branchScriptList.data.map(function(e){return m()({},e)});case 38:case"end":return t.stop()}},t,e)}))()},methods:{submitForm:function(e){var t=this,a=this;this.$refs[e].validate(function(){var e=v()(f.a.mark(function e(r){var n,i;return f.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!r){e.next=16;break}if(n={requestUri:t.$data.ruleForm.interface_url,requestMethod:t.$data.ruleForm.request_method_type.activeIndex,name:t.$data.ruleForm.name,needAsyncCallback:t.$data.ruleForm.start_async_callback,configMode:["TEXT","GROOVY","GROOVY_TEMPLATE_SWITCH_CASE"][a.$data.ruleForm.interface_type.activeIndex],responseHeaderList:function(){var e=[];return JSON.parse(o()(a.$data.header.data)).map(function(t){t.name&&(delete t.editable,delete t.key,t&&e.push(t))}),e}(),responseBody:t.$data.ruleForm.responseBody,callbackRequestUrl:t.$data.ruleForm.async_interface_url,callbackRequestMethod:t.$data.ruleForm.request_method_type.asyncActiveIndex,callbackRequestHeaderList:function(){var e=[];return JSON.parse(o()(a.$data.header.asyncData)).filter(function(t){t.name&&(delete t.editable,delete t.key,t&&e.push(t))}),e}(),description:"",callbackRequestBody:t.$data.ruleForm.callbackRequestBody,branchJumpScript:t.$data.ruleForm.branchJumpScript,syncScript:t.$data.ruleForm.syncScript,asyncScript:t.$data.ruleForm.asyncScript,syncDelay:t.$data.ruleForm.sync_delay_time||0,asyncDelay:t.$data.ruleForm.async_delay_time||0,start:t.$data.ruleForm.start_interface,spaceId:function(){try{return a.$data.ruleForm.spaceData.path.slice(-1)[0]}catch(e){return""}}(),branchScriptList:function(){var e=[];return JSON.parse(o()(a.$data.branchScriptList.data)).map(function(t){t.name&&t.syncScript&&(delete t.editable,delete t.key,e.push(t))}),e}()},t.$data.submitLoading=!0,i={},!t.$data.isUpdate){e.next=11;break}return n.id=t.$route.params.id,e.next=8,x(n);case 8:i=e.sent,e.next=14;break;case 11:return e.next=13,k(n);case 13:i=e.sent;case 14:"000000"===i.resultCode?(t.$store.commit("UPDATE_SPACE_ID",{spaceId:n.spaceId}),t.$message({message:i.resultMsg,type:"success"})):t.$message(i.resultMsg),t.$data.submitLoading=!1;case 16:case"end":return e.stop()}},e,t)}));return function(t){return e.apply(this,arguments)}}())},copyUrlSuc:function(e){this.$message({message:"复制成功",type:"success"})},copyUrlErr:function(){this.$message("复制失败")},editorInit:function(){a("D2oq"),a("HSmm")},HeaderHandleChange:function(e,t,a){var r=[].concat(c()(this.$data.header.data)),n=r.filter(function(e){return t===e.key})[0];n&&(n[a]=e,this.$data.header.data=r)},HeaderEdit:function(e){var t=[].concat(c()(this.$data.header.data)),a=t.filter(function(t){return e===t.key})[0];a&&(a.editable=!1,this.$data.header.data=t)},HeaderSave:function(e){var t=[].concat(c()(this.$data.header.data)),a=t.filter(function(t){return e===t.key})[0];a.name&&a.value?(a&&(a.editable=!0,this.$data.header.data=t),this.$data.header.cacheData=JSON.parse(o()(this.$data.header.data))):this.$message("字段不能为空！")},HeaderCancel:function(e){var t=[].concat(c()(this.$data.header.data)),a=t.filter(function(t){return e===t.key})[0];a&&(n()(a,this.$data.header.cacheData.filter(function(t){return e===t.key})[0]),a.editable=!0,this.$data.header.data=t)},HeaderAdd:function(e){var t=[].concat(c()(this.$data.header.data)).filter(function(t){return e===t.key})[0],a=this.$data.header.data.slice(-1);a[0].name&&a[0].value?(t.editable=!0,this.$data.header.data=[].concat(c()(this.$data.header.data),[{key:(new Date).getTime().toString(),name:"",value:""}]),this.$data.header.cacheData=JSON.parse(o()(this.$data.header.data))):this.$message("请完成新增项填写")},HeaderDelete:function(e){var t=[].concat(c()(this.$data.header.data));this.$data.header.data=t.filter(function(t){if(t.key!==e)return t}),0===this.$data.header.data.length&&(this.$data.header.data=[{key:(new Date).getTime().toString(),name:"",value:""}])},asyncHeaderHandleChange:function(e,t,a){var r=[].concat(c()(this.$data.header.asyncData)),n=r.filter(function(e){return t===e.key})[0];n&&(n[a]=e,this.$data.header.asyncData=r)},asyncHeaderEdit:function(e){var t=[].concat(c()(this.$data.header.asyncData)),a=t.filter(function(t){return e===t.key})[0];a&&(a.editable=!1,this.$data.header.asyncData=t)},asyncHeaderSave:function(e){var t=[].concat(c()(this.$data.header.asyncData)),a=t.filter(function(t){return e===t.key})[0];a.name&&a.value?(a&&(a.editable=!0,this.$data.header.asyncData=t),this.$data.header.asyncCacheData=JSON.parse(o()(this.$data.header.asyncData))):this.$message("字段不能为空！")},asyncHeaderCancel:function(e){var t=[].concat(c()(this.$data.header.asyncData)),a=t.filter(function(t){return e===t.key})[0];a&&(n()(a,this.$data.header.asyncCacheData.filter(function(t){return e===t.key})[0]),a.editable=!0,this.$data.header.asyncData=t)},asyncHeaderAdd:function(e){var t=[].concat(c()(this.$data.header.asyncData)).filter(function(t){return e===t.key})[0],a=this.$data.header.asyncData.slice(-1);a[0].name&&a[0].value?(t.editable=!0,this.$data.header.asyncData=[].concat(c()(this.$data.header.asyncData),[{key:(new Date).getTime().toString(),name:"",value:""}]),this.$data.header.asyncCacheData=JSON.parse(o()(this.$data.header.asyncData))):this.$message("请完成新增项填写")},asyncHeaderDelete:function(e){var t=[].concat(c()(this.$data.header.asyncData));this.$data.header.asyncData=t.filter(function(t){if(t.key!==e)return t}),0===this.$data.header.asyncData.length&&(this.$data.header.asyncData=[{key:(new Date).getTime().toString(),name:"",value:""}])},branchHandleChange:function(e){var t=e.value,a=e.key,r=e.column,n=[].concat(c()(this.$data.branchScriptList.data)),i=n.filter(function(e){return a===e.key})[0];i&&(i[r]=t,this.$data.branchScriptList.data=n)},branchEdit:function(e){var t=[].concat(c()(this.$data.branchScriptList.data)),a=t.filter(function(t){return e===t.key})[0];a&&(a.editable=!1,this.$data.branchScriptList.data=t)},branchSave:function(e){var t=[].concat(c()(this.$data.branchScriptList.data)),a=t.filter(function(t){return e===t.key})[0];a.name&&a.syncScript?(a&&(a.editable=!0,this.$data.branchScriptList.data=t),this.$data.branchScriptList.cacheData=JSON.parse(o()(this.$data.branchScriptList.data))):this.$message("字段不能为空！")},branchCancel:function(e){var t=[].concat(c()(this.$data.branchScriptList.data)),a=t.filter(function(t){return e===t.key})[0];a&&(n()(a,this.$data.branchScriptList.cacheData.filter(function(t){return e===t.key})[0]),a.editable=!0,this.$data.branchScriptList.data=t)},branchAdd:function(e){var t=[].concat(c()(this.$data.branchScriptList.data)).filter(function(t){return e===t.key})[0],a=this.$data.branchScriptList.data.slice(-1);a[0].name&&a[0].syncScript?(t.editable=!0,this.$data.branchScriptList.data=[].concat(c()(this.$data.branchScriptList.data),[{key:(new Date).getTime().toString(),name:"",syncScript:"",asyncScript:""}]),this.$data.branchScriptList.cacheData=JSON.parse(o()(this.$data.branchScriptList.data))):this.$message("请完成新增项填写")},branchDelete:function(e){var t=[].concat(c()(this.$data.branchScriptList.data));this.$data.branchScriptList.data=t.filter(function(t){if(t.key!==e)return t}),0===this.$data.branchScriptList.data.length&&(this.$data.branchScriptList.data=[{key:(new Date).getTime().toString(),name:"",syncScript:"",asyncScript:""}])},editChange:function(e){console.log("change---",e)}}},w=(a("/z6J"),a("XVP5"),a("KHd+")),D=Object(w.a)(F,function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"interface_list"},[a("el-form",{ref:"ruleForm",staticClass:"ruleForm",attrs:{model:e.ruleForm,rules:e.rules,"label-width":"0px"}},[a("a-collapse",{model:{value:e.activeKey,callback:function(t){e.activeKey=t},expression:"activeKey"}},[a("a-collapse-panel",{key:"1",attrs:{header:"基础设置"}},[a("div",{staticClass:"area"},[a("el-form-item",{attrs:{"label-width":"100px",label:"接口名称",prop:"name"}},[a("el-input",{attrs:{type:"input",placeholder:"请输入接口名称"},model:{value:e.ruleForm.name,callback:function(t){e.$set(e.ruleForm,"name",t)},expression:"ruleForm.name"}})],1),e._v(" "),a("el-form-item",[a("el-col",{attrs:{span:11}},[a("el-form-item",{attrs:{"label-width":"100px",label:"请求类型",prop:"request_method_type.activeIndex"}},[a("el-select",{attrs:{placeholder:"请选择请求方法"},model:{value:e.ruleForm.request_method_type.activeIndex,callback:function(t){e.$set(e.ruleForm.request_method_type,"activeIndex",t)},expression:"ruleForm.request_method_type.activeIndex"}},e._l(e.ruleForm.request_method_type.list,function(e){return a("el-option",{key:e.type,attrs:{label:e.text,value:e.type}})}))],1)],1),e._v(" "),a("el-col",{attrs:{span:11}},[a("el-form-item",{attrs:{"label-width":"100px",label:"空间",prop:"spaceData.path"}},[a("el-cascader",{attrs:{props:e.ruleForm.spaceData.props,options:e.ruleForm.spaceData.data,"expand-trigger":"hover",placeholder:"空间选择",filterable:""},model:{value:e.ruleForm.spaceData.path,callback:function(t){e.$set(e.ruleForm.spaceData,"path",t)},expression:"ruleForm.spaceData.path"}})],1)],1)],1),e._v(" "),a("el-form-item",{attrs:{"label-width":"100px",label:"接口URL",prop:"interface_url"}},[a("el-input",{attrs:{placeholder:"请补全接口URL"},model:{value:e.ruleForm.interface_url,callback:function(t){e.$set(e.ruleForm,"interface_url",t)},expression:"ruleForm.interface_url"}},[a("template",{slot:"prepend"},[e._v(e._s(e.ip_info))]),e._v(" "),a("el-button",{directives:[{name:"clipboard",rawName:"v-clipboard:copy",value:e.ip_info+e.ruleForm.interface_url,expression:"ip_info+ruleForm.interface_url",arg:"copy"},{name:"clipboard",rawName:"v-clipboard:success",value:e.copyUrlSuc,expression:"copyUrlSuc",arg:"success"},{name:"clipboard",rawName:"v-clipboard:error",value:e.copyUrlErr,expression:"copyUrlErr",arg:"error"}],attrs:{slot:"append",icon:"el-icon-dxm-charulianjie"},slot:"append"})],2)],1),e._v(" "),a("el-form-item",[a("el-col",{attrs:{span:11}},[a("el-form-item",{attrs:{"label-width":"100px",label:"配置模式",prop:"interface_type.activeIndex"}},[a("el-select",{attrs:{placeholder:"请选择请求方法"},model:{value:e.ruleForm.interface_type.activeIndex,callback:function(t){e.$set(e.ruleForm.interface_type,"activeIndex",t)},expression:"ruleForm.interface_type.activeIndex"}},e._l(e.ruleForm.interface_type.list,function(e){return a("el-option",{key:e.type,attrs:{label:e.text,value:e.type}})}))],1)],1),e._v(" "),a("el-col",{attrs:{span:5}},[a("el-form-item",{attrs:{"label-width":"100px",label:"异步请求"}},[a("el-switch",{model:{value:e.ruleForm.start_async_callback,callback:function(t){e.$set(e.ruleForm,"start_async_callback",t)},expression:"ruleForm.start_async_callback"}})],1)],1),e._v(" "),a("el-col",{attrs:{span:5}},[a("el-form-item",{attrs:{"label-width":"100px",label:"是否启用"}},[a("el-switch",{model:{value:e.ruleForm.start_interface,callback:function(t){e.$set(e.ruleForm,"start_interface",t)},expression:"ruleForm.start_interface"}})],1)],1)],1),e._v(" "),"2"===e.ruleForm.interface_type.activeIndex?a("el-form-item",{attrs:{"label-width":"100px",label:"switch",prop:"branchJumpScript"}},[a("editor",{staticStyle:{border:"1px solid #eceef1"},attrs:{lang:"groovy",theme:"eclipse",width:"100%",height:"100"},on:{init:e.editorInit},model:{value:e.ruleForm.branchJumpScript,callback:function(t){e.$set(e.ruleForm,"branchJumpScript",t)},expression:"ruleForm.branchJumpScript"}})],1):e._e()],1)]),e._v(" "),a("a-collapse-panel",{key:"2",attrs:{disabled:!1,header:"同步响应"}},[a("div",{staticClass:"area"},[a("el-form-item",{attrs:{"label-width":"100px",label:"延时",prop:"sync_delay_time"}},[a("el-input",{attrs:{placeholder:"请输入同步延时时间"},model:{value:e.ruleForm.sync_delay_time,callback:function(t){e.$set(e.ruleForm,"sync_delay_time",t)},expression:"ruleForm.sync_delay_time"}},[a("template",{slot:"append"},[e._v("ms(毫秒)")])],2)],1),e._v(" "),a("el-form-item",{attrs:{"label-width":"100px",label:"响应头"}},[a("div",{staticStyle:{width:"100%",display:"flex"}},[a("a-table",{attrs:{columns:e.header.columns,"data-source":e.header.data,pagination:!1,bordered:""},scopedSlots:e._u([e._l(["name","value"],function(t){return{key:t,fn:function(r,n,i){return[a("div",{key:t},[n.editable?[e._v(e._s(r))]:a("a-input",{key:i,staticStyle:{margin:"-5px 0"},attrs:{value:r},on:{change:function(a){return e.HeaderHandleChange(a.target.value,n.key,t)}}})],2)]}}}),{key:"operation",fn:function(t,r,n){return[a("div",{staticClass:"editable-row-operations"},[r.editable?a("span",[a("el-button",{attrs:{size:"mini",icon:"el-icon-edit",circle:""},on:{click:function(){return e.HeaderEdit(r.key)}}})],1):a("span",[a("a",{on:{click:function(){return e.HeaderSave(r.key)}}},[e._v("保存")]),e._v(" "),a("a-popconfirm",{attrs:{title:"确认取消?","ok-text":"确定","cancel-text":"取消"},on:{confirm:function(){return e.HeaderCancel(r.key)}}},[a("a",[e._v("取消")])])],1),e._v(" "),a("span",[a("el-button",{attrs:{size:"mini",icon:"el-icon-plus",circle:""},on:{click:function(){return e.HeaderAdd(r.key)}}})],1),e._v(" "),e.header.data.length>1?a("span",[a("a-popconfirm",{attrs:{title:"确认删除?","ok-text":"确定","cancel-text":"取消"},on:{confirm:function(){return e.HeaderDelete(r.key)}}},[a("el-button",{attrs:{size:"mini",icon:"el-icon-minus",circle:""}})],1)],1):e._e()])]}}])})],1)]),e._v(" "),"0"===e.ruleForm.interface_type.activeIndex?a("el-form-item",{attrs:{"label-width":"100px",label:"响应内容",prop:"responseBody"}},[a("el-input",{attrs:{rows:4,type:"textarea",placeholder:"请输入响应内容"},model:{value:e.ruleForm.responseBody,callback:function(t){e.$set(e.ruleForm,"responseBody",t)},expression:"ruleForm.responseBody"}})],1):e._e(),e._v(" "),"1"===e.ruleForm.interface_type.activeIndex?a("el-form-item",{attrs:{"label-width":"100px",label:"脚本",prop:"syncScript"}},[a("editor",{staticStyle:{border:"1px solid #eceef1"},attrs:{lang:"groovy",theme:"eclipse",width:"100%",height:"100"},on:{init:e.editorInit},model:{value:e.ruleForm.syncScript,callback:function(t){e.$set(e.ruleForm,"syncScript",t)},expression:"ruleForm.syncScript"}})],1):e._e()],1)]),e._v(" "),e.ruleForm.start_async_callback?a("a-collapse-panel",{key:"3",attrs:{header:"异步响应"}},[a("div",{staticClass:"area"},[a("el-form-item",[a("el-col",{attrs:{span:11}},[a("el-form-item",{attrs:{"label-width":"100px",label:"请求类型",prop:"request_method_type.asyncActiveIndex"}},[a("el-select",{attrs:{placeholder:"请选择请求方法类型"},model:{value:e.ruleForm.request_method_type.asyncActiveIndex,callback:function(t){e.$set(e.ruleForm.request_method_type,"asyncActiveIndex",t)},expression:"ruleForm.request_method_type.asyncActiveIndex"}},e._l(e.ruleForm.request_method_type.list,function(e){return a("el-option",{key:e.type,attrs:{label:e.text,value:e.type}})}))],1)],1),e._v(" "),a("el-col",{attrs:{span:11}},[a("el-form-item",{attrs:{"label-width":"100px",label:"延时",prop:"async_delay_time"}},[a("el-input",{attrs:{placeholder:"请输入异步延时时间"},model:{value:e.ruleForm.async_delay_time,callback:function(t){e.$set(e.ruleForm,"async_delay_time",t)},expression:"ruleForm.async_delay_time"}},[a("template",{slot:"append"},[e._v("ms(毫秒)")])],2)],1)],1)],1),e._v(" "),a("el-form-item",{attrs:{"label-width":"100px",label:"异步URL",prop:"async_interface_url"}},[a("el-input",{attrs:{placeholder:"请输入接口URL"},model:{value:e.ruleForm.async_interface_url,callback:function(t){e.$set(e.ruleForm,"async_interface_url",t)},expression:"ruleForm.async_interface_url"}})],1),e._v(" "),a("el-form-item",{attrs:{"label-width":"100px",label:"响应头"}},[a("div",{staticStyle:{width:"100%",display:"flex"}},[a("a-table",{attrs:{columns:e.header.columns,"data-source":e.header.asyncData,pagination:!1,bordered:""},scopedSlots:e._u([e._l(["name","value"],function(t){return{key:t,fn:function(r,n,i){return[a("div",{key:t},[n.editable?[e._v(e._s(r))]:a("a-input",{key:i,staticStyle:{margin:"-5px 0"},attrs:{value:r},on:{change:function(a){return e.asyncHeaderHandleChange(a.target.value,n.key,t)}}})],2)]}}}),{key:"operation",fn:function(t,r,n){return[a("div",{staticClass:"editable-row-operations"},[r.editable?a("span",[a("el-button",{attrs:{size:"mini",icon:"el-icon-edit",circle:""},on:{click:function(){return e.asyncHeaderEdit(r.key)}}})],1):a("span",[a("a",{on:{click:function(){return e.asyncHeaderSave(r.key)}}},[e._v("保存")]),e._v(" "),a("a-popconfirm",{attrs:{title:"确认取消?","ok-text":"确定","cancel-text":"取消"},on:{confirm:function(){return e.asyncHeaderCancel(r.key)}}},[a("a",[e._v("取消")])])],1),e._v(" "),a("span",[a("el-button",{attrs:{size:"mini",icon:"el-icon-plus",circle:""},on:{click:function(){return e.asyncHeaderAdd(r.key)}}})],1),e._v(" "),e.header.asyncData.length>1?a("span",[a("a-popconfirm",{attrs:{title:"确认删除?","ok-text":"确定","cancel-text":"取消"},on:{confirm:function(){return e.asyncHeaderDelete(r.key)}}},[a("el-button",{attrs:{size:"mini",icon:"el-icon-minus",circle:""}})],1)],1):e._e()])]}}])})],1)]),e._v(" "),"0"===e.ruleForm.interface_type.activeIndex?a("el-form-item",{attrs:{"label-width":"100px",label:"请求内容",prop:"callbackRequestBody"}},[a("el-input",{attrs:{rows:4,type:"textarea",placeholder:"接口返回体"},model:{value:e.ruleForm.callbackRequestBody,callback:function(t){e.$set(e.ruleForm,"callbackRequestBody",t)},expression:"ruleForm.callbackRequestBody"}})],1):e._e(),e._v(" "),"1"===e.ruleForm.interface_type.activeIndex?a("el-form-item",{attrs:{"label-width":"100px",label:"脚本",prop:"asyncScript"}},[a("editor",{staticStyle:{border:"1px solid #eceef1"},attrs:{lang:"groovy",theme:"eclipse",width:"100%",height:"100"},on:{init:e.editorInit},model:{value:e.ruleForm.asyncScript,callback:function(t){e.$set(e.ruleForm,"asyncScript",t)},expression:"ruleForm.asyncScript"}})],1):e._e()],1)]):e._e(),e._v(" "),"2"===e.ruleForm.interface_type.activeIndex?a("a-collapse-panel",{key:"4",attrs:{header:"case-list"}},[a("a-table",{attrs:{columns:e.branchScriptList.columns,"data-source":e.branchScriptList.data,pagination:!1,bordered:""},scopedSlots:e._u([e._l(["name","syncScript","asyncScript"],function(t){return{key:t,fn:function(r,n,i){return[a("div",{key:t},[n.editable?[e._v(e._s(r))]:e._e(),e._v(" "),n.editable||"name"!==t?e._e():a("a-input",{key:i,staticStyle:{margin:"-5px 0"},attrs:{value:r,rows:4,type:"textarea"},on:{change:function(a){return e.branchHandleChange({key:n.key,column:t,value:a.target.value})}}}),e._v(" "),n.editable||"name"===t?e._e():a("editor",{key:i,staticStyle:{border:"1px solid #eceef1"},attrs:{value:r,"v-model":r,param:{key:n.key,column:t},change:e.branchHandleChange,lang:"groovy",theme:"eclipse",width:"100%",height:"100"},on:{init:e.editorInit}})],2)]}}}),{key:"operation",fn:function(t,r,n){return[a("div",{staticClass:"editable-row-operations"},[r.editable?a("span",[a("el-button",{attrs:{size:"mini",icon:"el-icon-edit",circle:""},on:{click:function(){return e.branchEdit(r.key)}}})],1):a("span",[a("a",{on:{click:function(){return e.branchSave(r.key)}}},[e._v("保存")]),e._v(" "),a("a-popconfirm",{attrs:{title:"确认取消?","ok-text":"确定","cancel-text":"取消"},on:{confirm:function(){return e.branchCancel(r.key)}}},[a("a",[e._v("取消")])])],1),e._v(" "),a("span",[a("el-button",{attrs:{size:"mini",icon:"el-icon-plus",circle:""},on:{click:function(){return e.branchAdd(r.key)}}})],1),e._v(" "),e.branchScriptList.data.lenght>1?a("span",[a("a-popconfirm",{attrs:{title:"确认删除?","ok-text":"确定","cancel-text":"取消"},on:{confirm:function(){return e.branchDelete(r.key)}}},[a("el-button",{attrs:{size:"mini",icon:"el-icon-minus",circle:""}})],1)],1):e._e()])]}}])})],1):e._e()],1),e._v(" "),a("el-form-item",{staticStyle:{"margin-top":"20px"}},[a("el-button",{attrs:{disabled:e.submitDisabled,loading:e.submitLoading,type:"primary"},on:{click:function(t){e.submitForm("ruleForm")}}},[e._v(e._s(e.submitText))])],1)],1)],1)},[],!1,null,"9ab61952",null);D.options.__file="edit_interface_tmp.vue";t.a=D.exports}}]);