2 lines
136 KiB
JavaScript
2 lines
136 KiB
JavaScript
webpackJsonp([2],{"0atm":function(e,t){},"1HYy":function(e,t){},"38Oc":function(e,t){},CyIs:function(e,t){},DREW:function(e,t){},SldL:function(e,t){!function(t){"use strict";var a,l=Object.prototype,i=l.hasOwnProperty,s="function"==typeof Symbol?Symbol:{},o=s.iterator||"@@iterator",r=s.asyncIterator||"@@asyncIterator",n=s.toStringTag||"@@toStringTag",c="object"==typeof e,u=t.regeneratorRuntime;if(u)c&&(e.exports=u);else{(u=t.regeneratorRuntime=c?e.exports:{}).wrap=F;var d="suspendedStart",m="suspendedYield",p="executing",f="completed",v={},h={};h[o]=function(){return this};var g=Object.getPrototypeOf,b=g&&g(g(D([])));b&&b!==l&&i.call(b,o)&&(h=b);var y=x.prototype=_.prototype=Object.create(h);C.prototype=y.constructor=x,x.constructor=C,x[n]=C.displayName="GeneratorFunction",u.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===C||"GeneratorFunction"===(t.displayName||t.name))},u.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,x):(e.__proto__=x,n in e||(e[n]="GeneratorFunction")),e.prototype=Object.create(y),e},u.awrap=function(e){return{__await:e}},T(I.prototype),I.prototype[r]=function(){return this},u.AsyncIterator=I,u.async=function(e,t,a,l){var i=new I(F(e,t,a,l));return u.isGeneratorFunction(t)?i:i.next().then(function(e){return e.done?e.value:i.next()})},T(y),y[n]="Generator",y[o]=function(){return this},y.toString=function(){return"[object Generator]"},u.keys=function(e){var t=[];for(var a in e)t.push(a);return t.reverse(),function a(){for(;t.length;){var l=t.pop();if(l in e)return a.value=l,a.done=!1,a}return a.done=!0,a}},u.values=D,P.prototype={constructor:P,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=a,this.done=!1,this.delegate=null,this.method="next",this.arg=a,this.tryEntries.forEach($),!e)for(var t in this)"t"===t.charAt(0)&&i.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=a)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function l(l,i){return r.type="throw",r.arg=e,t.next=l,i&&(t.method="next",t.arg=a),!!i}for(var s=this.tryEntries.length-1;s>=0;--s){var o=this.tryEntries[s],r=o.completion;if("root"===o.tryLoc)return l("end");if(o.tryLoc<=this.prev){var n=i.call(o,"catchLoc"),c=i.call(o,"finallyLoc");if(n&&c){if(this.prev<o.catchLoc)return l(o.catchLoc,!0);if(this.prev<o.finallyLoc)return l(o.finallyLoc)}else if(n){if(this.prev<o.catchLoc)return l(o.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return l(o.finallyLoc)}}}},abrupt:function(e,t){for(var a=this.tryEntries.length-1;a>=0;--a){var l=this.tryEntries[a];if(l.tryLoc<=this.prev&&i.call(l,"finallyLoc")&&this.prev<l.finallyLoc){var s=l;break}}s&&("break"===e||"continue"===e)&&s.tryLoc<=t&&t<=s.finallyLoc&&(s=null);var o=s?s.completion:{};return o.type=e,o.arg=t,s?(this.method="next",this.next=s.finallyLoc,v):this.complete(o)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),v},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var a=this.tryEntries[t];if(a.finallyLoc===e)return this.complete(a.completion,a.afterLoc),$(a),v}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var a=this.tryEntries[t];if(a.tryLoc===e){var l=a.completion;if("throw"===l.type){var i=l.arg;$(a)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,l){return this.delegate={iterator:D(e),resultName:t,nextLoc:l},"next"===this.method&&(this.arg=a),v}}}function F(e,t,a,l){var i=t&&t.prototype instanceof _?t:_,s=Object.create(i.prototype),o=new P(l||[]);return s._invoke=function(e,t,a){var l=d;return function(i,s){if(l===p)throw new Error("Generator is already running");if(l===f){if("throw"===i)throw s;return L()}for(a.method=i,a.arg=s;;){var o=a.delegate;if(o){var r=k(o,a);if(r){if(r===v)continue;return r}}if("next"===a.method)a.sent=a._sent=a.arg;else if("throw"===a.method){if(l===d)throw l=f,a.arg;a.dispatchException(a.arg)}else"return"===a.method&&a.abrupt("return",a.arg);l=p;var n=w(e,t,a);if("normal"===n.type){if(l=a.done?f:m,n.arg===v)continue;return{value:n.arg,done:a.done}}"throw"===n.type&&(l=f,a.method="throw",a.arg=n.arg)}}}(e,a,o),s}function w(e,t,a){try{return{type:"normal",arg:e.call(t,a)}}catch(e){return{type:"throw",arg:e}}}function _(){}function C(){}function x(){}function T(e){["next","throw","return"].forEach(function(t){e[t]=function(e){return this._invoke(t,e)}})}function I(e){var t;this._invoke=function(a,l){function s(){return new Promise(function(t,s){!function t(a,l,s,o){var r=w(e[a],e,l);if("throw"!==r.type){var n=r.arg,c=n.value;return c&&"object"==typeof c&&i.call(c,"__await")?Promise.resolve(c.__await).then(function(e){t("next",e,s,o)},function(e){t("throw",e,s,o)}):Promise.resolve(c).then(function(e){n.value=e,s(n)},o)}o(r.arg)}(a,l,t,s)})}return t=t?t.then(s,s):s()}}function k(e,t){var l=e.iterator[t.method];if(l===a){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=a,k(e,t),"throw"===t.method))return v;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return v}var i=w(l,e.iterator,t.arg);if("throw"===i.type)return t.method="throw",t.arg=i.arg,t.delegate=null,v;var s=i.arg;return s?s.done?(t[e.resultName]=s.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=a),t.delegate=null,v):s:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,v)}function S(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function $(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function P(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(S,this),this.reset(!0)}function D(e){if(e){var t=e[o];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var l=-1,s=function t(){for(;++l<e.length;)if(i.call(e,l))return t.value=e[l],t.done=!1,t;return t.value=a,t.done=!0,t};return s.next=s}}return{next:L}}function L(){return{value:a,done:!0}}}(function(){return this}()||Function("return this")())},Vnx8:function(e,t){},Xxa5:function(e,t,a){e.exports=a("jyFz")},exGp:function(e,t,a){"use strict";t.__esModule=!0;var l,i=a("//Fk"),s=(l=i)&&l.__esModule?l:{default:l};t.default=function(e){return function(){var t=e.apply(this,arguments);return new s.default(function(e,a){return function l(i,o){try{var r=t[i](o),n=r.value}catch(e){return void a(e)}if(!r.done)return s.default.resolve(n).then(function(e){l("next",e)},function(e){l("throw",e)});e(n)}("next")})}}},gy1J:function(e,t,a){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var l=a("mvHQ"),i=a.n(l),s={data:function(){return{loading:!1,devPersonChartByCaseNum:{id:"devPersonChartByCaseNum",title_text:"开发用例统计",trigger:"axis",legend:[],grid:{},xAxis:{name:"",type:"category",data:[]},yAxis:{},series:{name:"",color:"#8DBC39",type:"bar",data:[]}},funcStatisticChartByCaseNum:{id:"funcStatisticChartByCaseNum",title_text:"项目用例统计",trigger:"axis",legend:[],grid:{},xAxis:{name:"",type:"category",data:[]},yAxis:{},series:{name:"",color:"#4285F4",type:"bar",data:[]}},funcStatisticChartByExceStatus:{id:"funcStatisticChartByExceStatus",title_text:"计划用例统计",trigger:"item",legend:[],xAxis:{name:"",type:"category",data:[]},yAxis:{},series:{name:"",color:"#85C0D9",type:"bar",data:[]}},funcStatisticChartByTestPlan:{id:"funcStatisticChartByTestPlan",title_text:"计划执行情况",trigger:"item",legend:[],grid:{left:"80",top:"80",right:"0",bottom:"0",containLabel:!0},xAxis:{type:"value",splitLine:{show:!1},axisLabel:{show:!1},axisTick:{show:!1},axisLine:{show:!1},data:[]},yAxis:{type:"category",axisTick:{show:!1},axisLine:{show:!1},axisLabel:{color:"black",fontSize:14},data:[]},series:[{name:"",type:"bar",barWidth:19,data:[],color:"#0505F5",label:{show:!0,position:"right",formatter:"{c}%",color:"black",fontSize:12},itemStyle:{normal:{barBorderRadius:10}},zlevel:1},{name:"",type:"bar",barGap:"-100%",barWidth:19,data:[],color:"#FFFFFF",itemStyle:{normal:{barBorderRadius:10}}}]},colorList:["#4285F4","#EA4335","#FBBC05","#34A853","#85C0D9","#043269","#78C31C","#916B86","#202124","#00818D","#F5EDA7"]}},mounted:function(){var e=this;setTimeout(function(){e.loading=!1,e.drawAllCharts()},500)},beforeCreate:function(){},created:function(){this.loading=!0,this.getAllTestItemCaseNum(),this.getAllTestPlanExecCondition(),this.getAllDevPersonCaseNum()},methods:{getAllDevPersonCaseNum:function(){var e=this,t=[],a=[];this.$api.userrelation.queryAllDevPersonCaseNum().then(function(l){l.data.data.forEach(function(e){t.push(e.nick),a.push(e.caseNum)}),e.devPersonChartByCaseNum.xAxis.data=JSON.parse(i()(t)),e.devPersonChartByCaseNum.series.data=JSON.parse(i()(a))}).catch(function(){})},getAllTestPlanExecCondition:function(){var e=this;this.$api.planrelation.queryAllTestPlanExecCondition().then(function(t){var a=t.data.data,l=[],s=[],o=[],r=[],n=[];a.length>5&&(a=a.splice(0,5)),a.forEach(function(e){var t=e.planName;l.push(t),t.length>15&&(t=t.substring(0,5)+"..."+t.substring(t.length-9)),s.push(t),o.push(e.execScale),n.push(e.caseCount),r.push(100)}),e.funcStatisticChartByTestPlan.yAxis.data=JSON.parse(i()(s)),e.funcStatisticChartByTestPlan.series[0].data=JSON.parse(i()(o)),e.funcStatisticChartByTestPlan.series[1].data=JSON.parse(i()(r)),e.funcStatisticChartByExceStatus.xAxis.data=l,e.funcStatisticChartByExceStatus.series.data=n}).catch(function(){})},getAllTestItemCaseNum:function(){var e=this,t=[],a=[];this.$api.test.queryAllTestItemCaseNum().then(function(l){l.data.data.forEach(function(e){t.push(e.itemName),a.push(e.caseNum)}),e.funcStatisticChartByCaseNum.xAxis.data=JSON.parse(i()(t)),e.funcStatisticChartByCaseNum.series.data=JSON.parse(i()(a))}).catch(function(){})},drawAllCharts:function(){try{var e=this.$echarts.init(document.getElementById(this.funcStatisticChartByCaseNum.id));this.setOptionChart(e,this.funcStatisticChartByCaseNum);var t=this.$echarts.init(document.getElementById(this.funcStatisticChartByExceStatus.id));this.setOptionChart(t,this.funcStatisticChartByExceStatus);var a=this.$echarts.init(document.getElementById(this.funcStatisticChartByTestPlan.id));this.setProgressOptionChart(a,this.funcStatisticChartByTestPlan);var l=this.$echarts.init(document.getElementById(this.devPersonChartByCaseNum.id));this.setOptionChart(l,this.devPersonChartByCaseNum),window.onresize=function(){e.resize(),t.resize(),a.resize(),l.resize()}}catch(e){}},setOptionChart:function(e,t){e.showLoading({text:"loading..."}),e.hideLoading(),e.setOption({dataZoom:[{height:24,type:"slider",show:!0,xAxisIndex:[0],start:0,end:100,bottom:5}],title:{text:t.title_text},tooltip:{trigger:t.trigger},itemStyle:{shadowBlur:200,shadowOffsetX:0,shadowOffsetY:0,shadowColor:"rgba(0, 0, 0, 0.5)"},legend:{orient:"horizontal",data:t.legend},xAxis:t.xAxis,yAxis:t.yAxis,series:t.series})},setProgressOptionChart:function(e,t){e.showLoading({text:"loading..."}),e.hideLoading(),e.setOption({dataZoom:[{height:24,type:"slider",show:!0,xAxisIndex:[0],start:0,end:100,bottom:5}],title:{text:t.title_text},tooltip:{show:!0,formatter:function(e){return e.name}},itemStyle:{shadowBlur:200,shadowOffsetX:0,shadowOffsetY:0,shadowColor:"rgba(0, 0, 0, 0.5)"},legend:{orient:"horizontal",data:t.legend},xAxis:t.xAxis,yAxis:t.yAxis,series:t.series})}}},o={render:function(){var e=this.$createElement,t=this._self._c||e;return t("div",{directives:[{name:"loading",rawName:"v-loading",value:this.loading,expression:"loading"}],staticClass:"function-statistic-box"},[t("el-row",{attrs:{gutter:20}},[t("el-col",{attrs:{span:24}},[t("div",{staticClass:"grid-content bg-purple",attrs:{id:"funcStatisticChartByCaseNum"}})])],1),this._v(" "),t("el-row",{attrs:{gutter:20}},[t("el-col",{attrs:{span:24}},[t("div",{staticClass:"grid-content bg-purple",attrs:{id:"funcStatisticChartByExceStatus"}})])],1),this._v(" "),t("el-row",{attrs:{gutter:20}},[t("el-col",{attrs:{span:24}},[t("div",{staticClass:"grid-content bg-purple",attrs:{id:"funcStatisticChartByTestPlan"}})])],1),this._v(" "),t("el-row",{attrs:{gutter:20}},[t("el-col",{attrs:{span:24}},[t("div",{staticClass:"grid-content bg-purple",attrs:{id:"devPersonChartByCaseNum"}})])],1)],1)},staticRenderFns:[]};var r=a("VU/8")(s,o,!1,function(e){a("Vnx8")},"data-v-75dbade1",null).exports,n={data:function(){return{loading:!1,publicItemId:"",caseSourceValue:"1",fileType:["xmind"],add_value:!1,planOptions:[],joinPlanForm:{planId:""},importForm:{itemId:"",versionId:""},editForm:{},detailForm:{},queryInfo:{pageNum:1,pageSize:10,itemId:"",testMode:"",testCaseTitle:"",testCaseLevel:"",testCaseStatus:"",writePerson:"",versionId:"",frontDevelopment:"",serverDevelopment:""},testCaseList:[],currpage:1,total:0,importDialogVisible:!1,addDialogVisible:!1,editDialogVisible:!1,detailDialogVisible:!1,joinPlanDialogVisible:!1,multipleSelection:[],caseTypeOptions:[],caseLevelOptions:[],caseStatusOptions:[],versionOptions:[],itemOptions:[],addForm:{itemId:"",testMode:"",testCaseType:"",testCaseLevel:"",testCaseTitle:"",testCaseStatus:"",writePerson:"",precondition:"",testStep:"",expectResult:"",sheetName:"",comments:"",versionId:"",frontDevelopment:"",serverDevelopment:""},addFormRules:{itemId:[{required:!0,message:"请选择测试项目",trigger:"blur"}],versionId:[{required:!0,message:"请选择版本号",trigger:"blur"}],testMode:[{required:!0,message:"请输入测试模块名称",trigger:"blur"},{min:1,max:255,message:"长度在 1 到 255 个字符",trigger:"blur"}],testCaseType:[{required:!0,message:"请选择用例类型",trigger:"blur"}],testCaseLevel:[{required:!0,message:"请选择用例等级",trigger:"blur"}],testCaseStatus:[{required:!0,message:"请选择用例等级",trigger:"blur"}],testCaseTitle:[{required:!0,message:"请输入用例标题",trigger:"blur"},{min:1,max:255,message:"长度在 1 到 255 个字符",trigger:"blur"}],precondition:[{required:!1,message:"请输入前置条件",trigger:"blur"}],testStep:[{required:!1,message:"请输入测试步骤",trigger:"blur"}],expectResult:[{required:!1,message:"请输入预期结果",trigger:"blur"}],writePerson:[{required:!1,message:"请输入编写者姓名",trigger:"blur"}],comments:[{required:!1,message:"请输入备注信息",trigger:"blur"}],frontDevelopment:[{required:!1,message:"请输入前端开发人员",trigger:"blur"}],serverDevelopment:[{required:!1,message:"请输入后端开发人员",trigger:"blur"}]},joinPlanFormRules:{planId:[{required:!0,message:"请选择测试计划",trigger:"blur"}]},importFormRules:{itemId:[{required:!0,message:"请选择测试项目",trigger:"blur"}],versionId:[{required:!0,message:"请选择版本号",trigger:"blur"}]}}},watch:{},components:{UploadFile:a("hx1z").a},mounted:function(){this.getItemNameList(),this.getCaseTypeAndCaseStatusAndCaseLevel()},created:function(){this.getFunctionTestCaseList()},methods:{resetAllVersionId:function(){this.queryInfo.versionId="",this.importForm.versionId="",this.addForm.versionId="",this.versionOptions=[]},showImportDialog:function(){this.versionOptions=[],this.importDialogVisible=!0},showAddDialog:function(){this.versionOptions=[],this.addDialogVisible=!0},changeItemName:function(e){var t=this;e?this.$api.version.queryVersionObjByItemId(e).then(function(e){t.resetAllVersionId(),t.versionOptions=e.data.data}).catch(function(){}):this.versionOptions=[]},selectFunctionTestCaseList:function(){this.queryInfo.pageNum=1,this.total=0,this.getFunctionTestCaseList()},uploadSuccessStartImport:function(e){var t=this,a={fileName:e,operatorPerson:JSON.parse(localStorage.getItem("userInfo")).nick,versionId:this.importForm.versionId};this.$api.test.importFunctionTestCaseByXmind(i()(a)).then(function(a){t.$notify({type:"success",message:a.data.msg}),t.loading=!1,t.getFunctionTestCaseList(),t.$api.comm.deleteFile(e)}).catch(function(){t.loading=!1}),this.cancelImportDialogVisible()},getCaseTypeAndCaseStatusAndCaseLevel:function(){var e=this;this.$api.dict.queryAllDataDict().then(function(t){e.caseTypeOptions=t.data.data.caseType,e.caseLevelOptions=t.data.data.caseLevel,e.caseStatusOptions=t.data.data.caseStatus}).catch(function(){})},getPlanNameList:function(){var e=this;this.$api.plan.queryAllPlanName().then(function(t){var a=t.data.data;e.planOptions=a.filter(function(e){return"2"!=e.status})}).catch(function(){})},joinTestPlanDialogVisible:function(){0!=this.multipleSelection.length?(this.getPlanNameList(),this.joinPlanDialogVisible=!0):this.$notify({type:"warning",message:"请勾选加入计划的用例"})},cancleJoinPlanDialogVisible:function(){this.joinPlanDialogVisible=!1},joinTestPlan:function(){var e=this;this.$refs.joinPlanFormRef.validate(function(t){if(t){var a={};if("1"==e.caseSourceValue){var l=[];e.multipleSelection.forEach(function(t){var a={};a.caseId=t.id,a.planId=e.joinPlanForm.planId,l.push(a)}),a={caseSourceValue:e.caseSourceValue,testPlanRelations:l}}else{var s={pageNum:"",pageSize:"",testMode:e.queryInfo.testMode,testCaseTitle:e.queryInfo.testCaseTitle,itemId:e.queryInfo.itemId,testCaseLevel:e.queryInfo.testCaseLevel,testCaseStatus:e.queryInfo.testCaseStatus,writePerson:e.queryInfo.writePerson,versionId:e.queryInfo.versionId};a={planId:e.joinPlanForm.planId,caseSourceValue:e.caseSourceValue,functionTest:s}}e.loading=!0,e.joinPlanDialogVisible=!1,e.$api.planrelation.caseJoinTestPlan(i()(a)).then(function(t){e.$notify({type:"success",message:t.data.msg}),e.loading=!1,e.$refs.joinPlanFormRef.resetFields()}).catch(function(){e.loading=!1})}})},updateTestCaseStatus:function(e){var t=this,a=e;a.updateTime=(new Date).getTime(),this.$api.test.updateFunctionTestCaseStatus(a).then(function(e){t.$notify({type:"success",message:e.data.msg}),t.selectFunctionTestCaseList()}).catch(function(){})},cancelImportDialogVisible:function(){this.importDialogVisible=!1,this.$refs.uploadFile.cancel(),this.$refs.importCaseFormRef.resetFields(),this.resetAllVersionId()},importFunctionTestCase:function(){var e=this;this.$refs.importCaseFormRef.validate(function(t){t&&e.$refs.uploadFile.uploadSectionFile()})},batchExportFunctionTestCase:function(){var e=this;0!=this.multipleSelection.length?(this.loading=!0,this.$api.test.batchExportFunctionTestCaseToExcel(i()(this.multipleSelection)).then(function(t){e.loading=!1,e.$notify({type:"success",message:t.data.msg}),e.$common.downloadFiles(t.data.data.fileName),e.$api.comm.deleteFile(t.data.data.fileName)}).catch(function(){e.loading=!1})):this.$notify({type:"warning",message:"请勾选需要导出的用例"})},exportAllFunctionTestCase:function(){var e=this;this.loading=!0;var t=this.queryInfo;t.pageNum=0,this.$api.test.exportAllFunctionTestCaseToExcel(i()(t)).then(function(t){e.loading=!1,200==t.data.code?(e.$notify({type:"success",message:t.data.msg}),e.$common.downloadFiles(t.data.data.fileName),e.$api.comm.deleteFile(t.data.data.fileName)):e.$notify({type:"error",message:t.data.msg})}).catch(function(){e.loading=!1})},batchDelFunctionTestCase:function(){var e=this;if(0==this.multipleSelection.length)this.$notify({type:"warning",message:"请勾选需要删除的用例"});else{var t=this.multipleSelection;this.loading=!0,this.$confirm("确定删除吗?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(function(){e.$api.test.batchDeleteFunctionTestCase(i()(t)).then(function(t){e.loading=!1,e.$notify({type:"success",message:t.data.msg}),e.selectFunctionTestCaseList()}).catch(function(){e.loading=!1})}).catch(function(){e.loading=!1})}},handleSelectionChange:function(e){this.multipleSelection=e},addFunctionTestCase:function(){var e=this;this.$refs.addFormRef.validate(function(t){if(t){e.addForm.createTime=(new Date).getTime();var a=JSON.parse(localStorage.getItem("userInfo")).nick;e.addForm.writePerson=""==e.addForm.writePerson?a:e.addForm.writePerson,e.addForm.sheetName=e.addForm.testMode,e.$api.test.addFunctionTestCase(i()(e.addForm)).then(function(t){e.$notify({message:t.data.msg,type:"success"}),e.addDialogVisible=!1,e.selectFunctionTestCaseList(),e.$refs.addFormRef.resetFields(),e.loading=!1}).catch(function(){e.loading=!1})}})},cancelAddDialogVisible:function(){this.addDialogVisible=!1,this.$refs.addFormRef.resetFields()},cancelEditDialogVisible:function(){this.editDialogVisible=!1,this.$refs.editFormRef.resetFields()},cancelDetailDialogVisible:function(){this.detailDialogVisible=!1,this.$refs.detailFormRef.resetFields()},showDetailDialog:function(e){var t=this;this.loading=!0,this.$api.test.queryFunctionTestCaseById(e).then(function(e){var a=e.data.data;t.detailForm=a,t.$api.version.queryVersionObjByItemId(a.itemId).then(function(e){t.versionOptions=e.data.data,t.loading=!1,t.detailDialogVisible=!0})}).catch(function(){t.loading=!1})},showEditDialog:function(e){var t=this;this.loading=!0,this.$api.test.queryFunctionTestCaseById(e).then(function(e){var a=e.data.data;t.editForm=a,t.$api.version.queryVersionObjByItemId(a.itemId).then(function(e){t.versionOptions=e.data.data,t.loading=!1,t.editDialogVisible=!0})}).catch(function(){t.loading=!1})},editFunctionTestCase:function(){var e=this;this.$refs.editFormRef.validate(function(t){t&&(e.editForm.updateTime=(new Date).getTime(),e.$api.test.editFunctionTestCase(i()(e.editForm)).then(function(t){e.$notify({message:t.data.msg,type:"success"}),e.editDialogVisible=!1,e.selectFunctionTestCaseList()}).catch(function(){}))})},delFunctionTestCase:function(e){var t=this;this.$confirm("确定删除吗?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(function(){t.$api.test.delFunctionTestCaseById(e).then(function(e){t.$notify({type:"success",message:e.data.msg}),t.loading=!1,t.selectFunctionTestCaseList()}).catch(function(){t.loading=!1})}).catch(function(){})},getItemNameList:function(){var e=this;this.$api.item.queryAllItemIdAndItemName(this.queryInfo.itemName).then(function(t){e.itemOptions=t.data.data}).catch(function(){e.loading=!1})},getFunctionTestCaseList:function(){var e=this;this.loading=!0,this.$api.test.queryAllFunctionTestCase(i()(this.queryInfo)).then(function(t){e.testCaseList=t.data.data,e.total=t.data.count,e.loading=!1}).catch(function(){e.loading=!0})},handleSizeChange:function(e){this.queryInfo.pageSize=e,this.getFunctionTestCaseList()},handleCurrentChange:function(e){this.queryInfo.pageNum=e,this.getFunctionTestCaseList()},getRowKeys:function(e){return e.id}}},c={render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"function-list-box"},[a("el-form",{staticClass:"demo-form-inline",attrs:{inline:!0}},[a("el-form-item",{attrs:{label:"项目名称"}},[a("el-select",{attrs:{placeholder:"请选择",clearable:""},on:{change:e.changeItemName},model:{value:e.queryInfo.itemId,callback:function(t){e.$set(e.queryInfo,"itemId",t)},expression:"queryInfo.itemId"}},e._l(e.itemOptions,function(e){return a("el-option",{key:e.id,attrs:{label:e.itemName,value:e.id}})}),1)],1),e._v(" "),a("el-form-item",{attrs:{label:"模块名称"}},[a("el-input",{staticClass:"input-with-select",attrs:{placeholder:"请输入测试模块名称",clearable:""},model:{value:e.queryInfo.testMode,callback:function(t){e.$set(e.queryInfo,"testMode",t)},expression:"queryInfo.testMode"}})],1),e._v(" "),a("el-form-item",{attrs:{label:"用例标题"}},[a("el-input",{staticClass:"input-with-select",attrs:{placeholder:"请输入用例标题",clearable:""},model:{value:e.queryInfo.testCaseTitle,callback:function(t){e.$set(e.queryInfo,"testCaseTitle",t)},expression:"queryInfo.testCaseTitle"}})],1),e._v(" "),a("el-form-item",{attrs:{label:"编写者"}},[a("el-input",{staticClass:"input-with-select",attrs:{placeholder:"请输入编写人员",clearable:""},model:{value:e.queryInfo.writePerson,callback:function(t){e.$set(e.queryInfo,"writePerson",t)},expression:"queryInfo.writePerson"}})],1),e._v(" "),a("el-form-item",{attrs:{label:"用例等级"}},[a("el-select",{attrs:{placeholder:"请选择",clearable:""},model:{value:e.queryInfo.testCaseLevel,callback:function(t){e.$set(e.queryInfo,"testCaseLevel",t)},expression:"queryInfo.testCaseLevel"}},e._l(e.caseLevelOptions,function(e){return a("el-option",{key:e.id,attrs:{label:e.dictValue,value:e.dictValue}})}),1)],1),e._v(" "),a("el-form-item",{attrs:{label:"用例状态"}},[a("el-select",{attrs:{placeholder:"请选择",clearable:""},model:{value:e.queryInfo.testCaseStatus,callback:function(t){e.$set(e.queryInfo,"testCaseStatus",t)},expression:"queryInfo.testCaseStatus"}},e._l(e.caseStatusOptions,function(e){return a("el-option",{key:e.id,attrs:{label:e.dictValue,value:e.dictValue}})}),1)],1),e._v(" "),a("el-form-item",{attrs:{label:"用例版本"}},[a("el-select",{attrs:{placeholder:"请选择",clearable:""},model:{value:e.queryInfo.versionId,callback:function(t){e.$set(e.queryInfo,"versionId",t)},expression:"queryInfo.versionId"}},e._l(e.versionOptions,function(e){return a("el-option",{key:e.id,attrs:{label:e.versionName,value:e.id}})}),1)],1),e._v(" "),a("el-form-item",{attrs:{label:"前端开发"}},[a("el-input",{staticClass:"input-with-select",attrs:{placeholder:"请输入前端开发人员",clearable:""},model:{value:e.queryInfo.frontDevelopment,callback:function(t){e.$set(e.queryInfo,"frontDevelopment",t)},expression:"queryInfo.frontDevelopment"}})],1),e._v(" "),a("el-form-item",{attrs:{label:"后端开发"}},[a("el-input",{staticClass:"input-with-select",attrs:{placeholder:"请输入后端开发人员",clearable:""},model:{value:e.queryInfo.serverDevelopment,callback:function(t){e.$set(e.queryInfo,"serverDevelopment",t)},expression:"queryInfo.serverDevelopment"}})],1),e._v(" "),a("el-form-item",[a("el-button",{attrs:{type:"primary"},on:{click:e.selectFunctionTestCaseList}},[e._v("查询")])],1)],1),e._v(" "),a("el-row",{staticClass:"add_button"},[a("el-col",[a("el-button",{attrs:{type:"primary"},on:{click:e.showAddDialog}},[e._v("添加")]),e._v(" "),a("el-button",{attrs:{type:"primary"},on:{click:e.showImportDialog}},[e._v("导入")]),e._v(" "),a("el-button",{attrs:{type:"primary"},on:{click:e.batchExportFunctionTestCase}},[e._v("批量导出")]),e._v(" "),a("el-button",{attrs:{type:"primary"},on:{click:e.exportAllFunctionTestCase}},[e._v("全部导出")]),e._v(" "),a("el-button",{attrs:{type:"primary"},on:{click:e.batchDelFunctionTestCase}},[e._v("批量删除")]),e._v(" "),a("el-button",{attrs:{type:"primary"},on:{click:e.joinTestPlanDialogVisible}},[e._v("加入计划")])],1)],1),e._v(" "),a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"}],ref:"multipleTable",attrs:{"tooltip-effect":"dark",data:e.testCaseList.slice((e.currpage-1)*e.queryInfo.pageSize,e.currpage*e.queryInfo.pageSize),"default-sort":{prop:"createTime",order:"descending"},border:"",fit:!0,"row-key":e.getRowKeys},on:{"selection-change":e.handleSelectionChange}},[a("el-table-column",{attrs:{"reserve-selection":!0,type:"selection",width:"55",align:"center"}}),e._v(" "),a("el-table-column",{attrs:{"reserve-selection":!0,label:"序号",type:"index",align:"center",width:"50"}}),e._v(" "),a("el-table-column",{attrs:{"reserve-selection":!0,label:"项目名称",prop:"itemId",width:"150","show-overflow-tooltip":"",sortable:""}}),e._v(" "),a("el-table-column",{attrs:{"reserve-selection":!0,label:"模块名称",prop:"testMode",width:"150","show-overflow-tooltip":"",sortable:""}}),e._v(" "),a("el-table-column",{attrs:{"reserve-selection":!0,label:"用例类型",prop:"testCaseType"}}),e._v(" "),a("el-table-column",{attrs:{"reserve-selection":!0,label:"等级",prop:"testCaseLevel",sortable:""}}),e._v(" "),a("el-table-column",{attrs:{"reserve-selection":!0,label:"用例状态",prop:"testCaseStatus",width:"120"},scopedSlots:e._u([{key:"default",fn:function(t){return["通过"==t.row.testCaseStatus?a("span",{staticClass:"color-passed"},[a("el-select",{staticClass:"select-test-result",attrs:{placeholder:"请选择",clearable:""},on:{change:function(a){return e.updateTestCaseStatus(t.row)}},model:{value:t.row.testCaseStatus,callback:function(a){e.$set(t.row,"testCaseStatus",a)},expression:"scope.row.testCaseStatus"}},e._l(e.caseStatusOptions,function(e){return a("el-option",{key:e.id,attrs:{label:e.dictValue,value:e.dictValue}})}),1)],1):"未通过"==t.row.testCaseStatus?a("span",{staticClass:"color-noPassed"},[a("el-select",{staticClass:"select-test-result",attrs:{placeholder:"请选择",clearable:""},on:{change:function(a){return e.updateTestCaseStatus(t.row)}},model:{value:t.row.testCaseStatus,callback:function(a){e.$set(t.row,"testCaseStatus",a)},expression:"scope.row.testCaseStatus"}},e._l(e.caseStatusOptions,function(e){return a("el-option",{key:e.id,attrs:{label:e.dictValue,value:e.dictValue}})}),1)],1):"评审中"==t.row.testCaseStatus?a("span",{staticClass:"color-reviewing"},[a("el-select",{staticClass:"select-test-result",attrs:{placeholder:"请选择",clearable:""},on:{change:function(a){return e.updateTestCaseStatus(t.row)}},model:{value:t.row.testCaseStatus,callback:function(a){e.$set(t.row,"testCaseStatus",a)},expression:"scope.row.testCaseStatus"}},e._l(e.caseStatusOptions,function(e){return a("el-option",{key:e.id,attrs:{label:e.dictValue,value:e.dictValue}})}),1)],1):"废弃"==t.row.testCaseStatus?a("span",{staticClass:"color-discard"},[a("el-select",{staticClass:"select-test-result",attrs:{placeholder:"请选择",clearable:""},on:{change:function(a){return e.updateTestCaseStatus(t.row)}},model:{value:t.row.testCaseStatus,callback:function(a){e.$set(t.row,"testCaseStatus",a)},expression:"scope.row.testCaseStatus"}},e._l(e.caseStatusOptions,function(e){return a("el-option",{key:e.id,attrs:{label:e.dictValue,value:e.dictValue}})}),1)],1):a("span",[a("el-select",{attrs:{placeholder:"请选择",clearable:""},on:{change:function(a){return e.updateTestCaseStatus(t.row)}},model:{value:t.row.testCaseStatus,callback:function(a){e.$set(t.row,"testCaseStatus",a)},expression:"scope.row.testCaseStatus"}},e._l(e.caseStatusOptions,function(e){return a("el-option",{key:e.id,attrs:{label:e.dictValue,value:e.dictValue}})}),1)],1)]}}])}),e._v(" "),a("el-table-column",{attrs:{"reserve-selection":!0,label:"用例标题",prop:"testCaseTitle",width:"200","show-overflow-tooltip":"",sortable:""}}),e._v(" "),a("el-table-column",{attrs:{"reserve-selection":!0,label:"前置条件",prop:"precondition",width:"200","show-overflow-tooltip":""}}),e._v(" "),a("el-table-column",{attrs:{"reserve-selection":!0,label:"测试步骤",prop:"testStep",width:"200","show-overflow-tooltip":""}}),e._v(" "),a("el-table-column",{attrs:{"reserve-selection":!0,label:"期望结果",prop:"expectResult",width:"200","show-overflow-tooltip":""}}),e._v(" "),a("el-table-column",{attrs:{"reserve-selection":!0,label:"编写者",prop:"writePerson"}}),e._v(" "),a("el-table-column",{attrs:{"reserve-selection":!0,label:"创建时间",prop:"createTime",width:"160"}}),e._v(" "),a("el-table-column",{attrs:{"reserve-selection":!0,label:"更新时间",prop:"updateTime",width:"160"}}),e._v(" "),a("el-table-column",{attrs:{"reserve-selection":!0,label:"前端开发",prop:"frontDevelopment",width:"160","show-overflow-tooltip":""}}),e._v(" "),a("el-table-column",{attrs:{"reserve-selection":!0,label:"后端开发",prop:"serverDevelopment",width:"160","show-overflow-tooltip":""}}),e._v(" "),a("el-table-column",{attrs:{"reserve-selection":!0,label:"备注",prop:"comments",width:"250","show-overflow-tooltip":""}}),e._v(" "),a("el-table-column",{attrs:{label:"操作",fixed:"right",width:"180",align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("el-button",{attrs:{type:"text",size:"small"},on:{click:function(a){return e.showDetailDialog(t.row.id)}}},[e._v("查看")]),e._v(" "),a("el-button",{attrs:{type:"text",size:"small"},on:{click:function(a){return e.showEditDialog(t.row.id)}}},[e._v("编辑")]),e._v(" "),a("el-button",{attrs:{type:"text",size:"small"},on:{click:function(a){return e.delFunctionTestCase(t.row.id)}}},[e._v("删除")])]}}])})],1),e._v(" "),a("el-pagination",{attrs:{"page-sizes":[5,10,20,30],"page-size":e.queryInfo.pageSize,layout:"total, sizes, prev, pager, next, jumper",total:e.total},on:{"size-change":e.handleSizeChange,"current-change":e.handleCurrentChange}}),e._v(" "),a("el-dialog",{attrs:{title:"添加用例",visible:e.addDialogVisible,"close-on-click-modal":!1,width:"60%"},on:{"update:visible":function(t){e.addDialogVisible=t},close:e.cancelAddDialogVisible}},[a("div",{staticClass:"case-info-form"},[a("el-form",{ref:"addFormRef",attrs:{model:e.addForm,rules:e.addFormRules,"label-width":"100px"}},[a("el-row",{attrs:{gutter:20}},[a("el-col",{attrs:{span:8}},[a("el-form-item",{attrs:{label:"项目名称",prop:"itemId"}},[a("el-select",{attrs:{placeholder:"请选择"},on:{change:e.changeItemName},model:{value:e.addForm.itemId,callback:function(t){e.$set(e.addForm,"itemId",t)},expression:"addForm.itemId"}},e._l(e.itemOptions,function(e){return a("el-option",{key:e.id,attrs:{label:e.itemName,value:e.id+""}})}),1)],1)],1),e._v(" "),a("el-col",{attrs:{span:8}},[a("el-form-item",{attrs:{label:"版本号",prop:"versionId"}},[a("el-select",{attrs:{placeholder:"请选择"},model:{value:e.addForm.versionId,callback:function(t){e.$set(e.addForm,"versionId",t)},expression:"addForm.versionId"}},e._l(e.versionOptions,function(e){return a("el-option",{key:e.id,attrs:{label:e.versionName,value:e.id}})}),1)],1)],1),e._v(" "),a("el-col",{attrs:{span:8}},[a("el-form-item",{attrs:{label:"用例类型",prop:"testCaseType"}},[a("el-select",{attrs:{placeholder:"请选择"},model:{value:e.addForm.testCaseType,callback:function(t){e.$set(e.addForm,"testCaseType",t)},expression:"addForm.testCaseType"}},e._l(e.caseTypeOptions,function(e){return a("el-option",{key:e.id,attrs:{label:e.dictValue,value:e.dictValue}})}),1)],1)],1)],1),e._v(" "),a("el-row",{attrs:{gutter:20}},[a("el-col",{attrs:{span:8}},[a("el-form-item",{attrs:{label:"用例等级",prop:"testCaseLevel"}},[a("el-select",{attrs:{placeholder:"请选择"},model:{value:e.addForm.testCaseLevel,callback:function(t){e.$set(e.addForm,"testCaseLevel",t)},expression:"addForm.testCaseLevel"}},e._l(e.caseLevelOptions,function(e){return a("el-option",{key:e.id,attrs:{label:e.dictValue,value:e.dictValue}})}),1)],1)],1),e._v(" "),a("el-col",{attrs:{span:8}},[a("el-form-item",{attrs:{label:"用例状态",prop:"testCaseStatus"}},[a("el-select",{attrs:{placeholder:"请选择"},model:{value:e.addForm.testCaseStatus,callback:function(t){e.$set(e.addForm,"testCaseStatus",t)},expression:"addForm.testCaseStatus"}},e._l(e.caseStatusOptions,function(e){return a("el-option",{key:e.id,attrs:{label:e.dictValue,value:e.dictValue}})}),1)],1)],1),e._v(" "),a("el-col",{attrs:{span:8}},[a("el-form-item",{attrs:{label:"测试模块",prop:"testMode"}},[a("el-input",{attrs:{placeholder:"请输入测试模块名称"},model:{value:e.addForm.testMode,callback:function(t){e.$set(e.addForm,"testMode",t)},expression:"addForm.testMode"}})],1)],1)],1),e._v(" "),a("el-row",{attrs:{gutter:20}},[a("el-col",{attrs:{span:24}},[a("el-form-item",{attrs:{label:"用例标题",prop:"testCaseTitle"}},[a("el-input",{attrs:{placeholder:"请输入用例标题"},model:{value:e.addForm.testCaseTitle,callback:function(t){e.$set(e.addForm,"testCaseTitle",t)},expression:"addForm.testCaseTitle"}})],1)],1)],1),e._v(" "),a("el-row",{attrs:{gutter:20}},[a("el-col",{attrs:{span:24}},[a("el-form-item",{attrs:{label:"前置条件",prop:"precondition"}},[a("el-input",{attrs:{type:"textarea",rows:5,placeholder:"请输入前置条件"},model:{value:e.addForm.precondition,callback:function(t){e.$set(e.addForm,"precondition",t)},expression:"addForm.precondition"}})],1)],1)],1),e._v(" "),a("el-row",{attrs:{gutter:20}},[a("el-col",{attrs:{span:24}},[a("el-form-item",{attrs:{label:"测试步骤",prop:"testStep"}},[a("el-input",{attrs:{type:"textarea",rows:5,placeholder:"请输入测试步骤"},model:{value:e.addForm.testStep,callback:function(t){e.$set(e.addForm,"testStep",t)},expression:"addForm.testStep"}})],1)],1)],1),e._v(" "),a("el-row",{attrs:{gutter:20}},[a("el-col",{attrs:{span:24}},[a("el-form-item",{attrs:{label:"预期结果",prop:"expectResult"}},[a("el-input",{attrs:{type:"textarea",rows:5,placeholder:"请输入预期结果"},model:{value:e.addForm.expectResult,callback:function(t){e.$set(e.addForm,"expectResult",t)},expression:"addForm.expectResult"}})],1)],1)],1),e._v(" "),a("el-row",{attrs:{gutter:20}},[a("el-col",{attrs:{span:12}},[a("el-form-item",{attrs:{label:"前端开发",prop:"frontDevelopment"}},[a("el-input",{attrs:{placeholder:"移动端必须加前缀标识(Android/Ios)"},model:{value:e.addForm.frontDevelopment,callback:function(t){e.$set(e.addForm,"frontDevelopment",t)},expression:"addForm.frontDevelopment"}})],1)],1),e._v(" "),a("el-col",{attrs:{span:12}},[a("el-form-item",{attrs:{label:"后端开发",prop:"serverDevelopment"}},[a("el-input",{attrs:{placeholder:"请输入后端开发人员"},model:{value:e.addForm.serverDevelopment,callback:function(t){e.$set(e.addForm,"serverDevelopment",t)},expression:"addForm.serverDevelopment"}})],1)],1)],1),e._v(" "),a("el-row",{attrs:{gutter:20}},[a("el-col",{attrs:{span:24}},[a("el-form-item",{attrs:{label:"备注",prop:"comments"}},[a("el-input",{attrs:{type:"textarea",rows:5,placeholder:"请输入备注信息"},model:{value:e.addForm.comments,callback:function(t){e.$set(e.addForm,"comments",t)},expression:"addForm.comments"}})],1)],1)],1)],1)],1),e._v(" "),a("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("el-button",{on:{click:e.cancelAddDialogVisible}},[e._v("取 消")]),e._v(" "),a("el-button",{attrs:{type:"primary"},on:{click:e.addFunctionTestCase}},[e._v("确 定")])],1)]),e._v(" "),a("el-dialog",{attrs:{title:"修改用例",visible:e.editDialogVisible,"close-on-click-modal":!1,width:"60%"},on:{"update:visible":function(t){e.editDialogVisible=t},close:e.cancelEditDialogVisible}},[a("div",{staticClass:"case-info-form"},[a("el-form",{ref:"editFormRef",attrs:{model:e.editForm,rules:e.addFormRules,"label-width":"100px"}},[a("el-row",{attrs:{gutter:20}},[a("el-col",{attrs:{span:8}},[a("el-form-item",{attrs:{label:"项目名称",prop:"itemId"}},[a("el-select",{attrs:{placeholder:"请选择"},on:{change:e.changeItemName},model:{value:e.editForm.itemId,callback:function(t){e.$set(e.editForm,"itemId",t)},expression:"editForm.itemId"}},e._l(e.itemOptions,function(e){return a("el-option",{key:e.id,attrs:{label:e.itemName,value:e.id+""}})}),1)],1)],1),e._v(" "),a("el-col",{attrs:{span:8}},[a("el-form-item",{attrs:{label:"版本号",prop:"versionId"}},[a("el-select",{attrs:{placeholder:"请选择"},model:{value:e.editForm.versionId,callback:function(t){e.$set(e.editForm,"versionId",t)},expression:"editForm.versionId"}},e._l(e.versionOptions,function(e){return a("el-option",{key:e.id,attrs:{label:e.versionName,value:e.id+""}})}),1)],1)],1),e._v(" "),a("el-col",{attrs:{span:8}},[a("el-form-item",{attrs:{label:"用例类型",prop:"testCaseType"}},[a("el-select",{attrs:{placeholder:"请选择"},model:{value:e.editForm.testCaseType,callback:function(t){e.$set(e.editForm,"testCaseType",t)},expression:"editForm.testCaseType"}},e._l(e.caseTypeOptions,function(e){return a("el-option",{key:e.id,attrs:{label:e.dictValue,value:e.dictValue}})}),1)],1)],1)],1),e._v(" "),a("el-row",{attrs:{gutter:20}},[a("el-col",{attrs:{span:8}},[a("el-form-item",{attrs:{label:"用例等级",prop:"testCaseLevel"}},[a("el-select",{attrs:{placeholder:"请选择"},model:{value:e.editForm.testCaseLevel,callback:function(t){e.$set(e.editForm,"testCaseLevel",t)},expression:"editForm.testCaseLevel"}},e._l(e.caseLevelOptions,function(e){return a("el-option",{key:e.id,attrs:{label:e.dictValue,value:e.dictValue}})}),1)],1)],1),e._v(" "),a("el-col",{attrs:{span:8}},[a("el-form-item",{attrs:{label:"用例状态",prop:"testCaseStatus"}},[a("el-select",{attrs:{placeholder:"请选择",clearable:""},model:{value:e.editForm.testCaseStatus,callback:function(t){e.$set(e.editForm,"testCaseStatus",t)},expression:"editForm.testCaseStatus"}},e._l(e.caseStatusOptions,function(e){return a("el-option",{key:e.id,attrs:{label:e.dictValue,value:e.dictValue}})}),1)],1)],1),e._v(" "),a("el-col",{attrs:{span:8}},[a("el-form-item",{attrs:{label:"测试模块",prop:"testMode"}},[a("el-input",{attrs:{placeholder:"请输入测试模块名称"},model:{value:e.editForm.testMode,callback:function(t){e.$set(e.editForm,"testMode",t)},expression:"editForm.testMode"}})],1)],1)],1),e._v(" "),a("el-row",{attrs:{gutter:20}},[a("el-col",{attrs:{span:24}},[a("el-form-item",{attrs:{label:"用例标题",prop:"testCaseTitle"}},[a("el-input",{attrs:{placeholder:"请输入用例标题"},model:{value:e.editForm.testCaseTitle,callback:function(t){e.$set(e.editForm,"testCaseTitle",t)},expression:"editForm.testCaseTitle"}})],1)],1)],1),e._v(" "),a("el-row",{attrs:{gutter:20}},[a("el-col",{attrs:{span:24}},[a("el-form-item",{attrs:{label:"前置条件",prop:"precondition"}},[a("el-input",{attrs:{type:"textarea",rows:5,placeholder:"请输入前置条件"},model:{value:e.editForm.precondition,callback:function(t){e.$set(e.editForm,"precondition",t)},expression:"editForm.precondition"}})],1)],1)],1),e._v(" "),a("el-row",{attrs:{gutter:20}},[a("el-col",{attrs:{span:24}},[a("el-form-item",{attrs:{label:"测试步骤",prop:"testStep"}},[a("el-input",{attrs:{type:"textarea",rows:5,placeholder:"请输入测试步骤"},model:{value:e.editForm.testStep,callback:function(t){e.$set(e.editForm,"testStep",t)},expression:"editForm.testStep"}})],1)],1)],1),e._v(" "),a("el-row",{attrs:{gutter:20}},[a("el-col",{attrs:{span:24}},[a("el-form-item",{attrs:{label:"预期结果",prop:"expectResult"}},[a("el-input",{attrs:{type:"textarea",rows:5,placeholder:"请输入预期结果"},model:{value:e.editForm.expectResult,callback:function(t){e.$set(e.editForm,"expectResult",t)},expression:"editForm.expectResult"}})],1)],1)],1),e._v(" "),a("el-row",{attrs:{gutter:20}},[a("el-col",{attrs:{span:24}},[a("el-form-item",{attrs:{label:"编写者",prop:"writePerson"}},[a("el-input",{attrs:{placeholder:"请输入编写人员"},model:{value:e.editForm.writePerson,callback:function(t){e.$set(e.editForm,"writePerson",t)},expression:"editForm.writePerson"}})],1)],1)],1),e._v(" "),a("el-row",{attrs:{gutter:20}},[a("el-col",{attrs:{span:12}},[a("el-form-item",{attrs:{label:"前端开发",prop:"frontDevelopment"}},[a("el-input",{attrs:{placeholder:"移动端必须加前缀标识(Android/Ios)"},model:{value:e.editForm.frontDevelopment,callback:function(t){e.$set(e.editForm,"frontDevelopment",t)},expression:"editForm.frontDevelopment"}})],1)],1),e._v(" "),a("el-col",{attrs:{span:12}},[a("el-form-item",{attrs:{label:"后端开发",prop:"serverDevelopment"}},[a("el-input",{attrs:{placeholder:"请输入后端开发人员"},model:{value:e.editForm.serverDevelopment,callback:function(t){e.$set(e.editForm,"serverDevelopment",t)},expression:"editForm.serverDevelopment"}})],1)],1)],1),e._v(" "),a("el-row",{attrs:{gutter:20}},[a("el-col",{attrs:{span:24}},[a("el-form-item",{attrs:{label:"备注",prop:"comments"}},[a("el-input",{attrs:{type:"textarea",rows:5,placeholder:"请输入备注信息"},model:{value:e.editForm.comments,callback:function(t){e.$set(e.editForm,"comments",t)},expression:"editForm.comments"}})],1)],1)],1)],1)],1),e._v(" "),a("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("el-button",{on:{click:e.cancelEditDialogVisible}},[e._v("取 消")]),e._v(" "),a("el-button",{attrs:{type:"primary"},on:{click:e.editFunctionTestCase}},[e._v("确 定")])],1)]),e._v(" "),a("el-dialog",{attrs:{title:"查看用例",visible:e.detailDialogVisible,"close-on-click-modal":!1,width:"60%"},on:{"update:visible":function(t){e.detailDialogVisible=t},close:e.cancelDetailDialogVisible}},[a("div",{staticClass:"case-info-form"},[a("el-form",{ref:"detailFormRef",attrs:{model:e.detailForm,"label-width":"100px"}},[a("el-row",{attrs:{gutter:20}},[a("el-col",{attrs:{span:8}},[a("el-form-item",{attrs:{label:"项目名称",prop:"itemId"}},[a("el-select",{attrs:{disabled:""},model:{value:e.detailForm.itemId,callback:function(t){e.$set(e.detailForm,"itemId",t)},expression:"detailForm.itemId"}},e._l(e.itemOptions,function(e){return a("el-option",{key:e.id,attrs:{label:e.itemName,value:e.id+""}})}),1)],1)],1),e._v(" "),a("el-col",{attrs:{span:8}},[a("el-form-item",{attrs:{label:"版本号",prop:"versionId"}},[a("el-select",{attrs:{disabled:""},model:{value:e.detailForm.versionId,callback:function(t){e.$set(e.detailForm,"versionId",t)},expression:"detailForm.versionId"}},e._l(e.versionOptions,function(e){return a("el-option",{key:e.id,attrs:{label:e.versionName,value:e.id+""}})}),1)],1)],1),e._v(" "),a("el-col",{attrs:{span:8}},[a("el-form-item",{attrs:{label:"用例类型",prop:"testCaseType"}},[a("el-select",{attrs:{disabled:""},model:{value:e.detailForm.testCaseType,callback:function(t){e.$set(e.detailForm,"testCaseType",t)},expression:"detailForm.testCaseType"}},e._l(e.caseTypeOptions,function(e){return a("el-option",{key:e.id,attrs:{label:e.dictValue,value:e.dictValue}})}),1)],1)],1)],1),e._v(" "),a("el-row",{attrs:{gutter:20}},[a("el-col",{attrs:{span:8}},[a("el-form-item",{attrs:{label:"用例等级",prop:"testCaseLevel"}},[a("el-select",{attrs:{disabled:""},model:{value:e.detailForm.testCaseLevel,callback:function(t){e.$set(e.detailForm,"testCaseLevel",t)},expression:"detailForm.testCaseLevel"}},e._l(e.caseLevelOptions,function(e){return a("el-option",{key:e.id,attrs:{label:e.dictValue,value:e.dictValue}})}),1)],1)],1),e._v(" "),a("el-col",{attrs:{span:8}},[a("el-form-item",{attrs:{label:"用例状态",prop:"testCaseStatus"}},[a("el-select",{attrs:{disabled:""},model:{value:e.detailForm.testCaseStatus,callback:function(t){e.$set(e.detailForm,"testCaseStatus",t)},expression:"detailForm.testCaseStatus"}},e._l(e.caseStatusOptions,function(e){return a("el-option",{key:e.id,attrs:{label:e.dictValue,value:e.dictValue}})}),1)],1)],1),e._v(" "),a("el-col",{attrs:{span:8}},[a("el-form-item",{attrs:{label:"测试模块",prop:"testMode"}},[a("el-input",{attrs:{disabled:""},model:{value:e.detailForm.testMode,callback:function(t){e.$set(e.detailForm,"testMode",t)},expression:"detailForm.testMode"}})],1)],1)],1),e._v(" "),a("el-row",{attrs:{gutter:20}},[a("el-col",{attrs:{span:24}},[a("el-form-item",{attrs:{label:"用例标题",prop:"testCaseTitle"}},[a("el-input",{attrs:{disabled:""},model:{value:e.detailForm.testCaseTitle,callback:function(t){e.$set(e.detailForm,"testCaseTitle",t)},expression:"detailForm.testCaseTitle"}})],1)],1)],1),e._v(" "),a("el-row",{attrs:{gutter:20}},[a("el-col",{attrs:{span:24}},[a("el-form-item",{attrs:{label:"前置条件",prop:"precondition"}},[a("el-input",{attrs:{type:"textarea",rows:5,disabled:""},model:{value:e.detailForm.precondition,callback:function(t){e.$set(e.detailForm,"precondition",t)},expression:"detailForm.precondition"}})],1)],1)],1),e._v(" "),a("el-row",{attrs:{gutter:20}},[a("el-col",{attrs:{span:24}},[a("el-form-item",{attrs:{label:"测试步骤",prop:"testStep"}},[a("el-input",{attrs:{type:"textarea",rows:5,disabled:""},model:{value:e.detailForm.testStep,callback:function(t){e.$set(e.detailForm,"testStep",t)},expression:"detailForm.testStep"}})],1)],1)],1),e._v(" "),a("el-row",{attrs:{gutter:20}},[a("el-col",{attrs:{span:24}},[a("el-form-item",{attrs:{label:"预期结果",prop:"expectResult"}},[a("el-input",{attrs:{type:"textarea",rows:5,disabled:""},model:{value:e.detailForm.expectResult,callback:function(t){e.$set(e.detailForm,"expectResult",t)},expression:"detailForm.expectResult"}})],1)],1)],1),e._v(" "),a("el-row",{attrs:{gutter:20}},[a("el-col",{attrs:{span:24}},[a("el-form-item",{attrs:{label:"编写者",prop:"writePerson"}},[a("el-input",{attrs:{disabled:""},model:{value:e.detailForm.writePerson,callback:function(t){e.$set(e.detailForm,"writePerson",t)},expression:"detailForm.writePerson"}})],1)],1)],1),e._v(" "),a("el-row",{attrs:{gutter:20}},[a("el-col",{attrs:{span:12}},[a("el-form-item",{attrs:{label:"前端开发",prop:"frontDevelopment"}},[a("el-input",{attrs:{disabled:""},model:{value:e.detailForm.frontDevelopment,callback:function(t){e.$set(e.detailForm,"frontDevelopment",t)},expression:"detailForm.frontDevelopment"}})],1)],1),e._v(" "),a("el-col",{attrs:{span:12}},[a("el-form-item",{attrs:{label:"后端开发",prop:"serverDevelopment"}},[a("el-input",{attrs:{disabled:""},model:{value:e.detailForm.serverDevelopment,callback:function(t){e.$set(e.detailForm,"serverDevelopment",t)},expression:"detailForm.serverDevelopment"}})],1)],1)],1),e._v(" "),a("el-row",{attrs:{gutter:20}},[a("el-col",{attrs:{span:24}},[a("el-form-item",{attrs:{label:"备注",prop:"comments"}},[a("el-input",{attrs:{type:"textarea",rows:5,disabled:""},model:{value:e.detailForm.comments,callback:function(t){e.$set(e.detailForm,"comments",t)},expression:"detailForm.comments"}})],1)],1)],1)],1)],1),e._v(" "),a("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("el-button",{on:{click:e.cancelDetailDialogVisible}},[e._v("取 消")])],1)]),e._v(" "),a("el-dialog",{attrs:{title:"导入用例",visible:e.importDialogVisible,width:"30%"},on:{"update:visible":function(t){e.importDialogVisible=t},close:e.cancelImportDialogVisible}},[a("el-form",{ref:"importCaseFormRef",attrs:{model:e.importForm,rules:e.importFormRules,"label-width":"100px"}},[a("el-row",{attrs:{gutter:20}},[a("el-col",{attrs:{span:12}},[a("el-form-item",{attrs:{label:"项目名称",prop:"itemId"}},[a("el-select",{attrs:{placeholder:"请选择"},on:{change:e.changeItemName},model:{value:e.importForm.itemId,callback:function(t){e.$set(e.importForm,"itemId",t)},expression:"importForm.itemId"}},e._l(e.itemOptions,function(e){return a("el-option",{key:e.id,attrs:{label:e.itemName,value:e.id+""}})}),1)],1)],1),e._v(" "),a("el-col",{attrs:{span:12}},[a("el-form-item",{attrs:{label:"版本号",prop:"versionId"}},[a("el-select",{attrs:{placeholder:"请选择"},model:{value:e.importForm.versionId,callback:function(t){e.$set(e.importForm,"versionId",t)},expression:"importForm.versionId"}},e._l(e.versionOptions,function(e){return a("el-option",{key:e.id,attrs:{label:e.versionName,value:e.id+""}})}),1)],1)],1),e._v(" "),a("el-col",{attrs:{span:6}}),e._v(" "),a("el-col",{attrs:{span:18}},[a("upload-file",{ref:"uploadFile",attrs:{fileType:e.fileType},on:{"upload-file-event":e.uploadSuccessStartImport}})],1)],1)],1),e._v(" "),a("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("el-button",{on:{click:e.cancelImportDialogVisible}},[e._v("取 消")]),e._v(" "),a("el-button",{attrs:{type:"primary"},on:{click:e.importFunctionTestCase}},[e._v("确 定")])],1)],1),e._v(" "),a("el-dialog",{attrs:{title:"加入计划",visible:e.joinPlanDialogVisible,width:"30%"},on:{"update:visible":function(t){e.joinPlanDialogVisible=t},close:e.cancleJoinPlanDialogVisible}},[a("el-form",{ref:"joinPlanFormRef",staticClass:"demo-form-inline",attrs:{model:e.joinPlanForm,rules:e.joinPlanFormRules,"label-width":"100px"}},[a("el-form-item",{attrs:{label:"计划名称",prop:"planId"}},[a("el-select",{attrs:{placeholder:"请选择",clearable:""},model:{value:e.joinPlanForm.planId,callback:function(t){e.$set(e.joinPlanForm,"planId",t)},expression:"joinPlanForm.planId"}},e._l(e.planOptions,function(e){return a("el-option",{key:e.id,attrs:{label:e.planName,value:e.id+""}})}),1)],1),e._v(" "),a("el-form-item",{attrs:{label:"用例来源"}},[[a("el-radio",{attrs:{label:"1"},model:{value:e.caseSourceValue,callback:function(t){e.caseSourceValue=t},expression:"caseSourceValue"}},[e._v("当前选择")]),e._v(" "),a("el-radio",{attrs:{label:"2"},model:{value:e.caseSourceValue,callback:function(t){e.caseSourceValue=t},expression:"caseSourceValue"}},[e._v("当前所有")])]],2)],1),e._v(" "),a("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("el-button",{on:{click:e.cancleJoinPlanDialogVisible}},[e._v("取 消")]),e._v(" "),a("el-button",{attrs:{type:"primary"},on:{click:e.joinTestPlan}},[e._v("确 定")])],1)],1)],1)},staticRenderFns:[]};var u=a("VU/8")(n,c,!1,function(e){a("0atm")},"data-v-80503544",null).exports,d=a("Xxa5"),m=a.n(d),p=a("exGp"),f=a.n(p),v=a("bOdI"),h=a.n(v),g={data:function(){return{fileList:[],imgIdList:[],divIdList:[],uploadFileList:[],fileRealNameList:[],defaultUploadPath:"files/uploads/"}},created:function(){var e=this;window.addEventListener("beforeunload",function(t){return e.refreshBrowse(t)})},mounted:function(){this.patseEvent()},destroyed:function(){var e=this;window.removeEventListener("beforeunload",function(t){return e.refreshBrowse(t)})},methods:{consoleAllList:function(){console.log("----------start----------"),console.log("imgIdList",this.imgIdList),console.log("divIdList",this.divIdList),console.log("fileList",this.fileList),console.log("uploadFileList",this.uploadFileList),console.log("fileRealNameList",this.fileRealNameList),console.log("----------end----------")},refreshBrowse:function(e){this.deleteuploadSectionFile()},deleteVirtualDom:function(){for(var e=document.getElementById("attachmentImgList");e.firstChild;)e.removeChild(e.firstChild);for(var t=document.getElementById("attachmentFileList");t.firstChild;)t.removeChild(t.firstChild)},bindClickEventToDel:function(e,t,a){var l=this;document.querySelector("."+t).addEventListener("click",function(){for(var i=0,s=0,o=0;o<l.fileList.length;o++)l.fileList[o]==a&&(s=i),i++;l.fileList.splice(s,1);var r=l.fileRealNameList.splice(s,1)[0];l.$api.comm.deleteFile(r.split("/")[2]);var n=document.getElementById("father_"+t);"img"==e?document.getElementById("attachmentImgList").removeChild(n):document.getElementById("attachmentFileList").removeChild(n)})},fileChange:function(e,t){this.uploadFileList=t,this.judgeFileType(e.raw),this.uploadFileList=[]},clearAllList:function(){this.fileList=[],this.imgIdList=[],this.divIdList=[],this.uploadFileList=[],this.fileRealNameList=[]},addImgToImgList:function(e){var t=document.getElementById("attachmentImgList"),a=document.createElement("div");a.className="middle-father-img-div";var l=document.createElement("img"),i="attachmentImg_"+(this.imgIdList.length+1);l.id=i,l.className="attachment-img",a.id="father_"+i,a.appendChild(l);var s=document.createElement("span");s.className="attachment-del "+i,s.innerHTML="x",a.appendChild(s),t.appendChild(a);var o=new FileReader;o.onloadend=function(){document.querySelector("#"+i).src=o.result},o.readAsDataURL(e),this.imgIdList.push(i),this.fileList.push(e.name),this.uploadSectionFile(e),this.bindClickEventToDel("img",i,e.name)},addFileToDivList:function(e){var t=document.getElementById("attachmentFileList"),a=document.createElement("div");a.className="middle-father-file-div";var l=document.createElement("div"),i="attachmentDiv_"+(this.divIdList.length+1);l.id=i,l.innerHTML=e.name,l.className="attachment-div",a.id="father_"+i,a.appendChild(l);var s=document.createElement("span");s.className="attachment-del "+i,s.innerHTML="x",a.appendChild(s),t.appendChild(a),this.divIdList.push(i),this.fileList.push(e.name),this.uploadSectionFile(e),this.bindClickEventToDel("div",i,e.name)},judgeFileType:function(e){"image"==e.type.split("/")[0]?this.addImgToImgList(e):this.addFileToDivList(e)},patseEvent:function(){var e=this;document.querySelector("#attachmentImgSelectText").addEventListener("paste",function(t,a){var l=t.clipboardData.files[0];e.judgeFileType(l)}),document.getElementById("attachmentBrowse").addEventListener("click",function(){document.getElementById("uploadFileSelect").click()})},uploadSectionFile:function(e){var t=this,a=new FormData;e.row?a.append("file",e.raw):a.append("file",e),a.append("filename",e.name),this.$api.comm.uploadFile(a).then(function(e){200==e.data.code?t.fileRealNameList.push(t.defaultUploadPath+e.data.data.fileName):t.$notify({type:"error",message:"上传失败"})})},deleteuploadSectionFile:function(){var e=this;this.fileRealNameList.length>0&&this.fileRealNameList.forEach(function(t){e.$api.comm.deleteFile(t.split("/")[2])});this.deleteVirtualDom(),this.clearAllList()},getFileNameList:function(){return this.fileList},getFileRealNameList:function(){return this.fileRealNameList}}},b={render:function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticClass:"function-test-planlist-attachment-box"},[this._m(0),this._v(" "),this._m(1),this._v(" "),t("div",{staticClass:"upload-file",attrs:{hidden:""}},[t("el-upload",{ref:"upload",staticClass:"upload-demo",staticStyle:{display:"inline-block"},attrs:{action:"",limit:1,"on-change":this.fileChange,"file-list":this.uploadFileList,"auto-upload":!1}},[t("el-button",{attrs:{size:"small",type:"primary",id:"uploadFileSelect"}},[this._v("选取文件")])],1)],1)])},staticRenderFns:[function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticClass:"select-attachment"},[t("div",{staticClass:"select-attachment-text",attrs:{id:"attachmentImgSelectText"}},[this._v("\n 粘贴文件来上传, 或 "),t("span",{staticClass:"select-attachment-text-browse",attrs:{id:"attachmentBrowse"}},[this._v("浏览")])])])},function(){var e=this.$createElement,t=this._self._c||e;return t("div",{staticClass:"select-attachment-list",attrs:{id:"attachmentImgDivList"}},[t("div",{staticClass:"select-attachment-list-img",attrs:{id:"attachmentImgList"}}),this._v(" "),t("div",{staticClass:"select-attachment-list-div",attrs:{id:"attachmentFileList"}})])}]};var y={name:"FunctionTestPlanList",components:{FunctionTestPlanListAttachment:a("VU/8")(g,b,!1,function(e){a("CyIs")},"data-v-7e023e8d",null).exports},data:function(){var e;return e={planName:"",detailDialogVisible:!1,editDialogVisible:!1,createBugDialogVisible:!1,confirmBugDialogVisible:!1,jiraPwdDialogVisible:!1,planCaseList:[],itemOptions:[],userOptions:[],caseTypeOptions:[],caseLevelOptions:[],caseStatusOptions:[],detailForm:{},editForm:{},bugForm:{jiraItem:"",testMode:"",testCaseTitle:"",testCaseLevel:"",writePerson:"",testResult:"",executor:"",customfield_10203:"",customfield_10204:"",priority:"",labels:"",customfield_10300:"",assignee:"",summary:"",version:""},jiraPwdForm:{jiraPwd:""},CreateBugParams:{},currpage:1,total:0,queryInfo:{pageNum:1,pageSize:10,planId:this.listPlanId,itemId:"",testMode:"",testCaseTitle:"",testCaseLevel:"",writePerson:"",testResult:"",executor:""},executorOptions:[],modeOptions:[],projectOptions:[],versionOptions:[],assigneeOptions:[],bugLevelOptions:[{id:1,value:"致命(block)"},{id:2,value:"严重(Critical)"},{id:3,value:"一般(Major)"},{id:4,value:"建议(Minor/Trivial)"}],priorityOptions:[{id:1,value:"P0"},{id:2,value:"P1"},{id:3,value:"P2"}],labelsOptions:["前端","后端","iOS","Android","产品"],bugTypeOptions:[{id:10200,value:"代码错误"},{id:10201,value:"设计缺陷"},{id:10202,value:"界面优化"},{id:10203,value:"兼容性"},{id:10204,value:"性能问题"},{id:10205,value:"配置相关"},{id:10206,value:"安装部署"},{id:10207,value:"安全相关"},{id:10208,value:"标准规范"},{id:10209,value:"测试脚本"},{id:10210,value:"建议改善"}],loading:!1,caseTestResultOptions:[{id:1,label:"通过",value:"pass"},{id:2,label:"受阻",value:"block"},{id:3,label:"失败",value:"fail"},{id:4,label:"跳过",value:"skip"},{id:5,label:"未执行",value:null}]},h()(e,"assigneeOptions",[]),h()(e,"addFormRules",{itemId:[{required:!0,message:"请选择测试项目",trigger:"blur"}],testMode:[{required:!0,message:"请输入测试模块名称",trigger:"blur"},{min:1,max:50,message:"长度在 1 到 50 个字符",trigger:"blur"}],testCaseType:[{required:!0,message:"请选择用例类型",trigger:"blur"}],testCaseLevel:[{required:!0,message:"请选择用例等级",trigger:"blur"}],testCaseTitle:[{required:!0,message:"请输入用例标题",trigger:"blur"},{min:1,max:255,message:"长度在 1 到 255 个字符",trigger:"blur"}],precondition:[{required:!1,message:"请输入前置条件",trigger:"blur"}],testStep:[{required:!1,message:"请输入测试步骤",trigger:"blur"}],expectResult:[{required:!1,message:"请输入预期结果",trigger:"blur"}],writePerson:[{required:!1,message:"请输入编写者姓名",trigger:"blur"}],comments:[{required:!1,message:"请输入备注",trigger:"blur"}]}),h()(e,"bugFormRules",{jiraItem:[{required:!0,message:"请选择测试项目",trigger:"blur"}],testMode:[{required:!0,message:"请选择对应模块",trigger:"blur"}],version:[{required:!0,message:"请选择对应版本号",trigger:"blur"}],summary:[{required:!0,message:"请填写标题",trigger:"blur"},{min:1,max:100,message:"长度在 1 到 100 个字符",trigger:"blur"}],customfield_10203:[{required:!0,message:"请选择严重程度",trigger:"blur"}],customfield_10204:[{required:!0,message:"请填写缺陷描述",trigger:"blur"}],customfield_10300:[{required:!0,message:"请选择缺陷类型",trigger:"blur"},{min:1,max:500,message:"长度在 1 到 500 个字符",trigger:"blur"}],priority:[{required:!0,message:"请选择优先级",trigger:"blur"}],labels:[{required:!0,message:"请选择标签",trigger:"blur"}],assignee:[{required:!0,message:"请选择经办人",trigger:"blur"}]}),e},props:["listPlanId"],mounted:function(){this.getItemNameList(),this.getAllUserInfo(),this.getCaseTypeAndCaseStatusAndCaseLevel(),this.getAllExecutor()},created:function(){this.getFunctionTestPlanCaseList()},methods:{cancelCreateBug:function(){this.createBugDialogVisible=!1,this.$refs.uploadAttachment.deleteuploadSectionFile(),this.$refs.bugFormRef.resetFields()},getAllUserInfo:function(){var e=this;this.$api.user.queryAllUserInfo().then(function(t){e.userOptions=t.data.data}).catch(function(){})},selectFunctionTestPlanCaseList:function(){this.queryInfo.pageNum=1,this.total=0,this.getFunctionTestPlanCaseList()},updateTestCaseStatus:function(e){var t=this,a=JSON.parse(localStorage.getItem("userInfo")).nick,l={updateTime:(new Date).getTime(),planId:this.listPlanId,caseId:e.id,testResult:e.testResult,executor:a};this.$api.planrelation.updateCaseTestResultByPlanIdAndCaseId(l).then(function(e){t.$notify({type:"success",message:e.data.msg}),t.getFunctionTestPlanCaseList();for(var a=t.planCaseList,l=[],i={planId:t.listPlanId,status:1},s=0;s<a.length;s++)null!=a[s].testResult&&l.push(a[s].testResult);l.length>0&&l.length!=a.length?(i.status=1,t.$api.plan.updateTestPlanStatus(i).then(function(e){})):l.length>0&&l.length==a.length&&(i.status=2,t.$api.plan.updateTestPlanStatus(i).then(function(e){}))}).catch(function(){}),"失败"!=e.testResult&&"受阻"!=e.testResult||this.startCreateBug(e)},detailUpdateTestCaseStatus:function(e,t){var a=this,l={executor:JSON.parse(localStorage.getItem("userInfo")).nick,updateTime:(new Date).getTime(),planId:this.listPlanId,caseId:e,testResult:t};this.$api.planrelation.updateCaseTestResultByPlanIdAndCaseId(l).then(function(e){a.$notify({type:"success",message:e.data.msg});for(var t=a.getFunctionTestPlanCaseList(),l=[],i={planId:a.listPlanId,status:1},s=0;s<t.length;s++)null!=t[s].testResult&&l.push(t[s].testResult);l.length>0&&l.length!=t.length?(i.status=1,a.$api.plan.updateTestPlanStatus(i).then(function(e){})):l.length>0&&l.length==t.length&&(i.status=2,a.$api.plan.updateTestPlanStatus(i).then(function(e){}))}).catch(function(){}),this.detailDialogVisible=!1},startCreateBug:function(e){var t=this;return f()(m.a.mark(function a(){var l,i,s,o,r,n;return m.a.wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return a.next=2,t.$api.item.queryJiraItemByItemName(e.itemId);case 2:return l=a.sent,t.bugForm.jiraItem=l.data.msg,i=[],a.next=7,t.$api.jira.getProjectByProjectName(l.data.msg);case 7:if(s=a.sent,t.projectOptions=s.data.data,null==t.projectOptions){a.next=31;break}for(o=0;o<t.projectOptions.length;o++)i.push(t.projectOptions[o].version);return t.versionOptions=i,t.bugForm.version=t.projectOptions[0].version,t.bugForm.pkey=t.projectOptions[0].pkey,a.next=16,t.$api.dict.queryAllDataDict();case 16:return r=a.sent,t.assigneeOptions=r.data.data.responsiblePerson,t.confirmBugDialogVisible=!0,t.bugForm.itemId=e.itemId,t.bugForm.testMode=e.testMode,n="",a.next=24,t.$api.planrelation.queryTestPlanNamebyCaseId(e.id).then(function(e){n=e.data.msg});case 24:n=n.split("】")[0]+"】",t.bugForm.summary=n+e.testCaseTitle+"失败",t.bugForm.customfield_10204="【前置条件】\n"+e.precondition+"\n账号/密码:\n系统版本:\n手机型号:\n\n【测试步骤】\n"+e.testStep.replace(/\ +/g,"")+"\n\n【预期结果】\n"+e.expectResult.replace(/\ +/g,"")+"\n\n【实际结果】\n\n详见附件","受阻"==e.testResult&&"P0"==e.testCaseLevel?(t.bugForm.customfield_10203="致命(block)",t.bugForm.priority="P0"):"受阻"==e.testResult&&"P1"==e.testCaseLevel?(t.bugForm.customfield_10203="致命(block)",t.bugForm.priority="P0"):"P0"==e.testCaseLevel||"P1"==e.testCaseLevel?(t.bugForm.customfield_10203="严重(Critical)",t.bugForm.priority="P1"):(t.bugForm.customfield_10203="一般(Major)",t.bugForm.priority="P2"),t.bugForm.customfield_10300="代码错误",a.next=32;break;case 31:t.$notify({type:"warning",message:"未查询到对应项目或版本号"});case 32:case"end":return a.stop()}},a,t)}))()},querySearchAsync:function(e,t){var a=this.assigneeOptions,l=e?a.filter(this.createStateFilter(e)):a;clearTimeout(this.timeout),this.timeout=setTimeout(function(){t(l)},3e3*Math.random())},createStateFilter:function(e){return function(t){return-1!=t.value.toLowerCase().indexOf(e.toLowerCase())}},handleSelect:function(e){this.bugForm.assigneeEmailEx=e.dictCode},makebug:function(){var e={},t={},a={},l=[],i={},s=[],o={},r={},n={},c=[],u={},d={},m={},p={},f=[];return a.key=this.bugForm.pkey,a.name=this.bugForm.itemId,t.project=a,u.name=this.bugForm.testMode,console.log("case模块",this.bugForm.testMode),c.push(u),t.components=c,i.name=this.bugForm.version,l.push(i),t.versions=l,o.name=this.bugForm.version,s.push(o),t.fixVersions=s,r.name="Bug",t.issuetype=r,t.summary=this.bugForm.summary,t.customfield_10204=this.bugForm.customfield_10204,m.value=this.bugForm.customfield_10300,t.customfield_10300=m,n.name=this.bugForm.assigneeEmailEx,n.displayName=this.bugForm.assignee,t.assignee=n,d.value=this.bugForm.customfield_10203,t.customfield_10203=d,p.name=this.bugForm.priority,t.priority=p,f.push(this.bugForm.labels),t.labels=f,e.fields=t,e},beginToCreateBug:function(){var e=this,t=this.$common.getLocalStorage("currentJiraPwd"),a=JSON.parse(localStorage.getItem("userInfo")).nick;console.log("chineseUser",a);var l="";if(this.assigneeOptions.forEach(function(e){console.log(e),e.dictValue==a&&(l=e.dictCode)}),t){var s=this.makebug(),o=this.$refs.uploadAttachment.getFileRealNameList();this.CreateBugParams.bugJson=i()(s),this.CreateBugParams.currentJiraPwd=t,this.CreateBugParams.currentJiraUser=l,this.CreateBugParams.attachmentList=o,this.$api.jira.createBug(this.CreateBugParams).then(function(t){"200"==t.data.code?e.$notify({type:"success",message:"bug创建成功"}):"403"!=t.data.code&&"401"!=t.data.code||e.$common.delLocalStorage("currentJiraPwd"),e.createBugDialogVisible=!1}),this.$common.delLocalStorage("currentJiraPwd"),this.$refs.bugFormRef.resetFields()}else this.jiraPwdDialogVisible=!0},jiraPwd:function(){this.jiraPwdDialogVisible=!1,this.$common.setLocalStorage("currentJiraPwd",this.jiraPwdForm.jiraPwd)},delFunctionTestCase:function(e){var t=this;this.$confirm("确定删除吗?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(function(){var a={caseId:e,planId:t.listPlanId};t.$api.planrelation.delCaseJoinedTestPlan(i()(a)).then(function(e){t.$notify({type:"success",message:e.data.msg}),t.loading=!1,t.selectFunctionTestPlanCaseList()}).catch(function(){t.loading=!1})}).catch(function(){})},showEditDialog:function(e){var t=this;this.editDialogVisible=!0,this.$api.test.queryFunctionTestCaseById(e).then(function(e){t.editForm=e.data.data}).catch(function(){})},handleClose:function(e){this.$confirm("确认关闭?").then(function(e){}).catch(function(e){})},createBug:function(){this.createBugDialogVisible=!0,this.confirmBugDialogVisible=!1},editFunctionTestCase:function(){var e=this;this.$refs.editFormRef.validate(function(t){t&&(e.editForm.updateTime=(new Date).getTime(),e.$api.test.editFunctionTestCase(i()(e.editForm)).then(function(t){e.$notify({message:t.data.msg,type:"success"}),e.editDialogVisible=!1,e.selectFunctionTestPlanCaseList()}).catch(function(){}))})},showDetailDialog:function(e){var t=this,a={planId:this.listPlanId,caseId:e};this.$api.test.queryFunctionTestCaseById(e).then(function(e){t.detailForm=e.data.data,t.$api.planrelation.queryTestResultByPlanIdAndCaseId(a).then(function(e){t.detailForm.testResult=e.data.data})}).catch(function(){}),this.detailDialogVisible=!0},backParentPage:function(){this.$emit("plan-list-event",!1)},getAllExecutor:function(){var e=this;this.$api.planrelation.queryAllExcutor().then(function(t){e.executorOptions=t.data.data})},getFunctionTestPlanCaseList:function(){var e=this;return this.loading=!0,this.$api.plan.getPlanName(this.listPlanId).then(function(t){e.planName=t.data.data}),this.$api.planrelation.queryAllTestCaseByTestPlanId(i()(this.queryInfo)).then(function(t){e.planCaseList=t.data.data,e.total=t.data.count,e.loading=!1,e.queryInfo.pageNum=1,e.getAllExecutor()}).catch(function(){e.loading=!1}),this.planCaseList},handleSizeChange:function(e){this.queryInfo.pageSize=e,this.getFunctionTestPlanCaseList()},handleCurrentChange:function(e){this.queryInfo.pageNum=e,this.getFunctionTestPlanCaseList()},handleSelectionChange:function(e){},getItemNameList:function(){var e=this;this.$api.item.queryAllItemIdAndItemName(this.queryInfo.itemName).then(function(t){e.itemOptions=t.data.data}).catch(function(){e.loading=!1})},getCaseTypeAndCaseStatusAndCaseLevel:function(){var e=this;this.$api.dict.queryAllDataDict().then(function(t){e.caseTypeOptions=t.data.data.caseType,e.caseLevelOptions=t.data.data.caseLevel,e.caseStatusOptions=t.data.data.caseStatus}).catch(function(){})}}},F={render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"function-test-plan-list"},[a("el-form",{staticClass:"demo-form-inline",attrs:{inline:!0}},[a("el-form-item",{attrs:{label:"项目名称"}},[a("el-select",{attrs:{placeholder:"请选择",clearable:""},model:{value:e.queryInfo.itemId,callback:function(t){e.$set(e.queryInfo,"itemId",t)},expression:"queryInfo.itemId"}},e._l(e.itemOptions,function(e){return a("el-option",{key:e.id,attrs:{label:e.itemName,value:e.id}})}),1)],1),e._v(" "),a("el-form-item",{attrs:{label:"模块名称"}},[a("el-input",{staticClass:"input-with-select",attrs:{placeholder:"请输入测试模块名称",clearable:""},model:{value:e.queryInfo.testMode,callback:function(t){e.$set(e.queryInfo,"testMode",t)},expression:"queryInfo.testMode"}})],1),e._v(" "),a("el-form-item",{attrs:{label:"用例标题"}},[a("el-input",{staticClass:"input-with-select",attrs:{placeholder:"请输入用例标题",clearable:""},model:{value:e.queryInfo.testCaseTitle,callback:function(t){e.$set(e.queryInfo,"testCaseTitle",t)},expression:"queryInfo.testCaseTitle"}})],1),e._v(" "),a("el-form-item",{attrs:{label:"用例等级"}},[a("el-select",{attrs:{placeholder:"请选择",clearable:""},model:{value:e.queryInfo.testCaseLevel,callback:function(t){e.$set(e.queryInfo,"testCaseLevel",t)},expression:"queryInfo.testCaseLevel"}},e._l(e.caseLevelOptions,function(e){return a("el-option",{key:e.id,attrs:{label:e.dictValue,value:e.dictValue}})}),1)],1),e._v(" "),a("el-form-item",{attrs:{label:"编写者"}},[a("el-select",{attrs:{placeholder:"请选择",clearable:""},model:{value:e.queryInfo.writePerson,callback:function(t){e.$set(e.queryInfo,"writePerson",t)},expression:"queryInfo.writePerson"}},e._l(e.userOptions,function(e){return a("el-option",{key:e.id,attrs:{label:e.nick,value:e.nick}})}),1)],1),e._v(" "),a("el-form-item",{attrs:{label:"执行者"}},[a("el-select",{attrs:{placeholder:"请选择",clearable:""},model:{value:e.queryInfo.executor,callback:function(t){e.$set(e.queryInfo,"executor",t)},expression:"queryInfo.executor"}},e._l(e.executorOptions,function(e){return a("el-option",{key:e,attrs:{label:e,value:e}})}),1)],1),e._v(" "),a("el-form-item",{attrs:{label:"测试结果"}},[a("el-select",{attrs:{placeholder:"请选择",clearable:""},model:{value:e.queryInfo.testResult,callback:function(t){e.$set(e.queryInfo,"testResult",t)},expression:"queryInfo.testResult"}},e._l(e.caseTestResultOptions,function(e){return a("el-option",{key:e.id,attrs:{label:e.label,value:e.label}})}),1)],1),e._v(" "),a("el-form-item",[a("el-button",{attrs:{type:"primary"},on:{click:e.selectFunctionTestPlanCaseList}},[e._v("查询")])],1),e._v(" "),a("el-form-item",[a("el-button",{on:{click:e.backParentPage}},[e._v("返回")])],1)],1),e._v(" "),a("div",{staticClass:"tableTile"},[a("h1",[e._v(e._s(e.planName))])]),e._v(" "),a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"}],ref:"multipleTable",attrs:{"tooltip-effect":"dark",data:e.planCaseList.slice((e.currpage-1)*e.queryInfo.pageSize,e.currpage*e.queryInfo.pageSize),"default-sort":{prop:"createTime",order:"descending"},border:"",fit:!0},on:{"selection-change":e.handleSelectionChange}},[a("el-table-column",{attrs:{label:"序号",type:"selection",width:"55",align:"center"}}),e._v(" "),a("el-table-column",{attrs:{label:"项目名称",prop:"itemId",width:"100","show-overflow-tooltip":""}}),e._v(" "),a("el-table-column",{attrs:{label:"模块名称",prop:"testMode",width:"150","show-overflow-tooltip":"",sortable:""}}),e._v(" "),e._e(),e._v(" "),a("el-table-column",{attrs:{label:"等级",prop:"testCaseLevel",width:"80",sortable:""}}),e._v(" "),e._e(),e._v(" "),a("el-table-column",{attrs:{label:"用例标题",prop:"testCaseTitle",width:"250","show-overflow-tooltip":"",sortable:""}}),e._v(" "),e._e(),e._v(" "),a("el-table-column",{attrs:{label:"测试步骤",prop:"testStep",width:"300","show-overflow-tooltip":""}}),e._v(" "),a("el-table-column",{attrs:{label:"预期结果",prop:"expectResult",width:"200","show-overflow-tooltip":""}}),e._v(" "),a("el-table-column",{attrs:{"reserve-selection":!0,label:"测试结果",prop:"testResult",width:"120"},scopedSlots:e._u([{key:"default",fn:function(t){return["通过"===t.row.testResult?a("span",{staticClass:"color-pass"},[a("el-select",{staticClass:"select-test-result",attrs:{placeholder:"请选择",clearable:""},on:{change:function(a){return e.updateTestCaseStatus(t.row)}},model:{value:t.row.testResult,callback:function(a){e.$set(t.row,"testResult",a)},expression:"scope.row.testResult"}},e._l(e.caseTestResultOptions,function(e){return a("el-option",{key:e.id,attrs:{label:e.label,value:e.label}})}),1)],1):"失败"===t.row.testResult?a("span",{staticClass:"color-fail"},[a("el-select",{staticClass:"select-test-result",attrs:{placeholder:"请选择",clearable:""},on:{change:function(a){return e.updateTestCaseStatus(t.row)}},model:{value:t.row.testResult,callback:function(a){e.$set(t.row,"testResult",a)},expression:"scope.row.testResult"}},e._l(e.caseTestResultOptions,function(e){return a("el-option",{key:e.id,attrs:{label:e.label,value:e.label}})}),1)],1):"受阻"===t.row.testResult?a("span",{staticClass:"color-block"},[a("el-select",{staticClass:"select-test-result",attrs:{placeholder:"请选择",clearable:""},on:{change:function(a){return e.updateTestCaseStatus(t.row)}},model:{value:t.row.testResult,callback:function(a){e.$set(t.row,"testResult",a)},expression:"scope.row.testResult"}},e._l(e.caseTestResultOptions,function(e){return a("el-option",{key:e.id,attrs:{label:e.label,value:e.label}})}),1)],1):a("span",{staticClass:"color-skip"},[a("el-select",{staticClass:"select-test-result",attrs:{placeholder:"请选择",clearable:""},on:{change:function(a){return e.updateTestCaseStatus(t.row)}},model:{value:t.row.testResult,callback:function(a){e.$set(t.row,"testResult",a)},expression:"scope.row.testResult"}},e._l(e.caseTestResultOptions,function(e){return a("el-option",{key:e.id,attrs:{label:e.label,value:e.label}})}),1)],1)]}}])}),e._v(" "),a("el-table-column",{attrs:{label:"执行者",prop:"executor",width:"80"}}),e._v(" "),a("el-table-column",{attrs:{label:"编写者",prop:"writePerson",width:"80"}}),e._v(" "),e._e(),e._v(" "),e._e(),e._v(" "),e._e(),e._v(" "),e._e(),e._v(" "),e._e(),e._v(" "),a("el-table-column",{attrs:{label:"备注",prop:"comments","show-overflow-tooltip":""}}),e._v(" "),a("el-table-column",{attrs:{label:"操作",fixed:"right",width:"150",align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("el-button",{attrs:{type:"text",size:"small"},on:{click:function(a){return e.showDetailDialog(t.row.id)}}},[e._v("查看")]),e._v(" "),a("el-button",{attrs:{type:"text",size:"small"},on:{click:function(a){return e.showEditDialog(t.row.id)}}},[e._v("编辑")]),e._v(" "),a("el-button",{attrs:{type:"text",size:"small"},on:{click:function(a){return e.delFunctionTestCase(t.row.id)}}},[e._v("删除")])]}}])})],1),e._v(" "),a("el-pagination",{attrs:{"page-sizes":[5,10,20,30],"page-size":e.queryInfo.pageSize,layout:"total, sizes, prev, pager, next, jumper",total:e.total},on:{"size-change":e.handleSizeChange,"current-change":e.handleCurrentChange}}),e._v(" "),a("el-dialog",{attrs:{title:"查看用例",visible:e.detailDialogVisible,width:"60%"},on:{"update:visible":function(t){e.detailDialogVisible=t},close:function(t){e.detailDialogVisible=!1}}},[a("el-form",{attrs:{model:e.detailForm,"label-width":"100px"}},[a("el-row",{attrs:{gutter:20}},[a("el-col",{attrs:{span:6}},[a("el-form-item",{attrs:{label:"项目名称",prop:"itemId"}},[a("el-select",{attrs:{placeholder:"请选择"},model:{value:e.detailForm.itemId,callback:function(t){e.$set(e.detailForm,"itemId",t)},expression:"detailForm.itemId"}},e._l(e.itemOptions,function(e){return a("el-option",{key:e.id,attrs:{label:e.itemName,value:e.id+""}})}),1)],1)],1),e._v(" "),a("el-col",{attrs:{span:6}},[a("el-form-item",{attrs:{label:"用例类型",prop:"testCaseType"}},[a("el-select",{attrs:{placeholder:"请选择"},model:{value:e.detailForm.testCaseType,callback:function(t){e.$set(e.detailForm,"testCaseType",t)},expression:"detailForm.testCaseType"}},e._l(e.caseTypeOptions,function(e){return a("el-option",{key:e.id,attrs:{label:e.dictValue,value:e.dictValue}})}),1)],1)],1),e._v(" "),a("el-col",{attrs:{span:6}},[a("el-form-item",{attrs:{label:"用例等级",prop:"testCaseLevel"}},[a("el-select",{attrs:{placeholder:"请选择"},model:{value:e.detailForm.testCaseLevel,callback:function(t){e.$set(e.detailForm,"testCaseLevel",t)},expression:"detailForm.testCaseLevel"}},e._l(e.caseLevelOptions,function(e){return a("el-option",{key:e.id,attrs:{label:e.dictValue,value:e.dictValue}})}),1)],1)],1),e._v(" "),a("el-col",{attrs:{span:6}},[a("el-form-item",{attrs:{label:"用例状态",prop:"testCaseStatus"}},[a("el-select",{attrs:{placeholder:"请选择"},model:{value:e.detailForm.testCaseStatus,callback:function(t){e.$set(e.detailForm,"testCaseStatus",t)},expression:"detailForm.testCaseStatus"}},e._l(e.caseStatusOptions,function(e){return a("el-option",{key:e.id,attrs:{label:e.dictValue,value:e.dictValue}})}),1)],1)],1)],1),e._v(" "),a("el-row",{attrs:{gutter:20}},[a("el-col",{attrs:{span:8}},[a("el-form-item",{attrs:{label:"测试模块",prop:"testMode"}},[a("el-input",{attrs:{placeholder:"请输入测试模块名称"},model:{value:e.detailForm.testMode,callback:function(t){e.$set(e.detailForm,"testMode",t)},expression:"detailForm.testMode"}})],1)],1),e._v(" "),a("el-col",{attrs:{span:16}},[a("el-form-item",{attrs:{label:"用例标题",prop:"testCaseTitle"}},[a("el-input",{attrs:{placeholder:"请输入用例标题"},model:{value:e.detailForm.testCaseTitle,callback:function(t){e.$set(e.detailForm,"testCaseTitle",t)},expression:"detailForm.testCaseTitle"}})],1)],1)],1),e._v(" "),a("el-row",{attrs:{gutter:20}},[a("el-col",{attrs:{span:24}},[a("el-form-item",{attrs:{label:"前置条件",prop:"precondition"}},[a("el-input",{attrs:{type:"textarea",rows:5,placeholder:"请输入前置条件"},model:{value:e.detailForm.precondition,callback:function(t){e.$set(e.detailForm,"precondition",t)},expression:"detailForm.precondition"}})],1)],1)],1),e._v(" "),a("el-row",{attrs:{gutter:20}},[a("el-col",{attrs:{span:24}},[a("el-form-item",{attrs:{label:"测试步骤",prop:"testStep"}},[a("el-input",{attrs:{type:"textarea",rows:5},model:{value:e.detailForm.testStep,callback:function(t){e.$set(e.detailForm,"testStep",t)},expression:"detailForm.testStep"}})],1)],1)],1),e._v(" "),a("el-row",{attrs:{gutter:20}},[a("el-col",{attrs:{span:24}},[a("el-form-item",{attrs:{label:"预期结果",prop:"expectResult"}},[a("el-input",{attrs:{type:"textarea",rows:5},model:{value:e.detailForm.expectResult,callback:function(t){e.$set(e.detailForm,"expectResult",t)},expression:"detailForm.expectResult"}})],1)],1)],1),e._v(" "),a("el-row",{attrs:{gutter:20}},[a("el-col",{attrs:{span:24}},[a("el-form-item",{attrs:{label:"编写者",prop:"writePerson"}},[a("el-input",{attrs:{disabled:""},model:{value:e.detailForm.writePerson,callback:function(t){e.$set(e.detailForm,"writePerson",t)},expression:"detailForm.writePerson"}})],1)],1)],1),e._v(" "),a("el-row",{attrs:{gutter:20}},[a("el-col",{attrs:{span:24}},[a("el-form-item",{attrs:{label:"备注",prop:"comments"}},[a("el-input",{attrs:{type:"textarea",rows:5},model:{value:e.detailForm.comments,callback:function(t){e.$set(e.detailForm,"comments",t)},expression:"detailForm.comments"}})],1)],1)],1),e._v(" "),a("el-row",{attrs:{gutter:20}},[a("el-col",{attrs:{span:24}},[a("el-form-item",{attrs:{label:"测试结果",prop:"testResult"}},["通过"===e.detailForm.testResult?a("span",{staticClass:"color-pass"},[a("el-select",{staticClass:"select-test-result",attrs:{placeholder:"请选择"},on:{change:function(t){return e.detailUpdateTestCaseStatus(e.detailForm.id,e.detailForm.testResult)}},model:{value:e.detailForm.testResult,callback:function(t){e.$set(e.detailForm,"testResult",t)},expression:"detailForm.testResult"}},e._l(e.caseTestResultOptions,function(e){return a("el-option",{key:e.id,attrs:{label:e.label,value:e.label}})}),1)],1):"失败"===e.detailForm.testResult?a("span",{staticClass:"color-fail"},[a("el-select",{staticClass:"select-test-result",attrs:{placeholder:"请选择"},on:{change:function(t){return e.detailUpdateTestCaseStatus(e.detailForm.id,e.detailForm.testResult)}},model:{value:e.detailForm.testResult,callback:function(t){e.$set(e.detailForm,"testResult",t)},expression:"detailForm.testResult"}},e._l(e.caseTestResultOptions,function(e){return a("el-option",{key:e.id,attrs:{label:e.label,value:e.label}})}),1)],1):"受阻"===e.detailForm.testResult?a("span",{staticClass:"color-block"},[a("el-select",{staticClass:"select-test-result",attrs:{placeholder:"请选择"},on:{change:function(t){return e.detailUpdateTestCaseStatus(e.detailForm.id,e.detailForm.testResult)}},model:{value:e.detailForm.testResult,callback:function(t){e.$set(e.detailForm,"testResult",t)},expression:"detailForm.testResult"}},e._l(e.caseTestResultOptions,function(e){return a("el-option",{key:e.id,attrs:{label:e.label,value:e.label}})}),1)],1):a("span",{staticClass:"color-skip"},[a("el-select",{staticClass:"select-test-result",attrs:{placeholder:"请选择"},on:{change:function(t){return e.detailUpdateTestCaseStatus(e.detailForm.id,e.detailForm.testResult)}},model:{value:e.detailForm.testResult,callback:function(t){e.$set(e.detailForm,"testResult",t)},expression:"detailForm.testResult"}},e._l(e.caseTestResultOptions,function(e){return a("el-option",{key:e.id,attrs:{label:e.label,value:e.label}})}),1)],1)])],1)],1)],1),e._v(" "),a("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("el-button",{on:{click:function(t){e.detailDialogVisible=!1}}},[e._v("取 消")])],1)],1),e._v(" "),a("el-dialog",{attrs:{title:"编辑用例",visible:e.editDialogVisible,width:"60%"},on:{"update:visible":function(t){e.editDialogVisible=t},close:function(t){e.editDialogVisible=!1}}},[a("el-form",{ref:"editFormRef",attrs:{model:e.editForm,rules:e.addFormRules,"label-width":"100px"}},[a("el-row",{attrs:{gutter:20}},[a("el-col",{attrs:{span:6}},[a("el-form-item",{attrs:{label:"项目名称",prop:"itemId"}},[a("el-select",{attrs:{placeholder:"请选择"},model:{value:e.editForm.itemId,callback:function(t){e.$set(e.editForm,"itemId",t)},expression:"editForm.itemId"}},e._l(e.itemOptions,function(e){return a("el-option",{key:e.id,attrs:{label:e.itemName,value:e.id+""}})}),1)],1)],1),e._v(" "),a("el-col",{attrs:{span:6}},[a("el-form-item",{attrs:{label:"用例类型",prop:"testCaseType"}},[a("el-select",{attrs:{placeholder:"请选择"},model:{value:e.editForm.testCaseType,callback:function(t){e.$set(e.editForm,"testCaseType",t)},expression:"editForm.testCaseType"}},e._l(e.caseTypeOptions,function(e){return a("el-option",{key:e.id,attrs:{label:e.dictValue,value:e.dictValue}})}),1)],1)],1),e._v(" "),a("el-col",{attrs:{span:6}},[a("el-form-item",{attrs:{label:"用例等级",prop:"testCaseLevel"}},[a("el-select",{attrs:{placeholder:"请选择"},model:{value:e.editForm.testCaseLevel,callback:function(t){e.$set(e.editForm,"testCaseLevel",t)},expression:"editForm.testCaseLevel"}},e._l(e.caseLevelOptions,function(e){return a("el-option",{key:e.id,attrs:{label:e.dictValue,value:e.dictValue}})}),1)],1)],1),e._v(" "),a("el-col",{attrs:{span:6}},[a("el-form-item",{attrs:{label:"用例状态",prop:"testCaseStatus"}},[a("el-select",{attrs:{placeholder:"请选择"},model:{value:e.editForm.testCaseStatus,callback:function(t){e.$set(e.editForm,"testCaseStatus",t)},expression:"editForm.testCaseStatus"}},e._l(e.caseStatusOptions,function(e){return a("el-option",{key:e.id,attrs:{label:e.dictValue,value:e.dictValue}})}),1)],1)],1)],1),e._v(" "),a("el-row",{attrs:{gutter:20}},[a("el-col",{attrs:{span:8}},[a("el-form-item",{attrs:{label:"测试模块",prop:"testMode"}},[a("el-input",{attrs:{placeholder:"请输入测试模块名称"},model:{value:e.editForm.testMode,callback:function(t){e.$set(e.editForm,"testMode",t)},expression:"editForm.testMode"}})],1)],1),e._v(" "),a("el-col",{attrs:{span:16}},[a("el-form-item",{attrs:{label:"用例标题",prop:"testCaseTitle"}},[a("el-input",{attrs:{placeholder:"请输入用例标题"},model:{value:e.editForm.testCaseTitle,callback:function(t){e.$set(e.editForm,"testCaseTitle",t)},expression:"editForm.testCaseTitle"}})],1)],1)],1),e._v(" "),a("el-row",{attrs:{gutter:20}},[a("el-col",{attrs:{span:24}},[a("el-form-item",{attrs:{label:"前置条件",prop:"precondition"}},[a("el-input",{attrs:{type:"textarea",rows:5,placeholder:"请输入前置条件"},model:{value:e.editForm.precondition,callback:function(t){e.$set(e.editForm,"precondition",t)},expression:"editForm.precondition"}})],1)],1)],1),e._v(" "),a("el-row",{attrs:{gutter:20}},[a("el-col",{attrs:{span:24}},[a("el-form-item",{attrs:{label:"测试步骤",prop:"testStep"}},[a("el-input",{attrs:{type:"textarea",rows:5},model:{value:e.editForm.testStep,callback:function(t){e.$set(e.editForm,"testStep",t)},expression:"editForm.testStep"}})],1)],1)],1),e._v(" "),a("el-row",{attrs:{gutter:20}},[a("el-col",{attrs:{span:24}},[a("el-form-item",{attrs:{label:"预期结果",prop:"expectResult"}},[a("el-input",{attrs:{type:"textarea",rows:5},model:{value:e.editForm.expectResult,callback:function(t){e.$set(e.editForm,"expectResult",t)},expression:"editForm.expectResult"}})],1)],1)],1),e._v(" "),a("el-row",{attrs:{gutter:20}},[a("el-col",{attrs:{span:24}},[a("el-form-item",{attrs:{label:"编写者",prop:"writePerson"}},[a("el-input",{model:{value:e.editForm.writePerson,callback:function(t){e.$set(e.editForm,"writePerson",t)},expression:"editForm.writePerson"}})],1)],1)],1),e._v(" "),a("el-row",{attrs:{gutter:20}},[a("el-col",{attrs:{span:24}},[a("el-form-item",{attrs:{label:"备注",prop:"comments"}},[a("el-input",{attrs:{type:"textarea",rows:5},model:{value:e.editForm.comments,callback:function(t){e.$set(e.editForm,"comments",t)},expression:"editForm.comments"}})],1)],1)],1),e._v(" "),a("el-row",{attrs:{gutter:20}},[a("el-col",{attrs:{span:24}},[a("el-form-item",{attrs:{label:"测试结果",prop:"testResult"}},["通过"===e.editForm.testResult?a("span",{staticClass:"color-pass"},[a("el-select",{staticClass:"select-test-result",attrs:{placeholder:"请选择"},on:{change:function(t){return e.detailUpdateTestCaseStatus(e.editForm.id,e.editForm.testResult)}},model:{value:e.editForm.testResult,callback:function(t){e.$set(e.editForm,"testResult",t)},expression:"editForm.testResult"}},e._l(e.caseTestResultOptions,function(e){return a("el-option",{key:e.id,attrs:{label:e.label,value:e.label}})}),1)],1):"失败"===e.editForm.testResult?a("span",{staticClass:"color-fail"},[a("el-select",{staticClass:"select-test-result",attrs:{placeholder:"请选择"},on:{change:function(t){return e.detailUpdateTestCaseStatus(e.editForm.id,e.editForm.testResult)}},model:{value:e.editForm.testResult,callback:function(t){e.$set(e.editForm,"testResult",t)},expression:"editForm.testResult"}},e._l(e.caseTestResultOptions,function(e){return a("el-option",{key:e.id,attrs:{label:e.label,value:e.label}})}),1)],1):"受阻"===e.editForm.testResult?a("span",{staticClass:"color-block"},[a("el-select",{staticClass:"select-test-result",attrs:{placeholder:"请选择"},on:{change:function(t){return e.detailUpdateTestCaseStatus(e.editForm.id,e.editForm.testResult)}},model:{value:e.editForm.testResult,callback:function(t){e.$set(e.editForm,"testResult",t)},expression:"editForm.testResult"}},e._l(e.caseTestResultOptions,function(e){return a("el-option",{key:e.id,attrs:{label:e.label,value:e.label}})}),1)],1):a("span",{staticClass:"color-skip"},[a("el-select",{staticClass:"select-test-result",attrs:{placeholder:"请选择"},on:{change:function(t){return e.detailUpdateTestCaseStatus(e.editForm.id,e.editForm.testResult)}},model:{value:e.editForm.testResult,callback:function(t){e.$set(e.editForm,"testResult",t)},expression:"editForm.testResult"}},e._l(e.caseTestResultOptions,function(e){return a("el-option",{key:e.id,attrs:{label:e.label,value:e.label}})}),1)],1)])],1)],1)],1),e._v(" "),a("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("el-button",{on:{click:function(t){e.editDialogVisible=!1}}},[e._v("取 消")]),e._v(" "),a("el-button",{attrs:{type:"primary"},on:{click:e.editFunctionTestCase}},[e._v("确 定")])],1)],1),e._v(" "),a("el-dialog",{attrs:{title:"提示",visible:e.confirmBugDialogVisible,"close-on-click-modal":!1,width:"30%"},on:{"update:visible":function(t){e.confirmBugDialogVisible=t}}},[a("span",[e._v("确定要创建bug?")]),e._v(" "),a("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("el-button",{on:{click:function(t){e.confirmBugDialogVisible=!1}}},[e._v("取 消")]),e._v(" "),a("el-button",{attrs:{type:"primary"},on:{click:function(t){return e.createBug()}}},[e._v("确 定")])],1)]),e._v(" "),a("el-dialog",{attrs:{title:"创建缺陷",visible:e.createBugDialogVisible,"close-on-click-modal":!1,width:"60%"},on:{"update:visible":function(t){e.createBugDialogVisible=t},close:e.cancelCreateBug}},[a("div",{staticClass:"confirm-create-bug-form"},[a("el-form",{ref:"bugFormRef",attrs:{model:e.bugForm,"label-width":"100px",rules:e.bugFormRules}},[a("el-row",{attrs:{gutter:20}},[a("el-col",{attrs:{span:8}},[a("el-form-item",{attrs:{label:"项目名称",prop:"itemId"}},[a("el-select",{attrs:{placeholder:"请选择",disabled:""},model:{value:e.bugForm.jiraItem,callback:function(t){e.$set(e.bugForm,"jiraItem",t)},expression:"bugForm.jiraItem"}})],1)],1),e._v(" "),a("el-col",{attrs:{span:8}},[a("el-form-item",{attrs:{label:"模块",prop:"testMode"}},[a("el-select",{attrs:{placeholder:"请选择"},model:{value:e.bugForm.testMode,callback:function(t){e.$set(e.bugForm,"testMode",t)},expression:"bugForm.testMode"}},e._l(e.modeOptions,function(e){return a("el-option",{key:e.id,attrs:{label:e.name,value:e.name}})}),1)],1)],1),e._v(" "),a("el-col",{attrs:{span:8}},[a("el-form-item",{attrs:{label:"影响版本",prop:"version"}},[a("el-select",{attrs:{placeholder:"请选择"},model:{value:e.bugForm.version,callback:function(t){e.$set(e.bugForm,"version",t)},expression:"bugForm.version"}},e._l(e.versionOptions,function(e){return a("el-option",{key:e,attrs:{label:e,value:e}})}),1)],1)],1)],1),e._v(" "),a("el-row",{attrs:{gutter:20}},[a("el-col",{attrs:{span:24}},[a("el-form-item",{attrs:{label:"缺陷标题",prop:"summary"}},[a("el-input",{attrs:{type:"text",rows:5},model:{value:e.bugForm.summary,callback:function(t){e.$set(e.bugForm,"summary",t)},expression:"bugForm.summary"}})],1)],1)],1),e._v(" "),a("el-row",{attrs:{gutter:20}},[a("el-col",{attrs:{span:24}},[a("el-form-item",{attrs:{label:"缺陷描述",prop:"customfield_10204"}},[a("el-input",{attrs:{type:"textarea",rows:10},model:{value:e.bugForm.customfield_10204,callback:function(t){e.$set(e.bugForm,"customfield_10204",t)},expression:"bugForm.customfield_10204"}})],1)],1)],1),e._v(" "),a("el-row",{attrs:{gutter:20}},[a("el-col",{attrs:{span:8}},[a("el-form-item",{attrs:{label:"严重程度",prop:"customfield_10203"}},[a("el-select",{attrs:{placeholder:"请选择"},model:{value:e.bugForm.customfield_10203,callback:function(t){e.$set(e.bugForm,"customfield_10203",t)},expression:"bugForm.customfield_10203"}},e._l(e.bugLevelOptions,function(e){return a("el-option",{key:e.id,attrs:{label:e.value,value:e.value}})}),1)],1)],1),e._v(" "),a("el-col",{attrs:{span:8}},[a("el-form-item",{attrs:{label:"优先级",prop:"priority"}},[a("el-select",{attrs:{placeholder:"请选择"},model:{value:e.bugForm.priority,callback:function(t){e.$set(e.bugForm,"priority",t)},expression:"bugForm.priority"}},e._l(e.priorityOptions,function(e){return a("el-option",{key:e.id,attrs:{label:e.value,value:e.value}})}),1)],1)],1),e._v(" "),a("el-col",{attrs:{span:8}},[a("el-form-item",{attrs:{label:"标签",prop:"labels"}},[a("el-select",{attrs:{placeholder:"请选择"},model:{value:e.bugForm.labels,callback:function(t){e.$set(e.bugForm,"labels",t)},expression:"bugForm.labels"}},e._l(e.labelsOptions,function(e){return a("el-option",{key:e,attrs:{label:e,value:e}})}),1)],1)],1)],1),e._v(" "),a("el-row",{attrs:{gutter:20}},[a("el-col",{attrs:{span:8}},[a("el-form-item",{attrs:{label:"缺陷类型",prop:"customfield_10300"}},[a("el-select",{attrs:{placeholder:"请选择"},model:{value:e.bugForm.customfield_10300,callback:function(t){e.$set(e.bugForm,"customfield_10300",t)},expression:"bugForm.customfield_10300"}},e._l(e.bugTypeOptions,function(e){return a("el-option",{key:e.id,attrs:{label:e.value,value:e.value}})}),1)],1)],1),e._v(" "),a("el-col",{attrs:{span:8}},[a("el-form-item",{attrs:{label:"经办人",prop:"assignee"}},[a("el-autocomplete",{attrs:{"fetch-suggestions":e.querySearchAsync,placeholder:"请输入内容"},on:{select:e.handleSelect},scopedSlots:e._u([{key:"default",fn:function(t){var l=t.item;return[a("div",[e._v(e._s(l.value=l.dictValue))])]}}]),model:{value:e.bugForm.assignee,callback:function(t){e.$set(e.bugForm,"assignee",t)},expression:"bugForm.assignee"}})],1)],1)],1),e._v(" "),a("el-row",[a("el-col",{attrs:{span:24}},[a("el-form-item",{attrs:{label:"附件",prop:"precondition"}},[a("function-test-plan-list-attachment",{ref:"uploadAttachment"})],1)],1)],1)],1)],1),e._v(" "),a("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("el-button",{on:{click:e.cancelCreateBug}},[e._v("取 消")]),e._v(" "),a("el-button",{attrs:{type:"primary"},on:{click:function(t){return e.beginToCreateBug()}}},[e._v("确 定")])],1)]),e._v(" "),a("el-dialog",{attrs:{title:"初次登录,请输入jira密码",visible:e.jiraPwdDialogVisible,width:"30%"},on:{"update:visible":function(t){e.jiraPwdDialogVisible=t}}},[a("el-form",{ref:"jiraPwdFormRef",attrs:{model:e.jiraPwdForm,"label-width":"100px"}},[a("el-row",{attrs:{gutter:20}},[a("el-col",{attrs:{span:24}},[a("el-form-item",{attrs:{label:"jira密码",prop:"jiraPwd"}},[a("el-input",{attrs:{type:"text"},model:{value:e.jiraPwdForm.jiraPwd,callback:function(t){e.$set(e.jiraPwdForm,"jiraPwd",t)},expression:"jiraPwdForm.jiraPwd"}})],1)],1)],1)],1),e._v(" "),a("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("el-button",{on:{click:function(t){e.jiraPwdDialogVisible=!1}}},[e._v("取 消")]),e._v(" "),a("el-button",{attrs:{type:"primary"},on:{click:function(t){return e.jiraPwd()}}},[e._v("确 定")])],1)],1)],1)},staticRenderFns:[]};var w=a("VU/8")(y,F,!1,function(e){a("1HYy")},"data-v-e13c91be",null).exports,_={data:function(){return{loading:!1,tableIsShow:!1,reportIsShow:!1,ifShowQuery:!0,planNames:[],planConditions:[],planOptions:[],pieChart:"",queryInfo:{planId:""},detailForm:{},testResults:[],empty:!0}},props:["reportPlanId","showQueryFlag"],mounted:function(){},beforeCreate:function(){},created:function(){this.getShowQueryFlag(),this.getPlanNameList()},methods:{getShowQueryFlag:function(){void 0!==this.showQueryFlag&&(this.ifShowQuery=this.showQueryFlag,this.queryInfo.planId=this.reportPlanId),this.getTestPlanExecCondition()},backParentPage:function(){this.$emit("report-event",!1)},formatTestStatus:function(e){return"0"==e?"未开始":"1"==e?"进行中":"已结束"},formatExecScale:function(e){return e.execScale+"%"},getPlanInfoByPlanId:function(){var e=this;this.$api.plan.queryTestPlanById(this.queryInfo.planId).then(function(t){e.detailForm=t.data.data,e.detailForm.status=e.formatTestStatus(e.detailForm.status)}).catch(function(){})},getPlanNameList:function(){var e=this;this.$api.plan.queryAllPlanName().then(function(t){e.planOptions=t.data.data}).catch(function(){})},getTestPlanExecCondition:function(){var e=this;if(this.loading=!0,!this.queryInfo.planId)return this.$notify({type:"warning",message:"请选择计划名称"}),void(this.loading=!1);this.getPlanInfoByPlanId(),this.$api.planrelation.queryTestCaseExecConditionByPlanId(this.queryInfo.planId).then(function(t){if(t.data.data.length>0){e.planNames=[],e.planConditions=[];var a=t.data.data;e.testResults=a,a.forEach(function(t){var a={};a.value=t.execScale,a.name=t.testResult+" : "+t.execCondition+"条",e.planNames.push(t.testResult+" : "+t.execCondition+"条"),e.planConditions.push(a)}),e.reportIsShow=!0;var l=e;setTimeout(function(){l.loading=!1,l.drawAllCharts()},500)}else e.planNames=[],e.planConditions=[],e.loading=!1,e.reportIsShow=!0,e.pieChart="暂无加入计划的测试用例",e.$notify({type:"warning",message:"暂无加入计划用例统计数据"})}).catch(function(){})},drawAllCharts:function(){var e=this.$echarts.init(document.getElementById("reportMain"));e.setOption({title:{text:"",subtext:"",x:"center"},tooltip:{trigger:"item",formatter:"占比:{c}%",textStyle:{fontSize:18}},legend:{orient:"vertical",left:"left",data:this.planNames,textStyle:{fontSize:18}},toolbox:{feature:{saveAsImage:{show:!0}}},series:[{name:"",type:"pie",radius:["0%","60%"],center:["50%","45%"],data:this.planConditions,label:{normal:{show:!0,textStyle:{fontSize:18}},emphasis:{show:!0}},lableLine:{normal:{show:!0},emphasis:{show:!0}}}]}),window.onresize=function(){e.resize()}}}},C={render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"}],staticClass:"function-report-box"},[e.tableIsShow?a("div",{staticClass:"function-plan-table"}):e._e(),e._v(" "),a("div",{staticClass:"function-roport-box-query"},[a("el-form",{staticClass:"demo-form-inline",attrs:{inline:!0}},[a("el-row",{attrs:{gutter:20}},[a("el-col",{attrs:{span:24}},[e.ifShowQuery?a("el-form-item",{attrs:{label:"计划名称",prop:"planId"}},[a("el-select",{attrs:{placeholder:"请选择",clearable:""},model:{value:e.queryInfo.planId,callback:function(t){e.$set(e.queryInfo,"planId",t)},expression:"queryInfo.planId"}},e._l(e.planOptions,function(e){return a("el-option",{key:e.id,attrs:{label:e.planName,value:e.id+""}})}),1)],1):e._e(),e._v(" "),e.ifShowQuery?a("el-form-item",[a("el-button",{attrs:{type:"primary"},on:{click:e.getTestPlanExecCondition}},[e._v("查询")])],1):a("el-form-item",[a("el-button",{on:{click:e.backParentPage}},[e._v("返回")])],1)],1)],1)],1)],1),e._v(" "),e.reportIsShow?a("div",{staticClass:"function-plan-reoprt"},[a("div",{staticClass:"base-info default-style"},[a("div",{staticClass:"report-title"},[e._v("基础信息")]),e._v(" "),a("div",[a("el-form",{staticClass:"demo-form-inline",attrs:{inline:!0,model:e.detailForm}},[a("el-row",{attrs:{gutter:20}},[a("el-col",{attrs:{span:12}},[a("el-form-item",{attrs:{label:"计划名称"}},[a("el-input",{attrs:{disabled:""},model:{value:e.detailForm.planName,callback:function(t){e.$set(e.detailForm,"planName",t)},expression:"detailForm.planName"}})],1)],1),e._v(" "),a("el-col",{attrs:{span:12}},[a("el-form-item",{attrs:{label:"负责人员"}},[a("el-input",{attrs:{disabled:""},model:{value:e.detailForm.director,callback:function(t){e.$set(e.detailForm,"director",t)},expression:"detailForm.director"}})],1)],1)],1),e._v(" "),a("el-row",{attrs:{gutter:20}},[a("el-col",{attrs:{span:12}},[a("el-form-item",{attrs:{label:"开始时间"}},[a("el-input",{attrs:{disabled:""},model:{value:e.detailForm.startTime,callback:function(t){e.$set(e.detailForm,"startTime",t)},expression:"detailForm.startTime"}})],1)],1),e._v(" "),a("el-col",{attrs:{span:12}},[a("el-form-item",{attrs:{label:"结束时间"}},[a("el-input",{attrs:{disabled:""},model:{value:e.detailForm.endTime,callback:function(t){e.$set(e.detailForm,"endTime",t)},expression:"detailForm.endTime"}})],1)],1)],1),e._v(" "),a("el-row",{attrs:{gutter:20}},[a("el-col",{attrs:{span:12}},[a("el-form-item",{attrs:{label:"测试状态"}},[a("el-input",{attrs:{disabled:""},model:{value:e.detailForm.status,callback:function(t){e.$set(e.detailForm,"status",t)},expression:"detailForm.status"}})],1)],1),e._v(" "),a("el-col",{attrs:{span:12}},[a("el-form-item",{attrs:{label:"备注信息"}},[a("el-input",{attrs:{disabled:""},model:{value:e.detailForm.comments,callback:function(t){e.$set(e.detailForm,"comments",t)},expression:"detailForm.comments"}})],1)],1)],1)],1)],1)]),e._v(" "),a("div",{staticClass:"statistic-pic default-style"},[a("div",{staticClass:"report-title"},[e._v("饼图统计")]),e._v(" "),a("div",{staticClass:"function-report-box-main",attrs:{id:"reportMain"}},[e._v(e._s(e.pieChart))])]),e._v(" "),a("div",{staticClass:"statistic-table default-style"},[a("div",{staticClass:"report-title"},[e._v("表格统计")]),e._v(" "),a("div",{staticClass:"function-report-statistic-table"},[a("el-table",{attrs:{data:e.testResults}},[a("el-table-column",{attrs:{label:"状态",prop:"testResult"}}),e._v(" "),a("el-table-column",{attrs:{label:"数量(条)",prop:"execCondition"}}),e._v(" "),a("el-table-column",{attrs:{label:"占比",prop:"execScale",formatter:e.formatExecScale}})],1)],1)])]):e._e()])},staticRenderFns:[]};var x=a("VU/8")(_,C,!1,function(e){a("ydHx")},"data-v-121f439e",null).exports,T={props:["transTime"],data:function(){return{datevalue:"",pickerOptions:{disabledDate:function(e){return e.getTime()<Date.now()-864e5}}}},watch:{},mounted:function(){this.validStartValue()},methods:{validStartValue:function(){this.transTime?this.datevalue=this.transTime:this.datevalue=""},clearDatepicker:function(){this.datevalue=""},change:function(){this.$emit("dateTimePickerFn",this.datevalue)}}},I={render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"block"},[a("span",{staticClass:"demonstration"}),e._v(" "),a("el-date-picker",{attrs:{"value-format":"yyyy-MM-dd HH:mm:ss",type:"datetime",placeholder:"选择日期时间","picker-options":e.pickerOptions},on:{change:e.change},model:{value:e.datevalue,callback:function(t){e.datevalue=t},expression:"datevalue"}})],1)},staticRenderFns:[]};var k={data:function(){var e=this,t=function(t,a,l){e.startTimevalue?l():l(new Error("请选择开始时间"))},a=function(t,a,l){(a=e.endTimevalue)?Date.parse(e.startTimevalue)>=Date.parse(a)?l(new Error("结束时间必须大于开始")):l():l(new Error("请选择结束时间"))};return{toPlanListPlanId:"",toReportPlanId:"",showListFlag:!1,showReportFlag:!1,toshowQueryFlag:!1,showPlanFlag:!0,loading:!1,planNameOptions:[],detailForm:{},queryInfo:{pageNum:1,pageSize:10,planName:"",director:"",status:"",envId:"",version:""},versionQueryInfo:{pageNum:1,pageSize:10,versionName:""},envOptions:[],versionOptions:[],testPlanList:[],currpage:1,total:0,addDialogVisible:!1,editDialogVisible:!1,copyDialogVisible:!1,addForm:{planName:"",director:"",startTime:"",endTime:"",createTime:"",status:"",comments:"",envId:"",version:""},copyForm:{copyPlanId:"",planName:"",director:"",startTime:"",endTime:"",createTime:"",status:"",comments:"",envId:"",version:""},editForm:{},startTimevalue:"",endTimevalue:"",textarea:"",multipleSelection:[],addFormRules:{planName:[{required:!0,message:"请输入测试计划名称",trigger:"blur"},{min:1,max:20,message:"长度在 1 到 20 个字符",trigger:"blur"}],envId:[{required:!0,message:"请选择所属环境",trigger:"blur"}],version:[{required:!0,message:"请选择版本",trigger:"blur"}],director:[{required:!1,message:"请输入负责人",trigger:"blur"},{min:1,max:20,message:"长度在 1 到 20 个字符",trigger:"blur"}],startTime:[{required:!0,validator:t,trigger:"blur"}],endTime:[{required:!0,validator:a,trigger:"blur"}],comments:[{required:!1,message:"请输入备注",trigger:"blur"},{min:0,max:200,message:"长度在 0 到 200 个字符",trigger:"blur"}]},copyFormRules:{planName:[{required:!0,message:"请输入测试计划名称",trigger:"blur"},{min:1,max:20,message:"长度在 1 到 20 个字符",trigger:"blur"}],envId:[{required:!0,message:"请选择所属环境",trigger:"blur"}],version:[{required:!0,message:"请选择版本",trigger:"blur"}],director:[{required:!1,message:"请输入负责人",trigger:"blur"},{min:1,max:20,message:"长度在 1 到 20 个字符",trigger:"blur"}],startTime:[{required:!0,validator:t,trigger:"blur"}],endTime:[{required:!0,validator:a,trigger:"blur"}],comments:[{required:!1,message:"请输入备注",trigger:"blur"},{min:0,max:200,message:"长度在 0 到 200 个字符",trigger:"blur"}]},planStatusOptions:[{id:0,label:"未开始"},{id:1,label:"进行中"},{id:2,label:"已结束"}]}},mounted:function(){this.getPlanNameList()},created:function(){this.getPlanList()},methods:{copyFunctionTestPlan:function(){var e=this;this.$refs.copyFormRef.validate(function(t){if(t){e.copyForm.createTime=(new Date).getTime(),e.copyForm.status=0;var a=JSON.parse(localStorage.getItem("userInfo")).nick;e.copyForm.director=""==e.copyForm.director?a:e.addForm.director,e.copyForm.startTime=e.startTimevalue,e.copyForm.endTime=e.endTimevalue,e.$api.plan.copyTestPlan(i()(e.copyForm)).then(function(t){e.$notify({message:t.data.msg,type:"success"}),e.copyDialogVisible=!1,e.$refs.startTimepicker.clearDatepicker(),e.$refs.endTimepicker.clearDatepicker(),e.getPlanNameList(),e.getPlanList()}).catch(function(){e.loading=!0})}})},copyFunctionPlan:function(){var e=this;0==this.multipleSelection.length?this.$notify({type:"warning",message:"请勾选需要复制的测试计划"}):this.multipleSelection.length>1?this.$notify({type:"warning",message:"仅支持单选复制"}):(this.copyForm.copyPlanId=this.multipleSelection[0].id,this.$api.dict.queryAllDataDict().then(function(t){e.envOptions=t.data.data.environment}),this.copyDialogVisible=!0)},copyDialogClose:function(){this.copyDialogVisible=!1,this.$refs.copyFormRef.resetFields()},changeShowListFlag:function(e){this.showListFlag=e,this.showPlanFlag=!0,this.getPlanList()},changeShowReportFlag:function(e){this.showReportFlag=e,this.showPlanFlag=!0},showDetailDialog:function(e){this.toPlanListPlanId=e,this.showListFlag=!0,this.showPlanFlag=!1},showReprot:function(e){this.toReportPlanId=e,this.showReportFlag=!0,this.showPlanFlag=!1},addPlanButton:function(){var e=this;this.addDialogVisible=!0,this.$api.dict.queryAllDataDict().then(function(t){e.envOptions=t.data.data.environment})},showEditDialog:function(e,t){var a=this;null!=e&&0==t?(this.$api.plan.queryTestPlanById(e).then(function(e){a.editForm=e.data.data,a.startTimevalue=a.editForm.startTime,a.endTimevalue=a.editForm.endTime,a.editDialogVisible=!0}),this.$api.dict.queryAllDataDict().then(function(e){a.envOptions=e.data.data.environment}),this.$api.version.queryAllVersion(i()(this.versionQueryInfo)).then(function(e){a.versionOptions=e.data.data})):this.$confirm("测试计划未开始才可被编辑","提示信息",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"})},addFunctionTestPlan:function(){var e=this;this.$refs.addFormRef.validate(function(t){if(t){e.addForm.createTime=(new Date).getTime(),e.addForm.status=0;var a=JSON.parse(localStorage.getItem("userInfo")).nick;e.addForm.director=""==e.addForm.director?a:e.addForm.director,e.addForm.startTime=e.startTimevalue,e.addForm.endTime=e.endTimevalue,e.$api.plan.addTestPlan(i()(e.addForm)).then(function(t){e.$notify({message:t.data.msg,type:"success"}),e.addDialogVisible=!1,e.$refs.startTimepicker.clearDatepicker(),e.$refs.endTimepicker.clearDatepicker(),e.getPlanNameList(),e.getPlanList()}).catch(function(){e.loading=!0})}})},editTestPlan:function(){var e=this;this.$refs.addFormRef.validate(function(t){if(t){e.editForm.updateTime=(new Date).getTime();var a=JSON.parse(localStorage.getItem("userInfo")).nick;e.editForm.director=""==e.editForm.director?a:e.editForm.director,e.editForm.startTime=e.startTimevalue,e.editForm.endTime=e.endTimevalue,e.$api.plan.updateTestPlan(i()(e.editForm)).then(function(t){e.$notify({message:t.data.msg,type:"success"}),e.editDialogVisible=!1,e.getPlanList()}).catch(function(){e.loading=!0})}})},delFunctionTestPlan:function(e,t){var a=this;null!=e&&0==t?this.$confirm("确定要删除吗","提示信息",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(function(){a.$api.plan.delFunctionTestPlan(e).then(function(e){a.$notify({type:"success",message:e.data.msg}),a.getPlanList()})}):this.$confirm("测试计划未开始才可删除","提示信息",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"})},getstartTimevalue:function(e){this.startTimevalue=e},getendTimevalue:function(e){this.endTimevalue=e},handleSelectionChange:function(e){this.multipleSelection=e},getPlanNameList:function(){var e=this;this.loading=!0,this.$api.plan.queryAllPlanName(i()(this.queryInfo)).then(function(t){e.loading=!1,localStorage.setItem("active",0),e.planNameOptions=t.data.data}).catch(function(){e.loading=!1})},getPlanList:function(){var e=this;this.$api.plan.queryAllPlan(i()(this.queryInfo)).then(function(t){e.testPlanList=t.data.data,e.total=t.data.count}).catch(function(){e.loading=!1})},handleSizeChange:function(e){this.queryInfo.pageSize=e,this.getPlanList()},handleCurrentChange:function(e){this.queryInfo.pageNum=e,this.getPlanList()},addDialogClose:function(){this.$refs.addFormRef.resetFields(),this.textarea=""},editDialogClose:function(){this.editDialogVisible=!1},statusFormat:function(e,t){return 0==e.status?"未开始":1==e.status?"进行中":2==e.status?"已结束":void 0},batchDelFunctionPlan:function(){var e=this;if(0==this.multipleSelection.length)this.$notify({type:"warning",message:"请勾选需要删除的测试计划"});else{var t=this.multipleSelection,a=!1,l=[];t.forEach(function(e){0!=e.status&&l.push(e.status)}),0==l.length&&(a=!0),a?(this.loading=!0,this.$confirm("确定删除吗?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(function(){e.$api.plan.batchDeleteFunctionPlan(i()(t)).then(function(t){e.loading=!1,e.$notify({type:"success",message:t.data.msg}),e.getPlanList()}).catch(function(){e.loading=!1})}).catch(function(){e.loading=!1})):this.$confirm("测试计划未开始才可删除","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"})}}},components:{DateTimePicker:a("VU/8")(T,I,!1,function(e){a("DREW")},"data-v-28405aaa",null).exports,FunctionTestPlanList:w,FunctionTestReport:x}},S={render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"function-plan-box"},[a("div",{staticClass:"plan-list-box"},[e.showListFlag?a("function-test-plan-list",{ref:"planList",attrs:{listPlanId:e.toPlanListPlanId},on:{"plan-list-event":e.changeShowListFlag}}):e._e()],1),e._v(" "),a("div",{staticClass:"plan-report-box"},[e.showReportFlag?a("function-test-report",{ref:"planList",attrs:{reportPlanId:e.toReportPlanId,showQueryFlag:e.toshowQueryFlag},on:{"report-event":e.changeShowReportFlag}}):e._e()],1),e._v(" "),e.showPlanFlag?a("div",{staticClass:"plan-box"},[a("el-form",{staticClass:"demo-form-inline",attrs:{inline:!0}},[a("el-form-item",{attrs:{label:"计划名称"}},[a("el-select",{attrs:{placeholder:"请选择",clearable:""},model:{value:e.queryInfo.planName,callback:function(t){e.$set(e.queryInfo,"planName",t)},expression:"queryInfo.planName"}},e._l(e.planNameOptions,function(e){return a("el-option",{key:e.id,attrs:{label:e.planName,value:e.planName}})}),1)],1),e._v(" "),a("el-form-item",{attrs:{label:"状态"}},[a("el-select",{attrs:{placeholder:"请选择",clearable:""},model:{value:e.queryInfo.status,callback:function(t){e.$set(e.queryInfo,"status",t)},expression:"queryInfo.status"}},e._l(e.planStatusOptions,function(e){return a("el-option",{key:e.id,attrs:{label:e.label,value:e.id}})}),1)],1),e._v(" "),a("el-form-item",{attrs:{label:"负责人"}},[a("el-input",{staticClass:"input-with-select",attrs:{placeholder:"请输入负责人",clearable:""},model:{value:e.queryInfo.director,callback:function(t){e.$set(e.queryInfo,"director",t)},expression:"queryInfo.director"}})],1),e._v(" "),a("el-form-item",[a("el-button",{attrs:{type:"primary"},on:{click:e.getPlanList}},[e._v("查询")])],1)],1),e._v(" "),a("el-row",{staticClass:"add_button"},[a("el-col",[a("el-button",{attrs:{type:"primary"},on:{click:e.addPlanButton}},[e._v("添加")]),e._v(" "),a("el-button",{attrs:{type:"primary"},on:{click:e.batchDelFunctionPlan}},[e._v("批量删除")]),e._v(" "),a("el-button",{attrs:{type:"primary"},on:{click:e.copyFunctionPlan}},[e._v("复制计划")])],1)],1),e._v(" "),a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"}],ref:"multipleTable",attrs:{"tooltip-effect":"dark",data:e.testPlanList.slice((e.currpage-1)*e.queryInfo.pageSize,e.currpage*e.queryInfo.pageSize),border:"",fit:!0},on:{"selection-change":e.handleSelectionChange}},[a("el-table-column",{attrs:{type:"selection",width:"55",align:"center"}}),e._v(" "),a("el-table-column",{attrs:{label:"序号",type:"index",align:"center",width:"50"}}),e._v(" "),a("el-table-column",{attrs:{label:"计划名称",prop:"planName",width:"250"}}),e._v(" "),a("el-table-column",{attrs:{label:"状态",prop:"status",width:"100",formatter:e.statusFormat}}),e._v(" "),a("el-table-column",{attrs:{label:"所属环境",prop:"envId",width:"100"}}),e._v(" "),a("el-table-column",{attrs:{label:"负责人",prop:"director",width:"100"}}),e._v(" "),a("el-table-column",{attrs:{label:"创建时间",prop:"createTime",width:"200"}}),e._v(" "),a("el-table-column",{attrs:{label:"开始时间",prop:"startTime",width:"200"}}),e._v(" "),a("el-table-column",{attrs:{label:"结束时间",prop:"endTime",width:"200"}}),e._v(" "),a("el-table-column",{attrs:{label:"备注",prop:"comments"}}),e._v(" "),a("el-table-column",{attrs:{label:"操作",fixed:"right",width:"180",align:"center"},scopedSlots:e._u([{key:"default",fn:function(t){return[a("el-button",{attrs:{type:"text",size:"small"},on:{click:function(a){return e.showDetailDialog(t.row.id)}}},[e._v("执行")]),e._v(" "),a("el-button",{attrs:{type:"text",size:"small"},on:{click:function(a){return e.showReprot(t.row.id)}}},[e._v("报告")]),e._v(" "),a("el-button",{attrs:{type:"text",size:"small"},on:{click:function(a){return e.showEditDialog(t.row.id,t.row.status)}}},[e._v("编辑")]),e._v(" "),a("el-button",{attrs:{type:"text",size:"small"},on:{click:function(a){return e.delFunctionTestPlan(t.row.id,t.row.status)}}},[e._v("删除")])]}}],null,!1,516029917)})],1),e._v(" "),a("el-pagination",{attrs:{"page-sizes":[5,10,20,30],"page-size":e.queryInfo.pageSize,layout:"total, sizes, prev, pager, next, jumper",total:e.total},on:{"size-change":e.handleSizeChange,"current-change":e.handleCurrentChange}}),e._v(" "),a("el-dialog",{attrs:{title:"添加测试计划",visible:e.addDialogVisible,width:"30%"},on:{"update:visible":function(t){e.addDialogVisible=t},close:e.addDialogClose}},[a("el-form",{ref:"addFormRef",attrs:{model:e.addForm,rules:e.addFormRules,"label-width":"100px"}},[a("el-form-item",{attrs:{label:"计划名称",prop:"planName"}},[a("el-input",{model:{value:e.addForm.planName,callback:function(t){e.$set(e.addForm,"planName",t)},expression:"addForm.planName"}})],1),e._v(" "),a("el-form-item",{attrs:{label:"所属环境",prop:"envId"}},[a("el-select",{attrs:{placeholder:"请选择",clearable:""},model:{value:e.addForm.envId,callback:function(t){e.$set(e.addForm,"envId",t)},expression:"addForm.envId"}},e._l(e.envOptions,function(e){return a("el-option",{key:e.dictCode,attrs:{label:e.dictValue,value:e.dictCode}})}),1)],1),e._v(" "),a("el-form-item",{attrs:{label:"负责人",prop:"director"}},[a("el-input",{model:{value:e.addForm.director,callback:function(t){e.$set(e.addForm,"director",t)},expression:"addForm.director"}})],1),e._v(" "),a("el-form-item",{attrs:{label:"开始时间",prop:"startTime"}},[a("DateTimePicker",{ref:"startTimepicker",on:{dateTimePickerFn:e.getstartTimevalue}})],1),e._v(" "),a("el-form-item",{attrs:{label:"结束时间",prop:"endTime"}},[a("DateTimePicker",{ref:"endTimepicker",on:{dateTimePickerFn:e.getendTimevalue}})],1),e._v(" "),a("el-form-item",{attrs:{label:"备注",prop:"comments"}},[a("el-input",{attrs:{type:"textarea",rows:2,placeholder:"请输入内容"},model:{value:e.addForm.comments,callback:function(t){e.$set(e.addForm,"comments",t)},expression:"addForm.comments"}})],1)],1),e._v(" "),a("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("el-button",{on:{click:function(t){e.addDialogVisible=!1}}},[e._v("取 消")]),e._v(" "),a("el-button",{attrs:{type:"primary"},on:{click:e.addFunctionTestPlan}},[e._v("确 定")])],1)],1),e._v(" "),e.editDialogVisible?a("el-dialog",{attrs:{title:"编辑测试计划",visible:e.editDialogVisible,width:"30%"},on:{"update:visible":function(t){e.editDialogVisible=t},close:e.editDialogClose}},[a("el-form",{ref:"addFormRef",attrs:{model:e.editForm,rules:e.addFormRules,"label-width":"100px"}},[a("el-form-item",{attrs:{label:"计划名称",prop:"planName"}},[a("el-input",{attrs:{disabled:!0},model:{value:e.editForm.planName,callback:function(t){e.$set(e.editForm,"planName",t)},expression:"editForm.planName"}})],1),e._v(" "),a("el-form-item",{attrs:{label:"所属环境",prop:"envId"}},[a("el-select",{attrs:{placeholder:"请选择",clearable:""},model:{value:e.editForm.envId,callback:function(t){e.$set(e.editForm,"envId",t)},expression:"editForm.envId"}},e._l(e.envOptions,function(e){return a("el-option",{key:e.dictCode,attrs:{label:e.dictValue,value:e.dictCode}})}),1)],1),e._v(" "),a("el-form-item",{attrs:{label:"负责人",prop:"director"}},[a("el-input",{model:{value:e.editForm.director,callback:function(t){e.$set(e.editForm,"director",t)},expression:"editForm.director"}})],1),e._v(" "),a("el-form-item",{attrs:{label:"开始时间",prop:"startTime"}},[a("DateTimePicker",{ref:"startTimepicker",attrs:{transTime:e.editForm.startTime},on:{dateTimePickerFn:e.getstartTimevalue}})],1),e._v(" "),a("el-form-item",{attrs:{label:"结束时间",prop:"endTime"}},[a("DateTimePicker",{ref:"endTimepicker",attrs:{transTime:e.editForm.endTime},on:{dateTimePickerFn:e.getendTimevalue}})],1),e._v(" "),a("el-form-item",{attrs:{label:"备注",prop:"comments"}},[a("el-input",{attrs:{type:"textarea",rows:2,placeholder:"请输入内容"},model:{value:e.editForm.comments,callback:function(t){e.$set(e.editForm,"comments",t)},expression:"editForm.comments"}})],1)],1),e._v(" "),a("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("el-button",{on:{click:e.editDialogClose}},[e._v("取 消")]),e._v(" "),a("el-button",{attrs:{type:"primary"},on:{click:e.editTestPlan}},[e._v("确 定")])],1)],1):e._e(),e._v(" "),a("el-dialog",{attrs:{title:"复制测试计划",visible:e.copyDialogVisible,width:"30%"},on:{"update:visible":function(t){e.copyDialogVisible=t},close:e.copyDialogClose}},[a("el-form",{ref:"copyFormRef",attrs:{model:e.copyForm,rules:e.copyFormRules,"label-width":"100px"}},[a("el-form-item",{attrs:{label:"计划名称",prop:"planName"}},[a("el-input",{model:{value:e.copyForm.planName,callback:function(t){e.$set(e.copyForm,"planName",t)},expression:"copyForm.planName"}})],1),e._v(" "),a("el-form-item",{attrs:{label:"所属环境",prop:"envId"}},[a("el-select",{attrs:{placeholder:"请选择",clearable:""},model:{value:e.copyForm.envId,callback:function(t){e.$set(e.copyForm,"envId",t)},expression:"copyForm.envId"}},e._l(e.envOptions,function(e){return a("el-option",{key:e.dictCode,attrs:{label:e.dictValue,value:e.dictCode}})}),1)],1),e._v(" "),a("el-form-item",{attrs:{label:"负责人",prop:"director"}},[a("el-input",{model:{value:e.copyForm.director,callback:function(t){e.$set(e.copyForm,"director",t)},expression:"copyForm.director"}})],1),e._v(" "),a("el-form-item",{attrs:{label:"开始时间",prop:"startTime"}},[a("DateTimePicker",{ref:"startTimepicker",on:{dateTimePickerFn:e.getstartTimevalue}})],1),e._v(" "),a("el-form-item",{attrs:{label:"结束时间",prop:"endTime"}},[a("DateTimePicker",{ref:"endTimepicker",on:{dateTimePickerFn:e.getendTimevalue}})],1),e._v(" "),a("el-form-item",{attrs:{label:"备注",prop:"comments"}},[a("el-input",{attrs:{type:"textarea",rows:2,placeholder:"请输入内容"},model:{value:e.copyForm.comments,callback:function(t){e.$set(e.copyForm,"comments",t)},expression:"copyForm.comments"}})],1)],1),e._v(" "),a("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("el-button",{on:{click:function(t){e.copyDialogVisible=!1}}},[e._v("取 消")]),e._v(" "),a("el-button",{attrs:{type:"primary"},on:{click:e.copyFunctionTestPlan}},[e._v("确 定")])],1)],1)],1):e._e()])},staticRenderFns:[]};var $={data:function(){return{itemOptions:[],reviewStatusOptions:[],userOptions:[],testReviewList:[],detailForm:{},editForm:{},selectForm:{},queryInfo:{reviewName:"",reviewStatus:"",pageNum:1,pageSize:10},currpage:1,total:0,selectDialogVisible:!1,addDialogVisible:!1,editDialogVisible:!1,detailDialogVisible:!1,addForm:{reviewName:"",startTime:"",endTime:"",director:"",comments:"",createTime:(new Date).getTime(),createPerson:JSON.parse(localStorage.getItem("userInfo")).nick},addFormRules:{reviewName:[{required:!0,message:"请输入评审名称",trigger:"blur"},{min:1,max:50,message:"长度在 1 到 50 个字符",trigger:"blur"}],director:[{required:!0,message:"请输入负责人",trigger:"blur"},{min:1,max:50,message:"长度在 1 到 50 个字符",trigger:"blur"}],comments:[{required:!1,message:"请输入备注信息",trigger:"blur"},{min:0,max:200,message:"长度在 0 到 200 个字符",trigger:"blur"}]}}},mounted:function(){this.getItemNameList(),this.getReviewStatusDict(),this.getAllUserInfo(),this.getCaseTypeAndCaseStatusAndCaseLevel()},created:function(){this.getTestReviewList()},methods:{selectTestCaseToReview:function(){},selectDialogClose:function(){this.selectDialogVisible=!1,this.$refs.selectFormRef.resetFields()},getCaseTypeAndCaseStatusAndCaseLevel:function(){var e=this;this.$api.dict.queryAllDataDict().then(function(t){e.caseTypeOptions=t.data.data.caseType,e.caseLevelOptions=t.data.data.caseLevel,e.caseStatusOptions=t.data.data.caseStatus}).catch(function(){})},getItemNameList:function(){var e=this;this.$api.item.queryAllItemIdAndItemName(this.queryInfo.itemName).then(function(t){e.itemOptions=t.data.data}).catch(function(){e.loading=!1})},getAllUserInfo:function(){var e=this;this.$api.user.queryAllUserInfo().then(function(t){e.userOptions=t.data.data}).catch(function(){})},getReviewStatusDict:function(){var e=this;this.$api.dict.queryAllDataDict().then(function(t){e.reviewStatusOptions=t.data.data.reviewStatus}).catch(function(){})},selectTestReviewList:function(){this.queryInfo.pageNum=1,this.total=0,this.getTestReviewList()},getTestReviewList:function(){var e=this;this.$api.review.queryAllTestReviewInfo(i()(this.queryInfo)).then(function(t){e.loading=!1,e.testReviewList=t.data.data,e.total=t.data.count,e.queryInfo.pageNum=1}).catch(function(){e.loading=!1})},handleSizeChange:function(e){this.queryInfo.pageSize=e,this.getTestReviewList()},handleCurrentChange:function(e){this.queryInfo.pageNum=e,this.getTestReviewList()},addDialogClose:function(){this.$refs.addFormRef.resetFields()},addTestReview:function(){var e=this;this.$refs.addFormRef.validate(function(t){t&&e.$api.review.addTestReviewInfo(i()(e.addForm)).then(function(t){e.$notify({message:t.data.msg,type:"success"}),e.addDialogVisible=!1,e.getTestReviewList()}).catch(function(){e.loading=!1})})},editDialogClose:function(){this.$refs.editFormRef.resetFields()},showSelectCaseDialog:function(e){this.selectDialogVisible=!0},showEditDialog:function(e){var t=this;this.editDialogVisible=!0,this.$api.review.queryTestReviewInfoById(e).then(function(e){t.loading=!1,t.editForm=e.data.data}).catch(function(){t.loading=!1})},editTestReview:function(){var e=this;this.$refs.editFormRef.validate(function(t){t&&(e.editForm.updateTime=(new Date).getTime(),e.editForm.updatePerson=JSON.parse(localStorage.getItem("userInfo")).nick,e.$api.review.updateTestReviewInfo(i()(e.editForm)).then(function(t){e.$notify({message:t.data.msg,type:"success"}),e.editDialogVisible=!1,e.getTestReviewList()}).catch(function(){e.loading=!1}))})},showDetailDialog:function(e){var t=this;this.detailDialogVisible=!0,this.$api.review.queryTestReviewInfoById(e).then(function(e){t.loading=!1,t.detailForm=e.data.data}).catch(function(){t.loading=!1})},delTestReview:function(e){var t=this;this.$confirm("确定删除该评审吗?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(function(){t.loading=!0,t.$api.review.deleteTestReviewInfoById(e).then(function(e){t.$notify({message:e.data.msg,type:"success"}),t.loading=!1,t.getTestReviewList()}).catch(function(){t.loading=!1})}).catch(function(){})}}},P={render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"review-box"},[a("el-form",{staticClass:"review-form-inline",attrs:{inline:!0}},[a("el-form-item",{attrs:{label:"评审名称"}},[a("el-input",{attrs:{placeholder:"请输入评审名称",clearable:""},model:{value:e.queryInfo.reviewName,callback:function(t){e.$set(e.queryInfo,"reviewName",t)},expression:"queryInfo.reviewName"}})],1),e._v(" "),a("el-form-item",[a("el-form-item",{attrs:{label:"评审状态"}},[a("el-select",{attrs:{placeholder:"请选择",clearable:""},model:{value:e.queryInfo.reviewStatus,callback:function(t){e.$set(e.queryInfo,"reviewStatus",t)},expression:"queryInfo.reviewStatus"}},e._l(e.reviewStatusOptions,function(e){return a("el-option",{key:e.id,attrs:{label:e.dictValue,value:e.dictCode}})}),1)],1),e._v(" "),a("el-button",{attrs:{type:"primary"},on:{click:e.selectTestReviewList}},[e._v("查询")])],1),e._v(" "),a("el-form-item",[a("el-button",{attrs:{type:"primary"},on:{click:function(t){e.addDialogVisible=!0}}},[e._v("新建评审")])],1)],1),e._v(" "),a("el-table",{attrs:{data:e.testReviewList.slice((e.currpage-1)*e.queryInfo.pageSize,e.currpage*e.queryInfo.pageSize),border:"",fit:!0}},[a("el-table-column",{attrs:{label:"序号",type:"index",align:"center",width:"80"}}),e._v(" "),a("el-table-column",{attrs:{label:"评审名称",prop:"reviewName"}}),e._v(" "),a("el-table-column",{attrs:{label:"状态",prop:"reviewStatus",width:"100"},scopedSlots:e._u([{key:"default",fn:function(t){return["1"==t.row.reviewStatus?a("span",[a("el-tag",{attrs:{type:"info"}},[e._v("未进行")])],1):e._e(),e._v(" "),"2"==t.row.reviewStatus?a("span",[a("el-tag",{attrs:{type:"warning"}},[e._v("进行中")])],1):e._e(),e._v(" "),"3"==t.row.reviewStatus?a("span",[a("el-tag",{attrs:{type:"success"}},[e._v("已完成")])],1):e._e()]}}])}),e._v(" "),a("el-table-column",{attrs:{label:"结果分布",prop:"reviewResult"}}),e._v(" "),a("el-table-column",{attrs:{label:"负责人",prop:"director"}}),e._v(" "),a("el-table-column",{attrs:{label:"开始时间",prop:"startTime"}}),e._v(" "),a("el-table-column",{attrs:{label:"结束时间",prop:"endTime"}}),e._v(" "),a("el-table-column",{attrs:{label:"备注",prop:"comments"}}),e._v(" "),a("el-table-column",{attrs:{label:"操作",fixed:"right",width:"200"},scopedSlots:e._u([{key:"default",fn:function(t){return[e._e(),e._v(" "),a("el-button",{attrs:{type:"text",size:"small"},on:{click:function(a){return e.showDetailDialog(t.row.id)}}},[e._v("查看")]),e._v(" "),a("el-button",{attrs:{type:"text",size:"small"},on:{click:function(a){return e.showEditDialog(t.row.id)}}},[e._v("编辑")]),e._v(" "),a("el-button",{attrs:{type:"text",size:"small"},on:{click:function(a){return e.delTestReview(t.row.id)}}},[e._v("删除")])]}}])})],1),e._v(" "),a("el-pagination",{attrs:{"current-page":e.currpage,"page-sizes":[5,10,20,30],"page-size":e.queryInfo.pageSize,layout:"prev, pager, next, sizes, total, jumper",total:e.total},on:{"size-change":e.handleSizeChange,"current-change":e.handleCurrentChange}}),e._v(" "),a("el-dialog",{attrs:{title:"新建评审",visible:e.addDialogVisible,"close-on-click-modal":!1,width:"30%"},on:{"update:visible":function(t){e.addDialogVisible=t},close:e.addDialogClose}},[a("el-form",{ref:"addFormRef",attrs:{model:e.addForm,rules:e.addFormRules,"label-width":"100px"}},[a("el-form-item",{attrs:{label:"评审名称",prop:"reviewName"}},[a("el-input",{model:{value:e.addForm.reviewName,callback:function(t){e.$set(e.addForm,"reviewName",t)},expression:"addForm.reviewName"}})],1),e._v(" "),a("el-form-item",{attrs:{label:"开始时间",prop:"startTime"}},[[a("div",{staticClass:"block"},[a("el-date-picker",{attrs:{"value-format":"yyyy-MM-dd HH:mm:ss",type:"datetime",placeholder:"选择开始时间"},model:{value:e.addForm.startTime,callback:function(t){e.$set(e.addForm,"startTime",t)},expression:"addForm.startTime"}})],1)]],2),e._v(" "),a("el-form-item",{attrs:{label:"结束时间",prop:"endTime"}},[[a("div",{staticClass:"block"},[a("el-date-picker",{attrs:{"value-format":"yyyy-MM-dd HH:mm:ss",type:"datetime",placeholder:"选择结束时间"},model:{value:e.addForm.endTime,callback:function(t){e.$set(e.addForm,"endTime",t)},expression:"addForm.endTime"}})],1)]],2),e._v(" "),a("el-form-item",{attrs:{label:"负责人",prop:"director"}},[a("el-select",{attrs:{placeholder:"请选择",clearable:""},model:{value:e.addForm.director,callback:function(t){e.$set(e.addForm,"director",t)},expression:"addForm.director"}},e._l(e.userOptions,function(e){return a("el-option",{key:e.id,attrs:{label:e.nick,value:e.username}})}),1)],1),e._v(" "),a("el-form-item",{attrs:{label:"备注",prop:"comments"}},[a("el-input",{attrs:{type:"textarea"},model:{value:e.addForm.comments,callback:function(t){e.$set(e.addForm,"comments",t)},expression:"addForm.comments"}})],1)],1),e._v(" "),a("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("el-button",{on:{click:function(t){e.addDialogVisible=!1}}},[e._v("取 消")]),e._v(" "),a("el-button",{attrs:{type:"primary"},on:{click:e.addTestReview}},[e._v("确 定")])],1)],1),e._v(" "),a("el-dialog",{attrs:{title:"修改",visible:e.editDialogVisible,"close-on-click-modal":!1,width:"30%"},on:{"update:visible":function(t){e.editDialogVisible=t},close:e.editDialogClose}},[a("el-form",{ref:"editFormRef",attrs:{model:e.editForm,rules:e.addFormRules,"label-width":"100px"}},[a("el-form-item",{attrs:{label:"评审名称",prop:"reviewName"}},[a("el-input",{model:{value:e.editForm.reviewName,callback:function(t){e.$set(e.editForm,"reviewName",t)},expression:"editForm.reviewName"}})],1),e._v(" "),a("el-form-item",{attrs:{label:"开始时间",prop:"startTime"}},[[a("div",{staticClass:"block"},[a("el-date-picker",{attrs:{"value-format":"yyyy-MM-dd HH:mm:ss",type:"datetime",placeholder:"选择开始时间"},model:{value:e.editForm.startTime,callback:function(t){e.$set(e.editForm,"startTime",t)},expression:"editForm.startTime"}})],1)]],2),e._v(" "),a("el-form-item",{attrs:{label:"结束时间",prop:"endTime"}},[[a("div",{staticClass:"block"},[a("el-date-picker",{attrs:{"value-format":"yyyy-MM-dd HH:mm:ss",type:"datetime",placeholder:"选择结束时间"},model:{value:e.editForm.endTime,callback:function(t){e.$set(e.editForm,"endTime",t)},expression:"editForm.endTime"}})],1)]],2),e._v(" "),a("el-form-item",{attrs:{label:"负责人",prop:"director"}},[a("el-select",{attrs:{placeholder:"请选择",clearable:""},model:{value:e.editForm.director,callback:function(t){e.$set(e.editForm,"director",t)},expression:"editForm.director"}},e._l(e.userOptions,function(e){return a("el-option",{key:e.id,attrs:{label:e.nick,value:e.username}})}),1)],1),e._v(" "),a("el-form-item",{attrs:{label:"备注",prop:"comments"}},[a("el-input",{attrs:{type:"textarea"},model:{value:e.editForm.comments,callback:function(t){e.$set(e.editForm,"comments",t)},expression:"editForm.comments"}})],1)],1),e._v(" "),a("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("el-button",{on:{click:function(t){e.editDialogVisible=!1}}},[e._v("取 消")]),e._v(" "),a("el-button",{attrs:{type:"primary"},on:{click:e.editTestReview}},[e._v("确 定")])],1)],1),e._v(" "),a("el-dialog",{attrs:{title:"修改",visible:e.detailDialogVisible,"close-on-click-modal":!1,width:"40%"},on:{"update:visible":function(t){e.detailDialogVisible=t},close:function(t){e.detailDialogVisible=!1}}},[a("el-form",{attrs:{model:e.detailForm,"label-width":"100px"}},[a("el-form-item",{attrs:{label:"评审名称"}},[a("el-input",{attrs:{disabled:""},model:{value:e.detailForm.reviewName,callback:function(t){e.$set(e.detailForm,"reviewName",t)},expression:"detailForm.reviewName"}})],1),e._v(" "),a("el-form-item",{attrs:{label:"开始时间"}},[a("el-input",{attrs:{disabled:""},model:{value:e.detailForm.startTime,callback:function(t){e.$set(e.detailForm,"startTime",t)},expression:"detailForm.startTime"}})],1),e._v(" "),a("el-form-item",{attrs:{label:"结束时间"}},[a("el-input",{attrs:{disabled:""},model:{value:e.detailForm.endTime,callback:function(t){e.$set(e.detailForm,"endTime",t)},expression:"detailForm.endTime"}})],1),e._v(" "),a("el-form-item",{attrs:{label:"创建时间"}},[a("el-input",{attrs:{disabled:""},model:{value:e.detailForm.createTime,callback:function(t){e.$set(e.detailForm,"createTime",t)},expression:"detailForm.createTime"}})],1),e._v(" "),a("el-form-item",{attrs:{label:"创建人员"}},[a("el-input",{attrs:{disabled:""},model:{value:e.detailForm.createPerson,callback:function(t){e.$set(e.detailForm,"createPerson",t)},expression:"detailForm.createPerson"}})],1),e._v(" "),a("el-form-item",{attrs:{label:"更新时间"}},[a("el-input",{attrs:{disabled:""},model:{value:e.detailForm.updateTime,callback:function(t){e.$set(e.detailForm,"updateTime",t)},expression:"detailForm.updateTime"}})],1),e._v(" "),a("el-form-item",{attrs:{label:"更新人员"}},[a("el-input",{attrs:{disabled:""},model:{value:e.detailForm.updatePerson,callback:function(t){e.$set(e.detailForm,"updatePerson",t)},expression:"detailForm.updatePerson"}})],1),e._v(" "),a("el-form-item",{attrs:{label:"负责人"}},[a("el-select",{attrs:{placeholder:"请选择",disabled:""},model:{value:e.detailForm.director,callback:function(t){e.$set(e.detailForm,"director",t)},expression:"detailForm.director"}},e._l(e.userOptions,function(e){return a("el-option",{key:e.id,attrs:{label:e.nick,value:e.username}})}),1)],1),e._v(" "),a("el-form-item",{attrs:{label:"备注"}},[a("el-input",{attrs:{type:"textarea",disabled:""},model:{value:e.detailForm.comments,callback:function(t){e.$set(e.detailForm,"comments",t)},expression:"detailForm.comments"}})],1)],1),e._v(" "),a("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("el-button",{on:{click:function(t){e.detailDialogVisible=!1}}},[e._v("取 消")])],1)],1),e._v(" "),a("el-dialog",{attrs:{title:"选择用例",visible:e.selectDialogVisible,"close-on-click-modal":!1,width:"30%"},on:{"update:visible":function(t){e.selectDialogVisible=t},close:e.selectDialogClose}},[a("el-form",{ref:"selectFormRef",attrs:{model:e.selectForm,rules:e.addFormRules,"label-width":"100px"}},[a("el-form-item",{attrs:{label:"项目名称",prop:"itemName"}},[a("el-select",{attrs:{placeholder:"请选择",clearable:""},model:{value:e.selectForm.itemId,callback:function(t){e.$set(e.selectForm,"itemId",t)},expression:"selectForm.itemId"}},e._l(e.itemOptions,function(e){return a("el-option",{key:e.id,attrs:{label:e.itemName,value:e.id}})}),1)],1),e._v(" "),a("el-form-item",{attrs:{label:"测试模块",prop:"testMode"}},[a("el-input",{attrs:{placeholder:"请输入测试模块名称"},model:{value:e.selectForm.testMode,callback:function(t){e.$set(e.selectForm,"testMode",t)},expression:"selectForm.testMode"}})],1),e._v(" "),a("el-form-item",{attrs:{label:""}})],1),e._v(" "),a("span",{staticClass:"dialog-footer",attrs:{slot:"footer"},slot:"footer"},[a("el-button",{on:{click:function(t){e.selectDialogVisible=!1}}},[e._v("取 消")]),e._v(" "),a("el-button",{attrs:{type:"primary"},on:{click:e.selectTestCaseToReview}},[e._v("确 定")])],1)],1)],1)},staticRenderFns:[]};var D={data:function(){return{activeName:"statistic",load:{statistic:!0,list:!1,plan:!1,review:!1,report:!1}}},mounted:function(){},created:function(){},methods:{handleClick:function(e,t){!1===this.load[e.name]&&(this.load[e.name]=!0)}},components:{FunctionStatistic:r,FunctionList:u,FunctionTestPlan:a("VU/8")(k,S,!1,function(e){a("sBM7")},"data-v-5d38ea14",null).exports,FunctionTestReview:a("VU/8")($,P,!1,function(e){a("38Oc")},"data-v-721c3f62",null).exports,FunctionTestReport:x}},L={render:function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticClass:"function-box"},[a("el-tabs",{on:{"tab-click":e.handleClick},model:{value:e.activeName,callback:function(t){e.activeName=t},expression:"activeName"}},[a("el-tab-pane",{attrs:{label:"概览",name:"statistic"}},[a("FunctionStatistic")],1),e._v(" "),a("el-tab-pane",{attrs:{label:"用例列表",name:"list"}},[e.load.list?a("FunctionList"):e._e()],1),e._v(" "),a("el-tab-pane",{attrs:{label:"测试计划",name:"plan"}},[e.load.plan?a("FunctionTestPlan"):e._e()],1),e._v(" "),e._e(),e._v(" "),a("el-tab-pane",{attrs:{label:"测试报告",name:"report"}},[e.load.report?a("function-test-report"):e._e()],1)],1)],1)},staticRenderFns:[]};var R=a("VU/8")(D,L,!1,function(e){a("trd+")},"data-v-11e713e2",null);t.default=R.exports},jyFz:function(e,t,a){var l=function(){return this}()||Function("return this")(),i=l.regeneratorRuntime&&Object.getOwnPropertyNames(l).indexOf("regeneratorRuntime")>=0,s=i&&l.regeneratorRuntime;if(l.regeneratorRuntime=void 0,e.exports=a("SldL"),i)l.regeneratorRuntime=s;else try{delete l.regeneratorRuntime}catch(e){l.regeneratorRuntime=void 0}},sBM7:function(e,t){},"trd+":function(e,t){},ydHx:function(e,t){}});
|
||
//# sourceMappingURL=2.1b6eb0cc4b8e9c6928a2.js.map
|