shop_mer_admin/mer/js/chunk-65795b96.bcf08b5b.js

1 line
3.7 KiB
JavaScript
Raw Normal View History

2024-03-16 17:53:53 +08:00
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-65795b96"],{5405: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("el-button",{staticClass:"mb20",attrs:{size:"small",type:"primary"},on:{click:t.onAdd}},[t._v("添加管理员")]),t._v(" "),a("el-table",{directives:[{name:"loading",rawName:"v-loading",value:t.listLoading,expression:"listLoading"}],attrs:{data:t.tableData.data,size:"small","highlight-current-row":""}},[a("el-table-column",{attrs:{prop:"merchant_admin_id",label:"ID","min-width":"60"}}),t._v(" "),a("el-table-column",{attrs:{prop:"real_name",label:"管理员姓名","min-width":"150"}}),t._v(" "),a("el-table-column",{attrs:{prop:"rule_name",label:"身份","min-width":"250"}}),t._v(" "),a("el-table-column",{attrs:{prop:"account",label:"账号","min-width":"250"}}),t._v(" "),a("el-table-column",{attrs:{prop:"status",label:"是否显示","min-width":"150"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-switch",{attrs:{"active-value":1,"inactive-value":0,width:55,"active-text":"开启","inactive-text":"关闭"},on:{change:function(a){return t.onchangeIsShow(e.row)}},model:{value:e.row.status,callback:function(a){t.$set(e.row,"status",a)},expression:"scope.row.status"}})]}}])}),t._v(" "),a("el-table-column",{attrs:{prop:"create_time",label:"创建时间","min-width":"150"}}),t._v(" "),a("el-table-column",{attrs:{label:"操作","min-width":"180",fixed:"right"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-button",{attrs:{type:"text",size:"small"},on:{click:function(a){return t.onPassword(e.row.merchant_admin_id)}}},[t._v("修改管理员密码")]),t._v(" "),a("el-button",{attrs:{type:"text",size:"small"},on:{click:function(a){return t.onEdit(e.row.merchant_admin_id)}}},[t._v("编辑")]),t._v(" "),a("el-button",{attrs:{type:"text",size:"small"},on:{click:function(a){return t.handleDelete(e.row.merchant_admin_id,e.$index)}}},[t._v("删除")])]}}])})],1),t._v(" "),a("div",{staticClass:"block"},[a("el-pagination",{attrs:{background:"","page-size":t.tableFrom.limit,"current-page":t.tableFrom.page,layout:"total, prev, pager, next, jumper",total:t.tableData.total},on:{"size-change":t.handleSizeChange,"current-change":t.pageChange}})],1)],1)],1)},i=[],s=a("90e7"),l={name:"SystemRole",data:function(){return{grid:{xl:7,lg:7,md:12,sm:24,xs:24},tableData:{data:[],total:0},listLoading:!0,tableFrom:{page:1,limit:20}}},mounted:function(){this.getList()},methods:{getList:function(){var t=this;this.listLoading=!0,Object(s["d"])(this.tableFrom).then((function(e){t.tableData.data=e.data.list,t.tableData.total=e.data.count,t.listLoading=!1})).catch((function(e){t.listLoading=!1,t.$message.error(e.message)}))},pageChange:function(t){this.tableFrom.page=t,this.getList()},handleSizeChange:function(t){this.tableFrom.limit=t,this.getList()},onchangeIsShow:function(t){var e=this;Object(s["g"])(t.merchant_admin_id,t.status).then((function(t){var a=t.message;e.$message.success(a)})).catch((function(t){var a=t.message;e.$message.error(a)}))},onAdd:function(){var t=this;this.$modalForm(Object(s["b"])()).then((function(){return t.getList()}))},onEdit:function(t){var e=this;this.$modalForm(Object(s["h"])(t)).then((function(){return e.getList()}))},onPassword:function(t){this.$modalForm(Object(s["f"])(t))},handleDelete:function(t,e){var a=this;this.$modalSure().then((function(){Object(s["c"])(t).then((function(t){var n=t.message;a.$message.success(n),a.tableData.data.splice(e,1)})).catch((function(t){var e=t.message;a.$message.error(e)}))}))}}},o=l,c=(a("7c3c"),a("2877")),r=Object(c["a"])(o,n,i,!1,null,"7d60414f",null);e["default"]=r.exports},"7c3c":function(t,e,a){"use strict";a("87c0")},"87c0":function(t,e,a){}}]);