Няма описание

7.33740e1b7190d70b0fb0.js 2.5KB

    webpackJsonp([7],{M6iU:function(t,e,a){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n={render:function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{attrs:{id:"setting-operator"}},[a("div",{staticClass:"setting-title"},[a("p",[t._v("操作员")]),t._v(" "),a("router-link",{attrs:{to:{name:"setting-operator-editor",params:{title:"设置操作员信息"}}}},[t._v("添加")])],1),t._v(" "),a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],staticStyle:{width:"100%"},attrs:{data:t.operators,border:""}},[a("el-table-column",{attrs:{fixed:"",prop:"name",label:"姓名",width:"200"}}),t._v(" "),a("el-table-column",{attrs:{prop:"phone",label:"电话",width:"200"}}),t._v(" "),a("el-table-column",{attrs:{label:"操作"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-button",{attrs:{size:"mini"},on:{click:function(a){t.handleEdit(e.$index,e.row)}}},[t._v("编辑")]),t._v(" "),a("el-button",{attrs:{size:"mini",type:"danger"},on:{click:function(a){t.handleDelete(e.$index,e.row)}}},[t._v("删除")])]}}])})],1),t._v(" "),0!=t.count?a("el-pagination",{staticClass:"pagination",attrs:{background:"","current-page":t.currentPage,layout:"total, prev, pager, next","page-size":20,total:t.count},on:{"current-change":t.handleCurrentChange,"update:currentPage":function(e){t.currentPage=e}}}):t._e()],1)},staticRenderFns:[]};var o=a("VU/8")({data:function(){return{operators:[],currentPage:1,loading:!0,count:0}},created:function(){var t=this;this.$axios.post("operator/list",{page:this.currentPage}).then(function(e){t.operators=e.data.data.optors,t.count=e.data.data.count,t.loading=!1})},methods:{handleEdit:function(t,e){var a=this.operators[t];a.title="设置操作员信息",this.$router.push({name:"setting-operator-editor",params:a})},handleDelete:function(t,e){var a=this;this.$confirm("此操作将永久删除该操作员, 是否继续?","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}).then(function(){a.$axios.post("operator/delete",a.operators[t]).then(function(e){200==e.data.status?(a.operators.splice(t,1),a.$message({type:"success",message:"删除成功!"})):a.$message({type:"failure",message:"删除失败!"})})})},handleCurrentChange:function(t){var e=this;this.$axios.post("operator/list",{page:t,num:20}).then(function(t){e.$nextTick(function(){e.operators=t.data.data.optors,e.loading=!1})})}}},n,!1,function(t){a("UOaS")},"data-v-67037a19",null);e.default=o.exports},UOaS:function(t,e){}}); //# sourceMappingURL=7.33740e1b7190d70b0fb0.js.map