webpackJsonp([3],{"/RwQ":function(t,e,a){"use strict";var i=a("Dd8w"),s=a.n(i),n=a("1onU"),o=a("tiPg"),r=a("b9vf"),l=a("SQ4B"),c=a("qI5z"),d=a("CYQe"),u=a("Gox+"),f={name:"TestcaseForm",components:{ElDragSelect:o.a,FileUpload:d.a,ImgUpload:u.a},data:function(){return{countLimit:3,rules:{name:[{required:!0,message:"用例名称不可为空",trigger:"blur"},{min:1,max:50,message:"用例名称长度在 1 到 50 个字符",trigger:"blur"}],priority:[{required:!0,message:"优先级不可为空"}],testStatus:[{required:!0,message:"测试结论不可为空"}]},loading:!1,testCases:[],searchTestCases:[]}},props:{readOnly:{type:Boolean,default:!1},isCommitted:{type:Boolean,default:!1},canAudit:{type:Boolean,default:!1},testCaseData:{type:Object,default:function(){return{id:void 0,code:"",taskCode:"",designerId:void 0,name:"",descr:"",demand:"",preconditions:"",envConfig:"",priority:void 0,opeSteps:"",inputDatas:"",expectedResult:"",evaCriteria:"",others:"",testResult:"",testStatus:void 0,files:[],screenshots:[],examStatus:"",examDescr:"",associatedCode:""}}}},methods:{getList:function(){var t=this,e=r.a.TESTCASE.USER_TEST_CASES.replace("{taskCode}",this.testCaseData.taskCode).replace("{designerId}",this.testCaseData.designerId).replace("{pageNo}",0).replace("{pageSize}",1e3);l.a.get(e).then(function(e){var a=e.data;t.testCases=a.datas.filter(function(e){return e.name!==t.testCaseData.name}),t.searchTestCases=t.testCases}).catch(function(t){console.error(t),Object(c.a)("error","获取测试用例数据失败:系统异常")})},submitForm:function(t){var e=this;this.$refs.testCaseForm.validate(function(a){if(!a)return Object(c.a)("error","表单填写有误"),!1;e.showLoading();var i={taskCode:e.testCaseData.taskCode,name:e.testCaseData.name,descr:e.testCaseData.descr,demand:e.testCaseData.demand,preconditions:e.testCaseData.preconditions,envConfig:e.testCaseData.envConfig,priority:e.testCaseData.priority,opeSteps:e.testCaseData.opeSteps,inputDatas:e.testCaseData.inputDatas,expectedResult:e.testCaseData.expectedResult,evaCriteria:e.testCaseData.evaCriteria,others:e.testCaseData.others,testResult:e.testCaseData.testResult,testStatus:e.testCaseData.testStatus,files:e.testCaseData.files,screenshots:e.testCaseData.screenshots,associatedCode:e.testCaseData.associatedCode};e.testCaseData.id&&e.testCaseData.id>0&&(i.id=e.testCaseData.id),console.log(i);var s=void 0,n=void 0;i.id?(s=r.a.TESTCASE.UPDATE.replace("{id}",i.id),n=l.a.put):(s=r.a.TESTCASE.ADD,n=l.a.post),n(s,i).then(function(a){console.log(a),e.hideLoading(),2e4!==a.code?Object(c.a)("error","提交测试用例失败:"+a.data):(e.testCaseData.id=a.data,Object(c.a)("success","提交成功"),t())}).catch(function(t){e.hideLoading(),Object(c.a)("error","用例创建失败:"+t)})})},submitAuditResult:function(t){var e=this;this.$refs.testCaseForm.validate(function(a){if(!a)return Object(c.a)("error","表单填写有误"),!1;e.showLoading();var i={id:e.testCaseData.id,examStatus:e.testCaseData.examStatus,examDescr:e.testCaseData.examDescr};l.a.put(url,i).then(function(a){console.log(a),e.hideLoading(),2e4!==a.code?Object(c.a)("error","提交审核结果失败:"+a.data):(Object(c.a)("success","提交成功"),t())}).catch(function(t){e.hideLoading(),Object(c.a)("error","用例创建失败:"+t)})})},showLoading:function(){this.loading=!0},hideLoading:function(){this.loading=!1},clearValidate:function(){arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.$refs.testCaseForm.clearValidate(),this.getList()},dataFilter:function(t){this.searchTestCases=t?this.testCases.filter(function(e){return e.name.includes(t)}):this.testCases},eqNoClick:function(){this.searchTestCases=this.testCases}}},p={render:function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("el-form",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],ref:"testCaseForm",staticStyle:{width:"400px","margin-left":"50px"},attrs:{rules:t.rules,model:t.testCaseData,"label-position":"left","label-width":"100px"}},[a("el-form-item",{attrs:{label:"任务编号",prop:"taskCode"}},[a("el-input",{attrs:{disabled:""},model:{value:t.testCaseData.taskCode,callback:function(e){t.$set(t.testCaseData,"taskCode",e)},expression:"testCaseData.taskCode"}})],1),t._v(" "),a("el-form-item",{attrs:{label:"用例名字",prop:"name"}},[a("el-input",{attrs:{disabled:t.readOnly},model:{value:t.testCaseData.name,callback:function(e){t.$set(t.testCaseData,"name",e)},expression:"testCaseData.name"}})],1),t._v(" "),a("el-form-item",{attrs:{label:"关联用例",prop:"associatedCode"}},[a("el-select",{attrs:{filterable:"","filter-method":t.dataFilter,disabled:t.readOnly},nativeOn:{click:function(e){return t.eqNoClick(e)}},model:{value:t.testCaseData.associatedCode,callback:function(e){t.$set(t.testCaseData,"associatedCode",e)},expression:"testCaseData.associatedCode"}},t._l(t.searchTestCases,function(t){return a("el-option",{key:t.code,attrs:{label:t.name,value:t.code}})}),1)],1),t._v(" "),a("el-form-item",{attrs:{label:"用例描述",prop:"descr"}},[a("el-input",{attrs:{type:"textarea",disabled:t.readOnly},model:{value:t.testCaseData.descr,callback:function(e){t.$set(t.testCaseData,"descr",e)},expression:"testCaseData.descr"}})],1),t._v(" "),a("el-form-item",{attrs:{label:"关联需求",prop:"demand"}},[a("el-input",{attrs:{type:"textarea",disabled:t.readOnly},model:{value:t.testCaseData.demand,callback:function(e){t.$set(t.testCaseData,"demand",e)},expression:"testCaseData.demand"}})],1),t._v(" "),a("el-form-item",{attrs:{label:"优先级",prop:"priority"}},[a("el-select",{attrs:{disabled:t.readOnly},model:{value:t.testCaseData.priority,callback:function(e){t.$set(t.testCaseData,"priority",e)},expression:"testCaseData.priority"}},[a("el-option",{attrs:{value:"HIGH",label:"高"}}),t._v(" "),a("el-option",{attrs:{value:"MID",label:"中"}}),t._v(" "),a("el-option",{attrs:{value:"LOW",label:"低"}})],1)],1),t._v(" "),a("el-form-item",{attrs:{label:"前置条件",prop:"preconditions"}},[a("el-input",{attrs:{type:"textarea",disabled:t.readOnly},model:{value:t.testCaseData.preconditions,callback:function(e){t.$set(t.testCaseData,"preconditions",e)},expression:"testCaseData.preconditions"}})],1),t._v(" "),a("el-form-item",{attrs:{label:"环境配置",prop:"envConfig"}},[a("el-input",{attrs:{type:"textarea",disabled:t.readOnly},model:{value:t.testCaseData.envConfig,callback:function(e){t.$set(t.testCaseData,"envConfig",e)},expression:"testCaseData.envConfig"}})],1),t._v(" "),a("el-form-item",{attrs:{label:"操作步骤",prop:"opeSteps"}},[a("el-input",{attrs:{type:"textarea",disabled:t.readOnly},model:{value:t.testCaseData.opeSteps,callback:function(e){t.$set(t.testCaseData,"opeSteps",e)},expression:"testCaseData.opeSteps"}})],1),t._v(" "),a("el-form-item",{attrs:{label:"输入数据",prop:"inputDatas"}},[a("el-input",{attrs:{type:"textarea",disabled:t.readOnly},model:{value:t.testCaseData.inputDatas,callback:function(e){t.$set(t.testCaseData,"inputDatas",e)},expression:"testCaseData.inputDatas"}})],1),t._v(" "),a("el-form-item",{attrs:{label:"预期结果",prop:"expectedResult"}},[a("el-input",{attrs:{type:"textarea",disabled:t.readOnly},model:{value:t.testCaseData.expectedResult,callback:function(e){t.$set(t.testCaseData,"expectedResult",e)},expression:"testCaseData.expectedResult"}})],1),t._v(" "),a("el-form-item",{attrs:{label:"评判标准",prop:"evaCriteria"}},[a("el-input",{attrs:{type:"textarea",disabled:t.readOnly},model:{value:t.testCaseData.evaCriteria,callback:function(e){t.$set(t.testCaseData,"evaCriteria",e)},expression:"testCaseData.evaCriteria"}})],1),t._v(" "),a("el-form-item",{attrs:{label:"其他说明",prop:"others"}},[a("el-input",{attrs:{type:"textarea",disabled:t.readOnly},model:{value:t.testCaseData.others,callback:function(e){t.$set(t.testCaseData,"others",e)},expression:"testCaseData.others"}})],1),t._v(" "),a("el-form-item",{attrs:{label:"测试结果",prop:"testResult"}},[a("el-input",{attrs:{type:"textarea",disabled:t.readOnly},model:{value:t.testCaseData.testResult,callback:function(e){t.$set(t.testCaseData,"testResult",e)},expression:"testCaseData.testResult"}})],1),t._v(" "),a("el-form-item",{attrs:{label:"测试结论",prop:"testStatus"}},[a("el-select",{attrs:{disabled:t.readOnly},model:{value:t.testCaseData.testStatus,callback:function(e){t.$set(t.testCaseData,"testStatus",e)},expression:"testCaseData.testStatus"}},[a("el-option",{attrs:{value:"WAIT",label:"待测试"}}),t._v(" "),a("el-option",{attrs:{value:"PASS",label:"通过"}}),t._v(" "),a("el-option",{attrs:{value:"NO_PASS",label:"不通过"}})],1)],1),t._v(" "),a("el-form-item",{attrs:{label:"附件",prop:"files"}},[a("file-upload",{attrs:{countLimit:t.countLimit,files:t.testCaseData.files,disabled:t.readOnly}})],1),t._v(" "),a("el-form-item",{attrs:{label:"截图",prop:"screenshots"}},[a("img-upload",{attrs:{countLimit:t.countLimit,files:t.testCaseData.screenshots,disabled:t.readOnly}})],1),t._v(" "),t.isCommitted?a("el-form-item",{attrs:{label:"审核结果",prop:"examStatus"}},[a("el-select",{attrs:{disabled:t.canAudit},model:{value:t.testCaseData.examStatus,callback:function(e){t.$set(t.testCaseData,"examStatus",e)},expression:"testCaseData.examStatus"}},[a("el-option",{attrs:{value:"WAIT",label:"待审核"}}),t._v(" "),a("el-option",{attrs:{value:"PASS",label:"有效"}}),t._v(" "),a("el-option",{attrs:{value:"NO_PASS",label:"无效"}})],1)],1):t._e(),t._v(" "),t.isCommitted?a("el-form-item",{attrs:{label:"审核结果说明",prop:"testResult"}},[a("el-input",{attrs:{type:"textarea",disabled:t.canAudit},model:{value:t.testCaseData.examDescr,callback:function(e){t.$set(t.testCaseData,"examDescr",e)},expression:"testCaseData.examDescr"}})],1):t._e()],1)},staticRenderFns:[]};var h=a("VU/8")(f,p,!1,function(t){a("qVqC")},"data-v-0931f75c",null).exports,m=a("WCgr"),v=a("Dso9"),g=a("QwPu"),b={name:"TestcaseDetail",components:{ExpendText:m.a},data:function(){return{rules:{examStatus:[{required:!0,message:"审核结果不能为空",trigger:"blur"}]},loading:!1}},props:{canAudit:{type:Boolean,default:!1},testCaseData:{type:Object,default:function(){return{id:void 0,taskCode:"",name:"",descr:"",demand:"",preconditions:"",envConfig:"",priority:void 0,opeSteps:"",inputDatas:"",expectedResult:"",evaCriteria:"",others:"",testResult:"",testStatus:void 0,files:[],screenshots:[],examStatus:"",examDescr:"",associatedCode:""}}}},methods:s()({},v.a,{toFileName:g.a,submitAuditResult:function(t){var e=this;this.$refs.testCaseDetail.validate(function(a){if(!a)return Object(c.a)("error","表单填写有误"),!1;e.showLoading();var i={examStatus:e.testCaseData.examStatus,examDescr:e.testCaseData.examDescr};l.a.put(r.a.TESTCASE.EXAM.replace("{id}",e.testCaseData.id),i).then(function(a){e.hideLoading(),2e4!==a.code?Object(c.a)("error","提交审核结果失败:"+a.data):(Object(c.a)("success","提交成功"),t(e.testCaseData.examStatus,e.testCaseData.examDescr))}).catch(function(t){e.hideLoading(),Object(c.a)("error","提交审核结果失败:"+t.data)})})},showLoading:function(){this.loading=!0},hideLoading:function(){this.loading=!1},clearValidate:function(){arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.$refs.testCaseDetail.clearValidate()}})},C={render:function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("el-form",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],ref:"testCaseDetail",staticStyle:{width:"400px","margin-left":"50px"},attrs:{rules:t.rules,model:t.testCaseData,"label-position":"left","label-width":"100px"}},[a("el-form-item",{attrs:{label:"任务编号",prop:"taskCode"}},[a("span",[t._v(t._s(t.testCaseData.taskCode))])]),t._v(" "),a("el-form-item",{attrs:{label:"用例编号",prop:"code"}},[a("span",[t._v(t._s(t.testCaseData.code))])]),t._v(" "),a("el-form-item",{attrs:{label:"关联用例",prop:"code"}},[a("span",[t._v(t._s(t.testCaseData.associatedCode))])]),t._v(" "),a("el-form-item",{attrs:{label:"用例名字",prop:"name"}},[a("span",[t._v(t._s(t.testCaseData.name))])]),t._v(" "),a("el-form-item",{attrs:{label:"用例描述",prop:"descr"}},[a("expend-text",{attrs:{text:t.testCaseData.descr}})],1),t._v(" "),a("el-form-item",{attrs:{label:"关联需求",prop:"demand"}},[a("expend-text",{attrs:{text:t.testCaseData.demand}})],1),t._v(" "),a("el-form-item",{attrs:{label:"优先级",prop:"priority"}},[a("span",[t._v(t._s(t.toPriorityCn(t.testCaseData.priority)))])]),t._v(" "),a("el-form-item",{attrs:{label:"前置条件",prop:"preconditions"}},[a("expend-text",{attrs:{text:t.testCaseData.preconditions}})],1),t._v(" "),a("el-form-item",{attrs:{label:"环境配置",prop:"envConfig"}},[a("expend-text",{attrs:{text:t.testCaseData.envConfig}})],1),t._v(" "),a("el-form-item",{attrs:{label:"操作步骤",prop:"opeSteps"}},[a("expend-text",{attrs:{text:t.testCaseData.opeSteps}})],1),t._v(" "),a("el-form-item",{attrs:{label:"输入数据",prop:"inputDatas"}},[a("expend-text",{attrs:{text:t.testCaseData.inputDatas}})],1),t._v(" "),a("el-form-item",{attrs:{label:"预期结果",prop:"expectedResult"}},[a("expend-text",{attrs:{text:t.testCaseData.expectedResult}})],1),t._v(" "),a("el-form-item",{attrs:{label:"评判标准",prop:"evaCriteria"}},[a("expend-text",{attrs:{text:t.testCaseData.evaCriteria}})],1),t._v(" "),a("el-form-item",{attrs:{label:"其他说明",prop:"others"}},[a("expend-text",{attrs:{text:t.testCaseData.others}})],1),t._v(" "),a("el-form-item",{attrs:{label:"测试结果",prop:"testResult"}},[a("expend-text",{attrs:{text:t.testCaseData.testResult}})],1),t._v(" "),a("el-form-item",{attrs:{label:"测试结论",prop:"testStatus"}},[a("span",[t._v(t._s(t.toTestStatusCn(t.testCaseData.testStatus)))])]),t._v(" "),a("el-form-item",{attrs:{label:"附件",prop:"files"}},[0===t.testCaseData.files.length?a("span",[t._v("无")]):t._e(),t._v(" "),t._l(t.testCaseData.files,function(e){return a("div",{key:e},[a("el-link",{attrs:{href:e,target:"_blank"}},[t._v(t._s(t.toFileName(e)))])],1)})],2),t._v(" "),a("el-form-item",{attrs:{label:"截图",prop:"screenshots"}},[0===t.testCaseData.screenshots.length?a("span",[t._v("无")]):t._e(),t._v(" "),t._l(t.testCaseData.screenshots,function(t){return a("el-image",{key:t,staticStyle:{width:"130px",height:"130px","margin-left":"10px"},attrs:{src:t,"preview-src-list":[t]}})})],2),t._v(" "),t.canAudit?t._e():a("el-form-item",{attrs:{label:"审核结果"}},[a("span",[t._v(t._s(t.toExamStatusCn(t.testCaseData.examStatus)))])]),t._v(" "),t.canAudit?t._e():a("el-form-item",{attrs:{label:"审核结果说明"}},[a("expend-text",{attrs:{text:t.testCaseData.examDescr}})],1),t._v(" "),t.canAudit?a("el-form-item",{attrs:{label:"审核结果",prop:"examStatus"}},[a("el-select",{model:{value:t.testCaseData.examStatus,callback:function(e){t.$set(t.testCaseData,"examStatus",e)},expression:"testCaseData.examStatus"}},[a("el-option",{attrs:{value:"WAIT",label:"待审核"}}),t._v(" "),a("el-option",{attrs:{value:"VALID",label:"有效"}}),t._v(" "),a("el-option",{attrs:{value:"INVALID",label:"无效"}})],1)],1):t._e(),t._v(" "),t.canAudit?a("el-form-item",{attrs:{label:"审核结果说明",prop:"examDescr"}},[a("el-input",{attrs:{type:"textarea"},model:{value:t.testCaseData.examDescr,callback:function(e){t.$set(t.testCaseData,"examDescr",e)},expression:"testCaseData.examDescr"}})],1):t._e()],1)},staticRenderFns:[]};var _=a("VU/8")(b,C,!1,function(t){a("ngCC")},"data-v-0aa97cae",null).exports,D=a("9jca"),y=a("yWYk"),S=a("NYxO"),x={name:"TestCaseList",components:{Pagination:n.a,TestcaseForm:h,TestcaseDetail:_,DefectList:D.a},data:function(){return{total:0,listQueryParam:{pageNo:1,pageSize:20,selectedTaskCode:this.selectedTaskCode,testStatus:this.selectedTestStatus,examStatus:this.selectedExamStatus,selectedUserId:this.selectedUserId},listLoading:!1,testCaseData:{},testCaseDatas:[],dialogFormVisible:!1,detailDialogFormVisible:!1,dialogStatus:"",textMap:{update:"编辑测试用例",create:"新建测试用例"}}},props:{selectedTaskCode:{type:String,required:!0},selectedTestStatus:{type:String,default:""},selectedExamStatus:{type:String,default:""},selectedUserId:{type:Number,default:0},testCaseCanEdit:{type:Boolean,default:!1},canAudit:{type:Boolean,default:!1}},created:function(){this.initData(),this.getList()},methods:s()({},v.a,Object(S.c)(["getRefreshTestCaseListFunc","getRefreshDefectListFunc"]),{getList:function(){var t=this;this.showListLoading();var e=r.a.TESTCASE.USER_TEST_CASES.replace("{taskCode}",this.listQueryParam.selectedTaskCode).replace("{designerId}",this.listQueryParam.selectedUserId).replace("{pageNo}",this.listQueryParam.pageNo-1).replace("{pageSize}",this.listQueryParam.pageSize);(this.listQueryParam.testStatus||this.listQueryParam.examStatus)&&(-1===e.indexOf("?")&&(e+="?"),this.listQueryParam.testStatus&&(e=e+"testStatus="+this.listQueryParam.testStatus+"&"),this.listQueryParam.examStatus&&(e=e+"examStatus="+this.listQueryParam.examStatus+"&"),e=e.substring(0,e.length-1)),l.a.get(e).then(function(e){var a=e.data;t.total=a.totalCount,t.listQueryParam.pageNo=a.pageNo+1,t.listQueryParam.pageSize=a.pageSize,t.testCaseDatas=a.datas}).catch(function(t){console.error(t),Object(c.a)("error","获取测试用例数据失败:系统异常")}),this.hideListLoading()},clearList:function(){this.testCaseDatas.splice(0,this.testCaseDatas.length),this.total=0},initData:function(){this.testCaseData={demand:"",descr:"",envConfig:"",evaCriteria:"",testStatus:"",expectedResult:"",files:[],id:void 0,designerId:this.selectedUserId,inputDatas:"",name:"",code:"",opeSteps:"",others:"",preconditions:"",priority:"",screenshots:[],taskCode:this.selectedTaskCode,testResult:"",examStatus:"",examDescr:"",associatedCode:""}},handleCreate:function(){var t=this;this.initData(),this.dialogStatus="create",this.dialogFormVisible=!0,this.$nextTick(function(){t.$refs.testCaseForm.clearValidate()})},handleCreateDefect:function(t,e){var a=this;this.$refs.testCaseTable.toggleRowExpansion(t,!0),this.$nextTick(function(){a.$refs.innerDefectList.handleCreate(t)})},submit:function(){var t=this,e=null;e=this.testCaseData.id?this.getList:function(){t.listQueryParam.pageNo=Math.ceil((t.total+1)/t.listQueryParam.pageSize),t.getList()},this.$refs.testCaseForm.submitForm(e)},handleDetail:function(t){this.detailDialogFormVisible=!0,Object(y.a)(this.testCaseData,t)},handleUpdate:function(t){var e=this;this.dialogStatus="update",this.dialogFormVisible=!0,Object(y.a)(this.testCaseData,t),this.$nextTick(function(){e.$refs.testCaseForm.clearValidate()})},handleDelete:function(t,e){var a=this;this.$confirm("您确定要删除该条数据吗?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning",center:!0,closeOnClickModal:!1}).then(function(){a.showListLoading(),l.a.delete(r.a.TESTCASE.DELETE.replace("{id}",t.id),{}).then(function(t){a.hideListLoading(),2e4===t.code?(Object(c.a)("success","删除成功"),a.getList()):Object(c.a)("error","删除失败:"+t.data)}).catch(function(t){a.hideListLoading(),Object(c.a)("error","删除失败:系统异常")})}).catch(function(){})},handleCopy:function(t){var e=this;this.dialogStatus="create",this.dialogFormVisible=!0,Object(y.a)(this.testCaseData,t),this.testCaseData.id=void 0,this.$nextTick(function(){e.$refs.testCaseForm.clearValidate()}),console.log(this.testCaseData)},submitAudit:function(){var t=this;this.$refs.testCaseDetail.submitAuditResult(function(e,a){var i=t.testCaseDatas.find(function(e){return e.id===t.testCaseData.id});i.examStatus=e,i.examDescr=a})},showListLoading:function(){this.listLoading=!0},hideListLoading:function(){this.listLoading=!1},toogleExpand2:function(t){this.$refs.testCaseTable.toggleRowExpansion(t)}})},T={render:function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",[a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.listLoading,expression:"listLoading"}],ref:"testCaseTable",staticStyle:{width:"100%"},attrs:{data:t.testCaseDatas,border:"",fit:"","highlight-current-row":""}},[a("el-table-column",{attrs:{type:"expand",align:"center","min-width":"1%"},scopedSlots:t._u([{key:"default",fn:function(e){var i=e.row;return e.$index,[a("defect-list",{ref:"innerDefectList",attrs:{defects:i.defects,"selected-task-code":t.selectedTaskCode,isContained:!0,"test-case-can-edit":t.testCaseCanEdit}})]}}])}),t._v(" "),a("el-table-column",{attrs:{label:"编号",prop:"code",sortable:"custom",align:"center","min-width":"3%"},scopedSlots:t._u([{key:"default",fn:function(e){var i=e.row;return[a("span",[t._v(t._s(i.code))])]}}])}),t._v(" "),a("el-table-column",{attrs:{label:"用例名称",align:"center","show-overflow-tooltip":!0,"min-width":"6%"},scopedSlots:t._u([{key:"default",fn:function(e){var i=e.row;return[a("span",[t._v(t._s(i.name))])]}}])}),t._v(" "),a("el-table-column",{attrs:{label:"优先级",align:"center","min-width":"3%"},scopedSlots:t._u([{key:"default",fn:function(e){var i=e.row;return[a("span",[t._v(t._s(t.toPriorityCn(i.priority)))])]}}])}),t._v(" "),a("el-table-column",{attrs:{label:"描述",align:"center","show-overflow-tooltip":!0,"min-width":"10%"},scopedSlots:t._u([{key:"default",fn:function(e){var i=e.row;return[a("span",[t._v(t._s(i.descr))])]}}])}),t._v(" "),a("el-table-column",{attrs:{label:"关联需求",align:"center","show-overflow-tooltip":!0,"min-width":"10%"},scopedSlots:t._u([{key:"default",fn:function(e){var i=e.row;return[a("span",[t._v(t._s(i.demand))])]}}])}),t._v(" "),a("el-table-column",{attrs:{label:"预期结果",align:"center","show-overflow-tooltip":!0,"min-width":"8%"},scopedSlots:t._u([{key:"default",fn:function(e){var i=e.row;return[a("span",[t._v(t._s(i.expectedResult))])]}}])}),t._v(" "),a("el-table-column",{attrs:{label:"测试结果",align:"center","show-overflow-tooltip":!0,"min-width":"8%"},scopedSlots:t._u([{key:"default",fn:function(e){var i=e.row;return[a("span",[t._v(t._s(i.testResult))])]}}])}),t._v(" "),a("el-table-column",{attrs:{label:"测试结论",align:"center","min-width":"4%"},scopedSlots:t._u([{key:"default",fn:function(e){var i=e.row;return[a("span",[t._v(t._s(t.toTestStatusCn(i.testStatus)))])]}}])}),t._v(" "),a("el-table-column",{attrs:{label:"缺陷数量(个)",align:"center","min-width":"4%"},scopedSlots:t._u([{key:"default",fn:function(e){var i=e.row;return[a("a",{staticStyle:{color:"indianred"},attrs:{href:"javascript:void(0)"},on:{click:function(e){return t.toogleExpand2(i)}}},[t._v(t._s(i.defects.length))])]}}])}),t._v(" "),t.testCaseCanEdit?t._e():a("el-table-column",{attrs:{label:"审核结果",align:"center","min-width":"4%"},scopedSlots:t._u([{key:"default",fn:function(e){var i=e.row;return[a("span",[t._v(t._s(t.toExamStatusCn(i.examStatus)))])]}}],null,!1,578154771)}),t._v(" "),t.testCaseCanEdit?t._e():a("el-table-column",{attrs:{label:"审核结果说明",align:"center","show-overflow-tooltip":!0,"min-width":"8%"},scopedSlots:t._u([{key:"default",fn:function(e){var i=e.row;return[a("span",[t._v(t._s(i.examDescr))])]}}],null,!1,2336278518)}),t._v(" "),a("el-table-column",{attrs:{label:"操作",align:"center","min-width":"5%"},scopedSlots:t._u([{key:"default",fn:function(e){var i=e.row,s=e.$index;return[t.testCaseCanEdit||t.canAudit?t._e():a("i",{staticClass:"el-icon-tickets mini-margin",staticStyle:{cursor:"pointer"},attrs:{title:"查看详情"},on:{click:function(e){return t.handleDetail(i)}}}),t._v(" "),t.testCaseCanEdit?a("i",{staticClass:"el-icon-edit mini-margin",staticStyle:{cursor:"pointer"},attrs:{title:"编辑"},on:{click:function(e){return t.handleUpdate(i)}}}):t._e(),t._v(" "),t.testCaseCanEdit?a("i",{staticClass:"el-icon-delete mini-margin",staticStyle:{cursor:"pointer"},attrs:{title:"删除"},on:{click:function(e){return t.handleDelete(i,s)}}}):t._e(),t._v(" "),t.testCaseCanEdit?a("i",{staticClass:"el-icon-document-copy mini-margin",staticStyle:{cursor:"pointer"},attrs:{title:"复制"},on:{click:function(e){return t.handleCopy(i)}}}):t._e(),t._v(" "),t.testCaseCanEdit&&"NO_PASS"===i.testStatus?a("i",{staticClass:"el-icon-document-add mini-margin",staticStyle:{cursor:"pointer"},attrs:{title:"新增缺陷"},on:{click:function(e){return t.handleCreateDefect(i,s)}}}):t._e(),t._v(" "),t.canAudit?a("i",{staticClass:"el-icon-edit mini-margin",staticStyle:{cursor:"pointer"},attrs:{title:"审核"},on:{click:function(e){return t.handleDetail(i)}}}):t._e()]}}])})],1),t._v(" "),a("pagination",{directives:[{name:"show",rawName:"v-show",value:t.total>0,expression:"total>0"}],attrs:{total:t.total,page:t.listQueryParam.pageNo,limit:t.listQueryParam.pageSize},on:{"update:page":function(e){return t.$set(t.listQueryParam,"pageNo",e)},"update:limit":function(e){return t.$set(t.listQueryParam,"pageSize",e)},pagination:t.getList}}),t._v(" "),a("el-dialog",{attrs:{title:t.textMap[t.dialogStatus],visible:t.dialogFormVisible},on:{"update:visible":function(e){t.dialogFormVisible=e}}},[a("testcase-form",{ref:"testCaseForm",staticStyle:{width:"600px"},attrs:{"test-case-data":t.testCaseData,"read-only":!t.testCaseCanEdit}}),t._v(" "),a("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("el-button",{on:{click:function(e){t.dialogFormVisible=!1}}},[t._v("\n 取消\n ")]),t._v(" "),a("el-button",{attrs:{type:"primary"},on:{click:function(e){return t.submit()}}},[t._v("\n 提交\n ")])],1)],1),t._v(" "),a("el-dialog",{attrs:{title:"用例详情",visible:t.detailDialogFormVisible},on:{"update:visible":function(e){t.detailDialogFormVisible=e}}},[a("testcase-detail",{ref:"testCaseDetail",staticStyle:{width:"600px"},attrs:{"test-case-data":t.testCaseData,"can-audit":t.canAudit}}),t._v(" "),a("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("el-button",{on:{click:function(e){t.dialogFormVisible=!1}}},[t._v("\n 取消\n ")]),t._v(" "),t.canAudit?a("el-button",{attrs:{type:"primary"},on:{click:function(e){return t.submitAudit()}}},[t._v("\n 提交\n ")]):t._e()],1)],1)],1)},staticRenderFns:[]};var w=a("VU/8")(x,T,!1,function(t){a("iAvk"),a("zpvg")},"data-v-7e2f1479",null);e.a=w.exports},"1onU":function(t,e,a){"use strict";Math.easeInOutQuad=function(t,e,a,i){return(t/=i/2)<1?a/2*t*t+e:-a/2*(--t*(t-2)-1)+e};var i=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||function(t){window.setTimeout(t,1e3/60)};function s(t,e,a){var s=document.documentElement.scrollTop||document.body.parentNode.scrollTop||document.body.scrollTop,n=t-s,o=0;e=void 0===e?500:e;!function t(){o+=20;var r,l=Math.easeInOutQuad(o,s,n,e);r=l,document.documentElement.scrollTop=r,document.body.parentNode.scrollTop=r,document.body.scrollTop=r,o0&&(i.id=e.defectData.id),console.log(i);var s=void 0,n=void 0;i.id?(s=l.a.TESTCASE.UPDATE_DEFECT.replace("{id}",i.id),n=r.a.put):(s=l.a.TESTCASE.ADD_DEFECT,n=r.a.post),n(s,i).then(function(a){console.log(a),e.hideLoading(),2e4!==a.code?Object(c.a)("error","提交缺陷失败:"+a.msg):(e.defectData.id=a.data,Object(c.a)("success","提交成功"),t())}).catch(function(t){e.hideLoading(),Object(c.a)("error","缺陷创建失败:"+t)})})},showLoading:function(){this.loading=!0},hideLoading:function(){this.loading=!1},clearValidate:function(){arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.$refs.defectForm.clearValidate()}}},h={render:function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("el-form",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],ref:"defectForm",staticStyle:{width:"400px","margin-left":"50px"},attrs:{rules:t.rules,model:t.defectData,"label-position":"left","label-width":"100px"}},[a("el-form-item",{attrs:{label:"用例编号",prop:"testCaseCode"}},[a("el-input",{attrs:{disabled:""},model:{value:t.defectData.testCaseCode,callback:function(e){t.$set(t.defectData,"testCaseCode",e)},expression:"defectData.testCaseCode"}})],1),t._v(" "),a("el-form-item",{attrs:{label:"描述",prop:"descr"}},[a("el-input",{attrs:{type:"textarea"},model:{value:t.defectData.descr,callback:function(e){t.$set(t.defectData,"descr",e)},expression:"defectData.descr"}})],1),t._v(" "),a("el-form-item",{attrs:{label:"严重等级",prop:"seriousness"}},[a("el-select",{model:{value:t.defectData.seriousness,callback:function(e){t.$set(t.defectData,"seriousness",e)},expression:"defectData.seriousness"}},[a("el-option",{attrs:{value:"VERY_HIGH",label:"极高"}}),t._v(" "),a("el-option",{attrs:{value:"HIGH",label:"高"}}),t._v(" "),a("el-option",{attrs:{value:"MID",label:"中"}}),t._v(" "),a("el-option",{attrs:{value:"LOW",label:"低"}}),t._v(" "),a("el-option",{attrs:{value:"VERY_LOW",label:"极低"}})],1)],1),t._v(" "),a("el-form-item",{attrs:{label:"优先级",prop:"priority"}},[a("el-select",{model:{value:t.defectData.priority,callback:function(e){t.$set(t.defectData,"priority",e)},expression:"defectData.priority"}},[a("el-option",{attrs:{value:"HIGH",label:"高"}}),t._v(" "),a("el-option",{attrs:{value:"MID",label:"中"}}),t._v(" "),a("el-option",{attrs:{value:"LOW",label:"低"}})],1)],1),t._v(" "),a("el-form-item",{attrs:{label:"缺陷类型",prop:"defectType"}},[a("el-select",{model:{value:t.defectData.defectType,callback:function(e){t.$set(t.defectData,"defectType",e)},expression:"defectData.defectType"}},[a("el-option",{attrs:{value:"FUNCTIONALITY",label:"功能性"}}),t._v(" "),a("el-option",{attrs:{value:"COMPATIBILITY",label:"兼容性"}}),t._v(" "),a("el-option",{attrs:{value:"INFORMATION_SECURITY",label:"信息安全性"}}),t._v(" "),a("el-option",{attrs:{value:"RELIABILITY",label:"可靠性"}}),t._v(" "),a("el-option",{attrs:{value:"USE",label:"易用性"}}),t._v(" "),a("el-option",{attrs:{value:"PERFORMANCE",label:"性能效率"}}),t._v(" "),a("el-option",{attrs:{value:"PORTABILITY",label:"可移植性"}}),t._v(" "),a("el-option",{attrs:{value:"MAINTAINABILITY",label:"维护性"}}),t._v(" "),a("el-option",{attrs:{value:"OTHER",label:"其他"}})],1)],1),t._v(" "),a("el-form-item",{attrs:{label:"前置条件",prop:"preconditions"}},[a("el-input",{attrs:{type:"textarea"},model:{value:t.defectData.preconditions,callback:function(e){t.$set(t.defectData,"preconditions",e)},expression:"defectData.preconditions"}})],1),t._v(" "),a("el-form-item",{attrs:{label:"环境配置",prop:"envConfig"}},[a("el-input",{attrs:{type:"textarea"},model:{value:t.defectData.envConfig,callback:function(e){t.$set(t.defectData,"envConfig",e)},expression:"defectData.envConfig"}})],1),t._v(" "),a("el-form-item",{attrs:{label:"操作步骤",prop:"opeSteps"}},[a("el-input",{attrs:{type:"textarea"},model:{value:t.defectData.opeSteps,callback:function(e){t.$set(t.defectData,"opeSteps",e)},expression:"defectData.opeSteps"}})],1),t._v(" "),a("el-form-item",{attrs:{label:"输入数据",prop:"inputDatas"}},[a("el-input",{attrs:{type:"textarea"},model:{value:t.defectData.inputDatas,callback:function(e){t.$set(t.defectData,"inputDatas",e)},expression:"defectData.inputDatas"}})],1),t._v(" "),a("el-form-item",{attrs:{label:"预期结果",prop:"expectedResult"}},[a("el-input",{attrs:{type:"textarea"},model:{value:t.defectData.expectedResult,callback:function(e){t.$set(t.defectData,"expectedResult",e)},expression:"defectData.expectedResult"}})],1),t._v(" "),a("el-form-item",{attrs:{label:"测试结果",prop:"testResult"}},[a("el-input",{attrs:{type:"textarea"},model:{value:t.defectData.testResult,callback:function(e){t.$set(t.defectData,"testResult",e)},expression:"defectData.testResult"}})],1),t._v(" "),a("el-form-item",{attrs:{label:"其他说明",prop:"others"}},[a("el-input",{attrs:{type:"textarea"},model:{value:t.defectData.others,callback:function(e){t.$set(t.defectData,"others",e)},expression:"defectData.others"}})],1),t._v(" "),a("el-form-item",{attrs:{label:"附件",prop:"files"}},[a("file-upload",{attrs:{countLimit:t.countLimit,files:t.defectData.files}})],1),t._v(" "),a("el-form-item",{attrs:{label:"截图",prop:"screenshots"}},[a("img-upload",{attrs:{countLimit:t.countLimit,files:t.defectData.screenshots}})],1)],1)},staticRenderFns:[]};var m=a("VU/8")(p,h,!1,function(t){a("aFhh")},"data-v-2fb256bc",null).exports,v=a("WCgr"),g=a("QwPu"),b={name:"DefectDetail",components:{ExpendText:v.a},props:{defectData:{type:Object,default:function(){return{id:void 0,testCaseCode:"",taskCode:"",descr:"",preconditions:"",envConfig:"",priority:void 0,seriousness:void 0,defectType:void 0,opeSteps:"",inputDatas:"",expectedResult:"",others:"",testResult:"",files:[],screenshots:[]}}}},methods:s()({},n.a,{toFileName:g.a})},C={render:function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("el-form",{ref:"defectDetail",staticStyle:{width:"400px","margin-left":"50px"},attrs:{"label-position":"left","label-width":"100px"}},[a("el-form-item",{attrs:{label:"用例编号"}},[a("span",[t._v(t._s(t.defectData.testCaseCode))])]),t._v(" "),a("el-form-item",{attrs:{label:"缺陷编号"}},[a("span",[t._v(t._s(t.defectData.code))])]),t._v(" "),a("el-form-item",{attrs:{label:"缺陷描述"}},[a("expend-text",{attrs:{text:t.defectData.descr}})],1),t._v(" "),a("el-form-item",{attrs:{label:"严重等级"}},[a("span",[t._v(t._s(t.toSeriousnessCn(t.defectData.seriousness)))])]),t._v(" "),a("el-form-item",{attrs:{label:"优先级"}},[a("span",[t._v(t._s(t.toPriorityCn(t.defectData.priority)))])]),t._v(" "),a("el-form-item",{attrs:{label:"缺陷类型"}},[a("span",[t._v(t._s(t.toDefectTypeCn(t.defectData.defectType)))])]),t._v(" "),a("el-form-item",{attrs:{label:"前置条件"}},[a("expend-text",{attrs:{text:t.defectData.preconditions}})],1),t._v(" "),a("el-form-item",{attrs:{label:"环境配置"}},[a("expend-text",{attrs:{text:t.defectData.envConfig}})],1),t._v(" "),a("el-form-item",{attrs:{label:"操作步骤"}},[a("expend-text",{attrs:{text:t.defectData.opeSteps}})],1),t._v(" "),a("el-form-item",{attrs:{label:"输入数据"}},[a("expend-text",{attrs:{text:t.defectData.inputDatas}})],1),t._v(" "),a("el-form-item",{attrs:{label:"预期结果"}},[a("expend-text",{attrs:{text:t.defectData.expectedResult}})],1),t._v(" "),a("el-form-item",{attrs:{label:"测试结果"}},[a("expend-text",{attrs:{text:t.defectData.testResult}})],1),t._v(" "),a("el-form-item",{attrs:{label:"其他说明"}},[a("expend-text",{attrs:{text:t.defectData.others}})],1),t._v(" "),a("el-form-item",{attrs:{label:"附件",prop:"files"}},[0===t.defectData.files.length?a("span",[t._v("无")]):t._e(),t._v(" "),t._l(t.defectData.files,function(e){return a("div",[a("el-link",{key:e,attrs:{href:e,target:"_blank"}},[t._v(t._s(t.toFileName(e)))])],1)})],2),t._v(" "),a("el-form-item",{attrs:{label:"截图",prop:"screenshots"}},[0===t.defectData.screenshots.length?a("span",[t._v("无")]):t._e(),t._v(" "),t._l(t.defectData.screenshots,function(t){return a("el-image",{key:t,staticStyle:{width:"130px",height:"130px","margin-left":"10px"},attrs:{src:t,"preview-src-list":[t]}})})],2)],1)},staticRenderFns:[]};var _=a("VU/8")(b,C,!1,function(t){a("8l0Z")},"data-v-cec8ec8a",null).exports,D=a("1onU"),y=a("NYxO"),S={name:"DefectList",components:{DefectForm:m,DefectDetail:_,Pagination:D.a},data:function(){return{detailDialogFormVisible:!1,dialogFormVisible:!1,textMap:{create:"新建缺陷",update:"编辑缺陷"},defectData:{},listLoading:!1,dialogStatus:"",listQueryParam:{pageNo:1,pageSize:20,selectedTaskCode:this.selectedTaskCode,selectedUserId:this.selectedUserId},total:0}},props:{isContained:{type:Boolean,default:!1},defects:{type:Array,default:function(){return[]}},testCaseCanEdit:{type:Boolean,default:!1},selectedTaskCode:{type:String,default:""},selectedUserId:{type:Number,default:0}},created:function(){this.initDefectData(),this.isContained||this.getList()},methods:s()({},n.a,Object(y.c)(["getRefreshTestCaseListFunc","getRefreshDefectListFunc"]),{handleDetail:function(t){console.log(t),Object(o.a)(this.defectData,t),this.detailDialogFormVisible=!0},handleUpdate:function(t){var e=this;this.dialogStatus="update_defect",this.dialogFormVisible=!0,Object(o.a)(this.defectData,t),this.$nextTick(function(){e.$refs.defectForm.clearValidate()}),console.log(this.defectData)},handleDelete:function(t,e){var a=this;this.$confirm("您确定要删除该条数据吗?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning",center:!0,closeOnClickModal:!1}).then(function(){a.showListLoading(),r.a.delete(l.a.TESTCASE.DELETE_DEFECT.replace("{id}",t.id),{}).then(function(t){a.hideListLoading(),2e4===t.code?(Object(c.a)("success","删除成功"),a.getRefreshTestCaseListFunc()(),a.getRefreshDefectListFunc()()):Object(c.a)("error","删除失败:"+t.data)}).catch(function(t){a.hideListLoading(),Object(c.a)("error","删除失败:"+t)})}).catch(function(){})},handleCopy:function(t){var e=this;this.dialogStatus="create_defect",this.dialogFormVisible=!0,Object(o.a)(this.defectData,t),this.defectData.id=void 0,this.$nextTick(function(){e.$refs.defectForm.clearValidate()}),console.log(this.defectData)},handleCreate:function(t){var e=this;this.initDefectData(),t&&(this.defectData.taskCode=this.listQueryParam.selectedTaskCode,this.defectData.testCaseCode=t.code,this.defectData.priority=t.priority,this.defectData.preconditions=t.preconditions,this.defectData.envConfig=t.envConfig,this.defectData.opeSteps=t.opeSteps,this.defectData.inputDatas=t.inputDatas,this.defectData.expectedResult=t.expectedResult,this.defectData.testResult=t.testResult),this.dialogStatus="create_defect",this.dialogFormVisible=!0,this.$nextTick(function(){e.$refs.defectForm.clearValidate()})},submit:function(){var t=this;this.$refs.defectForm.submitForm(function(){t.getRefreshDefectListFunc()(),t.getRefreshTestCaseListFunc()()})},hideListLoading:function(){this.listLoading=!1},showListLoading:function(){this.listLoading=!0},initDefectData:function(){this.defectData={descr:"",envConfig:"",expectedResult:"",files:[],id:void 0,inputDatas:"",opeSteps:"",others:"",preconditions:"",priority:"",seriousness:"",defectType:"",screenshots:[],taskCode:"",testCaseCode:"",testResult:""}},getList:function(){var t=this;this.showListLoading();var e=l.a.TESTCASE.USER_DEFECTS.replace("{taskCode}",this.listQueryParam.selectedTaskCode).replace("{committerId}",this.listQueryParam.selectedUserId).replace("{pageNo}",this.listQueryParam.pageNo-1).replace("{pageSize}",this.listQueryParam.pageSize);r.a.get(e).then(function(e){var a=e.data;console.log(a),t.total=a.totalCount,t.listQueryParam.pageNo=a.pageNo+1,t.listQueryParam.pageSize=a.pageSize,t.defects.splice(0,t.defects.length),a.datas.forEach(function(e){t.defects.push(e)})}).catch(function(t){console.error(t),Object(c.a)("error","获取缺陷数据失败:"+t.data.message)}),this.hideListLoading()},clearList:function(){this.defects.splice(0,this.defects.length),this.total=0}})},x={render:function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",[a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.listLoading,expression:"listLoading"}],staticStyle:{width:"100%"},attrs:{data:t.defects,border:"",fit:""}},[a("el-table-column",{attrs:{label:"编号",align:"center","min-width":"15%"},scopedSlots:t._u([{key:"default",fn:function(e){var i=e.row;return[a("span",[t._v(t._s(i.code))])]}}])}),t._v(" "),a("el-table-column",{attrs:{label:"缺陷描述",align:"center","show-overflow-tooltip":!0,"min-width":"35%"},scopedSlots:t._u([{key:"default",fn:function(e){var i=e.row;return[a("span",[t._v(t._s(i.descr))])]}}])}),t._v(" "),a("el-table-column",{attrs:{label:"严重等级",align:"center","min-width":"12%"},scopedSlots:t._u([{key:"default",fn:function(e){var i=e.row;return[a("span",[t._v(t._s(t.toSeriousnessCn(i.seriousness)))])]}}])}),t._v(" "),a("el-table-column",{attrs:{label:"优先级",align:"center","min-width":"10%"},scopedSlots:t._u([{key:"default",fn:function(e){var i=e.row;return[a("span",[t._v(t._s(t.toPriorityCn(i.priority)))])]}}])}),t._v(" "),a("el-table-column",{attrs:{label:"缺陷类型",align:"center","min-width":"12%"},scopedSlots:t._u([{key:"default",fn:function(e){var i=e.row;return[a("span",[t._v(t._s(t.toDefectTypeCn(i.defectType)))])]}}])}),t._v(" "),a("el-table-column",{attrs:{label:"操作步骤",align:"center","show-overflow-tooltip":!0,"min-width":"35%"},scopedSlots:t._u([{key:"default",fn:function(e){var i=e.row;return[a("span",[t._v(t._s(i.opeSteps))])]}}])}),t._v(" "),a("el-table-column",{attrs:{label:"输入数据",align:"center","show-overflow-tooltip":!0,"min-width":"35%"},scopedSlots:t._u([{key:"default",fn:function(e){var i=e.row;return[a("span",[t._v(t._s(i.inputDatas))])]}}])}),t._v(" "),a("el-table-column",{attrs:{label:"预期结果",align:"center","show-overflow-tooltip":!0,"min-width":"35%"},scopedSlots:t._u([{key:"default",fn:function(e){var i=e.row;return[a("span",[t._v(t._s(i.expectedResult))])]}}])}),t._v(" "),a("el-table-column",{attrs:{label:"测试结果",align:"center","show-overflow-tooltip":!0,"min-width":"35%"},scopedSlots:t._u([{key:"default",fn:function(e){var i=e.row;return[a("span",[t._v(t._s(i.testResult))])]}}])}),t._v(" "),a("el-table-column",{attrs:{label:"操作",align:"center","class-name":"small-padding fixed-width","min-width":"20%"},scopedSlots:t._u([{key:"default",fn:function(e){var i=e.row,s=e.$index;return[t.testCaseCanEdit?t._e():a("i",{staticClass:"el-icon-tickets mini-margin",staticStyle:{cursor:"pointer"},attrs:{title:"查看详情"},on:{click:function(e){return t.handleDetail(i)}}}),t._v(" "),t.testCaseCanEdit?a("i",{staticClass:"el-icon-edit mini-margin ",staticStyle:{cursor:"pointer"},attrs:{title:"编辑"},on:{click:function(e){return t.handleUpdate(i)}}}):t._e(),t._v(" "),t.testCaseCanEdit?a("i",{staticClass:"el-icon-delete mini-margin ",staticStyle:{cursor:"pointer"},attrs:{title:"删除"},on:{click:function(e){return t.handleDelete(i,s)}}}):t._e(),t._v(" "),t.testCaseCanEdit?a("i",{staticClass:"el-icon-document-copy mini-margin ",staticStyle:{cursor:"pointer"},attrs:{title:"复制"},on:{click:function(e){return t.handleCopy(i)}}}):t._e()]}}])})],1),t._v(" "),t.isContained?t._e():a("pagination",{directives:[{name:"show",rawName:"v-show",value:t.total>0,expression:"total>0"}],attrs:{total:t.total,page:t.listQueryParam.pageNo,limit:t.listQueryParam.pageSize},on:{"update:page":function(e){return t.$set(t.listQueryParam,"pageNo",e)},"update:limit":function(e){return t.$set(t.listQueryParam,"pageSize",e)},pagination:t.getList}}),t._v(" "),a("el-dialog",{attrs:{title:t.textMap[t.dialogStatus],visible:t.dialogFormVisible},on:{"update:visible":function(e){t.dialogFormVisible=e}}},[a("defect-form",{ref:"defectForm",staticStyle:{width:"600px"},attrs:{"defect-data":t.defectData}}),t._v(" "),a("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("el-button",{on:{click:function(e){t.dialogFormVisible=!1}}},[t._v("\n 取消\n ")]),t._v(" "),a("el-button",{attrs:{type:"primary"},on:{click:function(e){return t.submit()}}},[t._v("\n 提交\n ")])],1)],1),t._v(" "),a("el-dialog",{attrs:{title:"缺陷详情",visible:t.detailDialogFormVisible},on:{"update:visible":function(e){t.detailDialogFormVisible=e}}},[a("defect-detail",{ref:"defectDetail",staticStyle:{width:"600px"},attrs:{"defect-data":t.defectData}}),t._v(" "),a("div",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("el-button",{on:{click:function(e){t.detailDialogFormVisible=!1}}},[t._v("\n 取消\n ")])],1)],1)],1)},staticRenderFns:[]};var T=a("VU/8")(S,x,!1,function(t){a("z4be")},"data-v-22f3d985",null);e.a=T.exports},CYQe:function(t,e,a){"use strict";var i=a("b9vf"),s={name:"FileUpload",data:function(){return{fileList:[],uploadUrl:"http://10.18.18.39"+i.a.FILE.UPLOAD_TEST_CASE_FILE}},props:{countLimit:{type:Number,default:1},files:Array,disabled:{type:Boolean,default:!1}},watch:{files:{immediate:!0,handler:function(){var t=this;this.files.length!==this.fileList.length&&(this.fileList=[],this.files.map(function(e){var a=e.substring(e.lastIndexOf("/")+1);a=a.substring(0,a.indexOf("_"))+a.substring(a.lastIndexOf(".")),t.fileList.push({name:a,url:e})}))}}},methods:{handleExceed:function(t,e){this.$message.warning("当前限制选择 "+this.countLimit+" 个文件,本次选择了 "+t.length+" 个文件,共选择了 "+(t.length+e.length)+" 个文件")},beforeFileUpload:function(t){console.log(t);var e="application/pdf"===t.type,a="application/vnd.openxmlformats-officedocument.wordprocessingml.document"===t.type,i="application/vnd.ms-excel"===t.type,s="application/x-xls"===t.type,n="text/plain"===t.type,o="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"===t.type;return a||i||e||n||s||o||this.$message.error("上传文件只能是 PDF 、 DOC 、DOCX 、XLS、TXT、XLSX 格式!"),a||i||e||n||s||o},handleUploadSuccess:function(t,e,a){this.fileList.push(e),this.files.push(t)},imgUploadError:function(t,e,a){console.log(t),this.$message.error("上传图片失败!")},handleFileRemove:function(t){for(var e in console.log(this.fileList),this.fileList)this.fileList[e].uid===t.uid&&(this.fileList.splice(e,1),this.files.splice(e,1));console.log(this.files)}}},n={render:function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("el-upload",{staticClass:"upload-file",attrs:{drag:"",action:t.uploadUrl,"on-success":t.handleUploadSuccess,multiple:"",limit:t.countLimit,"on-exceed":t.handleExceed,"before-upload":t.beforeFileUpload,"on-remove":t.handleFileRemove,"file-list":t.fileList,"on-error":t.imgUploadError,disabled:t.disabled}},[a("i",{staticClass:"el-icon-upload"}),t._v(" "),a("div",{staticClass:"el-upload__text"},[t._v("\n 将文件拖到此处,或\n "),a("em",[t._v("点击上传")])])])},staticRenderFns:[]};var o=a("VU/8")(s,n,!1,function(t){a("6Cg8")},"data-v-8b3cff4a",null);e.a=o.exports},Dso9:function(t,e,a){"use strict";e.a={toTestStatusCn:function(t){var e="";return"WAIT"===t?e="待测试":"PASS"===t?e="通过":"NO_PASS"===t&&(e="未通过"),e},toExamStatusCn:function(t){var e="";return"WAIT"===t?e="待审核":"VALID"===t?e="有效":"INVALID"===t&&(e="无效"),e},toPriorityCn:function(t){var e="";return"HIGH"===t?e="高":"MID"===t?e="中":"LOW"===t&&(e="低"),e},toSeriousnessCn:function(t){var e="";return"VERY_HIGH"===t?e="极高":"HIGH"===t?e="高":"MID"===t?e="中":"LOW"===t?e="低":"VERY_LOW"===t&&(e="极低"),e},toDefectTypeCn:function(t){var e="";return"FUNCTIONALITY"===t?e="功能性":"COMPATIBILITY"===t?e="兼容性":"INFORMATION_SECURITY"===t?e="信息安全性":"RELIABILITY"===t?e="可靠性":"USE"===t?e="易用性":"PERFORMANCE"===t?e="性能效率":"PORTABILITY"===t?e="可移植性":"MAINTAINABILITY"===t?e="维护性":"OTHER"===t&&(e="其他"),e}}},EdfD:function(t,e){},"Gox+":function(t,e,a){"use strict";var i=a("b9vf"),s={name:"ImgUpload",data:function(){return{fileList:[],uploadUrl:"http://10.18.18.39"+i.a.FILE.UPLOAD_TEST_CASE_IMAGE}},props:{countLimit:{type:Number,default:1},files:Array,disabled:{type:Boolean,default:!1}},watch:{files:{immediate:!0,handler:function(){var t=this;this.files.length!==this.fileList.length&&(this.fileList=[],this.files.map(function(e){t.fileList.push({url:e})}))}}},methods:{handleExceed:function(t,e){this.$message.warning("当前限制选择 "+this.countLimit+" 个文件,本次选择了 "+t.length+" 个文件,共选择了 "+(t.length+e.length)+" 个文件")},beforeFileUpload:function(t){console.log(t);var e="image/jpeg"===t.type,a="image/png"===t.type,i=t.size/1024/1024<2;return e||a||this.$message.error("上传头像图片只能是 JPG 和 PNG 格式!"),i||this.$message.error("上传图片大小不能超过 2MB!"),(e||a)&&i},handleUploadSuccess:function(t,e,a){this.fileList.push(e),this.files.push(t)},imgUploadError:function(t,e,a){console.log(t),this.$message.error("上传图片失败!")},handleFileRemove:function(t){for(var e in console.log(this.fileList),this.fileList)this.fileList[e].uid===t.uid&&(this.fileList.splice(e,1),this.files.splice(e,1));console.log(this.files)}}},n={render:function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("el-upload",{attrs:{"list-type":"picture-card",accept:"image/*",action:t.uploadUrl,"on-success":t.handleUploadSuccess,multiple:"",limit:t.countLimit,"on-exceed":t.handleExceed,"before-upload":t.beforeFileUpload,"on-remove":t.handleFileRemove,"file-list":t.fileList,"on-error":t.imgUploadError,disabled:t.disabled}},[a("i",{staticClass:"el-icon-plus",attrs:{slot:"default"},slot:"default"})])},staticRenderFns:[]},o=a("VU/8")(s,n,!1,null,null,null);e.a=o.exports},Gu7T:function(t,e,a){"use strict";e.__esModule=!0;var i,s=a("c/Tr"),n=(i=s)&&i.__esModule?i:{default:i};e.default=function(t){if(Array.isArray(t)){for(var e=0,a=Array(t.length);ethis.length}},watch:{text:function(){this.isExpend=!1}},methods:{capitalize:function(t){return t?(t=t.toString()).length>100?t.substr(0,100):t:""},expendClick:function(){this.isExpend=!this.isExpend}}},s={render:function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",[a("span",[t._v(t._s(t.isExpend?t.text:t.capitalize(t.text)))]),t._v(" "),t.showExpend?a("span",{staticClass:"expend",on:{click:t.expendClick}},[t._v("\n "+t._s(t.isExpend?"收起":"展开")+"\n "),a("i",{class:t.isExpend?"el-icon-arrow-up":"el-icon-arrow-down"})]):t._e()])},staticRenderFns:[]};var n=a("VU/8")(i,s,!1,function(t){a("xI3S")},"data-v-671aa01b",null);e.a=n.exports},aFhh:function(t,e){},"c/Tr":function(t,e,a){t.exports={default:a("5zde"),__esModule:!0}},cn5D:function(t,e){},fBQ2:function(t,e,a){"use strict";var i=a("evD5"),s=a("X8DO");t.exports=function(t,e,a){e in t?i.f(t,e,s(0,a)):t[e]=a}},iAvk:function(t,e){},ngCC:function(t,e){},o3Ej:function(t,e){},ouNp:function(t,e){},qVqC:function(t,e){},qyJz:function(t,e,a){"use strict";var i=a("+ZMJ"),s=a("kM2E"),n=a("sB3e"),o=a("msXi"),r=a("Mhyx"),l=a("QRG4"),c=a("fBQ2"),d=a("3fs2");s(s.S+s.F*!a("dY0y")(function(t){Array.from(t)}),"Array",{from:function(t){var e,a,s,u,f=n(t),p="function"==typeof this?this:Array,h=arguments.length,m=h>1?arguments[1]:void 0,v=void 0!==m,g=0,b=d(f);if(v&&(m=i(m,h>2?arguments[2]:void 0,2)),void 0==b||p==Array&&r(b))for(a=new p(e=l(f.length));e>g;g++)c(a,g,v?m(f[g],g):f[g]);else for(u=b.call(f),a=new p;!(s=u.next()).done;g++)c(a,g,v?o(u,m,[s.value,g],!0):s.value);return a.length=g,a}})},tiPg:function(t,e,a){"use strict";var i=a("Gu7T"),s=a.n(i);function n(t,e){var a=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),a.push.apply(a,i)}return a}function o(t){for(var e=1;e=0||(s[a]=t[a]);return s}(t,e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);for(i=0;i=0||Object.prototype.propertyIsEnumerable.call(t,a)&&(s[a]=t[a])}return s}function u(t){if("undefined"!=typeof window&&window.navigator)return!!navigator.userAgent.match(t)}var f=u(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),p=u(/Edge/i),h=u(/firefox/i),m=u(/safari/i)&&!u(/chrome/i)&&!u(/android/i),v=u(/iP(ad|od|hone)/i),g=u(/chrome/i)&&u(/android/i),b={capture:!1,passive:!1};function C(t,e,a){t.addEventListener(e,a,!f&&b)}function _(t,e,a){t.removeEventListener(e,a,!f&&b)}function D(t,e){if(e){if(">"===e[0]&&(e=e.substring(1)),t)try{if(t.matches)return t.matches(e);if(t.msMatchesSelector)return t.msMatchesSelector(e);if(t.webkitMatchesSelector)return t.webkitMatchesSelector(e)}catch(t){return!1}return!1}}function y(t){return t.host&&t!==document&&t.host.nodeType?t.host:t.parentNode}function S(t,e,a,i){if(t){a=a||document;do{if(null!=e&&(">"===e[0]?t.parentNode===a&&D(t,e):D(t,e))||i&&t===a)return t;if(t===a)break}while(t=y(t))}return null}var x,T=/\s+/g;function w(t,e,a){if(t&&e)if(t.classList)t.classList[a?"add":"remove"](e);else{var i=(" "+t.className+" ").replace(T," ").replace(" "+e+" "," ");t.className=(i+(a?" "+e:"")).replace(T," ")}}function E(t,e,a){var i=t&&t.style;if(i){if(void 0===a)return document.defaultView&&document.defaultView.getComputedStyle?a=document.defaultView.getComputedStyle(t,""):t.currentStyle&&(a=t.currentStyle),void 0===e?a:a[e];e in i||-1!==e.indexOf("webkit")||(e="-webkit-"+e),i[e]=a+("string"==typeof a?"":"px")}}function k(t,e){var a="";if("string"==typeof t)a=t;else do{var i=E(t,"transform");i&&"none"!==i&&(a=i+" "+a)}while(!e&&(t=t.parentNode));var s=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return s&&new s(a)}function L(t,e,a){if(t){var i=t.getElementsByTagName(e),s=0,n=i.length;if(a)for(;s=n:s<=n))return i;if(i===O())break;i=$(i,!1)}return!1}function I(t,e,a,i){for(var s=0,n=0,o=t.children;n2&&void 0!==arguments[2]?arguments[2]:{},i=a.evt,s=d(a,W);X.pluginEvent.bind(Vt)(t,e,o({dragEl:J,parentEl:K,ghostEl:Z,rootEl:tt,nextEl:et,lastDownEl:at,cloneEl:it,cloneHidden:st,dragStarted:gt,putSortable:dt,activeSortable:Vt.active,originalEvent:i,oldIndex:nt,oldDraggableIndex:rt,newIndex:ot,newDraggableIndex:lt,hideGhostForTarget:$t,unhideGhostForTarget:Mt,cloneNowHidden:function(){st=!0},cloneNowShown:function(){st=!1},dispatchSortableEvent:function(t){G({sortable:e,name:t,originalEvent:i})}},s))};function G(t){q(o({putSortable:dt,cloneEl:it,targetEl:J,rootEl:tt,oldIndex:nt,oldDraggableIndex:rt,newIndex:ot,newDraggableIndex:lt},t))}var J,K,Z,tt,et,at,it,st,nt,ot,rt,lt,ct,dt,ut,ft,pt,ht,mt,vt,gt,bt,Ct,_t,Dt,yt=!1,St=!1,xt=[],Tt=!1,wt=!1,Et=[],kt=!1,Lt=[],Ot="undefined"!=typeof document,At=v,Ft=p||f?"cssFloat":"float",It=Ot&&!g&&!v&&"draggable"in document.createElement("div"),Nt=function(){if(Ot){if(f)return!1;var t=document.createElement("x");return t.style.cssText="pointer-events:auto","auto"===t.style.pointerEvents}}(),Rt=function(t,e){var a=E(t),i=parseInt(a.width)-parseInt(a.paddingLeft)-parseInt(a.paddingRight)-parseInt(a.borderLeftWidth)-parseInt(a.borderRightWidth),s=I(t,0,e),n=I(t,1,e),o=s&&E(s),r=n&&E(n),l=o&&parseInt(o.marginLeft)+parseInt(o.marginRight)+A(s).width,c=r&&parseInt(r.marginLeft)+parseInt(r.marginRight)+A(n).width;if("flex"===a.display)return"column"===a.flexDirection||"column-reverse"===a.flexDirection?"vertical":"horizontal";if("grid"===a.display)return a.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(s&&o.float&&"none"!==o.float){var d="left"===o.float?"left":"right";return!n||"both"!==r.clear&&r.clear!==d?"horizontal":"vertical"}return s&&("block"===o.display||"flex"===o.display||"table"===o.display||"grid"===o.display||l>=i&&"none"===a[Ft]||n&&"none"===a[Ft]&&l+c>i)?"vertical":"horizontal"},Pt=function(t){function e(t,a){return function(i,s,n,o){var r=i.options.group.name&&s.options.group.name&&i.options.group.name===s.options.group.name;if(null==t&&(a||r))return!0;if(null==t||!1===t)return!1;if(a&&"clone"===t)return t;if("function"==typeof t)return e(t(i,s,n,o),a)(i,s,n,o);var l=(a?i:s).options.group.name;return!0===t||"string"==typeof t&&t===l||t.join&&t.indexOf(l)>-1}}var a={},i=t.group;i&&"object"==r(i)||(i={name:i}),a.name=i.name,a.checkPull=e(i.pull,!0),a.checkPut=e(i.put),a.revertClone=i.revertClone,t.group=a},$t=function(){!Nt&&Z&&E(Z,"display","none")},Mt=function(){!Nt&&Z&&E(Z,"display","")};Ot&&document.addEventListener("click",function(t){if(St)return t.preventDefault(),t.stopPropagation&&t.stopPropagation(),t.stopImmediatePropagation&&t.stopImmediatePropagation(),St=!1,!1},!0);var Ut=function(t){if(J){t=t.touches?t.touches[0]:t;var e=(s=t.clientX,n=t.clientY,xt.some(function(t){var e=t[B].options.emptyInsertThreshold;if(e&&!N(t)){var a=A(t),i=s>=a.left-e&&s<=a.right+e,r=n>=a.top-e&&n<=a.bottom+e;return i&&r?o=t:void 0}}),o);if(e){var a={};for(var i in t)t.hasOwnProperty(i)&&(a[i]=t[i]);a.target=a.rootEl=e,a.preventDefault=void 0,a.stopPropagation=void 0,e[B]._onDragOver(a)}}var s,n,o},jt=function(t){J&&J.parentNode[B]._isOutsideThisEl(t.target)};function Vt(t,e){if(!t||!t.nodeType||1!==t.nodeType)throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(t));this.el=t,this.options=e=c({},e),t[B]=this;var a={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(t.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return Rt(t,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(t,e){t.setData("Text",e.textContent)},dropBubble:!1,dragoverBubble:!1,dataIdAttr:"data-id",delay:0,delayOnTouchOnly:!1,touchStartThreshold:(Number.parseInt?Number:window).parseInt(window.devicePixelRatio,10)||1,forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1,fallbackTolerance:0,fallbackOffset:{x:0,y:0},supportPointer:!1!==Vt.supportPointer&&"PointerEvent"in window&&!m,emptyInsertThreshold:5};for(var i in X.initializePlugins(this,t,a),a)!(i in e)&&(e[i]=a[i]);for(var s in Pt(e),this)"_"===s.charAt(0)&&"function"==typeof this[s]&&(this[s]=this[s].bind(this));this.nativeDraggable=!e.forceFallback&&It,this.nativeDraggable&&(this.options.touchStartThreshold=1),e.supportPointer?C(t,"pointerdown",this._onTapStart):(C(t,"mousedown",this._onTapStart),C(t,"touchstart",this._onTapStart)),this.nativeDraggable&&(C(t,"dragover",this),C(t,"dragenter",this)),xt.push(this.el),e.store&&e.store.get&&this.sort(e.store.get(this)||[]),c(this,Q())}function Bt(t,e,a,i,s,n,o,r){var l,c,d=t[B],u=d.options.onMove;return!window.CustomEvent||f||p?(l=document.createEvent("Event")).initEvent("move",!0,!0):l=new CustomEvent("move",{bubbles:!0,cancelable:!0}),l.to=e,l.from=t,l.dragged=a,l.draggedRect=i,l.related=s||e,l.relatedRect=n||A(e),l.willInsertAfter=r,l.originalEvent=o,t.dispatchEvent(l),u&&(c=u.call(d,l,o)),c}function Qt(t){t.draggable=!1}function Yt(){kt=!1}function zt(t){for(var e=t.tagName+t.className+t.src+t.href+t.textContent,a=e.length,i=0;a--;)i+=e.charCodeAt(a);return i.toString(36)}function Xt(t){return setTimeout(t,0)}function qt(t){return clearTimeout(t)}Vt.prototype={constructor:Vt,_isOutsideThisEl:function(t){this.el.contains(t)||t===this.el||(bt=null)},_getDirection:function(t,e){return"function"==typeof this.options.direction?this.options.direction.call(this,t,e,J):this.options.direction},_onTapStart:function(t){if(t.cancelable){var e=this,a=this.el,i=this.options,s=i.preventOnFilter,n=t.type,o=t.touches&&t.touches[0]||t.pointerType&&"touch"===t.pointerType&&t,r=(o||t).target,l=t.target.shadowRoot&&(t.path&&t.path[0]||t.composedPath&&t.composedPath()[0])||r,c=i.filter;if(function(t){Lt.length=0;var e=t.getElementsByTagName("input"),a=e.length;for(;a--;){var i=e[a];i.checked&&Lt.push(i)}}(a),!J&&!(/mousedown|pointerdown/.test(n)&&0!==t.button||i.disabled)&&!l.isContentEditable&&(this.nativeDraggable||!m||!r||"SELECT"!==r.tagName.toUpperCase())&&!((r=S(r,i.draggable,a,!1))&&r.animated||at===r)){if(nt=R(r),rt=R(r,i.draggable),"function"==typeof c){if(c.call(this,t,r,this))return G({sortable:e,rootEl:l,name:"filter",targetEl:r,toEl:a,fromEl:a}),H("filter",e,{evt:t}),void(s&&t.cancelable&&t.preventDefault())}else if(c&&(c=c.split(",").some(function(i){if(i=S(l,i.trim(),a,!1))return G({sortable:e,rootEl:i,name:"filter",targetEl:r,fromEl:a,toEl:a}),H("filter",e,{evt:t}),!0})))return void(s&&t.cancelable&&t.preventDefault());i.handle&&!S(l,i.handle,a,!1)||this._prepareDragStart(t,o,r)}}},_prepareDragStart:function(t,e,a){var i,s=this,n=s.el,o=s.options,r=n.ownerDocument;if(a&&!J&&a.parentNode===n){var l=A(a);if(tt=n,K=(J=a).parentNode,et=J.nextSibling,at=a,ct=o.group,Vt.dragged=J,ut={target:J,clientX:(e||t).clientX,clientY:(e||t).clientY},mt=ut.clientX-l.left,vt=ut.clientY-l.top,this._lastX=(e||t).clientX,this._lastY=(e||t).clientY,J.style["will-change"]="all",i=function(){H("delayEnded",s,{evt:t}),Vt.eventCanceled?s._onDrop():(s._disableDelayedDragEvents(),!h&&s.nativeDraggable&&(J.draggable=!0),s._triggerDragStart(t,e),G({sortable:s,name:"choose",originalEvent:t}),w(J,o.chosenClass,!0))},o.ignore.split(",").forEach(function(t){L(J,t.trim(),Qt)}),C(r,"dragover",Ut),C(r,"mousemove",Ut),C(r,"touchmove",Ut),C(r,"mouseup",s._onDrop),C(r,"touchend",s._onDrop),C(r,"touchcancel",s._onDrop),h&&this.nativeDraggable&&(this.options.touchStartThreshold=4,J.draggable=!0),H("delayStart",this,{evt:t}),!o.delay||o.delayOnTouchOnly&&!e||this.nativeDraggable&&(p||f))i();else{if(Vt.eventCanceled)return void this._onDrop();C(r,"mouseup",s._disableDelayedDrag),C(r,"touchend",s._disableDelayedDrag),C(r,"touchcancel",s._disableDelayedDrag),C(r,"mousemove",s._delayedDragTouchMoveHandler),C(r,"touchmove",s._delayedDragTouchMoveHandler),o.supportPointer&&C(r,"pointermove",s._delayedDragTouchMoveHandler),s._dragStartTimer=setTimeout(i,o.delay)}}},_delayedDragTouchMoveHandler:function(t){var e=t.touches?t.touches[0]:t;Math.max(Math.abs(e.clientX-this._lastX),Math.abs(e.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){J&&Qt(J),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var t=this.el.ownerDocument;_(t,"mouseup",this._disableDelayedDrag),_(t,"touchend",this._disableDelayedDrag),_(t,"touchcancel",this._disableDelayedDrag),_(t,"mousemove",this._delayedDragTouchMoveHandler),_(t,"touchmove",this._delayedDragTouchMoveHandler),_(t,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(t,e){e=e||"touch"==t.pointerType&&t,!this.nativeDraggable||e?this.options.supportPointer?C(document,"pointermove",this._onTouchMove):C(document,e?"touchmove":"mousemove",this._onTouchMove):(C(J,"dragend",this),C(tt,"dragstart",this._onDragStart));try{document.selection?Xt(function(){document.selection.empty()}):window.getSelection().removeAllRanges()}catch(t){}},_dragStarted:function(t,e){if(yt=!1,tt&&J){H("dragStarted",this,{evt:e}),this.nativeDraggable&&C(document,"dragover",jt);var a=this.options;!t&&w(J,a.dragClass,!1),w(J,a.ghostClass,!0),Vt.active=this,t&&this._appendGhost(),G({sortable:this,name:"start",originalEvent:e})}else this._nulling()},_emulateDragOver:function(){if(ft){this._lastX=ft.clientX,this._lastY=ft.clientY,$t();for(var t=document.elementFromPoint(ft.clientX,ft.clientY),e=t;t&&t.shadowRoot&&(t=t.shadowRoot.elementFromPoint(ft.clientX,ft.clientY))!==e;)e=t;if(J.parentNode[B]._isOutsideThisEl(t),e)do{if(e[B]){if(e[B]._onDragOver({clientX:ft.clientX,clientY:ft.clientY,target:t,rootEl:e})&&!this.options.dragoverBubble)break}t=e}while(e=e.parentNode);Mt()}},_onTouchMove:function(t){if(ut){var e=this.options,a=e.fallbackTolerance,i=e.fallbackOffset,s=t.touches?t.touches[0]:t,n=Z&&k(Z,!0),o=Z&&n&&n.a,r=Z&&n&&n.d,l=At&&Dt&&P(Dt),c=(s.clientX-ut.clientX+i.x)/(o||1)+(l?l[0]-Et[0]:0)/(o||1),d=(s.clientY-ut.clientY+i.y)/(r||1)+(l?l[1]-Et[1]:0)/(r||1);if(!Vt.active&&!yt){if(a&&Math.max(Math.abs(s.clientX-this._lastX),Math.abs(s.clientY-this._lastY))i.right+10||t.clientX<=i.right&&t.clientY>i.bottom&&t.clientX>=i.left:t.clientX>i.right&&t.clientY>i.top||t.clientX<=i.right&&t.clientY>i.bottom+10}(t,s,this)&&!v.animated){if(v===J)return V(!1);if(v&&n===t.target&&(r=v),r&&(a=A(r)),!1!==Bt(tt,n,J,e,r,a,t,!!r))return U(),n.appendChild(J),K=n,Q(),V(!0)}else if(v&&function(t,e,a){var i=A(I(a.el,0,a.options,!0));return e?t.clientXd+c*n/2:lu-_t)return-Ct}else if(l>d+c*(1-s)/2&&lu-c*n/2))return l>d+c/2?1:-1;return 0}(t,r,a,s,y?1:l.swapThreshold,null==l.invertedSwapThreshold?l.swapThreshold:l.invertedSwapThreshold,wt,bt===r))){var L=R(J);do{L-=b,_=K.children[L]}while(_&&("none"===E(_,"display")||_===Z))}if(0===b||_===r)return V(!1);bt=r,Ct=b;var O=r.nextElementSibling,P=!1,$=Bt(tt,n,J,e,r,a,t,P=1===b);if(!1!==$)return 1!==$&&-1!==$||(P=1===$),kt=!0,setTimeout(Yt,30),U(),P&&!O?n.appendChild(J):r.parentNode.insertBefore(J,P?O:r),T&&j(T,0,k-T.scrollTop),K=J.parentNode,void 0===C||wt||(_t=Math.abs(C-A(r)[x])),Q(),V(!0)}if(n.contains(J))return V(!1)}return!1}function M(l,c){H(l,h,o({evt:t,isOwner:u,axis:s?"vertical":"horizontal",revert:i,dragRect:e,targetRect:a,canSort:f,fromSortable:p,target:r,completed:V,onMove:function(a,i){return Bt(tt,n,J,e,a,A(a),t,i)},changed:Q},c))}function U(){M("dragOverAnimationCapture"),h.captureAnimationState(),h!==p&&p.captureAnimationState()}function V(e){return M("dragOverCompleted",{insertion:e}),e&&(u?d._hideClone():d._showClone(h),h!==p&&(w(J,dt?dt.options.ghostClass:d.options.ghostClass,!1),w(J,l.ghostClass,!0)),dt!==h&&h!==Vt.active?dt=h:h===Vt.active&&dt&&(dt=null),p===h&&(h._ignoreWhileAnimating=r),h.animateAll(function(){M("dragOverAnimationComplete"),h._ignoreWhileAnimating=null}),h!==p&&(p.animateAll(),p._ignoreWhileAnimating=null)),(r===J&&!J.animated||r===n&&!r.animated)&&(bt=null),l.dragoverBubble||t.rootEl||r===document||(J.parentNode[B]._isOutsideThisEl(t.target),!e&&Ut(t)),!l.dragoverBubble&&t.stopPropagation&&t.stopPropagation(),m=!0}function Q(){ot=R(J),lt=R(J,l.draggable),G({sortable:h,name:"change",toEl:n,newIndex:ot,newDraggableIndex:lt,originalEvent:t})}},_ignoreWhileAnimating:null,_offMoveEvents:function(){_(document,"mousemove",this._onTouchMove),_(document,"touchmove",this._onTouchMove),_(document,"pointermove",this._onTouchMove),_(document,"dragover",Ut),_(document,"mousemove",Ut),_(document,"touchmove",Ut)},_offUpEvents:function(){var t=this.el.ownerDocument;_(t,"mouseup",this._onDrop),_(t,"touchend",this._onDrop),_(t,"pointerup",this._onDrop),_(t,"touchcancel",this._onDrop),_(document,"selectstart",this)},_onDrop:function(t){var e=this.el,a=this.options;ot=R(J),lt=R(J,a.draggable),H("drop",this,{evt:t}),K=J&&J.parentNode,ot=R(J),lt=R(J,a.draggable),Vt.eventCanceled?this._nulling():(yt=!1,wt=!1,Tt=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),qt(this.cloneId),qt(this._dragStartId),this.nativeDraggable&&(_(document,"drop",this),_(e,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),m&&E(document.body,"user-select",""),E(J,"transform",""),t&&(gt&&(t.cancelable&&t.preventDefault(),!a.dropBubble&&t.stopPropagation()),Z&&Z.parentNode&&Z.parentNode.removeChild(Z),(tt===K||dt&&"clone"!==dt.lastPutMode)&&it&&it.parentNode&&it.parentNode.removeChild(it),J&&(this.nativeDraggable&&_(J,"dragend",this),Qt(J),J.style["will-change"]="",gt&&!yt&&w(J,dt?dt.options.ghostClass:this.options.ghostClass,!1),w(J,this.options.chosenClass,!1),G({sortable:this,name:"unchoose",toEl:K,newIndex:null,newDraggableIndex:null,originalEvent:t}),tt!==K?(ot>=0&&(G({rootEl:K,name:"add",toEl:K,fromEl:tt,originalEvent:t}),G({sortable:this,name:"remove",toEl:K,originalEvent:t}),G({rootEl:K,name:"sort",toEl:K,fromEl:tt,originalEvent:t}),G({sortable:this,name:"sort",toEl:K,originalEvent:t})),dt&&dt.save()):ot!==nt&&ot>=0&&(G({sortable:this,name:"update",toEl:K,originalEvent:t}),G({sortable:this,name:"sort",toEl:K,originalEvent:t})),Vt.active&&(null!=ot&&-1!==ot||(ot=nt,lt=rt),G({sortable:this,name:"end",toEl:K,originalEvent:t}),this.save()))),this._nulling())},_nulling:function(){H("nulling",this),tt=J=K=Z=et=it=at=st=ut=ft=gt=ot=lt=nt=rt=bt=Ct=dt=ct=Vt.dragged=Vt.ghost=Vt.clone=Vt.active=null,Lt.forEach(function(t){t.checked=!0}),Lt.length=pt=ht=0},handleEvent:function(t){switch(t.type){case"drop":case"dragend":this._onDrop(t);break;case"dragenter":case"dragover":J&&(this._onDragOver(t),function(t){t.dataTransfer&&(t.dataTransfer.dropEffect="move");t.cancelable&&t.preventDefault()}(t));break;case"selectstart":t.preventDefault()}},toArray:function(){for(var t,e=[],a=this.el.children,i=0,s=a.length,n=this.options;i span")[0];this.sortable=le.create(e,{ghostClass:"sortable-ghost",setData:function(t){t.setData("Text","")},onEnd:function(e){var a=t.value.splice(e.oldIndex,1)[0];t.value.splice(e.newIndex,0,a)}})}}},de={render:function(){var t=this,e=t.$createElement;return(t._self._c||e)("el-select",t._g(t._b({ref:"dragSelect",staticClass:"drag-select",attrs:{multiple:""},model:{value:t.selectVal,callback:function(e){t.selectVal=e},expression:"selectVal"}},"el-select",t.$attrs,!1),t.$listeners),[t._t("default")],2)},staticRenderFns:[]};var ue=a("VU/8")(ce,de,!1,function(t){a("cn5D")},"data-v-29c99510",null);e.a=ue.exports},wA8T:function(t,e){},xI3S:function(t,e){},xon3:function(t,e,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var i=a("Dd8w"),s=a.n(i),n=a("/RwQ"),o=a("9jca"),r=a("M4HI"),l=a("Qrr+"),c=a("SQ4B"),d=a("b9vf"),u=a("qI5z"),f=a("NYxO"),p={name:"TestCases",components:{TestCaseList:n.a,DefectList:o.a,TestEnvList:r.a,TestToolList:l.a},data:function(){return{tabActiveName:"testCases",selectedTaskCode:this.$route.params.taskCode,selectedTestStatus:"",selectedExamStatus:"",tasks:[],searchTasks:[],testCaseCanEdit:!1,isCommitted:!1,testStatusSearchShow:!0,examStatusSearchShow:!0,loading:!1}},computed:{uploadTestCasesFileUrl:function(){return"http://10.18.18.39"+d.a.TESTCASE.UPLOAD_TEST_CASES_FILE.replace("{taskCode}",this.selectedTaskCode)},uploadDefectsFileUrl:function(){return"http://10.18.18.39"+d.a.TESTCASE.UPLOAD_DEFECTS_FILE.replace("{taskCode}",this.selectedTaskCode)}},watch:{selectedTaskCode:function(t,e){this.getList(),this.handleStatus()},selectedTestStatus:function(t,e){this.getList()},selectedExamStatus:function(t,e){this.getList()}},created:function(){var t=this;this.getSimpleTaskDatas(),this.$nextTick(function(){t.setRefreshTestCaseListFunc(t.$refs.testCaseList.getList),t.setRefreshDefectListFunc(t.$refs.defectList.getList)})},methods:s()({},Object(f.b)(["setRefreshTestCaseListFunc","setRefreshDefectListFunc"]),Object(f.c)(["getRefreshTestCaseListFunc","getRefreshDefectListFunc"]),{getTestCaseListMethod:function(){var t=this;this.$nextTick(function(){return t.$refs.testCaseList.getList})},getDefectListMethod:function(){var t=this;this.$nextTick(function(){return t.$refs.defectList.getList})},getList:function(){this.$refs.testCaseList.listQueryParam.selectedTaskCode=this.selectedTaskCode,this.$refs.testCaseList.listQueryParam.testStatus=this.selectedTestStatus,this.$refs.testCaseList.listQueryParam.examStatus=this.selectedExamStatus,this.$refs.defectList.listQueryParam.selectedTaskCode=this.selectedTaskCode,this.$refs.testEnvList.listQueryParam.selectedTaskCode=this.selectedTaskCode,this.$refs.testToolList.selectedTaskCode=this.selectedTaskCode,this.$refs.testCaseList.getList(),this.$refs.defectList.getList(),this.$refs.testEnvList.getList(),this.$refs.testToolList.getList()},handleStatus:function(){var t=this,e=this.tasks.find(function(e){return e.code===t.selectedTaskCode});this.testCaseCanEdit=!e.isCommitted&&5!==e.status,this.isCommitted=e.isCommitted&&!0},handleSubmitAudit:function(){var t=this;this.$confirm("提交任务之后将不能再编辑测试用例,您确定要提交该任务吗","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning",center:!0,closeOnClickModal:!1}).then(function(){c.a.put(d.a.TASK.COMMIT_TASK.replace("{taskCode}",t.selectedTaskCode),{}).then(function(e){2e4===e.code?(Object(u.a)("success","提交成功"),t.testCaseCanEdit=!1,t.isCommitted=!0):Object(u.a)("error","提交失败:"+e.data)}).catch(function(e){t.hideListLoading(),Object(u.a)("error","提交失败:系统异常")})}).catch(function(){})},handleCreate:function(){this.tabActiveName="testCases",this.$refs.testCaseList.handleCreate()},handleCreateTestEnv:function(){this.tabActiveName="testEnvs",this.$refs.testEnvList.handleCreate()},handleCreateTestTool:function(){this.tabActiveName="testTools",this.$refs.testToolList.handleCreate()},dataFilter:function(t){this.searchTasks=t?this.tasks.filter(function(e){return e.name.includes(t)}):this.tasks},eqNoClick:function(){this.searchTasks=this.tasks},getSimpleTaskDatas:function(){var t=this;c.a.get(d.a.TASK.GET_SIMPLE_USER_TASK_DATAS).then(function(e){t.tasks=e.data,t.tasks.forEach(function(t){4===t.status?t.name=t.name+"(已结束)":5===t.status&&(t.name=t.name+"(已超时)")}),t.searchTasks=t.tasks,t.handleStatus()}).catch(function(t){Object(u.a)("error","获取任务数据失败:系统异常")})},handleTabClick:function(t,e){"testCases"===t.name?(this.testStatusSearchShow=!0,this.examStatusSearchShow=!0):(this.testStatusSearchShow=!1,this.examStatusSearchShow=!1)},beforeTestCasesFileUpload:function(t){var e="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"===t.type;return e||this.$message.error("上传文件只能是XLSX 格式!"),e&&(this.loading=!0),e},handleUploadTestCasesFileSuccess:function(t,e,a){this.loading=!1,Object(u.a)("success","上传成功"),this.getRefreshTestCaseListFunc()()},handleUploadTestCasesFileError:function(t,e,a){console.log(t),this.loading=!1,Object(u.a)("error","上传失败"+t)},beforeDefectsFileUpload:function(t){var e="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"===t.type;return e||this.$message.error("上传文件只能是XLSX 格式!"),e&&(this.loading=!0),e},handleUploadDefectsFileSuccess:function(t,e,a){this.loading=!1,Object(u.a)("success","上传成功"),this.getRefreshDefectListFunc()()},handleUploadDefectsFileError:function(t,e,a){console.log(t),this.loading=!1,Object(u.a)("error","上传失败"+t)}})},h={render:function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],staticClass:"app-container"},[a("div",{staticClass:"title h1",staticStyle:{"margin-top":"10px"}},[t._v("测试用例管理")]),t._v(" "),a("div",{staticClass:"filter-container"},[a("el-select",{attrs:{filterable:"","filter-method":t.dataFilter},nativeOn:{click:function(e){return t.eqNoClick(e)}},model:{value:t.selectedTaskCode,callback:function(e){t.selectedTaskCode=e},expression:"selectedTaskCode"}},t._l(t.searchTasks,function(t){return a("el-option",{key:t.code,attrs:{label:t.name,value:t.code}})}),1),t._v(" "),t.testStatusSearchShow?a("el-select",{model:{value:t.selectedTestStatus,callback:function(e){t.selectedTestStatus=e},expression:"selectedTestStatus"}},[a("el-option",{attrs:{value:"",label:"---测试结论---"}}),t._v(" "),a("el-option",{attrs:{value:"WAIT",label:"待测试"}}),t._v(" "),a("el-option",{attrs:{value:"PASS",label:"通过"}}),t._v(" "),a("el-option",{attrs:{value:"NO_PASS",label:"不通过"}})],1):t._e(),t._v(" "),!t.testCaseCanEdit&&t.examStatusSearchShow?a("el-select",{model:{value:t.selectedExamStatus,callback:function(e){t.selectedExamStatus=e},expression:"selectedExamStatus"}},[a("el-option",{attrs:{value:"",label:"---审核结果---"}}),t._v(" "),a("el-option",{attrs:{value:"WAIT",label:"待审核"}}),t._v(" "),a("el-option",{attrs:{value:"VALID",label:"有效"}}),t._v(" "),a("el-option",{attrs:{value:"INVALID",label:"无效"}})],1):t._e(),t._v(" "),a("el-upload",{staticStyle:{display:"inline-block"},attrs:{action:t.uploadTestCasesFileUrl,"on-success":t.handleUploadTestCasesFileSuccess,"before-upload":t.beforeTestCasesFileUpload,"on-error":t.handleUploadTestCasesFileError,"show-file-list":!1}},[a("el-button",{staticClass:"filter-item",staticStyle:{"margin-left":"10px"},attrs:{type:"primary"}},[t._v("上传测试用例")])],1),t._v(" "),a("el-upload",{staticStyle:{display:"inline-block"},attrs:{action:t.uploadDefectsFileUrl,"on-success":t.handleUploadDefectsFileSuccess,"before-upload":t.beforeDefectsFileUpload,"on-error":t.handleUploadDefectsFileError,"show-file-list":!1}},[a("el-button",{staticClass:"filter-item",staticStyle:{"margin-left":"10px"},attrs:{type:"primary"}},[t._v("上传缺陷报告")])],1),t._v(" "),t.testCaseCanEdit?a("el-button",{staticClass:"filter-item",staticStyle:{"margin-left":"10px"},attrs:{type:"primary"},on:{click:t.handleCreate}},[t._v("\n 新增测试用例\n ")]):t._e(),t._v(" "),t.testCaseCanEdit?a("el-button",{staticClass:"filter-item",staticStyle:{"margin-left":"10px"},attrs:{type:"primary"},on:{click:t.handleCreateTestEnv}},[t._v("\n 新增测试环境\n ")]):t._e(),t._v(" "),t.testCaseCanEdit?a("el-button",{staticClass:"filter-item",staticStyle:{"margin-left":"10px"},attrs:{type:"primary"},on:{click:t.handleCreateTestTool}},[t._v("\n 新增测试工具\n ")]):t._e(),t._v(" "),t.testCaseCanEdit?a("el-button",{staticClass:"filter-item",staticStyle:{"margin-left":"10px"},attrs:{type:"success"},on:{click:t.handleSubmitAudit}},[t._v("\n 提交审核\n ")]):t._e(),t._v(" "),a("span",{staticStyle:{display:"block",float:"right",color:"indianred","margin-right":"20px"}},[t._v("提交状态:"+t._s(t.isCommitted?"已提交":"未提交"))])],1),t._v(" "),a("el-tabs",{on:{"tab-click":t.handleTabClick},model:{value:t.tabActiveName,callback:function(e){t.tabActiveName=e},expression:"tabActiveName"}},[a("el-tab-pane",{attrs:{label:"测试用例",name:"testCases"}},[a("test-case-list",{ref:"testCaseList",attrs:{"selected-task-code":t.selectedTaskCode,"selected-test-status":t.selectedTestStatus,"selected-exam-status":t.selectedExamStatus,"test-case-can-edit":t.testCaseCanEdit}})],1),t._v(" "),a("el-tab-pane",{attrs:{label:"用例缺陷",name:"defects"}},[a("defect-list",{ref:"defectList",attrs:{isContained:!1,"test-case-can-edit":t.testCaseCanEdit,"selected-task-code":t.selectedTaskCode}})],1),t._v(" "),a("el-tab-pane",{attrs:{label:"测试环境",name:"testEnvs"}},[a("test-env-list",{ref:"testEnvList",attrs:{"test-case-can-edit":t.testCaseCanEdit,"selected-task-code":t.selectedTaskCode}})],1),t._v(" "),a("el-tab-pane",{attrs:{label:"测试工具",name:"testTools"}},[a("test-tool-list",{ref:"testToolList",attrs:{"test-case-can-edit":t.testCaseCanEdit,"selected-task-code":t.selectedTaskCode}})],1)],1)],1)},staticRenderFns:[]};var m=a("VU/8")(p,h,!1,function(t){a("wA8T")},"data-v-1b35c945",null);e.default=m.exports},yWYk:function(t,e,a){"use strict";e.a=function t(e,a){if(a instanceof Array){e.length!==a.length&&(e=new Array(a.length));for(var i=0;i0&&(e={}),a)a[s]instanceof Array?(e[s]=new Array(a[s].length),t(e[s],a[s])):a[s]instanceof Object?(e[s]={},t(e[s],a[s])):e[s]=a[s]}},z4be:function(t,e){},zpvg:function(t,e){}});