chunk-66d1fac7.6f5289a8.js 30 KB

1
  1. (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-66d1fac7"],{1619:function(t,e,a){"use strict";function i(t,e){var a="undefined"!==typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!a){if(Array.isArray(t)||(a=s(t))||e&&t&&"number"===typeof t.length){a&&(t=a);var i=0,n=function(){};return{s:n,n:function(){return i>=t.length?{done:!0}:{done:!1,value:t[i++]}},e:function(t){throw t},f:n}}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,l=!0,o=!1;return{s:function(){a=a.call(t)},n:function(){var t=a.next();return l=t.done,t},e:function(t){o=!0,r=t},f:function(){try{l||null==a.return||a.return()}finally{if(o)throw r}}}}function s(t,e){if(t){if("string"===typeof t)return n(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)?n(t,e):void 0}}function n(t,e){(null==e||e>t.length)&&(e=t.length);for(var a=0,i=new Array(e);a<e;a++)i[a]=t[a];return i}function r(t){var e,a=[],s=i(t);try{for(s.s();!(e=s.n()).done;){var n=e.value,r=n.create_time.split("T")[0],l=n.create_time.split("T")[1].slice(0,8);n.create_time=r+" "+l;var o=n.update_time.split("T")[0],c=n.update_time.split("T")[1].slice(0,8);n.update_time=o+" "+c,n.creator=(n.executor||{}).name,a.push(n)}}catch(u){s.e(u)}finally{s.f()}return a}function l(t){var e=-1!=(t||"").indexOf("T")&&t.split("T")[0],a=-1!=(t||"").indexOf("T")&&(t.split("T")[1]+" ").slice(0,8);return e+" "+a}function o(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 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 l})),a.d(e,"b",(function(){return o})),a.d(e,"e",(function(){return c})),a.d(e,"a",(function(){return u}))},1871:function(t,e,a){},"3b07":function(t,e,a){"use strict";a.r(e);var i=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(this.task.title))]),a("br"),a("span",{staticClass:"infoColor "},[t._v("创建时间: "+t._s(t._f("singleDateFilter")(this.task.create_time)))]),a("span",{staticClass:"infoColor textMarginLeft"},[t._v("最后更新时间: "+t._s(t._f("singleDateFilter")(this.task.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("el-button",[t._v("编辑")])],1)]):t._e()]),a("CCardBody",[a("span",[t._v("计划描述: "+t._s(this.task.description))]),a("br"),a("br"),a("span",{staticClass:" "},[t._v("状态: "+t._s(t._f("taskStateFilter")(this.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(this.task.software_name)+" ")])])],1),a("span"),a("span",{staticClass:"textMarginLeft"},[t._v("版本: "+t._s(this.task.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(this.task.plan_name)+" ")])])],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.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("你确定完成该任务吗?确认完成后将无法修改该测试任务的执行结果!")])]),2!=t.identity?a("CCard",[a("CCardHeader",[a("h5",{staticStyle:{display:"inline"}},[t._v("子任务列表")])]),a("CCardBody",[a("CDataTable",{attrs:{items:t.excutorList,fields:t.excutorListField,"items-per-page":8,tableFilter:{label:"搜索",placeholder:"输入任意信息检索"},noItemsView:{noResults:"无结果",noItems:"无测试人员"},hover:"",pagination:{doubleArrows:!0,align:"center"}},scopedSlots:t._u([{key:"update_time",fn:function(e){var a=e.item;return[t._v(" "+t._s(t._f("singleDateFilter")(a.update_time))+" ")]}},{key:"opt_details",fn:function(e){var i=e.item,s=e.index;return[t.checkPerm("CHECK")?a("td",{staticClass:"py-2"},[a("CButton",{staticStyle:{width:"50px"},attrs:{color:"success",variant:"outline",square:"",size:"sm"},on:{click:function(e){return t.gotoTask(i,s)}}},[t._v(" 查看 ")])],1):t._e()]}}],null,!1,1305262435)})],1)],1):t._e(),2==t.identity&&0==t.state?a("CCard",[a("CCardHeader",[a("h5",{staticStyle:{display:"inline"}},[t._v("测试任务执行")]),a("div",{staticStyle:{float:"right"}},[a("div",{staticStyle:{margin:"0px auto"}},[t.checkPerm("CHECK")&&0==t.state?a("el-button",{attrs:{size:"mini"},on:{click:t.confirmExcuteTask}},[t._v("提交")]):t._e()],1)])]),a("CCardBody",[a("el-form",{staticStyle:{display:"flex","flex-wrap":"wrap","justify-content":"space-around"},attrs:{"label-position":"left",model:t.formLabelAlign}},[a("el-form-item",{attrs:{label:"定位精度(米,m)"}},[a("el-input",{staticStyle:{width:"500px"},model:{value:t.formLabelAlign.positioning_accuracy,callback:function(e){t.$set(t.formLabelAlign,"positioning_accuracy",e)},expression:"formLabelAlign.positioning_accuracy"}})],1),a("el-form-item",{attrs:{label:"定时精度(秒,s)"}},[a("el-input",{staticStyle:{width:"500px"},model:{value:t.formLabelAlign.timing_accuracy,callback:function(e){t.$set(t.formLabelAlign,"timing_accuracy",e)},expression:"formLabelAlign.timing_accuracy"}})],1),a("el-form-item",{attrs:{label:"伪距测量精度(米,m)"}},[a("el-input",{staticStyle:{width:"500px"},model:{value:t.formLabelAlign.pseudo_range_measurement_accuracy,callback:function(e){t.$set(t.formLabelAlign,"pseudo_range_measurement_accuracy",e)},expression:"formLabelAlign.pseudo_range_measurement_accuracy"}})],1),a("el-form-item",{attrs:{label:"载波测量精度(毫米,mm)"}},[a("el-input",{staticStyle:{width:"500px"},model:{value:t.formLabelAlign.carrier_measurement_accuracy,callback:function(e){t.$set(t.formLabelAlign,"carrier_measurement_accuracy",e)},expression:"formLabelAlign.carrier_measurement_accuracy"}})],1),a("el-form-item",{attrs:{label:"测速精度(米/秒, m/s))"}},[a("el-input",{staticStyle:{width:"500px"},model:{value:t.formLabelAlign.speed_measurement_accuracy,callback:function(e){t.$set(t.formLabelAlign,"speed_measurement_accuracy",e)},expression:"formLabelAlign.speed_measurement_accuracy"}})],1),a("el-form-item",{attrs:{label:"捕获灵敏度(分贝毫瓦,dBm)"}},[a("el-input",{staticStyle:{width:"500px"},model:{value:t.formLabelAlign.sensitivity_capture,callback:function(e){t.$set(t.formLabelAlign,"sensitivity_capture",e)},expression:"formLabelAlign.sensitivity_capture"}})],1),a("el-form-item",{attrs:{label:"接受灵敏度(分贝毫瓦,dBm)"}},[a("el-input",{staticStyle:{width:"500px"},model:{value:t.formLabelAlign.receiving_sensitivity,callback:function(e){t.$set(t.formLabelAlign,"receiving_sensitivity",e)},expression:"formLabelAlign.receiving_sensitivity"}})],1),a("el-form-item",{attrs:{label:"跟踪灵敏度 (分贝毫瓦,dBm)"}},[a("el-input",{staticStyle:{width:"500px"},model:{value:t.formLabelAlign.sensitivity_track,callback:function(e){t.$set(t.formLabelAlign,"sensitivity_track",e)},expression:"formLabelAlign.sensitivity_track"}})],1),a("el-form-item",{attrs:{label:"功率范围下界 (分贝毫瓦,dBm)"}},[a("el-input",{staticStyle:{width:"500px"},model:{value:t.formLabelAlign.power_range_low,callback:function(e){t.$set(t.formLabelAlign,"power_range_low",e)},expression:"formLabelAlign.power_range_low"}})],1),a("el-form-item",{attrs:{label:"功率范围上界 (分贝毫瓦,dBm)"}},[a("el-input",{staticStyle:{width:"500px"},model:{value:t.formLabelAlign.power_range_high,callback:function(e){t.$set(t.formLabelAlign,"power_range_high",e)},expression:"formLabelAlign.power_range_high"}})],1),a("el-form-item",{attrs:{label:"自主完好性 (1,<1的百分数)"}},[a("el-input",{staticStyle:{width:"500px"},model:{value:t.formLabelAlign.self_integrity,callback:function(e){t.$set(t.formLabelAlign,"self_integrity",e)},expression:"formLabelAlign.self_integrity"}})],1),a("el-form-item",{attrs:{label:"系统完好性 (1,<1的百分数)"}},[a("el-input",{staticStyle:{width:"500px"},model:{value:t.formLabelAlign.system_integrity,callback:function(e){t.$set(t.formLabelAlign,"system_integrity",e)},expression:"formLabelAlign.system_integrity"}})],1),a("el-form-item",{attrs:{label:"首次捕获时间 (秒,s)"}},[a("el-input",{staticStyle:{width:"500px"},model:{value:t.formLabelAlign.capture_time,callback:function(e){t.$set(t.formLabelAlign,"capture_time",e)},expression:"formLabelAlign.capture_time"}})],1),a("el-form-item",{attrs:{label:"失锁重捕时间 (秒,s)"}},[a("el-input",{staticStyle:{width:"500px"},model:{value:t.formLabelAlign.recapture_time,callback:function(e){t.$set(t.formLabelAlign,"recapture_time",e)},expression:"formLabelAlign.recapture_time"}})],1),a("el-form-item",{attrs:{label:"定位测速更新率(赫兹, hz)"}},[a("el-input",{staticStyle:{width:"500px"},model:{value:t.formLabelAlign.update_rate,callback:function(e){t.$set(t.formLabelAlign,"update_rate",e)},expression:"formLabelAlign.update_rate"}})],1),a("el-form-item",{attrs:{label:"跟踪通道数(个)"}},[a("el-input",{staticStyle:{width:"500px"},model:{value:t.formLabelAlign.trace_channels,callback:function(e){t.$set(t.formLabelAlign,"trace_channels",e)},expression:"formLabelAlign.trace_channels"}})],1),a("el-form-item",{attrs:{label:"最大速度(米/秒,m/s)"}},[a("el-input",{staticStyle:{width:"500px"},model:{value:t.formLabelAlign.max_velocity,callback:function(e){t.$set(t.formLabelAlign,"max_velocity",e)},expression:"formLabelAlign.max_velocity"}})],1),a("el-form-item",{attrs:{label:"最大加速度 (m/s2)"}},[a("el-input",{staticStyle:{width:"500px"},model:{value:t.formLabelAlign.max_acceleration,callback:function(e){t.$set(t.formLabelAlign,"max_acceleration",e)},expression:"formLabelAlign.max_acceleration"}})],1),a("el-form-item",{attrs:{label:"测试是否通过"}},[a("el-select",{staticStyle:{width:"500px"},attrs:{placeholder:"请选择类型"},model:{value:t.formLabelAlign.state,callback:function(e){t.$set(t.formLabelAlign,"state",e)},expression:"formLabelAlign.state"}},t._l(t.taskState,(function(t){return a("el-option",{key:t.value,attrs:{label:t.label,value:t.value}})})),1)],1),a("div",{staticStyle:{width:"500px"}})],1),a("div",{staticStyle:{display:"flex","justify-content":"space-around"}},[a("div",[a("p",[t._v("备注")]),a("el-input",{staticStyle:{width:"500px"},model:{value:t.formLabelAlign.remark,callback:function(e){t.$set(t.formLabelAlign,"remark",e)},expression:"formLabelAlign.remark"}})],1),a("div",{staticStyle:{width:"500px"}})])],1)],1):t._e(),2==t.identity&&0!=t.state?a("CCard",[a("CCardHeader",[a("h5",{staticStyle:{display:"inline"}},[t._v(" 任务结果 ")])]),a("CCardBody",[a("el-descriptions",{attrs:{title:"用户信息"}},[a("el-descriptions-item",{attrs:{label:"定位精度(米,m)"}},[t._v(" "+t._s(this.taskQuery.result.positioning_accuracy)+" ")]),a("el-descriptions-item",{attrs:{label:"定时精度(秒,s)"}},[t._v(" "+t._s(this.taskQuery.result.timing_accuracy)+" ")]),a("el-descriptions-item",{attrs:{label:"伪距测量精度(米,m)"}},[t._v(" "+t._s(this.taskQuery.result.pseudo_range_measurement_accuracy)+" ")]),a("el-descriptions-item",{attrs:{label:"载波测量精度(毫米,mm)"}},[t._v(" "+t._s(this.taskQuery.result.carrier_measurement_accuracy)+" ")]),a("el-descriptions-item",{attrs:{label:"测速精度(米/秒, m/s))"}},[t._v(" "+t._s(this.taskQuery.result.speed_measurement_accuracy)+" ")]),a("el-descriptions-item",{attrs:{label:"捕获灵敏度(分贝毫瓦,dBm)"}},[t._v(" "+t._s(this.taskQuery.result.sensitivity_capture)+" ")]),a("el-descriptions-item",{attrs:{label:"接受灵敏度(分贝毫瓦,dBm)"}},[t._v(" "+t._s(this.taskQuery.result.receiving_sensitivity)+" ")]),a("el-descriptions-item",{attrs:{label:"跟踪灵敏度(分贝毫瓦,dBm)"}},[t._v(" "+t._s(this.taskQuery.result.sensitivity_track)+" ")]),a("el-descriptions-item",{attrs:{label:"功率范围下界(分贝毫瓦,dBm)"}},[t._v(" "+t._s(this.taskQuery.result.power_range_low)+" ")]),a("el-descriptions-item",{attrs:{label:"功率范围上界(分贝毫瓦,dBm)"}},[t._v(" "+t._s(this.taskQuery.result.power_range_high)+" ")]),a("el-descriptions-item",{attrs:{label:"自主完好性(1,<1的百分数)"}},[t._v(" "+t._s(this.taskQuery.result.self_integrity)+" ")]),a("el-descriptions-item",{attrs:{label:"系统完好性(1,<1的百分数)"}},[t._v(" "+t._s(this.taskQuery.result.system_integrity)+" ")]),a("el-descriptions-item",{attrs:{label:"首次捕获时间(秒,s)"}},[t._v(" "+t._s(this.taskQuery.result.capture_time)+" ")]),a("el-descriptions-item",{attrs:{label:"失锁重捕时间(秒,s)"}},[t._v(" "+t._s(this.taskQuery.result.recapture_time)+" ")]),a("el-descriptions-item",{attrs:{label:"定位测速更新率(赫兹, hz)"}},[t._v(" "+t._s(this.taskQuery.result.update_rate)+" ")]),a("el-descriptions-item",{attrs:{label:"跟踪通道数(个)"}},[t._v(" "+t._s(this.taskQuery.result.trace_channels)+" ")]),a("el-descriptions-item",{attrs:{label:"最大速度(米/秒,m/s)"}},[t._v(" "+t._s(this.taskQuery.result.max_velocity)+" ")]),a("el-descriptions-item",{attrs:{label:"最大加速度(m/s2)"}},[t._v(" "+t._s(this.taskQuery.result.max_acceleration)+" ")]),a("el-descriptions-item",{attrs:{label:"执行结果"}},[t._v(" "+t._s(1==this.taskQuery.result.state?"成功":"失败")+" ")]),a("el-descriptions-item",{attrs:{label:"备注"}},[t._v(" "+t._s(this.taskQuery.result.remark)+" ")])],1)],1)],1):t._e(),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)},s=[],n=a("1619"),r=a("90c2"),l=a("e350"),o=a("c24f"),c=a("3f5e");function u(t,e,a){return e in t?Object.defineProperty(t,e,{value:a,enumerable:!0,configurable:!0,writable:!0}):t[e]=a,t}var d={name:"TestTaskDetail",data:function(){var t;return t={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:[],task_name:"",planId:"",taskQuery:{result:{}},excutorList:[],excutorListField:[{key:"title",label:"任务名称",_style:"min-width:100px"},{key:"description",label:"描述",_style:"min-width:200px"},{key:"executor_name",label:"执行者",_style:"min-width:100px"},{key:"software_name",label:"所属软件",_style:"min-width:100px"},{key:"version",label:"所属版本",_style:"min-width:100px"},{key:"plan_name",label:"所属计划",_style:"min-width:200px"},{key:"type",label:"类型",_style:"min-width:100px"}],formLabelAlign:{},identity:"",executeState:0},u(t,"planId",""),u(t,"taskName",""),u(t,"state",""),u(t,"taskState",[{value:1,label:"成功"},{value:2,label:"失败"}]),t},beforeMount:function(){var t=this;this.$route.query&&console.log("___query",this.$route.query),this.taskQuery=localStorage.getItem("query")?JSON.parse(localStorage.getItem("query")):this.$route.query,this.state=this.taskQuery.state,console.log(this.state,"this.statethis.state"),console.log("————————this.taskQuery",this.taskQuery),this.taskQuery.id&&localStorage.setItem("taskId",this.taskQuery.id),this.identity=localStorage.getItem("identity"),this.planId=localStorage.getItem("planId"),this.taskName=localStorage.getItem("taskName"),this.softwareId=localStorage.getItem("softwareId"),this.state=this.taskQuery.state,this.taskId=this.taskQuery.task_id?this.taskQuery.task_id:"",this.checkTaskDetail(this.taskId),2!=localStorage.getItem("identity")&&Object(o["d"])(localStorage.getItem("userId")).then((function(e){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)})),t.groupList=a}))},filters:{singleDateFilter:n["c"],targetDateFilter:n["d"],planStateFilter:n["b"],taskStateFilter:n["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 i=this.checkedList.indexOf(t.id);console.log(i,"index"),this.checkedList.splice(i,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("task_name_new",this.newTask.title),e.append("task_name_old",this.task.title),e.append("plan_id",this.task.plan_id),e.append("description",this.newTask.description),Object(r["f"])(this.taskId,e).then((function(e){t.checkTaskDetail(t.task.id),t.editTaskModal=!1}))}else this.$message.warning("计划名称不能为空!")},checkTaskDetail:function(t){var e=this;console.log("checkTaskDetail this.taskQuery",this.taskQuery),Object(r["k"])(this.taskName,"",this.planId,"","",this.softwareId,"").then((function(t){1==localStorage.getItem("identity")?e.task=t[0]:(e.task=t.filter((function(t){return t.executor_id==localStorage.getItem("userId")}))[0],console.log(e.task,"llllll")),e.state=e.task.state,e.excutorList=t,console.log(e.task,"this.task"),console.log("获取任务详情res",t)}))},jumpToPlanDetail:function(){this.$router.push("/softwareTestPlanDetail/"+this.task.plan_id)},jumpToTargetDetail:function(){this.$router.push("/softwareDetail/"+this.pageVO.software_id)},confirmExcuteTask:function(){var t=this;console.log("this.taskId",this.taskId),console.log("this.task.id",this.task.id);for(var e=new FormData,a=0,i=Object.entries(this.formLabelAlign);a<i.length;a++){var s=i[a];e.append(s[0],""==s[1]?"":s[1])}Object(r["g"])(this.task.id,e).then((function(e){Object(r["h"])(t.task.id).then((function(e){console.log("任务执行结果ddd",e),t.task.result=e.task.result,t.taskQuery.result=e.task.result,localStorage.setItem("query",t.taskQuery),t.state=e.task.result.state})),t.$message.success("执行成功"),t.excuteTaskModal=!1}))},downloadExcutionFile:function(){},checkPerm:function(t){return Object(l["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["e"])(this.taskId,a).then((function(t){console.log("只改变状态,",t),e.checkTaskDetail(e.taskId),e.editTaskModal=!1,e.beginExceutModal=!1,e.confirmFinishModal=!1}))},deleteFileFirstStep:function(t){this.deleteFileModal=!0,this.fileId=t.file_id,console.log(t,"ddddd")},confirmDeleteFile:function(){var t=this;Object(c["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(c["a"])(e).then((function(e){console.log("新增文件res",e),t.checkTaskDetail(t.taskId),t.appendFileModal=!1}))},getTaskExecState:function(t){return 2==t?3:t}}},f=d,m=(a("3edf"),a("2877")),p=Object(m["a"])(f,i,s,!1,null,"1b4213b7",null);e["default"]=p.exports},"3edf":function(t,e,a){"use strict";a("1871")},"3f5e":function(t,e,a){"use strict";a.d(e,"a",(function(){return s})),a.d(e,"b",(function(){return n}));var i=a("b775");function s(t){return Object(i["a"])({url:"/api/v1/files/",method:"POST",data:t})}function n(t,e,a,s){return Object(i["a"])({url:"/api/v1/files/",method:"DELETE",params:{type:t,plan_id:e,task_id:a,file_id:s}})}},"90c2":function(t,e,a){"use strict";a.d(e,"b",(function(){return s})),a.d(e,"a",(function(){return n})),a.d(e,"c",(function(){return r})),a.d(e,"d",(function(){return l})),a.d(e,"e",(function(){return o})),a.d(e,"f",(function(){return c})),a.d(e,"i",(function(){return u})),a.d(e,"j",(function(){return d})),a.d(e,"k",(function(){return f})),a.d(e,"g",(function(){return m})),a.d(e,"h",(function(){return p}));var i=a("b775");function s(t){return Object(i["a"])({url:"/api/v1/test-tasks/beidou",method:"POST",data:t})}function n(t){return Object(i["a"])({url:"/api/v1/test-tasks/".concat(t),method:"GET"})}function r(t){return Object(i["a"])({url:"/api/v1/test-tasks/".concat(t),method:"DELETE"})}function l(t){return Object(i["a"])({url:"api/v1/test-tasks/beidou/edit",method:"DELETE",data:t})}function o(t,e){return Object(i["a"])({url:"/api/v1/test-tasks/".concat(t,"/edit"),method:"POST",data:e})}function c(t,e){return Object(i["a"])({url:"/api/v1/test-tasks/beidou/edit",method:"POST",data:e})}function u(t,e,a,s,n){return Object(i["a"])({url:"/api/v1/test-tasks/",method:"GET",params:{executor_id:s,title:t,state:e,software_id:a,sort:n}})}function d(t,e,a,s){return Object(i["a"])({url:"/api/v1/test-tasks/beidou/list",method:"GET",params:{task_name:t,software_id:e,plan_id:a,sort:s}})}function f(t,e,a,s,n,r,l){return Object(i["a"])({url:"/api/v1/test-tasks/beidou/info",method:"GET",params:{task_name:t,executor_id:e,plan_id:a,state:s,sort:n,software_id:r,type:l}})}function m(t,e){return Object(i["a"])({url:"/api/v1/test-tasks/beidou/".concat(t,"/execute"),method:"POST",data:e})}function p(t){return Object(i["a"])({url:"/api/v1/test-tasks/beidou/".concat(t),method:"GET"})}},b775:function(t,e,a){"use strict";var i=a("bc3a"),s=a.n(i),n=a("5c96");a("c0d6");s.a.defaults.withCredentials=!0;var r=s.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(n["Message"])({message:"服务器出错",type:"error",duration:3e3}):Object(n["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 s})),a.d(e,"d",(function(){return n})),a.d(e,"b",(function(){return r})),a.d(e,"g",(function(){return l})),a.d(e,"f",(function(){return o})),a.d(e,"c",(function(){return c})),a.d(e,"a",(function(){return u}));var i=a("b775");function s(t){return Object(i["a"])({url:"/api/v1/users/login",method:"POST",data:t})}function n(t){return Object(i["a"])({url:"/api/v1/group/user",method:"GET",params:{user_id:t}})}function r(t){return Object(i["a"])({url:"/api/v1/users/".concat(t),method:"GET"})}function l(t,e){return Object(i["a"])({url:"/api/v1/users/".concat(t,"/edit"),method:"POST",data:e})}function o(t){return Object(i["a"])({url:"/api/v1/users/",method:"POST",data:t})}function c(){return Object(i["a"])({url:"/api/v1/users/",method:"GET",params:{username:"",identify:"",is_login:"",sort:""}})}function u(){return Object(i["a"])({url:"/api/v1/users/export",method:"GET"})}},e350:function(t,e,a){"use strict";function i(t,e){var a=s[t];return a.includes(e)}a.d(e,"a",(function(){return i}));var s=[["CHECK","EDIT","DELETE","CREATE","EXECUTE","DELETE","CONFIRM","EXPORT"],["CHECK","EDIT","DELETE","CREATE","EXECUTE","DELETE","CONFIRM","EXPORT"],["CHECK","EXECUTE"]]}}]);