1 |
- (window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-84a22048"],{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("div",{staticClass:"clearfix",attrs:{slot:"header"},slot:"header"},[a("div",{staticClass:"container"},[a("el-form",{attrs:{size:"small","label-width":"100px",inline:!0}},[a("el-form-item",{staticStyle:{width:"100%"},attrs:{label:"选择时间:"}},[a("el-radio-group",{attrs:{size:"small"},on:{change:function(e){return t.selectChange(t.tableFrom.date)}},model:{value:t.tableFrom.date,callback:function(e){t.$set(t.tableFrom,"date",e)},expression:"tableFrom.date"}},t._l(t.fromList.fromTxt,(function(e,n){return a("el-radio-button",{key:n,attrs:{label:e.val}},[t._v(t._s(e.text))])})),1),t._v(" "),a("el-date-picker",{attrs:{type:"daterange",placeholder:"选择日期",format:"yyyy/MM/dd","value-format":"yyyy/MM/dd","range-separator":"至","start-placeholder":"开始日期","end-placeholder":"结束日期"},on:{change:t.onchangeTime},model:{value:t.timeVal,callback:function(e){t.timeVal=e},expression:"timeVal"}})],1),t._v(" "),a("el-form-item",{attrs:{label:"显示状态:"}},[a("el-select",{staticClass:"selWidth",attrs:{clearable:"",placeholder:"请选择"},on:{change:function(e){return t.getList(1)}},model:{value:t.tableFrom.status,callback:function(e){t.$set(t.tableFrom,"status",e)},expression:"tableFrom.status"}},[a("el-option",{attrs:{label:"显示",value:"1"}}),t._v(" "),a("el-option",{attrs:{label:"隐藏",value:"0"}})],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.keyword,callback:function(e){t.$set(t.tableFrom,"keyword",e)},expression:"tableFrom.keyword"}},[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}},[t._v("添加管理员")])],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:"small"}},[a("el-table-column",{attrs:{prop:"admin_id",label:"ID","min-width":"120"}}),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":"100"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("el-switch",{attrs:{"active-value":1,"inactive-value":0,"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":"150",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.admin_id)}}},[t._v("修改管理员密码")]),t._v(" "),a("el-button",{attrs:{type:"text",size:"small"},on:{click:function(a){return t.onEdit(e.row.admin_id)}}},[t._v("编辑")]),t._v(" "),a("el-button",{attrs:{type:"text",size:"small"},on:{click:function(a){return t.handleDelete(e.row.admin_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)},l=[],s=a("90e7"),i=a("e572"),o={name:"SystemRole",data:function(){return{fromList:i["a"],grid:{xl:7,lg:7,md:12,sm:24,xs:24},tableData:{data:[],total:0},listLoading:!0,tableFrom:{page:1,limit:20,keyword:"",status:"",date:""},timeVal:[]}},mounted:function(){this.getList()},methods:{selectChange:function(t){this.tableFrom.date=t,this.timeVal=[],this.tableFrom.page=1,this.getList()},onchangeTime:function(t){this.timeVal=t,this.tableFrom.date=this.timeVal?this.timeVal.join("-"):"",this.tableFrom.page=1,this.getList()},getList:function(t){var e=this;this.listLoading=!0,this.tableFrom.page=t||this.tableFrom.page,Object(s["c"])(this.tableFrom).then((function(t){e.tableData.data=t.data.list,e.tableData.total=t.data.count,e.listLoading=!1})).catch((function(t){e.tableData.data=[],e.tableData.total=0,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()},onchangeIsShow:function(t){var e=this;Object(s["f"])(t.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["a"])()).then((function(){return t.getList()}))},onEdit:function(t){var e=this;this.$modalForm(Object(s["g"])(t)).then((function(){return e.getList()}))},onPassword:function(t){this.$modalForm(Object(s["e"])(t))},handleDelete:function(t,e){var a=this;this.$modalSure().then((function(){Object(s["b"])(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)}))}))}}},r=o,c=a("2877"),u=Object(c["a"])(r,n,l,!1,null,"0053c542",null);e["default"]=u.exports},"90e7":function(t,e,a){"use strict";a.d(e,"h",(function(){return l})),a.d(e,"i",(function(){return s})),a.d(e,"l",(function(){return i})),a.d(e,"j",(function(){return o})),a.d(e,"k",(function(){return r})),a.d(e,"c",(function(){return c})),a.d(e,"a",(function(){return u})),a.d(e,"g",(function(){return d})),a.d(e,"b",(function(){return m})),a.d(e,"f",(function(){return f})),a.d(e,"e",(function(){return h})),a.d(e,"d",(function(){return b}));var n=a("0c6d");function l(t){return n["a"].get("system/role/lst",t)}function s(){return n["a"].get("system/role/create/form")}function i(t){return n["a"].get("system/role/update/form/".concat(t))}function o(t){return n["a"].delete("system/role/delete/".concat(t))}function r(t,e){return n["a"].post("system/role/status/".concat(t),{status:e})}function c(t){return n["a"].get("system/admin/lst",t)}function u(){return n["a"].get("/system/admin/create/form")}function d(t){return n["a"].get("system/admin/update/form/".concat(t))}function m(t){return n["a"].delete("system/admin/delete/".concat(t))}function f(t,e){return n["a"].post("system/admin/status/".concat(t),{status:e})}function h(t){return n["a"].get("system/admin/password/form/".concat(t))}function b(t){return n["a"].get("system/admin/log",t)}},e572:function(t,e,a){"use strict";a.d(e,"c",(function(){return n})),a.d(e,"a",(function(){return l})),a.d(e,"b",(function(){return s}));var n=[{label:"开启",value:1},{label:"关闭",value:0}],l={title:"选择时间",custom:!0,fromTxt:[{text:"全部",val:""},{text:"今天",val:"today"},{text:"昨天",val:"yesterday"},{text:"最近7天",val:"lately7"},{text:"最近30天",val:"lately30"},{text:"本月",val:"month"},{text:"本年",val:"year"}]},s={title:"状态",custom:!0,fromTxt:[{text:"全部",val:""},{text:"待审核",val:"0"},{text:"审核已通过",val:"1"},{text:"审核未通过",val:"2"}]}}}]);
|