(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-4d04fe3e"],{"118d":function(t,e,a){"use strict";a("4b14")},1619:function(t,e,a){"use strict";function n(t,e){var a="undefined"!==typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!a){if(Array.isArray(t)||(a=i(t))||e&&t&&"number"===typeof t.length){a&&(t=a);var n=0,o=function(){};return{s:o,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,s=!0,c=!1;return{s:function(){a=a.call(t)},n:function(){var t=a.next();return s=t.done,t},e:function(t){c=!0,r=t},f:function(){try{s||null==a.return||a.return()}finally{if(c)throw r}}}}function i(t,e){if(t){if("string"===typeof t)return o(t,e);var a=Object.prototype.toString.call(t).slice(8,-1);return"Object"===a&&t.constructor&&(a=t.constructor.name),"Map"===a||"Set"===a?Array.from(t):"Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a)?o(t,e):void 0}}function o(t,e){(null==e||e>t.length)&&(e=t.length);for(var a=0,n=new Array(e);a=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,r=!0,s=!1;return{s:function(){a=a.call(t)},n:function(){var t=a.next();return r=t.done,t},e:function(t){s=!0,o=t},f:function(){try{r||null==a.return||a.return()}finally{if(s)throw o}}}}function d(t,e){if(t){if("string"===typeof t)return f(t,e);var a=Object.prototype.toString.call(t).slice(8,-1);return"Object"===a&&t.constructor&&(a=t.constructor.name),"Map"===a||"Set"===a?Array.from(t):"Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a)?f(t,e):void 0}}function f(t,e){(null==e||e>t.length)&&(e=t.length);for(var a=0,n=new Array(e);a=1&&this.$refs["editTaskUploader"].uploadFiles.forEach((function(n){if(e=n.size/1024/1024<20,!e)return t.$message.info("单个文件大小不能超过20M"),!1;a.append("files",n.raw)})),a.append("title",this.newTask.title),a.append("state",""),a.append("description",this.newTask.description);var n,i="",o=u(this.checkedList);try{for(o.s();!(n=o.n()).done;){var s=n.value;i+="&&"+s}}catch(c){o.e(c)}finally{o.f()}i=i.slice(2),console.log(i),a.append("executors",i),a.append("edit_state_only",!1),Object(r["d"])(this.taskId,a).then((function(e){t.checkTaskDetail(t.taskId),t.editTaskModal=!1}))}else this.$message.warning("计划名称不能为空!")},checkTaskDetail:function(t){var e=this;Object(r["a"])(t).then((function(t){e.pageVO=t,e.task=t.task,console.log(e.pageVO,"获取详情任务res"),e.newTask=Object.assign({},t.task),e.state=t.task.state,e.caseAll=t.task.case_all,e.caseFail=t.task.case_fail,e.caseSuccess=t.task.case_success,e.caseNotExe=t.task.case_not_execute}))},jumpToPlanDetail:function(){this.$router.push("/softwareTestPlanDetail/"+this.pageVO.plan.id)},jumpToTargetDetail:function(){this.$router.push("/softwareDetail/"+this.pageVO.software_id)},confirmExcuteTask:function(){var t,e=this,a=new FormData;this.$refs["excuteTaskUploader"].uploadFiles.length>=1&&this.$refs["excuteTaskUploader"].uploadFiles.forEach((function(n){if(t=n.size/1024/1024<20,!t)return e.$message.info("单个文件大小不能超过20M"),!1;a.append("file",n.raw)})),console.log(this.$refs["excuteTaskUploader"].uploadFiles),Object(r["e"])(this.taskId,a).then((function(t){console.log(t,"测试用例执行信息"),50001!=t.status?(e.$refs["excuteTaskUploader"].clearFiles(),console.log("执行测试任务结果",t),e.checkTaskDetail(e.taskId),e.$message.success("上传成功"),e.excuteTaskModal=!1):e.$message.error({message:t.error,duration:1e4})}))},downloadExcutionFile:function(){},checkPerm:function(t){return Object(s["a"])(localStorage.getItem("identity"),t)},changeTaskState:function(t){var e=this,a=new FormData;a.append("edit_state_only","1"),a.append("state",t),Object(r["d"])(this.taskId,a).then((function(t){console.log("只改变状态,",t),e.checkTaskDetail(e.taskId),e.editTaskModal=!1,e.beginExceutModal=!1,e.confirmFinishModal=!1,e.checkTaskDetail(e.taskId)}))},deleteFileFirstStep:function(t){this.deleteFileModal=!0,this.fileId=t.file_id,console.log(t,"ddddd")},confirmDeleteFile:function(){var t=this;Object(l["b"])("task_statement","",this.taskId,this.fileId).then((function(e){console.log("删除fileres",e),t.checkTaskDetail(t.taskId),t.deleteFileModal=!1}))},appendTaskFile:function(){var t,e=this,a=new FormData;this.$refs["newTaskFileUploader"].uploadFiles.length>=1&&this.$refs["newTaskFileUploader"].uploadFiles.forEach((function(n){if(t=n.size/1024/1024<20,!t)return e.$message.info("单个文件大小不能超过20M"),!1;a.append("files",n.raw)})),a.append("type","task_statement"),a.append("plan_id",""),a.append("task_id",this.taskId),Object(l["a"])(a).then((function(t){console.log("新增文件res",t),e.checkTaskDetail(e.taskId),e.appendFileModal=!1}))},getTaskExecState:function(t){return 2==t?3:t}}},h=p,k=(a("118d"),a("2877")),m=Object(k["a"])(h,n,i,!1,null,"76602aff",null);e["default"]=m.exports},"3f5e":function(t,e,a){"use strict";a.d(e,"a",(function(){return i})),a.d(e,"b",(function(){return o}));var n=a("b775");function i(t){return Object(n["a"])({url:"/v1/files/",method:"POST",data:t})}function o(t,e,a,i){return Object(n["a"])({url:"/v1/files/",method:"DELETE",params:{type:t,plan_id:e,task_id:a,file_id:i}})}},"4b14":function(t,e,a){},"90c2":function(t,e,a){"use strict";a.d(e,"b",(function(){return i})),a.d(e,"a",(function(){return o})),a.d(e,"c",(function(){return r})),a.d(e,"d",(function(){return s})),a.d(e,"f",(function(){return c})),a.d(e,"e",(function(){return l}));var n=a("b775");function i(t){return Object(n["a"])({url:"/v1/test-tasks/",method:"POST",data:t})}function o(t){return Object(n["a"])({url:"/v1/test-tasks/".concat(t),method:"GET"})}function r(t){return Object(n["a"])({url:"/v1/test-tasks/".concat(t),method:"DELETE"})}function s(t,e){return Object(n["a"])({url:"/v1/test-tasks/".concat(t,"/edit"),method:"POST",data:e})}function c(t,e,a,i,o){return Object(n["a"])({url:"/v1/test-tasks/",method:"GET",params:{executor_id:i,title:t,state:e,software_id:a,sort:o}})}function l(t,e){return Object(n["a"])({url:"/v1/test-tasks/".concat(t,"/case-file/execute"),method:"POST",data:e})}},b775:function(t,e,a){"use strict";var n=a("bc3a"),i=a.n(n),o=a("5c96");a("c0d6");i.a.defaults.withCredentials=!0;var r=i.a.create({baseURL:"/api",withCredentials:!0,timeout:1e5});r.interceptors.response.use((function(t){var e=t.data;return e}),(function(t){return console.log("err"+t),t.response.data.length>1e3?Object(o["Message"])({message:"服务器出错",type:"error",duration:3e3}):Object(o["Message"])({message:t.response.data,type:"error",duration:2e4}),Promise.reject(t)})),r.interceptors.request.use((function(t){var e=window.localStorage.getItem("accessToken");return e?(t.headers.accessToken=e,t):t})),e["a"]=r},c24f:function(t,e,a){"use strict";a.d(e,"c",(function(){return i})),a.d(e,"b",(function(){return o})),a.d(e,"a",(function(){return r})),a.d(e,"e",(function(){return s})),a.d(e,"d",(function(){return c}));var n=a("b775");function i(t){return Object(n["a"])({url:"/v1/users/login",method:"POST",data:t})}function o(t){return Object(n["a"])({url:"/v1/users/",method:"GET",params:{user_id:t}})}function r(t){return Object(n["a"])({url:"/v1/users/".concat(t),method:"GET"})}function s(t,e){return Object(n["a"])({url:"/v1/users/".concat(t,"/edit"),method:"POST",data:e})}function c(t){return Object(n["a"])({url:"/v1/users/",method:"POST",data:t})}},e350:function(t,e,a){"use strict";function n(t,e){var a=i[t];return a.includes(e)}a.d(e,"a",(function(){return n}));var i=[["CHECK","EDIT","DELETE","CREATE","EXECUTE","DELETE","CONFIRM","EXPORT"],["CHECK","EDIT","DELETE","CREATE","EXECUTE","DELETE","CONFIRM","EXPORT"],["CHECK","EXECUTE"]]}}]);