(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-90657762"],{"19f6":function(t,e,a){},"97df":function(t,e,a){"use strict";a.r(e);var n=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"divBox"},[a("el-card",{staticClass:"box-card"},[a("div",{staticClass:"clearfix",attrs:{slot:"header"},slot:"header"},[a("div",{staticClass:"container"},[a("el-form",{attrs:{size:"small","label-width":"120px",inline:""}},[a("el-form-item",{attrs:{label:"用户名:"}},[a("el-input",{staticClass:"selWidth",attrs:{placeholder:"请输入用户名"},nativeOn:{keyup:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.getList(1)}},model:{value:t.tableFrom.username,callback:function(e){t.$set(t.tableFrom,"username",e)},expression:"tableFrom.username"}},[a("el-button",{staticClass:"el-button-solt",attrs:{slot:"append",icon:"el-icon-search"},on:{click:function(e){return t.getList(1)}},slot:"append"})],1)],1),t._v(" "),a("el-form-item",{attrs:{label:"昵称:"}},[a("el-input",{staticClass:"selWidth",attrs:{placeholder:"请输入昵称"},nativeOn:{keyup:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.getList(1)}},model:{value:t.tableFrom.nickname,callback:function(e){t.$set(t.tableFrom,"nickname",e)},expression:"tableFrom.nickname"}},[a("el-button",{staticClass:"el-button-solt",attrs:{slot:"append",icon:"el-icon-search"},on:{click:function(e){return t.getList(1)}},slot:"append"})],1)],1)],1)],1),t._v(" "),a("el-button",{attrs:{size:"small",type:"primary"},on:{click:t.onAdd}},[a("i",{staticClass:"add"},[t._v("+")]),t._v(" 添加助手\n ")])],1),t._v(" "),a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.listLoading,expression:"listLoading"}],staticStyle:{width:"100%"},attrs:{data:t.tableData.data,size:"mini"}},[a("el-table-column",{attrs:{prop:"assistant_id",label:"ID","min-width":"150"}}),t._v(" "),a("el-table-column",{attrs:{prop:"username",label:"用户名","min-width":"200"}}),t._v(" "),a("el-table-column",{attrs:{prop:"nickname",label:"昵称","min-width":"200"}}),t._v(" "),a("el-table-column",{attrs:{label:"操作","min-width":"200",fixed:"right"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-button",{staticClass:"mr10",attrs:{type:"text",size:"small"},on:{click:function(a){return t.onEdit(e.row.assistant_id)}}},[t._v("编辑")]),t._v(" "),a("el-button",{staticClass:"mr10",attrs:{type:"text",size:"small"},on:{click:function(a){return t.handleDelete(e.row.assistant_id,e.$index)}}},[t._v("删除")])]}}])})],1),t._v(" "),a("div",{staticClass:"block"},[a("el-pagination",{attrs:{"page-sizes":[20,40,60,80],"page-size":t.tableFrom.limit,"current-page":t.tableFrom.page,layout:"total, sizes, prev, pager, next, jumper",total:t.tableData.total},on:{"size-change":t.handleSizeChange,"current-change":t.pageChange}})],1)],1)],1)},i=[],s=a("83d6"),l=a("b7be"),o={name:"AssistantList",data:function(){return{roterPre:s["roterPre"],listLoading:!0,tableData:{data:[],total:0},tableFrom:{page:1,limit:20,username:"",nickname:""},loading:!1}},watch:{},mounted:function(){this.getList("")},methods:{getList:function(t){var e=this;this.listLoading=!0,this.tableFrom.page=t||this.tableFrom.page,Object(l["bb"])(this.tableFrom).then((function(t){e.tableData.data=t.data.list,e.tableData.total=t.data.count,e.listLoading=!1})).catch((function(t){e.listLoading=!1,e.$message.error(t.message)}))},pageChange:function(t){this.tableFrom.page=t,this.getList("")},handleSizeChange:function(t){this.tableFrom.limit=t,this.getList("")},onAdd:function(){var t=this;this.$modalForm(Object(l["cb"])()).then((function(){return t.getList("")}))},onEdit:function(t){var e=this;this.$modalForm(Object(l["eb"])(t)).then((function(){return e.getList("")}))},handleDelete:function(t,e){var a=this;this.$modalSure("删除该助手").then((function(){Object(l["db"])(t).then((function(t){var e=t.message;a.$message.success(e),a.getList("")})).catch((function(t){var e=t.message;a.$message.error(e)}))}))}}},r=o,c=(a("c115"),a("2877")),u=Object(c["a"])(r,n,i,!1,null,"072a4f8a",null);e["default"]=u.exports},c115:function(t,e,a){"use strict";a("19f6")}}]);