(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-3b2a3e5a"],{1619:function(t,e,n){"use strict";function r(t,e){var n="undefined"!==typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=a(t))||e&&t&&"number"===typeof t.length){n&&(t=n);var r=0,i=function(){};return{s:i,n:function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}},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 s,o=!0,u=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return o=t.done,t},e:function(t){u=!0,s=t},f:function(){try{o||null==n.return||n.return()}finally{if(u)throw s}}}}function a(t,e){if(t){if("string"===typeof t)return i(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?i(t,e):void 0}}function i(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n1e3?Object(i["Message"])({message:"服务器出错",type:"error",duration:3e3}):Object(i["Message"])({message:t.response.data,type:"error",duration:2e4}),Promise.reject(t)})),s.interceptors.request.use((function(t){var e=window.localStorage.getItem("accessToken");return e?(t.headers.accessToken=e,t):t})),e["a"]=s},b81c:function(t,e,n){"use strict";n.r(e);var r=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",[n("CCard",[n("CCardHeader",[t._v(" 不合格项管理 ")]),n("CCardBody",[n("CTabs",{attrs:{"active-tab":0}},[n("CTab",{attrs:{title:"任务",active:""}},[n("CCard",[n("CCardBody",[n("CDataTable",{attrs:{items:t.taskList,fields:t.taskFields,"items-per-page":8,tableFilter:{label:"搜索",placeholder:"输入任意信息检索"},noItemsView:{noResults:"无结果",noItems:"无测试任务"},hover:"",pagination:{doubleArrows:!0,align:"center"}},scopedSlots:t._u([{key:"state",fn:function(e){var r=e.item;return[n("td",[n("CBadge",{staticStyle:{fontSize:"14px",height:"25px","line-height":"20px"},attrs:{color:t.getBadge(r.state)}},[t._v(" "+t._s(t._f("taskStateFilter")(r.state))+" ")])],1)]}},{key:"opt_exportNoPass",fn:function(e){var r=e.item,a=e.index;return[t.checkPerm("CHECK")?n("td",{staticClass:"py-2"},[n("CButton",{staticStyle:{width:"50px"},attrs:{color:"success",variant:"outline",square:"",size:"sm"},on:{click:function(e){return t.downloadTaskNopa(r,a)}}},[t._v(" 导出 ")])],1):t._e()]}}])})],1)],1)],1)],1)],1)],1)],1)},a=[],i=n("1619"),s=n("90c2"),o=n("e350"),u=n("e3b5"),c={name:"softwareTestNoPass",data:function(){return{taskList:[],taskFields:[{key:"title",label:"任务名称",_style:"min-width:300px"},{key:"description",label:"描述",_style:"min-width:200px"},{key:"software_name",label:"所属软件",_style:"min-width:200px"},{key:"version",label:"所属版本",_style:"min-width:100px"},{key:"plan_name",label:"所属计划",_style:"min-width:200px"},{key:"state",label:"状态",sorter:!1,filter:!1,_style:"min-width:100px;"},{key:"creator",label:"执行者",_style:"min-width:100px;"},{key:"fail_num",label:"不合格项数量",_style:"min-width:150px;"},{key:"opt_exportNoPass",label:"不合格项",_style:"min-width:10px;"}],versionList:[],versionFields:[{key:"software_name",label:"软件名称",_style:"min-width:200px;"},{key:"version_number",label:"版本号",_style:"min-width:200px;"},{key:"fail_num",label:"不合格项数量",_style:"min-width:100px;"},{key:"opt_details",label:"不合格项",_style:"min-width:50px;",sorter:!1,filter:!1}],software_id:""}},mounted:function(){this.software_id=localStorage.getItem("softwareId"),this.getVersionNopass(),this.getTasks("","",this.software_id,"","")},filters:{taskStateFilter:i["e"]},computed:{},watch:{},methods:{getBadge:function(t){switch(t){case 0:return"secondary";case 1:return"success";case 2:return"primary";default:}},getTasks:function(t,e,n,r,a){var o=this;Object(s["i"])(t,e,n,r,a).then((function(t){o.taskList=Object(i["d"])(t)}))},checkPerm:function(t){return Object(o["a"])(localStorage.getItem("identity"),t)},exportNoPassReport:function(t,e){},getVersionNopass:function(){var t=this;console.log(this.software_id),Object(u["c"])(this.software_id,"").then((function(e){t.versionList=e.filter((function(e){return e.software_id==t.software_id}))}))},exportVersionNopass:function(t,e){Object(u["a"])(t.software_id,"2",t.version_number).then((function(e){window.open("/api/v1/software/".concat(t.software_id,"/versions?type=",2,"&version_number=").concat(t.version_number))}))},downloadTaskNopa:function(t){Object(u["b"])(t.id,"2").then((function(e){window.open("/api/v1/test-tasks/".concat(t.id,"/case-file?type=2"))}))}}},l=c,d=n("2877"),f=Object(d["a"])(l,r,a,!1,null,"5cb00158",null);e["default"]=f.exports},e350:function(t,e,n){"use strict";function r(t,e){var n=a[t];return n.includes(e)}n.d(e,"a",(function(){return r}));var a=[["CHECK","EDIT","DELETE","CREATE","EXECUTE","DELETE","CONFIRM","EXPORT"],["CHECK","EDIT","DELETE","CREATE","EXECUTE","DELETE","CONFIRM","EXPORT"],["CHECK","EXECUTE"]]},e3b5:function(t,e,n){"use strict";n.d(e,"c",(function(){return a})),n.d(e,"a",(function(){return i})),n.d(e,"b",(function(){return s}));var r=n("b775");function a(t,e){return Object(r["a"])({url:"/api/v1/software/versions",method:"GET",params:{software_name:t,sort:e}})}function i(t,e,n){return Object(r["a"])({url:"/api/v1/software/".concat(t,"/versions"),method:"GET",params:{type:e,version_number:n}})}function s(t,e){return Object(r["a"])({url:"/api/v1/test-tasks/".concat(t,"/case-file"),method:"GET",params:{type:e}})}}}]);