1 |
- webpackJsonp([2],{"/RwQ":function(t,e,a){"use strict";var s=a("Dd8w"),i=a.n(s),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 s={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&&(s.id=e.testCaseData.id),console.log(s);var i=void 0,n=void 0;s.id?(i=r.a.TESTCASE.UPDATE.replace("{id}",s.id),n=l.a.put):(i=r.a.TESTCASE.ADD,n=l.a.post),n(i,s).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 s={id:e.testCaseData.id,examStatus:e.testCaseData.examStatus,examDescr:e.testCaseData.examDescr};l.a.put(url,s).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:i()({},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 s={examStatus:e.testCaseData.examStatus,examDescr:e.testCaseData.examDescr};l.a.put(r.a.TESTCASE.EXAM.replace("{id}",e.testCaseData.id),s).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 D=a("VU/8")(b,C,!1,function(t){a("ngCC")},"data-v-0aa97cae",null).exports,_=a("9jca"),y=a("yWYk"),S=a("NYxO"),x={name:"TestCaseList",components:{Pagination:n.a,TestcaseForm:h,TestcaseDetail:D,DefectList:_.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:i()({},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 s=t.testCaseDatas.find(function(e){return e.id===t.testCaseData.id});s.examStatus=e,s.examDescr=a})},showListLoading:function(){this.listLoading=!0},hideListLoading:function(){this.listLoading=!1},toogleExpand2:function(t){this.$refs.testCaseTable.toggleRowExpansion(t)}})},w={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 s=e.row;return e.$index,[a("defect-list",{ref:"innerDefectList",attrs:{defects:s.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 s=e.row;return[a("span",[t._v(t._s(s.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 s=e.row;return[a("span",[t._v(t._s(s.name))])]}}])}),t._v(" "),a("el-table-column",{attrs:{label:"优先级",align:"center","min-width":"3%"},scopedSlots:t._u([{key:"default",fn:function(e){var s=e.row;return[a("span",[t._v(t._s(t.toPriorityCn(s.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 s=e.row;return[a("span",[t._v(t._s(s.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 s=e.row;return[a("span",[t._v(t._s(s.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 s=e.row;return[a("span",[t._v(t._s(s.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 s=e.row;return[a("span",[t._v(t._s(s.testResult))])]}}])}),t._v(" "),a("el-table-column",{attrs:{label:"测试结论",align:"center","min-width":"4%"},scopedSlots:t._u([{key:"default",fn:function(e){var s=e.row;return[a("span",[t._v(t._s(t.toTestStatusCn(s.testStatus)))])]}}])}),t._v(" "),a("el-table-column",{attrs:{label:"缺陷数量(个)",align:"center","min-width":"4%"},scopedSlots:t._u([{key:"default",fn:function(e){var s=e.row;return[a("a",{staticStyle:{color:"indianred"},attrs:{href:"javascript:void(0)"},on:{click:function(e){return t.toogleExpand2(s)}}},[t._v(t._s(s.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 s=e.row;return[a("span",[t._v(t._s(t.toExamStatusCn(s.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 s=e.row;return[a("span",[t._v(t._s(s.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 s=e.row,i=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(s)}}}),t._v(" "),t.testCaseCanEdit?a("i",{staticClass:"el-icon-edit mini-margin",staticStyle:{cursor:"pointer"},attrs:{title:"编辑"},on:{click:function(e){return t.handleUpdate(s)}}}):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(s,i)}}}):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(s)}}}):t._e(),t._v(" "),t.testCaseCanEdit&&"NO_PASS"===s.testStatus?a("i",{staticClass:"el-icon-document-add mini-margin",staticStyle:{cursor:"pointer"},attrs:{title:"新增缺陷"},on:{click:function(e){return t.handleCreateDefect(s,i)}}}):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(s)}}}):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 T=a("VU/8")(x,w,!1,function(t){a("iAvk"),a("zpvg")},"data-v-7e2f1479",null);e.a=T.exports},"1onU":function(t,e,a){"use strict";Math.easeInOutQuad=function(t,e,a,s){return(t/=s/2)<1?a/2*t*t+e:-a/2*(--t*(t-2)-1)+e};var s=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||function(t){window.setTimeout(t,1e3/60)};function i(t,e,a){var i=document.documentElement.scrollTop||document.body.parentNode.scrollTop||document.body.scrollTop,n=t-i,o=0;e=void 0===e?500:e;!function t(){o+=20;var r,l=Math.easeInOutQuad(o,i,n,e);r=l,document.documentElement.scrollTop=r,document.body.parentNode.scrollTop=r,document.body.scrollTop=r,o<e?s(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&&i(0,800)},handleCurrentChange:function(t){this.$emit("pagination",{page:t,limit:this.pageSize}),this.autoScroll&&i(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 s=a("Dd8w"),i=a.n(s),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 s={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&&(s.id=e.defectData.id),console.log(s);var i=void 0,n=void 0;s.id?(i=l.a.TESTCASE.UPDATE_DEFECT.replace("{id}",s.id),n=r.a.put):(i=l.a.TESTCASE.ADD_DEFECT,n=r.a.post),n(i,s).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:i()({},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 D=a("VU/8")(b,C,!1,function(t){a("8l0Z")},"data-v-cec8ec8a",null).exports,_=a("1onU"),y=a("NYxO"),S={name:"DefectList",components:{DefectForm:m,DefectDetail:D,Pagination:_.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:i()({},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 s=e.row;return[a("span",[t._v(t._s(s.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 s=e.row;return[a("span",[t._v(t._s(s.descr))])]}}])}),t._v(" "),a("el-table-column",{attrs:{label:"严重等级",align:"center","min-width":"12%"},scopedSlots:t._u([{key:"default",fn:function(e){var s=e.row;return[a("span",[t._v(t._s(t.toSeriousnessCn(s.seriousness)))])]}}])}),t._v(" "),a("el-table-column",{attrs:{label:"优先级",align:"center","min-width":"10%"},scopedSlots:t._u([{key:"default",fn:function(e){var s=e.row;return[a("span",[t._v(t._s(t.toPriorityCn(s.priority)))])]}}])}),t._v(" "),a("el-table-column",{attrs:{label:"缺陷类型",align:"center","min-width":"12%"},scopedSlots:t._u([{key:"default",fn:function(e){var s=e.row;return[a("span",[t._v(t._s(t.toDefectTypeCn(s.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 s=e.row;return[a("span",[t._v(t._s(s.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 s=e.row;return[a("span",[t._v(t._s(s.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 s=e.row;return[a("span",[t._v(t._s(s.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 s=e.row;return[a("span",[t._v(t._s(s.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 s=e.row,i=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(s)}}}),t._v(" "),t.testCaseCanEdit?a("i",{staticClass:"el-icon-edit mini-margin ",staticStyle:{cursor:"pointer"},attrs:{title:"编辑"},on:{click:function(e){return t.handleUpdate(s)}}}):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(s,i)}}}):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(s)}}}):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 w=a("VU/8")(S,x,!1,function(t){a("z4be")},"data-v-22f3d985",null);e.a=w.exports},"9nOZ":function(t,e,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var s=a("/RwQ"),i=a("9jca"),n=a("M4HI"),o=a("Qrr+"),r=a("SQ4B"),l=a("b9vf"),c=a("qI5z"),d={name:"ExamTestCases",components:{TestCaseList:s.a,DefectList:i.a,TestEnvList:n.a,TestToolList:o.a},data:function(){return{tabActiveName:"testCases",testCaseData:{},defectData:{},testCaseDatas:[],selectedProjectCode:this.$route.params.projectCode,selectedTaskCode:this.$route.params.taskCode,selectedUserId:parseInt(this.$route.params.userId),selectedTestStatus:"",selectedExamStatus:"",selectedTaskData:{name:"",code:"",status:void 0,id:void 0},projects:[],searchProjects:[],tasks:[],searchTasks:[],users:[],selectedUser:{name:"",username:"",isCommitted:void 0,id:void 0},canAudit:!1,testStatusSearchShow:!0,examStatusSearchShow:!0}},watch:{selectedProjectCode:{immediate:!1,handler:function(){this.getSimpleTaskDatas(!1)}},selectedTaskCode:{immediate:!1,handler:function(){this.getTaskUserDatas(!1)}},selectedUserId:{immediate:!1,handler:function(){this.selectedUserId&&this.getList(!1)}},selectedExamStatus:{immediate:!1,handler:function(){this.selectedUserId&&this.getList(!1)}},selectedTestStatus:{immediate:!1,handler:function(){this.selectedUserId&&this.getList(!1)}}},created:function(){this.getSimpleProjectDatas(),this.getSimpleTaskDatas(!0)},methods:{getList:function(t){this.canAudit=4!==this.selectedTaskData.status&&1===this.selectedUser.isCommitted,this.$refs.testCaseList.listQueryParam.selectedTaskCode=this.selectedTaskCode,this.$refs.testCaseList.listQueryParam.selectedUserId=this.selectedUserId,this.$refs.testCaseList.listQueryParam.testStatus=this.selectedTestStatus,this.$refs.testCaseList.listQueryParam.examStatus=this.selectedExamStatus,this.$refs.defectList.listQueryParam.selectedTaskCode=this.selectedTaskCode,this.$refs.defectList.listQueryParam.selectedUserId=this.selectedUserId,this.$refs.testEnvList.listQueryParam.selectedTaskCode=this.selectedTaskCode,this.$refs.testEnvList.listQueryParam.selectedUserId=this.selectedUserId,this.$refs.testToolList.selectedTaskCode=this.selectedTaskCode,this.$refs.testToolList.selectedUserId=this.selectedUserId,t||(this.selectedUserId?(this.$refs.testCaseList.getList(),this.$refs.defectList.getList(),this.$refs.testEnvList.getList(),this.$refs.testToolList.getList()):this.clearList())},clearList:function(){this.$refs.testCaseList.clearList(),this.$refs.defectList.clearList(),this.$refs.testEnvList.clearList(),this.$refs.testToolList.clearList()},projectDataFilter:function(t){this.searchProjects=t?this.projects.filter(function(e){return e.name.includes(t)}):this.projects},taskDataFilter:function(t){this.searchTasks=t?this.tasks.filter(function(e){return e.name.includes(t)}):this.tasks},eqNoClick:function(){this.searchProjects=this.projects,this.searchTasks=this.tasks},getSimpleProjectDatas:function(){var t=this;r.a.get(l.a.PROJECT.GET_SIMPLE_DATAS).then(function(e){t.projects=e.data,t.searchProjects=e.data}).catch(function(e){t.hideLoading(),Object(c.a)("error","获取项目列表数据失败:系统异常")})},getSimpleTaskDatas:function(t){var e=this;r.a.get(l.a.TASK.GET_SIMPLE_DATAS_BY_PROJECT.replace("{projectCode}",this.selectedProjectCode)).then(function(a){e.tasks=a.data,e.searchTasks=a.data,t?(e.selectedTaskData=e.searchTasks.find(function(t){return t.code===e.selectedTaskCode}),e.getTaskUserDatas(t)):(e.selectedTaskData=e.tasks[0],e.selectedTaskCode=e.selectedTaskData.code)}).catch(function(t){e.hideLoading(),Object(c.a)("error","获取任务列表数据失败:系统异常")})},getTaskUserDatas:function(t){var e=this;r.a.get(l.a.TASK.GET_TASK_USER_DATAS.replace("{projectCode}",this.selectedProjectCode).replace("{taskCode}",this.selectedTaskCode)).then(function(a){e.users=a.data,e.users.forEach(function(t){t.isCommitted?t.name=t.name+"(已提交)":t.name=t.name+"(未提交)"}),t?(e.selectedUserId?e.selectedUser=e.users.find(function(t){return t.id===e.selectedUserId}):(e.selectedUser=e.users[0],e.selectedUserId=e.selectedUser.id),e.getList(t)):0===e.users.length?(e.selectedUserId=void 0,e.selectedUser={}):(e.selectedUserId=e.users[0].id,e.selectedUser=e.users[0])}).catch(function(t){console.log(t),Object(c.a)("error","获取用户列表数据失败:系统异常")})},handleTabClick:function(t,e){"testCases"===t.name?(this.testStatusSearchShow=!0,this.examStatusSearchShow=!0):(this.testStatusSearchShow=!1,this.examStatusSearchShow=!1)}}},u={render:function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{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.projectDataFilter},nativeOn:{click:function(e){return t.eqNoClick(e)}},model:{value:t.selectedProjectCode,callback:function(e){t.selectedProjectCode=e},expression:"selectedProjectCode"}},t._l(t.searchProjects,function(t){return a("el-option",{key:t.code,attrs:{label:t.name,value:t.code}})}),1),t._v(" "),a("el-select",{attrs:{filterable:"","filter-method":t.taskDataFilter},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(" "),a("el-select",{model:{value:t.selectedUserId,callback:function(e){t.selectedUserId=e},expression:"selectedUserId"}},t._l(t.users,function(t){return a("el-option",{key:"user"+t.id,attrs:{label:t.name,value:t.id}})}),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.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()],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-user-id":t.selectedUserId,"selected-test-status":t.selectedTestStatus,"selected-exam-status":t.selectedExamStatus,"test-case-can-edit":!1,"can-audit":t.canAudit}})],1),t._v(" "),a("el-tab-pane",{attrs:{label:"用例缺陷",name:"defects"}},[a("defect-list",{ref:"defectList",attrs:{isContained:!1,"test-case-can-edit":!1,"selected-task-code":t.selectedTaskCode,"selected-user-id":t.selectedUserId}})],1),t._v(" "),a("el-tab-pane",{attrs:{label:"测试环境",name:"testEnvs"}},[a("test-env-list",{ref:"testEnvList",attrs:{"test-case-can-edit":!1,"selected-task-code":t.selectedTaskCode,"selected-user-id":t.selectedUserId}})],1),t._v(" "),a("el-tab-pane",{attrs:{label:"测试工具",name:"testTools"}},[a("test-tool-list",{ref:"testToolList",attrs:{"test-case-can-edit":!1,"selected-task-code":t.selectedTaskCode,"selected-user-id":t.selectedUserId}})],1)],1)],1)},staticRenderFns:[]};var f=a("VU/8")(d,u,!1,function(t){a("zFNX")},"data-v-d0435f26",null);e.default=f.exports},CYQe:function(t,e,a){"use strict";var s=a("b9vf"),i={name:"FileUpload",data:function(){return{fileList:[],uploadUrl:"http://10.18.18.39"+s.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,s="application/vnd.ms-excel"===t.type,i="application/x-xls"===t.type,n="text/plain"===t.type,o="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"===t.type;return a||s||e||n||i||o||this.$message.error("上传文件只能是 PDF 、 DOC 、DOCX 、XLS、TXT、XLSX 格式!"),a||s||e||n||i||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")(i,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 s=a("b9vf"),i={name:"ImgUpload",data:function(){return{fileList:[],uploadUrl:"http://10.18.18.39"+s.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,s=t.size/1024/1024<2;return e||a||this.$message.error("上传头像图片只能是 JPG 和 PNG 格式!"),s||this.$message.error("上传图片大小不能超过 2MB!"),(e||a)&&s},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")(i,n,!1,null,null,null);e.a=o.exports},Gu7T:function(t,e,a){"use strict";e.__esModule=!0;var s,i=a("c/Tr"),n=(s=i)&&s.__esModule?s:{default:s};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 s=a("yWYk"),i=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(s.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(),i.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,s=void 0;t.testEnvData.id?(a=n.a.TESTENV.UPDATE.replace("{id}",t.testEnvData.id),s=i.a.put):(a=n.a.TESTENV.ADD,s=i.a.post),s(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);i.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 s=e.$index;return[a("span",[t._v(t._s(s+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 s=e.row;return[a("span",[t._v(t._s(s.devName))])]}}])}),t._v(" "),a("el-table-column",{attrs:{label:"设备型号",align:"center","min-width":"25%"},scopedSlots:t._u([{key:"default",fn:function(e){var s=e.row;return[a("span",[t._v(t._s(s.devModel))])]}}])}),t._v(" "),a("el-table-column",{attrs:{label:"数量",align:"center","min-width":"10%"},scopedSlots:t._u([{key:"default",fn:function(e){var s=e.row;return[a("span",[t._v(t._s(s.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 s=e.row;return[a("span",[t._v(t._s(s.devConfig))])]}}])}),t._v(" "),a("el-table-column",{attrs:{label:"操作系统",align:"center","min-width":"20%"},scopedSlots:t._u([{key:"default",fn:function(e){var s=e.row;return[a("span",[t._v(t._s(s.opeSys))])]}}])}),t._v(" "),a("el-table-column",{attrs:{label:"中间件",align:"center","min-width":"20%"},scopedSlots:t._u([{key:"default",fn:function(e){var s=e.row;return[a("span",[t._v(t._s(s.middleware))])]}}])}),t._v(" "),a("el-table-column",{attrs:{label:"数据库",align:"center","min-width":"20%"},scopedSlots:t._u([{key:"default",fn:function(e){var s=e.row;return[a("span",[t._v(t._s(s.db))])]}}])}),t._v(" "),a("el-table-column",{attrs:{label:"浏览器",align:"center","min-width":"20%"},scopedSlots:t._u([{key:"default",fn:function(e){var s=e.row;return[a("span",[t._v(t._s(s.browser))])]}}])}),t._v(" "),a("el-table-column",{attrs:{label:"支持软件",align:"center","min-width":"25%"},scopedSlots:t._u([{key:"default",fn:function(e){var s=e.row;return[a("span",[t._v(t._s(s.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 s=e.row,i=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(s)}}}):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(s,i)}}}):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 s=a("yWYk"),i=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(s.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(),i.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,s=void 0;t.testToolData.id?(a=n.a.TESTTOOL.UPDATE.replace("{id}",t.testToolData.id),s=i.a.put):(a=n.a.TESTTOOL.ADD,s=i.a.post),s(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);i.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 s=e.$index;return[a("span",[t._v(t._s(s+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 s=e.row;return[a("span",[t._v(t._s(s.name))])]}}])}),t._v(" "),a("el-table-column",{attrs:{label:"工具版本",align:"center","min-width":"35%"},scopedSlots:t._u([{key:"default",fn:function(e){var s=e.row;return[a("span",[t._v(t._s(s.version))])]}}])}),t._v(" "),a("el-table-column",{attrs:{label:"生产商/来源",align:"center","min-width":"35%"},scopedSlots:t._u([{key:"default",fn:function(e){var s=e.row;return[a("span",[t._v(t._s(s.producerFrom))])]}}])}),t._v(" "),a("el-table-column",{attrs:{label:"用途",align:"center","min-width":"70%"},scopedSlots:t._u([{key:"default",fn:function(e){var s=e.row;return[a("span",[t._v(t._s(s.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 s=e.row,i=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(s)}}}):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(s,i)}}}):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 s={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}}},i={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")(s,i,!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 s=a("evD5"),i=a("X8DO");t.exports=function(t,e,a){e in t?s.f(t,e,i(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 s=a("+ZMJ"),i=a("kM2E"),n=a("sB3e"),o=a("msXi"),r=a("Mhyx"),l=a("QRG4"),c=a("fBQ2"),d=a("3fs2");i(i.S+i.F*!a("dY0y")(function(t){Array.from(t)}),"Array",{from:function(t){var e,a,i,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=s(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;!(i=u.next()).done;g++)c(a,g,v?o(u,m,[i.value,g],!0):i.value);return a.length=g,a}})},tiPg:function(t,e,a){"use strict";var s=a("Gu7T"),i=a.n(s);function n(t,e){var a=Object.keys(t);if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(t);e&&(s=s.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),a.push.apply(a,s)}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 s in a)Object.prototype.hasOwnProperty.call(a,s)&&(t[s]=a[s])}return t}).apply(this,arguments)}function d(t,e){if(null==t)return{};var a,s,i=function(t,e){if(null==t)return{};var a,s,i={},n=Object.keys(t);for(s=0;s<n.length;s++)a=n[s],e.indexOf(a)>=0||(i[a]=t[a]);return i}(t,e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);for(s=0;s<n.length;s++)a=n[s],e.indexOf(a)>=0||Object.prototype.propertyIsEnumerable.call(t,a)&&(i[a]=t[a])}return i}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 D(t,e,a){t.removeEventListener(e,a,!f&&b)}function _(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,s){if(t){a=a||document;do{if(null!=e&&(">"===e[0]?t.parentNode===a&&_(t,e):_(t,e))||s&&t===a)return t;if(t===a)break}while(t=y(t))}return null}var x,w=/\s+/g;function T(t,e,a){if(t&&e)if(t.classList)t.classList[a?"add":"remove"](e);else{var s=(" "+t.className+" ").replace(w," ").replace(" "+e+" "," ");t.className=(s+(a?" "+e:"")).replace(w," ")}}function E(t,e,a){var s=t&&t.style;if(s){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 s||-1!==e.indexOf("webkit")||(e="-webkit-"+e),s[e]=a+("string"==typeof a?"":"px")}}function k(t,e){var a="";if("string"==typeof t)a=t;else do{var s=E(t,"transform");s&&"none"!==s&&(a=s+" "+a)}while(!e&&(t=t.parentNode));var i=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return i&&new i(a)}function L(t,e,a){if(t){var s=t.getElementsByTagName(e),i=0,n=s.length;if(a)for(;i<n;i++)a(s[i],i);return s}return[]}function O(){var t=document.scrollingElement;return t||document.documentElement}function I(t,e,a,s,i){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&&(i=i||t.parentNode,!f))do{if(i&&i.getBoundingClientRect&&("none"!==E(i,"transform")||a&&"static"!==E(i,"position"))){var p=i.getBoundingClientRect();o-=p.top+parseInt(E(i,"border-top-width")),r-=p.left+parseInt(E(i,"border-left-width")),l=o+n.height,c=r+n.width;break}}while(i=i.parentNode);if(s&&t!==window){var h=k(i||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 A(t,e,a){for(var s=R(t,!0),i=I(t)[e];s;){var n=I(s)[a];if(!("top"===a||"left"===a?i>=n:i<=n))return s;if(s===O())break;s=R(s,!1)}return!1}function P(t,e,a,s){for(var i=0,n=0,o=t.children;n<o.length;){if("none"!==o[n].style.display&&o[n]!==Vt.ghost&&(s||o[n]!==Vt.dragged)&&S(o[n],a.draggable,t,!1)){if(i===e)return o[n];i++}n++}return null}function F(t,e){for(var a=t.lastElementChild;a&&(a===Vt.ghost||"none"===E(a,"display")||e&&!_(a,e));)a=a.previousElementSibling;return a||null}function N(t,e){var a=0;if(!t||!t.parentNode)return-1;for(;t=t.previousElementSibling;)"TEMPLATE"===t.nodeName.toUpperCase()||t===Vt.clone||e&&!_(t,e)||a++;return a}function $(t){var e=0,a=0,s=O();if(t)do{var i=k(t),n=i.a,o=i.d;e+=t.scrollLeft*n,a+=t.scrollTop*o}while(t!==s&&(t=t.parentNode));return[e,a]}function R(t,e){if(!t||!t.getBoundingClientRect)return O();var a=t,s=!1;do{if(a.clientWidth<a.scrollWidth||a.clientHeight<a.scrollHeight){var i=E(a);if(a.clientWidth<a.scrollWidth&&("auto"==i.overflowX||"scroll"==i.overflowX)||a.clientHeight<a.scrollHeight&&("auto"==i.overflowY||"scroll"==i.overflowY)){if(!a.getBoundingClientRect||a===document.body)return O();if(s||e)return a;s=!0}}}while(a=a.parentNode);return O()}function U(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 j(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 M(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:I(t)});var a=o({},e[e.length-1].rect);if(t.thisAnimationDuration){var s=k(t,!0);s&&(a.top-=s.f,a.left-=s.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 s in e)if(e.hasOwnProperty(s)&&e[s]===t[a][s])return Number(a);return-1}(e,{target:t}),1)},animateAll:function(a){var s=this;if(!this.options.animation)return clearTimeout(t),void("function"==typeof a&&a());var i=!1,n=0;e.forEach(function(t){var e=0,a=t.target,o=a.fromRect,r=I(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&&U(l,r)&&!U(o,r)&&(d.top-r.top)/(d.left-r.left)==(o.top-r.top)/(o.left-r.left)&&(e=function(t,e,a,s){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))*s.animation}(d,l,c,s.options)),U(r,o)||(a.prevFromRect=o,a.prevToRect=r,e||(e=s.options.animation),s.animate(a,d,r,e)),e&&(i=!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),i?t=setTimeout(function(){"function"==typeof a&&a()},n):"function"==typeof a&&a(),e=[]},animate:function(t,e,a,s){if(s){E(t,"transition",""),E(t,"transform","");var i=k(this.el),n=i&&i.a,o=i&&i.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 "+s+"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},s)}}}}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 s=this;this.eventCanceled=!1,a.cancel=function(){s.eventCanceled=!0};var i=t+"Global";Y.forEach(function(s){e[s.pluginName]&&(e[s.pluginName][i]&&e[s.pluginName][i](o({sortable:e},a)),e.options[s.pluginName]&&e[s.pluginName][t]&&e[s.pluginName][t](o({sortable:e},a)))})},initializePlugins:function(t,e,a,s){for(var i in Y.forEach(function(s){var i=s.pluginName;if(t.options[i]||s.initializeByDefault){var n=new s(t,e,t.options);n.sortable=t,n.options=t.options,t[i]=n,c(a,n.defaults)}}),t.options)if(t.options.hasOwnProperty(i)){var n=this.modifyOption(t,i,t.options[i]);void 0!==n&&(t.options[i]=n)}},getEventProperties:function(t,e){var a={};return Y.forEach(function(s){"function"==typeof s.eventProperties&&c(a,s.eventProperties.call(e[s.pluginName],t))}),a},modifyOption:function(t,e,a){var s;return Y.forEach(function(i){t[i.pluginName]&&i.optionListeners&&"function"==typeof i.optionListeners[e]&&(s=i.optionListeners[e].call(t[i.pluginName],a))}),s}};function q(t){var e=t.sortable,a=t.rootEl,s=t.name,i=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,D="on"+s.charAt(0).toUpperCase()+s.substr(1);!window.CustomEvent||f||p?(b=document.createEvent("Event")).initEvent(s,!0,!0):b=new CustomEvent(s,{bubbles:!0,cancelable:!0}),b.to=r||a,b.from=l||a,b.item=i||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 _=o(o({},g),X.getEventProperties(s,e));for(var y in _)b[y]=_[y];a&&a.dispatchEvent(b),C[D]&&C[D].call(e,b)}}var W=["evt"],H=function(t,e){var a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},s=a.evt,i=d(a,W);X.pluginEvent.bind(Vt)(t,e,o({dragEl:J,parentEl:Z,ghostEl:K,rootEl:tt,nextEl:et,lastDownEl:at,cloneEl:st,cloneHidden:it,dragStarted:gt,putSortable:dt,activeSortable:Vt.active,originalEvent:s,oldIndex:nt,oldDraggableIndex:rt,newIndex:ot,newDraggableIndex:lt,hideGhostForTarget:Rt,unhideGhostForTarget:Ut,cloneNowHidden:function(){it=!0},cloneNowShown:function(){it=!1},dispatchSortableEvent:function(t){G({sortable:e,name:t,originalEvent:s})}},i))};function G(t){q(o({putSortable:dt,cloneEl:st,targetEl:J,rootEl:tt,oldIndex:nt,oldDraggableIndex:rt,newIndex:ot,newDraggableIndex:lt},t))}var J,Z,K,tt,et,at,st,it,nt,ot,rt,lt,ct,dt,ut,ft,pt,ht,mt,vt,gt,bt,Ct,Dt,_t,yt=!1,St=!1,xt=[],wt=!1,Tt=!1,Et=[],kt=!1,Lt=[],Ot="undefined"!=typeof document,It=v,At=p||f?"cssFloat":"float",Pt=Ot&&!g&&!v&&"draggable"in document.createElement("div"),Ft=function(){if(Ot){if(f)return!1;var t=document.createElement("x");return t.style.cssText="pointer-events:auto","auto"===t.style.pointerEvents}}(),Nt=function(t,e){var a=E(t),s=parseInt(a.width)-parseInt(a.paddingLeft)-parseInt(a.paddingRight)-parseInt(a.borderLeftWidth)-parseInt(a.borderRightWidth),i=P(t,0,e),n=P(t,1,e),o=i&&E(i),r=n&&E(n),l=o&&parseInt(o.marginLeft)+parseInt(o.marginRight)+I(i).width,c=r&&parseInt(r.marginLeft)+parseInt(r.marginRight)+I(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(i&&o.float&&"none"!==o.float){var d="left"===o.float?"left":"right";return!n||"both"!==r.clear&&r.clear!==d?"horizontal":"vertical"}return i&&("block"===o.display||"flex"===o.display||"table"===o.display||"grid"===o.display||l>=s&&"none"===a[At]||n&&"none"===a[At]&&l+c>s)?"vertical":"horizontal"},$t=function(t){function e(t,a){return function(s,i,n,o){var r=s.options.group.name&&i.options.group.name&&s.options.group.name===i.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(s,i,n,o),a)(s,i,n,o);var l=(a?s:i).options.group.name;return!0===t||"string"==typeof t&&t===l||t.join&&t.indexOf(l)>-1}}var a={},s=t.group;s&&"object"==r(s)||(s={name:s}),a.name=s.name,a.checkPull=e(s.pull,!0),a.checkPut=e(s.put),a.revertClone=s.revertClone,t.group=a},Rt=function(){!Ft&&K&&E(K,"display","none")},Ut=function(){!Ft&&K&&E(K,"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 jt=function(t){if(J){t=t.touches?t.touches[0]:t;var e=(i=t.clientX,n=t.clientY,xt.some(function(t){var e=t[B].options.emptyInsertThreshold;if(e&&!F(t)){var a=I(t),s=i>=a.left-e&&i<=a.right+e,r=n>=a.top-e&&n<=a.bottom+e;return s&&r?o=t:void 0}}),o);if(e){var a={};for(var s in t)t.hasOwnProperty(s)&&(a[s]=t[s]);a.target=a.rootEl=e,a.preventDefault=void 0,a.stopPropagation=void 0,e[B]._onDragOver(a)}}var i,n,o},Mt=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 Nt(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 s in X.initializePlugins(this,t,a),a)!(s in e)&&(e[s]=a[s]);for(var i in $t(e),this)"_"===i.charAt(0)&&"function"==typeof this[i]&&(this[i]=this[i].bind(this));this.nativeDraggable=!e.forceFallback&&Pt,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,s,i,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=s,l.related=i||e,l.relatedRect=n||I(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,s=0;a--;)s+=e.charCodeAt(a);return s.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,s=this.options,i=s.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=s.filter;if(function(t){Lt.length=0;var e=t.getElementsByTagName("input"),a=e.length;for(;a--;){var s=e[a];s.checked&&Lt.push(s)}}(a),!J&&!(/mousedown|pointerdown/.test(n)&&0!==t.button||s.disabled)&&!l.isContentEditable&&(this.nativeDraggable||!m||!r||"SELECT"!==r.tagName.toUpperCase())&&!((r=S(r,s.draggable,a,!1))&&r.animated||at===r)){if(nt=N(r),rt=N(r,s.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(i&&t.cancelable&&t.preventDefault())}else if(c&&(c=c.split(",").some(function(s){if(s=S(l,s.trim(),a,!1))return G({sortable:e,rootEl:s,name:"filter",targetEl:r,fromEl:a,toEl:a}),H("filter",e,{evt:t}),!0})))return void(i&&t.cancelable&&t.preventDefault());s.handle&&!S(l,s.handle,a,!1)||this._prepareDragStart(t,o,r)}}},_prepareDragStart:function(t,e,a){var s,i=this,n=i.el,o=i.options,r=n.ownerDocument;if(a&&!J&&a.parentNode===n){var l=I(a);if(tt=n,Z=(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",s=function(){H("delayEnded",i,{evt:t}),Vt.eventCanceled?i._onDrop():(i._disableDelayedDragEvents(),!h&&i.nativeDraggable&&(J.draggable=!0),i._triggerDragStart(t,e),G({sortable:i,name:"choose",originalEvent:t}),T(J,o.chosenClass,!0))},o.ignore.split(",").forEach(function(t){L(J,t.trim(),Qt)}),C(r,"dragover",jt),C(r,"mousemove",jt),C(r,"touchmove",jt),C(r,"mouseup",i._onDrop),C(r,"touchend",i._onDrop),C(r,"touchcancel",i._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))s();else{if(Vt.eventCanceled)return void this._onDrop();C(r,"mouseup",i._disableDelayedDrag),C(r,"touchend",i._disableDelayedDrag),C(r,"touchcancel",i._disableDelayedDrag),C(r,"mousemove",i._delayedDragTouchMoveHandler),C(r,"touchmove",i._delayedDragTouchMoveHandler),o.supportPointer&&C(r,"pointermove",i._delayedDragTouchMoveHandler),i._dragStartTimer=setTimeout(s,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;D(t,"mouseup",this._disableDelayedDrag),D(t,"touchend",this._disableDelayedDrag),D(t,"touchcancel",this._disableDelayedDrag),D(t,"mousemove",this._delayedDragTouchMoveHandler),D(t,"touchmove",this._delayedDragTouchMoveHandler),D(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",Mt);var a=this.options;!t&&T(J,a.dragClass,!1),T(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,Rt();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);Ut()}},_onTouchMove:function(t){if(ut){var e=this.options,a=e.fallbackTolerance,s=e.fallbackOffset,i=t.touches?t.touches[0]:t,n=K&&k(K,!0),o=K&&n&&n.a,r=K&&n&&n.d,l=It&&_t&&$(_t),c=(i.clientX-ut.clientX+s.x)/(o||1)+(l?l[0]-Et[0]:0)/(o||1),d=(i.clientY-ut.clientY+s.y)/(r||1)+(l?l[1]-Et[1]:0)/(r||1);if(!Vt.active&&!yt){if(a&&Math.max(Math.abs(i.clientX-this._lastX),Math.abs(i.clientY-this._lastY))<a)return;this._onDragStart(t,!0)}if(K){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(K,"webkitTransform",u),E(K,"mozTransform",u),E(K,"msTransform",u),E(K,"transform",u),pt=c,ht=d,ft=i}t.cancelable&&t.preventDefault()}},_appendGhost:function(){if(!K){var t=this.options.fallbackOnBody?document.body:tt,e=I(J,!0,It,!0,t),a=this.options;if(It){for(_t=t;"static"===E(_t,"position")&&"none"===E(_t,"transform")&&_t!==document;)_t=_t.parentNode;_t!==document.body&&_t!==document.documentElement?(_t===document&&(_t=O()),e.top+=_t.scrollTop,e.left+=_t.scrollLeft):_t=O(),Et=$(_t)}T(K=J.cloneNode(!0),a.ghostClass,!1),T(K,a.fallbackClass,!0),T(K,a.dragClass,!0),E(K,"transition",""),E(K,"transform",""),E(K,"box-sizing","border-box"),E(K,"margin",0),E(K,"top",e.top),E(K,"left",e.left),E(K,"width",e.width),E(K,"height",e.height),E(K,"opacity","0.8"),E(K,"position",It?"absolute":"fixed"),E(K,"zIndex","100000"),E(K,"pointerEvents","none"),Vt.ghost=K,t.appendChild(K),E(K,"transform-origin",mt/parseInt(K.style.width)*100+"% "+vt/parseInt(K.style.height)*100+"%")}},_onDragStart:function(t,e){var a=this,s=t.dataTransfer,i=a.options;H("dragStart",this,{evt:t}),Vt.eventCanceled?this._onDrop():(H("setupClone",this),Vt.eventCanceled||((st=V(J)).draggable=!1,st.style["will-change"]="",this._hideClone(),T(st,this.options.chosenClass,!1),Vt.clone=st),a.cloneId=Xt(function(){H("clone",a),Vt.eventCanceled||(a.options.removeCloneOnHide||tt.insertBefore(st,J),a._hideClone(),G({sortable:a,name:"clone"}))}),!e&&T(J,i.dragClass,!0),e?(St=!0,a._loopId=setInterval(a._emulateDragOver,50)):(D(document,"mouseup",a._onDrop),D(document,"touchend",a._onDrop),D(document,"touchcancel",a._onDrop),s&&(s.effectAllowed="move",i.setData&&i.setData.call(a,s,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,s,i,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),U("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||(s=Z!==tt):dt===this||(this.lastPutMode=ct.checkPull(this,d,J,t))&&c.checkPut(this,d,J,t))){if(i="vertical"===this._getDirection(t,r),e=I(J),U("dragOverValid"),Vt.eventCanceled)return m;if(s)return Z=tt,j(),this._hideClone(),U("revert"),Vt.eventCanceled||(et?tt.insertBefore(J,et):tt.appendChild(J)),V(!0);var v=F(n,l.draggable);if(!v||function(t,e,a){var s=I(F(a.el,a.options.draggable));return e?t.clientX>s.right+10||t.clientX<=s.right&&t.clientY>s.bottom&&t.clientX>=s.left:t.clientX>s.right&&t.clientY>s.top||t.clientX<=s.right&&t.clientY>s.bottom+10}(t,i,this)&&!v.animated){if(v===J)return V(!1);if(v&&n===t.target&&(r=v),r&&(a=I(r)),!1!==Bt(tt,n,J,e,r,a,t,!!r))return j(),n.appendChild(J),Z=n,Q(),V(!0)}else if(v&&function(t,e,a){var s=I(P(a.el,0,a.options,!0));return e?t.clientX<s.left-10||t.clientY<s.top&&t.clientX<s.right:t.clientY<s.top-10||t.clientY<s.bottom&&t.clientX<s.left}(t,i,this)){var g=P(n,0,l,!0);if(g===J)return V(!1);if(a=I(r=g),!1!==Bt(tt,n,J,e,r,a,t,!1))return j(),n.insertBefore(J,g),Z=n,Q(),V(!0)}else if(r.parentNode===n){a=I(r);var b,C,D,_=J.parentNode!==n,y=!function(t,e,a){var s=a?t.left:t.top,i=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 s===o||i===r||s+n/2===o+l/2}(J.animated&&J.toRect||e,r.animated&&r.toRect||a,i),x=i?"top":"left",w=A(r,"top","top")||A(J,"top","top"),k=w?w.scrollTop:void 0;if(bt!==r&&(C=a[x],wt=!1,Tt=!y&&l.invertSwap||_),0!==(b=function(t,e,a,s,i,n,o,r){var l=s?t.clientY:t.clientX,c=s?a.height:a.width,d=s?a.top:a.left,u=s?a.bottom:a.right,f=!1;if(!o)if(r&&Dt<c*i){if(!wt&&(1===Ct?l>d+c*n/2:l<u-c*n/2)&&(wt=!0),wt)f=!0;else if(1===Ct?l<d+Dt:l>u-Dt)return-Ct}else if(l>d+c*(1-i)/2&&l<u-c*(1-i)/2)return function(t){return N(J)<N(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,i,y?1:l.swapThreshold,null==l.invertedSwapThreshold?l.swapThreshold:l.invertedSwapThreshold,Tt,bt===r))){var L=N(J);do{L-=b,D=Z.children[L]}while(D&&("none"===E(D,"display")||D===K))}if(0===b||D===r)return V(!1);bt=r,Ct=b;var O=r.nextElementSibling,$=!1,R=Bt(tt,n,J,e,r,a,t,$=1===b);if(!1!==R)return 1!==R&&-1!==R||($=1===R),kt=!0,setTimeout(Yt,30),j(),$&&!O?n.appendChild(J):r.parentNode.insertBefore(J,$?O:r),w&&M(w,0,k-w.scrollTop),Z=J.parentNode,void 0===C||Tt||(Dt=Math.abs(C-I(r)[x])),Q(),V(!0)}if(n.contains(J))return V(!1)}return!1}function U(l,c){H(l,h,o({evt:t,isOwner:u,axis:i?"vertical":"horizontal",revert:s,dragRect:e,targetRect:a,canSort:f,fromSortable:p,target:r,completed:V,onMove:function(a,s){return Bt(tt,n,J,e,a,I(a),t,s)},changed:Q},c))}function j(){U("dragOverAnimationCapture"),h.captureAnimationState(),h!==p&&p.captureAnimationState()}function V(e){return U("dragOverCompleted",{insertion:e}),e&&(u?d._hideClone():d._showClone(h),h!==p&&(T(J,dt?dt.options.ghostClass:d.options.ghostClass,!1),T(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(){U("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&&jt(t)),!l.dragoverBubble&&t.stopPropagation&&t.stopPropagation(),m=!0}function Q(){ot=N(J),lt=N(J,l.draggable),G({sortable:h,name:"change",toEl:n,newIndex:ot,newDraggableIndex:lt,originalEvent:t})}},_ignoreWhileAnimating:null,_offMoveEvents:function(){D(document,"mousemove",this._onTouchMove),D(document,"touchmove",this._onTouchMove),D(document,"pointermove",this._onTouchMove),D(document,"dragover",jt),D(document,"mousemove",jt),D(document,"touchmove",jt)},_offUpEvents:function(){var t=this.el.ownerDocument;D(t,"mouseup",this._onDrop),D(t,"touchend",this._onDrop),D(t,"pointerup",this._onDrop),D(t,"touchcancel",this._onDrop),D(document,"selectstart",this)},_onDrop:function(t){var e=this.el,a=this.options;ot=N(J),lt=N(J,a.draggable),H("drop",this,{evt:t}),Z=J&&J.parentNode,ot=N(J),lt=N(J,a.draggable),Vt.eventCanceled?this._nulling():(yt=!1,Tt=!1,wt=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),qt(this.cloneId),qt(this._dragStartId),this.nativeDraggable&&(D(document,"drop",this),D(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()),K&&K.parentNode&&K.parentNode.removeChild(K),(tt===Z||dt&&"clone"!==dt.lastPutMode)&&st&&st.parentNode&&st.parentNode.removeChild(st),J&&(this.nativeDraggable&&D(J,"dragend",this),Qt(J),J.style["will-change"]="",gt&&!yt&&T(J,dt?dt.options.ghostClass:this.options.ghostClass,!1),T(J,this.options.chosenClass,!1),G({sortable:this,name:"unchoose",toEl:Z,newIndex:null,newDraggableIndex:null,originalEvent:t}),tt!==Z?(ot>=0&&(G({rootEl:Z,name:"add",toEl:Z,fromEl:tt,originalEvent:t}),G({sortable:this,name:"remove",toEl:Z,originalEvent:t}),G({rootEl:Z,name:"sort",toEl:Z,fromEl:tt,originalEvent:t}),G({sortable:this,name:"sort",toEl:Z,originalEvent:t})),dt&&dt.save()):ot!==nt&&ot>=0&&(G({sortable:this,name:"update",toEl:Z,originalEvent:t}),G({sortable:this,name:"sort",toEl:Z,originalEvent:t})),Vt.active&&(null!=ot&&-1!==ot||(ot=nt,lt=rt),G({sortable:this,name:"end",toEl:Z,originalEvent:t}),this.save()))),this._nulling())},_nulling:function(){H("nulling",this),tt=J=Z=K=et=st=at=it=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,s=0,i=a.length,n=this.options;s<i;s++)S(t=a[s],n.draggable,this.el,!1)&&e.push(t.getAttribute(n.dataIdAttr)||zt(t));return e},sort:function(t,e){var a={},s=this.el;this.toArray().forEach(function(t,e){var i=s.children[e];S(i,this.options.draggable,s,!1)&&(a[t]=i)},this),e&&this.captureAnimationState(),t.forEach(function(t){a[t]&&(s.removeChild(a[t]),s.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 s=X.modifyOption(this,t,e);a[t]=void 0!==s?s:e,"group"===t&&$t(a)},destroy:function(){H("destroy",this);var t=this.el;t[B]=null,D(t,"mousedown",this._onTapStart),D(t,"touchstart",this._onTapStart),D(t,"pointerdown",this._onTapStart),this.nativeDraggable&&(D(t,"dragover",this),D(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(!it){if(H("hideClone",this),Vt.eventCanceled)return;E(st,"display","none"),this.options.removeCloneOnHide&&st.parentNode&&st.parentNode.removeChild(st),it=!0}},_showClone:function(t){if("clone"===t.lastPutMode){if(it){if(H("showClone",this),Vt.eventCanceled)return;J.parentNode!=tt||this.options.group.revertClone?et?tt.insertBefore(st,et):tt.appendChild(st):tt.insertBefore(st,J),this.options.group.revertClone&&this.animate(J,st),E(st,"display",""),it=!1}}else this._hideClone()}},Ot&&C(document,"touchmove",function(t){(Vt.active||yt)&&t.cancelable&&t.preventDefault()}),Vt.utils={on:C,off:D,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:j,closest:S,toggleClass:T,clone:V,index:N,nextTick:Xt,cancelNextTick:qt,detectDirection:Nt,getChild:P},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,Zt,Kt,te=[],ee=!1;function ae(){te.forEach(function(t){clearInterval(t.pid)}),te=[]}function se(){clearInterval(Kt)}var ie=j(function(t,e,a,s){if(e.scroll){var i,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,i=e.scrollFn,!0===Wt&&(Wt=R(a,!0)));var u=0,f=Wt;do{var p=f,h=I(p),m=h.top,v=h.bottom,g=h.left,b=h.right,C=h.width,D=h.height,_=void 0,y=void 0,S=p.scrollWidth,x=p.scrollHeight,w=E(p),T=p.scrollLeft,k=p.scrollTop;p===c?(_=C<S&&("auto"===w.overflowX||"scroll"===w.overflowX||"visible"===w.overflowX),y=D<x&&("auto"===w.overflowY||"scroll"===w.overflowY||"visible"===w.overflowY)):(_=C<S&&("auto"===w.overflowX||"scroll"===w.overflowX),y=D<x&&("auto"===w.overflowY||"scroll"===w.overflowY));var L=_&&(Math.abs(b-n)<=r&&T+C<S)-(Math.abs(g-n)<=r&&!!T),A=y&&(Math.abs(v-o)<=r&&k+D<x)-(Math.abs(m-o)<=r&&!!k);if(!te[u])for(var P=0;P<=u;P++)te[P]||(te[P]={});te[u].vx==L&&te[u].vy==A&&te[u].el===p||(te[u].el=p,te[u].vx=L,te[u].vy=A,clearInterval(te[u].pid),0==L&&0==A||(d=!0,te[u].pid=setInterval(function(){s&&0===this.layer&&Vt.active._onTouchMove(Zt);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 i&&"continue"!==i.call(Vt.dragged.parentNode[B],a,e,t,Zt,te[this.layer].el)||M(te[this.layer].el,a,e)}.bind({layer:u}),24))),u++}while(e.bubbleScroll&&f!==c&&(f=R(f,!1)));ee=d}},30),ne=function(t){var e=t.originalEvent,a=t.putSortable,s=t.dragEl,i=t.activeSortable,n=t.dispatchSortableEvent,o=t.hideGhostForTarget,r=t.unhideGhostForTarget;if(e){var l=a||i;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:s,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 s=P(this.sortable.el,this.startIndex,this.options);s?this.sortable.el.insertBefore(e,s):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?D(document,"dragover",this._handleAutoScroll):(D(document,"pointermove",this._handleFallbackAutoScroll),D(document,"touchmove",this._handleFallbackAutoScroll),D(document,"mousemove",this._handleFallbackAutoScroll)),se(),ae(),clearTimeout(x),x=void 0},nulling:function(){Zt=Ht=Wt=ee=Kt=Gt=Jt=null,te.length=0},_handleFallbackAutoScroll:function(t){this._handleAutoScroll(t,!0)},_handleAutoScroll:function(t,e){var a=this,s=(t.touches?t.touches[0]:t).clientX,i=(t.touches?t.touches[0]:t).clientY,n=document.elementFromPoint(s,i);if(Zt=t,e||this.options.forceAutoScrollFallback||p||f||m){ie(t,this.options,n,e);var o=R(n,!0);!ee||Kt&&s===Gt&&i===Jt||(Kt&&se(),Kt=setInterval(function(){var n=R(document.elementFromPoint(s,i),!0);n!==o&&(o=n,ae()),ie(t,a.options,n,e)},10),Gt=s,Jt=i)}else{if(!this.options.bubbleScroll||R(n,!0)===O())return void ae();ie(t,this.options,R(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(i()(this.value))},set:function(t){this.$emit("input",[].concat(i()(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},xI3S:function(t,e){},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 s=0;s<a.length;s++)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]}else if(a instanceof Object)for(var i in e.length>0&&(e={}),a)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]}},z4be:function(t,e){},zFNX:function(t,e){},zpvg:function(t,e){}});
|