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-32303313.12894036.js

1 line
6.8 KiB

12 months ago
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-32303313"],{"76c9":function(t,n,e){"use strict";e.r(n);var r=function(){var t=this,n=t.$createElement,e=t._self._c||n;return e("div",{staticClass:"divBox"},[e("el-card",{staticClass:"box-card"},[e("div",{staticClass:"clearfix",attrs:{slot:"header"},slot:"header"},[e("el-button",{attrs:{size:"small",type:"primary"},on:{click:t.onAdd}},[t._v("添加分类")])],1),t._v(" "),e("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":"id","default-expand-all":!1,"tree-props":{children:"children",hasChildren:"hasChildren"}}},[e("el-table-column",{attrs:{prop:"id",label:"ID","min-width":"60"}}),t._v(" "),e("el-table-column",{attrs:{prop:"name",label:"名称","min-width":"150"}}),t._v(" "),e("el-table-column",{attrs:{prop:"type",label:"类型","min-width":"100"}}),t._v(" "),e("el-table-column",{attrs:{prop:"status",label:"是否显示","min-width":"100"},scopedSlots:t._u([{key:"default",fn:function(n){return[e("el-switch",{attrs:{"active-value":1,"inactive-value":0,"active-text":"显示","inactive-text":"隐藏"},on:{change:function(e){return t.onchangeIsShow(n.row)}},model:{value:n.row.status,callback:function(e){t.$set(n.row,"status",e)},expression:"scope.row.status"}})]}}])}),t._v(" "),e("el-table-column",{attrs:{prop:"add_time",label:"添加时间","min-width":"150"}}),t._v(" "),e("el-table-column",{attrs:{label:"操作","min-width":"150"},scopedSlots:t._u([{key:"default",fn:function(n){return[e("el-button",{attrs:{type:"text",size:"small"},on:{click:function(e){return t.edit(n.row)}}},[t._v("编辑")]),t._v(" "),e("el-button",{attrs:{type:"text",size:"small"},on:{click:function(e){return t.handleDelete(n.row,n.$index)}}},[t._v("删除")])]}}])})],1)],1)],1)},i=[],o=e("f478"),u=e("83d6"),c={name:"MerchantCategory",data:function(){return{roterPre:u["roterPre"],listLoading:!0,tableData:{data:[]},tableFrom:{page:1,limit:20}}},mounted:function(){this.getList()},methods:{getList:function(){var t=this;this.listLoading=!0,Object(o["C"])(this.tableFrom).then((function(n){t.tableData.data=n.data,t.listLoading=!1})).catch((function(n){t.listLoading=!1,t.$message.error(n.message)}))},onAdd:function(){var t=this;this.$modalForm(Object(o["a"])()).then((function(){return t.getList()}))},edit:function(t){var n=this;this.$modalForm(Object(o["p"])(t.id)).then((function(){return n.getList()}))},onchangeIsShow:function(t){var n=this;Object(o["D"])(t.id,t.status).then((function(t){var e=t.message;n.$message.success(e),n.getList()})).catch((function(t){var e=t.message;n.$message.error(e)}))},handleDelete:function(t,n){var e=this;this.$modalSure("删除该分类吗").then((function(){Object(o["g"])(t.id).then((function(t){var n=t.message;e.$message.success(n),e.getList()})).catch((function(t){var n=t.message;e.$message.error(n)}))}))}}},a=c,d=(e("a417"),e("2877")),s=Object(d["a"])(a,r,i,!1,null,"5826ce6f",null);n["default"]=s.exports},a417:function(t,n,e){"use strict";e("ed4e")},ed4e:function(t,n,e){},f478:function(t,n,e){"use strict";e.d(n,"t",(function(){return i})),e.d(n,"y",(function(){return o})),e.d(n,"o",(function(){return u})),e.d(n,"n",(function(){return c})),e.d(n,"m",(function(){return a})),e.d(n,"l",(function(){return d})),e.d(n,"P",(function(){return s})),e.d(n,"O",(function(){return l})),e.d(n,"e",(function(){return f})),e.d(n,"A",(function(){return g})),e.d(n,"z",(function(){return m})),e.d(n,"w",(function(){return y})),e.d(n,"B",(function(){return h})),e.d(n,"J",(function(){return p})),e.d(n,"K",(function(){return v})),e.d(n,"c",(function(){return b})),e.d(n,"r",(function(){return _})),e.d(n,"L",(function(){return w})),e.d(n,"M",(function(){return k})),e.d(n,"i",(function(){return x})),e.d(n,"a",(function(){return L})),e.d(n,"p",(function(){return $})),e.d(n,"C",(function(){return C})),e.d(n,"D",(function(){return D})),e.d(n,"g",(function(){return j})),e.d(n,"d",(function(){return O})),e.d(n,"s",(function(){return S})),e.d(n,"j",(function