1 |
- 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,o<e?i(t):a&&"function"==typeof a&&a()}()}var n={name:"Pagination",props:{total:{required:!0,type:Number},page:{type:Number,default:1},limit:{type:Number,default:20},pageSizes:{type:Array,default:function(){return[10,20,30,50]}},layout:{type:String,default:"total, sizes, prev, pager, next, jumper"},background:{type:Boolean,default:!0},autoScroll:{type:Boolean,default:!0},hidden:{type:Boolean,default:!1}},computed:{currentPage:{get:function(){return this.page},set:function(t){this.$emit("update:page",t)}},pageSize:{get:function(){return this.limit},set:function(t){this.$emit("update:limit",t)}}},methods:{handleSizeChange:function(t){this.$emit("pagination",{page:this.currentPage,limit:t}),this.autoScroll&&s(0,800)},handleCurrentChange:function(t){this.$emit("pagination",{page:t,limit:this.pageSize}),this.autoScroll&&s(0,800)}}},o={render:function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"pagination-container",class:{hidden:t.hidden}},[a("el-pagination",t._b({attrs:{background:t.background,"current-page":t.currentPage,"page-size":t.pageSize,layout:t.layout,"page-sizes":t.pageSizes,total:t.total},on:{"update:currentPage":function(e){t.currentPage=e},"update:current-page":function(e){t.currentPage=e},"update:pageSize":function(e){t.pageSize=e},"update:page-size":function(e){t.pageSize=e},"size-change":t.handleSizeChange,"current-change":t.handleCurrentChange}},"el-pagination",t.$attrs,!1))],1)},staticRenderFns:[]};var r=a("VU/8")(n,o,!1,function(t){a("ouNp")},"data-v-6af373ef",null);e.a=r.exports},"5zde":function(t,e,a){a("zQR9"),a("qyJz"),t.exports=a("FeBl").Array.from},"6Cg8":function(t,e){},"8l0Z":function(t,e){},"9jca":function(t,e,a){"use strict";var i=a("Dd8w"),s=a.n(i),n=a("Dso9"),o=a("yWYk"),r=a("SQ4B"),l=a("b9vf"),c=a("qI5z"),d=a("tiPg"),u=a("CYQe"),f=a("Gox+"),p={name:"DefectForm",components:{ElDragSelect:d.a,FileUpload:u.a,ImgUpload:f.a},data:function(){return{countLimit:3,rules:{descr:[{required:!0,message:"描述不可为空",trigger:"blur"}],seriousness:[{required:!0,message:"严重等级不可为空"}],priority:[{required:!0,message:"优先级不可为空"}],defectType:[{required:!0,message:"缺陷类型不可为空"}],testResult:[{required:!0,message:"测试结果不可为空"}]},loading:!1,testCases:[]}},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:{submitForm:function(t){var e=this;this.$refs.defectForm.validate(function(a){if(!a)return Object(c.a)("error","表单填写有误"),!1;e.showLoading();var i={testCaseCode:e.defectData.testCaseCode,taskCode:e.defectData.taskCode,descr:e.defectData.descr,preconditions:e.defectData.preconditions,envConfig:e.defectData.envConfig,priority:e.defectData.priority,seriousness:e.defectData.seriousness,defectType:e.defectData.defectType,opeSteps:e.defectData.opeSteps,inputDatas:e.defectData.inputDatas,expectedResult:e.defectData.expectedResult,others:e.defectData.others,testResult:e.defectData.testResult,files:e.defectData.files,screenshots:e.defectData.screenshots};e.defectData.id&&e.defectData.id>0&&(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);e<t.length;e++)a[e]=t[e];return a}return(0,n.default)(t)}},M4HI:function(t,e,a){"use strict";var i=a("yWYk"),s=a("SQ4B"),n=a("b9vf"),o=a("qI5z"),r={name:"TestEnvList",data:function(){return{dialogFormVisible:!1,textMap:{create:"新建测试环境",update:"编辑测试环境"},testEnvData:{},listLoading:!1,loading:!1,dialogStatus:"",listQueryParam:{selectedTaskCode:this.selectedTaskCode,selectedUserId:this.selectedUserId},testEnvs:[],rules:{devName:[{required:!0,message:"设备名称不可为空",trigger:"blur"}],devCount:[{required:!0,message:"设备数量不可为空",trigger:"blur"}],devConfig:[{required:!0,message:"硬件配置不可为空",trigger:"blur"}],opeSys:[{required:!0,message:"操作系统不可为空",trigger:"blur"}]}}},props:{testCaseCanEdit:{type:Boolean,default:!1},selectedTaskCode:{type:String,default:""},selectedUserId:{type:Number,default:0}},created:function(){this.initTestEnvData(),this.getList()},methods:{handleCreate:function(){var t=this;this.initTestEnvData(),this.dialogStatus="create",this.dialogFormVisible=!0,this.$nextTick(function(){t.$refs.testEnvForm.clearValidate()})},handleUpdate:function(t){var e=this;this.dialogStatus="update",this.dialogFormVisible=!0,Object(i.a)(this.testEnvData,t),this.$nextTick(function(){e.$refs.testEnvForm.clearValidate()})},handleDelete:function(t,e){var a=this;this.$confirm("您确定要删除该条数据吗?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning",center:!0,closeOnClickModal:!1}).then(function(){a.showListLoading(),s.a.delete(n.a.TESTENV.DELETE.replace("{id}",t.id),{}).then(function(t){a.hideListLoading(),2e4===t.code?(Object(o.a)("success","删除成功"),a.getList()):Object(o.a)("error","删除失败:"+t.data)}).catch(function(t){a.hideListLoading(),Object(o.a)("error","删除失败:系统异常")})}).catch(function(){})},submit:function(){var t=this;this.$refs.testEnvForm.validate(function(e){if(!e)return Object(o.a)("error","表单填写有误"),!1;t.showLoading();var a=void 0,i=void 0;t.testEnvData.id?(a=n.a.TESTENV.UPDATE.replace("{id}",t.testEnvData.id),i=s.a.put):(a=n.a.TESTENV.ADD,i=s.a.post),i(a,t.testEnvData).then(function(e){console.log(e),t.hideLoading(),2e4!==e.code?Object(o.a)("error","提交测试环境失败:"+e.data):(t.testEnvData.id||(t.testEnvData.id=e.data),Object(o.a)("success","提交成功"),t.getList())}).catch(function(e){t.hideLoading(),Object(o.a)("error","测试环境创建失败:系统异常")})})},hideListLoading:function(){this.listLoading=!1},showListLoading:function(){this.listLoading=!0},hideLoading:function(){this.loading=!1},showLoading:function(){this.loading=!0},initTestEnvData:function(){this.testEnvData={id:void 0,taskCode:this.listQueryParam.selectedTaskCode,devName:"",devModel:"",devCount:void 0,devConfig:"",opeSys:"",middleware:"",db:"",browser:"",supportSoftware:""}},getList:function(){var t=this;this.showListLoading();var e=n.a.TESTENV.LIST.replace("{taskCode}",this.listQueryParam.selectedTaskCode).replace("{designerId}",this.listQueryParam.selectedUserId);s.a.get(e).then(function(e){t.testEnvs=e.data}).catch(function(t){console.error(t),Object(o.a)("error","获取测试环境数据失败:系统异常")}),this.hideListLoading()},clearList:function(){this.testEnvs.splice(0,this.testEnvs.length)}}},l={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.testEnvs,border:"",fit:""}},[a("el-table-column",{attrs:{label:"序号",align:"center","min-width":"7%"},scopedSlots:t._u([{key:"default",fn:function(e){e.row;var i=e.$index;return[a("span",[t._v(t._s(i+1))])]}}])}),t._v(" "),a("el-table-column",{attrs:{label:"设备名称",align:"center","show-overflow-tooltip":!0,"min-width":"25%"},scopedSlots:t._u([{key:"default",fn:function(e){var i=e.row;return[a("span",[t._v(t._s(i.devName))])]}}])}),t._v(" "),a("el-table-column",{attrs:{label:"设备型号",align:"center","min-width":"25%"},scopedSlots:t._u([{key:"default",fn:function(e){var i=e.row;return[a("span",[t._v(t._s(i.devModel))])]}}])}),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(i.devCount))])]}}])}),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.devConfig))])]}}])}),t._v(" "),a("el-table-column",{attrs:{label:"操作系统",align:"center","min-width":"20%"},scopedSlots:t._u([{key:"default",fn:function(e){var i=e.row;return[a("span",[t._v(t._s(i.opeSys))])]}}])}),t._v(" "),a("el-table-column",{attrs:{label:"中间件",align:"center","min-width":"20%"},scopedSlots:t._u([{key:"default",fn:function(e){var i=e.row;return[a("span",[t._v(t._s(i.middleware))])]}}])}),t._v(" "),a("el-table-column",{attrs:{label:"数据库",align:"center","min-width":"20%"},scopedSlots:t._u([{key:"default",fn:function(e){var i=e.row;return[a("span",[t._v(t._s(i.db))])]}}])}),t._v(" "),a("el-table-column",{attrs:{label:"浏览器",align:"center","min-width":"20%"},scopedSlots:t._u([{key:"default",fn:function(e){var i=e.row;return[a("span",[t._v(t._s(i.browser))])]}}])}),t._v(" "),a("el-table-column",{attrs:{label:"支持软件",align:"center","min-width":"25%"},scopedSlots:t._u([{key:"default",fn:function(e){var i=e.row;return[a("span",[t._v(t._s(i.supportSoftware))])]}}])}),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?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()]}}])})],1),t._v(" "),a("el-dialog",{attrs:{title:t.textMap[t.dialogStatus],visible:t.dialogFormVisible},on:{"update:visible":function(e){t.dialogFormVisible=e}}},[a("el-form",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],ref:"testEnvForm",staticStyle:{width:"400px","margin-left":"50px"},attrs:{rules:t.rules,model:t.testEnvData,"label-position":"left","label-width":"100px"}},[a("el-form-item",{attrs:{label:"任务编号",prop:"taskCode"}},[a("el-input",{attrs:{disabled:""},model:{value:t.testEnvData.taskCode,callback:function(e){t.$set(t.testEnvData,"taskCode",e)},expression:"testEnvData.taskCode"}})],1),t._v(" "),a("el-form-item",{attrs:{label:"设备名字",prop:"devName"}},[a("el-input",{model:{value:t.testEnvData.devName,callback:function(e){t.$set(t.testEnvData,"devName",e)},expression:"testEnvData.devName"}})],1),t._v(" "),a("el-form-item",{attrs:{label:"设备型号",prop:"devModel"}},[a("el-input",{model:{value:t.testEnvData.devModel,callback:function(e){t.$set(t.testEnvData,"devModel",e)},expression:"testEnvData.devModel"}})],1),t._v(" "),a("el-form-item",{attrs:{label:"设备数量",prop:"devCount"}},[a("el-input",{model:{value:t.testEnvData.devCount,callback:function(e){t.$set(t.testEnvData,"devCount",e)},expression:"testEnvData.devCount"}})],1),t._v(" "),a("el-form-item",{attrs:{label:"硬件配置",prop:"devConfig"}},[a("el-input",{attrs:{type:"textarea"},model:{value:t.testEnvData.devConfig,callback:function(e){t.$set(t.testEnvData,"devConfig",e)},expression:"testEnvData.devConfig"}})],1),t._v(" "),a("el-form-item",{attrs:{label:"操作系统",prop:"opeSys"}},[a("el-input",{model:{value:t.testEnvData.opeSys,callback:function(e){t.$set(t.testEnvData,"opeSys",e)},expression:"testEnvData.opeSys"}})],1),t._v(" "),a("el-form-item",{attrs:{label:"中间件",prop:"middleware"}},[a("el-input",{model:{value:t.testEnvData.middleware,callback:function(e){t.$set(t.testEnvData,"middleware",e)},expression:"testEnvData.middleware"}})],1),t._v(" "),a("el-form-item",{attrs:{label:"数据库",prop:"db"}},[a("el-input",{model:{value:t.testEnvData.db,callback:function(e){t.$set(t.testEnvData,"db",e)},expression:"testEnvData.db"}})],1),t._v(" "),a("el-form-item",{attrs:{label:"浏览器",prop:"browser"}},[a("el-input",{model:{value:t.testEnvData.browser,callback:function(e){t.$set(t.testEnvData,"browser",e)},expression:"testEnvData.browser"}})],1),t._v(" "),a("el-form-item",{attrs:{label:"支持软件",prop:"supportSoftware"}},[a("el-input",{model:{value:t.testEnvData.supportSoftware,callback:function(e){t.$set(t.testEnvData,"supportSoftware",e)},expression:"testEnvData.supportSoftware"}})],1)],1),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)],1)},staticRenderFns:[]};var c=a("VU/8")(r,l,!1,function(t){a("EdfD")},"data-v-55aa6ed5",null);e.a=c.exports},"Qrr+":function(t,e,a){"use strict";var i=a("yWYk"),s=a("SQ4B"),n=a("b9vf"),o=a("qI5z"),r={name:"TestToolList",data:function(){return{dialogFormVisible:!1,textMap:{create:"新建测试环境",update:"编辑测试环境"},testToolData:{},listLoading:!1,loading:!1,dialogStatus:"",listQueryParam:{selectedTaskCode:this.selectedTaskCode,selectedUserId:this.selectedUserId},testTools:[],rules:{name:[{required:!0,message:"工具名字不可为空",trigger:"blur"}]}}},props:{testCaseCanEdit:{type:Boolean,default:!1},selectedTaskCode:{type:String,default:""},selectedUserId:{type:Number,default:0}},created:function(){this.initTestToolData(),this.getList()},methods:{handleCreate:function(){var t=this;this.initTestToolData(),this.dialogStatus="create",this.dialogFormVisible=!0,this.$nextTick(function(){t.$refs.testToolForm.clearValidate()})},handleUpdate:function(t){var e=this;this.dialogStatus="update",this.dialogFormVisible=!0,Object(i.a)(this.testToolData,t),this.$nextTick(function(){e.$refs.testToolForm.clearValidate()})},handleDelete:function(t,e){var a=this;this.$confirm("您确定要删除该条数据吗?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning",center:!0,closeOnClickModal:!1}).then(function(){a.showListLoading(),s.a.delete(n.a.TESTTOOL.DELETE.replace("{id}",t.id),{}).then(function(t){a.hideListLoading(),2e4===t.code?(Object(o.a)("success","删除成功"),a.getList()):Object(o.a)("error","删除失败:"+t.data)}).catch(function(t){a.hideListLoading(),Object(o.a)("error","删除失败:系统异常")})}).catch(function(){})},submit:function(){var t=this;this.$refs.testToolForm.validate(function(e){if(!e)return Object(o.a)("error","表单填写有误"),!1;t.showLoading();var a=void 0,i=void 0;t.testToolData.id?(a=n.a.TESTTOOL.UPDATE.replace("{id}",t.testToolData.id),i=s.a.put):(a=n.a.TESTTOOL.ADD,i=s.a.post),i(a,t.testToolData).then(function(e){console.log(e),t.hideLoading(),2e4!==e.code?Object(o.a)("error","提交测试环境失败:"+e.data):(t.testToolData.id||(t.testToolData.id=e.data),Object(o.a)("success","提交成功"),t.getList())}).catch(function(e){t.hideLoading(),Object(o.a)("error","测试环境创建失败:系统异常")})})},hideListLoading:function(){this.listLoading=!1},showListLoading:function(){this.listLoading=!0},hideLoading:function(){this.loading=!1},showLoading:function(){this.loading=!0},initTestToolData:function(){this.testToolData={id:void 0,taskCode:this.listQueryParam.selectedTaskCode,name:"",version:"",producerFrom:void 0,purpose:""}},getList:function(){var t=this;this.showListLoading();var e=n.a.TESTTOOL.LIST.replace("{taskCode}",this.listQueryParam.selectedTaskCode).replace("{designerId}",this.listQueryParam.selectedUserId);s.a.get(e).then(function(e){t.testTools=e.data}).catch(function(t){console.error(t),Object(o.a)("error","获取测试工具数据失败:系统异常")}),this.hideListLoading()},clearList:function(){this.testTools.splice(0,this.testTools.length)}}},l={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.testTools,border:"",fit:""}},[a("el-table-column",{attrs:{label:"序号",align:"center","min-width":"15%"},scopedSlots:t._u([{key:"default",fn:function(e){e.row;var i=e.$index;return[a("span",[t._v(t._s(i+1))])]}}])}),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.name))])]}}])}),t._v(" "),a("el-table-column",{attrs:{label:"工具版本",align:"center","min-width":"35%"},scopedSlots:t._u([{key:"default",fn:function(e){var i=e.row;return[a("span",[t._v(t._s(i.version))])]}}])}),t._v(" "),a("el-table-column",{attrs:{label:"生产商/来源",align:"center","min-width":"35%"},scopedSlots:t._u([{key:"default",fn:function(e){var i=e.row;return[a("span",[t._v(t._s(i.producerFrom))])]}}])}),t._v(" "),a("el-table-column",{attrs:{label:"用途",align:"center","min-width":"70%"},scopedSlots:t._u([{key:"default",fn:function(e){var i=e.row;return[a("span",[t._v(t._s(i.purpose))])]}}])}),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?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()]}}])})],1),t._v(" "),a("el-dialog",{attrs:{title:t.textMap[t.dialogStatus],visible:t.dialogFormVisible},on:{"update:visible":function(e){t.dialogFormVisible=e}}},[a("el-form",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],ref:"testToolForm",staticStyle:{width:"400px","margin-left":"50px"},attrs:{rules:t.rules,model:t.testToolData,"label-position":"left","label-width":"100px"}},[a("el-form-item",{attrs:{label:"任务编号",prop:"taskCode"}},[a("el-input",{attrs:{disabled:""},model:{value:t.testToolData.taskCode,callback:function(e){t.$set(t.testToolData,"taskCode",e)},expression:"testToolData.taskCode"}})],1),t._v(" "),a("el-form-item",{attrs:{label:"工具名字",prop:"name"}},[a("el-input",{model:{value:t.testToolData.name,callback:function(e){t.$set(t.testToolData,"name",e)},expression:"testToolData.name"}})],1),t._v(" "),a("el-form-item",{attrs:{label:"工具版本",prop:"version"}},[a("el-input",{model:{value:t.testToolData.version,callback:function(e){t.$set(t.testToolData,"version",e)},expression:"testToolData.version"}})],1),t._v(" "),a("el-form-item",{attrs:{label:"生产商/来源",prop:"producerFrom"}},[a("el-input",{model:{value:t.testToolData.producerFrom,callback:function(e){t.$set(t.testToolData,"producerFrom",e)},expression:"testToolData.producerFrom"}})],1),t._v(" "),a("el-form-item",{attrs:{label:"用途",prop:"purpose"}},[a("el-input",{attrs:{type:"textarea"},model:{value:t.testToolData.purpose,callback:function(e){t.$set(t.testToolData,"purpose",e)},expression:"testToolData.purpose"}})],1)],1),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)],1)},staticRenderFns:[]};var c=a("VU/8")(r,l,!1,function(t){a("o3Ej")},"data-v-3e42eb9c",null);e.a=c.exports},QwPu:function(t,e,a){"use strict";e.a=function(t){var e=t.substring(t.lastIndexOf("/")+1);return e=e.substring(0,e.indexOf("_"))+e.substring(e.lastIndexOf("."))}},WCgr:function(t,e,a){"use strict";var i={name:"ExpendText",data:function(){return{isExpend:!1}},props:{length:{type:Number,default:100},text:{type:String,default:""}},computed:{showExpend:function(){return this.text&&this.text.length>this.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<arguments.length;e++){var a=null!=arguments[e]?arguments[e]:{};e%2?n(Object(a),!0).forEach(function(e){l(t,e,a[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(a)):n(Object(a)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(a,e))})}return t}function r(t){"@babel/helpers - typeof";return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function l(t,e,a){return e in t?Object.defineProperty(t,e,{value:a,enumerable:!0,configurable:!0,writable:!0}):t[e]=a,t}function c(){return(c=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var a=arguments[e];for(var i in a)Object.prototype.hasOwnProperty.call(a,i)&&(t[i]=a[i])}return t}).apply(this,arguments)}function d(t,e){if(null==t)return{};var a,i,s=function(t,e){if(null==t)return{};var a,i,s={},n=Object.keys(t);for(i=0;i<n.length;i++)a=n[i],e.indexOf(a)>=0||(s[a]=t[a]);return s}(t,e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);for(i=0;i<n.length;i++)a=n[i],e.indexOf(a)>=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++)a(i[s],s);return i}return[]}function O(){var t=document.scrollingElement;return t||document.documentElement}function A(t,e,a,i,s){if(t.getBoundingClientRect||t===window){var n,o,r,l,c,d,u;if(t!==window&&t.parentNode&&t!==O()?(o=(n=t.getBoundingClientRect()).top,r=n.left,l=n.bottom,c=n.right,d=n.height,u=n.width):(o=0,r=0,l=window.innerHeight,c=window.innerWidth,d=window.innerHeight,u=window.innerWidth),(e||a)&&t!==window&&(s=s||t.parentNode,!f))do{if(s&&s.getBoundingClientRect&&("none"!==E(s,"transform")||a&&"static"!==E(s,"position"))){var p=s.getBoundingClientRect();o-=p.top+parseInt(E(s,"border-top-width")),r-=p.left+parseInt(E(s,"border-left-width")),l=o+n.height,c=r+n.width;break}}while(s=s.parentNode);if(i&&t!==window){var h=k(s||t),m=h&&h.a,v=h&&h.d;h&&(l=(o/=v)+(d/=v),c=(r/=m)+(u/=m))}return{top:o,left:r,bottom:l,right:c,width:u,height:d}}}function F(t,e,a){for(var i=$(t,!0),s=A(t)[e];i;){var n=A(i)[a];if(!("top"===a||"left"===a?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;n<o.length;){if("none"!==o[n].style.display&&o[n]!==Vt.ghost&&(i||o[n]!==Vt.dragged)&&S(o[n],a.draggable,t,!1)){if(s===e)return o[n];s++}n++}return null}function N(t,e){for(var a=t.lastElementChild;a&&(a===Vt.ghost||"none"===E(a,"display")||e&&!D(a,e));)a=a.previousElementSibling;return a||null}function R(t,e){var a=0;if(!t||!t.parentNode)return-1;for(;t=t.previousElementSibling;)"TEMPLATE"===t.nodeName.toUpperCase()||t===Vt.clone||e&&!D(t,e)||a++;return a}function P(t){var e=0,a=0,i=O();if(t)do{var s=k(t),n=s.a,o=s.d;e+=t.scrollLeft*n,a+=t.scrollTop*o}while(t!==i&&(t=t.parentNode));return[e,a]}function $(t,e){if(!t||!t.getBoundingClientRect)return O();var a=t,i=!1;do{if(a.clientWidth<a.scrollWidth||a.clientHeight<a.scrollHeight){var s=E(a);if(a.clientWidth<a.scrollWidth&&("auto"==s.overflowX||"scroll"==s.overflowX)||a.clientHeight<a.scrollHeight&&("auto"==s.overflowY||"scroll"==s.overflowY)){if(!a.getBoundingClientRect||a===document.body)return O();if(i||e)return a;i=!0}}}while(a=a.parentNode);return O()}function M(t,e){return Math.round(t.top)===Math.round(e.top)&&Math.round(t.left)===Math.round(e.left)&&Math.round(t.height)===Math.round(e.height)&&Math.round(t.width)===Math.round(e.width)}function U(t,e){return function(){if(!x){var a=arguments;1===a.length?t.call(this,a[0]):t.apply(this,a),x=setTimeout(function(){x=void 0},e)}}}function j(t,e,a){t.scrollLeft+=e,t.scrollTop+=a}function V(t){var e=window.Polymer,a=window.jQuery||window.Zepto;return e&&e.dom?e.dom(t).cloneNode(!0):a?a(t).clone(!0)[0]:t.cloneNode(!0)}var B="Sortable"+(new Date).getTime();function Q(){var t,e=[];return{captureAnimationState:function(){(e=[],this.options.animation)&&[].slice.call(this.el.children).forEach(function(t){if("none"!==E(t,"display")&&t!==Vt.ghost){e.push({target:t,rect:A(t)});var a=o({},e[e.length-1].rect);if(t.thisAnimationDuration){var i=k(t,!0);i&&(a.top-=i.f,a.left-=i.e)}t.fromRect=a}})},addAnimationState:function(t){e.push(t)},removeAnimationState:function(t){e.splice(function(t,e){for(var a in t)if(t.hasOwnProperty(a))for(var i in e)if(e.hasOwnProperty(i)&&e[i]===t[a][i])return Number(a);return-1}(e,{target:t}),1)},animateAll:function(a){var i=this;if(!this.options.animation)return clearTimeout(t),void("function"==typeof a&&a());var s=!1,n=0;e.forEach(function(t){var e=0,a=t.target,o=a.fromRect,r=A(a),l=a.prevFromRect,c=a.prevToRect,d=t.rect,u=k(a,!0);u&&(r.top-=u.f,r.left-=u.e),a.toRect=r,a.thisAnimationDuration&&M(l,r)&&!M(o,r)&&(d.top-r.top)/(d.left-r.left)==(o.top-r.top)/(o.left-r.left)&&(e=function(t,e,a,i){return Math.sqrt(Math.pow(e.top-t.top,2)+Math.pow(e.left-t.left,2))/Math.sqrt(Math.pow(e.top-a.top,2)+Math.pow(e.left-a.left,2))*i.animation}(d,l,c,i.options)),M(r,o)||(a.prevFromRect=o,a.prevToRect=r,e||(e=i.options.animation),i.animate(a,d,r,e)),e&&(s=!0,n=Math.max(n,e),clearTimeout(a.animationResetTimer),a.animationResetTimer=setTimeout(function(){a.animationTime=0,a.prevFromRect=null,a.fromRect=null,a.prevToRect=null,a.thisAnimationDuration=null},e),a.thisAnimationDuration=e)}),clearTimeout(t),s?t=setTimeout(function(){"function"==typeof a&&a()},n):"function"==typeof a&&a(),e=[]},animate:function(t,e,a,i){if(i){E(t,"transition",""),E(t,"transform","");var s=k(this.el),n=s&&s.a,o=s&&s.d,r=(e.left-a.left)/(n||1),l=(e.top-a.top)/(o||1);t.animatingX=!!r,t.animatingY=!!l,E(t,"transform","translate3d("+r+"px,"+l+"px,0)"),this.forRepaintDummy=function(t){return t.offsetWidth}(t),E(t,"transition","transform "+i+"ms"+(this.options.easing?" "+this.options.easing:"")),E(t,"transform","translate3d(0,0,0)"),"number"==typeof t.animated&&clearTimeout(t.animated),t.animated=setTimeout(function(){E(t,"transition",""),E(t,"transform",""),t.animated=!1,t.animatingX=!1,t.animatingY=!1},i)}}}}var Y=[],z={initializeByDefault:!0},X={mount:function(t){for(var e in z)!z.hasOwnProperty(e)||e in t||(t[e]=z[e]);Y.forEach(function(e){if(e.pluginName===t.pluginName)throw"Sortable: Cannot mount plugin ".concat(t.pluginName," more than once")}),Y.push(t)},pluginEvent:function(t,e,a){var i=this;this.eventCanceled=!1,a.cancel=function(){i.eventCanceled=!0};var s=t+"Global";Y.forEach(function(i){e[i.pluginName]&&(e[i.pluginName][s]&&e[i.pluginName][s](o({sortable:e},a)),e.options[i.pluginName]&&e[i.pluginName][t]&&e[i.pluginName][t](o({sortable:e},a)))})},initializePlugins:function(t,e,a,i){for(var s in Y.forEach(function(i){var s=i.pluginName;if(t.options[s]||i.initializeByDefault){var n=new i(t,e,t.options);n.sortable=t,n.options=t.options,t[s]=n,c(a,n.defaults)}}),t.options)if(t.options.hasOwnProperty(s)){var n=this.modifyOption(t,s,t.options[s]);void 0!==n&&(t.options[s]=n)}},getEventProperties:function(t,e){var a={};return Y.forEach(function(i){"function"==typeof i.eventProperties&&c(a,i.eventProperties.call(e[i.pluginName],t))}),a},modifyOption:function(t,e,a){var i;return Y.forEach(function(s){t[s.pluginName]&&s.optionListeners&&"function"==typeof s.optionListeners[e]&&(i=s.optionListeners[e].call(t[s.pluginName],a))}),i}};function q(t){var e=t.sortable,a=t.rootEl,i=t.name,s=t.targetEl,n=t.cloneEl,r=t.toEl,l=t.fromEl,c=t.oldIndex,d=t.newIndex,u=t.oldDraggableIndex,h=t.newDraggableIndex,m=t.originalEvent,v=t.putSortable,g=t.extraEventProperties;if(e=e||a&&a[B]){var b,C=e.options,_="on"+i.charAt(0).toUpperCase()+i.substr(1);!window.CustomEvent||f||p?(b=document.createEvent("Event")).initEvent(i,!0,!0):b=new CustomEvent(i,{bubbles:!0,cancelable:!0}),b.to=r||a,b.from=l||a,b.item=s||a,b.clone=n,b.oldIndex=c,b.newIndex=d,b.oldDraggableIndex=u,b.newDraggableIndex=h,b.originalEvent=m,b.pullMode=v?v.lastPutMode:void 0;var D=o(o({},g),X.getEventProperties(i,e));for(var y in D)b[y]=D[y];a&&a.dispatchEvent(b),C[_]&&C[_].call(e,b)}}var W=["evt"],H=function(t,e){var a=arguments.length>2&&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))<a)return;this._onDragStart(t,!0)}if(Z){n?(n.e+=c-(pt||0),n.f+=d-(ht||0)):n={a:1,b:0,c:0,d:1,e:c,f:d};var u="matrix(".concat(n.a,",").concat(n.b,",").concat(n.c,",").concat(n.d,",").concat(n.e,",").concat(n.f,")");E(Z,"webkitTransform",u),E(Z,"mozTransform",u),E(Z,"msTransform",u),E(Z,"transform",u),pt=c,ht=d,ft=s}t.cancelable&&t.preventDefault()}},_appendGhost:function(){if(!Z){var t=this.options.fallbackOnBody?document.body:tt,e=A(J,!0,At,!0,t),a=this.options;if(At){for(Dt=t;"static"===E(Dt,"position")&&"none"===E(Dt,"transform")&&Dt!==document;)Dt=Dt.parentNode;Dt!==document.body&&Dt!==document.documentElement?(Dt===document&&(Dt=O()),e.top+=Dt.scrollTop,e.left+=Dt.scrollLeft):Dt=O(),Et=P(Dt)}w(Z=J.cloneNode(!0),a.ghostClass,!1),w(Z,a.fallbackClass,!0),w(Z,a.dragClass,!0),E(Z,"transition",""),E(Z,"transform",""),E(Z,"box-sizing","border-box"),E(Z,"margin",0),E(Z,"top",e.top),E(Z,"left",e.left),E(Z,"width",e.width),E(Z,"height",e.height),E(Z,"opacity","0.8"),E(Z,"position",At?"absolute":"fixed"),E(Z,"zIndex","100000"),E(Z,"pointerEvents","none"),Vt.ghost=Z,t.appendChild(Z),E(Z,"transform-origin",mt/parseInt(Z.style.width)*100+"% "+vt/parseInt(Z.style.height)*100+"%")}},_onDragStart:function(t,e){var a=this,i=t.dataTransfer,s=a.options;H("dragStart",this,{evt:t}),Vt.eventCanceled?this._onDrop():(H("setupClone",this),Vt.eventCanceled||((it=V(J)).draggable=!1,it.style["will-change"]="",this._hideClone(),w(it,this.options.chosenClass,!1),Vt.clone=it),a.cloneId=Xt(function(){H("clone",a),Vt.eventCanceled||(a.options.removeCloneOnHide||tt.insertBefore(it,J),a._hideClone(),G({sortable:a,name:"clone"}))}),!e&&w(J,s.dragClass,!0),e?(St=!0,a._loopId=setInterval(a._emulateDragOver,50)):(_(document,"mouseup",a._onDrop),_(document,"touchend",a._onDrop),_(document,"touchcancel",a._onDrop),i&&(i.effectAllowed="move",s.setData&&s.setData.call(a,i,J)),C(document,"drop",a),E(J,"transform","translateZ(0)")),yt=!0,a._dragStartId=Xt(a._dragStarted.bind(a,e,t)),C(document,"selectstart",a),gt=!0,m&&E(document.body,"user-select","none"))},_onDragOver:function(t){var e,a,i,s,n=this.el,r=t.target,l=this.options,c=l.group,d=Vt.active,u=ct===c,f=l.sort,p=dt||d,h=this,m=!1;if(!kt){if(void 0!==t.preventDefault&&t.cancelable&&t.preventDefault(),r=S(r,l.draggable,n,!0),M("dragOver"),Vt.eventCanceled)return m;if(J.contains(t.target)||r.animated&&r.animatingX&&r.animatingY||h._ignoreWhileAnimating===r)return V(!1);if(St=!1,d&&!l.disabled&&(u?f||(i=K!==tt):dt===this||(this.lastPutMode=ct.checkPull(this,d,J,t))&&c.checkPut(this,d,J,t))){if(s="vertical"===this._getDirection(t,r),e=A(J),M("dragOverValid"),Vt.eventCanceled)return m;if(i)return K=tt,U(),this._hideClone(),M("revert"),Vt.eventCanceled||(et?tt.insertBefore(J,et):tt.appendChild(J)),V(!0);var v=N(n,l.draggable);if(!v||function(t,e,a){var i=A(N(a.el,a.options.draggable));return e?t.clientX>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.clientX<i.left-10||t.clientY<i.top&&t.clientX<i.right:t.clientY<i.top-10||t.clientY<i.bottom&&t.clientX<i.left}(t,s,this)){var g=I(n,0,l,!0);if(g===J)return V(!1);if(a=A(r=g),!1!==Bt(tt,n,J,e,r,a,t,!1))return U(),n.insertBefore(J,g),K=n,Q(),V(!0)}else if(r.parentNode===n){a=A(r);var b,C,_,D=J.parentNode!==n,y=!function(t,e,a){var i=a?t.left:t.top,s=a?t.right:t.bottom,n=a?t.width:t.height,o=a?e.left:e.top,r=a?e.right:e.bottom,l=a?e.width:e.height;return i===o||s===r||i+n/2===o+l/2}(J.animated&&J.toRect||e,r.animated&&r.toRect||a,s),x=s?"top":"left",T=F(r,"top","top")||F(J,"top","top"),k=T?T.scrollTop:void 0;if(bt!==r&&(C=a[x],Tt=!1,wt=!y&&l.invertSwap||D),0!==(b=function(t,e,a,i,s,n,o,r){var l=i?t.clientY:t.clientX,c=i?a.height:a.width,d=i?a.top:a.left,u=i?a.bottom:a.right,f=!1;if(!o)if(r&&_t<c*s){if(!Tt&&(1===Ct?l>d+c*n/2:l<u-c*n/2)&&(Tt=!0),Tt)f=!0;else if(1===Ct?l<d+_t:l>u-_t)return-Ct}else if(l>d+c*(1-s)/2&&l<u-c*(1-s)/2)return function(t){return R(J)<R(t)?1:-1}(e);if((f=f||o)&&(l<d+c*n/2||l>u-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<s;i++)S(t=a[i],n.draggable,this.el,!1)&&e.push(t.getAttribute(n.dataIdAttr)||zt(t));return e},sort:function(t,e){var a={},i=this.el;this.toArray().forEach(function(t,e){var s=i.children[e];S(s,this.options.draggable,i,!1)&&(a[t]=s)},this),e&&this.captureAnimationState(),t.forEach(function(t){a[t]&&(i.removeChild(a[t]),i.appendChild(a[t]))}),e&&this.animateAll()},save:function(){var t=this.options.store;t&&t.set&&t.set(this)},closest:function(t,e){return S(t,e||this.options.draggable,this.el,!1)},option:function(t,e){var a=this.options;if(void 0===e)return a[t];var i=X.modifyOption(this,t,e);a[t]=void 0!==i?i:e,"group"===t&&Pt(a)},destroy:function(){H("destroy",this);var t=this.el;t[B]=null,_(t,"mousedown",this._onTapStart),_(t,"touchstart",this._onTapStart),_(t,"pointerdown",this._onTapStart),this.nativeDraggable&&(_(t,"dragover",this),_(t,"dragenter",this)),Array.prototype.forEach.call(t.querySelectorAll("[draggable]"),function(t){t.removeAttribute("draggable")}),this._onDrop(),this._disableDelayedDragEvents(),xt.splice(xt.indexOf(this.el),1),this.el=t=null},_hideClone:function(){if(!st){if(H("hideClone",this),Vt.eventCanceled)return;E(it,"display","none"),this.options.removeCloneOnHide&&it.parentNode&&it.parentNode.removeChild(it),st=!0}},_showClone:function(t){if("clone"===t.lastPutMode){if(st){if(H("showClone",this),Vt.eventCanceled)return;J.parentNode!=tt||this.options.group.revertClone?et?tt.insertBefore(it,et):tt.appendChild(it):tt.insertBefore(it,J),this.options.group.revertClone&&this.animate(J,it),E(it,"display",""),st=!1}}else this._hideClone()}},Ot&&C(document,"touchmove",function(t){(Vt.active||yt)&&t.cancelable&&t.preventDefault()}),Vt.utils={on:C,off:_,css:E,find:L,is:function(t,e){return!!S(t,e,t,!1)},extend:function(t,e){if(t&&e)for(var a in e)e.hasOwnProperty(a)&&(t[a]=e[a]);return t},throttle:U,closest:S,toggleClass:w,clone:V,index:R,nextTick:Xt,cancelNextTick:qt,detectDirection:Rt,getChild:I},Vt.get=function(t){return t[B]},Vt.mount=function(){for(var t=arguments.length,e=new Array(t),a=0;a<t;a++)e[a]=arguments[a];e[0].constructor===Array&&(e=e[0]),e.forEach(function(t){if(!t.prototype||!t.prototype.constructor)throw"Sortable: Mounted plugin must be a constructor function, not ".concat({}.toString.call(t));t.utils&&(Vt.utils=o(o({},Vt.utils),t.utils)),X.mount(t)})},Vt.create=function(t,e){return new Vt(t,e)},Vt.version="1.14.0";var Wt,Ht,Gt,Jt,Kt,Zt,te=[],ee=!1;function ae(){te.forEach(function(t){clearInterval(t.pid)}),te=[]}function ie(){clearInterval(Zt)}var se=U(function(t,e,a,i){if(e.scroll){var s,n=(t.touches?t.touches[0]:t).clientX,o=(t.touches?t.touches[0]:t).clientY,r=e.scrollSensitivity,l=e.scrollSpeed,c=O(),d=!1;Ht!==a&&(Ht=a,ae(),Wt=e.scroll,s=e.scrollFn,!0===Wt&&(Wt=$(a,!0)));var u=0,f=Wt;do{var p=f,h=A(p),m=h.top,v=h.bottom,g=h.left,b=h.right,C=h.width,_=h.height,D=void 0,y=void 0,S=p.scrollWidth,x=p.scrollHeight,T=E(p),w=p.scrollLeft,k=p.scrollTop;p===c?(D=C<S&&("auto"===T.overflowX||"scroll"===T.overflowX||"visible"===T.overflowX),y=_<x&&("auto"===T.overflowY||"scroll"===T.overflowY||"visible"===T.overflowY)):(D=C<S&&("auto"===T.overflowX||"scroll"===T.overflowX),y=_<x&&("auto"===T.overflowY||"scroll"===T.overflowY));var L=D&&(Math.abs(b-n)<=r&&w+C<S)-(Math.abs(g-n)<=r&&!!w),F=y&&(Math.abs(v-o)<=r&&k+_<x)-(Math.abs(m-o)<=r&&!!k);if(!te[u])for(var I=0;I<=u;I++)te[I]||(te[I]={});te[u].vx==L&&te[u].vy==F&&te[u].el===p||(te[u].el=p,te[u].vx=L,te[u].vy=F,clearInterval(te[u].pid),0==L&&0==F||(d=!0,te[u].pid=setInterval(function(){i&&0===this.layer&&Vt.active._onTouchMove(Kt);var e=te[this.layer].vy?te[this.layer].vy*l:0,a=te[this.layer].vx?te[this.layer].vx*l:0;"function"==typeof s&&"continue"!==s.call(Vt.dragged.parentNode[B],a,e,t,Kt,te[this.layer].el)||j(te[this.layer].el,a,e)}.bind({layer:u}),24))),u++}while(e.bubbleScroll&&f!==c&&(f=$(f,!1)));ee=d}},30),ne=function(t){var e=t.originalEvent,a=t.putSortable,i=t.dragEl,s=t.activeSortable,n=t.dispatchSortableEvent,o=t.hideGhostForTarget,r=t.unhideGhostForTarget;if(e){var l=a||s;o();var c=e.changedTouches&&e.changedTouches.length?e.changedTouches[0]:e,d=document.elementFromPoint(c.clientX,c.clientY);r(),l&&!l.el.contains(d)&&(n("spill"),this.onSpill({dragEl:i,putSortable:a}))}};function oe(){}function re(){}oe.prototype={startIndex:null,dragStart:function(t){var e=t.oldDraggableIndex;this.startIndex=e},onSpill:function(t){var e=t.dragEl,a=t.putSortable;this.sortable.captureAnimationState(),a&&a.captureAnimationState();var i=I(this.sortable.el,this.startIndex,this.options);i?this.sortable.el.insertBefore(e,i):this.sortable.el.appendChild(e),this.sortable.animateAll(),a&&a.animateAll()},drop:ne},c(oe,{pluginName:"revertOnSpill"}),re.prototype={onSpill:function(t){var e=t.dragEl,a=t.putSortable||this.sortable;a.captureAnimationState(),e.parentNode&&e.parentNode.removeChild(e),a.animateAll()},drop:ne},c(re,{pluginName:"removeOnSpill"});Vt.mount(new function(){function t(){for(var t in this.defaults={scroll:!0,forceAutoScrollFallback:!1,scrollSensitivity:30,scrollSpeed:10,bubbleScroll:!0},this)"_"===t.charAt(0)&&"function"==typeof this[t]&&(this[t]=this[t].bind(this))}return t.prototype={dragStarted:function(t){var e=t.originalEvent;this.sortable.nativeDraggable?C(document,"dragover",this._handleAutoScroll):this.options.supportPointer?C(document,"pointermove",this._handleFallbackAutoScroll):e.touches?C(document,"touchmove",this._handleFallbackAutoScroll):C(document,"mousemove",this._handleFallbackAutoScroll)},dragOverCompleted:function(t){var e=t.originalEvent;this.options.dragOverBubble||e.rootEl||this._handleAutoScroll(e)},drop:function(){this.sortable.nativeDraggable?_(document,"dragover",this._handleAutoScroll):(_(document,"pointermove",this._handleFallbackAutoScroll),_(document,"touchmove",this._handleFallbackAutoScroll),_(document,"mousemove",this._handleFallbackAutoScroll)),ie(),ae(),clearTimeout(x),x=void 0},nulling:function(){Kt=Ht=Wt=ee=Zt=Gt=Jt=null,te.length=0},_handleFallbackAutoScroll:function(t){this._handleAutoScroll(t,!0)},_handleAutoScroll:function(t,e){var a=this,i=(t.touches?t.touches[0]:t).clientX,s=(t.touches?t.touches[0]:t).clientY,n=document.elementFromPoint(i,s);if(Kt=t,e||this.options.forceAutoScrollFallback||p||f||m){se(t,this.options,n,e);var o=$(n,!0);!ee||Zt&&i===Gt&&s===Jt||(Zt&&ie(),Zt=setInterval(function(){var n=$(document.elementFromPoint(i,s),!0);n!==o&&(o=n,ae()),se(t,a.options,n,e)},10),Gt=i,Jt=s)}else{if(!this.options.bubbleScroll||$(n,!0)===O())return void ae();se(t,this.options,$(n,!1),!1)}}},c(t,{pluginName:"scroll",initializeByDefault:!0})}),Vt.mount(re,oe);var le=Vt,ce={name:"DragSelect",props:{value:{type:Array,required:!0}},computed:{selectVal:{get:function(){return[].concat(s()(this.value))},set:function(t){this.$emit("input",[].concat(s()(t)))}}},mounted:function(){this.setSort()},methods:{setSort:function(){var t=this,e=this.$refs.dragSelect.$el.querySelectorAll(".el-select__tags > 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;i<a.length;i++)a[i]instanceof Array?(e[i]=new Array(a[i].length),t(e[i],a[i])):a[i]instanceof Object?(e[i]={},t(e[i],a[i])):e[i]=a[i]}else if(a instanceof Object)for(var s in e.length>0&&(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){}});
|