1 |
- (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);n<e;n++)r[n]=t[n];return r}function s(t){var e,n=[],a=r(t);try{for(a.s();!(e=a.n()).done;){var i=e.value,s=i.create_time.split("T")[0],o=i.create_time.split("T")[1].slice(0,8);i.create_time=s+" "+o;var u=i.update_time.split("T")[0],c=i.update_time.split("T")[1].slice(0,8);i.update_time=u+" "+c,i.creator=(i.executor||{}).name,n.push(i)}}catch(l){a.e(l)}finally{a.f()}return n}function o(t){var e=-1!=(t||"").indexOf("T")&&t.split("T")[0],n=-1!=(t||"").indexOf("T")&&(t.split("T")[1]+" ").slice(0,8);return e+" "+n}function u(t){switch(t){case 0:return"执行中";case 1:return"已归档";default:return"无"}}function c(t){switch(t){case 0:return"未执行";case 1:return"执行中";case 2:return"已完成";default:return"无"}}function l(t){switch(t){case 0:return"系统管理员";case 1:return"测试管理员";case 2:return"测试工程师";default:return"测试工程师"}}n.d(e,"d",(function(){return s})),n.d(e,"c",(function(){return o})),n.d(e,"b",(function(){return u})),n.d(e,"e",(function(){return c})),n.d(e,"a",(function(){return l}))},"90c2":function(t,e,n){"use strict";n.d(e,"b",(function(){return a})),n.d(e,"a",(function(){return i})),n.d(e,"c",(function(){return s})),n.d(e,"d",(function(){return o})),n.d(e,"e",(function(){return u})),n.d(e,"f",(function(){return c})),n.d(e,"i",(function(){return l})),n.d(e,"j",(function(){return d})),n.d(e,"k",(function(){return f})),n.d(e,"g",(function(){return p})),n.d(e,"h",(function(){return m}));var r=n("b775");function a(t){return Object(r["a"])({url:"/api/v1/test-tasks/beidou",method:"POST",data:t})}function i(t){return Object(r["a"])({url:"/api/v1/test-tasks/".concat(t),method:"GET"})}function s(t){return Object(r["a"])({url:"/api/v1/test-tasks/".concat(t),method:"DELETE"})}function o(t){return Object(r["a"])({url:"api/v1/test-tasks/beidou/edit",method:"DELETE",data:t})}function u(t,e){return Object(r["a"])({url:"/api/v1/test-tasks/".concat(t,"/edit"),method:"POST",data:e})}function c(t,e){return Object(r["a"])({url:"/api/v1/test-tasks/beidou/edit",method:"POST",data:e})}function l(t,e,n,a,i){return Object(r["a"])({url:"/api/v1/test-tasks/",method:"GET",params:{executor_id:a,title:t,state:e,software_id:n,sort:i}})}function d(t,e,n,a){return Object(r["a"])({url:"/api/v1/test-tasks/beidou/list",method:"GET",params:{task_name:t,software_id:e,plan_id:n,sort:a}})}function f(t,e,n,a,i,s,o){return Object(r["a"])({url:"/api/v1/test-tasks/beidou/info",method:"GET",params:{task_name:t,executor_id:e,plan_id:n,state:a,sort:i,software_id:s,type:o}})}function p(t,e){return Object(r["a"])({url:"/api/v1/test-tasks/beidou/".concat(t,"/execute"),method:"POST",data:e})}function m(t){return Object(r["a"])({url:"/api/v1/test-tasks/beidou/".concat(t),method:"GET"})}},b775:function(t,e,n){"use strict";var r=n("bc3a"),a=n.n(r),i=n("5c96");n("c0d6");a.a.defaults.withCredentials=!0;var s=a.a.create({withCredentials:!0,timeout:1e5});s.interceptors.response.use((function(t){var e=t.data;return e}),(function(t){return console.log("err"+t),t.response.data.length>1e3?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}})}}}]);
|