(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2d0b2aee"],{"24c9":function(t,e,n){"use strict";n.r(e);var i=function(){var t=this,e=t.$createElement,n=t._self._c||e;return n("div",{staticClass:"app-container"},[n("div",{staticClass:"app-container--hd pb-20"},[n("h3",[t._v("位置管理")]),n("div",{staticClass:"btn-wrapper"},[n("el-button",{attrs:{type:"info",icon:"el-icon-plus"},on:{click:t.linkToAdd}},[t._v(" 新增位置 ")])],1)]),n("div",{staticClass:"app-container--bd"},[n("div",{staticClass:"table-container"},[n("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.listLoading,expression:"listLoading"}],staticStyle:{width:"100%"},attrs:{data:t.positionList,"element-loading-text":"正在获取数据。。。",border:"",fit:"",stripe:"","highlight-current-row":""}},[n("el-table-column",{attrs:{align:"center",label:"序号",prop:"$index",width:"60px"},scopedSlots:t._u([{key:"default",fn:function(e){return[n("span",[t._v(t._s(e.$index+1))])]}}])}),n("el-table-column",{attrs:{label:"位置编号",prop:"position_id"}}),n("el-table-column",{attrs:{label:"位置名称",prop:"position_name"}}),n("el-table-column",{attrs:{label:"状态"},scopedSlots:t._u([{key:"default",fn:function(e){return[n("span",{directives:[{name:"show",rawName:"v-show",value:0==e.row.is_enable,expression:"scope.row.is_enable == 0"}],staticClass:"ml-20 status-pink"},[t._v("无效")]),n("span",{directives:[{name:"show",rawName:"v-show",value:1==e.row.is_enable,expression:"scope.row.is_enable == 1"}],staticClass:"ml-20 status-blue"},[t._v("有效")])]}}])}),n("el-table-column",{attrs:{label:"操作",align:"center"},scopedSlots:t._u([{key:"default",fn:function(e){return[n("el-button",{staticClass:"deal_btn",attrs:{type:"text"},on:{click:function(n){return t.linkToEdit(e.row.position_id)}}},[t._v("编辑")]),n("el-button",{staticClass:"deal_btn",attrs:{type:"text"},on:{click:function(n){return t.delConfirm(e.row.position_id)}}},[t._v("删除")])]}}])})],1)],1),n("div",{staticClass:"pagination-container fr"},[n("el-pagination",{attrs:{"current-page":t.page,"page-sizes":[10,20,50,100],"page-size":t.pageSize,layout:"total, sizes, prev, pager, next, jumper",total:t.total},on:{"size-change":t.handleSizeChange,"current-change":t.handleCurrentChange,"prev-click":t.handlePrevClick,"next-click":t.handleNextClick}})],1)])])},a=[],s=(n("2397"),n("6b54"),n("96cf"),n("1da1")),o=n("d4ec"),r=n("bee2"),l=n("99de"),c=n("7e84"),u=n("262e"),p=n("9ab4"),d=n("60a3"),h=n("c1de7");function f(t,e,n){return e=Object(c["a"])(e),Object(l["a"])(t,v()?Reflect.construct(e,n||[],Object(c["a"])(t).constructor):e.apply(t,n))}function v(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(v=function(){return!!t})()}var g=function(t){function e(){var t;return Object(o["a"])(this,e),t=f(this,e,arguments),t.listLoading=!1,t.page=1,t.pageSize=10,t.total=0,t.positionList=[],t}return Object(u["a"])(e,t),Object(r["a"])(e,[{key:"mounted",value:function(){this.getList()}},{key:"getList",value:function(){var t=Object(s["a"])(regeneratorRuntime.mark((function t(){var e,n,i;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return e={page:this.page,size:this.pageSize},t.next=3,Object(h["e"])(e);case 3:n=t.sent,i=n.data,this.positionList=i.list,this.total=i.count;case 7:case"end":return t.stop()}}),t,this)})));function e(){return t.apply(this,arguments)}return e}()},{key:"delPosition",value:function(){var t=Object(s["a"])(regeneratorRuntime.mark((function t(e){var n,i;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return n={position_id:e},t.next=3,Object(h["b"])(n);case 3:i=t.sent,i.data,this.$message({message:"删除位置成功！",type:"success"}),this.getList();case 7:case"end":return t.stop()}}),t,this)})));function e(e){return t.apply(this,arguments)}return e}()},{key:"delConfirm",value:function(t){var e=this;this.$confirm("确定要删除吗?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then((function(){e.delPosition(t)})).catch((function(t){console.log(t)}))}},{key:"linkToAdd",value:function(){this.$router.push({name:"PositionAdd"})}},{key:"linkToEdit",value:function(t){this.$router.push({name:"PositionEdit",query:{position_id:t.toString()}})}},{key:"handleSizeChange",value:function(t){this.pageSize=t,this.getList()}},{key:"handleCurrentChange",value:function(t){this.page=t,this.getList()}},{key:"handlePrevClick",value:function(t){this.page=t,this.getList()}},{key:"handleNextClick",value:function(t){this.page=t,this.getList()}}]),e}(d["i"]);g=Object(p["a"])([d["a"]],g);var b=g,k=b,m=n("2877"),w=Object(m["a"])(k,i,a,!1,null,null,null);e["default"]=w.exports}}]);