You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
crmeb_php/public/system/js/chunk-2d0e4ff1.e57adbc5.js

1 line
3.1 KiB

12 months ago
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2d0e4ff1"],{9334: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("el-button",{attrs:{size:"small",type:"primary"},on:{click:function(e){return t.onAdd(0)}}},[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","row-key":"menu_id","highlight-current-row":"","default-expand-all":!1,"tree-props":{children:"children",hasChildren:"hasChildren"}}},[a("el-table-column",{attrs:{label:"菜单名称","min-width":"200"},scopedSlots:t._u([{key:"default",fn:function(e){return[a("span",[t._v(t._s(e.row.menu_name+" [ "+e.row.menu_id+" ]"))])]}}])}),t._v(" "),a("el-table-column",{attrs:{prop:"route",label:"菜单地址","min-width":"150"}}),t._v(" "),a("el-table-column",{attrs:{label:"菜单图标","min-width":"100"},scopedSlots:t._u([{key:"default",fn:function(t){return[a("div",{staticClass:"listPic"},[a("i",{class:"el-icon-"+t.row.icon,staticStyle:{"font-size":"20px"}})])]}}])}),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",disabled:t.isChecked},on:{click:function(a){return t.onAdd(e.row.menu_id)}}},[t._v("添加子菜单")]),t._v(" "),a("el-button",{attrs:{type:"text",size:"small"},on:{click:function(a){return t.onEdit(e.row.menu_id)}}},[t._v("编辑")]),t._v(" "),a("el-button",{attrs:{type:"text",size:"small"},on:{click:function(a){return t.handleDelete(e.row.menu_id,e.$index)}}},[t._v("删除")])]}}])})],1)],1)],1)},i=[],s=(a("c5f6"),a("8593")),l={name:"Menu",data:function(){return{isChecked:!1,listLoading:!0,tableData:{data:[],total:0},tableFrom:{page:1,limit:20}}},mounted:function(){this.getList()},methods:{getList:function(){var t=this;this.listLoading=!0,Object(s["F"])(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.tableData.page=t,this.getList()},handleSizeChange:function(t){this.tableData.limit=t,this.getList()},onAdd:function(t){var e=this,a={};Number(t)>0&&(a.formData={pid:t}),this.$modalForm(Object(s["D"])(),a).then((function(){e.getList(),e.$store.dispatch("user/getMenus")}))},onEdit:function(t){var e=this;this.$modalForm(Object(s["G"])(t)).then((function(){e.getList(),e.$store.dispatch("user/getMenus")}))},handleDelete:function(t,e){var a=this;this.$modalSure("删除菜单吗").then((function(){Object(s["E"])(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)}))}))}}},o=l,r=a("2877"),c=Object(r["a"])(o,n,i,!1,null,"4abc7386",null);e["default"]=c.exports}}]);