(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2c8f5038"],{1619:function(e,t,n){"use strict";function r(e,t){var n="undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=a(e))||t&&e&&"number"===typeof e.length){n&&(e=n);var r=0,o=function(){};return{s:o,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},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 i,s=!0,c=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return s=e.done,e},e:function(e){c=!0,i=e},f:function(){try{s||null==n.return||n.return()}finally{if(c)throw i}}}}function a(e,t){if(e){if("string"===typeof e)return o(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?o(e,t):void 0}}function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n1e3?Object(o["Message"])({message:"服务器出错",type:"error",duration:3e3}):Object(o["Message"])({message:e.response.data,type:"error",duration:2e4}),Promise.reject(e)})),i.interceptors.request.use((function(e){var t=window.localStorage.getItem("accessToken");return t?(e.headers.accessToken=t,e):e})),t["a"]=i},c24f:function(e,t,n){"use strict";n.d(t,"e",(function(){return a})),n.d(t,"d",(function(){return o})),n.d(t,"b",(function(){return i})),n.d(t,"g",(function(){return s})),n.d(t,"f",(function(){return c})),n.d(t,"c",(function(){return l})),n.d(t,"a",(function(){return u}));var r=n("b775");function a(e){return Object(r["a"])({url:"/api/v1/users/login",method:"POST",data:e})}function o(e){return Object(r["a"])({url:"/api/v1/group/user",method:"GET",params:{user_id:e}})}function i(e){return Object(r["a"])({url:"/api/v1/users/".concat(e),method:"GET"})}function s(e,t){return Object(r["a"])({url:"/api/v1/users/".concat(e,"/edit"),method:"POST",data:t})}function c(e){return Object(r["a"])({url:"/api/v1/users/",method:"POST",data:e})}function l(){return Object(r["a"])({url:"/api/v1/users/",method:"GET",params:{username:"",identify:"",is_login:"",sort:""}})}function u(){return Object(r["a"])({url:"/api/v1/users/export",method:"GET"})}},cdf2:function(e,t,n){"use strict";n.r(t);var r=function(){var e=this,t=e.$createElement,n=e._self._c||t;return n("div",[n("CCard",[n("CCardHeader",[e._v("测试任务管理")]),e.checkPerm("CREATE")?n("CCardBody",[n("CButton",{staticStyle:{width:"100px"},attrs:{block:"",color:"primary"},on:{click:function(t){e.createTaskModal=!0}}},[e._v("+新建")])],1):e._e()],1),n("CModal",{attrs:{show:e.createTaskModal,"no-close-on-backdrop":!0,centered:!0,title:"Modal title 2",size:"lg",color:"primary"},on:{"update:show":function(t){e.createTaskModal=t}},scopedSlots:e._u([{key:"header",fn:function(){return[n("h6",{staticClass:"modal-title"},[e._v("新建测试任务")]),n("CButtonClose",{staticClass:"text-white",on:{click:function(t){e.createTaskModal=!1}}})]},proxy:!0},{key:"footer",fn:function(){return[n("CButton",{attrs:{color:"danger"},on:{click:function(t){e.createTaskModal=!1}}},[e._v("取消")]),n("CButton",{staticStyle:{backgroundColor:"rgb(50,31,219)",color:"white"},on:{click:e.createNewTask}},[e._v("新建")])]},proxy:!0}])},[n("CInput",{attrs:{label:"名称",placeholder:"请输入测试任务名称"},model:{value:e.newTask.title,callback:function(t){e.$set(e.newTask,"title",t)},expression:"newTask.title"}}),n("CInput",{attrs:{label:"描述",placeholder:"输入测试任务描述"},model:{value:e.newTask.description,callback:function(t){e.$set(e.newTask,"description",t)},expression:"newTask.description"}}),n("p",{staticStyle:{marginBottom:"10px",marginTop:"10px"}},[e._v("所属软件")]),n("el-select",{staticStyle:{width:"100%"},attrs:{clearable:"",placeholder:"请选择软件"},on:{change:e.selectSoftware},model:{value:e.newTask.softwareId,callback:function(t){e.$set(e.newTask,"softwareId",t)},expression:"newTask.softwareId"}},e._l(e.softwareList,(function(e){return n("el-option",{key:e.id,attrs:{label:e.name,value:e.id}})})),1),n("p",{staticStyle:{marginBottom:"10px",marginTop:"10px"}},[e._v("所属计划")]),n("el-select",{staticStyle:{width:"100%"},attrs:{clearable:"",placeholder:"请选择版本"},model:{value:e.newTask.plan,callback:function(t){e.$set(e.newTask,"plan",t)},expression:"newTask.plan"}},e._l(e.plans,(function(e){return n("el-option",{key:e.id,attrs:{label:e.title,value:e.id}})})),1),n("p",{staticStyle:{marginBottom:"10px",marginTop:"10px"}},[e._v("负责人")]),n("el-tree",{attrs:{data:e.groupList,"show-checkbox":"","node-key":"id","default-expand-all":"","expand-on-click-node":!1,props:e.defaultProps},on:{"check-change":e.handleCheckChange}}),n("p",{staticStyle:{marginBottom:"6px",marginTop:"10px"}},[e._v("请上传测试任务说明文档")]),n("el-upload",{ref:"newTaskUploader",staticClass:"upload-demo",attrs:{action:"","auto-upload":!1,multiple:!0,"file-list":e.fileList}},[n("el-button",{staticStyle:{backgroundColor:"rgb(50,31,219)",color:"white"},attrs:{size:"small"}},[e._v("点击上传")])],1)],1),n("CCard",[n("CCardBody",[n("CDataTable",{attrs:{items:e.taskList,fields:e.taskFields,"items-per-page":8,tableFilter:{label:"搜索",placeholder:"输入任意信息检索"},noItemsView:{noResults:"无结果",noItems:"无测试任务"},hover:"",pagination:{doubleArrows:!0,align:"center"}},scopedSlots:e._u([{key:"state",fn:function(t){var r=t.item;return[n("td",[n("CBadge",{staticStyle:{fontSize:"14px",height:"25px","line-height":"20px"},attrs:{color:e.getBadge(r.state)}},[e._v(" "+e._s(e._f("taskStateFilter")(r.state))+" ")])],1)]}},{key:"opt_details",fn:function(t){var r=t.item,a=t.index;return[e.checkPerm("CHECK")?n("td",{staticClass:"py-2"},[n("CButton",{staticStyle:{width:"50px"},attrs:{color:"success",variant:"outline",square:"",size:"sm"},on:{click:function(t){return e.gotoTask(r,a)}}},[e._v(" 查看 ")])],1):e._e()]}},{key:"opt_delete",fn:function(t){var r=t.item,a=t.index;return[e.checkPerm("DELETE")?n("td",{staticClass:"py-2"},[n("CButton",{staticStyle:{width:"50px"},attrs:{color:"danger",variant:"outline",square:"",size:"sm"},on:{click:function(t){return e.deleteTaskFirstStep(r,a)}}},[e._v(" 删除 ")])],1):e._e()]}}])})],1)],1),n("CModal",{attrs:{show:e.deleteTaskModal,"no-close-on-backdrop":!0,centered:!0,title:"Modal title 2",size:"lg",color:"danger"},on:{"update:show":function(t){e.deleteTaskModal=t}},scopedSlots:e._u([{key:"header",fn:function(){return[n("h6",{staticClass:"modal-title"},[e._v("删除测试任务")]),n("CButtonClose",{staticClass:"text-white",on:{click:function(t){e.deleteTaskModal=!1}}})]},proxy:!0},{key:"footer",fn:function(){return[n("CButton",{attrs:{color:"danger"},on:{click:function(t){e.deleteTaskModal=!1}}},[e._v("取消")]),n("CButton",{staticStyle:{backgroundColor:"rgb(50,31,219)",color:"white"},on:{click:e.deleteTaskNow}},[e._v("删除")])]},proxy:!0}])},[n("h5",[e._v("你确定删除该任务吗?删除后将无法查看任何与该任务的相关信息!")])])],1)},a=[],o=n("1619"),i=n("90c2"),s=n("1684"),c=n("3f13"),l=n("e350"),u=n("c24f");function d(e,t){var n="undefined"!==typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=f(e))||t&&e&&"number"===typeof e.length){n&&(e=n);var r=0,a=function(){};return{s:a,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:a}}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,i=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return i=e.done,e},e:function(e){s=!0,o=e},f:function(){try{i||null==n.return||n.return()}finally{if(s)throw o}}}}function f(e,t){if(e){if("string"===typeof e)return p(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?p(e,t):void 0}}function p(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n=1&&this.$refs["newTaskUploader"].uploadFiles.forEach((function(e,t){n.append("files",e.raw)})),n.append("title",this.newTask.title),n.append("description",this.newTask.description),n.append("plan_id",this.newTask.plan),Object(i["b"])(n).then((function(t){for(var n in e.createTaskModal=!1,e.newTask)delete e.newTask[n];e.getTasks("","","",localStorage.getItem("userId"),"")}))}else this.$message.warning("请完整填写任务信息!")},checkTaskDetail:function(e){Object(i["a"])(e).then((function(e){}))},selectSoftware:function(){var e=this;Object(c["e"])("","","",this.newTask.softwareId,"").then((function(t){e.plans=t}))},checkPerm:function(e){return Object(l["a"])(localStorage.getItem("identity"),e)},onChange:function(e){console.log(e,"onchange"),console.log(this.value,"onchange")},selectAll:function(e,t){var n=this;console.log(e,t,"val, id, 全选");var r=this.groupList.find((function(e){return e.groupName===t}));console.log("全选后selectOption",r);var a=r.userList.map((function(e){return e.username}));console.log("全选后arr",a);var o=r.userList.map((function(e){return e.userid}));console.log("全选后idarr",o),e?(a.forEach((function(e){n.value.includes(e)||n.value.push(e)})),o.forEach((function(e){n.idValue.includes(e)||n.idValue.push(e)}))):(this.value.forEach((function(e,t){a.includes(e)&&n.value.splice(t,1,"")})),this.idValue.forEach((function(e,t){o.includes(e)&&n.idValue.splice(t,1,"")}))),this.value=this.value.filter((function(e){return""!==e})),this.idValue=this.idValue.filter((function(e){return""!==e})),console.log(this.idValue,"this.idValue"),console.log(this.value,"this.value")},changeSelect:function(e){console.log(e,"select val")}}},m=h,k=n("2877"),v=Object(k["a"])(m,r,a,!1,null,"438734f8",null);t["default"]=v.exports},e350:function(e,t,n){"use strict";function r(e,t){var n=a[e];return n.includes(t)}n.d(t,"a",(function(){return r}));var a=[["CHECK","EDIT","DELETE","CREATE","EXECUTE","DELETE","CONFIRM","EXPORT"],["CHECK","EDIT","DELETE","CREATE","EXECUTE","DELETE","CONFIRM","EXPORT"],["CHECK","EXECUTE"]]}}]);