1 |
- (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<e;a++)n[a]=t[a];return n}function r(t){var e,a=[],i=n(t);try{for(i.s();!(e=i.n()).done;){var o=e.value,r=o.create_time.split("T")[0],s=o.create_time.split("T")[1].slice(0,8);o.create_time=r+" "+s;var c=o.update_time.split("T")[0],l=o.update_time.split("T")[1].slice(0,8);o.update_time=c+" "+l,o.creator=(o.executor||{}).name,a.push(o)}}catch(u){i.e(u)}finally{i.f()}return a}function s(t){var e=t.split("T")[0],a=(t.split("T")[1]+" ").slice(0,8);return e+" "+a}function c(t){switch(t){case 0:return"执行中";case 1:return"已归档";default:return"无"}}function l(t){switch(t){case 0:return"未执行";case 1:return"执行中";case 2:return"已完成";default:return"无"}}function u(t){switch(t){case 0:return"管理员";case 1:return"管理员";case 2:return"工程师";default:return"工程师"}}a.d(e,"d",(function(){return r})),a.d(e,"c",(function(){return s})),a.d(e,"b",(function(){return c})),a.d(e,"e",(function(){return l})),a.d(e,"a",(function(){return u}))},"3b07":function(t,e,a){"use strict";a.r(e);var n=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticStyle:{"min-width":"1100px"}},[a("CCard",[a("CCardHeader",[a("h5",{staticStyle:{display:"inline-block"}},[t._v("任务名称: "+t._s(t.task.title))]),a("br"),a("span",{staticClass:"infoColor "},[t._v("创建时间: "+t._s(t._f("singleDateFilter")(this.pageVO.create_time)))]),a("span",{staticClass:"infoColor textMarginLeft"},[t._v("最后更新时间: "+t._s(t._f("singleDateFilter")(this.pageVO.update_time)))]),t.checkPerm("EDIT")?a("div",{staticClass:"card-header-actions"},[a("a",{staticClass:"card-header-action",attrs:{href:"javascript:;",rel:"noreferrer noopener"},on:{click:function(e){t.editTaskModal=!0}}},[a("CIcon",{attrs:{name:"cil-pencil"}})],1)]):t._e()]),a("CCardBody",[a("span",[t._v("计划描述: "+t._s(t.task.description))]),a("br"),a("br"),a("span",{staticClass:" "},[t._v("状态: "+t._s(t._f("taskStateFilter")(t.task.state)))]),a("span",{staticClass:"textMarginLeft"},[t._v("所属软件名称: "),a("el-tooltip",{staticClass:"item",attrs:{effect:"dark",content:"点击查看测试项目详情",placement:"bottom"}},[a("a",{staticStyle:{cursor:"pointer","text-decoration":"underline"},on:{click:t.jumpToTargetDetail}},[t._v(" "+t._s(t.pageVO.software_name)+" ")])])],1),a("span"),a("span",{staticClass:"textMarginLeft"},[t._v("版本: "+t._s(t.pageVO.version))]),a("br"),a("br"),a("span",[t._v("所属计划: "),a("el-tooltip",{staticClass:"item",attrs:{effect:"dark",content:"点击查看计划详情",placement:"bottom"}},[a("a",{staticStyle:{cursor:"pointer","text-decoration":"underline"},on:{click:t.jumpToPlanDetail}},[t._v(" "+t._s(t.pageVO.plan.title)+" ")])])],1),a("br"),a("br"),a("CCard",[a("CCardHeader",[a("CIcon",{attrs:{name:"cil-justify-center"}}),a("strong",[t._v(" 测试任务说明文档 ")]),t.checkPerm("CREATE")?a("CButton",{staticStyle:{width:"100px",float:"right"},attrs:{block:"",color:"primary"},on:{click:function(e){t.appendFileModal=!0}}},[t._v("+新增")]):t._e()],1),a("CCardBody",[a("CListGroup",{attrs:{accent:""}},t._l(this.pageVO.task.statements,(function(e){return a("CListGroupItem",{key:e.file_url,staticClass:"d-flex justify-content-between align-items-center",attrs:{href:"#",color:"secondary",accent:"secondary"}},[t._v(" "+t._s(e.file_name)+" "),a("div",[t.checkPerm("CHECK")?a("CButton",{staticStyle:{width:"50px","margin-right":"10px"},attrs:{color:"primary",variant:"outline",square:"",size:"sm"},on:{click:function(a){return t.checkFile(e.file_url)}}},[t._v(" 下载 ")]):t._e(),t.checkPerm("DELETE")?a("CButton",{staticStyle:{width:"50px"},attrs:{color:"danger",variant:"outline",square:"",size:"sm"},on:{click:function(a){return t.deleteFileFirstStep(e)}}},[t._v(" 删除 ")]):t._e()],1)])})),1)],1)],1)],1)],1),a("CModal",{attrs:{show:t.beginExceutModal,"no-close-on-backdrop":!0,centered:!0,title:"Modal title 2",size:"lg",color:"warning"},on:{"update:show":function(e){t.beginExceutModal=e}},scopedSlots:t._u([{key:"header",fn:function(){return[a("h6",{staticClass:"modal-title"},[t._v("确认执行")]),a("CButtonClose",{staticClass:"text-white",on:{click:function(e){t.beginExceutModal=!1}}})]},proxy:!0},{key:"footer",fn:function(){return[a("CButton",{attrs:{color:"danger"},on:{click:function(e){t.beginExceutModal=!1}}},[t._v("取消")]),a("CButton",{staticStyle:{backgroundColor:"rgb(50,31,219)",color:"white"},on:{click:function(e){return t.changeTaskState(1)}}},[t._v("开始执行")])]},proxy:!0}])},[a("h5",[t._v("你确定开始执行测试用例吗?开始执行后将无法修改已上传的测试用例!")])]),a("CModal",{attrs:{show:t.confirmFinishModal,"no-close-on-backdrop":!0,centered:!0,title:"Modal title 2",size:"lg",color:"warning"},on:{"update:show":function(e){t.confirmFinishModal=e}},scopedSlots:t._u([{key:"header",fn:function(){return[a("h6",{staticClass:"modal-title"},[t._v("确认执行")]),a("CButtonClose",{staticClass:"text-white",on:{click:function(e){t.confirmFinishModal=!1}}})]},proxy:!0},{key:"footer",fn:function(){return[a("CButton",{attrs:{color:"danger"},on:{click:function(e){t.confirmFinishModal=!1}}},[t._v("取消")]),a("CButton",{staticStyle:{backgroundColor:"rgb(50,31,219)",color:"white"},on:{click:function(e){return t.changeTaskState(2)}}},[t._v("确认完成")])]},proxy:!0}])},[a("h5",[t._v("你确定完成该任务吗?确认完成后将无法修改该测试任务的执行结果!")])]),a("CCard",[a("CCardHeader",[a("h5",{staticStyle:{display:"inline"}},[t._v("测试任务执行")]),a("div",{staticStyle:{float:"right"}},[a("div",{staticStyle:{margin:"0px auto"}},[t.checkPerm("EXECUTE")&&0==this.state&&t.pageVO.task.case_file.file_name&&t.checkPerm("CONFIRM")?a("el-button",{attrs:{size:"mini"},on:{click:function(e){t.beginExceutModal=!0}}},[t._v("开始执行")]):t._e(),t.checkPerm("EXECUTE")&&1==this.state&&t.pageVO.task.case_file.file_name?a("el-button",{attrs:{size:"mini"},on:{click:function(e){t.confirmFinishModal=!0}}},[t._v("确认完成")]):t._e()],1)])]),a("CCardBody",[a("h5",{staticStyle:{"margin-top":"40px"}}),a("el-steps",{staticStyle:{margin:"40px 80px"},attrs:{active:t.getTaskExecState(t.state),"finish-status":"success"}},[a("el-step",{attrs:{title:"用例评审",description:""}}),a("el-step",{attrs:{title:"测试执行",description:""}}),a("el-step",{attrs:{title:"测试完成",description:""}})],1),0==t.state?a("div",[t.pageVO.task.case_file.file_name?a("p",{staticStyle:{"margin-left":"80px"}},[t._v("已上传文件:"),a("a",{staticStyle:{color:"rgb(50,31,219)",cursor:"pointer"},on:{click:function(e){return t.checkFile(t.pageVO.task.case_file.file_url)}}},[t._v(t._s(t.pageVO.task.case_file.file_name))])]):t._e(),t.checkPerm("EXECUTE")?a("el-button",{staticStyle:{color:"rgb(50,31,219)",cursor:"pointer","margin-left":"80px","margin-top":"20px"},on:{click:function(e){t.excuteTaskModal=!0}}},[t._v("上传测试用例 ")]):t._e(),a("span",{staticStyle:{"margin-top":"40px","margin-left":"40px",fontSize:"12px"}},[a("a",{staticStyle:{color:"rgb(50,31,219)",cursor:"pointer"},on:{click:function(e){return t.checkFile(t.pageVO.task.case_template)}}},[t._v("测试用例模板文件.xls")])])],1):t._e(),1==t.state?a("div",{staticStyle:{"margin-top":"40px","margin-bottom":"20px"}},[t.checkPerm("EXECUTE")?a("el-button",{staticStyle:{color:"rgb(50,31,219)",cursor:"pointer","margin-left":"80px","margin-top":"20px"},on:{click:function(e){return t.checkFile(t.pageVO.task.case_file.file_url)}}},[t._v("下载测试用例 ")]):t._e(),t.checkPerm("EXECUTE")?a("el-button",{staticStyle:{color:"rgb(50,31,219)",cursor:"pointer","margin-left":"20px","margin-top":"20px"},on:{click:function(e){t.excuteTaskModal=!0}}},[t._v("上传执行结果 ")]):t._e()],1):t._e(),0!=t.state?a("div",[a("div",[a("CProgress",{staticClass:"mt-1",staticStyle:{margin:"40px 80px 0px 80px"},attrs:{showValue:"",max:t.caseAll}},[a("CProgressBar",{attrs:{value:t.caseSuccess,color:"success"}}),a("CProgressBar",{attrs:{value:t.caseNotExe,color:"warning"}}),a("CProgressBar",{attrs:{value:t.caseFail,color:"danger"}})],1),a("div",{staticStyle:{"margin-left":"80px",fontSize:"12px"}},[t._v(" 通过"),a("div",{staticClass:"indexColor",staticStyle:{backgroundColor:"rgb(46,184,92)"}}),t._v(" 未测"),a("div",{staticClass:"indexColor",staticStyle:{backgroundColor:"rgb(249,177,21)"}}),t._v(" 失败"),a("div",{staticClass:"indexColor",staticStyle:{backgroundColor:"rgb(229,83,83)"}})]),2==t.state?a("div",[t.pageVO.task.case_file.file_name?a("p",{staticStyle:{"margin-left":"80px","margin-top":"20px"}},[t._v("最终文件:"),a("a",{staticStyle:{color:"rgb(50,31,219)",cursor:"pointer"},on:{click:function(e){return t.checkFile(t.pageVO.task.case_file.file_url)}}},[t._v(t._s(t.pageVO.task.case_file.file_name))])]):t._e()]):t._e()],1)]):t._e()],1)],1),a("CModal",{attrs:{show:t.editTaskModal,"no-close-on-backdrop":!0,centered:!0,title:"Modal title 2",size:"lg",color:"primary"},on:{"update:show":function(e){t.editTaskModal=e}},scopedSlots:t._u([{key:"header",fn:function(){return[a("h6",{staticClass:"modal-title"},[t._v("编辑测试任务")]),a("CButtonClose",{staticClass:"text-white",on:{click:function(e){t.editTaskModal=!1}}})]},proxy:!0},{key:"footer",fn:function(){return[a("CButton",{attrs:{color:"danger"},on:{click:function(e){t.editTaskModal=!1}}},[t._v("取消")]),a("CButton",{staticStyle:{backgroundColor:"rgb(50,31,219)",color:"white"},on:{click:t.confirmEditTask}},[t._v("确定")])]},proxy:!0}])},[a("CInput",{attrs:{label:"名称",placeholder:"请输入测试任务名称"},model:{value:t.newTask.title,callback:function(e){t.$set(t.newTask,"title",e)},expression:"newTask.title"}}),a("CInput",{attrs:{label:"描述",placeholder:"请输入测试任务描述"},model:{value:t.newTask.description,callback:function(e){t.$set(t.newTask,"description",e)},expression:"newTask.description"}}),a("p",{staticStyle:{marginBottom:"6px",marginTop:"20px"}},[t._v("请上传文件")]),a("el-upload",{ref:"editTaskUploader",staticClass:"upload-demo",attrs:{action:"","auto-upload":!1,"file-list":t.fileList,multiple:!0}},[a("el-button",{staticStyle:{backgroundColor:"rgb(50,31,219)",color:"white"},attrs:{size:"small"}},[t._v("点击上传")])],1)],1),a("CModal",{attrs:{show:t.excuteTaskModal,"no-close-on-backdrop":!0,centered:!0,title:"Modal title 2",size:"lg",color:"primary"},on:{"update:show":function(e){t.excuteTaskModal=e}},scopedSlots:t._u([{key:"header",fn:function(){return[a("h6",{staticClass:"modal-title"},[t._v("请上传执行结果文件")]),a("CButtonClose",{staticClass:"text-white",on:{click:function(e){t.excuteTaskModal=!1}}})]},proxy:!0},{key:"footer",fn:function(){return[a("CButton",{attrs:{color:"danger"},on:{click:function(e){t.excuteTaskModal=!1}}},[t._v("取消")]),a("CButton",{staticStyle:{backgroundColor:"rgb(50,31,219)",color:"white"},on:{click:t.confirmExcuteTask}},[t._v("确定")])]},proxy:!0}])},[a("el-upload",{ref:"excuteTaskUploader",staticClass:"upload-demo",attrs:{action:"","auto-upload":!1,limit:1,"file-list":t.excuteTaskFileList,multiple:!0}},[a("el-button",{staticClass:"el-upload__tsip",attrs:{size:"small"}},[t._v("点击上传")])],1)],1),a("CModal",{attrs:{show:t.deleteFileModal,"no-close-on-backdrop":!0,centered:!0,title:"Modal title 2",size:"lg",color:"danger"},on:{"update:show":function(e){t.deleteFileModal=e}},scopedSlots:t._u([{key:"header",fn:function(){return[a("h6",{staticClass:"modal-title"},[t._v("删除测试计划文件")]),a("CButtonClose",{staticClass:"text-white",on:{click:function(e){t.deleteFileModal=!1}}})]},proxy:!0},{key:"footer",fn:function(){return[a("CButton",{on:{click:function(e){t.deleteFileModal=!1}}},[t._v("取消")]),a("CButton",{attrs:{color:"danger"},on:{click:t.confirmDeleteFile}},[t._v("删除")])]},proxy:!0}])},[a("h5",[t._v("你确定删除该文件吗?")])]),a("CModal",{attrs:{show:t.appendFileModal,"no-close-on-backdrop":!0,centered:!0,title:"Modal title 2",size:"lg",color:"primary"},on:{"update:show":function(e){t.appendFileModal=e}},scopedSlots:t._u([{key:"header",fn:function(){return[a("h6",{staticClass:"modal-title"},[t._v("新增测试计划文件")]),a("CButtonClose",{staticClass:"text-white",on:{click:function(e){t.appendFileModal=!1}}})]},proxy:!0},{key:"footer",fn:function(){return[a("CButton",{attrs:{color:"danger"},on:{click:function(e){t.appendFileModal=!1}}},[t._v("取消")]),a("CButton",{attrs:{color:"primary"},on:{click:t.appendTaskFile}},[t._v("新增")])]},proxy:!0}])},[a("el-upload",{ref:"newTaskFileUploader",staticClass:"upload-demo",attrs:{action:"","auto-upload":!1,limit:5,multiple:!0,"file-list":t.fileList}},[a("el-button",{staticStyle:{backgroundColor:"rgb(50,31,219)",color:"white"},attrs:{size:"small"}},[t._v("点击上传")])],1)],1)],1)},i=[],o=a("1619"),r=a("90c2"),s=a("e350"),c=a("c24f"),l=a("3f5e");function u(t,e){var a="undefined"!==typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!a){if(Array.isArray(t)||(a=d(t))||e&&t&&"number"===typeof t.length){a&&(t=a);var n=0,i=function(){};return{s:i,n:function(){return n>=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<e;a++)n[a]=t[a];return n}var p={name:"TestTaskDetail",data:function(){return{taskId:"",pageVO:{},task:{},newTask:{},editTaskModal:!1,fileList:[],radio:0,userList:[],groupList:[],excuteTaskModal:!1,excuteTaskFileList:[],caseAll:0,caseFail:0,caseSuccess:0,caseNotExe:0,excutionInfo:[{operationName:"状态",content:"没有提交"},{operationName:"最后修改",content:"2020.10.26"},{operationName:"文件名称",content:"-"}],state:0,beginExceutModal:!1,confirmFinishModal:!1,deleteFileModal:!1,fileId:"",appendFileModal:!1,defaultProps:{children:"children",label:"label"},checkedList:[]}},mounted:function(){var t=this;this.taskId=localStorage.getItem("taskId"),this.checkTaskDetail(this.taskId),2!=localStorage.getItem("identity")&&Object(c["d"])(localStorage.getItem("userId")).then((function(e){console.log(e,"userList testTask inside");var a=[];e.map((function(t){var e={};e.id=t.groupName,e.label=t.groupName,e.children=t.userList.map((function(t){return{id:t.userid,label:t.username}})),a.push(e)})),console.log(a,"tmpArr"),t.groupList=a}))},filters:{singleDateFilter:o["c"],targetDateFilter:o["d"],planStateFilter:o["b"],taskStateFilter:o["e"]},computed:{},watch:{},methods:{getBadge:function(t){switch(t){case 0:return"secondary";case 1:return"primary";case 2:return"success";default:}},checkFile:function(t){var e=document.createElement("a");e.style.display="none",e.href=t,e.target="_blank",e.click()},handleCheckChange:function(t,e,a){if(console.log(t,e,a),e)t.children||this.checkedList.includes(t.id)||(this.checkedList.push(t.id),console.log(this.checkedList,"push checkedList"));else if(!t.children&&this.checkedList.includes(t.id)){console.log("include this.checkedList",this.checkedList);var n=this.checkedList.indexOf(t.id);console.log(n,"index"),this.checkedList.splice(n,1),console.log(this.checkedList)}console.log(this.checkedList,"checkedList")},confirmEditTask:function(){var t=this;if(""!=this.newTask.title)if(this.$refs["editTaskUploader"].uploadFiles.length<1)this.$message.warning("请上传文件!");else{var e=new FormData;this.$refs["editTaskUploader"].uploadFiles.length>=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"]]}}]);
|