webpackJsonp([11],{yg76:function(t,e,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=a("//Fk"),i=a.n(n),o=a("woOf"),l=a.n(o),s=a("0xDb"),r=a("gtmD"),u={name:"yaWeiAccount",components:{SearchTableTemplate:a("NUeu").a},methods:{search:function(t,e){this.tableConfig=l()({},this.tableConfig,{btn:e}),this.searchData={search:!0,data:l()({},t)}},save:function(t,e,a,n){var i=this;e.validate(function(e){e&&(a.loading=!0,r.a[n](t).then(function(t){i.$message({type:"success",message:t.data.message}),a.loading=!1,i.dialogConfig=l()({},i.dialogConfig,{visible:!1}),i.searchData={data:l()({},i.searchData.data)}}).catch(function(){a.loading=!1,i.dialogConfig=l()({},i.dialogConfig,{visible:!1}),i.searchData={data:l()({},i.searchData.data)}}))})},refreshSeats:function(t){var e=this;return new i.a(function(a,n){r.a.refreshSeats({id:t.id}).then(function(t){e.$message({type:"success",message:t.data.message}),e.searchData={data:l()({},e.searchData.data)},a()}).catch(function(){return a()})})},del:function(t){var e=this;return new i.a(function(a,n){e.$confirm("是否删除?","删除",{type:"error",showCancelButton:!0}).then(function(){r.a.del(t).then(function(t){e.$message({type:"success",message:"删除成功!"}),e.searchData={data:l()({},e.searchData.data)},a()}).catch(function(){e.searchData={data:l()({},e.searchData.data)},a()})}).catch(function(){return a()})})}},data:function(){var t=this;return{formInputList:[{label:"账号",value:"",type:"text",name:"userName",module:"input",placeholder:"账号"},{label:"状态",value:"",module:"select",name:"state",placeholder:"状态",optionList:t.$store.getters.dic.yaWeiAccount.accountState}],formButtonlist:[{module:"button",title:"搜索",type:"primary",icon:"el-icon-search",loading:!1,handle:function(){t.search(arguments[0],this)}},{module:"button",title:"新增",handle:function(){t.dialogConfig=l()({},t.dialogConfig,{visible:!0,saveType:"add"})}},{module:"reset",title:"重置"}],tableColumn:[{label:"账户",prop:"userName"},{label:"密码",prop:"passWord"},{label:"状态",prop:"state",formatter:function(){return Object(s.d)(t.$store.getters.dic.yaWeiAccount.accountState,arguments[2])}},{label:"积分",prop:"point"},{label:"座位",prop:"seats"},{label:"刷新座位",prop:"refreshSeats",fixed:"right",custom:!0,width:120,button:{module:"button",title:"刷新座位",prop:"refreshSeats",handle:function(){var e=arguments,a=this;arguments[0][this.prop+"_loading"]=!0,t.refreshSeats(arguments[0]).then(function(){e[0][a.prop+"_loading"]=!1})}}},{label:"删除",prop:"del",fixed:"right",custom:!0,width:80,button:{module:"button",title:"删除",type:"danger",prop:"del",handle:function(){var e=this,a=arguments[0];this.loading=arguments[1].$index,a[this.prop+"_loading"]=!0,t.del({id:arguments[0].id}).then(function(){e.loading=!1,a[e.prop+"_loading"]=!1})}}}],tableConfig:{request:r.a.list},dialogInputList:[{label:"账户",value:"",module:"input",type:"text",name:"userName",placeholder:"账户",required:!0},{label:"密码",value:"",module:"input",type:"text",name:"passWord",placeholder:"密码",required:!0}],dialogButtonlist:[{module:"reset",title:"重置",type:"text",class:"float-left"},{module:"button",title:"保存",type:"primary",width:!1,loading:!1,handle:function(){t.save(arguments[0],arguments[1],this,arguments[3])}},{module:"button",title:"取消",width:!1,handle:function(){t.dialogConfig=l()({},t.dialogConfig,{visible:!1})}}],dialogConfig:{type:"input",title:"新增",visible:!1,saveType:"add"},searchData:{}}}},d={render:function(){var t=this,e=t.$createElement;return(t._self._c||e)("search-table-template",{attrs:{formInputList:t.formInputList,formButtonlist:t.formButtonlist,tableColumn:t.tableColumn,searchData:t.searchData,tableConfig:t.tableConfig,dialogInputList:t.dialogInputList,dialogButtonlist:t.dialogButtonlist,dialogConfig:t.dialogConfig}})},staticRenderFns:[]},c=a("VU/8")(u,d,!1,null,null,null);e.default=c.exports}});