canyin-project/ybcy/views/channel/index/static/js/chunk-42478788.1468d84c.js

1 line
8.9 KiB
JavaScript
Raw Normal View History

2024-11-01 16:07:54 +08:00
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-42478788"],{"153a":function(e,t,r){"use strict";r.r(t);var a=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{staticClass:"outmain ba_f"},[e._m(0),r("el-button",{staticClass:"mar_t20",attrs:{type:"primary",size:"medium"},on:{click:e.handleEdit}},[e._v("新增操作员")]),r("div",{staticClass:"tabledata mar_t20"},[r("el-table",{directives:[{name:"loading",rawName:"v-loading",value:e.listLoading,expression:"listLoading"}],staticStyle:{width:"100%"},attrs:{"element-loading-text":e.elementLoadingText,data:e.list,stripe:""},on:{"selection-change":e.setSelectRows}},[r("el-table-column",{attrs:{type:"selection",width:"55"}}),r("el-table-column",{attrs:{prop:"sort",label:"排序"}}),r("el-table-column",{attrs:{prop:"trueName",label:"员工姓名"}}),r("el-table-column",{attrs:{prop:"userName",label:"登录账号"}}),r("el-table-column",{attrs:{prop:"role_name",label:"所属用户组"}}),r("el-table-column",{attrs:{prop:"display",label:"状态"},scopedSlots:e._u([{key:"default",fn:function(t){return[r("div",{},[r("el-switch",{attrs:{"active-value":"1","inactive-value":"2"},on:{change:function(r){return e.changeSwitch(t.row)}},model:{value:t.row.display,callback:function(r){e.$set(t.row,"display",r)},expression:"scope.row.display"}})],1)]}}])}),r("el-table-column",{attrs:{label:"操作"},scopedSlots:e._u([{key:"default",fn:function(t){return[r("div",{staticClass:"flex"},[r("el-button",{attrs:{type:"text"},on:{click:function(r){return e.handleEdit(t.row)}}},[e._v("编辑")]),r("el-button",{attrs:{type:"text"},on:{click:function(r){return e.handleDelete(t.row)}}},[e._v("删除")])],1)]}}])})],1),r("el-pagination",{attrs:{background:"",layout:"prev, pager, next",total:e.page.total,"page-size":e.page.pagesize,"current-page":e.page.currentPage},on:{"update:currentPage":function(t){return e.$set(e.page,"currentPage",t)},"update:current-page":function(t){return e.$set(e.page,"currentPage",t)},"current-change":e.handleCurrentChange}}),r("ggedit",{ref:"ggedit",on:{fetchData:e.fetchData}})],1)],1)},n=[function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("div",{staticClass:"shuju_title mar_b20"},[r("div",{staticClass:"shuju_title_text"},[r("span",[e._v("操作员管理")])])])}],s=(r("d81d"),r("96cf"),r("1da1")),o=r("5530"),i=r("b896"),l=r("294d"),c=r("2f62"),u={components:{Ggedit:i["a"]},created:function(){this.fetchData()},computed:Object(o["a"])({},Object(c["d"])(["storeId"])),data:function(){return{list:[],listLoading:!0,selectRows:"",elementLoadingText:"正在加载...",page:{total:0,size:10,currentPage:1}}},methods:{fetchData:function(){var e=this;return Object(s["a"])(regeneratorRuntime.mark((function t(){var r,a,n,s;return regeneratorRuntime.wrap((function(t){while(1)switch(t.prev=t.next){case 0:return e.listLoading=!0,r={page:e.page.currentPage,storeId:e.storeId},t.next=4,Object(l["I"])(r);case 4:a=t.sent,n=a.data,s=a.count,e.list=n,e.page.total=s,setTimeout((function(){e.listLoading=!1}),100);case 10:case"end":return t.stop()}}),t)})))()},handleEdit:function(e){console.log(this.$refs["ggedit"]),this.$refs["edit"].setStoreId(this.storeId),e.id?this.$refs["ggedit"].showEdit(e):this.$refs["ggedit"].showEdit()},setSelectRows:function(e){this.selectRows=e},handleCurrentChange:function(e){this.page.currentPage=e,this.fetchData()},changeSwitch:function(e){var t=this;return Object(s["a"])(regeneratorRuntime.mark((function r(){var a,n;return regeneratorRuntime.wrap((function(r){while(1)switch(r.prev=r.next){case 0:return r.next=2,Object(l["g"])({id:e.id,display:e.display,storeId:t.storeId});case 2:a=r.sent,n=a.msg,t.$baseMessage(n,"success"),t.fetchData();case 6:case"end":return r.stop()}}),r)})))()},handleDelete:function(e){var t=this;if(e.id)this.$baseConfirm("你确定要删除当前项吗",null,Object(s["a"])(regeneratorRuntime.mark((function r(){var a,n;return regeneratorRuntime.wrap((function(r){while(1)switch(r.prev=r.next){case 0:return r.next=2,Object(l["cb"])({id:e.id,storeId:t.storeId});case 2:a=r.sent,n=a.msg,t.$baseMessage(n