(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-10d2afba"],{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(t){e.append("files",t.raw)})),e.append("title",this.newTask.title),e.append("state",""),e.append("description",this.newTask.description);var a,n="",i=u(this.checkedList);try{for(i.s();!(a=i.n()).done;){var o=a.value;n+="&&"+o}}catch(s){i.e(s)}finally{i.f()}n=n.slice(2),console.log(n),e.append("executors",n),e.append("edit_state_only",!1),Object(r["d"])(this.taskId,e).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=this,e=new FormData;this.$refs["excuteTaskUploader"].uploadFiles.length>=1&&this.$refs["excuteTaskUploader"].uploadFiles.forEach((function(t){e.append("file",t.raw)})),console.log(this.$refs["excuteTaskUploader"].uploadFiles),Object(r["e"])(this.taskId,e).then((function(e){console.log(e,"测试用例执行信息"),50001!=e.status?(t.$refs["excuteTaskUploader"].clearFiles(),console.log("执行测试任务结果",e),t.checkTaskDetail(t.taskId),t.$message.success("上传成功"),t.excuteTaskModal=!1):t.$message.error({message:e.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=this,e=new FormData;this.$refs["newTaskFileUploader"].uploadFiles.length>=1&&this.$refs["newTaskFileUploader"].uploadFiles.forEach((function(t){e.append("files",t.raw)})),e.append("type","task_statement"),e.append("plan_id",""),e.append("task_id",this.taskId),Object(l["a"])(e).then((function(e){console.log("新增文件res",e),t.checkTaskDetail(t.taskId),t.appendFileModal=!1}))},getTaskExecState:function(t){return 2==t?3:t}}},h=p,k=(a("7816"),a("2877")),m=Object(k["a"])(h,n,i,!1,null,"5aacad4c",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:"/api/v1/files/",method:"POST",data:t})}function o(t,e,a,i){return Object(n["a"])({url:"/api/v1/files/",method:"DELETE",params:{type:t,plan_id:e,task_id:a,file_id:i}})}},4956:function(t,e,a){},7816:function(t,e,a){"use strict";a("4956")},"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:"/api/v1/test-tasks/",method:"POST",data:t})}function o(t){return Object(n["a"])({url:"/api/v1/test-tasks/".concat(t),method:"GET"})}function r(t){return Object(n["a"])({url:"/api/v1/test-tasks/".concat(t),method:"DELETE"})}function s(t,e){return Object(n["a"])({url:"/api/v1/test-tasks/".concat(t,"/edit"),method:"POST",data:e})}function c(t,e,a,i,o){return Object(n["a"])({url:"/api/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:"/api/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({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,"e",(function(){return i})),a.d(e,"d",(function(){return o})),a.d(e,"b",(function(){return r})),a.d(e,"g",(function(){return s})),a.d(e,"f",(function(){return c})),a.d(e,"c",(function(){return l})),a.d(e,"a",(function(){return u}));var n=a("b775");function i(t){return Object(n["a"])({url:"/api/v1/users/login",method:"POST",data:t})}function o(t){return Object(n["a"])({url:"/api/v1/group/user",method:"GET",params:{user_id:t}})}function r(t){return Object(n["a"])({url:"/api/v1/users/".concat(t),method:"GET"})}function s(t,e){return Object(n["a"])({url:"/api/v1/users/".concat(t,"/edit"),method:"POST",data:e})}function c(t){return Object(n["a"])({url:"/api/v1/users/",method:"POST",data:t})}function l(){return Object(n["a"])({url:"/api/v1/users/",method:"GET",params:{username:"",identify:"",is_login:"",sort:""}})}function u(){return Object(n["a"])({url:"/api/v1/users/export",method:"GET"})}},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"]]}}]);