lepu-test-platform-web/dist/static/js/1.5ea73d8c812e95ec5d67.js

2 lines
106 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

webpackJsonp([1],{"3e4o":function(e,t){},"4C4r":function(e,t){},"6j5T":function(e,t){},"6k33":function(e,t){},"7K47":function(e,t){},ABHT:function(e,t){},Bmfl:function(e,t){},DyIa:function(e,t){},E1AH:function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var s=a("mvHQ"),i=a.n(s),n={data:function(){return{loading:!1,interfaceStatisticChartByCaseNum:{id:"interfaceStatisticChartByCaseNum",title_text:"项目用例统计",trigger:"axis",legend:[],grid:{},xAxis:{name:"",type:"category",data:[]},yAxis:{},series:{name:"",color:"#4285F4",type:"bar",data:[]}},interfaceStatisticChartByExceStatus:{id:"interfaceStatisticChartByExceStatus",title_text:"任务用例统计",trigger:"item",legend:[],xAxis:{name:"",type:"category",data:[]},yAxis:{},series:{name:"",color:"#85C0D9",type:"bar",data:[]}},interfaceStatisticChartByTestTask:{id:"interfaceStatisticChartByTestTask",title_text:"任务执行成功率",trigger:"item",legend:[],grid:{left:"80",top:"80",right:"0",bottom:"0",containLabel:!0},tooltip:{showContent:!1},xAxis:{type:"value",splitLine:{show:!1},axisLabel:{show:!1},axisTick:{show:!1},axisLine:{show:!1}},yAxis:{type:"category",axisTick:{show:!1},axisLine:{show:!1},axisLabel:{color:"black",fontSize:14},data:[]},series:[{name:"",type:"bar",barWidth:19,data:[],color:"#0505F5",label:{show:!0,position:"right",formatter:"{c}%",color:"black",fontSize:12},itemStyle:{normal:{barBorderRadius:10}},zlevel:1},{name:"%",type:"bar",barGap:"-100%",barWidth:19,data:[],color:"#FFFFFF",itemStyle:{normal:{barBorderRadius:10}}}]},colorList:["#4285F4","#EA4335","#FBBC05","#34A853","#85C0D9","#043269","#78C31C","#916B86","#202124","#00818D","#F5EDA7"]}},mounted:function(){var e=this;setTimeout(function(){e.loading=!1,e.drawAllCharts()},800)},beforeCreate:function(){},created:function(){this.loading=!0,this.getAllTestItemCaseNum(),this.getAllTestTaskExecCondition()},methods:{getAllTestTaskExecCondition:function(){var e=this;this.$api.testresult.queryInterfaceTestCaseExecCountAndSuccessNumAndFailNum().then(function(t){var a=t.data.data,s=[],n=[],r=[],o=[],l=[];a.length>5&&(a=a.splice(0,5)),a.forEach(function(e){var t=e.taskName;s.push(t),t.length>10&&(t=t.substring(0,5)+"..."+t.substring(t.length-5)),n.push(t),r.push(e.execScale),l.push(e.caseCount),o.push(100)}),e.interfaceStatisticChartByTestTask.yAxis.data=JSON.parse(i()(n)),e.interfaceStatisticChartByTestTask.series[0].data=JSON.parse(i()(r)),e.interfaceStatisticChartByTestTask.series[1].data=JSON.parse(i()(o)),e.interfaceStatisticChartByExceStatus.xAxis.data=s,e.interfaceStatisticChartByExceStatus.series.data=l}).catch(function(){})},getAllTestItemCaseNum:function(){var e=this,t=[],a=[];this.$api.testresult.queryInterfaceTestCaseNumGroupByItemName().then(function(s){s.data.data.forEach(function(e){t.push(e.itemName),a.push(e.caseNum)}),e.interfaceStatisticChartByCaseNum.xAxis.data=JSON.parse(i()(t)),e.interfaceStatisticChartByCaseNum.series.data=JSON.parse(i()(a))}).catch(function(){})},drawAllCharts:function(){try{var e=this.$echarts.init(document.getElementById(this.interfaceStatisticChartByCaseNum.id));this.setOptionChart(e,this.interfaceStatisticChartByCaseNum);var t=this.$echarts.init(document.getElementById(this.interfaceStatisticChartByExceStatus.id));this.setOptionChart(t,this.interfaceStatisticChartByExceStatus);var a=this.$echarts.init(document.getElementById(this.interfaceStatisticChartByTestTask.id));this.setProgressOptionChart(a,this.interfaceStatisticChartByTestTask),window.onresize=function(){e.resize(),t.resize(),a.resize()}}catch(e){}},setOptionChart:function(e,t){e.showLoading({text:"loading..."}),e.hideLoading(),e.setOption({dataZoom:[{height:24,type:"slider",show:!0,xAxisIndex:[0],start:0,end:100,bottom:5}],title:{text:t.title_text},tooltip:{trigger:t.trigger},itemStyle:{shadowBlur:200,shadowOffsetX:0,shadowOffsetY:0,shadowColor:"rgba(0, 0, 0, 0.5)"},legend:{orient:"horizontal",data:t.legend},xAxis:t.xAxis,yAxis:t.yAxis,series:t.series})},setProgressOptionChart:function(e,t){e.showLoading({text:"loading..."}),e.hideLoading(),e.setOption({dataZoom:[{height:24,type:"slider",show:!0,xAxisIndex:[0],start:0,end:100,bottom:5}],title:{text:t.title_text},tooltip:{show:!0,formatter:function(e){return e.name}},itemStyle:{shadowBlur:200,shadowOffsetX:0,shadowOffsetY:0,shadowColor:"rgba(0, 0, 0, 0.5)"},legend:{orient:"horizontal",data:t.legend},xAxis:t.xAxis,yAxis:t.yAxis,series:t.series})}}},r={render:function(){var e=this.$createElement,t=this._self._c||e;return t("div",{directives:[{name:"loading",rawName:"v-loading",value:this.loading,expression:"loading"}],staticClass:"interface-statistic-box"},[t("el-row",{attrs:{gutter:20}},[t("el-col",{attrs:{span:24}},[t("div",{staticClass:"grid-content bg-purple",attrs:{id:"interfaceStatisticChartByCaseNum"}})])],1),this._v(" "),t("el-row",{attrs:{gutter:20}},[t("el-col",{attrs:{span:24}},[t("div",{staticClass:"grid-content bg-purple",attrs:{id:"interfaceStatisticChartByExceStatus"}})])],1),this._v(" "),t("el-row",{attrs:{gutter:20}},[t("el-col",{attrs:{span:24}},[t("div",{staticClass:"grid-content bg-purple",attrs:{id:"interfaceStatisticChartByTestTask"}})])],1)],1)},staticRenderFns:[]};var o=a("VU/8")(n,r,!1,function(e){a("aGJ5")},"data-v-493089c1",null).exports,l=a("hx1z"),c=a("woOf"),u=a.n(c),d={data:function(){return{noDebug:!0,noDebugNum:0,loading:!1,basicInfo:{id:"",itemId:"",requestType:"",protocolType:"",ipPath:"",port:"",interfacePath:"",interfaceName:"",isSave:!1},requestOptions:[],protocolOptions:[],execEnvOptions:[],execEnvironment:"",defaultCaseId:"",defaultItemId:"",operatorPerson:JSON.parse(localStorage.getItem("userInfo")).nick,basicInfoRules:{protocolType:[{required:!0,message:"请选择协议类型",trigger:"blur"}],requestType:[{required:!0,message:"请选择请求方式",trigger:"blur"}],ipPath:[{required:!0,message:"请输入IP/域名地址",trigger:"blur"},{min:1,max:100,message:"长度在 1 到 100 个字符",trigger:"blur"}],interfaceName:[{required:!0,message:"请输入接口名称",trigger:"blur"},{min:1,max:100,message:"长度在 1 到 50 个字符",trigger:"blur"}]}}},mounted:function(){this.changeNoDebugFlag(!1)},created:function(){this.getRequestType()},destroyed:function(){this.execEnvironment="",this.defaultCaseId="",this.defaultItemId=""},methods:{saveToEnvHandleClick:function(e){this.addOrUpdataInterfaceData(e)},changeNoDebugFlag:function(e){this.noDebug=e,this.noDebugNum+=1,this.$forceUpdate()},clearExecEnvironment:function(){this.execEnvironment=""},changeInterfaceInfoByEnv:function(){var e=this;this.execEnvironment&&this.defaultCaseId?this.$api.testdata.queryInterfaceTestDataById(this.defaultCaseId+"/"+this.execEnvironment).then(function(t){var a=t.data.data;a?(e.defaultCaseId=a.caseId,a.id=e.defaultCaseId,e.$emit("interface-define-basic-info-change-env",a)):(e.$notify({type:"warning",message:"您选择的环境,暂无数据"}),e.execEnvironment="")}).catch(function(){}):this.defaultCaseId&&this.$api.test.queryInterfaceTestCaseById(this.defaultCaseId).then(function(t){var a=t.data.data;a.id=e.defaultCaseId,e.$emit("interface-define-basic-info-change-env",a)}).catch(function(){})},changeInterfaceBasicInfo:function(e){this.isDebug=this.$common.getSessionStorage("isDebug"),this.basicInfo.id=e.id,this.basicInfo.itemId=e.itemId,this.basicInfo.requestType=e.requestType,this.basicInfo.protocolType=e.protocolType,this.basicInfo.ipPath=e.ipPath,this.basicInfo.port=e.port,this.basicInfo.interfacePath=e.interfacePath,this.basicInfo.interfaceName=e.interfaceName,this.defaultCaseId=this.basicInfo.id},addOrUpdataInterfaceData:function(e){this.basicInfo.addOrUpdataInterfaceData=!0,this.basicInfo.envCode=e,this.basicInfo.itemId=this.$common.getSessionStorage("currentInterfaceCaseItemId"),this.basicInfo.createTime=(new Date).getTime(),this.basicInfo.updateTime=(new Date).getTime(),this.basicInfo.createPerson=this.operatorPerson,this.basicInfo.updatePerson=this.operatorPerson,this.$emit("interface-define-basic-info-test",this.basicInfo)},sendRequestOrSaveTestCase:function(e){var t=this;this.$refs.basicInfoRef.validate(function(a){a&&(t.basicInfo.itemId||(t.basicInfo.itemId=1),t.execEnvironment&&e?t.addOrUpdataInterfaceData(t.execEnvironment):(t.basicInfo.isSave=e,t.basicInfo.addOrUpdataInterfaceData=!1,t.basicInfo.id=t.defaultCaseId,t.$emit("interface-define-basic-info-test",t.basicInfo)))})},getRequestType:function(){var e=this;this.$api.dict.queryAllDataDict().then(function(t){e.requestOptions=t.data.data.requestType,e.protocolOptions=t.data.data.protocolType,e.execEnvOptions=t.data.data.environment}).catch(function(){})}}},f={render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"}],staticClass:"interface-define-base-info"},[a("div",{staticClass:"define-base-info interface-define base-body"},[e._m(0),e._v(" "),a("div",{staticClass:"interface-define-body case-info-form"},[a("el-form",{ref:"basicInfoRef",attrs:{model:e.basicInfo,rules:e.basicInfoRules,"label-width":"100px"}},[a("el-row",[a("el-col",{attrs:{span:6}},[a("el-form-item",{attrs:{label:"协议类型",prop:"protocolType"}},[a("el-select",{attrs:{placeholder:"请选择",clearable:""},model:{value:e.basicInfo.protocolType,callback:function(t){e.$set(e.basicInfo,"protocolType",t)},expression:"basicInfo.protocolType"}},e._l(e.protocolOptions,function(e){return a("el-option",{key:e.id,attrs:{label:e.dictValue,value:e.dictCode}})}),1)],1)],1),e._v(" "),a("el-col",{attrs:{span:6}},[a("el-form-item",{attrs:{label:"请求方式",prop:"requestType"}},[a("el-select",{attrs:{placeholder:"请选择",clearable:""},model:{value:e.basicInfo.requestType,callback:function(t){e.$set(e.basicInfo,"requestType",t)},expression:"basicInfo.requestType"}},e._l(e.requestOptions,function(e){return a("el-option",{key:e.id,attrs:{label:e.dictValue,value:e.dictCode}})}),1)],1)],1),e._v(" "),a("el-col",{attrs:{span:7}},[a("el-form-item",{attrs:{label:"IP/域名",prop:"ipPath"}},[a("el-input",{attrs:{type:"text",placeholder:"请输入IP/域名地址",clearable:""},model:{value:e.basicInfo.ipPath,callback:function(t){e.$set(e.basicInfo,"ipPath",t)},expression:"basicInfo.ipPath"}})],1)],1),e._v(" "),a("el-col",{attrs:{span:5}},[a("el-form-item",{attrs:{label:"端口号"}},[a("el-input",{staticClass:"port-class",attrs:{type:"text",placeholder:"请输入端口号",clearable:""},model:{value:e.basicInfo.port,callback:function(t){e.$set(e.basicInfo,"port",t)},expression:"basicInfo.port"}})],1)],1)],1),e._v(" "),a("el-row",[a("el-col",{attrs:{span:6}},[a("el-form-item",{attrs:{label:"接口名称",prop:"interfaceName"}},[a("el-input",{attrs:{type:"text",placeholder:"请输入接口名称",clearable:""},model:{value:e.basicInfo.interfaceName,callback:function(t){e.$set(e.basicInfo,"interfaceName",t)},expression:"basicInfo.interfaceName"}})],1)],1),e._v(" "),a("el-col",{attrs:{span:8}},[a("el-form-item",{attrs:{label:"接口地址"}},[a("el-input",{attrs:{type:"text",placeholder:"请输入接口地址",clearable:""},model:{value:e.basicInfo.interfacePath,callback:function(t){e.$set(e.basicInfo,"interfacePath",t)},expression:"basicInfo.interfacePath"}})],1)],1),e._v(" "),e.noDebug?a("div",{key:e.noDebugNum,staticClass:"no-debug-class"},[a("el-col",{attrs:{span:5}},[a("el-form-item",{attrs:{label:"选择环境",prop:""}},[a("el-select",{attrs:{placeholder:"请选择",clearable:""},on:{change:e.changeInterfaceInfoByEnv},model:{value:e.execEnvironment,callback:function(t){e.execEnvironment=t},expression:"execEnvironment"}},e._l(e.execEnvOptions,function(e){return a("el-option",{key:e.id,attrs:{label:e.dictValue,value:e.dictCode}})}),1)],1)],1)],1):e._e(),e._v(" "),a("el-col",{attrs:{span:5}},[a("el-form-item",[a("el-dropdown",[a("el-button",{attrs:{type:"primary"},on:{click:function(t){return e.sendRequestOrSaveTestCase(!1)}}},[e._v("测试")]),e._v(" "),a("el-dropdown-menu")],1),e._v(" "),a("el-dropdown",{attrs:{"split-button":!0},on:{click:function(t){return e.sendRequestOrSaveTestCase(!0)},command:e.saveToEnvHandleClick}},[e._v("\n 保存\n "),a("el-dropdown-menu",{attrs:{slot:"dropdown"},slot:"dropdown"},e._l(e.execEnvOptions,function(t){return a("div",{key:t.id},[a("el-dropdown-item",{attrs:{command:t.dictCode}},[e._v(e._s(t.dictValue))])],1)}),0)],1)],1)],1)],1)],1)],1)])])},staticRenderFns:[function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticClass:"interface-define-title base-info-title"},[t("span",[this._v("|")]),this._v("\n 基本信息\n ")])}]};var p=a("VU/8")(d,f,!1,function(e){a("IvLD")},"data-v-5a94a32a",null).exports,m={data:function(){return{activeName:"responseBody",responseInfo:{statusCode:"",responseHeader:"",responseContent:""},assertResult:""}},props:{},watch:{},methods:{changeInterfaceResponseInfo:function(e){this.responseInfo.statusCode="",this.responseInfo.responseHeader="",this.responseInfo.responseContent="",this.assertResult=""},formatJsonData:function(){if(this.responseInfo.responseContent)try{this.responseInfo.responseContent=i()(JSON.parse(this.responseInfo.responseContent),null,4)}catch(e){this.$notify({type:"error",message:"JSON格式化错误请检查!"})}},setResponseInfo:function(e,t){var a=this;this.responseInfo.statusCode="",this.responseInfo.responseHeader="",this.responseInfo.responseContent="",this.assertResult="";try{if(e.data.msg){this.responseInfo.responseContent=e.data.msg;try{var s=JSON.parse(e.data.msg);this.responseInfo.statusCode=s.status}catch(t){this.responseInfo.statusCode=e.status}}else e.data?(this.responseInfo.responseContent=e.data.toString(),this.responseInfo.statusCode=e.status):(this.responseInfo.responseContent=e.toString(),this.responseInfo.statusCode=e.status)}catch(t){this.responseInfo.responseContent=e.toString(),this.responseInfo.statusCode=e.status}this.responseInfo.responseHeader=i()(e.headers),t?this.$api.test.queryInterfaceTestCaseById(t).then(function(e){var t=e.data.data,s=t.assertResult?"断言结果:"+t.assertResult:"",i=t.errorCause?"\n错误原因"+t.errorCause:"";a.assertResult=s+i}).catch(function(){}):this.$api.test.getInterfaceRequestResult().then(function(e){var t=e.data.data,s=t.assertResult?"断言结果:"+t.assertResult:"",i=t.errorCause?"\n错误原因"+t.errorCause:"";a.assertResult=s+i})},getResponseInfo:function(){return this.responseInfo},handleClick:function(){}}},h={render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"define-response-info interface-define body-bottom"},[e._m(0),e._v(" "),a("div",{staticClass:"interface-define-body"},[a("el-tabs",{on:{"tab-click":e.handleClick},model:{value:e.activeName,callback:function(t){e.activeName=t},expression:"activeName"}},[a("el-tab-pane",{attrs:{label:"响应体",name:"responseBody"}},[a("div",{staticClass:"raw-area"},[a("el-input",{attrs:{type:"textarea",rows:10,placeholder:""},nativeOn:{keyup:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.formatJsonData(t)}},model:{value:e.responseInfo.responseContent,callback:function(t){e.$set(e.responseInfo,"responseContent",t)},expression:"responseInfo.responseContent"}})],1)]),e._v(" "),a("el-tab-pane",{attrs:{label:"响应头",name:"responseHeader"}},[a("div",{staticClass:"raw-area"},[a("el-input",{attrs:{type:"textarea",rows:10,placeholder:""},model:{value:e.responseInfo.responseHeader,callback:function(t){e.$set(e.responseInfo,"responseHeader",t)},expression:"responseInfo.responseHeader"}})],1)]),e._v(" "),a("el-tab-pane",{attrs:{label:"状态码",name:"statusCode"}},[a("div",{staticClass:"raw-area"},[a("el-input",{attrs:{type:"textarea",rows:10,placeholder:""},model:{value:e.responseInfo.statusCode,callback:function(t){e.$set(e.responseInfo,"statusCode",t)},expression:"responseInfo.statusCode"}})],1)]),e._v(" "),a("el-tab-pane",{attrs:{label:"断言结果",name:"assertResult"}},[a("div",{staticClass:"assert-result-area"},[a("el-input",{attrs:{type:"textarea",rows:10,placeholder:""},model:{value:e.assertResult,callback:function(t){e.assertResult=t},expression:"assertResult"}})],1)])],1)],1)])},staticRenderFns:[function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticClass:"interface-define-title"},[t("span",[this._v("|")]),this._v("\n 响应信息\n ")])}]};var v=a("VU/8")(m,h,!1,function(e){a("SMnT")},"data-v-4042cc78",null).exports,b={data:function(){return{activeName:"raw",requestBody:{requestParamsList:{items:[{keys:"",value:""}]},raw_textarea:"",xWwwFormUrlencodedList:{items:[{keys:"",value:""}]},formDataList:{items:[{keys:"",value:""}]},binaryList:{items:[{keys:"",value:""}]}}}},methods:{changeRequestBody:function(e){var t=this;if(e){this.requestBody.raw_textarea=e.requestBody;var a=e.requestParams;if(a){"?"==a.slice(0,1)&&(a=a.slice(1));var s=a.split("&");this.requestBody.requestParamsList.items=[],s.forEach(function(e){var a=e.split("="),s={keys:a[0],value:a[1],key:Math.random()};t.requestBody.requestParamsList.items.push(s)})}else this.requestBody.requestParamsList.items=[],this.addItem(this.requestBody.requestParamsList.items)}else this.requestBody.raw_textarea="",this.requestBody.requestParamsList.items=[],this.requestBody.xWwwFormUrlencodedList.items=[],this.requestBody.formDataList.items=[],this.requestBody.binaryList.items=[],this.addItem(this.requestBody.requestParamsList.items),this.addItem(this.requestBody.xWwwFormUrlencodedList.items),this.addItem(this.requestBody.formDataList.items),this.addItem(this.requestBody.binaryList.items)},addItem:function(e){e.push({keys:"",value:""})},handleClick:function(){},formatJsonData:function(){if(this.requestBody.raw_textarea)try{this.requestBody.raw_textarea=i()(JSON.parse(this.requestBody.raw_textarea),null,4)}catch(e){this.$notify({type:"error",message:"JSON格式化错误请检查!"})}},removeRequestParamsList:function(e){var t=this.requestBody.requestParamsList.items.indexOf(e);-1!==t&&this.requestBody.requestParamsList.items.splice(t,1)},addRequestParamsList:function(){this.requestBody.requestParamsList.items.push({keys:"",value:"",key:Date.now()})},removeXWwwFormUrlencodedList:function(e){var t=this.requestBody.xWwwFormUrlencodedList.items.indexOf(e);-1!==t&&this.requestBody.xWwwFormUrlencodedList.items.splice(t,1)},addXWwwFormUrlencodedList:function(){this.requestBody.xWwwFormUrlencodedList.items.push({keys:"",value:"",key:Date.now()})},removeFormDataList:function(e){var t=this.requestBody.formDataList.items.indexOf(e);-1!==t&&this.requestBody.formDataList.items.splice(t,1)},addFormDataList:function(){this.requestBody.formDataList.items.push({keys:"",value:"",key:Date.now()})},removeBinaryList:function(e){var t=this.requestBody.binaryList.items.indexOf(e);-1!==t&&this.requestBody.binaryList.items.splice(t,1)},addBinaryList:function(){this.requestBody.binaryList.items.push({keys:"",value:"",key:Date.now()})}}},g={render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"define-request-info-body"},[a("el-tabs",{on:{"tab-click":e.handleClick},model:{value:e.activeName,callback:function(t){e.activeName=t},expression:"activeName"}},[a("el-tab-pane",{attrs:{label:"raw",name:"raw"}},[a("div",{staticClass:"raw-area"},[a("el-input",{attrs:{type:"textarea",rows:8,placeholder:""},nativeOn:{keyup:function(t){return!t.type.indexOf("key")&&e._k(t.keyCode,"enter",13,t.key,"Enter")?null:e.formatJsonData(t)}},model:{value:e.requestBody.raw_textarea,callback:function(t){e.$set(e.requestBody,"raw_textarea",t)},expression:"requestBody.raw_textarea"}})],1)]),e._v(" "),a("el-tab-pane",{attrs:{label:"param",name:"params"}},[a("el-form",{ref:"requestParamsFormRef",attrs:{model:e.requestBody.requestParamsList}},e._l(e.requestBody.requestParamsList.items,function(t,s){return a("el-row",{key:t.key,attrs:{gutter:20}},[a("el-col",{attrs:{span:6}},[a("el-form-item",{attrs:{prop:"items."+s+".keys"}},[a("el-input",{attrs:{placeholder:"请输入key",clearable:""},model:{value:t.keys,callback:function(a){e.$set(t,"keys",a)},expression:"item.keys"}})],1)],1),e._v(" "),a("el-col",{attrs:{span:16}},[a("el-form-item",{attrs:{prop:"items."+s+".value"}},[a("el-input",{attrs:{placeholder:"请输入value",clearable:""},model:{value:t.value,callback:function(a){e.$set(t,"value",a)},expression:"item.value"}})],1)],1),e._v(" "),a("el-col",{attrs:{span:2}},[a("div",{staticClass:"add-del-param-btn"},[1!==e.requestBody.requestParamsList.items.length?a("el-tag",{staticClass:"line-add-del",attrs:{type:"danger"},on:{click:function(a){return e.removeRequestParamsList(t)}}},[e._v("-")]):e._e(),e._v(" "),a("el-tag",{staticClass:"line-add-del",attrs:{type:"danger"},on:{click:e.addRequestParamsList}},[e._v("+")])],1)])],1)}),1)],1),e._v(" "),e._e(),e._v(" "),e._e(),e._v(" "),e._e()],1)],1)},staticRenderFns:[]};var y=a("VU/8")(b,g,!1,function(e){a("ABHT")},"data-v-485ab872",null).exports,I={data:function(){return{activeName:"preScript",scriptInfo:{preScript_textarea:"",posScript_textarea:"",preSql_textarea:"",posSql_textarea:""}}},props:{interfaceScriptInfo:Object},watch:{interfaceScriptInfo:"changeScriptInfo"},methods:{handleClick:function(){},changeScriptInfo:function(){this.scriptInfo=this.interfaceScriptInfo}}},k={render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"define-request-params-other-set"},[a("el-tabs",{on:{"tab-click":e.handleClick},model:{value:e.activeName,callback:function(t){e.activeName=t},expression:"activeName"}},[a("el-tab-pane",{attrs:{label:"前置脚本",name:"preScript"}},[a("div",{staticClass:"pre-script-area"},[a("el-input",{attrs:{type:"textarea",rows:7,placeholder:"请输入前置脚本现仅支持Java"},model:{value:e.scriptInfo.preScript_textarea,callback:function(t){e.$set(e.scriptInfo,"preScript_textarea",t)},expression:"scriptInfo.preScript_textarea"}})],1)]),e._v(" "),a("el-tab-pane",{attrs:{label:"后置脚本",name:"posScript"}},[a("div",{staticClass:"pos-script-area"},[a("el-input",{attrs:{type:"textarea",rows:7,placeholder:"请输入后置脚本现仅支持Java"},model:{value:e.scriptInfo.posScript_textarea,callback:function(t){e.$set(e.scriptInfo,"posScript_textarea",t)},expression:"scriptInfo.posScript_textarea"}})],1)]),e._v(" "),a("el-tab-pane",{attrs:{label:"前置SQL",name:"preSql"}},[a("div",{staticClass:"pre-sql-area"},[a("el-input",{attrs:{type:"textarea",rows:7,placeholder:"请输入前置SQL"},model:{value:e.scriptInfo.preSql_textarea,callback:function(t){e.$set(e.scriptInfo,"preSql_textarea",t)},expression:"scriptInfo.preSql_textarea"}})],1)]),e._v(" "),a("el-tab-pane",{attrs:{label:"后置SQL",name:"posSql"}},[a("div",{staticClass:"pos-sql-area"},[a("el-input",{attrs:{type:"textarea",rows:7,placeholder:"请输入后置SQL"},model:{value:e.scriptInfo.posSql_textarea,callback:function(t){e.$set(e.scriptInfo,"posSql_textarea",t)},expression:"scriptInfo.posSql_textarea"}})],1)])],1)],1)},staticRenderFns:[]};var _={render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"define-request-params-relation"},[a("div",{staticClass:"relation-field-area"},[a("el-input",{attrs:{type:"textarea",rows:10,placeholder:"多个以逗号隔开name,age,code 或者 name:myName,age:myAge,code"},model:{value:e.relationValues,callback:function(t){e.relationValues=t},expression:"relationValues"}})],1)])},staticRenderFns:[]};var w={render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"define-request-params-assert"},[a("div",[a("el-input",{attrs:{placeholder:"多个以逗号隔开",clearable:""},model:{value:e.assertInfo.assertField,callback:function(t){e.$set(e.assertInfo,"assertField",t)},expression:"assertInfo.assertField"}},[a("template",{slot:"prepend"},[e._v("断言字段")])],2)],1),e._v(" "),a("br"),e._v(" "),a("div",[a("el-input",{attrs:{placeholder:"多个以逗号隔开",clearable:""},model:{value:e.assertInfo.expectResult,callback:function(t){e.$set(e.assertInfo,"expectResult",t)},expression:"assertInfo.expectResult"}},[a("template",{slot:"prepend"},[e._v("预期结果")])],2)],1)])},staticRenderFns:[]};var C={components:{InterfaceDefineParamInfoRequestBody:y,InterfaceDefineParamInfoScript:a("VU/8")(I,k,!1,function(e){a("iMuj")},"data-v-e6ef200c",null).exports,InterfaceDefineParamInfoRelation:a("VU/8")({data:function(){return{relationValues:""}},methods:{changeRelationInfo:function(e){this.relationValues=e}}},_,!1,function(e){a("LsBy")},"data-v-42104a1a",null).exports,InterfaceDefineParamInfoAssert:a("VU/8")({data:function(){return{assertInfo:{assertField:"",expectResult:""}}},methods:{changeAssertInfo:function(e){this.assertInfo=e}}},w,!1,function(e){a("Bmfl")},"data-v-750cddb1",null).exports},data:function(){return{activeName:"requestHeader",requestHeadersList:{items:[{keys:"",value:""}]},requestBodyInfo:{requestParams:"",requestBody:""},assertInfo:{assertField:"",expectResult:""},relationInfo:"",scriptInfo:{}}},mounted:function(){},methods:{openTips:function(){this.$alert("${lp69Code} 69码<br>${lpRandomUUID} UUID<br>${lpCurrentDateTime} 当前时间<br>${lpCurrentTimestamp} 当前时间戳<br>${lpRandomString} 17位随机字符串<br>${lpTodayStartTime} 今日开始时间<br>${lpTodayEndTime} 今日结束时间<br>${lpYesterdayStartTime} 昨日开始时间<br>${lpYesterdayEndTime} 昨日结束时间","内置变量",{dangerouslyUseHTMLString:!0}).catch(function(){})},changeInterfaceParamInfo:function(e){var t=this;this.requestBodyInfo.requestParams=e.requestParams,this.requestBodyInfo.requestBody=e.requestBody,this.assertInfo.assertField=e.assertField,this.assertInfo.expectResult=e.expectResult,this.$refs.requestBody.changeRequestBody(this.requestBodyInfo),this.$refs.assert.changeAssertInfo(this.assertInfo),this.$refs.relation.changeRelationInfo(e.relationValues);var a=e.requestHeaders;if(a){var s=a.replace(/"/g,"").replace("{","").replace("",",").replace(/,\s*/g,","),i=s.slice(0,s.length-1).split(",");this.requestHeadersList.items=[],i.forEach(function(e){var a=e.split(":"),s={};s.keys=a[0],s.value=a[1],s.key=Math.random(),t.requestHeadersList.items.push(s)})}else{this.requestHeadersList.items=[];this.requestHeadersList.items.push({keys:"",value:""})}},handleClick:function(){},getInterfaceDefineParamInfo:function(){var e={};return e.requestHeaders=this.requestHeadersList.items,e.requestParams=this.$refs.requestBody.requestParams,e.requestBody=this.$refs.requestBody.requestBody,e.assertInfo=this.$refs.assert.assertInfo,e.relationValues=this.$refs.relation.relationValues,e},removeRequestHeadersList:function(e){var t=this.requestHeadersList.items.indexOf(e);-1!==t&&this.requestHeadersList.items.splice(t,1)},addRequestHeadersList:function(){this.requestHeadersList.items.push({keys:"",value:"",key:Date.now()})}}},x={render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"define-request-info interface-define body-bottom"},[a("div",{staticClass:"interface-define-title"},[a("span",[e._v("|")]),e._v("\n 参数信息\n "),a("span",{staticClass:"friend_tips",on:{click:e.openTips}},[e._v("?")])]),e._v(" "),a("div",{staticClass:"interface-define-body"},[a("el-tabs",{on:{"tab-click":e.handleClick},model:{value:e.activeName,callback:function(t){e.activeName=t},expression:"activeName"}},[a("el-tab-pane",{attrs:{label:"请求头",name:"requestHeader"}},[a("el-form",{ref:"requestHeadersFormRef",attrs:{model:e.requestHeadersList}},e._l(e.requestHeadersList.items,function(t,s){return a("el-row",{key:t.key,attrs:{gutter:20}},[a("el-col",{attrs:{span:6}},[a("el-form-item",{attrs:{prop:"items."+s+".keys"}},[a("el-input",{attrs:{placeholder:"请输入key",clearable:""},model:{value:t.keys,callback:function(a){e.$set(t,"keys",a)},expression:"item.keys"}})],1)],1),e._v(" "),a("el-col",{attrs:{span:16}},[a("el-form-item",{attrs:{prop:"items."+s+".value"}},[a("el-input",{attrs:{placeholder:"请输入value",clearable:""},model:{value:t.value,callback:function(a){e.$set(t,"value",a)},expression:"item.value"}})],1)],1),e._v(" "),a("el-col",{attrs:{span:2}},[a("div",{staticClass:"add-del-param-btn"},[1!==e.requestHeadersList.items.length?a("el-tag",{staticClass:"line-add-del",attrs:{type:"danger"},on:{click:function(a){return e.removeRequestHeadersList(t)}}},[e._v("-")]):e._e(),e._v(" "),a("el-tag",{staticClass:"line-add-del",attrs:{type:"danger"},on:{click:e.addRequestHeadersList}},[e._v("+")])],1)])],1)}),1)],1),e._v(" "),a("el-tab-pane",{attrs:{label:"请求体",name:"body"}},[a("interface-define-param-info-request-body",{ref:"requestBody",attrs:{interfaceRequestBody:e.requestBodyInfo}})],1),e._v(" "),a("el-tab-pane",{attrs:{label:"断言",name:"assert"}},[a("interface-define-param-info-assert",{ref:"assert",attrs:{interfaceAssertInfo:e.assertInfo}})],1),e._v(" "),a("el-tab-pane",{attrs:{label:"关联",name:"relation"}},[a("interface-define-param-info-relation",{ref:"relation",attrs:{interfaceRelationInfo:e.relationInfo}})],1),e._v(" "),e._e()],1)],1)])},staticRenderFns:[]};var T={components:{InterfaceDefineParamInfo:a("VU/8")(C,x,!1,function(e){a("7K47")},"data-v-18f3e2b1",null).exports,InterfaceDefineResponseInfo:v,InterfaceDefineBasicInfo:p},props:{interfaceDefine:Object},watch:{interfaceDefine:"changeInterfaceInfo"},data:function(){return{loading:!1,interfaceCaseResponseInfo:{},interfaceCaseParamInfo:{},interfaceCaseBasicInfo:{}}},computed:{},mounted:function(){},methods:{getRequestBackInfo:function(e){this.$refs.responseInfo.setResponseInfo(e,this.interfaceCaseBasicInfo.id),this.loading=!1},changeInterfaceInfo:function(e){e&&(this.loading=!0,this.interfaceCaseBasicInfo.id=e.id,this.interfaceCaseBasicInfo.itemId=e.itemId,this.interfaceCaseBasicInfo.protocolType=e.protocolType,this.interfaceCaseBasicInfo.requestType=e.requestType,this.interfaceCaseBasicInfo.ipPath=e.ipPath,this.interfaceCaseBasicInfo.port=e.port,this.interfaceCaseBasicInfo.interfacePath=e.interfacePath,this.interfaceCaseBasicInfo.interfaceName=e.interfaceName,e.envCode||this.$refs.basicInfo.clearExecEnvironment(),this.$refs.basicInfo.changeInterfaceBasicInfo(this.interfaceCaseBasicInfo),this.interfaceCaseParamInfo.requestHeaders=e.requestHeader,this.interfaceCaseParamInfo.requestParams=e.requestParams,this.interfaceCaseParamInfo.requestBody=e.requestBody,this.interfaceCaseParamInfo.assertField=e.assertField,this.interfaceCaseParamInfo.expectResult=e.expectResult,this.interfaceCaseParamInfo.assertResult=e.assertResult,this.interfaceCaseParamInfo.relationValues=e.relationValues,this.$refs.paramInfo.changeInterfaceParamInfo(this.interfaceCaseParamInfo),this.interfaceCaseResponseInfo.responseInfo=e.backParams,this.$refs.responseInfo.changeInterfaceResponseInfo(this.interfaceCaseResponseInfo),this.loading=!1,this.$refs.basicInfo.changeNoDebugFlag(!0))},testInterfaceCase:function(e){var t=this,a=this.$refs.paramInfo.getInterfaceDefineParamInfo(),s={};s.assertField=a.assertInfo.assertField,s.expectResult=a.assertInfo.expectResult,s.assertResult=a.assertInfo.assertResult,s.relationValues=a.relationValues,s.requestBody=a.requestBody.raw_textarea;var n=a.requestHeaders,r=a.requestBody.requestParamsList.items;if(n&&""!=n[0].keys&&(s.requestHeader=this.parseListItemsBackJsonString(n)),r&&""!=r[0].keys){var o="?";r.forEach(function(e){o+=e.keys,o+="=",o+=e.value,o+="&"}),s.requestParams=o.slice(0,o.length-1)}var l={};(l=u()(l,e,s)).definePage=!0,e.addOrUpdataInterfaceData?(l.caseId=l.id,this.$api.testdata.insertInterfaceTestData(i()(l)).then(function(e){t.$notify({type:"success",message:e.data.msg})}).catch(function(){})):e.isSave?this.$emit("interface-case-update-event",l):(this.$emit("interface-case-request-event",l),this.loading=!0)},parseListItemsBackJsonString:function(e){var t="{";return e.forEach(function(e){t+='"',t+=e.keys,t+='":"',t+=e.value,t+='",'}),(t+="}").replace(/,}/g,"}")}}},q={render:function(){var e=this.$createElement,t=this._self._c||e;return t("div",{directives:[{name:"loading",rawName:"v-loading",value:this.loading,expression:"loading"}],staticClass:"interface-define-base-info"},[t("interface-define-basic-info",{ref:"basicInfo",on:{"interface-define-basic-info-test":this.testInterfaceCase,"interface-define-basic-info-change-env":this.changeInterfaceInfo}}),this._v(" "),t("interface-define-param-info",{ref:"paramInfo"}),this._v(" "),t("interface-define-response-info",{ref:"responseInfo"})],1)},staticRenderFns:[]};var S=a("VU/8")(T,q,!1,function(e){a("vLxd")},"data-v-4c4f92e9",null).exports,F={data:function(){return{menuTreeList:[],defaultShowNodes:[],defaultExpandNodes:[],defaultProps:{children:"children",label:"label"},notDataText:"暂无数据",loadDataText:"加载中...",loading:!0,iconCloseStyle:"el-icon-folder",iconOpenStyle:"el-icon-folder-opened"}},created:function(){this.getAllInterfaceTestItem()},mounted:function(){},methods:{getAllInterfaceTestItem:function(){var e=this;this.loading=!0,this.$api.test.queryAllInterfaceTestItem().then(function(t){e.menuTreeList=t.data.data,e.$nextTick(function(){e.$refs.menuTreeRef.setCurrentKey(e.menuTreeList[0].id)}),e.defaultExpandNodes.push(e.menuTreeList[0].id),e.loading=!1}).catch(function(){e.loading=!1})},changeFolderStyle:function(e){if(!e.itemName){var t=document.getElementById(this.iconCloseStyle+e.id);t.className=t.className==this.iconCloseStyle?this.iconOpenStyle:this.iconCloseStyle}},clickCurrentNode:function(e){var t={id:"",flag:!1};0==e.id?(t.id=e.id,this.$emit("interface-menu-event",t)):e.itemName?(this.$common.setSessionStorage("currentInterfaceCaseItemId",e.itemId),t.id=e.id,t.flag=!0,this.$emit("interface-menu-event",t)):(this.$common.setSessionStorage("currentInterfaceCaseItemId",e.id),t.id=e.id,this.$emit("interface-menu-event",t))}},watch:{menuTreeList:{handler:function(){var e=this;this.menuTreeList.forEach(function(t){e.defaultShowNodes.push(t.id)})},deep:!0}}},$={render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"interface-menu-list"},[a("div",{staticClass:"custom-tree-container"},[a("div",{staticClass:"tree-menu"},[a("el-tree",{directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"}],ref:"menuTreeRef",attrs:{data:e.menuTreeList,props:e.defaultProps,"highlight-current":!0,"expand-on-click-node":!0,"default-checked-keys":e.defaultShowNodes,"empty-text":e.notDataText,"element-loading-text":e.loadDataText,"default-expanded-keys":e.defaultExpandNodes,accordion:!1,"node-key":"id","render-after-expand":""},on:{"node-click":e.clickCurrentNode,"node-expand":e.changeFolderStyle,"node-collapse":e.changeFolderStyle},scopedSlots:e._u([{key:"default",fn:function(t){var s=t.node,i=t.data;return a("div",{staticClass:"label-name custom-tree-node"},[a("div",{staticClass:"label-name-left"},["所有用例"==s.label?a("i",{class:e.iconOpenStyle,attrs:{id:e.iconCloseStyle+i.id}},[e._v("\n "+e._s(s.label)+"\n ")]):"所有用例"!=s.label&&void 0==i.itemName?a("i",{class:e.iconCloseStyle,attrs:{id:e.iconCloseStyle+i.id}},[e._v("\n "+e._s(s.label)+"\n ")]):a("i",{staticClass:"el-icon-position interface-name-icon"},[e._v("\n "+e._s(s.label)+"\n ")])])])}}])})],1)])])},staticRenderFns:[]};var R=a("VU/8")(F,$,!1,function(e){a("6j5T")},"data-v-181e2363",null).exports,L={data:function(){return{loading:!1,fileType:["xlsx","json"],add_value:!1,testDomain:[],testPort:[],itemOptions:[],protocolOptions:[],requestOptions:[],taskOptions:[],joinTimingTaskForm:{taskId:""},editForm:{},detailForm:{},queryInfo:{pageNum:1,pageSize:10,itemId:"",interfaceName:"",interfacePath:"",testPerson:"",testCaseStatus:"",writePerson:"",comments:""},operatorPerson:JSON.parse(localStorage.getItem("userInfo")).nick,testCaseList:[],currpage:1,total:0,importDialogVisible:!1,addDialogVisible:!1,editDialogVisible:!1,detailDialogVisible:!1,joinTimingTaskDialogVisible:!1,requestResultDialogVisible:!1,environmentVariableVisible:!1,environmentVariableList:[],requestBackInfo:"",multipleSelection:[],caseTypeOptions:[],caseLevelOptions:[],caseStatusOptions:[],caseExecLevelOptions:[],addForm:{itemId:"",testMode:"",testCaseLevel:"P0",requestType:"GET",protocolType:"HTTP",interfaceName:"",testCaseStatus:"新建",writePerson:"",interfacePath:"",relationValues:"",requestHeader:"",requestParams:"",requestBody:"",expectResult:"",ipPath:"",port:"",assertField:"",sheetName:"",comments:""},basicInfoShowFlag:!1,listShowFlag:!0,interfaceInfoObj:{},cycleInterfaceRequestDialogVisible:!1,cycleRequest:{requestNumber:""},addFormRules:{itemId:[{required:!0,message:"请选择测试项目",trigger:"blur"}],testCaseStatus:[{required:!0,message:"请输入测试模块名称",trigger:"blur"}],protocolType:[{required:!0,message:"请选择协议类型",trigger:"blur"}],requestType:[{required:!0,message:"请选择请求类型",trigger:"blur"}],testCaseLevel:[{required:!0,message:"请选择用例等级",trigger:"blur"}],interfaceName:[{required:!0,message:"请输入接口名称",trigger:"blur"},{min:1,max:50,message:"长度在 1 到 50 个字符",trigger:"blur"}],interfacePath:[{required:!0,message:"请输入接口地址",trigger:"blur"},{min:1,max:200,message:"长度在 1 到 200 个字符",trigger:"blur"}],relationValues:[{required:!1,message:"请输入关联参数(多个值以逗号隔开)",trigger:"blur"},{min:1,max:100,message:"长度在 1 到 100 个字符",trigger:"blur"}],ipPath:[{required:!0,message:"请输入IP/域名地址",trigger:"blur"},{min:1,max:100,message:"长度在 1 到 100 个字符",trigger:"blur"}],port:[{required:!1,message:"请输入端口号",trigger:"blur"},{min:0,max:6,message:"长度在 0 到 6 个字符",trigger:"blur"}],assertField:[{required:!1,message:"请输入断言字段(多个值以逗号隔开)",trigger:"blur"},{min:0,max:50,message:"长度在 0 到 50 个字符",trigger:"blur"}],requestHeader:[{required:!1,message:"请输入请求头",trigger:"blur"}],requestParams:[{required:!1,message:"请输入请求参数",trigger:"blur"}],expectResult:[{required:!1,message:"请输入预期结果(多个值以逗号隔开)",trigger:"blur"},{min:0,max:100,message:"长度在 0 到 100 个字符",trigger:"blur"}],writePerson:[{required:!1,message:"请输入编写者姓名",trigger:"blur"}],comments:[{required:!1,message:"请输入备注",trigger:"blur"},{min:0,max:200,message:"长度在 0 到 200 个字符",trigger:"blur"}]},joinTimingTaskFormRules:{taskId:[{required:!0,message:"请选择测试计划",trigger:"blur"}]},addEnvironmentVariableFormRules:{variableName:[{required:!0,message:"请输入变量名",trigger:"blur"},{min:1,max:50,message:"长度在 1 到 500 个字符",trigger:"blur"}],variableValue:[{required:!0,message:"请输入变量值",trigger:"blur"},{min:1,max:100,message:"长度在 1 到 100 个字符",trigger:"blur"}],comments:[{required:!1,message:"请输入备注",trigger:"blur"},{min:0,max:200,message:"长度在 0 到 200 个字符",trigger:"blur"}]},setCycleRequestRules:{requestNumber:[{required:!0,message:"请输入1~10000之间的整数",trigger:"blur"},{validator:function(e,t,a){if(/^(?!0)(?:[0-9]{1,4}|10000)$/.test(t))return a();a(new Error("请输入1~10000之间的整数"))},trigger:"blur",max:10}]}}},watch:{requestBackInfo:"changeRequestBackInfo"},components:{UploadFile:l.a,InterfaceMenuList:R,InterfaceDefine:S},mounted:function(){this.getItemNameList(),this.getTaskNameList(),this.getCaseTypeAndCaseStatusAndCaseLevel();var e=this;window.onresize=function(){e.autoFitResolution()},this.autoFitResolution()},created:function(){this.getInterfaceTestCaseList()},methods:{autoFitWindowWidth:function(e){for(var t=this.$refs.interfaceListBoxRef.clientWidth,a=document.getElementsByClassName("left-menu"),s=document.getElementsByClassName("right-interface-info"),i=0;i<a.length;i++)a[i].style.width=.15*t-10+"px",s[i].style.width=.835*t+"px"},autoFitResolution:function(){var e=document.getElementById("middle"),t=document.getElementsByClassName("interface-list-box"),a=document.getElementsByClassName("left-menu"),s=document.getElementsByClassName("middle-resize"),i=document.getElementsByClassName("right-interface-info");e.style.lineHeight=window.document.body.clientHeight+"px";for(var n=function(e){s[e].onmousedown=function(n){var r=n.clientX;return s[e].left=s[e].offsetLeft,document.onmousemove=function(n){var o=n.clientX,l=s[e].left+(o-r),c=t[e].clientWidth-s[e].offsetWidth;l<32&&(l=32),l>c-150&&(l=c-150),s[e].style.left=l;for(var u=0;u<a.length;u++)a[u].style.width=l+"px",i[u].style.width=t[e].clientWidth-l-20+"px"},document.onmouseup=function(t){document.onmousemove=null,document.onmouseup=null,s[e].releaseCapture&&s[e].releaseCapture()},!1}},r=0;r<s.length;r++)n(r)},debugInterfaceTestCase:function(){this.changeRightShowFlag({id:"",flag:!0})},refreshTableListAndTreeList:function(){this.$refs.interfaceMenuListRef.getAllInterfaceTestItem(),this.selectInterfaceTestCaseList()},cycleInterfaceRequest:function(){var e=this;this.$refs.cycleRequestRef.validate(function(t){if(t){var a={cycleNumber:parseInt(e.cycleRequest.requestNumber),interfaceTestList:e.multipleSelection};e.cycleInterfaceRequestDialogVisibleClose(),e.loading=!0,e.$api.test.cycleInterfaceRequest(i()(a)).then(function(t){e.$notify({message:t.data.msg,type:"success"}),e.loading=!1}).catch(function(){e.loading=!1})}})},cycleInterfaceRequestDialogVisibleOpen:function(){0!=this.multipleSelection.length?this.cycleInterfaceRequestDialogVisible=!0:this.$notify({type:"warning",message:"请先勾选用例"})},cycleInterfaceRequestDialogVisibleClose:function(){this.cycleInterfaceRequestDialogVisible=!1,this.$refs.cycleRequestRef.resetFields()},changeRequestBackInfo:function(){this.basicInfoShowFlag&&this.$refs.interfaceDefineRef.getRequestBackInfo(this.requestBackInfo)},editSaveInterfaceTestCase:function(e){var t=this;this.loading=!0,this.editForm=e,this.editForm.updateTime=(new Date).getTime(),this.editForm.updatePerson=this.operatorPerson,e.id?this.$api.test.updateInterfaceTestCase(this.editForm).then(function(e){t.$notify({message:e.data.msg,type:"success"}),t.loading=!1}).catch(function(){t.loading=!1}):(this.addForm=this.editForm,this.addForm.createTime=(new Date).getTime(),this.addForm.writePerson=this.operatorPerson,this.addForm.sheetName=this.addForm.testMode,this.$api.test.addInterfaceTestCase(i()(this.addForm)).then(function(e){t.$notify({message:e.data.msg,type:"success"}),t.refreshTableListAndTreeList(),t.loading=!1}).catch(function(){t.loading=!0}))},changeLeftMenuRightTableWidth:function(e){var t=document.querySelector(".left-menu"),a=document.querySelector(".right-interface-info");e?(t.style.width="14.5%",a.style.width="83.5%"):(t.style.width="2.5%",a.style.width="95.5%")},changeToPageShow:function(e){var t={id:e.id,flag:!0};this.changeRightShowFlag(t)},changeRightShowFlag:function(e){var t=this;e.flag?(this.listShowFlag=!1,this.basicInfoShowFlag=!0,e.id&&this.$api.test.queryInterfaceTestCaseById(e.id).then(function(e){t.$common.setSessionStorage("currentInterfaceCaseItemId",e.data.data.itemId),t.interfaceInfoObj=e.data.data}).catch(function(){})):(this.basicInfoShowFlag=!1,this.listShowFlag=!0,0==e.id?this.queryInfo.itemId="":this.queryInfo.itemId=e.id,this.selectInterfaceTestCaseList())},updateTestDomain:function(e){var t=this;e.taskId=this.testTaskId,e.caseId=e.id,e.execDomain=e.ipPath,e.execPort=e.port,this.$api.taskrelation.updateInterfaceTestTaskCaseExecLevelAndDomainAndPort(i()(e)).then(function(e){t.$notify({type:"success",message:e.data.msg})}).catch(function(){})},setEnvironmentVariable:function(){var e=this;this.$api.testvariable.queryNotTaskVariableInfo().then(function(t){e.environmentVariableList=t.data.data}).catch(function(){}),this.environmentVariableVisible=!0},environmentVariableDialogClose:function(){this.environmentVariableVisible=!1},addEnvironmentVariable:function(){this.environmentVariableList.push({variableName:"",variableValue:"",comments:""})},delEnvironmentVariable:function(e){this.environmentVariableList.splice(e.$index,1)},updateEnvironmentVariable:function(){var e=this;if(this.environmentVariableList.length<=0)this.$notify({type:"warning",message:"至少添加一个变量"});else{var t=!1;document.querySelectorAll(".variable-input .el-input__inner").forEach(function(e){""==e.value?(e.style.border="1px solid red",t=!0):(e.style.border="1px solid #DCDFE6",t=!1)}),t||(this.environmentVariableVisible=!1,this.loading=!0,this.$api.testvariable.updateTestVariableInfo(i()(this.environmentVariableList)).then(function(t){e.$notify({type:"success",message:t.data.msg}),e.loading=!1}).catch(function(){e.loading=!1}))}},updateTestCaseExecLevelIpPathPort:function(e){var t=this;this.$api.test.updateInterfaceTestCaseDefaultExecLevel(i()(e)).then(function(e){t.$notify({type:"success",message:e.data.msg})}).catch(function(){})},batchInterfaceRequest:function(){var e=this;0!=this.multipleSelection.length?(this.loading=!0,this.multipleSelection.forEach(function(t){t.testPerson=e.operatorPerson}),this.$api.test.batchInterfaceRequest(i()(this.multipleSelection)).then(function(t){e.$notify({type:"success",message:t.data.msg}),e.loading=!1}).catch(function(){e.loading=!1})):this.$notify({type:"warning",message:"请先勾选用例"})},singleInterfaceRequest:function(e){var t=this;this.loading=!0,this.requestBackInfo="",e.testPerson=this.operatorPerson,this.$api.test.interfaceTestRequest(i()(e)).then(function(a){e.definePage?t.requestBackInfo=a:(a.data.msg?t.requestBackInfo=a.data.msg:t.requestBackInfo=a,t.requestResultDialogVisible=!0),t.loading=!1}).catch(function(){t.loading=!1,t.$refs.interfaceDefineRef.getRequestBackInfo("")})},uploadSuccessStartImport:function(e){var t=this,a={fileName:e,operatorPerson:this.operatorPerson};this.$api.test.importInterfaceTestCaseByExcel(i()(a)).then(function(a){t.$notify({type:"success",message:a.data.msg}),t.loading=!1,t.refreshTableListAndTreeList(),t.$api.comm.deleteFile(e)}).catch(function(){t.loading=!1,t.$api.comm.deleteFile(e)})},getCaseTypeAndCaseStatusAndCaseLevel:function(){var e=this;this.$api.dict.queryAllDataDict().then(function(t){e.caseTypeOptions=t.data.data.caseType,e.caseLevelOptions=t.data.data.caseLevel,e.caseStatusOptions=t.data.data.caseStatus,e.caseExecLevelOptions=t.data.data.caseExecLevel,e.testDomainOptions=t.data.data.domain,e.testPortOptions=t.data.data.port,e.protocolOptions=t.data.data.protocolType,e.requestOptions=t.data.data.requestType}).catch(function(){})},getTaskNameList:function(){var e=this;this.$api.task.queryAllTaskManagerInfo(i()({jobName:"",pageNum:"",pageSize:""})).then(function(t){var a=t.data.data;a.forEach(function(e,t,a){"default"==e.beanClass&&a.splice(t,1)}),e.taskOptions=a}).catch(function(){})},showTimingTaskDialogVisible:function(){0!=this.multipleSelection.length?this.joinTimingTaskDialogVisible=!0:this.$notify({type:"warning",message:"请勾选加入计划的用例"})},canclejoinTimingTaskDialogVisible:function(){this.joinTimingTaskDialogVisible=!1},joinTimingTask:function(){var e=this;this.$refs.joinTimingTaskFormRef.validate(function(t){if(t){var a=[];e.multipleSelection.forEach(function(t){var s={};s.caseId=t.id,s.execLevel=t.execLevel,s.execDomain=t.ipPath,s.execPort=t.port,s.taskId=e.joinTimingTaskForm.taskId,a.push(s)}),e.loading=!0,e.$api.taskrelation.interfaceCaseBatchJoinTestTask(i()(a)).then(function(t){e.$notify({type:"success",message:t.data.msg}),e.joinTimingTaskDialogVisible=!1,e.loading=!1,e.$refs.joinTimingTaskFormRef.resetFields()}).catch(function(){e.loading=!1})}})},updateTestCaseStatus:function(e){var t=this,a=e;a.updateTime=(new Date).getTime(),a.updatePerson=this.operatorPerson,this.$api.test.updateInterfaceTestCaseStatus(a).then(function(e){t.$notify({type:"success",message:e.data.msg}),t.getInterfaceTestCaseList()}).catch(function(){})},cancelImportDialogVisible:function(){this.loading=!1,this.importDialogVisible=!1,this.$refs.uploadFile.cancel()},importInterfaceTestCase:function(){this.uploadComplatedFlag=!1,this.$refs.uploadFile.uploadSectionFile(),this.importDialogVisible=!1,this.loading=!0},batchExportInterfaceTestCase:function(){var e=this;0!=this.multipleSelection.length?(this.loading=!0,this.$api.test.batchExportInterfaceTestCaseToExcel(i()(this.multipleSelection)).then(function(t){e.loading=!1,e.$notify({type:"success",message:t.data.msg}),e.$common.downloadFiles(t.data.data.fileName),e.$api.comm.deleteFile(t.data.data.fileName)}).catch(function(){e.loading=!1})):this.$notify({type:"warning",message:"请勾选需要导出的用例"})},exportAllInterfaceTestCase:function(){var e=this;this.loading=!0;var t=this.queryInfo;t.pageNum=0,this.$api.test.exportAllInterfaceTestCaseToExcel(i()(t)).then(function(t){e.loading=!1,200==t.data.code?(e.$notify({type:"success",message:t.data.msg}),e.$common.downloadFiles(t.data.data.fileName),e.$api.comm.deleteFile(t.data.data.fileName)):e.$notify({type:"error",message:t.data.msg})}).catch(function(){e.loading=!1})},batchDelInterfaceTestCase:function(){var e=this;if(0==this.multipleSelection.length)this.$notify({type:"warning",message:"请勾选需要删除的用例"});else{var t=this.multipleSelection;this.loading=!0,this.$confirm("确定删除吗?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(function(){e.$api.test.batchDeleteInterfaceTestCase(i()(t)).then(function(t){e.loading=!1,e.$notify({type:"success",message:t.data.msg}),e.refreshTableListAndTreeList()}).catch(function(){e.loading=!1})}).catch(function(){e.loading=!1})}},handleSelectionChange:function(e){this.multipleSelection=e},addInterfaceTestCase:function(){var e=this;this.$refs.addFormRef.validate(function(t){t&&(e.addForm.createTime=(new Date).getTime(),e.addForm.writePerson=e.operatorPerson,e.addForm.sheetName=e.addForm.testMode,e.$api.test.addInterfaceTestCase(i()(e.addForm)).then(function(t){e.$notify({message:t.data.msg,type:"success"}),e.addDialogVisible=!1,e.refreshTableListAndTreeList(),e.loading=!1}).catch(function(){e.loading=!0}))})},cancelAddDialogVisible:function(){this.addDialogVisible=!1,this.$refs.addFormRef.resetFields()},cancelEditDialogVisible:function(){this.editDialogVisible=!1,this.$refs.editFormRef.resetFields()},showEditDialog:function(e){var t=this;this.$api.test.queryInterfaceTestCaseById(e.id).then(function(e){t.editForm=e.data.data,t.editDialogVisible=!0}).catch(function(){})},editInterfaceTestCase:function(){var e=this;this.$refs.editFormRef.validate(function(t){t&&(e.editForm.updateTime=(new Date).getTime(),e.editForm.updatePerson=e.operatorPerson,e.$api.test.updateInterfaceTestCase(i()(e.editForm)).then(function(t){e.$notify({message:t.data.msg,type:"success"}),e.editDialogVisible=!1,e.selectInterfaceTestCaseList()}).catch(function(){}))})},delInterfaceTestCase:function(e){var t=this;this.$confirm("确定删除吗?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(function(){t.loading=!0,t.$api.test.deleteInterfaceTestCaseById(e).then(function(e){t.$notify({type:"success",message:e.data.msg}),t.refreshTableListAndTreeList(),t.loading=!1}).catch(function(){t.loading=!1})}).catch(function(){})},getItemNameList:function(){var e=this;this.$api.item.queryAllItemIdAndItemName(this.queryInfo.itemName).then(function(t){e.itemOptions=t.data.data}).catch(function(){e.loading=!1})},selectInterfaceTestCaseList:function(){this.queryInfo.pageNum=1,this.total=0,this.getInterfaceTestCaseList()},getInterfaceTestCaseList:function(){var e=this;this.loading=!0,this.$api.test.queryAllInterfaceTestCase(i()(this.queryInfo)).then(function(t){e.testCaseList=t.data.data,e.total=t.data.count,e.loading=!1}).catch(function(){e.loading=!0})},handleSizeChange:function(e){this.queryInfo.pageSize=e,this.getInterfaceTestCaseList()},handleCurrentChange:function(e){this.queryInfo.pageNum=e,this.getInterfaceTestCaseList()},getRowKeys:function(e){return e.id}}},N={render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{ref:"interfaceListBoxRef",staticClass:"interface-list-box",attrs:{id:"interfaceListBox"}},[a("div",{staticClass:"left-menu",attrs:{id:"interfaceLeftMenu"}},[a("interface-menu-list",{ref:"interfaceMenuListRef",on:{"interface-menu-event":e.changeRightShowFlag,"interface-menu-expand-fold-event":e.changeLeftMenuRightTableWidth}})],1),e._v(" "),e._m(0),e._v(" "),a("div",{staticClass:"right-interface-info",attrs:{id:"interfaceRightTable"}},[e.basicInfoShowFlag?a("interface-define",{ref:"interfaceDefineRef",attrs:{interfaceDefine:e.interfaceInfoObj},on:{"interface-case-update-event":e.editSaveInterfaceTestCase,"interface-case-request-event":e.singleInterfaceRequest}}):e._e(),e._v(" "),e.listShowFlag?a("div",[a("el-form",{staticClass:"demo-form-inline",attrs:{inline:!0}},[e._e(),e._v(" "),a("el-form-item",{attrs:{label:"接口名称"}},[a("el-input",{staticClass:"input-with-select",attrs:{placeholder:"请输入接口名称",clearable:""},model:{value:e.queryInfo.interfaceName,callback:function(t){e.$set(e.queryInfo,"interfaceName",t)},expression:"queryInfo.interfaceName"}})],1),e._v(" "),a("el-form-item",{attrs:{label:"接口地址"}},[a("el-input",{staticClass:"input-with-select",attrs:{placeholder:"请输入接口地址",clearable:""},model:{value:e.queryInfo.interfacePath,callback:function(t){e.$set(e.queryInfo,"interfacePath",t)},expression:"queryInfo.interfacePath"}})],1),e._v(" "),e._e(),e._v(" "),e._e(),e._v(" "),a("el-form-item",{attrs:{label:"添加人员"}},[a("el-input",{staticClass:"input-with-select",attrs:{placeholder:"请输入添加人员",clearable:""},model:{value:e.queryInfo.writePerson,callback:function(t){e.$set(e.queryInfo,"writePerson",t)},expression:"queryInfo.writePerson"}})],1),e._v(" "),a("el-form-item",{attrs:{label:"备注信息"}},[a("el-input",{attrs:{placeholder:"请输入备注信息",clearable:""},model:{value:e.queryInfo.comments,callback:function(t){e.$set(e.queryInfo,"comments",t)},expression:"queryInfo.comments"}})],1),e._v(" "),a("el-form-item",[a("el-button",{attrs:{type:"primary"},on:{click:e.selectInterfaceTestCaseList}},[e._v("查询")])],1)],1),e._v(" "),a("el-row",{staticClass:"add_button"},[a("el-col",[a("el-button",{attrs:{type:"primary"},on:{click:function(t){e.addDialogVisible=!0}}},[e._v("添加")]),e._v(" "),a("el-button",{attrs:{type:"primary"},on:{click:e.debugInterfaceTestCase}},[e._v("调试")]),e._v(" "),a("el-button",{attrs:{type:"primary"},on:{click:function(t){e.importDialogVisible=!0}}},[e._v("导入")]),e._v(" "),a("el-button",{attrs:{type:"primary"},on:{click:e.batchExportInterfaceTestCase}},[e._v("批量导出")]),e._v(" "),a("el-button",{attrs:{type:"primary"},on:{click:e.exportAllInterfaceTestCase}},[e._v("全部导出")]),e._v(" "),a("el-button",{attrs:{type:"primary"},on:{click:e.batchDelInterfaceTestCase}},[e._v("批量删除")]),e._v(" "),a("el-button",{attrs:{type:"primary"},on:{click:e.batchInterfaceRequest}},[e._v("批量请求")]),e._v(" "),a("el-button",{attrs:{type:"primary"},on:{click:e.cycleInterfaceRequestDialogVisibleOpen}},[e._v("循环请求")]),e._v(" "),a("el-button",{attrs:{type:"primary"},on:{click:e.showTimingTaskDialogVisible}},[e._v("加入任务")]),e._v(" "),a("el-button",{attrs:{type:"primary"},on:{click:e.setEnvironmentVariable}},[e._v("环境变量")])],1)],1),e._v(" "),a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"}],ref:"multipleTable",attrs:{"tooltip-effect":"dark",data:e.testCaseList.slice((e.currpage-1)*e.queryInfo.pageSize,e.currpage*e.queryInfo.pageSize),border:"",fit:!0,"row-key":e.getRowKeys},on:{"selection-change":e.handleSelectionChange,"cell-dblclick":e.changeToPageShow}},[a("el-table-column",{attrs:{"reserve-selection":!0,type:"selection",width:"55",align:"center"}}),e._v(" "),a("el-table-column",{attrs:{"reserve-selection":!0,label:"序号",type:"index",align:"center",width:"50",fixed:""}}),e._v(" "),a("el-table-column",{attrs:{"reserve-selection":!0,label:"项目名称",prop:"itemId",width:"150","show-overflow-tooltip":""}}),e._v(" "),a("el-table-column",{attrs:{"reserve-selection":!0,label:"接口名称",prop:"interfaceName",width:"200","show-overflow-tooltip":"",fixed:""}}),e._v(" "),a("el-table-column",{attrs:{label:"优先级",prop:"execLevel",width:"110"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("el-select",{staticClass:"select-test-result",attrs:{placeholder:"请选择",clearable:""},on:{change:function(a){return e.updateTestCaseExecLevelIpPathPort(t.row)}},model:{value:t.row.execLevel,callback:function(a){e.$set(t.row,"execLevel",a)},expression:"scope.row.execLevel"}},e._l(e.caseExecLevelOptions,function(e){return a("el-option",{key:e.id,attrs:{label:e.dictValue,value:e.dictCode}})}),1)]}}],null,!1,3411154817)}),e._v(" "),a("el-table-column",{attrs:{"reserve-selection":!0,label:"协议类型",prop:"protocolType",width:"100","show-overflow-tooltip":""}}),e._v(" "),a("el-table-column",{attrs:{"reserve-selection":!0,label:"请求类型",prop:"requestType",width:"100","show-overflow-tooltip":""}}),e._v(" "),a("el-table-column",{attrs:{label:"IP/域名地址",prop:"ipPath",width:"250","show-overflow-tooltip":""}}),e._v(" "),a("el-table-column",{attrs:{label:"端口号",prop:"port",width:"80","show-overflow-tooltip":""}}),e._v(" "),a("el-table-column",{attrs:{"reserve-selection":!0,label:"接口地址",prop:"interfacePath",width:"200","show-overflow-tooltip":""}}),e._v(" "),a("el-table-column",{attrs:{"reserve-selection":!0,label:"请求头",prop:"requestHeader",width:"200","show-overflow-tooltip":""}}),e._v(" "),a("el-table-column",{attrs:{"reserve-selection":!0,label:"请求参数",prop:"requestParams",width:"200","show-overflow-tooltip":""}}),e._v(" "),a("el-table-column",{attrs:{"reserve-selection":!0,label:"请求体",prop:"requestBody",width:"200","show-overflow-tooltip":""}}),e._v(" "),a("el-table-column",{attrs:{"reserve-selection":!0,label:"关联参数",prop:"relationValues",width:"200","show-overflow-tooltip":""}}),e._v(" "),a("el-table-column",{attrs:{"reserve-selection":!0,label:"断言字段",prop:"assertField",width:"200","show-overflow-tooltip":""}}),e._v(" "),a("el-table-column",{attrs:{"reserve-selection":!0,label:"预期结果",prop:"expectResult",width:"200","show-overflow-tooltip":""}}),e._v(" "),e._e(),e._v(" "),e._e(),e._v(" "),a("el-table-column",{attrs:{"reserve-selection":!0,label:"添加人员",prop:"writePerson","show-overflow-tooltip":""}}),e._v(" "),a("el-table-column",{attrs:{"reserve-selection":!0,label:"添加时间",prop:"createTime",width:"160"}}),e._v(" "),a("el-table-column",{attrs:{"reserve-selection":!0,label:"更新人员",prop:"updatePerson",width:"160"}}),e._v(" "),a("el-table-column",{attrs:{"reserve-selection":!0,label:"更新时间",prop:"updateTime",width:"160"}}),e._v(" "),a("el-table-column",{attrs:{"reserve-selection":!0,label:"备注",prop:"comments",width:"250","show-overflow-tooltip":""}}),e._v(" "),a("el-table-column",{attrs:{label:"操作",fixed:"right",width:"200",align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("el-button",{attrs:{type:"text",size:"small"},on:{click:function(a){return e.singleInterfaceRequest(t.row)}}},[e._v("请求")]),e._v(" "),a("el-button",{attrs:{type:"text",size:"small"},on:{click:function(a){return e.showEditDialog(t.row)}}},[e._v("编辑")]),e._v(" "),a("el-button",{attrs:{type:"text",size:"small"},on:{click:function(a){return e.delInterfaceTestCase(t.row.id)}}},[e._v("删除")])]}}],null,!1,1698722235)})],1),e._v(" "),a("el-pagination",{attrs:{"page-sizes":[5,10,20,30],"page-size":e.queryInfo.pageSize,layout:"total, sizes, prev, pager, next, jumper",total:e.total},on:{"size-change":e.handleSizeChange,"current-change":e.handleCurrentChange}})],1):e._e()],1),e._v(" "),a("el-dialog",{attrs:{title:"添加用例",visible:e.addDialogVisible,"close-on-click-modal":!1,width:"60%"},on:{"update:visible":function(t){e.addDialogVisible=t},close:e.cancelAddDialogVisible}},[a("div",{staticClass:"case-info-form"},[a("el-form",{ref:"addFormRef",attrs:{model:e.addForm,rules:e.addFormRules,"label-width":"100px"}},[a("el-row",{attrs:{gutter:20}},[a("el-col",{attrs:{span:8}},[a("el-form-item",{attrs:{label:"项目名称",prop:"itemId"}},[a("div",{staticClass:"add-dialog-select"},[a("el-select",{attrs:{placeholder:"请选择"},model:{value:e.addForm.itemId,callback:function(t){e.$set(e.addForm,"itemId",t)},expression:"addForm.itemId"}},e._l(e.itemOptions,function(e){return a("el-option",{key:e.id,attrs:{label:e.itemName,value:e.id+""}})}),1)],1)])],1),e._v(" "),a("el-col",{attrs:{span:8}},[a("el-form-item",{attrs:{label:"协议类型",prop:"protocolType"}},[a("div",{staticClass:"add-dialog-select"},[a("el-select",{attrs:{placeholder:"请选择"},model:{value:e.addForm.protocolType,callback:function(t){e.$set(e.addForm,"protocolType",t)},expression:"addForm.protocolType"}},e._l(e.protocolOptions,function(e){return a("el-option",{key:e.id,attrs:{label:e.dictValue,value:e.dictCode}})}),1)],1)])],1),e._v(" "),a("el-col",{attrs:{span:8}},[a("el-form-item",{attrs:{label:"请求类型",prop:"requestType"}},[a("div",{staticClass:"add-dialog-select"},[a("el-select",{attrs:{placeholder:"请选择"},model:{value:e.addForm.requestType,callback:function(t){e.$set(e.addForm,"requestType",t)},expression:"addForm.requestType"}},e._l(e.requestOptions,function(e){return a("el-option",{key:e.id,attrs:{label:e.dictValue,value:e.dictCode}})}),1)],1)])],1)],1),e._v(" "),a("el-row",{attrs:{gutter:20}},[a("el-col",{attrs:{span:16}},[a("el-form-item",{attrs:{label:"IP/域名",prop:"ipPath"}},[a("el-input",{attrs:{type:"text",placeholder:"请输入IP/域名地址"},model:{value:e.addForm.ipPath,callback:function(t){e.$set(e.addForm,"ipPath",t)},expression:"addForm.ipPath"}})],1)],1),e._v(" "),a("el-col",{attrs:{span:8}},[a("el-form-item",{attrs:{label:"端口号",prop:"port"}},[a("el-input",{attrs:{type:"text",placeholder:"请输入端口号"},model:{value:e.addForm.port,callback:function(t){e.$set(e.addForm,"port",t)},expression:"addForm.port"}})],1)],1)],1),e._v(" "),a("el-row",{attrs:{gutter:20}},[a("el-col",{attrs:{span:24}},[a("el-form-item",{attrs:{label:"接口名称",prop:"interfaceName"}},[a("el-input",{attrs:{placeholder:"请输入接口名称"},model:{value:e.addForm.interfaceName,callback:function(t){e.$set(e.addForm,"interfaceName",t)},expression:"addForm.interfaceName"}})],1)],1)],1),e._v(" "),a("el-row",[a("el-col",{attrs:{span:24}},[a("el-form-item",{attrs:{label:"接口地址",prop:"interfacePath"}},[a("el-input",{attrs:{type:"text",placeholder:"请输入接口地址"},model:{value:e.addForm.interfacePath,callback:function(t){e.$set(e.addForm,"interfacePath",t)},expression:"addForm.interfacePath"}})],1)],1)],1),e._v(" "),a("el-row",[a("el-col",{attrs:{span:24}},[a("el-form-item",{attrs:{label:"请求参数",prop:"requestParams"}},[a("el-input",{attrs:{type:"text",placeholder:"请输入请求参数"},model:{value:e.addForm.requestParams,callback:function(t){e.$set(e.addForm,"requestParams",t)},expression:"addForm.requestParams"}})],1)],1)],1),e._v(" "),a("el-row",{attrs:{gutter:20}},[a("el-col",{attrs:{span:10}},[a("el-form-item",{attrs:{label:"请求头",prop:"requestHeader"}},[a("el-input",{attrs:{type:"textarea",rows:5,placeholder:"请输入请求头JSON格式"},model:{value:e.addForm.requestHeader,callback:function(t){e.$set(e.addForm,"requestHeader",t)},expression:"addForm.requestHeader"}})],1)],1),e._v(" "),a("el-col",{attrs:{span:14}},[a("el-form-item",{attrs:{label:"请求体",prop:"requestBody"}},[a("el-input",{attrs:{type:"textarea",rows:5,placeholder:"请输入请求体JSON格式"},model:{value:e.addForm.requestBody,callback:function(t){e.$set(e.addForm,"requestBody",t)},expression:"addForm.requestBody"}})],1)],1)],1),e._v(" "),a("el-row",{attrs:{gutter:20}},[a("el-col",{attrs:{span:8}},[a("el-form-item",{attrs:{label:"关联参数",prop:"relationValues"}},[a("el-input",{attrs:{type:"text",placeholder:"请输入关联参数"},model:{value:e.addForm.relationValues,callback:function(t){e.$set(e.addForm,"relationValues",t)},expression:"addForm.relationValues"}})],1)],1),e._v(" "),a("el-col",{attrs:{span:8}},[a("el-form-item",{attrs:{label:"断言字段",prop:"assertField"}},[a("el-input",{attrs:{type:"text",placeholder:"请输入断言字段"},model:{value:e.addForm.assertField,callback:function(t){e.$set(e.addForm,"assertField",t)},expression:"addForm.assertField"}})],1)],1),e._v(" "),a("el-col",{attrs:{span:8}},[a("el-form-item",{attrs:{label:"预期结果",prop:"expectResult"}},[a("el-input",{attrs:{type:"text",placeholder:"请输入预期结果"},model:{value:e.addForm.expectResult,callback:function(t){e.$set(e.addForm,"expectResult",t)},expression:"addForm.expectResult"}})],1)],1)],1),e._v(" "),a("el-row",{attrs:{gutter:20}},[a("el-col",{attrs:{span:24}},[a("el-form-item",{attrs:{label:"备注",prop:"comments"}},[a("el-input",{attrs:{type:"textarea",rows:5,placeholder:"请输入备注信息"},model:{value:e.addForm.comments,callback:function(t){e.$set(e.addForm,"comments",t)},expression:"addForm.comments"}})],1)],1)],1)],1)],1),e._v(" "),a("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("el-button",{on:{click:e.cancelAddDialogVisible}},[e._v("取 消")]),e._v(" "),a("el-button",{attrs:{type:"primary"},on:{click:e.addInterfaceTestCase}},[e._v("确 定")])],1)]),e._v(" "),a("el-dialog",{attrs:{title:"修改用例",visible:e.editDialogVisible,"close-on-click-modal":!1,width:"60%"},on:{"update:visible":function(t){e.editDialogVisible=t},close:e.cancelEditDialogVisible}},[a("div",{staticClass:"case-info-form"},[a("el-form",{ref:"editFormRef",attrs:{model:e.editForm,rules:e.addFormRules,"label-width":"100px"}},[a("el-row",{attrs:{gutter:20}},[a("el-col",{attrs:{span:8}},[a("el-form-item",{attrs:{label:"项目名称",prop:"itemId"}},[a("div",{staticClass:"add-dialog-select"},[a("el-select",{attrs:{placeholder:"请选择"},model:{value:e.editForm.itemId,callback:function(t){e.$set(e.editForm,"itemId",t)},expression:"editForm.itemId"}},e._l(e.itemOptions,function(e){return a("el-option",{key:e.id,attrs:{label:e.itemName,value:e.id+""}})}),1)],1)])],1),e._v(" "),a("el-col",{attrs:{span:8}},[a("el-form-item",{attrs:{label:"协议类型",prop:"protocolType"}},[a("div",{staticClass:"add-dialog-select"},[a("el-select",{attrs:{placeholder:"请选择"},model:{value:e.editForm.protocolType,callback:function(t){e.$set(e.editForm,"protocolType",t)},expression:"editForm.protocolType"}},e._l(e.protocolOptions,function(e){return a("el-option",{key:e.id,attrs:{label:e.dictValue,value:e.dictCode}})}),1)],1)])],1),e._v(" "),a("el-col",{attrs:{span:8}},[a("el-form-item",{attrs:{label:"请求类型",prop:"requestType"}},[a("div",{staticClass:"add-dialog-select"},[a("el-select",{attrs:{placeholder:"请选择"},model:{value:e.editForm.requestType,callback:function(t){e.$set(e.editForm,"requestType",t)},expression:"editForm.requestType"}},e._l(e.requestOptions,function(e){return a("el-option",{key:e.id,attrs:{label:e.dictValue,value:e.dictCode}})}),1)],1)])],1)],1),e._v(" "),a("el-row",{attrs:{gutter:20}},[a("el-col",{attrs:{span:16}},[a("el-form-item",{attrs:{label:"IP/域名",prop:"ipPath"}},[a("el-input",{attrs:{type:"text",placeholder:"请输入IP/域名地址"},model:{value:e.editForm.ipPath,callback:function(t){e.$set(e.editForm,"ipPath",t)},expression:"editForm.ipPath"}})],1)],1),e._v(" "),a("el-col",{attrs:{span:8}},[a("el-form-item",{attrs:{label:"端口号",prop:"port"}},[a("el-input",{attrs:{type:"text",placeholder:"请输入端口号"},model:{value:e.editForm.port,callback:function(t){e.$set(e.editForm,"port",t)},expression:"editForm.port"}})],1)],1)],1),e._v(" "),a("el-row",{attrs:{gutter:20}},[a("el-col",{attrs:{span:24}},[a("el-form-item",{attrs:{label:"接口名称",prop:"interfaceName"}},[a("el-input",{attrs:{placeholder:"请输入接口名称"},model:{value:e.editForm.interfaceName,callback:function(t){e.$set(e.editForm,"interfaceName",t)},expression:"editForm.interfaceName"}})],1)],1)],1),e._v(" "),a("el-row",[a("el-col",{attrs:{span:24}},[a("el-form-item",{attrs:{label:"接口地址",prop:"interfacePath"}},[a("el-input",{attrs:{type:"text",placeholder:"请输入接口地址"},model:{value:e.editForm.interfacePath,callback:function(t){e.$set(e.editForm,"interfacePath",t)},expression:"editForm.interfacePath"}})],1)],1)],1),e._v(" "),a("el-row",[a("el-col",{attrs:{span:24}},[a("el-form-item",{attrs:{label:"请求参数",prop:"requestParams"}},[a("el-input",{attrs:{type:"text",placeholder:"请输入请求参数"},model:{value:e.editForm.requestParams,callback:function(t){e.$set(e.editForm,"requestParams",t)},expression:"editForm.requestParams"}})],1)],1)],1),e._v(" "),a("el-row",{attrs:{gutter:20}},[a("el-col",{attrs:{span:10}},[a("el-form-item",{attrs:{label:"请求头",prop:"requestHeader"}},[a("el-input",{attrs:{type:"textarea",rows:5,placeholder:"请输入请求头JSON格式"},model:{value:e.editForm.requestHeader,callback:function(t){e.$set(e.editForm,"requestHeader",t)},expression:"editForm.requestHeader"}})],1)],1),e._v(" "),a("el-col",{attrs:{span:14}},[a("el-form-item",{attrs:{label:"请求体",prop:"requestBody"}},[a("el-input",{attrs:{type:"textarea",rows:5,placeholder:"请输入请求体JSON格式"},model:{value:e.editForm.requestBody,callback:function(t){e.$set(e.editForm,"requestBody",t)},expression:"editForm.requestBody"}})],1)],1)],1),e._v(" "),a("el-row",{attrs:{gutter:20}},[a("el-col",{attrs:{span:8}},[a("el-form-item",{attrs:{label:"关联参数",prop:"relationValues"}},[a("el-input",{attrs:{type:"text",placeholder:"请输入关联参数"},model:{value:e.editForm.relationValues,callback:function(t){e.$set(e.editForm,"relationValues",t)},expression:"editForm.relationValues"}})],1)],1),e._v(" "),a("el-col",{attrs:{span:8}},[a("el-form-item",{attrs:{label:"断言字段",prop:"assertField"}},[a("el-input",{attrs:{type:"text",placeholder:"请输入断言字段"},model:{value:e.editForm.assertField,callback:function(t){e.$set(e.editForm,"assertField",t)},expression:"editForm.assertField"}})],1)],1),e._v(" "),a("el-col",{attrs:{span:8}},[a("el-form-item",{attrs:{label:"预期结果",prop:"expectResult"}},[a("el-input",{attrs:{type:"text",placeholder:"请输入预期结果"},model:{value:e.editForm.expectResult,callback:function(t){e.$set(e.editForm,"expectResult",t)},expression:"editForm.expectResult"}})],1)],1)],1),e._v(" "),a("el-row",{attrs:{gutter:20}},[a("el-col",{attrs:{span:24}},[a("el-form-item",{attrs:{label:"备注",prop:"comments"}},[a("el-input",{attrs:{type:"textarea",rows:5,placeholder:"请输入备注信息"},model:{value:e.editForm.comments,callback:function(t){e.$set(e.editForm,"comments",t)},expression:"editForm.comments"}})],1)],1)],1)],1)],1),e._v(" "),a("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("el-button",{on:{click:e.cancelEditDialogVisible}},[e._v("取 消")]),e._v(" "),a("el-button",{attrs:{type:"primary"},on:{click:e.editInterfaceTestCase}},[e._v("确 定")])],1)]),e._v(" "),a("el-dialog",{attrs:{title:"导入用例",visible:e.importDialogVisible,"close-on-click-modal":!1,width:"40%"},on:{"update:visible":function(t){e.importDialogVisible=t},close:e.cancelImportDialogVisible}},[a("upload-file",{ref:"uploadFile",attrs:{fileType:e.fileType},on:{"upload-file-event":e.uploadSuccessStartImport}}),e._v(" "),a("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("el-button",{on:{click:e.cancelImportDialogVisible}},[e._v("取 消")]),e._v(" "),a("el-button",{attrs:{type:"primary"},on:{click:e.importInterfaceTestCase}},[e._v("确 定")])],1)],1),e._v(" "),a("el-dialog",{attrs:{title:"加入任务",visible:e.joinTimingTaskDialogVisible,"close-on-click-modal":!1,width:"30%"},on:{"update:visible":function(t){e.joinTimingTaskDialogVisible=t},close:e.canclejoinTimingTaskDialogVisible}},[a("el-form",{ref:"joinTimingTaskFormRef",staticClass:"demo-form-inline",attrs:{model:e.joinTimingTaskForm,rules:e.joinTimingTaskFormRules,"label-width":"100px"}},[a("el-form-item",{attrs:{label:"任务名称",prop:"taskId"}},[a("el-select",{attrs:{placeholder:"请选择",clearable:""},model:{value:e.joinTimingTaskForm.taskId,callback:function(t){e.$set(e.joinTimingTaskForm,"taskId",t)},expression:"joinTimingTaskForm.taskId"}},e._l(e.taskOptions,function(e){return a("el-option",{key:e.id,attrs:{label:e.jobName,value:e.id+""}})}),1)],1)],1),e._v(" "),a("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("el-button",{on:{click:e.canclejoinTimingTaskDialogVisible}},[e._v("取 消")]),e._v(" "),a("el-button",{attrs:{type:"primary"},on:{click:e.joinTimingTask}},[e._v("确 定")])],1)],1),e._v(" "),a("el-dialog",{attrs:{title:"请求结果",visible:e.requestResultDialogVisible,"close-on-click-modal":!1,width:"50%"},on:{"update:visible":function(t){e.requestResultDialogVisible=t},close:function(t){e.requestResultDialogVisible=!1}}},[a("div",{staticClass:"request-result-show",staticStyle:{"max-height":"500px"}},[a("p",[e._v(e._s(e.requestBackInfo))])]),e._v(" "),a("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("el-button",{on:{click:function(t){e.requestResultDialogVisible=!1}}},[e._v("取 消")])],1)]),e._v(" "),a("el-dialog",{attrs:{title:"变量设置",visible:e.environmentVariableVisible,"close-on-click-modal":!1,width:"50%"},on:{"update:visible":function(t){e.environmentVariableVisible=t},close:e.environmentVariableDialogClose}},[a("el-row",[a("el-col",{attrs:{span:2}},[a("el-button",{attrs:{size:"mini",type:"primary"},on:{click:e.addEnvironmentVariable}},[e._v("添加变量")])],1)],1),e._v(" "),a("el-table",{ref:"environmentVariableFormRef",attrs:{data:e.environmentVariableList,fit:!0,rules:e.addEnvironmentVariableFormRules}},[a("el-table-column",{attrs:{label:"序号",type:"index",align:"center",width:"100"}}),e._v(" "),e._e(),e._v(" "),a("el-table-column",{attrs:{label:"变量名",prop:"variableName"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("el-input",{staticClass:"variable-input",attrs:{placeholder:"请输入变量名"},model:{value:t.row.variableName,callback:function(a){e.$set(t.row,"variableName",a)},expression:"scope.row.variableName"}})]}}],null,!1,3383068135)}),e._v(" "),a("el-table-column",{attrs:{label:"变量值",width:"180",prop:"variableValue"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("el-input",{staticClass:"variable-input",attrs:{placeholder:"请输入变量值"},model:{value:t.row.variableValue,callback:function(a){e.$set(t.row,"variableValue",a)},expression:"scope.row.variableValue"}})]}}])}),e._v(" "),a("el-table-column",{attrs:{label:"备注"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("el-input",{staticStyle:{width:"100%"},attrs:{placeholder:"请输入备注信息"},model:{value:t.row.comments,callback:function(a){e.$set(t.row,"comments",a)},expression:"scope.row.comments"}})]}}])}),e._v(" "),a("el-table-column",{attrs:{label:"操作",fixed:"right",width:"100",align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("el-button",{staticClass:"variable-add-button",attrs:{type:"text",size:"small"},on:{click:e.addEnvironmentVariable}},[e._v(" + ")]),e._v(" "),a("el-button",{staticClass:"variable-add-button",attrs:{type:"text",size:"small"},on:{click:function(a){return e.delEnvironmentVariable(t)}}},[e._v(" - ")])]}}])})],1),e._v(" "),a("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("el-button",{on:{click:e.environmentVariableDialogClose}},[e._v("取 消")]),e._v(" "),a("el-button",{attrs:{type:"primary"},on:{click:e.updateEnvironmentVariable}},[e._v("确 定")])],1)],1),e._v(" "),a("el-dialog",{attrs:{title:"设置",visible:e.cycleInterfaceRequestDialogVisible,"close-on-click-modal":!1,width:"30%"},on:{"update:visible":function(t){e.cycleInterfaceRequestDialogVisible=t},close:e.cycleInterfaceRequestDialogVisibleClose}},[a("el-form",{ref:"cycleRequestRef",attrs:{model:e.cycleRequest,rules:e.setCycleRequestRules,"label-width":"100px"}},[a("el-row",{attrs:{gutter:20}},[a("el-col",{attrs:{span:12}},[a("el-form-item",{attrs:{label:"循环次数",prop:"requestNumber"}},[a("el-input",{attrs:{type:"text",placeholder:"请输入循环次数"},model:{value:e.cycleRequest.requestNumber,callback:function(t){e.$set(e.cycleRequest,"requestNumber",t)},expression:"cycleRequest.requestNumber"}})],1)],1)],1)],1),e._v(" "),a("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("el-button",{on:{click:e.cycleInterfaceRequestDialogVisibleClose}},[e._v("取 消")]),e._v(" "),a("el-button",{attrs:{type:"primary"},on:{click:e.cycleInterfaceRequest}},[e._v("确 定")])],1)],1)],1)},staticRenderFns:[function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticClass:"middle",attrs:{id:"middle"}},[t("div",{staticClass:"middle-resize",attrs:{id:"interfaceMiddleResize"}},[this._v("⋮")])])}]};var P={data:function(){return{}},components:{InterfaceList:a("VU/8")(L,N,!1,function(e){a("3e4o")},"data-v-1e1bb23c",null).exports},methods:{invokeInterfaceInfo:function(){this.$refs.interfaceListRef.autoFitWindowWidth()}}},V={render:function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticClass:"interface-info-box"},[t("interface-list",{ref:"interfaceListRef"})],1)},staticRenderFns:[]};var D=a("VU/8")(P,V,!1,function(e){a("DyIa")},"data-v-1cbf88df",null).exports,B={data:function(){return{loading:!1,tableIsShow:!0,reportIsShow:!1,taskNames:[],taskConditions:[],taskOptions:[],interfaceTestResultList:[],operatorPerson:JSON.parse(localStorage.getItem("userInfo")).nick,queryInfo:{taskName:"",testPerson:"",comments:"",pageNum:1,pageSize:10},currpage:1,total:0,reportCaseNum:0,detailForm:{},testResultDetails:[],testReportId:"",testReportType:"",onlySuccessOrFail:"仅失败"}},mounted:function(){this.getTaskList()},beforeCreate:function(){},created:function(){this.getInterfaceTestResultList()},methods:{onlyLookSuccessOrFail:function(){var e={};e.id=this.testReportId,"仅失败"==this.onlySuccessOrFail?(this.onlySuccessOrFail="仅成功",this.testReportType="fail",e.type=this.testReportType,this.queryInterfaceTestResult(e)):"仅成功"==this.onlySuccessOrFail?(this.onlySuccessOrFail="全部",this.testReportType="success",e.type=this.testReportType,this.queryInterfaceTestResult(e)):(this.onlySuccessOrFail="仅失败",this.testReportType="",e.type=this.testReportType,this.queryInterfaceTestResult(e))},downLoadInterfaceTestReportToExcel:function(){var e=this;this.loading=!0;var t={};t.id=this.testReportId,t.type=this.testReportType,this.$api.testresult.exportInterfaceTestResultToExcel(i()(t)).then(function(t){e.loading=!1,e.$notify({type:"success",message:t.data.msg}),e.$common.downloadFiles(t.data.data.fileName);var a=e;setTimeout(function(){a.$api.comm.deleteFile(t.data.data.fileName)},1e3)}).catch(function(){e.loading=!1})},getTaskList:function(){var e=this;this.$api.task.queryAllTaskManagerInfo(i()(this.queryInfo)).then(function(t){e.taskOptions=t.data.data}).catch(function(){})},getInterfaceTestResultList:function(){var e=this;this.loading=!0,this.$api.testresult.queryAllInterfaceTestResult(i()(this.queryInfo)).then(function(t){e.loading=!1,e.interfaceTestResultList=t.data.data,e.total=t.data.count,e.queryInfo.pageNum=1}).catch(function(){e.loading=!1})},handleSizeChange:function(e){this.queryInfo.pageSize=e,this.getInterfaceTestResultList()},handleCurrentChange:function(e){this.queryInfo.pageNum=e,this.getInterfaceTestResultList()},queryInterfaceTestResult:function(e){var t=this;this.tableIsShow=!1,this.loading=!0,this.$api.testresult.queryInterfaceTestResult(i()(e)).then(function(e){t.detailForm=e.data.data,t.testResultDetails=e.data.data.testDetailVOS;var a=e.data.data;t.taskNames=[],t.taskConditions=[];for(var s=0;s<2;s++){var i={},n={};if(a.testSuccessNum>0){var r="成功",o=a.testSuccessNum;n.value=o,n.name=r+""+o+"条",n.itemStyle={color:"#008000"},t.taskNames.push(r+""+o+"条"),i.name=r,i.num=o,t.taskConditions.push(n),a.testSuccessNum=0}else{if(a.testFailNum>0){r="失败",o=a.testFailNum;n.value=o,n.name=r+""+o+"条",n.itemStyle={color:"#E3150A"},t.taskNames.push(r+""+o+"条"),i.name=r,i.num=o,t.taskConditions.push(n),a.testFailNum=0}t.reportCaseNum=a.testAllNum}}t.reportIsShow=!0;var l=t;setTimeout(function(){l.loading=!1,l.drawAllCharts()},500),t.loading=!1}).catch(function(){t.loading=!1})},showDetailDialog:function(e){this.testReportId=e;var t={};t.id=e,t.type="",this.queryInterfaceTestResult(t)},backParentPage:function(){this.reportIsShow=!1,this.tableIsShow=!0,this.taskNames=[],this.taskConditions=[],this.testReportId="",this.testReportType=""},drawAllCharts:function(){var e=this.reportCaseNum,t=this.$echarts.init(document.getElementById("reportMain"));t.setOption({title:{text:"",subtext:"",x:"center"},tooltip:{trigger:"item",formatter:function(t){var a=t.value/e*100;return a.valueOf(".")&&(a=parseFloat(a).toFixed(2)),"占比:"+a+"%"},textStyle:{fontSize:18}},legend:{orient:"vertical",left:"left",data:this.taskNames,textStyle:{fontSize:18}},toolbox:{feature:{saveAsImage:{show:!0}}},series:[{name:"",type:"pie",radius:["0%","60%"],center:["50%","45%"],data:this.taskConditions,label:{normal:{show:!0,textStyle:{fontSize:18}},emphasis:{show:!0}},lableLine:{normal:{show:!0},emphasis:{show:!0}}}]}),window.onresize=function(){t.resize()}},delInterfaceTestResult:function(e){var t=this;this.loading=!0,this.$confirm("确定删除吗?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(function(){t.$api.testresult.deleteInterfaceTestResultById(e).then(function(e){t.$notify({type:"success",message:e.data.msg}),t.loading=!1,t.getInterfaceTestResultList()}).catch(function(){t.loading=!1})}).catch(function(){t.loading=!1})}}},E={render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"}],staticClass:"interface-report-box"},[e.tableIsShow?a("div",{staticClass:"interface-task-table"},[a("div",{staticClass:"interface-roport-box-query"},[a("el-form",{staticClass:"demo-form-inline",attrs:{inline:!0}},[a("el-form-item",{attrs:{label:"任务名称"}},[a("el-select",{attrs:{placeholder:"请选择",clearable:""},model:{value:e.queryInfo.taskName,callback:function(t){e.$set(e.queryInfo,"taskName",t)},expression:"queryInfo.taskName"}},e._l(e.taskOptions,function(e){return a("el-option",{key:e.id,attrs:{label:e.jobName,value:e.jobName}})}),1)],1),e._v(" "),a("el-form-item",{attrs:{label:"测试人员"}},[a("el-input",{attrs:{placeholder:"请输入测试人员姓名",clearable:""},model:{value:e.queryInfo.testPerson,callback:function(t){e.$set(e.queryInfo,"testPerson",t)},expression:"queryInfo.testPerson"}})],1),e._v(" "),a("el-form-item",{attrs:{label:"备注信息"}},[a("el-input",{attrs:{placeholder:"请输入备注信息",clearable:""},model:{value:e.queryInfo.comments,callback:function(t){e.$set(e.queryInfo,"comments",t)},expression:"queryInfo.comments"}})],1),e._v(" "),a("el-form-item",[a("el-button",{attrs:{type:"primary"},on:{click:e.getInterfaceTestResultList}},[e._v("查询")])],1)],1)],1),e._v(" "),a("el-table",{attrs:{data:e.interfaceTestResultList.slice((e.currpage-1)*e.queryInfo.pageSize,e.currpage*e.queryInfo.pageSize),border:"",fit:!0}},[a("el-table-column",{attrs:{label:"序号",type:"index",align:"center",width:"80"}}),e._v(" "),a("el-table-column",{attrs:{label:"任务名称",prop:"taskName","show-overflow-tooltip":""}}),e._v(" "),a("el-table-column",{attrs:{label:"CASE总数",prop:"testAllNum",width:"100"}}),e._v(" "),a("el-table-column",{attrs:{label:"成功数量",prop:"testSuccessNum",width:"100"}}),e._v(" "),a("el-table-column",{attrs:{label:"失败数量",prop:"testFailNum",width:"100"}}),e._v(" "),a("el-table-column",{attrs:{label:"开始时间",prop:"startTestTime",width:"160"}}),e._v(" "),a("el-table-column",{attrs:{label:"结束时间",prop:"endTestTime",width:"160"}}),e._v(" "),a("el-table-column",{attrs:{label:"测试人员",prop:"testPerson",width:"150"}}),e._v(" "),a("el-table-column",{attrs:{label:"备注",prop:"comments","show-overflow-tooltip":""}}),e._v(" "),a("el-table-column",{attrs:{label:"操作",fixed:"right",width:"150",align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("el-button",{attrs:{type:"text",size:"small"},on:{click:function(a){return e.showDetailDialog(t.row.id)}}},[e._v("报告")]),e._v(" "),a("el-button",{attrs:{type:"text",size:"small"},on:{click:function(a){return e.delInterfaceTestResult(t.row.id)}}},[e._v("删除")])]}}],null,!1,727641014)})],1),e._v(" "),a("el-pagination",{attrs:{"current-page":e.currpage,"page-sizes":[5,10,20,30],"page-size":e.queryInfo.pageSize,layout:"prev, pager, next, sizes, total, jumper",total:e.total},on:{"size-change":e.handleSizeChange,"current-change":e.handleCurrentChange}})],1):e._e(),e._v(" "),e.reportIsShow?a("div",{staticClass:"interface-task-reoprt"},[a("div",{staticClass:"back-interfac-test-result"},[a("el-form",[a("el-row",[a("el-form-item",[a("el-button",{on:{click:e.backParentPage}},[e._v("返回")])],1)],1)],1)],1),e._v(" "),a("div",{staticClass:"base-info default-style"},[a("div",{staticClass:"report-title"},[e._v("基础信息")]),e._v(" "),a("div",[a("el-form",{staticClass:"demo-form-inline",attrs:{inline:!0,model:e.detailForm}},[a("el-row",{attrs:{gutter:20}},[a("el-col",{attrs:{span:12}},[a("el-form-item",{attrs:{label:"任务名称"}},[a("el-input",{attrs:{disabled:""},model:{value:e.detailForm.taskName,callback:function(t){e.$set(e.detailForm,"taskName",t)},expression:"detailForm.taskName"}})],1)],1),e._v(" "),a("el-col",{attrs:{span:12}},[a("el-form-item",{attrs:{label:"测试人员"}},[a("el-input",{attrs:{disabled:""},model:{value:e.detailForm.testPerson,callback:function(t){e.$set(e.detailForm,"testPerson",t)},expression:"detailForm.testPerson"}})],1)],1)],1),e._v(" "),a("el-row",{attrs:{gutter:20}},[a("el-col",{attrs:{span:12}},[a("el-form-item",{attrs:{label:"开始时间"}},[a("el-input",{attrs:{disabled:""},model:{value:e.detailForm.startTestTime,callback:function(t){e.$set(e.detailForm,"startTestTime",t)},expression:"detailForm.startTestTime"}})],1)],1),e._v(" "),a("el-col",{attrs:{span:12}},[a("el-form-item",{attrs:{label:"结束时间"}},[a("el-input",{attrs:{disabled:""},model:{value:e.detailForm.endTestTime,callback:function(t){e.$set(e.detailForm,"endTestTime",t)},expression:"detailForm.endTestTime"}})],1)],1)],1),e._v(" "),a("el-row",{attrs:{gutter:20}},[a("el-col",{attrs:{span:24}},[a("el-form-item",{attrs:{label:"备注信息"}},[a("el-input",{attrs:{disabled:""},model:{value:e.detailForm.comments,callback:function(t){e.$set(e.detailForm,"comments",t)},expression:"detailForm.comments"}})],1)],1)],1)],1)],1)]),e._v(" "),e._m(0),e._v(" "),a("div",{staticClass:"statistic-table default-style"},[a("div",{staticClass:"report-title"},[e._v("表格统计\n "),a("div",{staticClass:"download_table_statistic"},[a("span",{on:{click:e.downLoadInterfaceTestReportToExcel}},[e._v("导出")])]),e._v(" "),a("div",{staticClass:"only_success_or_fail",on:{click:e.onlyLookSuccessOrFail}},[a("span",[e._v(e._s(e.onlySuccessOrFail))])])]),e._v(" "),a("div",{staticClass:"interface-report-statistic-table"},[a("el-table",{attrs:{data:e.testResultDetails}},[a("el-table-column",{attrs:{label:"序号",type:"index",align:"center",width:"80"}}),e._v(" "),a("el-table-column",{attrs:{label:"测试结果",prop:"testResult",width:"100"}}),e._v(" "),a("el-table-column",{attrs:{label:"接口名称",prop:"interfaceName",width:"300","show-overflow-tooltip":""}}),e._v(" "),a("el-table-column",{attrs:{label:"接口地址",prop:"interfacePath",width:"300","show-overflow-tooltip":""}}),e._v(" "),a("el-table-column",{attrs:{label:"错误原因",prop:"testFailCause","show-overflow-tooltip":""}})],1)],1)])]):e._e()])},staticRenderFns:[function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticClass:"statistic-pic default-style"},[t("div",{staticClass:"report-title"},[this._v("饼图统计")]),this._v(" "),t("div",{staticClass:"interface-report-box-main",attrs:{id:"reportMain"}})])}]};var O=a("VU/8")(B,E,!1,function(e){a("6k33")},"data-v-310f0ad6",null).exports,A={data:function(){return{loading:!1,environmentVariableVisible:!1,testDomain:[],testPort:[],testCaseList:[],itemOptions:[],caseLevelOptions:[],caseExecLevelOptions:[],environmentVariableList:[],queryInfo:{itemId:"",interfaceName:"",interfacePath:"",testCaseLevel:"",writePerson:"",taskId:this.testTaskId,pageNum:1,pageSize:10},currpage:1,total:0,addEnvironmentVariableFormRules:{variableName:[{required:!0,message:"请输入变量名",trigger:"blur"},{min:1,max:50,message:"长度在 1 到 500 个字符",trigger:"blur"}],variableValue:[{required:!0,message:"请输入变量值",trigger:"blur"},{min:1,max:100,message:"长度在 1 到 100 个字符",trigger:"blur"}],comments:[{required:!1,message:"请输入备注",trigger:"blur"},{min:0,max:200,message:"长度在 0 到 200 个字符",trigger:"blur"}]}}},props:["testTaskId","runEnvCode"],created:function(){this.getInterfaceTestCaseList()},mounted:function(){this.getItemNameList(),this.getCaseTypeAndCaseStatusAndCaseLevel()},methods:{updateTestDomain:function(e){var t=this;e.taskId=this.testTaskId,e.caseId=e.id,e.execDomain=e.ipPath,e.execPort=e.port,this.$api.taskrelation.updateInterfaceTestTaskCaseExecLevelAndDomainAndPort(i()(e)).then(function(e){t.$notify({type:"success",message:e.data.msg})}).catch(function(){})},setEnvironmentVariable:function(){var e=this;this.$api.testvariable.queryTaskVariableInfoByTaskId(this.testTaskId).then(function(t){e.environmentVariableList=t.data.data}).catch(function(){}),this.environmentVariableVisible=!0},environmentVariableDialogClose:function(){this.environmentVariableVisible=!1},addEnvironmentVariable:function(){this.environmentVariableList.push({variableName:"",variableValue:"",comments:""})},delEnvironmentVariable:function(e){this.environmentVariableList.splice(e.$index,1)},updateEnvironmentVariable:function(){var e=this;if(this.environmentVariableList.length<=0)this.$notify({type:"warning",message:"至少添加一个变量"});else{var t=!1;document.querySelectorAll(".variable-input .el-input__inner").forEach(function(e){""==e.value?(e.style.border="1px solid red",t=!0):(e.style.border="1px solid #DCDFE6",t=!1)}),t||(this.environmentVariableVisible=!1,this.loading=!0,this.environmentVariableList.forEach(function(t){t.taskId=e.testTaskId}),this.$api.testvariable.updateTestVariableInfo(i()(this.environmentVariableList)).then(function(t){e.$notify({type:"success",message:t.data.msg}),e.loading=!1}).catch(function(){e.loading=!1}))}},selectInterfaceTestTaskCaseList:function(){this.queryInfo.pageNum=1,this.total=0,this.getInterfaceTestCaseList()},getInterfaceTestCaseList:function(){var e=this;this.loading=!0,this.runEnvCode?(this.queryInfo.envCode=this.runEnvCode,this.$api.testdata.queryAllInterfaceTestDataByTaskIdAndEnvCode(i()(this.queryInfo)).then(function(t){e.testCaseList=t.data.data,e.total=t.data.count,e.loading=!1}).catch(function(){e.loading=!1})):this.$api.taskrelation.queryInterfaceTestTaskCase(i()(this.queryInfo)).then(function(t){e.testCaseList=t.data.data,e.total=t.data.count,e.loading=!1}).catch(function(){e.loading=!1})},getItemNameList:function(){var e=this;this.$api.item.queryAllItemIdAndItemName(this.queryInfo.itemName).then(function(t){e.itemOptions=t.data.data}).catch(function(){e.loading=!1})},getCaseTypeAndCaseStatusAndCaseLevel:function(){var e=this;this.$api.dict.queryAllDataDict().then(function(t){e.caseLevelOptions=t.data.data.caseLevel,e.testDomainOptions=t.data.data.domain,e.testPortOptions=t.data.data.port,e.caseExecLevelOptions=t.data.data.caseExecLevel}).catch(function(){})},updateTestCaseExecLevel:function(e){var t=this;e.taskId=this.testTaskId,e.caseId=e.id,this.$api.taskrelation.updateInterfaceTestTaskCaseExecLevelAndDomainAndPort(i()(e)).then(function(e){t.$notify({type:"success",message:e.data.msg})}).catch(function(){})},backParentPage:function(){this.$emit("test-task-case",!1)},handleSizeChange:function(e){this.queryInfo.pageSize=e,this.getInterfaceTestCaseList()},handleCurrentChange:function(e){this.queryInfo.pageNum=e,this.getInterfaceTestCaseList()},delInterfaceTestCase:function(e){var t=this;this.loading=!0,this.$confirm("确定删除吗?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(function(){var a={};a.caseId=e,a.taskId=t.testTaskId,t.$api.taskrelation.delJoinedTestTaskCaseByTaskIdAndCaseId(i()(a)).then(function(e){t.$notify({type:"success",message:e.data.msg}),t.loading=!1,t.selectInterfaceTestTaskCaseList()}).catch(function(){t.loading=!1})}).catch(function(){t.loading=!1})}}},z={render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"interface-test-task-case-box"},[a("el-form",{staticClass:"demo-form-inline",attrs:{inline:!0}},[a("el-form-item",{attrs:{label:"项目名称"}},[a("el-select",{attrs:{placeholder:"请选择",clearable:""},model:{value:e.queryInfo.itemId,callback:function(t){e.$set(e.queryInfo,"itemId",t)},expression:"queryInfo.itemId"}},e._l(e.itemOptions,function(e){return a("el-option",{key:e.id,attrs:{label:e.itemName,value:e.id}})}),1)],1),e._v(" "),a("el-form-item",{attrs:{label:"接口名称"}},[a("el-input",{staticClass:"input-with-select",attrs:{placeholder:"请输入接口名称",clearable:""},model:{value:e.queryInfo.interfaceName,callback:function(t){e.$set(e.queryInfo,"interfaceName",t)},expression:"queryInfo.interfaceName"}})],1),e._v(" "),a("el-form-item",{attrs:{label:"接口地址"}},[a("el-input",{staticClass:"input-with-select",attrs:{placeholder:"请输入接口地址",clearable:""},model:{value:e.queryInfo.interfacePath,callback:function(t){e.$set(e.queryInfo,"interfacePath",t)},expression:"queryInfo.interfacePath"}})],1),e._v(" "),e._e(),e._v(" "),a("el-form-item",{attrs:{label:"编写人员"}},[a("el-input",{staticClass:"input-with-select",attrs:{placeholder:"请输入编写人员",clearable:""},model:{value:e.queryInfo.writePerson,callback:function(t){e.$set(e.queryInfo,"writePerson",t)},expression:"queryInfo.writePerson"}})],1),e._v(" "),a("el-form-item",[a("el-button",{attrs:{type:"primary"},on:{click:e.selectInterfaceTestTaskCaseList}},[e._v("查询")])],1),e._v(" "),a("el-row",[a("el-form-item",[a("el-button",{on:{click:e.backParentPage}},[e._v("返回")])],1),e._v(" "),a("el-form-item",[a("el-button",{attrs:{type:"primary"},on:{click:e.setEnvironmentVariable}},[e._v("环境变量")])],1)],1)],1),e._v(" "),a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"}],ref:"multipleTable",attrs:{"tooltip-effect":"dark",data:e.testCaseList.slice((e.currpage-1)*e.queryInfo.pageSize,e.currpage*e.queryInfo.pageSize),border:"",fit:!0}},[a("el-table-column",{attrs:{label:"序号",type:"index",align:"center",width:"50",fixed:""}}),e._v(" "),a("el-table-column",{attrs:{label:"项目名称",prop:"itemId",width:"150","show-overflow-tooltip":"",fixed:""}}),e._v(" "),a("el-table-column",{attrs:{label:"接口名称",prop:"interfaceName",width:"200","show-overflow-tooltip":"",fixed:""}}),e._v(" "),e._e(),e._v(" "),a("el-table-column",{attrs:{label:"优先级",prop:"execLevel",width:"110"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("el-select",{staticClass:"select-test-result",attrs:{placeholder:"请选择",clearable:""},on:{change:function(a){return e.updateTestCaseExecLevel(t.row)}},model:{value:t.row.execLevel,callback:function(a){e.$set(t.row,"execLevel",a)},expression:"scope.row.execLevel"}},e._l(e.caseExecLevelOptions,function(e){return a("el-option",{key:e.id,attrs:{label:e.dictValue,value:e.dictCode}})}),1)]}}])}),e._v(" "),a("el-table-column",{attrs:{label:"协议类型",prop:"protocolType",width:"100","show-overflow-tooltip":""}}),e._v(" "),a("el-table-column",{attrs:{label:"请求类型",prop:"requestType",width:"100","show-overflow-tooltip":""}}),e._v(" "),a("el-table-column",{attrs:{label:"IP/域名地址",prop:"ipPath",width:"250","show-overflow-tooltip":""}}),e._v(" "),a("el-table-column",{attrs:{label:"端口号",prop:"port",width:"110","show-overflow-tooltip":""}}),e._v(" "),a("el-table-column",{attrs:{label:"接口地址",prop:"interfacePath",width:"200","show-overflow-tooltip":""}}),e._v(" "),a("el-table-column",{attrs:{label:"请求头",prop:"requestHeader",width:"200","show-overflow-tooltip":""}}),e._v(" "),a("el-table-column",{attrs:{label:"请求参数",prop:"requestParams",width:"200","show-overflow-tooltip":""}}),e._v(" "),a("el-table-column",{attrs:{label:"请求体",prop:"requestBody",width:"200","show-overflow-tooltip":""}}),e._v(" "),a("el-table-column",{attrs:{label:"关联参数",prop:"relationValues",width:"200","show-overflow-tooltip":""}}),e._v(" "),a("el-table-column",{attrs:{label:"断言字段",prop:"assertField",width:"200","show-overflow-tooltip":""}}),e._v(" "),a("el-table-column",{attrs:{label:"预期结果",prop:"expectResult",width:"200","show-overflow-tooltip":""}}),e._v(" "),a("el-table-column",{attrs:{label:"编写者",prop:"writePerson","show-overflow-tooltip":""}}),e._v(" "),a("el-table-column",{attrs:{label:"创建时间",prop:"createTime",width:"160"}}),e._v(" "),a("el-table-column",{attrs:{label:"更新人员",prop:"updatePerson",width:"160"}}),e._v(" "),a("el-table-column",{attrs:{label:"更新时间",prop:"updateTime",width:"160"}}),e._v(" "),a("el-table-column",{attrs:{label:"备注",prop:"comments",width:"250","show-overflow-tooltip":""}}),e._v(" "),a("el-table-column",{attrs:{label:"操作",fixed:"right",width:"100",align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("el-button",{attrs:{type:"text",size:"small"},on:{click:function(a){return e.delInterfaceTestCase(t.row.id)}}},[e._v("删除")])]}}])})],1),e._v(" "),a("el-pagination",{attrs:{"page-sizes":[5,10,20,30],"page-size":e.queryInfo.pageSize,layout:"total, sizes, prev, pager, next, jumper",total:e.total},on:{"size-change":e.handleSizeChange,"current-change":e.handleCurrentChange}}),e._v(" "),a("el-dialog",{attrs:{title:"变量设置",visible:e.environmentVariableVisible,"close-on-click-modal":!1,width:"50%"},on:{"update:visible":function(t){e.environmentVariableVisible=t},close:e.environmentVariableDialogClose}},[a("el-row",[a("el-col",{attrs:{span:2}},[a("el-button",{attrs:{size:"mini",type:"primary"},on:{click:e.addEnvironmentVariable}},[e._v("添加变量")])],1)],1),e._v(" "),a("el-table",{ref:"environmentVariableFormRef",attrs:{data:e.environmentVariableList,fit:!0,rules:e.addEnvironmentVariableFormRules}},[a("el-table-column",{attrs:{label:"序号",type:"index",align:"center",width:"100"}}),e._v(" "),e._e(),e._v(" "),e._e(),e._v(" "),a("el-table-column",{attrs:{label:"变量名",prop:"variableName"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("el-input",{staticClass:"variable-input",attrs:{placeholder:"请输入变量名"},model:{value:t.row.variableName,callback:function(a){e.$set(t.row,"variableName",a)},expression:"scope.row.variableName"}})]}}],null,!1,3383068135)}),e._v(" "),a("el-table-column",{attrs:{label:"变量值",width:"180",prop:"variableValue"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("el-input",{staticClass:"variable-input",attrs:{placeholder:"请输入变量值"},model:{value:t.row.variableValue,callback:function(a){e.$set(t.row,"variableValue",a)},expression:"scope.row.variableValue"}})]}}])}),e._v(" "),a("el-table-column",{attrs:{label:"备注"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("el-input",{staticStyle:{width:"100%"},attrs:{placeholder:"请输入备注信息"},model:{value:t.row.comments,callback:function(a){e.$set(t.row,"comments",a)},expression:"scope.row.comments"}})]}}])}),e._v(" "),a("el-table-column",{attrs:{label:"操作",fixed:"right",width:"100",align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("el-button",{staticClass:"variable-add-button",attrs:{type:"text",size:"small"},on:{click:e.addEnvironmentVariable}},[e._v(" + ")]),e._v(" "),a("el-button",{staticClass:"variable-add-button",attrs:{type:"text",size:"small"},on:{click:function(a){return e.delEnvironmentVariable(t)}}},[e._v(" - ")])]}}])})],1),e._v(" "),a("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("el-button",{on:{click:e.environmentVariableDialogClose}},[e._v("取 消")]),e._v(" "),a("el-button",{attrs:{type:"primary"},on:{click:e.updateEnvironmentVariable}},[e._v("确 定")])],1)],1)],1)},staticRenderFns:[]};var H={data:function(){return{loading:!1,tableIsShow:!0,taskListIsShow:!1,testTaskId:"",runEnvCode:"",interfaceTestTaskList:[],operatorPerson:JSON.parse(localStorage.getItem("userInfo")).nick,queryInfo:{jobName:"",createPerson:"",jobGroup:"InterfaceTestTask",pageNum:1,pageSize:10},currpage:1,total:0,runEnvironmentOptions:[]}},components:{InterfaceTestTaskCaseList:a("VU/8")(A,z,!1,function(e){a("RhS1")},"data-v-50c15f5e",null).exports},mounted:function(){this.getTaskRunEnvironmentDataDict()},beforeCreate:function(){},created:function(){this.getTaskList()},methods:{updateRunEnvironment:function(e){var t=this;this.$api.task.updateTaskRunEnvironment(i()(e)).then(function(e){t.$notify({type:"success",message:e.data.msg})}).catch(function(){})},getTaskRunEnvironmentDataDict:function(){var e=this;this.$api.dict.queryAllDataDict().then(function(t){e.runEnvironmentOptions=t.data.data.environment}).catch(function(){})},changeShowCaseFlag:function(e){this.taskListIsShow=!1,this.tableIsShow=!0},changeJobStatus:function(e){var t=this;this.loading=!0,this.$api.task.updateTaskManagerStatus(i()(e)).then(function(e){t.$notify({type:"success",message:e.data.msg}),t.loading=!1}).catch(function(){t.loading=!1})},selectTaskList:function(){this.queryInfo.pageNum=1,this.total=0,this.getTaskList()},getTaskList:function(){var e=this;this.loading=!0,this.$api.task.queryAllTaskManagerInfo(i()(this.queryInfo)).then(function(t){e.interfaceTestTaskList=t.data.data,e.total=t.data.count,e.pageNum=1,e.loading=!1}).catch(function(){e.loading=!1})},handleSizeChange:function(e){this.queryInfo.pageSize=e,this.getTaskList()},handleCurrentChange:function(e){this.queryInfo.pageNum=e,this.getTaskList()},showDetailDialog:function(e){this.testTaskId=e.id,this.runEnvCode=e.runEnvironment,this.tableIsShow=!1,this.taskListIsShow=!0},delTestTaskAndTestCase:function(e){var t=this;this.loading=!0,this.$confirm("确定删除吗?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(function(){t.$api.taskrelation.delAllJoinedTestTaskCaseByTaskId(e).then(function(e){t.$notify({type:"success",message:e.data.msg}),t.loading=!1,t.getTaskList()}).catch(function(){t.loading=!1})}).catch(function(){t.loading=!1})}}},j={render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"}],staticClass:"interface-test-task-list-box"},[e.tableIsShow?a("div",{staticClass:"interface-task-table"},[a("div",{staticClass:"interface-test-task-list-box-query"},[a("el-form",{staticClass:"demo-form-inline",attrs:{inline:!0}},[a("el-form-item",{attrs:{label:"任务名称"}},[a("el-input",{attrs:{placeholder:"请输入任务名称",clearable:""},model:{value:e.queryInfo.jobName,callback:function(t){e.$set(e.queryInfo,"jobName",t)},expression:"queryInfo.jobName"}})],1),e._v(" "),a("el-form-item",{attrs:{label:"创建人员"}},[a("el-input",{attrs:{placeholder:"请输入测试人员姓名",clearable:""},model:{value:e.queryInfo.createPerson,callback:function(t){e.$set(e.queryInfo,"createPerson",t)},expression:"queryInfo.createPerson"}})],1),e._v(" "),a("el-form-item",[a("el-button",{attrs:{type:"primary"},on:{click:e.selectTaskList}},[e._v("查询")])],1)],1)],1),e._v(" "),a("el-table",{attrs:{data:e.interfaceTestTaskList.slice((e.currpage-1)*e.queryInfo.pageSize,e.currpage*e.queryInfo.pageSize),border:"",fit:!0}},[a("el-table-column",{attrs:{label:"序号",type:"index",align:"center",width:"80"}}),e._v(" "),a("el-table-column",{attrs:{label:"任务名称",prop:"jobName"}}),e._v(" "),a("el-table-column",{attrs:{label:"运行环境",prop:"runEnvironment",width:"150"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("el-select",{staticClass:"select-test-result",attrs:{placeholder:"请选择",clearable:""},on:{change:function(a){return e.updateRunEnvironment(t.row)}},model:{value:t.row.runEnvironment,callback:function(a){e.$set(t.row,"runEnvironment",a)},expression:"scope.row.runEnvironment"}},e._l(e.runEnvironmentOptions,function(e){return a("el-option",{key:e.id,attrs:{label:e.dictValue,value:e.dictCode}})}),1)]}}],null,!1,261706603)}),e._v(" "),a("el-table-column",{attrs:{label:"任务状态",prop:"jobStatus",width:"100"},scopedSlots:e._u([{key:"default",fn:function(t){return["default"!=t.row.beanClass?a("el-switch",{attrs:{"active-value":"1","inactive-value":"0"},on:{change:function(a){return e.changeJobStatus(t.row)}},model:{value:t.row.jobStatus,callback:function(a){e.$set(t.row,"jobStatus",a)},expression:"scope.row.jobStatus"}}):e._e()]}}],null,!1,3955362618)}),e._v(" "),a("el-table-column",{attrs:{label:"创建时间",prop:"createTime",width:"180"}}),e._v(" "),a("el-table-column",{attrs:{label:"创建人员",prop:"createPerson",width:"120"}}),e._v(" "),a("el-table-column",{attrs:{label:"更新时间",prop:"updateTime",width:"180"}}),e._v(" "),a("el-table-column",{attrs:{label:"更新人员",prop:"updatePerson",width:"120"}}),e._v(" "),a("el-table-column",{attrs:{label:"备注",prop:"comments","show-overflow-tooltip":""}}),e._v(" "),a("el-table-column",{attrs:{label:"操作",fixed:"right",width:"150",align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("el-button",{attrs:{type:"text",size:"small"},on:{click:function(a){return e.showDetailDialog(t.row)}}},[e._v("查看")]),e._v(" "),a("el-button",{attrs:{type:"text",size:"small"},on:{click:function(a){return e.delTestTaskAndTestCase(t.row.id)}}},[e._v("删除")])]}}],null,!1,241536508)})],1),e._v(" "),a("el-pagination",{attrs:{"current-page":e.currpage,"page-sizes":[5,10,20,30],"page-size":e.queryInfo.pageSize,layout:"prev, pager, next, sizes, total, jumper",total:e.total},on:{"size-change":e.handleSizeChange,"current-change":e.handleCurrentChange}})],1):e._e(),e._v(" "),e.taskListIsShow?a("div",{staticClass:"interface-case-table"},[e.taskListIsShow?a("interface-test-task-case-list",{ref:"testTaskCase",attrs:{testTaskId:e.testTaskId,runEnvCode:e.runEnvCode},on:{"test-task-case":e.changeShowCaseFlag}}):e._e()],1):e._e()])},staticRenderFns:[]};var U={data:function(){return{activeName:"statistic",load:{statistic:!0,info:!1,taskList:!1,report:!1},pageName:"interface"}},mounted:function(){},created:function(){},methods:{handleClick:function(e,t){!1===this.load[e.name]&&(this.load[e.name]=!0)},invokeInterface:function(){this.load.info&&this.$refs.interfaceInfoRef.invokeInterfaceInfo()}},components:{InterfaceStatistic:o,InterfaceInfo:D,InterfaceTestReport:O,InterfaceTestTaskList:a("VU/8")(H,j,!1,function(e){a("wos/")},"data-v-1420866b",null).exports}},J={render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"interface-box"},[a("el-tabs",{on:{"tab-click":e.handleClick},model:{value:e.activeName,callback:function(t){e.activeName=t},expression:"activeName"}},[a("el-tab-pane",{attrs:{label:"概览",name:"statistic"}},[a("interface-statistic")],1),e._v(" "),a("el-tab-pane",{attrs:{label:"接口信息",name:"info"}},[e.load.info?a("interface-info",{ref:"interfaceInfoRef"}):e._e()],1),e._v(" "),a("el-tab-pane",{attrs:{label:"任务列表",name:"taskList"}},[e.load.taskList?a("interface-test-task-list"):e._e()],1),e._v(" "),a("el-tab-pane",{attrs:{label:"报告列表",name:"report"}},[e.load.report?a("interface-test-report"):e._e()],1)],1)],1)},staticRenderFns:[]};var M=a("VU/8")(U,J,!1,function(e){a("4C4r")},"data-v-e966299e",null);t.default=M.exports},IvLD:function(e,t){},LsBy:function(e,t){},RhS1:function(e,t){},SMnT:function(e,t){},aGJ5:function(e,t){},iMuj:function(e,t){},vLxd:function(e,t){},"wos/":function(e,t){}});
//# sourceMappingURL=1.5ea73d8c812e95ec5d67.js.map