启程易购后端代码
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.
 
 
 
 
 
 
qicheng_shop_backend/public/system/js/chunk-13693bd6.8e482fb3.js

1 lines
4.6 KiB

(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-13693bd6"],{3731:function(t,e,a){"use strict";a("fd15")},bd1c:function(t,e,a){"use strict";a.r(e);var s=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",{staticClass:"divBox"},[a("div",{staticClass:"selCard"},[a("el-form",{attrs:{size:"small","label-width":"85px",inline:!0}},[a("el-form-item",{attrs:{label:"是否显示:",prop:"status"}},[a("el-select",{staticClass:"selWidth",attrs:{clearable:"",filterable:"",placeholder:"请选择"},on:{change:t.getList},model:{value:t.status,callback:function(e){t.status=e},expression:"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:"分类名称:",prop:"classify_name"}},[a("el-input",{staticClass:"selWidth",attrs:{placeholder:"请输入分类名称",size:"small"},nativeOn:{keyup:function(e){return!e.type.indexOf("key")&&t._k(e.keyCode,"enter",13,e.key,"Enter")?null:t.getList(e)}},model:{value:t.classify_name,callback:function(e){t.classify_name=e},expression:"classify_name"}})],1),t._v(" "),a("el-form-item",[a("el-button",{attrs:{type:"primary",size:"small"},on:{click:t.getList}},[t._v("搜索")]),t._v(" "),a("el-button",{attrs:{size:"small"},on:{click:function(e){return t.searchReset()}}},[t._v("重置")])],1)],1)],1),t._v(" "),a("el-card",{staticClass:"mt14"},[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","row-key":"config_classify_id","default-expand-all":""}},[a("el-table-column",{attrs:{prop:"config_classify_id",label:"ID","min-width":"80"}}),t._v(" "),a("el-table-column",{attrs:{prop:"classify_name",label:"配置分类名称","min-width":"150","tree-props":{children:"children",hasChildren:"hasChildren"}}}),t._v(" "),a("el-table-column",{attrs:{prop:"classify_key",label:"配置分类key","min-width":"150"}}),t._v(" "),a("el-table-column",{attrs:{prop:"info",label:"配置分类说明","min-width":"150"}}),t._v(" "),a("el-table-column",{attrs:{prop:"icon",label:"图标","min-width":"150"}}),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":"100",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.onEdit(e.row.config_classify_id)}}},[t._v("编辑")]),t._v(" "),a("el-button",{attrs:{type:"text",size:"small"},on:{click:function(a){return t.handleDelete(e.row.config_classify_id,e.$index)}}},[t._v("删除")])]}}])})],1)],1)],1)},i=[],n=a("8593"),l={name:"Classify",data:function(){return{tableData:{data:[],total:0},listLoading:!0,status:"",classify_name:""}},mounted:function(){this.getList()},methods:{searchReset:function(){this.status="",this.classify_name="",this.getList()},getList:function(){var t=this;this.listLoading=!0,Object(n["q"])(this.status,this.classify_name).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()},onchangeIsShow:function(t){var e=this;Object(n["i"])(t.config_classify_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(n["t"])()).then((function(){return t.getList()}))},onEdit:function(t){var e=this;this.$modalForm(Object(n["fb"])(t)).then((function(){return e.getList()}))},handleDelete:function(t,e){var a=this;this.$modalSure().then((function(){Object(n["o"])(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,c=(a("3731"),a("2877")),r=Object(c["a"])(o,s,i,!1,null,"485ae312",null);e["default"]=r.exports},fd15:function(t,e,a){}}]);