(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-06d05c38"],{"0c02":function(t,e,a){},b0c0:function(t,e,a){var s=a("83ab"),n=a("5e77").EXISTS,c=a("e330"),o=a("9bf2").f,r=Function.prototype,i=c(r.toString),l=/^\s*function ([^ (]*)/,u=c(l.exec),h="name";s&&!n&&o(r,h,{configurable:!0,get:function(){try{return u(l,i(this))[1]}catch(t){return""}}})},d479:function(t,e,a){"use strict";a.r(e);var s=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"case"},[a("div",{staticClass:"top_search"},[a("el-row",[a("el-col",{staticClass:"flex",attrs:{span:6}},[a("el-input",{attrs:{"prefix-icon":"el-icon-search",clearable:""},nativeOn:{keyup:function(e){return t.keyDown(e)}},model:{value:t.searchData.name,callback:function(e){t.$set(t.searchData,"name",e)},expression:"searchData.name"}}),a("el-button",{staticStyle:{margin:"10px"},attrs:{type:"primary"},on:{click:t.routeGo}},[t._v("新增")])],1)],1)],1),a("div",{staticClass:"table"},[a("el-table",{staticStyle:{width:"100%"},attrs:{data:t.tableData},on:{"row-click":t.tabRowClick}},[a("el-table-column",{attrs:{prop:"name",label:"名称",align:"center"}}),a("el-table-column",{attrs:{prop:"des",label:"描述",align:"center"}}),a("el-table-column",{attrs:{label:"操作",align:"center"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-button",{attrs:{type:"primary",size:"mini"},on:{click:function(a){return a.stopPropagation(),t.routeGo(e.row)}}},[t._v("编辑")]),a("el-button",{attrs:{type:"danger",size:"mini"},on:{click:function(a){return a.stopPropagation(),t.deleteTable(e.row.id)}}},[t._v("删除")])]}}])})],1),a("el-pagination",{staticStyle:{"text-align":"right","margin-top":"10px"},attrs:{layout:"prev, pager, next",total:t.pageTotal},on:{"current-change":t.currentChange}})],1)])},n=[],c=a("5530"),o=(a("b0c0"),{name:"case",data:function(){return{form:{},tableData:[],searchData:{pageNum:1,pageSize:10},pageTotal:0}},mounted:function(){console.log(this.$store.state.projectId.id),this.$store.state.projectId.id&&this.getAllTestCases()},watch:{"$store.state.projectId":function(t){this.getAllTestCases()}},methods:{keyDown:function(t){console.log(t),"Enter"==t.code&&this.searchTable()},routeGo:function(t){this.$store.dispatch("changeEditIdAct",t.id),this.$router.push({path:"./taskBar",query:Object(c["a"])({},t)})},searchTable:function(){this.searchData.pageNum=1,this.getAllTestCases()},currentChange:function(t){this.searchData.pageNum=t,this.getAllTestCases()},getAllTestCases:function(){var t=this;this.searchData.name?this.$http.queryTestCasesCondition(this.$store.state.projectId.id,this.searchData).then((function(e){var a=e.data.data.records;t.pageTotal=e.data.data.total,t.tableData=a,t.$store.dispatch("changehomeSelectValueAct",t.tableData),t.$store.dispatch("changehomeSelectPathAct","./taskBar")})).catch((function(e){0==e.response.data.indexOf("0 您查询的页码已经超出范围")&&(t.searchData.pageNum=t.searchData.pageNum-1),t.getAllTestCases()})):this.$http.queryAllTestCases(this.$store.state.projectId.id,this.searchData).then((function(e){var a=e.data.data.records;t.pageTotal=e.data.data.total,t.tableData=a,t.$store.dispatch("changehomeSelectValueAct",t.tableData),t.$store.dispatch("changehomeSelectPathAct","./taskBar")})).catch((function(e){0==e.response.data.indexOf("0 您查询的页码已经超出范围")&&(t.searchData.pageNum=t.searchData.pageNum-1),t.getAllTestCases()}))},tabRowClick:function(t,e,a){this.routeGo(t)},deleteTable:function(t){var e=this;this.$confirm("此操作将永久删除该数据, 是否继续?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){e.$http.deleteTestCases(t).then((function(t){e.getAllTestCases(),e.$message({type:"success",message:"删除成功!"})})).catch((function(t){}))})).catch((function(){e.$message({type:"info",message:"已取消删除"})}))}}}),r=o,i=(a("ff9c"),a("2877")),l=Object(i["a"])(r,s,n,!1,null,"6e0221fe",null);e["default"]=l.exports},ff9c:function(t,e,a){"use strict";a("0c02")}}]);